"use strict";(()=>{var e=Object.defineProperty,t=(t,n,i)=>(((t,n,i)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i})(t,"symbol"!=typeof n?n+"":n,i),i),n=(e,t="flex")=>new Promise((n=>{e.style.opacity="0",e.style.display=t,function t(){let i=parseFloat(e.style.opacity);if(i>=1)return void n();let o=i+.1;e.style.opacity=o.toString(),requestAnimationFrame(t)}()})),i=e=>new Promise((t=>{e.style.opacity="1",function n(){let i=parseFloat(e.style.opacity)-.1;e.style.opacity=i.toString(),i<=0?(e.style.display="none",t()):requestAnimationFrame(n)}()})),o=class{static activateAlerts(){this.alertsActivated=!0}static alert(e,t){if(this.alertsActivated&&window.alert(e),"error"===t)throw new Error(e)}};t(o,"alertsActivated",!1);var r=(e,t)=>!!e&&t.includes(e),s=(e,t)=>(Array.isArray(t)||(t=[t]),t.map((t=>e.dispatchEvent(new Event(t,{bubbles:!0})))).every((e=>e)));var a=e=>Object.keys(e),l=e=>{let{overflow:t}=getComputedStyle(e);return"auto"===t||"scroll"===t},d=(e,t,n=document)=>{let i=n.querySelector(e);if(i instanceof t)return i},c=(e,t=!0)=>(t!==e.checked&&(e.checked=t,s(e,["click","input","change"])),"checkbox"===e.type?e.checked:e.value),h=class{constructor({element:e,duration:n}){var i,r;t(this,"element"),t(this,"active",!1),t(this,"running",!1),t(this,"runningPromise"),t(this,"duration"),t(this,"isActive",(()=>this.active)),t(this,"isRunning",(()=>this.running)),t(this,"untilFinished",(()=>this.runningPromise)),this.element="string"==typeof e?d(e,HTMLElement)||o.alert(`No interaction with the ${e} selector was found.`,"error"):e,this.duration={first:"number"==typeof n?n:null!=(i=null==n?void 0:n.first)?i:0,second:"number"==typeof n?n:null!=(r=null==n?void 0:n.second)?r:0}}async trigger(e){return!("first"===e&&this.active||"second"===e&&!this.active)&&(e||(e=this.active?"second":"first"),s(this.element,"click"),this.running=!0,this.runningPromise=(t=this.duration[e],new Promise((e=>setTimeout(e,t)))),await this.runningPromise,this.running=!1,this.active="first"===e,!0);var t}},u=class{constructor({element:e,interaction:n,displayProperty:i,noTransition:r,startsHidden:s}){if(t(this,"interaction"),t(this,"noTransition"),t(this,"displayProperty"),t(this,"visible"),t(this,"element"),t(this,"isVisible",(()=>this.visible)),this.element="string"==typeof e?d(e,HTMLElement)||o.alert(`No element with the ${e} selector was found.`,"error"):e,this.noTransition=r,this.displayProperty=i||"block",s?(this.element.style.display="none",this.visible=!1):this.visible=!!((a=this.element).offsetWidth||a.offsetHeight||a.getClientRects().length),n){let{element:e,duration:t}=n;this.interaction=new h({element:e,duration:t})}var a}async show(){this.visible||(this.interaction?await this.interaction.trigger("first"):this.noTransition?this.element.style.display=this.displayProperty:await n(this.element,this.displayProperty),this.visible=!0)}async hide(){this.visible&&(this.interaction?await this.interaction.trigger("second"):this.noTransition?this.element.style.display="none":await i(this.element),this.visible=!1)}};t(u,"displayProperties",["block","flex","grid","inline-block","inline"]);var f=async e=>{var t,n;let{Webflow:i}=window;if(i&&"destroy"in i&&"ready"in i&&"require"in i&&(!e||e.length)){if(e||(i.destroy(),i.ready()),!e||e.includes("ix2")){let t=i.require("ix2");if(t){let{store:n,actions:i}=t,{eventState:o}=n.getState().ixSession,r=Object.entries(o);e||t.destroy(),t.init(),await Promise.all(r.map((e=>n.dispatch(i.eventStateChanged(...e)))))}}if(!e||e.includes("commerce")){let e=i.require("commerce"),t=((e=document)=>e.documentElement.getAttribute("data-wf-site"))();e&&t&&(e.destroy(),e.init({siteId:t,apiUrl:"https://render.webflow.com"}))}if(null!=e&&e.includes("lightbox")&&(null==(t=i.require("lightbox"))||t.ready()),null!=e&&e.includes("slider")){let e=i.require("slider");e&&(e.redraw(),e.ready())}return null!=e&&e.includes("tabs")&&(null==(n=i.require("tabs"))||n.redraw()),new Promise((e=>i.push((()=>e(void 0)))))}};var m=!1;"undefined"!=typeof window&&(p={get passive(){m=!0}},window.addEventListener("testPassive",null,p),window.removeEventListener("testPassive",null,p));var p,y="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),g=[],b=!1,w=-1,v=void 0,E=void 0,x=void 0,A=function(e){return g.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},$=function(e){var t=e||window.event;return!!(A(t.target)||t.touches.length>1)||(t.preventDefault&&t.preventDefault(),!1)},T=function(e,t){if(e){if(!g.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};g=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){let e=parseInt(window.getComputedStyle(window.top.document.body).getPropertyValue("padding-right"),10);x=window.top.document.body.style.paddingRight,window.top.document.body.style.paddingRight=`${e+n}px`}}void 0===v&&(v=window.top.document.body.style.overflow,window.top.document.body.style.overflow="hidden")}(t),y&&(e.ontouchstart=function(e){1===e.targetTouches.length&&(w=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-w;!A(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?$(e):e.stopPropagation())}(t,e)},b||(document.addEventListener("touchmove",$,m?{passive:!1}:void 0),b=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},S=function(){y&&(g.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),b&&(document.removeEventListener("touchmove",$,m?{passive:!1}:void 0),b=!1),w=-1),y?function(){if(void 0!==E){let e=-parseInt(window.top.document.body.style.top,10),t=-parseInt(window.top.document.body.style.left,10);window.top.body.style.position=E.position,window.top.body.style.top=E.top,window.top.body.style.left=E.left,window.scrollTo(t,e),E=void 0}}():(void 0!==x&&(window.top.document.body.style.paddingRight=x,x=void 0),void 0!==v&&(window.top.document.body.style.overflow=v,v=void 0)),g=[]},k=new WeakMap,C=new WeakMap,P=new WeakMap,M=Symbol("anyProducer"),O=Promise.resolve(),L=Symbol("listenerAdded"),j=Symbol("listenerRemoved"),I=!1,z=!1;function F(e){if("string"!=typeof e&&"symbol"!=typeof e&&"number"!=typeof e)throw new TypeError("`eventName` must be a string, symbol, or number")}function D(e){if("function"!=typeof e)throw new TypeError("listener must be a function")}function R(e,t){let n=C.get(e);if(n.has(t))return n.get(t)}function q(e,t){let n="string"==typeof t||"symbol"==typeof t||"number"==typeof t?t:M,i=P.get(e);if(i.has(n))return i.get(n)}function H(e,t){t=Array.isArray(t)?t:[t];let n=!1,i=()=>{},o=[],r={enqueue(e){o.push(e),i()},finish(){n=!0,i()}};for(let n of t){let t=q(e,n);t||(t=new Set,P.get(e).set(n,t)),t.add(r)}return{async next(){return o?0===o.length?n?(o=void 0,this.next()):(await new Promise((e=>{i=e})),this.next()):{done:!1,value:await o.shift()}:{done:!0}},async return(n){o=void 0;for(let n of t){let t=q(e,n);t&&(t.delete(r),0===t.size&&P.get(e).delete(n))}return i(),arguments.length>0?{done:!0,value:await n}:{done:!0}},[Symbol.asyncIterator](){return this}}}function N(e){if(void 0===e)return W;if(!Array.isArray(e))throw new TypeError("`methodNames` must be an array of strings");for(let t of e)if(!W.includes(t))throw"string"!=typeof t?new TypeError("`methodNames` element must be a string"):new Error(`${t} is not Emittery method`);return e}var U=e=>e===L||e===j;function _(e,t,n){if(U(t))try{I=!0,e.emit(t,n)}finally{I=!1}}var B=class e{static mixin(t,n){return n=N(n),i=>{if("function"!=typeof i)throw new TypeError("`target` must be function");for(let e of n)if(void 0!==i.prototype[e])throw new Error(`The property \`${e}\` already exists on \`target\``);Object.defineProperty(i.prototype,t,{enumerable:!1,get:function(){return Object.defineProperty(this,t,{enumerable:!1,value:new e}),this[t]}});let o=e=>function(...n){return this[t][e](...n)};for(let e of n)Object.defineProperty(i.prototype,e,{enumerable:!1,value:o(e)});return i}}static get isDebugEnabled(){var e,t;if("object"!=typeof(null==(e=globalThis.process)?void 0:e.env))return z;let{env:n}=null!=(t=globalThis.process)?t:{env:{}};return"emittery"===n.DEBUG||"*"===n.DEBUG||z}static set isDebugEnabled(e){z=e}constructor(e={}){var t;k.set(this,new Set),C.set(this,new Map),P.set(this,new Map),P.get(this).set(M,new Set),this.debug=null!=(t=e.debug)?t:{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,t,n,i)=>{try{i=JSON.stringify(i)}catch{i=`Object with the following keys failed to stringify: ${Object.keys(i).join(",")}`}("symbol"==typeof n||"number"==typeof n)&&(n=n.toString());let o=new Date,r=`${o.getHours()}:${o.getMinutes()}:${o.getSeconds()}.${o.getMilliseconds()}`;console.log(`[${r}][emittery:${e}][${t}] Event Name: ${n}\n\tdata: ${i}`)})}logIfDebugEnabled(t,n,i){(e.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,n,i)}on(e,t){D(t),e=Array.isArray(e)?e:[e];for(let n of e){F(n);let e=R(this,n);e||(e=new Set,C.get(this).set(n,e)),e.add(t),this.logIfDebugEnabled("subscribe",n,void 0),U(n)||_(this,L,{eventName:n,listener:t})}return this.off.bind(this,e,t)}off(e,t){D(t),e=Array.isArray(e)?e:[e];for(let n of e){F(n);let e=R(this,n);e&&(e.delete(t),0===e.size&&C.get(this).delete(n)),this.logIfDebugEnabled("unsubscribe",n,void 0),U(n)||_(this,j,{eventName:n,listener:t})}}once(e){let t,n=new Promise((n=>{t=this.on(e,(e=>{t(),n(e)}))}));return n.off=t,n}events(e){e=Array.isArray(e)?e:[e];for(let t of e)F(t);return H(this,e)}async emit(e,t){var n;if(F(e),U(e)&&!I)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",e,t),function(e,t,n){let i=P.get(e);if(i.has(t))for(let e of i.get(t))e.enqueue(n);if(i.has(M)){let e=Promise.all([t,n]);for(let t of i.get(M))t.enqueue(e)}}(this,e,t);let i=null!=(n=R(this,e))?n:new Set,o=k.get(this),r=[...i],s=U(e)?[]:[...o];await O,await Promise.all([...r.map((async e=>{if(i.has(e))return e(t)})),...s.map((async n=>{if(o.has(n))return n(e,t)}))])}async emitSerial(e,t){var n;if(F(e),U(e)&&!I)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",e,t);let i=null!=(n=R(this,e))?n:new Set,o=k.get(this),r=[...i],s=[...o];await O;for(let e of r)i.has(e)&&await e(t);for(let n of s)o.has(n)&&await n(e,t)}onAny(e){return D(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),k.get(this).add(e),_(this,L,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return H(this)}offAny(e){D(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),_(this,j,{listener:e}),k.get(this).delete(e)}clearListeners(e){e=Array.isArray(e)?e:[e];for(let t of e)if(this.logIfDebugEnabled("clear",t,void 0),"string"==typeof t||"symbol"==typeof t||"number"==typeof t){let e=R(this,t);e&&e.clear();let n=q(this,t);if(n){for(let e of n)e.finish();n.clear()}}else{k.get(this).clear();for(let[e,t]of C.get(this).entries())t.clear(),C.get(this).delete(e);for(let[e,t]of P.get(this).entries()){for(let e of t)e.finish();t.clear(),P.get(this).delete(e)}}}listenerCount(e){var t,n,i,o,r,s;e=Array.isArray(e)?e:[e];let a=0;for(let l of e)if("string"!=typeof l){void 0!==l&&F(l),a+=k.get(this).size;for(let e of C.get(this).values())a+=e.size;for(let e of P.get(this).values())a+=e.size}else a+=k.get(this).size+(null!=(n=null==(t=R(this,l))?void 0:t.size)?n:0)+(null!=(o=null==(i=q(this,l))?void 0:i.size)?o:0)+(null!=(s=null==(r=q(this))?void 0:r.size)?s:0);return a}bindMethods(e,t){if("object"!=typeof e||null===e)throw new TypeError("`target` must be an object");t=N(t);for(let n of t){if(void 0!==e[n])throw new Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}},W=Object.getOwnPropertyNames(B.prototype).filter((e=>"constructor"!==e));Object.defineProperty(B,"listenerAdded",{value:L,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(B,"listenerRemoved",{value:j,writable:!1,enumerable:!0,configurable:!1});var J=["personalization","analytics","marketing"],K="uncategorized",G=["essential",...J,K],V="fs-cc",Y=["informational","opt-in","opt-out"],X={allow:"allow",deny:"deny",submit:"submit"},Q={banner:`[${V}="banner"]`,preferences:`[${V}="preferences"]`,manager:`[${V}="manager"]`},Z={allow:`[${V}="${X.allow}"]`,deny:`[${V}="${X.deny}"]`,submit:`[${V}="${X.submit}"]`,openPreferences:`[${V}="open-preferences"]`,close:`[${V}="close"]`},ee={interactionTrigger:`[${V}="interaction"]`},te={categories:[`${V}-category`,`${V}-categories`],disableScroll:`${V}-scroll`,displayProperty:`${V}-display`,cookieMaxAge:`${V}-expires`,mode:`${V}-mode`,debugMode:`${V}-debug`,endpoint:`${V}-endpoint`,componentsSource:`${V}-source`,src:`${V}-src`,placeholder:`${V}-placeholder`,domain:`${V}-domain`,consentMode:`${V}-consentmode`},ne={main:V,consentsUpdated:`${V}-updated`},ie=e=>`[${V}-checkbox="${e}"]`,oe=e=>`${e}-activated`,re=``,se={info:"green",warning:"yellow",error:"red"},ae=class{static activate(){this.init(),this.active=!0}static init(){this.element=document.createElement("div"),Object.assign(this.element.style,{position:"fixed",left:"auto",top:"auto",right:"16px",bottom:"0px","z-index":"999999","max-width":"320px","font-size":"14px","line-height":"1.25"}),document.body.appendChild(this.element)}static alert(e,t){if(!this.active)return;let n=document.createElement("div");Object.assign(n.style,{position:"relative",padding:"16px",opacity:"0","margin-bottom":"16px","border-left":`4px solid ${se[t]}`,"background-color":"#fff","box-shadow":"1px 1px 3px 0 rgba(0, 0, 0, 0.1)","word-break":"break-all"});let i=document.createElement("div");i.innerText=e,n.appendChild(i),n.insertAdjacentHTML("beforeend",`
`),this.handleCard(n)}static handleCard(e){let t=n=>{n.target instanceof Element&&n.target.closest(Z.close)&&(e.removeEventListener("click",t),e.remove())};e.addEventListener("click",t),this.element.insertAdjacentElement("afterbegin",e),n(e)}};ae.active=!1;var le=Object.freeze({analytics:!1,essential:!0,marketing:!1,personalization:!1,uncategorized:!1}),de=Object.freeze({analytics:!0,essential:!0,marketing:!0,personalization:!0,uncategorized:!0}),ce=class{constructor(){this.confirmed=!1,this.bannerText="empty",this.scripts=[],this.iFrames=[],this.userHasConfirmed=()=>this.confirmed,this.getStoredElements=()=>[...this.scripts,...this.iFrames],this.getActivableElements=()=>this.getStoredElements().filter((({active:e,categories:t})=>!e&&t.every((e=>this.consents[e])))),this.getConsents=()=>this.consents,this.getConsentsEntries=()=>{return e=this.consents,Object.entries(e);var e},this.getConsent=e=>this.consents[e],this.getBannerText=()=>this.bannerText;let{currentScript:e}=document,t=null==e?void 0:e.getAttribute(te.mode);switch(this.mode=r(t,Y)?t:"opt-in",this.mode){case"informational":case"opt-out":this.consents={...de};break;default:this.consents={...le}}this.cookieMaxAge=parseInt((null==e?void 0:e.getAttribute(te.cookieMaxAge))||"180");let n=null==e?void 0:e.getAttribute(te.debugMode);this.debugMode=""===n||"true"===n,this.debugMode&&ae.activate();let i=null==e?void 0:e.getAttribute(te.consentMode);this.consentMode="true"===i,this.endpoint=null==e?void 0:e.getAttribute(te.endpoint),this.componentsSource=null==e?void 0:e.getAttribute(te.componentsSource),this.domain=null==e?void 0:e.getAttribute(te.domain),ae.alert(`The cookie banner is set to ${this.mode} mode with a consent expiry time of ${this.cookieMaxAge} days.${this.endpoint?`The consents will be POSTed to ${this.endpoint}`:""}`,"info")}storeScript(e){this.scripts.push({...e,type:"script"})}storeIFrame(e){this.iFrames.push({...e,type:"iframe"})}storeConsents(e){let t=[];return a(e).forEach((n=>{if("essential"===n)return;let i=e[n];void 0===i||i===this.consents[n]||(this.consents[n]=i,t.push(n))})),this.confirmed=!0,t}storeBannerText(e){e&&e.textContent&&(this.bannerText=e.textContent)}},he=({element:e})=>{let t=document.createElement("script");return t.type="text/javascript",t.innerText=e.innerText,t.text=e.text,e.src&&(t.src=e.src),t},ue=({element:e,src:t,placeholder:n})=>{let o=document.createElement("iframe");for(let{name:t,value:n}of e.attributes)o.setAttribute(t,n);return o.innerText=e.innerText,o.src=t,n&&o.addEventListener("load",(()=>i(n))),o},fe=class extends B{constructor(e,t){super(),this.element=e,this.store=t,this.checkboxes=new Map,this.initElements(),this.listenEvents(),this.updateCheckboxes()}initElements(){let e=J.filter((e=>{let t=ie(e),n=this.element.querySelector(`input${t}, ${t} input`);return!n||"checkbox"!==n.type||(n.checked&&c(n,!1),this.checkboxes.set(e,n),!1)}));e.length&&ae.alert(`The Consents Form is missing the following checkboxes: ${e.map((e=>ie(e))).join(", ")}.`,"warning")}listenEvents(){this.element.addEventListener("submit",(e=>this.handleSubmit(e)))}handleSubmit(e){e.preventDefault(),e.stopPropagation();let t={};this.checkboxes.forEach(((e,n)=>{var i;t[n]=null!=(i=e.checked)&&i})),this.emit("submit",t)}updateCheckboxes(){let e=this.store.getConsents();this.checkboxes.forEach(((t,n)=>{!!e[n]!==t.checked&&c(t,e[n])}))}submit(){s(this.element,"submit")}},me=class extends B{constructor(e,t){super(),this.selector=e,this.store=t,this.disableScrollOnOpen=!1,this.ready=!1,this.isReady=()=>this.ready,"complete"===document.readyState?this.init():window.addEventListener("load",(()=>this.init()))}init(){let{banner:e,manager:t,preferences:n}=Q;if(this.initElements())this.handleAccessibility(),this.listenEvents(),this.ready=!0,this.emit("ready",this.element);else switch(this.selector){case e:ae.alert(`No element with the ${e} attribute was found, it is required to have it!`,"error");break;case t:ae.alert(`No element with the ${t} attribute was found, did you want to use the Manager component?`,"info");break;case n:ae.alert(`No element with the ${n} attribute was found, did you want to use the Preferences component?`,"info")}}initElements(){this.element=d(this.selector,HTMLElement);let{element:e,store:t}=this;if(!e)return!1;let n=d("form",HTMLFormElement,e);n&&(this.form=new fe(n,t));let i=e.getAttribute(te.displayProperty);this.disableScrollOnOpen="disable"===e.getAttribute(te.disableScroll),this.disableScrollOnOpen&&(this.scrollableElement=(e=>{if(l(e))return e;let t=e.querySelectorAll("*");for(let e of t)if(l(e))return e})(e));let o=d(ee.interactionTrigger,HTMLElement,e);return this.displayController=new u({element:e,interaction:o?{element:o}:void 0,displayProperty:r(i,u.displayProperties)?i:"flex",startsHidden:!0}),!0}handleAccessibility(){let{element:e}=this;e&&a(Z).forEach((t=>{let n=e.querySelector(Z[t]);n&&(n.setAttribute("role","button"),n.setAttribute("tabindex","0"))}))}listenEvents(){let{element:e,form:t}=this;e&&(e.addEventListener("click",(e=>this.handleMouseAndKeyboard(e))),e.addEventListener("keydown",(e=>this.handleMouseAndKeyboard(e))),null==t||t.on("submit",(e=>this.handleFormSubmit(e))))}handleMouseAndKeyboard(e){var t;let{target:n}=e,{allow:i,deny:o,close:r,submit:s}=Z;n instanceof Element&&("key"in e&&"Enter"!==e.key||(n.closest(i)?(this.emit("allow"),this.close()):n.closest(o)?(this.emit("deny"),this.close()):n.closest(r)?this.close():n.closest(s)&&(null==(t=this.form)||t.submit())))}handleFormSubmit(e){this.emit("formsubmit",e),this.close()}show(e=!0){let{element:t,displayController:n,disableScrollOnOpen:i,scrollableElement:o}=this;!t||!n||n.isVisible()===e||(n[e?"show":"hide"](),i&&(e?T(o||t,{reserveScrollBarGap:!0}):S()),this.emit(e?"open":"close"))}open(){this.ready?this.show():this.once("ready").then((()=>this.show()))}close(){this.ready?this.show(!1):this.once("ready").then((()=>this.show(!1)))}};function pe(e){for(var t=1;t{if(!e)return;let{hostname:t}=window.location;return t.includes("webflow.io")?t:e},be=()=>{let e=ye.get(ne.main);if(!e)return;let t=JSON.parse(decodeURIComponent(e));return t.consents&&(e=>Object.keys(e).every((e=>r(e,G))))(t.consents)?t.consents:void 0},we=(e,t)=>{!function(...e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(arguments)}("consent",e,t)},ve=e=>{window.dataLayer=window.dataLayer||[],!window.dataLayer.find((t=>"object"==typeof t&&"event"in t&&t.event===e))&&(window.dataLayer.push({event:e}),ae.alert(`The GTM event ${e} has been fired with its equivalent consent mode.`,"info"))};var Ee=class extends B{constructor(e){super(),this.store=e,this.loadConsents(),this.storeElements(),"complete"!==document.readyState&&window.addEventListener("load",(()=>{this.storeElements(),this.applyConsents()})),this.applyConsents()}storeElements(){let{store:e}=this,t=document.querySelectorAll(`script[type="${V}"], iframe[${te.src}]`),n=e.getStoredElements();[...t].filter((e=>!n.find((({element:t})=>e===t)))).forEach((t=>{let n=function(e,t,n,i=!0){let o=n?[n]:[];if(!e)return o;let s=e.split(",").reduce(((e,t)=>{let n=t.trim();return(!i||n)&&e.push(n),e}),[]);if(t){let e=s.filter((e=>r(e,t)));return e.length?e:o}return s}(t.getAttribute(te.categories[0])||t.getAttribute(te.categories[1]),G,K);if(t instanceof HTMLScriptElement&&e.storeScript({categories:n,element:t,active:!1}),t instanceof HTMLIFrameElement){let i=t.getAttribute(te.src);if(!i)return;t.src="";let o=t.getAttribute(te.placeholder),r=o?d(o,HTMLElement):void 0;e.storeIFrame({categories:n,element:t,src:i,placeholder:r,active:!1})}ae.alert(`Stored the element: ${t.outerHTML} in the categories: ${n.join(", ")}`,"info")}))}loadConsents(){let e=be();if(this.store.consentMode&&we("default",{ad_storage:null!=e&&e.marketing?"granted":"denied",ad_user_data:null!=e&&e.marketing?"granted":"denied",ad_personalization:null!=e&&e.marketing?"granted":"denied",analytics_storage:null!=e&&e.analytics?"granted":"denied",functionality_storage:null!=e&&e.personalization?"granted":"denied",personalization_storage:null!=e&&e.personalization?"granted":"denied",security_storage:"granted"}),e){for(let t in e||{}){let n=t;if(e[n]){let e=oe(n);ve(e)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"consent_ready"}),ae.alert(`The following consents were loaded from the stored cookies: ${JSON.stringify(e)}`,"info"),this.store.storeConsents(e),ye.get(ne.consentsUpdated)&&((()=>{let e=ye.get();for(let t in e){if(t===ne.main)continue;let e=window.location.host.split(".");for(;e.length>1;)ye.remove(t),ye.remove(t,{domain:`.${e.join(".")}`}),ye.remove(t,{domain:`${e.join(".")}`}),e.splice(0,1)}})(),ae.alert("Previously denied cookies have been deleted.","info"))}}async applyConsents(){for(let e of this.store.getActivableElements())await new Promise((t=>{let n,{element:i}=e,{src:o,parentElement:r}=i;if("script"===e.type)n=he(e);else{if("iframe"!==e.type)return void t(void 0);n=ue(e)}let s=()=>{e.element=n,e.active=!0,t(void 0)};o&&n.addEventListener("load",s),null==r||r.insertBefore(n,i),i.remove(),o||s()}))}updateConsents(e,t){let{store:n}=this,{cookieMaxAge:i,endpoint:o,domain:r}=n,s=n.storeConsents(e),a=((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))();((e,t,n=120,i)=>{let o=encodeURIComponent(JSON.stringify({id:e,consents:t}));i=ge(i),ye.set(ne.main,o,{expires:n,domain:i})})(a,n.getConsents(),i,r);let l={};for(let t of s){let n=e[t],i=n?"granted":"denied";if("marketing"===t&&(l.ad_storage=i,l.ad_user_data=i,l.ad_personalization=i),"analytics"===t&&(l.analytics_storage=i),"personalization"===t&&(l.functionality_storage=i,l.personalization_storage=i),n){let e=oe(t);ve(e)}}n.consentMode&&we("update",l),o&&(async({id:e,endpoint:t,consents:n,action:i,bannerText:o})=>{if(t)try{let r=JSON.stringify({id:e,action:i,consents:n,bannerText:o,url:window.location.href,userAgent:navigator.userAgent}),s=await fetch(t,{body:r,method:"POST"});if(!s.ok)throw new Error(`The API returned a ${s.status} status.`);ae.alert("The new consents were successfully POSTed to the API endpoint.","info")}catch(e){ae.alert(`There was an error while POSTing to the API: ${e}`,"error")}})({action:t,endpoint:o,id:a,consents:n.getConsents(),bannerText:n.getBannerText()||""}),s.length&&(((e=120,t)=>{t=ge(t),ye.set(ne.consentsUpdated,"true",{expires:e,domain:t})})(i,r),this.applyConsents(),ae.alert(`The following consents were updated: ${s.join(", ")}`,"info")),this.emit("updateconsents"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"consent_ready"})}},xe=Array.isArray(window.FsCC)?window.FsCC:[];window.FsCC=new class{constructor(e=[]){this.store=new ce,this.consentController=new Ee(this.store),this.initComponents().then((()=>this.init(e)))}async initComponents(){let{store:e}=this,{componentsSource:t}=e,{banner:n,preferences:i,manager:o}=Q;t&&await(async e=>{let{origin:t,pathname:n,href:i}=window.location,{origin:o,pathname:r,href:s}=new URL(document.baseURI);try{e.startsWith("/")&&(e=(e=>e.replace(/\/+$/,""))(s===i?t:o+r)+e);let{origin:a,pathname:l}=new URL(e);if(a+l===t+n)return;let d=await(await fetch(e)).text(),c=(new DOMParser).parseFromString(d,"text/html");Object.values(Q).forEach((e=>{let t=c.querySelector(e);t&&document.body.appendChild(t)})),f(["ix2"])}catch(e){ae.alert(`${e}`,"error")}})(t),this.banner=new me(n,e),this.preferences=new me(i,e),this.manager=new me(o,e)}init(e=[]){let{store:t,manager:n,banner:i}=this;document.head.insertAdjacentHTML("beforeend",re),!/bot|crawler|spider|crawling/i.test(navigator.userAgent)&&(this.push(...e),t.userHasConfirmed()?n.open():i.open(),this.listenEvents())}listenEvents(){let{allow:e,deny:t,submit:n}=X,i=["banner","manager","preferences"],{store:o,consentController:r,banner:s,manager:a}=this;document.addEventListener("click",(e=>this.handleMouseAndKeyboard(e))),document.addEventListener("keydown",(e=>this.handleMouseAndKeyboard(e))),s.isReady()?o.storeBannerText(s.element):s.on("ready",(e=>o.storeBannerText(e))),r.on("updateconsents",(()=>{i.forEach((e=>{var t;return null==(t=this[e].form)?void 0:t.updateCheckboxes()}))})),i.forEach((i=>{this[i].on("allow",(()=>{ae.alert(`Allow button was clicked in the ${i} component.`,"info"),r.updateConsents(de,e)})),this[i].on("deny",(()=>{ae.alert(`Deny button was clicked in the ${i} component.`,"info"),r.updateConsents(le,t)})),this[i].on("formsubmit",(e=>{ae.alert(`Consents Form was submitted in the ${i} component with the following consents: ${JSON.stringify(e)}`,"info"),r.updateConsents(e,n)})),"manager"!==i&&this[i].on("close",(()=>{ae.alert(`The ${i} component was closed.`,"info"),"informational"===o.mode&&(ae.alert(`All cookies were accepted because the mode is set to ${o.mode}.`,"warning"),r.updateConsents(de,e)),a.open()}))}))}handleMouseAndKeyboard(e){let{target:t}=e,{banner:n,manager:i,preferences:o}=this;t instanceof Element&&("key"in e&&"Enter"!==e.key||t.closest(Z.openPreferences)&&(n.close(),i.close(),o.open(),ae.alert("Open Preferences button was clicked.","info")))}push(...e){e.forEach((e=>e(this)))}}(xe)})();