(function(){return function(e,r,t){function a(){ASSERT(C.airlineName,C.flightNumber,C.departureAirportCode,C.departureDateTime,C.arrivalAirportCode,C.arrivalDateTime)&&(v.push(C),C={},b=!1)}var i=Scanner.fromMessage(e);i.setLocale(r);for(var n=i.getSpan().nextText(t.customerInformationHeader).parentTag("table6"),o=i.getSpan().nextText(t.flightSummaryHeader).nextTag("table8").allInnerTagsFiltered("td8"),m=[],p=0;p<parseInt((o.length-4)/4);p++){var l=o[4*p+4].innerCapture(/[a-zA-Z,\s]+/),d=o[4*p+5].innerCapture(/[A-Za-z0-9]+/);ASSERT(l)&&m.push({travelerName:l,ticketNumber:d})}for(var s,g,u,x,f,h,N=n.nextText(t.flightDetails).nextTag("table6").nextTag("table6").nextTag("table6"),T=N.nextTag("table7").allInnerTags("tr7").filter(function(e){return(""+e.tagContents()).length}),v=[],C={},b=!1,p=0;p<T.length;p++)s=T[p],s.innerText(t.operatedByPrefix).exists()?C.airlineName=s.innerText(t.operatedByPrefix).parentTag("td7").tagContents().innerCapture(regExpFormatted(/\1 (.+)/,t.operatedByPrefix),1):(s.innerText(t.flightNumberPrefix).exists()&&s.innerText(t.fromPrefix).exists()&&s.innerText(t.toPrefix).exists()&&(b&&a(),s.innerText(t.reservationIdPrefix).exists()?(u=s.firstTag("td7").tagContents().innerCapture(regExpFormatted(/^($<airlineName>.+)\n\1\s($<flightNumber>\d+)[^]+\2:\s($<reservationId>\w+)/,t.flightNumberPrefix,t.reservationIdPrefix)),C.airlineName=u.$airlineName.trim(),C.flightNumber=u.$flightNumber.trim(),C.reservationId=u.$reservationId.trim()):(g=s.firstTag("td7").tagContents().innerCapture(regExpFormatted(/^($<airlineName>.+)\n\1\s($<flightNumber>\d+)/,t.flightNumberPrefix)),C.airlineName=g.$airlineName.trim(),C.flightNumber=g.$flightNumber.trim()),f=s.nextTag("td7").nextTag("td7").tagContents(),x=f.innerCapture(/($<airportName>.+)\(($<airportCode>\w{3})\)/),C.departureAirportName=x.$airportName.trim(),C.departureAirportCode=x.$airportCode.trim(),C.departureDateTime=f.innerDate(),h=f.nextTag("td7"),x=h.innerCapture(/($<airportName>.+)\(($<airportCode>\w{3})\)/),C.arrivalAirportName=x.$airportName.trim(),C.arrivalAirportCode=x.$airportCode.trim(),C.arrivalDateTime=h.innerDate(),b=!0),s.innerTag("table8").exists()&&a());for(var c=[],A=0;A<v.length;A++)for(var $=v[A],y=0;y<m.length;y++){var I=m[y],P=(""+I.travelerName).trim(),S=I.ticketNumber;c.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:$.airlineName,airlineCode:$.airlineCode,flightNumber:$.flightNumber,departureAirportFuzzy:$.departureAirportName,departureAirportCode:$.departureAirportCode,departureTime:$.departureDateTime,arrivalAirportFuzzy:$.arrivalAirportName,arrivalAirportCode:$.arrivalAirportCode,arrivalTime:$.arrivalDateTime},underName:{"@type":"http://schema.org/Person",name:P},reservationId:$.reservationId,reservationStatus:"http://schema.org/ReservationConfirmed",reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:S,ticketedSeat:{"@type":"http://schema.org/Seat"}}})}return c}}).call();