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 1.0.5 to 1.0.6

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(){var e={20:function(e,t,a){"use strict";function n(e){if(void 0!==e){let t;"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),window.dispatchEvent(t)}}function o(e,t,a,n,o,i){let s,r=!1;!1===n?"function"==typeof a&&a():(s=document.createElement("script"),s.type="text/javascript",s.id=void 0!==t?t:"",s.async=!0,s.src=e,void 0!==o&&void 0!==i&&s.setAttribute(o,i),"function"==typeof a&&(s.onreadystatechange=s.onload=function(){const e=s.readyState;r||e&&!/loaded|complete/.test(e)||(r=!0,a())}),document.getElementsByTagName("head")[0].appendChild(s))}function i(e,t){const a=document.getElementsByTagName("*");let n,o=0;for(n in a)if(void 0!==a[n])for(o=0;o<e.length;o+=1)(" "+a[n].className+" ").indexOf(" "+e[o]+" ")>-1&&t(a[n])}function s(e,t,a){null!==document.getElementById(e)&&(document.getElementById(e).style[t]=a)}a.d(t,{Z:function(){return T}});var r={siteDisclaimerTitle:"«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»",siteDisclaimerMessage:'<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',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",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."},c={siteDisclaimerTitle:"«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»",siteDisclaimerMessage:'<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',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",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."},l=e=>({key:"facebookpixel",type:"ads",name:"Facebook Pixel",uri:"https://www.facebook.com/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:["datr","fr","reg_ext_ref","reg_fb_gate","reg_fb_ref","sb","wd","x-src"],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=[],o("//connect.facebook.net/en_US/fbevents.js","facebook-fbevents",(function(){fbq("init",e.fbPixelId),fbq("track","PageView")}))}}),d=e=>({key:"googletagmanager",type:"api",name:"Google Tag Manager",uri:"https://adssettings.google.com/",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"}),o("https://www.googletagmanager.com/gtm.js?id="+e.googletagmanagerId))}}),u=e=>({key:"gtag",type:"analytic",name:"Google Analytics (gtag.js)",uri:"https://support.google.com/analytics/answer/6004245",needConsent:!0,lazyConsent:!1,cookies:function(){let t="_gat_gtag_"+e.gtagUa;return t=t.replace(/-/g,"_"),["_ga","_gat","_gid","__utma","__utmb","__utmc","__utmt","__utmz",t]}(),js:function(){window.dataLayer=window.dataLayer||[],o("https://www.googletagmanager.com/gtag/js?id="+e.gtagUa,"",(function(){window.gtag=function(){dataLayer.push(arguments)},gtag("js",new Date),e.gtagInitOptions?gtag("config",e.gtagUa,e.gtagInitOptions):gtag("config",e.gtagUa),"function"==typeof e.gtagMore&&e.gtagMore()}))}});const g=a(187),p=a(187);const m={};function f(e,t){let a;for(a=0;a<e.length;a+=1)if(e[a]===t)return!0;return!1}function v(e){const t=e.cookieName+"=",a=document.cookie.split(";");let n,o;for(n=0;n<a.length;n+=1){for(o=a[n];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""}var y={read:v,create:function(e,t,a){const n=new Date,o=n.getTime()+a.timeExpire,i=new RegExp("!"+e+"=(wait|true|false)","g"),s=v(a).replace(i,""),r=a.cookieName+"="+s+"!"+e+"="+t;n.setTime(o),document.cookie=r+"; expires="+n.toGMTString()+"; path=/;"},purge:function(e){let t;for(t=0;t<e.length;t+=1)document.cookie=e[t]+"=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;",document.cookie=e[t]+"=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=."+location.hostname+";",document.cookie=e[t]+"=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=."+location.hostname.split(".").slice(-2).join(".")+";"},checkCount:function(e,t,a){const n=t.cookies,o=n.length;let i,s=0,r="";const c=document.cookie.indexOf(e+"=true");if(c>=0&&0===o)r+=a.useNoCookie;else if(c>=0){for(i=0;i<o;i+=1)-1!==document.cookie.indexOf(n[i]+"=")&&(s+=1,void 0===m[n[i]]&&(m[n[i]]=[]),!1===f(m[n[i]],t.name)&&m[n[i]].push(t.name));s>0?(r+=a.useCookieCurrent+" "+s+" cookie",s>1&&(r+="s"),r+="."):r+=a.useNoCookie}else 0===o?r=a.noCookie:(r+=a.useCookie+" "+o+" cookie",o>1&&(r+="s"),r+=".");null!==document.getElementById("tacCL"+e)&&(document.getElementById("tacCL"+e).innerHTML=r)}};function b(){const e="tarteaucitron";var t;s(e+"-percentage","display","none"),s(e+"-alert-big","display","none"),t=e+"-root",null!==document.getElementById(t)&&document.getElementById(t).classList.remove("tarteaucitron-before-visible"),n("tac.close_alert")}function h(e,t,a){const n=document.getElementById(e+"Switch"),o=document.getElementById(e+"Allowed"),i=document.getElementById(e+"Denied");let s,r,c,l=!1,d=0,u=0;for(n.classList.remove("switch-denied"),n.classList.remove("switch-allowed"),o.classList.remove("active"),i.classList.remove("active"),!0===t?(n.classList.add("switch-allowed"),n.children[0].innerHTML="&#10003;",o.classList.add("active")):(n.classList.add("switch-denied"),n.children[0].innerHTML="&#10007;",i.classList.add("active")),s=0;s<a.job.length;s++)r=a.job[s],c=a.state[r],void 0!==c?!0===c?d+=1:u+=1:!0!==a.services[r].lazyConsent&&(l=!0);l||b(),d===a.job.length?(document.getElementById("tarteaucitron-all-denied").classList.remove("tarteaucitron-is-selected"),document.getElementById("tarteaucitron-all-allowed").classList.add("tarteaucitron-is-selected")):u===a.job.length&&(document.getElementById("tarteaucitron-all-allowed").classList.remove("tarteaucitron-is-selected"),document.getElementById("tarteaucitron-all-denied").classList.add("tarteaucitron-is-selected")),!0===t?(null!==document.getElementById("tacCL"+e)&&(document.getElementById("tacCL"+e).innerHTML="..."),setTimeout((function(){y.checkCount(e,a.services[e],a.lang)}),2500)):y.checkCount(e,a.services[e],a.lang)}var k={closeAlert:b,openAlert:function(){const e="tarteaucitron";var t;s(e+"-percentage","display","block"),s(e+"-alert-big","display","block"),t=e+"-root",null!==document.getElementById(t)&&document.getElementById(t).classList.add("tarteaucitron-before-visible"),n("tac.open_alert")},closePanel:function(e){document.location.hash===e.hashtag&&(window.history?window.history.replaceState("",document.title,window.location.pathname+window.location.search):document.location.hash=""),s("tarteaucitron","display","none"),i(["tarteaucitron-info-box"],(function(e){e.style.display="none"})),!0===e.reloadThePage?window.location.reload():s("tarteaucitron-back","display","none"),null!==document.getElementById("tarteaucitron-close-alert")&&document.getElementById("tarteaucitron-close-alert").focus(),document.getElementsByTagName("body")[0].classList.remove("modal-open"),n("tac.close_panel")},openPanel:function(e){let t;for(s("tarteaucitron","display","block"),s("tarteaucitron-back","display","block"),document.getElementById("tarteaucitron-close-panel").focus(),document.getElementsByTagName("body")[0].classList.add("modal-open"),t=0;t<e.job.length;t++)void 0!==e.state[e.job[t]]&&h(e.job[t],e.state[e.job[t]],e);n("tac.open_panel")},respondAll:function(e,t,a){const n=t.services;let o,i,s=0;for(s=0;s<t.job.length;s+=1)o=n[t.job[s]],i=o.key,t.state[i]!==e&&(!1===e&&!0===t.launch[i]&&(t.reloadThePage=!0),!0!==t.launch[i]&&!0===e&&(t.launch[i]=!0,t.services[i].js()),t.state[i]=e,y.create(i,e,a),h(i,e,t))},respond:function(e,t,a,o){const i=e.id.replace(/(Eng[0-9]+|Allow|Deni)ed|Switch/g,"");let s;const r=function(e){return e.clientX}(o),c=e.getBoundingClientRect();if(e.classList.contains("tarteaucitron-switch"))s=void 0!==t.state[i]?!!e.classList.contains("switch-denied"):r<c.left+e.clientWidth/2;else if(e.classList.contains("tarteaucitron-switch-state"))if(e.id.includes("Allowed")&&!0!==t.state[i])s=!0;else{if(!e.id.includes("Denied")||!1===t.state[i])return;s=!1}!0===s&&!0!==t.launch[i]&&(t.launch[i]=!0,n(i+"_loaded"),t.services[i].js()),!1===s&&!0===t.launch[i]&&(t.reloadThePage=!0),t.state[i]=s,y.create(i,s,a),h(i,s,t)},activate:function(e,t,a){!0!==t.launch[e]&&(t.launch[e]=!0,n(e+"_loaded"),t.services[e].js(),t.state[e]=!0,y.create(e,!0,a),h(e,!0,t))},toggle:function(e,t){const a=document.getElementById(e);null!==a&&(void 0!==t&&i([t],(function(t){t.id!==e&&(t.style.display="none")})),"block"!==a.style.display?a.style.display="block":a.style.display="none")},order:function(e,t){const a=document.getElementById("tarteaucitron-services_"+e);null!==a&&"function"==typeof Array.prototype.map&&"undefined"==typeof Enumerable&&Array.prototype.map.call(a.children,Object).sort((function(e,a){return t.services[e.id.replace(/-line/g,"")].name>t.services[a.id.replace(/-line/g,"")].name?1:t.services[e.id.replace(/-line/g,"")].name<t.services[a.id.replace(/-line/g,"")].name?-1:0})).forEach((function(e){a.appendChild(e)}))}},w=function(e,t){27===t.keyCode&&k.closePanel()},C=function(e){document.location.hash===e.parameters.hashtag&&k.openPanel(e)};const _=a(187),L={user:{},lang:{},services:{},added:[],idprocessed:[],state:[],launch:[],parameters:{},reloadThePage:!1,alreadyLaunch:0,init:function(e){L.parameters=e||{},0===L.alreadyLaunch&&(L.alreadyLaunch=1,window.addEventListener?(window.addEventListener("load",(function(){L.load()}),!1),window.addEventListener("keydown",(function(e){w(!1,e)}),!1),window.addEventListener("hashchange",(function(){C(L)}),!1)):(window.attachEvent("onload",(function(){L.load()})),window.attachEvent("onkeydown",(function(e){w(!0,e)})),window.attachEvent("onhashchange",(function(){C(L)}))))},load:function(){const e={hashtag:"#tarteaucitron",cookieName:"tarteaucitron",timeExpire:31536e6,websiteName:void 0,AcceptAllCta:!0,moreInfoLink:!0,mandatory:!0};if(void 0!==L.parameters)for(const t in e)Object.prototype.hasOwnProperty.call(L.parameters,t)||(L.parameters[t]=e[t]);var t;L.lang="fr"===function(){if(!navigator)return"en";const e=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,t=e?e.substr(0,2):null;return-1==="en,fr".indexOf(t)?"en":t}()?r:c,L.services=(t=L.user,{facebook:{key:"facebook",type:"social",name:"Facebook",uri:"https://www.facebook.com/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:[],js:function(){o("//connect.facebook.net/"+function(){if(!navigator)return"en_US";const e=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null;return"fr"===(e?e.substr(0,2):null)?"fr_FR":"en_US"}()+"/sdk.js","facebook-jssdk")}},facebookpixel:l(t),googletagmanager:d(t),gtag:u(t),twitter:{key:"twitter",type:"social",name:"Twitter",uri:"https://support.twitter.com/articles/20170514",needConsent:!0,lazyConsent:!1,cookies:[],js:function(){o("//platform.twitter.com/widgets.js","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");let t,a;for(t=0;t<e.length;t++)e[t].classList.contains("tarteaucitron-vimeo")&&(a=e[t].getAttribute("data-tarteaucitron-src"),e[t].innerHTML='<iframe src="'+g(a)+'" frameborder="0" allowfullscreen="true"></iframe>')},fallback:function(){const e=document.getElementsByTagName("div");let t,a;for(t=0;t<e.length;t++)e[t].classList.contains("tarteaucitron-vimeo")&&(a=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="'+g(a)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+g(a)+"</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 a=e[t].getAttribute("data-tarteaucitron-src");e[t].innerHTML='<iframe src="'+p(a)+'" frameborder="0" allowfullscreen="true"></iframe>'}},fallback:function(){const e=document.getElementsByTagName("div");let t,a;for(a=0;a<e.length;a++)e[a].classList.contains("tarteaucitron-youtube")&&(t=e[a].getAttribute("data-tarteaucitron-src"),e[a].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="'+p(t)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+p(t)+"</a></div>")}}});const a=document.body,i=document.createElement("div");let s,m,f="",v=["ads","analytic","api","comment","social","support","video","other"];for(v=v.sort((function(e,t){return L.lang[e].title>L.lang[t].title?1:L.lang[e].title<L.lang[t].title?-1:0})),f+='<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="'+L.lang.close+'"></button>',f+='<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">',f+=' <button type="button" id="tarteaucitron-close-panel" onclick="GDPRConsent.closePanel();">X</button>',f+=' <div id="tarteaucitron-services">',f+=' <div id="tarteaucitron-services-top">',f+=' <span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">'+L.lang.title+"</span>",f+=' <div id="tarteaucitron-info">',f+=" "+L.lang.disclaimer,L.parameters.websiteName&&(f+=" "+L.lang.disclaimerWebsite+" "+_(L.parameters.websiteName)+"."),f+=" </div>",f+=' <div class="tarteaucitron-line">',f+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+L.lang.all+"</span>",f+=' <div class="tarteaucitron-ask">',f+=' <button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true);">',f+=" &#10003; "+L.lang.allowAll,f+=" </button> ",f+=' <button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false);">',f+=" &#10007; "+L.lang.denyAll,f+=" </button>",f+=" </div>",f+=" </div>",f+=" </div>",f+=' <div id="tarteaucitron-services-list">',f+=' <div class="clear"></div>',!0===L.parameters.mandatory&&(f+='<div class="tarteaucitron-cookie-group">',f+=' <div class="tarteaucitron-cookie-text">',f+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+L.lang.mandatoryTitle+"</span>",f+=' <span class="tarteaucitron-description">'+L.lang.mandatoryText+"</span>",f+=" </div>",f+=' <div class="tarteaucitron-cookie-buttons">',f+=' <button type="button" class="tarteaucitron-allow solo">',f+=" &#10003; "+L.lang.allow,f+=" </button> ",f+=" </div>",f+="</div>"),m=0;m<v.length;m+=1)f+=' <li id="tarteaucitron-services-title_'+v[m]+'" class="tarteaucitron-hidden">',f+=' <div class="tarteaucitron-title">',f+=' <button type="button" onclick="GDPRConsent.toggle(\'tarteaucitron-details'+v[m]+"', 'tarteaucitron-info-box');return false\">&#10011; "+L.lang[v[m]].title+"</button>",f+=" </div>",f+=' <div id="tarteaucitron-details'+v[m]+'" class="tarteaucitron-details tarteaucitron-info-box">',f+=" "+L.lang[v[m]].details,f+=" </div>",f+=' <ul id="tarteaucitron-services_'+v[m]+'"></ul></li>';if(f+=' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">'+L.lang.noServices+"</li>",f+=" </ul>",f+=' <div class="tarteaucitron-hidden" id="tarteaucitron-scrollbar-child" style="height:20px;display:block"></div>',f+=" </div>",f+=" </div>",f+="</div>",L.parameters.AcceptAllCta?(f+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==L.lang.siteDisclaimerTitle&&""!==L.lang.siteDisclaimerMessage&&(f+='<div id="tarteaucitron-wrapper">',f+=' <div id="tarteaucitron-disclaimer-texte">',f+=' <span id="tarteaucitron-site-disclaimer-title">',f+=" "+L.lang.siteDisclaimerTitle,f+=" </span>",f+=' <span id="tarteaucitron-site-disclaimer-message">',f+=" "+L.lang.siteDisclaimerMessage,f+=" </span>"),f+=' <span id="tarteaucitron-disclaimer-alert">',f+=" "+L.lang.alertBigPrivacy,f+=" </span>",f+=" </div>",f+=' <div id="tarteaucitron-disclaimer-buttons">',f+=' <button type="button" id="tarteaucitron-continue" onclick="GDPRConsent.respondAll(false);">',f+=" &rarr; "+L.lang.continue,f+=" </button>",f+=' <div id="tarteaucitron-group-buttons">',f+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">',f+=" &#10003; "+L.lang.acceptAll,f+=" </button>",f+=' <button type="button" id="tarteaucitron-close-alert" onclick="GDPRConsent.openPanel();">',f+=" "+L.lang.personalize,f+=" </button>",f+=" </div>",f+=" </div>",f+=" </div>",f+="</div>"):(f+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==L.lang.siteDisclaimerTitle&&""!==L.lang.siteDisclaimerMessage&&(f+='<div id="tarteaucitron-wrapper">',f+=' <div id="tarteaucitron-disclaimer-texte">',f+=' <span id="tarteaucitron-site-disclaimer-title">',f+=" "+L.lang.siteDisclaimerTitle,f+=" </span>",f+=' <span id="tarteaucitron-site-disclaimer-message">',f+=" "+L.lang.siteDisclaimerMessage,f+=" </span>"),f+=' <span id="tarteaucitron-disclaimer-alert">',f+=" "+L.lang.alertBigPrivacy,f+=" </span>",f+=" </div>",f+=' <div id="tarteaucitron-disclaimer-buttons">',f+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.openPanel();">',f+=" "+L.lang.personalize,f+=" </button>",f+=" </div>",f+=" </div>",f+="</div>"),i.id="tarteaucitron-root",a.appendChild(i,a),i.innerHTML=f,n("tac.root_available"),void 0!==L.job)for(L.job=L.cleanArray(L.job),s=0;s<L.job.length;s+=1)L.addService(L.job[s]);else L.job=[];L.job.push=function(e){void 0===L.job.indexOf&&(L.job.indexOf=function(e,t){let a;const n=this.length;for(a=t||0;a<n;a+=1)if(this[a]===e)return a;return-1}),-1===L.job.indexOf(e)&&Array.prototype.push.call(this,e),L.launch[e]=!1,L.addService(e)},document.location.hash===L.hashtag&&k.openPanel(L)},addService:function(e){let t="";const a=L.services[e],o=y.read(L.parameters),i=o.indexOf(a.key+"=false")>=0,r=o.indexOf(a.key+"=true")>=0||!a.needConsent&&o.indexOf(a.key+"=false")<0,c=o.indexOf(a.key+"=false")>=0||o.indexOf(a.key+"=true")>=0,l="1"===navigator.doNotTrack||"yes"===navigator.doNotTrack||"1"===navigator.msDoNotTrack||"1"===window.doNotTrack;!0!==L.added[a.key]&&(L.added[a.key]=!0,t+='<div id="'+a.key+'-line" class="tarteaucitron-cookie-group">',t+=' <div class="tarteaucitron-cookie-text">',t+=' <span class="tarteaucitron-h3" role="heading" aria-level="3">'+a.name+"</span>",t+=' <span id="tacCL'+a.key+'" class="tarteaucitron-description"></span>',!0===L.parameters.moreInfoLink&&(t+=' <a href="'+a.uri+'" target="_blank" rel="noreferrer noopener" title="'+a.name+" "+L.lang.newWindow+'">',t+=" "+L.lang.source,t+=" </a>"),t+=" </div>",t+=' <div class="tarteaucitron-cookie-buttons">',t+=' <span id="'+a.key+'Allowed" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+L.lang.allow+"</span>",t+=' <div class="tarteaucitron-switch" id="'+a.key+'Switch" onclick="GDPRConsent.respond(this, event);">',t+=' <button type="button" class="tarteaucitron-switch-button"></button>',t+=" </div> ",t+=' <span id="'+a.key+'Denied" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+L.lang.deny+"</span>",t+=" </div>",t+="</li>",s("tarteaucitron-services-title_"+a.type,"display","block"),null!==document.getElementById("tarteaucitron-services_"+a.type)&&(document.getElementById("tarteaucitron-services_"+a.type).innerHTML+=t),s("tarteaucitron-no-services-title","display","none"),k.order(a.type,L)),r?(!0!==L.launch[a.key]&&(L.launch[a.key]=!0,a.js(),n(a.key+"_loaded")),L.state[a.key]=!0):i?("function"==typeof a.fallback&&a.fallback(),L.state[a.key]=!1):!c&&l&&L.handleBrowserDNTRequest?(y.create(a.key,"false",L.parameters),"function"==typeof a.fallback&&a.fallback(),L.state[a.key]=!1):c||(y.create(a.key,"wait",L.parameters),"function"==typeof a.fallback&&a.fallback(),!0!==a.lazyConsent&&k.openAlert()),y.checkCount(a.key,a,L.lang),n(a.key+"_added")},cleanArray:function(e){let t;const a=e.length;let n=[];const o={},i=L.services;for(t=0;t<a;t+=1)o[e[t]]||(o[e[t]]={},void 0!==L.services[e[t]]&&n.push(e[t]));return n=n.sort((function(e,t){return i[e].type+i[e].key>i[t].type+i[t].key?1:i[e].type+i[e].key<i[t].type+i[t].key?-1:0})),n},closePanel:function(){k.closePanel(L)},openPanel:function(){k.openPanel(L)},respondEffect:function(e,t){k.respondEffect(e,t,L)},respondAll:function(e){k.respondAll(e,L,L.parameters)},respond:function(e,t){k.respond(e,L,L.parameters,t)},activate:function(e){k.activate(e,L,L.parameters)},toggle:function(e,t){k.toggle(e,t)}};var T=L},579:function(e,t,a){const n=a(20).Z;e.exports=n},705:function(e,t,a){var n=a(639).Symbol;e.exports=n},932:function(e){e.exports=function(e,t){for(var a=-1,n=null==e?0:e.length,o=Array(n);++a<n;)o[a]=t(e[a],a,e);return o}},239:function(e,t,a){var n=a(705),o=a(607),i=a(333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},674:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},531:function(e,t,a){var n=a(705),o=a(932),i=a(469),s=a(448),r=n?n.prototype:void 0,c=r?r.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return c?c.call(t):"";var a=t+"";return"0"==a&&1/t==-1/0?"-0":a}},464:function(e,t,a){var n=a(674)({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=n},957:function(e,t,a){var n="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g;e.exports=n},607:function(e,t,a){var n=a(705),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,r=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,r),a=e[r];try{e[r]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[r]=a:delete e[r]),o}},333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:function(e,t,a){var n=a(957),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},187:function(e,t,a){var n=a(464),o=a(833),i=/[&<>"']/g,s=RegExp(i.source);e.exports=function(e){return(e=o(e))&&s.test(e)?e.replace(i,n):e}},469:function(e){var t=Array.isArray;e.exports=t},5:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},448:function(e,t,a){var n=a(239),o=a(5);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},833:function(e,t,a){var n=a(531);e.exports=function(e){return null==e?"":n(e)}}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,a),i.exports}return a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a(579)}()}));
!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,(()=>(()=>{var e={20:(e,t,a)=>{"use strict";function n(e){if(void 0!==e){let t;"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),window.dispatchEvent(t)}}function o(e,t,a,n,o,i){let s,r=!1;!1===n?"function"==typeof a&&a():(s=document.createElement("script"),s.type="text/javascript",s.id=void 0!==t?t:"",s.async=!0,s.src=e,void 0!==o&&void 0!==i&&s.setAttribute(o,i),"function"==typeof a&&(s.onreadystatechange=s.onload=function(){const e=s.readyState;r||e&&!/loaded|complete/.test(e)||(r=!0,a())}),document.getElementsByTagName("head")[0].appendChild(s))}function i(e,t){const a=document.getElementsByTagName("*");let n,o=0;for(n in a)if(void 0!==a[n])for(o=0;o<e.length;o+=1)(" "+a[n].className+" ").indexOf(" "+e[o]+" ")>-1&&t(a[n])}function s(e,t,a){null!==document.getElementById(e)&&(document.getElementById(e).style[t]=a)}a.d(t,{Z:()=>T});const r={siteDisclaimerTitle:"«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»",siteDisclaimerMessage:'<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',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",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."},c={siteDisclaimerTitle:"«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»",siteDisclaimerMessage:'<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',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",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."},l=e=>({key:"facebookpixel",type:"ads",name:"Facebook Pixel",uri:"https://www.facebook.com/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:["datr","fr","reg_ext_ref","reg_fb_gate","reg_fb_ref","sb","wd","x-src"],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=[],o("//connect.facebook.net/en_US/fbevents.js","facebook-fbevents",(function(){fbq("init",e.fbPixelId),fbq("track","PageView")}))}}),d=e=>({key:"googletagmanager",type:"api",name:"Google Tag Manager",uri:"https://adssettings.google.com/",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"}),o("https://www.googletagmanager.com/gtm.js?id="+e.googletagmanagerId))}}),u=e=>({key:"gtag",type:"analytic",name:"Google Analytics (gtag.js)",uri:"https://support.google.com/analytics/answer/6004245",needConsent:!0,lazyConsent:!1,cookies:function(){let t="_gat_gtag_"+e.gtagUa;return t=t.replace(/-/g,"_"),["_ga","_gat","_gid","__utma","__utmb","__utmc","__utmt","__utmz",t]}(),js:function(){window.dataLayer=window.dataLayer||[],o("https://www.googletagmanager.com/gtag/js?id="+e.gtagUa,"",(function(){window.gtag=function(){window.dataLayer.push(arguments)},gtag("js",new Date),e.gtagInitOptions?gtag("config",e.gtagUa,e.gtagInitOptions):gtag("config",e.gtagUa),"function"==typeof e.gtagMore&&e.gtagMore()}))}}),g=a(187),p=a(187),m={};function v(e,t){let a;for(a=0;a<e.length;a+=1)if(e[a]===t)return!0;return!1}function f(e){const t=e.cookieName+"=",a=document.cookie.split(";");let n,o;for(n=0;n<a.length;n+=1){for(o=a[n];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""}const y={read:f,create:function(e,t,a){const n=new Date,o=n.getTime()+a.timeExpire,i=new RegExp("!"+e+"=(wait|true|false)","g"),s=f(a).replace(i,""),r=a.cookieName+"="+s+"!"+e+"="+t;n.setTime(o),document.cookie=r+"; expires="+n.toGMTString()+"; path=/;"},purge:function(e){let t;for(t=0;t<e.length;t+=1)document.cookie=e[t]+"=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;",document.cookie=e[t]+"=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=."+location.hostname+";",document.cookie=e[t]+"=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=."+location.hostname.split(".").slice(-2).join(".")+";"},checkCount:function(e,t,a){const n=t.cookies,o=n.length;let i,s=0,r="";const c=document.cookie.indexOf(e+"=true");if(c>=0&&0===o)r+=a.useNoCookie;else if(c>=0){for(i=0;i<o;i+=1)-1!==document.cookie.indexOf(n[i]+"=")&&(s+=1,void 0===m[n[i]]&&(m[n[i]]=[]),!1===v(m[n[i]],t.name)&&m[n[i]].push(t.name));s>0?(r+=a.useCookieCurrent+" "+s+" cookie",s>1&&(r+="s"),r+="."):r+=a.useNoCookie}else 0===o?r=a.noCookie:(r+=a.useCookie+" "+o+" cookie",o>1&&(r+="s"),r+=".");null!==document.getElementById("tacCL"+e)&&(document.getElementById("tacCL"+e).innerHTML=r)}};function b(){const e="tarteaucitron";var t;s(e+"-percentage","display","none"),s(e+"-alert-big","display","none"),t=e+"-root",null!==document.getElementById(t)&&document.getElementById(t).classList.remove("tarteaucitron-before-visible"),n("tac.close_alert")}function h(e,t,a){const n=document.getElementById(e+"Switch"),o=document.getElementById(e+"Allowed"),i=document.getElementById(e+"Denied");let s,r,c,l=!1,d=0,u=0;for(n.classList.remove("switch-denied"),n.classList.remove("switch-allowed"),o.classList.remove("active"),i.classList.remove("active"),!0===t?(n.classList.add("switch-allowed"),n.children[0].innerHTML="&#10003;",o.classList.add("active")):(n.classList.add("switch-denied"),n.children[0].innerHTML="&#10007;",i.classList.add("active")),s=0;s<a.job.length;s++)r=a.job[s],c=a.state[r],void 0!==c?!0===c?d+=1:u+=1:!0!==a.services[r].lazyConsent&&(l=!0);l||b(),d===a.job.length?(document.getElementById("tarteaucitron-all-denied").classList.remove("tarteaucitron-is-selected"),document.getElementById("tarteaucitron-all-allowed").classList.add("tarteaucitron-is-selected")):u===a.job.length&&(document.getElementById("tarteaucitron-all-allowed").classList.remove("tarteaucitron-is-selected"),document.getElementById("tarteaucitron-all-denied").classList.add("tarteaucitron-is-selected")),!0===t?(null!==document.getElementById("tacCL"+e)&&(document.getElementById("tacCL"+e).innerHTML="..."),setTimeout((function(){y.checkCount(e,a.services[e],a.lang)}),2500)):y.checkCount(e,a.services[e],a.lang)}const k={closeAlert:b,openAlert:function(){const e="tarteaucitron";var t;s(e+"-percentage","display","block"),s(e+"-alert-big","display","block"),t=e+"-root",null!==document.getElementById(t)&&document.getElementById(t).classList.add("tarteaucitron-before-visible"),n("tac.open_alert")},closePanel:function(e){document.location.hash===e.hashtag&&(window.history?window.history.replaceState("",document.title,window.location.pathname+window.location.search):document.location.hash=""),s("tarteaucitron","display","none"),i(["tarteaucitron-info-box"],(function(e){e.style.display="none"})),!0===e.reloadThePage?window.location.reload():s("tarteaucitron-back","display","none"),null!==document.getElementById("tarteaucitron-close-alert")&&document.getElementById("tarteaucitron-close-alert").focus(),document.getElementsByTagName("body")[0].classList.remove("modal-open"),n("tac.close_panel")},openPanel:function(e){let t;for(s("tarteaucitron","display","block"),s("tarteaucitron-back","display","block"),document.getElementById("tarteaucitron-close-panel").focus(),document.getElementsByTagName("body")[0].classList.add("modal-open"),t=0;t<e.job.length;t++)void 0!==e.state[e.job[t]]&&h(e.job[t],e.state[e.job[t]],e);n("tac.open_panel")},respondAll:function(e,t,a){const n=t.services;let o,i,s=0;for(s=0;s<t.job.length;s+=1)o=n[t.job[s]],i=o.key,t.state[i]!==e&&(!1===e&&!0===t.launch[i]&&(t.reloadThePage=!0),!0!==t.launch[i]&&!0===e&&(t.launch[i]=!0,t.services[i].js()),t.state[i]=e,y.create(i,e,a),h(i,e,t))},respond:function(e,t,a,o){const i=e.id.replace(/(Eng[0-9]+|Allow|Deni)ed|Switch/g,"");let s;const r=function(e){return e.clientX}(o),c=e.getBoundingClientRect();if(e.classList.contains("tarteaucitron-switch"))s=void 0!==t.state[i]?!!e.classList.contains("switch-denied"):r<c.left+e.clientWidth/2;else if(e.classList.contains("tarteaucitron-switch-state"))if(e.id.includes("Allowed")&&!0!==t.state[i])s=!0;else{if(!e.id.includes("Denied")||!1===t.state[i])return;s=!1}!0===s&&!0!==t.launch[i]&&(t.launch[i]=!0,n(i+"_loaded"),t.services[i].js()),!1===s&&!0===t.launch[i]&&(t.reloadThePage=!0),t.state[i]=s,y.create(i,s,a),h(i,s,t)},activate:function(e,t,a){!0!==t.launch[e]&&(t.launch[e]=!0,n(e+"_loaded"),t.services[e].js(),t.state[e]=!0,y.create(e,!0,a),h(e,!0,t))},toggle:function(e,t){const a=document.getElementById(e);null!==a&&(void 0!==t&&i([t],(function(t){t.id!==e&&(t.style.display="none")})),"block"!==a.style.display?a.style.display="block":a.style.display="none")},order:function(e,t){const a=document.getElementById("tarteaucitron-services_"+e);null!==a&&"function"==typeof Array.prototype.map&&"undefined"==typeof Enumerable&&Array.prototype.map.call(a.children,Object).sort((function(e,a){return t.services[e.id.replace(/-line/g,"")].name>t.services[a.id.replace(/-line/g,"")].name?1:t.services[e.id.replace(/-line/g,"")].name<t.services[a.id.replace(/-line/g,"")].name?-1:0})).forEach((function(e){a.appendChild(e)}))}},w=function(e,t){27===t.keyCode&&k.closePanel()},C=function(e){document.location.hash===e.parameters.hashtag&&k.openPanel(e)},_=a(187),L={user:{},lang:{},services:{},added:[],idprocessed:[],state:[],launch:[],parameters:{},reloadThePage:!1,alreadyLaunch:0,init:function(e){L.parameters=e||{},0===L.alreadyLaunch&&(L.alreadyLaunch=1,window.addEventListener?(window.addEventListener("load",(function(){L.load()}),!1),window.addEventListener("keydown",(function(e){w(!1,e)}),!1),window.addEventListener("hashchange",(function(){C(L)}),!1)):(window.attachEvent("onload",(function(){L.load()})),window.attachEvent("onkeydown",(function(e){w(!0,e)})),window.attachEvent("onhashchange",(function(){C(L)}))))},load:function(){const e={hashtag:"#tarteaucitron",cookieName:"tarteaucitron",timeExpire:31536e6,websiteName:void 0,AcceptAllCta:!0,moreInfoLink:!0,mandatory:!0};if(void 0!==L.parameters)for(const t in e)Object.prototype.hasOwnProperty.call(L.parameters,t)||(L.parameters[t]=e[t]);var t;L.lang="fr"===function(){if(!navigator)return"en";const e=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,t=e?e.substr(0,2):null;return-1==="en,fr".indexOf(t)?"en":t}()?r:c,L.services=(t=L.user,{facebook:{key:"facebook",type:"social",name:"Facebook",uri:"https://www.facebook.com/policies/cookies/",needConsent:!0,lazyConsent:!1,cookies:[],js:function(){o("//connect.facebook.net/"+function(){if(!navigator)return"en_US";const e=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null;return"fr"===(e?e.substr(0,2):null)?"fr_FR":"en_US"}()+"/sdk.js","facebook-jssdk")}},facebookpixel:l(t),googletagmanager:d(t),gtag:u(t),twitter:{key:"twitter",type:"social",name:"Twitter",uri:"https://support.twitter.com/articles/20170514",needConsent:!0,lazyConsent:!1,cookies:[],js:function(){o("//platform.twitter.com/widgets.js","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");let t,a;for(t=0;t<e.length;t++)e[t].classList.contains("tarteaucitron-vimeo")&&(a=e[t].getAttribute("data-tarteaucitron-src"),e[t].innerHTML='<iframe src="'+g(a)+'" frameborder="0" allowfullscreen="true"></iframe>')},fallback:function(){const e=document.getElementsByTagName("div");let t,a;for(t=0;t<e.length;t++)e[t].classList.contains("tarteaucitron-vimeo")&&(a=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="'+g(a)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+g(a)+"</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 a=e[t].getAttribute("data-tarteaucitron-src");e[t].innerHTML='<iframe src="'+p(a)+'" frameborder="0" allowfullscreen="true"></iframe>'}},fallback:function(){const e=document.getElementsByTagName("div");let t,a;for(a=0;a<e.length;a++)e[a].classList.contains("tarteaucitron-youtube")&&(t=e[a].getAttribute("data-tarteaucitron-src"),e[a].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="'+p(t)+'" class="tarteaucitron-card-url" target="_blank">&rarr; '+p(t)+"</a></div>")}}});const a=document.body,i=document.createElement("div");let s,m,v="",f=["ads","analytic","api","comment","social","support","video","other"];for(f=f.sort((function(e,t){return L.lang[e].title>L.lang[t].title?1:L.lang[e].title<L.lang[t].title?-1:0})),v+='<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="'+L.lang.close+'"></button>',v+='<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">',v+=' <button type="button" id="tarteaucitron-close-panel" onclick="GDPRConsent.closePanel();">X</button>',v+=' <div id="tarteaucitron-services">',v+=' <div id="tarteaucitron-services-top">',v+=' <span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">'+L.lang.title+"</span>",v+=' <div id="tarteaucitron-info">',v+=" "+L.lang.disclaimer,L.parameters.websiteName&&(v+=" "+L.lang.disclaimerWebsite+" "+_(L.parameters.websiteName)+"."),v+=" </div>",v+=' <div class="tarteaucitron-line">',v+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+L.lang.all+"</span>",v+=' <div class="tarteaucitron-ask">',v+=' <button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true);">',v+=" &#10003; "+L.lang.allowAll,v+=" </button> ",v+=' <button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false);">',v+=" &#10007; "+L.lang.denyAll,v+=" </button>",v+=" </div>",v+=" </div>",v+=" </div>",v+=' <div id="tarteaucitron-services-list">',v+=' <div class="clear"></div>',!0===L.parameters.mandatory&&(v+='<div class="tarteaucitron-cookie-group">',v+=' <div class="tarteaucitron-cookie-text">',v+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+L.lang.mandatoryTitle+"</span>",v+=' <span class="tarteaucitron-description">'+L.lang.mandatoryText+"</span>",v+=" </div>",v+=' <div class="tarteaucitron-cookie-buttons">',v+=' <button type="button" class="tarteaucitron-allow solo">',v+=" &#10003; "+L.lang.allow,v+=" </button> ",v+=" </div>",v+="</div>"),m=0;m<f.length;m+=1)v+=' <li id="tarteaucitron-services-title_'+f[m]+'" class="tarteaucitron-hidden">',v+=' <div class="tarteaucitron-title">',v+=' <button type="button" onclick="GDPRConsent.toggle(\'tarteaucitron-details'+f[m]+"', 'tarteaucitron-info-box');return false\">&#10011; "+L.lang[f[m]].title+"</button>",v+=" </div>",v+=' <div id="tarteaucitron-details'+f[m]+'" class="tarteaucitron-details tarteaucitron-info-box">',v+=" "+L.lang[f[m]].details,v+=" </div>",v+=' <ul id="tarteaucitron-services_'+f[m]+'"></ul></li>';if(v+=' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">'+L.lang.noServices+"</li>",v+=" </ul>",v+=' <div class="tarteaucitron-hidden" id="tarteaucitron-scrollbar-child" style="height:20px;display:block"></div>',v+=" </div>",v+=" </div>",v+="</div>",L.parameters.AcceptAllCta?(v+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==L.lang.siteDisclaimerTitle&&""!==L.lang.siteDisclaimerMessage&&(v+='<div id="tarteaucitron-wrapper">',v+=' <div id="tarteaucitron-disclaimer-texte">',v+=' <span id="tarteaucitron-site-disclaimer-title">',v+=" "+L.lang.siteDisclaimerTitle,v+=" </span>",v+=' <span id="tarteaucitron-site-disclaimer-message">',v+=" "+L.lang.siteDisclaimerMessage,v+=" </span>"),v+=' <span id="tarteaucitron-disclaimer-alert">',v+=" "+L.lang.alertBigPrivacy,v+=" </span>",v+=" </div>",v+=' <div id="tarteaucitron-disclaimer-buttons">',v+=' <button type="button" id="tarteaucitron-continue" onclick="GDPRConsent.respondAll(false);">',v+=" &rarr; "+L.lang.continue,v+=" </button>",v+=' <div id="tarteaucitron-group-buttons">',v+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">',v+=" &#10003; "+L.lang.acceptAll,v+=" </button>",v+=' <button type="button" id="tarteaucitron-close-alert" onclick="GDPRConsent.openPanel();">',v+=" "+L.lang.personalize,v+=" </button>",v+=" </div>",v+=" </div>",v+=" </div>",v+="</div>"):(v+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==L.lang.siteDisclaimerTitle&&""!==L.lang.siteDisclaimerMessage&&(v+='<div id="tarteaucitron-wrapper">',v+=' <div id="tarteaucitron-disclaimer-texte">',v+=' <span id="tarteaucitron-site-disclaimer-title">',v+=" "+L.lang.siteDisclaimerTitle,v+=" </span>",v+=' <span id="tarteaucitron-site-disclaimer-message">',v+=" "+L.lang.siteDisclaimerMessage,v+=" </span>"),v+=' <span id="tarteaucitron-disclaimer-alert">',v+=" "+L.lang.alertBigPrivacy,v+=" </span>",v+=" </div>",v+=' <div id="tarteaucitron-disclaimer-buttons">',v+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.openPanel();">',v+=" "+L.lang.personalize,v+=" </button>",v+=" </div>",v+=" </div>",v+="</div>"),i.id="tarteaucitron-root",a.appendChild(i,a),i.innerHTML=v,n("tac.root_available"),void 0!==L.job)for(L.job=L.cleanArray(L.job),s=0;s<L.job.length;s+=1)L.addService(L.job[s]);else L.job=[];L.job.push=function(e){void 0===L.job.indexOf&&(L.job.indexOf=function(e,t){let a;const n=this.length;for(a=t||0;a<n;a+=1)if(this[a]===e)return a;return-1}),-1===L.job.indexOf(e)&&Array.prototype.push.call(this,e),L.launch[e]=!1,L.addService(e)},document.location.hash===L.hashtag&&k.openPanel(L)},addService:function(e){let t="";const a=L.services[e],o=y.read(L.parameters),i=o.indexOf(a.key+"=false")>=0,r=o.indexOf(a.key+"=true")>=0||!a.needConsent&&o.indexOf(a.key+"=false")<0,c=o.indexOf(a.key+"=false")>=0||o.indexOf(a.key+"=true")>=0,l="1"===navigator.doNotTrack||"yes"===navigator.doNotTrack||"1"===navigator.msDoNotTrack||"1"===window.doNotTrack;!0!==L.added[a.key]&&(L.added[a.key]=!0,t+='<div id="'+a.key+'-line" class="tarteaucitron-cookie-group">',t+=' <div class="tarteaucitron-cookie-text">',t+=' <span class="tarteaucitron-h3" role="heading" aria-level="3">'+a.name+"</span>",t+=' <span id="tacCL'+a.key+'" class="tarteaucitron-description"></span>',!0===L.parameters.moreInfoLink&&(t+=' <a href="'+a.uri+'" target="_blank" rel="noreferrer noopener" title="'+a.name+" "+L.lang.newWindow+'">',t+=" "+L.lang.source,t+=" </a>"),t+=" </div>",t+=' <div class="tarteaucitron-cookie-buttons">',t+=' <span id="'+a.key+'Allowed" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+L.lang.allow+"</span>",t+=' <div class="tarteaucitron-switch" id="'+a.key+'Switch" onclick="GDPRConsent.respond(this, event);">',t+=' <button type="button" class="tarteaucitron-switch-button"></button>',t+=" </div> ",t+=' <span id="'+a.key+'Denied" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">'+L.lang.deny+"</span>",t+=" </div>",t+="</li>",s("tarteaucitron-services-title_"+a.type,"display","block"),null!==document.getElementById("tarteaucitron-services_"+a.type)&&(document.getElementById("tarteaucitron-services_"+a.type).innerHTML+=t),s("tarteaucitron-no-services-title","display","none"),k.order(a.type,L)),r?(!0!==L.launch[a.key]&&(L.launch[a.key]=!0,a.js(),n(a.key+"_loaded")),L.state[a.key]=!0):i?("function"==typeof a.fallback&&a.fallback(),L.state[a.key]=!1):!c&&l&&L.handleBrowserDNTRequest?(y.create(a.key,"false",L.parameters),"function"==typeof a.fallback&&a.fallback(),L.state[a.key]=!1):c||(y.create(a.key,"wait",L.parameters),"function"==typeof a.fallback&&a.fallback(),!0!==a.lazyConsent&&k.openAlert()),y.checkCount(a.key,a,L.lang),n(a.key+"_added")},cleanArray:function(e){let t;const a=e.length;let n=[];const o={},i=L.services;for(t=0;t<a;t+=1)o[e[t]]||(o[e[t]]={},void 0!==L.services[e[t]]&&n.push(e[t]));return n=n.sort((function(e,t){return i[e].type+i[e].key>i[t].type+i[t].key?1:i[e].type+i[e].key<i[t].type+i[t].key?-1:0})),n},closePanel:function(){k.closePanel(L)},openPanel:function(){k.openPanel(L)},respondEffect:function(e,t){k.respondEffect(e,t,L)},respondAll:function(e){k.respondAll(e,L,L.parameters)},respond:function(e,t){k.respond(e,L,L.parameters,t)},activate:function(e){k.activate(e,L,L.parameters)},toggle:function(e,t){k.toggle(e,t)}},T=L},579:(e,t,a)=>{const n=a(20).Z;e.exports=n},705:(e,t,a)=>{var n=a(639).Symbol;e.exports=n},932:e=>{e.exports=function(e,t){for(var a=-1,n=null==e?0:e.length,o=Array(n);++a<n;)o[a]=t(e[a],a,e);return o}},239:(e,t,a)=>{var n=a(705),o=a(607),i=a(333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},674:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},531:(e,t,a)=>{var n=a(705),o=a(932),i=a(469),s=a(448),r=n?n.prototype:void 0,c=r?r.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return c?c.call(t):"";var a=t+"";return"0"==a&&1/t==-1/0?"-0":a}},464:(e,t,a)=>{var n=a(674)({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=n},957:(e,t,a)=>{var n="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g;e.exports=n},607:(e,t,a)=>{var n=a(705),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,r=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,r),a=e[r];try{e[r]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[r]=a:delete e[r]),o}},333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:(e,t,a)=>{var n=a(957),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},187:(e,t,a)=>{var n=a(464),o=a(833),i=/[&<>"']/g,s=RegExp(i.source);e.exports=function(e){return(e=o(e))&&s.test(e)?e.replace(i,n):e}},469:e=>{var t=Array.isArray;e.exports=t},5:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},448:(e,t,a)=>{var n=a(239),o=a(5);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},833:(e,t,a)=>{var n=a(531);e.exports=function(e){return null==e?"":n(e)}}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,a),i.exports}return a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a(579)})()));
{
"name": "gdpr-consent",
"version": "1.0.5",
"version": "1.0.6",
"description": "GDPR banner to comply with the European cookie law. Inspired by tarteaucitronjs.",

@@ -11,9 +11,25 @@ "license": "MIT",

},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=v16.15.0"
"node": ">=16.15.1 || >=18.4.0"
},
"browserslist": "> 0.5%, last 3 versions, Firefox ESR, iOS >= 9",
"browserslist": [
"Chrome >= 60",
"Safari >= 12",
"iOS >= 12",
"Firefox >= 60",
"Edge >= 79"
],
"scripts": {
"freshlock": "rm -rf node_modules/ && rm .yarn/install-state.gz && rm -r .yarn/cache/ && rm yarn.lock && yarn",
"lint": "npx eslint --fix src/",
"stylelint-check": "stylelint-config-prettier-check",
"eslint-check": "eslint-config-prettier src/index.js",
"check-js": "eslint . --ext .js",
"check-sass": "stylelint **/*.scss",
"check-style": "prettier --check .",
"lint-js": "eslint . --fix --ext .js",
"lint-sass": "stylelint **/*.scss --fix",
"format": "prettier --write .",
"server": "webpack serve --mode development --config webpack.config.js --hot --open",

@@ -33,24 +49,27 @@ "build": "webpack --mode production --config webpack.config.js --progress"

"devDependencies": {
"@babel/core": "^7.18.2",
"@babel/preset-env": "^7.18.2",
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"babel-loader": "^8.2.5",
"css-loader": "^6.7.1",
"eslint": "^8.16.0",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.2.0",
"eslint-plugin-n": "^15.2.4",
"eslint-plugin-promise": "^6.0.0",
"lodash": "^4.17.21",
"mini-css-extract-plugin": "^2.6.0",
"mini-css-extract-plugin": "^2.6.1",
"postcss": "^8.4.14",
"sass": "^1.52.1",
"sass-loader": "^13.0.0",
"prettier": "^2.7.1",
"sass": "^1.54.0",
"sass-loader": "^13.0.2",
"style-loader": "^3.3.1",
"stylelint": "^14.8.5",
"stylelint": "^14.9.1",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-sass-guidelines": "^9.0.1",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.9.1"
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.3"
},
"packageManager": "yarn@3.2.1"
"packageManager": "yarn@3.2.2"
}
[![NPM version](https://badge.fury.io/js/gdpr-consent.svg)](http://badge.fury.io/js/gdpr-consent)
[![Build Status](https://travis-ci.org/lesjoursfr/gdpr-consent.svg?branch=master)](https://travis-ci.org/lesjoursfr/gdpr-consent)
[![QC Checks](https://github.com/lesjoursfr/gdpr-consent/actions/workflows/quality-control.yml/badge.svg)](https://github.com/lesjoursfr/gdpr-consent/actions/workflows/quality-control.yml)
gdpr-consent.js
================
# gdpr-consent.js
Comply to the european cookie law.

@@ -14,10 +14,9 @@ Inspired by [AmauriC/tarteaucitron.js](https://github.com/AmauriC/tarteaucitron.js/)

Clearly this script will:
- Disable all services by default,
- Display a banner on the first page view and a small one on other pages,
- Display a panel to allow or deny each services one by one,
- Activate services on the second page view if not denied,
- Store the consent in a cookie for 365 days.
- Disable all services by default,
- Display a banner on the first page view and a small one on other pages,
- Display a panel to allow or deny each services one by one,
- Activate services on the second page view if not denied,
- Store the consent in a cookie for 365 days.
# How to use

@@ -30,9 +29,9 @@

GDPRConsent.init({
"hashtag": "#tarteaucitron", /* Open the panel with this hashtag */
"cookieName": "tarteaucitron", /* Cookie name */
"timeExpire": 31536000000, /* Cookie expiration time */
"websiteName": "Les Jours", /* The name of the Website */
"AcceptAllCta" : true, /* Show the accept all button*/
"moreInfoLink": true, /* Show more info link */
"mandatory": false /* Show a message about mandatory cookies */
hashtag: "#tarteaucitron" /* Open the panel with this hashtag */,
cookieName: "tarteaucitron" /* Cookie name */,
timeExpire: 31536000000 /* Cookie expiration time */,
websiteName: "Les Jours" /* The name of the Website */,
AcceptAllCta: true /* Show the accept all button*/,
moreInfoLink: true /* Show more info link */,
mandatory: false /* Show a message about mandatory cookies */,
});

@@ -50,19 +49,21 @@ </script>

/* Add Google Tag Manager */
GDPRConsent.user.googletagmanagerId = 'GTMID';
GDPRConsent.job.push('googletagmanager');
GDPRConsent.user.googletagmanagerId = "GTMID";
GDPRConsent.job.push("googletagmanager");
/* Add Google Analytics (gtag.js) */
GDPRConsent.user.gtagUa = 'GAID';
GDPRConsent.user.gtagUa = "GAID";
GDPRConsent.user.gtagInitOptions = {};
GDPRConsent.job.push('gtag');
GDPRConsent.job.push("gtag");
/* Add Socials Sharing Services : Twitter & Facebook */
GDPRConsent.job.push('twitter');
window.fbAsyncInit = function() { FB.init({}); };
GDPRConsent.job.push('facebook');
GDPRConsent.job.push("twitter");
window.fbAsyncInit = function () {
FB.init({});
};
GDPRConsent.job.push("facebook");
/* Add Vidéos */
GDPRConsent.job.push('vimeo');
GDPRConsent.job.push('youtube');
GDPRConsent.job.push("vimeo");
GDPRConsent.job.push("youtube");
</script>
```
```

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

import './css/main.scss';
import { sendEvent } from './utils/event';
import { css } from './utils/dom';
import languages from './languages/index';
import services from './services/index';
import cookies from './modules/cookies';
import events from './modules/events';
import userInterface from './modules/user-interface';
import "./css/main.scss";
import { sendEvent } from "./utils/event";
import { css } from "./utils/dom";
import languages from "./languages/index";
import services from "./services/index";
import cookies from "./modules/cookies";
import events from "./modules/events";
import userInterface from "./modules/user-interface";
const escape = require('lodash/escape');
const escape = require("lodash/escape");

@@ -25,3 +25,3 @@ // eslint-disable-next-line one-var

init: function (params) {
'use strict';
"use strict";

@@ -32,19 +32,31 @@ GDPRConsent.parameters = params || {};

if (window.addEventListener) {
window.addEventListener('load', function () {
GDPRConsent.load();
}, false);
window.addEventListener('keydown', function (evt) {
events.keydownEvent(false, evt);
}, false);
window.addEventListener('hashchange', function () {
events.hashchangeEvent(GDPRConsent);
}, false);
window.addEventListener(
"load",
function () {
GDPRConsent.load();
},
false
);
window.addEventListener(
"keydown",
function (evt) {
events.keydownEvent(false, evt);
},
false
);
window.addEventListener(
"hashchange",
function () {
events.hashchangeEvent(GDPRConsent);
},
false
);
} else {
window.attachEvent('onload', function () {
window.attachEvent("onload", function () {
GDPRConsent.load();
});
window.attachEvent('onkeydown', function (evt) {
window.attachEvent("onkeydown", function (evt) {
events.keydownEvent(true, evt);
});
window.attachEvent('onhashchange', function () {
window.attachEvent("onhashchange", function () {
events.hashchangeEvent(GDPRConsent);

@@ -56,6 +68,6 @@ });

load: function () {
'use strict';
"use strict";
const defaults = {
hashtag: '#tarteaucitron',
cookieName: 'tarteaucitron',
hashtag: "#tarteaucitron",
cookieName: "tarteaucitron",
timeExpire: 31536000000,

@@ -65,3 +77,3 @@ websiteName: undefined,

moreInfoLink: true,
mandatory: true
mandatory: true,
};

@@ -85,11 +97,15 @@

const body = document.body;
const div = document.createElement('div');
let html = '';
const div = document.createElement("div");
let html = "";
let index;
let cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other'];
let cat = ["ads", "analytic", "api", "comment", "social", "support", "video", "other"];
let i;
cat = cat.sort(function (a, b) {
if (GDPRConsent.lang[a].title > GDPRConsent.lang[b].title) { return 1; }
if (GDPRConsent.lang[a].title < GDPRConsent.lang[b].title) { return -1; }
if (GDPRConsent.lang[a].title > GDPRConsent.lang[b].title) {
return 1;
}
if (GDPRConsent.lang[a].title < GDPRConsent.lang[b].title) {
return -1;
}
return 0;

@@ -100,3 +116,6 @@ });

// For the Pannel
html += '<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="' + GDPRConsent.lang.close + '"></button>';
html +=
'<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="' +
GDPRConsent.lang.close +
'"></button>';
html += '<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">';

@@ -108,22 +127,28 @@ html += ' <button type="button" id="tarteaucitron-close-panel" onclick="GDPRConsent.closePanel();">X</button>';

html += ' <div id="tarteaucitron-services-top">';
html += ' <span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">' + GDPRConsent.lang.title + '</span>';
html +=
' <span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">' +
GDPRConsent.lang.title +
"</span>";
html += ' <div id="tarteaucitron-info">';
html += ' ' + GDPRConsent.lang.disclaimer;
html += " " + GDPRConsent.lang.disclaimer;
if (GDPRConsent.parameters.websiteName) {
html += ' ' + GDPRConsent.lang.disclaimerWebsite + ' ' + escape(GDPRConsent.parameters.websiteName) + '.';
html += " " + GDPRConsent.lang.disclaimerWebsite + " " + escape(GDPRConsent.parameters.websiteName) + ".";
}
html += ' </div>';
html += " </div>";
// Accepter tout ou interdire tout
html += ' <div class="tarteaucitron-line">';
html += ' <span class="tarteaucitron-h3" role="heading" aria-level="2">' + GDPRConsent.lang.all + '</span>';
html +=
' <span class="tarteaucitron-h3" role="heading" aria-level="2">' + GDPRConsent.lang.all + "</span>";
html += ' <div class="tarteaucitron-ask">';
html += ' <button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true);">';
html += ' &#10003; ' + GDPRConsent.lang.allowAll;
html += ' </button> ';
html += ' <button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false);">';
html += ' &#10007; ' + GDPRConsent.lang.denyAll;
html += ' </button>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html +=
' <button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true);">';
html += " &#10003; " + GDPRConsent.lang.allowAll;
html += " </button> ";
html +=
' <button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false);">';
html += " &#10007; " + GDPRConsent.lang.denyAll;
html += " </button>";
html += " </div>";
html += " </div>";
html += " </div>";

@@ -136,11 +161,14 @@ // La liste des Services

html += ' <div class="tarteaucitron-cookie-text">';
html += ' <span class="tarteaucitron-h3" role="heading" aria-level="2">' + GDPRConsent.lang.mandatoryTitle + '</span>';
html += ' <span class="tarteaucitron-description">' + GDPRConsent.lang.mandatoryText + '</span>';
html += ' </div>';
html +=
' <span class="tarteaucitron-h3" role="heading" aria-level="2">' +
GDPRConsent.lang.mandatoryTitle +
"</span>";
html += ' <span class="tarteaucitron-description">' + GDPRConsent.lang.mandatoryText + "</span>";
html += " </div>";
html += ' <div class="tarteaucitron-cookie-buttons">';
html += ' <button type="button" class="tarteaucitron-allow solo">';
html += ' &#10003; ' + GDPRConsent.lang.allow;
html += ' </button> ';
html += ' </div>';
html += '</div>';
html += " &#10003; " + GDPRConsent.lang.allow;
html += " </button> ";
html += " </div>";
html += "</div>";
}

@@ -150,15 +178,27 @@ for (i = 0; i < cat.length; i += 1) {

html += ' <div class="tarteaucitron-title">';
html += " <button type=\"button\" onclick=\"GDPRConsent.toggle('tarteaucitron-details" + cat[i] + "', 'tarteaucitron-info-box');return false\">&#10011; " + GDPRConsent.lang[cat[i]].title + '</button>';
html += ' </div>';
html += ' <div id="tarteaucitron-details' + cat[i] + '" class="tarteaucitron-details tarteaucitron-info-box">';
html += ' ' + GDPRConsent.lang[cat[i]].details;
html += ' </div>';
html +=
' <button type="button" onclick="GDPRConsent.toggle(\'tarteaucitron-details' +
cat[i] +
"', 'tarteaucitron-info-box');return false\">&#10011; " +
GDPRConsent.lang[cat[i]].title +
"</button>";
html += " </div>";
html +=
' <div id="tarteaucitron-details' +
cat[i] +
'" class="tarteaucitron-details tarteaucitron-info-box">';
html += " " + GDPRConsent.lang[cat[i]].details;
html += " </div>";
html += ' <ul id="tarteaucitron-services_' + cat[i] + '"></ul></li>';
}
html += ' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">' + GDPRConsent.lang.noServices + '</li>';
html += ' </ul>';
html += ' <div class="tarteaucitron-hidden" id="tarteaucitron-scrollbar-child" style="height:20px;display:block"></div>';
html += ' </div>';
html += ' </div>';
html += '</div>';
html +=
' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">' +
GDPRConsent.lang.noServices +
"</li>";
html += " </ul>";
html +=
' <div class="tarteaucitron-hidden" id="tarteaucitron-scrollbar-child" style="height:20px;display:block"></div>';
html += " </div>";
html += " </div>";
html += "</div>";

@@ -168,58 +208,59 @@ // For the Banner

html += '<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">';
if (GDPRConsent.lang.siteDisclaimerTitle !== '' && GDPRConsent.lang.siteDisclaimerMessage !== '') {
if (GDPRConsent.lang.siteDisclaimerTitle !== "" && GDPRConsent.lang.siteDisclaimerMessage !== "") {
html += '<div id="tarteaucitron-wrapper">';
html += ' <div id="tarteaucitron-disclaimer-texte">';
html += ' <span id="tarteaucitron-site-disclaimer-title">';
html += ' ' + GDPRConsent.lang.siteDisclaimerTitle;
html += ' </span>';
html += " " + GDPRConsent.lang.siteDisclaimerTitle;
html += " </span>";
html += ' <span id="tarteaucitron-site-disclaimer-message">';
html += ' ' + GDPRConsent.lang.siteDisclaimerMessage;
html += ' </span>';
html += " " + GDPRConsent.lang.siteDisclaimerMessage;
html += " </span>";
}
html += ' <span id="tarteaucitron-disclaimer-alert">';
html += ' ' + GDPRConsent.lang.alertBigPrivacy;
html += ' </span>';
html += ' </div>';
html += " " + GDPRConsent.lang.alertBigPrivacy;
html += " </span>";
html += " </div>";
html += ' <div id="tarteaucitron-disclaimer-buttons">';
html += ' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.openPanel();">';
html += ' ' + GDPRConsent.lang.personalize;
html += ' </button>';
html += ' </div>';
html += ' </div>';
html += '</div>';
html += " " + GDPRConsent.lang.personalize;
html += " </button>";
html += " </div>";
html += " </div>";
html += "</div>";
} else {
html += '<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">';
if (GDPRConsent.lang.siteDisclaimerTitle !== '' && GDPRConsent.lang.siteDisclaimerMessage !== '') {
if (GDPRConsent.lang.siteDisclaimerTitle !== "" && GDPRConsent.lang.siteDisclaimerMessage !== "") {
html += '<div id="tarteaucitron-wrapper">';
html += ' <div id="tarteaucitron-disclaimer-texte">';
html += ' <span id="tarteaucitron-site-disclaimer-title">';
html += ' ' + GDPRConsent.lang.siteDisclaimerTitle;
html += ' </span>';
html += " " + GDPRConsent.lang.siteDisclaimerTitle;
html += " </span>";
html += ' <span id="tarteaucitron-site-disclaimer-message">';
html += ' ' + GDPRConsent.lang.siteDisclaimerMessage;
html += ' </span>';
html += " " + GDPRConsent.lang.siteDisclaimerMessage;
html += " </span>";
}
html += ' <span id="tarteaucitron-disclaimer-alert">';
html += ' ' + GDPRConsent.lang.alertBigPrivacy;
html += ' </span>';
html += ' </div>';
html += " " + GDPRConsent.lang.alertBigPrivacy;
html += " </span>";
html += " </div>";
html += ' <div id="tarteaucitron-disclaimer-buttons">';
html += ' <button type="button" id="tarteaucitron-continue" onclick="GDPRConsent.respondAll(false);">';
html += ' &rarr; ' + GDPRConsent.lang.continue;
html += ' </button>';
html += " &rarr; " + GDPRConsent.lang.continue;
html += " </button>";
html += ' <div id="tarteaucitron-group-buttons">';
html += ' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">';
html += ' &#10003; ' + GDPRConsent.lang.acceptAll;
html += ' </button>';
html +=
' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">';
html += " &#10003; " + GDPRConsent.lang.acceptAll;
html += " </button>";
html += ' <button type="button" id="tarteaucitron-close-alert" onclick="GDPRConsent.openPanel();">';
html += ' ' + GDPRConsent.lang.personalize;
html += ' </button>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += '</div>';
html += " " + GDPRConsent.lang.personalize;
html += " </button>";
html += " </div>";
html += " </div>";
html += " </div>";
html += "</div>";
}
div.id = 'tarteaucitron-root';
div.id = "tarteaucitron-root";

@@ -231,3 +272,3 @@ // Append tarteaucitron: #tarteaucitron-root last-child of the body

// Send an event
sendEvent('tac.root_available');
sendEvent("tac.root_available");

@@ -245,8 +286,10 @@ if (GDPRConsent.job !== undefined) {

// ie <9 hack
if (typeof GDPRConsent.job.indexOf === 'undefined') {
if (typeof GDPRConsent.job.indexOf === "undefined") {
GDPRConsent.job.indexOf = function (obj, start) {
let i;
const j = this.length;
for (i = (start || 0); i < j; i += 1) {
if (this[i] === obj) { return i; }
for (i = start || 0; i < j; i += 1) {
if (this[i] === obj) {
return i;
}
}

@@ -269,11 +312,17 @@ return -1;

addService: function (serviceId) {
'use strict';
let html = '';
"use strict";
let html = "";
const s = GDPRConsent.services;
const service = s[serviceId];
const cookie = cookies.read(GDPRConsent.parameters);
const isDenied = (cookie.indexOf(service.key + '=false') >= 0);
const isAllowed = ((cookie.indexOf(service.key + '=true') >= 0) || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0));
const isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0);
const isDNTRequested = (navigator.doNotTrack === '1' || navigator.doNotTrack === 'yes' || navigator.msDoNotTrack === '1' || window.doNotTrack === '1');
const isDenied = cookie.indexOf(service.key + "=false") >= 0;
const isAllowed =
cookie.indexOf(service.key + "=true") >= 0 ||
(!service.needConsent && cookie.indexOf(service.key + "=false") < 0);
const isResponded = cookie.indexOf(service.key + "=false") >= 0 || cookie.indexOf(service.key + "=true") >= 0;
const isDNTRequested =
navigator.doNotTrack === "1" ||
navigator.doNotTrack === "yes" ||
navigator.msDoNotTrack === "1" ||
window.doNotTrack === "1";
if (GDPRConsent.added[service.key] !== true) {

@@ -284,26 +333,46 @@ GDPRConsent.added[service.key] = true;

html += ' <div class="tarteaucitron-cookie-text">';
html += ' <span class="tarteaucitron-h3" role="heading" aria-level="3">' + service.name + '</span>';
html += ' <span class="tarteaucitron-h3" role="heading" aria-level="3">' + service.name + "</span>";
html += ' <span id="tacCL' + service.key + '" class="tarteaucitron-description"></span>';
if (GDPRConsent.parameters.moreInfoLink === true) {
html += ' <a href="' + service.uri + '" target="_blank" rel="noreferrer noopener" title="' + service.name + ' ' + GDPRConsent.lang.newWindow + '">';
html += ' ' + GDPRConsent.lang.source;
html += ' </a>';
html +=
' <a href="' +
service.uri +
'" target="_blank" rel="noreferrer noopener" title="' +
service.name +
" " +
GDPRConsent.lang.newWindow +
'">';
html += " " + GDPRConsent.lang.source;
html += " </a>";
}
html += ' </div>';
html += " </div>";
html += ' <div class="tarteaucitron-cookie-buttons">';
html += ' <span id="' + service.key + 'Allowed" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">' + GDPRConsent.lang.allow + '</span>';
html += ' <div class="tarteaucitron-switch" id="' + service.key + 'Switch" onclick="GDPRConsent.respond(this, event);">';
html +=
' <span id="' +
service.key +
'Allowed" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">' +
GDPRConsent.lang.allow +
"</span>";
html +=
' <div class="tarteaucitron-switch" id="' +
service.key +
'Switch" onclick="GDPRConsent.respond(this, event);">';
html += ' <button type="button" class="tarteaucitron-switch-button"></button>';
html += ' </div> ';
html += ' <span id="' + service.key + 'Denied" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">' + GDPRConsent.lang.deny + '</span>';
html += ' </div>';
html += '</li>';
html += " </div> ";
html +=
' <span id="' +
service.key +
'Denied" class="tarteaucitron-switch-state" onclick="GDPRConsent.respond(this, event);">' +
GDPRConsent.lang.deny +
"</span>";
html += " </div>";
html += "</li>";
css('tarteaucitron-services-title_' + service.type, 'display', 'block');
css("tarteaucitron-services-title_" + service.type, "display", "block");
if (document.getElementById('tarteaucitron-services_' + service.type) !== null) {
document.getElementById('tarteaucitron-services_' + service.type).innerHTML += html;
if (document.getElementById("tarteaucitron-services_" + service.type) !== null) {
document.getElementById("tarteaucitron-services_" + service.type).innerHTML += html;
}
css('tarteaucitron-no-services-title', 'display', 'none');
css("tarteaucitron-no-services-title", "display", "none");

@@ -317,7 +386,7 @@ userInterface.order(service.type, GDPRConsent);

service.js();
sendEvent(service.key + '_loaded');
sendEvent(service.key + "_loaded");
}
GDPRConsent.state[service.key] = true;
} else if (isDenied) {
if (typeof service.fallback === 'function') {
if (typeof service.fallback === "function") {
service.fallback();

@@ -327,4 +396,4 @@ }

} else if (!isResponded && isDNTRequested && GDPRConsent.handleBrowserDNTRequest) {
cookies.create(service.key, 'false', GDPRConsent.parameters);
if (typeof service.fallback === 'function') {
cookies.create(service.key, "false", GDPRConsent.parameters);
if (typeof service.fallback === "function") {
service.fallback();

@@ -334,4 +403,4 @@ }

} else if (!isResponded) {
cookies.create(service.key, 'wait', GDPRConsent.parameters);
if (typeof service.fallback === 'function') {
cookies.create(service.key, "wait", GDPRConsent.parameters);
if (typeof service.fallback === "function") {
service.fallback();

@@ -345,6 +414,6 @@ }

cookies.checkCount(service.key, service, GDPRConsent.lang);
sendEvent(service.key + '_added');
sendEvent(service.key + "_added");
},
cleanArray: function cleanArray (arr) {
'use strict';
cleanArray: function cleanArray(arr) {
"use strict";
let i;

@@ -366,4 +435,8 @@ const len = arr.length;

out = out.sort(function (a, b) {
if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
if (s[a].type + s[a].key > s[b].type + s[b].key) {
return 1;
}
if (s[a].type + s[a].key < s[b].type + s[b].key) {
return -1;
}
return 0;

@@ -394,5 +467,5 @@ });

userInterface.toggle(id, closeClass);
}
},
};
export default GDPRConsent;
/* globals module:true, require:true */
const GDPRConsent = require('./gdpr-consent').default;
const GDPRConsent = require("./gdpr-consent").default;
module.exports = GDPRConsent;

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

import fr from './lang.fr';
import en from './lang.en';
import { getLanguage } from '../utils/lang';
import fr from "./lang.fr";
import en from "./lang.en";
import { getLanguage } from "../utils/lang";

@@ -8,3 +8,3 @@ export default {

switch (getLanguage()) {
case 'fr':
case "fr":
return fr;

@@ -14,3 +14,3 @@ default:

}
}
},
};
const en = {
siteDisclaimerTitle: '«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»',
siteDisclaimerMessage: '<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',
siteDisclaimerTitle: "«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»",
siteDisclaimerMessage:
'<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',
alertBigScroll: 'By continuing to scroll,',
alertBigClick: 'If you continue to browse this website,',
alertBig: 'you are allowing all third-party services',
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',
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',
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',
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.',
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',
title: "Cookies management panel",
newWindow: "(new window)",
allowAll: "Allow all cookies",
denyAll: "Deny all cookies",
ads: {
title: 'Advertising network (to let us know)',
details: 'Ad networks can generate revenue by selling advertising space on the site.'
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.'
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.'
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.'
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.'
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.'
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, ...'
title: "Services",
details: "APIs are used to load scripts: geolocation, search engines, translations, ...",
},
other: {
title: 'Other',
details: 'Services to display web content.'
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.'
mandatoryTitle: "Mandatory cookies",
mandatoryText: "This site uses cookies necessary for its proper functioning which cannot be deactivated.",
};
export default en;
const fr = {
siteDisclaimerTitle: '«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»',
siteDisclaimerMessage: '<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',
siteDisclaimerTitle: "«&nbsp;Le site qui raconte l’actualité en séries&nbsp;»",
siteDisclaimerMessage:
'<i>Les&nbsp;Jours</i> sont un média <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours c’est quoi ?" href="/les-jours-c-quoi/">indépendant et sans pub</a> accessible par <a data-ga-type="click" data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Abonnement" href="/abonnement/jouriste">abonnement</a>. Découvrez <a data-ga-category="Bottom Bar" data-ga-action="Navigate" data-ga-label="Les Jours en Clair" href="/les-jours-en-clair/">notre zone gratuite</a>&nbsp;: l’actualité en profondeur, avec des épisodes, des personnages, des lieux.',
alertBigScroll: 'En continuant de défiler,',
alertBigClick: 'En poursuivant votre navigation,',
alertBig: 'vous acceptez l’utilisation de services tiers pouvant installer des cookies',
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',
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',
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',
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.',
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',
title: "Panneau de gestion des cookies",
newWindow: "(nouvelle fenêtre)",
allowAll: "Tout autoriser",
denyAll: "Tout interdire",
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.'
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.'
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.'
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é.'
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.'
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.'
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, ...'
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.'
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.'
mandatoryTitle: "Cookies obligatoires",
mandatoryText: "Ce site utilise des cookies nécessaires à son bon fonctionnement qui ne peuvent pas être désactivés.",
};
export default fr;
/* globals location:true */
const owner = {};
function crossIndexOf (arr, match) {
'use strict';
function crossIndexOf(arr, match) {
"use strict";
let i;

@@ -15,6 +15,6 @@ for (i = 0; i < arr.length; i += 1) {

function read (GDPRConsentParameters) {
'use strict';
const nameEQ = GDPRConsentParameters.cookieName + '=';
const ca = document.cookie.split(';');
function read(GDPRConsentParameters) {
"use strict";
const nameEQ = GDPRConsentParameters.cookieName + "=";
const ca = document.cookie.split(";");
let i;

@@ -25,3 +25,3 @@ let c;

c = ca[i];
while (c.charAt(0) === ' ') {
while (c.charAt(0) === " ") {
c = c.substring(1, c.length);

@@ -33,7 +33,7 @@ }

}
return '';
return "";
}
function create (key, status, GDPRConsentParameters) {
'use strict';
function create(key, status, GDPRConsentParameters) {
"use strict";

@@ -43,29 +43,33 @@ const d = new Date();

const expireTime = time + GDPRConsentParameters.timeExpire;
const regex = new RegExp('!' + key + '=(wait|true|false)', 'g');
const cookie = read(GDPRConsentParameters).replace(regex, '');
const value = GDPRConsentParameters.cookieName + '=' + cookie + '!' + key + '=' + status;
const regex = new RegExp("!" + key + "=(wait|true|false)", "g");
const cookie = read(GDPRConsentParameters).replace(regex, "");
const value = GDPRConsentParameters.cookieName + "=" + cookie + "!" + key + "=" + status;
d.setTime(expireTime);
document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;';
document.cookie = value + "; expires=" + d.toGMTString() + "; path=/;";
}
function purge (arr) {
'use strict';
function purge(arr) {
"use strict";
let i;
for (i = 0; i < arr.length; i += 1) {
document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
document.cookie = arr[i] + "=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;";
document.cookie = arr[i] + "=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=." + location.hostname + ";";
document.cookie =
arr[i] +
"=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=." +
location.hostname.split(".").slice(-2).join(".") +
";";
}
}
function checkCount (key, service, lang) {
'use strict';
function checkCount(key, service, lang) {
"use strict";
const arr = service.cookies;
const nb = arr.length;
let nbCurrent = 0;
let html = '';
let html = "";
let i;
const status = document.cookie.indexOf(key + '=true');
const status = document.cookie.indexOf(key + "=true");

@@ -76,3 +80,3 @@ if (status >= 0 && nb === 0) {

for (i = 0; i < nb; i += 1) {
if (document.cookie.indexOf(arr[i] + '=') !== -1) {
if (document.cookie.indexOf(arr[i] + "=") !== -1) {
nbCurrent += 1;

@@ -89,7 +93,7 @@ if (owner[arr[i]] === undefined) {

if (nbCurrent > 0) {
html += lang.useCookieCurrent + ' ' + nbCurrent + ' cookie';
html += lang.useCookieCurrent + " " + nbCurrent + " cookie";
if (nbCurrent > 1) {
html += 's';
html += "s";
}
html += '.';
html += ".";
} else {

@@ -101,11 +105,11 @@ html += lang.useNoCookie;

} else {
html += lang.useCookie + ' ' + nb + ' cookie';
html += lang.useCookie + " " + nb + " cookie";
if (nb > 1) {
html += 's';
html += "s";
}
html += '.';
html += ".";
}
if (document.getElementById('tacCL' + key) !== null) {
document.getElementById('tacCL' + key).innerHTML = html;
if (document.getElementById("tacCL" + key) !== null) {
document.getElementById("tacCL" + key).innerHTML = html;
}

@@ -118,3 +122,3 @@ }

purge,
checkCount
checkCount,
};

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

import userInterface from './user-interface';
import userInterface from "./user-interface";
function keydownEvent (isOldBrowser, evt) {
function keydownEvent(isOldBrowser, evt) {
if (evt.keyCode === 27) {

@@ -9,3 +9,3 @@ userInterface.closePanel();

function hashchangeEvent (GDPRConsent) {
function hashchangeEvent(GDPRConsent) {
if (document.location.hash === GDPRConsent.parameters.hashtag) {

@@ -18,3 +18,3 @@ userInterface.openPanel(GDPRConsent);

keydownEvent,
hashchangeEvent
hashchangeEvent,
};

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

import { searchElements, css, addClass, removeClass } from '../utils/dom';
import { sendEvent } from '../utils/event';
import cookies from './cookies';
import { searchElements, css, addClass, removeClass } from "../utils/dom";
import { sendEvent } from "../utils/event";
import cookies from "./cookies";
function closeAlert () {
'use strict';
const c = 'tarteaucitron';
css(c + '-percentage', 'display', 'none');
css(c + '-alert-big', 'display', 'none');
removeClass(c + '-root', 'tarteaucitron-before-visible');
function closeAlert() {
"use strict";
const c = "tarteaucitron";
css(c + "-percentage", "display", "none");
css(c + "-alert-big", "display", "none");
removeClass(c + "-root", "tarteaucitron-before-visible");
sendEvent('tac.close_alert');
sendEvent("tac.close_alert");
}
function openAlert () {
'use strict';
const c = 'tarteaucitron';
css(c + '-percentage', 'display', 'block');
css(c + '-alert-big', 'display', 'block');
addClass(c + '-root', 'tarteaucitron-before-visible');
function openAlert() {
"use strict";
const c = "tarteaucitron";
css(c + "-percentage", "display", "block");
css(c + "-alert-big", "display", "block");
addClass(c + "-root", "tarteaucitron-before-visible");
sendEvent('tac.open_alert');
sendEvent("tac.open_alert");
}
function closePanel (GDPRConsentState) {
'use strict';
function closePanel(GDPRConsentState) {
"use strict";
if (document.location.hash === GDPRConsentState.hashtag) {
if (window.history) {
window.history.replaceState('', document.title, window.location.pathname + window.location.search);
window.history.replaceState("", document.title, window.location.pathname + window.location.search);
} else {
document.location.hash = '';
document.location.hash = "";
}
}
css('tarteaucitron', 'display', 'none');
css("tarteaucitron", "display", "none");
searchElements(['tarteaucitron-info-box'], function (elem) {
elem.style.display = 'none';
searchElements(["tarteaucitron-info-box"], function (elem) {
elem.style.display = "none";
});

@@ -44,17 +44,17 @@

} else {
css('tarteaucitron-back', 'display', 'none');
css("tarteaucitron-back", "display", "none");
}
if (document.getElementById('tarteaucitron-close-alert') !== null) {
document.getElementById('tarteaucitron-close-alert').focus();
if (document.getElementById("tarteaucitron-close-alert") !== null) {
document.getElementById("tarteaucitron-close-alert").focus();
}
document.getElementsByTagName('body')[0].classList.remove('modal-open');
document.getElementsByTagName("body")[0].classList.remove("modal-open");
sendEvent('tac.close_panel');
sendEvent("tac.close_panel");
}
function respondEffect (key, choice, GDPRConsentState) {
'use strict';
const switchBtn = document.getElementById(key + 'Switch');
const allowedState = document.getElementById(key + 'Allowed');
const deniedState = document.getElementById(key + 'Denied');
function respondEffect(key, choice, GDPRConsentState) {
"use strict";
const switchBtn = document.getElementById(key + "Switch");
const allowedState = document.getElementById(key + "Allowed");
const deniedState = document.getElementById(key + "Denied");
let index;

@@ -67,16 +67,16 @@ let serviceId;

switchBtn.classList.remove('switch-denied');
switchBtn.classList.remove('switch-allowed');
allowedState.classList.remove('active');
deniedState.classList.remove('active');
switchBtn.classList.remove("switch-denied");
switchBtn.classList.remove("switch-allowed");
allowedState.classList.remove("active");
deniedState.classList.remove("active");
// Style des switch
if (choice === true) {
switchBtn.classList.add('switch-allowed');
switchBtn.children[0].innerHTML = '&#10003;';
allowedState.classList.add('active');
switchBtn.classList.add("switch-allowed");
switchBtn.children[0].innerHTML = "&#10003;";
allowedState.classList.add("active");
} else {
switchBtn.classList.add('switch-denied');
switchBtn.children[0].innerHTML = '&#10007;';
deniedState.classList.add('active');
switchBtn.classList.add("switch-denied");
switchBtn.children[0].innerHTML = "&#10007;";
deniedState.classList.add("active");
}

@@ -106,7 +106,7 @@

if (nbAllowed === GDPRConsentState.job.length) {
document.getElementById('tarteaucitron-all-denied').classList.remove('tarteaucitron-is-selected');
document.getElementById('tarteaucitron-all-allowed').classList.add('tarteaucitron-is-selected');
document.getElementById("tarteaucitron-all-denied").classList.remove("tarteaucitron-is-selected");
document.getElementById("tarteaucitron-all-allowed").classList.add("tarteaucitron-is-selected");
} else if (nbDenied === GDPRConsentState.job.length) {
document.getElementById('tarteaucitron-all-allowed').classList.remove('tarteaucitron-is-selected');
document.getElementById('tarteaucitron-all-denied').classList.add('tarteaucitron-is-selected');
document.getElementById("tarteaucitron-all-allowed").classList.remove("tarteaucitron-is-selected");
document.getElementById("tarteaucitron-all-denied").classList.add("tarteaucitron-is-selected");
}

@@ -116,4 +116,4 @@

if (choice === true) {
if (document.getElementById('tacCL' + key) !== null) {
document.getElementById('tacCL' + key).innerHTML = '...';
if (document.getElementById("tacCL" + key) !== null) {
document.getElementById("tacCL" + key).innerHTML = "...";
}

@@ -128,10 +128,10 @@ setTimeout(function () {

function openPanel (GDPRConsentState) {
'use strict';
function openPanel(GDPRConsentState) {
"use strict";
let index;
css('tarteaucitron', 'display', 'block');
css('tarteaucitron-back', 'display', 'block');
css("tarteaucitron", "display", "block");
css("tarteaucitron-back", "display", "block");
document.getElementById('tarteaucitron-close-panel').focus();
document.getElementsByTagName('body')[0].classList.add('modal-open');
document.getElementById("tarteaucitron-close-panel").focus();
document.getElementsByTagName("body")[0].classList.add("modal-open");

@@ -144,7 +144,7 @@ for (index = 0; index < GDPRConsentState.job.length; index++) {

sendEvent('tac.open_panel');
sendEvent("tac.open_panel");
}
function mouseXEvent (event) {
'use strict';
function mouseXEvent(event) {
"use strict";
const e = event;

@@ -154,4 +154,4 @@ return e.clientX;

function respondAll (status, GDPRConsentState, GDPRConsentParameters) {
'use strict';
function respondAll(status, GDPRConsentState, GDPRConsentParameters) {
"use strict";
const s = GDPRConsentState.services;

@@ -181,5 +181,5 @@ let service;

function respond (el, GDPRConsentState, GDPRConsentParameters, event) {
'use strict';
const key = el.id.replace(/(Eng[0-9]+|Allow|Deni)ed|Switch/g, '');
function respond(el, GDPRConsentState, GDPRConsentParameters, event) {
"use strict";
const key = el.id.replace(/(Eng[0-9]+|Allow|Deni)ed|Switch/g, "");
let status;

@@ -189,6 +189,7 @@ const mousePosition = mouseXEvent(event);

if (el.classList.contains('tarteaucitron-switch')) { // Cas 1 : Je clique sur le switch
if (el.classList.contains("tarteaucitron-switch")) {
// Cas 1 : Je clique sur le switch
// Je regarde si il a déjà été activé ou refusé...
if (GDPRConsentState.state[key] !== undefined) {
if (el.classList.contains('switch-denied')) {
if (el.classList.contains("switch-denied")) {
status = true;

@@ -198,3 +199,3 @@ } else {

}
} else if (mousePosition < (elPos.left) + ((el.clientWidth) / 2)) {
} else if (mousePosition < elPos.left + el.clientWidth / 2) {
status = true;

@@ -204,7 +205,8 @@ } else {

}
} else if (el.classList.contains('tarteaucitron-switch-state')) { // Cas 2 : Je clique sur "Autoriser" ou "Interdire"
} else if (el.classList.contains("tarteaucitron-switch-state")) {
// Cas 2 : Je clique sur "Autoriser" ou "Interdire"
// Je vérifie que je ne reclique pas sur la même valeur
if ((el.id.includes('Allowed')) && (GDPRConsentState.state[key] !== true)) {
if (el.id.includes("Allowed") && GDPRConsentState.state[key] !== true) {
status = true;
} else if ((el.id.includes('Denied')) && (GDPRConsentState.state[key] !== false)) {
} else if (el.id.includes("Denied") && GDPRConsentState.state[key] !== false) {
status = false;

@@ -216,9 +218,9 @@ } else {

if ((status === true) && (GDPRConsentState.launch[key] !== true)) {
if (status === true && GDPRConsentState.launch[key] !== true) {
GDPRConsentState.launch[key] = true;
sendEvent(key + '_loaded');
sendEvent(key + "_loaded");
GDPRConsentState.services[key].js();
}
if ((status === false) && (GDPRConsentState.launch[key] === true)) {
if (status === false && GDPRConsentState.launch[key] === true) {
GDPRConsentState.reloadThePage = true;

@@ -232,7 +234,7 @@ }

function activate (id, GDPRConsentState, GDPRConsentParameters) {
'use strict';
function activate(id, GDPRConsentState, GDPRConsentParameters) {
"use strict";
if (GDPRConsentState.launch[id] !== true) {
GDPRConsentState.launch[id] = true;
sendEvent(id + '_loaded');
sendEvent(id + "_loaded");
GDPRConsentState.services[id].js();

@@ -245,4 +247,4 @@ GDPRConsentState.state[id] = true;

function toggle (id, closeClass) {
'use strict';
function toggle(id, closeClass) {
"use strict";
const div = document.getElementById(id);

@@ -257,3 +259,3 @@

if (elem.id !== id) {
elem.style.display = 'none';
elem.style.display = "none";
}

@@ -263,12 +265,12 @@ });

if (div.style.display !== 'block') {
div.style.display = 'block';
if (div.style.display !== "block") {
div.style.display = "block";
} else {
div.style.display = 'none';
div.style.display = "none";
}
}
function order (id, GDPRConsentState) {
'use strict';
const main = document.getElementById('tarteaucitron-services_' + id);
function order(id, GDPRConsentState) {
"use strict";
const main = document.getElementById("tarteaucitron-services_" + id);

@@ -279,10 +281,23 @@ if (main === null) {

if (typeof Array.prototype.map === 'function' && typeof Enumerable === 'undefined') {
Array.prototype.map.call(main.children, Object).sort(function (a, b) {
if (GDPRConsentState.services[a.id.replace(/-line/g, '')].name > GDPRConsentState.services[b.id.replace(/-line/g, '')].name) { return 1; }
if (GDPRConsentState.services[a.id.replace(/-line/g, '')].name < GDPRConsentState.services[b.id.replace(/-line/g, '')].name) { return -1; }
return 0;
}).forEach(function (element) {
main.appendChild(element);
});
if (typeof Array.prototype.map === "function" && typeof Enumerable === "undefined") {
Array.prototype.map
.call(main.children, Object)
.sort(function (a, b) {
if (
GDPRConsentState.services[a.id.replace(/-line/g, "")].name >
GDPRConsentState.services[b.id.replace(/-line/g, "")].name
) {
return 1;
}
if (
GDPRConsentState.services[a.id.replace(/-line/g, "")].name <
GDPRConsentState.services[b.id.replace(/-line/g, "")].name
) {
return -1;
}
return 0;
})
.forEach(function (element) {
main.appendChild(element);
});
}

@@ -300,3 +315,3 @@ }

toggle,
order
order,
};

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

import { addScript } from '../utils/dom';
import { getLocale } from '../utils/lang';
import { addScript } from "../utils/dom";
import { getLocale } from "../utils/lang";
export default () => ({
key: 'facebook',
type: 'social',
name: 'Facebook',
uri: 'https://www.facebook.com/policies/cookies/',
key: "facebook",
type: "social",
name: "Facebook",
uri: "https://www.facebook.com/policies/cookies/",
needConsent: true,

@@ -13,5 +13,5 @@ lazyConsent: false,

js: function () {
'use strict';
addScript('//connect.facebook.net/' + getLocale() + '/sdk.js', 'facebook-jssdk');
}
"use strict";
addScript("//connect.facebook.net/" + getLocale() + "/sdk.js", "facebook-jssdk");
},
});
/* globals fbq: true */
import { addScript } from '../utils/dom';
import { addScript } from "../utils/dom";
export default (GDPRConsentUser) => ({
key: 'facebookpixel',
type: 'ads',
name: 'Facebook Pixel',
uri: 'https://www.facebook.com/policies/cookies/',
key: "facebookpixel",
type: "ads",
name: "Facebook Pixel",
uri: "https://www.facebook.com/policies/cookies/",
needConsent: true,
lazyConsent: false,
cookies: ['datr', 'fr', 'reg_ext_ref', 'reg_fb_gate', 'reg_fb_ref', 'sb', 'wd', 'x-src'],
cookies: ["datr", "fr", "reg_ext_ref", "reg_fb_gate", "reg_fb_ref", "sb", "wd", "x-src"],
js: function () {
'use strict';
if (window.fbq) { return; }
const n = window.fbq = function () {
n.callMethod
? n.callMethod.apply(n, arguments)
: n.queue.push(arguments);
};
if (!window._fbq) { window._fbq = n; }
"use strict";
if (window.fbq) {
return;
}
const n = (window.fbq = function () {
n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);
});
if (!window._fbq) {
window._fbq = n;
}
n.push = n;
n.loaded = !0;
n.version = '2.0';
n.version = "2.0";
n.queue = [];
addScript('//connect.facebook.net/en_US/fbevents.js', 'facebook-fbevents', function () {
addScript("//connect.facebook.net/en_US/fbevents.js", "facebook-fbevents", function () {
// eslint-disable-next-line no-undef
fbq('init', GDPRConsentUser.fbPixelId);
fbq('track', 'PageView');
fbq("init", GDPRConsentUser.fbPixelId);
fbq("track", "PageView");
});
}
},
});

@@ -1,13 +0,36 @@

import { addScript } from '../utils/dom';
import { addScript } from "../utils/dom";
export default (GDPRConsentUser) => ({
key: 'googletagmanager',
type: 'api',
name: 'Google Tag Manager',
uri: 'https://adssettings.google.com/',
key: "googletagmanager",
type: "api",
name: "Google Tag Manager",
uri: "https://adssettings.google.com/",
needConsent: true,
lazyConsent: false,
cookies: ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', '__gads', '_drt_', 'FLC', 'exchange_uid', 'id', 'fc', 'rrs', 'rds', 'rv', 'uid', 'UIDR', 'UID', 'clid', 'ipinfo', 'acs'],
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 () {
'use strict';
"use strict";
if (GDPRConsentUser.googletagmanagerId === undefined) {

@@ -18,7 +41,7 @@ return;

window.dataLayer.push({
'gtm.start': new Date().getTime(),
event: 'gtm.js'
"gtm.start": new Date().getTime(),
event: "gtm.js",
});
addScript('https://www.googletagmanager.com/gtm.js?id=' + GDPRConsentUser.googletagmanagerId);
}
addScript("https://www.googletagmanager.com/gtm.js?id=" + GDPRConsentUser.googletagmanagerId);
},
});
/* globals gtag: true */
import { addScript } from '../utils/dom';
import { addScript } from "../utils/dom";
export default (GDPRConsentUser) => ({
key: 'gtag',
type: 'analytic',
name: 'Google Analytics (gtag.js)',
uri: 'https://support.google.com/analytics/answer/6004245',
key: "gtag",
type: "analytic",
name: "Google Analytics (gtag.js)",
uri: "https://support.google.com/analytics/answer/6004245",
needConsent: true,

@@ -13,25 +13,26 @@ lazyConsent: false,

// Add _gat_gtag_UA_XXXXXXX_XX cookie to cookies array
let gatGtagUaCookie = '_gat_gtag_' + GDPRConsentUser.gtagUa;
gatGtagUaCookie = gatGtagUaCookie.replace(/-/g, '_');
return ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', gatGtagUaCookie];
let gatGtagUaCookie = "_gat_gtag_" + GDPRConsentUser.gtagUa;
gatGtagUaCookie = gatGtagUaCookie.replace(/-/g, "_");
return ["_ga", "_gat", "_gid", "__utma", "__utmb", "__utmc", "__utmt", "__utmz", gatGtagUaCookie];
})(),
js: function () {
'use strict';
"use strict";
window.dataLayer = window.dataLayer || [];
addScript('https://www.googletagmanager.com/gtag/js?id=' + GDPRConsentUser.gtagUa, '', function () {
// eslint-disable-next-line no-undef
window.gtag = function gtag () { dataLayer.push(arguments); };
gtag('js', new Date());
addScript("https://www.googletagmanager.com/gtag/js?id=" + GDPRConsentUser.gtagUa, "", function () {
window.gtag = function gtag() {
window.dataLayer.push(arguments);
};
gtag("js", new Date());
if (GDPRConsentUser.gtagInitOptions) {
gtag('config', GDPRConsentUser.gtagUa, GDPRConsentUser.gtagInitOptions);
gtag("config", GDPRConsentUser.gtagUa, GDPRConsentUser.gtagInitOptions);
} else {
gtag('config', GDPRConsentUser.gtagUa);
gtag("config", GDPRConsentUser.gtagUa);
}
if (typeof GDPRConsentUser.gtagMore === 'function') {
if (typeof GDPRConsentUser.gtagMore === "function") {
GDPRConsentUser.gtagMore();
}
});
}
},
});

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

import facebook from './facebook';
import facebookpixel from './facebookpixel';
import googletagmanager from './googletagmanager';
import gtag from './gtag';
import twitter from './twitter';
import vimeo from './vimeo';
import youtube from './youtube';
import facebook from "./facebook";
import facebookpixel from "./facebookpixel";
import googletagmanager from "./googletagmanager";
import gtag from "./gtag";
import twitter from "./twitter";
import vimeo from "./vimeo";
import youtube from "./youtube";

@@ -18,5 +18,5 @@ export default {

vimeo: vimeo(GDPRConsentUser),
youtube: youtube(GDPRConsentUser)
youtube: youtube(GDPRConsentUser),
};
}
},
};

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

import { addScript } from '../utils/dom';
import { addScript } from "../utils/dom";
export default () => ({
key: 'twitter',
type: 'social',
name: 'Twitter',
uri: 'https://support.twitter.com/articles/20170514',
key: "twitter",
type: "social",
name: "Twitter",
uri: "https://support.twitter.com/articles/20170514",
needConsent: true,

@@ -12,5 +12,5 @@ lazyConsent: false,

js: function () {
'use strict';
addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
}
"use strict";
addScript("//platform.twitter.com/widgets.js", "twitter-wjs");
},
});

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

const escape = require('lodash/escape');
const escape = require("lodash/escape");
export default () => ({
key: 'vimeo',
type: 'video',
name: 'Vimeo',
uri: 'https://vimeo.com/privacy',
key: "vimeo",
type: "video",
name: "Vimeo",
uri: "https://vimeo.com/privacy",
needConsent: true,
lazyConsent: true,
cookies: ['__utmt_player', '__utma', '__utmb', '__utmc', '__utmv', 'vuid', '__utmz', 'player'],
cookies: ["__utmt_player", "__utma", "__utmb", "__utmc", "__utmv", "vuid", "__utmz", "player"],
js: function () {
'use strict';
const div = document.getElementsByTagName('div');
const cardClass = 'tarteaucitron-vimeo';
"use strict";
const div = document.getElementsByTagName("div");
const cardClass = "tarteaucitron-vimeo";
let i;

@@ -20,3 +20,3 @@ let videoUrl;

if (div[i].classList.contains(cardClass)) {
videoUrl = div[i].getAttribute('data-tarteaucitron-src');
videoUrl = div[i].getAttribute("data-tarteaucitron-src");
div[i].innerHTML = '<iframe src="' + escape(videoUrl) + '" frameborder="0" allowfullscreen="true"></iframe>';

@@ -27,5 +27,5 @@ }

fallback: function () {
'use strict';
const div = document.getElementsByTagName('div');
const cardClass = 'tarteaucitron-vimeo';
"use strict";
const div = document.getElementsByTagName("div");
const cardClass = "tarteaucitron-vimeo";
let i;

@@ -36,7 +36,12 @@ let videoUrl;

if (div[i].classList.contains(cardClass)) {
videoUrl = div[i].getAttribute('data-tarteaucitron-src');
div[i].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=\"" + escape(videoUrl) + '" class="tarteaucitron-card-url" target="_blank">&rarr; ' + escape(videoUrl) + '</a></div>';
videoUrl = div[i].getAttribute("data-tarteaucitron-src");
div[i].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="' +
escape(videoUrl) +
'" class="tarteaucitron-card-url" target="_blank">&rarr; ' +
escape(videoUrl) +
"</a></div>";
}
}
}
},
});

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

const escape = require('lodash/escape');
const escape = require("lodash/escape");
export default () => ({
key: 'youtube',
type: 'video',
name: 'YouTube',
uri: 'https://policies.google.com/privacy',
key: "youtube",
type: "video",
name: "YouTube",
uri: "https://policies.google.com/privacy",
needConsent: true,
lazyConsent: true,
cookies: ['VISITOR_INFO1_LIVE', 'YSC', 'PREF', 'GEUP'],
cookies: ["VISITOR_INFO1_LIVE", "YSC", "PREF", "GEUP"],
js: function () {
'use strict';
const div = document.getElementsByTagName('div');
const cardClass = 'tarteaucitron-youtube';
"use strict";
const div = document.getElementsByTagName("div");
const cardClass = "tarteaucitron-youtube";
for (let i = 0; i < div.length; i++) {
if (div[i].classList.contains(cardClass)) {
const videoUrl = div[i].getAttribute('data-tarteaucitron-src');
const videoUrl = div[i].getAttribute("data-tarteaucitron-src");
div[i].innerHTML = '<iframe src="' + escape(videoUrl) + '" frameborder="0" allowfullscreen="true"></iframe>';

@@ -24,5 +24,5 @@ }

fallback: function () {
'use strict';
const div = document.getElementsByTagName('div');
const cardClass = 'tarteaucitron-youtube';
"use strict";
const div = document.getElementsByTagName("div");
const cardClass = "tarteaucitron-youtube";
let videoUrl;

@@ -33,7 +33,12 @@ let i;

if (div[i].classList.contains(cardClass)) {
videoUrl = div[i].getAttribute('data-tarteaucitron-src');
div[i].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=\"" + escape(videoUrl) + '" class="tarteaucitron-card-url" target="_blank">&rarr; ' + escape(videoUrl) + '</a></div>';
videoUrl = div[i].getAttribute("data-tarteaucitron-src");
div[i].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="' +
escape(videoUrl) +
'" class="tarteaucitron-card-url" target="_blank">&rarr; ' +
escape(videoUrl) +
"</a></div>";
}
}
}
},
});

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

export function addScript (url, id, callback, execute, attrName, attrVal) {
'use strict';
export function addScript(url, id, callback, execute, attrName, attrVal) {
"use strict";
let script;

@@ -7,9 +7,9 @@ let done = false;

if (execute === false) {
if (typeof callback === 'function') {
if (typeof callback === "function") {
callback();
}
} else {
script = document.createElement('script');
script.type = 'text/javascript';
script.id = (id !== undefined) ? id : '';
script = document.createElement("script");
script.type = "text/javascript";
script.id = id !== undefined ? id : "";
script.async = true;

@@ -22,3 +22,3 @@ script.src = url;

if (typeof callback === 'function') {
if (typeof callback === "function") {
script.onreadystatechange = script.onload = function () {

@@ -33,9 +33,9 @@ const state = script.readyState;

document.getElementsByTagName('head')[0].appendChild(script);
document.getElementsByTagName("head")[0].appendChild(script);
}
}
export function searchElements (className, fn) {
'use strict';
const elems = document.getElementsByTagName('*');
export function searchElements(className, fn) {
"use strict";
const elems = document.getElementsByTagName("*");
let i;

@@ -47,3 +47,3 @@ let index = 0;

for (index = 0; index < className.length; index += 1) {
if ((' ' + elems[i].className + ' ').indexOf(' ' + className[index] + ' ') > -1) {
if ((" " + elems[i].className + " ").indexOf(" " + className[index] + " ") > -1) {
fn(elems[i]);

@@ -56,4 +56,4 @@ }

export function css (id, property, value) {
'use strict';
export function css(id, property, value) {
"use strict";
if (document.getElementById(id) !== null) {

@@ -64,4 +64,4 @@ document.getElementById(id).style[property] = value;

export function addClass (id, className) {
'use strict';
export function addClass(id, className) {
"use strict";
if (document.getElementById(id) !== null) {

@@ -72,4 +72,4 @@ document.getElementById(id).classList.add(className);

export function removeClass (id, className) {
'use strict';
export function removeClass(id, className) {
"use strict";
if (document.getElementById(id) !== null) {

@@ -76,0 +76,0 @@ document.getElementById(id).classList.remove(className);

/* globals Event:true */
export function sendEvent (eventKey) {
export function sendEvent(eventKey) {
if (eventKey !== undefined) {
// ie compatibility
let sendEventItem;
if (typeof (Event) === 'function') {
if (typeof Event === "function") {
sendEventItem = new Event(eventKey);
} else {
sendEventItem = document.createEvent('Event');
sendEventItem = document.createEvent("Event");
sendEventItem.initEvent(eventKey, true, true);

@@ -11,0 +11,0 @@ }

@@ -1,10 +0,13 @@

const availableLanguages = 'en,fr';
const defaultLanguage = 'en';
const availableLanguages = "en,fr";
const defaultLanguage = "en";
export function getLanguage () {
'use strict';
export function getLanguage() {
"use strict";
if (!navigator) { return 'en'; }
if (!navigator) {
return "en";
}
const lang = navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null;
const lang =
navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null;
const userLanguage = lang ? lang.substr(0, 2) : null;

@@ -18,14 +21,17 @@

export function getLocale () {
'use strict';
if (!navigator) { return 'en_US'; }
export function getLocale() {
"use strict";
if (!navigator) {
return "en_US";
}
const lang = navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null;
const lang =
navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null;
const userLanguage = lang ? lang.substr(0, 2) : null;
if (userLanguage === 'fr') {
return 'fr_FR';
if (userLanguage === "fr") {
return "fr_FR";
} else {
return 'en_US';
return "en_US";
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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