(function(){return function(e,t,n){if(!e||!t||!n)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(t);var r,i,s,c,d,l,p,o,g,h,D,u,v;r=a.getSpan().nextText(n.reservedFor).nextAnyTag("td").tagContents(),""+r==""&&(r=r.nextAnyTag("td").tagContents()),r=r.innerCapture(/(.*)\s+\d/,1).trim(),s=a.getSpan().innerCapture(regExpFormatted(/\s\1 (\d+)/,n.reservationId),1),i=s.parentAnyTag("table");var m,x=a.getSpan().next(n.check).parentAnyTag("table");do{if(""!==(m=x.allInnerTagsFiltered("td5")[0])&&void 0!==m){D=m;break}x=x.previousAnyTag("table")}while(x.exists());if(valid(i)){if(i=i.allInnerTagsFiltered("td"+i.getTagNumber()),i.length>=2)if(p=a.getDateDD(i[1].innerDate()),valid(p)&&"fr_FR"!==t)g=a.getDetachedSpan(p.endIso8601),o=a.getDetachedSpan(p.iso8601);else if(i[1].innerText("/").exists()){var k,T,S=i[1].innerCapture(/($<checkInDate>\d{4}\/\w+\/\d+).+($<checkOutDate>\d{4}\/\w+\/\d+)/);S&&S.$checkInDate&&S.$checkOutDate?(k=(""+S.$checkInDate).split("/"),k.length>=3&&(o=a.getDetachedSpan(k[1]+"/"+k[2]+"/"+k[3]).innerDate()),T=(""+S.$checkOutDate).split("/"),T.length>=3&&(g=a.getDetachedSpan(T[1]+"/"+T[2]+"/"+T[3]).innerDate())):(S=i[1].innerCapture(/($<checkInDate>\d+\/\w+\/\d{4}).+($<checkOutDate>\d+\/\w+\/\d{4})/))&&S.$checkInDate&&S.$checkOutDate&&(o=a.getDetachedSpan((""+S.$checkInDate).replace("/"," ")).innerDate(),g=a.getDetachedSpan((""+S.$checkOutDate).replace("/"," ")).innerDate())}else{var $=(""+i[1]).replace(/\,/g,"").split("-");o=a.getDetachedSpan($[0]).innerDate(),g=a.getDetachedSpan($[1]).innerDate()}}if("ja_JP"===t){for(var f=a.getSpan().next("\u30db\u30c6\u30eb\u306e\u8a73\u7d30\u3092\u8868\u793a\u3059\u308b"),C=f.allInnerAbsoluteDates();!f.isNullSpan_&&0===C.length;)f=f.previousAnyTag("td"),C=f.allInnerAbsoluteDates();var A=C[0].innerCapture(/($<first>[\d\,\-\\\/ ]+)\s-\s($<second>[\d\,\-\\\/ ]+)/);g=A?A.$second:null,o=A?A.$first:null}if(h=a.getSpan().next(n.hotelDetails).nextLink(),i=h.parentAnyTag("td").tagContents(),v=i.innerCapture(regExpFormatted(/\1.*?>\s+(.*)[<|\n]/,n.hotelDetails),1).trim(),/Gracias por reservar con Expedia/.test(e.plain)||/Gracias por realizar tu reserva con Expedia/.test(e.plain)||/Thanks!/.test(e.plain)||/Merci\sd\u2019avoir\sr\xe9serv\xe9\svotre\svoyage\savec\sExpedia\s!/.test(e.plain)||/Grazie\sper\saver\sscelto\sdi\sprenotare\scon\sExpedia!/.test(e.plain)||/\u30a8\u30af\u30b9\u30da\u30c7\u30a3\u30a2 \u3067\u3054\u4e88\u7d04\u3044\u305f\u3060\u304d\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002/.test(e.plain)){var I=v.innerCapture(/($<first>.*)\s<($<second>.*)>/),y=I?I.$second:null,E=I?I.$first:null;y=" <https:"+y+">",v=a.getDetachedSpan(""+E+y)}i.innerAddress().getLength()>=v.getLength()&&(v=i.innerAddress()),u=i.innerCapture(regExpFormatted(/\b\1 ([-\d\(\) ]+),/,n.telephone),1),l=a.getSpan().next(n.checkin).next(n.checkinTime).parentAnyTag("td").innerCapture(regExpFormatted(/(\1\s*.*)/,n.checkinTime),1),l=l.innerDate().exists()?l.innerDate():l,valid(o,l)&&(o=combineDateAndTime(o,l));var b="Confirmed";return n.cancelled.test(e.plain)&&(b="Cancelled"),e.to,ASSERT(v,o)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r},checkinTime:o,checkoutTime:g,modifyReservationUrl:c,cancelReservationUrl:d,reservationStatus:"http://schema.org/Reservation"+b,reservationId:s,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:D,url:h,telephone:u,address:v}}]:void 0}}).call();