new ReverseTemplateList([new ReverseTemplate("hawaiiairlines.com-reservation-confirmation-en",function(e){return/^Reservation Confirmation/.test(e.subject)},function(e){if(/^Reservation Confirmation/.test(e.subject)){var r="en_US",t=Scanner.fromMessage(e);t.setLocale(r);var a={};if(a.reservationId="Your Hawaiian Airlines Reservation Confirmation:",a.itinerary="Air Itinerary",a.to="to",a.passenger="Name:",a.price="Total Air Travel Cost",a.checkInUrl="Web Check-in",a.frequentFlyer=/(HawaiianMiles #)/,t.getSpan().next("to your address book").exists()&&t.getSpan().next("Air Itinerary").exists())return a.passengerInfo="Passenger Information and Cost Breakdown",a.plusDay=/\(\+(\d) days?\)/,a.ticketNumber="eTicket #:",a.flight="Flight #",a.pending="Purchase Held Reservation",loadHelper("hawaiiairlines.com-confirmation-skeleton-2015.js")(e,r,a);if(t.getSpan().next("Air Itinerary").exists())return a.passengerInfo="Passenger Info and Cost Breakdown",a.ticketNumber="ETicket Number",loadHelper("hawaiiairlines.com-confirmation-skeleton.js")(e,r,a);var n,i,o,s,l,p,m,g,u,d,c,h,T,f,C,b,v,y,x,N,A,k,S,$=[],I={};i=t.getSpan().innerCapture(/Reservation Confirmation:\s+([A-Z]{6})\s+</,1),o=t.getSpan().nextText("Web Check-in <").nextLink(),l=t.getSpan().nextText("Passenger and Seating Information").nextTag("table2").allInnerTags("table3"),c=t.getSpan().nextText("TOTAL COST").parentAnyTag("td").tagContents();var w=c.innerCapture(/TOTAL COST \(([A-Z]{3})\)/,1),D=c.nextAnyTag("td").tagContents().innerCapture(/([\d,.]+)/,1);if(l.length){var F=l[0].allInnerTagsFiltered("td3");for(S=1;S<l.length;S++){h=l[S].allInnerTags("td3");var R;if(h.length>=4&&((""+F[0]).indexOf("HawaiianMiles")>=0?(s=h[1].tagContents().innerCapture(/($<name>[^\d]+)(?:($<membershipNumber>[\d ]+))?/),R=s?s.$membershipNumber:null,s=s?s.$name.trim():null,n=h[2].tagContents()):(""+F[1]).indexOf("HawaiianMiles")>=0&&(s=h[1].tagContents(),R=h[2].tagContents(),n=h[3].tagContents()),valid(s)&&(I[""+s]={name:s,seats:{},seatingType:{},programName:"Hawaiian Miles",membershipNumber:R,ticketNumber:n,totalPrice:D,priceCurrency:w},p=l[S].innerTag("table4").innerTag("tr4").allInnerTags("td4").map(function(e){return e.tagContents()}),p.length%2==0)))for(var P=0;P<p.length/2;P++)p[2*P].getLength()&&(I[""+s].seats[""+p[2*P]]=p[2*P+1].tagContents())}}u=t.getSpan().nextText("Flight").nextText("Date").nextText("Depart").nextText("Arrive").parentTag("table2").allInnerTags("table3").map(function(e){return e.allInnerTagsFiltered("td3")}).filter(function(e){return e.length>=5});for(S=1;S<u.length;S++)g=u[S],T=g[0].innerCapture(/($<code>\D+)($<flightNumber>\d+)/),f=T?T.$code:null,d=T?T.$flightNumber:null,m=g[1].innerDate(),b=combineDateAndTime(m,g[2].innerDate()),N=combineDateAndTime(m,g[3].innerDate()),C=g[2].innerCapture(/($<airport>.*) \(($<code>[A-Z]{3})\)/),v=C?C.$airport:null,y=C?C.$code:null,x=g[3].innerCapture(/($<airport>.*) \(($<code>[A-Z]{3})\)[^+]+($<nextDay>\+1)?/),A=x?x.$airport:null,k=x?x.$code:null,x&&valid(x.$nextDay)&&(N=modifyDate(N,1)),ASSERT(f,d,b,y,N,k)&&$.push({airlineCode:f,flightNumber:d,departureTime:b,departureAirport:v,departureCode:y,arrivalTime:N,arrivalAirport:A,arrivalCode:k,passengers:I});var H=[];for(S=0;S<$.length;S++)for(var M=$[S],O=Object.keys(M.passengers),z=0;z<O.length;z++){var L=M.passengers[O[z]],j={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:M.airlineName,airlineCode:M.airlineCode,flightNumber:M.flightNumber,departureAirportFuzzy:M.departureAirport,departureAirportCode:M.departureCode,departureTime:M.departureTime,arrivalAirportFuzzy:M.arrivalAirport,arrivalAirportCode:M.arrivalCode,arrivalTime:M.arrivalTime},underName:{"@type":"http://schema.org/Person",name:L.name},checkinUrl:o,reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:L.totalPrice,priceCurrency:L.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:n,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:L.seats[M.airlineCode+""+M.flightNumber],seatingType:L.seatingType[M.flightNumber]}}};valid(L.membershipNumber,L.programName)&&(j.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:L.membershipNumber,programName:L.programName}),H.push(j)}if(H.length)return H}},"0/1/2/3/4/5/6/152/200/686","SG50529d95")]);