(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,g,o,l,p,s,m,d,u,h,T,x,c,C,N,f,v,S=[],y=[],A=[];n=a.getSpan().next(r.reservationId).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*(.*)/,r.reservationId),1),d=a.getSpan().next(r.pricePrefix).nextAnyTag("td").tagContents(),u=d.innerCapture(/([\d,.]+)/,1),h=d.innerCapture(/([^\d,.]+)/,1).trim();var b=/\s*<[^>]*?>/,F=regExpFormatted(/\1\2/,r.manageBooking,b),$=a.getSpan().next(F).next(r.yourItinerary);for(T=$.withEnd($.next(r.itineraryEnd).getStart()).allInnerTagsFiltered("td4"),x=0;x<T.length;x++)C=T[x],C.innerDate().exists()&&(c={},i=C.innerCapture(/^($<airlineCode>\D+)($<flightNumber>\d+)/),c.airlineCode=i.$airlineCode,c.flightNumber=i.$flightNumber,N=C.nextAnyTag("td").tagContents().innerCapture(/^($<airlineName>.*)\|.*\|($<status>.*)$/),c.airlineName=N.$airlineName.trim(),c.airlineStatus=N.$status,g=c.airlineName.nextTag("td7").tagContents(),p=g.nextTag("td7").nextTag("td7").tagContents(),"ja_JP"===t&&(g=(""+g).replace(/ /g,"-")),c.departureTime=combineDateAndTime(g,p),l=p.nextTag("td7").nextTag("td7").tagContents(),c.departureAirport=(l+" "+l.nextAnyTag("td").tagContents()).trim(),o=l.nextTag("table7").nextTag("td7").tagContents(),s=o.nextTag("td7").nextTag("td7").tagContents(),"ja_JP"===t&&(o=(""+o).replace(/ /g,"-")),c.arrivalTime=combineDateAndTime(o,s),m=s.nextTag("td7").nextTag("td7").tagContents(),c.arrivalAirport=(m+" "+m.nextAnyTag("td").tagContents()).trim(),ASSERT(c.airlineName,c.airlineCode,c.flightNumber,c.departureTime,c.departureAirport,c.arrivalTime,c.arrivalAirport)&&S.push(c));for(f=a.getSpan().next(r.ticketNumberPrefix).collapseToEnd().withEnd(a.getSpan().next(r.passengerPostFix).getStart()).allInnerTagsFiltered("td5"),0===f.length&&r.hasOwnProperty("alternatePassPostFix")&&(f=a.getSpan().next(r.ticketNumberPrefix).collapseToEnd().withEnd(a.getSpan().next(r.alternatePassPostFix).getStart()).allInnerTagsFiltered("td5")),x=0;x<f.length;x++)(v=f[x].tagContents().innerCapture(/($<ticketNumber>.*)\s+\(($<name>.*)\)/))instanceof Array&&v.length&&v.$name.exists()&&A.push({name:v.$name,ticketNumber:v.$ticketNumber});for(0===A.length&&A.push({name:a.getSpan().innerCapture(r.nameCapture,1)}),x=0;x<S.length;x++){c=S[x];for(var P=0;P<A.length;P++){ASSERT(c.airlineName||c.airlineCode,c.flightNumber,c.departureAirport,c.departureTime),v=A[P];y.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:c.airlineName,airlineCode:c.airlineCode,flightNumber:c.flightNumber,departureAirportFuzzy:c.departureAirport,departureTime:c.departureTime,arrivalAirportFuzzy:c.arrivalAirport,arrivalTime:c.arrivalTime},underName:{"@type":"http://schema.org/Person",name:v.name},reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:u,priceCurrency:h,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:v.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat"}}})}}if(y.length)return y}}).call();