// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,r){var t=Scanner.fromMessage(e);t.setLocale(r);var a,s=e.html.replace('style="display:none>','style="display:none">');if(s){if(a=parseMicrodataAndJsonLd(s)[0],a||(a=/<script type="application\/ld\+json".*>(?:[\s\S]*<\!\[CDATA\[)?([\s\S]+?)(?:\]\]>[\s\S]*)?<\/script>/.exec(s),a&&(a=JSON.parse(a[1].replace(/[\r\n]/g," ").replace(/\\\'/g,"'").replace(/  /g," ")))),!a)return a;if(ASSERT(a.reservationFor.name,a.startTime)){var o=/(\d{4}.\d{2}.\d{2}T\d{2}.\d{2})(\+\d{2}.\d{2}|Z)/;if(o.test(a.startTime)){var n=o.exec(a.startTime);a.startTime=n[1]+":00"+n[2]}var i="Confirmed";a.reservationStatus&&(i=a.reservationStatus.replace("http://schema.org/",""));var p={"@context":"http://schema.org","@type":"http://schema.org/FoodEstablishmentReservation",partySize:a.partySize,reservationId:a.reservationNumber,reservationStatus:"http://schema.org/Reservation"+i,reservationFor:a.reservationFor,startTime:a.startTime,bookingAgent:{"@type":"http://schema.org/Organization",name:"OpenTable",url:a.agent},underName:{"@type":"http://schema.org/Person",name:a.underName.name},modifyReservationUrl:a.modifyReservationUrl,cancelReservationUrl:a.cancelReservationUrl};return p.reservationFor.address&&(p.reservationFor.address["@type"]="http://schema.org/PostalAddress"),"FoodEstablishment"===p.reservationFor["@type"]&&(p.reservationFor["@type"]="http://schema.org/"+p.reservationFor["@type"]),[p]}}}}).call();