new ReverseTemplateList([new ReverseTemplate("jet2.com-confirmation-en",function(e){return/Booking Confirmation: .+/.test(e.subject)||/Important Information Regarding Your Jet2\.com Flight/.test(e.subject)},function(e){if(!(/Booking Confirmation: .+/.test(e.subject)||/Important Information Regarding Your Jet2\.com Flight/.test(e.subject)&&/The attached documents show cancellation confirmations per person per flight/.test(e.plain)))return CONTINUE;if(/Important Information Regarding Your Jet2\.com Flight/.test(e.subject)&&/The attached documents show cancellation confirmations per person per flight/.test(e.plain)){var t="en_US",r={},n=Scanner.fromMessage(e);n.setLocale(t);var a=n.getSpan();r.booking=/Booking Reference:/,r.pass=/Dear/;var i=n.getSpan().next(r.booking).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s([^\n]+)/,r.booking),1),o=n.getSpan().next(r.pass).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s([^\n]+),/,r.pass),1);if(ASSERT(i,o))return[{"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight"},reservationId:i,reservationStatus:"http://schema.org/ReservationCancelled",underName:{"@type":"http://schema.org/Person",name:o}}]}if(/Booking Cancellation/.test(e.subject))return CONTINUE;var t="en_US",r={};r.reservationIdRegExp=/Your booking reference is: ([0-9A-Z]+)/,r.flightNumberPrefix="Flight:",r.departureTimePrefix="Departs:",r.arrivalTimePrefix="Arrives:",r.passengersPrefix="Passengers",r.airportsRegExp=/(.+?)\sto\s(.+)/;var n=Scanner.fromMessage(e);n.setLocale(t);var s,i,p,g,l,u,c,m,h,f,a=n.getSpan(),d=[],T=[],v=[];if(i=a.innerCapture(r.reservationIdRegExp,1),(s=a.nextText(r.flightNumberPrefix).parentAnyTag("tr").allInnerTags("td2").map(function(e){return e.tagContents()}).filter(function(e){return(""+e).length>0}))&&4===s.length){var x,C,b;[x,g,C,b]=s,[,p,g]=g.innerCapture(/([0-9A-Z]{2})(\d{3,4})/),u=n.getDetachedSpan(x+" "+(""+C).replace(r.departureTimePrefix,"")),m=n.getDetachedSpan(x+" "+(""+b).replace(r.arrivalTimePrefix,""))}return s=a.nextText(r.flightNumberPrefix).parentAnyTag("tr").previousAnyTag("tr").allInnerTags("td2").map(function(e){return e.tagContents()}).filter(function(e){return(""+e).length>0}),s&&s.length>0&&(s=s[0].innerCapture(r.airportsRegExp)),s&&3===s.length&&([,l,c]=s),T.push({airlineCode:p,flightNumber:g,departureAirport:l,departureDateTime:u,arrivalAirport:c,arrivalDateTime:m}),a.nextText(r.passengersPrefix).parentAnyTag("table").allInnerTags("tr2").slice(1).map(function(e){return e.allInnerTags("td2")}).forEach(function(e){d.push({name:e[1].tagContents(),seat:e[2].tagContents()})}),ASSERT(p,g,l,u),0===d.length&&d.push({name:null,seat:null}),T.forEach(function(e){d.forEach(function(t){v.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:e.airlineCode,flightNumber:e.flightNumber,departureAirportFuzzy:e.departureAirport,departureTime:e.departureDateTime,arrivalAirportFuzzy:e.arrivalAirport,arrivalTime:e.arrivalDateTime},underName:{"@type":"http://schema.org/Person",name:t.name},reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:h,priceCurrency:f,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:null,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:t.seat,seatingType:null}}})})}),v},"0/1/2/3/4/5/6/152/701/702","SGaf9eb7ed")]);