// 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,g,p,x,u,c,d,m;a=r.getSpan().innerCapture(regExpFormatted(/\1\s(.*),/,n.underPersonNamePrefix),1),i=parseEmailListFromMessageHeader(e.headers,"to")[0],a===r.getNullSpan()&&(a=r.getSpan().innerCapture(regExpFormatted(/(.*)\1/,n.underPersonNamePrefix),1)),x=r.getSpan().innerCapture(regExpFormatted(/\1\s+?(\w+)\s+?\n/,n.reservationIdPrefix),1),o=r.getSpan().nextText(n.reservationIdPrefix).nextLink().nextLink().nextAnyTag("td").tagContents().innerCapture(/(.*)\n/,1),s=r.getSpan().nextText("Your Host ").nextPhoneNumber(),g=r.getSpan().nextText(n.reservationIdPrefix).nextTag("table3").tagContents().nextLink(),p=r.getSpan().nextText(n.reservationIdPrefix).nextTag("table2").tagContents().innerCapture(/(.*)\n/,1);var l=p.innerLink();l!==r.getNullSpan()&&(l=l.innerCapture(/daddr=(.*),(.*)/)),u=r.getSpan().nextText(n.checkOutDateTimePrefix).previousText(n.checkInDateTimePrefix).nextDate(),c=r.getSpan().nextText(n.checkOutDateTimePrefix).nextDate();var h=r.getSpan().nextText(n.pricePrefix).nextTag("td2").tagContents();return m=""+h.innerCapture(/(.)\d+/,1),d=(""+h.tagContents()).replace(""+m,""),ASSERT(OR(a,i),o,u)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:a,email:i},totalPrice:d,priceCurrency:m,checkinTime:u,checkoutTime:c,reservationStatus:"http://schema.org/ReservationConfirmed",reservationId:x,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:o,telephone:s,url:g,address:"number"==typeof l.length&&3===l.length?null:p,geo:"number"==typeof l.length&&3===l.length?{"@type":"http://schema.org/GeoCoordinates",latitude:l[1],longitude:l[2]}:null}}]:CONTINUE}}).call();