// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){if(!e||!t||!n)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(t);var r,s,g,o,i,c,p,x,d,u,h,l,m,y;n.isCancelled&&(c="Cancelled"),r=a.getSpan().nextText(n.guestName).nextAnyTag("td").tagContents(),i=a.getSpan().nextRegExp(regExpFormatted(/\1/,n.confirmation),1).nextAnyTag("td").tagContents(),u=a.getSpan().nextText(n.phone).parentAnyTag("table"),u&&(l=u.nextAnyTag("td").tagContents().innerCapture(/(.+)\s+</,1),h=u.nextLink(),y=a.getDetachedSpan(""+u.allInnerAddresses()).innerAddress(),m=u.innerPhoneNumber().innerCapture(regExpFormatted(/\1(.*)/,n.phone),1),y.exists()||(y=h.nextAnyTag("td").tagContents()+m.previousAnyTag("td").tagContents()));var T;return T=/\u7684\u559c\u6765\u767b\u9884\u8ba2\u786e\u8ba4/.test(e.subject)||/\u559c\u6765\u767b\u9884\u8ba2\u53d6\u6d88/.test(e.subject)?a.getSpan().nextRegExp(n.yourSchedule_2).nextAnyTag("table"):/\u656c\u8bf7\u653e\u5fc3\u3002 \u60a8\u7684\u9884\u8ba2\u5df2\u786e\u8ba4\uff0c\u786e\u8ba4\u7f16\u53f7\u4e3a/.test(e.subject)||/\u656c\u8bf7\u653e\u5fc3\u3002 \u60a8\u7684\u9884\u8ba2\u5df2\u53d6\u6d88\uff0c\u53d6\u6d88\u7f16\u53f7\u4e3a/.test(e.subject)?a.getSpan().nextRegExp(n.yourSchedule_3).nextAnyTag("table"):a.getSpan().nextRegExp(n.yourSchedule).nextAnyTag("table"),p=T.next(n.checkin).nextAnyTag("td").innerDate(),d=T.next(n.checkout).nextAnyTag("td").innerDate(),x=a.getSpan().nextText(n.total).nextAnyTag("td").tagContents(),g=x.innerCapture(/([\d,.]+)/,1),o=x.innerCapture(/([^\n\d,.]+)/,1),ASSERT(p,y)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r,email:s},totalPrice:g,priceCurrency:o,checkinTime:p,checkoutTime:d,reservationStatus:"http://schema.org/Reservation"+(c||"Confirmed"),reservationId:i,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:l,url:h,telephone:(""+m).trim(),address:y}}]:void 0}}).call();