(function(){return function(e,r,t){if(/(?:Your Delta itinerary has changed|Schedule Changes That Impact)/.test(e.subject)){var a=Scanner.fromMessage(e);a.setLocale(r);var i,n,p,m,s,o,l,u,h,g,d,c,v,N,b,f,T,y=[],C={};for(m=a.getSpan().innerCapture(t.nameExtractor,1),m.exists()&&(C[m]={name:m,seats:{},seatingType:{}}),n=a.getSpan().innerCapture(t.confirmationNumber,1),l=a.getSpan().nextText("Updated Itinerary");l.nextText("Flight:").exists();)l=l.nextText("Flight:"),s=l.previousDate(),o=l.parentTag("table2").allInnerTagsFiltered("td2"),10===o.length&&(h=o[1].innerCapture(/($<airlineName>.*)\s+($<flightNumber>\d+)/),g=h?h.$airlineName:null,u=h?h.$flightNumber:null,d=/delta/gi.test(g)?"DL":null,c=o[3].innerCapture(/($<time>\d{1,2}:\d{2} (?:am|pm))\s+from\s+($<airport>.*)/),c&&(v=a.getDetachedSpan(s+" "+c.$time).innerDate(),N=c.$airport),b=o[5].innerCapture(/($<time>\d{1,2}:\d{2} (?:am|pm))\s+at\s+($<airport>.*)/),b&&(f=a.getDetachedSpan(s+" "+b.$time).innerDate(),T=b.$airport),valid(u,C[m])&&(C[m].seats[u]=o[7]),ASSERT(g,u,N,v,T,f)&&y.push({airlineName:g,airlineCode:d,flightNumber:u,departureAirport:N,departureTime:v,arrivalAirport:T,arrivalTime:f,passengers:C}));for(var S=[],$=0;$<y.length;$++)for(var x=y[$],A=Object.keys(x.passengers),F=0;F<A.length;F++){var D=x.passengers[A[F]],k={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:x.airlineName,airlineCode:x.airlineCode,flightNumber:x.flightNumber,departureAirportFuzzy:x.departureAirport,departureAirportCode:x.departureCode,departureTime:x.departureTime,arrivalAirportFuzzy:x.arrivalAirport,arrivalAirportCode:x.arrivalCode,arrivalTime:x.arrivalTime},underName:{"@type":"http://schema.org/Person",name:D.name},checkinUrl:p,reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:D.totalPrice,priceCurrency:D.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:i,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:D.seats[x.flightNumber],seatingType:D.seatingType[x.flightNumber]}}};valid(D.membershipNumber,D.programName)&&(k.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:D.membershipNumber,programName:D.programName}),S.push(k)}if(S.length)return S}}}).call();