// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);if(a.setLocale(t),!a.getSpan().nextText(n.confirmationMessage).exists())return CONTINUE;var r,i=a.getSpan().nextText(n.hotelNamePrefix).nextTag("td3").tagContents().trim(),o=a.getSpan().nextText(n.bookingNumberPrefix).nextTag("td3").tagContents().trim(),s=a.getSpan().nextText(n.guestEmailAddressPrefix).nextTag("td3").tagContents().trim(),x=a.getSpan().nextText(n.checkInTimePrefix).nextTag("td3"),g=x.allDates(),T=a.getDateDD(x.lastInnerDate());r=2==g.length&&T.iso8601&&T.endIso8601?combineDateAndTime(g[0],T.iso8601):getFuzzyDate(x);var c,m=a.getSpan().nextText(n.checkOutTimePrefix).nextTag("td3"),d=m.allDates();T=a.getDateDD(m.lastInnerDate()),c=2==d.length&&T.iso8601&&T.endIso8601?combineDateAndTime(d[0],T.endIso8601):getFuzzyDate(m);var p=a.getSpan().nextText(n.pricePrefix,!0).nextTag("td3").tagContents().innerCapture(/(\d+)/,1),l=p.parentTag("td3").tagContents().innerCapture(/([^\d,\. ]+)/,1),h=a.getSpan().nextText(n.pricePrefix,!0).nextText(n.hotelAddressPrefix).nextTag("td3").tagContents().trim(),f=a.getSpan().nextText(n.hotelTelephonePrefix).nextTag("td3").tagContents().trim(),u=a.getSpan().nextText(n.reservationUrlPrefix).nextLink(),S=a.getSpan().nextText(n.guestNamePrefix).nextTag("td4").tagContents().trim(),D=a.getSpan().nextText(n.cancellationUrlPrefix).nextLink();return ASSERT(i,r,c)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:S,email:s},totalPrice:p,priceCurrency:l,checkinTime:r,checkoutTime:c,modifyReservationUrl:u,cancelReservationUrl:D,reservationStatus:"http://schema.org/ReservationConfirmed",reservationId:o,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:i,telephone:f,address:h}}]:void 0}}).call();