!function(){"use strict";var e=Object.defineProperty,t=(t,n,a)=>(((t,n,a)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a})(t,"symbol"!=typeof n?n+"":n,a),a);"function"!=typeof window.initCookieConsent&&(window.initCookieConsent=function(e){var t,n,a,i,o,s,r,c,l,d,u,p,m,h,g,_,v,f,b,y,w,k,A,C,E,T,L,N,S,x={mode:"opt-in",current_lang:"en",auto_language:null,autorun:!0,cookie_name:"cc_cookie",cookie_expiration:182,cookie_domain:window.location.hostname,cookie_path:"/",cookie_same_site:"Lax",use_rfc_cookie:!1,autoclear_cookies:!0,revision:0,script_selector:"data-cookiecategory"},O={},I={},D=null,j=!1,H=!1,R=!1,P=!1,q=!1,$=!1,M=!0,V="",B=[],U=!1,F=[],G=[],J=[],W=!1,K=[],z=[],X=[],Q=[],Y=[],Z=document.documentElement,ee=function(e){function t(t){return(e||document).querySelectorAll('a[data-cc="'+t+'"], button[data-cc="'+t+'"]')}function n(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,O.accept(t),O.hideSettings(),O.hide()}for(var a=t("c-settings"),i=t("accept-all"),o=t("accept-necessary"),s=t("accept-selection"),r=0;r<a.length;r++)a[r].setAttribute("aria-haspopup","dialog"),ge(a[r],"click",(function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,O.showSettings(0)}));for(r=0;r<i.length;r++)ge(i[r],"click",(function(e){n(e,"all")}));for(r=0;r<s.length;r++)ge(s[r],"click",(function(e){n(e)}));for(r=0;r<o.length;r++)ge(o[r],"click",(function(e){n(e,[])}))},te=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)?e:0<_e(t).length?Object.prototype.hasOwnProperty.call(t,x.current_lang)?x.current_lang:_e(t)[0]:void 0},ne=function(){function e(e,n){var a=!1,i=!1;try{for(var o,s=e.querySelectorAll(t.join(':not([tabindex="-1"]), ')),r=s.length,c=0;c<r;)o=s[c].getAttribute("data-focus"),i||"1"!==o?"0"===o&&(a=s[c],i||"0"===s[c+1].getAttribute("data-focus")||(i=s[c+1])):i=s[c],c++}catch(n){return e.querySelectorAll(t.join(", "))}n[0]=s[0],n[1]=s[s.length-1],n[2]=a,n[3]=i}var t=["[href]","button","input","details",'[tabindex="0"]'];e(w,z),H&&e(m,K)},ae=function(e){if(!0===t.force_consent&&ve(Z,"force--consent"),!m){m=re("div");var n=re("div"),a=re("div");m.id="cm",n.id="c-inr-i",a.id="cm-ov",m.setAttribute("role","dialog"),m.setAttribute("aria-modal","true"),m.setAttribute("aria-hidden","false"),m.setAttribute("aria-labelledby","c-ttl"),m.setAttribute("aria-describedby","c-txt"),p.appendChild(m),p.appendChild(a),m.style.visibility=a.style.visibility="hidden",a.style.opacity=0}(a=t.languages[e].consent_modal.title)&&(h||((h=re("div")).id="c-ttl",h.setAttribute("role","heading"),h.setAttribute("aria-level","2"),n.appendChild(h)),h.innerHTML=a),a=t.languages[e].consent_modal.description,$&&(a=M?a.replace("{{revision_message}}",""):a.replace("{{revision_message}}",V||t.languages[e].consent_modal.revision_message||"")),g||((g=re("div")).id="c-txt",n.appendChild(g)),g.innerHTML=a,a=t.languages[e].consent_modal.primary_btn;var i,o=t.languages[e].consent_modal.secondary_btn;a&&(_||((_=re("button")).id="c-p-bn",_.className="c-bn","accept_all"===a.role&&(i="all"),ge(_,"click",(function(){O.hide(),O.accept(i)}))),_.textContent=t.languages[e].consent_modal.primary_btn.text);o&&(v||((v=re("button")).id="c-s-bn",v.className="c-bn c_link","accept_necessary"===o.role?ge(v,"click",(function(){O.hide(),O.accept([])})):ge(v,"click",(function(){O.showSettings(0)}))),v.textContent=t.languages[e].consent_modal.secondary_btn.text),e=t.gui_options,b||((b=re("div")).id="c-inr",b.appendChild(n)),f||((f=re("div")).id="c-bns",e&&e.consent_modal&&!0===e.consent_modal.swap_buttons?(o&&f.appendChild(v),a&&f.appendChild(_),f.className="swap"):(a&&f.appendChild(_),o&&f.appendChild(v)),(a||o)&&b.appendChild(f),m.appendChild(b)),H=!0},ie=function(e){if(y)(E=re("div")).id="s-bl";else{y=re("div");var n=re("div"),o=re("div"),s=re("div");w=re("div"),k=re("div");var r=re("div");A=re("button");var c=re("div");C=re("div");var l=re("div");y.id="s-cnt",n.id="c-vln",s.id="c-s-in",o.id="cs",k.id="s-ttl",w.id="s-inr",r.id="s-hdr",C.id="s-bl",A.id="s-c-bn",l.id="cs-ov",c.id="s-c-bnc",A.className="c-bn",y.setAttribute("role","dialog"),y.setAttribute("aria-modal","true"),y.setAttribute("aria-hidden","true"),y.setAttribute("aria-labelledby","s-ttl"),k.setAttribute("role","heading"),y.style.visibility=l.style.visibility="hidden",l.style.opacity=0,c.appendChild(A),ge(n,"keydown",(function(e){27===(e=e||window.event).keyCode&&O.hideSettings(0)}),!0),ge(A,"click",(function(){O.hideSettings(0)}))}A.setAttribute("aria-label",t.languages[e].settings_modal.close_btn_label||"Close"),i=t.languages[e].settings_modal.blocks,a=t.languages[e].settings_modal.cookie_table_headers;var d=i.length;k.innerHTML=t.languages[e].settings_modal.title;for(var u=0;u<d;++u){var m=i[u].title,h=i[u].description,g=i[u].toggle,_=i[u].cookie_table,v=!0===t.remove_cookie_tables,f=(h||!v&&_)&&"truthy",b=re("div"),x=re("div");if(h){var D=re("div");D.className="p",D.insertAdjacentHTML("beforeend",h)}var H=re("div");if(H.className="title",b.className="c-bl",x.className="desc",void 0!==g){var R="c-ac-"+u,P=re(f?"button":"div"),q=re("label"),$=re("input"),M=re("span"),V=re("span"),B=re("span"),U=re("span");P.className=f?"b-tl exp":"b-tl",q.className="b-tg",$.className="c-tgl",B.className="on-i",U.className="off-i",M.className="c-tg",V.className="t-lb",f&&(P.setAttribute("aria-expanded","false"),P.setAttribute("aria-controls",R)),$.type="checkbox",M.setAttribute("aria-hidden","true");var F=g.value;$.value=F,V.textContent=m,P.insertAdjacentHTML("beforeend",m),H.appendChild(P),M.appendChild(B),M.appendChild(U),j?-1<se(I.level,F)?($.checked=!0,!E&&X.push(!0)):!E&&X.push(!1):g.enabled?($.checked=!0,!E&&X.push(!0),g.enabled&&!E&&J.push(F)):!E&&X.push(!1),!E&&Q.push(F),g.readonly?($.disabled=!0,ve(M,"c-ro"),!E&&Y.push(!0)):!E&&Y.push(!1),ve(x,"b-acc"),ve(H,"b-bn"),ve(b,"b-ex"),x.id=R,x.setAttribute("aria-hidden","true"),q.appendChild($),q.appendChild(M),q.appendChild(V),H.appendChild(q),f&&function(e,t,n){ge(P,"click",(function(){be(t,"act")?(fe(t,"act"),n.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(ve(t,"act"),n.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false"))}),!1)}(x,b,P)}else m&&((f=re("div")).className="b-tl",f.setAttribute("role","heading"),f.setAttribute("aria-level","3"),f.insertAdjacentHTML("beforeend",m),H.appendChild(f));if(m&&b.appendChild(H),h&&x.appendChild(D),!v&&void 0!==_){for(f=document.createDocumentFragment(),R=0;R<a.length;++R)q=re("th"),v=a[R],q.setAttribute("scope","col"),v&&(H=v&&_e(v)[0],q.textContent=a[R][H],f.appendChild(q));for((v=re("tr")).appendChild(f),(H=re("thead")).appendChild(v),(f=re("table")).appendChild(H),R=document.createDocumentFragment(),q=0;q<_.length;q++){for($=re("tr"),M=0;M<a.length;++M)(v=a[M])&&(H=_e(v)[0],(V=re("td")).insertAdjacentHTML("beforeend",_[q][H]),V.setAttribute("data-column",v[H]),$.appendChild(V));R.appendChild($)}(_=re("tbody")).appendChild(R),f.appendChild(_),x.appendChild(f)}(g&&m||!g&&(m||h))&&(b.appendChild(x),E?E.appendChild(b):C.appendChild(b))}T||((T=re("div")).id="s-bns"),N||((N=re("button")).id="s-all-bn",N.className="c-bn",T.appendChild(N),ge(N,"click",(function(){O.hideSettings(),O.hide(),O.accept("all")}))),N.textContent=t.languages[e].settings_modal.accept_all_btn,(d=t.languages[e].settings_modal.reject_all_btn)&&(S||((S=re("button")).id="s-rall-bn",S.className="c-bn",ge(S,"click",(function(){O.hideSettings(),O.hide(),O.accept([])})),w.className="bns-t",T.appendChild(S)),S.textContent=d),L||((L=re("button")).id="s-sv-bn",L.className="c-bn",T.appendChild(L),ge(L,"click",(function(){O.hideSettings(),O.hide(),O.accept()}))),L.textContent=t.languages[e].settings_modal.save_settings_btn,E?(w.replaceChild(E,C),C=E):(r.appendChild(k),r.appendChild(c),w.appendChild(r),w.appendChild(C),w.appendChild(T),s.appendChild(w),o.appendChild(s),n.appendChild(o),y.appendChild(n),p.appendChild(y),p.appendChild(l))};O.updateLanguage=function(e,n){if("string"==typeof e)return((e=te(e,t.languages))!==x.current_lang||!0===n)&&(x.current_lang=e,H&&(ae(e),ee(b)),ie(e),!0)};var oe=function(e){var t=i.length,n=-1;U=!1;var o=me("","all"),s=[x.cookie_domain,"."+x.cookie_domain];if("www."===x.cookie_domain.slice(0,4)){var r=x.cookie_domain.substr(4);s.push(r),s.push("."+r)}for(r=0;r<t;r++){var c=i[r];if(Object.prototype.hasOwnProperty.call(c,"toggle")){var l=-1<se(B,c.toggle.value);if(!X[++n]&&Object.prototype.hasOwnProperty.call(c,"cookie_table")&&(e||l)){var d=c.cookie_table,u=_e(a[0])[0],p=d.length;for("on_disable"===c.toggle.reload&&l&&(U=!0),l=0;l<p;l++){var m=d[l],h=[],g=m[u],_=m.is_regex||!1,v=m.domain||null;if(m=m.path||!1,v&&(s=[v,"."+v]),_)for(_=0;_<o.length;_++)o[_].match(g)&&h.push(o[_]);else-1<(g=se(o,g))&&h.push(o[g]);0<h.length&&(he(h,m,s),"on_clear"===c.toggle.reload&&(U=!0))}}}}},se=function(e,t){for(var n=e.length,a=0;a<n;a++)if(e[a]===t)return a;return-1},re=function(e){var t=document.createElement(e);return"button"===e&&t.setAttribute("type",e),t},ce=function(e,t){function n(e,t,n,a,i,o,s){if(o=o&&o.split(" ")||[],-1<se(t,i)&&(ve(e,i),("bar"!==i||"middle"!==o[0])&&-1<se(n,o[0])))for(t=0;t<o.length;t++)ve(e,o[t]);-1<se(a,s)&&ve(e,s)}if("object"==typeof e){var a=e.consent_modal;e=e.settings_modal,H&&a&&n(m,["box","bar","cloud"],["top","middle","bottom"],["zoom","slide"],a.layout,a.position,a.transition),!t&&e&&n(y,["bar"],["left","right"],["zoom","slide"],e.layout,e.position,e.transition)}};O.allowedCategory=function(e){var t=j||"opt-in"===x.mode?JSON.parse(me(x.cookie_name,"one",!0)||"{}").level||[]:J;return-1<se(t,e)},O.run=function(a){if(!document.getElementById("cc_div")&&("number"==typeof(t=a).cookie_expiration&&(x.cookie_expiration=t.cookie_expiration),"number"==typeof t.cookie_necessary_only_expiration&&(x.cookie_necessary_only_expiration=t.cookie_necessary_only_expiration),"boolean"==typeof t.autorun&&(x.autorun=t.autorun),"string"==typeof t.cookie_domain&&(x.cookie_domain=t.cookie_domain),"string"==typeof t.cookie_same_site&&(x.cookie_same_site=t.cookie_same_site),"string"==typeof t.cookie_path&&(x.cookie_path=t.cookie_path),"string"==typeof t.cookie_name&&(x.cookie_name=t.cookie_name),"function"==typeof t.onAccept&&(o=t.onAccept),"function"==typeof t.onFirstAction&&(r=t.onFirstAction),"function"==typeof t.onChange&&(s=t.onChange),"opt-out"===t.mode&&(x.mode="opt-out"),"number"==typeof t.revision&&(-1<t.revision&&(x.revision=t.revision),$=!0),"boolean"==typeof t.autoclear_cookies&&(x.autoclear_cookies=t.autoclear_cookies),!0===t.use_rfc_cookie&&(x.use_rfc_cookie=!0),!0===t.hide_from_bots&&(W=navigator&&(navigator.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(navigator.userAgent)||navigator.webdriver)),x.page_scripts=!0===t.page_scripts,x.page_scripts_order=!1!==t.page_scripts_order,"browser"===t.auto_language||!0===t.auto_language?x.auto_language="browser":"document"===t.auto_language&&(x.auto_language="document"),x.current_lang=function(e,t){return"browser"===x.auto_language?(2<(t=navigator.language||navigator.browserLanguage).length&&(t=t[0]+t[1]),t=t.toLowerCase(),te(t,e)):"document"===x.auto_language?te(document.documentElement.lang,e):"string"==typeof t?x.current_lang=te(t,e):x.current_lang}(t.languages,t.current_lang),!W))if(I=JSON.parse(me(x.cookie_name,"one",!0)||"{}"),j=void 0!==I.level,D=void 0!==I.data?I.data:null,M=!("number"==typeof a.revision&&j&&-1<a.revision&&I.revision!==x.revision),H=!j||!M,function(){(u=re("div")).id="cc--main",u.style.position="fixed",u.style.zIndex="1000000",u.innerHTML='\x3c!--[if lt IE 9 ]><div id="cc_div" class="cc_div ie"></div><![endif]--\x3e\x3c!--[if (gt IE 8)|!(IE)]>\x3c!--\x3e<div id="cc_div" class="cc_div"></div>\x3c!--<![endif]--\x3e',p=u.children[0];var t=x.current_lang;H&&ae(t),ie(t),(e||document.body).appendChild(u)}(),function(e,t){if("string"!=typeof e||""===e||document.getElementById("cc--style"))t();else{var n=re("style");n.id="cc--style";var a=new XMLHttpRequest;a.onreadystatechange=function(){4===this.readyState&&200===this.status&&(n.setAttribute("type","text/css"),n.styleSheet?n.styleSheet.cssText=this.responseText:n.appendChild(document.createTextNode(this.responseText)),document.getElementsByTagName("head")[0].appendChild(n),t())},a.open("GET",e),a.send()}}(a.theme_css,(function(){ne(),ce(a.gui_options),ee(),x.autorun&&H&&O.show(a.delay||0),setTimeout((function(){ve(u,"c--anim")}),30),setTimeout((function(){!function(){var e=!1,t=!1;ge(document,"keydown",(function(a){"Tab"===(a=a||window.event).key&&(n&&(a.shiftKey?document.activeElement===n[0]&&(n[1].focus(),a.preventDefault()):document.activeElement===n[1]&&(n[0].focus(),a.preventDefault()),t||q||(t=!0,!e&&a.preventDefault(),a.shiftKey?n[3]?n[2]?n[2].focus():n[0].focus():n[1].focus():n[3]?n[3].focus():n[0].focus())),!t&&(e=!0))})),document.contains&&ge(u,"click",(function(e){e=e||window.event,P?w.contains(e.target)?q=!0:(O.hideSettings(0),q=!1):R&&m.contains(e.target)&&(q=!0)}),!0)}()}),100)})),j&&M){var i="boolean"==typeof I.rfc_cookie;(!i||i&&I.rfc_cookie!==x.use_rfc_cookie)&&(I.rfc_cookie=x.use_rfc_cookie,pe(x.cookie_name,JSON.stringify(I))),c=ue(de()),le(),"function"==typeof o&&o(I)}else"opt-out"===x.mode&&le(J)},O.showSettings=function(e){setTimeout((function(){ve(Z,"show--settings"),y.setAttribute("aria-hidden","false"),P=!0,setTimeout((function(){R?d=document.activeElement:l=document.activeElement,0!==z.length&&(z[3]?z[3].focus():z[0].focus(),n=z)}),200)}),0<e?e:0)};var le=function(e){if(x.page_scripts){var t=document.querySelectorAll("script["+x.script_selector+"]"),n=x.page_scripts_order,a=e||I.level||[],i=function(e,t){if(t<e.length){var o=e[t],s=o.getAttribute(x.script_selector);if(-1<se(a,s)){o.type="text/javascript",o.removeAttribute(x.script_selector),(s=o.getAttribute("data-src"))&&o.removeAttribute("data-src");var r=re("script");if(r.textContent=o.innerHTML,function(e,t){for(var n=t.attributes,a=n.length,i=0;i<a;i++){var o=n[i].nodeName;e.setAttribute(o,t[o]||t.getAttribute(o))}}(r,o),s?r.src=s:s=o.src,s&&(n?r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,i(e,++t))}:r.onload=function(){r.onload=null,i(e,++t)}:s=!1),o.parentNode.replaceChild(r,o),s)return}i(e,++t)}};i(t,0)}};O.set=function(e,n){switch(e){case"data":e=n.value;var a=!1;if("update"===n.mode)if((n=typeof(D=O.get("data"))==typeof e)&&"object"==typeof D)for(var i in!D&&(D={}),e)D[i]!==e[i]&&(D[i]=e[i],a=!0);else!n&&D||D===e||(D=e,a=!0);else D=e,a=!0;return a&&(I.data=D,pe(x.cookie_name,JSON.stringify(I))),a;case"revision":return i=n.value,e=n.prompt_consent,n=n.message,u&&"number"==typeof i&&I.revision!==i?($=!0,V=n,M=!1,x.revision=i,!0===e?(ae(t),ce(t.gui_options,!0),ne(),O.show()):O.accept(),n=!0):n=!1,n;default:return!1}},O.get=function(e,t){return JSON.parse(me(t||x.cookie_name,"one",!0)||"{}")[e]},O.getConfig=function(e){return x[e]||t[e]};var de=function(){return F=I.level||[],G=Q.filter((function(e){return-1===se(F,e)})),{accepted:F,rejected:G}},ue=function(e){var t="custom",n=Y.filter((function(e){return!0===e})).length;return e.accepted.length===Q.length?t="all":e.accepted.length===n&&(t="necessary"),t};O.getUserPreferences=function(){var e=de();return{accept_type:ue(e),accepted_categories:e.accepted,rejected_categories:e.rejected}},O.loadScript=function(e,t,n){var a="function"==typeof t;if(document.querySelector('script[src="'+e+'"]'))a&&t();else{var i=re("script");if(n&&0<n.length)for(var o=0;o<n.length;++o)n[o]&&i.setAttribute(n[o].name,n[o].value);a&&(i.readyState?i.onreadystatechange=function(){"loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,t())}:i.onload=t),i.src=e,(document.head?document.head:document.getElementsByTagName("head")[0]).appendChild(i)}},O.updateScripts=function(){le()},O.show=function(e){H&&setTimeout((function(){ve(Z,"show--consent"),m.setAttribute("aria-hidden","false"),R=!0,setTimeout((function(){l=document.activeElement,n=K}),200)}),0<e?e:0)},O.hide=function(){H&&(fe(Z,"show--consent"),m.setAttribute("aria-hidden","true"),R=!1,setTimeout((function(){l.focus(),n=null}),200))},O.hideSettings=function(){fe(Z,"show--settings"),P=!1,y.setAttribute("aria-hidden","true"),setTimeout((function(){R?(d&&d.focus(),n=K):(l&&l.focus(),n=null),q=!1}),200)},O.accept=function(e,t){var n=t||[];if(t=[],e=e||void 0)if("object"==typeof e&&"number"==typeof e.length)for(var a=0;a<e.length;a++)-1!==se(Q,e[a])&&t.push(e[a]);else"string"==typeof e&&("all"===e?t=Q.slice():-1!==se(Q,e)&&t.push(e));else t=function(){for(var e=document.querySelectorAll(".c-tgl")||[],t=[],n=0;n<e.length;n++)e[n].checked&&t.push(e[n].value);return t}();if(1<=n.length)for(a=0;a<n.length;a++)t=t.filter((function(e){return e!==n[a]}));for(a=0;a<Q.length;a++)!0===Y[a]&&-1===se(t,Q[a])&&t.push(Q[a]);!function(e){B=[];var t=document.querySelectorAll(".c-tgl")||[];if(0<t.length)for(var n=0;n<t.length;n++)-1!==se(e,Q[n])?(t[n].checked=!0,X[n]||(B.push(Q[n]),X[n]=!0)):(t[n].checked=!1,X[n]&&(B.push(Q[n]),X[n]=!1));j&&x.autoclear_cookies&&0<B.length&&oe(),I={level:e,revision:x.revision,data:D,rfc_cookie:x.use_rfc_cookie},(!j||0<B.length||!M)&&(M=!0,c=ue(de()),pe(x.cookie_name,JSON.stringify(I)),le()),(j||(x.autoclear_cookies&&oe(!0),"function"==typeof r&&r(O.getUserPreferences(),I),"function"==typeof o&&o(I),j=!0,"opt-in"!==x.mode))&&("function"==typeof s&&0<B.length&&s(I,B),U&&window.location.reload())}(t)},O.eraseCookies=function(e,t,n){var a=[];if(n=n?[n,"."+n]:[x.cookie_domain,"."+x.cookie_domain],"object"==typeof e&&0<e.length)for(var i=0;i<e.length;i++)this.validCookie(e[i])&&a.push(e[i]);else this.validCookie(e)&&a.push(e);he(a,t,n)};var pe=function(e,t){var n=x.cookie_expiration;"number"==typeof x.cookie_necessary_only_expiration&&"necessary"===c&&(n=x.cookie_necessary_only_expiration),t=x.use_rfc_cookie?encodeURIComponent(t):t;var a=new Date;a.setTime(a.getTime()+864e5*n),e=e+"="+(t||"")+(n="; expires="+a.toUTCString())+"; Path="+x.cookie_path+";",e+=" SameSite="+x.cookie_same_site+";",-1<window.location.hostname.indexOf(".")&&(e+=" Domain="+x.cookie_domain+";"),"https:"===window.location.protocol&&(e+=" Secure;"),document.cookie=e},me=function(e,t,n){var a;if("one"===t){if((a=(a=document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))?n?a.pop():e:"")&&e===x.cookie_name){try{a=JSON.parse(a)}catch(e){try{a=JSON.parse(decodeURIComponent(a))}catch(e){a={}}}a=JSON.stringify(a)}}else if("all"===t)for(e=document.cookie.split(/;\s*/),a=[],t=0;t<e.length;t++)a.push(e[t].split("=")[0]);return a},he=function(e,t,n){t=t||"/";for(var a=0;a<e.length;a++)for(var i=0;i<n.length;i++)document.cookie=e[a]+"=; path="+t+(-1<n[i].indexOf(".")?"; domain="+n[i]:"")+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"};O.validCookie=function(e){return""!==me(e,"one",!0)};var ge=function(e,t,n,a){e.addEventListener?!0===a?e.addEventListener(t,n,{passive:!0}):e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},_e=function(e){if("object"==typeof e){var t=[],n=0;for(t[n++]in e);return t}},ve=function(e,t){e.classList?e.classList.add(t):be(e,t)||(e.className+=" "+t)},fe=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(\\s|^)"+t+"(\\s|$)")," ")},be=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))};return O});const n=["US"];window.addEventListener("load",(()=>{var e,t;null==(t=null==(e=window.jQuery)?void 0:e.subscribe)||t.call(e,"TGV_USER_DATA",(()=>{const e=document.cookie.includes("cc_cookie");(function(){const e=window.__TGV_USER_DATA;return!(window.location.href.includes("/venue-cabinet/")||e&&n.includes(e.locationCountryCode))})()&&!e&&function(){const e={revision:1,current_lang:"en",autoclear_cookies:!0,remove_cookie_tables:!1,page_scripts:!0,delay:0,mode:"opt-out",onAccept(e){-1===e.level.indexOf("analytics")&&(window.dataLayer=[])},gui_options:{consent_modal:{layout:"cloud",position:"bottom center",transition:"slide",swap_buttons:!1},settings_modal:{layout:"box",transition:"slide"}},languages:{en:{consent_modal:{title:"We value your privacy",description:'We use cookies and similar technologies to help personalise content and provide a better experience. By clicking OK you agree to this and our <a href="https://www.tagvenue.com/page/cookie-policy" class="cc-link">Cookie Policy</a>. To change preferences or withdraw consent, please update your Cookie Preferences.',primary_btn:{text:"OK",role:"accept_all"},secondary_btn:{text:"Cookie preferences",role:"settings"}},settings_modal:{title:"Cookie preferences",save_settings_btn:"Save settings",accept_all_btn:"Accept all",reject_all_btn:"Reject all",close_btn_label:"Close",cookie_table_headers:[{col1:"Name"}],blocks:[{title:"Cookie usage",description:'We use cookies and similar technologies to help personalise content and provide a better\nexperience. By clicking OK you agree to this and our <a href="https://www.tagvenue.com/page/cookie-policy"\n class="cc-link">Cookie Policy</a>. To change preferences or withdraw consent, please update your Cookie Preferences.'},{title:"Strictly necessary cookies",description:"These cookies are necessary for the website to function and can't be switched off in our\n               systems. They are usually only set in response to actions you have taken which result in a request for\n               services, such as setting your privacy preferences, logging in or filling in forms. You can set your\n               browser to block or alert you about these cookies, but some parts of the site may not work as a result.",toggle:{value:"necessary",enabled:!0,readonly:!0}},{title:"Performance and Analytics cookies",description:"These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us know which pages are the most and least popular and see how visitors move around the site. If you do not allow these cookies, information from these cookies will not be used to help site performance.",toggle:{value:"analytics",enabled:!0,readonly:!1},cookie_table:[{col1:"^_ga",is_regex:!0},{col1:"_gid"},{col1:"^_dc_gtm",is_regex:!0},{col1:"^_hj",is_regex:!0},{col1:"^mp_",is_regex:!0}]}]}}}};window.initCookieConsent().run(e)}()}),{immediate:!0})}));class a{constructor(e){t(this,"wrapper"),t(this,"wrapperClassNameStart"),t(this,"wrapperClassNameAnimating"),t(this,"wrapperClassName"),t(this,"dropdown"),t(this,"isOpen",!1),t(this,"maximumHeight","100vh"),t(this,"animationTime",300),t(this,"updateHeightTimeout"),this.dropdown=e.dropdown,this.wrapper=e.wrapper,this.wrapperClassNameStart=`${e.wrapperClassName}-start`,this.wrapperClassNameAnimating=`${e.wrapperClassName}-animating`,this.wrapperClassName=e.wrapperClassName,this.maximumHeight=e.maximumHeight?e.maximumHeight:this.maximumHeight,this.setMaxHeight("0")}startListening(){this.wrapper.addEventListener("click",(e=>{this.dropdown.contains(e.target)||this.toggleOpen()})),document.addEventListener("click",(e=>{if(!this.isOpen)return;this.wrapper.contains(e.target)||this.closeDropdown()}))}setMaxHeight(e){this.dropdown.style.maxHeight=e}updateMaxHeightValue(){const e=this.dropdown.getBoundingClientRect().height;e<100||(this.maximumHeight=`${e}px`,this.setMaxHeight(this.maximumHeight))}toggleOpen(){clearTimeout(this.updateHeightTimeout),this.isOpen?this.closeDropdown():(this.isOpen=!0,this.wrapper.classList.add(this.wrapperClassNameStart),this.wrapper.classList.add(this.wrapperClassNameAnimating),setTimeout((()=>{this.wrapper.classList.add(this.wrapperClassName),this.setMaxHeight(this.maximumHeight)})),this.updateHeightTimeout=setTimeout((()=>{this.updateMaxHeightValue(),this.wrapper.classList.remove(this.wrapperClassNameAnimating)}),this.animationTime+50))}closeDropdown(){this.isOpen=!1,this.setMaxHeight("0"),this.wrapper.classList.remove(this.wrapperClassName),this.wrapper.classList.add(this.wrapperClassNameAnimating),setTimeout((()=>{this.wrapper.classList.remove(this.wrapperClassNameStart),this.wrapper.classList.remove(this.wrapperClassNameAnimating)}),this.animationTime)}}const i="/build/images/guest-avatar.svg";var o={separatorName:"SEPARATOR",GUEST_AVATAR_PATH:i,FAVORITES_SELECTOR:"#navbar__favorites .ds-header__navbar__nav__link__pill",ENQUIRIES_SELECTOR:"#navbar__enquiries .ds-header__navbar__nav__link__pill",MAX_HEADER_HEIGHT_MOBILE:56,guest:[{url:"/login",label:"Log in",name:"login",options:{icon:"user",tracking:{section:"navbar_guest",element:"log_in"}}},{url:"/page/list-your-venue",label:"List your venue",name:"listYourVenue",options:{icon:"venue",tracking:{section:"navbar_guest",element:"list_your_venue"}}}],user:[{url:"/account/enquiries/current",label:"My enquiries",name:"userEnquiries",options:{icon:"notification",id:"navbar__enquiries",tracking:{section:"navbar_customer",element:"my_enquiries"}}},{url:"/favourites",label:"Favourites",name:"favorites",options:{icon:"fav",id:"navbar__favorites",tracking:{section:"navbar_customer",element:"favourites"}}},{url:"/account/my-details",label:"My Account",name:"account",options:{icon:"settings",tracking:{section:"navbar_customer",element:"my_account"}}},{url:"/account/logout",label:"Log out",name:"logout",options:{icon:"logout",onclick:["publishLogoutEvent"],tracking:{section:"navbar_customer",element:"log_out"}}}],manager:[{name:"enquiries",url:"/venue-cabinet/enquiries/all",label:"My Enquiries",options:{icon:"notification",tracking:{section:"navbar_manager",element:"my_enquiries"}}},{name:"availability",url:"/venue-cabinet/availability",label:"Availability",options:{icon:"calendar",tracking:{section:"navbar_manager",element:"availability"}}},{name:"managers",url:"/venue-cabinet/venues-managers",label:"Team Members",options:{icon:"people",tracking:{section:"navbar_manager",element:"team_members"}}},{name:"venues",url:"/venue-cabinet/venues",label:"Edit Venues",options:{icon:"venue",tracking:{section:"navbar_manager",element:"edit_venues"}}},{name:"insights",url:"/venue-cabinet/insights/performance",label:"Insights",options:{icon:"barChart",tracking:{section:"navbar_manager",element:"insights"}}},{name:"SEPARATOR"},{name:"reviews",url:"/venue-cabinet/reviews",label:"Reviews",options:{icon:"starEmpty",tracking:{section:"navbar_manager",element:"reviews"}}},{name:"payouts",url:"/venue-cabinet/payouts",label:"Payouts",options:{icon:"creditCard",tracking:{section:"navbar_manager",element:"payouts"}}},{name:"SEPARATOR"},{name:"account",url:"/venue-cabinet/my-account#/",label:"My Account",options:{icon:"settings",tracking:{section:"navbar_manager",element:"my_account"}}},{name:"company",url:"/venue-cabinet/billing-details",label:"Billing Details",options:{icon:"file",tracking:{section:"navbar_manager",element:"billing_details"}}},{name:"help",url:"/help/venue-faq",label:"Help Centre",options:{icon:"info",tracking:{section:"navbar_manager",element:"help_centre"}}},{name:"logout",url:"/venue-cabinet/logout",label:"Log out",options:{icon:"logout",onclick:["publishLogoutEvent"],tracking:{section:"navbar_manager",element:"log_out"}}}]},s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},c="object"==typeof s&&s&&s.Object===Object&&s,l="object"==typeof self&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),u=d.Symbol,p=u,m=Object.prototype,h=m.hasOwnProperty,g=m.toString,_=p?p.toStringTag:void 0;var v=function(e){var t=h.call(e,_),n=e[_];try{e[_]=void 0;var a=!0}catch(e){}var i=g.call(e);return a&&(t?e[_]=n:delete e[_]),i},f=Object.prototype.toString;var b=v,y=function(e){return f.call(e)},w=u?u.toStringTag:void 0;var k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?b(e):y(e)},A=r;var C,E=function(e){if(!A(e))return!1;var t=k(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},T=d["__core-js_shared__"],L=(C=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"";var N=function(e){return!!L&&L in e},S=Function.prototype.toString;var x=E,O=N,I=r,D=function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""},j=/^\[object .+?Constructor\]$/,H=Function.prototype,R=Object.prototype,P=H.toString,q=R.hasOwnProperty,M=RegExp("^"+P.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var V=function(e){return!(!I(e)||O(e))&&(x(e)?M:j).test(D(e))},B=function(e,t){return null==e?void 0:e[t]};var U=function(e,t){var n=B(e,t);return V(n)?n:void 0};U(Object,"create"),U(d,"Map");var F=U(d,"Set");function G(){return function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}("XSRF-TOKEN")}F&&function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}(new F([,-0]))[1];var J=Object.defineProperty,W=Object.defineProperties,K=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,Y=(e,t,n)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))X.call(t,n)&&Y(e,n,t[n]);if(z)for(var n of z(t))Q.call(t,n)&&Y(e,n,t[n]);return e},ee=(e,t)=>W(e,K(t));var te={separatorName:"SEPARATOR",GUEST_AVATAR_PATH:"/build/images/guest-avatar.svg",FAVORITES_SELECTOR:"#navbar__favorites .ds-header__navbar__nav__link__pill",ENQUIRIES_SELECTOR:"#navbar__enquiries .ds-header__navbar__nav__link__pill",MAX_HEADER_HEIGHT_MOBILE:56,user:[{url:"/account/my-details",label:"My Account",name:"account",options:{icon:"settings",tracking:{section:"navbar_customer",element:"my_account"}}},{url:"/account/logout",label:"Log out",name:"logout",options:{icon:"logout",onclick:["publishLogoutEvent"],tracking:{section:"navbar_customer",element:"log_out"}}}],manager:[{name:"account",url:"/venue-cabinet/my-account#/",label:"My Account",options:{icon:"settings",tracking:{section:"navbar_manager",element:"my_account"}}},{name:"help",url:"/help/venue-faq",label:"Help Centre",options:{icon:"info",tracking:{section:"navbar_manager",element:"help_centre"}}},{name:"logout",url:"/venue-cabinet/logout",label:"Log out",options:{icon:"logout",onclick:["publishLogoutEvent"],tracking:{section:"navbar_manager",element:"log_out"}}}]};const ne="ds-header__navbar__nav__link__pill--empty";const ae="ds-header__navbar__nav",ie={DROPDOWN_NAV:0,STATIC_NAV:1};function oe({parentClassName:e,label:t,options:n}){const a=document.createElement("div");return a.classList.add(`${e}__left_wrapper`),n.icon&&a.appendChild(function({iconName:e,className:t}){const n=document.createElement("div");return n.classList.add(t),n.classList.add(`${t}--${e}`),n}({iconName:n.icon,className:`${e}__icon`})),a.appendChild(document.createTextNode(t)),a}function se({url:e,label:t,options:n={},className:a}){const i=document.createElement("a");return i.classList.add(a),i.href=e,i.appendChild(oe({parentClassName:a,label:t,options:n})),"number"==typeof n.value&&i.appendChild(function({value:e,className:t}){const n=document.createElement("div");return n.classList.add(t),n.appendChild(document.createTextNode(e)),0===e&&n.classList.add(`${t}--empty`),n}({value:n.value,className:`${a}__pill`})),n.bold&&i.classList.add(`${a}--bold`),n.new&&i.classList.add(`${a}--new`),n.id&&(i.id=n.id),n.onclick&&Array.isArray(n.onclick)&&n.onclick.includes("publishLogoutEvent")&&$.publish("loggingOut"),(null==n?void 0:n.tracking)&&i.addEventListener("click",(()=>{App.track.event("navbar_interaction",{section:n.tracking.section,element:n.tracking.element,element_value:"number"==typeof n.value?n.value:null,interaction:"click"})})),i}function re({links:e,className:t,linksType:n}){const a=document.createElement("nav");return a.classList.add(ae),t&&a.classList.add(t),a.appendChild(function({links:e,parentClassName:t,linksType:n}){const a=document.createElement("ul"),i=`${t}__link-separator`;return e.forEach((e=>{const t=document.createElement("li");let s=e.name!==o.separatorName;if(e.featureFlag&&window.location.href.indexOf(e.featureFlag+"=1")<0&&(s=!1),s)return t.appendChild(se(ee(Z({},e),{className:`${ae}__link`}))),void a.appendChild(t);e.name===o.separatorName&&n===ie.DROPDOWN_NAV&&(t.classList.add(i),a.appendChild(t))})),a}({links:e,parentClassName:ae,linksType:n})),a}function ce(e){const t=document.querySelectorAll('input[name="accountType"]');if(t.length>0&&t[0].disabled)return!1;let n="navbar_customer",a="switch_to_manager";"switchToUserAccount"===e.target.id&&(n="navbar_manager",a="switch_to_customer"),App.track.event("navbar_interaction",{section:n,element:"switch_to",element_value:a,interaction:"click"}),$.ajax({url:"/switch-accounts",type:"POST",data:{_token:G()},beforeSend:function(){document.querySelectorAll('input[name="accountType"]').forEach((e=>{e.disabled=!0}))},success:function({redirectUrl:e}){window.location.href!==e&&(window.location.href=e)},error:function(e){console.error(e),alert("Something went wrong during account switching. Please try again later."),Rollbar.critical("Error switching accounts")}})}function le({user:e}){const t=`<div class="navbar-switch-accounts-container">\n      <p class="navbar-switch-accounts-title">Switch to</p>\n      <div class="navbar-switch-accounts-options">\n          <div id="switchToUserAccount" class="navbar-switch-accounts-option">\n              <div class="ds-radio navbar-switch-accounts-radio">\n                  <input type="radio" name="accountType" value="user" class="ds-radio-input" ${"user"===e.type&&"checked readonly"} />\n                  <div class="ds-radio-indicator navbar-switch-accounts-indicator"></div>\n                  <span class="ds-radio-text">User Account</span>\n              </div>\n          </div>\n\n          <div id="switchToManagerAccount" class="navbar-switch-accounts-option">\n              <div class="ds-radio navbar-switch-accounts-radio">\n                  <input type="radio" name="accountType" value="user" class="ds-radio-input" ${"manager"===e.type&&"checked readonly"} />\n                  <div class="ds-radio-indicator navbar-switch-accounts-indicator"></div>\n                  <span class="ds-radio-text">Venue Account</span>\n              </div>\n          </div>\n      </div>\n  </div>`,n=document.createElement("div");return n.innerHTML=t,n}function de(){return window.innerWidth}const ue={DOT_VISIBLE:"ds-header__navbar__avatar__btn_img--dotVisible",DOT_ALLOWED:"ds-header__navbar__avatar__btn_img--dotAllowed"};function pe({src:e,className:t}){const n=document.createElement("img");return n.classList.add(`${t}__img`),n.classList.add("select-none"),n.alt="",n.src=e,n.width=32,n.height=32,n.id="profilePicture",n.draggable=!1,n}function me({className:e,user:t,dotAllowed:n,showDot:a,showUserName:i=!1,showHandlerArrow:s=!0}){const r=document.createElement("div");return r.classList.add(e),r.appendChild(function({avatar:e,initials:t,profilePicturePlaceholderConfig:n={},parentClass:a,dotAllowed:i=!1,showDot:s=!1}){const r=document.createElement("span");r.classList.add(`${a}__btn_img`),i&&(r.classList.add(ue.DOT_ALLOWED),s&&r.classList.add(ue.DOT_VISIBLE)),t&&n&&(r.dataset.initials=t,r.dataset.background=n.background,r.dataset.color=n.text);const c=`${a}__img`;return e?(r.appendChild(pe({src:e,className:c})),r):t?(r.appendChild(document.createTextNode(t)),r.dataset.initials=t,n&&(r.style.backgroundColor=n.background,r.style.color=n.text,r.dataset.background=n.background,r.dataset.color=n.text),r):(r.appendChild(pe({src:o.GUEST_AVATAR_PATH,className:c})),r)}({parentClass:e,avatar:t.avatar,initials:t.initials,profilePicturePlaceholderConfig:t.profilePicturePlaceholderConfig,dotAllowed:n,showDot:a})),t.fullName&&i&&r.appendChild(function({className:e,userName:t}){const n=document.createElement("div");return n.classList.add(e),n.appendChild(document.createTextNode(t)),n.id="userName",n}({className:`${e}__name`,userName:t.fullName})),s&&r.appendChild(function({className:e}){const t=document.createElement("span");return t.classList.add(e),t}({className:`${e}__handler`})),r}function he({user:e,className:t,links:n,dotAllowed:i,showDot:s,avatarOnly:r=!1}){const c=document.createElement("button");c.setAttribute("aria-label","Expand"),c.classList.add(`${t}-wrapper`),c.appendChild(me({className:t,user:e,dotAllowed:i,showDot:s,showUserName:!r,showHandlerArrow:!r}));const l=function({className:e,links:t}){const n=document.createElement("div");return n.classList.add(e),n.appendChild(re({links:t,linksType:ie.DROPDOWN_NAV})),n}({className:`${t}__dropdown`,links:n});c.appendChild(l);const d=de()<768;return new a({wrapper:c,dropdown:l,wrapperClassName:`${t}--open`,maximumHeight:d?window.innerHeight-o.MAX_HEADER_HEIGHT_MOBILE+"px":"600px"}).startListening(),c}function ge(e){const t=document.querySelector(".ds-header__navbar__avatar__btn_img");if(!e&&t.dataset.initials)return t.innerHTML="",t.appendChild(document.createTextNode(t.dataset.initials)),void(t.dataset.background&&t.dataset.color&&(t.style.backgroundColor=t.dataset.background,t.style.color=t.dataset.color));const n=document.getElementById("profilePicture");if(!n)return t.innerHTML="",void t.appendChild(pe({src:e,className:"header__navbar__avatar__img__img"}));n.setAttribute("src",e)}const _e=(e,t)=>e-t;function ve(e,t){let n=-1;window.addEventListener("resize",function(e,t){let n=0;return()=>{const a=new Date;a-n>=t&&(e(),n=a)}}((()=>{const a=de(),i=(o=e,s=a,[...o,s].sort(_e).indexOf(s));var o,s;i!==n&&(n=i,t())}),200))}const fe="ds-header__navbar__nav__link__pill--empty";function be(){window.__TGV_USER_DATA_LOAD((e=>{!function(e){const t=document.querySelector(o.ENQUIRIES_SELECTOR);t&&(t.innerText=e,0===e?t.classList.add(fe):t.classList.remove(fe))}(e.unreadEnquiries),function(e){const t=document.querySelector(`.${ue.DOT_ALLOWED}`);t&&(e>0?t.classList.add(ue.DOT_VISIBLE):t.classList.remove(ue.DOT_VISIBLE))}(e.unreadEnquiries)}))}var ye={guest:[{width:0,firstElementInDropdown:"ALL",dotAllowed:!0},{width:768,firstElementInDropdown:null,dotAllowed:!1}],user:[{width:0,firstElementInDropdown:"ALL",dotAllowed:!0},{width:768,firstElementInDropdown:"account",dotAllowed:!1}],manager:[{width:0,firstElementInDropdown:"ALL",dotAllowed:!1},{width:768,firstElementInDropdown:"managers",dotAllowed:!1},{width:940,firstElementInDropdown:"venues",dotAllowed:!1},{width:1430,firstElementInDropdown:"reviews",dotAllowed:!1}],breakpoints:[768,940,1430]};const we=Z(Z({},ye),window._NAVBAR_BREAKPOINT_CONFIG||{});function ke({links:e,user:t,showDot:n=!1}){const a=document.querySelector(".ds-header__navbar");if(!a)return;a.style.display="none";const{navLinks:i,dropdownLinks:o,dotAllowed:s}=function({links:e,user:t,config:n}){const a=de(),i=n[t.type];let o="",s=!0;const r=[],c=[];return i.forEach((({width:e,firstElementInDropdown:t,dotAllowed:n})=>{a>e&&(o=t,s=n)})),e.forEach((e=>{const t=c.length>0;"ALL"===o||e.name===o||t?c.push(e):r.push(e)})),{navLinks:r,dropdownLinks:c,dotAllowed:s}}({links:e,user:t,config:we});if(a.removeAttribute("style"),function(e){for(;e&&e.firstChild;)e.firstChild.remove()}(a),i.length&&a.appendChild(re({links:i,className:"ds-header__navbar__main-nav",linksType:ie.STATIC_NAV})),o.length&&a.appendChild(he({className:"ds-header__navbar__avatar",user:t,links:o,dotAllowed:s,showDot:n})),null==t?void 0:t.canSwitchAccounts){const e=document.querySelector(".ds-header__navbar__avatar__dropdown");e.appendChild(le({user:t})),e.style.paddingBottom="0px","user"===t.type?document.getElementById("switchToManagerAccount").addEventListener("click",ce):"manager"===t.type&&document.getElementById("switchToUserAccount").addEventListener("click",ce)}}const Ae=Z(Z({},ye),window._NAVBAR_BREAKPOINT_CONFIG||{});async function Ce(){const e=await async function(){return App.es6.shared.user_data.getUser()}(),t=parseInt(e.unreadEnquiries||0,10)>0;let n=o[e.type];n=function({links:e,user:t}){return e.filter((e=>"payouts"!==e.name||t.paymentsEnabled))}({links:n,user:e}),n=function({links:e,user:t}){return e.map((e=>{switch(e.name){case"enquiries":return ee(Z({},e),{options:ee(Z({},e.options),{value:t.newEnquiries})});case"userEnquiries":return ee(Z({},e),{options:ee(Z({},e.options),{value:t.unreadEnquiries})});case"favorites":return ee(Z({},e),{options:ee(Z({},e.options),{value:t.wishList.length})});case"reviews":return ee(Z({},e),{options:ee(Z({},e.options),{value:t.reviewsCount})});default:return e}}))}({links:n,user:e}),ke({links:n,user:e,showDot:t});!function({links:e,user:t}){const n=document.querySelector("#avatar-wrapper");if(n){if(e.length){const a=document.querySelector(".js-avatar-menu-placeholder");a&&(a.style.display="none"),n.appendChild(he({className:"ds-header__navbar__avatar",user:t,links:e,avatarOnly:!0,dotAllowed:!1,showDot:!1}))}if(null==t?void 0:t.canSwitchAccounts){const e=document.querySelector(".ds-header__navbar__avatar__dropdown");e.appendChild(le({user:t})),e.style.paddingBottom="0px","user"===t.type?document.getElementById("switchToManagerAccount").addEventListener("click",ce):"manager"===t.type&&document.getElementById("switchToUserAccount").addEventListener("click",ce)}}}({links:te[e.type],user:e}),function(e){document.querySelector(".ds-header__logo").addEventListener("click",(()=>{let t="navbar_guest";"user"===e.type?t="navbar_customer":"manager"===e.type&&(t="navbar_manager"),App.track.event("navbar_interaction",{section:t,element:"tagvenue_logo",interaction:"click"})}))}(e)}function Ee(){ve(Ae.breakpoints,Ce),$.subscribe("enquires:updateCount",(()=>{be()})),$.subscribe("wishList:change",(e=>{!function(e){const t=document.querySelector(o.FAVORITES_SELECTOR);t&&(t.innerText=e,0===e?t.classList.add(ne):t.classList.remove(ne))}(e)})),$.subscribe("profilePicture:change",(e=>{ge(e)})),$.subscribe("userName:change",(e=>{!function({username:e,isUC:t=!1}){if(!e)return;const n=document.getElementById("userName");if(!n)return;const a=document.querySelector(".ds-header__navbar__avatar__btn_img"),o=document.getElementById("profilePicture");let s=e;s=s.replace(/\(.*\)/,""),s=s.replace(/[^a-zA-Z ]/g,""),s=s.replace(/\s\s+/g," ");let r=s.trim().split(" ");r=r[0].charAt(0)+(r.length>1?r[r.length-1].charAt(0):""),r=r.toUpperCase(),t&&a&&(!o||o&&o.src.includes(i))&&(a.innerHTML="",a.textContent=r),a.dataset.initials=r,n.innerText=e,0===r.length&&ge(i)}(e)})),$.subscribe("loginState:change",(()=>{window.__TGV_USER_DATA_LOAD((()=>{Te()}))}))}function Te(){const e=setInterval((()=>{var t,n,a;(null==(a=null==(n=null==(t=null==window?void 0:window.App)?void 0:t.es6)?void 0:n.shared)?void 0:a.user_data)&&(clearInterval(e),Ce().then((()=>{Ee()})))}),100)}const Le="ds-focus";function Ne(e){e.target.classList.remove(Le),e.target.removeEventListener("blur",Ne)}function Se(e){if("Tab"===e.code){const e=document.querySelector(".ds-focus");e&&e.classList.remove(Le),setTimeout((()=>{const e=document.activeElement;e.tabIndex<0||(e.classList.add("ds-focus"),e.addEventListener("blur",Ne))}))}}Te(),document.addEventListener("keydown",Se)}();
//# sourceMappingURL=common.js.map
