\n
\n
\n ").concat(cookie.description?"
".concat(cookie.description,"
"):"","\n
");}},config.options);this.opened=false;this.acceptedCookies=getCookie("cookie-accepted")==="accepted"||getCookie("cookie-accepted")==="refused";this.optionalCookies={};this.optionalCookiesByName=[];config.optionalCookies.forEach(function(ck){var cookieName=ck.cookieName||"cookie-".concat(ck.name);var savedCookie=getCookie(cookieName);var cookie=_objectSpread({},ck,{cookieName:cookieName,accepted:savedCookie===_this.options.revokeValue?false:savedCookie===_this.options.acceptValue||ck.accepted});!savedCookie&&cookie.accepted&&setCookie(cookie.cookieName,_this.options.acceptValue,_this.options.lifetime);_this.optionalCookies[cookie.name]=cookie;_this.optionalCookiesByName.push(cookie.name);if('accepted'in cookie){if('accepted'===cookie.accepted){cookie.onAccept&&cookie.onAccept()}
if('refused'===cookie.accepted){cookie.onRevoke&&cookie.onRevoke()}}});}
_createClass(CookieControl,[{key:"init",value:function init(){if(!this.el)return;this.renderOptional();this.setupEvents();!this.acceptedCookies&&window.setTimeout(this.pending.bind(this),this.options.timeout);}},{key:"setupEvents",value:function setupEvents(){var _this2=this;_toConsumableArray(document.getElementsByClassName("cookie-toggle")).forEach(function(el){el.addEventListener("click",function(e){e.preventDefault();return _this2.opened?_this2.close():_this2.open();});});_toConsumableArray(document.getElementsByClassName("cookie-close")).forEach(function(el){el.addEventListener("click",_this2.pending.bind(_this2));});_toConsumableArray(document.getElementsByClassName("js-open-cookie")).forEach(function(el){el.addEventListener("click",_this2.open.bind(_this2));});_toConsumableArray(document.getElementsByClassName("cookie-accept")).forEach(function(el){el.addEventListener("click",_this2.accept.bind(_this2));});_toConsumableArray(document.getElementsByClassName("cookie-refuse")).forEach(function(el){el.addEventListener("click",_this2.refuse.bind(_this2));});_toConsumableArray(this.el.getElementsByClassName("cookie-optional-checkbox")).forEach(function(checkbox){checkbox.addEventListener("change",_this2.toggleCookie.bind(_this2));});}},{key:"pending",value:function pending(e){e&&e.preventDefault();this.el.removeAttribute("open");this.el.setAttribute("pending","");}},{key:"open",value:function open(e){e&&e.preventDefault();this.el.removeAttribute("pending");this.el.setAttribute("open","");this.opened=true;}},{key:"close",value:function close(e){e&&e.preventDefault();this.el.removeAttribute("pending");this.el.removeAttribute("open");this.opened=false;document.getElementById('cookie').style.display='none';}},{key:"renderOptional",value:function renderOptional(){var _this3=this;var optionalHtml="";this.optionalCookiesByName.forEach(function(cookieName){var cookie=_this3.optionalCookies[cookieName];optionalHtml+=_this3.options.optionCookieHtml(cookie);});this.el.querySelector(".cookie-optional-list").outerHTML=optionalHtml;}},{key:"toggleCookie",value:function toggleCookie(e){this.optionalCookies[e.target.dataset.name].accepted=e.target.checked;this.saveCookie(this.optionalCookies[e.target.dataset.name]);this.options.onChange&&this.options.onChange(e,this);}},{key:"saveAll",value:function saveAll(){var _this4=this;this.optionalCookiesByName.forEach(function(name){return _this4.saveCookie(_this4.optionalCookies[name]);});}},{key:"saveCookie",value:function saveCookie(cookie){setCookie(cookie.cookieName,cookie.accepted?this.options.acceptValue:this.options.revokeValue,this.options.lifetime);}},{key:"accept",value:function accept(e){e&&e.preventDefault();setCookie("cookie-accepted","accepted",this.options.lifetime);if(Boolean(e.target.closest('.sa-button')?.dataset.acceptall)){var _this4=this;this.optionalCookiesByName.forEach(function(name){_this4.optionalCookies[name].accepted=true;return _this4.saveCookie(_this4.optionalCookies[name]);});}
this.close();this.options.onAccept&&this.options.onAccept(this);}},{key:"refuse",value:function refuse(e){e&&e.preventDefault();setCookie("cookie-accepted","refused",this.options.lifetime);this.saveAll();this.close();this.options.onRevoke&&this.options.onRevoke(this);}},{key:"set",value:function set(option,value){this.options[option]=value;}}]);return CookieControl;})();(function(){var ccConfig={options:{lifetime:30,domain:moduleParams.httpCookieDomain},optionalCookies:[{name:"analytics",label:moduleParams.titleAnalytics,description:moduleParams.contentAnalytics,accepted:false},{name:"socialsharing",label:moduleParams.titleSocials,description:moduleParams.contentSocials,accepted:false,onRevoke:function onRevoke(){let facebookScript=document.head.querySelector('script[src*="connect.facebook.net"]')
if(facebookScript){facebookScript.remove()}}}]}
var cookieControl=new CookieControl(ccConfig)
cookieControl.init()
if(cookieControl.acceptedCookies)document.getElementById('cookie').style.display='none'})()}(jQuery));(function($){var moduleParams={"mobileOn":false,"caisseOn":false,"bookingsOn":false,"isAjaxRequest":false};!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function i(t){var i,e,n,o;for(e=1,n=arguments.length;e