// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,r){if(!e||!t||!r)return CONTINUE;var n=Scanner.fromMessage(e);n.setLocale(t);var a=loadHelper("lafourchette.com-microdata-parser.js"),o={"@type":"http://schema.org/Organization",name:"La Fourchette",url:"http://www.lafourchette.com/"},i=n.getSpan().nextText(r.reservationCancelLabel).nextLink(),s=n.getSpan().nextText(r.restaurantInformationBlockLabel),g=s.nextTag("table6").innerPhoneNumber(),l=s.nextText(r.restaurantUrlPrefix).nextLink(),p=n.getSpan().nextTag("table5"),m=p.nextDate(),c=a(e);if(c)return c[0].reservationStatus="http://schema.org/ReservationConfirmed",c[0].bookingAgent=o,c[0].cancelReservationUrl=i,c[0].reservationFor.telephone=g,c[0].reservationFor.url=l,r.dontUseMicrodataStartTime&&(c[0].startTime=m),c;var d,u,x,h,T,f=e.subject;if(T=f.indexOf(r.emailType)>-1?n.getSpan().innerCapture(regExpFormatted(/\b\1 (\w*)/,r.hello),1):n.getSpan().nextTag("table2").innerTag("tr2").nextTag("tr2").innerTag("td2").tagContents().innerCapture(regExpFormatted(/(.*) \1/,r.underNameSuffix),1).trim(),d=p.nextTag("table6").allInnerTags("tr6")[2].allInnerTags("td6")[1].tagContents().innerCapture(/(\d+)/,1),u=n.getSpan().innerCapture(regExpFormatted(/\1\s(\d+)/,r.reservationIdPrefix),1),x=(""+s.nextTag("td5").tagContents()).split("\n")[0].split("<")[0].trim(),h=s.nextAddress(),h===n.getNullSpan()){var v=""+s.nextTag("td5").tagContents();h=v.indexOf("http://")>-1?v.substring(v.lastIndexOf(">")+1,v.length).replace(/(\r\n|\n|\r)/gm," ").trim():v.replace(/(\r\n|\n|\r)/gm,", ").trim()}return ASSERT(d,x,m,T)?[{"@context":"http://schema.org","@type":"http://schema.org/FoodEstablishmentReservation",partySize:d,reservationId:u,reservationStatus:"http://schema.org/ReservationConfirmed",reservationFor:{"@type":"http://schema.org/FoodEstablishment",name:x,url:l,telephone:g,address:h},startTime:m,bookingAgent:o,underName:{"@type":"http://schema.org/Person",name:T},cancelReservationUrl:i}]:void 0}}).call();