(function(){return function(e,t,r){var a,n,i,m,g,p,s,o,l,x,d,T,h,u,b,c,f=[],C=Scanner.fromMessage(e),v=[];C.setLocale(t);var N,y,F;for(N=C.getSpan().nextTag("table1"),y=N.nextTag("tr1").nextTag("tr1"),x=y.next(r.reservationIdLabel).parentTag("td1").tagContents().innerCapture(/([A-Z0-9]{5,})/,1),y=N.nextText(r.passengerCellTitle).nextTag("tr1");y!==C.getNullSpan()&&(""+y.nextTag("td1")).indexOf(r.fromLabel)===-1;){var L={},S=y.allInnerTags("td1");if(y=y.nextTag("tr1"),!(S.length<2)){L.ticketNumber=S[1].tagContents().trim(),L.name=S[0].tagContents();var k=C.getSpan().nextText(r.id);k.exists()&&S.length>=4&&(L.membershipNumber=S[2].tagContents().trim(),L.programName=k.nextTag("td1").tagContents()),f.push(L)}}var A,E,z,$;for(y=y.nextText(r.fromLabel).parentTag("tr1");y!==C.getNullSpan();){F=y.nextTag("td1"),m=F.tagContents().innerCapture(regExpFormatted(/\1\s*([\w \.\-]*)/,r.fromLabel),1).trim(),F=F.nextTag("td1"),s=F.innerCapture(regExpFormatted(/\1\s*([\w \.\-]*)/,r.toLabel),1).trim(),F=F.nextTag("td1"),A=F.tagContents().innerCapture(regExpFormatted(/\1\s+($<airlineCode>\w{2})($<flightNumber>\w+)\s+/,r.flight)),A&&(n=A.$airlineCode,i=A.$flightNumber),a="",(""+F.nextTag("td1").nextTag("td1")).indexOf(r.codeshareLabel)!==-1&&(a=F.nextTag("td1").nextTag("td1").innerCapture(regExpFormatted(/\1\s+([^\[]*).*$/,r.codeshareLabel),1).trim()),p=F.nextText(r.departureTimeLabel).nextDate(),b=p.split(", "),b&&2===b.length&&(z=b[0]),u=F.nextText(r.class).parentTag("td1").innerCapture(regExpFormatted(/\1\s+([^\[]*).*$/,r.class),1).trim(),h=F.next(r.seatNumber).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.*)\s+\2/,r.seatNumber,r.class),1);var D=0;if(l=F.nextText(r.arrivalTimeLabel).nextDate(),(""+F.nextText(r.arrivalTimeLabel).parentTag("td1")).indexOf("+1")!==-1&&(D=1),c=l.split(", ")){if(1===c.length&&z){$=c[0];var w=C.getDetachedSpan(z+" "+$);l=w.innerDate(),l=modifyDate(l,D)}}else l=null;if(ASSERT(n,i,p,m,l,s))for(var L=0;L<f.length;L++){var O=f[L],E={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:a,airlineCode:n,flightNumber:i,departureAirportFuzzy:m,departureAirportCode:g,departureTime:p,arrivalAirportFuzzy:s,arrivalAirportCode:o,arrivalTime:l},underName:{"@type":"http://schema.org/Person",name:O.name},checkinUrl:"",reservationId:x,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:d,priceCurrency:T,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:O.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatingType:u,seatNumber:h}}};valid(OR(O.membershipNumber,O.programName))&&(E.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:O.membershipNumber,programName:O.programName}),v.push(E)}y=y.nextTag("tr1").nextText(r.fromLabel).parentTag("tr1")}if(v.length)return v}}).call();