vanilla-cookieconsent
Advanced tools
Comparing version 3.0.0-rc.7 to 3.0.0-rc.8
/*! | ||
* CookieConsent 3.0.0-rc.7 | ||
* CookieConsent 3.0.0-rc.8 | ||
* https://github.com/orestbida/cookieconsent | ||
@@ -7,2 +7,2 @@ * Author Orest Bida | ||
*/ | ||
const e='button',t=e=>'function'==typeof e,n=e=>{if('object'!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());let t=Array.isArray(e)?[]:{};for(let o in e){let a=e[o];t[o]=n(a)}return t},o=(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))},a=(e,a,r)=>{const c=i.t,s=i.o,l={cookie:i.l.i};if(a){const n={modalName:a};return e===s._?t(c._)&&c._(n):e===s.p?t(c.p)&&c.p(n):(n.modal=r,t(c.u)&&c.u(n)),o(e,n)}e===s.v?t(c.v)&&c.v(n(l)):e===s.m?t(c.m)&&c.m(n(l)):(l.changedCategories=i.l.g,l.changedServices=i.l.h,t(c.C)&&c.C(n(l))),o(e,n(l))};class r{constructor(){this.k={mode:'opt-in',revision:0,autoShow:!0,autoClearCookies:!0,manageScriptTags:!0,hideFromBots:!0,lazyHtmlGeneration:!0,cookie:{name:'cc_cookie',expiresAfterDays:182,domain:'',path:'/',sameSite:'Lax'}},this.l={M:null,S:'',T:{},A:null,i:null,B:[],D:null,H:null,V:null,F:'',N:!0,I:!1,j:!1,G:!1,P:!1,R:!1,O:!1,L:[],J:!1,U:!0,g:[],q:!1,K:'',W:!1,X:[],Y:[],Z:[],$:[],ee:!1,te:!1,ne:!1,oe:[],ae:[],re:[],ie:{},ce:{},se:{},h:{},le:{},de:[],fe:[]},this._e={pe:0,ue:0,ve:0,me:0,ge:0,be:0,he:0,ye:0,we:0,Ce:0,ke:0,xe:0,Me:0,Se:0,Te:0,Ae:0,Be:0,De:0,He:0,Ee:0,Ve:0,Fe:0,Ne:0,Ie:0,je:0,Ge:0,Pe:0,Re:0,Oe:0,Le:{},Je:{}},this.t={v:0,m:0,C:0,_:0,p:0,u:0},this.o={v:'cc:onFirstConsent',m:'cc:onConsent',C:'cc:onChange',_:'cc:onModalShow',p:'cc:onModalHide',u:'cc:onModalReady'}}}const i=new r,c=e=>Array.isArray(e),s=e=>!!e&&'object'==typeof e&&!c(e),l=(e,t)=>-1!==e.indexOf(t),d=t=>{const n=document.createElement(t);return t===e&&f(n,'type',t),n},f=(e,t,n)=>{e.setAttribute(t,n)},_=(e,t)=>{e.appendChild(t)},p=(e,t,n,o)=>{e.addEventListener(t,n),o&&i.l.B.push({Ue:e,ze:t,qe:n})},u=e=>Object.keys(e),v=(e,t)=>{e.classList.add(t)},m=(e,t)=>{v(e,'cm__'+t)},g=(e,t)=>{v(e,'pm__'+t)},b=(e,t)=>{e.classList.remove(t)},h=()=>{const e=i.k.cookie.expiresAfterDays;return t(e)?e(i.l.K):e},y=(e,t)=>e.filter((e=>!l(t,e))).concat(t.filter((t=>!l(e,t)))),w=()=>{i.l.K=(()=>{let e='custom',t=x().accepted;return t.length===i.l.X.length?e='all':t.length===i.l.Z.length&&(e='necessary'),e})()},C=(e,t,n,o)=>{const a='accept-',r=v('show-preferencesModal'),c=v('show-consentModal'),s=v(a+'all'),l=v(a+'necessary'),d=v(a+'custom'),_=!0===i.k.lazyHtmlGeneration;for(var u=0;u<r.length;u++)f(r[u],'aria-haspopup','dialog'),p(r[u],'click',(e=>{e.preventDefault(),t.showPreferences()}),!0),_&&p(r[u],'mouseover',(e=>{e.preventDefault(),i.l.P||n(t,o)}),!0);for(u=0;u<c.length;u++)f(c[u],'aria-haspopup','dialog'),p(c[u],'click',(e=>{e.preventDefault(),t.show(!0)}),!0);for(u=0;u<s.length;u++)p(s[u],'click',(e=>{m(e,'all')}),!0);for(u=0;u<d.length;u++)p(d[u],'click',(e=>{m(e)}),!0);for(u=0;u<l.length;u++)p(l[u],'click',(e=>{m(e,[])}),!0);function v(t){return(e||document).querySelectorAll('[data-cc="'+t+'"]')}function m(e,n){e.preventDefault(),t.acceptCategory(n),t.hidePreferences(),t.hide()}},k=e=>Array.from(new Set(e)),x=()=>{const e=i.l.X.filter((e=>!l(i.l.Y,e)));return{accepted:i.l.Y,rejected:e}},M=()=>{const t=i.l,n=['[href]',e,'input','details','[tabindex="0"]'].join(':not([tabindex="-1"]), '),o=(e,t)=>{const o=e&&e.querySelectorAll(n);t[0]=o[0],t[1]=o[o.length-1]};t.I&&o(i._e.be,t.oe),t.P&&o(i._e.He,t.ae)},S=e=>{const n=i.l,o=n.ce;if(n.X.forEach((e=>{(n.h[e]||n.ce[e]||[]).forEach((o=>{const a=n.ie[e][o];a&&(!a.enabled&&l(n.ce[e],o)&&t(a.onAccept)?(a.enabled=!0,a.onAccept()):a.enabled&&!l(n.ce[e],o)&&t(a.onReject)&&(a.enabled=!1,a.onReject()))}))})),!i.k.manageScriptTags)return;var a=n.de,r=e||n.i.categories||[];const c=(e,t)=>{if(t<e.length){var a=e[t],i=n.fe[t],s=i.Ke,_=i.Qe,p=l(r,s),u=!!_&&l(o[s],_);if(!i.We){var v=!_&&!i.Xe&&p,m=_&&!i.Xe&&u,g=!_&&i.Xe&&!p&&l(n.g,s),b=_&&i.Xe&&!u&&l(n.h[s]||[],_);if(v||g||m||b){i.We=!0,a.removeAttribute('type'),a.removeAttribute('data-category');let n=a.getAttribute('data-src');n&&a.removeAttribute('data-src');const o=d('script');if(o.textContent=a.innerHTML,((e,t)=>{for(var n=t.attributes,o=n.length,a=0;a<o;a++){var r=n[a].nodeName;f(e,r,t[r]||t.getAttribute(r))}})(o,a),n?o.src=n:n=a.src,n&&(o.onload=o.onerror=()=>{c(e,++t)}),a.replaceWith(o),n)return}}c(e,++t)}};c(a,0)},T=e=>{const t=i.l.M.guiOptions,n=t&&t.consentModal,o=t&&t.preferencesModal,a=(e,t,n,o,a,r)=>{var c=n&&n.layout,s=n&&n.position,d=n&&!0===n.flipButtons,f=n&&!1===n.equalWeightButtons,_=c&&c.split(' ')||[],p=s&&s.split(' ')||[],u=_[0],m=_[1],g=p[0],h='pm--'===o?p[0]:p[1],y=u,w=t[u];w||(w=t[a],y=a);var C=l(w.Ye,m)&&m,k=l(w.Ze,g)?g:w.$e,x=l(w.et,h)?h:w.tt;e.className=r,v(e,o+y),C&&v(e,o+C),k&&v(e,o+k),x&&v(e,o+x),d&&v(e,o+'flip');const M='btn--secondary',S=r+'__';if('cm'===r){const{Te:e,De:t}=i._e;e&&b(e,S+M),t&&b(t,S+M),f&&(e&&v(e,S+M),t&&v(t,S+M))}else{const{Re:e}=i._e;e&&b(e,S+M),f&&e&&v(e,S+M)}};if(0===e){const e=['middle','top','bottom'],t=['left','center','right'],o={box:{Ye:['wide','inline'],Ze:e,et:t,$e:'bottom',tt:'right'},cloud:{Ye:['inline'],Ze:e,et:t,$e:'bottom',tt:'center'},bar:{Ye:['inline'],Ze:e.slice(1),et:[],$e:'bottom',tt:''}};a(i._e.be,o,n,'cm--','box','cm')}if(1===e){const e={box:{Ye:[],Ze:[],et:[],$e:'',tt:''},bar:{Ye:['wide'],Ze:[],et:['left','right'],$e:'',tt:'left'}};a(i._e.He,e,o,'pm--','box','pm')}},A=(t,n)=>{const o=i.l,r=i._e,c=o.A&&o.A.preferencesModal;if(!c)return;var s=c.title,l=c.closeIconLabel,m=c.acceptAllBtn,h=c.acceptNecessaryBtn,y=c.savePreferencesBtn,w=c.sections;if(r.ge)r.Ie=d('div'),g(r.Ie,'body');else{r.ge=d('div'),v(r.ge,'pm-wrapper'),r.He=d('div'),r.He.style.visibility='hidden',v(r.He,'pm'),f(r.He,'role','dialog'),f(r.He,'aria-hidden',!0),f(r.He,'aria-modal',!0),p(r.ue,'keydown',(e=>{27===e.keyCode&&t.hidePreferences()}),!0),r.Ee=d('div'),g(r.Ee,'header'),r.Ve=d('div'),g(r.Ve,'title'),f(r.Ve,'role','heading'),r.Fe=d(e),g(r.Fe,'close-btn'),f(r.Fe,'aria-label',c.closeIconLabel||''),p(r.Fe,'click',t.hidePreferences),r.Ne=d('div'),g(r.Ne,'body'),r.Ge=d('div'),g(r.Ge,'footer');var C=d('div');v(C,'btns');var k=d('div'),x=d('div');g(k,'btn-group'),g(x,'btn-group'),_(r.Ge,x),_(r.Ge,k),_(r.Ee,r.Ve),_(r.Ee,r.Fe),_(r.He,r.Ee),_(r.He,r.Ne),_(r.He,r.Ge),_(r.ge,r.He)}let S;function A(e){t.acceptCategory(e),t.hidePreferences(),t.hide()}s&&(r.Ve.innerHTML=s,l&&f(r.Fe,'aria-label',l)),w&&w.forEach((t=>{var n=t.title,a=t.description,i=t.linkedCategory,s=i&&o.W[i],l=t.cookieTable,m=l&&l.body,h=m&&m.length>0,y=!!s,w=y&&o.ie[i]||!1,C=w&&u(w)||[],k=y&&(!!a||!!h||u(w).length>0),x=d('div');if(g(x,'section'),k||a){var M=d('div');g(M,'section-desc-wrapper')}let T=C.length;if(k&&T>0){var A=d('div');g(A,'section-services'),C.forEach((e=>{var t=w[e].label||e,n=d('div'),o=d('div'),a=d('div'),r=d('div');g(n,'service'),g(r,'service-title'),g(o,'service-header'),g(a,'service-icon');var c=B(t,e,s,!0,i);r.innerHTML=t,_(o,a),_(o,r),_(n,o),_(n,c),_(A,n)})),_(M,A)}if(n){var D=d('div'),H=d(y?e:'div');if(g(D,'section-title-wrapper'),g(H,'section-title'),H.innerHTML=n,_(D,H),y){var E=d('span');g(E,'section-arrow'),_(D,E),x.className+='--toggle';var V=B(n,i,s);let e=c.serviceCounterLabel;if(T>0&&'string'==typeof e){let t=d('span');g(t,'badge'),g(t,'service-counter'),f(t,'aria-hidden',!0),f(t,'data-servicecounter',T),e&&(e=e.split('|'),e=e.length>1&&T>1?e[1]:e[0],f(t,'data-counterlabel',e)),t.innerHTML=T+(e?' '+e:''),_(H,t)}if(k){g(x,'section--expandable');var F=i+'-desc';f(H,'aria-expanded',!1),f(H,'aria-controls',F)}_(D,V)}else f(H,'role','heading'),f(H,'aria-level','3');_(x,D)}if(a){var N=d('div');g(N,'section-desc'),N.innerHTML=a,_(M,N)}if(k&&(f(M,'aria-hidden','true'),M.id=F,((e,t,n)=>{p(H,'click',(()=>{t.classList.contains('is-expanded')?(b(t,'is-expanded'),f(n,'aria-expanded','false'),f(e,'aria-hidden','true')):(v(t,'is-expanded'),f(n,'aria-expanded','true'),f(e,'aria-hidden','false'))}))})(M,x,H),h)){var I=d('table'),j=d('thead'),G=d('tbody');g(I,'section-table'),g(j,'table-head'),g(G,'table-body');var P=l.headers,R=u(P),O=r.pe.createDocumentFragment(),L=d('tr');f(L,'role','row');for(var J=0;J<R.length;J++){var U=P[R[J]],z=d('th');z.id='cc__row-'+U,f(z,'role','columnheader'),f(z,'scope','col'),g(z,'table-th'),z.innerHTML=U,_(O,z)}_(L,O),_(j,L);var q=r.pe.createDocumentFragment();for(J=0;J<m.length;J++){var K=m[J],Q=d('tr');f(Q,'role','row'),g(Q,'table-tr');for(var W=0;W<R.length;W++){var X=R[W],Y=P[X],Z=K[X],$=d('td'),ee=d('div');g($,'table-td'),f($,'data-column',Y),f($,'headers','cc__row-'+Y),ee.insertAdjacentHTML('beforeend',Z),_($,ee),_(Q,$)}_(q,Q)}_(G,q),_(I,j),_(I,G),_(M,I)}(k||a)&&_(x,M);const te=r.Ie||r.Ne;y?(S||(S=d('div'),g(S,'section-toggles')),S.appendChild(x)):S=null,_(te,S||x)})),(m||h)&&(h&&(r.Re||(r.Re=d(e),g(r.Re,'btn'),f(r.Re,'data-role','necessary'),_(k,r.Re),p(r.Re,'click',(()=>{A([])}))),r.Re.innerHTML=h),m&&(r.Pe||(r.Pe=d(e),g(r.Pe,'btn'),f(r.Pe,'data-role','all'),_(k,r.Pe),p(r.Pe,'click',(()=>{A('all')}))),r.Pe.innerHTML=m)),y&&(r.Oe||(r.Oe=d(e),g(r.Oe,'btn'),g(r.Oe,'btn--secondary'),f(r.Oe,'data-role','save'),_(x,r.Oe),p(r.Oe,'click',(()=>{A()}))),r.Oe.innerHTML=y),r.Ie&&(r.He.replaceChild(r.Ie,r.Ne),r.Ne=r.Ie),T(1),o.P||(o.P=!0,a(i.o.u,'preferencesModal',r.He),M(),n(t),_(r.ve,r.ge),setTimeout((()=>v(r.ge,'cc--anim')),100))};function B(e,t,n,o,a){const r=i.l,c=i._e;var s=d('label'),u=d('input'),m=d('span'),g=d('span'),b=d('span'),h=d('span');if(u.type='checkbox',v(s,'section__toggle-wrapper'),v(u,'section__toggle'),v(b,'toggle__icon-on'),v(h,'toggle__icon-off'),v(m,'toggle__icon'),v(g,'toggle__label'),f(m,'aria-hidden','true'),o?(v(s,'toggle-service'),v(u,'toggle-service'),f(u,'data-category',a),c.Je[a][t]=u):c.Le[t]=u,o?(e=>{p(u,'change',(()=>{var t=c.Je[e],n=c.Le[e];for(var o in r.se[e]=[],t){const n=t[o];n.checked&&r.se[e].push(n.value)}r.se[e].length>0?n.checked=!0:n.checked=!1}))})(a):(e=>{p(u,'click',(()=>{var t=c.Je[e];if(r.se[e]=[],u.checked)for(var n in t)t[n].checked=!0;else for(n in t)t[n].checked=!1}))})(t),u.value=t,g.textContent=e.replace(/<.*>.*<\/.*>/gm,''),_(m,h),_(m,b),r.N)(n.enabled||n.readOnly)&&(u.checked=!0);else if(o){var y=r.ce[a];(n.readOnly||l(y,t))&&(u.checked=!0)}else l(r.Y,t)&&(u.checked=!0);return n.readOnly&&(u.disabled=!0),_(s,u),_(s,m),_(s,g),s}const D=(t,n)=>{const o=i.l,r=i._e,c=o.A&&o.A.consentModal;if(c){!0===o.M.disablePageInteraction&&v(r.ue,'disable--interaction');var s=c.acceptAllBtn,l=c.acceptNecessaryBtn,u=c.showPreferencesBtn,g=c.closeIconLabel,b=c.footer;if(!r.me){r.me=d('div'),r.be=d('div'),r.he=d('div'),r.ye=d('div'),r.ke=d('div'),v(r.me,'cm-wrapper'),v(r.be,'cm'),m(r.he,'body'),m(r.ye,'texts'),m(r.ke,'btns'),f(r.be,'role','dialog'),f(r.be,'aria-modal','true'),f(r.be,'aria-hidden','false'),f(r.be,'aria-labelledby','cm__title'),f(r.be,'aria-describedby','cm__desc'),r.be.style.visibility='hidden';const n='box',a=o.M.guiOptions,i=a&&a.consentModal,c=(i&&i.layout||n).split(' ')[0]===n;g&&c&&(r.De||(r.De=d(e),m(r.De,'btn'),m(r.De,'btn--close'),p(r.De,'click',(()=>{t.hide(),t.acceptCategory([])})),_(r.he,r.De)),f(r.De,'aria-label',g)),_(r.he,r.ye),(s||l||u)&&_(r.he,r.ke),_(r.be,r.he),_(r.me,r.be)}var h=c.title;h&&(r.we||(r.we=d('div'),r.we.className=r.we.id='cm__title',f(r.we,'role','heading'),f(r.we,'aria-level','2'),_(r.ye,r.we)),r.we.innerHTML=h);var y=c.description;if(y&&(o.J&&(y=y.replace('{{revisionMessage}}',o.U?'':c.revisionMessage||'')),r.Ce||(r.Ce=d('div'),r.Ce.className=r.Ce.id='cm__desc',_(r.ye,r.Ce)),r.Ce.innerHTML=y),s&&(r.Se||(r.Se=d(e),m(r.Se,'btn'),f(r.Se,'data-role','all'),p(r.Se,'click',(()=>{t.hide(),t.acceptCategory('all')}))),r.Se.innerHTML=s),l&&(r.Te||(r.Te=d(e),m(r.Te,'btn'),f(r.Te,'data-role','necessary'),p(r.Te,'click',(()=>{t.hide(),t.acceptCategory([])}))),r.Te.innerHTML=l),u&&(r.Ae||(r.Ae=d(e),m(r.Ae,'btn'),m(r.Ae,'btn--secondary'),f(r.Ae,'data-role','show'),p(r.Ae,'mouseover',(()=>{A(t,n)})),p(r.Ae,'click',t.showPreferences)),r.Ae.innerHTML=u),!r.Me&&u&&(r.Me=d('div'),m(r.Me,'btn-group'),_(r.Me,r.Ae),_(r.ke,r.Me)),r.xe||(r.xe=d('div'),m(r.xe,'btn-group'),l&&_(r.xe,r.Te),s&&_(r.xe,r.Se),(s||l)&&_(r.he,r.xe),_(r.ke,r.xe)),b){if(!r.Be){var w=d('div'),k=d('div');r.Be=d('div'),m(w,'footer'),m(k,'links'),m(r.Be,'link-group'),_(k,r.Be),_(w,k),_(r.be,w)}r.Be.innerHTML=b}T(0),o.I||(o.I=!0,a(i.o.u,'consentModal',r.be),M(),n(t),_(r.ve,r.me),setTimeout((()=>v(r.me,'cc--anim')),100)),C(r.he,t,A,n)}},H=e=>{const t=i._e;if(!t.ve){t.ve=d('div'),t.ve.id='cc-main',t.ve.style.position='fixed',t.ve.style.zIndex='2147483647';let n=i.l.M.root;n&&'string'==typeof n&&(n=document.querySelector(n)),_(n||t.pe.body,t.ve),(e=>{const t=i._e;p(t.ve,'click',(n=>{const o=i.l;o.O?t.He.contains(n.target)?o.R=!0:(e.hidePreferences(0),o.R=!1):o.j&&t.be.contains(n.target)&&(o.R=!0)}))})(e)}},E=e=>!!e&&l(u(i.l.T),e),V=()=>{const e=i.l;return e.S||e.M.language.default},F=e=>{e&&(i.l.S=e)},N=async e=>{const t=i.l;let n;n=e&&E(e)?e:V();let o=t.T[n];if(!o)return!1;if('string'==typeof o){const e=await(async e=>{try{const t=await fetch(e,{method:'GET'});return!!t.ok&&await t.json()}catch(e){return!1}})(o);if(!e)return!1;o=e}return t.A=o,F(n),!0},I=e=>{const{hostname:t,protocol:n}=window.location,{name:o,path:a,domain:r,sameSite:c}=i.k.cookie,s=encodeURIComponent(JSON.stringify(i.l.i)),d=e?(()=>{const e=i.l.V,t=e?new Date-e:0;return 864e5*h()-t})():864e5*h(),f=new Date;f.setTime(f.getTime()+d);let _=o+'='+s+(0!==d?'; expires='+f.toUTCString():'')+'; Path='+a+'; SameSite='+c;l(t,'.')&&(_+='; Domain='+r),'https:'===n&&(_+='; Secure'),document.cookie=_,i.l.i},j=e=>{let t;try{t=JSON.parse(decodeURIComponent(e))}catch(e){t={}}return t},G=(e,t,n)=>{const o=n||i.k.cookie.domain,a=t||i.k.cookie.path,r='www.'===o.slice(0,4),c=r&&o.substring(4),s=(e,t)=>{document.cookie=e+'=; path='+a+(t?'; domain=.'+t:'')+'; expires=Thu, 01 Jan 1970 00:00:01 GMT;'};e.forEach((e=>{s(e),s(e,o),r&&s(e,c)}))},P=(e,t)=>{const n=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return n?t?n.pop():e:''},R=e=>{const t=document.cookie.split(/;\s*/),n=[];for(var o=0;o<t.length;o++){let a=t[o].split('=')[0];if(e)try{e.test(a)&&n.push(a)}catch(e){}else n.push(a)}return n},O=e=>{e.dispatchEvent(new Event('change'))},L=(e,t=[])=>{const o=i.l;let r=!1;var c=[];if(e)if('object'==typeof e&&'number'==typeof e.length)for(var s=0;s<e.length;s++)l(o.X,e[s])&&c.push(e[s]);else'string'==typeof e&&('all'===e?c=o.X.slice():l(o.X,e)&&c.push(e));else c=(()=>{let e=i._e.Le,t=[];if(e)for(var n in e)e[n].checked&&t.push(e[n].value);else o.N||(t=o.i.categories);for(let e in o.se)o.se[e].length>0&&(l(t,e)||t.push(e));return t})(),r=!0;if(t.length>=1)for(s=0;s<t.length;s++)c=c.filter((e=>e!==t[s]));for(s=0;s<o.Z.length;s++)l(c,o.Z[s])||c.push(o.Z[s]);o.Y=c,w(),r||(o.se={}),o.le=n(o.ce),o.X.forEach((e=>{const t=o.ie[e],n=u(t),a=o.ce;0!==n.length&&(a[e]=[],l(o.Z,e)?n.forEach((t=>{a[e].push(t)})):'all'===o.K?r&&o.se[e]&&o.se[e].length>0?o.se[e].forEach((t=>{a[e].push(t)})):n.forEach((t=>{a[e].push(t)})):'necessary'===o.K?a[e]=[]:r&&o.se[e]&&o.se[e].length>0?o.se[e].forEach((t=>{a[e].push(t)})):l(o.Y,e)&&u(t).forEach((t=>a[e].push(t))),a[e]=k(a[e]))})),(()=>{const e=i.l;'opt-out'===i.k.mode&&e.N?e.g=y(e.$,e.Y):e.g=y(e.Y,e.i.categories||[]);let t=e.g.length>0,o=!1;e.X.forEach((t=>{e.h[t]=y(e.ce[t],e.le[t]||[]),e.h[t].length>0&&(o=!0)}));var r=i._e.Le;for(var c in r)l(e.Y,c)?r[c].checked=!0:r[c].checked=!1;e.X.forEach((t=>{var n=i._e.Je[t],o=e.ce[t];for(var a in n){const e=n[a];l(o,a)?e.checked=!0:e.checked=!1}})),e.H||(e.H=new Date),e.F||(e.F=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))),e.i={categories:n(e.Y),revision:i.k.revision,data:e.D,consentTimestamp:e.H.toISOString(),consentId:e.F,services:n(e.ce)};var s=!1;(e.N||t||o)&&(e.N&&(e.N=!1,s=!0),w(),e.V?e.V=new Date:e.V=e.H,e.i.lastConsentTimestamp=e.V.toISOString(),I(),i.k.autoClearCookies&&(s||!e.N&&t)&&(e=>{const t=i.l,n=R();t.q=!1;let o=e?t.X:t.g;o=o.filter((e=>{let n=t.W[e];return!!n&&!n.readOnly&&!!n.autoClear})),o.forEach((o=>{const a=t.W[o].autoClear,r=a&&a.cookies||[],i=l(t.g,o),c=!l(t.Y,o),s=i&&c;(e&&c||!e&&s)&&(!0===a.reloadPage&&s&&(t.q=!0),r.forEach((e=>{let t=[];const o=e.name,a=e.domain,r=e.path;if(o instanceof RegExp)n.forEach((e=>{o.test(e)&&t.push(e)}));else{let e=(i=o,n.indexOf(i));e>-1&&t.push(n[e])}var i;t.length>0&&G(t,r,a)})))}))})(s),S()),s&&(a(i.o.v),a(i.o.m),'opt-in'===i.k.mode)||((t||o)&&a(i.o.C),e.q&&window.location.reload())})()},J=e=>{let t;return t=i.l.N&&'opt-in'!==i.k.mode?i.l.$:x().accepted||[],l(t,e)},U=(e,t)=>{const n=i.l;if(!e||!t||'string'!=typeof t||!l(n.X,t))return!1;const o=i._e.Je[t]||{},a=u(n.ie[t]);if(n.se[t]=[],'string'==typeof e)if('all'===e){for(let e in o)o[e].checked=!0,O(o[e]);n.se[t]=[...a]}else{for(let t in o)o[t].checked=e===t,O(o[t]);l(a,e)&&n.se[t].push(e)}else if(c(e)){for(let t in o)l(e,t)?o[t].checked=!0:o[t].checked=!1,O(o[t]);a.forEach((o=>{l(e,o)&&n.se[t].push(o)}))}L()},z=(e,t)=>l(i.l.ce[t]||[],e),q=e=>''!==P(e,!0),K=(e,t,n)=>{let o=[];const a=e=>{if('string'==typeof e){let t=P(e);''!==t&&o.push(t)}else o=o.concat(R(e))};if(c(e))for(var r=0;r<e.length;r++)a(e[r]);else a(e);G(o,t,n)},Q=e=>{e&&!i.l.I&&D(Z,H),i.l.I&&(v(i._e.ue,'show--consent'),f(i._e.be,'aria-hidden','false'),i.l.j=!0,setTimeout((()=>{i.l.te=i._e.pe.activeElement,i.l.L=i.l.oe}),200),a(i.o._,'consentModal'))},W=()=>{i.l.I&&i.l.j&&(b(i._e.ue,'show--consent'),f(i._e.be,'aria-hidden','true'),i.l.j=!1,setTimeout((()=>{i.l.te.focus(),i.l.L=[]}),200),a(i.o.p,'consentModal'))},X=()=>{const e=i.l;e.P&&e.G||(e.P||A(Z,H),v(i._e.ue,'show--preferences'),f(i._e.He,'aria-hidden','false'),e.G=!0,setTimeout((()=>{e.O=!0}),1),setTimeout((()=>{e.j?e.ne=i._e.pe.activeElement:e.te=i._e.pe.activeElement,0!==e.ae.length&&(e.ae[0].focus(),e.L=e.ae)}),200),a(i.o._,'preferencesModal'))},Y=()=>{const e=i.l;e.G&&(b(i._e.ue,'show--preferences'),f(i._e.He,'aria-hidden','true'),e.G=!1,setTimeout((()=>{e.O=!1}),1),e.j?(e.ne&&e.ne.focus(),e.L=e.oe):(e.te&&e.te.focus(),e.L=[]),e.R=!1,a(i.o.p,'preferencesModal'))};var Z={show:Q,hide:W,showPreferences:X,hidePreferences:Y,acceptCategory:L};const $=async(e,t)=>!(!E(e)||e===V()&&!0!==t||!await N(e)||(F(e),i.l.I&&D(Z,H),i.l.P&&A(Z,H),0)),ee=()=>{const e=!i.l.N;var t,n=e&&x();return{acceptType:i.l.K,acceptedCategories:e?n.accepted:[],rejectedCategories:e?n.rejected:[],acceptedServices:e?i.l.ce:{},rejectedServices:e?(t={},i.l.X.forEach((e=>{t[e]=y(i.l.ce[e]||[],u(i.l.ie[e])||[])})),t):{}}},te=(e,t)=>{let n=document.querySelector('script[src="'+e+'"]');return new Promise(((o,a)=>{if(n)return o(!0);n=d('script'),c(t)&&t.forEach((e=>{f(n,e.name,e.value)})),n.onload=()=>o(!0),n.onerror=()=>{n.remove(),a(!1)},n.src=e,_(document.head,n)}))},ne=e=>{let t,n=e.value,o=e.mode,a=!1;const r=i.l;if('update'===o){r.D=oe('data'),t=oe('data');const e=typeof t==typeof n;if(e&&'object'==typeof t)for(var c in!t&&(t={}),n)t[c]!==n[c]&&(t[c]=n[c],a=!0);else!e&&t||t===n||(t=n,a=!0)}else t=n,a=!0;return a&&(r.D=t,r.i.data=t,I(!0)),a},oe=(e,t)=>{const n=j(P(t||i.k.cookie.name,!0));return e?n[e]:n},ae=e=>{const t=i.k,n=i.l.M;return e?t[e]||n[e]:{...t,...n,cookie:{...t.cookie}}},re=()=>!i.l.N,ie=async e=>{const t=i.l,n=i.k,o=window;if(!o._ccRun){if(o._ccRun=!0,(e=>{!function(){const e=document;i._e.pe=e,i._e.ue=e.documentElement,i.k.cookie.domain=window.location.hostname}();const t=i.k,n=i.l,o=t.cookie,a=i.t,r=e.cookie,c=e.categories,d=u(c)||[],f=navigator;n.M=e,n.T=e.language.translations,n.W=c,n.X=d,a.v=e.onFirstConsent,a.m=e.onConsent,a.C=e.onChange,a.p=e.onModalHide,a._=e.onModalShow,a.u=e.onModalReady;const{mode:_,autoShow:p,autoClearCookies:v,revision:m,manageScriptTags:g,hideFromBots:b,lazyHtmlGeneration:h}=e;'opt-out'===_&&(t.mode=_),'boolean'==typeof p&&(t.autoShow=p),'boolean'==typeof v&&(t.autoClearCookies=v),'boolean'==typeof g&&(t.manageScriptTags=g),'number'==typeof m&&m>=0&&(t.revision=m,n.J=!0),'boolean'==typeof h&&(t.lazyHtmlGeneration=h),!1===b&&(t.hideFromBots=!1),!0===t.hideFromBots&&f&&(n.ee=f.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(f.userAgent)||f.webdriver),s(r)&&(t.cookie={...o,...r}),t.autoClearCookies,n.J,t.manageScriptTags,function(e){const t=i.l;e.forEach((e=>{const n=t.W[e],o=n.services||{},a=o&&s(o)&&u(o)||[];t.ie[e]={},t.ce[e]=[],n.readOnly&&(t.Z.push(e),t.ce[e]=u(o)),i._e.Je[e]={},a.forEach((n=>{const a=o[n];a.enabled=!1,t.ie[e][n]=a}))}))}(d),(()=>{if(!i.k.manageScriptTags)return;const e=i.l;e.de=i._e.pe.querySelectorAll('script[data-category]'),e.fe=[],e.de.forEach((t=>{let n=t.getAttribute('data-category'),o=t.dataset.service||'',a=!1;if(n&&'!'===n.charAt(0)&&(n=n.slice(1),a=!0),'!'===o.charAt(0)&&(o=o.slice(1),a=!0),l(e.X,n)&&(e.fe.push({We:!1,Xe:a,Ke:n,Qe:o}),o)){const t=e.ie[n];t[o]||(t[o]={enabled:!1})}}))})(),F((()=>{const e=i.l.M.language.autoDetect;if(e){let t;if('browser'===e?t=navigator.language.slice(0,2).toLowerCase():'document'===e&&(t=document.documentElement.lang),E(t))return t}return V()})())})(e),t.ee)return;const d=j(P(n.cookie.name,!0)),f=d.categories,_=c(f);t.i=d,t.F=d.consentId;const v=!!t.F&&'string'==typeof t.F;t.H=d.consentTimestamp,t.H&&(t.H=new Date(t.H)),t.V=d.lastConsentTimestamp,t.V&&(t.V=new Date(t.V));const m=d.data;if(t.D=void 0!==m?m:null,t.J&&v&&d.revision!==n.revision&&(t.U=!1),t.N=!(v&&t.U&&t.H&&t.V&&_),t.N,t.N?'opt-out'===n.mode&&(()=>{const e=i.l;e.X.forEach((t=>{if(e.W[t].enabled){e.$.push(t);const o=e.ie[t]||{};for(var n in o)e.ce[t].push(n)}}))})():(t.Y=k([...t.Z,...d.categories]),t.ce={...t.ce,...d.services},w()),!await N())return;r=Z,i.l.N&&D(r,H),i.k.lazyHtmlGeneration||A(r,H),C(null,r,A,H),n.autoShow&&t.N&&Q(!0),(()=>{const e=i._e;var t=!1,n=!1;p(e.ue,'keydown',(o=>{if('Tab'!==o.key)return;const a=i.l.L;if(a.length>0){const r=e.pe.activeElement;o.shiftKey?r===a[0]&&(a[1].focus(),o.preventDefault()):r===a[1]&&(a[0].focus(),o.preventDefault()),n||i.l.R||(n=!0,!t&&o.preventDefault(),o.shiftKey?a[1].focus():a[0].focus())}!n&&(t=!0)}),!0)})(),t.N?'opt-out'===n.mode&&(n.mode,t.$,S(t.$)):(S(),a(i.o.m))}var r},ce=e=>{const t=i._e,n=i.k.cookie;!0===e&&K(n.name,n.path,n.domain),i.l.B.forEach((e=>{e.Ue.removeEventListener(e.ze,e.qe)})),t.ve&&t.ve.remove(),t.ue&&(b(t.ue,'disable--interaction'),b(t.ue,'show--preferences'),b(t.ue,'show--consent'));const o=new r;i.l=o.l,i._e=o._e,i.k=o.k,i.t=o.t,i.o=o.o,window._ccRun=!1};export{L as acceptCategory,U as acceptService,J as acceptedCategory,z as acceptedService,K as eraseCookies,ae as getConfig,oe as getCookie,ee as getUserPreferences,W as hide,Y as hidePreferences,te as loadScript,ce as reset,ie as run,ne as setCookieData,$ as setLanguage,Q as show,X as showPreferences,re as validConsent,q as validCookie}; | ||
const e='button',t=e=>'function'==typeof e,n=e=>{if('object'!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());let t=Array.isArray(e)?[]:{};for(let o in e){let a=e[o];t[o]=n(a)}return t},o=(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))},a=(e,a,r)=>{const c=i.t,s=i.o,l={cookie:i.l.i};if(a){const n={modalName:a};return e===s._?t(c._)&&c._(n):e===s.p?t(c.p)&&c.p(n):(n.modal=r,t(c.u)&&c.u(n)),o(e,n)}e===s.v?t(c.v)&&c.v(n(l)):e===s.m?t(c.m)&&c.m(n(l)):(l.changedCategories=i.l.g,l.changedServices=i.l.h,t(c.C)&&c.C(n(l))),o(e,n(l))};class r{constructor(){this.k={mode:'opt-in',revision:0,autoShow:!0,autoClearCookies:!0,manageScriptTags:!0,hideFromBots:!0,lazyHtmlGeneration:!0,cookie:{name:'cc_cookie',expiresAfterDays:182,domain:'',path:'/',sameSite:'Lax'}},this.l={M:null,S:'',T:{},A:null,i:null,B:[],D:null,H:null,V:null,F:'',N:!0,I:!1,j:!1,G:!1,P:!1,R:!1,O:!1,L:[],J:!1,U:!0,g:[],q:!1,K:'',W:!1,X:[],Y:[],Z:[],$:[],ee:!1,te:!1,ne:!1,oe:[],ae:[],re:[],ie:{},ce:{},se:{},h:{},le:{},de:[],fe:[]},this._e={pe:0,ue:0,ve:0,me:0,ge:0,be:0,he:0,ye:0,we:0,Ce:0,ke:0,xe:0,Me:0,Se:0,Te:0,Ae:0,Be:0,De:0,He:0,Ee:0,Ve:0,Fe:0,Ne:0,Ie:0,je:0,Ge:0,Pe:0,Re:0,Oe:0,Le:{},Je:{}},this.t={v:0,m:0,C:0,_:0,p:0,u:0},this.o={v:'cc:onFirstConsent',m:'cc:onConsent',C:'cc:onChange',_:'cc:onModalShow',p:'cc:onModalHide',u:'cc:onModalReady'}}}const i=new r,c=e=>Array.isArray(e),s=e=>!!e&&'object'==typeof e&&!c(e),l=(e,t)=>-1!==e.indexOf(t),d=t=>{const n=document.createElement(t);return t===e&&f(n,'type',t),n},f=(e,t,n)=>{e.setAttribute(t,n)},_=(e,t)=>{e.appendChild(t)},p=(e,t,n,o)=>{e.addEventListener(t,n),o&&i.l.B.push({Ue:e,ze:t,qe:n})},u=e=>Object.keys(e),v=(e,t)=>{e.classList.add(t)},m=(e,t)=>{v(e,'cm__'+t)},g=(e,t)=>{v(e,'pm__'+t)},b=(e,t)=>{e.classList.remove(t)},h=()=>{const e=i.k.cookie.expiresAfterDays;return t(e)?e(i.l.K):e},y=(e,t)=>e.filter((e=>!l(t,e))).concat(t.filter((t=>!l(e,t)))),w=()=>{i.l.K=(()=>{let e='custom',t=x().accepted;return t.length===i.l.X.length?e='all':t.length===i.l.Z.length&&(e='necessary'),e})()},C=(e,t,n,o)=>{const a='accept-',r=v('show-preferencesModal'),c=v('show-consentModal'),s=v(a+'all'),l=v(a+'necessary'),d=v(a+'custom'),_=!0===i.k.lazyHtmlGeneration;for(var u=0;u<r.length;u++)f(r[u],'aria-haspopup','dialog'),p(r[u],'click',(e=>{e.preventDefault(),t.showPreferences()}),!0),_&&p(r[u],'mouseover',(e=>{e.preventDefault(),i.l.P||n(t,o)}),!0);for(u=0;u<c.length;u++)f(c[u],'aria-haspopup','dialog'),p(c[u],'click',(e=>{e.preventDefault(),t.show(!0)}),!0);for(u=0;u<s.length;u++)p(s[u],'click',(e=>{m(e,'all')}),!0);for(u=0;u<d.length;u++)p(d[u],'click',(e=>{m(e)}),!0);for(u=0;u<l.length;u++)p(l[u],'click',(e=>{m(e,[])}),!0);function v(t){return(e||document).querySelectorAll('[data-cc="'+t+'"]')}function m(e,n){e.preventDefault(),t.acceptCategory(n),t.hidePreferences(),t.hide()}},k=e=>Array.from(new Set(e)),x=()=>{const e=i.l.X.filter((e=>!l(i.l.Y,e)));return{accepted:i.l.Y,rejected:e}},M=()=>{const t=i.l,n=['[href]',e,'input','details','[tabindex="0"]'].join(':not([tabindex="-1"]), '),o=(e,t)=>{const o=e&&e.querySelectorAll(n);t[0]=o[0],t[1]=o[o.length-1]};t.I&&o(i._e.be,t.oe),t.P&&o(i._e.He,t.ae)},S=e=>{const n=i.l,o=n.ce;if(n.X.forEach((e=>{(n.h[e]||n.ce[e]||[]).forEach((o=>{const a=n.ie[e][o];a&&(!a.enabled&&l(n.ce[e],o)&&t(a.onAccept)?(a.enabled=!0,a.onAccept()):a.enabled&&!l(n.ce[e],o)&&t(a.onReject)&&(a.enabled=!1,a.onReject()))}))})),!i.k.manageScriptTags)return;var a=n.de,r=e||n.i.categories||[];const c=(e,t)=>{if(t<e.length){var a=e[t],i=n.fe[t],s=i.Ke,_=i.Qe,p=l(r,s),u=!!_&&l(o[s],_);if(!i.We){var v=!_&&!i.Xe&&p,m=_&&!i.Xe&&u,g=!_&&i.Xe&&!p&&l(n.g,s),b=_&&i.Xe&&!u&&l(n.h[s]||[],_);if(v||g||m||b){i.We=!0,a.removeAttribute('type'),a.removeAttribute('data-category');let n=a.getAttribute('data-src');n&&a.removeAttribute('data-src');const o=d('script');if(o.textContent=a.innerHTML,((e,t)=>{for(var n=t.attributes,o=n.length,a=0;a<o;a++){var r=n[a].nodeName;f(e,r,t[r]||t.getAttribute(r))}})(o,a),n?o.src=n:n=a.src,n&&(o.onload=o.onerror=()=>{c(e,++t)}),a.replaceWith(o),n)return}}c(e,++t)}};c(a,0)},T=e=>{const t=i.l.M.guiOptions,n=t&&t.consentModal,o=t&&t.preferencesModal,a=(e,t,n,o,a,r)=>{var c=n&&n.layout,s=n&&n.position,d=n&&!0===n.flipButtons,f=n&&!1===n.equalWeightButtons,_=c&&c.split(' ')||[],p=s&&s.split(' ')||[],u=_[0],m=_[1],g=p[0],h='pm--'===o?p[0]:p[1],y=u,w=t[u];w||(w=t[a],y=a);var C=l(w.Ye,m)&&m,k=l(w.Ze,g)?g:w.$e,x=l(w.et,h)?h:w.tt;e.className=r,v(e,o+y),C&&v(e,o+C),k&&v(e,o+k),x&&v(e,o+x),d&&v(e,o+'flip');const M='btn--secondary',S=r+'__';if('cm'===r){const{Te:e,De:t}=i._e;e&&b(e,S+M),t&&b(t,S+M),f&&(e&&v(e,S+M),t&&v(t,S+M))}else{const{Re:e}=i._e;e&&b(e,S+M),f&&e&&v(e,S+M)}};if(0===e){const e=['middle','top','bottom'],t=['left','center','right'],o={box:{Ye:['wide','inline'],Ze:e,et:t,$e:'bottom',tt:'right'},cloud:{Ye:['inline'],Ze:e,et:t,$e:'bottom',tt:'center'},bar:{Ye:['inline'],Ze:e.slice(1),et:[],$e:'bottom',tt:''}};a(i._e.be,o,n,'cm--','box','cm')}if(1===e){const e={box:{Ye:[],Ze:[],et:[],$e:'',tt:''},bar:{Ye:['wide'],Ze:[],et:['left','right'],$e:'',tt:'left'}};a(i._e.He,e,o,'pm--','box','pm')}},A=(t,n)=>{const o=i.l,r=i._e,c=o.A&&o.A.preferencesModal;if(!c)return;var s=c.title,l=c.closeIconLabel,m=c.acceptAllBtn,h=c.acceptNecessaryBtn,y=c.savePreferencesBtn,w=c.sections;if(r.ge)r.Ie=d('div'),g(r.Ie,'body');else{r.ge=d('div'),v(r.ge,'pm-wrapper'),r.He=d('div'),r.He.style.visibility='hidden',v(r.He,'pm'),f(r.He,'role','dialog'),f(r.He,'aria-hidden',!0),f(r.He,'aria-modal',!0),p(r.ue,'keydown',(e=>{27===e.keyCode&&t.hidePreferences()}),!0),r.Ee=d('div'),g(r.Ee,'header'),r.Ve=d('div'),g(r.Ve,'title'),f(r.Ve,'role','heading'),r.Fe=d(e),g(r.Fe,'close-btn'),f(r.Fe,'aria-label',c.closeIconLabel||''),p(r.Fe,'click',t.hidePreferences),r.Ne=d('div'),g(r.Ne,'body'),r.Ge=d('div'),g(r.Ge,'footer');var C=d('div');v(C,'btns');var k=d('div'),x=d('div');g(k,'btn-group'),g(x,'btn-group'),_(r.Ge,x),_(r.Ge,k),_(r.Ee,r.Ve),_(r.Ee,r.Fe),_(r.He,r.Ee),_(r.He,r.Ne),_(r.He,r.Ge),_(r.ge,r.He)}let S;function A(e){t.acceptCategory(e),t.hidePreferences(),t.hide()}s&&(r.Ve.innerHTML=s,l&&f(r.Fe,'aria-label',l)),w&&w.forEach((t=>{var n=t.title,a=t.description,i=t.linkedCategory,s=i&&o.W[i],l=t.cookieTable,m=l&&l.body,h=m&&m.length>0,y=!!s,w=y&&o.ie[i]||!1,C=w&&u(w)||[],k=y&&(!!a||!!h||u(w).length>0),x=d('div');if(g(x,'section'),k||a){var M=d('div');g(M,'section-desc-wrapper')}let T=C.length;if(k&&T>0){var A=d('div');g(A,'section-services'),C.forEach((e=>{var t=w[e].label||e,n=d('div'),o=d('div'),a=d('div'),r=d('div');g(n,'service'),g(r,'service-title'),g(o,'service-header'),g(a,'service-icon');var c=B(t,e,s,!0,i);r.innerHTML=t,_(o,a),_(o,r),_(n,o),_(n,c),_(A,n)})),_(M,A)}if(n){var D=d('div'),H=d(y?e:'div');if(g(D,'section-title-wrapper'),g(H,'section-title'),H.innerHTML=n,_(D,H),y){var E=d('span');g(E,'section-arrow'),_(D,E),x.className+='--toggle';var V=B(n,i,s);let e=c.serviceCounterLabel;if(T>0&&'string'==typeof e){let t=d('span');g(t,'badge'),g(t,'service-counter'),f(t,'aria-hidden',!0),f(t,'data-servicecounter',T),e&&(e=e.split('|'),e=e.length>1&&T>1?e[1]:e[0],f(t,'data-counterlabel',e)),t.innerHTML=T+(e?' '+e:''),_(H,t)}if(k){g(x,'section--expandable');var F=i+'-desc';f(H,'aria-expanded',!1),f(H,'aria-controls',F)}_(D,V)}else f(H,'role','heading'),f(H,'aria-level','3');_(x,D)}if(a){var N=d('div');g(N,'section-desc'),N.innerHTML=a,_(M,N)}if(k&&(f(M,'aria-hidden','true'),M.id=F,((e,t,n)=>{p(H,'click',(()=>{t.classList.contains('is-expanded')?(b(t,'is-expanded'),f(n,'aria-expanded','false'),f(e,'aria-hidden','true')):(v(t,'is-expanded'),f(n,'aria-expanded','true'),f(e,'aria-hidden','false'))}))})(M,x,H),h)){var I=d('table'),j=d('thead'),G=d('tbody');g(I,'section-table'),g(j,'table-head'),g(G,'table-body');var P=l.headers,R=u(P),O=r.pe.createDocumentFragment(),L=d('tr');f(L,'role','row');for(var J=0;J<R.length;J++){var U=P[R[J]],z=d('th');z.id='cc__row-'+U,f(z,'role','columnheader'),f(z,'scope','col'),g(z,'table-th'),z.innerHTML=U,_(O,z)}_(L,O),_(j,L);var q=r.pe.createDocumentFragment();for(J=0;J<m.length;J++){var K=m[J],Q=d('tr');f(Q,'role','row'),g(Q,'table-tr');for(var W=0;W<R.length;W++){var X=R[W],Y=P[X],Z=K[X],$=d('td'),ee=d('div');g($,'table-td'),f($,'data-column',Y),f($,'headers','cc__row-'+Y),ee.insertAdjacentHTML('beforeend',Z),_($,ee),_(Q,$)}_(q,Q)}_(G,q),_(I,j),_(I,G),_(M,I)}(k||a)&&_(x,M);const te=r.Ie||r.Ne;y?(S||(S=d('div'),g(S,'section-toggles')),S.appendChild(x)):S=null,_(te,S||x)})),(m||h)&&(h&&(r.Re||(r.Re=d(e),g(r.Re,'btn'),f(r.Re,'data-role','necessary'),_(k,r.Re),p(r.Re,'click',(()=>{A([])}))),r.Re.innerHTML=h),m&&(r.Pe||(r.Pe=d(e),g(r.Pe,'btn'),f(r.Pe,'data-role','all'),_(k,r.Pe),p(r.Pe,'click',(()=>{A('all')}))),r.Pe.innerHTML=m)),y&&(r.Oe||(r.Oe=d(e),g(r.Oe,'btn'),g(r.Oe,'btn--secondary'),f(r.Oe,'data-role','save'),_(x,r.Oe),p(r.Oe,'click',(()=>{A()}))),r.Oe.innerHTML=y),r.Ie&&(r.He.replaceChild(r.Ie,r.Ne),r.Ne=r.Ie),T(1),o.P||(o.P=!0,a(i.o.u,'preferencesModal',r.He),M(),n(t),_(r.ve,r.ge),setTimeout((()=>v(r.ge,'cc--anim')),100))};function B(e,t,n,o,a){const r=i.l,c=i._e;var s=d('label'),u=d('input'),m=d('span'),g=d('span'),b=d('span'),h=d('span');if(u.type='checkbox',v(s,'section__toggle-wrapper'),v(u,'section__toggle'),v(b,'toggle__icon-on'),v(h,'toggle__icon-off'),v(m,'toggle__icon'),v(g,'toggle__label'),f(m,'aria-hidden','true'),o?(v(s,'toggle-service'),v(u,'toggle-service'),f(u,'data-category',a),c.Je[a][t]=u):c.Le[t]=u,o?(e=>{p(u,'change',(()=>{var t=c.Je[e],n=c.Le[e];for(var o in r.se[e]=[],t){const n=t[o];n.checked&&r.se[e].push(n.value)}r.se[e].length>0?n.checked=!0:n.checked=!1}))})(a):(e=>{p(u,'click',(()=>{var t=c.Je[e];if(r.se[e]=[],u.checked)for(var n in t)t[n].checked=!0;else for(n in t)t[n].checked=!1}))})(t),u.value=t,g.textContent=e.replace(/<.*>.*<\/.*>/gm,''),_(m,h),_(m,b),r.N)(n.enabled||n.readOnly)&&(u.checked=!0);else if(o){var y=r.ce[a];(n.readOnly||l(y,t))&&(u.checked=!0)}else l(r.Y,t)&&(u.checked=!0);return n.readOnly&&(u.disabled=!0),_(s,u),_(s,m),_(s,g),s}const D=(t,n)=>{const o=i.l,r=i._e,c=o.A&&o.A.consentModal;if(c){!0===o.M.disablePageInteraction&&v(r.ue,'disable--interaction');var s=c.acceptAllBtn,l=c.acceptNecessaryBtn,u=c.showPreferencesBtn,g=c.closeIconLabel,b=c.footer;if(!r.me){r.me=d('div'),r.be=d('div'),r.he=d('div'),r.ye=d('div'),r.ke=d('div'),v(r.me,'cm-wrapper'),v(r.be,'cm'),m(r.he,'body'),m(r.ye,'texts'),m(r.ke,'btns'),f(r.be,'role','dialog'),f(r.be,'aria-modal','true'),f(r.be,'aria-hidden','false'),f(r.be,'aria-labelledby','cm__title'),f(r.be,'aria-describedby','cm__desc'),r.be.style.visibility='hidden';const n='box',a=o.M.guiOptions,i=a&&a.consentModal,c=(i&&i.layout||n).split(' ')[0]===n;g&&c&&(r.De||(r.De=d(e),m(r.De,'btn'),m(r.De,'btn--close'),p(r.De,'click',(()=>{t.hide(),t.acceptCategory([])})),_(r.he,r.De)),f(r.De,'aria-label',g)),_(r.he,r.ye),(s||l||u)&&_(r.he,r.ke),_(r.be,r.he),_(r.me,r.be)}var h=c.title;h&&(r.we||(r.we=d('div'),r.we.className=r.we.id='cm__title',f(r.we,'role','heading'),f(r.we,'aria-level','2'),_(r.ye,r.we)),r.we.innerHTML=h);var y=c.description;if(y&&(o.J&&(y=y.replace('{{revisionMessage}}',o.U?'':c.revisionMessage||'')),r.Ce||(r.Ce=d('div'),r.Ce.className=r.Ce.id='cm__desc',_(r.ye,r.Ce)),r.Ce.innerHTML=y),s&&(r.Se||(r.Se=d(e),m(r.Se,'btn'),f(r.Se,'data-role','all'),p(r.Se,'click',(()=>{t.hide(),t.acceptCategory('all')}))),r.Se.innerHTML=s),l&&(r.Te||(r.Te=d(e),m(r.Te,'btn'),f(r.Te,'data-role','necessary'),p(r.Te,'click',(()=>{t.hide(),t.acceptCategory([])}))),r.Te.innerHTML=l),u&&(r.Ae||(r.Ae=d(e),m(r.Ae,'btn'),m(r.Ae,'btn--secondary'),f(r.Ae,'data-role','show'),p(r.Ae,'mouseover',(()=>{o.P||A(t,n)})),p(r.Ae,'click',t.showPreferences)),r.Ae.innerHTML=u),!r.Me&&u&&(r.Me=d('div'),m(r.Me,'btn-group'),_(r.Me,r.Ae),_(r.ke,r.Me)),r.xe||(r.xe=d('div'),m(r.xe,'btn-group'),l&&_(r.xe,r.Te),s&&_(r.xe,r.Se),(s||l)&&_(r.he,r.xe),_(r.ke,r.xe)),b){if(!r.Be){var w=d('div'),k=d('div');r.Be=d('div'),m(w,'footer'),m(k,'links'),m(r.Be,'link-group'),_(k,r.Be),_(w,k),_(r.be,w)}r.Be.innerHTML=b}T(0),o.I||(o.I=!0,a(i.o.u,'consentModal',r.be),M(),n(t),_(r.ve,r.me),setTimeout((()=>v(r.me,'cc--anim')),100)),C(r.he,t,A,n)}},H=e=>{const t=i._e;if(!t.ve){t.ve=d('div'),t.ve.id='cc-main',t.ve.style.position='fixed',t.ve.style.zIndex='2147483647';let n=i.l.M.root;n&&'string'==typeof n&&(n=document.querySelector(n)),_(n||t.pe.body,t.ve),(e=>{const t=i._e;p(t.ve,'click',(n=>{const o=i.l;o.O?t.He.contains(n.target)?o.R=!0:(e.hidePreferences(0),o.R=!1):o.j&&t.be.contains(n.target)&&(o.R=!0)}))})(e)}},E=e=>!!e&&l(u(i.l.T),e),V=()=>{const e=i.l;return e.S||e.M.language.default},F=e=>{e&&(i.l.S=e)},N=async e=>{const t=i.l;let n;n=e&&E(e)?e:V();let o=t.T[n];if(!o)return!1;if('string'==typeof o){const e=await(async e=>{try{const t=await fetch(e,{method:'GET'});return!!t.ok&&await t.json()}catch(e){return!1}})(o);if(!e)return!1;o=e}return t.A=o,F(n),!0},I=e=>{const{hostname:t,protocol:n}=window.location,{name:o,path:a,domain:r,sameSite:c}=i.k.cookie,s=encodeURIComponent(JSON.stringify(i.l.i)),d=e?(()=>{const e=i.l.V,t=e?new Date-e:0;return 864e5*h()-t})():864e5*h(),f=new Date;f.setTime(f.getTime()+d);let _=o+'='+s+(0!==d?'; expires='+f.toUTCString():'')+'; Path='+a+'; SameSite='+c;l(t,'.')&&(_+='; Domain='+r),'https:'===n&&(_+='; Secure'),document.cookie=_,i.l.i},j=e=>{let t;try{t=JSON.parse(decodeURIComponent(e))}catch(e){t={}}return t},G=(e,t,n)=>{const o=n||i.k.cookie.domain,a=t||i.k.cookie.path,r='www.'===o.slice(0,4),c=r&&o.substring(4),s=(e,t)=>{document.cookie=e+'=; path='+a+(t?'; domain=.'+t:'')+'; expires=Thu, 01 Jan 1970 00:00:01 GMT;'};e.forEach((e=>{s(e),s(e,o),r&&s(e,c)}))},P=(e,t)=>{const n=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return n?t?n.pop():e:''},R=e=>{const t=document.cookie.split(/;\s*/),n=[];for(var o=0;o<t.length;o++){let a=t[o].split('=')[0];if(e)try{e.test(a)&&n.push(a)}catch(e){}else n.push(a)}return n},O=e=>{e.dispatchEvent(new Event('change'))},L=(e,t=[])=>{const o=i.l;let r=!1;var c=[];if(e)if('object'==typeof e&&'number'==typeof e.length)for(var s=0;s<e.length;s++)l(o.X,e[s])&&c.push(e[s]);else'string'==typeof e&&('all'===e?c=o.X.slice():l(o.X,e)&&c.push(e));else c=(()=>{let e=i._e.Le,t=[];if(e)for(var n in e)e[n].checked&&t.push(e[n].value);else o.N||(t=o.i.categories);for(let e in o.se)o.se[e].length>0&&(l(t,e)||t.push(e));return t})(),r=!0;if(t.length>=1)for(s=0;s<t.length;s++)c=c.filter((e=>e!==t[s]));for(s=0;s<o.Z.length;s++)l(c,o.Z[s])||c.push(o.Z[s]);o.Y=c,w(),r||(o.se={}),o.le=n(o.ce),o.X.forEach((e=>{const t=o.ie[e],n=u(t),a=o.ce;0!==n.length&&(a[e]=[],l(o.Z,e)?n.forEach((t=>{a[e].push(t)})):'all'===o.K?r&&o.se[e]&&o.se[e].length>0?o.se[e].forEach((t=>{a[e].push(t)})):n.forEach((t=>{a[e].push(t)})):'necessary'===o.K?a[e]=[]:r&&o.se[e]&&o.se[e].length>0?o.se[e].forEach((t=>{a[e].push(t)})):l(o.Y,e)&&u(t).forEach((t=>a[e].push(t))),a[e]=k(a[e]))})),(()=>{const e=i.l;'opt-out'===i.k.mode&&e.N?e.g=y(e.$,e.Y):e.g=y(e.Y,e.i.categories||[]);let t=e.g.length>0,o=!1;e.X.forEach((t=>{e.h[t]=y(e.ce[t],e.le[t]||[]),e.h[t].length>0&&(o=!0)}));var r=i._e.Le;for(var c in r)l(e.Y,c)?r[c].checked=!0:r[c].checked=!1;e.X.forEach((t=>{var n=i._e.Je[t],o=e.ce[t];for(var a in n){const e=n[a];l(o,a)?e.checked=!0:e.checked=!1}})),e.H||(e.H=new Date),e.F||(e.F=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))),e.i={categories:n(e.Y),revision:i.k.revision,data:e.D,consentTimestamp:e.H.toISOString(),consentId:e.F,services:n(e.ce)};var s=!1;(e.N||t||o)&&(e.N&&(e.N=!1,s=!0),w(),e.V?e.V=new Date:e.V=e.H,e.i.lastConsentTimestamp=e.V.toISOString(),I(),i.k.autoClearCookies&&(s||!e.N&&t)&&(e=>{const t=i.l,n=R();t.q=!1;let o=e?t.X:t.g;o=o.filter((e=>{let n=t.W[e];return!!n&&!n.readOnly&&!!n.autoClear})),o.forEach((o=>{const a=t.W[o].autoClear,r=a&&a.cookies||[],i=l(t.g,o),c=!l(t.Y,o),s=i&&c;(e&&c||!e&&s)&&(!0===a.reloadPage&&s&&(t.q=!0),r.forEach((e=>{let t=[];const o=e.name,a=e.domain,r=e.path;if(o instanceof RegExp)n.forEach((e=>{o.test(e)&&t.push(e)}));else{let e=(i=o,n.indexOf(i));e>-1&&t.push(n[e])}var i;t.length>0&&G(t,r,a)})))}))})(s),S()),s&&(a(i.o.v),a(i.o.m),'opt-in'===i.k.mode)||((t||o)&&a(i.o.C),e.q&&window.location.reload())})()},J=e=>{let t;return t=i.l.N&&'opt-in'!==i.k.mode?i.l.$:x().accepted||[],l(t,e)},U=(e,t)=>{const n=i.l;if(!e||!t||'string'!=typeof t||!l(n.X,t))return!1;const o=i._e.Je[t]||{},a=u(n.ie[t]);if(n.se[t]=[],'string'==typeof e)if('all'===e){for(let e in o)o[e].checked=!0,O(o[e]);n.se[t]=[...a]}else{for(let t in o)o[t].checked=e===t,O(o[t]);l(a,e)&&n.se[t].push(e)}else if(c(e)){for(let t in o)l(e,t)?o[t].checked=!0:o[t].checked=!1,O(o[t]);a.forEach((o=>{l(e,o)&&n.se[t].push(o)}))}L()},z=(e,t)=>l(i.l.ce[t]||[],e),q=e=>''!==P(e,!0),K=(e,t,n)=>{let o=[];const a=e=>{if('string'==typeof e){let t=P(e);''!==t&&o.push(t)}else o=o.concat(R(e))};if(c(e))for(var r=0;r<e.length;r++)a(e[r]);else a(e);G(o,t,n)},Q=e=>{e&&!i.l.I&&D(Z,H),i.l.I&&(v(i._e.ue,'show--consent'),f(i._e.be,'aria-hidden','false'),i.l.j=!0,setTimeout((()=>{i.l.te=i._e.pe.activeElement,i.l.L=i.l.oe}),200),a(i.o._,'consentModal'))},W=()=>{i.l.I&&i.l.j&&(b(i._e.ue,'show--consent'),f(i._e.be,'aria-hidden','true'),i.l.j=!1,setTimeout((()=>{i.l.te.focus(),i.l.L=[]}),200),a(i.o.p,'consentModal'))},X=()=>{const e=i.l;e.P&&e.G||(e.P||A(Z,H),v(i._e.ue,'show--preferences'),f(i._e.He,'aria-hidden','false'),e.G=!0,setTimeout((()=>{e.O=!0}),1),setTimeout((()=>{e.j?e.ne=i._e.pe.activeElement:e.te=i._e.pe.activeElement,0!==e.ae.length&&(e.ae[0].focus(),e.L=e.ae)}),200),a(i.o._,'preferencesModal'))},Y=()=>{const e=i.l;e.G&&(b(i._e.ue,'show--preferences'),f(i._e.He,'aria-hidden','true'),e.G=!1,setTimeout((()=>{e.O=!1}),1),e.j?(e.ne&&e.ne.focus(),e.L=e.oe):(e.te&&e.te.focus(),e.L=[]),e.R=!1,a(i.o.p,'preferencesModal'))};var Z={show:Q,hide:W,showPreferences:X,hidePreferences:Y,acceptCategory:L};const $=async(e,t)=>!(!E(e)||e===V()&&!0!==t||!await N(e)||(F(e),i.l.I&&D(Z,H),i.l.P&&A(Z,H),0)),ee=()=>{const e=!i.l.N;var t,n=e&&x();return{acceptType:i.l.K,acceptedCategories:e?n.accepted:[],rejectedCategories:e?n.rejected:[],acceptedServices:e?i.l.ce:{},rejectedServices:e?(t={},i.l.X.forEach((e=>{t[e]=y(i.l.ce[e]||[],u(i.l.ie[e])||[])})),t):{}}},te=(e,t)=>{let n=document.querySelector('script[src="'+e+'"]');return new Promise(((o,a)=>{if(n)return o(!0);n=d('script'),c(t)&&t.forEach((e=>{f(n,e.name,e.value)})),n.onload=()=>o(!0),n.onerror=()=>{n.remove(),a(!1)},n.src=e,_(document.head,n)}))},ne=e=>{let t,n=e.value,o=e.mode,a=!1;const r=i.l;if('update'===o){r.D=oe('data'),t=oe('data');const e=typeof t==typeof n;if(e&&'object'==typeof t)for(var c in!t&&(t={}),n)t[c]!==n[c]&&(t[c]=n[c],a=!0);else!e&&t||t===n||(t=n,a=!0)}else t=n,a=!0;return a&&(r.D=t,r.i.data=t,I(!0)),a},oe=(e,t)=>{const n=j(P(t||i.k.cookie.name,!0));return e?n[e]:n},ae=e=>{const t=i.k,n=i.l.M;return e?t[e]||n[e]:{...t,...n,cookie:{...t.cookie}}},re=()=>!i.l.N,ie=async e=>{const t=i.l,n=i.k,o=window;if(!o._ccRun){if(o._ccRun=!0,(e=>{!function(){const e=document;i._e.pe=e,i._e.ue=e.documentElement,i.k.cookie.domain=window.location.hostname}();const t=i.k,n=i.l,o=t.cookie,a=i.t,r=e.cookie,c=e.categories,d=u(c)||[],f=navigator;n.M=e,n.T=e.language.translations,n.W=c,n.X=d,a.v=e.onFirstConsent,a.m=e.onConsent,a.C=e.onChange,a.p=e.onModalHide,a._=e.onModalShow,a.u=e.onModalReady;const{mode:_,autoShow:p,autoClearCookies:v,revision:m,manageScriptTags:g,hideFromBots:b,lazyHtmlGeneration:h}=e;'opt-out'===_&&(t.mode=_),'boolean'==typeof p&&(t.autoShow=p),'boolean'==typeof v&&(t.autoClearCookies=v),'boolean'==typeof g&&(t.manageScriptTags=g),'number'==typeof m&&m>=0&&(t.revision=m,n.J=!0),'boolean'==typeof h&&(t.lazyHtmlGeneration=h),!1===b&&(t.hideFromBots=!1),!0===t.hideFromBots&&f&&(n.ee=f.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(f.userAgent)||f.webdriver),s(r)&&(t.cookie={...o,...r}),t.autoClearCookies,n.J,t.manageScriptTags,function(e){const t=i.l;e.forEach((e=>{const n=t.W[e],o=n.services||{},a=o&&s(o)&&u(o)||[];t.ie[e]={},t.ce[e]=[],n.readOnly&&(t.Z.push(e),t.ce[e]=u(o)),i._e.Je[e]={},a.forEach((n=>{const a=o[n];a.enabled=!1,t.ie[e][n]=a}))}))}(d),(()=>{if(!i.k.manageScriptTags)return;const e=i.l;e.de=i._e.pe.querySelectorAll('script[data-category]'),e.fe=[],e.de.forEach((t=>{let n=t.getAttribute('data-category'),o=t.dataset.service||'',a=!1;if(n&&'!'===n.charAt(0)&&(n=n.slice(1),a=!0),'!'===o.charAt(0)&&(o=o.slice(1),a=!0),l(e.X,n)&&(e.fe.push({We:!1,Xe:a,Ke:n,Qe:o}),o)){const t=e.ie[n];t[o]||(t[o]={enabled:!1})}}))})(),F((()=>{const e=i.l.M.language.autoDetect;if(e){let t;if('browser'===e?t=navigator.language.slice(0,2).toLowerCase():'document'===e&&(t=document.documentElement.lang),E(t))return t}return V()})())})(e),t.ee)return;const d=j(P(n.cookie.name,!0)),f=d.categories,_=c(f);t.i=d,t.F=d.consentId;const v=!!t.F&&'string'==typeof t.F;t.H=d.consentTimestamp,t.H&&(t.H=new Date(t.H)),t.V=d.lastConsentTimestamp,t.V&&(t.V=new Date(t.V));const m=d.data;if(t.D=void 0!==m?m:null,t.J&&v&&d.revision!==n.revision&&(t.U=!1),t.N=!(v&&t.U&&t.H&&t.V&&_),t.N,t.N?'opt-out'===n.mode&&(()=>{const e=i.l;e.X.forEach((t=>{if(e.W[t].enabled){e.$.push(t);const o=e.ie[t]||{};for(var n in o)e.ce[t].push(n)}}))})():(t.Y=k([...t.Z,...d.categories]),t.ce={...t.ce,...d.services},w()),!await N())return;r=Z,i.l.N&&D(r,H),i.k.lazyHtmlGeneration||A(r,H),C(null,r,A,H),n.autoShow&&t.N&&Q(!0),(()=>{const e=i._e;var t=!1,n=!1;p(e.ue,'keydown',(o=>{if('Tab'!==o.key)return;const a=i.l.L;if(a.length>0){const r=e.pe.activeElement;o.shiftKey?r===a[0]&&(a[1].focus(),o.preventDefault()):r===a[1]&&(a[0].focus(),o.preventDefault()),n||i.l.R||(n=!0,!t&&o.preventDefault(),o.shiftKey?a[1].focus():a[0].focus())}!n&&(t=!0)}),!0)})(),t.N?'opt-out'===n.mode&&(n.mode,t.$,S(t.$)):(S(),a(i.o.m))}var r},ce=e=>{const t=i._e,n=i.k.cookie;!0===e&&K(n.name,n.path,n.domain),i.l.B.forEach((e=>{e.Ue.removeEventListener(e.ze,e.qe)})),t.ve&&t.ve.remove(),t.ue&&(b(t.ue,'disable--interaction'),b(t.ue,'show--preferences'),b(t.ue,'show--consent'));const o=new r;i.l=o.l,i._e=o._e,i.k=o.k,i.t=o.t,i.o=o.o,window._ccRun=!1};export{L as acceptCategory,U as acceptService,J as acceptedCategory,z as acceptedService,K as eraseCookies,ae as getConfig,oe as getCookie,ee as getUserPreferences,W as hide,Y as hidePreferences,te as loadScript,ce as reset,ie as run,ne as setCookieData,$ as setLanguage,Q as show,X as showPreferences,re as validConsent,q as validCookie}; |
/*! | ||
* CookieConsent 3.0.0-rc.7 | ||
* CookieConsent 3.0.0-rc.8 | ||
* https://github.com/orestbida/cookieconsent | ||
@@ -7,2 +7,2 @@ * Author Orest Bida | ||
*/ | ||
var e,t;e=this,t=function(e){'use strict';const t='opt-in',n='opt-out',o='show--consent',a='show--preferences',r='disable--interaction',i='data-category',c='div',s='button',l='consentModal',d='preferencesModal',f=e=>'function'==typeof e,u=e=>{if('object'!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());let t=Array.isArray(e)?[]:{};for(let n in e){let o=e[n];t[n]=u(o)}return t},_=(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))},p=(e,t,n)=>{const o=g.t,a=g.o,r={cookie:g.l.i};if(t){const r={modalName:t};return e===a.u?f(o.u)&&o.u(r):e===a._?f(o._)&&o._(r):(r.modal=n,f(o.p)&&o.p(r)),_(e,r)}e===a.m?f(o.m)&&o.m(u(r)):e===a.g?f(o.g)&&o.g(u(r)):(r.changedCategories=g.l.v,r.changedServices=g.l.h,f(o.C)&&o.C(u(r))),_(e,u(r))};class m{constructor(){this.k={mode:t,revision:0,autoShow:!0,autoClearCookies:!0,manageScriptTags:!0,hideFromBots:!0,lazyHtmlGeneration:!0,cookie:{name:'cc_cookie',expiresAfterDays:182,domain:'',path:'/',sameSite:'Lax'}},this.l={S:null,T:'',M:{},A:null,i:null,B:[],D:null,H:null,V:null,F:'',N:!0,j:!1,I:!1,G:!1,P:!1,R:!1,O:!1,L:[],J:!1,U:!0,v:[],q:!1,K:'',W:!1,X:[],Y:[],Z:[],$:[],ee:!1,te:!1,ne:!1,oe:[],ae:[],re:[],ie:{},ce:{},se:{},h:{},le:{},de:[],fe:[]},this.ue={_e:0,pe:0,me:0,ge:0,ve:0,be:0,ye:0,he:0,we:0,Ce:0,ke:0,xe:0,Se:0,Te:0,Me:0,Ae:0,Be:0,De:0,He:0,Ee:0,Ve:0,Fe:0,Ne:0,je:0,Ie:0,Ge:0,Pe:0,Re:0,Oe:0,Le:{},Je:{}},this.t={m:0,g:0,C:0,u:0,_:0,p:0},this.o={m:'cc:onFirstConsent',g:'cc:onConsent',C:'cc:onChange',u:'cc:onModalShow',_:'cc:onModalHide',p:'cc:onModalReady'}}}const g=new m,v=e=>Array.isArray(e),b=e=>!!e&&'object'==typeof e&&!v(e),y=(e,t)=>-1!==e.indexOf(t),h=e=>{const t=document.createElement(e);return e===s&&w(t,'type',e),t},w=(e,t,n)=>{e.setAttribute(t,n)},C=(e,t)=>{e.appendChild(t)},k=(e,t,n,o)=>{e.addEventListener(t,n),o&&g.l.B.push({Ue:e,ze:t,qe:n})},x=e=>Object.keys(e),S=(e,t)=>{e.classList.add(t)},T=(e,t)=>{S(e,'cm__'+t)},M=(e,t)=>{S(e,'pm__'+t)},A=(e,t)=>{e.classList.remove(t)},B=()=>{const e=g.k.cookie.expiresAfterDays;return f(e)?e(g.l.K):e},D=(e,t)=>e.filter((e=>!y(t,e))).concat(t.filter((t=>!y(e,t)))),H=()=>{g.l.K=(()=>{let e='custom',t=F().accepted;return t.length===g.l.X.length?e='all':t.length===g.l.Z.length&&(e='necessary'),e})()},E=(e,t,n,o)=>{const a='accept-',r=u('show-preferencesModal'),i=u('show-consentModal'),c=u(a+'all'),s=u(a+'necessary'),l=u(a+'custom'),d=!0===g.k.lazyHtmlGeneration;for(var f=0;f<r.length;f++)w(r[f],'aria-haspopup','dialog'),k(r[f],'click',(e=>{e.preventDefault(),t.showPreferences()}),!0),d&&k(r[f],'mouseover',(e=>{e.preventDefault(),g.l.P||n(t,o)}),!0);for(f=0;f<i.length;f++)w(i[f],'aria-haspopup','dialog'),k(i[f],'click',(e=>{e.preventDefault(),t.show(!0)}),!0);for(f=0;f<c.length;f++)k(c[f],'click',(e=>{_(e,'all')}),!0);for(f=0;f<l.length;f++)k(l[f],'click',(e=>{_(e)}),!0);for(f=0;f<s.length;f++)k(s[f],'click',(e=>{_(e,[])}),!0);function u(t){return(e||document).querySelectorAll('[data-cc="'+t+'"]')}function _(e,n){e.preventDefault(),t.acceptCategory(n),t.hidePreferences(),t.hide()}},V=e=>Array.from(new Set(e)),F=()=>{const e=g.l.X.filter((e=>!y(g.l.Y,e)));return{accepted:g.l.Y,rejected:e}},N=()=>{const e=g.l,t=['[href]',s,'input','details','[tabindex="0"]'].join(':not([tabindex="-1"]), '),n=(e,n)=>{const o=e&&e.querySelectorAll(t);n[0]=o[0],n[1]=o[o.length-1]};e.j&&n(g.ue.be,e.oe),e.P&&n(g.ue.He,e.ae)},j=e=>{const t=g.l,n=t.ce;if(t.X.forEach((e=>{(t.h[e]||t.ce[e]||[]).forEach((n=>{const o=t.ie[e][n];o&&(!o.enabled&&y(t.ce[e],n)&&f(o.onAccept)?(o.enabled=!0,o.onAccept()):o.enabled&&!y(t.ce[e],n)&&f(o.onReject)&&(o.enabled=!1,o.onReject()))}))})),!g.k.manageScriptTags)return;var o=t.de,a=e||t.i.categories||[];const r=(e,o)=>{if(o<e.length){var c=e[o],s=t.fe[o],l=s.Ke,d=s.Qe,f=y(a,l),u=!!d&&y(n[l],d);if(!s.We){var _=!d&&!s.Xe&&f,p=d&&!s.Xe&&u,m=!d&&s.Xe&&!f&&y(t.v,l),g=d&&s.Xe&&!u&&y(t.h[l]||[],d);if(_||m||p||g){s.We=!0,c.removeAttribute('type'),c.removeAttribute(i);let t=c.getAttribute('data-src');t&&c.removeAttribute('data-src');const n=h('script');if(n.textContent=c.innerHTML,((e,t)=>{for(var n=t.attributes,o=n.length,a=0;a<o;a++){var r=n[a].nodeName;w(e,r,t[r]||t.getAttribute(r))}})(n,c),t?n.src=t:t=c.src,t&&(n.onload=n.onerror=()=>{r(e,++o)}),c.replaceWith(n),t)return}}r(e,++o)}};r(o,0)},I=e=>{const t=g.l.S.guiOptions,n=t&&t.consentModal,o=t&&t.preferencesModal,a=(e,t,n,o,a,r)=>{var i=n&&n.layout,c=n&&n.position,s=n&&!0===n.flipButtons,l=n&&!1===n.equalWeightButtons,d=i&&i.split(' ')||[],f=c&&c.split(' ')||[],u=d[0],_=d[1],p=f[0],m='pm--'===o?f[0]:f[1],v=u,b=t[u];b||(b=t[a],v=a);var h=y(b.Ye,_)&&_,w=y(b.Ze,p)?p:b.$e,C=y(b.et,m)?m:b.tt;e.className=r,S(e,o+v),h&&S(e,o+h),w&&S(e,o+w),C&&S(e,o+C),s&&S(e,o+'flip');const k='btn--secondary',x=r+'__';if('cm'===r){const{Me:e,De:t}=g.ue;e&&A(e,x+k),t&&A(t,x+k),l&&(e&&S(e,x+k),t&&S(t,x+k))}else{const{Re:e}=g.ue;e&&A(e,x+k),l&&e&&S(e,x+k)}};if(0===e){const e=['middle','top','bottom'],t=['left','center','right'],o={box:{Ye:['wide','inline'],Ze:e,et:t,$e:'bottom',tt:'right'},cloud:{Ye:['inline'],Ze:e,et:t,$e:'bottom',tt:'center'},bar:{Ye:['inline'],Ze:e.slice(1),et:[],$e:'bottom',tt:''}};a(g.ue.be,o,n,'cm--','box','cm')}if(1===e){const e={box:{Ye:[],Ze:[],et:[],$e:'',tt:''},bar:{Ye:['wide'],Ze:[],et:['left','right'],$e:'',tt:'left'}};a(g.ue.He,e,o,'pm--','box','pm')}},G=(e,t)=>{const n=g.l,o=g.ue,a=n.A&&n.A.preferencesModal;if(!a)return;var r=a.title,i=a.closeIconLabel,l=a.acceptAllBtn,f=a.acceptNecessaryBtn,u=a.savePreferencesBtn,_=a.sections;if(o.ve)o.je=h(c),M(o.je,'body');else{o.ve=h(c),S(o.ve,'pm-wrapper'),o.He=h(c),o.He.style.visibility='hidden',S(o.He,'pm'),w(o.He,'role','dialog'),w(o.He,'aria-hidden',!0),w(o.He,'aria-modal',!0),k(o.pe,'keydown',(t=>{27===t.keyCode&&e.hidePreferences()}),!0),o.Ee=h(c),M(o.Ee,'header'),o.Ve=h(c),M(o.Ve,'title'),w(o.Ve,'role','heading'),o.Fe=h(s),M(o.Fe,'close-btn'),w(o.Fe,'aria-label',a.closeIconLabel||''),k(o.Fe,'click',e.hidePreferences),o.Ne=h(c),M(o.Ne,'body'),o.Ge=h(c),M(o.Ge,'footer');var m=h(c);S(m,'btns');var v=h(c),b=h(c);M(v,'btn-group'),M(b,'btn-group'),C(o.Ge,b),C(o.Ge,v),C(o.Ee,o.Ve),C(o.Ee,o.Fe),C(o.He,o.Ee),C(o.He,o.Ne),C(o.He,o.Ge),C(o.ve,o.He)}let y;function T(t){e.acceptCategory(t),e.hidePreferences(),e.hide()}r&&(o.Ve.innerHTML=r,i&&w(o.Fe,'aria-label',i)),_&&_.forEach((e=>{var t=e.title,r=e.description,i=e.linkedCategory,l=i&&n.W[i],d=e.cookieTable,f=d&&d.body,u=f&&f.length>0,_=!!l,p=_&&n.ie[i]||!1,m=p&&x(p)||[],g=_&&(!!r||!!u||x(p).length>0),v=h(c);if(M(v,'section'),g||r){var b=h(c);M(b,'section-desc-wrapper')}let T=m.length;if(g&&T>0){var B=h(c);M(B,'section-services'),m.forEach((e=>{var t=p[e].label||e,n=h(c),o=h(c),a=h(c),r=h(c);M(n,'service'),M(r,'service-title'),M(o,'service-header'),M(a,'service-icon');var s=P(t,e,l,!0,i);r.innerHTML=t,C(o,a),C(o,r),C(n,o),C(n,s),C(B,n)})),C(b,B)}if(t){var D=h(c),H=h(_?s:c);if(M(D,'section-title-wrapper'),M(H,'section-title'),H.innerHTML=t,C(D,H),_){var E=h('span');M(E,'section-arrow'),C(D,E),v.className+='--toggle';var V=P(t,i,l);let e=a.serviceCounterLabel;if(T>0&&'string'==typeof e){let t=h('span');M(t,'badge'),M(t,'service-counter'),w(t,'aria-hidden',!0),w(t,'data-servicecounter',T),e&&(e=e.split('|'),e=e.length>1&&T>1?e[1]:e[0],w(t,'data-counterlabel',e)),t.innerHTML=T+(e?' '+e:''),C(H,t)}if(g){M(v,'section--expandable');var F=i+'-desc';w(H,'aria-expanded',!1),w(H,'aria-controls',F)}C(D,V)}else w(H,'role','heading'),w(H,'aria-level','3');C(v,D)}if(r){var N=h(c);M(N,'section-desc'),N.innerHTML=r,C(b,N)}if(g&&(w(b,'aria-hidden','true'),b.id=F,((e,t,n)=>{k(H,'click',(()=>{t.classList.contains('is-expanded')?(A(t,'is-expanded'),w(n,'aria-expanded','false'),w(e,'aria-hidden','true')):(S(t,'is-expanded'),w(n,'aria-expanded','true'),w(e,'aria-hidden','false'))}))})(b,v,H),u)){var j=h('table'),I=h('thead'),G=h('tbody');M(j,'section-table'),M(I,'table-head'),M(G,'table-body');var R=d.headers,O=x(R),L=o._e.createDocumentFragment(),J=h('tr');w(J,'role','row');for(var U=0;U<O.length;U++){var z=R[O[U]],q=h('th');q.id='cc__row-'+z,w(q,'role','columnheader'),w(q,'scope','col'),M(q,'table-th'),q.innerHTML=z,C(L,q)}C(J,L),C(I,J);var K=o._e.createDocumentFragment();for(U=0;U<f.length;U++){var Q=f[U],W=h('tr');w(W,'role','row'),M(W,'table-tr');for(var X=0;X<O.length;X++){var Y=O[X],Z=R[Y],$=Q[Y],ee=h('td'),te=h(c);M(ee,'table-td'),w(ee,'data-column',Z),w(ee,'headers','cc__row-'+Z),te.insertAdjacentHTML('beforeend',$),C(ee,te),C(W,ee)}C(K,W)}C(G,K),C(j,I),C(j,G),C(b,j)}(g||r)&&C(v,b);const ne=o.je||o.Ne;_?(y||(y=h(c),M(y,'section-toggles')),y.appendChild(v)):y=null,C(ne,y||v)})),(l||f)&&(f&&(o.Re||(o.Re=h(s),M(o.Re,'btn'),w(o.Re,'data-role','necessary'),C(v,o.Re),k(o.Re,'click',(()=>{T([])}))),o.Re.innerHTML=f),l&&(o.Pe||(o.Pe=h(s),M(o.Pe,'btn'),w(o.Pe,'data-role','all'),C(v,o.Pe),k(o.Pe,'click',(()=>{T('all')}))),o.Pe.innerHTML=l)),u&&(o.Oe||(o.Oe=h(s),M(o.Oe,'btn'),M(o.Oe,'btn--secondary'),w(o.Oe,'data-role','save'),C(b,o.Oe),k(o.Oe,'click',(()=>{T()}))),o.Oe.innerHTML=u),o.je&&(o.He.replaceChild(o.je,o.Ne),o.Ne=o.je),I(1),n.P||(n.P=!0,p(g.o.p,d,o.He),N(),t(e),C(o.me,o.ve),setTimeout((()=>S(o.ve,'cc--anim')),100))};function P(e,t,n,o,a){const r=g.l,c=g.ue;var s=h('label'),l=h('input'),d=h('span'),f=h('span'),u=h('span'),_=h('span');if(l.type='checkbox',S(s,'section__toggle-wrapper'),S(l,'section__toggle'),S(u,'toggle__icon-on'),S(_,'toggle__icon-off'),S(d,'toggle__icon'),S(f,'toggle__label'),w(d,'aria-hidden','true'),o?(S(s,'toggle-service'),S(l,'toggle-service'),w(l,i,a),c.Je[a][t]=l):c.Le[t]=l,o?(e=>{k(l,'change',(()=>{var t=c.Je[e],n=c.Le[e];for(var o in r.se[e]=[],t){const n=t[o];n.checked&&r.se[e].push(n.value)}r.se[e].length>0?n.checked=!0:n.checked=!1}))})(a):(e=>{k(l,'click',(()=>{var t=c.Je[e];if(r.se[e]=[],l.checked)for(var n in t)t[n].checked=!0;else for(n in t)t[n].checked=!1}))})(t),l.value=t,f.textContent=e.replace(/<.*>.*<\/.*>/gm,''),C(d,_),C(d,u),r.N)(n.enabled||n.readOnly)&&(l.checked=!0);else if(o){var p=r.ce[a];(n.readOnly||y(p,t))&&(l.checked=!0)}else y(r.Y,t)&&(l.checked=!0);return n.readOnly&&(l.disabled=!0),C(s,l),C(s,d),C(s,f),s}const R=(e,t)=>{const n=g.l,o=g.ue,a=n.A&&n.A.consentModal;if(a){!0===n.S.disablePageInteraction&&S(o.pe,r);var i=a.acceptAllBtn,d=a.acceptNecessaryBtn,f=a.showPreferencesBtn,u=a.closeIconLabel,_=a.footer;if(!o.ge){o.ge=h(c),o.be=h(c),o.ye=h(c),o.he=h(c),o.ke=h(c),S(o.ge,'cm-wrapper'),S(o.be,'cm'),T(o.ye,'body'),T(o.he,'texts'),T(o.ke,'btns'),w(o.be,'role','dialog'),w(o.be,'aria-modal','true'),w(o.be,'aria-hidden','false'),w(o.be,'aria-labelledby','cm__title'),w(o.be,'aria-describedby','cm__desc'),o.be.style.visibility='hidden';const t='box',a=n.S.guiOptions,r=a&&a.consentModal,l=(r&&r.layout||t).split(' ')[0]===t;u&&l&&(o.De||(o.De=h(s),T(o.De,'btn'),T(o.De,'btn--close'),k(o.De,'click',(()=>{e.hide(),e.acceptCategory([])})),C(o.ye,o.De)),w(o.De,'aria-label',u)),C(o.ye,o.he),(i||d||f)&&C(o.ye,o.ke),C(o.be,o.ye),C(o.ge,o.be)}var m=a.title;m&&(o.we||(o.we=h(c),o.we.className=o.we.id='cm__title',w(o.we,'role','heading'),w(o.we,'aria-level','2'),C(o.he,o.we)),o.we.innerHTML=m);var v=a.description;if(v&&(n.J&&(v=v.replace('{{revisionMessage}}',n.U?'':a.revisionMessage||'')),o.Ce||(o.Ce=h(c),o.Ce.className=o.Ce.id='cm__desc',C(o.he,o.Ce)),o.Ce.innerHTML=v),i&&(o.Te||(o.Te=h(s),T(o.Te,'btn'),w(o.Te,'data-role','all'),k(o.Te,'click',(()=>{e.hide(),e.acceptCategory('all')}))),o.Te.innerHTML=i),d&&(o.Me||(o.Me=h(s),T(o.Me,'btn'),w(o.Me,'data-role','necessary'),k(o.Me,'click',(()=>{e.hide(),e.acceptCategory([])}))),o.Me.innerHTML=d),f&&(o.Ae||(o.Ae=h(s),T(o.Ae,'btn'),T(o.Ae,'btn--secondary'),w(o.Ae,'data-role','show'),k(o.Ae,'mouseover',(()=>{G(e,t)})),k(o.Ae,'click',e.showPreferences)),o.Ae.innerHTML=f),!o.Se&&f&&(o.Se=h(c),T(o.Se,'btn-group'),C(o.Se,o.Ae),C(o.ke,o.Se)),o.xe||(o.xe=h(c),T(o.xe,'btn-group'),d&&C(o.xe,o.Me),i&&C(o.xe,o.Te),(i||d)&&C(o.ye,o.xe),C(o.ke,o.xe)),_){if(!o.Be){var b=h(c),y=h(c);o.Be=h(c),T(b,'footer'),T(y,'links'),T(o.Be,'link-group'),C(y,o.Be),C(b,y),C(o.be,b)}o.Be.innerHTML=_}I(0),n.j||(n.j=!0,p(g.o.p,l,o.be),N(),t(e),C(o.me,o.ge),setTimeout((()=>S(o.ge,'cc--anim')),100)),E(o.ye,e,G,t)}},O=e=>{const t=g.ue;if(!t.me){t.me=h(c),t.me.id='cc-main',t.me.style.position='fixed',t.me.style.zIndex='2147483647';let n=g.l.S.root;n&&'string'==typeof n&&(n=document.querySelector(n)),C(n||t._e.body,t.me),(e=>{const t=g.ue;k(t.me,'click',(n=>{const o=g.l;o.O?t.He.contains(n.target)?o.R=!0:(e.hidePreferences(0),o.R=!1):o.I&&t.be.contains(n.target)&&(o.R=!0)}))})(e)}},L=e=>!!e&&y(x(g.l.M),e),J=()=>{const e=g.l;return e.T||e.S.language.default},U=e=>{e&&(g.l.T=e)},z=async e=>{const t=g.l;let n;n=e&&L(e)?e:J();let o=t.M[n];if(!o)return!1;if('string'==typeof o){const e=await(async e=>{try{const t=await fetch(e,{method:'GET'});return!!t.ok&&await t.json()}catch(e){return!1}})(o);if(!e)return!1;o=e}return t.A=o,U(n),!0},q=e=>{const{hostname:t,protocol:n}=window.location,{name:o,path:a,domain:r,sameSite:i}=g.k.cookie,c=encodeURIComponent(JSON.stringify(g.l.i)),s=e?(()=>{const e=g.l.V,t=e?new Date-e:0;return 864e5*B()-t})():864e5*B(),l=new Date;l.setTime(l.getTime()+s);let d=o+'='+c+(0!==s?'; expires='+l.toUTCString():'')+'; Path='+a+'; SameSite='+i;y(t,'.')&&(d+='; Domain='+r),'https:'===n&&(d+='; Secure'),document.cookie=d,g.l.i},K=e=>{let t;try{t=JSON.parse(decodeURIComponent(e))}catch(e){t={}}return t},Q=(e,t,n)=>{const o=n||g.k.cookie.domain,a=t||g.k.cookie.path,r='www.'===o.slice(0,4),i=r&&o.substring(4),c=(e,t)=>{document.cookie=e+'=; path='+a+(t?'; domain=.'+t:'')+'; expires=Thu, 01 Jan 1970 00:00:01 GMT;'};e.forEach((e=>{c(e),c(e,o),r&&c(e,i)}))},W=(e,t)=>{const n=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return n?t?n.pop():e:''},X=e=>{const t=document.cookie.split(/;\s*/),n=[];for(var o=0;o<t.length;o++){let a=t[o].split('=')[0];if(e)try{e.test(a)&&n.push(a)}catch(e){}else n.push(a)}return n},Y=e=>{e.dispatchEvent(new Event('change'))},Z=(e,o=[])=>{const a=g.l;let r=!1;var i=[];if(e)if('object'==typeof e&&'number'==typeof e.length)for(var c=0;c<e.length;c++)y(a.X,e[c])&&i.push(e[c]);else'string'==typeof e&&('all'===e?i=a.X.slice():y(a.X,e)&&i.push(e));else i=(()=>{let e=g.ue.Le,t=[];if(e)for(var n in e)e[n].checked&&t.push(e[n].value);else a.N||(t=a.i.categories);for(let e in a.se)a.se[e].length>0&&(y(t,e)||t.push(e));return t})(),r=!0;if(o.length>=1)for(c=0;c<o.length;c++)i=i.filter((e=>e!==o[c]));for(c=0;c<a.Z.length;c++)y(i,a.Z[c])||i.push(a.Z[c]);a.Y=i,H(),r||(a.se={}),a.le=u(a.ce),a.X.forEach((e=>{const t=a.ie[e],n=x(t),o=a.ce;0!==n.length&&(o[e]=[],y(a.Z,e)?n.forEach((t=>{o[e].push(t)})):'all'===a.K?r&&a.se[e]&&a.se[e].length>0?a.se[e].forEach((t=>{o[e].push(t)})):n.forEach((t=>{o[e].push(t)})):'necessary'===a.K?o[e]=[]:r&&a.se[e]&&a.se[e].length>0?a.se[e].forEach((t=>{o[e].push(t)})):y(a.Y,e)&&x(t).forEach((t=>o[e].push(t))),o[e]=V(o[e]))})),(()=>{const e=g.l;g.k.mode===n&&e.N?e.v=D(e.$,e.Y):e.v=D(e.Y,e.i.categories||[]);let o=e.v.length>0,a=!1;e.X.forEach((t=>{e.h[t]=D(e.ce[t],e.le[t]||[]),e.h[t].length>0&&(a=!0)}));var r=g.ue.Le;for(var i in r)y(e.Y,i)?r[i].checked=!0:r[i].checked=!1;e.X.forEach((t=>{var n=g.ue.Je[t],o=e.ce[t];for(var a in n){const e=n[a];y(o,a)?e.checked=!0:e.checked=!1}})),e.H||(e.H=new Date),e.F||(e.F=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))),e.i={categories:u(e.Y),revision:g.k.revision,data:e.D,consentTimestamp:e.H.toISOString(),consentId:e.F,services:u(e.ce)};var c=!1;(e.N||o||a)&&(e.N&&(e.N=!1,c=!0),H(),e.V?e.V=new Date:e.V=e.H,e.i.lastConsentTimestamp=e.V.toISOString(),q(),g.k.autoClearCookies&&(c||!e.N&&o)&&(e=>{const t=g.l,n=X();t.q=!1;let o=e?t.X:t.v;o=o.filter((e=>{let n=t.W[e];return!!n&&!n.readOnly&&!!n.autoClear})),o.forEach((o=>{const a=t.W[o].autoClear,r=a&&a.cookies||[],i=y(t.v,o),c=!y(t.Y,o),s=i&&c;(e&&c||!e&&s)&&(!0===a.reloadPage&&s&&(t.q=!0),r.forEach((e=>{let t=[];const o=e.name,a=e.domain,r=e.path;if(o instanceof RegExp)n.forEach((e=>{o.test(e)&&t.push(e)}));else{let e=(i=o,n.indexOf(i));e>-1&&t.push(n[e])}var i;t.length>0&&Q(t,r,a)})))}))})(c),j()),c&&(p(g.o.m),p(g.o.g),g.k.mode===t)||((o||a)&&p(g.o.C),e.q&&window.location.reload())})()},$=(e,t,n)=>{let o=[];const a=e=>{if('string'==typeof e){let t=W(e);''!==t&&o.push(t)}else o=o.concat(X(e))};if(v(e))for(var r=0;r<e.length;r++)a(e[r]);else a(e);Q(o,t,n)},ee=e=>{e&&!g.l.j&&R(ae,O),g.l.j&&(S(g.ue.pe,o),w(g.ue.be,'aria-hidden','false'),g.l.I=!0,setTimeout((()=>{g.l.te=g.ue._e.activeElement,g.l.L=g.l.oe}),200),p(g.o.u,l))},te=()=>{g.l.j&&g.l.I&&(A(g.ue.pe,o),w(g.ue.be,'aria-hidden','true'),g.l.I=!1,setTimeout((()=>{g.l.te.focus(),g.l.L=[]}),200),p(g.o._,l))},ne=()=>{const e=g.l;e.P&&e.G||(e.P||G(ae,O),S(g.ue.pe,a),w(g.ue.He,'aria-hidden','false'),e.G=!0,setTimeout((()=>{e.O=!0}),1),setTimeout((()=>{e.I?e.ne=g.ue._e.activeElement:e.te=g.ue._e.activeElement,0!==e.ae.length&&(e.ae[0].focus(),e.L=e.ae)}),200),p(g.o.u,d))},oe=()=>{const e=g.l;e.G&&(A(g.ue.pe,a),w(g.ue.He,'aria-hidden','true'),e.G=!1,setTimeout((()=>{e.O=!1}),1),e.I?(e.ne&&e.ne.focus(),e.L=e.oe):(e.te&&e.te.focus(),e.L=[]),e.R=!1,p(g.o._,d))};var ae={show:ee,hide:te,showPreferences:ne,hidePreferences:oe,acceptCategory:Z};const re=(e,t)=>{const n=K(W(t||g.k.cookie.name,!0));return e?n[e]:n};e.acceptCategory=Z,e.acceptService=(e,t)=>{const n=g.l;if(!e||!t||'string'!=typeof t||!y(n.X,t))return!1;const o=g.ue.Je[t]||{},a=x(n.ie[t]);if(n.se[t]=[],'string'==typeof e)if('all'===e){for(let e in o)o[e].checked=!0,Y(o[e]);n.se[t]=[...a]}else{for(let t in o)o[t].checked=e===t,Y(o[t]);y(a,e)&&n.se[t].push(e)}else if(v(e)){for(let t in o)y(e,t)?o[t].checked=!0:o[t].checked=!1,Y(o[t]);a.forEach((o=>{y(e,o)&&n.se[t].push(o)}))}Z()},e.acceptedCategory=e=>{let n;return n=g.l.N&&g.k.mode!==t?g.l.$:F().accepted||[],y(n,e)},e.acceptedService=(e,t)=>y(g.l.ce[t]||[],e),e.eraseCookies=$,e.getConfig=e=>{const t=g.k,n=g.l.S;return e?t[e]||n[e]:{...t,...n,cookie:{...t.cookie}}},e.getCookie=re,e.getUserPreferences=()=>{const e=!g.l.N;var t,n=e&&F();return{acceptType:g.l.K,acceptedCategories:e?n.accepted:[],rejectedCategories:e?n.rejected:[],acceptedServices:e?g.l.ce:{},rejectedServices:e?(t={},g.l.X.forEach((e=>{t[e]=D(g.l.ce[e]||[],x(g.l.ie[e])||[])})),t):{}}},e.hide=te,e.hidePreferences=oe,e.loadScript=(e,t)=>{let n=document.querySelector('script[src="'+e+'"]');return new Promise(((o,a)=>{if(n)return o(!0);n=h('script'),v(t)&&t.forEach((e=>{w(n,e.name,e.value)})),n.onload=()=>o(!0),n.onerror=()=>{n.remove(),a(!1)},n.src=e,C(document.head,n)}))},e.reset=e=>{const t=g.ue,n=g.k.cookie;!0===e&&$(n.name,n.path,n.domain),g.l.B.forEach((e=>{e.Ue.removeEventListener(e.ze,e.qe)})),t.me&&t.me.remove(),t.pe&&(A(t.pe,r),A(t.pe,a),A(t.pe,o));const i=new m;g.l=i.l,g.ue=i.ue,g.k=i.k,g.t=i.t,g.o=i.o,window._ccRun=!1},e.run=async e=>{const t=g.l,o=g.k,a=window;if(!a._ccRun){if(a._ccRun=!0,(e=>{!function(){const e=document;g.ue._e=e,g.ue.pe=e.documentElement,g.k.cookie.domain=window.location.hostname}();const t=g.k,o=g.l,a=t.cookie,r=g.t,c=e.cookie,s=e.categories,l=x(s)||[],d=navigator;o.S=e,o.M=e.language.translations,o.W=s,o.X=l,r.m=e.onFirstConsent,r.g=e.onConsent,r.C=e.onChange,r._=e.onModalHide,r.u=e.onModalShow,r.p=e.onModalReady;const{mode:f,autoShow:u,autoClearCookies:_,revision:p,manageScriptTags:m,hideFromBots:v,lazyHtmlGeneration:h}=e;f===n&&(t.mode=f),'boolean'==typeof u&&(t.autoShow=u),'boolean'==typeof _&&(t.autoClearCookies=_),'boolean'==typeof m&&(t.manageScriptTags=m),'number'==typeof p&&p>=0&&(t.revision=p,o.J=!0),'boolean'==typeof h&&(t.lazyHtmlGeneration=h),!1===v&&(t.hideFromBots=!1),!0===t.hideFromBots&&d&&(o.ee=d.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(d.userAgent)||d.webdriver),b(c)&&(t.cookie={...a,...c}),t.autoClearCookies,o.J,t.manageScriptTags,function(e){const t=g.l;e.forEach((e=>{const n=t.W[e],o=n.services||{},a=o&&b(o)&&x(o)||[];t.ie[e]={},t.ce[e]=[],n.readOnly&&(t.Z.push(e),t.ce[e]=x(o)),g.ue.Je[e]={},a.forEach((n=>{const a=o[n];a.enabled=!1,t.ie[e][n]=a}))}))}(l),(()=>{if(!g.k.manageScriptTags)return;const e=g.l;e.de=g.ue._e.querySelectorAll('script[data-category]'),e.fe=[],e.de.forEach((t=>{let n=t.getAttribute(i),o=t.dataset.service||'',a=!1;if(n&&'!'===n.charAt(0)&&(n=n.slice(1),a=!0),'!'===o.charAt(0)&&(o=o.slice(1),a=!0),y(e.X,n)&&(e.fe.push({We:!1,Xe:a,Ke:n,Qe:o}),o)){const t=e.ie[n];t[o]||(t[o]={enabled:!1})}}))})(),U((()=>{const e=g.l.S.language.autoDetect;if(e){let t;if('browser'===e?t=navigator.language.slice(0,2).toLowerCase():'document'===e&&(t=document.documentElement.lang),L(t))return t}return J()})())})(e),t.ee)return;const c=K(W(o.cookie.name,!0)),s=c.categories,l=v(s);t.i=c,t.F=c.consentId;const d=!!t.F&&'string'==typeof t.F;t.H=c.consentTimestamp,t.H&&(t.H=new Date(t.H)),t.V=c.lastConsentTimestamp,t.V&&(t.V=new Date(t.V));const f=c.data;if(t.D=void 0!==f?f:null,t.J&&d&&c.revision!==o.revision&&(t.U=!1),t.N=!(d&&t.U&&t.H&&t.V&&l),t.N,t.N?o.mode===n&&(()=>{const e=g.l;e.X.forEach((t=>{if(e.W[t].enabled){e.$.push(t);const o=e.ie[t]||{};for(var n in o)e.ce[t].push(n)}}))})():(t.Y=V([...t.Z,...c.categories]),t.ce={...t.ce,...c.services},H()),!await z())return;r=ae,g.l.N&&R(r,O),g.k.lazyHtmlGeneration||G(r,O),E(null,r,G,O),o.autoShow&&t.N&&ee(!0),(()=>{const e=g.ue;var t=!1,n=!1;k(e.pe,'keydown',(o=>{if('Tab'!==o.key)return;const a=g.l.L;if(a.length>0){const r=e._e.activeElement;o.shiftKey?r===a[0]&&(a[1].focus(),o.preventDefault()):r===a[1]&&(a[0].focus(),o.preventDefault()),n||g.l.R||(n=!0,!t&&o.preventDefault(),o.shiftKey?a[1].focus():a[0].focus())}!n&&(t=!0)}),!0)})(),t.N?o.mode===n&&(o.mode,t.$,j(t.$)):(j(),p(g.o.g))}var r},e.setCookieData=e=>{let t,n=e.value,o=e.mode,a=!1;const r=g.l;if('update'===o){r.D=re('data'),t=re('data');const e=typeof t==typeof n;if(e&&'object'==typeof t)for(var i in!t&&(t={}),n)t[i]!==n[i]&&(t[i]=n[i],a=!0);else!e&&t||t===n||(t=n,a=!0)}else t=n,a=!0;return a&&(r.D=t,r.i.data=t,q(!0)),a},e.setLanguage=async(e,t)=>!(!L(e)||e===J()&&!0!==t||!await z(e)||(U(e),g.l.j&&R(ae,O),g.l.P&&G(ae,O),0)),e.show=ee,e.showPreferences=ne,e.validConsent=()=>!g.l.N,e.validCookie=e=>''!==W(e,!0),Object.defineProperty(e,'__esModule',{value:!0})},'object'==typeof exports&&'undefined'!=typeof module?t(exports):'function'==typeof define&&define.amd?define(['exports'],t):t((e='undefined'!=typeof globalThis?globalThis:e||self).CookieConsent={}); | ||
var e,t;e=this,t=function(e){'use strict';const t='opt-in',n='opt-out',o='show--consent',a='show--preferences',r='disable--interaction',i='data-category',c='div',s='button',l='consentModal',d='preferencesModal',f=e=>'function'==typeof e,u=e=>{if('object'!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());let t=Array.isArray(e)?[]:{};for(let n in e){let o=e[n];t[n]=u(o)}return t},_=(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))},p=(e,t,n)=>{const o=g.t,a=g.o,r={cookie:g.l.i};if(t){const r={modalName:t};return e===a.u?f(o.u)&&o.u(r):e===a._?f(o._)&&o._(r):(r.modal=n,f(o.p)&&o.p(r)),_(e,r)}e===a.m?f(o.m)&&o.m(u(r)):e===a.g?f(o.g)&&o.g(u(r)):(r.changedCategories=g.l.v,r.changedServices=g.l.h,f(o.C)&&o.C(u(r))),_(e,u(r))};class m{constructor(){this.k={mode:t,revision:0,autoShow:!0,autoClearCookies:!0,manageScriptTags:!0,hideFromBots:!0,lazyHtmlGeneration:!0,cookie:{name:'cc_cookie',expiresAfterDays:182,domain:'',path:'/',sameSite:'Lax'}},this.l={S:null,T:'',M:{},A:null,i:null,B:[],D:null,H:null,V:null,F:'',N:!0,j:!1,I:!1,G:!1,P:!1,R:!1,O:!1,L:[],J:!1,U:!0,v:[],q:!1,K:'',W:!1,X:[],Y:[],Z:[],$:[],ee:!1,te:!1,ne:!1,oe:[],ae:[],re:[],ie:{},ce:{},se:{},h:{},le:{},de:[],fe:[]},this.ue={_e:0,pe:0,me:0,ge:0,ve:0,be:0,ye:0,he:0,we:0,Ce:0,ke:0,xe:0,Se:0,Te:0,Me:0,Ae:0,Be:0,De:0,He:0,Ee:0,Ve:0,Fe:0,Ne:0,je:0,Ie:0,Ge:0,Pe:0,Re:0,Oe:0,Le:{},Je:{}},this.t={m:0,g:0,C:0,u:0,_:0,p:0},this.o={m:'cc:onFirstConsent',g:'cc:onConsent',C:'cc:onChange',u:'cc:onModalShow',_:'cc:onModalHide',p:'cc:onModalReady'}}}const g=new m,v=e=>Array.isArray(e),b=e=>!!e&&'object'==typeof e&&!v(e),y=(e,t)=>-1!==e.indexOf(t),h=e=>{const t=document.createElement(e);return e===s&&w(t,'type',e),t},w=(e,t,n)=>{e.setAttribute(t,n)},C=(e,t)=>{e.appendChild(t)},k=(e,t,n,o)=>{e.addEventListener(t,n),o&&g.l.B.push({Ue:e,ze:t,qe:n})},x=e=>Object.keys(e),S=(e,t)=>{e.classList.add(t)},T=(e,t)=>{S(e,'cm__'+t)},M=(e,t)=>{S(e,'pm__'+t)},A=(e,t)=>{e.classList.remove(t)},B=()=>{const e=g.k.cookie.expiresAfterDays;return f(e)?e(g.l.K):e},D=(e,t)=>e.filter((e=>!y(t,e))).concat(t.filter((t=>!y(e,t)))),H=()=>{g.l.K=(()=>{let e='custom',t=F().accepted;return t.length===g.l.X.length?e='all':t.length===g.l.Z.length&&(e='necessary'),e})()},E=(e,t,n,o)=>{const a='accept-',r=u('show-preferencesModal'),i=u('show-consentModal'),c=u(a+'all'),s=u(a+'necessary'),l=u(a+'custom'),d=!0===g.k.lazyHtmlGeneration;for(var f=0;f<r.length;f++)w(r[f],'aria-haspopup','dialog'),k(r[f],'click',(e=>{e.preventDefault(),t.showPreferences()}),!0),d&&k(r[f],'mouseover',(e=>{e.preventDefault(),g.l.P||n(t,o)}),!0);for(f=0;f<i.length;f++)w(i[f],'aria-haspopup','dialog'),k(i[f],'click',(e=>{e.preventDefault(),t.show(!0)}),!0);for(f=0;f<c.length;f++)k(c[f],'click',(e=>{_(e,'all')}),!0);for(f=0;f<l.length;f++)k(l[f],'click',(e=>{_(e)}),!0);for(f=0;f<s.length;f++)k(s[f],'click',(e=>{_(e,[])}),!0);function u(t){return(e||document).querySelectorAll('[data-cc="'+t+'"]')}function _(e,n){e.preventDefault(),t.acceptCategory(n),t.hidePreferences(),t.hide()}},V=e=>Array.from(new Set(e)),F=()=>{const e=g.l.X.filter((e=>!y(g.l.Y,e)));return{accepted:g.l.Y,rejected:e}},N=()=>{const e=g.l,t=['[href]',s,'input','details','[tabindex="0"]'].join(':not([tabindex="-1"]), '),n=(e,n)=>{const o=e&&e.querySelectorAll(t);n[0]=o[0],n[1]=o[o.length-1]};e.j&&n(g.ue.be,e.oe),e.P&&n(g.ue.He,e.ae)},j=e=>{const t=g.l,n=t.ce;if(t.X.forEach((e=>{(t.h[e]||t.ce[e]||[]).forEach((n=>{const o=t.ie[e][n];o&&(!o.enabled&&y(t.ce[e],n)&&f(o.onAccept)?(o.enabled=!0,o.onAccept()):o.enabled&&!y(t.ce[e],n)&&f(o.onReject)&&(o.enabled=!1,o.onReject()))}))})),!g.k.manageScriptTags)return;var o=t.de,a=e||t.i.categories||[];const r=(e,o)=>{if(o<e.length){var c=e[o],s=t.fe[o],l=s.Ke,d=s.Qe,f=y(a,l),u=!!d&&y(n[l],d);if(!s.We){var _=!d&&!s.Xe&&f,p=d&&!s.Xe&&u,m=!d&&s.Xe&&!f&&y(t.v,l),g=d&&s.Xe&&!u&&y(t.h[l]||[],d);if(_||m||p||g){s.We=!0,c.removeAttribute('type'),c.removeAttribute(i);let t=c.getAttribute('data-src');t&&c.removeAttribute('data-src');const n=h('script');if(n.textContent=c.innerHTML,((e,t)=>{for(var n=t.attributes,o=n.length,a=0;a<o;a++){var r=n[a].nodeName;w(e,r,t[r]||t.getAttribute(r))}})(n,c),t?n.src=t:t=c.src,t&&(n.onload=n.onerror=()=>{r(e,++o)}),c.replaceWith(n),t)return}}r(e,++o)}};r(o,0)},I=e=>{const t=g.l.S.guiOptions,n=t&&t.consentModal,o=t&&t.preferencesModal,a=(e,t,n,o,a,r)=>{var i=n&&n.layout,c=n&&n.position,s=n&&!0===n.flipButtons,l=n&&!1===n.equalWeightButtons,d=i&&i.split(' ')||[],f=c&&c.split(' ')||[],u=d[0],_=d[1],p=f[0],m='pm--'===o?f[0]:f[1],v=u,b=t[u];b||(b=t[a],v=a);var h=y(b.Ye,_)&&_,w=y(b.Ze,p)?p:b.$e,C=y(b.et,m)?m:b.tt;e.className=r,S(e,o+v),h&&S(e,o+h),w&&S(e,o+w),C&&S(e,o+C),s&&S(e,o+'flip');const k='btn--secondary',x=r+'__';if('cm'===r){const{Me:e,De:t}=g.ue;e&&A(e,x+k),t&&A(t,x+k),l&&(e&&S(e,x+k),t&&S(t,x+k))}else{const{Re:e}=g.ue;e&&A(e,x+k),l&&e&&S(e,x+k)}};if(0===e){const e=['middle','top','bottom'],t=['left','center','right'],o={box:{Ye:['wide','inline'],Ze:e,et:t,$e:'bottom',tt:'right'},cloud:{Ye:['inline'],Ze:e,et:t,$e:'bottom',tt:'center'},bar:{Ye:['inline'],Ze:e.slice(1),et:[],$e:'bottom',tt:''}};a(g.ue.be,o,n,'cm--','box','cm')}if(1===e){const e={box:{Ye:[],Ze:[],et:[],$e:'',tt:''},bar:{Ye:['wide'],Ze:[],et:['left','right'],$e:'',tt:'left'}};a(g.ue.He,e,o,'pm--','box','pm')}},G=(e,t)=>{const n=g.l,o=g.ue,a=n.A&&n.A.preferencesModal;if(!a)return;var r=a.title,i=a.closeIconLabel,l=a.acceptAllBtn,f=a.acceptNecessaryBtn,u=a.savePreferencesBtn,_=a.sections;if(o.ve)o.je=h(c),M(o.je,'body');else{o.ve=h(c),S(o.ve,'pm-wrapper'),o.He=h(c),o.He.style.visibility='hidden',S(o.He,'pm'),w(o.He,'role','dialog'),w(o.He,'aria-hidden',!0),w(o.He,'aria-modal',!0),k(o.pe,'keydown',(t=>{27===t.keyCode&&e.hidePreferences()}),!0),o.Ee=h(c),M(o.Ee,'header'),o.Ve=h(c),M(o.Ve,'title'),w(o.Ve,'role','heading'),o.Fe=h(s),M(o.Fe,'close-btn'),w(o.Fe,'aria-label',a.closeIconLabel||''),k(o.Fe,'click',e.hidePreferences),o.Ne=h(c),M(o.Ne,'body'),o.Ge=h(c),M(o.Ge,'footer');var m=h(c);S(m,'btns');var v=h(c),b=h(c);M(v,'btn-group'),M(b,'btn-group'),C(o.Ge,b),C(o.Ge,v),C(o.Ee,o.Ve),C(o.Ee,o.Fe),C(o.He,o.Ee),C(o.He,o.Ne),C(o.He,o.Ge),C(o.ve,o.He)}let y;function T(t){e.acceptCategory(t),e.hidePreferences(),e.hide()}r&&(o.Ve.innerHTML=r,i&&w(o.Fe,'aria-label',i)),_&&_.forEach((e=>{var t=e.title,r=e.description,i=e.linkedCategory,l=i&&n.W[i],d=e.cookieTable,f=d&&d.body,u=f&&f.length>0,_=!!l,p=_&&n.ie[i]||!1,m=p&&x(p)||[],g=_&&(!!r||!!u||x(p).length>0),v=h(c);if(M(v,'section'),g||r){var b=h(c);M(b,'section-desc-wrapper')}let T=m.length;if(g&&T>0){var B=h(c);M(B,'section-services'),m.forEach((e=>{var t=p[e].label||e,n=h(c),o=h(c),a=h(c),r=h(c);M(n,'service'),M(r,'service-title'),M(o,'service-header'),M(a,'service-icon');var s=P(t,e,l,!0,i);r.innerHTML=t,C(o,a),C(o,r),C(n,o),C(n,s),C(B,n)})),C(b,B)}if(t){var D=h(c),H=h(_?s:c);if(M(D,'section-title-wrapper'),M(H,'section-title'),H.innerHTML=t,C(D,H),_){var E=h('span');M(E,'section-arrow'),C(D,E),v.className+='--toggle';var V=P(t,i,l);let e=a.serviceCounterLabel;if(T>0&&'string'==typeof e){let t=h('span');M(t,'badge'),M(t,'service-counter'),w(t,'aria-hidden',!0),w(t,'data-servicecounter',T),e&&(e=e.split('|'),e=e.length>1&&T>1?e[1]:e[0],w(t,'data-counterlabel',e)),t.innerHTML=T+(e?' '+e:''),C(H,t)}if(g){M(v,'section--expandable');var F=i+'-desc';w(H,'aria-expanded',!1),w(H,'aria-controls',F)}C(D,V)}else w(H,'role','heading'),w(H,'aria-level','3');C(v,D)}if(r){var N=h(c);M(N,'section-desc'),N.innerHTML=r,C(b,N)}if(g&&(w(b,'aria-hidden','true'),b.id=F,((e,t,n)=>{k(H,'click',(()=>{t.classList.contains('is-expanded')?(A(t,'is-expanded'),w(n,'aria-expanded','false'),w(e,'aria-hidden','true')):(S(t,'is-expanded'),w(n,'aria-expanded','true'),w(e,'aria-hidden','false'))}))})(b,v,H),u)){var j=h('table'),I=h('thead'),G=h('tbody');M(j,'section-table'),M(I,'table-head'),M(G,'table-body');var R=d.headers,O=x(R),L=o._e.createDocumentFragment(),J=h('tr');w(J,'role','row');for(var U=0;U<O.length;U++){var z=R[O[U]],q=h('th');q.id='cc__row-'+z,w(q,'role','columnheader'),w(q,'scope','col'),M(q,'table-th'),q.innerHTML=z,C(L,q)}C(J,L),C(I,J);var K=o._e.createDocumentFragment();for(U=0;U<f.length;U++){var Q=f[U],W=h('tr');w(W,'role','row'),M(W,'table-tr');for(var X=0;X<O.length;X++){var Y=O[X],Z=R[Y],$=Q[Y],ee=h('td'),te=h(c);M(ee,'table-td'),w(ee,'data-column',Z),w(ee,'headers','cc__row-'+Z),te.insertAdjacentHTML('beforeend',$),C(ee,te),C(W,ee)}C(K,W)}C(G,K),C(j,I),C(j,G),C(b,j)}(g||r)&&C(v,b);const ne=o.je||o.Ne;_?(y||(y=h(c),M(y,'section-toggles')),y.appendChild(v)):y=null,C(ne,y||v)})),(l||f)&&(f&&(o.Re||(o.Re=h(s),M(o.Re,'btn'),w(o.Re,'data-role','necessary'),C(v,o.Re),k(o.Re,'click',(()=>{T([])}))),o.Re.innerHTML=f),l&&(o.Pe||(o.Pe=h(s),M(o.Pe,'btn'),w(o.Pe,'data-role','all'),C(v,o.Pe),k(o.Pe,'click',(()=>{T('all')}))),o.Pe.innerHTML=l)),u&&(o.Oe||(o.Oe=h(s),M(o.Oe,'btn'),M(o.Oe,'btn--secondary'),w(o.Oe,'data-role','save'),C(b,o.Oe),k(o.Oe,'click',(()=>{T()}))),o.Oe.innerHTML=u),o.je&&(o.He.replaceChild(o.je,o.Ne),o.Ne=o.je),I(1),n.P||(n.P=!0,p(g.o.p,d,o.He),N(),t(e),C(o.me,o.ve),setTimeout((()=>S(o.ve,'cc--anim')),100))};function P(e,t,n,o,a){const r=g.l,c=g.ue;var s=h('label'),l=h('input'),d=h('span'),f=h('span'),u=h('span'),_=h('span');if(l.type='checkbox',S(s,'section__toggle-wrapper'),S(l,'section__toggle'),S(u,'toggle__icon-on'),S(_,'toggle__icon-off'),S(d,'toggle__icon'),S(f,'toggle__label'),w(d,'aria-hidden','true'),o?(S(s,'toggle-service'),S(l,'toggle-service'),w(l,i,a),c.Je[a][t]=l):c.Le[t]=l,o?(e=>{k(l,'change',(()=>{var t=c.Je[e],n=c.Le[e];for(var o in r.se[e]=[],t){const n=t[o];n.checked&&r.se[e].push(n.value)}r.se[e].length>0?n.checked=!0:n.checked=!1}))})(a):(e=>{k(l,'click',(()=>{var t=c.Je[e];if(r.se[e]=[],l.checked)for(var n in t)t[n].checked=!0;else for(n in t)t[n].checked=!1}))})(t),l.value=t,f.textContent=e.replace(/<.*>.*<\/.*>/gm,''),C(d,_),C(d,u),r.N)(n.enabled||n.readOnly)&&(l.checked=!0);else if(o){var p=r.ce[a];(n.readOnly||y(p,t))&&(l.checked=!0)}else y(r.Y,t)&&(l.checked=!0);return n.readOnly&&(l.disabled=!0),C(s,l),C(s,d),C(s,f),s}const R=(e,t)=>{const n=g.l,o=g.ue,a=n.A&&n.A.consentModal;if(a){!0===n.S.disablePageInteraction&&S(o.pe,r);var i=a.acceptAllBtn,d=a.acceptNecessaryBtn,f=a.showPreferencesBtn,u=a.closeIconLabel,_=a.footer;if(!o.ge){o.ge=h(c),o.be=h(c),o.ye=h(c),o.he=h(c),o.ke=h(c),S(o.ge,'cm-wrapper'),S(o.be,'cm'),T(o.ye,'body'),T(o.he,'texts'),T(o.ke,'btns'),w(o.be,'role','dialog'),w(o.be,'aria-modal','true'),w(o.be,'aria-hidden','false'),w(o.be,'aria-labelledby','cm__title'),w(o.be,'aria-describedby','cm__desc'),o.be.style.visibility='hidden';const t='box',a=n.S.guiOptions,r=a&&a.consentModal,l=(r&&r.layout||t).split(' ')[0]===t;u&&l&&(o.De||(o.De=h(s),T(o.De,'btn'),T(o.De,'btn--close'),k(o.De,'click',(()=>{e.hide(),e.acceptCategory([])})),C(o.ye,o.De)),w(o.De,'aria-label',u)),C(o.ye,o.he),(i||d||f)&&C(o.ye,o.ke),C(o.be,o.ye),C(o.ge,o.be)}var m=a.title;m&&(o.we||(o.we=h(c),o.we.className=o.we.id='cm__title',w(o.we,'role','heading'),w(o.we,'aria-level','2'),C(o.he,o.we)),o.we.innerHTML=m);var v=a.description;if(v&&(n.J&&(v=v.replace('{{revisionMessage}}',n.U?'':a.revisionMessage||'')),o.Ce||(o.Ce=h(c),o.Ce.className=o.Ce.id='cm__desc',C(o.he,o.Ce)),o.Ce.innerHTML=v),i&&(o.Te||(o.Te=h(s),T(o.Te,'btn'),w(o.Te,'data-role','all'),k(o.Te,'click',(()=>{e.hide(),e.acceptCategory('all')}))),o.Te.innerHTML=i),d&&(o.Me||(o.Me=h(s),T(o.Me,'btn'),w(o.Me,'data-role','necessary'),k(o.Me,'click',(()=>{e.hide(),e.acceptCategory([])}))),o.Me.innerHTML=d),f&&(o.Ae||(o.Ae=h(s),T(o.Ae,'btn'),T(o.Ae,'btn--secondary'),w(o.Ae,'data-role','show'),k(o.Ae,'mouseover',(()=>{n.P||G(e,t)})),k(o.Ae,'click',e.showPreferences)),o.Ae.innerHTML=f),!o.Se&&f&&(o.Se=h(c),T(o.Se,'btn-group'),C(o.Se,o.Ae),C(o.ke,o.Se)),o.xe||(o.xe=h(c),T(o.xe,'btn-group'),d&&C(o.xe,o.Me),i&&C(o.xe,o.Te),(i||d)&&C(o.ye,o.xe),C(o.ke,o.xe)),_){if(!o.Be){var b=h(c),y=h(c);o.Be=h(c),T(b,'footer'),T(y,'links'),T(o.Be,'link-group'),C(y,o.Be),C(b,y),C(o.be,b)}o.Be.innerHTML=_}I(0),n.j||(n.j=!0,p(g.o.p,l,o.be),N(),t(e),C(o.me,o.ge),setTimeout((()=>S(o.ge,'cc--anim')),100)),E(o.ye,e,G,t)}},O=e=>{const t=g.ue;if(!t.me){t.me=h(c),t.me.id='cc-main',t.me.style.position='fixed',t.me.style.zIndex='2147483647';let n=g.l.S.root;n&&'string'==typeof n&&(n=document.querySelector(n)),C(n||t._e.body,t.me),(e=>{const t=g.ue;k(t.me,'click',(n=>{const o=g.l;o.O?t.He.contains(n.target)?o.R=!0:(e.hidePreferences(0),o.R=!1):o.I&&t.be.contains(n.target)&&(o.R=!0)}))})(e)}},L=e=>!!e&&y(x(g.l.M),e),J=()=>{const e=g.l;return e.T||e.S.language.default},U=e=>{e&&(g.l.T=e)},z=async e=>{const t=g.l;let n;n=e&&L(e)?e:J();let o=t.M[n];if(!o)return!1;if('string'==typeof o){const e=await(async e=>{try{const t=await fetch(e,{method:'GET'});return!!t.ok&&await t.json()}catch(e){return!1}})(o);if(!e)return!1;o=e}return t.A=o,U(n),!0},q=e=>{const{hostname:t,protocol:n}=window.location,{name:o,path:a,domain:r,sameSite:i}=g.k.cookie,c=encodeURIComponent(JSON.stringify(g.l.i)),s=e?(()=>{const e=g.l.V,t=e?new Date-e:0;return 864e5*B()-t})():864e5*B(),l=new Date;l.setTime(l.getTime()+s);let d=o+'='+c+(0!==s?'; expires='+l.toUTCString():'')+'; Path='+a+'; SameSite='+i;y(t,'.')&&(d+='; Domain='+r),'https:'===n&&(d+='; Secure'),document.cookie=d,g.l.i},K=e=>{let t;try{t=JSON.parse(decodeURIComponent(e))}catch(e){t={}}return t},Q=(e,t,n)=>{const o=n||g.k.cookie.domain,a=t||g.k.cookie.path,r='www.'===o.slice(0,4),i=r&&o.substring(4),c=(e,t)=>{document.cookie=e+'=; path='+a+(t?'; domain=.'+t:'')+'; expires=Thu, 01 Jan 1970 00:00:01 GMT;'};e.forEach((e=>{c(e),c(e,o),r&&c(e,i)}))},W=(e,t)=>{const n=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return n?t?n.pop():e:''},X=e=>{const t=document.cookie.split(/;\s*/),n=[];for(var o=0;o<t.length;o++){let a=t[o].split('=')[0];if(e)try{e.test(a)&&n.push(a)}catch(e){}else n.push(a)}return n},Y=e=>{e.dispatchEvent(new Event('change'))},Z=(e,o=[])=>{const a=g.l;let r=!1;var i=[];if(e)if('object'==typeof e&&'number'==typeof e.length)for(var c=0;c<e.length;c++)y(a.X,e[c])&&i.push(e[c]);else'string'==typeof e&&('all'===e?i=a.X.slice():y(a.X,e)&&i.push(e));else i=(()=>{let e=g.ue.Le,t=[];if(e)for(var n in e)e[n].checked&&t.push(e[n].value);else a.N||(t=a.i.categories);for(let e in a.se)a.se[e].length>0&&(y(t,e)||t.push(e));return t})(),r=!0;if(o.length>=1)for(c=0;c<o.length;c++)i=i.filter((e=>e!==o[c]));for(c=0;c<a.Z.length;c++)y(i,a.Z[c])||i.push(a.Z[c]);a.Y=i,H(),r||(a.se={}),a.le=u(a.ce),a.X.forEach((e=>{const t=a.ie[e],n=x(t),o=a.ce;0!==n.length&&(o[e]=[],y(a.Z,e)?n.forEach((t=>{o[e].push(t)})):'all'===a.K?r&&a.se[e]&&a.se[e].length>0?a.se[e].forEach((t=>{o[e].push(t)})):n.forEach((t=>{o[e].push(t)})):'necessary'===a.K?o[e]=[]:r&&a.se[e]&&a.se[e].length>0?a.se[e].forEach((t=>{o[e].push(t)})):y(a.Y,e)&&x(t).forEach((t=>o[e].push(t))),o[e]=V(o[e]))})),(()=>{const e=g.l;g.k.mode===n&&e.N?e.v=D(e.$,e.Y):e.v=D(e.Y,e.i.categories||[]);let o=e.v.length>0,a=!1;e.X.forEach((t=>{e.h[t]=D(e.ce[t],e.le[t]||[]),e.h[t].length>0&&(a=!0)}));var r=g.ue.Le;for(var i in r)y(e.Y,i)?r[i].checked=!0:r[i].checked=!1;e.X.forEach((t=>{var n=g.ue.Je[t],o=e.ce[t];for(var a in n){const e=n[a];y(o,a)?e.checked=!0:e.checked=!1}})),e.H||(e.H=new Date),e.F||(e.F=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))),e.i={categories:u(e.Y),revision:g.k.revision,data:e.D,consentTimestamp:e.H.toISOString(),consentId:e.F,services:u(e.ce)};var c=!1;(e.N||o||a)&&(e.N&&(e.N=!1,c=!0),H(),e.V?e.V=new Date:e.V=e.H,e.i.lastConsentTimestamp=e.V.toISOString(),q(),g.k.autoClearCookies&&(c||!e.N&&o)&&(e=>{const t=g.l,n=X();t.q=!1;let o=e?t.X:t.v;o=o.filter((e=>{let n=t.W[e];return!!n&&!n.readOnly&&!!n.autoClear})),o.forEach((o=>{const a=t.W[o].autoClear,r=a&&a.cookies||[],i=y(t.v,o),c=!y(t.Y,o),s=i&&c;(e&&c||!e&&s)&&(!0===a.reloadPage&&s&&(t.q=!0),r.forEach((e=>{let t=[];const o=e.name,a=e.domain,r=e.path;if(o instanceof RegExp)n.forEach((e=>{o.test(e)&&t.push(e)}));else{let e=(i=o,n.indexOf(i));e>-1&&t.push(n[e])}var i;t.length>0&&Q(t,r,a)})))}))})(c),j()),c&&(p(g.o.m),p(g.o.g),g.k.mode===t)||((o||a)&&p(g.o.C),e.q&&window.location.reload())})()},$=(e,t,n)=>{let o=[];const a=e=>{if('string'==typeof e){let t=W(e);''!==t&&o.push(t)}else o=o.concat(X(e))};if(v(e))for(var r=0;r<e.length;r++)a(e[r]);else a(e);Q(o,t,n)},ee=e=>{e&&!g.l.j&&R(ae,O),g.l.j&&(S(g.ue.pe,o),w(g.ue.be,'aria-hidden','false'),g.l.I=!0,setTimeout((()=>{g.l.te=g.ue._e.activeElement,g.l.L=g.l.oe}),200),p(g.o.u,l))},te=()=>{g.l.j&&g.l.I&&(A(g.ue.pe,o),w(g.ue.be,'aria-hidden','true'),g.l.I=!1,setTimeout((()=>{g.l.te.focus(),g.l.L=[]}),200),p(g.o._,l))},ne=()=>{const e=g.l;e.P&&e.G||(e.P||G(ae,O),S(g.ue.pe,a),w(g.ue.He,'aria-hidden','false'),e.G=!0,setTimeout((()=>{e.O=!0}),1),setTimeout((()=>{e.I?e.ne=g.ue._e.activeElement:e.te=g.ue._e.activeElement,0!==e.ae.length&&(e.ae[0].focus(),e.L=e.ae)}),200),p(g.o.u,d))},oe=()=>{const e=g.l;e.G&&(A(g.ue.pe,a),w(g.ue.He,'aria-hidden','true'),e.G=!1,setTimeout((()=>{e.O=!1}),1),e.I?(e.ne&&e.ne.focus(),e.L=e.oe):(e.te&&e.te.focus(),e.L=[]),e.R=!1,p(g.o._,d))};var ae={show:ee,hide:te,showPreferences:ne,hidePreferences:oe,acceptCategory:Z};const re=(e,t)=>{const n=K(W(t||g.k.cookie.name,!0));return e?n[e]:n};e.acceptCategory=Z,e.acceptService=(e,t)=>{const n=g.l;if(!e||!t||'string'!=typeof t||!y(n.X,t))return!1;const o=g.ue.Je[t]||{},a=x(n.ie[t]);if(n.se[t]=[],'string'==typeof e)if('all'===e){for(let e in o)o[e].checked=!0,Y(o[e]);n.se[t]=[...a]}else{for(let t in o)o[t].checked=e===t,Y(o[t]);y(a,e)&&n.se[t].push(e)}else if(v(e)){for(let t in o)y(e,t)?o[t].checked=!0:o[t].checked=!1,Y(o[t]);a.forEach((o=>{y(e,o)&&n.se[t].push(o)}))}Z()},e.acceptedCategory=e=>{let n;return n=g.l.N&&g.k.mode!==t?g.l.$:F().accepted||[],y(n,e)},e.acceptedService=(e,t)=>y(g.l.ce[t]||[],e),e.eraseCookies=$,e.getConfig=e=>{const t=g.k,n=g.l.S;return e?t[e]||n[e]:{...t,...n,cookie:{...t.cookie}}},e.getCookie=re,e.getUserPreferences=()=>{const e=!g.l.N;var t,n=e&&F();return{acceptType:g.l.K,acceptedCategories:e?n.accepted:[],rejectedCategories:e?n.rejected:[],acceptedServices:e?g.l.ce:{},rejectedServices:e?(t={},g.l.X.forEach((e=>{t[e]=D(g.l.ce[e]||[],x(g.l.ie[e])||[])})),t):{}}},e.hide=te,e.hidePreferences=oe,e.loadScript=(e,t)=>{let n=document.querySelector('script[src="'+e+'"]');return new Promise(((o,a)=>{if(n)return o(!0);n=h('script'),v(t)&&t.forEach((e=>{w(n,e.name,e.value)})),n.onload=()=>o(!0),n.onerror=()=>{n.remove(),a(!1)},n.src=e,C(document.head,n)}))},e.reset=e=>{const t=g.ue,n=g.k.cookie;!0===e&&$(n.name,n.path,n.domain),g.l.B.forEach((e=>{e.Ue.removeEventListener(e.ze,e.qe)})),t.me&&t.me.remove(),t.pe&&(A(t.pe,r),A(t.pe,a),A(t.pe,o));const i=new m;g.l=i.l,g.ue=i.ue,g.k=i.k,g.t=i.t,g.o=i.o,window._ccRun=!1},e.run=async e=>{const t=g.l,o=g.k,a=window;if(!a._ccRun){if(a._ccRun=!0,(e=>{!function(){const e=document;g.ue._e=e,g.ue.pe=e.documentElement,g.k.cookie.domain=window.location.hostname}();const t=g.k,o=g.l,a=t.cookie,r=g.t,c=e.cookie,s=e.categories,l=x(s)||[],d=navigator;o.S=e,o.M=e.language.translations,o.W=s,o.X=l,r.m=e.onFirstConsent,r.g=e.onConsent,r.C=e.onChange,r._=e.onModalHide,r.u=e.onModalShow,r.p=e.onModalReady;const{mode:f,autoShow:u,autoClearCookies:_,revision:p,manageScriptTags:m,hideFromBots:v,lazyHtmlGeneration:h}=e;f===n&&(t.mode=f),'boolean'==typeof u&&(t.autoShow=u),'boolean'==typeof _&&(t.autoClearCookies=_),'boolean'==typeof m&&(t.manageScriptTags=m),'number'==typeof p&&p>=0&&(t.revision=p,o.J=!0),'boolean'==typeof h&&(t.lazyHtmlGeneration=h),!1===v&&(t.hideFromBots=!1),!0===t.hideFromBots&&d&&(o.ee=d.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(d.userAgent)||d.webdriver),b(c)&&(t.cookie={...a,...c}),t.autoClearCookies,o.J,t.manageScriptTags,function(e){const t=g.l;e.forEach((e=>{const n=t.W[e],o=n.services||{},a=o&&b(o)&&x(o)||[];t.ie[e]={},t.ce[e]=[],n.readOnly&&(t.Z.push(e),t.ce[e]=x(o)),g.ue.Je[e]={},a.forEach((n=>{const a=o[n];a.enabled=!1,t.ie[e][n]=a}))}))}(l),(()=>{if(!g.k.manageScriptTags)return;const e=g.l;e.de=g.ue._e.querySelectorAll('script[data-category]'),e.fe=[],e.de.forEach((t=>{let n=t.getAttribute(i),o=t.dataset.service||'',a=!1;if(n&&'!'===n.charAt(0)&&(n=n.slice(1),a=!0),'!'===o.charAt(0)&&(o=o.slice(1),a=!0),y(e.X,n)&&(e.fe.push({We:!1,Xe:a,Ke:n,Qe:o}),o)){const t=e.ie[n];t[o]||(t[o]={enabled:!1})}}))})(),U((()=>{const e=g.l.S.language.autoDetect;if(e){let t;if('browser'===e?t=navigator.language.slice(0,2).toLowerCase():'document'===e&&(t=document.documentElement.lang),L(t))return t}return J()})())})(e),t.ee)return;const c=K(W(o.cookie.name,!0)),s=c.categories,l=v(s);t.i=c,t.F=c.consentId;const d=!!t.F&&'string'==typeof t.F;t.H=c.consentTimestamp,t.H&&(t.H=new Date(t.H)),t.V=c.lastConsentTimestamp,t.V&&(t.V=new Date(t.V));const f=c.data;if(t.D=void 0!==f?f:null,t.J&&d&&c.revision!==o.revision&&(t.U=!1),t.N=!(d&&t.U&&t.H&&t.V&&l),t.N,t.N?o.mode===n&&(()=>{const e=g.l;e.X.forEach((t=>{if(e.W[t].enabled){e.$.push(t);const o=e.ie[t]||{};for(var n in o)e.ce[t].push(n)}}))})():(t.Y=V([...t.Z,...c.categories]),t.ce={...t.ce,...c.services},H()),!await z())return;r=ae,g.l.N&&R(r,O),g.k.lazyHtmlGeneration||G(r,O),E(null,r,G,O),o.autoShow&&t.N&&ee(!0),(()=>{const e=g.ue;var t=!1,n=!1;k(e.pe,'keydown',(o=>{if('Tab'!==o.key)return;const a=g.l.L;if(a.length>0){const r=e._e.activeElement;o.shiftKey?r===a[0]&&(a[1].focus(),o.preventDefault()):r===a[1]&&(a[0].focus(),o.preventDefault()),n||g.l.R||(n=!0,!t&&o.preventDefault(),o.shiftKey?a[1].focus():a[0].focus())}!n&&(t=!0)}),!0)})(),t.N?o.mode===n&&(o.mode,t.$,j(t.$)):(j(),p(g.o.g))}var r},e.setCookieData=e=>{let t,n=e.value,o=e.mode,a=!1;const r=g.l;if('update'===o){r.D=re('data'),t=re('data');const e=typeof t==typeof n;if(e&&'object'==typeof t)for(var i in!t&&(t={}),n)t[i]!==n[i]&&(t[i]=n[i],a=!0);else!e&&t||t===n||(t=n,a=!0)}else t=n,a=!0;return a&&(r.D=t,r.i.data=t,q(!0)),a},e.setLanguage=async(e,t)=>!(!L(e)||e===J()&&!0!==t||!await z(e)||(U(e),g.l.j&&R(ae,O),g.l.P&&G(ae,O),0)),e.show=ee,e.showPreferences=ne,e.validConsent=()=>!g.l.N,e.validCookie=e=>''!==W(e,!0),Object.defineProperty(e,'__esModule',{value:!0})},'object'==typeof exports&&'undefined'!=typeof module?t(exports):'function'==typeof define&&define.amd?define(['exports'],t):t((e='undefined'!=typeof globalThis?globalThis:e||self).CookieConsent={}); |
{ | ||
"name": "vanilla-cookieconsent", | ||
"version": "3.0.0-rc.7", | ||
"version": "3.0.0-rc.8", | ||
"description": "🍪 Simple cross-browser cookie-consent plugin written in vanilla js.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cookieconsent.umd.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93770