(function(){function e(e,t,n){var r=Scanner.fromMessage(e);if(r.setLocale(t),!r.getSpan().next(n.hotelSummary).exists())return null;var a=r.getSpan().next(n.hotelSummary).nextAnyTag("table").nextAnyTag("table").nextAnyTag("table"),i=a.nextAnyTag("td").tagContents(),o=a.next(/\d{3,}/).parentAnyTag("td").tagContents(),s=a.next(n.hotelTimes).innerCapture(n.hotelTimes),m=s[1],u=s[2],g=r.getSpan().next(n.hotelPersonName).innerCapture(n.hotelPersonName,1).trim(),h=r.getSpan().next(n.hotelConfNumber).innerCapture(n.hotelConfNumber,1),p=a.next(n.hotelPhone).innerCapture(n.hotelPhone,1).trim();return ASSERT(i,m,u)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:g},checkinTime:m,checkoutTime:u,reservationStatus:"http://schema.org/ReservationConfirmed",reservationId:h,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:i,telephone:p,address:o}}]:null}function t(e,t,n){var r=Scanner.fromMessage(e);r.setLocale(t);var a,i,o,s,m;if(!r.getSpan().next(n.carSummary).exists())return null;var u=r.getSpan().next(n.carSummary);return i=u.next(n.carRules).nextAnyTag("td").innerCapture(/:\s([\w ]+)/,1).trim(),o=r.getSpan().next(n.namePrefix).nextAnyTag("td").tagContents(),s=u.next(/Pick up:\s+(.*)/i).nextDate(),m=u.next(/Drop off:\s+(.*)/i).nextDate(),a=u.next(/Car confirmation number:\s+(\w+)/i).innerCapture(/Car confirmation number:\s+(\w+)/i,1),ASSERT(o,i,s)?[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",reservationId:a,reservationStatus:"http://schema.org/ReservationConfirmed",underName:{"@type":"http://schema.org/Person",name:o},provider:{"@type":"http://schema.org/Organization",name:i},pickupTime:s,dropoffTime:m}]:null}function n(e,t,n){var a=Scanner.fromMessage(e);if(a.setLocale(t),!a.getSpan().next(n.flightSummary).exists())return null;var i=a.getSpan().next(n.flightID).innerCapture(n.flightID,1);""+i||(i=a.getSpan().next(n.hotwireItinNum).innerCapture(n.hotwireItinNum,1));var o=a.getSpan().next(n.ticketNumber).innerCapture(n.ticketNumber,1),s=a.getSpan().next(n.travelerPrefix).nextAnyTag("td").tagContents(),m=a.getSpan().next(n.flightSummary).nextAnyTag("table").nextAnyTag("table"),u=(m.getString().match(n.depart),m.allInnerTagsFiltered("td8"));if(!["td8","td7","td5"].some(function(e){return!!m.allInnerTagsFiltered(e).some(function(e){return n.depart.test(e.getString())})&&(u=m.allInnerTagsFiltered(e),!0)}))return null;var g=u[0],h=[],p=[],c=0;u=u.map(function(e){return e.getString().split("\n")}).reduce(function(e,t){return e.concat(t)});for(var l=0;l<u.length;l++)if(/Total distance/i.test(u[l]))c++;else if(/Econonmy|Seat assignments|Coach/i.test(u[l])){for(var d=[];c<=l;c++)d.push(u[c]);p.push(d)}for(var l=0;l<p.length;l++){var f=p[l],v=new r(f),x=v.getItem(/(\w+ \d{1,2}-\w{2,3}-\d{2})/);x instanceof Array&&x.length>1&&(g=x[1]);var S=v.getItem(/(\w+)\s+\((\w+)\)/),y=v.getItem(/(\d{1,2}:\d{1,2} [ap]m)/i),T=v.getItem(/(\w+)\s+\((\w+)\)/),C=v.getItem(/(\d{1,2}:\d{1,2} [ap]m)/i),A=v.getItem(n.flightNo),I=v.getPrev(/(\w+) (\w+)/);h.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",departureAirportFuzzy:S[1],departureAirportCode:S[2],airlineCode:I[1],airlineName:I[2],flightNumber:A[1],departureTime:combineDateAndTime(a.getDetachedSpan(g),a.getDetachedSpan(y[1])),arrivalAirportFuzzy:T[1],arrivalAirportCode:T[2],arrivalTime:combineDateAndTime(a.getDetachedSpan(g),a.getDetachedSpan(C[1]))},underName:{"@type":"http://schema.org/Person",name:s},reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed",reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:o,ticketedSeat:{"@type":"http://schema.org/Seat"}}}),ASSERT(h[l].reservationFor.departureAirportCode,h[l].reservationFor.flightNumber,h[l].reservationId,h[l].reservationFor.departureTime)||h.pop()}return h.length?h:null}var r=function(){var e=function(e){this.info=e,this.index=0};return e.prototype={getItem:function(e){if(!(e instanceof RegExp))throw"Must be regexp";for(var t=this.index;t<this.info.length;t++)if(e.test(this.info[t]))return this.index=t,this.info[t].match(e);return null},getPrev:function(e){for(var t=this.index;t--;)if(e.test(this.info[t]))return this.info[t].match(e);return null}},e}();return function(r,a,i){var o=[];try{o=o.concat(n(r,a,i))}catch(e){}try{o=o.concat(t(r,a,i))}catch(e){}try{o=o.concat(e(r,a,i))}catch(e){}return o.filter(function(e){return!(null===e||void 0===e)})}}).call();