// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,o,p,g,d,u,l,s,m,y,T,A,h,C,c=[],z=[],v=[];for(d=a.getSpan().next(r.reservationId).nextAnyTag("td").nextAnyTag("td").tagContents(),n=a.getSpan().next(r.passengers).nextAnyTag("table").allInnerTags("tr4"),i=0;i<n.length;i++)h={},h.name=n[i].nextAnyTag("td").tagContents(),h.ticketNumber=h.name.nextAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.*)/,r.ticketNumber),1),ASSERT(h.name)&&c.push(h);for(C=a.getSpan().next(r.passengers).previousTag("table3").previousTag("table3").allInnerTags("table4"),i=0;i<C.length;i++)y=C[i],y.allInnerTags("td4").length>0&&(p=y.nextAnyTag("td").nextAnyTag("td").nextAnyTag("td").innerDate()),g={},o=y.nextAnyTag("tr").nextAnyTag("tr").nextAnyTag("td").tagContents(),u=o.nextAnyTag("td").innerDate(),o=o.innerCapture(/($<airlineCode>\w+)\s*($<flightNumber>\d+)/),T=u.nextAnyTag("td").tagContents().innerCapture(/($<airportNameFuzzy>.*),\s+($<airportCode>.*)/),g.departureAirportFuzzy=T.$airportNameFuzzy,g.departureAirportCode=T.$airportCode,l=u.nextAnyTag("td").nextAnyTag("td").innerDate(),A=l.nextAnyTag("td").tagContents().innerCapture(/($<airportNameFuzzy>.*),\s+($<airportCode>.*)/),g.arrivalAirportFuzzy=A.$airportNameFuzzy,g.arrivalAirportCode=A.$airportCode,g.seatingType=l.nextAnyTag("td").nextAnyTag("td").tagContents(),g.departureTime=combineDateAndTime(p,u),g.arrivalTime=combineDateAndTime(p,l),g.airlineCode=o.$airlineCode,g.flightNumber=o.$flightNumber,ASSERT(g.departureTime,g.arrivalTime,g.airlineCode,g.flightNumber,g.departureAirportFuzzy,g.arrivalAirportFuzzy)&&z.push(g);for(var x=0;x<z.length;x++){g=z[x];var b={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"Alitalia Linee Aeree Italiane",airlineCode:g.airlineCode,flightNumber:g.flightNumber,departureAirportFuzzy:g.departureAirportFuzzy,departureAirportCode:g.departureAirportCode,departureTime:g.departureTime,arrivalAirportFuzzy:g.arrivalAirportFuzzy,arrivalAirportCode:g.arrivalAirportCode,arrivalTime:g.arrivalTime},underName:{"@type":"http://schema.org/Person",name:h.name},checkinUrl:"",reservationId:d,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:m,priceCurrency:s,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:h.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:g.seatingType}}};v.push(b)}if(v.length)return v}}).call();