!function(){function e(e){return e&&e.__esModule?e.default:e}var t,s,n,o,i,r,a,l={},c=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function u(e,t){for(var s in t)e[s]=t[s];return e}function h(e){var t=e.parentNode;t&&t.removeChild(e)}function p(e,s,n){var o,i,r,a={};for(r in s)"key"==r?o=s[r]:"ref"==r?i=s[r]:a[r]=s[r];if(arguments.length>2&&(a.children=arguments.length>3?t.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===a[r]&&(a[r]=e.defaultProps[r]);return g(e,a,o,i,null)}function g(e,t,o,i,r){var a={type:e,props:t,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++n:r};return null==r&&null!=s.vnode&&s.vnode(a),a}function f(e){return e.children}function m(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var s;tt&&i.sort((function(e,t){return e.__v.__b-t.__v.__b})));_.__r=0}function w(e,t,s,n,o,i,r,a,d,u){var h,p,m,C,y,_,w,I=n&&n.__k||c,k=I.length;for(s.__k=[],h=0;h0?g(C.type,C.props,C.key,C.ref?C.ref:null,C.__v):C)){if(C.__=s,C.__b=s.__b+1,null===(m=I[h])||m&&C.key==m.key&&C.type===m.type)I[h]=void 0;else for(p=0;p=0;t--)if((s=e.__k[t])&&(n=E(s)))return n;return null}function k(e,t,s){"-"===t[0]?e.setProperty(t,null==s?"":s):e[t]=null==s?"":"number"!=typeof s||d.test(t)?s:s+"px"}function N(e,t,s,n,o){var i;e:if("style"===t)if("string"==typeof s)e.style.cssText=s;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)s&&t in s||k(e.style,t,"");if(s)for(t in s)n&&s[t]===n[t]||k(e.style,t,s[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=s,s?n||e.addEventListener(t,i?A:O,i):e.removeEventListener(t,i?A:O,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==s?"":s;break e}catch(e){}"function"==typeof s||(null==s||!1===s&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,s))}}function O(e){return this.l[e.type+!1](s.event?s.event(e):e)}function A(e){return this.l[e.type+!0](s.event?s.event(e):e)}function x(e,n,o,i,r,a,c,d,p){var g,C,y,_,b,I,S,E,k,O,A,x,L,B,T,P=n.type;if(void 0!==n.constructor)return null;null!=o.__h&&(p=o.__h,d=n.__e=o.__e,n.__h=null,a=[d]),(g=s.__b)&&g(n);try{e:if("function"==typeof P){if(E=n.props,k=(g=P.contextType)&&i[g.__c],O=g?k?k.props.value:g.__:i,o.__c?S=(C=n.__c=o.__c).__=C.__E:("prototype"in P&&P.prototype.render?n.__c=C=new P(E,O):(n.__c=C=new m(E,O),C.constructor=P,C.render=R),k&&k.sub(C),C.props=E,C.state||(C.state={}),C.context=O,C.__n=i,y=C.__d=!0,C.__h=[],C._sb=[]),null==C.__s&&(C.__s=C.state),null!=P.getDerivedStateFromProps&&(C.__s==C.state&&(C.__s=u({},C.__s)),u(C.__s,P.getDerivedStateFromProps(E,C.__s))),_=C.props,b=C.state,C.__v=n,y)null==P.getDerivedStateFromProps&&null!=C.componentWillMount&&C.componentWillMount(),null!=C.componentDidMount&&C.__h.push(C.componentDidMount);else{if(null==P.getDerivedStateFromProps&&E!==_&&null!=C.componentWillReceiveProps&&C.componentWillReceiveProps(E,O),!C.__e&&null!=C.shouldComponentUpdate&&!1===C.shouldComponentUpdate(E,C.__s,O)||n.__v===o.__v){for(n.__v!==o.__v&&(C.props=E,C.state=C.__s,C.__d=!1),C.__e=!1,n.__e=o.__e,n.__k=o.__k,n.__k.forEach((function(e){e&&(e.__=n)})),A=0;A2&&(a.children=arguments.length>3?t.call(arguments,2):n),g(e.type,a,o||e.key,i||e.ref,null)}t=c.slice,s={__e:function(e,t,s,n){for(var o,i,r;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),r=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,n||{}),r=o.__d),r)return o.__E=o}catch(t){e=t}throw e}},n=0,o=function(e){return null!=e&&void 0===e.constructor},m.prototype.setState=function(e,t){var s;s=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=u({},this.state),"function"==typeof e&&(e=e(u({},s),this.props)),e&&u(s,e),null!=e&&this.__v&&(t&&this._sb.push(t),y(this))},m.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),y(this))},m.prototype.render=f,i=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_.__r=0;var M,D,U,$,z=function(e){var t,s=e.selector,n=e.inline,o=e.clientSpecified,i=[],r=document.currentScript||(t=document.getElementsByTagName("script"))[t.length-1];if(!0===n){var a=r.parentNode;i.push(a)}return!0!==o||s||(s=function(e){var t=e.attributes,s=null;return Object.keys(t).forEach((function(e){t.hasOwnProperty(e)&&"data-mount-in"===t[e].name&&(s=t[e].nodeValue)})),s}(r)),s&&[].forEach.call(document.querySelectorAll(s),(function(e){i.push(e)})),i},F=function(e,t,s,n,o){t.forEach((function(t){var i=t;if(!i._habitat){i._habitat=!0;var r=function(e,t){void 0===t&&(t={});var s=e.attributes,n=Object.assign({},t);return Object.keys(s).forEach((function(e){if(s.hasOwnProperty(e)){var t=s[e].name;if(!t||"string"!=typeof t)return!1;var o=t.split(/(data-props?-)/).pop()||"";if(t!==(o=o.replace(/-([a-z])/gi,(function(e,t){return t.toUpperCase()})))){var i=s[e].nodeValue;n[o]=i}}})),[].forEach.call(e.getElementsByTagName("script"),(function(e){var t={};if(e.hasAttribute("type")){if("text/props"!==e.getAttribute("type")&&"application/json"!==e.getAttribute("type"))return;try{t=JSON.parse(e.innerHTML)}catch(e){throw new Error(e)}Object.assign(n,t)}})),n}(t,o)||o;return n&&(i.innerHTML=""),P(p(e,r),i,s)}}))},K=0,H=[],j=[],G=s.__b,W=s.__r,q=s.diffed,Z=s.__c,Y=s.unmount;function Q(e,t){s.__h&&s.__h(D,e,K||t),K=0;var n=D.__H||(D.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:j}),n.__[e]}function J(e){return K=1,X(ce,e)}function X(e,t,s){var n=Q(M++,2);if(n.t=e,!n.__c&&(n.__=[s?s(t):ce(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],s=n.t(t,e);t!==s&&(n.__N=[s,n.__[1]],n.__c.setState({}))}],n.__c=D,!D.u)){D.u=!0;var o=D.shouldComponentUpdate;D.shouldComponentUpdate=function(e,t,s){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,s);var r=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(r=!0)}})),!(!r&&n.__c.props===e)&&(!o||o.call(this,e,t,s))}}return n.__N||n.__}function ee(e,t){var n=Q(M++,3);!s.__s&&le(n.__H,t)&&(n.__=e,n.i=t,D.__H.__h.push(n))}function te(e){return K=5,se((function(){return{current:e}}),[])}function se(e,t){var s=Q(M++,7);return le(s.__H,t)?(s.__V=e(),s.i=t,s.__h=e,s.__V):s.__}function ne(){for(var e;e=H.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(re),e.__H.__h.forEach(ae),e.__H.__h=[]}catch(t){e.__H.__h=[],s.__e(t,e.__v)}}s.__b=function(e){D=null,G&&G(e)},s.__r=function(e){W&&W(e),M=0;var t=(D=e.__c).__H;t&&(U===D?(t.__h=[],D.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=j,e.__N=e.i=void 0}))):(t.__h.forEach(re),t.__h.forEach(ae),t.__h=[])),U=D},s.diffed=function(e){q&&q(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==H.push(t)&&$===s.requestAnimationFrame||(($=s.requestAnimationFrame)||ie)(ne)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==j&&(e.__=e.__V),e.i=void 0,e.__V=j}))),U=D=null},s.__c=function(e,t){t.some((function(e){try{e.__h.forEach(re),e.__h=e.__h.filter((function(e){return!e.__||ae(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],s.__e(n,e.__v)}})),Z&&Z(e,t)},s.unmount=function(e){Y&&Y(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{re(e)}catch(e){t=e}})),n.__H=void 0,t&&s.__e(t,n.__v))};var oe="function"==typeof requestAnimationFrame;function ie(e){var t,s=function(){clearTimeout(n),oe&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(s,100);oe&&(t=requestAnimationFrame(s))}function re(e){var t=D,s=e.__c;"function"==typeof s&&(e.__c=void 0,s()),D=t}function ae(e){var t=D;e.__c=e.__(),D=t}function le(e,t){return!e||e.length!==t.length||t.some((function(t,s){return t!==e[s]}))}function ce(e,t){return"function"==typeof t?t(e):t}function de(e,t){for(var s in t)e[s]=t[s];return e}function ue(e,t){for(var s in e)if("__source"!==s&&!(s in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function he(e){this.props=e}(he.prototype=new m).isPureReactComponent=!0,he.prototype.shouldComponentUpdate=function(e,t){return ue(this.props,e)||ue(this.state,t)};var pe=s.__b;s.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),pe&&pe(e)};"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var ge=function(e,t){return null==e?null:I(I(e).map(t))},fe={map:ge,forEach:ge,count:function(e){return e?I(e).length:0},only:function(e){var t=I(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:I},me=s.__e;s.__e=function(e,t,s,n){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=s.__e,t.__k=s.__k),o.__c(e,t);me(e,t,s,n)};var ve=s.unmount;function Ce(e,t,s){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=de({},e)).__c&&(e.__c.__P===s&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ce(e,t,s)}))),e}function ye(e,t,s){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return ye(e,t,s)})),e.__c&&e.__c.__P===t&&(e.__e&&s.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=s)),e}function _e(){this.__u=0,this.t=null,this.__b=null}function we(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function be(){this.u=null,this.o=null}s.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),ve&&ve(e)},(_e.prototype=new m).__c=function(e,t){var s=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(s);var o=we(n.__v),i=!1,r=function(){i||(i=!0,s.__R=null,o?o(a):a())};s.__R=r;var a=function(){if(!--n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=ye(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}},l=!0===t.__h;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(r,r)},_e.prototype.componentWillUnmount=function(){this.t=[]},_e.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var s=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ce(this.__b,s,n.__O=n.__P)}this.__b=null}var o=t.__a&&p(f,null,e.fallback);return o&&(o.__h=null),[p(f,null,t.__a?null:e.children),o]};var Ie=function(e,t,s){if(++s[1]===s[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(s=e.u;s;){for(;s.length>3;)s.pop()();if(s[1]>>1,1),t.i.removeChild(e)}}),P(p(Se,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function ke(e,t){var s=p(Ee,{__v:e,i:t});return s.containerInfo=t,s}(be.prototype=new m).__a=function(e){var t=this,s=we(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),Ie(t,e,n)):o()};s?s(i):i()}},be.prototype.render=function(e){this.u=null,this.o=new Map;var t=I(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var s=t.length;s--;)this.o.set(t[s],this.u=[1,0,this.u]);return e.children},be.prototype.componentDidUpdate=be.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,s){Ie(e,s,t)}))};var Ne="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ae="undefined"!=typeof document,xe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};m.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(m.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Le=s.event;function Be(){}function Te(){return this.cancelBubble}function Re(){return this.defaultPrevented}s.event=function(e){return Le&&(e=Le(e)),e.persist=Be,e.isPropagationStopped=Te,e.isDefaultPrevented=Re,e.nativeEvent=e};var Pe={configurable:!0,get:function(){return this.class}},Ve=s.vnode;s.vnode=function(e){var t=e.type,s=e.props,n=s;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in n={},s){var r=s[i];Ae&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in s&&null==r||("defaultValue"===i&&"value"in s&&null==s.value?i="value":"download"===i&&!0===r?r="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!xe(s.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Oe.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===r&&(r=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),n[i]&&(i="oninputCapture")),n[i]=r)}"select"==t&&n.multiple&&Array.isArray(n.value)&&(n.value=I(s.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==t&&null!=n.defaultValue&&(n.value=I(s.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),e.props=n,s.class!=s.className&&(Pe.enumerable="className"in s,null!=s.className&&(n.class=s.className),Object.defineProperty(n,"className",Pe))}e.$$typeof=Ne,Ve&&Ve(e)};var Me=s.__r;s.__r=function(e){Me&&Me(e),e.__c};var De=s.diffed;s.diffed=function(e){De&&De(e);var t=e.props,s=e.__e;null!=s&&"textarea"===e.type&&"value"in t&&t.value!==s.value&&(s.value=null==t.value?"":t.value),null};var Ue=({style:e,contentClass:t,id:s,ariaLabel:n,children:o,dir:i="ltr"})=>{var r,a,l,c;const[d,u]=J(null),h=null==d||null===(r=d.contentWindow)||void 0===r||null===(a=r.document)||void 0===a?void 0:a.head,g=null==d||null===(l=d.contentWindow)||void 0===l||null===(c=l.document)||void 0===c?void 0:c.body;return p("iframe",{style:e,ref:u,id:s,"aria-label":n},h&&ke(p("meta",{charSet:"UTF-8"}),h),g&&ke(p("div",{dir:i,className:`overflow-y-hidden h-screen w-full ${t||""}`},o),g))};var $e=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var ze=()=>{const e={squaredCenter:"512px",bottom:"512px",squaredRight:"352px",squaredLeft:"352px",top:"512px"},t={banner:{squaredCenter:"800px",squaredRight:"352px",squaredLeft:"352px"},doNotSell:e,customPermissions:e,customPermissionsIAB:e,cookiePolicy:e,service:e},s={squaredCenter:$e()?"1rem":"0.75rem",bottom:"0.75rem",squaredRight:"0.75rem",squaredLeft:"0.75rem",top:"0.75rem"},n={squaredCenter:$e()?"0.375rem":"0.25rem",bottom:"0.25rem",squaredRight:"0.25rem",squaredLeft:"0.25rem",top:"0.25rem"},o={left:{squaredLeft:0,squaredCenter:$e()?"0":"50%",bottom:"0px",top:"0px"},right:{squaredRight:0,squaredCenter:$e()?"":"50%"},bottom:{squaredCenter:$e()?0:"50%",bottom:0,squaredRight:0,squaredLeft:0},top:{top:0}},i=(e,t,s)=>e?t:s;return{bannerWidth:t,bannerBorderRadius:s,iframePosition:o,buttonBorderRadius:n,bannerDirections:e=>i("squaredCenter"===e&&!$e(),"","lg:flex-row items-stretch ltr:lg:pr-10 rtl:lg:pl-10"),bannerPadding:e=>i("squaredCenter"===e&&!$e(),"","ltr:lg:pl-10 rtl:lg:pr-10"),mainMessaggeMargin:e=>i("squaredCenter"===e&&!$e(),"my-4","my-1"),linksMargin:e=>i("squaredCenter"===e&&!$e(),"mb-5","mt-2"),buttonContainer:e=>"squaredCenter"!==e||$e()?"flex flex-col justify-around mt-4 lg:mt-0 ltr:lg:pl-14 rtl:lg:pr-14":"w-full",buttonDirection:e=>"squaredCenter"!==e||$e()?"flex my-0":"flex justify-center",buttonStyle:e=>"squaredCenter"!==e||$e()?"flex-1 lg:flex-none":"flex-1 mb-3 py-3"}};var Fe=(e,t,s,n)=>{const[o,i]=J(0),r=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0);if(ee((()=>{const e=setInterval((()=>{var e;return i(Math.min(((null==n||null===(e=n.current)||void 0===e?void 0:e.offsetHeight)||0)+10,r))}),50);return()=>clearInterval(e)}),[null==n?void 0:n.current]),"none"===e)return{height:0,width:0};if("circledLogo"===e){const e=$e()?55:60;return{height:e,width:e}}const{bannerWidth:a}=ze();return{height:o,width:"100%",maxWidth:$e()?void 0:a[e+(s?"IAB":"")][t],maxHeight:r}};var Ke=(e,t,s)=>{var n,o;if("circledLogo"===e){return{position:"fixed",["circledLeft"===s?"left":"right"]:10,bottom:0}}const i="squaredLeft"!==t&&"squaredRight"!==t&&"banner"!==e&&!$e(),{iframePosition:r}=ze(),a=!i&&"squaredCenter"!==t||$e()?{}:{transform:`translate(-50%, ${"squaredCenter"!==t||$e()?"0px":"50%"})`};return{position:(null===(n=window.illow)||void 0===n||null===(o=n.customization)||void 0===o?void 0:o.renderAt)?"absolute":"fixed",left:i?"50%":r.left[t],right:r.right[t],...a,bottom:r.bottom[t],top:r.top[t]}};var He,je=({colors:e,children:t})=>p("div",{class:"w-full flex justify-between items-center"},p("p",{class:"text-lg font-semibold m-0",style:{color:e.buttonBackground}},t));He={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};var Ge=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function We(t){var s={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=t.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(s.name=n[1],(e(He)[n[1]]||"/"===t.charAt(t.length-2))&&(s.voidElement=!0),s.name.startsWith("!--"))){var o=t.indexOf("--\x3e");return{type:"comment",comment:-1!==o?t.slice(4,o):""}}for(var i=new RegExp(Ge),r=null;null!==(r=i.exec(t));)if(r[0].trim())if(r[1]){var a=r[1].trim(),l=[a,""];a.indexOf("=")>-1&&(l=a.split("=")),s.attrs[l[0]]=l[1],i.lastIndex--}else r[2]&&(s.attrs[r[2]]=r[3].trim().substring(1,r[3].length-1));return s}var qe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Ze=/^\s*$/,Ye=Object.create(null);function Qe(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var s in e)t.push(s+'="'+e[s]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(Qe,"")+"";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var Je={parse:function(e,t){t||(t={}),t.components||(t.components=Ye);var s,n=[],o=[],i=-1,r=!1;if(0!==e.indexOf("<")){var a=e.indexOf("<");n.push({type:"text",content:-1===a?e:e.substring(0,a)})}return e.replace(qe,(function(a,l){if(r){if(a!=="")return;r=!1}var c,d="/"!==a.charAt(1),u=a.startsWith("\x3c!--"),h=l+a.length,p=e.charAt(h);if(u){var g=We(a);return i<0?(n.push(g),n):((c=o[i]).children.push(g),n)}if(d&&(i++,"tag"===(s=We(a)).type&&t.components[s.name]&&(s.type="component",r=!0),s.voidElement||r||!p||"<"===p||s.children.push({type:"text",content:e.slice(h,e.indexOf("<",h))}),0===i&&n.push(s),(c=o[i-1])&&c.children.push(s),o[i]=s),(!d||s.voidElement)&&(i>-1&&(s.voidElement||s.name===a.slice(2,-1))&&(i--,s=-1===i?n:o[i]),!r&&"<"!==p&&p)){c=-1===i?n:o[i].children;var f=e.indexOf("<",h),m=e.slice(h,-1===f?void 0:f);Ze.test(m)&&(m=" "),(f>-1&&i+c.length>=0||" "!==m)&&c.push({type:"text",content:m})}})),n},stringify:function(e){return e.reduce((function(e,t){return e+Qe("",t)}),"")}};const Xe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,et={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},tt=e=>et[e];let st={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Xe,tt)};const nt=console.warn;function ot(e,t){if(!e)return!1;const s=e.props?e.props.children:e.children;return t&&Array.isArray(s)?s.length>0:!!s}function it(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?rt(t):t}function rt(e){return Array.isArray(e)?e:[e]}function at(e,t){if(!e)return"";let s="";const n=rt(e),i=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return n.forEach(((e,n)=>{if("string"==typeof e)s+=`${e}`;else if(o(e)){const o=e,r=Object.keys(o.props).length,a=i.indexOf(o.type)>-1,l=o.props.children;if(!l&&a&&0===r)s+=`<${o.type}/>`;else if(l||a&&0===r)if(o.props.i18nIsDynamicList)s+=`<${n}>`;else if(a&&1===r&&"string"==typeof l)s+=`<${o.type}>${l}`;else{const e=at(l,t);s+=`<${n}>${e}`}else s+=`<${n}>`}else if(null===e)nt("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"==typeof e){const{format:t,...n}=e,o=Object.keys(n);if(1===o.length){const e=t?`${o[0]}, ${t}`:o[0];s+=`{{${e}}}`}else nt("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else nt("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),s}function lt(e,t,s,n,i,r){if(""===t)return[];const a=n.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(a.map((e=>`<${e}`)).join("|")).test(t);if(!e&&!l&&!r)return[t];const c={};!function e(t){rt(t).forEach((t=>{"string"!=typeof t&&(ot(t)?e(it(t)):"object"!=typeof t||o(t)||Object.assign(c,t))}))}(e);const d=Je.parse(`<0>${t}`),u={...c,...i};function h(e,t,s){const n=it(e),i=f(n,t.children,s);return function(e){return!!Array.isArray(e)&&e.every((e=>o(e)))}(n)&&0===i.length||e.props&&e.props.i18nIsDynamicList?n:i}function g(e,t,s,n,o){e.dummy?(e.children=t,s.push(V(e,{key:n},o?void 0:t))):s.push(...fe.map([e],(e=>{const s={...e.props};return delete s.i18nIsDynamicList,p(e.type,{...s,key:n,ref:e.ref,...o?{}:{children:t}})})))}function f(t,i,c){const d=rt(t);return rt(i).reduce(((t,i,m)=>{const v=i.children&&i.children[0]&&i.children[0].content&&s.services.interpolator.interpolate(i.children[0].content,u,s.language);if("tag"===i.type){let r=d[parseInt(i.name,10)];1!==c.length||r||(r=c[0][i.name]),r||(r={});const C=0!==Object.keys(i.attrs).length?function(e,t){const s={...t};return s.props=Object.assign(e.props,t.props),s}({props:i.attrs},r):r,y=o(C),_=y&&ot(i,!0)&&!i.voidElement,w=l&&"object"==typeof C&&C.dummy&&!y,b="object"==typeof e&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof C){const e=s.services.interpolator.interpolate(C,u,s.language);t.push(e)}else if(ot(C)||_){g(C,h(C,i,c),t,m)}else if(w){g(C,f(d,i.children,c),t,m)}else if(Number.isNaN(parseFloat(i.name)))if(b){g(C,h(C,i,c),t,m,i.voidElement)}else if(n.transSupportBasicHtmlNodes&&a.indexOf(i.name)>-1)if(i.voidElement)t.push(p(i.name,{key:`${i.name}-${m}`}));else{const e=f(d,i.children,c);t.push(p(i.name,{key:`${i.name}-${m}`},e))}else if(i.voidElement)t.push(`<${i.name} />`);else{const e=f(d,i.children,c);t.push(`<${i.name}>${e}`)}else if("object"!=typeof C||y)g(C,v,t,m,1!==i.children.length||!v);else{const e=i.children[0]?v:null;e&&t.push(e)}}else if("text"===i.type){const e=n.transWrapTextNodes,o=r?n.unescape(s.services.interpolator.interpolate(i.content,u,s.language)):s.services.interpolator.interpolate(i.content,u,s.language);e?t.push(p(e,{key:`${i.name}-${m}`},o)):t.push(o)}return t}),[])}return it(f([{dummy:!0,children:e||[],props:{children:[]},type:"",key:""}],d,rt(e||[]))[0])}function ct({children:e,count:t,parent:s,i18nKey:n,context:o,tOptions:i={},values:r,defaults:a,components:l,i18n:c,shouldUnescape:d,...u}){o&&(i.context=o);const h={...st,...c.options&&c.options.react};let g=c.options.defaultNS;g="string"==typeof g?[g]:g||["translation"];const f=at(e,h),m=a||f||h.transEmptyNodeValue||n,{hashTransKey:v}=h,C=n||(v?v(f||m):f||m),y=r?i.interpolation:{interpolation:{...i.interpolation,prefix:"#$?",suffix:"?$#"}},_={...i,count:t,...r,...y,defaultValue:m,ns:g},w=lt(l||e,C?c.t(C,_):m,c,h,_,d);return p(void 0!==s?s:h.defaultTransParent,u,w)}var dt=({colors:e,iabContent:t,i18n:s,onConfig:n,className:o})=>{var i;return p(ct,{parent:"p",className:`${o} text-xs md:text-sm`,style:{color:e.font},i18n:s,i18nKey:"COOKIE-BANNER.BANNER.MAIN_MESSAGE",values:{numVendors:((null==t?void 0:t.vendors.length)||0)+((null==t||null===(i=t.googleVendors)||void 0===i?void 0:i.length)||0)},components:{vendorsLink:p("a",{className:"no-underline cursor-pointer shrink-0",style:{color:e.buttonBackground},onClick:n}),br:p("br",null)}})};const ut=e=>e.startsWith("http")?e:`http://${e}`;var ht=function(e,t=1){let s;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(s=e.substring(1).split(""),3==s.length&&(s=[s[0],s[0],s[1],s[1],s[2],s[2]]),s="0x"+s.join(""),`rgba(${[s>>16&255,s>>8&255,255&s].join(",")},${t})`):"rgba(0, 0, 0, 0.58)"};var pt=({fontColor:e,poweredByUrl:t,highlightColors:s})=>p("div",{className:"flex items-end"},p("a",{class:"flex items-center no-underline cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm gap-1 text-[8px]",href:(e=>{try{const t=new URL(ut(e));return t.searchParams.set("utm_source",t.searchParams.get("utm_source")||"banner"),t.searchParams.set("utm_medium",t.searchParams.get("utm_medium")||window.location.hostname),t.href}catch{return}})(t||"https://illow.io"),target:"_blank",style:{color:e,"--tw-ring-color":ht(s,1)}},p("label",{className:"italic"},"Powered by"),p("label",{className:"text-[10px] font-medium"},"illow"),p("label",null,"-"),p("label",{style:{fontSize:8},className:"italic"},"A Google Certified CMP")));const gt=e=>localStorage.setItem(e,"true"),ft=({url:e,color:t,onClick:s,label:n,children:o,className:i})=>p("span",{className:null!=i?i:"ltr:mr-4 ltr:last:mr-0 rtl:ml-4 rtl:last:ml-0 "},p("a",{...e?{href:ut(e),target:"_blank"}:{},className:"no-underline cursor-pointer shrink-0 focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm ",style:{"--tw-ring-color":ht(t,1),color:t,borderBottom:`1px solid ${t}`},onClick:s,tabIndex:0,onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),e?window.open(`${ut(e)}`):s())}},n,o));var mt=({customization:e,i18n:t,className:s,onCookiePolicy:n,onDoNotSellMyData:o,showGoogleLink:i=!1})=>{const{colors:r,urls:a,settings:l}=e;return p("div",{className:`w-full flex text-center flex-wrap text-[9px] ${s||""} whitespace-nowrap `},a.privacyPolicy&&""!==a.privacyPolicy&&p(ft,{url:a.privacyPolicy,color:r.buttonBackground,onClick:()=>gt("CLICKED_POLICY"),label:t.t("COOKIE-BANNER.BANNER.LINKS.PRIVACY_POLICY")}),l.showCookiePolicyUrl&&p(ft,{url:a.cookiePolicy,color:r.buttonBackground,onClick:()=>{gt("CLICKED_COOKIES"),a.cookiePolicy||n()},label:t.t("COOKIE-BANNER.BANNER.LINKS.COOKIE_POLICY")}),i&&p(ft,{url:"https://business.safety.google/privacy/",color:r.buttonBackground,onClick:()=>{gt("CLICKED_GOOGLE_POLICY")},label:t.t("COOKIE-BANNER.BANNER.LINKS.GOOGLE_CONSENT")}),l.showTermsAndCond&&p(ft,{url:a.termsAndCondUrl,color:r.buttonBackground,onClick:()=>gt("TERMS"),label:t.t("COOKIE-BANNER.BANNER.LINKS.TC")}),a.dsrForm&&""!==a.dsrForm&&l.showDSRUrl&&p(ft,{url:a.dsrForm,color:r.buttonBackground,label:t.t("COOKIE-BANNER.BANNER.LINKS.DSR_FORM")}),o&&p(ft,{url:"",onClick:o,color:r.buttonBackground,label:t.t("COOKIE-BANNER.BANNER.LINKS.DO-NOT_SELL_MY_DATA")}))};var vt=({id:e,color:t,backgroundColor:s,onClick:n,children:o,className:i,borderRadius:r,highlightColors:a})=>p("button",{id:e,className:`${i||""} ${(null==i?void 0:i.match(/text-[a-z]{2,2} /))?"":"text-md"} flex justify-center items-center text-center cursor-pointer px-2 md:px-4 py-2 border border-transparent leading-4 font-black focus:outline-none focus:ring-2 focus:ring-offset-2 `,style:{backgroundColor:s,color:t,"border-radius":r,"--tw-ring-color":ht(a,1)},onClick:n},p("span",null,o)),Ct={reject:"cmp-reject-all",customPermissions:"cmp-custom-permissions",accept:"cmp-accept-all",submit:"cmp-submit"};var yt=({customization:e,i18n:t,onConfig:s,onReject:n,onAccept:o,className:i,customStyles:r})=>{const{colors:a}=e,l=r.buttonBorderRadius[e.settings.positioning],c=e.settings.positioning;return p("div",{className:`${i||""} ${r.buttonDirection(c)} gap-y-3`},p(vt,{id:Ct.customPermissions,borderRadius:l,className:`${r.buttonStyle(c)} ltr:mr-3 rtl:ml-3`,backgroundColor:a.buttonBackground,color:a.background,onClick:s,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.BANNER.BUTTONS.SET_CUSTOM")),p(vt,{id:Ct.reject,borderRadius:l,className:`${r.buttonStyle(c)} ltr:mr-3 rtl:ml-3`,backgroundColor:a.buttonBackground,color:a.background,onClick:n,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.BANNER.BUTTONS.REJECT_ALL")),p(vt,{id:Ct.accept,className:r.buttonStyle(c),borderRadius:l,backgroundColor:a.buttonBackground,color:a.background,onClick:o,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.BANNER.BUTTONS.ACCEPT_COOKIES")))};var _t=({customization:e,i18n:t,onConfig:s,onReject:n,onAccept:o,className:i,customStyles:r})=>{const{colors:a}=e,l=r.buttonBorderRadius[e.settings.positioning];return p("div",{className:`${i||""} flex-col gap-y-2`},p("div",{className:"grid grid-cols-2 "},p(vt,{id:Ct.reject,borderRadius:l,className:"ltr:mr-2 rtl:ml-2",backgroundColor:a.buttonBackground,color:a.background,onClick:n,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.BANNER.BUTTONS.REJECT_ALL")),p(vt,{id:Ct.accept,borderRadius:l,backgroundColor:a.buttonBackground,color:a.background,onClick:o,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.BANNER.BUTTONS.ACCEPT_COOKIES"))),p(vt,{id:Ct.customPermissions,borderRadius:l,backgroundColor:a.buttonBackground,color:a.background,onClick:s,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.BANNER.BUTTONS.SET_CUSTOM")))};const wt={fullyCompliantBanner:({customization:e,iabContent:t,i18n:s,onConfig:n,onCookiePolicy:o,onAccept:i,customStyles:r})=>{const{colors:a,settings:l}=e,c=e.settings.positioning;return p("div",{className:`flex flex-col px-0 ${r.bannerPadding(c)}`},p(je,{colors:a},s.t("COOKIE-BANNER.BANNER.TITLE")),p("div",{className:`flex flex-col ${r.bannerDirections(c)}`},p("div",{class:"flex-1"},p(dt,{className:r.mainMessaggeMargin(c),colors:a,i18n:s,iabContent:t,onConfig:n}),p(mt,{className:r.linksMargin(c),customization:e,i18n:s,onCookiePolicy:o})),p("div",{className:r.buttonContainer(c)},p("div",{className:`flex items-stretch ${r.buttonDirection(c)}`},p(vt,{id:Ct.customPermissions,borderRadius:r.buttonBorderRadius[c],className:`${r.buttonStyle(c)} ltr:mr-2 rtl:ml-2 text-xs md:text-md`,backgroundColor:ht(a.buttonBackground,.2),color:a.buttonBackground,onClick:n,highlightColors:a.buttonBackground},s.t("COOKIE-BANNER.BANNER.BUTTONS.SET_CUSTOM")),p(vt,{id:Ct.accept,borderRadius:r.buttonBorderRadius[c],className:`${r.buttonStyle(c)} text-xs md:text-md`,backgroundColor:a.buttonBackground,color:a.background,onClick:i,highlightColors:a.buttonBackground},s.t("COOKIE-BANNER.BANNER.BUTTONS.ACCEPT_COOKIES"))),l.showPoweredBy&&p("div",{className:"w-full flex items-end justify-end mt-2"},p(pt,{highlightColors:a.buttonBackground,fontColor:a.font,poweredByUrl:e.urls.poweredByUrl})))))},gdprBanner:e=>{const{customization:t,iabContent:s,i18n:n,onConfig:o,onCookiePolicy:i,customStyles:r}=e,{colors:a,settings:l}=t,c=t.settings.positioning,d=(s&&s.vendors.length>0||s&&s.googleVendors.length>0)&&("top"===c||"bottom"===c||$e());return p("div",{className:`flex flex-col px-0 ${r.bannerPadding(c)}`},p(je,{colors:a},n.t("COOKIE-BANNER.BANNER.TITLE")),p("div",{className:`flex flex-col ${r.bannerDirections(c)}`},p("div",{class:"flex-1"},p(dt,{className:r.mainMessaggeMargin(c),colors:a,i18n:n,iabContent:s,onConfig:o}),p(mt,{className:r.linksMargin(c),customization:t,i18n:n,onCookiePolicy:i})),p("div",{className:r.buttonContainer(c)},p(_t,{...e,className:"flex "+(d?"md:flex":"md:hidden")}),p(yt,{...e,className:"hidden md:flex flex-1 items-center "+(d?"md:hidden":"md:flex")}),l.showPoweredBy&&p("div",{class:"w-full flex items-end justify-end mt-2"},p(pt,{highlightColors:a.buttonBackground,fontColor:a.font,poweredByUrl:t.urls.poweredByUrl})))))},ccpaBanner:e=>{const{customization:t,i18n:s,onCookiePolicy:n,onDoNotSellMyData:o,customStyles:i}=e,{colors:r,settings:a}=t,l=t.settings.positioning;return p("div",{className:`flex flex-col px-0 ${i.bannerPadding(l)}`},p(je,{colors:r},s.t("COOKIE-BANNER.BANNER.TITLE")),p("div",{className:`flex flex-col ${i.bannerDirections(l)}`},p("div",{class:"flex-1"},p(dt,{className:i.mainMessaggeMargin(l),colors:r,i18n:s}),p("div",{className:"flex flex-col md:flex-row justify-between"},p(mt,{className:`${i.linksMargin(l)} flex-1`,customization:t,i18n:s,onCookiePolicy:n,onDoNotSellMyData:o}),a.showPoweredBy&&p("div",{class:"mt-3 self-end"},p(pt,{highlightColors:r.buttonBackground,fontColor:r.font,poweredByUrl:t.urls.poweredByUrl}))))))}};var bt=({bannerType:e,...t})=>p(wt[e],t);var It=({primaryColor:e,secondaryColor:t,size:s,selectedLogo:n,customLogoUrl:o})=>p("div",{style:{backgroundColor:t,height:s,width:s,padding:s*(o?.09:.25)},className:"flex justify-center items-center rounded-full shadow-lg overflow-hidden"},o?p("img",{className:"w-full h-full",src:o,alt:"widget logo"}):(t=>{switch(t){case"lgpd":return p("svg",{width:"34",height:"15",viewBox:"0 0 34 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("g",{"clip-path":"url(#clip0_6091_39391)"},p("path",{d:"M2.60537 12.6092H6.05495V14.8304H0V0.154297H2.60537V12.6092Z",fill:e}),p("path",{d:"M12.2016 13.6494C11.8379 14.5714 11.0568 15.021 9.86041 15C9.01811 14.9905 8.32513 14.6742 7.7853 14.0532C7.24355 13.4322 6.97363 12.5673 6.97363 11.4605V4.19291C6.97363 2.85751 7.31438 1.82499 7.99587 1.09538C8.67737 0.365761 9.65749 0 10.9362 0C12.215 0 13.1186 0.316231 13.7675 0.946787C14.4184 1.57925 14.7419 2.44221 14.7419 3.5395V5.49594H12.1518V3.74143C12.1518 2.74702 11.7364 2.24981 10.9037 2.24981C10.5285 2.24981 10.2203 2.38697 9.97527 2.66129C9.73023 2.93561 9.60772 3.29566 9.60772 3.74143V11.2414C9.60772 11.7482 9.72449 12.1273 9.95804 12.3749C10.1916 12.6226 10.5017 12.7483 10.8865 12.7483C11.2502 12.7483 11.5565 12.613 11.8073 12.3444C12.0561 12.0758 12.1825 11.7443 12.1825 11.35V9.06782H10.8712V6.92469H14.74V14.8285H12.5711L12.3835 13.6474H12.1959L12.2016 13.6494Z",fill:e}),p("path",{d:"M20.7223 10.4185H19.411V14.8285H16.8057V0.154297H20.6745C21.9015 0.154297 22.8587 0.485768 23.5459 1.14871C24.2332 1.81165 24.5758 2.75844 24.5758 3.99098V6.45986C24.5758 7.66001 24.2121 8.62013 23.4828 9.34023C22.7553 10.0603 21.8345 10.4204 20.7204 10.4204L20.7223 10.4185ZM20.4562 8.19722C20.9138 8.19722 21.2737 8.04482 21.5321 7.74002C21.7924 7.43522 21.9226 7.01231 21.9226 6.4751V4.0367C21.9226 3.49758 21.7924 3.088 21.5321 2.80225C21.2717 2.51841 20.9138 2.37553 20.4562 2.37553H19.411V8.19913H20.4562V8.19722Z",fill:e}),p("path",{d:"M30.2709 0.154297C31.4462 0.154297 32.3613 0.499103 33.0179 1.18681C33.6726 1.87452 34.0018 2.87655 34.0018 4.191V10.8071C34.0018 12.112 33.6707 13.1083 33.0102 13.796C32.3498 14.4856 31.4367 14.8285 30.2709 14.8285H26.3389V0.154297H30.2709ZM31.3639 11.1024V3.86715C31.3639 3.40042 31.2452 3.03657 31.0059 2.77177C30.7667 2.50698 30.4604 2.37553 30.0852 2.37553H28.9462V12.6092H30.0852C30.4604 12.6092 30.7667 12.4778 31.0059 12.213C31.2452 11.9482 31.3639 11.5786 31.3639 11.1024Z",fill:e})),p("defs",null,p("clipPath",{id:"clip0_6091_39391"},p("rect",{width:"34",height:"15",fill:e}))));case"gdpr":return p("svg",{width:"34",height:"15",viewBox:"0 0 34 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("g",{"clip-path":"url(#clip0_6091_39399)"},p("path",{d:"M4.78432 13.6494C4.45146 14.5714 3.73671 15.021 2.6418 15C1.87098 14.9905 1.23681 14.6742 0.742786 14.0532C0.247012 13.4322 0 12.5673 0 11.4605V4.19291C0 2.85751 0.31183 1.82499 0.935491 1.09538C1.55915 0.365761 2.4561 0 3.62634 0C4.79658 0 5.62345 0.316231 6.21733 0.946787C6.81296 1.57925 7.10903 2.44221 7.10903 3.5395V5.49594H4.73877V3.74143C4.73877 2.74702 4.35861 2.24981 3.59656 2.24981C3.25319 2.24981 2.97115 2.38697 2.74691 2.66129C2.52267 2.93561 2.41055 3.29566 2.41055 3.74143V11.2414C2.41055 11.7482 2.51742 12.1273 2.73114 12.3749C2.94487 12.6226 3.22867 12.7483 3.58079 12.7483C3.91364 12.7483 4.19394 12.613 4.42343 12.3444C4.65117 12.0758 4.7668 11.7443 4.7668 11.35V9.06782H3.56678V6.92469H7.10728V14.8285H5.12242L4.95074 13.6474H4.77906L4.78432 13.6494Z",fill:e}),p("path",{d:"M12.5944 0.154297C13.67 0.154297 14.5074 0.499103 15.1083 1.18681C15.7075 1.87452 16.0088 2.87655 16.0088 4.191V10.8071C16.0088 12.112 15.7057 13.1083 15.1013 13.796C14.4969 14.4856 13.6613 14.8285 12.5944 14.8285H8.99609V0.154297H12.5944ZM13.5947 11.1024V3.86715C13.5947 3.40042 13.4861 3.03657 13.2671 2.77177C13.0481 2.50698 12.7678 2.37553 12.4245 2.37553H11.3821V12.6092H12.4245C12.7678 12.6092 13.0481 12.4778 13.2671 12.213C13.4861 11.9482 13.5947 11.5786 13.5947 11.1024Z",fill:e}),p("path",{d:"M21.5198 10.4185H20.3198V14.8285H17.9355V0.154297H21.476C22.599 0.154297 23.4749 0.485768 24.1038 1.14871C24.7327 1.81165 25.0463 2.75844 25.0463 3.99098V6.45986C25.0463 7.66001 24.7135 8.62013 24.046 9.34023C23.3803 10.0603 22.5377 10.4204 21.5181 10.4204L21.5198 10.4185ZM21.2763 8.19722C21.695 8.19722 22.0244 8.04482 22.2609 7.74002C22.4991 7.43522 22.6183 7.01231 22.6183 6.4751V4.0367C22.6183 3.49758 22.4991 3.088 22.2609 2.80225C22.0226 2.51841 21.695 2.37553 21.2763 2.37553H20.3198V8.19913H21.2763V8.19722Z",fill:e}),p("path",{d:"M33.9997 14.8285H31.6014L30.6011 9.73456H29.0454V14.8285H26.6611V0.154297H30.2314C31.3263 0.154297 32.1777 0.476243 32.7874 1.11632C33.397 1.75831 33.7018 2.69557 33.7018 3.9262V5.74358C33.7018 6.96469 33.3445 7.93814 32.6315 8.66204L34.0032 14.8266L33.9997 14.8285ZM29.0734 7.56095H29.8302C30.792 7.56095 31.272 6.99136 31.272 5.85216V4.08242C31.272 3.52425 31.1476 3.09943 30.9006 2.80987C30.6536 2.52031 30.2962 2.37553 29.8302 2.37553H29.0734V7.56095Z",fill:e})),p("defs",null,p("clipPath",{id:"clip0_6091_39399"},p("rect",{width:"34",height:"15",fill:e}))));case"ccpa":return p("svg",{width:"38",height:"15",viewBox:"0 0 38 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("g",{"clip-path":"url(#clip0_6091_39407)"},p("path",{d:"M7.95147 8.52489V11.3348C7.95147 12.5044 7.60987 13.4074 6.92866 14.0437C6.24744 14.68 5.27992 14.9981 4.02411 14.9981C2.7683 14.9981 1.74352 14.6304 1.04651 13.8951C0.349493 13.1598 0 12.1253 0 10.7899V4.19291C0 2.86703 0.349493 1.83833 1.04651 1.103C1.74352 0.367666 2.73671 0 4.02411 0C5.31151 0 6.24744 0.316231 6.92866 0.946787C7.60987 1.57925 7.95147 2.4746 7.95147 3.63284V6.19507H5.31151V3.74143C5.31151 3.28613 5.19896 2.92418 4.97386 2.65367C4.74877 2.38316 4.44271 2.24981 4.0557 2.24981C3.66869 2.24981 3.35079 2.38697 3.09805 2.66129C2.84531 2.93561 2.71894 3.29566 2.71894 3.74143V11.2414C2.71894 11.6967 2.84136 12.0625 3.08818 12.3368C3.335 12.6111 3.65092 12.7483 4.03793 12.7483C4.42494 12.7483 4.73297 12.6111 4.96399 12.3368C5.19501 12.0625 5.30954 11.6986 5.30954 11.2414V8.52489H7.94949H7.95147Z",fill:e}),p("path",{d:"M17.8323 8.52489V11.3348C17.8323 12.5044 17.4907 13.4074 16.8095 14.0437C16.1283 14.68 15.1608 14.9981 13.905 14.9981C12.6492 14.9981 11.6244 14.6304 10.9274 13.8951C10.2304 13.1598 9.88086 12.1253 9.88086 10.7899V4.19291C9.88086 2.86703 10.2304 1.83833 10.9274 1.103C11.6244 0.367666 12.6176 0 13.905 0C15.1924 0 16.1283 0.316231 16.8095 0.946787C17.4907 1.57925 17.8323 2.4746 17.8323 3.63284V6.19507H15.1924V3.74143C15.1924 3.28613 15.0798 2.92418 14.8547 2.65367C14.6296 2.38316 14.3236 2.24981 13.9366 2.24981C13.5496 2.24981 13.2317 2.38697 12.9789 2.66129C12.7262 2.93561 12.5998 3.29566 12.5998 3.74143V11.2414C12.5998 11.6967 12.7222 12.0625 12.969 12.3368C13.2159 12.6111 13.5318 12.7483 13.9188 12.7483C14.3058 12.7483 14.6138 12.6111 14.8448 12.3368C15.0759 12.0625 15.1904 11.6986 15.1904 11.2414V8.52489H17.8304H17.8323Z",fill:e}),p("path",{d:"M23.9969 10.4185H22.6444V14.8285H19.957V0.154297H23.9476C25.2133 0.154297 26.2005 0.485768 26.9094 1.14871C27.6182 1.81165 27.9717 2.75844 27.9717 3.99097V6.45986C27.9717 7.66001 27.5965 8.62013 26.8442 9.34022C26.0939 10.0603 25.1441 10.4204 23.995 10.4204L23.9969 10.4185ZM23.7225 8.19722C24.1944 8.19722 24.5656 8.04482 24.8322 7.74002C25.1007 7.43522 25.235 7.01231 25.235 6.4751V4.03669C25.235 3.49758 25.1007 3.088 24.8322 2.80225C24.5636 2.51841 24.1944 2.37553 23.7225 2.37553H22.6444V8.19913H23.7225V8.19722Z",fill:e}),p("path",{d:"M35.1825 14.8285L34.7165 11.8015L31.5138 11.771L31.03 14.8304H28.2617L31.1761 0.154297H35.1351L38.0001 14.8285H35.1845H35.1825ZM31.8672 9.58026H34.3611L33.67 5.12445L33.204 2.48412H33.0263L32.5761 5.12445L31.8672 9.58026Z",fill:e})),p("defs",null,p("clipPath",{id:"clip0_6091_39407"},p("rect",{width:"38",height:"15",fill:e}))));case"illow":return p("svg",{width:"37",height:"43",viewBox:"0 0 37 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M18.4978 28.4146C15.9771 25.5113 13.9359 22.2289 12.4475 18.6942C12.4441 18.6842 12.4308 18.6809 12.4224 18.6876C9.92511 20.5267 6.84647 22.5096 3.18652 24.3788C4.78514 28.4814 7.11876 32.2667 10.0805 35.5424C13.276 33.5813 16.1041 31.1708 18.4978 28.4146Z",fill:"url(#paint0_linear_6091_39363)"}),p("path",{d:"M34.7746 8.70016C31.9566 7.20177 29.506 5.64658 27.4196 4.16155C27.4079 4.15319 27.3946 4.16155 27.3946 4.17491V4.61424C27.3946 13.4877 24.1522 21.9051 18.4994 28.4131C16.1057 31.1694 13.2793 33.5798 10.082 35.5409C12.4942 38.2087 15.3172 40.5389 18.4994 42.4249C21.6816 40.5406 24.5047 38.2087 26.9168 35.5409C32.8653 28.961 36.2914 20.3232 36.2914 11.2025C36.2914 10.1535 35.7034 9.19127 34.7779 8.69849L34.7746 8.70016Z",fill:e}),p("path",{d:"M11.0615 14.7608C10.1126 11.5068 9.60315 8.09908 9.60315 4.61619V4.17686C9.60315 4.1635 9.58812 4.15515 9.5781 4.1635C7.48669 5.6502 5.0328 7.20873 2.20807 8.7088C1.28598 9.19824 0.708008 10.1604 0.708008 11.2044C0.708008 14.3516 1.12729 17.4369 1.90572 20.4036C1.90572 20.4036 1.90572 20.4053 1.90572 20.407C5.52893 18.5544 8.58084 16.59 11.0631 14.7658V14.7608H11.0615Z",fill:e}),p("path",{d:"M13.5826 2.42757C13.5492 2.4543 13.5158 2.4827 13.4824 2.5111V3.94768C13.4824 9.84103 15.2447 17.2278 18.5004 22.0787C21.7561 17.2278 23.5185 9.84103 23.5185 3.94768V2.5111C23.4851 2.4827 23.4517 2.45597 23.4182 2.42925C20.5568 0.0789235 16.4458 0.0789235 13.5843 2.42925L13.5826 2.42757Z",fill:e}),p("defs",null,p("linearGradient",{id:"paint0_linear_6091_39363",x1:"6.34534",y1:"20.0206",x2:"19.4651",y2:"39.9841",gradientUnits:"userSpaceOnUse"},p("stop",{"stop-color":e}),p("stop",{offset:"1","stop-color":e,"stop-opacity":"0"}))));case"cookie":return p("svg",{width:"40",height:"41",viewBox:"0 0 40 41",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("g",{"clip-path":"url(#clip0_6091_39370)"},p("path",{d:"M7.85729 35.996C9.53376 37.5422 11.4008 38.7648 13.4974 39.628C15.7949 40.5743 18.1837 41.0487 20.644 40.9958C24.9253 40.9045 28.7745 39.5115 32.1163 36.7214C34.5274 34.7081 36.3452 32.2302 37.5563 29.2992C38.5681 26.8506 39.07 24.2709 38.9921 21.6185C38.8254 15.921 36.6597 11.1552 32.4539 7.39843C30.9045 6.0144 29.1589 4.94907 27.2553 4.17392C25.8457 3.59928 24.3837 3.18766 22.8676 3.02464C22.3038 2.96432 21.7359 2.93824 21.1713 2.88037C19.4702 2.70431 18.2758 3.86989 18.1098 5.53838C18.0447 6.19453 17.7501 6.39423 17.114 6.26952C15.5264 5.95897 14.0469 7.28431 14.016 8.82647C14.0041 9.41578 14.1295 9.94722 14.4202 10.4501C15.0182 11.482 14.7831 12.7348 13.8802 13.3706C12.9145 14.0504 11.7121 13.8474 10.9624 12.8677C10.4502 12.1985 9.78391 11.8586 8.96117 11.8236C7.55631 11.7641 6.46117 12.7283 6.18401 14.18C6.08315 14.7066 5.88064 14.9111 5.35173 14.872C4.35348 14.7987 3.54503 15.1483 2.92638 15.9504C2.50231 16.5006 2.40621 17.1787 2.25453 17.8349C1.79392 19.8245 1.71848 21.8517 1.91542 23.8649C2.23626 27.1441 3.31314 30.1672 5.1937 32.8628C6.18639 34.3511 7.85888 35.996 7.85888 35.996H7.85729ZM20.8203 5.52453C21.7097 5.6362 22.5428 5.69244 23.356 5.8522C25.4828 6.26789 27.4745 7.06668 29.255 8.33578C33.4847 11.3508 35.8536 15.5078 36.2873 20.779C36.4929 23.2854 36.0967 25.7266 35.1611 28.0545C34.0946 30.7101 32.4729 32.9434 30.2636 34.7309C28.1662 36.428 25.8139 37.5243 23.1916 38.0019C21.6621 38.2807 20.1262 38.3198 18.5728 38.1388C16.7161 37.922 14.9602 37.3947 13.3004 36.5388C10.7139 35.2045 8.62604 33.289 7.04487 30.7875C5.44545 28.2558 4.60364 25.4853 4.49008 22.4785C4.43369 20.9934 4.58776 19.5311 4.92765 18.0827C5.0174 17.7004 5.12143 17.5732 5.51056 17.5879C6.61603 17.6278 7.52295 17.1535 8.16146 16.2463C8.48865 15.7825 8.67527 15.2144 8.92305 14.6984C10.8322 16.6913 13.09 17.2431 15.4192 15.5502C17.7001 13.8931 17.8978 11.5505 16.7399 8.98134C17.7906 9.10768 18.742 8.96014 19.56 8.26487C20.3716 7.57449 20.7417 6.66973 20.8187 5.52371L20.8203 5.52453Z",fill:e}),p("path",{d:"M5.92246 2.80964C5.87402 4.29148 7.04143 5.62905 8.648 5.65758C10.141 5.68366 11.3807 4.4113 11.4077 2.88055C11.4371 1.26422 10.199 -0.00487647 8.65833 1.40869e-05C7.11131 0.00490465 5.90817 1.26259 5.92326 2.80964H5.92246Z",fill:e}),p("path",{d:"M-0.999048 6.97559C-1.02367 7.73526 -0.425665 8.42075 0.397873 8.43543C1.16264 8.44928 1.79876 7.79721 1.81226 7.01227C1.82656 6.18414 1.19203 5.53369 0.402638 5.53614C-0.389929 5.53858 -1.00619 6.18332 -0.999048 6.97559Z",fill:e}),p("path",{d:"M30.1963 21.9585C28.9971 21.8631 27.8027 23.054 27.817 24.3875C27.8321 25.7593 28.9375 26.8327 30.1939 26.8433C31.4733 26.8539 32.6065 25.6981 32.5907 24.3834C32.5748 23.0882 31.5424 21.9014 30.1963 21.9585Z",fill:e}),p("path",{d:"M18.509 22.5537C17.1978 22.645 16.1289 23.487 16.1217 25.0234C16.1154 26.3626 17.1692 27.4426 18.4701 27.4459C19.7899 27.4492 20.8629 26.4743 20.8787 25.0226C20.8946 23.5889 19.805 22.5814 18.509 22.5537Z",fill:e}),p("path",{d:"M26.002 8.50569C24.6511 8.4576 23.6314 9.5645 23.5869 10.9167C23.544 12.2184 24.6964 13.3938 25.9694 13.3905C27.2059 13.3873 28.3407 12.366 28.3582 10.951C28.3749 9.59466 27.2329 8.43885 26.002 8.50569Z",fill:e}),p("path",{d:"M20.4119 16.2496C19.4923 16.2414 18.7386 17.0035 18.7204 17.9613C18.7021 18.9084 19.4994 19.7431 20.4151 19.7349C21.3006 19.7268 22.1066 18.8921 22.1074 17.9825C22.1074 17.0524 21.3299 16.2577 20.4119 16.2504V16.2496Z",fill:e}),p("path",{d:"M8.06164 26.5034C8.00128 27.4098 8.80497 28.2094 9.72936 28.2159C10.6474 28.2225 11.4519 27.3813 11.4106 26.4619C11.3669 25.4992 10.6609 24.7795 9.70713 24.773C8.81926 24.7665 7.99096 25.5644 8.06164 26.5034Z",fill:e}),p("path",{d:"M14.1843 32.8874C14.1955 33.8346 14.957 34.6032 15.8791 34.5975C16.7947 34.5918 17.577 33.7955 17.5762 32.8711C17.5762 31.924 16.786 31.1407 15.8433 31.1505C14.9165 31.1603 14.174 31.9379 14.1843 32.8874Z",fill:e}),p("path",{d:"M23.5305 30.671C23.5067 31.6483 24.3516 32.3656 25.2331 32.342C26.1877 32.3167 26.9096 31.5212 26.881 30.5056C26.8556 29.6342 26.0479 28.8648 25.1744 28.8892C24.2349 28.9153 23.4685 29.675 23.5305 30.6702V30.671Z",fill:e}),p("path",{d:"M29.8639 17.9743C29.8623 17.0084 29.1214 16.2503 28.1827 16.2544C27.2472 16.2585 26.5229 17.0222 26.5245 17.9995C26.5261 19.0111 27.2829 19.7316 28.2089 19.7226C29.1341 19.7137 29.883 18.9923 29.8639 17.9743Z",fill:e})),p("defs",null,p("clipPath",{id:"clip0_6091_39370"},p("rect",{width:"40",height:"41",fill:e,transform:"matrix(-1 0 0 1 40 0)"}))))}})(n));var St=({onClick:e,customization:t,size:s})=>p("div",{className:"flex justify-center items-center inline cursor-pointer",onClick:e},p(It,{size:s,primaryColor:t.colors.buttonBackground,secondaryColor:t.colors.background,selectedLogo:t.settings.bannerLogo,customLogoUrl:t.resources.widgetLogoUrl}));var Et=({color:e,onClick:t,highlightColors:s})=>p("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:e,xmlns:"http://www.w3.org/2000/svg",tabIndex:0,class:"cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2",onClick:t,style:{"--tw-ring-color":ht(s,1)}},p("path",{d:"M5 12H5.01M12 12H12.01M19 12H19.01M6 12C6 12.5523 5.55228 13 5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11C5.55228 11 6 11.4477 6 12ZM13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12ZM20 12C20 12.5523 19.5523 13 19 13C18.4477 13 18 12.5523 18 12C18 11.4477 18.4477 11 19 11C19.5523 11 20 11.4477 20 12Z",stroke:e,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));const kt=({active:e,color:t})=>p("span",{class:(e?"opacity-100":"opacity-0")+" ease-out duration-100 absolute inset-0 h-full w-full flex items-center justify-center transition-opacity","aria-hidden":"true"},p("svg",{style:{height:13,width:13},class:`text-[${t}]}`,fill:"currentColor",viewBox:"0 0 12 12"},p("path",{d:"M3.707 5.293a1 1 0 00-1.414 1.414l1.414-1.414zM5 8l-.707.707a1 1 0 001.414 0L5 8zm4.707-3.293a1 1 0 00-1.414-1.414l1.414 1.414zm-7.414 2l2 2 1.414-1.414-2-2-1.414 1.414zm3.414 2l4-4-1.414-1.414-4 4 1.414 1.414z"}))),Nt=({active:e})=>p("span",{class:(e?"opacity-0":"opacity-100")+" ease-in duration-200 absolute inset-0 h-full w-full flex items-center justify-center transition-opacity","aria-hidden":"true"},p("svg",{style:{height:13,width:13},class:"text-gray-400",fill:"none",viewBox:"0 0 12 12"},p("path",{d:"M4 8l2-2m0 0l2-2M6 6L4 4m2 2l2 2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})));var Ot=({colors:e,active:t,onClick:s,disabled:n,style:o,label:i,i18n:r})=>p("span",{class:"flex ml-3 items-center justify-end"},i&&p("span",{class:"option-label text-right text-xs font-medium whitespace-nowrap",data:i.toLowerCase().replace(/\s+/g,"-")},i),p("button",{class:"relative flex items-center h-6 w-12 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-400 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-offset-2",style:{"--tw-ring-color":ht(e.buttonBackground,1),backgroundColor:t?e.buttonBackground:ht(e.buttonBackground,.1),...o},onClick:n?void 0:s,type:"button",role:"switch","aria-checked":"false",disabled:n,"aria-label":"toggleOption",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),n||s())}},p("span",{class:(t?"translate-x-0":`translate-x-4 text-[${e.buttonBackground}]`)+" pointer-events-none absolute font-semibold ",style:{fontSize:"9px",color:t?e.background:e.buttonBackground}},t?r.t("COOKIE-BANNER.ON"):r.t("COOKIE-BANNER.OFF")),p("span",{class:(t?"translate-x-6":"translate-x-0")+" pointer-events-none absolute left-0 inline-block h-5 w-5 rounded-full bg-white shadow transform-gpu ring-0 transition ease-in-out duration-400"},p(Nt,{active:t}),p(kt,{active:t,color:e.buttonBackground}))));const At=(e,t)=>{const s=e.services.map((e=>({...e,value:e.id===t?!e.value:e.value})));return{value:s.some((e=>e.value)),services:s}};var xt=({cookies:e,color:t,i18n:s,setShowing:n,category:o,uiConsent:i,setUiConsent:r,disabled:a=!1})=>{const l=((e,t)=>{const s={};return t.forEach((e=>{const{service:t}=e;s[t.id]=s[t.id]||{...t,cookies:[]},s[t.id].cookies.push(e)})),Object.values(s)})(0,e);return p("div",{className:"w-full flex flex-col opacity-90 overflow-y-scroll scrollbar-hide"},p("div",{className:"w-full inline-block pt-2 align-middle"},p("div",{className:"w-full text-xs font-medium break-all grid gap-2"},l.map((e=>{var l;return p("div",{key:e.id,className:"border p-1.5 md:p-2 rounded border-solid flex justify-between items-center",style:{borderColor:ht(t.font,.1)}},p("p",{className:"font-semibold my-0 focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm",style:{color:ht(t.font,.8),"--tw-ring-color":ht(t.buttonBackground,1)},tabIndex:0},e.name||s.t("COOKIE-BANNER.CONFIG.COOKIE_TYPE.COOKIES_SERVICES.OTHER")),p("div",{className:"flex"},p("div",{className:"-mr-3 focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm",tabIndex:0,style:{"--tw-ring-color":ht(t.buttonBackground,1)},onKeyDown:t=>((e,t)=>{"Enter"===e.key&&(e.preventDefault(),n("service",{service:t}))})(t,e)},p(Et,{highlightColors:t.buttonBackground,color:t.font,onClick:()=>n("service",{service:e})})),p(Ot,{style:{scale:"80%"},colors:t,active:(null===(l=i[o].services.find((t=>t.id===e.id)))||void 0===l?void 0:l.value)||!1,onClick:()=>r((t=>({...t,[o]:At(t[o],e.id)}))),disabled:a,i18n:s})))})))))};var Lt=({color:e,cookies:t,i18n:s,setShowing:n,disabled:o,category:i,uiConsent:r,setUiConsent:a})=>{const[l,c]=J(!0);return p("div",null,t.length>0&&p("div",{className:"pt-1 duration-700 "},p("div",{className:"cursor-pointer",onClick:()=>c((e=>!e))},p("span",{className:"relative font-semibold inline-flex items-center ltr:mr-1 rtl:ml-1 border-none text-xs",style:{color:e.buttonBackground}},s.t("COOKIE-BANNER.CONFIG.COOKIE_TYPE.COOKIES_SERVICES.LABEL"))),p("div",{className:"transition-opacity duration-700 "+(l?"opacity-100":"opacity-0 pointer-events-none")},l&&p(xt,{cookies:t,color:e,i18n:s,setShowing:n,category:i,uiConsent:r,setUiConsent:a,disabled:o}))))};var Bt=({customization:e,i18n:t,id:s,cookies:n,setShowing:o,disabled:i,uiConsent:r,setUiConsent:a,description:l})=>{return p("div",{className:"flex flex-col w-full pt-1 px-3 text-xs option-info"},p("span",{className:"my-2"},null!=l?l:t.t(`COOKIE-BANNER.CONFIG.COOKIE_TYPE.${s.toUpperCase()}.DESCRIPTION`)),p(Lt,{i18n:t,color:e.colors,cookies:(c=s,n.filter((e=>e.category.toLowerCase()===c))),setShowing:o,category:s,disabled:i,uiConsent:r,setUiConsent:a}));var c};var Tt=({color:e,opened:t,className:s})=>p("svg",{class:`transform ${s||"h-2 w-2"} ${t?"rotate-90":""}`,viewBox:"0 0 320 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z",fill:e}));var Rt=({customization:e,i18n:t,label:s,switches:n,renderSwitchLabel:o=!0,className:i,children:r,showInline:a})=>{const{colors:l}=e,c=["squaredLeft","squaredRight"].includes(e.settings.positioning),[d,u]=J(!1),h=Array.isArray(n)||void 0===n?n:[n];return p("div",{className:`flex-wrap w-full focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm relative ${i||""}`},p("div",{className:"w-full flex items-center justify-between "+(a?"":"flex-col")},p("div",{className:"flex cursor-pointer w-full justify-start items-center focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm",onClick:()=>u((e=>!e)),tabIndex:0,style:{"--tw-ring-color":ht(e.colors.buttonBackground,1)},onKeyDown:e=>(e=>{"Enter"===e.key&&(e.preventDefault(),u((e=>!e)))})(e)},p("div",{className:"flex items-start mr-2"},p(Tt,{color:l.font,opened:d,className:"h-3 w-3"})),p("div",{className:"text-sm md:text-md font-medium text-left",style:{color:l.font}},s)),h&&h.length>0&&p("div",{className:`flex w-full justify-end ${c&&"flex-col "}`},h.map((({id:e,isActive:s,onClick:n,disabled:i})=>p(Ot,{label:o?t.t(`COOKIE-BANNER.BANNER.BUTTONS.${e.toUpperCase()}`):void 0,style:{scale:"80%"},colors:l,active:s,onClick:n,disabled:i,i18n:t}))))),r&&p("div",{className:(d?"max-h-fit":"max-h-0")+" ltr:pl-2 trl:pr-2 flex flex-col w-full transition-height ease-in-out duration-400 ",style:{color:ht(l.font,.6)}},d&&r))};const Pt=(e,t)=>({value:e,services:(null==t?void 0:t.services.map((t=>({...t,value:e}))))||[]}),Vt=(e,t)=>({preferences:Pt(e,t.preferences),statistics:Pt(e,t.statistics),marketing:Pt(e,t.marketing)}),Mt=[{id:"necessary",disabled:!0},{id:"statistics"},{id:"preferences"},{id:"marketing"}];var Dt=({uiConsent:e,customization:t,i18n:s,cookies:n,setUiConsent:o,setShowing:i})=>{const r=((e,t,s)=>Mt.map((({id:n,disabled:o})=>({id:n,label:e.t(`COOKIE-BANNER.CONFIG.COOKIE_TYPE.${n.toUpperCase()}.LABEL`),switches:{id:"consent",isActive:t[n].value,onClick:()=>s((e=>({...e,[n]:Pt(!e[n].value,e[n])}))),disabled:o}}))))(s,e,o);return p("div",{className:"grid gap-2 w-full py-2 "},r.map((r=>{var a,l;return p("div",{className:"w-full flex flex-wrap rounded border border-solid p-1.5 md:p-2",style:{borderColor:ht(t.colors.font,.1),backgroundColor:ht(t.colors.buttonBackground,.03)}},p(Rt,{customization:t,i18n:s,renderSwitchLabel:!1,label:r.label,switches:r.switches,showInline:!0},p(Bt,{id:r.id,i18n:s,customization:t,cookies:n,setShowing:i,disabled:r.switches.disabled,uiConsent:e,setUiConsent:o,description:null===(a=t.messages)||void 0===a||null===(l=a.bannerMessages)||void 0===l?void 0:l[r.id]})))})))};var Ut=({customization:e,i18n:t,onAccept:s,onReject:n,onSubmit:o,customStyles:i,isSquaredLeftOrRight:r})=>{const{colors:a,bannerType:l}=e,c="gdprBanner"===l;return p("div",{className:"w-full mt-2"},p("div",{className:"flex justify-center"},c&&!r&&p(vt,{id:Ct.submit,borderRadius:i.buttonBorderRadius[e.settings.positioning],className:"flex-1 ltr:mr-3 rtl:ml-3 ltr:md:mr-5 rtl:md:ml-5 py-3",backgroundColor:a.buttonBackground,color:a.background,onClick:o,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.CONFIG.BUTTONS.SUBMIT")),p(vt,{id:c?Ct.submit:Ct.reject,borderRadius:i.buttonBorderRadius[e.settings.positioning],className:"flex-1 ltr:mr-3 rtl:ml-3 ltr:md:mr-5 rtl:md:ml-5 py-3",backgroundColor:c?a.buttonBackground:ht(a.buttonBackground,.2),color:c?a.background:a.buttonBackground,onClick:c?n:o,highlightColors:a.buttonBackground},t.t(c?"COOKIE-BANNER.BANNER.BUTTONS.REJECT_ALL":"COOKIE-BANNER.CONFIG.BUTTONS.SUBMIT")),p(vt,{id:Ct.accept,borderRadius:i.buttonBorderRadius[e.settings.positioning],className:"flex-1 py-3",backgroundColor:a.buttonBackground,color:a.background,onClick:s,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.CONFIG.BUTTONS.ACCEPT_ALL_COOKIES"))),c&&r&&p(vt,{id:Ct.submit,borderRadius:i.buttonBorderRadius[e.settings.positioning],className:"w-full mt-3 py-3",backgroundColor:a.buttonBackground,color:a.background,onClick:o,highlightColors:a.buttonBackground},t.t("COOKIE-BANNER.CONFIG.BUTTONS.SUBMIT")),!e.settings.hideAdvancedPoweredBy&&p("div",{className:"w-full flex justify-end mt-3 md:mt-4"},p(pt,{highlightColors:a.buttonBackground,fontColor:a.font,poweredByUrl:e.urls.poweredByUrl})))};const $t=(e,t)=>({necessary:e.necessary,preferences:e.preferences,marketing:e.marketing,statistics:e.statistics,iabConsent:{purposeConsents:(null==t?void 0:t.purposeConsents)||new Set,purposeLegitimateInterests:(null==t?void 0:t.purposeLegitimateInterests)||new Set,specialFeatureOptins:(null==t?void 0:t.specialFeatureOptins)||new Set,vendorConsents:(null==t?void 0:t.vendorConsents)||new Set,vendorLegitimateInterests:(null==t?void 0:t.vendorLegitimateInterests)||new Set,googleVendors:(null==t?void 0:t.googleVendors)||new Set}});var zt=(e,t)=>{const[s,n]=J((()=>$t(e,t)));return{uiConsent:s,setUiConsent:n}};function Ft({colors:e,onSelect:t,currentTab:s,tabs:n}){return p("div",{className:"block justify-start w-full "},p("div",{className:"border-gray-200"},p("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs"},n.map((({name:n,id:o})=>p("a",{tabIndex:0,key:n,onClick:()=>t(o),onKeyDown:e=>((e,s)=>{"Enter"===e.key&&(e.preventDefault(),t(s))})(e,o),className:"group focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm inline-flex items-center pt-3 pb-2 px-1 text-xs font-medium cursor-pointer "+(s===o?`border-${e.buttonBackground} border-solid`:`hover:text-${e.buttonBackground} border-transparent`),"aria-current":s===o||void 0,style:{color:s===o?e.buttonBackground:e.font,borderBottomWidth:s===o?2:0,borderTopWidth:"0",borderRightWidth:"0",borderLeftWidth:"0","--tw-ring-color":ht(e.buttonBackground,1)}},p("span",{className:s===o&&`border-${e} text-${e}`},n)))))))}var Kt=({i18n:e,purpose:t,customization:s})=>p("div",{className:"flex flex-col w-full p-3 text-xs option-info border border-solid rounded",style:{borderColor:ht(s.colors.font,.2),color:ht(s.colors.font,.5)}},p("p",{className:"text-xs my-0"},t.description),p("p",{className:"text-xs italic mt-3 mb-2"},e.t("COOKIE-BANNER.IAB.PURPOSES.ILLUSTRATIONS")),p("ul",{className:"my-0"},t.illustrations.map((e=>p("li",{className:"text-xs",key:e},e)))),p("div",{className:"text-xs italic mt-3"},e.t("COOKIE-BANNER.IAB.PURPOSES.NUMBER_OF_VENDORS",{vendors:t.vendors})));var Ht=({customization:e,i18n:t,title:s,description:n,values:o,renderSwitchLabel:i,children:r})=>{const a=o.map((s=>p(Rt,{className:"my-2",customization:e,i18n:t,renderSwitchLabel:i,label:s.label,switches:s.switches},r(s))));return p("div",{className:"w-full flex flex-wrap rounded border border-solid p-1.5 md:p-2 ",style:{borderColor:ht(e.colors.font,.1),backgroundColor:ht(e.colors.buttonBackground,.03),"--tw-ring-color":ht(e.colors.buttonBackground,1)}},s&&p(Rt,{customization:e,i18n:t,renderSwitchLabel:!1,label:s},p("span",{className:"text-xs"},n),a),!s&&a)};const jt=(e,t,s,n,o)=>({id:e,isActive:n[s].has(t),onClick:()=>o((e=>(e.iabConsent[s].has(t)?e.iabConsent[s].delete(t):e.iabConsent[s].add(t),{...e})))}),Gt=(e,t,s,n)=>{const o=[];return t.legIntConsent&&e&&e.legInt&&o.push(jt("legitimate_interest",t.id,e.legInt,s,n)),t.consent&&e&&o.push(jt("consent",t.id,e.consent,s,n)),o};var Wt=(e,t,s,n)=>t.map((t=>({...t,label:t.name,switches:Gt(e,t,s,n)})));const qt=["purposes","features","specialFeatures","specialPurposes"],Zt={purposes:{consent:"purposeConsents",legInt:"purposeLegitimateInterests"},specialFeatures:{consent:"specialFeatureOptins"}};var Yt=({customization:e,i18n:t,setUiConsent:s,uiConsent:n,iabContent:o})=>p("div",{className:"grid gap-2 w-full py-2 focus:outline-none",tabIndex:0},qt.map((i=>p(Ht,{customization:e,i18n:t,title:t.t(`COOKIE-BANNER.IAB.PURPOSES.${i.toUpperCase()}_TITLE`),values:Wt(Zt[i],o[i],n,s)},(s=>p(Kt,{i18n:t,purpose:s,customization:e}))))));var Qt=function(e){return e/86400};var Jt=({links:e,content:t,i18n:s,translationKey:n})=>p(f,null,t&&e.map((e=>t.urls[0][e]&&p("div",{className:"inline-flex my-2 items-start whitespace-normal"},p("p",{className:"text-left my-0 mr-1 italic whitespace-nowrap"},s.t(`${n}${e.toUpperCase()}`)),p("a",{"aria-label":e,className:"text-left whitespace-normal truncate",target:"_blank",href:t.urls[0][e]},t.urls[0][e])))));var Xt=({vendor:e,i18n:t,customization:s})=>{const n="COOKIE-BANNER.IAB.VENDORS.ITEMS.TITLE.",o="COOKIE-BANNER.IAB.VENDORS.SUBITEMS",i=[];e.usesCookies&&i.push(t.t(`${o}.DESCRIPTION.USECOOKIES`)),e.usesNonCookieAccess&&i.push(t.t(`${o}.DESCRIPTION.USEOTHERS`));const r=[{key:"usesCookies",content:`${t.t(`${o}.TITLE.DEVSTOROVER`)}\n ${i.length>0?i.join(t.t(`${o}.DESCRIPTION.AND`)):t.t(`${o}.DESCRIPTION.NONE`)}`},{key:"cookieMaxAgeSeconds",content:`${t.t(`${o}.TITLE.MAXDUR`)}\n ${t.t(`${o}.DESCRIPTION.DAYS`,{days:Math.ceil(Qt(e.cookieMaxAgeSeconds))})}`},{key:"cookieRefresh",content:`${e.cookieRefresh?t.t(`${o}.DESCRIPTION.COOKIEREFHESH`):t.t(`${o}.DESCRIPTION.COOKIENOTREFHESH`)}`}],{colors:a}=s;return p("div",{className:"flex flex-col w-full p-3 text-xs option-info border border-solid rounded",style:{borderColor:ht(a.font,.2),color:ht(a.font,.5)}},p(Jt,{translationKey:n,i18n:t,links:["privacy","legIntClaim"],content:e}),p("div",{className:"inline-flex my-2 items-start"},p("p",{className:"italic my-0 mr-1"},t.t(`${n}DATRETPERIOD`)),p("p",{className:"my-0"},t.t(`${o}.DESCRIPTION.DAYS`,{days:Math.ceil(Qt(e.cookieMaxAgeSeconds))}))),["purposes","legIntPurposes","specialPurposes","features","dataDeclaration"].map((s=>e[s]&&e[s].length>0&&p("div",{className:"my-2 items-start"},p("p",{className:"italic my-0 mr-1"},t.t(`${n}${s.toUpperCase()}`)),p("ul",{className:"my-0"},e[s].map((e=>p("li",{key:e.id},e.name))))))),p("div",{className:"my-2 items-start"},p("p",{className:"italic my-0"},t.t(`${n}DEVSTOROVER`)),p("ul",{className:"my-0"},r.map((e=>p("li",{key:e.key},e.content))))))};var es=({vendor:e,i18n:t,customization:s})=>{const{colors:n}=s;return p("div",{className:"flex flex-col w-full p-3 text-xs option-info border border-solid rounded",style:{borderColor:ht(n.font,.2),color:ht(n.font,.5)}},p("div",{className:"inline-flex my-2 items-start whitespace-normal"},p("p",{className:"text-left my-0 mr-1 italic whitespace-nowrap"},t.t("COOKIE-BANNER.IAB.VENDORS.ITEMS.TITLE.PRIVACY")),p("a",{"aria-label":"privacy",className:"text-left whitespace-normal truncate",target:"_blank",href:e.policyUrl},e.policyUrl)))};const ts={consent:"vendorConsents",legInt:"vendorLegitimateInterests"},ss={consent:"googleVendors"};var ns=({customization:e,i18n:t,setUiConsent:s,uiConsent:n,iabContent:o})=>p("div",{className:"grid gap-2 w-full py-2",tabIndex:0},p(Ht,{customization:e,i18n:t,title:t.t("COOKIE-BANNER.IAB.VENDORS.SWITCH-ROW_TITLE.IAB",{numVendors:o.vendors.length}),description:t.t("COOKIE-BANNER.IAB.VENDORS.SWITCH-ROW_DESCRIPTION.IAB"),values:Wt(ts,o.vendors,n,s)},(s=>p(Xt,{i18n:t,vendor:s,customization:e}))),p(Ht,{customization:e,i18n:t,title:t.t("COOKIE-BANNER.IAB.VENDORS.SWITCH-ROW_TITLE.GOOGLE",{numVendors:o.googleVendors.length}),description:t.t("COOKIE-BANNER.IAB.VENDORS.SWITCH-ROW_DESCRIPTION.GOOGLE"),values:Wt(ss,o.googleVendors,n,s)},(s=>p(es,{i18n:t,vendor:s,customization:e}))));var os=(e,t)=>{const s=[{id:"cookies",name:t.t("COOKIE-BANNER.COOKIES.TAB_TITLE")},{id:"purposes",name:t.t("COOKIE-BANNER.IAB.PURPOSES.ACCORDION_TITLE")},{id:"vendors",name:t.t("COOKIE-BANNER.IAB.VENDORS.ACCORDION_TITLE")}];return!e||0===e.vendors.length&&0===e.googleVendors.length?[s[0]]:s};var is=({bigger:e,src:t,fontColor:s})=>p("div",{className:"flex flex-col w-full items-start"},p("img",{src:t,alt:"main logo",width:e?"45%":"30%"}),p("div",{className:"w-full h-px my-3 ",style:{backgroundColor:ht(s,.15)}}));var rs=({customization:e,i18n:t,onAccept:s,onReject:n,onSubmit:o,cookies:i,consent:r,customStyles:a,iabContent:l,iabConsent:c,setShowing:d})=>{var u;const{uiConsent:h,setUiConsent:g}=zt(r,c),f=e.settings.positioning,m=os(l,t),[v,C]=J("cookies"),{colors:y}=e,_={cookies:p(Dt,{cookies:i,customization:e,setUiConsent:g,uiConsent:h,i18n:t,setShowing:d}),purposes:p(Yt,{uiConsent:h.iabConsent,iabContent:l,customization:e,setUiConsent:g,i18n:t}),vendors:p(ns,{uiConsent:h.iabConsent,iabContent:l,customization:e,setUiConsent:g,i18n:t})},w=["squaredLeft","squaredRight"].includes(e.settings.positioning);return p("div",{class:"w-full flex flex-col mx-auto items-center relative"},(null===(u=e.resources)||void 0===u?void 0:u.mainLogoUrl)&&p(is,{src:e.resources.mainLogoUrl,bigger:w,fontColor:e.colors.font}),p(je,{colors:y},t.t("COOKIE-BANNER.CONFIG.TITLE")),p("div",{className:"w-full text-gray-900 text-sm font-medium mt-2",style:{color:y.font}},t.t("COOKIE-BANNER.BANNER.SUBTITLE"),p(mt,{className:a.linksMargin(f),customization:e,i18n:t,onCookiePolicy:()=>d("cookiePolicy"),showGoogleLink:!0})),p(Ft,{colors:y,onSelect:C,currentTab:v,tabs:m}),p("div",{className:"w-full h-px mb-1",style:{backgroundColor:ht(e.colors.font,.2)}}),p("div",{className:"w-full flex flex-col mx-auto items-center relative"},_[v]),p(Ut,{customization:e,onAccept:s,onReject:n,onSubmit:()=>o(h),customStyles:a,i18n:t,isSquaredLeftOrRight:w}))};const as={};const ls="https://api.platform.illow.io/public";const cs=ls.replace(/\/$/,""),ds=async(e,t)=>{try{const s=`${cs}/${e.replace(/^\//,"")}`,n=await fetch(s,t),o=await n.json();return{status:n.status,body:n.status<400?o:void 0,error:n.status>=400?o.error:void 0}}catch(e){return{status:503,error:"Server down",body:e}}},us=async(e,t)=>{return n=()=>ds(e,t),as[s=e]||(as[s]=n()),as[s];var s,n},hs=async(e,t,s=!1)=>ds(e,{body:JSON.stringify(t),headers:{Accept:"application/json","Content-Type":"application/json"},method:s?"PUT":"POST"}),ps=(e,t,s)=>{const n=null==s?void 0:s.match(e);return n&&0!==n.length?n[0]:t};var gs=({color:e,className:t,style:s})=>p("div",{role:"status",className:t,style:s},p("svg",{"aria-hidden":"true",className:`${ps(/w-[^ ]+/,"w-8",t)} ${ps(/h-[^ ]+/,"h-8",t)} mr-2 text-gray-200 animate-spin`,style:{fill:e},viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),p("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})));var fs=({siteId:e,customization:t,i18n:s})=>{const{colors:n,settings:o}=t,[i,r]=J(void 0);return ee((()=>{i||us(`/policy/cookie/${e}?lng=${s.language}`).then((e=>{var t;const s=null===(t=e.body)||void 0===t?void 0:t.policy.replace(/

p("svg",{width:"18",height:"18",viewBox:"0 0 25 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mr-2"},p("g",{filter:"url(#filter0_d_9321_15442)"},p("rect",{x:"2.5",y:"2.5",width:"20",height:"20",rx:"10",fill:e}),p("path",{d:"M15.5 10.5L11.5 14.5L9.5 12.5",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),p("defs",null,p("filter",{id:"filter0_d_9321_15442",x:"-0.5",y:"0.5",width:"26",height:"26",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},p("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),p("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p("feOffset",{dy:"1"}),p("feGaussianBlur",{stdDeviation:"1.5"}),p("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0627451 0 0 0 0 0.72549 0 0 0 0 0.505882 0 0 0 0.5 0"}),p("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_9321_15442"}),p("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_9321_15442",result:"shape"}))));var vs=({customization:e,i18n:t,onSubmitDoNotSell:s,onCookiePolicy:n,customStyles:o,consent:i})=>{var r;const[a,l]=J(!i.optedIn),{colors:c,settings:d,urls:u}=e,h=["squaredLeft","squaredRight"].includes(e.settings.positioning);return p("div",{class:"w-full flex flex-col mx-auto items-left relative"},(null===(r=e.resources)||void 0===r?void 0:r.mainLogoUrl)&&p(is,{src:e.resources.mainLogoUrl,bigger:h,fontColor:e.colors.font}),p(je,{colors:c},t.t("COOKIE-BANNER.DO_NOT_SELL_SECTION.TITLE")),p("span",{className:"option-label text-xs font-medium mt-2 text-justify",style:{color:c.font}},t.t("COOKIE-BANNER.DO_NOT_SELL_SECTION.SUBTITLE_1")," ",u.privacyPolicy&&""!==u.privacyPolicy?p(ft,{className:"mx-0",url:u.privacyPolicy,color:c.buttonBackground,onClick:()=>{return e="CLICKED_POLICY",localStorage.setItem(e,"true");var e},label:t.t("COOKIE-BANNER.BANNER.LINKS.PRIVACY_POLICY")}):p("span",null,t.t("COOKIE-BANNER.BANNER.LINKS.PRIVACY_POLICY")),d.showCookiePolicyUrl?p("span",null," ",t.t("COOKIE-BANNER.COMMON.AND")," ",p(ft,{url:u.cookiePolicy,color:c.buttonBackground,label:t.t("COOKIE-BANNER.BANNER.LINKS.COOKIE_POLICY"),onClick:u.cookiePolicy?void 0:n})):""," ",t.t("COOKIE-BANNER.DO_NOT_SELL_SECTION.SUBTITLE_2"),u.dsrForm&&""!==u.dsrForm&&e.settings.showDSRUrl?p("span",null," ",t.t("COOKIE-BANNER.DO_NOT_SELL_SECTION.SUBTITLE_THIS_FORM")," ",p(ft,{url:u.dsrForm,color:c.buttonBackground,label:t.t("COOKIE-BANNER.DO_NOT_SELL_SECTION.THIS_FORM")})):""),i.gpc&&p("div",{className:"flex items-center justify-start mt-4 flex-wrap w-full"},p(ms,{background:c.buttonBackground,checkedColor:c.background}),p("span",{className:"option-label text-xs font-bold",style:{color:c.font}},t.t("COOKIE-BANNER.DO_NOT_SELL_SECTION.GPC.LABEL"))),p("div",{className:"flex items-center justify-between my-4 flex-wrap w-full relative"},p("span",{className:"option-label text-xs font-bold",style:{color:c.font}},t.t("COOKIE-BANNER.DO_NOT_SELL_SECTION.TOGGLE")),p(Ot,{i18n:t,colors:c,active:a,onClick:()=>l((e=>!e))})),p("div",{className:"w-full flex"},p(vt,{id:Ct.submit,className:"flex-1",borderRadius:o.buttonBorderRadius[d.positioning],backgroundColor:c.buttonBackground,color:c.background,onClick:()=>s(a),highlightColors:c.buttonBackground},t.t("COOKIE-BANNER.CONFIG.BUTTONS.SAVE"))),p("div",{class:"w-full flex justify-end mt-3 md:mt-4"},d.showPoweredBy&&p(pt,{highlightColors:c.buttonBackground,fontColor:c.font,poweredByUrl:e.urls.poweredByUrl})))};var Cs=({backgroundColor:e,color:t,onClick:s})=>p("div",{className:"cursor-pointer absolute top-4 right-4 z-50 flex justify-center h-4 w-4 items-center p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 ",style:{backgroundColor:ht(e,.1),color:t,"--tw-ring-color":ht(e,1)},onClick:s,tabIndex:0,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),s())}},p("svg",{className:"h-3 w-3",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("g",{id:"times-solid","clip-path":"url(#clip0)"},p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.00001 7.19185L10.6564 11.8483C10.8587 12.0506 11.1866 12.0506 11.3888 11.8483L11.8483 11.3888C12.0506 11.1866 12.0506 10.8587 11.8483 10.6564L7.19185 6.00001L11.8483 1.34356C12.0506 1.14132 12.0506 0.813424 11.8483 0.611172L11.3888 0.151681C11.1866 -0.0505603 10.8587 -0.0505603 10.6564 0.151681L6.00001 4.80813L1.34356 0.151681C1.14132 -0.0505603 0.813424 -0.0505603 0.611172 0.151681L0.151681 0.611172C-0.0505603 0.813424 -0.0505603 1.14132 0.151681 1.34356L4.80813 6.00001L0.151681 10.6564C-0.0505603 10.8587 -0.0505603 11.1866 0.151681 11.3888L0.611172 11.8483C0.813424 12.0506 1.14132 12.0506 1.34356 11.8483L6.00001 7.19185Z",fill:t})),p("defs",null,p("clipPath",{id:"clip0"},p("rect",{width:"352",height:"512",fill:ht(e,.1)})))));const ys=({customization:e,i18n:t,showing:s})=>p("div",{className:"border p-1.5 md:p-2 rounded border-solid gap-2 mt-3",style:{borderColor:ht(e.colors.font,.1)}},p("p",{style:{color:ht(e.colors.font,.5)},className:"mt-0 text-sm"},t.t("COOKIE-BANNER.SERVICE.STORED-INFORMATION.TITLE")),s.args.service.cookies.map((s=>p("div",{className:"border flex flex-col"},p("p",{className:"font-normal mt-0 mb-1 text-sm",style:{color:e.colors.font}},s.name),s.description&&p("span",{className:"mb-1 text-xs",style:{color:e.colors.font}},s.description),s.domain&&p("span",{className:"mb-1 text-xs",style:{color:ht(e.colors.font,.5)}},t.t("COOKIE-BANNER.SERVICE.STORED-INFORMATION.DOMAIN"),":"," ",s.domain),s.expires&&p("span",{className:"mb-1 text-xs",style:{color:ht(e.colors.font,.5)}},t.t("COOKIE-BANNER.SERVICE.STORED-INFORMATION.DURATION"),": ",s.expires))))),_s=({customization:e,i18n:t,showing:s})=>{const{service:n}=s.args;return p("div",{className:"border p-1.5 md:p-2 rounded border-solid gap-2",style:{borderColor:ht(e.colors.font,.1)}},p("p",{style:{color:ht(e.colors.font,.5)},className:"mt-0 text-sm"},t.t("COOKIE-BANNER.STORED-INFORMATION.DESCRIPTION")),p("div",{className:"border flex flex-col"},p("p",{className:"font-normal mt-0 mb-1 text-sm",style:{color:e.colors.font}},n.description),n.domain&&p("span",{className:"mb-1 text-xs",style:{color:ht(e.colors.font,.5)}},n.domain)))},ws=({customization:e,message:t,information:s})=>p("div",{className:"border p-1.5 md:p-2 rounded border-solid gap-2 mt-3",style:{borderColor:ht(e.colors.font,.1)}},p("p",{style:{color:ht(e.colors.font,.5)},className:"mt-0 text-sm"},t),p("div",{className:"border flex flex-col"},p("p",{className:"font-normal mt-0 mb-1 text-sm",style:{color:e.colors.font}},s)));var bs=({customization:e,i18n:t,onAccept:s,onReject:n,onSubmit:o,consent:i,customStyles:r,iabConsent:a,back:l,showing:c})=>{var d;const{colors:u}=e,h=["squaredLeft","squaredRight"].includes(e.settings.positioning);return p("div",{class:"w-full flex flex-col mx-auto items-center relative"},(null===(d=e.resources)||void 0===d?void 0:d.mainLogoUrl)&&p("div",{className:"flex flex-col w-full items-start"},p("img",{src:e.resources.mainLogoUrl,alt:"main logo",width:h?"60%":"45%"}),p("div",{className:"w-full h-px my-3 ",style:{backgroundColor:ht(e.colors.font,.15)}})),p(je,{colors:u},t.t("COOKIE-BANNER.CONFIG.TITLE")),p("div",{className:"w-full text-gray-900 text-sm font-medium mt-2 mb-3",style:{color:u.font}},t.t("COOKIE-BANNER.BANNER.SUBTITLE")),p("div",{className:"w-full pb-2 mb-2 flex flex-wrap rounded border border-solid items-center",style:{borderColor:ht(e.colors.font,.1),backgroundColor:ht(e.colors.buttonBackground,.03)}},p("div",{className:"w-full flex px-2 py-3 items-center cursor-pointer ",onClick:l,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),l())}},p(Tt,{className:"rotate-180 mr-1 h-3 w-3 font-bold",color:ht(e.colors.font,.6)}),p("p",{style:{color:ht(e.colors.font,.5),"--tw-ring-color":ht(e.colors.buttonBackground,1)},className:"my-0 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm",tabIndex:0},t.t("COOKIE-BANNER.COMMON.BACK"))),p("div",{className:"w-full font-normal break-all grid gap-3 px-6"},p("p",{style:{color:e.colors.font},className:"m-0 text-sm font-bold"},c.args.service.name),function(e,t,s){const{service:n}=s.args;return p("div",null,n.description&&p(_s,{customization:e,i18n:t,showing:s}),n.processingCompanyName&&p(ws,{customization:e,message:t.t("COOKIE-BANNER.STORED-INFORMATION.COMPANY-NAME"),information:n.processingCompanyName}),n.processingCompanyLocation&&p(ws,{customization:e,message:t.t("COOKIE-BANNER.STORED-INFORMATION.LOCATION-HQ"),information:n.processingCompanyLocation}),Array.isArray(n.DTOProbableEmails)&&n.DTOProbableEmails.length>0&&p(ws,{customization:e,message:t.t("COOKIE-BANNER.STORED-INFORMATION.PRIVACY-CONTACT"),information:n.DTOProbableEmails.shift()}),n.privacyPolicyURL&&p(ws,{customization:e,message:t.t("COOKIE-BANNER.STORED-INFORMATION.PRIVACY-URL"),information:n.privacyPolicyURL}),p(ys,{customization:e,i18n:t,showing:s}))}(e,t,c))),p(Ut,{customization:e,onAccept:s,onReject:n,onSubmit:()=>o($t(i,a)),customStyles:r,i18n:t,isSquaredLeftOrRight:h}))};var Is=({siteId:e,enablePermissions:t,customization:s,i18n:n,cookies:o,consent:i,showing:r,setShowing:a,back:l,logoSize:c,maxContentHeight:d,myRef:u,iabContent:h,iabConsent:g})=>{if("circledLogo"===r.showing)return p(St,{myRef:u,size:c,customization:s,onClick:()=>a("banner")});const f={bannerType:s.bannerType,positioning:s.settings.positioning,blured:s.settings.showBlurBackground,poweredBy:s.settings.showPoweredBy,iabActivated:h&&(h.googleVendors.length>0||h.vendors.length>0)},m={purposeConsents:new Set,purposeLegitimateInterests:new Set,specialFeatureOptins:new Set,vendorConsents:new Set,vendorLegitimateInterests:new Set,googleVendors:new Set},v=e=>{const{iabConsent:s,...n}=e;t({...n,consentDataAnalitycs:f},void 0,s),a("circledLogo")},C=()=>v({...Vt(!0,i),iabConsent:{addAll:!0}}),y=()=>v({...Vt(!1,i),iabConsent:m}),_={banner:()=>a("circledLogo"),customPermissions:()=>a("banner"),cookiePolicy:()=>l(),doNotSell:()=>a("banner"),service:()=>a("customPermissions")},w=ze();return p("div",{ref:u,className:"w-full py-2 px-3 md:px-16"},p("div",{className:"w-full p-[16px] md:p-[20px] shadow-md relative overflow-y-auto",style:{backgroundColor:s.colors.background,color:s.colors.font,fontFamily:"'Inter', sans-serif",borderRadius:w.bannerBorderRadius[s.settings.positioning],maxHeight:d-32}},!("banner"===r.showing&&("fullyCompliantBanner"===s.bannerType||"gdprBanner"===s.bannerType&&s.settings.hideCloseOption))&&p(Cs,{backgroundColor:s.colors.buttonBackground,color:s.colors.buttonBackground,onClick:_[r.showing]}),"banner"===r.showing&&p(bt,{customStyles:w,bannerType:s.bannerType,customization:s,iabContent:h,i18n:n,onConfig:()=>a("customPermissions"),onDoNotSellMyData:()=>a("doNotSell"),onCookiePolicy:()=>a("cookiePolicy"),onAccept:C,onReject:y}),"customPermissions"===r.showing&&p(rs,{customStyles:w,cookies:o,iabContent:h,iabConsent:g,consent:i,customization:s,i18n:n,onAccept:C,onReject:y,onSubmit:v,setShowing:a}),"service"===r.showing&&p(bs,{customStyles:w,iabConsent:g,consent:i,customization:s,i18n:n,onAccept:C,onReject:y,onSubmit:v,back:l,showing:r}),"cookiePolicy"===r.showing&&p(fs,{customStyles:w,siteId:e,customization:s,i18n:n}),"doNotSell"===r.showing&&p(vs,{customStyles:w,cookies:o,consent:i,customization:s,i18n:n,onSubmitDoNotSell:e=>{t({optedIn:!e,consentDataAnalitycs:f}),a("circledLogo")},onCookiePolicy:()=>a("cookiePolicy")})))};var Ss=({onLoad:e=(()=>{}),cssUrl:t})=>p(f,null,p("link",{onLoad:e,rel:"stylesheet",href:"https://platform.illow.io/banner.css"}),t&&p("link",{onLoad:e,rel:"stylesheet",href:t}),p("div",{style:{fontFamily:"'Inter', sans-serif",position:"absolute"}}," "));let Es;var ks;(ks=Es||(Es={})).dispatchWidgetReady=e=>{window.dispatchEvent(new CustomEvent("illow:widget_ready",{detail:{isOpen:e.isOpen,hasPreviousConsent:e.hasPreviousConsent,gpc:e.gpc,bannerType:"fullyCompliantBanner"===e.customization.bannerType?"global":e.customization.bannerType,isIabEnabled:!!e.isIabEnabled,uiSettings:{positioning:e.customization.settings.positioning,isIconEnabled:"none"!==e.customization.settings.showCircledWidget&&"link"!==e.customization.settings.showCircledWidget,isNoticeMode:e.customization.settings.hideBanner,isBlurBackgroundEnabled:e.customization.settings.showBlurBackground,language:e.language}}}))},ks.dispatchWidgetOpened=()=>{window.dispatchEvent(new CustomEvent("illow:widget_opened"))},ks.dispatchWidgetClosed=()=>{window.dispatchEvent(new CustomEvent("illow:widget_closed"))},ks.dispatchWidgetRefreshed=()=>{window.dispatchEvent(new CustomEvent("illow:widget_refreshed"))},ks.dispatchConsentSet=e=>{window.dispatchEvent(new CustomEvent("illow:consent_set",{detail:{"consent-id":e["consent-id"],userId:e.userId,marketing:e.marketing,preferences:e.preferences,statistics:e.statistics,optedIn:e.optedIn}}))},ks.dispatchUserIdentified=e=>{window.dispatchEvent(new CustomEvent("illow:identity_added",{detail:{userId:e}}))},ks.dispatchIdentityRemoved=()=>{window.dispatchEvent(new CustomEvent("illow:identity_removed"))},ks.dispatchLanguageChanged=e=>{window.dispatchEvent(new CustomEvent("illow:language_changed",{detail:{language:e}}))};var Ns=Es;var Os=e=>{const[t,s]=J((()=>[e()]));return{push:e=>s((t=>[...t,e])),drop:()=>s((e=>1===e.length?e:e.slice(0,e.length-1))),top:()=>t[t.length-1]}};var As=(e,t,s)=>{const n=Os((()=>((e,t)=>{const{bannerType:s}=e,{showCircledWidget:n,hideBanner:o,hideInitialBanner:i,showOnEachSession:r}=e.settings;return r?{showing:"banner",args:null}:"none"===s||o?{showing:"none",args:null}:t||i?"none"!==n&&"link"!==n?{showing:"circledLogo",args:null}:{showing:"none",args:null}:{showing:"banner",args:null}})(e,t)));return{showing:n.top(),setShowing:(t,s)=>{const o=n.top(),i=e.settings.hideBanner&&"banner"===t||("none"===e.settings.showCircledWidget||"link"===e.settings.showCircledWidget)&&"circledLogo"===t?"none":t;n.push({showing:i,args:s}),"none"!==o.showing&&"circledLogo"!==o.showing||"none"===i||"circledLogo"===i?"none"===o.showing||"circledLogo"===o.showing||"none"!==i&&"circledLogo"!==i||Ns.dispatchWidgetClosed():Ns.dispatchWidgetOpened()},showWidget:()=>{if("none"!==e.bannerType){const e="US"===s?"doNotSell":"banner";n.push({showing:e,args:null}),Ns.dispatchWidgetOpened()}},back:()=>n.drop()}};const xs=2247483700;var Ls=e=>{var t;const{enablePermissions:s,customization:n,consent:o,consentWasGiven:i,iabContent:r,categoryModel:a,i18n:l}=e,{showing:c,setShowing:d,showWidget:u,back:h}=As(n,i,a),[g,m]=J(!1),v=te(null),C=r&&r.vendors.length>0,y="customPermissions"===c.showing&&C,_=Fe(c.showing,n.settings.positioning,y,v),w=Ke(c.showing,n.settings.positioning,n.settings.showCircledWidget);ee((()=>{window.illow={...window.illow,showBanner:u,showWidget:u}}),[u]),ee((()=>{"none"===n.bannerType&&s(Vt(!0,o),!1)}),[n.bannerType]);const b="none"!==c.showing&&"circledLogo"!==c.showing,I=!n.previewMode&&n.settings.showBlurBackground&&b,[S,E]=J(!1);return ee((()=>{E((e=>(e||Ns.dispatchWidgetReady({isOpen:b,hasPreviousConsent:i,gpc:o.gpc,isIabEnabled:C,customization:n,language:l.language}),!0)))}),[S]),window.addEventListener("illow:show_widget",(()=>u())),p(f,null,I&&p("div",{style:{backgroundColor:"rgb(0 0 0 / 30%)",zIndex:2247483699,height:"100%",width:"100%",position:"fixed",backdropFilter:"blur(2px)",top:0,bottom:0,right:0,left:0}}),p(Ue,{dir:l.dir(),contentClass:"flex justify-center items-start iframe-container",style:{border:0,zIndex:xs,..._,...w,transition:"circledLogo"!==c.showing&&"width 0.2s ease-in-out, height 0.1s ease-in-out"},id:"illow-banner-widget",ariaLabel:"illow Widget"},p(Ss,{onLoad:()=>m(!0),cssUrl:null==n||null===(t=n.resources)||void 0===t?void 0:t.cssUrl}),"none"===c.showing&&p(f,null),g&&"none"!==c.showing&&p(Is,{...e,logoSize:_.width-10,maxContentHeight:_.maxHeight,showing:c,setShowing:d,back:h,myRef:v})))};const Bs=document.currentScript,Ts=()=>{const e=document.getElementById("illow-banner-script")||Bs;return{scriptTag:e,urlParams:new URLSearchParams(new URL(e.src).search)}},Rs=(e,t,s)=>{const n=(s||"").replace(/(.[A-Z])/g,(e=>e[0]+"-"+e.slice(1).toLowerCase()));const o=t.get(s)||e.getAttribute(s),i=t.get(n)||e.getAttribute(n),r=e=>""!==e&&"undefined"!==e&&null!==e;return r(o)?o:r(i)?i:void 0};var Ps=()=>{const[e,t]=J({read:!1});return ee((()=>{if(!e.read){const{scriptTag:e,urlParams:s}=Ts();t({siteId:Rs(e,s,"siteId"),previewMode:"true"===Rs(e,s,"previewMode"),read:!0})}}),[e.read]),e};const Vs=(e,t)=>{const s=function(){let s;return function(){const n=e();n!=s&&(t(n),s=n)}}();return window.setInterval(s,100)},Ms=e=>window.clearInterval(e);class Ds{async init(){if(this.initialized)throw new Error("Entity already initialized");await this._init(),this.initialized=!0}checkInitialized(){if(!this.initialized)throw new Error("Entity not initialized")}constructor(){this.initialized=!1}}class Us extends Ds{getConsent(e){return"US"===this.categoryModelStore.getCategoryModel()&&this.consentStore.get("optedIn")||"gl"===this.categoryModelStore.getCategoryModel()&&this.consentStore.get(e)}updateConsent(){try{this._updateConsent()}catch(e){console.error(e)}}async _init(){this.updateConsent()}constructor(e,t){super(),this.consentStore=e,this.categoryModelStore=t}}class $s extends Us{_updateConsent(){var e,t,s;const n=window.illow;if(null===(e=n.googleConsentMode)||void 0===e?void 0:e.isDisabled)return;window.gtag||(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)});const o={ad_storage:this.getConsent("marketing")?"granted":"denied",analytics_storage:this.getConsent("statistics")?"granted":"denied",functionality_storage:this.getConsent("preferences")?"granted":"denied",personalization_storage:this.getConsent("preferences")?"granted":"denied",security_storage:this.getConsent("preferences")?"granted":"denied",ad_user_data:this.getConsent("marketing")?"granted":"denied",ad_personalization:this.getConsent("marketing")?"granted":"denied"};(null===(t=n.googleConsentMode)||void 0===t?void 0:t.includeGCMDefault)&&window.gtag("consent","default",o),window.gtag("consent","update",o),window.gtag("set",{ads_data_redaction:!this.getConsent("marketing"),url_passthrough:(null===(s=n.googleConsentMode)||void 0===s?void 0:s.urlPassthrough)&&(!this.getConsent("marketing")||!this.getConsent("preferences")),"developer_id.dYTYxZj":!0}),this.consentStore.get("marketing")&&window.gtag("event","illow_consent_marketing"),this.consentStore.get("statistics")&&window.gtag("event","illow_consent_statistics"),this.consentStore.get("preferences")&&window.gtag("event","illow_consent_preferences"),this.consentStore.get("optedIn")&&window.gtag("event","illow_consent_opt_in")}}class zs{putInFreezer(e,t,s){const n=s?`${e}-${s}`:e,o=this.freezer[n]||[];o.push(t),this.freezer[n]=o}takeCategoryOutOfFreezer(e,t){const s=t?`${e}-${t}`:e,n=this.freezer[s]||[];return delete this.freezer[s],n}constructor(){this.freezer={}}}const Fs=e=>`\n \n ${e}\n \n `,Ks=["youtube","vimeo","google.com/maps","fonts.googleapis","fonts.gstatic","maps.google.com"],Hs=/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:?\n]+)/i,js=e=>{const t=e.match(Hs);return!(!t||t.length<1)&&Ks.some((e=>t[t.length-1].startsWith(e)))},Gs=e=>{if("illow-banner-widget"!==e.id&&js(e.src)){const t=e;t.srcdoc=Fs('\n \n
\n'),t.setAttribute("illow-src",e.src);const s=new Event("iframeAdded");document.dispatchEvent(s)}};class Ws{createObserver(e){this.obs=new MutationObserver(this.createCallback(e))}createCallback(e){return t=>{t.forEach((t=>t.addedNodes.forEach((t=>{const s=t,n=e.get(s.nodeName);n&&n(s)}))))}}blockIframes(e){Gs(e)}blockLinks(e){if(js(e.href)){const t=e;t.setAttribute("illow-href",t.href),t.setAttribute("href",""),t.disabled=!0;const s=new Event("linkAdded");document.dispatchEvent(s)}}disconnect(){var e;null===(e=this.obs)||void 0===e||e.disconnect()}constructor(e,t){const s=new Map([["IFRAME",this.blockIframes],["LINK",this.blockLinks]]);this.createObserver(s),this.obs.observe(t,e)}}let qs;class Zs extends Ds{async _init(){this.checkIframes();const e=this;document.addEventListener("iframeAdded",(()=>e.checkIframes()))}checkIframes(){Array.from(document.getElementsByTagName("iframe")).filter((e=>!e.getAttribute("illow-src"))).forEach((e=>Gs(e)));Array.from(document.getElementsByTagName("iframe")).filter((e=>e.getAttribute("illow-src"))).forEach((e=>{this.updateIframe(e,!this.shouldBlock||this.consentStore.get(e.getAttribute("illow-category")||"marketing"))}))}updateIframe(e,t){const s=e.getAttribute("illow-category")||"marketing";if(t)e.removeAttribute("srcdoc"),e.setAttribute("src",e.getAttribute("illow-src")||e.getAttribute("src"));else{const t=this.i18n.t(`COOKIE-BANNER.CONFIG.COOKIE_TYPE.${s.toUpperCase()}.LABEL`),n=this.i18n.t("IFRAMES.BLOCKED.TEXT",{category:t.toLowerCase()}),o=this.i18n.t("IFRAMES.BLOCKED.CALL_TO_ACTION");e.srcdoc=Fs(((e,t)=>`\n
\n
\n \n \n \n

${e}

\n
\n
\n \n
\n
`)(n,o)),e.setAttribute("illow-category","marketing"),this.freezer.putInFreezer(s,e)}}updateIframes(e,t){const s=this.shouldBlock&&this.consentStore.get(e);t&&!s?this.freezer.takeCategoryOutOfFreezer(e).forEach((e=>this.updateIframe(e,t))):!t&&s&&Array.from(document.getElementsByTagName("iframe")).filter((t=>t.getAttribute("illow-src")&&(t.getAttribute("illow-category")||"marketing")===e)).forEach((e=>this.updateIframe(e,t))),t&&Array.from(document.getElementsByTagName("iframe")).filter((t=>t.getAttribute("illow-category")===e)).forEach((e=>this.updateIframe(e,t)))}setBlocking(e=!0){this.shouldBlock=e}unblockAll(){this.setBlocking(!1),this.checkIframes()}constructor(e,t){super(),this.consentStore=e,this.i18n=t,this.freezer=new zs,this.shouldBlock=!0}}const Ys={gl:{checkGPC:!1,categories:[{name:"unclassified",alwaysOn:!0,includeServices:!0,fallback:!0},{name:"necessary",alwaysOn:!0,includeServices:!0},{name:"preferences",alwaysOn:!1,includeServices:!0},{name:"marketing",alwaysOn:!1,includeServices:!0},{name:"statistics",alwaysOn:!1,includeServices:!0}]},US:{checkGPC:!0,categories:[{name:"noConsentNeeded",alwaysOn:!0,includeServices:!1,fallback:!0},{name:"optedIn",alwaysOn:!1,includeServices:!1}]}},Qs="otherServices",Js=e=>{var t;return null===(t=Ys[e].categories.find((e=>e.fallback)))||void 0===t?void 0:t.name};var Xs=Ys;let en;!function(e){const t=(e,t)=>{if(e[t])return"true"===e[t]},s=e=>{if(void 0!==e)return"true"===e||"false"===e?"true"===e:e.split(",").map((e=>e.trim()))};var n=e.unmarshallCategory=e=>{if(void 0===e)return;let t="partial";return"boolean"==typeof e&&(t=e?"accepted":"rejected"),{value:"boolean"!=typeof e||e,services:Array.isArray(e)?e.map((e=>({id:e,value:!0}))):[],extendedValue:t}},o=e.extractCategoryValue=e=>{if(void 0===e)return;if("boolean"==typeof e)return e;const t=e.services.filter((e=>e.value)).map((e=>e.id));return t.length===e.services.length?e.value:0!==t.length&&t};const i=e=>{const t=o(e);return Array.isArray(t)?t.join(","):t};e.transformFromCookieConsent=(e,t)=>{const s={...e,necessary:i(e.necessary),marketing:i(e.marketing),statistics:i(e.statistics),preferences:i(e.preferences),unclassified:i(e.unclassified)};return Object.entries(s).filter((([e,t])=>["string","number","boolean"].includes(typeof t))).map((([e,t])=>`${e}=${t}`)).join(t)},e.transformToCookieConsent=(e,o,i)=>{const r={};e.split(i).map((e=>e.split("="))).forEach((([e,t])=>{r[e]=t}));const a={noConsentNeeded:t(r,"noConsentNeeded"),optedIn:t(r,"optedIn"),"consent-id":r["consent-id"],necessary:n(s(r.necessary)),preferences:n(s(r.preferences)),marketing:n(s(r.marketing)),statistics:n(s(r.statistics)),unclassified:n(s(r.unclassified)),updatedAt:Number(r.updatedAt)||void 0,userId:r.userId,gpc:t(r,"gpc"),isPreviousConsent:o,createdAt:Number(r.createdAt)||void 0};return Object.entries(a).forEach((([e,t])=>{void 0===t&&delete a[e]})),a}}(en||(en={}));var tn=class{async getConsent(e,t){const s=t?`?consentId=${t}`:"",n=await us(`cookie-consent/${this.siteId}/identified/${e}${s}`);if(n.status>=300||!n.body)return;const o=n.body;return{...o,"consent-id":o.id,userId:o.userId,necessary:en.unmarshallCategory(o.categories.necessary),preferences:en.unmarshallCategory(o.categories.preferences),marketing:en.unmarshallCategory(o.categories.marketing),statistics:en.unmarshallCategory(o.categories.statistics),tcString:o.tcString,googleConsent:o.tcString,gpc:o.gpc,isPreviousConsent:!0}}async setConsent(e,t,s,n,o){const{"consent-id":i,userId:r,gpc:a,...l}=e,c=((e,t)=>{const s=Xs[e].categories.filter((e=>!e.alwaysOn));return s.every((({name:e})=>"boolean"==typeof t[e]?t[e]:t[e].value))?"accepted":s.every((({name:e})=>"boolean"==typeof t[e]?!t[e]:!t[e].value))?"rejected":"partial"})(t,l),d=((e,t)=>Xs[e].categories.reduce(((e,{name:s,alwaysOn:n})=>({...e,[s]:n||en.extractCategoryValue(t[s])})),{}))(t,l),u={id:i,userId:r,status:c,categories:d,gpc:a,clicked:s,tcString:n,googleConsent:o,consentDataAnalitycs:l.consentDataAnalitycs},h=await hs(`cookie-consent/${this.siteId}${"US"===t?"/usa":""}`,u,!!i);if(h.status>=200&&h.status<300)return h.body.id;throw new Error(h.error)}constructor(e){this.siteId=e}};class sn extends Ds{getCategoryConsentValue(e){return"boolean"==typeof e||void 0===e?e:e.value}getInitialCategoryConsentValue(e,t,s,n){if(e.alwaysOn)return!0;const o=t[e.name],i=this.getCategoryConsentValue(o),r=t.gpc,a="boolean"==typeof i?i:n;return s?r&&i||!r&&!this.gpc&&a:a}getInitialServiceConsentValue(e,t,s,n){return e||n&&(t&&!(s||this.gpc)||!t)}getInitialConsentValue(e,t,s,n){const o=this.getInitialCategoryConsentValue(e,t,s,n);if(!e.includeServices)return o;const i=t[e.name],r="boolean"==typeof i||void 0===i?[]:i.services,a=this.categoryModelStore.getServicesByCategory(e.name),l="boolean"!=typeof i&&"partial"===(null==i?void 0:i.extendedValue)?this.getInitialServiceConsentValue(e.alwaysOn,s,t.gpc,n):o;var c;return{value:o||r.length>0,services:a.map((e=>{var t;return{id:e.id,value:null!==(c=null===(t=r.find((t=>t.id===e.id)))||void 0===t?void 0:t.value)&&void 0!==c?c:l}}))}}async sendConsent(e,t,s){const n=this.localStore.getPrivacyClicks(),o=await this.remoteStore.setConsent(this.consent,e,n,t,s);this.setId(o),this.localStore.setConsent(this.consent),this.consent.updatedAt=this.localStore.getConsent().updatedAt}shouldSendToServerOnInit(e,t,s,n,o){return"US"===e&&!n.isPreviousConsent||(!!n.crossConsent||!!t&&(s?!n.gpc&&o:n.gpc!==o))}async initConsent(e,t){const s=this.categoryModelStore.getCategoryModel(),{checkGPC:n,categories:o}=Xs[s],i=t&&e.gpc||this.gpc,r=this.shouldSendToServerOnInit(s,n,t,e,i),a="US"===s||this.permissive;this.consent=o.reduce(((t,s)=>({...t,[s.name]:this.getInitialConsentValue(s,e,n,a)})),{"consent-id":e["consent-id"],updatedAt:e.updatedAt,userId:e.userId,isPreviousConsent:e.isPreviousConsent,gpc:i}),r&&await this.sendConsent(s)}async _init(){let e=this.localStore.getConsent();e.userId?await this.identify(e.userId):this.initConsent(e,!1)}async identify(e){const t=this.localStore.identify(e),s=await this.remoteStore.getConsent(e,t["consent-id"]);var n;const o=null!==(n=null!=s?s:t)&&void 0!==n?n:{userId:e},{tcString:i,googleConsent:r,...a}=o;this.localStore.setConsent(a),i&&this.localStore.setIABConsent(i,r),this.initConsent(o,!0)}removeIdentity(){this.localStore.removeIdentity();const e=this.localStore.getConsent();this.initConsent(e,!1)}wasGiven(){return this.checkInitialized(),this.consent.isPreviousConsent}async storeConsent(e,t){this.checkInitialized();try{this.localStore.setConsent(this.consent),e&&this.localStore.setIABConsent(e,t);const s=this.categoryModelStore.getCategoryModel();await this.sendConsent(s,e,t)}catch(e){console.error(e)}}isNecessaryKey(e){return this.checkInitialized(),this.localStore.getConsentKeys().includes(e)}getTCString(){return this.checkInitialized(),this.localStore.getTCString()}getGoogleConsent(){return this.checkInitialized(),this.localStore.getGoogleConsent()}get(e,t){var s;this.checkInitialized();const n=this.consent[e];return void 0===n||"boolean"==typeof n?!!n:void 0===t?n.value:(null===(s=n.services.find((e=>e.id===t)))||void 0===s?void 0:s.value)||!1}getAll(){return this.checkInitialized(),this.consent}setId(e){this.checkInitialized(),this.consent["consent-id"]=e}set(e,t){this.checkInitialized(),this.consent[e]=t}setPermissive(e){this.initialized&&console.warn("Changing permissive mode after initializing consent store does not change the behaviour"),this.permissive=e}getIABConsent(){return this.checkInitialized(),this.localStore.getIABConsent()}setLocalConsentStore(e){this.localStore=e}constructor(e,t,s,n,o=!0){super(),this.localStore=n,this.remoteStore=new tn(t),this.siteId=t,this.permissive=o,this.gpc=s,this.categoryModelStore=e}}function nn(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}class on extends Ds{async _init(){const e=await this.cookiesPromise;if(e.status>=400)throw new Error("[illow] Could not retrieve cookies categorization. Please check that your siteId is correct or contact support");this.categoryModel=e.body.model,this.couldUseIABBanner=e.body.couldShowIABBanner,this.cookies=(e.body.cookies||[]).map((t=>{return{...t,category:(s=t.category,void 0===s||"boolean"==typeof s?s?"optedIn":"noConsentNeeded":"preference"===(null==s?void 0:s.toLowerCase())?"preferences":s.toLowerCase()),service:{id:t.platform||Qs,name:t.platform,...e.body.services.find((e=>e.id===t.platform))}};var s})),this.categoryServicesByElement=this.cookies.reduce(((e,{name:t,category:s,service:n,cookie_name:o})=>({...e,[o]:{category:s,service:n.id},[t]:{category:s,service:n.id}})),{}),this.servicesByCategory=this.createServicesByCategory(this.cookies,this.categoryModel)}getFuzzyCategoryService(e){this.checkInitialized();const t=Object.keys(this.categoryServicesByElement).find((t=>e.startsWith(t)&&t.length>2));return t?this.categoryServicesByElement[t]:void 0}getCategoryServiceByElement(e){var t;this.checkInitialized();const s=(null===(t=this.categoryServicesByElement)||void 0===t?void 0:t[e])||this.getFuzzyCategoryService(e);if(s)return s;return{category:Js(this.categoryModel),service:Qs}}getCookies(){return this.checkInitialized(),this.cookies}getCategoryModel(){return this.checkInitialized(),this.categoryModel}isIABBannerApplicable(){return this.checkInitialized(),this.couldUseIABBanner}getServicesByCategory(e){return this.checkInitialized(),this.servicesByCategory[e]||[]}constructor(e,t,s){super(),nn(this,"createServicesByCategory",((e,t)=>{const s=e.reduce(((e,{category:t,service:s})=>{var n;return{...e,[t]:(null===(n=e[t])||void 0===n?void 0:n.find((e=>e.id===s.id)))?e[t]:[...e[t]||[],s]}}),{}),n=Js(t),o=s[n]||[];return o.find((e=>e.id===Qs))||(s[n]=[...o,{id:Qs}]),s})),this.siteId=e,this.couldUseIABBanner=!1,this.cookiesPromise=us(`cookies/${this.siteId}?lng=${s}${t?"&cookieSet=true":""}`),this.cookies=[],this.categoryModel="gl",this.servicesByCategory={}}}class rn extends Us{_updateConsent(){window.fbq&&window.fbq("consent",this.getConsent("marketing")?"grant":"revoke")}}class an extends Us{_updateConsent(){window.clarity&&this.getConsent("statistics")&&window.clarity("consent")}}const ln="preferences";class cn extends Ds{checkLinks(){Array.from(document.getElementsByTagName("link")).filter((e=>e.getAttribute("illow-href"))).forEach((e=>{this.updateLink(e,!this.shouldBlock||this.consentStore.get(e.getAttribute("illow-category")||ln))}))}async _init(){this.checkLinks();const e=this;document.addEventListener("linkAdded",(()=>e.checkLinks()))}updateLink(e,t){const s=e.getAttribute("illow-category")||ln;t?(e.setAttribute("href",e.getAttribute("illow-href")),e.disabled&&e.getAttribute("illow-href")&&(e.disabled=!1)):(e.setAttribute("href",""),e.disabled=!0,e.setAttribute("illow-category",s),this.freezer.putInFreezer(s,e))}updateLinks(e,t){const s=this.shouldBlock&&this.consentStore.get(e);t&&!s?this.freezer.takeCategoryOutOfFreezer(e).forEach((e=>this.updateLink(e,t))):!t&&s&&Array.from(document.getElementsByTagName("link")).filter((t=>t.getAttribute("illow-href")&&(t.getAttribute("illow-category")||ln)===e)).forEach((e=>this.updateLink(e,t)))}setBlocking(e=!0){this.shouldBlock=e}unblockAll(){this.setBlocking(!1),this.checkLinks()}constructor(e){super(),this.consentStore=e,this.freezer=new zs,this.shouldBlock=!0}}class dn extends Us{_updateConsent(){window._paq&&window._paq.push([this.getConsent("marketing")?"setConsentGiven":"requireConsent"])}}const un=e=>e.split(";")[0].split("=").map((e=>e.trim())),hn=["ch","ca"],pn=(e,t)=>{const s=(()=>{const e=window.location.host;if(e.startsWith("localhost"))return"localhost";const t=e.split(".");if(t.length<=2)return`.${e}`;const s=t[t.length-1],n=s.length<=2&&!hn.includes(s)?-3:-2;return`.${t.slice(n).join(".")}`})(),n=s?`domain=${s};`:"",o=new Date(Date.now()+31536e6),i=`${e}=${t}; expires=${o}; path=/`;document.cookie=`${i};${n}`,document.cookie.includes(`${e}=${t}`)||(document.cookie=`${e}=${t}; expires=${o}; path=/`)},gn=e=>{const t=document.cookie.split(";").map((e=>e.split("="))).find((([t])=>t.trim()===e));return t?t.slice(1).join("=").trim():null},fn=e=>{const t="expires=Thu, 01 Jan 1970 00:00:00 UTC;",s=window.location.host.split(".").reduce(((e,t,s,n)=>{const o=n.slice(s,n.length).join(".");return[...e,o,`.${o}`]}),[]);document.cookie=`${e}=; ${t}`,document.cookie=`${e}=; ${t} path=${window.location.pathname};`,s.forEach((s=>{document.cookie=`${e}=; ${t} domain=${s};`,document.cookie=`${e}=; ${t} domain=${s}; path=${window.location.pathname};`,document.cookie=`${e}=; ${t} domain=${s}; path=/;`}))};var mn,vn,Cn,yn,_n,wn,bn,In,Sn,En,kn,Nn,On,An;(vn=mn||(mn={})).PING="ping",vn.GET_TC_DATA="getTCData",vn.GET_IN_APP_TC_DATA="getInAppTCData",vn.GET_VENDOR_LIST="getVendorList",vn.ADD_EVENT_LISTENER="addEventListener",vn.REMOVE_EVENT_LISTENER="removeEventListener",(yn=Cn||(Cn={})).STUB="stub",yn.LOADING="loading",yn.LOADED="loaded",yn.ERROR="error",(wn=_n||(_n={})).VISIBLE="visible",wn.HIDDEN="hidden",wn.DISABLED="disabled",(In=bn||(bn={})).TC_LOADED="tcloaded",In.CMP_UI_SHOWN="cmpuishown",In.USER_ACTION_COMPLETE="useractioncomplete";class xn{invokeCallback(e){const t=null!==e;"function"==typeof this.next?this.callback(this.next,e,t):this.callback(e,t)}constructor(e,t,s,n){nn(this,"listenerId",void 0),nn(this,"callback",void 0),nn(this,"next",void 0),nn(this,"param",void 0),nn(this,"success",!0),Object.assign(this,{callback:e,listenerId:s,param:t,next:n});try{this.respond()}catch(e){this.invokeCallback(null)}}}class Ln extends xn{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Pn(this.param,this.listenerId))}throwIfParamInvalid(){if(!(void 0===this.param||Array.isArray(this.param)&&this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class Bn{static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Cn.LOADING,this.disabled=!1,this.displayStatus=_n.HIDDEN,this.eventQueue.clear()}}nn(Bn,"apiVersion","2"),nn(Bn,"tcfPolicyVersion",void 0),nn(Bn,"eventQueue",new class{add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach(((e,t)=>{new Ln(e.callback,e.param,t,e.next)}))}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}constructor(){nn(this,"eventQueue",new Map),nn(this,"queueNumber",0)}}),nn(Bn,"cmpStatus",Cn.LOADING),nn(Bn,"disabled",!1),nn(Bn,"displayStatus",_n.HIDDEN),nn(Bn,"cmpId",void 0),nn(Bn,"cmpVersion",void 0),nn(Bn,"eventStatus",void 0),nn(Bn,"gdprApplies",void 0),nn(Bn,"tcModel",void 0),nn(Bn,"tcString",void 0);class Tn{constructor(){nn(this,"cmpId",Bn.cmpId),nn(this,"cmpVersion",Bn.cmpVersion),nn(this,"gdprApplies",Bn.gdprApplies),nn(this,"tcfPolicyVersion",Bn.tcfPolicyVersion)}}class Rn extends Tn{constructor(...e){super(...e),nn(this,"cmpStatus",Cn.ERROR)}}class Pn extends Tn{createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let n=1;n<=s;n++){const s=n.toString();e.getRestrictions(n).forEach((e=>{const n=e.purposeId.toString();t[n]||(t[n]={}),t[n][s]=e.restrictionType}))}}return t}createVectorField(e,t){return t?t.reduce(((t,s)=>(t[String(s)]=e.has(Number(s)),t)),{}):[...e].reduce(((e,t)=>(e[t[0].toString(10)]=t[1],e)),{})}constructor(e,t){if(super(),nn(this,"tcString",void 0),nn(this,"listenerId",void 0),nn(this,"eventStatus",void 0),nn(this,"cmpStatus",void 0),nn(this,"isServiceSpecific",void 0),nn(this,"useNonStandardTexts",void 0),nn(this,"publisherCC",void 0),nn(this,"purposeOneTreatment",void 0),nn(this,"outOfBand",void 0),nn(this,"purpose",void 0),nn(this,"vendor",void 0),nn(this,"specialFeatureOptins",void 0),nn(this,"publisher",void 0),this.eventStatus=Bn.eventStatus,this.cmpStatus=Bn.cmpStatus,this.listenerId=t,Bn.gdprApplies){const t=Bn.tcModel;this.tcString=Bn.tcString,this.isServiceSpecific=t.isServiceSpecific,this.useNonStandardTexts=t.useNonStandardTexts,this.purposeOneTreatment=t.purposeOneTreatment,this.publisherCC=t.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(t.vendorsAllowed,e),disclosedVendors:this.createVectorField(t.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(t.purposeConsents),legitimateInterests:this.createVectorField(t.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(t.vendorConsents,e),legitimateInterests:this.createVectorField(t.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(t.specialFeatureOptins),this.publisher={consents:this.createVectorField(t.publisherConsents),legitimateInterests:this.createVectorField(t.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(t.publisherCustomConsents),legitimateInterests:this.createVectorField(t.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(t.publisherRestrictions)}}}}class Vn extends Pn{createVectorField(e){return[...e].reduce(((e,t)=>e+=t[1]?"1":"0"),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach((e=>{t[e.purposeId.toString()]="_".repeat(s)}));for(let n=0;n{const s=e.restrictionType.toString(),o=e.purposeId.toString(),i=t[o].substr(0,n),r=t[o].substr(n+1);t[o]=i+s+r}))}}return t}constructor(e){super(e),delete this.outOfBand}}class Mn extends Tn{constructor(){super(),nn(this,"cmpLoaded",!0),nn(this,"cmpStatus",Bn.cmpStatus),nn(this,"displayStatus",Bn.displayStatus),nn(this,"apiVersion",String(Bn.apiVersion)),nn(this,"gvlVersion",void 0),Bn.tcModel&&Bn.tcModel.vendorListVersion&&(this.gvlVersion=+Bn.tcModel.vendorListVersion)}}class Dn extends Error{constructor(e){super(e),this.name="DecodingError"}}class Un extends Error{constructor(e){super(e),this.name="EncodingError"}}class $n extends Error{constructor(e){super(e),this.name="GVLError"}}class zn extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class Fn{static encode(e){if(!/^[0-1]+$/.test(e))throw new Un("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let t=0;t=2&&2==t.length){if(Kn.langSet.has(e))return e;if(Kn.langSet.has(t))return t;const s=t+"-"+t;if(Kn.langSet.has(s))return s;for(const s of Kn.langSet)if(-1!==s.indexOf(e)||-1!==s.indexOf(t))return s}throw new Error(`unsupported language ${e}`)}forEach(e){Kn.langSet.forEach(e)}get size(){return Kn.langSet.size}}nn(Kn,"langSet",new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SR-LATN","SR-CYRL","SV","TL","TR","UK","ZH"]));class Hn{}nn(Hn,"cmpId","cmpId"),nn(Hn,"cmpVersion","cmpVersion"),nn(Hn,"consentLanguage","consentLanguage"),nn(Hn,"consentScreen","consentScreen"),nn(Hn,"created","created"),nn(Hn,"supportOOB","supportOOB"),nn(Hn,"isServiceSpecific","isServiceSpecific"),nn(Hn,"lastUpdated","lastUpdated"),nn(Hn,"numCustomPurposes","numCustomPurposes"),nn(Hn,"policyVersion","policyVersion"),nn(Hn,"publisherCountryCode","publisherCountryCode"),nn(Hn,"publisherCustomConsents","publisherCustomConsents"),nn(Hn,"publisherCustomLegitimateInterests","publisherCustomLegitimateInterests"),nn(Hn,"publisherLegitimateInterests","publisherLegitimateInterests"),nn(Hn,"publisherConsents","publisherConsents"),nn(Hn,"publisherRestrictions","publisherRestrictions"),nn(Hn,"purposeConsents","purposeConsents"),nn(Hn,"purposeLegitimateInterests","purposeLegitimateInterests"),nn(Hn,"purposeOneTreatment","purposeOneTreatment"),nn(Hn,"specialFeatureOptins","specialFeatureOptins"),nn(Hn,"useNonStandardTexts","useNonStandardTexts"),nn(Hn,"vendorConsents","vendorConsents"),nn(Hn,"vendorLegitimateInterests","vendorLegitimateInterests"),nn(Hn,"vendorListVersion","vendorListVersion"),nn(Hn,"vendorsAllowed","vendorsAllowed"),nn(Hn,"vendorsDisclosed","vendorsDisclosed"),nn(Hn,"version","version");class jn{clone(){const e=new this.constructor;return Object.keys(this).forEach((t=>{const s=this.deepClone(this[t]);void 0!==s&&(e[t]=s)})),e}deepClone(e){const t=typeof e;if("number"===t||"string"===t||"boolean"===t)return e;if(null!==e&&"object"===t){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){const t=[];for(const s of e)t.push(this.deepClone(s));return e instanceof Array?t:new e.constructor(t)}{const t={};for(const s in e)e.hasOwnProperty(s)&&(t[s]=this.deepClone(e[s]));return t}}}}(En=Sn||(Sn={}))[En.NOT_ALLOWED=0]="NOT_ALLOWED",En[En.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",En[En.REQUIRE_LI=2]="REQUIRE_LI";class Gn extends jn{static unHash(e){const t=e.split(this.hashSeparator),s=new Gn;if(2!==t.length)throw new zn("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Gn.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Sn.NOT_ALLOWED||this.restrictionType===Sn.REQUIRE_CONSENT||this.restrictionType===Sn.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}constructor(e,t){super(),nn(this,"purposeId_",void 0),nn(this,"restrictionType",void 0),void 0!==e&&(this.purposeId=e),void 0!==t&&(this.restrictionType=t)}}nn(Gn,"hashSeparator","-");class Wn extends jn{has(e){return this.map.has(e)}isOkToHave(e,t,s){var n;let o=!0;if(null===(n=this.gvl)||void 0===n?void 0:n.vendors){const n=this.gvl.vendors[s];if(n)if(e===Sn.NOT_ALLOWED)o=n.legIntPurposes.includes(t)||n.purposes.includes(t);else if(n.flexiblePurposes.length)switch(e){case Sn.REQUIRE_CONSENT:o=n.flexiblePurposes.includes(t)&&n.legIntPurposes.includes(t);break;case Sn.REQUIRE_LI:o=n.flexiblePurposes.includes(t)&&n.purposes.includes(t)}else o=!1;else o=!1}return o}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,n=t[t.length-1],o=[...Array(n).keys()].map((e=>e+1));if(this.has(s))for(let e=1;e<=n;e++)this.map.get(s).add(e);else this.map.set(s,new Set(o)),this.bitLength=0}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const e=new Set;this.map.forEach((t=>{t.forEach((t=>{e.add(t)}))})),t=Array.from(e)}return t.sort(((e,t)=>e-t))}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach((e=>{e.purposeId===t&&(void 0===s||s>e.restrictionType)&&(s=e.restrictionType)})),s}vendorHasRestriction(e,t){let s=!1;const n=this.getRestrictions(e);for(let e=0;e{e=Math.max(Array.from(t)[t.size-1],e)})),e}getRestrictions(e){const t=[];return this.map.forEach(((s,n)=>{e?s.has(e)&&t.push(Gn.unHash(n)):t.push(Gn.unHash(n))})),t}getPurposes(){const e=new Set;return this.map.forEach(((t,s)=>{e.add(Gn.unHash(s).purposeId)})),Array.from(e)}remove(e,t){const s=t.hash,n=this.map.get(s);n&&(n.delete(e),0==n.size&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach(((e,t)=>{const s=Gn.unHash(t);Array.from(e).forEach((t=>{this.isOkToHave(s.restrictionType,s.purposeId,t)||e.delete(t)}))})))}get gvl(){return this.gvl_}isEmpty(){return 0===this.map.size}get numRestrictions(){return this.map.size}constructor(...e){super(...e),nn(this,"bitLength",0),nn(this,"map",new Map),nn(this,"gvl_",void 0)}}(Nn=kn||(kn={})).COOKIE="cookie",Nn.WEB="web",Nn.APP="app",(An=On||(On={})).CORE="core",An.VENDORS_DISCLOSED="vendorsDisclosed",An.VENDORS_ALLOWED="vendorsAllowed",An.PUBLISHER_TC="publisherTC";class qn{}nn(qn,"ID_TO_KEY",[On.CORE,On.VENDORS_DISCLOSED,On.VENDORS_ALLOWED,On.PUBLISHER_TC]),nn(qn,"KEY_TO_ID",{[On.CORE]:0,[On.VENDORS_DISCLOSED]:1,[On.VENDORS_ALLOWED]:2,[On.PUBLISHER_TC]:3});let Zn=Symbol.iterator;class Yn extends jn{*[Zn](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach((e=>this.unset(e))):"object"==typeof e?this.unset(Object.keys(e).map((e=>Number(e)))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach((e=>{this.maxId_=Math.max(this.maxId,e)}))))}isIntMap(e){let t="object"==typeof e;return t=t&&Object.keys(e).every((t=>{let s=Number.isInteger(parseInt(t,10));return s=s&&this.isValidNumber(e[t].id),s=s&&void 0!==e[t].name,s})),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach((e=>this.set(e)));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map((e=>Number(e))));else{if(!this.isValidNumber(e))throw new zn("set()",e,"must be positive integer array, positive integer, Set, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}constructor(...e){super(...e),nn(this,"bitLength",0),nn(this,"maxId_",0),nn(this,"set_",new Set)}}let Qn=Hn.cmpId,Jn=Hn.cmpVersion,Xn=Hn.consentLanguage,eo=Hn.consentScreen,to=Hn.created,so=Hn.isServiceSpecific,no=Hn.lastUpdated,oo=Hn.policyVersion,io=Hn.publisherCountryCode,ro=Hn.publisherLegitimateInterests,ao=Hn.publisherConsents,lo=Hn.purposeConsents,co=Hn.purposeLegitimateInterests,uo=Hn.purposeOneTreatment,ho=Hn.specialFeatureOptins,po=Hn.useNonStandardTexts,go=Hn.vendorListVersion,fo=Hn.version;class mo{}nn(mo,Qn,12),nn(mo,Jn,12),nn(mo,Xn,12),nn(mo,eo,6),nn(mo,to,36),nn(mo,so,1),nn(mo,no,36),nn(mo,oo,6),nn(mo,io,12),nn(mo,ro,24),nn(mo,ao,24),nn(mo,lo,24),nn(mo,co,24),nn(mo,uo,1),nn(mo,ho,12),nn(mo,po,1),nn(mo,go,12),nn(mo,fo,6),nn(mo,"anyBoolean",1),nn(mo,"encodingType",1),nn(mo,"maxId",16),nn(mo,"numCustomPurposes",6),nn(mo,"numEntries",12),nn(mo,"numRestrictions",12),nn(mo,"purposeId",6),nn(mo,"restrictionType",2),nn(mo,"segmentType",3),nn(mo,"singleOrRange",1),nn(mo,"vendorId",16);class vo{static encode(e){return String(Number(e))}static decode(e){return"1"===e}}class Co{static encode(e,t){let s;if("string"==typeof e&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new Un(`${e} too large to encode into ${t}`);return s.length25||n<0||n>25)throw new Un(`invalid language code: ${e}`);if(t%2==1)throw new Un(`numBits must be even, ${t} is not valid`);return Co.encode(s,t/=2)+Co.encode(n,t)}static decode(e,t){let s;if(t!==e.length||e.length%2)throw new Dn("invalid bit length for language");{const t=65,n=e.length/2,o=Co.decode(e.slice(0,n),n)+t,i=Co.decode(e.slice(n),n)+t;s=String.fromCharCode(o)+String.fromCharCode(i)}return s}}class bo{static encode(e){let t=Co.encode(e.numRestrictions,mo.numRestrictions);if(!e.isEmpty()){const s=(t,s)=>{for(let n=t+1;n<=s;n++)if(e.gvl.vendorIds.has(n))return n;return t};e.getRestrictions().forEach((n=>{t+=Co.encode(n.purposeId,mo.purposeId),t+=Co.encode(n.restrictionType,mo.restrictionType);const o=e.getVendors(n),i=o.length;let r=0,a=0,l="";for(let e=0;es(t,o[i-1])){const e=!(t===a);l+=vo.encode(e),l+=Co.encode(a,mo.vendorId),e&&(l+=Co.encode(t,mo.vendorId)),a=0}}t+=Co.encode(r,mo.numEntries),t+=l}))}return t}static decode(e){let t=0;const s=new Wn,n=Co.decode(e.substr(t,mo.numRestrictions),mo.numRestrictions);t+=mo.numRestrictions;for(let o=0;o{if(i+=vo.encode(o),s=e.maxId>l&&c{const t=1===e.length;s+=vo.encode(!t),s+=Co.encode(e[0],mo.vendorId),t||(s+=Co.encode(e[1],mo.vendorId))})),s}}function ko(){return{[Hn.version]:Co,[Hn.created]:yo,[Hn.lastUpdated]:yo,[Hn.cmpId]:Co,[Hn.cmpVersion]:Co,[Hn.consentScreen]:Co,[Hn.consentLanguage]:wo,[Hn.vendorListVersion]:Co,[Hn.policyVersion]:Co,[Hn.isServiceSpecific]:vo,[Hn.useNonStandardTexts]:vo,[Hn.specialFeatureOptins]:_o,[Hn.purposeConsents]:_o,[Hn.purposeLegitimateInterests]:_o,[Hn.purposeOneTreatment]:vo,[Hn.publisherCountryCode]:wo,[Hn.vendorConsents]:Eo,[Hn.vendorLegitimateInterests]:Eo,[Hn.publisherRestrictions]:bo,segmentType:Co,[Hn.vendorsDisclosed]:Eo,[Hn.vendorsAllowed]:Eo,[Hn.publisherConsents]:_o,[Hn.publisherLegitimateInterests]:_o,[Hn.numCustomPurposes]:Co,[Hn.publisherCustomConsents]:_o,[Hn.publisherCustomLegitimateInterests]:_o}}class No{constructor(e,t){if(nn(this,"1",[On.CORE]),nn(this,"2",[On.CORE]),2===e.version)if(e.isServiceSpecific)this[2].push(On.PUBLISHER_TC);else{const s=!(!t||!t.isForVendors);s&&!0!==e[Hn.supportOOB]||this[2].push(On.VENDORS_DISCLOSED),s&&(e[Hn.supportOOB]&&e[Hn.vendorsAllowed].size>0&&this[2].push(On.VENDORS_ALLOWED),this[2].push(On.PUBLISHER_TC))}}}class Oo{static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch(s){throw new Un(`Unable to encode version: ${e.version}, segment: ${t}`)}let n="";t!==On.CORE&&(n=Co.encode(qn.KEY_TO_ID[t],mo.segmentType));const o=ko();return s.forEach((s=>{const i=e[s],r=o[s];let a=mo[s];void 0===a&&this.isPublisherCustom(s)&&(a=Number(e[Hn.numCustomPurposes]));try{n+=r.encode(i,a)}catch(e){throw new Un(`Error encoding ${t}->${s}: ${e.message}`)}})),Fn.encode(n)}static decode(e,t,s){const n=Fn.decode(e);let o=0;s===On.CORE&&(t.version=Co.decode(n.substr(o,mo[Hn.version]),mo[Hn.version])),s!==On.CORE&&(o+=mo.segmentType);const i=this.fieldSequence[String(t.version)][s],r=ko();return i.forEach((e=>{const s=r[e];let i=mo[e];if(void 0===i&&this.isPublisherCustom(e)&&(i=Number(t[Hn.numCustomPurposes])),0!==i){const r=n.substr(o,i);if(t[e]=s===Eo?s.decode(r,t.version):s.decode(r,i),Number.isInteger(i))o+=i;else{if(!Number.isInteger(t[e].bitLength))throw new Dn(e);o+=t[e].bitLength}}})),t}static isPublisherCustom(e){return 0===e.indexOf("publisherCustom")}}nn(Oo,"fieldSequence",new class{constructor(){nn(this,"1",{[On.CORE]:[Hn.version,Hn.created,Hn.lastUpdated,Hn.cmpId,Hn.cmpVersion,Hn.consentScreen,Hn.consentLanguage,Hn.vendorListVersion,Hn.purposeConsents,Hn.vendorConsents]}),nn(this,"2",{[On.CORE]:[Hn.version,Hn.created,Hn.lastUpdated,Hn.cmpId,Hn.cmpVersion,Hn.consentScreen,Hn.consentLanguage,Hn.vendorListVersion,Hn.policyVersion,Hn.isServiceSpecific,Hn.useNonStandardTexts,Hn.specialFeatureOptins,Hn.purposeConsents,Hn.purposeLegitimateInterests,Hn.purposeOneTreatment,Hn.publisherCountryCode,Hn.vendorConsents,Hn.vendorLegitimateInterests,Hn.publisherRestrictions],[On.PUBLISHER_TC]:[Hn.publisherConsents,Hn.publisherLegitimateInterests,Hn.numCustomPurposes,Hn.publisherCustomConsents,Hn.publisherCustomLegitimateInterests],[On.VENDORS_ALLOWED]:[Hn.vendorsAllowed],[On.VENDORS_DISCLOSED]:[Hn.vendorsDisclosed]})}});class Ao{static process(e,t){const s=e.gvl;if(!s)throw new Un("Unable to encode TCModel without a GVL");if(!s.isReady)throw new Un("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(e=e.clone()).consentLanguage=s.language.slice(0,2).toUpperCase(),(null==t?void 0:t.version)>0&&(null==t?void 0:t.version)<=this.processor.length?e.version=t.version:e.version=this.processor.length;const n=e.version-1;if(!this.processor[n])throw new Un(`Invalid version: ${e.version}`);return this.processor[n](e,s)}}nn(Ao,"processor",[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach(((s,n)=>{s.forEach(((o,i)=>{if(o){const o=t.vendors[i];if(!o||o.deletedDate)s.unset(i);else if(0===o[n].length)if("legIntPurposes"===n&&0===o.purposes.length&&0===o.legIntPurposes.length&&o.specialPurposes.length>0);else if(e.isServiceSpecific)if(0===o.flexiblePurposes.length)s.unset(i);else{const t=e.publisherRestrictions.getRestrictions(i);let o=!1;for(let e=0,s=t.length;e0&&"/"!==e[e.length-1]&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static emptyLanguageCache(e){let t=!1;return null==e&&xo.LANGUAGE_CACHE.size>0?(xo.LANGUAGE_CACHE=new Map,t=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(xo.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(xo.CACHE.delete(e),t=!0):void 0===e&&(xo.CACHE=new Map,t=!0),t}cacheLanguage(){xo.LANGUAGE_CACHE.has(this.cacheLang_)||xo.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await class{static absCall(e,t,s,n){return new Promise(((o,i)=>{const r=new XMLHttpRequest;r.withCredentials=s,r.addEventListener("load",(()=>{if(r.readyState==XMLHttpRequest.DONE)if(r.status>=200&&r.status<300){let e=r.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}o(e)}else i(new Error(`HTTP Status: ${r.status} response type: ${r.responseType}`))})),r.addEventListener("error",(()=>{i(new Error("error"))})),r.addEventListener("abort",(()=>{i(new Error("aborted"))})),null===t?r.open("GET",e,!0):r.open("POST",e,!0),r.responseType="json",r.timeout=n,r.ontimeout=()=>{i(new Error("Timeout "+n+"ms "+e))},r.send(t)}))}static post(e,t,s=!1,n=0){return this.absCall(e,JSON.stringify(t),s,n)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}.fetch(e))}catch(e){throw new $n(e.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=xo.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=xo.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=xo.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=xo.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=xo.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=xo.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{..."number"==typeof e.stdRetention?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map((e=>({langId:e.langId,privacy:e.privacy,...e.legIntClaim?{legIntClaim:e.legIntClaim}:{}})))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},..."number"==typeof e.cookieMaxAgeSeconds||null===e.cookieMaxAgeSeconds?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...void 0!==e.usesCookies?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...void 0!==e.cookieRefresh?{cookieRefresh:e.cookieRefresh}:{},...void 0!==e.usesNonCookieAccess?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=xo.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=xo.consentLanguages.parseLanguage(e)}catch(e){throw new $n("Error during parsing the language: "+e.message)}const s=e.toUpperCase();if((t.toLowerCase()!==xo.DEFAULT_LANGUAGE.toLowerCase()||xo.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,xo.LANGUAGE_CACHE.has(s)){const e=xo.LANGUAGE_CACHE.get(s);for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}else{const e=xo.baseUrl+xo.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(e),this.cacheLang_=s,this.cacheLanguage()}catch(e){throw new $n("unable to load language: "+e.message)}}}get language(){return this.lang_}isVendorList(e){return void 0!==e&&void 0!==e.vendors}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&xo.CACHE.set(xo.LATEST_CACHE_KEY,this.getJson()),xo.CACHE.has(this.vendorListVersion)||xo.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((e=>{this.byPurposeVendorMap[e]={legInt:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((e=>{this.bySpecialPurposeVendorMap[e]=new Set})),Object.keys(this.features).forEach((e=>{this.byFeatureVendorMap[e]=new Set})),Object.keys(this.specialFeatures).forEach((e=>{this.bySpecialFeatureVendorMap[e]=new Set})),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map((e=>+e))),this.vendorIds=new Set(e),this.vendors_=e.reduce(((e,t)=>{const s=this.vendors_[String(t)];return s&&void 0===s.deletedDate&&(s.purposes.forEach((e=>{this.byPurposeVendorMap[String(e)].consent.add(t)})),s.specialPurposes.forEach((e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)})),s.legIntPurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)})),s.flexiblePurposes&&s.flexiblePurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)})),s.features.forEach((e=>{this.byFeatureVendorMap[String(e)].add(t)})),s.specialFeatures.forEach((e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)})),e[t]=s),e}),{})}getFilteredVendors(e,t,s,n){const o=e.charAt(0).toUpperCase()+e.slice(1);let i;const r={};return i="purpose"===e&&s?this["by"+o+"VendorMap"][String(t)][s]:this["by"+(n?"Special":"")+o+"VendorMap"][String(t)],i.forEach((e=>{r[String(e)]=this.vendors[String(e)]})),r}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new xo(this.getJson());return this.lang_!==xo.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}constructor(e,t){super(),nn(this,"readyPromise",void 0),nn(this,"gvlSpecificationVersion",void 0),nn(this,"vendorListVersion",void 0),nn(this,"tcfPolicyVersion",void 0),nn(this,"lastUpdated",void 0),nn(this,"purposes",void 0),nn(this,"specialPurposes",void 0),nn(this,"features",void 0),nn(this,"specialFeatures",void 0),nn(this,"isReady_",!1),nn(this,"vendors_",void 0),nn(this,"vendorIds",void 0),nn(this,"fullVendorList",void 0),nn(this,"byPurposeVendorMap",void 0),nn(this,"bySpecialPurposeVendorMap",void 0),nn(this,"byFeatureVendorMap",void 0),nn(this,"bySpecialFeatureVendorMap",void 0),nn(this,"stacks",void 0),nn(this,"dataCategories",void 0),nn(this,"lang_",void 0),nn(this,"cacheLang_",void 0),nn(this,"isLatest",!1);let s=xo.baseUrl,n=null==t?void 0:t.language;if(n)try{n=xo.consentLanguages.parseLanguage(n)}catch(e){throw new $n("Error during parsing the language: "+e.message)}if(this.lang_=n||xo.DEFAULT_LANGUAGE,this.cacheLang_=n||xo.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new $n("must specify GVL.baseUrl before loading GVL json");if(e>0){const t=e;xo.CACHE.has(t)?(this.populate(xo.CACHE.get(t)),this.readyPromise=Promise.resolve()):(s+=xo.versionedFilename.replace("[VERSION]",String(t)),this.readyPromise=this.fetchJson(s))}else xo.CACHE.has(xo.LATEST_CACHE_KEY)?(this.populate(xo.CACHE.get(xo.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+xo.latestFilename))}}}nn(xo,"LANGUAGE_CACHE",new Map),nn(xo,"CACHE",new Map),nn(xo,"LATEST_CACHE_KEY",0),nn(xo,"DEFAULT_LANGUAGE","EN"),nn(xo,"consentLanguages",new Kn),nn(xo,"baseUrl_",void 0),nn(xo,"latestFilename","vendor-list.json"),nn(xo,"versionedFilename","archives/vendor-list-v[VERSION].json"),nn(xo,"languageFilename","purposes-[LANG].json");class Lo extends jn{set gvl(e){xo.isInstanceOf(e)||(e=new xo(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),!(Number.isInteger(e)&&e>1))throw new zn("cmpId",e);this.cmpId_=e}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new zn("cmpVersion",e);this.cmpVersion_=e}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new zn("consentScreen",e);this.consentScreen_=e}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(!/^([A-z]){2}$/.test(e))throw new zn("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if((e=Number(e)>>0)<0)throw new zn("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new zn("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if("object"==typeof this.customPurposes){const t=Object.keys(this.customPurposes).sort(((e,t)=>Number(e)-Number(t)));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new zn("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}constructor(e){super(),nn(this,"isServiceSpecific_",!1),nn(this,"supportOOB_",!0),nn(this,"useNonStandardTexts_",!1),nn(this,"purposeOneTreatment_",!1),nn(this,"publisherCountryCode_","AA"),nn(this,"version_",2),nn(this,"consentScreen_",0),nn(this,"policyVersion_",4),nn(this,"consentLanguage_","EN"),nn(this,"cmpId_",0),nn(this,"cmpVersion_",0),nn(this,"vendorListVersion_",0),nn(this,"numCustomPurposes_",0),nn(this,"gvl_",void 0),nn(this,"created",void 0),nn(this,"lastUpdated",void 0),nn(this,"specialFeatureOptins",new Yn),nn(this,"purposeConsents",new Yn),nn(this,"purposeLegitimateInterests",new Yn),nn(this,"publisherConsents",new Yn),nn(this,"publisherLegitimateInterests",new Yn),nn(this,"publisherCustomConsents",new Yn),nn(this,"publisherCustomLegitimateInterests",new Yn),nn(this,"customPurposes",void 0),nn(this,"vendorConsents",new Yn),nn(this,"vendorLegitimateInterests",new Yn),nn(this,"vendorsDisclosed",new Yn),nn(this,"vendorsAllowed",new Yn),nn(this,"publisherRestrictions",new Wn),e&&(this.gvl=e),this.updated()}}nn(Lo,"consentLanguages",xo.consentLanguages);class Bo{static encode(e,t){let s,n="";return e=Ao.process(e,t),s=Array.isArray(null==t?void 0:t.segments)?t.segments:new No(e,t)[""+e.version],s.forEach(((t,o)=>{let i="";o{this.invokeCallback(s.getJson())}))}}),nn(Uo,Mo,class extends Ln{respond(){this.listenerId=Bn.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}),nn(Uo,Do,class extends xn{respond(){this.invokeCallback(Bn.eventQueue.remove(this.param))}});class $o{static has(e){return"string"==typeof e&&(e=Number(e)),this.set_.has(e)}}nn($o,"set_",new Set([0,2,void 0,null]));class zo{apiCall(e,t,s,...n){if("string"!=typeof e)s(null,!1);else if($o.has(t)){if("function"!=typeof s)throw new Error("invalid callback function");Bn.disabled?s(new Rn,!1):this.isCustomCommand(e)||this.isBuiltInCommand(e)?this.isCustomCommand(e)&&!this.isBuiltInCommand(e)?this.customCommands[e](s,...n):e===mn.PING?this.isCustomCommand(e)?new Uo[e](this.customCommands[e],n[0],null,s):new Uo[e](s,n[0]):void 0===Bn.tcModel?this.callQueue.push([e,t,s,...n]):this.isCustomCommand(e)&&this.isBuiltInCommand(e)?new Uo[e](this.customCommands[e],n[0],null,s):new Uo[e](s,n[0]):s(null,!1)}else s(null,!1)}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach((e=>{window.__tcfapi(...e)}))}isCustomCommand(e){return this.customCommands&&"function"==typeof this.customCommands[e]}isBuiltInCommand(e){return void 0!==Uo[e]}constructor(e){if(nn(this,"callQueue",void 0),nn(this,"customCommands",void 0),e){let t=mn.ADD_EVENT_LISTENER;if(null==e?void 0:e[t])throw new Error(`Built-In Custom Commmand for ${t} not allowed: Use ${mn.GET_TC_DATA} instead`);if(t=mn.REMOVE_EVENT_LISTENER,null==e?void 0:e[t])throw new Error(`Built-In Custom Commmand for ${t} not allowed`);(null==e?void 0:e[mn.GET_TC_DATA])&&(e[mn.ADD_EVENT_LISTENER]=e[mn.GET_TC_DATA],e[mn.REMOVE_EVENT_LISTENER]=e[mn.GET_TC_DATA]),this.customCommands=e}try{this.callQueue=window.__tcfapi()||[]}catch(e){this.callQueue=[]}finally{window.__tcfapi=this.apiCall.bind(this),this.purgeQueuedCalls()}}}class Fo{throwIfInvalidInt(e,t,s){if(!("number"==typeof e&&Number.isInteger(e)&&e>=s))throw new Error(`Invalid ${t}: ${e}`)}update(e,t=!1){if(Bn.disabled)throw new Error("CmpApi Disabled");Bn.cmpStatus=Cn.LOADED,t?(Bn.displayStatus=_n.VISIBLE,Bn.eventStatus=bn.CMP_UI_SHOWN):void 0===Bn.tcModel?(Bn.displayStatus=_n.DISABLED,Bn.eventStatus=bn.TC_LOADED):(Bn.displayStatus=_n.HIDDEN,Bn.eventStatus=bn.USER_ACTION_COMPLETE),(Bn.gdprApplies=null!==e)?(""===e?((Bn.tcModel=new Lo).cmpId=Bn.cmpId,Bn.tcModel.cmpVersion=Bn.cmpVersion):Bn.tcModel=Bo.decode(e),Bn.tcModel.isServiceSpecific=this.isServiceSpecific,Bn.tcfPolicyVersion=Number(Bn.tcModel.policyVersion),Bn.tcString=e):Bn.tcModel=null,0===this.numUpdates?this.callResponder.purgeQueuedCalls():Bn.eventQueue.exec(),this.numUpdates++}disable(){Bn.disabled=!0,Bn.cmpStatus=Cn.ERROR}constructor(e,t,s=!1,n){nn(this,"callResponder",void 0),nn(this,"isServiceSpecific",void 0),nn(this,"numUpdates",0),this.throwIfInvalidInt(e,"cmpId",2),this.throwIfInvalidInt(t,"cmpVersion",0),Bn.cmpId=e,Bn.cmpVersion=t,Bn.tcfPolicyVersion=4,this.isServiceSpecific=!!s,this.callResponder=new zo(n)}}var Ko=class extends Ds{initializeConsent(){}async _init(){try{var e;null===(e=this.cmpApi)||void 0===e||e.update(null,!1)}catch(e){console.log(`[IABNoOp] Catching error: ${e}`)}}getIABConsent(){this.checkInitialized()}setIABConsent(){this.checkInitialized()}getIABContent(){this.checkInitialized()}wasGiven(){return!0}constructor(){super();if(this.cmpId=parseInt("406"),window.__tcfapi){const e=(e,t,s)=>{try{null!=t&&"boolean"!=typeof t&&(t.addtlConsent=null),e(t,s)}catch(e){console.log(`[IABNoOp] Catching error at middleware: ${e}`)}};try{this.cmpApi=new Fo(this.cmpId,parseInt("1"),!0,{getTCData:e,getInAppTCData:e})}catch(e){console.log(`[IABNoOp] Catching error at constructor: ${e}`)}}}};function Ho(e){const t=new Set;return Object.values(e.vendors).filter((e=>e.specialPurposes.length>0)).forEach((e=>e.legIntPurposes.forEach((e=>t.add(e))))),t}let jo;!function(e){e.encode=(e,t,s)=>{const n=new Lo(t);return n.cmpId=s,n.isServiceSpecific=!0,"addAll"in e?e.addAll&&(n.purposeConsents.setAll(t.purposes),n.purposeLegitimateInterests.set(Ho(t)),n.specialFeatureOptins.setAll(t.specialFeatures),n.vendorConsents.setAll(t.vendors),n.vendorLegitimateInterests.setAll(t.vendors)):(n.purposeConsents.set(e.purposeConsents),n.purposeLegitimateInterests.set(e.purposeLegitimateInterests),n.specialFeatureOptins.set(e.specialFeatureOptins),n.vendorConsents.set(e.vendorConsents),n.vendorLegitimateInterests.set(e.vendorLegitimateInterests)),Bo.encode(n)},e.encodeGoogleConsent=(e,t)=>{let s=[],n=[];return"addAll"in e?s=t.map((({id:e})=>e)):t.forEach((({id:t})=>{(e.googleVendors.has(t)?s:n).push(t)})),s.sort(((e,t)=>e-t)),n.sort(((e,t)=>e-t)),`2~${s.join(".")}~dv.${n.join(".")}`};const t=e=>{const t=e.replace(/^[0-9]+~([0-9\.]*)(?:~dv.*)?$/,"$1").split(".").map((e=>parseInt(e))).filter((e=>!Number.isNaN(e)));return new Set(t)};e.toConsent=(e,s,n)=>(n||(e.purposeLegitimateInterests.set(Ho(e.gvl)),e.vendorLegitimateInterests.setAll(e.gvl.vendors)),{purposeConsents:new Set(e.purposeConsents.values()),purposeLegitimateInterests:new Set(e.purposeLegitimateInterests.values()),specialFeatureOptins:new Set(e.specialFeatureOptins.values()),vendorConsents:new Set(e.vendorConsents.values()),vendorLegitimateInterests:new Set(e.vendorLegitimateInterests.values()),googleVendors:t(s)})}(jo||(jo={}));var Go=jo;let Wo;!function(e){const t=(e,t,s,n)=>Object.values(e).map((e=>({id:e.id,name:e.name,description:e.description,illustrations:e.illustrations,consent:t,legIntConsent:((null==n?void 0:n[e.id])||0)>0,vendors:(s[e.id]||0)+((null==n?void 0:n[e.id])||0)}))),s=(e,t)=>null==e?void 0:e.map((e=>{var s;return{id:e,name:(null===(s=t[e])||void 0===s?void 0:s.name)||e.toString()}}));e.toIABContent=(e,n,o)=>{const i=(o.googleVendors?n.filter((e=>o.googleVendors.includes(e.id))):n).map((e=>({...e,consent:!0,legIntConsent:!1}))),r=((e,t)=>Object.values(e.vendors).filter((e=>!t||t.includes(e.id))).map((t=>({id:t.id,name:t.name,consent:!0,legIntConsent:t.legIntPurposes.length>0,purposes:s(t.purposes,e.purposes),legIntPurposes:s(t.legIntPurposes,e.purposes),flexiblePurposes:s(t.flexiblePurposes,e.purposes),specialPurposes:s(t.specialPurposes,e.specialPurposes),features:s(t.features,e.features),specialFeatures:s(t.specialFeatures,e.specialFeatures),cookieMaxAgeSeconds:t.cookieMaxAgeSeconds,usesCookies:t.usesCookies,cookieRefresh:t.cookieRefresh,usesNonCookieAccess:t.usesNonCookieAccess,dataDeclaration:s(t.dataDeclaration,e.dataCategories),privacyPolicyUrl:t.policyUrl,deviceStorageDisclosureUrl:t.deviceStorageDisclosureUrl,urls:t.urls}))))(e,o.iabVendors),a=(e=>{const t={purposes:{},legIntPurposes:{},specialPurposes:{},features:{},specialFeatures:{}},s=Object.keys(t);return e.forEach((e=>{s.forEach((s=>{e[s].forEach((({id:e})=>{t[s][e]=(t[s][e]||0)+1}))}))})),t})(r);return{purposes:t(e.purposes,!0,a.purposes,a.legIntPurposes),specialPurposes:t(e.specialPurposes,!1,a.specialPurposes),features:t(e.features,!1,a.features),specialFeatures:t(e.specialFeatures,!0,a.specialFeatures),vendors:r,googleVendors:i}}}(Wo||(Wo={}));var qo=Wo;const Zo=["ar","bg","cs","da","de","el","en","en-gb","es","fi","fr","he","hr","hu","it","nb","no","nl","pl","pt","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","uk","ca","hi","id"],Yo=["ar","he"],Qo=(e,t=Zo)=>{const s=(e=>{const t=null==e?void 0:e.toLowerCase();return(null==t?void 0:t.length)>2&&"-"!==(null==t?void 0:t[2])?`${t.slice(0,2)}-${t.slice(2)}`:t})(e);return s&&t.includes(s)?s:s&&s.length>2?Qo(s.slice(0,2),t):void 0},Jo=e=>{var t,s,n;const{scriptTag:o,urlParams:i}=Ts(),r=(null===(t=window.illow)||void 0===t?void 0:t.customization)||{},a=[e,null===(s=r.settings)||void 0===s?void 0:s.languageUsed,null===(n=r.settings)||void 0===n?void 0:n.lng,Rs(o,i,"lang"),navigator.language,navigator.languages[0]];for(let e=0;et.push(e.toLowerCase())));const s=Qo(e,t);if(!s)return;const[n]=await Promise.all([this.fetchMessages(s),this.gvl.readyPromise]);if(this.destroyed)return;const[o,{googleVendors:i},r]=await Promise.all([this.i18n.updateTranslations(e,n),this.googleFetch,this.selectedVendors,this.gvl.changeLanguage(s)]);return this.iabContent=qo.toIABContent(this.gvl,i,r),o}async _init(){await this.readyPromise}getGVL(){if(this.checkInitialized(),!this.gvl)throw new Error("No GVL found");return this.gvl}getIABContent(){if(this.checkInitialized(),!this.iabContent)throw new Error("IAB content not loaded");return this.iabContent}destroy(){this.destroyed=!0,this.i18n.removeLanguageListener(this.listenerId),this.i18n.resetTranslations()}constructor(e,t,s){super(),this.siteId=t,this.i18n=e,this.messagesCache={},this.listenerId=this.i18n.addLanguageListener(this),this.googleFetch=fetch("https://platform.illow.io/google/googleVendors.json").then((e=>e.json())),this.selectedVendors=fetch(`https://api.platform.illow.io/public/vendors/${this.siteId}`).then((e=>e.json())),this.gvl=this.createGVL(),this.readyPromise=this.setLanguage(this.i18n.language),this.destroyed=!1,this.isLink=s}};let ei;(ei||(ei={})).broadcastACString=e=>{const{images:t}=window.document;for(let s=0;s{try{null!=t&&"boolean"!=typeof t&&(t.addtlConsent=this.acString,t.enableAdvertiserConsentMode=!0),e(t,s)}catch(e){console.log(`Catching error: ${e}`)}};this.cmpApi=new Fo(this.cmpId,parseInt("1"),!0,{getTCData:o,getInAppTCData:o}),this.consentWasGiven=!1}};const ni=",";var oi=class{getLocalItem(e){return gn(e)||window.localStorage.getItem(e)}setLocalItem(e,t){pn(e,t),window.localStorage.setItem(e,t)}removeLocalItem(e){fn(e),window.localStorage.removeItem(e)}migrateConsent(){const e=window.localStorage.getItem(this.deprecatedConsentKey);let t=this.getLocalItem(this.activeConsentKey),s=!1;if(!t&&e&&(t=e,s=!0),t&&t.startsWith("{")){const e=JSON.parse(t);t=en.transformFromCookieConsent(e,this.separator),s=!0}s&&this.setLocalItem(this.activeConsentKey,t),e&&window.localStorage.removeItem(this.deprecatedConsentKey)}getConsent(){const e=this.getLocalItem(this.activeConsentKey);return{...e&&en.transformToCookieConsent(e,!0,this.separator)||{},userId:this.userId}}setConsent(e){const t=this.getConsent(),s=Date.now(),n={...t,...e,updatedAt:s,createdAt:t.createdAt||s},o=en.transformFromCookieConsent(n,this.separator);this.setLocalItem(this.activeConsentKey,o)}consentWasGiven(){return this.getConsent().isPreviousConsent||!1}getConsentKeys(){return[this.activeConsentKey,this.activeIabKey,this.userIdKey,this.baseConsentKey,this.baseIABConsentKey]}identifyActiveKeys(){this.activeConsentKey=`${this.baseConsentKey}-${this.userId}`,this.activeIabKey=`${this.baseIABConsentKey}-${this.userId}`}identify(e){return this.setLocalItem(this.userIdKey,e),this.userId=e,this.identifyActiveKeys(),this.getConsent()}removeIdentity(){this.removeLocalItem(this.userIdKey),this.activeConsentKey=this.baseConsentKey,this.activeIabKey=this.baseIABConsentKey,this.userId=void 0}getPrivacyClicks(){return{privacyPolicyUrl:!!window.localStorage.getItem("CLICKED_POLICY"),cookiesUrl:!!window.localStorage.getItem("CLICKED_COOKIES")}}getTCString(){return this.getIabConsentInserted().split(ni)[0]}getIabConsentInserted(){return window.localStorage.getItem(this.activeIabKey)||""}setIABConsent(e,t){const s=`${e},${t||""}`;window.localStorage.setItem(this.activeIabKey,s)}getGoogleConsent(){return this.getIabConsentInserted().split(ni)[1]||""}getIABConsent(){const[e,t]=this.getIabConsentInserted().split(ni);return{tcString:e||"",googleConsent:t||""}}constructor(e){nn(this,"separator","|"),this.deprecatedConsentKey="illow-consent",this.baseConsentKey=`${this.deprecatedConsentKey}-${e}`,this.baseIABConsentKey=`${this.deprecatedConsentKey}-iab-${e}`,this.userIdKey=`${this.deprecatedConsentKey}-userId-${e}`,this.activeConsentKey=this.baseConsentKey,this.activeIabKey=this.baseIABConsentKey,this.migrateConsent(),this.userId=this.getLocalItem(this.userIdKey),this.userId&&this.identifyActiveKeys()}};var ii=class extends Ds{async _init(){await this.createIframeIllow(),this.consent=await this.getConsentIframe()}async createIframeIllow(){const e=document.createElement("iframe");e.style.display="hidden",e.src=`${this.origin}/crossDomain.html`,e.id="crossDomainIllowIframe",e.style.display="none",document.body.appendChild(e),await new Promise((t=>{setTimeout((()=>t()),1e4),e.onload=()=>{t()}})),this.iframe=e}sendMessage(e,t){this.iframe.contentWindow.postMessage({event:e,data:t},this.origin)}getConsent(){var e;if(!((null===(e=this.consent)||void 0===e?void 0:e.consent.createdAt){setTimeout((()=>t(void 0)),3e3),window.addEventListener("message",(e=>{e.origin===this.origin&&"previousConsent"===e.data.event&&t(e.data.storedData)}),{signal:e.signal}),this.sendMessage("checkCookies",this.clusterId)}));return e.abort(),t}sendConsent(e,t,s){this.sendMessage("setConsent",{clusterId:this.clusterId,consent:{consent:e,iabConsent:t,googleValues:s}})}constructor(e,t,s){super(),this.clusterId=e,this.origin=t,this.addedToClusterAt=s}};class ri extends Ds{async _init(){await this.iframeStore.init()}getConsent(){const e=this.localConsentStore.getConsent(),t=this.iframeStore.getConsent();if(!t)return e;const s=t.consent;if(e["consent-id"]===s["consent-id"])return e;if(void 0===e["consent-id"]||s.updatedAt>e.updatedAt){const e={...s};return delete e["consent-id"],e.crossConsent=!0,e}return e}setConsent(e){var t;const s=this.iframeStore.getConsent();this.localConsentStore.setConsent(e);const n=this.localConsentStore.getConsent();(void 0===s||e.updatedAt>(null==s||null===(t=s.consent)||void 0===t?void 0:t.updatedAt))&&this.iframeStore.sendConsent(n)}consentWasGiven(){return this.localConsentStore.consentWasGiven()}getConsentKeys(){return this.localConsentStore.getConsentKeys()}identify(e){return this.localConsentStore.identify(e)}removeIdentity(){this.localConsentStore.removeIdentity()}getPrivacyClicks(){return this.localConsentStore.getPrivacyClicks()}getTCString(){return this.localConsentStore.getTCString()}setIABConsent(e,t){this.localConsentStore.setIABConsent(e,t)}getGoogleConsent(){return this.localConsentStore.getGoogleConsent()}getIABConsent(){return this.localConsentStore.getIABConsent()}constructor(e,t){super(),this.iframeStore=t,this.localConsentStore=e}}class ai extends Ds{restoreCategoryService({category:e,service:t}){this.cookieFreezer.takeCategoryOutOfFreezer(e,t).forEach((e=>document.cookie=e));this.localStorageFreezer.takeCategoryOutOfFreezer(e,t).map((({key:e,value:t})=>window.localStorage.setItem(e,t)))}freezeExistingCookies(e){e.split(";").filter((e=>e.length>0)).forEach((e=>{const[t]=un(e),{category:s,service:n}=this.categoriesStore.getCategoryServiceByElement(t);this.consentStore.get(s,n)||(this.cookieFreezer.putInFreezer(s,e.trim(),n),fn(t))}))}freezeExistingLocalStorage(){Object.entries(window.localStorage).forEach((([e,t])=>{if(!this.consentStore.isNecessaryKey(e)){const{category:s,service:n}=this.categoriesStore.getCategoryServiceByElement(e);this.consentStore.get(s,n)||(this.localStorageFreezer.putInFreezer(s,{key:e,value:t},n),window.localStorage.removeItem(e))}}))}async _init(){try{var e;const[t,s]=await Promise.all([this.configurationsPromise,this.customizationPromise,this.categoriesStore.init()]);if(t.status>=400)throw new Error("[illow] Could not retrieve banner configurations. Please check that your siteId is correct or contact support");if(s.status>=400)throw new Error("[illow] Could not retrieve banner customization. Please check that your siteId is correct or contact support");this.configurations=t.body,this.customization=s.body,this.configurations.permissive="US"===this.categoriesStore.getCategoryModel()||this.configurations.permissive;const n=null===(e=this.configurations.linkedDomains)||void 0===e?void 0:e.find((e=>void 0===e.deletedAt));if(n){const e=new ri(this.localStore,new ii(n.clusterId,"https://platform.illow.io",n.createdAt));await e.init(),this.consentStore.setLocalConsentStore(e)}this.consentStore.setPermissive(this.configurations.permissive),await this.consentStore.init();const o=this.configurations.resourceBlocker&&"gl"===this.categoriesStore.getCategoryModel();this.iframeBlocker.setBlocking(o),this.linkBlocker.setBlocking(o);const i="link"===this.customization.customization.settings.showCircledWidget;this.iabConsentManager=this.configurations.iabEnabled&&this.categoriesStore.isIABBannerApplicable()?new si(this.consentStore,this.i18n,this.siteId,i):new Ko,await Promise.all([this.iabConsentManager.init(),this.iframeBlocker.init(),this.linkBlocker.init(),...this.externalConsentManagers.map((e=>e.init()))]);const r=Vs((()=>document.cookie),(e=>this.freezeExistingCookies(e))),a=Vs((()=>JSON.stringify(Object.keys(localStorage))),(()=>this.freezeExistingLocalStorage()));this.eventListeners.push(r),this.eventListeners.push(a)}catch(e){throw this.destroy(),e}}destroy(){this.linkBlocker.unblockAll(),this.iframeBlocker.unblockAll(),this.eventListeners.map(Ms)}updateConsentForCategoryService(e,t,s){const n=this.consentStore.get(e,t);s&&!n?this.restoreCategoryService({category:e,service:t}):!s&&n&&this.freezeCategoryService({category:e,service:t})}updateConsentForCategory(e,t){if("boolean"==typeof t)return this.updateConsentForCategoryService(e,"",t);t.services.forEach((t=>this.updateConsentForCategoryService(e,t.id,t.value)))}async enablePermissions(e={},t=!0,s){this.checkInitialized();const n=this.categoriesStore.getCategoryModel();this.consentStore.set("consentDataAnalitycs",e.consentDataAnalitycs);Object.entries(e).filter((([e])=>{var t;return!!(null===(t=Xs[n])||void 0===t?void 0:t.categories.find((t=>t.name===e)))})).forEach((([e,t])=>{this.iframeBlocker.updateIframes(e,"boolean"==typeof t?t:t.value),this.linkBlocker.updateLinks(e,"boolean"==typeof t?t:t.value),this.updateConsentForCategory(e,t),this.consentStore.set(e,t)})),this.externalConsentManagers.forEach((e=>e.updateConsent()));const o=s?this.iabConsentManager.setIABConsent(s):void 0;return t&&await this.consentStore.storeConsent(null==o?void 0:o.tcString,null==o?void 0:o.googleConsent),this.consentStore.getAll()}async enableAllPermissions(e=!0){var t;const s=this.categoriesStore.getCategoryModel();return this.enablePermissions(null===(t=Xs[s])||void 0===t?void 0:t.categories.reduce(((e,t)=>({...e,[t.name]:!0})),{}),e,{addAll:!0})}consentWasGiven(){return this.checkInitialized(),this.consentStore.wasGiven()&&this.iabConsentManager.wasGiven()}async identify(e){this.checkInitialized(),await this.consentStore.identify(e),this.iabConsentManager.initializeConsent()}removeIdentity(){this.checkInitialized(),this.consentStore.removeIdentity(),this.iabConsentManager.initializeConsent()}getIABConsent(){return this.checkInitialized(),this.iabConsentManager.getIABConsent()}getIABContent(){return this.checkInitialized(),this.iabConsentManager.getIABContent()}getConsent(){return this.checkInitialized(),this.consentStore.getAll()}getCookies(){return this.checkInitialized(),this.categoriesStore.getCookies()}getCategoryModel(){return this.checkInitialized(),this.categoriesStore.getCategoryModel()}freezeCategoryService(e){const t=Object.entries(window.localStorage);document.cookie.split(";").filter((e=>e.length>0)).forEach((t=>{const[s]=un(t),{category:n,service:o}=this.categoriesStore.getCategoryServiceByElement(s);n!==e.category||o!==e.service||this.consentStore.isNecessaryKey(s)||(this.cookieFreezer.putInFreezer(n,t.trim(),o),fn(s))})),t.forEach((([t,s])=>{const{category:n,service:o}=this.categoriesStore.getCategoryServiceByElement(t);n!==e.category||o!==e.service||this.consentStore.isNecessaryKey(t)||(this.localStorageFreezer.putInFreezer(n,{key:t,value:s},o),window.localStorage.removeItem(t))}))}constructor(e,t,s){super(),this.i18n=t,this.siteId=e,this.cookieFreezer=new zs,this.localStorageFreezer=new zs,this.localStore=new oi(e),this.categoriesStore=new on(e,this.localStore.consentWasGiven(),t.language),this.consentStore=new sn(this.categoriesStore,e,s,this.localStore),this.externalConsentManagers=[new $s(this.consentStore,this.categoriesStore),new rn(this.consentStore,this.categoriesStore),new an(this.consentStore,this.categoriesStore),new dn(this.consentStore,this.categoriesStore)],this.iframeBlocker=new Zs(this.consentStore,this.i18n),this.linkBlocker=new cn(this.consentStore),this.eventListeners=[],this.configurationsPromise=us(`cookies/${e}/configurations`),this.customizationPromise=us(`banner-customization/${e}?lng=${t.language}`)}}class li extends sn{async storeConsent(){this.checkInitialized()}}class ci extends Ds{async loadContent(){var e;const t=(null===(e=window.illow)||void 0===e?void 0:e.configurations)||{},{scriptTag:s,urlParams:n}=Ts();this.localConfigurations={permissive:t.permissive||"true"===Rs(s,n,"permissive"),resourceBlocker:t.resourceBlocker||"true"===Rs(s,n,"resourceBlocker"),iabEnabled:t.iabEnabled||"true"===Rs(s,n,"iabEnabled"),showPoweredBy:t.showPoweredBy||"true"===Rs(s,n,"showPoweredBy"),noticeUSA:t.noticeUSA||"true"===Rs(s,n,"noticeUSA"),hideCloseOption:t.hideCloseOption||"true"===Rs(s,n,"hideCloseOption")},this.localConfigurations.iabEnabled&&this.categoriesStore.isIABBannerApplicable()?(this.contentReader=new Xo(this.i18n,this.siteId,!1),await this.contentReader.init()):void 0!==this.contentReader&&(this.contentReader.destroy(),this.contentReader=void 0)}async _init(){await this.categoriesStore.init(),await this.consentStore.init(),await this.loadContent()}destroy(){}async enablePermissions(e={},t=!1,s){return this.checkInitialized(),Object.entries(e).forEach((([e,t])=>this.consentStore.set(e,t))),this.consentStore.getAll()}async enableAllPermissions(){const e=this.categoriesStore.getCategoryModel();return this.enablePermissions(Xs[e].categories.reduce(((e,t)=>({...e,[t.name]:!0})),{}),!1,void 0)}consentWasGiven(){return!1}getConsent(){return this.checkInitialized(),this.consentStore.getAll()}getIABConsent(){this.checkInitialized()}getIABContent(){var e;return this.checkInitialized(),null===(e=this.contentReader)||void 0===e?void 0:e.getIABContent()}getCookies(){return this.checkInitialized(),this.categoriesStore.getCookies()}getCategoryModel(){return this.checkInitialized(),this.categoriesStore.getCategoryModel()}async identify(e){}async removeIdentity(){}constructor(e,t,s){super();const n=new oi(e);this.categoriesStore=new on(e,n.consentWasGiven(),t.language),this.consentStore=new li(this.categoriesStore,e,s,n,!1),this.i18n=t,this.siteId=e}}var di=e=>{const[t,s]=J((()=>({status:"loading",instance:e()}))),[,n]=J(!1);return ee((()=>{t.instance.init().then((()=>s((e=>t.instance===e.instance?{...e,status:"success"}:e))),(e=>{s((e=>t.instance===e.instance?{...e,status:"fail"}:e)),console.error(e)}))}),[t.instance]),{...t,refreshInstance:()=>{s({status:"loading",instance:e()})},reRender:()=>n((e=>!e))}};var ui=(e,t,s)=>{const{instance:n,reRender:o,status:i,refreshInstance:r}=di((()=>((e,t,s)=>{const{globalPrivacyControl:n}=window.navigator;return s?new ci(t,e,n):new ai(t,e,n)})(e,t,s)));s&&window.addEventListener("illow:refresh_widget",(()=>r()));const a="success"===i,l=(e,t,s)=>{a&&n.enablePermissions(e,t,s).then((e=>{Ns.dispatchConsentSet(e),o()}))},c=()=>a?n.getConsent():void 0;return window.illow={...window.illow,enablePermissions:l,getConsent:c,identify:e=>{a&&n.identify(e).then((()=>{Ns.dispatchUserIdentified(e),o()}))},removeIdentity:()=>{a&&(n.removeIdentity(),Ns.dispatchIdentityRemoved(),o())}},window.wibson=window.illow,{cookies:a&&n.getCookies()||[],consentWasGiven:a&&n.consentWasGiven()||!1,consent:c(),iabConsent:a&&n.getIABConsent()||void 0,iabContent:a&&n.getIABContent()||void 0,categoryModel:a&&n.getCategoryModel()||void 0,isConsentManagerReady:a,enablePermissions:l}};class hi extends Ds{async updateCustomization(e,t){if(!this.customization||e!==this.customization.settings.languageUsed){var s,n,o,i,r;const a=(null===(s=window.illow)||void 0===s?void 0:s.customization)||{},l=await this.fetchCustomization(a,e);if(this.customization=l,this.customization.settings.languageUsed=Qo(this.customization.settings.languageUsed),this.customization.settings.showOnEachSession){const e=document.cookie.split(";").some((e=>e.trim().startsWith(`illow-notice-shown-${this.siteId}`)));if(!e){let e=`illow-notice-shown-${this.siteId}=${encodeURIComponent(this.siteId)}`;document.cookie=e+"; path=/"}this.customization.settings.showOnEachSession=!e}t&&e!==this.customization.settings.languageUsed&&await this.i18n.setLanguage(this.customization.settings.languageUsed),await this.updateTranslations(this.customization.settings.languageUsed,[{key:"COOKIE-BANNER.BANNER.MAIN_MESSAGE",message:null===(n=l.messages)||void 0===n||null===(o=n.bannerMessages)||void 0===o?void 0:o.mainMessage},{key:"COOKIE-BANNER.BANNER.TITLE",message:null===(i=l.messages)||void 0===i||null===(r=i.bannerMessages)||void 0===r?void 0:r.title}])}}async updateTranslations(e,t){const s=t.filter((({message:e})=>!!e));if(s.length>0){const t=s.reduce(((e,{key:t,message:s})=>({...e,[t]:s})),{});await this.i18n.updateTranslations(e,t)}}async _init(){await this.updateCustomization(this.i18n.language,!0)}getCustomization(){return this.checkInitialized(),this.customization}setLanguage(e){return this.updateCustomization(e,!1)}constructor(e,t){super(),this.i18n=t,this.i18n.addLanguageListener(this),this.siteId=e}}class pi extends hi{async fetchCustomization(e,t){var s,n,o,i,r,a;const{scriptTag:l,urlParams:c}=Ts(),{colors:d,urls:u,settings:h,messages:p,bannerType:g,resources:f}=e;return{bannerType:g||Rs(l,c,"bannerType")||"fullyCompliantBanner",colors:{background:(null==d?void 0:d.background)||Rs(l,c,"backgroundColor"),buttonBackground:(null==d?void 0:d.buttonBackground)||Rs(l,c,"buttonBackgroundColor"),font:(null==d?void 0:d.font)||Rs(l,c,"fontColor")},urls:{privacyPolicy:(null==u?void 0:u.privacyPolicy)||Rs(l,c,"privacyPolicyUrl"),dsrForm:(null==u?void 0:u.dsrForm)||Rs(l,c,"dsrFormUrl"),cookiePolicy:(null==u?void 0:u.cookiePolicy)||Rs(l,c,"cookiePolicyUrl"),poweredByUrl:(null==u?void 0:u.poweredByUrl)||Rs(l,c,"poweredByUrl"),termsAndCondUrl:(null==u?void 0:u.termsAndCondUrl)||Rs(l,c,"termsAndCondUrl")},settings:{showPoweredBy:(null==h?void 0:h.showPoweredBy)||"true"===Rs(l,c,"showPoweredBy"),positioning:(null==h?void 0:h.positioning)||Rs(l,c,"positioning"),showDSRUrl:(null==h?void 0:h.showDSRUrl)||"true"===Rs(l,c,"showDsrUrl"),showCircledWidget:(null==h?void 0:h.showCircledWidget)||Rs(l,c,"showCircledWidget"),hideBanner:!1,hideInitialBanner:!1,bannerLogo:(null==h?void 0:h.bannerLogo)||Rs(l,c,"bannerLogo"),showCookiePolicyUrl:(null==h?void 0:h.showCookiePolicyUrl)||"true"===Rs(l,c,"showCookiePolicyUrl"),hideAdvancedPoweredBy:(null==h?void 0:h.hideAdvancedPoweredBy)||"true"===Rs(l,c,"hideAdvancedPoweredBy"),languageUsed:e.settings.languageUsed,showTermsAndCond:(null==h?void 0:h.showTermsAndCond)||"true"===Rs(l,c,"showTermsAndCond"),showOnEachSession:!1,hideCloseOption:(null==h?void 0:h.hideCloseOption)||"true"===Rs(l,c,"hideCloseOption")},messages:{bannerMessages:{mainMessage:(null==p||null===(s=p.bannerMessages)||void 0===s?void 0:s.mainMessage)||Rs(l,c,"mainMessage"),title:(null==p||null===(n=p.bannerMessages)||void 0===n?void 0:n.title)||Rs(l,c,"title"),necessary:(null==p||null===(o=p.bannerMessages)||void 0===o?void 0:o.necessary)||Rs(l,c,"necessary"),preferences:(null==p||null===(i=p.bannerMessages)||void 0===i?void 0:i.preferences)||Rs(l,c,"preferences"),statistics:(null==p||null===(r=p.bannerMessages)||void 0===r?void 0:r.statistics)||Rs(l,c,"statistics"),marketing:(null==p||null===(a=p.bannerMessages)||void 0===a?void 0:a.marketing)||Rs(l,c,"marketing")}},previewMode:!0,resources:f||{}}}}class gi extends hi{async fetchCustomization(e,t){var s;const{colors:n,settings:o}=e,i=await us(`banner-customization/${this.siteId}?lng=${t}`);if(i.status>=400)throw new Error("[illow] Could not retrieve banner customization. Please check that your siteId is correct or contact support");const{bannerType:r,customization:a}=i.body,l=await us(`cookies/${this.siteId}/configurations`);return{bannerType:r,colors:{background:(null==n?void 0:n.background)||a.colors.background,buttonBackground:(null==n?void 0:n.buttonBackground)||a.colors.buttonBackground,font:(null==n?void 0:n.font)||a.colors.font},urls:a.urls,settings:{showPoweredBy:l.body.showPoweredBy,positioning:(null==o?void 0:o.positioning)||a.settings.positioning,showDSRUrl:a.settings.showDSRUrl,showCircledWidget:void 0!==(null==o?void 0:o.showCircledWidget)&&null!==o.showCircledWidget?o.showCircledWidget:a.settings.showCircledWidget,hideBanner:a.settings.hideBanner,hideInitialBanner:(null==o?void 0:o.hideBanner)||!1,bannerLogo:a.settings.bannerLogo,showCookiePolicyUrl:a.settings.showCookiePolicyUrl,hideAdvancedPoweredBy:a.settings.hideAdvancedPoweredBy,showBlurBackground:a.settings.showBlurBackground,languageUsed:a.settings.languageUsed,showTermsAndCond:a.settings.showTermsAndCond,showOnEachSession:null===(s=e.settings)||void 0===s?void 0:s.showOnEachSession,hideCloseOption:null==l?void 0:l.body.hideCloseOption},messages:a.messages,previewMode:!1,resources:a.resources}}constructor(e,t){super(e,t),this.siteId=e}}var fi=(e,t,s)=>{const{instance:n,refreshInstance:o,status:i}=di((()=>((e,t,s)=>s?new pi(t,e):new gi(t,e))(e,t,s)));window.addEventListener("illow:refresh_widget",(()=>{o()}));const r=()=>{window.dispatchEvent(new Event("illow:refresh_widget")),Ns.dispatchWidgetRefreshed()};window.illow={...window.illow,refreshWidget:r,refreshCustomization:()=>r()},window.wibson=window.illow;const a="success"===i?n.getCustomization():void 0;return{customization:a,status:i,isCustomizationReady:!!a}};class mi{getLanguage(){return this.language}async setLanguage(e){this.language=e,await this.translationsStore.fetchTranslations(e)}translate(e,t){const s=this.translationsStore.getTranslations(this.language);return(null==s?void 0:s[e])?this.interpolator.interpolate(s[e],t||{},this.language,this.options):e}constructor(e,t,s){this.language=s.lng,this.translationsStore=e,this.interpolator=t,this.options=s}}function vi(e){return null==e?"":""+e}function Ci(e,t){const{obj:s,k:n}=function(e,t){function s(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function n(){return!e||"string"==typeof e}const o="string"!=typeof t?[].concat(t):t.split(".");for(;o.length>1;){if(n())return{};const t=s(o.shift());e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return n()?{}:{obj:e,k:s(o.shift())}}(e,t);if(s)return s[n]}function yi(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var _i={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function wi(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>_i[e])):e}function bi(e,t,s="."){if(!e)return;if(e[t])return e[t];const n=t.split(s);let o=e;for(let e=0;ee+i;)i++,r=n.slice(e,e+i).join(s),a=o[r];if(void 0===a)return;if(null===a)return null;if(t.endsWith(r)){if("string"==typeof a)return a;if(r&&"string"==typeof a[r])return a[r]}const l=n.slice(e+i).join(s);return l?bi(a,l,s):void 0}o=o[n[e]]}return o}function Ii(e,t,s,n=".",o=!0){let i=function(e,t,s){const n=Ci(e,s);return void 0!==n?n:Ci(t,s)}(e,t,s);return!i&&o&&"string"==typeof s&&(i=bi(e,s,n),void 0===i&&(i=bi(t,s,n))),i}var Si=class{init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:wi,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?yi(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?yi(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?yi(t.nestingPrefix):t.nestingPrefixEscaped||yi("$t("),this.nestingSuffix=t.nestingSuffix?yi(t.nestingSuffix):t.nestingSuffixEscaped||yi(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const s=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(s,"g")}interpolate(e,t,s,n){let o,i,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}const c=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Ii(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,s,{...n,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),r=o.join(this.formatSeparator).trim();return this.format(Ii(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),r,s,{...n,...t,interpolationkey:i})};this.resetRegExp();const d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,u=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>l(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?l(this.escape(e)):l(e)}].forEach((t=>{for(r=0;o=t.regex.exec(e);){const s=o[1].trim();if(i=c(s),void 0===i)if("function"==typeof d){const t=d(e,o,n);i="string"==typeof t?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,s))i="";else{if(u){i=o[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=vi(i));const a=t.safeValue(i);if(e=e.replace(o[0],a),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),e}nest(e,t,s={}){let n,o,i;function r(e,t){const s=this.nestingOptionsSeparator;if(e.indexOf(s)<0)return e;const n=e.split(new RegExp(`${s}[ ]*{`));let o=`{${n[1]}`;e=n[0],o=this.interpolate(o,i);const r=o.match(/'/g),a=o.match(/"/g);(r&&r.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${o}`}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let a=[];i={...s},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),a=e,l=!0}if(o=t(r.call(this,n[1].trim(),i),i),o&&n[0]===e&&"string"!=typeof o)return o;"string"!=typeof o&&(o=vi(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),l&&(o=a.reduce(((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:n[1].trim()})),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}constructor(e={},t=console){this.logger=t,this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}};class Ei extends Ds{_init(){return this.readyPromise}async _fetchTranslations(e){if(!e&&Object.keys(this.translations).length>0||this.translations[e])return;const t=await fetch(`${this.translationsUrl}/${e||"all"}.json`),s=await t.json();Object.entries(s).forEach((([e,t])=>{this.translations[e]=t}))}async fetchTranslations(e){return this.readyPromise=this._fetchTranslations(e),this.readyPromise}getTranslations(e){return{...this.translations[e]||{},...this.updates[e]||{}}}async updateTranslations(e,t){await this.readyPromise,this.updates[e]={...this.updates[e]||{},...t}}resetTranslations(){this.updates={}}constructor(e,t){super(),this.translationsUrl=e,this.translations={},this.updates={},this.readyPromise=this._fetchTranslations(t)}}function ki(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}class Ni extends Ds{initOptions(e,t){!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:void 0,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:void 0,parseMissingKeyHandler:void 0,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const s=e[3]||e[2];Object.keys(s).forEach((e=>{t[e]=s[e]}))}return t},interpolation:{escapeValue:!0,format:(e,t,s,n)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}},n={...s,...ki(e),lng:t};return"v1"!==n.compatibilityAPI&&(n.interpolation={...s.interpolation,...n.interpolation}),void 0!==e.keySeparator&&(n.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(n.userDefinedNsSeparator=e.nsSeparator),n.lng=Qo(n.lng),n}_init(){return this.services.store.init()}get language(){return this.translator.getLanguage()}dir(){return e=this.language,Yo.includes(e)?"rtl":"ltr";var e}async setLanguage(e){const t=Qo(e);t?t!==this.language&&await Promise.all([this.translator.setLanguage(t),...Object.values(this.languageListeners).map((e=>e.setLanguage(t)))]):console.warn("Invalid language")}t(...e){return this.translator.translate(...e)}updateTranslations(e,t){const s=Qo(e);if(s)return this.services.store.updateTranslations(s,t);console.warn("Invalid language")}resetTranslations(){return this.services.store.resetTranslations()}addLanguageListener(e){const t=this.lastLanguageListenerId++;return this.languageListeners[t]=e,t}removeLanguageListener(e){delete this.languageListeners[e]}constructor(e,t,s={}){super(),this.options=this.initOptions(s,t),this.languageListeners={},this.lastLanguageListenerId=0,this.services={store:new Ei(e,this.options.lng),interpolator:new Si(this.options)},this.translator=new mi(this.services.store,this.services.interpolator,this.options)}}const Oi=()=>{const e=Jo();return new Ni("https://platform.illow.io/translations",e)};var Ai=()=>{const{instance:e,reRender:t,status:s}=di(Oi);return window.addEventListener("illow:refresh_widget",(()=>e.resetTranslations())),window.illow={...window.illow,setLanguage:s=>{e.setLanguage(s).then((()=>{Ns.dispatchLanguageChanged(s),t()}))}},{i18n:e,status:s,isI18nReady:"success"===s}};const xi=({siteId:e,previewMode:t=!1})=>{const{i18n:s,isI18nReady:n}=Ai(),{isCustomizationReady:o,customization:i}=fi(s,e,t),{isConsentManagerReady:r,consentWasGiven:a,enablePermissions:l,cookies:c,consent:d,categoryModel:u,iabConsent:h,iabContent:g}=ui(s,e,t);return n&&o&&r&&i?p(Ls,{iabConsent:h,iabContent:g,cookies:c,siteId:e,enablePermissions:l,customization:i,consentWasGiven:a,consent:d,categoryModel:u,i18n:s}):p(f,null)};var Li=()=>{const{previewMode:e,siteId:t}=Ps();return t||e?p(xi,{siteId:t,previewMode:e}):p(f,null)};const Bi=e=>{const t=window.document,s=!!window.frames[e];if(!s)if(t.body){const s=t.createElement("iframe");s.style.cssText="display:none",s.name=e,t.body.appendChild(s)}else setTimeout((()=>Bi(e)),5);return!s},Ti=(...e)=>{try{var t;if(!e.length)return window.__tcfapiQueue;"ping"===e[0]?"function"==typeof e[2]&&e[2]({cmpLoaded:!1,cmpStatus:"stub"}):null===(t=window.__tcfapiQueue)||void 0===t||t.push(e)}catch(e){console.log(`Catching error at IAB stub: ${e}`)}},Ri=e=>{const t="string"==typeof e.data;let s={};if(t)try{s=JSON.parse(e.data)}catch(e){}else s=e.data;const n="object"==typeof s&&null!==s?s.__tcfapiCall:null;n&&window.__tcfapi(n.command,n.version,(function(s,o){let i={__tcfapiReturn:{returnValue:s,success:o,callId:n.callId}};e&&e.source&&e.source.postMessage&&e.source.postMessage(t?JSON.stringify(i):i,"*")}),n.parameter)},Pi=()=>{window.__tcfapiQueue=window.__tcfapiQueue||[],window.__tcfapi=Ti;Bi("__tcfapiLocator")&&window.addEventListener("message",Ri,!1),(()=>{const e=[],t=[];window.__tcfapiQueue.forEach((s=>{"ping"===s[0]?t.push(s):e.push(s)})),window.__tcfapiQueue=e,t.forEach((e=>window.__tcfapi(...e)))})()},Vi=()=>{const e=window.dataLayer||[],t=e.findIndex((e=>"consent"===e[0]));return e.slice(0,t).filter((e=>"string"!=typeof e.event||!e.event.startsWith("gtm.")))};var Mi=()=>{var e,t,s,n;const o=void 0===(null===(e=window.google_tag_data)||void 0===e||null===(t=e.ics)||void 0===t?void 0:t.wasSetLate)||!(null===(s=window.google_tag_data)||void 0===s||null===(n=s.ics)||void 0===n?void 0:n.wasSetLate);return{loadedOnTime:o,previousEvents:o?[]:Vi()}};(()=>{window.illow=window.illow||{};const e=!!window.illow.loaded;return window.illow.loaded=!0,e})()||(()=>{var e,t;const s=new URLSearchParams(document.currentScript.src.split("?").pop());if("true"!==s.get("noIab")&&Pi(),window.illow=window.illow||{},window.illow.googleConsentMode={isDisabled:"true"===s.get("noGoogleConsentMode"),urlPassthrough:"true"!==s.get("noUrlPassthrough"),includeGCMDefault:"true"===s.get("includeGCMDefault"),examine:Mi},"true"!==s.get("allowIframe")){const e=(n={childList:!0,subtree:!0},o=document,qs||(qs=new Ws(n,o)),qs);document.addEventListener("load",e.disconnect),Array.from(document.getElementsByTagName("iframe")).forEach((t=>e.blockIframes(t)))}var n,o;const{render:i}=(r=Li,{render:function(e){void 0===e&&(e={});var t=e.selector;void 0===t&&(t=null);var s=e.inline;void 0===s&&(s=!1);var n=e.clean;void 0===n&&(n=!1);var o=e.clientSpecified;void 0===o&&(o=!1);var i=e.defaultProps;void 0===i&&(i={});var a=z({selector:t,inline:s,clientSpecified:o}),l=function(){if(a.length>0){var e=z({selector:t,inline:s,clientSpecified:o});return F(r,e,null,n,i)}};l(),document.addEventListener("DOMContentLoaded",l),document.addEventListener("load",l)}});var r;const a=(null===(e=window.illow)||void 0===e||null===(t=e.customization)||void 0===t?void 0:t.renderAt)||"body",l=()=>i({selector:a});"loading"!==document.readyState?l():document.addEventListener("DOMContentLoaded",l)})()}();