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
48
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 0.7.0 to 0.8.0

src/css/_bandeau.scss

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={927: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 i(e,t,a,n,i,o){var r,s=!1;!1===n?"function"==typeof a&&a():((r=document.createElement("script")).type="text/javascript",r.id=void 0!==t?t:"",r.async=!0,r.src=e,void 0!==i&&void 0!==o&&r.setAttribute(i,o),"function"==typeof a&&(r.onreadystatechange=r.onload=function(){var e=r.readyState;s||e&&!/loaded|complete/.test(e)||(s=!0,a())}),document.getElementsByTagName("head")[0].appendChild(r))}function o(e,t){var a,n=document.getElementsByTagName("*"),i=0;for(a in n)if(void 0!==n[a])for(i=0;i<e.length;i+=1)(" "+n[a].className+" ").indexOf(" "+e[i]+" ")>-1&&t(n[a])}function r(e,t,a){null!==document.getElementById(e)&&(document.getElementById(e).style[t]=a)}function s(e,t){null!==document.getElementById(e)&&document.getElementById(e).classList.add(t)}function l(e,t){null!==document.getElementById(e)&&document.getElementById(e).classList.remove(t)}a.d(t,{Z:function(){return T}});var 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:"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:"OK, tout 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:"Autoriser tous les cookies",denyAll:"Interdire tous les cookies",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."},d={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",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."},u=e=>({key:"facebookpixel",type:"ads",name:"Facebook Pixel",uri:"https://www.facebook.com/policies/cookies/",needConsent:!0,cookies:["datr","fr","reg_ext_ref","reg_fb_gate","reg_fb_ref","sb","wd","x-src"],js:function(){var t;window.fbq||(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=[],i("//connect.facebook.net/en_US/fbevents.js","facebook-fbevents",(function(){fbq("init",e.fbPixelId),fbq("track","PageView")})))}}),g=e=>({key:"googletagmanager",type:"api",name:"Google Tag Manager",uri:"https://adssettings.google.com/",needConsent:!0,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"}),i("https://www.googletagmanager.com/gtm.js?id="+e.googletagmanagerId))}}),p=e=>{return{key:"gtag",type:"analytic",name:"Google Analytics (gtag.js)",uri:"https://support.google.com/analytics/answer/6004245",needConsent:!0,cookies:(t="_gat_gtag_"+e.gtagUa,["_ga","_gat","_gid","__utma","__utmb","__utmc","__utmt","__utmz",t=t.replace(/-/g,"_")]),js:function(){window.dataLayer=window.dataLayer||[],i("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()}))}};var t};const m={};function f(e,t){var a;for(a=0;a<e.length;a+=1)if(e[a]===t)return!0;return!1}function v(e){var t,a,n=e.cookieName+"=",i=document.cookie.split(";");for(t=0;t<i.length;t+=1){for(a=i[t];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(n))return a.substring(n.length,a.length)}return""}var y={read:v,create:function(e,t,a){var n=new Date,i=n.getTime()+a.timeExpire,o=new RegExp("!"+e+"=(wait|true|false)","g"),r=v(a).replace(o,""),s=a.cookieName+"="+r+"!"+e+"="+t;n.setTime(i),document.cookie=s+"; expires="+n.toGMTString()+"; path=/;"},purge:function(e){var 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){var n,i=t.cookies,o=i.length,r=0,s="",l=document.cookie.indexOf(e+"=true");if(l>=0&&0===o)s+=a.useNoCookie;else if(l>=0){for(n=0;n<o;n+=1)-1!==document.cookie.indexOf(i[n]+"=")&&(r+=1,void 0===m[i[n]]&&(m[i[n]]=[]),!1===f(m[i[n]],t.name)&&m[i[n]].push(t.name));r>0?(s+=a.useCookieCurrent+" "+r+" cookie",r>1&&(s+="s"),s+="."):s+=a.useNoCookie}else 0===o?s=a.noCookie:(s+=a.useCookie+" "+o+" cookie",o>1&&(s+="s"),s+=".");null!==document.getElementById("tacCL"+e)&&(document.getElementById("tacCL"+e).innerHTML=s)}};function h(e){"main"===e&&null!==document.getElementById("tarteaucitron")&&null!==document.getElementById("tarteaucitron-main-line")&&(r("tarteaucitron-services","height","auto"),r("tarteaucitron-services","height",document.getElementById("tarteaucitron").offsetHeight+"px"),r("tarteaucitron-services","overflow-x","auto"))}function b(){var e="tarteaucitron";r(e+"-percentage","display","none"),r(e+"-alert-big","display","none"),l(e+"-root","tarteaucitron-before-visible"),n("tac.close_alert")}function k(e,t,a){var n,i="tarteaucitron",o=0,c=0,d=0,u=a.job.length;for(!0===t?(document.getElementById(e+"-line").classList.add("tarteaucitron-is-allowed"),document.getElementById(e+"-line").classList.remove("tarteaucitron-is-denied")):!1===t&&(document.getElementById(e+"-line").classList.remove("tarteaucitron-is-allowed"),document.getElementById(e+"-line").classList.add("tarteaucitron-is-denied")),n=0;n<u;n+=1)!1===a.state[a.job[n]]?o+=1:void 0===a.state[a.job[n]]?c+=1:!0===a.state[a.job[n]]&&(d+=1);r(i+"-dot-green","width",100/u*d+"%"),r(i+"-dot-yellow","width",100/u*c+"%"),r(i+"-dot-red","width",100/u*o+"%"),0===o&&0===c?(l(i+"-all-denied",i+"-is-selected"),s(i+"-all-allowed",i+"-is-selected"),s(i+"-main-line-offset",i+"-is-allowed"),l(i+"-main-line-offset",i+"-is-denied")):0===d&&0===c?(l(i+"-all-allowed",i+"-is-selected"),s(i+"-all-denied",i+"-is-selected"),l(i+"-main-line-offset",i+"-is-allowed"),s(i+"-main-line-offset",i+"-is-denied")):(l(i+"-all-allowed",i+"-is-selected"),l(i+"-all-denied",i+"-is-selected"),l(i+"-main-line-offset",i+"-is-allowed"),l(i+"-main-line-offset",i+"-is-denied")),0===c&&b(),a.services[e].cookies.length>0&&!1===t&&y.purge(a.services[e].cookies),!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 w={jsSizing:h,closePanel:function(e){document.location.hash===e.hashtag&&(window.history?window.history.replaceState("",document.title,window.location.pathname+window.location.search):document.location.hash=""),r("tarteaucitron","display","none"),o(["tarteaucitron-info-box"],(function(e){e.style.display="none"})),!0===e.reloadThePage?window.location.reload():r("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(){r("tarteaucitron","display","block"),r("tarteaucitron-back","display","block"),document.getElementById("tarteaucitron-close-panel").focus(),document.getElementsByTagName("body")[0].classList.add("modal-open"),h("main"),n("tac.open_panel")},closeAlert:b,openAlert:function(){var e="tarteaucitron";r(e+"-percentage","display","block"),r(e+"-alert-big","display","block"),s(e+"-root","tarteaucitron-before-visible"),n("tac.open_alert")},color:k,respondAll:function(e,t,a){var n,i=t.services,o=0;for(o=0;o<t.job.length;o+=1)n=i[t.job[o]].key,t.state[n]!==e&&(!1===e&&!0===t.launch[n]&&(t.reloadThePage=!0),!0!==t.launch[n]&&!0===e&&(t.launch[n]=!0,t.services[n].js()),t.state[n]=e,y.create(n,e,a),k(n,e,t))},respond:function(e,t,a,i){var o=e.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed","g"),"");a.state[o]!==t&&(!1===t&&!0===a.launch[o]&&(a.reloadThePage=!0),!0===t&&!0!==a.launch[o]&&(a.launch[o]=!0,n(o+"_loaded"),a.services[o].js()),a.state[o]=t,y.create(o,t,i),k(o,t,a))},toggle:function(e,t){var a=document.getElementById(e);null!==a&&(void 0!==t&&o([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){var 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)}))}},C=function(e,t){27===t.keyCode&&w.closePanel()},_=function(e){document.location.hash===e.hashtag&&w.openPanel()},E=function(){var e=document.getElementById("tarteaucitron");e&&"block"===e.style.display&&w.jsSizing("main")},B=function(e,t,a){var n,i=window.pageYOffset||document.documentElement.scrollTop,o=document.getElementById("tarteaucitron-percentage"),r=document.getElementById("tarteaucitron-alert-big");r&&!t.highPrivacy&&"block"===r.style.display&&(n=r.offsetHeight+"px",i>2*screen.height?w.respondAll(!0,e,t):i>screen.height/2&&(document.getElementById("tarteaucitron-disclaimer-alert").innerHTML="<strong>"+a.alertBigScroll+"</strong> "+a.alertBig),o&&(o.style.bottom=n,o.style.width=100/(2*screen.height)*i+"%"))};const 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("scroll",(function(){B(L,L.parameters,L.lang)}),!1),window.addEventListener("keydown",(function(e){C(!1,e)}),!1),window.addEventListener("hashchange",(function(){_(L.parameters)}),!1),window.addEventListener("resize",(function(){E()}),!1)):(window.attachEvent("onload",(function(){L.load()})),window.attachEvent("onscroll",(function(){B(L.parameters)})),window.attachEvent("onkeydown",(function(e){C(!0,e)})),window.attachEvent("onhashchange",(function(){_(L.parameters)})),window.attachEvent("onresize",(function(){E()}))))},load:function(){var e,t={hashtag:"#tarteaucitron",cookieName:"tarteaucitron",timeExpire:31536e6,websiteName:void 0,highPrivacy:!1,AcceptAllCta:!0,moreInfoLink:!0,mandatory:!0};if(void 0!==L.parameters)for(var a in t)Object.prototype.hasOwnProperty.call(L.parameters,a)||(L.parameters[a]=t[a]);L.lang=(()=>{switch(function(){if(!navigator)return"en";let 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}()){case"fr":return c;default:return d}})(),L.services=(e=L.user,{facebook:{key:"facebook",type:"social",name:"Facebook",uri:"https://www.facebook.com/policies/cookies/",needConsent:!0,cookies:[],js:function(){i("//connect.facebook.net/"+function(){if(!navigator)return"en_US";let 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:u(e),googletagmanager:g(e),gtag:p(e),twitter:{key:"twitter",type:"social",name:"Twitter",uri:"https://support.twitter.com/articles/20170514",needConsent:!0,cookies:[],js:function(){i("//platform.twitter.com/widgets.js","twitter-wjs")}}});var o,r,s=document.body,l=document.createElement("div"),m="",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})),m+='<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="'+L.lang.close+'"></button>',m+='<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">',m+=' <button type="button" id="tarteaucitron-close-panel" onclick="GDPRConsent.closePanel();">&#128473;</button>',m+=' <div id="tarteaucitron-services">',m+=' <div id="tarteaucitron-main-line">',m+=' <span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">'+L.lang.title+"</span>",m+=' <div id="tarteaucitron-info">',m+=" "+L.lang.disclaimer,L.parameters.websiteName&&(m+=" "+L.lang.disclaimerWebsite+" "+L.parameters.websiteName+"."),m+=" </div>",m+=' <div class="tarteaucitron-line">',m+=' <div class="tarteaucitron-name">',m+=' <span class="tarteaucitron-h2" role="heading" aria-level="2">'+L.lang.all+"</span>",m+=" </div>",m+=' <div class="tarteaucitron-ask">',m+=' <button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true);">',m+=" &#10003; "+L.lang.allowAll,m+=" </button> ",m+=' <button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false);">',m+=" &#10007; "+L.lang.denyAll,m+=" </button>",m+=" </div>",m+=" </div>",m+=" </div>",m+=' <div class="tarteaucitron-services-list">',m+=' <div class="clear"></div><ul>',!0===L.parameters.mandatory&&(m+='<li id="tarteaucitron-services-title_mandatory">',m+='<div class="tarteaucitron-title">',m+=' <button type="button">&nbsp; '+L.lang.mandatoryTitle+"</button>",m+="</div>",m+='<ul id="tarteaucitron-services_mandatory">',m+='<li class="tarteaucitron-line">',m+=' <div class="tarteaucitron-name">',m+=' <span class="tarteaucitron-h3" role="heading" aria-level="3">'+L.lang.mandatoryText+"</span>",m+=' <span class="tarteaucitron-list-cookies"></span><br/>',m+=" </div>",m+=' <div class="tarteaucitron-ask">',m+=' <button type="button" class="tarteaucitron-allow">',m+=" &#10003; "+L.lang.allow,m+=" </button> ",m+=" </div>",m+="</li>",m+="</ul></li>"),r=0;r<f.length;r+=1)m+=' <li id="tarteaucitron-services-title_'+f[r]+'" class="tarteaucitron-hidden">',m+=' <div class="tarteaucitron-title">',m+=' <button type="button" onclick="GDPRConsent.toggle(\'tarteaucitron-details'+f[r]+"', 'tarteaucitron-info-box');return false\">&#10011; "+L.lang[f[r]].title+"</button>",m+=" </div>",m+=' <div id="tarteaucitron-details'+f[r]+'" class="tarteaucitron-details tarteaucitron-info-box">',m+=" "+L.lang[f[r]].details,m+=" </div>",m+=' <ul id="tarteaucitron-services_'+f[r]+'"></ul></li>';if(m+=' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">'+L.lang.noServices+"</li>",m+=" </ul>",m+=' <div class="tarteaucitron-hidden" id="tarteaucitron-scrollbar-child" style="height:20px;display:block"></div>',m+=" </div>",m+=" </div>",m+="</div>",L.parameters.highPrivacy&&!L.parameters.AcceptAllCta?(m+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==L.lang.siteDisclaimerTitle&&""!==L.lang.siteDisclaimerMessage&&(m+=' <span id="tarteaucitron-site-disclaimer-title">',m+=" "+L.lang.siteDisclaimerTitle,m+=" </span>",m+=" <br />",m+=" <br />",m+=' <span id="tarteaucitron-site-disclaimer-message">',m+=" "+L.lang.siteDisclaimerMessage,m+=" </span>",m+=" <br />"),m+=' <span id="tarteaucitron-disclaimer-alert">',m+=" "+L.lang.alertBigPrivacy,m+=" </span>",m+=' <span id="tarteaucitron-disclaimer-buttons">',m+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.openPanel();">',m+=" "+L.lang.personalize,m+=" </button>",m+=" </span>",m+="</div>"):(m+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==L.lang.siteDisclaimerTitle&&""!==L.lang.siteDisclaimerMessage&&(m+=' <span id="tarteaucitron-site-disclaimer-title">',m+=" "+L.lang.siteDisclaimerTitle,m+=" </span>",m+=" <br />",m+=" <br />",m+=' <span id="tarteaucitron-site-disclaimer-message">',m+=" "+L.lang.siteDisclaimerMessage,m+=" </span>",m+=" <br />"),m+=' <span id="tarteaucitron-disclaimer-alert">',L.parameters.highPrivacy?m+=" "+L.lang.alertBigPrivacy:m+=" "+L.lang.alertBigClick+" "+L.lang.alertBig,m+=" </span>",m+=' <span id="tarteaucitron-disclaimer-buttons">',m+=' <button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">',m+=" &#10003; "+L.lang.acceptAll,m+=" </button>",m+=' <button type="button" id="tarteaucitron-close-alert" onclick="GDPRConsent.openPanel();">',m+=" "+L.lang.personalize,m+=" </button>",m+=" </span>",m+="</div>",m+='<div id="tarteaucitron-percentage"></div>'),l.id="tarteaucitron-root",s.appendChild(l,s),l.innerHTML=m,n("tac.root_available"),void 0!==L.job)for(L.job=L.cleanArray(L.job),o=0;o<L.job.length;o+=1)L.addService(L.job[o]);else L.job=[];L.job.push=function(e){void 0===L.job.indexOf&&(L.job.indexOf=function(e,t){var a,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&&w.openPanel()},addService:function(e){var t="",a=L.services[e],i=y.read(L.parameters),o=document.location.hostname,s=document.referrer.split("/")[2]===o,l=!a.needConsent,c=i.indexOf(a.key+"=wait")>=0,d=i.indexOf(a.key+"=false")>=0,u=i.indexOf(a.key+"=true")>=0||!a.needConsent&&i.indexOf(a.key+"=false")<0,g=i.indexOf(a.key+"=false")>=0||i.indexOf(a.key+"=true")>=0,p="1"===navigator.doNotTrack||"yes"===navigator.doNotTrack||"1"===navigator.msDoNotTrack||"1"===window.doNotTrack;!0!==L.added[a.key]&&(L.added[a.key]=!0,t+='<li id="'+a.key+'-line" class="tarteaucitron-line">',t+=' <div class="tarteaucitron-name">',t+=' <span class="tarteaucitron-h3" role="heading" aria-level="3">'+a.name+"</span>",t+=' <span id="tacCL'+a.key+'" class="tarteaucitron-list-cookies"></span><br/>',!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-ask">',t+=' <button type="button" id="'+a.key+'Allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respond(this, true);">',t+=" &#10003; "+L.lang.allow,t+=" </button> ",t+=' <button type="button" id="'+a.key+'Denied" class="tarteaucitron-deny" onclick="GDPRConsent.respond(this, false);">',t+=" &#10007; "+L.lang.deny,t+=" </button>",t+=" </div>",t+="</li>",r("tarteaucitron-services-title_"+a.type,"display","block"),null!==document.getElementById("tarteaucitron-services_"+a.type)&&(document.getElementById("tarteaucitron-services_"+a.type).innerHTML+=t),r("tarteaucitron-no-services-title","display","none"),w.order(a.type,L)),!g&&(l||s&&c)&&!L.highPrivacy||u?(u||y.create(a.key,!0,L.parameters),!0!==L.launch[a.key]&&(L.launch[a.key]=!0,a.js(),n(a.key+"_loaded")),L.state[a.key]=!0,w.color(a.key,!0,L)):d?("function"==typeof a.fallback&&a.fallback(),L.state[a.key]=!1,w.color(a.key,!1,L)):!g&&p&&L.handleBrowserDNTRequest?(y.create(a.key,"false",L.parameters),"function"==typeof a.fallback&&a.fallback(),L.state[a.key]=!1,w.color(a.key,!1,L)):g||(y.create(a.key,"wait",L.parameters),"function"==typeof a.fallback&&a.fallback(),w.color(a.key,"wait",L),w.openAlert()),y.checkCount(a.key,a,L.lang),n(a.key+"_added")},cleanArray:function(e){var t,a=e.length,n=[],i={},o=L.services;for(t=0;t<a;t+=1)i[e[t]]||(i[e[t]]={},void 0!==L.services[e[t]]&&n.push(e[t]));return n.sort((function(e,t){return o[e].type+o[e].key>o[t].type+o[t].key?1:o[e].type+o[e].key<o[t].type+o[t].key?-1:0}))},closePanel:function(){w.closePanel(L)},openPanel:function(){w.openPanel()},respondAll:function(e){w.respondAll(e,L,L.parameters)},respond:function(e,t){w.respond(e,t,L,L.parameters)},toggle:function(e,t){w.toggle(e,t)}};var T=L},579:function(e,t,a){const n=a(927).Z;e.exports=n}},t={};function a(n){if(t[n])return t[n].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.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,(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 i(e,t,a,n,i,o){var s,r=!1;!1===n?"function"==typeof a&&a():((s=document.createElement("script")).type="text/javascript",s.id=void 0!==t?t:"",s.async=!0,s.src=e,void 0!==i&&void 0!==o&&s.setAttribute(i,o),"function"==typeof a&&(s.onreadystatechange=s.onload=function(){var e=s.readyState;r||e&&!/loaded|complete/.test(e)||(r=!0,a())}),document.getElementsByTagName("head")[0].appendChild(s))}function o(e,t){var a,n=document.getElementsByTagName("*"),i=0;for(a in n)if(void 0!==n[a])for(i=0;i<e.length;i+=1)(" "+n[a].className+" ").indexOf(" "+e[i]+" ")>-1&&t(n[a])}function s(e,t,a){null!==document.getElementById(e)&&(document.getElementById(e).style[t]=a)}a.d(t,{Z:function(){return _}});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",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",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,cookies:["datr","fr","reg_ext_ref","reg_fb_gate","reg_fb_ref","sb","wd","x-src"],js:function(){var t;window.fbq||(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=[],i("//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,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"}),i("https://www.googletagmanager.com/gtm.js?id="+e.googletagmanagerId))}}),u=e=>{return{key:"gtag",type:"analytic",name:"Google Analytics (gtag.js)",uri:"https://support.google.com/analytics/answer/6004245",needConsent:!0,cookies:(t="_gat_gtag_"+e.gtagUa,["_ga","_gat","_gid","__utma","__utmb","__utmc","__utmt","__utmz",t=t.replace(/-/g,"_")]),js:function(){window.dataLayer=window.dataLayer||[],i("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()}))}};var t};const g={};function p(e,t){var a;for(a=0;a<e.length;a+=1)if(e[a]===t)return!0;return!1}function m(e){var t,a,n=e.cookieName+"=",i=document.cookie.split(";");for(t=0;t<i.length;t+=1){for(a=i[t];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(n))return a.substring(n.length,a.length)}return""}var v={read:m,create:function(e,t,a){var n=new Date,i=n.getTime()+a.timeExpire,o=new RegExp("!"+e+"=(wait|true|false)","g"),s=m(a).replace(o,""),r=a.cookieName+"="+s+"!"+e+"="+t;n.setTime(i),document.cookie=r+"; expires="+n.toGMTString()+"; path=/;"},purge:function(e){var 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){var n,i=t.cookies,o=i.length,s=0,r="",c=document.cookie.indexOf(e+"=true");if(c>=0&&0===o)r+=a.useNoCookie;else if(c>=0){for(n=0;n<o;n+=1)-1!==document.cookie.indexOf(i[n]+"=")&&(s+=1,void 0===g[i[n]]&&(g[i[n]]=[]),!1===p(g[i[n]],t.name)&&g[i[n]].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 f(){var e,t="tarteaucitron";s(t+"-percentage","display","none"),s(t+"-alert-big","display","none"),e=t+"-root",null!==document.getElementById(e)&&document.getElementById(e).classList.remove("tarteaucitron-before-visible"),n("tac.close_alert")}function y(e,t,a){var n,i=document.getElementById(e),o=document.getElementById(e+"Allowed"),s=document.getElementById(e+"Denied"),r=a.job.length,c=0,l=0;for(i.classList.remove("switch-denied"),i.classList.remove("switch-allowed"),o.classList.remove("active"),s.classList.remove("active"),!0===t?(i.classList.add("switch-allowed"),i.children[0].innerHTML="&#10003;",o.classList.add("active")):(i.classList.add("switch-denied"),i.children[0].innerHTML="&#10007;",s.classList.add("active")),n=0;n<a.job.length;n++)void 0!==a.state[a.job[n]]&&(r-=1,!0===a.state[a.job[n]]?c+=1:l+=1);0===r&&f(),c===a.job.length?(document.getElementById("tarteaucitron-all-denied").classList.remove("tarteaucitron-is-selected"),document.getElementById("tarteaucitron-all-allowed").classList.add("tarteaucitron-is-selected")):l===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(){v.checkCount(e,a.services[e],a.lang)}),2500)):v.checkCount(e,a.services[e],a.lang)}var h={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"),o(["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){var 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]]&&y(e.job[t],e.state[e.job[t]],e);n("tac.open_panel")},closeAlert:f,openAlert:function(){var e,t="tarteaucitron";s(t+"-percentage","display","block"),s(t+"-alert-big","display","block"),e=t+"-root",null!==document.getElementById(e)&&document.getElementById(e).classList.add("tarteaucitron-before-visible"),n("tac.open_alert")},respondAll:function(e,t,a){var n,i=t.services,o=0;for(o=0;o<t.job.length;o+=1)n=i[t.job[o]].key,t.state[n]!==e&&(!1===e&&!0===t.launch[n]&&(t.reloadThePage=!0),!0!==t.launch[n]&&!0===e&&(t.launch[n]=!0,t.services[n].js()),t.state[n]=e,v.create(n,e,a),y(n,e,t))},respond:function(e,t,a){var i,o=e.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed","g"),""),s=function(e){return e.clientX}(event),r=e.getBoundingClientRect();if(e.classList.contains("tarteaucitron-switch"))i=void 0!==t.state[o]?!!e.classList.contains("switch-denied"):s<r.left+e.clientWidth/2;else if(e.classList.contains("tarteaucitron-switch-state"))if(e.id.includes("Allowed")&&!0!==t.state[o])i=!0;else{if(!e.id.includes("Denied")||!1===t.state[o])return;i=!1}!0===i&&!0!==t.launch[o]&&(t.launch[o]=!0,n(o+"_loaded"),t.services[o].js()),t.state[o]=i,v.create(o,i,a),y(o,i,t),!1===i&&!0===t.launch[o]&&window.location.reload()},activate:function(e,t,a,i){var o=e.id;void 0===a.state[o]|!1&&!0!==a.launch[o]&&(a.launch[o]=t,n(o+"_loaded"),a.services[o].js(),a.state[o]=t,v.create(o,t,i),y(o,t,a))},toggle:function(e,t){var a=document.getElementById(e);null!==a&&(void 0!==t&&o([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){var 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)}))}},b=function(e,t){27===t.keyCode&&h.closePanel()},k=function(e){document.location.hash===e.hashtag&&h.openPanel()};const w={user:{},lang:{},services:{},added:[],idprocessed:[],state:[],launch:[],parameters:{},reloadThePage:!1,alreadyLaunch:0,init:function(e){w.parameters=e||{},0===w.alreadyLaunch&&(w.alreadyLaunch=1,window.addEventListener?(window.addEventListener("load",(function(){w.load()}),!1),window.addEventListener("keydown",(function(e){b(!1,e)}),!1),window.addEventListener("hashchange",(function(){k(w.parameters)}),!1)):(window.attachEvent("onload",(function(){w.load()})),window.attachEvent("onkeydown",(function(e){b(!0,e)})),window.attachEvent("onhashchange",(function(){k(w.parameters)}))))},load:function(){var e,t={hashtag:"#tarteaucitron",cookieName:"tarteaucitron",timeExpire:31536e6,websiteName:void 0,AcceptAllCta:!0,moreInfoLink:!0,mandatory:!0};if(void 0!==w.parameters)for(var a in t)Object.prototype.hasOwnProperty.call(w.parameters,a)||(w.parameters[a]=t[a]);w.lang=(()=>{switch(function(){if(!navigator)return"en";let 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}()){case"fr":return r;default:return c}})(),w.services=(e=w.user,{facebook:{key:"facebook",type:"social",name:"Facebook",uri:"https://www.facebook.com/policies/cookies/",needConsent:!0,cookies:[],js:function(){i("//connect.facebook.net/"+function(){if(!navigator)return"en_US";let 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(e),googletagmanager:d(e),gtag:u(e),twitter:{key:"twitter",type:"social",name:"Twitter",uri:"https://support.twitter.com/articles/20170514",needConsent:!0,cookies:[],js:function(){i("//platform.twitter.com/widgets.js","twitter-wjs")}},vimeo:{key:"vimeo",type:"video",name:"Vimeo",uri:"https://vimeo.com/privacy",needConsent:!0,cookies:["__utmt_player","__utma","__utmb","__utmc","__utmv","vuid","__utmz","player"],js:function(){var e,t,a=document.getElementsByTagName("div");for(e=0;e<a.length;e++)a[e].classList.contains("tarteaucitron-vimeo")&&(t=a[e].getAttribute("data-tarteaucitron-src"),a[e].innerHTML='<iframe src="'+t+'" frameborder="0" allowfullscreen="true"></iframe>')},fallback:function(){var e,t,a=document.getElementsByTagName("div");for(e=0;e<a.length;e++)a[e].classList.contains("tarteaucitron-vimeo")&&(t=a[e].getAttribute("data-tarteaucitron-src"),a[e].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, true);">Autoriser</button><a class="tarteaucitron-card-url" href="'+t+'" target="_blank">&rarr; '+t+"</a></div>")}},youtube:{key:"youtube",type:"video",name:"YouTube",uri:"https://policies.google.com/privacy",needConsent:!0,cookies:["VISITOR_INFO1_LIVE","YSC","PREF","GEUP"],js:function(){var e,t,a=document.getElementsByTagName("div");for(t=0;t<a.length;t++)a[t].classList.contains("tarteaucitron-youtube")&&(e=a[t].getAttribute("data-tarteaucitron-src"),a[t].innerHTML='<iframe src="'+e+'" frameborder="0" allowfullscreen="true"></iframe>')},fallback:function(){var e,t,a=document.getElementsByTagName("div"),n="youtube";for(t=0;t<a.length;t++)a[t].classList.contains("tarteaucitron-youtube")&&(e=a[t].getAttribute("data-tarteaucitron-src"),a[t].innerHTML='<div class="tarteaucitron-card-mask"><span>Le dépôt de cookies pour <span class="tarteaucitron-card-type">'+n+'</span> est désactivé. Si vous souhaitez accéder à ce contenu, merci de l’activer.</span><button onclick="GDPRConsent.activate('+n+', true);">Autoriser</button><a class="tarteaucitron-card-url" href="'+e+'" target="_blank">&rarr; '+e+"</a></div>")}}});var o,s,g=document.body,p=document.createElement("div"),m="",v=["ads","analytic","api","comment","social","support","video","other"];for(v=v.sort((function(e,t){return w.lang[e].title>w.lang[t].title?1:w.lang[e].title<w.lang[t].title?-1:0})),m+='<button type="button" id="tarteaucitron-back" onclick="GDPRConsent.closePanel();" aria-label="'+w.lang.close+'"></button>',m+='<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">',m+=' <button type="button" id="tarteaucitron-close-panel" onclick="GDPRConsent.closePanel();">&#128473;</button>',m+='\t<div id="tarteaucitron-services">',m+='\t\t<div id="tarteaucitron-services-top">',m+=' \t\t<span class="tarteaucitron-h1" role="heading" aria-level="1" id="dialogTitle">'+w.lang.title+"</span>",m+='\t\t\t<div id="tarteaucitron-info">',m+=" \t"+w.lang.disclaimer,w.parameters.websiteName&&(m+=" \t"+w.lang.disclaimerWebsite+" "+w.parameters.websiteName+"."),m+=" \t</div>",m+='\t\t\t<div class="tarteaucitron-line">',m+=' <span class="tarteaucitron-h3" role="heading" aria-level="2">'+w.lang.all+"</span>",m+=' \t<div class="tarteaucitron-ask">',m+=' \t<button type="button" id="tarteaucitron-all-allowed" class="tarteaucitron-allow" onclick="GDPRConsent.respondAll(true);">',m+=" \t\t&#10003; "+w.lang.allowAll,m+=" \t</button> ",m+=' \t<button type="button" id="tarteaucitron-all-denied" class="tarteaucitron-deny" onclick="GDPRConsent.respondAll(false);">',m+=" \t\t&#10007; "+w.lang.denyAll,m+=" \t</button>",m+=" \t</div>",m+=" \t</div>",m+="\t\t</div>",m+='\t\t<div id="tarteaucitron-services-list">',m+=' <div class="clear"></div>',!0===w.parameters.mandatory&&(m+='<div class="tarteaucitron-cookie-group">',m+='\t<div class="tarteaucitron-cookie-text">',m+=' \t<span class="tarteaucitron-h3" role="heading" aria-level="2">'+w.lang.mandatoryTitle+"</span>",m+='\t\t<span class="tarteaucitron-description">'+w.lang.mandatoryText+"</span>",m+="\t</div>",m+='\t<div class="tarteaucitron-cookie-buttons">',m+=' <button type="button" class="tarteaucitron-allow solo">',m+=" &#10003; "+w.lang.allow,m+=" </button> ",m+="\t</div>",m+="</div>"),s=0;s<v.length;s+=1)m+=' <li id="tarteaucitron-services-title_'+v[s]+'" class="tarteaucitron-hidden">',m+=' <div class="tarteaucitron-title">',m+=' <button type="button" onclick="GDPRConsent.toggle(\'tarteaucitron-details'+v[s]+"', 'tarteaucitron-info-box');return false\">&#10011; "+w.lang[v[s]].title+"</button>",m+=" </div>",m+=' <div id="tarteaucitron-details'+v[s]+'" class="tarteaucitron-details tarteaucitron-info-box">',m+=" "+w.lang[v[s]].details,m+=" </div>",m+=' <ul id="tarteaucitron-services_'+v[s]+'"></ul></li>';if(m+=' <li id="tarteaucitron-no-services-title" class="tarteaucitron-line">'+w.lang.noServices+"</li>",m+=" </ul>",m+=' <div class="tarteaucitron-hidden" id="tarteaucitron-scrollbar-child" style="height:20px;display:block"></div>',m+="\t\t</div>",m+="\t</div>",m+="</div>",w.parameters.AcceptAllCta?(m+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==w.lang.siteDisclaimerTitle&&""!==w.lang.siteDisclaimerMessage&&(m+='<div id="tarteaucitron-wrapper">',m+='\t<div id="tarteaucitron-disclaimer-texte">',m+='\t\t<span id="tarteaucitron-site-disclaimer-title">',m+="\t\t\t"+w.lang.siteDisclaimerTitle,m+="\t\t</span>",m+='\t\t<span id="tarteaucitron-site-disclaimer-message">',m+=" \t"+w.lang.siteDisclaimerMessage,m+="\t\t</span>"),m+=' \t\t<span id="tarteaucitron-disclaimer-alert">',m+="\t \t"+w.lang.alertBigPrivacy,m+=" \t\t</span>",m+="\t\t</div>",m+=' \t<div id="tarteaucitron-disclaimer-buttons">',m+=' \t<button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.respondAll(true);">',m+=" \t&#10003; "+w.lang.acceptAll,m+=" \t</button>",m+=' \t<button type="button" id="tarteaucitron-close-alert" onclick="GDPRConsent.openPanel();">',m+=" \t"+w.lang.personalize,m+=" \t</button>",m+=" \t</div>",m+="\t</div>",m+="</div>"):(m+='<div id="tarteaucitron-alert-big" class="tarteaucitron-alert-big-bottom">',""!==w.lang.siteDisclaimerTitle&&""!==w.lang.siteDisclaimerMessage&&(m+='<div id="tarteaucitron-wrapper">',m+='\t<div id="tarteaucitron-disclaimer-texte">',m+='\t\t<span id="tarteaucitron-site-disclaimer-title">',m+="\t\t\t"+w.lang.siteDisclaimerTitle,m+="\t\t</span>",m+='\t\t<span id="tarteaucitron-site-disclaimer-message">',m+=" \t"+w.lang.siteDisclaimerMessage,m+="\t\t</span>"),m+=' \t\t<span id="tarteaucitron-disclaimer-alert">',m+=" \t\t"+w.lang.alertBigPrivacy,m+=" \t\t</span>",m+="\t\t</div>",m+=' \t<div id="tarteaucitron-disclaimer-buttons">',m+=' \t<button type="button" id="tarteaucitron-personalize" onclick="GDPRConsent.openPanel();">',m+=" \t"+w.lang.personalize,m+=" \t</button>",m+=" \t</div>",m+="\t</div>",m+="</div>"),p.id="tarteaucitron-root",g.appendChild(p,g),p.innerHTML=m,n("tac.root_available"),void 0!==w.job)for(w.job=w.cleanArray(w.job),o=0;o<w.job.length;o+=1)w.addService(w.job[o]);else w.job=[];w.job.push=function(e){void 0===w.job.indexOf&&(w.job.indexOf=function(e,t){var a,n=this.length;for(a=t||0;a<n;a+=1)if(this[a]===e)return a;return-1}),-1===w.job.indexOf(e)&&Array.prototype.push.call(this,e),w.launch[e]=!1,w.addService(e)},document.location.hash===w.hashtag&&h.openPanel(w)},addService:function(e){var t="",a=w.services[e],i=v.read(w.parameters),o=(document.location.hostname,document.referrer.split("/")[2],a.needConsent,i.indexOf(a.key+"=wait"),i.indexOf(a.key+"=false")>=0),r=i.indexOf(a.key+"=true")>=0||!a.needConsent&&i.indexOf(a.key+"=false")<0,c=i.indexOf(a.key+"=false")>=0||i.indexOf(a.key+"=true")>=0,l="1"===navigator.doNotTrack||"yes"===navigator.doNotTrack||"1"===navigator.msDoNotTrack||"1"===window.doNotTrack;!0!==w.added[a.key]&&(w.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===w.parameters.moreInfoLink&&(t+=' <a href="'+a.uri+'" target="_blank" rel="noreferrer noopener" title="'+a.name+" "+w.lang.newWindow+'">',t+=" "+w.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);">'+w.lang.allow+"</span>",t+=' <div class="tarteaucitron-switch" id="'+a.key+'" onclick="GDPRConsent.respond(this);">',t+='\t\t\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);">'+w.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"),h.order(a.type,w)),r?(!0!==w.launch[a.key]&&(w.launch[a.key]=!0,a.js(),n(a.key+"_loaded")),w.state[a.key]=!0):o?("function"==typeof a.fallback&&a.fallback(),w.state[a.key]=!1):!c&&l&&w.handleBrowserDNTRequest?(v.create(a.key,"false",w.parameters),"function"==typeof a.fallback&&a.fallback(),w.state[a.key]=!1):c||(v.create(a.key,"wait",w.parameters),"function"==typeof a.fallback&&a.fallback(),h.openAlert()),v.checkCount(a.key,a,w.lang),n(a.key+"_added")},cleanArray:function(e){var t,a=e.length,n=[],i={},o=w.services;for(t=0;t<a;t+=1)i[e[t]]||(i[e[t]]={},void 0!==w.services[e[t]]&&n.push(e[t]));return n.sort((function(e,t){return o[e].type+o[e].key>o[t].type+o[t].key?1:o[e].type+o[e].key<o[t].type+o[t].key?-1:0}))},closePanel:function(){h.closePanel(w)},openPanel:function(){h.openPanel(w)},respondEffect:function(e,t){h.respondEffect(e,t,w)},respondAll:function(e){h.respondAll(e,w,w.parameters)},respond:function(e){h.respond(e,w,w.parameters)},activate:function(e,t){h.activate(e,t,w,w.parameters)},toggle:function(e,t){h.toggle(e,t)}};var _=w},579:function(e,t,a){const n=a(20).Z;e.exports=n}},t={};function a(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.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.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a(579)}()}));
{
"name": "gdpr-consent",
"version": "0.7.0",
"version": "0.8.0",
"description": "GDPR banner to comply with the European cookie law. Inspired by tarteaucitronjs.",

@@ -29,11 +29,10 @@ "license": "MIT",

],
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.12.17",
"@babel/preset-env": "^7.12.17",
"@babel/core": "^7.13.10",
"@babel/preset-env": "^7.13.10",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"css-loader": "^5.0.2",
"eslint": "^7.20.0",
"mini-css-extract-plugin": "^1.3.8",
"css-loader": "^5.1.2",
"eslint": "^7.22.0",
"mini-css-extract-plugin": "^1.3.9",
"sass": "^1.32.8",

@@ -43,3 +42,3 @@ "sass-lint": "^1.13.1",

"style-loader": "^2.0.0",
"webpack": "^5.23.0",
"webpack": "^5.25.1",
"webpack-cli": "^4.5.0",

@@ -46,0 +45,0 @@ "webpack-dev-server": "^4.0.0-beta.0"

@@ -32,10 +32,5 @@ [![NPM version](https://badge.fury.io/js/gdpr-consent.svg)](http://badge.fury.io/js/gdpr-consent)

"timeExpire": 31536000000, /* Cookie expiration time */
"websiteName": "Les Jours", /* The name of the Website */
"highPrivacy": true, /* Disable auto consent */
"AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */
"AcceptAllCta" : true, /* Show the accept all button*/
"moreInfoLink": true, /* Show more info link */
"mandatory": false /* Show a message about mandatory cookies */

@@ -66,3 +61,7 @@ });

GDPRConsent.job.push('facebook');
/* Add Vidéos */
GDPRConsent.job.push('vimeo');
GDPRConsent.job.push('youtube');
</script>
```

@@ -31,6 +31,2 @@ import "./css/main.scss";

}, false);
window.addEventListener("scroll", function() {
events.scrollEvent(GDPRConsent, GDPRConsent.parameters, GDPRConsent.lang);
}, false);
window.addEventListener("keydown", function(evt) {

@@ -42,5 +38,2 @@ events.keydownEvent(false, evt);

}, false);
window.addEventListener("resize", function() {
events.resizeEvent();
}, false);
} else {

@@ -50,5 +43,2 @@ window.attachEvent("onload", function() {

});
window.attachEvent("onscroll", function() {
events.scrollEvent(GDPRConsent.parameters);
});
window.attachEvent("onkeydown", function(evt) {

@@ -60,5 +50,2 @@ events.keydownEvent(true, evt);

});
window.attachEvent("onresize", function() {
events.resizeEvent();
});
}

@@ -74,3 +61,2 @@ }

websiteName: undefined,
highPrivacy: false,
AcceptAllCta: true,

@@ -107,3 +93,3 @@ moreInfoLink: true,

return 0;
});
});

@@ -115,45 +101,42 @@ // Prepare the html

html += " <button type=\"button\" id=\"tarteaucitron-close-panel\" onclick=\"GDPRConsent.closePanel();\">&#128473;</button>";
html += " <div id=\"tarteaucitron-services\">";
html += " <div id=\"tarteaucitron-main-line\">";
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 += " <div id=\"tarteaucitron-services\">";
// L'en-tête des services
html += " <div id=\"tarteaucitron-services-top\">";
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;
if (GDPRConsent.parameters.websiteName) {
html += " " + GDPRConsent.lang.disclaimerWebsite + " " + GDPRConsent.parameters.websiteName + ".";
html += " " + GDPRConsent.lang.disclaimerWebsite + " " + GDPRConsent.parameters.websiteName + ".";
}
html += " </div>";
html += " <div class=\"tarteaucitron-line\">";
html += " <div class=\"tarteaucitron-name\">";
html += " <span class=\"tarteaucitron-h2\" role=\"heading\" aria-level=\"2\">" + GDPRConsent.lang.all + "</span>";
html += " </div>";
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 += " <div class=\"tarteaucitron-services-list\">";
html += " <div class=\"clear\"></div><ul>";
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 += " <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>";
// La liste des Services
html += " <div id=\"tarteaucitron-services-list\">";
html += " <div class=\"clear\"></div>";
if (GDPRConsent.parameters.mandatory === true) {
html += "<li id=\"tarteaucitron-services-title_mandatory\">";
html += "<div class=\"tarteaucitron-title\">";
html += " <button type=\"button\">&nbsp; " + GDPRConsent.lang.mandatoryTitle + "</button>";
html += "</div>";
html += "<ul id=\"tarteaucitron-services_mandatory\">";
html += "<li class=\"tarteaucitron-line\">";
html += " <div class=\"tarteaucitron-name\">";
html += " <span class=\"tarteaucitron-h3\" role=\"heading\" aria-level=\"3\">" + GDPRConsent.lang.mandatoryText + "</span>";
html += " <span class=\"tarteaucitron-list-cookies\"></span><br/>";
html += " </div>";
html += " <div class=\"tarteaucitron-ask\">";
html += " <button type=\"button\" class=\"tarteaucitron-allow\">";
html += "<div class=\"tarteaucitron-cookie-group\">";
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 += " <div class=\"tarteaucitron-cookie-buttons\">";
html += " <button type=\"button\" class=\"tarteaucitron-allow solo\">";
html += " &#10003; " + GDPRConsent.lang.allow;
html += " </button> ";
html += " </div>";
html += "</li>";
html += "</ul></li>";
html += " </div>";
html += "</div>";
}

@@ -173,28 +156,30 @@ for (i = 0; i < cat.length; i += 1) {

html += " <div class=\"tarteaucitron-hidden\" id=\"tarteaucitron-scrollbar-child\" style=\"height:20px;display:block\"></div>";
html += " </div>";
html += " </div>";
html += " </div>";
html += " </div>";
html += "</div>";
// For the Banner
if (GDPRConsent.parameters.highPrivacy && !GDPRConsent.parameters.AcceptAllCta) {
if (!GDPRConsent.parameters.AcceptAllCta) {
html += "<div id=\"tarteaucitron-alert-big\" class=\"tarteaucitron-alert-big-bottom\">";
if (GDPRConsent.lang.siteDisclaimerTitle !== "" && GDPRConsent.lang.siteDisclaimerMessage !== "") {
html += " <span id=\"tarteaucitron-site-disclaimer-title\">";
html += " " + GDPRConsent.lang.siteDisclaimerTitle;
html += " </span>";
html += " <br />";
html += " <br />";
html += " <span id=\"tarteaucitron-site-disclaimer-message\">";
html += " " + GDPRConsent.lang.siteDisclaimerMessage;
html += " </span>";
html += " <br />";
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 += " <span id=\"tarteaucitron-site-disclaimer-message\">";
html += " " + GDPRConsent.lang.siteDisclaimerMessage;
html += " </span>";
}
html += " <span id=\"tarteaucitron-disclaimer-alert\">";
html += " " + GDPRConsent.lang.alertBigPrivacy;
html += " </span>";
html += " <span id=\"tarteaucitron-disclaimer-buttons\">";
html += " <button type=\"button\" id=\"tarteaucitron-personalize\" onclick=\"GDPRConsent.openPanel();\">";
html += " " + GDPRConsent.lang.personalize;
html += " </button>";
html += " </span>";
html += " <span id=\"tarteaucitron-disclaimer-alert\">";
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>";

@@ -204,29 +189,25 @@ } else {

if (GDPRConsent.lang.siteDisclaimerTitle !== "" && GDPRConsent.lang.siteDisclaimerMessage !== "") {
html += " <span id=\"tarteaucitron-site-disclaimer-title\">";
html += " " + GDPRConsent.lang.siteDisclaimerTitle;
html += " </span>";
html += " <br />";
html += " <br />";
html += " <span id=\"tarteaucitron-site-disclaimer-message\">";
html += " " + GDPRConsent.lang.siteDisclaimerMessage;
html += " </span>";
html += " <br />";
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 += " <span id=\"tarteaucitron-site-disclaimer-message\">";
html += " " + GDPRConsent.lang.siteDisclaimerMessage;
html += " </span>";
}
html += " <span id=\"tarteaucitron-disclaimer-alert\">";
if (GDPRConsent.parameters.highPrivacy) {
html += " " + GDPRConsent.lang.alertBigPrivacy;
} else {
html += " " + GDPRConsent.lang.alertBigClick + " " + GDPRConsent.lang.alertBig;
}
html += " </span>";
html += " <span id=\"tarteaucitron-disclaimer-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-close-alert\" onclick=\"GDPRConsent.openPanel();\">";
html += " " + GDPRConsent.lang.personalize;
html += " </button>";
html += " </span>";
html += " <span id=\"tarteaucitron-disclaimer-alert\">";
html += " " + GDPRConsent.lang.alertBigPrivacy;
html += " </span>";
html += " </div>";
html += " <div id=\"tarteaucitron-disclaimer-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-close-alert\" onclick=\"GDPRConsent.openPanel();\">";
html += " " + GDPRConsent.lang.personalize;
html += " </button>";
html += " </div>";
html += " </div>";
html += "</div>";
html += "<div id=\"tarteaucitron-percentage\"></div>";
}

@@ -273,3 +254,3 @@

if (document.location.hash === GDPRConsent.hashtag) {
userInterface.openPanel();
userInterface.openPanel(GDPRConsent);
}

@@ -296,6 +277,6 @@ },

html += "<li id=\"" + service.key + "-line\" class=\"tarteaucitron-line\">";
html += " <div class=\"tarteaucitron-name\">";
html += "<div id=\"" + service.key + "-line\" class=\"tarteaucitron-cookie-group\">";
html += " <div class=\"tarteaucitron-cookie-text\">";
html += " <span class=\"tarteaucitron-h3\" role=\"heading\" aria-level=\"3\">" + service.name + "</span>";
html += " <span id=\"tacCL" + service.key + "\" class=\"tarteaucitron-list-cookies\"></span><br/>";
html += " <span id=\"tacCL" + service.key + "\" class=\"tarteaucitron-description\"></span>";
if (GDPRConsent.parameters.moreInfoLink === true) {

@@ -307,9 +288,8 @@ html += " <a href=\"" + service.uri + "\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"" + service.name + " " + GDPRConsent.lang.newWindow + "\">";

html += " </div>";
html += " <div class=\"tarteaucitron-ask\">";
html += " <button type=\"button\" id=\"" + service.key + "Allowed\" class=\"tarteaucitron-allow\" onclick=\"GDPRConsent.respond(this, true);\">";
html += " &#10003; " + GDPRConsent.lang.allow;
html += " </button> ";
html += " <button type=\"button\" id=\"" + service.key + "Denied\" class=\"tarteaucitron-deny\" onclick=\"GDPRConsent.respond(this, false);\">";
html += " &#10007; " + GDPRConsent.lang.deny;
html += " </button>";
html += " <div class=\"tarteaucitron-cookie-buttons\">";
html += " <span id=\"" + service.key + "Allowed\" class=\"tarteaucitron-switch-state\" onclick=\"GDPRConsent.respond(this);\">" + GDPRConsent.lang.allow + "</span>";
html += " <div class=\"tarteaucitron-switch\" id=\"" + service.key + "\" onclick=\"GDPRConsent.respond(this);\">";
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);\">" + GDPRConsent.lang.deny + "</span>";
html += " </div>";

@@ -329,6 +309,3 @@ html += "</li>";

if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !GDPRConsent.highPrivacy) || isAllowed) {
if (!isAllowed) {
cookies.create(service.key, true, GDPRConsent.parameters);
}
if (isAllowed) {
if (GDPRConsent.launch[service.key] !== true) {

@@ -340,3 +317,2 @@ GDPRConsent.launch[service.key] = true;

GDPRConsent.state[service.key] = true;
userInterface.color(service.key, true, GDPRConsent);
} else if (isDenied) {

@@ -347,3 +323,2 @@ if (typeof service.fallback === "function") {

GDPRConsent.state[service.key] = false;
userInterface.color(service.key, false, GDPRConsent);
} else if (!isResponded && isDNTRequested && GDPRConsent.handleBrowserDNTRequest) {

@@ -355,3 +330,2 @@ cookies.create(service.key, "false", GDPRConsent.parameters);

GDPRConsent.state[service.key] = false;
userInterface.color(service.key, false, GDPRConsent);
} else if (!isResponded) {

@@ -362,3 +336,2 @@ cookies.create(service.key, "wait", GDPRConsent.parameters);

}
userInterface.color(service.key, "wait", GDPRConsent);
userInterface.openAlert();

@@ -399,10 +372,16 @@ }

openPanel: function() {
userInterface.openPanel();
userInterface.openPanel(GDPRConsent);
},
respondEffect: function(key, status) {
userInterface.respondEffect(key, status, GDPRConsent);
},
respondAll: function(status) {
userInterface.respondAll(status, GDPRConsent, GDPRConsent.parameters);
},
respond: function(el, status) {
userInterface.respond(el, status, GDPRConsent, GDPRConsent.parameters);
respond: function(el) {
userInterface.respond(el, GDPRConsent, GDPRConsent.parameters);
},
activate: function(id, status) {
userInterface.activate(id, status, GDPRConsent, GDPRConsent.parameters);
},
toggle: function(id, closeClass) {

@@ -409,0 +388,0 @@ userInterface.toggle(id, closeClass);

@@ -11,3 +11,3 @@ const fr = {

personalize: "Personnaliser",
acceptAll: "OK, tout accepter",
acceptAll: "Tout autoriser",
close: "Fermer",

@@ -31,4 +31,4 @@

newWindow: "(nouvelle fenêtre)",
allowAll: "Autoriser tous les cookies",
denyAll: "Interdire tous les cookies",
allowAll: "Tout autoriser",
denyAll: "Tout interdire",

@@ -35,0 +35,0 @@ ads: {

@@ -15,39 +15,5 @@ import userInterface from "./user-interface";

function resizeEvent() {
var tacElem = document.getElementById("tarteaucitron");
if (tacElem && tacElem.style.display === "block") {
userInterface.jsSizing("main");
}
}
function scrollEvent(GDPRConsentState, GDPRConsentParameters, lang) {
var scrollPos = window.pageYOffset || document.documentElement.scrollTop,
heightPosition,
tacPercentage = document.getElementById("tarteaucitron-percentage"),
tacAlertBig = document.getElementById("tarteaucitron-alert-big");
if (tacAlertBig && !GDPRConsentParameters.highPrivacy) {
if (tacAlertBig.style.display === "block") {
heightPosition = tacAlertBig.offsetHeight + "px";
if (scrollPos > (screen.height * 2)) {
userInterface.respondAll(true, GDPRConsentState, GDPRConsentParameters);
} else if (scrollPos > (screen.height / 2)) {
document.getElementById("tarteaucitron-disclaimer-alert").innerHTML = "<strong>" + lang.alertBigScroll + "</strong> " + lang.alertBig;
}
if (tacPercentage) {
tacPercentage.style.bottom = heightPosition;
tacPercentage.style.width = ((100 / (screen.height * 2)) * scrollPos) + "%";
}
}
}
}
export default {
keydownEvent: keydownEvent,
hashchangeEvent: hashchangeEvent,
resizeEvent: resizeEvent,
scrollEvent: scrollEvent
hashchangeEvent: hashchangeEvent
};

@@ -5,24 +5,2 @@ import { searchElements, css, addClass, removeClass } from "../utils/dom";

function jsSizing(type) {
"use strict";
var servicesHeight,
mainHeight;
if (type === "main") {
// height of the services list container
if (document.getElementById("tarteaucitron") !== null && document.getElementById("tarteaucitron-main-line") !== null) {
// reset
css("tarteaucitron-services", "height", "auto");
// calculate
mainHeight = document.getElementById("tarteaucitron").offsetHeight;
// apply
servicesHeight = mainHeight;
css("tarteaucitron-services", "height", servicesHeight + "px");
css("tarteaucitron-services", "overflow-x", "auto");
}
}
}
function closePanel(GDPRConsentState) {

@@ -57,5 +35,6 @@ "use strict";

function openPanel() {
function openPanel(GDPRConsentState) {
"use strict";
var index;
css("tarteaucitron", "display", "block");

@@ -66,4 +45,9 @@ css("tarteaucitron-back", "display", "block");

document.getElementsByTagName("body")[0].classList.add("modal-open");
jsSizing("main");
for (index = 0; index < GDPRConsentState.job.length; index++) {
if (GDPRConsentState.state[GDPRConsentState.job[index]] !== undefined) {
respondEffect(GDPRConsentState.job[index], GDPRConsentState.state[GDPRConsentState.job[index]], GDPRConsentState);
}
}
sendEvent("tac.open_panel");

@@ -92,64 +76,60 @@ }

function color(key, status, GDPRConsentState) {
"use strict";
var c = "tarteaucitron",
nbDenied = 0,
nbPending = 0,
function mouseXEvent(event) {
var e = event;
return e.clientX;
}
function respondEffect(key, choice, GDPRConsentState) {
var switchBtn = document.getElementById(key),
allowedState = document.getElementById(key + "Allowed"),
deniedState = document.getElementById(key + "Denied"),
index,
cookieCounter = GDPRConsentState.job.length,
nbAllowed = 0,
sum = GDPRConsentState.job.length,
index;
nbDenied = 0;
if (status === true) {
document.getElementById(key + "-line").classList.add("tarteaucitron-is-allowed");
document.getElementById(key + "-line").classList.remove("tarteaucitron-is-denied");
} else if (status === false) {
document.getElementById(key + "-line").classList.remove("tarteaucitron-is-allowed");
document.getElementById(key + "-line").classList.add("tarteaucitron-is-denied");
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");
} else {
switchBtn.classList.add("switch-denied");
switchBtn.children[0].innerHTML = "&#10007;";
deniedState.classList.add("active");
}
// check if all services are allowed
for (index = 0; index < sum; index += 1) {
if (GDPRConsentState.state[GDPRConsentState.job[index]] === false) {
nbDenied += 1;
} else if (GDPRConsentState.state[GDPRConsentState.job[index]] === undefined) {
nbPending += 1;
} else if (GDPRConsentState.state[GDPRConsentState.job[index]] === true) {
nbAllowed += 1;
// Compter quels cookies ont été acceptés/refusés/répondus
for (index = 0; index < GDPRConsentState.job.length; index++) {
if (GDPRConsentState.state[GDPRConsentState.job[index]] !== undefined) {
cookieCounter -= 1;
if (GDPRConsentState.state[GDPRConsentState.job[index]] === true) {
nbAllowed += 1;
} else {
nbDenied += 1;
}
}
}
css(c + "-dot-green", "width", ((100 / sum) * nbAllowed) + "%");
css(c + "-dot-yellow", "width", ((100 / sum) * nbPending) + "%");
css(c + "-dot-red", "width", ((100 / sum) * nbDenied) + "%");
if (nbDenied === 0 && nbPending === 0) {
removeClass(c + "-all-denied", c + "-is-selected");
addClass(c + "-all-allowed", c + "-is-selected");
addClass(c + "-main-line-offset", c + "-is-allowed");
removeClass(c + "-main-line-offset", c + "-is-denied");
} else if (nbAllowed === 0 && nbPending === 0) {
removeClass(c + "-all-allowed", c + "-is-selected");
addClass(c + "-all-denied", c + "-is-selected");
removeClass(c + "-main-line-offset", c + "-is-allowed");
addClass(c + "-main-line-offset", c + "-is-denied");
} else {
removeClass(c + "-all-allowed", c + "-is-selected");
removeClass(c + "-all-denied", c + "-is-selected");
removeClass(c + "-main-line-offset", c + "-is-allowed");
removeClass(c + "-main-line-offset", c + "-is-denied");
}
// close the alert if all service have been reviewed
if (nbPending === 0) {
// Si tous les cookies ont été répondus, je ferme le bandeau
if (cookieCounter === 0) {
closeAlert();
}
if (GDPRConsentState.services[key].cookies.length > 0 && status === false) {
cookies.purge(GDPRConsentState.services[key].cookies);
// Si tous les cookies ont été acceptés/refusés, je change le style des boutons
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");
} 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");
}
if (status === true) {
// Compteur de cookies affiché sous le nom du cookie
if (choice === true) {
if (document.getElementById("tacCL" + key) !== null) {

@@ -176,2 +156,3 @@ document.getElementById("tacCL" + key).innerHTML = "...";

key = service.key;
if (GDPRConsentState.state[key] !== status) {

@@ -186,4 +167,4 @@ if (status === false && GDPRConsentState.launch[key] === true) {

GDPRConsentState.state[key] = status;
cookies.create(key, status, GDPRConsentParameters);
color(key, status, GDPRConsentState);
cookies.create(key, status, GDPRConsentParameters);
respondEffect(key, status, GDPRConsentState);
}

@@ -193,28 +174,65 @@ }

function respond(el, status, GDPRConsentState, GDPRConsentParameters) {
function respond(el, GDPRConsentState, GDPRConsentParameters) {
"use strict";
var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), "");
// return if same state
if (GDPRConsentState.state[key] === status) {
return;
var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), ""),
status,
mousePosition = mouseXEvent(event),
elPos = el.getBoundingClientRect();
// Cas 1 : Je clique sur le switch
if (el.classList.contains("tarteaucitron-switch")) {
// Je regarde si il a déjà été activé ou refusé...
if (GDPRConsentState.state[key] !== undefined) {
if (el.classList.contains("switch-denied")) {
status = true;
} else {
status = false;
}
} else if (mousePosition < (elPos.left) + ((el.clientWidth)/2)) {
status = true;
} else {
status = false;
}
}
// Cas 2 : Je clique sur "Autoriser" ou "Interdire"
else if (el.classList.contains("tarteaucitron-switch-state")) {
// Je vérifie que je ne reclique pas sur la même valeur
if ((el.id.includes("Allowed")) && (GDPRConsentState.state[key] !== true)) {
status = true;
} else if ((el.id.includes("Denied")) && (GDPRConsentState.state[key] !== false)) {
status = false;
} else {
return;
}
}
if (status === false && GDPRConsentState.launch[key] === true) {
GDPRConsentState.reloadThePage = true;
if ((status === true) && (GDPRConsentState.launch[key] !== true)) {
GDPRConsentState.launch[key] = true;
sendEvent(key + "_loaded");
GDPRConsentState.services[key].js();
}
// if not already launched... launch the service
if (status === true) {
if (GDPRConsentState.launch[key] !== true) {
GDPRConsentState.launch[key] = true;
sendEvent(key + "_loaded");
GDPRConsentState.services[key].js();
}
}
GDPRConsentState.state[key] = status;
cookies.create(key, status, GDPRConsentParameters);
color(key, status, GDPRConsentState);
respondEffect(key, status, GDPRConsentState);
if ((status === false) && (GDPRConsentState.launch[key] === true)) {
window.location.reload();
}
}
function activate(el, status, GDPRConsentState, GDPRConsentParameters) {
var key = el.id;
if ((GDPRConsentState.state[key] === undefined|false) && (GDPRConsentState.launch[key] !== true)) {
GDPRConsentState.launch[key] = status;
sendEvent(key + "_loaded");
GDPRConsentState.services[key].js();
GDPRConsentState.state[key] = status;
cookies.create(key, status, GDPRConsentParameters);
respondEffect(key, status, GDPRConsentState);
} else {
return;
}
}
function toggle(id, closeClass) {

@@ -263,3 +281,2 @@ "use strict";

export default {
jsSizing: jsSizing,
closePanel: closePanel,

@@ -269,7 +286,7 @@ openPanel: openPanel,

openAlert: openAlert,
color: color,
respondAll: respondAll,
respond: respond,
activate: activate,
toggle: toggle,
order: order
};

@@ -6,2 +6,4 @@ import facebook from "./facebook";

import twitter from "./twitter";
import vimeo from "./vimeo";
import youtube from "./youtube";

@@ -15,5 +17,7 @@ export default {

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

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