(function(){return function(e,r,t){function a(){f||ASSERT(g,l,c,h,d,C)&&(u=""+g=="American"?"AA":null,T.push({airlineName:g,airlineCode:u,flightNumber:l,departureAirport:c,departureTime:h,arrivalAirport:d,arrivalTime:C,passengers:N}),g=u=l=c=h=d=C=v=null,N={}),f=!1}if(!e||!r||!t)return CONTINUE;var n=Scanner.fromMessage(e);n.setLocale(r);var i,p,o,s,m,g,u,l,c,h,d,C,v,b,T=[],N={};i=n.getSpan().nextText(t.reservationIdPrefix).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\b\1: (.*)/,t.reservationIdPrefix),1);var y=n.getSpan().nextTag("table5").allInnerTags("td5"),f=!0;for(o=0;o<y.length;o++)y[o].innerCapture(t.dateRegex)&&y[o+1]?(a(),m=y[o+1].innerDate()):y[o].innerCapture(t.flightRegex)&&y[o+2]?(g=y[o+1].tagContents(),l=y[o+2].tagContents()):y[o].innerCapture(t.departureRegex)&&y[o+2]?(c=y[o+1].tagContents(),h=combineDateAndTime(m,y[o+2].innerDate())):y[o].innerCapture(t.arrivalRegex)&&y[o+2]?(d=y[o+1].tagContents(),C=combineDateAndTime(m,y[o+2].innerDate())):y[o].innerCapture(t.seatRegex)&&y[o+1]?(s=""+y[o-1].tagContents(),b=y[o+2].tagContents()&&y[o+2].tagContents().innerCapture(/^FF#:\s+($<number>[\w\-]+)/,1),N[s]={name:s,seat:y[o].tagContents().innerCapture(concatRegExp(t.seatRegex,/\s+(.*)/),1),seatingType:y[o+1].tagContents(),programName:"Frequent Flyer",membershipNumber:b}):y[o].innerCapture(t.nameRegex)&&y[o+2]&&(s=y[o+1].tagContents(),N[s]||(N[s]={name:s,seatingType:y[o+3].tagContents()}));a();var x=[];for(o=0;o<T.length;o++)for(var A=T[o],F=Object.keys(A.passengers),R=0;R<F.length;R++){var S=A.passengers[F[R]],k={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:A.airlineName,airlineCode:A.airlineCode,flightNumber:A.flightNumber,departureAirportFuzzy:A.departureAirport,departureAirportCode:A.departureCode,departureTime:A.departureTime,arrivalAirportFuzzy:A.arrivalAirport,arrivalAirportCode:A.arrivalCode,arrivalTime:A.arrivalTime},underName:{"@type":"http://schema.org/Person",name:S.name},checkinUrl:p,reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:S.totalPrice,priceCurrency:S.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:S.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatingType:S.seatingType,seatNumber:S.seat}}};valid(S.membershipNumber)&&(k.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:S.membershipNumber,programName:S.programName}),x.push(k)}return x.length?x:void 0}}).call();