(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var n=a.getSpan(),i=n.next(t.bookingId).parentAnyTag("td").innerCapture(regExpFormatted(/\1\s(\d+)/,t.bookingId),1),o=[],p=[];if(t.flightCheck){var d=function(e){var r=0;if(""+e)for(var a=e.allInnerTags("table5"),n=(a.length+1)/4,r=[],i=0;i<n;i++){var p=a[4*i].innerCapture(regExpFormatted(/($<airlineName>[A-Za-z\s]+?)\n\1($<flightNumber>.+)/,t.flight)),d={};d.airlineName=p.$airlineName.trim(),d.flightNumber=p.$flightNumber.innerCapture(/\d+/,0);var m=a[1+4*i].allInnerTagsFiltered("td5"),s=m[0].innerDate();""+s||(s=e.firstDate(),r=1),d.departureAirport=m[1-r];var l=m[2-r].innerCapture(/($<departureAirportCode>[A-Z]+?)\s-\s($<departureTime>.+)/);d.departureAirportCode=l.$departureAirportCode;var h=l.$departureTime;d.departureTime=combineDateAndTime(s,h);var g=m[5-r]?m[5-r].innerDate():s;d.arrivalAirport=m[3-r];var u=m[4-r].innerCapture(/($<arrivalAirportCode>[A-Z]+?)\s-\s($<arrivalTime>.+)/);d.arrivalAirportCode=u.$arrivalAirportCode;var v=u.$arrivalTime;d.arrivalTime=combineDateAndTime(g,v),Date.parse(d.departureTime>d.arrivalTime)&&(d.arrivalTime=modifyDate(d.arrivalTime,1)),ASSERT(d.airlineName,d.flightNumber,d.departureAirport,d.departureAirportCode,d.departureTime,d.arrivalAirport,d.arrivalAirportCode,d.arrivalTime)&&o.push(d)}};if(d(n.next(t.departure).parentAnyTag("table")),!n.next(t.which).next(t.return).parentAnyTag("table").isNullSpan_){d(n.next(t.which).next(t.return).parentAnyTag("table"))}for(var m=[],s=a.getDetachedSpan(""+n.next(t.traveler).parentAnyTag("table").allInnerTags("td4")),l=s.first(/Female|Male/i);!l.isNullSpan_;)m.push({name:l.parentAnyTag("td").previousAnyTag("td").previousAnyTag("td").tagContents()}),l=l.nextAnyTag("td").next(/Female|Male/i);for(var h=0;h<o.length;h++)for(var g=o[h],u=0;u<m.length;u++){var v={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:g.airlineName,flightNumber:g.flightNumber,departureAirportFuzzy:g.departureAirport,departureAirportCode:g.departureAirportCode,departureTime:g.departureTime,arrivalAirportFuzzy:g.arrivalAirport,arrivalAirportCode:g.arrivalAirportCode,arrivalTime:g.arrivalTime},underName:{"@type":"http://schema.org/Person",name:m[u].name},reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed"};p.push(v)}}if(t.hotelCheck){var c=n.next(t.which),A=c.nextAnyTag("table").allInnerTagsFiltered("td4")[0],T=c.nextAddress(),x=c.nextDate(),y=c.nextDate().nextDate(),f=c.nextPhoneNumber();ASSERT(T,x)&&p.push({"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:A},checkinTime:x,checkoutTime:y,reservationStatus:"http://schema.org/ReservationConfirmed",reservationId:i,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:A,telephone:f,address:T}})}if(t.carCheck){var C=n.next(t.which).nextAnyTag("table"),b=C.nextDate(),N=b.nextAnyTag("td").tagContents(),F=N.split("\n");N=F[0].trim();var S="",$="",D=function(e){for(var r=e[1].trim(),t=2;t<e.length;t++)r+=e[t].trim();return r};S=a.getDetachedSpan(""+D(F));var R=b.nextDate(),k=R.nextAnyTag("td").tagContents(),z=k.split("\n");k=z[0].trim(),$=a.getDetachedSpan(""+D(z));var I=C.next(t.econ).next(t.econ).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+(.*)/,t.econ),1),E=C.next(t.driver).nextAnyTag("td").nextAnyTag("td").nextAnyTag("td").tagContents(),P=C.nextPhoneNumber().parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/($<provider>[^\n]+)?\s*[\n]*?\1\s($<phone>.*)/,t.phone)),L=P?P.$provider:null,w=P?P.$phone:null;ASSERT(E,b,R,N)&&p.push({"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed",underName:{"@type":"http://schema.org/Person",name:E},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:I}},provider:{"@type":"http://schema.org/Organization",name:L},pickupTime:b,pickupLocation:{"@type":"http://schema.org/Place",name:N,telephone:w,address:S},dropoffTime:R,dropoffLocation:{"@type":"http://schema.org/Place",name:k,telephone:w,address:$}})}return p}}).call();