// 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,c,d,h,l=r.getSpan(),m="Cancelled";a=l.next(n.underPersonNamePrefix).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s(.*)/,n.underPersonNamePrefix),1),p=l.innerCapture(regExpFormatted(/\1\s(\d+\-\d+\-\d+)\s/,n.reservationIdPrefix),1);var u=(""+l.next(n.bookingDetailBlockPrefix).nextAnyTag("table").nextAnyTag("td").tagContents()).split("\n");if(i=u.shift(),g=u.join("\n"),s=l.nextText(n.hotelUrlPrefix).nextLink(),o=l.innerCapture(regExpFormatted(/<\1(.*)>/,n.hotelPhoneNumberPrefix),1),[x,c]=(""+l.next(n.hotelUrlPrefix).nextDate()).split(" - "),x=r.getDetachedSpan(x).innerDate(),c=r.getDetachedSpan(c).innerDate(),[,h,d]=l.next(RegExp(n.pricePrefix)).nextAnyTag("td").tagContents().innerCapture(/(\D)\s?([\d\,\.]+)/),ASSERT(a,i,x))return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:a},totalPrice:d,priceCurrency:h,checkinTime:x,checkoutTime:c,reservationStatus:"http://schema.org/Reservation"+m,reservationId:p,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:i,telephone:o,url:s,address:g}}]}}).call();