(function(){return function(e,t,r){var a,n,i,g,p,o,l=Scanner.fromMessage(e);l.setLocale(t);var d=l.getSpan().allInnerTagsFiltered("td4");a=""+d[3];var u=r.airportInitialRegex,m=r.airportNameRegex,s=r.airportTimeRegex,c=d.filter(function(e){return r.airportCapitalLetterRegex.test(""+e)&&/\d/.test(""+e)&&(""+e).length<50}),C=c.filter(function(e){return r.numberOfFlightsRegex.test(""+e)}),T=C.length,v=[];o=c[0].getString();var h=l.getSpan().next(r.airportPrecedingIdentifier).parentAnyTag("td").nextAnyTag("td"),y=l.getSpan().next(r.airportStatus).parentAnyTag("td").nextAnyTag("td");p=h.tagContents().innerCapture(r.airlineLongNameRegex,1),n=y.tagContents().innerCapture(r.airlineSeatingContents,1);for(var S=0;S<T;S++){var x={},A=2+3*S,f=c[A].innerDate();x.airlineName=p.getString(),x.seatingType=n.getString();var N=c[A].innerCapture(/(\S+)/,1).getString();x.flightNumber=N.slice(2),x.airlineCode=N.slice(0,2),x.departureAirport=c[A+1].getString().match(m)[0],x.departureCode=c[A+1].getString().match(u)[0].replace(/\(|\)/g,"");var R=c[A+1].innerCapture(s,1);x.departureTime=combineDateAndTime(f,R),x.arrivalAirport=c[A+2].getString().match(m)[0],x.arrivalCode=c[A+2].getString().match(u)[0].replace(/\(|\)/g,"");var b=c[A+2].innerCapture(s,1);if(x.arrivalTime=combineDateAndTime(f,b),b<R&&(x.arrivalTime=x.arrivalTime.nextDate()),v.push(x),S==T-1)break;h=h.next(r.airportPrecedingIdentifier).parentAnyTag("td").nextAnyTag("td"),y=y.next(r.airportStatus).parentAnyTag("td").nextAnyTag("td"),p=h.tagContents().innerCapture(r.airlineLongNameRegex,1),n=y.tagContents().innerCapture(r.airlineSeatingContents,1)}i=l.getSpan().next(r.airlinePriceIdentifier).parentAnyTag("td").nextAnyTag("td").tagContents().innerCapture(r.airlinePriceRegex,1)||"",g=l.getSpan().next(r.airlinePriceIdentifier).parentAnyTag("td").nextAnyTag("td").tagContents().innerCapture(r.airlineCurrencyRegex,1)||"";for(var F=[],I=0;I<T;I++){var x=v[I];ASSERT(x.departureCode,x.arrivalCode,x.departureTime,x.arrivalTime);F.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:x.airlineName,airlineCode:x.airlineCode,flightNumber:x.flightNumber,departureAirportFuzzy:x.departureAirport,departureAirportCode:x.departureCode,departureTime:x.departureTime,arrivalAirportFuzzy:x.arrivalAirport,arrivalAirportCode:x.arrivalCode,arrivalTime:x.arrivalTime},underName:{"@type":"http://schema.org/Person",name:a},reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:"",ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:x.seatingType}},reservationId:o,totalPrice:i,priceCurrency:g,reservationStatus:"http://schema.org/ReservationConfirmed"})}return F}}).call();