(function(){return function(e,t,r){var a=Scanner.fromMessage(e),i=a.getSpan();a.setLocale(t);var n,o,T,m,l,p,g,x,d,s,u,v,c;n=i.nextText(r.reservationIdPrefix).nextTag("td3").tagContents(),m=i.nextText(r.totalCostPrefix).parentTag("td3").tagContents().innerCapture(regExpFormatted(/\1(.+)/,r.totalCostPrefix),1);var C,b=(m.innerCapture(/([\d,.-]+)/,1),m.innerCapture(/([^\d,.-\w]+)/,1).trim(),!0);C=i.nextText(r.singleTripPrefix),C.exists()||(b=!1,C=i.nextText(r.roundTripPrefix),C.exists()||(C=i.nextText(r.conjectionPrefix))),C=C.nextTag("table3").allInnerTagsFiltered("tr3");for(var f,h=[],A=0;A<C.length;A++){f={};var N;N=C[A].innerCapture(/\u7968\u53f7\uff1a/.test(C[A])?/($<name>.+?)\[.*\u7968\u53f7\uff1a($<ticketNumber>.+)/:/($<name>.+?)\[/),f.name=N.$name.trim(),f.ticketNumber=N.$ticketNumber,f.ticketNumber&&(f.ticketNumber=f.ticketNumber.trim()),h.push(f)}var P=[];if(b)f={},[,u,c,s]=i.nextText(r.singleTripPrefix).nextTag("table3").nextTag("tr2").nextTag("td2").nextTag("td2").tagContents().innerCapture(/(.+)\u2192(.+)\s(.+)/),f.departureAirport=u.trim(),f.arrivalAirport=c.trim(),s=s,[,g,x,T]=i.nextText(r.singleTripPrefix).nextTag("table3").nextTag("table3").nextTag("td3").tagContents().innerCapture(/(.+?)\s([A-Z0-9]{2})([\d]+)/),f.airlineName=g,f.airlineCode=x,f.flightNumber=T,d=i.nextText(r.singleTripPrefix).nextTag("table3").nextTag("table4").nextTag("td4").tagContents(),v=i.nextText(r.singleTripPrefix).nextTag("table3").nextTag("table4").nextTag("td4").nextTag("td4").nextTag("td4").tagContents(),f.departureTime=combineDateAndTime(s,d),f.arrivalTime=combineDateAndTime(s,v),Date.parse(f.departureTime)>Date.parse(f.arrivalTime)&&(f.arrivalTime=modifyDate(f.arrivalTime,1)),ASSERT(f.departureAirport,f.arrivalAirport,f.departureTime,f.arrivalTime,f.airlineCode,f.flightNumber)&&P.push(f);else{f={};for(var k=1,y=a.getSpan().nextText(r.legPrefix+""+k);y.exists();)f={},[,u,c,s]=y.nextTag("td2").tagContents().innerCapture(/(.+)\u2192(.+)\s(.+)/),f.departureAirport=u.trim(),f.arrivalAirport=c.trim(),s=s,[,g,x,T]=y.nextTag("table3").nextTag("td3").tagContents().innerCapture(/(.+?)\s([A-Z0-9]{2})([\d]+)/),f.airlineName=g,f.airlineCode=x,f.flightNumber=T,d=y.nextTag("table4").nextTag("td4").tagContents(),v=y.nextTag("table4").nextTag("td4").nextTag("td4").nextTag("td4").tagContents(),f.departureTime=combineDateAndTime(s,d),f.arrivalTime=combineDateAndTime(s,v),Date.parse(f.departureTime)>Date.parse(f.arrivalTime)&&(f.arrivalTime=modifyDate(f.arrivalTime,1)),ASSERT(f.departureAirport,f.arrivalAirport,f.departureTime,f.arrivalTime,f.airlineCode,f.flightNumber)&&P.push(f),k++,y=i.nextText(r.legPrefix+""+k)}var D,S=[];for(A=0;A<P.length;A++)for(var F=P[A],z=0;z<h.length;z++){var $=h[z];D={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:F.airlineName,airlineCode:F.airlineCode,flightNumber:F.flightNumber,departureAirportFuzzy:F.departureAirport,departureAirportCode:F.departureCode,departureTime:F.departureTime,arrivalAirportFuzzy:F.arrivalAirport,arrivalAirportCode:F.arrivalCode,arrivalTime:F.arrivalTime},underName:{"@type":"http://schema.org/Person",name:$.name},checkinUrl:o,reservationId:n,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:$.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:""}},totalPrice:l,priceCurrency:p,reservationStatus:"http://schema.org/ReservationConfirmed"},S.push(D)}if(S.length)return S}}).call();