// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var n,i,o,p,s,u,l,d,m,g,h=[],c=[],v=[];n=a.getSpan().next(t.reservationId).nextAnyTag("td").tagContents();var C=a.getSpan().allInnerCapture(/(7F\s(\d{2,}))/,1);for(s=0;s<C.length;s++){i={},i.flightNumber=C[s].innerCapture(/7F\s(\d+)/,1);var T=C[s].nextDate();d=C[s].next(t.departure).nextAnyTag("td").tagContents(),i.departureTime=combineDateAndTime(T,d.innerDate()),i.departureCode=d.innerCapture(/^(\w{2,})\b/,1),d=C[s].next(t.arrival).nextAnyTag("td").tagContents(),i.arrivalTime=combineDateAndTime(T,d.innerDate()),i.arrivalCode=d.innerCapture(/^(\w{2,})\b/,1);var A=C[s].parentTag("table5").allInnerCapture(t.seat,1);for(i.passengers=[],g=0;g<A.length;g++)u={},u.name=A[g].previousAnyTag("td").tagContents(),u.seat=A[g].nextAnyTag("td").tagContents().innerCapture(/(\d+\w+)/,1),ASSERT(u.name)&&i.passengers.push(u);ASSERT(i.departureCode,i.arrivalCode,i.departureTime,i.arrivalTime,i.flightNumber)&&c.push(i)}for(m="Confirmed",s=0;s<c.length;s++)for(l=c[s],h=l.passengers,g=0;g<h.length;g++){u=h[g];var y={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:l.airlineName,airlineCode:"7F",flightNumber:l.flightNumber,departureAirportFuzzy:l.departureAirport,departureAirportCode:l.departureCode,departureTime:l.departureTime,arrivalAirportFuzzy:l.arrivalAirport,arrivalAirportCode:l.arrivalCode,arrivalTime:l.arrivalTime},underName:{"@type":"http://schema.org/Person",name:u.name},checkinUrl:null,reservationId:n,reservationStatus:"http://schema.org/Reservation"+m,totalPrice:o,priceCurrency:p,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:u.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:u.seat}}};v.push(y)}if(v.length)return v}}).call();