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