vanilla-cookieconsent
Advanced tools
Comparing version 3.0.0-rc.8 to 3.0.0-rc.9
/*! | ||
* CookieConsent 3.0.0-rc.8 | ||
* CookieConsent 3.0.0-rc.9 | ||
* 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',(()=>{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}; | ||
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,i)=>{const c=r.t,s=r.o,l={cookie:r.l.i};if(a){const n={modalName:a};return e===s.u?t(c.u)&&c.u(n):e===s.p?t(c.p)&&c.p(n):(n.modal=i,t(c.v)&&c.v(n)),o(e,n)}e===s._?t(c._)&&c._(n(l)):e===s.m?t(c.m)&&c.m(n(l)):(l.changedCategories=r.l.g,l.changedServices=r.l.h,t(c.k)&&c.k(n(l))),o(e,n(l))};class i{constructor(){this.C={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,T:'',S:{},A:null,i:null,D:[],H:!1,V:null,I:null,F:null,N:'',j:!0,B:!1,O:!1,P:!1,R:!1,G:!1,J:!1,L:!1,U:!1,q:[],K:!1,W:!0,g:[],X:!1,Y:'',Z:!1,$:[],ee:[],te:[],ne:[],oe:!1,ae:!1,ie:!1,re:[],ce:[],se:[],le:{},de:{},ue:{},h:{},fe:{},pe:[],ve:[]},this._e={me:{},ge:{}},this.t={},this.o={_:'cc:onFirstConsent',m:'cc:onConsent',k:'cc:onChange',u:'cc:onModalShow',p:'cc:onModalHide',v:'cc:onModalReady'}}}const r=new i,c=(e,t)=>e.indexOf(t),s=(e,t)=>-1!==c(e,t),l=e=>Array.isArray(e),d=e=>!!e&&'object'==typeof e&&!l(e),u=e=>Object.keys(e),f=e=>Array.from(new Set(e)),p=()=>document.activeElement,v=e=>e.preventDefault(),_=(e,t)=>e.querySelectorAll(t),m=()=>{let e={};return r.l.$.forEach((t=>{e[t]=A(r.l.de[t]||[],u(r.l.le[t])||[])})),e},g=t=>{const n=document.createElement(t);return t===e&&b(n,'type',t),n},b=(e,t,n)=>{e.setAttribute(t,n)},h=(e,t,n)=>{e.removeAttribute(n?'data-'+t:t)},y=(e,t,n)=>e.getAttribute(n?'data-'+t:t),w=(e,t)=>e.appendChild(t),k=(e,t,n,o)=>{e.addEventListener(t,n),o&&r.l.D.push({be:e,he:t,ye:n})},C=(e,t)=>{e.classList.add(t)},x=(e,t)=>{C(e,'cm__'+t)},M=(e,t)=>{C(e,'pm__'+t)},T=(e,t)=>{e.classList.remove(t)},S=()=>{const e=r.C.cookie.expiresAfterDays;return t(e)?e(r.l.Y):e},A=(e,t)=>e.filter((e=>!s(t,e))).concat(t.filter((t=>!s(e,t)))),D=()=>{r.l.Y=(()=>{let e='custom',t=H().accepted.length;return t===r.l.$.length?e='all':t===r.l.te.length&&(e='necessary'),e})()},E=(e,t,n,o)=>{const a='accept-',i=f('show-preferencesModal'),c=f('show-consentModal'),s=f(a+'all'),l=f(a+'necessary'),d=f(a+'custom'),u=r.C.lazyHtmlGeneration;function f(t){return _(e||document,'[data-cc="'+t+'"]')}function p(e,n){v(e),t.acceptCategory(n),t.hidePreferences(),t.hide()}i.forEach((e=>{b(e,'aria-haspopup','dialog'),k(e,'click',(e=>{v(e),t.showPreferences()})),u&&k(e,'mouseenter',(e=>{v(e),r.l.R||n(t,o)}),!0)})),c.forEach((e=>{b(e,'aria-haspopup','dialog'),k(e,'click',(e=>{v(e),t.show(!0)}),!0)})),s.forEach((e=>{k(e,'click',(e=>{p(e,'all')}),!0)})),d.forEach((e=>{k(e,'click',(e=>{p(e)}),!0)})),l.forEach((e=>{k(e,'click',(e=>{p(e,[])}),!0)}))},H=()=>{let e=r.l.ee;return{accepted:e,rejected:r.l.$.filter((t=>!s(e,t)))}},V=()=>{const t=r.l,n=r._e,o=['[href]',e,'input','details','[tabindex="0"]'].join(':not([tabindex="-1"]), '),a=(e,t)=>{const n=_(e,o);t[0]=n[0],t[1]=n[n.length-1]};t.B&&a(n.we,t.re),t.R&&a(n.ke,t.ce),t.L=!1,t.J=!1},I=e=>{const n=r.l,o=n.de;if(n.$.forEach((e=>{(n.h[e]||n.de[e]||[]).forEach((o=>{const a=n.le[e][o];a&&(!a.enabled&&s(n.de[e],o)&&t(a.onAccept)?(a.enabled=!0,a.onAccept()):a.enabled&&!s(n.de[e],o)&&t(a.onReject)&&(a.enabled=!1,a.onReject()))}))})),!r.C.manageScriptTags)return;const a=n.pe;let i=e||n.i.categories||[];const c=(e,t)=>{if(t<e.length){var a=e[t],r=n.ve[t],l=r.Ce,d=r.xe,u=s(i,l),f=!!d&&s(o[l],d);if(!r.Me){let o=!d&&!r.Te&&u,i=d&&!r.Te&&f,p=!d&&r.Te&&!u&&s(n.g,l),v=d&&r.Te&&!f&&s(n.h[l]||[],d);if(o||p||i||v){r.Me=!0;const n=y(a,'type',!0);h(a,'type',!!n),h(a,'data-category');let o=y(a,'src',!0);o&&h(a,'src',!0);const i=g('script');if(i.textContent=a.innerHTML,[...a.attributes].forEach((e=>{let t=e.nodeName;b(i,t,a[t]||y(a,t))})),n&&(i.type=n),o?i.src=o:o=a.src,o&&(i.onload=i.onerror=()=>{c(e,++t)}),a.replaceWith(i),o)return}}c(e,++t)}};c(a,0)},F=e=>{const t=r.l.M.guiOptions,n=t&&t.consentModal,o=t&&t.preferencesModal,a=(e,t,n,o,a,i)=>{var c=n&&n.layout,l=n&&n.position,d=n&&!0===n.flipButtons,u=n&&!1===n.equalWeightButtons,f=c&&c.split(' ')||[],p=l&&l.split(' ')||[],v=f[0],_=f[1],m=p[0],g='pm--'===o?p[0]:p[1],b=v,h=t[v];h||(h=t[a],b=a);var y=s(h.Se,_)&&_,w=s(h.Ae,m)?m:h.De,k=s(h.Ee,g)?g:h.He;e.className=i,C(e,o+b),y&&C(e,o+y),w&&C(e,o+w),k&&C(e,o+k),d&&C(e,o+'flip');const x='btn--secondary',M=i+'__';if('cm'===i){const{Ve:e,Ie:t}=r._e;e&&T(e,M+x),t&&T(t,M+x),u&&(e&&C(e,M+x),t&&C(t,M+x))}else{const{Fe:e}=r._e;e&&T(e,M+x),u&&e&&C(e,M+x)}};if(0===e){const e=['middle','top','bottom'],t=['left','center','right'],o={box:{Se:['wide','inline'],Ae:e,Ee:t,De:'bottom',He:'right'},cloud:{Se:['inline'],Ae:e,Ee:t,De:'bottom',He:'center'},bar:{Se:['inline'],Ae:e.slice(1),Ee:[],De:'bottom',He:''}};a(r._e.we,o,n,'cm--','box','cm')}if(1===e){const e={box:{Se:[],Ae:[],Ee:[],De:'',He:''},bar:{Se:['wide'],Ae:[],Ee:['left','right'],De:'',He:'left'}};a(r._e.ke,e,o,'pm--','box','pm')}},N=(t,n)=>{const o=r.l,i=r._e,c=t.hidePreferences,s=e=>{t.acceptCategory(e),c(),t.hide()},l=o.A&&o.A.preferencesModal;if(!l)return;var d=l.title,f=l.closeIconLabel,p=l.acceptAllBtn,v=l.acceptNecessaryBtn,_=l.savePreferencesBtn,m=l.sections;if(i.Ne)i.je=g('div'),M(i.je,'body');else{i.Ne=g('div'),C(i.Ne,'pm-wrapper'),i.ke=g('div'),i.ke.style.visibility='hidden',C(i.ke,'pm'),b(i.ke,'role','dialog'),b(i.ke,'aria-hidden',!0),b(i.ke,'aria-modal',!0),b(i.ke,'aria-labelledby','pm__title'),k(i.Be,'keydown',(e=>{27===e.keyCode&&c()}),!0),i.Oe=g('div'),M(i.Oe,'header'),i.Pe=g('div'),M(i.Pe,'title'),i.Pe.id='pm__title',b(i.Pe,'role','heading'),b(i.Pe,'aria-level','2'),i.Re=g(e),M(i.Re,'close-btn'),b(i.Re,'aria-label',l.closeIconLabel||''),k(i.Re,'click',c),i.Ge=g('div'),M(i.Ge,'body'),i.Je=g('div'),M(i.Je,'footer');var h=g('div');C(h,'btns');var y=g('div'),x=g('div');M(y,'btn-group'),M(x,'btn-group'),w(i.Je,y),w(i.Je,x),w(i.Oe,i.Pe),w(i.Oe,i.Re),w(i.ke,i.Oe),w(i.ke,i.Ge),w(i.ke,i.Je),w(i.Ne,i.ke)}let S;d&&(i.Pe.innerHTML=d,f&&b(i.Re,'aria-label',f)),m&&m.forEach((t=>{var n=t.title,a=t.description,r=t.linkedCategory,c=r&&o.Z[r],s=t.cookieTable,d=s&&s.body,f=d&&d.length>0,p=!!c,v=p&&o.le[r]||!1,_=v&&u(v)||[],m=p&&(!!a||!!f||u(v).length>0),h=g('div');if(M(h,'section'),m||a){var y=g('div');M(y,'section-desc-wrapper')}let x=_.length;if(m&&x>0){var A=g('div');M(A,'section-services'),_.forEach((e=>{var t=v[e].label||e,n=g('div'),o=g('div'),a=g('div'),i=g('div');M(n,'service'),M(i,'service-title'),M(o,'service-header'),M(a,'service-icon');var s=j(t,e,c,!0,r);i.innerHTML=t,w(o,a),w(o,i),w(n,o),w(n,s),w(A,n)})),w(y,A)}if(n){var D=g('div'),E=g(p?e:'div');if(M(D,'section-title-wrapper'),M(E,'section-title'),E.innerHTML=n,w(D,E),p){var H=g('span');M(H,'section-arrow'),w(D,H),h.className+='--toggle';var V=j(n,r,c);let e=l.serviceCounterLabel;if(x>0&&'string'==typeof e){let t=g('span');M(t,'badge'),M(t,'service-counter'),b(t,'aria-hidden',!0),b(t,'data-servicecounter',x),e&&(e=e.split('|'),e=e.length>1&&x>1?e[1]:e[0],b(t,'data-counterlabel',e)),t.innerHTML=x+(e?' '+e:''),w(E,t)}if(m){M(h,'section--expandable');var I=r+'-desc';b(E,'aria-expanded',!1),b(E,'aria-controls',I)}w(D,V)}else b(E,'role','heading'),b(E,'aria-level','3');w(h,D)}if(a){var F=g('div');M(F,'section-desc'),F.innerHTML=a,w(y,F)}if(m&&(b(y,'aria-hidden','true'),y.id=I,((e,t,n)=>{k(E,'click',(()=>{t.classList.contains('is-expanded')?(T(t,'is-expanded'),b(n,'aria-expanded','false'),b(e,'aria-hidden','true')):(C(t,'is-expanded'),b(n,'aria-expanded','true'),b(e,'aria-hidden','false'))}))})(y,h,E),f)){var N=g('table'),B=g('thead'),O=g('tbody');M(N,'section-table'),M(B,'table-head'),M(O,'table-body');var P=s.headers,R=u(P),G=i.Le.createDocumentFragment(),J=g('tr');b(J,'role','row');for(var L=0;L<R.length;L++){var U=P[R[L]],z=g('th');z.id='cc__row-'+U,b(z,'role','columnheader'),b(z,'scope','col'),M(z,'table-th'),z.innerHTML=U,w(G,z)}w(J,G),w(B,J);var q=i.Le.createDocumentFragment();for(L=0;L<d.length;L++){var K=d[L],Q=g('tr');b(Q,'role','row'),M(Q,'table-tr');for(var W=0;W<R.length;W++){var X=R[W],Y=P[X],Z=K[X],$=g('td'),ee=g('div');M($,'table-td'),b($,'data-column',Y),b($,'headers','cc__row-'+Y),ee.insertAdjacentHTML('beforeend',Z),w($,ee),w(Q,$)}w(q,Q)}w(O,q),w(N,B),w(N,O),w(y,N)}(m||a)&&w(h,y);const te=i.je||i.Ge;p?(S||(S=g('div'),M(S,'section-toggles')),S.appendChild(h)):S=null,w(te,S||h)})),(p||v)&&(v&&(i.Fe||(i.Fe=g(e),M(i.Fe,'btn'),b(i.Fe,'data-role','necessary'),w(y,i.Fe),k(i.Fe,'click',(()=>s([])))),i.Fe.innerHTML=v),p&&(i.Ue||(i.Ue=g(e),M(i.Ue,'btn'),b(i.Ue,'data-role','all'),w(y,i.Ue),k(i.Ue,'click',(()=>s('all')))),i.Ue.innerHTML=p)),_&&(i.ze||(i.ze=g(e),M(i.ze,'btn'),M(i.ze,'btn--secondary'),b(i.ze,'data-role','save'),w(x,i.ze),k(i.ze,'click',(()=>s()))),i.ze.innerHTML=_),i.je&&(i.ke.replaceChild(i.je,i.Ge),i.Ge=i.je),F(1),i.Ge.querySelectorAll('[data-hideModal]').forEach((e=>{k(e,'click',c)})),o.R||(o.R=!0,a(r.o.v,'preferencesModal',i.ke),n(t),setTimeout(V,10),w(i.qe,i.Ne),setTimeout((()=>C(i.Ne,'cc--anim')),100))};function j(e,t,n,o,a){const i=r.l,c=r._e;var l=g('label'),d=g('input'),u=g('span'),f=g('span'),p=g('span'),v=g('span');if(d.type='checkbox',C(l,'section__toggle-wrapper'),C(d,'section__toggle'),C(p,'toggle__icon-on'),C(v,'toggle__icon-off'),C(u,'toggle__icon'),C(f,'toggle__label'),b(u,'aria-hidden','true'),o?(C(l,'toggle-service'),b(d,'data-category',a),c.ge[a][t]=d):c.me[t]=d,o?(e=>{k(d,'change',(()=>{var t=c.ge[e],n=c.me[e];for(var o in i.ue[e]=[],t){const n=t[o];n.checked&&i.ue[e].push(n.value)}i.ue[e].length>0?n.checked=!0:n.checked=!1}))})(a):(e=>{k(d,'click',(()=>{var t=c.ge[e];if(i.ue[e]=[],d.checked)for(var n in t)t[n].checked=!0;else for(n in t)t[n].checked=!1}))})(t),d.value=t,f.textContent=e.replace(/<.*>.*<\/.*>/gm,''),w(u,v),w(u,p),i.j)(n.enabled||n.readOnly)&&(d.checked=!0);else if(o){var _=i.de[a];(n.readOnly||s(_,t))&&(d.checked=!0)}else s(i.ee,t)&&(d.checked=!0);return n.readOnly&&(d.disabled=!0),w(l,d),w(l,u),w(l,f),l}const B=(t,n)=>{const o=r.l,i=r._e,c=o.A&&o.A.consentModal;if(!c)return;const s=c.acceptAllBtn,l=c.acceptNecessaryBtn,d=c.showPreferencesBtn,u=c.closeIconLabel,f=c.footer,p=c.label,v=c.title,_=e=>{t.hide(),t.acceptCategory(e)};if(!i.Ke){i.Ke=g('div'),i.we=g('div'),i.Qe=g('div'),i.We=g('div'),i.Xe=g('div'),C(i.Ke,'cm-wrapper'),C(i.we,'cm'),x(i.Qe,'body'),x(i.We,'texts'),x(i.Xe,'btns'),b(i.we,'role','dialog'),b(i.we,'aria-modal','true'),b(i.we,'aria-hidden','false'),b(i.we,'aria-describedby','cm__desc'),p?b(i.we,'aria-label',p):v&&b(i.we,'aria-labelledby','cm__title'),i.we.style.visibility='hidden';const t='box',n=o.M.guiOptions,a=n&&n.consentModal,r=(a&&a.layout||t).split(' ')[0]===t;v&&u&&r&&(i.Ie||(i.Ie=g(e),x(i.Ie,'btn'),x(i.Ie,'btn--close'),k(i.Ie,'click',(()=>{_([])})),w(i.Qe,i.Ie)),b(i.Ie,'aria-label',u)),w(i.Qe,i.We),(s||l||d)&&w(i.Qe,i.Xe),w(i.we,i.Qe),w(i.Ke,i.we)}v&&(i.Ye||(i.Ye=g('div'),i.Ye.className=i.Ye.id='cm__title',b(i.Ye,'role','heading'),b(i.Ye,'aria-level','2'),w(i.We,i.Ye)),i.Ye.innerHTML=v);var m=c.description;if(m&&(o.K&&(m=m.replace('{{revisionMessage}}',o.W?'':c.revisionMessage||'')),i.Ze||(i.Ze=g('div'),i.Ze.className=i.Ze.id='cm__desc',w(i.We,i.Ze)),i.Ze.innerHTML=m),s&&(i.$e||(i.$e=g(e),x(i.$e,'btn'),b(i.$e,'data-role','all'),k(i.$e,'click',(()=>{_('all')}))),i.$e.innerHTML=s),l&&(i.Ve||(i.Ve=g(e),x(i.Ve,'btn'),b(i.Ve,'data-role','necessary'),k(i.Ve,'click',(()=>{_([])}))),i.Ve.innerHTML=l),d&&(i.et||(i.et=g(e),x(i.et,'btn'),x(i.et,'btn--secondary'),b(i.et,'data-role','show'),k(i.et,'mouseenter',(()=>{o.R||N(t,n)})),k(i.et,'click',t.showPreferences)),i.et.innerHTML=d),i.tt||(i.tt=g('div'),x(i.tt,'btn-group'),l&&w(i.tt,i.Ve),s&&w(i.tt,i.$e),(s||l)&&w(i.Qe,i.tt),w(i.Xe,i.tt)),i.et&&!i.nt&&(i.nt=g('div'),i.Ve&&i.$e?(x(i.nt,'btn-group'),w(i.nt,i.et),w(i.Xe,i.nt)):(w(i.tt,i.et),x(i.tt,'btn-group--uneven'))),f){if(!i.ot){var h=g('div'),y=g('div');i.ot=g('div'),x(h,'footer'),x(y,'links'),x(i.ot,'link-group'),w(y,i.ot),w(h,y),w(i.we,h)}i.ot.innerHTML=f}F(0),o.B||(o.B=!0,a(r.o.v,'consentModal',i.we),n(t),setTimeout(V,10),w(i.qe,i.Ke),setTimeout((()=>C(i.Ke,'cc--anim')),100)),E(i.Qe,t,N,n)},O=e=>!!e&&s(u(r.l.S),e),P=()=>{const e=r.l;return e.T||e.M.language.default},R=e=>{e&&(r.l.T=e)},G=async e=>{const t=r.l;let n;n=e&&O(e)?e:P();let o=t.S[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,R(n),!0},J=()=>{let e=r.l.M.language.rtl,t=r._e.qe;e&&t&&(l(e)||(e=[e]),s(e,r.l.T)?C(t,'cc--rtl'):T(t,'cc--rtl'))},L=e=>{const t=r._e;if(!t.qe){t.qe=g('div'),t.qe.id='cc-main',t.qe.style.position='fixed',t.qe.style.zIndex='2147483647',J();let n=r.l.M.root;n&&'string'==typeof n&&(n=document.querySelector(n)),w(n||t.Le.body,t.qe),(e=>{const t=r._e;k(t.qe,'click',(n=>{const o=r.l;o.U?t.ke.contains(n.target)?o.G=!0:(e.hidePreferences(0),o.G=!1):o.O&&t.we.contains(n.target)&&(o.G=!0)}))})(e)}},U=e=>{const{hostname:t,protocol:n}=window.location,{name:o,path:a,domain:i,sameSite:c}=r.C.cookie,l=encodeURIComponent(JSON.stringify(r.l.i)),d=e?(()=>{const e=r.l.F,t=e?new Date-e:0;return 864e5*S()-t})():864e5*S(),u=new Date;u.setTime(u.getTime()+d);let f=o+'='+l+(0!==d?'; expires='+u.toUTCString():'')+'; Path='+a+'; SameSite='+c;s(t,'.')&&(f+='; Domain='+i),'https:'===n&&(f+='; Secure'),document.cookie=f,r.l.i},z=(e,t,n)=>{const o=n||r.C.cookie.domain,a=t||r.C.cookie.path,i='www.'===o.slice(0,4),c=i&&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),i&&s(e,c)}))},q=e=>(e=>{let t;try{t=JSON.parse(decodeURIComponent(e))}catch(e){t={}}return t})(K(e||r.C.cookie.name,!0)),K=(e,t)=>{const n=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return n?t?n.pop():e:''},Q=e=>{const t=document.cookie.split(/;\s*/),n=[];return t.forEach((t=>{let o=t.split('=')[0];if(e)try{e.test(o)&&n.push(o)}catch(e){}else n.push(o)})),n},W=e=>{e.dispatchEvent(new Event('change'))},X=(e,t=[])=>{const o=r.l;let i=!1;var l=[];if(e)if('object'==typeof e&&'number'==typeof e.length)for(var d=0;d<e.length;d++)s(o.$,e[d])&&l.push(e[d]);else'string'==typeof e&&('all'===e?l=o.$.slice():s(o.$,e)&&l.push(e));else l=(()=>{let e=r._e.me,t=[];if(e)for(var n in e)e[n].checked&&t.push(e[n].value);else o.j||(t=o.i.categories);for(let e in o.ue)o.ue[e].length>0&&(s(t,e)||t.push(e));return t})(),i=!0;if(t.length>=1)for(d=0;d<t.length;d++)l=l.filter((e=>e!==t[d]));for(d=0;d<o.te.length;d++)s(l,o.te[d])||l.push(o.te[d]);o.ee=l,D(),i||(o.ue={}),o.fe=n(o.de),o.$.forEach((e=>{const t=o.le[e],n=u(t),a=o.de;0!==n.length&&(a[e]=[],s(o.te,e)?n.forEach((t=>{a[e].push(t)})):'all'===o.Y?i&&o.ue[e]&&o.ue[e].length>0?o.ue[e].forEach((t=>{a[e].push(t)})):n.forEach((t=>{a[e].push(t)})):'necessary'===o.Y?a[e]=[]:i&&o.ue[e]&&o.ue[e].length>0?o.ue[e].forEach((t=>{a[e].push(t)})):s(o.ee,e)&&u(t).forEach((t=>a[e].push(t))),a[e]=f(a[e]))})),(()=>{const e=r.l;'opt-out'===r.C.mode&&e.j?e.g=A(e.ne,e.ee):e.g=A(e.ee,e.i.categories||[]);let t=e.g.length>0,o=!1;e.$.forEach((t=>{e.h[t]=A(e.de[t],e.fe[t]||[]),e.h[t].length>0&&(o=!0)}));var i=r._e.me;for(var l in i)s(e.ee,l)?i[l].checked=!0:i[l].checked=!1;e.$.forEach((t=>{var n=r._e.ge[t],o=e.de[t];for(var a in n){const e=n[a];s(o,a)?e.checked=!0:e.checked=!1}})),e.I||(e.I=new Date),e.N||(e.N=([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.ee),revision:r.C.revision,data:e.V,consentTimestamp:e.I.toISOString(),consentId:e.N,services:n(e.de)};var d=!1;(e.j||t||o)&&(e.j&&(e.j=!1,d=!0),D(),e.F?e.F=new Date:e.F=e.I,e.i.lastConsentTimestamp=e.F.toISOString(),U(),r.C.autoClearCookies&&(d||!e.j&&t)&&(e=>{const t=r.l,n=Q();t.X=!1;let o=e?t.$:t.g;o=o.filter((e=>{let n=t.Z[e];return!!n&&!n.readOnly&&!!n.autoClear})),o.forEach((o=>{const a=t.Z[o].autoClear,i=a&&a.cookies||[],r=s(t.g,o),l=!s(t.ee,o),d=r&&l;(e&&l||!e&&d)&&(!0===a.reloadPage&&d&&(t.X=!0),i.forEach((e=>{let t=[];const o=e.name,a=e.domain,i=e.path;if(o instanceof RegExp)n.forEach((e=>{o.test(e)&&t.push(e)}));else{let e=c(n,o);e>-1&&t.push(n[e])}t.length>0&&z(t,i,a)})))}))})(d),I()),d&&(a(r.o._),a(r.o.m),'opt-in'===r.C.mode)||((t||o)&&a(r.o.k),e.X&&window.location.reload())})()},Y=e=>{let t;return t=r.l.j&&'opt-in'!==r.C.mode?r.l.ne:H().accepted||[],s(t,e)},Z=(e,t)=>{const n=r.l;if(!e||!t||'string'!=typeof t||!s(n.$,t))return!1;const o=r._e.ge[t]||{},a=u(n.le[t]);if(n.ue[t]=[],'string'==typeof e)if('all'===e){for(let e in o)o[e].checked=!0,W(o[e]);n.ue[t]=[...a]}else{for(let t in o)o[t].checked=e===t,W(o[t]);s(a,e)&&n.ue[t].push(e)}else if(l(e)){for(let t in o)s(e,t)?o[t].checked=!0:o[t].checked=!1,W(o[t]);a.forEach((o=>{s(e,o)&&n.ue[t].push(o)}))}X()},$=(e,t)=>s(r.l.de[t]||[],e),ee=e=>''!==K(e,!0),te=(e,t,n)=>{let o=[];const a=e=>{if('string'==typeof e){let t=K(e);''!==t&&o.push(t)}else o=o.concat(Q(e))};if(l(e))for(var i=0;i<e.length;i++)a(e[i]);else a(e);z(o,t,n)};let ne;const oe=e=>{clearTimeout(ne),e?C(r._e.Be,'disable--interaction'):ne=setTimeout((()=>{T(r._e.Be,'disable--interaction')}),500)},ae=e=>{const t=r._e,n=r.l;e&&!n.B&&B(se,L),n.B&&(n.O=!0,n.H&&oe(!0),C(t.Be,'show--consent'),b(t.we,'aria-hidden','false'),setTimeout((()=>{n.ae=p(),n.q=n.re}),200),a(r.o.u,'consentModal'))},ie=()=>{const e=r._e,t=r.l;t.B&&(t.O=!1,t.H&&oe(),T(e.Be,'show--consent'),b(e.we,'aria-hidden','true'),setTimeout((()=>{t.ae.focus(),t.q=[]}),200),a(r.o.p,'consentModal'))},re=()=>{const e=r.l;e.R&&e.P||(e.R||N(se,L),C(r._e.Be,'show--preferences'),b(r._e.ke,'aria-hidden','false'),e.P=!0,setTimeout((()=>{e.U=!0}),1),setTimeout((()=>{e.O?e.ie=p():e.ae=p(),0!==e.ce.length&&(e.ce[0].focus(),e.q=e.ce)}),200),a(r.o.u,'preferencesModal'))},ce=()=>{const e=r.l;e.P&&(T(r._e.Be,'show--preferences'),b(r._e.ke,'aria-hidden','true'),e.P=!1,setTimeout((()=>{e.U=!1}),1),e.O?(e.ie&&e.ie.focus(),e.q=e.re):(e.ae&&e.ae.focus(),e.q=[]),e.G=!1,a(r.o.p,'preferencesModal'))};var se={show:ae,hide:ie,showPreferences:re,hidePreferences:ce,acceptCategory:X};const le=async(e,t)=>{if(!O(e))return!1;const n=r.l;return!(e===P()&&!0!==t||!await G(e)||(R(e),n.B&&B(se,L),n.R&&N(se,L),J(),V(),0))},de=()=>{const e=!r.l.j;var t=e&&H();return{acceptType:r.l.Y,acceptedCategories:e?t.accepted:[],rejectedCategories:e?t.rejected:[],acceptedServices:e?r.l.de:{},rejectedServices:e?m():{}}},ue=(e,t)=>{let n=document.querySelector('script[src="'+e+'"]');return new Promise((o=>{if(n)return o(!0);n=g('script'),l(t)&&t.forEach((e=>{b(n,e.name,e.value)})),n.onload=()=>o(!0),n.onerror=()=>{n.remove(),o(!1)},n.src=e,w(document.head,n)}))},fe=e=>{let t,n=e.value,o=e.mode,a=!1;const i=r.l;if('update'===o){i.V=pe('data'),t=pe('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&&(i.V=t,i.i.data=t,U(!0)),a},pe=(e,t)=>{const n=q(t);return e?n[e]:n},ve=e=>{const t=r.C,n=r.l.M;return e?t[e]||n[e]:{...t,...n,cookie:{...t.cookie}}},_e=()=>!r.l.j,me=async e=>{const t=r.l,n=r.C,o=window;if(!o._ccRun){if(o._ccRun=!0,(e=>{!function(){const e=document;r._e.Le=e,r._e.Be=e.documentElement,r.C.cookie.domain=window.location.hostname}();const t=r.C,n=r.l,o=t.cookie,a=r.t,i=e.cookie,c=e.categories,l=u(c)||[],f=navigator;n.M=e,n.S=e.language.translations,n.Z=c,n.$=l,n.H=!!e.disablePageInteraction,a._=e.onFirstConsent,a.m=e.onConsent,a.k=e.onChange,a.p=e.onModalHide,a.u=e.onModalShow,a.v=e.onModalReady;const{mode:p,autoShow:v,autoClearCookies:m,revision:g,manageScriptTags:b,hideFromBots:h,lazyHtmlGeneration:y}=e;'opt-out'===p&&(t.mode=p),'boolean'==typeof v&&(t.autoShow=v),'boolean'==typeof m&&(t.autoClearCookies=m),'boolean'==typeof b&&(t.manageScriptTags=b),'number'==typeof g&&g>=0&&(t.revision=g,n.K=!0),'boolean'==typeof y&&(t.lazyHtmlGeneration=y),!1===h&&(t.hideFromBots=!1),!0===t.hideFromBots&&f&&(n.oe=f.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(f.userAgent)||f.webdriver),d(i)&&(t.cookie={...o,...i}),t.autoClearCookies,n.K,t.manageScriptTags,function(e){const t=r.l;e.forEach((e=>{const n=t.Z[e],o=n.services||{},a=o&&d(o)&&u(o)||[];t.le[e]={},t.de[e]=[],n.readOnly&&(t.te.push(e),t.de[e]=u(o)),r._e.ge[e]={},a.forEach((n=>{const a=o[n];a.enabled=!1,t.le[e][n]=a}))}))}(l),(()=>{if(!r.C.manageScriptTags)return;const e=r.l;e.pe=_(r._e.Le,'script[data-category]'),e.ve=[],e.pe.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),s(e.$,n)&&(e.ve.push({Me:!1,Te:a,Ce:n,xe:o}),o)){const t=e.le[n];t[o]||(t[o]={enabled:!1})}}))})(),R((()=>{const e=r.l.M.language.autoDetect;if(e){let t;if('browser'===e?t=navigator.language.slice(0,2).toLowerCase():'document'===e&&(t=document.documentElement.lang),O(t))return t}return P()})())})(e),t.oe)return;const c=q(),m=c.categories,g=l(m);t.i=c,t.N=c.consentId;const b=!!t.N&&'string'==typeof t.N;t.I=c.consentTimestamp,t.I&&(t.I=new Date(t.I)),t.F=c.lastConsentTimestamp,t.F&&(t.F=new Date(t.F));const h=c.data;if(t.V=void 0!==h?h:null,t.K&&b&&c.revision!==n.revision&&(t.W=!1),t.j=!(b&&t.W&&t.I&&t.F&&g),t.j,t.j?'opt-out'===n.mode&&(()=>{const e=r.l;e.$.forEach((t=>{if(e.Z[t].enabled){e.ne.push(t);const o=e.le[t]||{};for(var n in o)e.de[t].push(n)}}))})():(t.ee=f([...t.te,...c.categories]),t.de={...t.de,...c.services},D()),!await G())return;i=se,r.l.j&&B(i,L),r.C.lazyHtmlGeneration||N(i,L),E(null,i,N,L),n.autoShow&&t.j&&ae(!0),(()=>{const e=r._e,t=r.l;k(e.Be,'keydown',(e=>{if('Tab'!==e.key)return;const n=t.q;if(n.length>0){const o=p();e.shiftKey?o===n[0]&&(n[1].focus(),v(e)):o===n[1]&&(n[0].focus(),v(e)),t.J||r.l.G||(t.J=!0,!t.L&&v(e),e.shiftKey?n[1].focus():n[0].focus())}!t.J&&(t.L=!0)}),!0)})(),t.j?'opt-out'===n.mode&&(n.mode,t.ne,I(t.ne)):(I(),a(r.o.m))}var i},ge=e=>{const t=r._e,n=r.C.cookie;!0===e&&te(n.name,n.path,n.domain),r.l.D.forEach((e=>{e.be.removeEventListener(e.he,e.ye)})),t.qe&&t.qe.remove(),t.Be&&(T(t.Be,'disable--interaction'),T(t.Be,'show--preferences'),T(t.Be,'show--consent'));const o=new i;r.l=o.l,r._e=o._e,r.C=o.C,r.t=o.t,r.o=o.o,window._ccRun=!1};export{X as acceptCategory,Z as acceptService,Y as acceptedCategory,$ as acceptedService,te as eraseCookies,ve as getConfig,pe as getCookie,de as getUserPreferences,ie as hide,ce as hidePreferences,ue as loadScript,ge as reset,me as run,fe as setCookieData,le as setLanguage,ae as show,re as showPreferences,_e as validConsent,ee as validCookie}; |
/*! | ||
* CookieConsent 3.0.0-rc.8 | ||
* CookieConsent 3.0.0-rc.9 | ||
* 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',(()=>{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={}); | ||
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',s='data-category',i='div',c='button',l='aria-hidden',d='btn-group',f='click',u='data-role',p='consentModal',_='preferencesModal',m=e=>'function'==typeof e,g=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]=g(o)}return t},b=(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))},v=(e,t,n)=>{const o=h.t,a=h.o,r={cookie:h.l.i};if(t){const r={modalName:t};return e===a.u?m(o.u)&&o.u(r):e===a.p?m(o.p)&&o.p(r):(r.modal=n,m(o._)&&o._(r)),b(e,r)}e===a.m?m(o.m)&&o.m(g(r)):e===a.g?m(o.g)&&o.g(g(r)):(r.changedCategories=h.l.v,r.changedServices=h.l.h,m(o.C)&&o.C(g(r))),b(e,g(r))};class y{constructor(){this.T={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,M:'',A:{},k:null,i:null,D:[],H:!1,V:null,I:null,j:null,F:'',N:!0,B:!1,O:!1,P:!1,R:!1,G:!1,J:!1,L:!1,U:!1,q:[],K:!1,W:!0,v:[],X:!1,Y:'',Z:!1,$:[],ee:[],te:[],ne:[],oe:!1,ae:!1,re:!1,se:[],ie:[],ce:[],le:{},de:{},fe:{},h:{},ue:{},pe:[],_e:[]},this.me={ge:{},be:{}},this.t={},this.o={m:'cc:onFirstConsent',g:'cc:onConsent',C:'cc:onChange',u:'cc:onModalShow',p:'cc:onModalHide',_:'cc:onModalReady'}}}const h=new y,w=(e,t)=>e.indexOf(t),C=(e,t)=>-1!==w(e,t),x=e=>Array.isArray(e),T=e=>!!e&&'object'==typeof e&&!x(e),S=e=>Object.keys(e),M=e=>Array.from(new Set(e)),A=()=>document.activeElement,k=e=>e.preventDefault(),D=(e,t)=>e.querySelectorAll(t),E=()=>{let e={};return h.l.$.forEach((t=>{e[t]=J(h.l.de[t]||[],S(h.l.le[t])||[])})),e},H=e=>{const t=document.createElement(e);return e===c&&V(t,'type',e),t},V=(e,t,n)=>{e.setAttribute(t,n)},I=(e,t,n)=>{e.removeAttribute(n?'data-'+t:t)},j=(e,t,n)=>e.getAttribute(n?'data-'+t:t),F=(e,t)=>e.appendChild(t),N=(e,t,n,o)=>{e.addEventListener(t,n),o&&h.l.D.push({ve:e,ye:t,he:n})},B=(e,t)=>{e.classList.add(t)},O=(e,t)=>{B(e,'cm__'+t)},P=(e,t)=>{B(e,'pm__'+t)},R=(e,t)=>{e.classList.remove(t)},G=()=>{const e=h.T.cookie.expiresAfterDays;return m(e)?e(h.l.Y):e},J=(e,t)=>e.filter((e=>!C(t,e))).concat(t.filter((t=>!C(e,t)))),L=()=>{h.l.Y=(()=>{let e='custom',t=z().accepted.length;return t===h.l.$.length?e='all':t===h.l.te.length&&(e='necessary'),e})()},U=(e,t,n,o)=>{const a='accept-',r=u('show-preferencesModal'),s=u('show-consentModal'),i=u(a+'all'),c=u(a+'necessary'),l=u(a+'custom'),d=h.T.lazyHtmlGeneration;function u(t){return D(e||document,'[data-cc="'+t+'"]')}function p(e,n){k(e),t.acceptCategory(n),t.hidePreferences(),t.hide()}r.forEach((e=>{V(e,'aria-haspopup','dialog'),N(e,f,(e=>{k(e),t.showPreferences()})),d&&N(e,'mouseenter',(e=>{k(e),h.l.R||n(t,o)}),!0)})),s.forEach((e=>{V(e,'aria-haspopup','dialog'),N(e,f,(e=>{k(e),t.show(!0)}),!0)})),i.forEach((e=>{N(e,f,(e=>{p(e,'all')}),!0)})),l.forEach((e=>{N(e,f,(e=>{p(e)}),!0)})),c.forEach((e=>{N(e,f,(e=>{p(e,[])}),!0)}))},z=()=>{let e=h.l.ee;return{accepted:e,rejected:h.l.$.filter((t=>!C(e,t)))}},q=()=>{const e=h.l,t=h.me,n=['[href]',c,'input','details','[tabindex="0"]'].join(':not([tabindex="-1"]), '),o=(e,t)=>{const o=D(e,n);t[0]=o[0],t[1]=o[o.length-1]};e.B&&o(t.we,e.se),e.R&&o(t.Ce,e.ie),e.L=!1,e.J=!1},K=e=>{const t=h.l,n=t.de;if(t.$.forEach((e=>{(t.h[e]||t.de[e]||[]).forEach((n=>{const o=t.le[e][n];o&&(!o.enabled&&C(t.de[e],n)&&m(o.onAccept)?(o.enabled=!0,o.onAccept()):o.enabled&&!C(t.de[e],n)&&m(o.onReject)&&(o.enabled=!1,o.onReject()))}))})),!h.T.manageScriptTags)return;const o=t.pe;let a=e||t.i.categories||[];const r=(e,o)=>{if(o<e.length){var i=e[o],c=t._e[o],l=c.xe,d=c.Te,f=C(a,l),u=!!d&&C(n[l],d);if(!c.Se){let n=!d&&!c.Me&&f,a=d&&!c.Me&&u,p=!d&&c.Me&&!f&&C(t.v,l),_=d&&c.Me&&!u&&C(t.h[l]||[],d);if(n||p||a||_){c.Se=!0;const t=j(i,'type',!0);I(i,'type',!!t),I(i,s);let n=j(i,'src',!0);n&&I(i,'src',!0);const a=H('script');if(a.textContent=i.innerHTML,[...i.attributes].forEach((e=>{let t=e.nodeName;V(a,t,i[t]||j(i,t))})),t&&(a.type=t),n?a.src=n:n=i.src,n&&(a.onload=a.onerror=()=>{r(e,++o)}),i.replaceWith(a),n)return}}r(e,++o)}};r(o,0)},Q=e=>{const t=h.l.S.guiOptions,n=t&&t.consentModal,o=t&&t.preferencesModal,a=(e,t,n,o,a,r)=>{var s=n&&n.layout,i=n&&n.position,c=n&&!0===n.flipButtons,l=n&&!1===n.equalWeightButtons,d=s&&s.split(' ')||[],f=i&&i.split(' ')||[],u=d[0],p=d[1],_=f[0],m='pm--'===o?f[0]:f[1],g=u,b=t[u];b||(b=t[a],g=a);var v=C(b.Ae,p)&&p,y=C(b.ke,_)?_:b.De,w=C(b.Ee,m)?m:b.He;e.className=r,B(e,o+g),v&&B(e,o+v),y&&B(e,o+y),w&&B(e,o+w),c&&B(e,o+'flip');const x='btn--secondary',T=r+'__';if('cm'===r){const{Ve:e,Ie:t}=h.me;e&&R(e,T+x),t&&R(t,T+x),l&&(e&&B(e,T+x),t&&B(t,T+x))}else{const{je:e}=h.me;e&&R(e,T+x),l&&e&&B(e,T+x)}};if(0===e){const e=['middle','top','bottom'],t=['left','center','right'],o={box:{Ae:['wide','inline'],ke:e,Ee:t,De:'bottom',He:'right'},cloud:{Ae:['inline'],ke:e,Ee:t,De:'bottom',He:'center'},bar:{Ae:['inline'],ke:e.slice(1),Ee:[],De:'bottom',He:''}};a(h.me.we,o,n,'cm--','box','cm')}if(1===e){const e={box:{Ae:[],ke:[],Ee:[],De:'',He:''},bar:{Ae:['wide'],ke:[],Ee:['left','right'],De:'',He:'left'}};a(h.me.Ce,e,o,'pm--','box','pm')}},W=(e,t)=>{const n=h.l,o=h.me,a=e.hidePreferences,r=t=>{e.acceptCategory(t),a(),e.hide()},s=n.k&&n.k.preferencesModal;if(!s)return;var p=s.title,m=s.closeIconLabel,g=s.acceptAllBtn,b=s.acceptNecessaryBtn,y=s.savePreferencesBtn,w=s.sections;if(o.Fe)o.Ne=H(i),P(o.Ne,'body');else{o.Fe=H(i),B(o.Fe,'pm-wrapper'),o.Ce=H(i),o.Ce.style.visibility='hidden',B(o.Ce,'pm'),V(o.Ce,'role','dialog'),V(o.Ce,l,!0),V(o.Ce,'aria-modal',!0),V(o.Ce,'aria-labelledby','pm__title'),N(o.Be,'keydown',(e=>{27===e.keyCode&&a()}),!0),o.Oe=H(i),P(o.Oe,'header'),o.Pe=H(i),P(o.Pe,'title'),o.Pe.id='pm__title',V(o.Pe,'role','heading'),V(o.Pe,'aria-level','2'),o.Re=H(c),P(o.Re,'close-btn'),V(o.Re,'aria-label',s.closeIconLabel||''),N(o.Re,f,a),o.Ge=H(i),P(o.Ge,'body'),o.Je=H(i),P(o.Je,'footer');var C=H(i);B(C,'btns');var x=H(i),T=H(i);P(x,d),P(T,d),F(o.Je,x),F(o.Je,T),F(o.Oe,o.Pe),F(o.Oe,o.Re),F(o.Ce,o.Oe),F(o.Ce,o.Ge),F(o.Ce,o.Je),F(o.Fe,o.Ce)}let M;p&&(o.Pe.innerHTML=p,m&&V(o.Re,'aria-label',m)),w&&w.forEach((e=>{var t=e.title,a=e.description,r=e.linkedCategory,d=r&&n.Z[r],u=e.cookieTable,p=u&&u.body,_=p&&p.length>0,m=!!d,g=m&&n.le[r]||!1,b=g&&S(g)||[],v=m&&(!!a||!!_||S(g).length>0),y=H(i);if(P(y,'section'),v||a){var h=H(i);P(h,'section-desc-wrapper')}let w=b.length;if(v&&w>0){var C=H(i);P(C,'section-services'),b.forEach((e=>{var t=g[e].label||e,n=H(i),o=H(i),a=H(i),s=H(i);P(n,'service'),P(s,'service-title'),P(o,'service-header'),P(a,'service-icon');var c=X(t,e,d,!0,r);s.innerHTML=t,F(o,a),F(o,s),F(n,o),F(n,c),F(C,n)})),F(h,C)}if(t){var x=H(i),T=H(m?c:i);if(P(x,'section-title-wrapper'),P(T,'section-title'),T.innerHTML=t,F(x,T),m){var A=H('span');P(A,'section-arrow'),F(x,A),y.className+='--toggle';var k=X(t,r,d);let e=s.serviceCounterLabel;if(w>0&&'string'==typeof e){let t=H('span');P(t,'badge'),P(t,'service-counter'),V(t,l,!0),V(t,'data-servicecounter',w),e&&(e=e.split('|'),e=e.length>1&&w>1?e[1]:e[0],V(t,'data-counterlabel',e)),t.innerHTML=w+(e?' '+e:''),F(T,t)}if(v){P(y,'section--expandable');var D=r+'-desc';V(T,'aria-expanded',!1),V(T,'aria-controls',D)}F(x,k)}else V(T,'role','heading'),V(T,'aria-level','3');F(y,x)}if(a){var E=H(i);P(E,'section-desc'),E.innerHTML=a,F(h,E)}if(v&&(V(h,l,'true'),h.id=D,((e,t,n)=>{N(T,f,(()=>{t.classList.contains('is-expanded')?(R(t,'is-expanded'),V(n,'aria-expanded','false'),V(e,l,'true')):(B(t,'is-expanded'),V(n,'aria-expanded','true'),V(e,l,'false'))}))})(h,y,T),_)){var I=H('table'),j=H('thead'),O=H('tbody');P(I,'section-table'),P(j,'table-head'),P(O,'table-body');var G=u.headers,J=S(G),L=o.Le.createDocumentFragment(),U=H('tr');V(U,'role','row');for(var z=0;z<J.length;z++){var q=G[J[z]],K=H('th');K.id='cc__row-'+q,V(K,'role','columnheader'),V(K,'scope','col'),P(K,'table-th'),K.innerHTML=q,F(L,K)}F(U,L),F(j,U);var Q=o.Le.createDocumentFragment();for(z=0;z<p.length;z++){var W=p[z],Y=H('tr');V(Y,'role','row'),P(Y,'table-tr');for(var Z=0;Z<J.length;Z++){var $=J[Z],ee=G[$],te=W[$],ne=H('td'),oe=H(i);P(ne,'table-td'),V(ne,'data-column',ee),V(ne,'headers','cc__row-'+ee),oe.insertAdjacentHTML('beforeend',te),F(ne,oe),F(Y,ne)}F(Q,Y)}F(O,Q),F(I,j),F(I,O),F(h,I)}(v||a)&&F(y,h);const ae=o.Ne||o.Ge;m?(M||(M=H(i),P(M,'section-toggles')),M.appendChild(y)):M=null,F(ae,M||y)})),(g||b)&&(b&&(o.je||(o.je=H(c),P(o.je,'btn'),V(o.je,u,'necessary'),F(x,o.je),N(o.je,f,(()=>r([])))),o.je.innerHTML=b),g&&(o.Ue||(o.Ue=H(c),P(o.Ue,'btn'),V(o.Ue,u,'all'),F(x,o.Ue),N(o.Ue,f,(()=>r('all')))),o.Ue.innerHTML=g)),y&&(o.ze||(o.ze=H(c),P(o.ze,'btn'),P(o.ze,'btn--secondary'),V(o.ze,u,'save'),F(T,o.ze),N(o.ze,f,(()=>r()))),o.ze.innerHTML=y),o.Ne&&(o.Ce.replaceChild(o.Ne,o.Ge),o.Ge=o.Ne),Q(1),o.Ge.querySelectorAll('[data-hideModal]').forEach((e=>{N(e,f,a)})),n.R||(n.R=!0,v(h.o._,_,o.Ce),t(e),setTimeout(q,10),F(o.qe,o.Fe),setTimeout((()=>B(o.Fe,'cc--anim')),100))};function X(e,t,n,o,a){const r=h.l,i=h.me;var c=H('label'),d=H('input'),u=H('span'),p=H('span'),_=H('span'),m=H('span');if(d.type='checkbox',B(c,'section__toggle-wrapper'),B(d,'section__toggle'),B(_,'toggle__icon-on'),B(m,'toggle__icon-off'),B(u,'toggle__icon'),B(p,'toggle__label'),V(u,l,'true'),o?(B(c,'toggle-service'),V(d,s,a),i.be[a][t]=d):i.ge[t]=d,o?(e=>{N(d,'change',(()=>{var t=i.be[e],n=i.ge[e];for(var o in r.fe[e]=[],t){const n=t[o];n.checked&&r.fe[e].push(n.value)}r.fe[e].length>0?n.checked=!0:n.checked=!1}))})(a):(e=>{N(d,f,(()=>{var t=i.be[e];if(r.fe[e]=[],d.checked)for(var n in t)t[n].checked=!0;else for(n in t)t[n].checked=!1}))})(t),d.value=t,p.textContent=e.replace(/<.*>.*<\/.*>/gm,''),F(u,m),F(u,_),r.N)(n.enabled||n.readOnly)&&(d.checked=!0);else if(o){var g=r.de[a];(n.readOnly||C(g,t))&&(d.checked=!0)}else C(r.ee,t)&&(d.checked=!0);return n.readOnly&&(d.disabled=!0),F(c,d),F(c,u),F(c,p),c}const Y=(e,t)=>{const n=h.l,o=h.me,a=n.k&&n.k.consentModal;if(!a)return;const r=a.acceptAllBtn,s=a.acceptNecessaryBtn,_=a.showPreferencesBtn,m=a.closeIconLabel,g=a.footer,b=a.label,y=a.title,w=t=>{e.hide(),e.acceptCategory(t)};if(!o.Ke){o.Ke=H(i),o.we=H(i),o.Qe=H(i),o.We=H(i),o.Xe=H(i),B(o.Ke,'cm-wrapper'),B(o.we,'cm'),O(o.Qe,'body'),O(o.We,'texts'),O(o.Xe,'btns'),V(o.we,'role','dialog'),V(o.we,'aria-modal','true'),V(o.we,l,'false'),V(o.we,'aria-describedby','cm__desc'),b?V(o.we,'aria-label',b):y&&V(o.we,'aria-labelledby','cm__title'),o.we.style.visibility='hidden';const e='box',t=n.S.guiOptions,a=t&&t.consentModal,d=(a&&a.layout||e).split(' ')[0]===e;y&&m&&d&&(o.Ie||(o.Ie=H(c),O(o.Ie,'btn'),O(o.Ie,'btn--close'),N(o.Ie,f,(()=>{w([])})),F(o.Qe,o.Ie)),V(o.Ie,'aria-label',m)),F(o.Qe,o.We),(r||s||_)&&F(o.Qe,o.Xe),F(o.we,o.Qe),F(o.Ke,o.we)}y&&(o.Ye||(o.Ye=H(i),o.Ye.className=o.Ye.id='cm__title',V(o.Ye,'role','heading'),V(o.Ye,'aria-level','2'),F(o.We,o.Ye)),o.Ye.innerHTML=y);var C=a.description;if(C&&(n.K&&(C=C.replace('{{revisionMessage}}',n.W?'':a.revisionMessage||'')),o.Ze||(o.Ze=H(i),o.Ze.className=o.Ze.id='cm__desc',F(o.We,o.Ze)),o.Ze.innerHTML=C),r&&(o.$e||(o.$e=H(c),O(o.$e,'btn'),V(o.$e,u,'all'),N(o.$e,f,(()=>{w('all')}))),o.$e.innerHTML=r),s&&(o.Ve||(o.Ve=H(c),O(o.Ve,'btn'),V(o.Ve,u,'necessary'),N(o.Ve,f,(()=>{w([])}))),o.Ve.innerHTML=s),_&&(o.et||(o.et=H(c),O(o.et,'btn'),O(o.et,'btn--secondary'),V(o.et,u,'show'),N(o.et,'mouseenter',(()=>{n.R||W(e,t)})),N(o.et,f,e.showPreferences)),o.et.innerHTML=_),o.tt||(o.tt=H(i),O(o.tt,d),s&&F(o.tt,o.Ve),r&&F(o.tt,o.$e),(r||s)&&F(o.Qe,o.tt),F(o.Xe,o.tt)),o.et&&!o.nt&&(o.nt=H(i),o.Ve&&o.$e?(O(o.nt,d),F(o.nt,o.et),F(o.Xe,o.nt)):(F(o.tt,o.et),O(o.tt,'btn-group--uneven'))),g){if(!o.ot){var x=H(i),T=H(i);o.ot=H(i),O(x,'footer'),O(T,'links'),O(o.ot,'link-group'),F(T,o.ot),F(x,T),F(o.we,x)}o.ot.innerHTML=g}Q(0),n.B||(n.B=!0,v(h.o._,p,o.we),t(e),setTimeout(q,10),F(o.qe,o.Ke),setTimeout((()=>B(o.Ke,'cc--anim')),100)),U(o.Qe,e,W,t)},Z=e=>!!e&&C(S(h.l.A),e),$=()=>{const e=h.l;return e.M||e.S.language.default},ee=e=>{e&&(h.l.M=e)},te=async e=>{const t=h.l;let n;n=e&&Z(e)?e:$();let o=t.A[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.k=o,ee(n),!0},ne=()=>{let e=h.l.S.language.rtl,t=h.me.qe;e&&t&&(x(e)||(e=[e]),C(e,h.l.M)?B(t,'cc--rtl'):R(t,'cc--rtl'))},oe=e=>{const t=h.me;if(!t.qe){t.qe=H(i),t.qe.id='cc-main',t.qe.style.position='fixed',t.qe.style.zIndex='2147483647',ne();let n=h.l.S.root;n&&'string'==typeof n&&(n=document.querySelector(n)),F(n||t.Le.body,t.qe),(e=>{const t=h.me;N(t.qe,f,(n=>{const o=h.l;o.U?t.Ce.contains(n.target)?o.G=!0:(e.hidePreferences(0),o.G=!1):o.O&&t.we.contains(n.target)&&(o.G=!0)}))})(e)}},ae=e=>{const{hostname:t,protocol:n}=window.location,{name:o,path:a,domain:r,sameSite:s}=h.T.cookie,i=encodeURIComponent(JSON.stringify(h.l.i)),c=e?(()=>{const e=h.l.j,t=e?new Date-e:0;return 864e5*G()-t})():864e5*G(),l=new Date;l.setTime(l.getTime()+c);let d=o+'='+i+(0!==c?'; expires='+l.toUTCString():'')+'; Path='+a+'; SameSite='+s;C(t,'.')&&(d+='; Domain='+r),'https:'===n&&(d+='; Secure'),document.cookie=d,h.l.i},re=(e,t,n)=>{const o=n||h.T.cookie.domain,a=t||h.T.cookie.path,r='www.'===o.slice(0,4),s=r&&o.substring(4),i=(e,t)=>{document.cookie=e+'=; path='+a+(t?'; domain=.'+t:'')+'; expires=Thu, 01 Jan 1970 00:00:01 GMT;'};e.forEach((e=>{i(e),i(e,o),r&&i(e,s)}))},se=e=>(e=>{let t;try{t=JSON.parse(decodeURIComponent(e))}catch(e){t={}}return t})(ie(e||h.T.cookie.name,!0)),ie=(e,t)=>{const n=document.cookie.match('(^|;)\\s*'+e+'\\s*=\\s*([^;]+)');return n?t?n.pop():e:''},ce=e=>{const t=document.cookie.split(/;\s*/),n=[];return t.forEach((t=>{let o=t.split('=')[0];if(e)try{e.test(o)&&n.push(o)}catch(e){}else n.push(o)})),n},le=e=>{e.dispatchEvent(new Event('change'))},de=(e,o=[])=>{const a=h.l;let r=!1;var s=[];if(e)if('object'==typeof e&&'number'==typeof e.length)for(var i=0;i<e.length;i++)C(a.$,e[i])&&s.push(e[i]);else'string'==typeof e&&('all'===e?s=a.$.slice():C(a.$,e)&&s.push(e));else s=(()=>{let e=h.me.ge,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.fe)a.fe[e].length>0&&(C(t,e)||t.push(e));return t})(),r=!0;if(o.length>=1)for(i=0;i<o.length;i++)s=s.filter((e=>e!==o[i]));for(i=0;i<a.te.length;i++)C(s,a.te[i])||s.push(a.te[i]);a.ee=s,L(),r||(a.fe={}),a.ue=g(a.de),a.$.forEach((e=>{const t=a.le[e],n=S(t),o=a.de;0!==n.length&&(o[e]=[],C(a.te,e)?n.forEach((t=>{o[e].push(t)})):'all'===a.Y?r&&a.fe[e]&&a.fe[e].length>0?a.fe[e].forEach((t=>{o[e].push(t)})):n.forEach((t=>{o[e].push(t)})):'necessary'===a.Y?o[e]=[]:r&&a.fe[e]&&a.fe[e].length>0?a.fe[e].forEach((t=>{o[e].push(t)})):C(a.ee,e)&&S(t).forEach((t=>o[e].push(t))),o[e]=M(o[e]))})),(()=>{const e=h.l;h.T.mode===n&&e.N?e.v=J(e.ne,e.ee):e.v=J(e.ee,e.i.categories||[]);let o=e.v.length>0,a=!1;e.$.forEach((t=>{e.h[t]=J(e.de[t],e.ue[t]||[]),e.h[t].length>0&&(a=!0)}));var r=h.me.ge;for(var s in r)C(e.ee,s)?r[s].checked=!0:r[s].checked=!1;e.$.forEach((t=>{var n=h.me.be[t],o=e.de[t];for(var a in n){const e=n[a];C(o,a)?e.checked=!0:e.checked=!1}})),e.I||(e.I=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:g(e.ee),revision:h.T.revision,data:e.V,consentTimestamp:e.I.toISOString(),consentId:e.F,services:g(e.de)};var i=!1;(e.N||o||a)&&(e.N&&(e.N=!1,i=!0),L(),e.j?e.j=new Date:e.j=e.I,e.i.lastConsentTimestamp=e.j.toISOString(),ae(),h.T.autoClearCookies&&(i||!e.N&&o)&&(e=>{const t=h.l,n=ce();t.X=!1;let o=e?t.$:t.v;o=o.filter((e=>{let n=t.Z[e];return!!n&&!n.readOnly&&!!n.autoClear})),o.forEach((o=>{const a=t.Z[o].autoClear,r=a&&a.cookies||[],s=C(t.v,o),i=!C(t.ee,o),c=s&&i;(e&&i||!e&&c)&&(!0===a.reloadPage&&c&&(t.X=!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=w(n,o);e>-1&&t.push(n[e])}t.length>0&&re(t,r,a)})))}))})(i),K()),i&&(v(h.o.m),v(h.o.g),h.T.mode===t)||((o||a)&&v(h.o.C),e.X&&window.location.reload())})()},fe=(e,t,n)=>{let o=[];const a=e=>{if('string'==typeof e){let t=ie(e);''!==t&&o.push(t)}else o=o.concat(ce(e))};if(x(e))for(var r=0;r<e.length;r++)a(e[r]);else a(e);re(o,t,n)};let ue;const pe=e=>{clearTimeout(ue),e?B(h.me.Be,r):ue=setTimeout((()=>{R(h.me.Be,r)}),500)},_e=e=>{const t=h.me,n=h.l;e&&!n.B&&Y(ve,oe),n.B&&(n.O=!0,n.H&&pe(!0),B(t.Be,o),V(t.we,l,'false'),setTimeout((()=>{n.ae=A(),n.q=n.se}),200),v(h.o.u,p))},me=()=>{const e=h.me,t=h.l;t.B&&(t.O=!1,t.H&&pe(),R(e.Be,o),V(e.we,l,'true'),setTimeout((()=>{t.ae.focus(),t.q=[]}),200),v(h.o.p,p))},ge=()=>{const e=h.l;e.R&&e.P||(e.R||W(ve,oe),B(h.me.Be,a),V(h.me.Ce,l,'false'),e.P=!0,setTimeout((()=>{e.U=!0}),1),setTimeout((()=>{e.O?e.re=A():e.ae=A(),0!==e.ie.length&&(e.ie[0].focus(),e.q=e.ie)}),200),v(h.o.u,_))},be=()=>{const e=h.l;e.P&&(R(h.me.Be,a),V(h.me.Ce,l,'true'),e.P=!1,setTimeout((()=>{e.U=!1}),1),e.O?(e.re&&e.re.focus(),e.q=e.se):(e.ae&&e.ae.focus(),e.q=[]),e.G=!1,v(h.o.p,_))};var ve={show:_e,hide:me,showPreferences:ge,hidePreferences:be,acceptCategory:de};const ye=(e,t)=>{const n=se(t);return e?n[e]:n};e.acceptCategory=de,e.acceptService=(e,t)=>{const n=h.l;if(!e||!t||'string'!=typeof t||!C(n.$,t))return!1;const o=h.me.be[t]||{},a=S(n.le[t]);if(n.fe[t]=[],'string'==typeof e)if('all'===e){for(let e in o)o[e].checked=!0,le(o[e]);n.fe[t]=[...a]}else{for(let t in o)o[t].checked=e===t,le(o[t]);C(a,e)&&n.fe[t].push(e)}else if(x(e)){for(let t in o)C(e,t)?o[t].checked=!0:o[t].checked=!1,le(o[t]);a.forEach((o=>{C(e,o)&&n.fe[t].push(o)}))}de()},e.acceptedCategory=e=>{let n;return n=h.l.N&&h.T.mode!==t?h.l.ne:z().accepted||[],C(n,e)},e.acceptedService=(e,t)=>C(h.l.de[t]||[],e),e.eraseCookies=fe,e.getConfig=e=>{const t=h.T,n=h.l.S;return e?t[e]||n[e]:{...t,...n,cookie:{...t.cookie}}},e.getCookie=ye,e.getUserPreferences=()=>{const e=!h.l.N;var t=e&&z();return{acceptType:h.l.Y,acceptedCategories:e?t.accepted:[],rejectedCategories:e?t.rejected:[],acceptedServices:e?h.l.de:{},rejectedServices:e?E():{}}},e.hide=me,e.hidePreferences=be,e.loadScript=(e,t)=>{let n=document.querySelector('script[src="'+e+'"]');return new Promise((o=>{if(n)return o(!0);n=H('script'),x(t)&&t.forEach((e=>{V(n,e.name,e.value)})),n.onload=()=>o(!0),n.onerror=()=>{n.remove(),o(!1)},n.src=e,F(document.head,n)}))},e.reset=e=>{const t=h.me,n=h.T.cookie;!0===e&&fe(n.name,n.path,n.domain),h.l.D.forEach((e=>{e.ve.removeEventListener(e.ye,e.he)})),t.qe&&t.qe.remove(),t.Be&&(R(t.Be,r),R(t.Be,a),R(t.Be,o));const s=new y;h.l=s.l,h.me=s.me,h.T=s.T,h.t=s.t,h.o=s.o,window._ccRun=!1},e.run=async e=>{const t=h.l,o=h.T,a=window;if(!a._ccRun){if(a._ccRun=!0,(e=>{!function(){const e=document;h.me.Le=e,h.me.Be=e.documentElement,h.T.cookie.domain=window.location.hostname}();const t=h.T,o=h.l,a=t.cookie,r=h.t,i=e.cookie,c=e.categories,l=S(c)||[],d=navigator;o.S=e,o.A=e.language.translations,o.Z=c,o.$=l,o.H=!!e.disablePageInteraction,r.m=e.onFirstConsent,r.g=e.onConsent,r.C=e.onChange,r.p=e.onModalHide,r.u=e.onModalShow,r._=e.onModalReady;const{mode:f,autoShow:u,autoClearCookies:p,revision:_,manageScriptTags:m,hideFromBots:g,lazyHtmlGeneration:b}=e;f===n&&(t.mode=f),'boolean'==typeof u&&(t.autoShow=u),'boolean'==typeof p&&(t.autoClearCookies=p),'boolean'==typeof m&&(t.manageScriptTags=m),'number'==typeof _&&_>=0&&(t.revision=_,o.K=!0),'boolean'==typeof b&&(t.lazyHtmlGeneration=b),!1===g&&(t.hideFromBots=!1),!0===t.hideFromBots&&d&&(o.oe=d.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(d.userAgent)||d.webdriver),T(i)&&(t.cookie={...a,...i}),t.autoClearCookies,o.K,t.manageScriptTags,function(e){const t=h.l;e.forEach((e=>{const n=t.Z[e],o=n.services||{},a=o&&T(o)&&S(o)||[];t.le[e]={},t.de[e]=[],n.readOnly&&(t.te.push(e),t.de[e]=S(o)),h.me.be[e]={},a.forEach((n=>{const a=o[n];a.enabled=!1,t.le[e][n]=a}))}))}(l),(()=>{if(!h.T.manageScriptTags)return;const e=h.l;e.pe=D(h.me.Le,'script[data-category]'),e._e=[],e.pe.forEach((t=>{let n=t.getAttribute(s),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),C(e.$,n)&&(e._e.push({Se:!1,Me:a,xe:n,Te:o}),o)){const t=e.le[n];t[o]||(t[o]={enabled:!1})}}))})(),ee((()=>{const e=h.l.S.language.autoDetect;if(e){let t;if('browser'===e?t=navigator.language.slice(0,2).toLowerCase():'document'===e&&(t=document.documentElement.lang),Z(t))return t}return $()})())})(e),t.oe)return;const i=se(),c=i.categories,l=x(c);t.i=i,t.F=i.consentId;const d=!!t.F&&'string'==typeof t.F;t.I=i.consentTimestamp,t.I&&(t.I=new Date(t.I)),t.j=i.lastConsentTimestamp,t.j&&(t.j=new Date(t.j));const f=i.data;if(t.V=void 0!==f?f:null,t.K&&d&&i.revision!==o.revision&&(t.W=!1),t.N=!(d&&t.W&&t.I&&t.j&&l),t.N,t.N?o.mode===n&&(()=>{const e=h.l;e.$.forEach((t=>{if(e.Z[t].enabled){e.ne.push(t);const o=e.le[t]||{};for(var n in o)e.de[t].push(n)}}))})():(t.ee=M([...t.te,...i.categories]),t.de={...t.de,...i.services},L()),!await te())return;r=ve,h.l.N&&Y(r,oe),h.T.lazyHtmlGeneration||W(r,oe),U(null,r,W,oe),o.autoShow&&t.N&&_e(!0),(()=>{const e=h.me,t=h.l;N(e.Be,'keydown',(e=>{if('Tab'!==e.key)return;const n=t.q;if(n.length>0){const o=A();e.shiftKey?o===n[0]&&(n[1].focus(),k(e)):o===n[1]&&(n[0].focus(),k(e)),t.J||h.l.G||(t.J=!0,!t.L&&k(e),e.shiftKey?n[1].focus():n[0].focus())}!t.J&&(t.L=!0)}),!0)})(),t.N?o.mode===n&&(o.mode,t.ne,K(t.ne)):(K(),v(h.o.g))}var r},e.setCookieData=e=>{let t,n=e.value,o=e.mode,a=!1;const r=h.l;if('update'===o){r.V=ye('data'),t=ye('data');const e=typeof t==typeof n;if(e&&'object'==typeof t)for(var s in!t&&(t={}),n)t[s]!==n[s]&&(t[s]=n[s],a=!0);else!e&&t||t===n||(t=n,a=!0)}else t=n,a=!0;return a&&(r.V=t,r.i.data=t,ae(!0)),a},e.setLanguage=async(e,t)=>{if(!Z(e))return!1;const n=h.l;return!(e===$()&&!0!==t||!await te(e)||(ee(e),n.B&&Y(ve,oe),n.R&&W(ve,oe),ne(),q(),0))},e.show=_e,e.showPreferences=ge,e.validConsent=()=>!h.l.N,e.validCookie=e=>''!==ie(e,!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.8", | ||
"version": "3.0.0-rc.9", | ||
"description": "🍪 Simple cross-browser cookie-consent plugin written in vanilla js.", | ||
@@ -39,18 +39,19 @@ "main": "dist/cookieconsent.umd.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.19.3", | ||
"@babel/preset-env": "^7.19.3", | ||
"@rollup/plugin-eslint": "^8.0.2", | ||
"@types/jest": "^29.1.2", | ||
"babel-jest": "^28.1.3", | ||
"cssnano": "^5.1.13", | ||
"@babel/core": "^7.20.2", | ||
"@babel/preset-env": "^7.20.2", | ||
"@el3um4s/rollup-plugin-terser": "^1.0.2", | ||
"@rollup/plugin-eslint": "^9.0.1", | ||
"@types/jest": "^29.2.2", | ||
"babel-jest": "^29.3.1", | ||
"cssnano": "^5.1.14", | ||
"eslint": "^8.27.0", | ||
"fast-glob": "^3.2.12", | ||
"jest": "^29.1.2", | ||
"jest-environment-jsdom": "^29.1.2", | ||
"jest": "^29.3.1", | ||
"jest-environment-jsdom": "^29.3.1", | ||
"postcss-combine-duplicated-selectors": "^10.0.3", | ||
"rollup": "^2.79.1", | ||
"rollup": "^3.2.5", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"sass": "^1.55.0", | ||
"sass": "^1.56.1", | ||
"sitemap": "^7.1.1", | ||
"vitepress": "1.0.0-alpha.21" | ||
"vitepress": "1.0.0-alpha.28" | ||
}, | ||
@@ -57,0 +58,0 @@ "jest": { |
@@ -6,9 +6,43 @@ export = CookieConsent | ||
type AcceptType = 'all' | 'custom' | 'necessary' | ||
type ConsentModalLayout = 'box' | 'box wide' | 'box inline' | 'cloud' | 'cloud inline' | 'bar' | 'bar inline' | ||
type ConsentModalPosition = 'top' | 'bottom' | 'middle' | 'top left' | 'top center' | 'top right' | 'middle left' | 'middle center' | 'middle right' | 'bottom left' | 'bottom center' | 'bottom right' | ||
type PreferencesModalLayout = 'box' | 'bar' | 'bar wide' | ||
type AcceptType = | ||
'all' | ||
| 'custom' | ||
| 'necessary' | ||
type ConsentModalLayout = | ||
'box' | ||
| 'box wide' | ||
| 'box inline' | ||
| 'cloud' | ||
| 'cloud inline' | ||
| 'bar' | ||
| 'bar inline' | ||
type ConsentModalPosition = | ||
'top' | ||
| 'bottom' | ||
| 'middle' | ||
| 'top left' | ||
| 'top center' | ||
| 'top right' | ||
| 'middle left' | ||
| 'middle center' | ||
| 'middle right' | ||
| 'bottom left' | ||
| 'bottom center' | ||
| 'bottom right' | ||
type PreferencesModalLayout = | ||
'box' | ||
| 'bar' | ||
| 'bar wide' | ||
type PreferencesModalPosition = 'left' | 'right' | ||
interface CookieItems { | ||
type ModalName = 'consentModal' | 'preferencesModal' | ||
/** | ||
* Cookie to clear | ||
*/ | ||
interface CookieItem { | ||
/** | ||
@@ -33,8 +67,8 @@ * Cookie name | ||
/** | ||
* Array of cookies to delete | ||
* Array of cookies to clear. | ||
*/ | ||
cookies: CookieItems[] | ||
cookies: CookieItem[] | ||
/** | ||
* Reload the page after the autoClear function | ||
* Reload page after the autoClear function. | ||
* | ||
@@ -48,3 +82,3 @@ * @default false | ||
/** | ||
* Label of the service (can also be html markup) | ||
* Custom visible label (can also be html markup). | ||
*/ | ||
@@ -54,3 +88,3 @@ label?: string | ||
/** | ||
* Function executed when the service is accepted | ||
* Callback executed when the service is accepted. | ||
*/ | ||
@@ -60,3 +94,4 @@ onAccept?: () => void | ||
/** | ||
* Function executed when the service is rejected (assuming that it was previously enabled) | ||
* Callback executed when the service is rejected | ||
* (assuming that it was previously enabled). | ||
*/ | ||
@@ -70,14 +105,7 @@ onReject?: () => void | ||
* - necessary: only the necessary (if any) categories were accepted | ||
* - custom: a custom choice of categories was accepted | ||
* - custom: a custom selection of categories was accepted | ||
*/ | ||
acceptType: AcceptType | ||
/** | ||
* Array with all the names of the accepted categories | ||
*/ | ||
acceptedCategories: string[] | ||
/** | ||
* Array with all the names of the rejected categories | ||
*/ | ||
rejectedCategories: string[] | ||
@@ -93,4 +121,4 @@ | ||
* | ||
* If mode="opt-out" and consent has not yet been expressed, the category | ||
* is automatically enabled (and scripts under this category will be executed) | ||
* If mode is set to `'opt-out'` and consent has not yet been expressed, the category | ||
* is automatically enabled (and scripts under this category will be executed). | ||
* | ||
@@ -109,3 +137,3 @@ * @default false | ||
/** | ||
* Use to configure individually togglable services | ||
* Configure individually togglable services. | ||
*/ | ||
@@ -115,3 +143,3 @@ services?: {[key: string]: Service} | ||
/** | ||
* Use to declare the cookies you'd like to erase when the user rejects the category | ||
* Declare the cookies to erase when the user rejects the category. | ||
*/ | ||
@@ -123,3 +151,3 @@ autoClear?: AutoClear | ||
/** | ||
* Array of accepted categories | ||
* All accepted categories. | ||
*/ | ||
@@ -141,3 +169,3 @@ categories: string[] | ||
/** | ||
* Unique UUIDV4 string used to identify the current user. | ||
* Unique UUIDV4 string that identifies the current user. | ||
*/ | ||
@@ -255,2 +283,8 @@ consentId: string | ||
interface ConsentModalOptions { | ||
/** | ||
* Accessibility label. Especially useful if no title is provided. | ||
*/ | ||
label?: string | ||
title?: string | ||
@@ -263,3 +297,3 @@ description?: string | ||
/** | ||
* This option works only with the 'box' layout. | ||
* Specify to generate a big "X" (accept necessary) button. Visible in the `box` layout only. | ||
*/ | ||
@@ -275,3 +309,3 @@ closeIconLabel?: string | ||
/** | ||
* HTML string with links pointing to your privacy policy. | ||
* Custom HTML string where you can put links pointing to your privacy policy. | ||
*/ | ||
@@ -310,3 +344,3 @@ footer?: string | ||
/** | ||
* Create a custom html table (generally used to clarify cookies) | ||
* Create a custom html table (generally used to clarify cookies). | ||
*/ | ||
@@ -323,3 +357,3 @@ cookieTable?: CookieTable | ||
/** | ||
* Close Icon label. Specify for better a11y. | ||
* Accessibility label. | ||
*/ | ||
@@ -378,3 +412,4 @@ closeIconLabel?: string | ||
/** | ||
* Automatically erase cookies when the user opts-out of a category. Check out the [docs](https://cookieconsent.orestbida.com/reference/configuration-reference.html#categories-autoclear). | ||
* Automatically erase cookies when the user opts-out of a category. | ||
* Check out the [docs](https://cookieconsent.orestbida.com/reference/configuration-reference.html#categories-autoclear). | ||
* | ||
@@ -426,3 +461,4 @@ * @default true | ||
/** | ||
* Callback fired on the very first consent action and also after each page load. | ||
* Callback fired on the very first consent action | ||
* and on each page load. | ||
*/ | ||
@@ -446,3 +482,3 @@ onConsent?: (param: { | ||
onModalShow?: (param: { | ||
modalName: string | ||
modalName: ModalName | ||
}) => void | ||
@@ -454,3 +490,3 @@ | ||
onModalHide?: (param: { | ||
modalName: string | ||
modalName: ModalName | ||
}) => void | ||
@@ -462,3 +498,3 @@ | ||
onModalReady?: (param: { | ||
modalName: string, | ||
modalName: ModalName, | ||
modal: HTMLElement | ||
@@ -484,2 +520,7 @@ }) => void | ||
/** | ||
* RTL language(s). | ||
*/ | ||
rtl?: string | string[] | ||
/** | ||
* Language detection strategy. | ||
@@ -486,0 +527,0 @@ */ |
Sorry, the diff of this file is not supported yet
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
124731
12
736
17