(function(){return function(e,r,t){var n=Scanner.fromMessage(e);n.setLocale(r);var a,i,l,p,g,o,s,m,h,u,d,c,v=[],T=[],f=[];a=n.getSpan().innerCapture(regExpFormatted(/\1\s+(\w+)/,t.reservationId),1),p=n.getSpan().next(t.checkIn).nextLink();for(var C,A=n.getSpan().next(t.passenger);0!==(""+A).length;)C=A.innerCapture(t.passenger),s={},s.name=C.$name,s.ticketNumber=C.$ticketNumber,ASSERT(s.name)&&v.push(s),A=A.next(t.passenger);if(0===v.length)for(A=n.getSpan().next(t.reservationId).next(t.passenger_alt);0!==(""+A).length;)C=A.innerCapture(t.passenger_alt),s={},s.name=C.$name.trim(),ASSERT(s.name)&&v.push(s),A=A.nextDate().next(t.passenger_alt);for(h=n.getSpan().next(t.flightDetails).nextAnyTag("table"),h=h.allInnerTags(0!==h.allInnerTags("tr3").length?"tr3":"tr4"),g=0;g<h.length;g++)m={},o=h[g].allInnerTags("td3"),0===(""+o).length&&(o=h[g].allInnerTags("td4")),o.length>2&&(u=o[0].allInnerDates(),u.length>1?(i=u[0],l=u[1]):i=l=u[0],m.departureTime=combineDateAndTime(i,o[1].innerDate()),m.departureAirport=o[1].tagContents().innerCapture(/(.*)\n/,1),m.arrivalTime=combineDateAndTime(l,o[2].innerDate()),m.arrivalAirport=o[2].tagContents().innerCapture(/(.*)\n/,1),d=o[3].innerCapture(/($<airlineCode>\w+)\s($<flightNumber>\d+)/),m.airlineCode=d.$airlineCode,m.flightNumber=d.$flightNumber,m.seatingType=o[4].tagContents().innerCapture(/\n(.*)/,1),ASSERT(m.departureAirport,m.arrivalAirport,m.departureTime,m.arrivalTime,m.airlineCode,m.flightNumber)&&T.push(m));c=t.bookingPending?"Pending":"Confirmed";for(var S=0;S<v.length;S++)for(s=v[S],g=0;g<T.length;g++){m=T[g];var b={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"Aero M\xe9xico",airlineCode:m.airlineCode,flightNumber:m.flightNumber,departureAirportFuzzy:m.departureAirport,departureTime:m.departureTime,arrivalAirportFuzzy:m.arrivalAirport,arrivalTime:m.arrivalTime},underName:{"@type":"http://schema.org/Person",name:s.name},checkinUrl:p,reservationId:a,reservationStatus:"http://schema.org/Reservation"+c,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:s.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat"}}};f.push(b)}if(f.length)return f}}).call();