// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,o,p,c,x,m,s,f,g,d,h,P="Confirmed";if(n=a.getSpan().innerCapture(regExpFormatted(/\1\s(.*),/,r.underPersonNamePrefix),1),o=e.subject.match(RegExp(r.carReservationIdPrefix+"\\s(\\d+)"))[1],p=a.getSpan().nextText(r.carReservationModifyUrlPrefix).nextLink(),c=a.getSpan().innerCapture(regExpFormatted(/\1\s(.*)/,r.carProviderNamePrefix),1),x=a.getSpan().innerCapture(regExpFormatted(/\1\s(.*)\s\2/,r.carBrandPrefix,r.carBrandSuffix),1),m=a.getSpan().innerCapture(regExpFormatted(/\1\s(.*)/,r.locationNamePrefix),1),s=a.getSpan().nextText(r.pickUpBlockPrefix).nextText(r.dateTimePrefix).nextDate(),f=a.getSpan().withStart(a.getSpan().nextText(r.dropOffBlockPrefix)).innerCapture(regExpFormatted(/\1\s(.*)/,r.locationNamePrefix),1),g=a.getSpan().nextText(r.dropOffBlockPrefix).nextText(r.dateTimePrefix).nextDate(),[,d,h]=a.getSpan().innerCapture(regExpFormatted(/\1\s?([\d,.]+)\s?(\D)/,r.pricePrefix)),ASSERT(o,m,s))return[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:d,priceCurrency:h,reservationStatus:"http://schema.org/Reservation"+P,reservationId:o,modifyReservationUrl:p,underName:{"@type":"http://schema.org/Person",name:n,email:i},provider:{"@type":"http://schema.org/Organization",name:c},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:x}},pickupTime:s,pickupLocation:{"@type":"http://schema.org/Place",name:m},dropoffTime:g,dropoffLocation:{"@type":"http://schema.org/Place",name:f}}]}}).call();