Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gdpr-consent

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gdpr-consent - npm Package Compare versions

Comparing version 4.0.8 to 4.0.9

2

build/gdpr-consent.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GDPRConsent=t():e.GDPRConsent=t()}(self,(function(){return function(){"use strict";var e={d:function(t,i){for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};function i(e,t,i=null){const o=document.getElementById(e);if(null!==o)if("string"!=typeof t)for(const[e,i]of Object.entries(t))null!==i?o.style.setProperty(e,i):o.style.removeProperty(e);else null!==i?o.style.setProperty(t,i):o.style.removeProperty(t)}function o(e,t){const i=document.getElementById(e);null!==i&&("string"==typeof t?i.classList.add(t):i.classList.add(...t))}function n(e,t){const i=document.getElementById(e);null!==i&&("string"==typeof t?i.classList.remove(t):i.classList.remove(...t))}e.d(t,{default:function(){return M}});function a(e,t,i){e.dispatchEvent("string"==typeof t?new CustomEvent(t,{detail:i}):t)}function s(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)e[o]=i[o]}return e}var r,c=function e(t,i){function o(e,o,n){if("undefined"!=typeof document){"number"==typeof(n=s({},i,n)).expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var r in n)n[r]&&(a+="; "+r,!0!==n[r]&&(a+="="+n[r].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+a}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var i=document.cookie?document.cookie.split("; "):[],o={},n=0;n<i.length;n++){var a=i[n].split("="),s=a.slice(1).join("=");try{var r=decodeURIComponent(a[0]);if(o[r]=t.read(s,r),e===r)break}catch(e){}}return e?o[e]:o}},remove:function(e,t){o(e,"",s({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,s({},this.attributes,t))},withConverter:function(t){return e(s({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});!function(e){e[e.localStorage=1]="localStorage",e[e.cookies=2]="cookies"}(r||(r={}));class l{type;constructor(e){this.type=e}}class d extends l{constructor(){super(r.localStorage)}getItem(e){const t=window.localStorage.getItem(e);return null===t?void 0:t}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}}class u extends l{expires;constructor(e){super(r.cookies),this.expires=e}getItem(e){return c.get(e)}setItem(e,t){c.set(e,t,{expires:this.expires})}removeItem(e){c.remove(e)}}let p=null;function g(e=365){return null===p&&(p=function(){const e="localStorageTest";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}()?new d:new u(e)),p}const m=/[&<>"']/g,h=RegExp(m.source),v=Object.freeze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function f(e){return h.test(e)?e.replace(m,(e=>v[e])):e}const y={hashtag:"#tarteaucitron",cookieName:"tarteaucitron",timeExpire:31536e6,acceptAllCta:!0,moreInfoLink:!0,mandatory:!0,preferLocalStorage:!1,websiteName:window.location.hostname,siteDisclaimerTitle:"",siteDisclaimerMessage:""},w={alertBigScroll:"By continuing to scroll,",alertBigClick:"If you continue to browse this website,",alertBig:"you are allowing all third-party services",alertBigPrivacy:"This site uses cookies and gives you control over what you want to activate",personalize:"Personalize",acceptAll:"OK, accept all",continue:"Reject cookies & keep on browsing",close:"Close",all:"Preference for all services",disclaimer:"By allowing these third party services, you accept their cookies and the use of tracking technologies necessary for their proper functioning.",disclaimerWebsite:"These services help us improve",allow:"Allow",deny:"Deny",noCookie:"This service does not use cookie.",useCookie:"This service can install",useCookieCurrent:"This service has installed",useNoCookie:"This service has not installed any cookie.",source:"View the official website",noServices:"This website does not use any cookie requiring your consent.",title:"Cookies management panel",newWindow:"(new window)",allowAll:"Allow all cookies",denyAll:"Deny all cookies",save:"Save",ads:{title:"Advertising network (to let us know)",details:"Ad networks can generate revenue by selling advertising space on the site."},analytic:{title:"Navigation (ergonomics) and audience measurement",details:"The audience measurement services used to generate useful statistics attendance to improve the site."},social:{title:"Social networks (sharing buttons and Twitter cards)",details:"Social networks can improve the usability of the site and help to promote it via the shares."},video:{title:"Videos",details:"Video sharing services help to add rich media on the site and increase its visibility."},comment:{title:"Comments",details:"Comments managers facilitate the filing of comments and fight against spam."},support:{title:"Support",details:"Support services allow you to get in touch with the site team and help to improve it."},api:{title:"Services",details:"APIs are used to load scripts: geolocation, search engines, translations, ..."},other:{title:"Other",details:"Services to display web content."},mandatoryTitle:"Mandatory cookies",mandatoryText:"This site uses cookies necessary for its proper functioning which cannot be deactivated."},b={alertBigScroll:"En continuant de défiler,",alertBigClick:"En poursuivant votre navigation,",alertBig:"vous acceptez l’utilisation de services tiers pouvant installer des cookies",alertBigPrivacy:"Ce site utilise des cookies et vous donne le contrôle sur ce que vous souhaitez activer",personalize:"Personnaliser",acceptAll:"Tout autoriser",continue:"Continuer sans accepter",close:"Fermer",all:"Préférences pour tous les services",disclaimer:"En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l’utilisation de technologies de suivi nécessaires à leur bon fonctionnement.",disclaimerWebsite:"Ces services nous aident à améliorer",allow:"Autoriser",deny:"Interdire",noCookie:"Ce service ne dépose aucun cookie.",useCookie:"Ce service peut déposer",useCookieCurrent:"Ce service a déposé",useNoCookie:"Ce service n’a déposé aucun cookie.",source:"Voir le site officiel",noServices:"Ce site n’utilise aucun cookie nécessitant votre consentement.",title:"Panneau de gestion des cookies",newWindow:"(nouvelle fenêtre)",allowAll:"Tout autoriser",denyAll:"Tout interdire",save:"Enregistrer",ads:{title:"Régies publicitaires (pour nous faire connaître)",details:"Les régies publicitaires permettent de générer des revenus en commercialisant les espaces publicitaires du site."},analytic:{title:"Mesure de navigation (ergonomie) et d’audience",details:"Les services de mesure d’audience permettent de générer des statistiques de fréquentation utiles à l’amélioration du site."},social:{title:"Réseaux sociaux (boutons de partage et Twitter cards)",details:"Les réseaux sociaux permettent d’améliorer la convivialité du site et aident à sa promotion via les partages."},video:{title:"Vidéos",details:"Les services de partage de vidéo permettent d’enrichir le site de contenu multimédia et augmentent sa visibilité."},comment:{title:"Commentaires",details:"Les gestionnaires de commentaires facilitent le dépôt de vos commentaires et luttent contre le spam."},support:{title:"Support",details:"Les services de support vous permettent d’entrer en contact avec l’équipe du site et d’aider à son amélioration."},api:{title:"Services",details:"Les APIs permettent de charger des scripts : géolocalisation, moteurs de recherche, traductions, ..."},other:{title:"Autre",details:"Services visant à afficher du contenu web."},mandatoryTitle:"Cookies obligatoires",mandatoryText:"Ce site utilise des cookies nécessaires à son bon fonctionnement qui ne peuvent pas être désactivés."};const k={};let C=null;function _({cookieName:e,timeExpire:t,preferLocalStorage:i}){return null===C&&(C=i?g(t):new u(t),C.type===r.localStorage&&void 0!==c.get(e)&&(C.setItem(e,c.get(e)),c.remove(e))),C}function L(e){return _(e).getItem(e.cookieName)??""}function j(e,t,i){const o=_(i),n=new RegExp("!"+e+"=(wait|true|false)","g"),a=L(i).replace(n,"")+"!"+e+"="+t;o.setItem(i.cookieName,a)}function T(e,t,i){const o=t.cookies,n=o.length;let a=0,s="";const r=document.cookie.indexOf(e+"=true");if(r>=0&&0===n)s+=i.useNoCookie;else if(r>=0){for(let e=0;e<n;e+=1)-1!==document.cookie.indexOf(o[e]+"=")&&(a+=1,void 0===k[o[e]]&&(k[o[e]]=[]),-1===k[o[e]].indexOf(t.name)&&k[o[e]].push(t.name));a>0?(s+=i.useCookieCurrent+" "+a+" cookie",a>1&&(s+="s"),s+="."):s+=i.useNoCookie}else 0===n?s=i.noCookie:(s+=i.useCookie+" "+n+" cookie",n>1&&(s+="s"),s+=".");const c=document.getElementById("tacCL"+e);null!==c&&(c.innerHTML=s)}function x(e){document.location.hash===e.parameters.hashtag&&(window.history?window.history.replaceState("",document.title,window.location.pathname+window.location.search):document.location.hash=""),i("tarteaucitron","display","none");for(const e of document.getElementsByClassName("tarteaucitron-info-box"))e.style.display="none";!0===e.reloadThePage?window.location.reload():i("tarteaucitron-back","display","none"),document.getElementById("tarteaucitron-close-alert")?.focus(),document.getElementsByTagName("body")[0].classList.remove("modal-open"),a(window,"tac.close_panel")}function I(e,t,s){const r=document.getElementById(e+"Switch"),l=document.getElementById(e+"Allowed"),d=document.getElementById(e+"Denied");r.classList.remove("switch-denied"),r.classList.remove("switch-allowed"),l.classList.remove("active"),d.classList.remove("active"),!0===t?(r.classList.add("switch-allowed"),r.children[0].innerHTML="&#10003;",l.classList.add("active")):(r.classList.add("switch-denied"),r.children[0].innerHTML="&#10007;",d.classList.add("active"));let u=!1,p=0,g=0;for(let e=0;e<s.job.length;e++){const t=s.job[e],i=s.state[t];void 0!==i?!0===i?p+=1:g+=1:!0!==s.services[t].lazyConsent&&(u=!0)}u||(i("tarteaucitron-percentage","display","none"),i("tarteaucitron-alert-big","display","none"),n("tarteaucitron-root","tarteaucitron-before-visible"),a(window,"tac.close_alert")),p===s.job.length?(n("tarteaucitron-all-denied","tarteaucitron-is-selected"),o("tarteaucitron-all-allowed","tarteaucitron-is-selected")):g===s.job.length&&(n("tarteaucitron-all-allowed","tarteaucitron-is-selected"),o("tarteaucitron-all-denied","tarteaucitron-is-selected"));const m=s.services[e].cookies;if(m.length>0&&!1===t&&function(e){for(let t=0;t<e.length;t+=1)c.remove(e[t]),c.remove(e[t],{path:"/"}),c.remove(e[t],{path:"/",domain:"."+location.hostname}),c.remove(e[t],{path:"/",domain:"."+location.hostname.split(".").slice(-2).join(".")})}(m),!0===t){const t=document.getElementById("tacCL"+e);null!==t&&(t.innerHTML="..."),setTimeout((function(){T(e,s.services[e],s.lang)}),2500)}else T(e,s.services[e],s.lang)}function P(e){i("tarteaucitron","display","block"),i("tarteaucitron-back","display","block"),document.getElementById("tarteaucitron-close-panel").focus(),document.getElementsByTagName("body")[0].classList.add("modal-open");for(let t=0;t<e.job.length;t++)void 0!==e.state[e.job[t]]&&I(e.job[t],e.state[e.job[t]],e);a(window,"tac.open_panel")}const S=new class{user;lang;services;added;state;launch;parameters;reloadThePage;alreadyLaunch;languagesLoader;servicesLoader;job;constructor(){this.user={},this.services={},this.added={},this.state={},this.launch={},this.reloadThePage=!1,this.alreadyLaunch=0}withLanguages(e){this.languagesLoader=e}withServices(e){this.servicesLoader=e}init(e={}){this.parameters=Object.assign({},structuredClone(y),structuredClone(e)),0===this.alreadyLaunch&&(this.alreadyLaunch=1,window.addEventListener("keydown",(e=>function(e,t){"Escape"===t.code&&x(e)}(this,e)),!1),window.addEventListener("hashchange",(()=>{return e=this,void(document.location.hash===e.parameters.hashtag&&P(e));var e}),!1),"complete"===window.document.readyState?this.load():window.addEventListener("load",(()=>this.load()),!1))}load(){if("function"!=typeof this.languagesLoader)throw new Error("Missing languages loader !");if("function"!=typeof this.servicesLoader)throw new Error("Missing services loader !");const e=function(e){if(!navigator)return e.en;const t=navigator.language||null,i=t?t.substring(0,2):null;return null===i||void 0===e[i]?e.en:e[i]}(this.languagesLoader());if(void 0===e)throw new Error("Missing english translation !");this.lang=e,this.services=this.servicesLoader(this.user),delete this.languagesLoader,delete this.servicesLoader;const t=document.body,i=document.createElement("div");let o,n,s="",r=["ads","analytic","api","comment","social","support","video","other"];for(r=r.sort(((e,t)=>this.lang[e].title>this.lang[t].title?1:this.lang[e].title<this.lang[t].title?-1:0)),s+='<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="'+this.lang.close+'"></button>',s+='<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">',s+=' <button type="button" id="tarteaucitron-close-panel" onclick="GDPRConsent.closePanel();">X</button>',s+=' <div id="tarteaucitron-services">',s+=' <div id="tarteaucitron-services-top">',s+=' <span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">'+this.lang.title+"</span>",s+=' <div id="tarteaucitron-info">',s+=" "+this.lang.disclaimer,this.parameters.websiteName&&(s+=" "+this.lang.disclaimerWebsite+" "+f(this.parameters.websiteName)+"."),s+=" </div>",s+=' <div class="tarteaucitron-line">',s+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+this.lang.all+"</span>",s+=' <div class="tarteaucitron-ask">',s+=' <button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true, true);">',s+=" &#10003; "+this.lang.allowAll,s+=" </button> ",s+=' <button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false, true);">',s+=" &#10007; "+this.lang.denyAll,s+=" </button>",s+=" </div>",s+=" </div>",s+=" </div>",s+=' <div id="tarteaucitron-services-list">',s+=' <div class="clear"></div>',!0===this.parameters.mandatory&&(s+='<div class="tarteaucitron-cookie-group">',s+=' <div class="tarteaucitron-cookie-text">',s+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+this.lang.mandatoryTitle+"</span>",s+=' <span class="tarteaucitron-description">'+this.lang.mandatoryText+"</span>",s+=" </div>",s+=' <div class="tarteaucitron-cookie-buttons">',s+=' <button type="button" class="tarteaucitron-allow solo">',s+=" &#10003; "+this.lang.allow,s+=" </button> ",s+=" </div>",s+="</div>"),n=0;n<r.length;n+=1)s+=' <li id="tarteaucitron-services-title_'+r[n]+'" class="tarteaucitron-hidden">',s+=' <div class="tarteaucitron-title">',s+=' <button type="button" onclick="GDPRConsent.toggle(\'tarteaucitron-details'+r[n]+"', 'tarteaucitron-info-box');return false\">&#10011; "+this.lang[r[n]].title+"</button>",s+=" </div>",s+=' <div id="tarteaucitron-details'+r[n]+'" class="tarteaucitron-details tarteaucitron-info-box">',s+=" "+this.lang[r[n]].details,s+=" </div>",s+=' <ul id="tarteaucitron-services_'+r[n]+'"></ul></li>';if(s+=' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">'+this.lang.noServices+"</li>",s+=" </ul>",s+=' <div id="tarteaucitron-services-bottom">',s+=' <button type="button" id="tarteaucitron-save-responses" onclick="GDPRConsent.closePanel();">'+this.lang.save+"</button>",s+=" </div>",s+=" </div>",s+=" </div>",s+="</div>",this.parameters.acceptAllCta?(s+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==this.parameters.siteDisclaimerTitle&&""!==this.parameters.siteDisclaimerMessage&&(s+='<div id="tarteaucitron-wrapper">',s+=' <div id="tarteaucitron-disclaimer-texte">',s+=' <span id="tarteaucitron-site-disclaimer-title">',s+=" "+this.parameters.siteDisclaimerTitle,s+=" </span>",s+=' <span id="tarteaucitron-site-disclaimer-message">',s+=" "+this.parameters.siteDisclaimerMessage+"<br />",s+=" </span>"),s+=' <span id="tarteaucitron-disclaimer-alert">',s+=" "+this.lang.alertBigPrivacy,s+=" </span>",s+=" </div>",s+=' <div id="tarteaucitron-disclaimer-buttons">',s+=' <button type="button" id="tarteaucitron-continue" onclick="GDPRConsent.respondAll(false);">',s+=" &rarr; "+this.lang.continue,s+=" </button>",s+=' <div id="tarteaucitron-group-buttons">',s+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">',s+=" &#10003; "+this.lang.acceptAll,s+=" </button>",s+=' <button type="button" id="tarteaucitron-close-alert" onclick="GDPRConsent.openPanel();">',s+=" "+this.lang.personalize,s+=" </button>",s+=" </div>",s+=" </div>",s+=" </div>",s+="</div>"):(s+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==this.parameters.siteDisclaimerTitle&&""!==this.parameters.siteDisclaimerMessage&&(s+='<div id="tarteaucitron-wrapper">',s+=' <div id="tarteaucitron-disclaimer-texte">',s+=' <span id="tarteaucitron-site-disclaimer-title">',s+=" "+this.parameters.siteDisclaimerTitle,s+=" </span>",s+=' <span id="tarteaucitron-site-disclaimer-message">',s+=" "+this.parameters.siteDisclaimerMessage+"<br />",s+=" </span>"),s+=' <span id="tarteaucitron-disclaimer-alert">',s+=" "+this.lang.alertBigPrivacy,s+=" </span>",s+=" </div>",s+=' <div id="tarteaucitron-disclaimer-buttons">',s+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.openPanel();">',s+=" "+this.lang.personalize,s+=" </button>",s+=" </div>",s+=" </div>",s+="</div>"),i.id="tarteaucitron-root",t.appendChild(i),i.innerHTML=s,a(window,"tac.root_available"),void 0!==this.job)for(this.job=this.cleanArray(this.job),o=0;o<this.job.length;o+=1)this.addService(this.job[o]);else this.job=[];this.job.push=e=>(-1===this.job.indexOf(e)&&Array.prototype.push.call(this.job,e),this.launch[e]=!1,this.addService(e),this.job.length),document.location.hash===this.parameters.hashtag&&P(this)}addService(e){const t=this.services[e],n=L(this.parameters),s=n.indexOf(t.key+"=false")>=0,r=n.indexOf(t.key+"=true")>=0||!t.needConsent&&n.indexOf(t.key+"=false")<0,c=n.indexOf(t.key+"=false")>=0||n.indexOf(t.key+"=true")>=0;let l="";if(!0!==this.added[t.key]){this.added[t.key]=!0,l+='<div id="'+t.key+'-line" class="tarteaucitron-cookie-group">',l+=' <div class="tarteaucitron-cookie-text">',l+=' <span class="tarteaucitron-h3" role="heading" aria-level="3">'+t.name+"</span>",l+=' <span id="tacCL'+t.key+'" class="tarteaucitron-description"></span>',!0===this.parameters.moreInfoLink&&(l+=' <a href="'+t.uri+'" target="_blank" rel="noreferrer noopener" title="'+t.name+" "+this.lang.newWindow+'">',l+=" "+this.lang.source,l+=" </a>"),l+=" </div>",l+=' <div class="tarteaucitron-cookie-buttons">',l+=' <span id="'+t.key+'Allowed" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+this.lang.allow+"</span>",l+=' <div class="tarteaucitron-switch" id="'+t.key+'Switch" onclick="GDPRConsent.respond(this, event);">',l+=' <button type="button" class="tarteaucitron-switch-button"></button>',l+=" </div> ",l+=' <span id="'+t.key+'Denied" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+this.lang.deny+"</span>",l+=" </div>",l+="</li>",i("tarteaucitron-services-title_"+t.type,"display","block");const e=document.getElementById("tarteaucitron-services_"+t.type);null!==e&&(e.innerHTML+=l),i("tarteaucitron-no-services-title","display","none"),function(e,t){const i=document.getElementById("tarteaucitron-services_"+e);if(null===i)return;const o=[...i.children];o.sort(((e,i)=>t.services[e.id.replace(/-line/g,"")].name>t.services[i.id.replace(/-line/g,"")].name?1:t.services[e.id.replace(/-line/g,"")].name<t.services[i.id.replace(/-line/g,"")].name?-1:0));for(const e of o)i.appendChild(e)}(t.type,this)}r?(!0!==this.launch[t.key]&&(this.launch[t.key]=!0,t.js(),a(window,t.key+"_loaded")),this.state[t.key]=!0):s?("function"==typeof t.fallback&&t.fallback(),this.state[t.key]=!1):c||(j(t.key,"wait",this.parameters),"function"==typeof t.fallback&&t.fallback(),!0!==t.lazyConsent&&(i("tarteaucitron-percentage","display","block"),i("tarteaucitron-alert-big","display","block"),o("tarteaucitron-root","tarteaucitron-before-visible"),a(window,"tac.open_alert"))),T(t.key,t,this.lang),a(window,t.key+"_added")}cleanArray(e){const t=this.services,i=e.length;let o=[];const n={};for(let a=0;a<i;a+=1)n[e[a]]||(n[e[a]]=!0,void 0!==t[e[a]]&&o.push(e[a]));return o=o.sort((function(e,i){return t[e].type+t[e].key>t[i].type+t[i].key?1:t[e].type+t[e].key<t[i].type+t[i].key?-1:0})),o}closePanel(){x(this)}openPanel(){P(this)}respondEffect(e,t){I(e,t,this)}respondAll(e,t){!function(e,t,i,o=!1){const n=t.services;for(let o=0;o<t.job.length;o+=1){const a=n[t.job[o]].key;t.state[a]!==e&&(!1===e&&!0===t.launch[a]&&(t.reloadThePage=!0),!0!==t.launch[a]&&!0===e&&(t.launch[a]=!0,t.services[a].js()),t.state[a]=e,j(a,e,i),I(a,e,t))}o&&x(t)}(e,this,this.parameters,t)}respond(e,t){!function(e,t,i,o){const n=e.id.replace(/(Eng[0-9]+|Allow|Deni)ed|Switch/g,""),s=e.getBoundingClientRect(),r=o.clientX;let c;if(e.classList.contains("tarteaucitron-switch"))c=void 0!==t.state[n]?!!e.classList.contains("switch-denied"):r<s.left+e.clientWidth/2;else if(e.classList.contains("tarteaucitron-switch-state"))if(e.id.includes("Allowed")&&!0!==t.state[n])c=!0;else{if(!e.id.includes("Denied")||!1===t.state[n])return;c=!1}!0===c&&!0!==t.launch[n]&&(t.launch[n]=!0,a(window,n+"_loaded"),t.services[n].js()),!1===c&&!0===t.launch[n]&&(t.reloadThePage=!0),t.state[n]=c,j(n,c,i),I(n,c,t)}(e,this,this.parameters,t)}activate(e){!function(e,t,i){!0!==t.launch[e]&&(t.launch[e]=!0,a(window,e+"_loaded"),t.services[e].js(),t.state[e]=!0,j(e,!0,i),I(e,!0,t))}(e,this,this.parameters)}isActivated(e){return function(e,t){return!0===t.state[e]}(e,this)}toggle(e,t){!function(e,t){const i=document.getElementById(e);if(null!==i){if(void 0!==t)for(const i of document.getElementsByClassName(t))i.id!==e&&(i.style.display="none");"block"!==i.style.display?i.style.display="block":i.style.display="none"}}(e,t)}};function E(e,t,i){const o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=e;for(const e in t){const i=t[e];void 0!==i&&o.setAttribute(e,i)}if("function"==typeof i){let e=!1;o.onload=function(){!1===e&&(e=!0,i())}}document.getElementsByTagName("head")[0].appendChild(o)}const A=()=>({key:"facebook",type:"social",name:"Facebook",uri:"https://www.facebook.com/privacy/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:["xs","sb","fr","datr","dpr","c_user"],js:function(){E("//connect.facebook.net/"+function(){if(!navigator)return"en_US";const e=navigator.language||null;return"fr"===(e?e.substring(0,2):null)?"fr_FR":"en_US"}()+"/sdk.js",{id:"facebook-jssdk"})}}),D=e=>({key:"facebookpixel",type:"ads",name:"Facebook Pixel",uri:"https://www.facebook.com/privacy/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:["datr","fr","reg_ext_ref","reg_fb_gate","reg_fb_ref","sb","wd","x-src","_fbp"],js:function(){if(window.fbq)return;const t=window.fbq=function(){t.callMethod?t.callMethod.apply(t,arguments):t.queue.push(arguments)};window._fbq||(window._fbq=t),t.push=t,t.loaded=!0,t.version="2.0",t.queue=[],E("https://connect.facebook.net/en_US/fbevents.js",{id:"facebook-fbevents"},(function(){window.fbq("init",e.fbPixelId),window.fbq("track","PageView"),"function"==typeof e.facebookpixelMore&&e.facebookpixelMore()}))}}),B=e=>{const t=e.googleanalyticsUa;let i="_gat_gtag_"+t,o="_ga_"+t;return i=i.replace(/-/g,"_"),o=o.replace(/G-/g,""),{key:"googleanalytics",type:"analytic",name:"Google Analytics (GA4)",uri:"https://policies.google.com/privacy",needConsent:!0,lazyConsent:!1,cookies:["_ga","_gat","_gid","__utma","__utmb","__utmc","__utmt","__utmz",i,o,"_gcl_au"],js:function(){window.dataLayer=window.dataLayer||[],E("https://www.googletagmanager.com/gtag/js?id="+e.googleanalyticsUa,{},(function(){window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),e.googleanalyticsInitOptions?window.gtag("config",e.googleanalyticsUa,e.googleanalyticsInitOptions):window.gtag("config",e.googleanalyticsUa),"function"==typeof e.googleanalyticsMore&&e.googleanalyticsMore()}))}}},R=e=>({key:"googletagmanager",type:"api",name:"Google Tag Manager",uri:"https://policies.google.com/privacy",needConsent:!0,lazyConsent:!1,cookies:["_ga","_gat","__utma","__utmb","__utmc","__utmt","__utmz","__gads","_drt_","FLC","exchange_uid","id","fc","rrs","rds","rv","uid","UIDR","UID","clid","ipinfo","acs"],js:function(){void 0!==e.googletagmanagerId&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),E("https://www.googletagmanager.com/gtm.js?id="+e.googletagmanagerId))}}),z=e=>({key:"subscribewithgoogle",type:"other",name:"Subscribe with Google",uri:"https://policies.google.com/technologies/cookies#types-of-cookies",needConsent:!0,lazyConsent:!0,cookies:[],js:function(){"function"==typeof e.subscribewithgoogleMore?E("https://news.google.com/swg/js/v1/swg.js",{"subscriptions-control":"manual"},(function(){e.subscribewithgoogleMore()})):E("https://news.google.com/swg/js/v1/swg.js")}});S.withLanguages((function(){return{fr:b,en:w}})),S.withServices((function(e){return{facebook:A(),facebookpixel:D(e),googletagmanager:R(e),googleanalytics:B(e),signinwithapple:{key:"signinwithapple",type:"other",name:"Sign In with Apple",uri:"https://www.apple.com/legal/privacy/en-ww/cookies/",needConsent:!0,lazyConsent:!0,cookies:[],js:function(){E("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")}},signinwithgoogle:{key:"signinwithgoogle",type:"other",name:"Sign In with Google",uri:"https://policies.google.com/technologies/cookies#types-of-cookies",needConsent:!0,lazyConsent:!0,cookies:[],js:function(){E("https://accounts.google.com/gsi/client")}},subscribewithgoogle:z(e),twitter:{key:"twitter",type:"social",name:"X (formerly Twitter)",uri:"https://support.twitter.com/articles/20170514",needConsent:!0,lazyConsent:!1,cookies:[],js:function(){E("//platform.twitter.com/widgets.js",{id:"twitter-wjs"})}},vimeo:{key:"vimeo",type:"video",name:"Vimeo",uri:"https://vimeo.com/privacy",needConsent:!0,lazyConsent:!0,cookies:["__utmt_player","__utma","__utmb","__utmc","__utmv","vuid","__utmz","player"],js:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-vimeo")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<iframe src="'+f(i)+'" frameborder="0" allowfullscreen="true"></iframe>'}},fallback:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-vimeo")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<div class="tarteaucitron-card-mask"><span>Le dépôt de cookies pour <span class="tarteaucitron-card-type">Vimeo</span> est désactivé. Si vous souhaitez accéder à ce contenu, merci de l\'activer.</span><button onclick="GDPRConsent.activate(\'vimeo\')">Autoriser</button><a href="'+f(i)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+f(i)+"</a></div>"}}},youtube:{key:"youtube",type:"video",name:"YouTube",uri:"https://policies.google.com/privacy",needConsent:!0,lazyConsent:!0,cookies:["VISITOR_INFO1_LIVE","YSC","PREF","GEUP"],js:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-youtube")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<iframe src="'+f(i)+'" frameborder="0" allowfullscreen="true"></iframe>'}},fallback:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-youtube")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<div class="tarteaucitron-card-mask"><span>Le dépôt de cookies pour <span class="tarteaucitron-card-type">Youtube</span> est désactivé. Si vous souhaitez accéder à ce contenu, merci de l\'activer.</span><button onclick="GDPRConsent.activate(\'youtube\')">Autoriser</button><a href="'+f(i)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+f(i)+"</a></div>"}}}}}));var M=S;return t=t.default}()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GDPRConsent=t():e.GDPRConsent=t()}(self,(function(){return function(){"use strict";var e={d:function(t,i){for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};function i(e,t,i=null){const o=document.getElementById(e);if(null!==o)if("string"!=typeof t)for(const[e,i]of Object.entries(t))null!==i?o.style.setProperty(e,i):o.style.removeProperty(e);else null!==i?o.style.setProperty(t,i):o.style.removeProperty(t)}function o(e,t){const i=document.getElementById(e);null!==i&&("string"==typeof t?i.classList.add(t):i.classList.add(...t))}function a(e,t){const i=document.getElementById(e);null!==i&&("string"==typeof t?i.classList.remove(t):i.classList.remove(...t))}e.d(t,{default:function(){return G}});function n(e,t,i){e.dispatchEvent("string"==typeof t?new CustomEvent(t,{detail:i}):t)}function s(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)e[o]=i[o]}return e}var r,c=function e(t,i){function o(e,o,a){if("undefined"!=typeof document){"number"==typeof(a=s({},i,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var n="";for(var r in a)a[r]&&(n+="; "+r,!0!==a[r]&&(n+="="+a[r].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+n}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var i=document.cookie?document.cookie.split("; "):[],o={},a=0;a<i.length;a++){var n=i[a].split("="),s=n.slice(1).join("=");try{var r=decodeURIComponent(n[0]);if(o[r]=t.read(s,r),e===r)break}catch(e){}}return e?o[e]:o}},remove:function(e,t){o(e,"",s({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,s({},this.attributes,t))},withConverter:function(t){return e(s({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});!function(e){e[e.localStorage=1]="localStorage",e[e.cookies=2]="cookies"}(r||(r={}));class l{type;constructor(e){this.type=e}}class d extends l{constructor(){super(r.localStorage)}getItem(e){const t=window.localStorage.getItem(e);return null===t?void 0:t}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}}class u extends l{expires;constructor(e){super(r.cookies),this.expires=e}getItem(e){return c.get(e)}setItem(e,t){c.set(e,t,{expires:this.expires})}removeItem(e){c.remove(e)}}let p=null;function g(e=365){return null===p&&(p=function(){const e="localStorageTest";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}()?new d:new u(e)),p}const m=/[&<>"']/g,h=RegExp(m.source),v=Object.freeze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function f(e){return h.test(e)?e.replace(m,(e=>v[e])):e}const y={hashtag:"#tarteaucitron",cookieName:"tarteaucitron",timeExpire:31536e6,acceptAllCta:!0,moreInfoLink:!0,mandatory:!0,preferLocalStorage:!1,websiteName:window.location.hostname,siteDisclaimerTitle:"",siteDisclaimerMessage:""},w={alertBigScroll:"By continuing to scroll,",alertBigClick:"If you continue to browse this website,",alertBig:"you are allowing all third-party services",alertBigPrivacy:"This site uses cookies and gives you control over what you want to activate",personalize:"Personalize",acceptAll:"OK, accept all",continue:"Reject cookies & keep on browsing",close:"Close",all:"Preference for all services",disclaimer:"By allowing these third party services, you accept their cookies and the use of tracking technologies necessary for their proper functioning.",disclaimerWebsite:"These services help us improve",allow:"Allow",deny:"Deny",noCookie:"This service does not use cookie.",useCookie:"This service can install",useCookieCurrent:"This service has installed",useNoCookie:"This service has not installed any cookie.",source:"View the official website",noServices:"This website does not use any cookie requiring your consent.",title:"Cookies management panel",newWindow:"(new window)",allowAll:"Allow all cookies",denyAll:"Deny all cookies",save:"Save",ads:{title:"Advertising network (to let us know)",details:"Ad networks can generate revenue by selling advertising space on the site."},analytic:{title:"Navigation (ergonomics) and audience measurement",details:"The audience measurement services used to generate useful statistics attendance to improve the site."},social:{title:"Social networks (sharing buttons and Twitter cards)",details:"Social networks can improve the usability of the site and help to promote it via the shares."},video:{title:"Videos",details:"Video sharing services help to add rich media on the site and increase its visibility."},comment:{title:"Comments",details:"Comments managers facilitate the filing of comments and fight against spam."},support:{title:"Support",details:"Support services allow you to get in touch with the site team and help to improve it."},api:{title:"Services",details:"APIs are used to load scripts: geolocation, search engines, translations, ..."},other:{title:"Other",details:"Services to display web content."},mandatoryTitle:"Mandatory cookies",mandatoryText:"This site uses cookies necessary for its proper functioning which cannot be deactivated."},b={alertBigScroll:"En continuant de défiler,",alertBigClick:"En poursuivant votre navigation,",alertBig:"vous acceptez l’utilisation de services tiers pouvant installer des cookies",alertBigPrivacy:"Ce site utilise des cookies et vous donne le contrôle sur ce que vous souhaitez activer",personalize:"Personnaliser",acceptAll:"Tout autoriser",continue:"Continuer sans accepter",close:"Fermer",all:"Préférences pour tous les services",disclaimer:"En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l’utilisation de technologies de suivi nécessaires à leur bon fonctionnement.",disclaimerWebsite:"Ces services nous aident à améliorer",allow:"Autoriser",deny:"Interdire",noCookie:"Ce service ne dépose aucun cookie.",useCookie:"Ce service peut déposer",useCookieCurrent:"Ce service a déposé",useNoCookie:"Ce service n’a déposé aucun cookie.",source:"Voir le site officiel",noServices:"Ce site n’utilise aucun cookie nécessitant votre consentement.",title:"Panneau de gestion des cookies",newWindow:"(nouvelle fenêtre)",allowAll:"Tout autoriser",denyAll:"Tout interdire",save:"Enregistrer",ads:{title:"Régies publicitaires (pour nous faire connaître)",details:"Les régies publicitaires permettent de générer des revenus en commercialisant les espaces publicitaires du site."},analytic:{title:"Mesure de navigation (ergonomie) et d’audience",details:"Les services de mesure d’audience permettent de générer des statistiques de fréquentation utiles à l’amélioration du site."},social:{title:"Réseaux sociaux (boutons de partage et Twitter cards)",details:"Les réseaux sociaux permettent d’améliorer la convivialité du site et aident à sa promotion via les partages."},video:{title:"Vidéos",details:"Les services de partage de vidéo permettent d’enrichir le site de contenu multimédia et augmentent sa visibilité."},comment:{title:"Commentaires",details:"Les gestionnaires de commentaires facilitent le dépôt de vos commentaires et luttent contre le spam."},support:{title:"Support",details:"Les services de support vous permettent d’entrer en contact avec l’équipe du site et d’aider à son amélioration."},api:{title:"Services",details:"Les APIs permettent de charger des scripts : géolocalisation, moteurs de recherche, traductions, ..."},other:{title:"Autre",details:"Services visant à afficher du contenu web."},mandatoryTitle:"Cookies obligatoires",mandatoryText:"Ce site utilise des cookies nécessaires à son bon fonctionnement qui ne peuvent pas être désactivés."};const k={};let C=null;function _({cookieName:e,timeExpire:t,preferLocalStorage:i}){return null===C&&(C=i?g(t):new u(t),C.type===r.localStorage&&void 0!==c.get(e)&&(C.setItem(e,c.get(e)),c.remove(e))),C}function L(e){return _(e).getItem(e.cookieName)??""}function j(e,t,i){const o=_(i),a=new RegExp("!"+e+"=(wait|true|false)","g"),n=L(i).replace(a,"")+"!"+e+"="+t;o.setItem(i.cookieName,n)}function T(e,t,i){const o=t.cookies,a=o.length;let n=0,s="";const r=document.cookie.indexOf(e+"=true");if(r>=0&&0===a)s+=i.useNoCookie;else if(r>=0){for(let e=0;e<a;e+=1)-1!==document.cookie.indexOf(o[e]+"=")&&(n+=1,void 0===k[o[e]]&&(k[o[e]]=[]),-1===k[o[e]].indexOf(t.name)&&k[o[e]].push(t.name));n>0?(s+=i.useCookieCurrent+" "+n+" cookie",n>1&&(s+="s"),s+="."):s+=i.useNoCookie}else 0===a?s=i.noCookie:(s+=i.useCookie+" "+a+" cookie",a>1&&(s+="s"),s+=".");const c=document.getElementById("tacCL"+e);null!==c&&(c.innerHTML=s)}function x(e){document.location.hash===e.parameters.hashtag&&(window.history?window.history.replaceState("",document.title,window.location.pathname+window.location.search):document.location.hash=""),i("tarteaucitron","display","none");for(const e of document.getElementsByClassName("tarteaucitron-info-box"))e.style.display="none";!0===e.reloadThePage?window.location.reload():i("tarteaucitron-back","display","none"),document.getElementById("tarteaucitron-close-alert")?.focus(),document.getElementsByTagName("body")[0].classList.remove("modal-open"),n(window,"tac.close_panel")}function I(e,t,s){const r=document.getElementById(e+"Switch"),l=document.getElementById(e+"Allowed"),d=document.getElementById(e+"Denied");r.classList.remove("switch-denied"),r.classList.remove("switch-allowed"),l.classList.remove("active"),d.classList.remove("active"),!0===t?(r.classList.add("switch-allowed"),r.children[0].innerHTML="&#10003;",l.classList.add("active")):(r.classList.add("switch-denied"),r.children[0].innerHTML="&#10007;",d.classList.add("active"));let u=!1,p=0,g=0;for(let e=0;e<s.job.length;e++){const t=s.job[e],i=s.state[t];void 0!==i?!0===i?p+=1:g+=1:!0!==s.services[t].lazyConsent&&(u=!0)}u||(i("tarteaucitron-percentage","display","none"),i("tarteaucitron-alert-big","display","none"),a("tarteaucitron-root","tarteaucitron-before-visible"),n(window,"tac.close_alert")),p===s.job.length?(a("tarteaucitron-all-denied","tarteaucitron-is-selected"),o("tarteaucitron-all-allowed","tarteaucitron-is-selected")):g===s.job.length&&(a("tarteaucitron-all-allowed","tarteaucitron-is-selected"),o("tarteaucitron-all-denied","tarteaucitron-is-selected"));const m=s.services[e].cookies;if(m.length>0&&!1===t&&function(e){for(let t=0;t<e.length;t+=1)c.remove(e[t]),c.remove(e[t],{path:"/"}),c.remove(e[t],{path:"/",domain:"."+location.hostname}),c.remove(e[t],{path:"/",domain:"."+location.hostname.split(".").slice(-2).join(".")})}(m),!0===t){const t=document.getElementById("tacCL"+e);null!==t&&(t.innerHTML="..."),setTimeout((function(){T(e,s.services[e],s.lang)}),2500)}else T(e,s.services[e],s.lang)}function P(e){i("tarteaucitron","display","block"),i("tarteaucitron-back","display","block"),document.getElementById("tarteaucitron-close-panel").focus(),document.getElementsByTagName("body")[0].classList.add("modal-open");for(let t=0;t<e.job.length;t++)void 0!==e.state[e.job[t]]&&I(e.job[t],e.state[e.job[t]],e);n(window,"tac.open_panel")}const S=new class{user;lang;services;added;state;launch;parameters;reloadThePage;alreadyLaunch;languagesLoader;servicesLoader;job;constructor(){this.user={},this.services={},this.added={},this.state={},this.launch={},this.reloadThePage=!1,this.alreadyLaunch=0}withLanguages(e){this.languagesLoader=e}withServices(e){this.servicesLoader=e}init(e={}){this.parameters=Object.assign({},structuredClone(y),structuredClone(e)),0===this.alreadyLaunch&&(this.alreadyLaunch=1,window.addEventListener("keydown",(e=>function(e,t){"Escape"===t.code&&x(e)}(this,e)),!1),window.addEventListener("hashchange",(()=>{return e=this,void(document.location.hash===e.parameters.hashtag&&P(e));var e}),!1),"complete"===window.document.readyState?this.load():window.addEventListener("load",(()=>this.load()),!1))}load(){if("function"!=typeof this.languagesLoader)throw new Error("Missing languages loader !");if("function"!=typeof this.servicesLoader)throw new Error("Missing services loader !");const e=function(e){if(!navigator)return e.en;const t=navigator.language||null,i=t?t.substring(0,2):null;return null===i||void 0===e[i]?e.en:e[i]}(this.languagesLoader());if(void 0===e)throw new Error("Missing english translation !");this.lang=e,this.services=this.servicesLoader(this.user),delete this.languagesLoader,delete this.servicesLoader;const t=document.body,i=document.createElement("div");let o,a,s="",r=["ads","analytic","api","comment","social","support","video","other"];for(r=r.sort(((e,t)=>this.lang[e].title>this.lang[t].title?1:this.lang[e].title<this.lang[t].title?-1:0)),s+='<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="'+this.lang.close+'"></button>',s+='<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">',s+=' <button type="button" id="tarteaucitron-close-panel" onclick="GDPRConsent.closePanel();">X</button>',s+=' <div id="tarteaucitron-services">',s+=' <div id="tarteaucitron-services-top">',s+=' <span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">'+this.lang.title+"</span>",s+=' <div id="tarteaucitron-info">',s+=" "+this.lang.disclaimer,this.parameters.websiteName&&(s+=" "+this.lang.disclaimerWebsite+" "+f(this.parameters.websiteName)+"."),s+=" </div>",s+=' <div class="tarteaucitron-line">',s+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+this.lang.all+"</span>",s+=' <div class="tarteaucitron-ask">',s+=' <button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true, true);">',s+=" &#10003; "+this.lang.allowAll,s+=" </button> ",s+=' <button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false, true);">',s+=" &#10007; "+this.lang.denyAll,s+=" </button>",s+=" </div>",s+=" </div>",s+=" </div>",s+=' <div id="tarteaucitron-services-list">',s+=' <div class="clear"></div>',!0===this.parameters.mandatory&&(s+='<div class="tarteaucitron-cookie-group">',s+=' <div class="tarteaucitron-cookie-text">',s+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+this.lang.mandatoryTitle+"</span>",s+=' <span class="tarteaucitron-description">'+this.lang.mandatoryText+"</span>",s+=" </div>",s+=' <div class="tarteaucitron-cookie-buttons">',s+=' <button type="button" class="tarteaucitron-allow solo">',s+=" &#10003; "+this.lang.allow,s+=" </button> ",s+=" </div>",s+="</div>"),a=0;a<r.length;a+=1)s+=' <li id="tarteaucitron-services-title_'+r[a]+'" class="tarteaucitron-hidden">',s+=' <div class="tarteaucitron-title">',s+=' <button type="button" onclick="GDPRConsent.toggle(\'tarteaucitron-details'+r[a]+"', 'tarteaucitron-info-box');return false\">&#10011; "+this.lang[r[a]].title+"</button>",s+=" </div>",s+=' <div id="tarteaucitron-details'+r[a]+'" class="tarteaucitron-details tarteaucitron-info-box">',s+=" "+this.lang[r[a]].details,s+=" </div>",s+=' <ul id="tarteaucitron-services_'+r[a]+'"></ul></li>';if(s+=' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">'+this.lang.noServices+"</li>",s+=" </ul>",s+=' <div id="tarteaucitron-services-bottom">',s+=' <button type="button" id="tarteaucitron-save-responses" onclick="GDPRConsent.closePanel();">'+this.lang.save+"</button>",s+=" </div>",s+=" </div>",s+=" </div>",s+="</div>",this.parameters.acceptAllCta?(s+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==this.parameters.siteDisclaimerTitle&&""!==this.parameters.siteDisclaimerMessage&&(s+='<div id="tarteaucitron-wrapper">',s+=' <div id="tarteaucitron-disclaimer-texte">',s+=' <span id="tarteaucitron-site-disclaimer-title">',s+=" "+this.parameters.siteDisclaimerTitle,s+=" </span>",s+=' <span id="tarteaucitron-site-disclaimer-message">',s+=" "+this.parameters.siteDisclaimerMessage+"<br />",s+=" </span>"),s+=' <span id="tarteaucitron-disclaimer-alert">',s+=" "+this.lang.alertBigPrivacy,s+=" </span>",s+=" </div>",s+=' <div id="tarteaucitron-disclaimer-buttons">',s+=' <button type="button" id="tarteaucitron-continue" onclick="GDPRConsent.respondAll(false);">',s+=" &rarr; "+this.lang.continue,s+=" </button>",s+=' <div id="tarteaucitron-group-buttons">',s+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">',s+=" &#10003; "+this.lang.acceptAll,s+=" </button>",s+=' <button type="button" id="tarteaucitron-close-alert" onclick="GDPRConsent.openPanel();">',s+=" "+this.lang.personalize,s+=" </button>",s+=" </div>",s+=" </div>",s+=" </div>",s+="</div>"):(s+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==this.parameters.siteDisclaimerTitle&&""!==this.parameters.siteDisclaimerMessage&&(s+='<div id="tarteaucitron-wrapper">',s+=' <div id="tarteaucitron-disclaimer-texte">',s+=' <span id="tarteaucitron-site-disclaimer-title">',s+=" "+this.parameters.siteDisclaimerTitle,s+=" </span>",s+=' <span id="tarteaucitron-site-disclaimer-message">',s+=" "+this.parameters.siteDisclaimerMessage+"<br />",s+=" </span>"),s+=' <span id="tarteaucitron-disclaimer-alert">',s+=" "+this.lang.alertBigPrivacy,s+=" </span>",s+=" </div>",s+=' <div id="tarteaucitron-disclaimer-buttons">',s+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.openPanel();">',s+=" "+this.lang.personalize,s+=" </button>",s+=" </div>",s+=" </div>",s+="</div>"),i.id="tarteaucitron-root",t.appendChild(i),i.innerHTML=s,n(window,"tac.root_available"),void 0!==this.job)for(this.job=this.cleanArray(this.job),o=0;o<this.job.length;o+=1)this.addService(this.job[o]);else this.job=[];this.job.push=e=>(-1===this.job.indexOf(e)&&Array.prototype.push.call(this.job,e),this.launch[e]=!1,this.addService(e),this.job.length),document.location.hash===this.parameters.hashtag&&P(this)}addService(e){const t=this.services[e],a=L(this.parameters),s=a.indexOf(t.key+"=false")>=0,r=a.indexOf(t.key+"=true")>=0||!t.needConsent&&a.indexOf(t.key+"=false")<0,c=a.indexOf(t.key+"=false")>=0||a.indexOf(t.key+"=true")>=0;let l="";if(!0!==this.added[t.key]){this.added[t.key]=!0,l+='<div id="'+t.key+'-line" class="tarteaucitron-cookie-group">',l+=' <div class="tarteaucitron-cookie-text">',l+=' <span class="tarteaucitron-h3" role="heading" aria-level="3">'+t.name+"</span>",l+=' <span id="tacCL'+t.key+'" class="tarteaucitron-description"></span>',!0===this.parameters.moreInfoLink&&(l+=' <a href="'+t.uri+'" target="_blank" rel="noreferrer noopener" title="'+t.name+" "+this.lang.newWindow+'">',l+=" "+this.lang.source,l+=" </a>"),l+=" </div>",l+=' <div class="tarteaucitron-cookie-buttons">',l+=' <span id="'+t.key+'Allowed" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+this.lang.allow+"</span>",l+=' <div class="tarteaucitron-switch" id="'+t.key+'Switch" onclick="GDPRConsent.respond(this, event);">',l+=' <button type="button" class="tarteaucitron-switch-button"></button>',l+=" </div> ",l+=' <span id="'+t.key+'Denied" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+this.lang.deny+"</span>",l+=" </div>",l+="</li>",i("tarteaucitron-services-title_"+t.type,"display","block");const e=document.getElementById("tarteaucitron-services_"+t.type);null!==e&&(e.innerHTML+=l),i("tarteaucitron-no-services-title","display","none"),function(e,t){const i=document.getElementById("tarteaucitron-services_"+e);if(null===i)return;const o=[...i.children];o.sort(((e,i)=>t.services[e.id.replace(/-line/g,"")].name>t.services[i.id.replace(/-line/g,"")].name?1:t.services[e.id.replace(/-line/g,"")].name<t.services[i.id.replace(/-line/g,"")].name?-1:0));for(const e of o)i.appendChild(e)}(t.type,this)}r?(!0!==this.launch[t.key]&&(this.launch[t.key]=!0,t.js(),n(window,t.key+"_loaded")),this.state[t.key]=!0):s?("function"==typeof t.fallback&&t.fallback(),this.state[t.key]=!1):c||(j(t.key,"wait",this.parameters),"function"==typeof t.fallback&&t.fallback(),!0!==t.lazyConsent&&(i("tarteaucitron-percentage","display","block"),i("tarteaucitron-alert-big","display","block"),o("tarteaucitron-root","tarteaucitron-before-visible"),n(window,"tac.open_alert"))),T(t.key,t,this.lang),n(window,t.key+"_added")}cleanArray(e){const t=this.services,i=e.length;let o=[];const a={};for(let n=0;n<i;n+=1)a[e[n]]||(a[e[n]]=!0,void 0!==t[e[n]]&&o.push(e[n]));return o=o.sort((function(e,i){return t[e].type+t[e].key>t[i].type+t[i].key?1:t[e].type+t[e].key<t[i].type+t[i].key?-1:0})),o}closePanel(){x(this)}openPanel(){P(this)}respondEffect(e,t){I(e,t,this)}respondAll(e,t){!function(e,t,i,o=!1){const a=t.services;for(let o=0;o<t.job.length;o+=1){const n=a[t.job[o]].key;t.state[n]!==e&&(!1===e&&!0===t.launch[n]&&(t.reloadThePage=!0),!0!==t.launch[n]&&!0===e&&(t.launch[n]=!0,t.services[n].js()),t.state[n]=e,j(n,e,i),I(n,e,t))}o&&x(t)}(e,this,this.parameters,t)}respond(e,t){!function(e,t,i,o){const a=e.id.replace(/(Eng[0-9]+|Allow|Deni)ed|Switch/g,""),s=e.getBoundingClientRect(),r=o.clientX;let c;if(e.classList.contains("tarteaucitron-switch"))c=void 0!==t.state[a]?!!e.classList.contains("switch-denied"):r<s.left+e.clientWidth/2;else if(e.classList.contains("tarteaucitron-switch-state"))if(e.id.includes("Allowed")&&!0!==t.state[a])c=!0;else{if(!e.id.includes("Denied")||!1===t.state[a])return;c=!1}!0===c&&!0!==t.launch[a]&&(t.launch[a]=!0,n(window,a+"_loaded"),t.services[a].js()),!1===c&&!0===t.launch[a]&&(t.reloadThePage=!0),t.state[a]=c,j(a,c,i),I(a,c,t)}(e,this,this.parameters,t)}activate(e){!function(e,t,i){!0!==t.launch[e]&&(t.launch[e]=!0,n(window,e+"_loaded"),t.services[e].js(),t.state[e]=!0,j(e,!0,i),I(e,!0,t))}(e,this,this.parameters)}isActivated(e){return function(e,t){return!0===t.state[e]}(e,this)}toggle(e,t){!function(e,t){const i=document.getElementById(e);if(null!==i){if(void 0!==t)for(const i of document.getElementsByClassName(t))i.id!==e&&(i.style.display="none");"block"!==i.style.display?i.style.display="block":i.style.display="none"}}(e,t)}};function E(e,t,i){const o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=e;for(const e in t){const i=t[e];void 0!==i&&o.setAttribute(e,i)}if("function"==typeof i){let e=!1;o.onload=function(){!1===e&&(e=!0,i())}}document.getElementsByTagName("head")[0].appendChild(o)}const A=()=>({key:"facebook",type:"social",name:"Facebook",uri:"https://www.facebook.com/privacy/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:["xs","sb","fr","datr","dpr","c_user"],js:function(){E("//connect.facebook.net/"+function(){if(!navigator)return"en_US";const e=navigator.language||null;return"fr"===(e?e.substring(0,2):null)?"fr_FR":"en_US"}()+"/sdk.js",{id:"facebook-jssdk"})}}),D=e=>({key:"facebookpixel",type:"ads",name:"Facebook Pixel",uri:"https://www.facebook.com/privacy/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:["datr","fr","reg_ext_ref","reg_fb_gate","reg_fb_ref","sb","wd","x-src","_fbp"],js:function(){if(window.fbq)return;const t=window.fbq=function(){t.callMethod?t.callMethod.apply(t,arguments):t.queue.push(arguments)};window._fbq||(window._fbq=t),t.push=t,t.loaded=!0,t.version="2.0",t.queue=[],E("https://connect.facebook.net/en_US/fbevents.js",{id:"facebook-fbevents"},(function(){window.fbq("init",e.fbPixelId),window.fbq("track","PageView"),"function"==typeof e.facebookpixelMore&&e.facebookpixelMore()}))}}),B=e=>{const t=e.googleanalyticsUa;let i="_gat_gtag_"+t,o="_ga_"+t;return i=i.replace(/-/g,"_"),o=o.replace(/G-/g,""),{key:"googleanalytics",type:"analytic",name:"Google Analytics (GA4)",uri:"https://policies.google.com/privacy",needConsent:!0,lazyConsent:!1,cookies:["_ga","_gat","_gid","__utma","__utmb","__utmc","__utmt","__utmz",i,o,"_gcl_au"],js:function(){window.dataLayer=window.dataLayer||[],E("https://www.googletagmanager.com/gtag/js?id="+e.googleanalyticsUa,{},(function(){window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),e.googleanalyticsInitOptions?window.gtag("config",e.googleanalyticsUa,e.googleanalyticsInitOptions):window.gtag("config",e.googleanalyticsUa),"function"==typeof e.googleanalyticsMore&&e.googleanalyticsMore()}))}}},R=e=>({key:"googletagmanager",type:"api",name:"Google Tag Manager",uri:"https://policies.google.com/privacy",needConsent:!0,lazyConsent:!1,cookies:["_ga","_gat","__utma","__utmb","__utmc","__utmt","__utmz","__gads","_drt_","FLC","exchange_uid","id","fc","rrs","rds","rv","uid","UIDR","UID","clid","ipinfo","acs"],js:function(){void 0!==e.googletagmanagerId&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),E("https://www.googletagmanager.com/gtm.js?id="+e.googletagmanagerId))}}),M=e=>({key:"signinwithapple",type:"other",name:"Sign In with Apple",uri:"https://www.apple.com/legal/privacy/en-ww/cookies/",needConsent:!0,lazyConsent:!0,cookies:[],js:function(){"function"==typeof e.signinwithappleMore?E("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",void 0,(function(){e.signinwithappleMore()})):E("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")}}),z=e=>({key:"subscribewithgoogle",type:"other",name:"Subscribe with Google",uri:"https://policies.google.com/technologies/cookies#types-of-cookies",needConsent:!0,lazyConsent:!0,cookies:[],js:function(){"function"==typeof e.subscribewithgoogleMore?E("https://news.google.com/swg/js/v1/swg.js",{"subscriptions-control":"manual"},(function(){e.subscribewithgoogleMore()})):E("https://news.google.com/swg/js/v1/swg.js")}});S.withLanguages((function(){return{fr:b,en:w}})),S.withServices((function(e){return{facebook:A(),facebookpixel:D(e),googletagmanager:R(e),googleanalytics:B(e),signinwithapple:M(e),signinwithgoogle:{key:"signinwithgoogle",type:"other",name:"Sign In with Google",uri:"https://policies.google.com/technologies/cookies#types-of-cookies",needConsent:!0,lazyConsent:!0,cookies:[],js:function(){E("https://accounts.google.com/gsi/client")}},subscribewithgoogle:z(e),twitter:{key:"twitter",type:"social",name:"X (formerly Twitter)",uri:"https://support.twitter.com/articles/20170514",needConsent:!0,lazyConsent:!1,cookies:[],js:function(){E("//platform.twitter.com/widgets.js",{id:"twitter-wjs"})}},vimeo:{key:"vimeo",type:"video",name:"Vimeo",uri:"https://vimeo.com/privacy",needConsent:!0,lazyConsent:!0,cookies:["__utmt_player","__utma","__utmb","__utmc","__utmv","vuid","__utmz","player"],js:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-vimeo")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<iframe src="'+f(i)+'" frameborder="0" allowfullscreen="true"></iframe>'}},fallback:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-vimeo")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<div class="tarteaucitron-card-mask"><span>Le dépôt de cookies pour <span class="tarteaucitron-card-type">Vimeo</span> est désactivé. Si vous souhaitez accéder à ce contenu, merci de l\'activer.</span><button onclick="GDPRConsent.activate(\'vimeo\')">Autoriser</button><a href="'+f(i)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+f(i)+"</a></div>"}}},youtube:{key:"youtube",type:"video",name:"YouTube",uri:"https://policies.google.com/privacy",needConsent:!0,lazyConsent:!0,cookies:["VISITOR_INFO1_LIVE","YSC","PREF","GEUP"],js:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-youtube")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<iframe src="'+f(i)+'" frameborder="0" allowfullscreen="true"></iframe>'}},fallback:function(){const e=document.getElementsByTagName("div");for(let t=0;t<e.length;t++)if(e[t].classList.contains("tarteaucitron-youtube")){const i=e[t].getAttribute("data-tarteaucitron-src")??"";e[t].innerHTML='<div class="tarteaucitron-card-mask"><span>Le dépôt de cookies pour <span class="tarteaucitron-card-type">Youtube</span> est désactivé. Si vous souhaitez accéder à ce contenu, merci de l\'activer.</span><button onclick="GDPRConsent.activate(\'youtube\')">Autoriser</button><a href="'+f(i)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+f(i)+"</a></div>"}}}}}));var G=S;return t=t.default}()}));
import { addScript } from "../utils/index.js";
export const signinwithapple = (() => {
export const signinwithapple = ((user) => {
return {

@@ -12,5 +12,12 @@ key: "signinwithapple",

js: function () {
addScript("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
if (typeof user.signinwithappleMore === "function") {
addScript("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js", undefined, function () {
user.signinwithappleMore();
});
}
else {
addScript("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
}
},
};
});
{
"name": "gdpr-consent",
"version": "4.0.8",
"version": "4.0.9",
"description": "GDPR banner to comply with the European cookie law. Inspired by tarteaucitronjs.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -1,5 +0,5 @@

import { ServiceInterface, ServiceLoader } from "../interfaces/index.js";
import { GDPRConsentUser, ServiceInterface, ServiceLoader } from "../interfaces/index.js";
import { addScript } from "../utils/index.js";
export const signinwithapple = ((): ServiceInterface => {
export const signinwithapple = ((user: GDPRConsentUser): ServiceInterface => {
return {

@@ -14,5 +14,15 @@ key: "signinwithapple",

js: function () {
addScript("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
if (typeof user.signinwithappleMore === "function") {
addScript(
"https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",
undefined,
function () {
(user.signinwithappleMore as () => void)();
}
);
} else {
addScript("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
}
},
};
}) as ServiceLoader;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc