// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var r=Scanner.fromMessage(e);r.setLocale(t);var a,i,o,s,c,p,u,m,g,l,h,C,d,S;c=r.getSpan().innerCapture(n.reservationId,1),a=/i.JTB/.test(e.subject)?r.getSpan().innerCapture(n.guestName_new,2):r.getSpan().innerCapture(n.guestName,1),l=r.getSpan().innerCapture(regExpFormatted(/\1\s+.(.*)\(/,n.hotelName),1),h=r.getSpan().innerCapture(n.hotelPhone,1);var f=r.getSpan().innerCapture(n.price,1);if(o=f.innerCapture(/([\d,.]+)/,1),u=r.getSpan().next(n.checkinDate).nextDate(),n.emailTitelConfirmation.test(e.subject)){if(!ASSERT(a,c,u,l))return CONTINUE;p="Confirmed"}if(n.emailTitelCancelConfirmation.test(e.subject)){if(!ASSERT(a,c,u,l))return CONTINUE;p="Cancelled"}return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:a,email:i},totalPrice:o,priceCurrency:s,checkinTime:u,checkoutTime:m,modifyReservationUrl:d,cancelReservationUrl:S,reservationStatus:"http://schema.org/Reservation"+(p||"Confirmed"),reservationId:c,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:l,url:g,telephone:h,address:C}}]}}).call();