// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,o,s,i,c,g,p,d,m,h,u,x,D,l,T,y,C;if(l=a.getSpan().next(n.underName).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.*)/,n.underName),1),r=a.getSpan().next(n.reservationId).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.*)/,n.reservationId),1),n.cancellation.test(e.subject)?(x="Cancelled",C=a.getSpan().next(n.dates).nextDate(),g=a.getDateDD(C).iso8601,p=a.getDateDD(C).endIso8601):(i=a.getSpan().next(n.checkInDate).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+.*?,(.*)/,n.checkInDate),1),o=i.next(n.checkInTime).nextDate(),g=combineDateAndTime(a.getDetachedSpan(""+i).innerDate(),o),c=a.getSpan().next(n.checkOutDate).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+.*?,(.*)/,n.checkOutDate),1),s=c.next(n.checkOutTime).nextDate(),p=combineDateAndTime(a.getDetachedSpan(""+c).innerDate(),s),d=s.nextAddress(),m=d.parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.*)/,n.hotelPhone),1)),D=/(.+?)\s+-/.exec(e.subject)[1],T=a.getSpan().next(n.modifyReservationUrl).parentAnyTag("td").innerLink(),y=a.getSpan().next(n.hotelUrl).parentAnyTag("td").innerLink(),ASSERT(l,g,p))return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:l},totalPrice:h,priceCurrency:u,checkinTime:g,checkoutTime:p,modifyReservationUrl:T,reservationStatus:"http://schema.org/Reservation"+(x||"Confirmed"),reservationId:r,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:D,url:y,telephone:m,address:d}}]}}).call();