// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,r,t){var a=Scanner.fromMessage(r);a.setLocale(t);for(var i=[],o=0;o<e.length;o++){var n=e[o].reservationFor;ASSERT(n.airline.iataCode,n.flightNumber,n.departureAirport.iataCode,n.departureTime,n.arrivalAirport.iataCode,n.arrivalTime)&&(n.reservationStatus&&0!==n.reservationStatus.length||(n.reservationStatus="http://schema.org/ReservationConfirmed"),i.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:n.airline.iataCode,airlineName:n.airline.name,flightNumber:/([\d]+)/.exec(n.flightNumber)[1],departureAirportFuzzy:n.departureAirport.name,departureAirportCode:n.departureAirport.iataCode,departureTime:a.getDetachedSpan(/(.*)T/.exec(n.departureTime)[1]+" "+/T(.*)[\+-]/.exec(n.departureTime)[1]).innerDate(),arrivalAirportFuzzy:n.arrivalAirport.name,arrivalAirportCode:n.arrivalAirport.iataCode,arrivalTime:a.getDetachedSpan(/(.*)T/.exec(n.arrivalTime)[1]+" "+/T(.*)[\+-]/.exec(n.arrivalTime)[1]).innerDate()},underName:{"@type":"http://schema.org/Person",name:e[o].underName.name},reservationId:e[o].reservationNumber,reservationStatus:e[o].reservationStatus,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat"}}}))}return i}}).call();