diff --git a/tarteaucitron.js b/tarteaucitron.js index d0f87aa1..daff291b 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -1133,12 +1133,18 @@ var tarteaucitron = { if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { if(true === state && typeof service.js === 'function') { service.js(); - tarteaucitron.sendEvent(service.key + '_loaded'); } else if (typeof service.fallback === 'function') { service.fallback(); } } + if (true === state) { + tarteaucitron.sendEvent(service.key + '_loaded'); + } + + if (true === state || false === state) { + tarteaucitron.state[service.key] = state; + } tarteaucitron.userInterface.color(service.key, state); if( 'wait' === state ) { diff --git a/tarteaucitron.min.js b/tarteaucitron.min.js index cac6d1f2..31136f8f 100644 --- a/tarteaucitron.min.js +++ b/tarteaucitron.min.js @@ -1 +1 @@ -var scripts=document.getElementsByTagName("script"),tarteaucitronPath=(document.currentScript||scripts[scripts.length-1]).src.split("?")[0],tarteaucitronForceCDN=tarteaucitronForceCDN===undefined?"":tarteaucitronForceCDN,tarteaucitronUseMin=tarteaucitronUseMin===undefined?"":tarteaucitronUseMin,cdn=tarteaucitronForceCDN===""?tarteaucitronPath.split("/").slice(0,-1).join("/")+"/":tarteaucitronForceCDN,alreadyLaunch=alreadyLaunch===undefined?0:alreadyLaunch,tarteaucitronForceLanguage=tarteaucitronForceLanguage===undefined?"":tarteaucitronForceLanguage,tarteaucitronForceExpire=tarteaucitronForceExpire===undefined?"":tarteaucitronForceExpire,tarteaucitronCustomText=tarteaucitronCustomText===undefined?"":tarteaucitronCustomText,tarteaucitronExpireInDay=tarteaucitronExpireInDay===undefined||typeof tarteaucitronExpireInDay!=="boolean"?true:tarteaucitronExpireInDay,timeExpire=31536e6,tarteaucitronProLoadServices,tarteaucitronNoAdBlocker=false,tarteaucitronIsLoaded=false;var tarteaucitron={version:1.19,cdn:cdn,user:{},lang:{},services:{},added:[],idprocessed:[],state:{},launch:[],parameters:{},isAjax:false,reloadThePage:false,events:{init:function(){},load:function(){}},init:function(params){"use strict";var origOpen;tarteaucitron.parameters=params;if(alreadyLaunch===0){alreadyLaunch=1;if(window.addEventListener){window.addEventListener("load",function(){tarteaucitron.initEvents.loadEvent(false)},false);window.addEventListener("scroll",function(){tarteaucitron.initEvents.scrollEvent()},false);window.addEventListener("keydown",function(evt){tarteaucitron.initEvents.keydownEvent(false,evt)},false);window.addEventListener("hashchange",function(){tarteaucitron.initEvents.hashchangeEvent()},false);window.addEventListener("resize",function(){tarteaucitron.initEvents.resizeEvent()},false)}else{window.attachEvent("onload",function(){tarteaucitron.initEvents.loadEvent(true)});window.attachEvent("onscroll",function(){tarteaucitron.initEvents.scrollEvent()});window.attachEvent("onkeydown",function(evt){tarteaucitron.initEvents.keydownEvent(true,evt)});window.attachEvent("onhashchange",function(){tarteaucitron.initEvents.hashchangeEvent()});window.attachEvent("onresize",function(){tarteaucitron.initEvents.resizeEvent()})}if(typeof XMLHttpRequest!=="undefined"){origOpen=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){if(window.addEventListener){this.addEventListener("load",function(){if(typeof tarteaucitronProLoadServices==="function"){tarteaucitronProLoadServices()}},false)}else if(typeof this.attachEvent!=="undefined"){this.attachEvent("onload",function(){if(typeof tarteaucitronProLoadServices==="function"){tarteaucitronProLoadServices()}})}else{if(typeof tarteaucitronProLoadServices==="function"){setTimeout(tarteaucitronProLoadServices,1e3)}}try{origOpen.apply(this,arguments)}catch(err){}}}}if(tarteaucitron.events.init){tarteaucitron.events.init()}},initEvents:{loadEvent:function(isOldBrowser){tarteaucitron.load();tarteaucitron.fallback(["tarteaucitronOpenPanel"],function(elem){if(isOldBrowser){elem.attachEvent("onclick",function(event){tarteaucitron.userInterface.openPanel();event.preventDefault()})}else{elem.addEventListener("click",function(event){tarteaucitron.userInterface.openPanel();event.preventDefault()},false)}},true)},keydownEvent:function(isOldBrowser,evt){if(evt.keyCode===27){tarteaucitron.userInterface.closePanel()}if(isOldBrowser){if(evt.keyCode===9&&focusableEls.indexOf(evt.target)>=0){if(evt.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();evt.preventDefault()}}else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();evt.preventDefault()}}}}},hashchangeEvent:function(){if(document.location.hash===tarteaucitron.hashtag&&tarteaucitron.hashtag!==""){tarteaucitron.userInterface.openPanel()}},resizeEvent:function(){var tacElem=document.getElementById("tarteaucitron");var tacCookieContainer=document.getElementById("tarteaucitronCookiesListContainer");if(tacElem&&tacElem.style.display==="block"){tarteaucitron.userInterface.jsSizing("main")}if(tacCookieContainer&&tacCookieContainer.style.display==="block"){tarteaucitron.userInterface.jsSizing("cookie")}},scrollEvent:function(){var scrollPos=window.pageYOffset||document.documentElement.scrollTop;var heightPosition;var tacPercentage=document.getElementById("tarteaucitronPercentage");var tacAlertBig=document.getElementById("tarteaucitronAlertBig");if(tacAlertBig&&!tarteaucitron.highPrivacy){if(tacAlertBig.style.display==="block"){heightPosition=tacAlertBig.offsetHeight+"px";if(scrollPos>screen.height*2){tarteaucitron.userInterface.respondAll(true)}else if(scrollPos>screen.height/2){document.getElementById("tarteaucitronDisclaimerAlert").innerHTML=""+tarteaucitron.lang.alertBigScroll+" "+tarteaucitron.lang.alertBig}if(tacPercentage){if(tarteaucitron.orientation==="top"){tacPercentage.style.top=heightPosition}else{tacPercentage.style.bottom=heightPosition}tacPercentage.style.width=100/(screen.height*2)*scrollPos+"%"}}}}},load:function(){"use strict";if(tarteaucitronIsLoaded===true){return}var cdn=tarteaucitron.cdn,language=tarteaucitron.getLanguage(),useMinifiedJS=cdn.indexOf("cdn.jsdelivr.net")>=0||tarteaucitronPath.indexOf(".min.")>=0||tarteaucitronUseMin!=="",pathToLang=cdn+"lang/tarteaucitron."+language+(useMinifiedJS?".min":"")+".js",pathToServices=cdn+"tarteaucitron.services"+(useMinifiedJS?".min":"")+".js",linkElement=document.createElement("link"),defaults={adblocker:false,hashtag:"#tarteaucitron",cookieName:"tarteaucitron",highPrivacy:true,orientation:"middle",bodyPosition:"bottom",removeCredit:false,showAlertSmall:false,showDetailsOnClick:true,showIcon:true,iconPosition:"BottomRight",cookieslist:false,handleBrowserDNTRequest:false,DenyAllCta:true,AcceptAllCta:true,moreInfoLink:true,privacyUrl:"",useExternalCss:false,useExternalJs:false,mandatory:true,mandatoryCta:true,closePopup:false,groupServices:false,serviceDefaultState:"wait",googleConsentMode:true,partnersList:false,alwaysNeedConsent:false},params=tarteaucitron.parameters;tarteaucitronIsLoaded=true;if((tarteaucitron.parameters.readmoreLink!==undefined&&window.location.href==tarteaucitron.parameters.readmoreLink||window.location.href==tarteaucitron.parameters.privacyUrl)&&tarteaucitron.parameters.orientation=="middle"){tarteaucitron.parameters.orientation="bottom"}if(typeof tarteaucitronCustomPremium!=="undefined"){tarteaucitronCustomPremium()}if(params!==undefined){for(var k in defaults){if(!tarteaucitron.parameters.hasOwnProperty(k)){tarteaucitron.parameters[k]=defaults[k]}}}tarteaucitron.orientation=tarteaucitron.parameters.orientation;tarteaucitron.hashtag=tarteaucitron.parameters.hashtag;tarteaucitron.highPrivacy=tarteaucitron.parameters.highPrivacy;tarteaucitron.handleBrowserDNTRequest=tarteaucitron.parameters.handleBrowserDNTRequest;tarteaucitron.customCloserId=tarteaucitron.parameters.customCloserId;if(tarteaucitron.parameters.googleConsentMode===true){window.dataLayer=window.dataLayer||[];window.tac_gtag=function tac_gtag(){dataLayer.push(arguments)};window.tac_gtag("consent","default",{ad_storage:"denied",analytics_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",wait_for_update:800});document.addEventListener("googleads_added",function(){if(tarteaucitron.added["gcmads"]===true){return}tarteaucitron.services.gcmads={key:"gcmads",type:"ads",name:"Google Ads (personalized ads)",uri:"https://support.google.com/analytics/answer/9976101",needConsent:true,cookies:[],js:function(){},fallback:function(){}};tarteaucitron.job.push("gcmads");var i,allowBtns=document.getElementsByClassName("tarteaucitronAllow"),denyBtns=document.getElementsByClassName("tarteaucitronDeny");for(i=0;itarteaucitron.lang[b].title){return 1}if(tarteaucitron.lang[a].title";html+='
';if(tarteaucitron.reloadThePage){html+=''}else{html+=''}html+='";if(tarteaucitron.parameters.orientation==="bottom"){orientation="Bottom"}if(tarteaucitron.parameters.orientation==="middle"||tarteaucitron.parameters.orientation==="popup"){modalAttrs=' role="dialog" aria-modal="true" aria-labelledby="tac_title"'}if(tarteaucitron.parameters.highPrivacy&&!tarteaucitron.parameters.AcceptAllCta){html+='
";html+=' ';html+=" "+tarteaucitron.lang.alertBigPrivacy;html+=" ";html+=' ";if(tarteaucitron.parameters.privacyUrl!==""){html+=' "}html+="
"}else{html+='
";html+=' ';if(tarteaucitron.parameters.highPrivacy){html+=" "+tarteaucitron.lang.alertBigPrivacy}else{html+=" "+tarteaucitron.lang.alertBigClick+" "+tarteaucitron.lang.alertBig}html+=" ";html+=' ";if(tarteaucitron.parameters.DenyAllCta){if(tarteaucitron.reloadThePage){html+=' "}html+=' ";if(tarteaucitron.parameters.privacyUrl!==""){html+=' "}html+="
";html+='
'}if(tarteaucitron.parameters.showIcon===true){html+='
';html+=' ";html+="
"}if(tarteaucitron.parameters.showAlertSmall===true){html+='
';html+=' \x3c!-- @whitespace";html+=' --\x3e';html+='
';if(tarteaucitron.reloadThePage){html+=' ";html+='
';html+=' 0 cookie';html+="
";html+='
';html+="
"}else{html+="
"}html+=""}tarteaucitron.addInternalScript(tarteaucitron.cdn+"advertising"+(useMinifiedJS?".min":"")+".js","",function(){if(tarteaucitronNoAdBlocker===true||tarteaucitron.parameters.adblocker===false){div.id="tarteaucitronRoot";if(tarteaucitron.parameters.bodyPosition==="top"){var bodyFirstChild=body.firstChild;body.insertBefore(div,bodyFirstChild)}else{body.appendChild(div,body)}div.setAttribute("data-nosnippet","true");div.setAttribute("lang",language);div.setAttribute("role","region");div.setAttribute("aria-labelledby","tac_title");div.innerHTML=html;var tacRootAvailableEvent;if(typeof Event==="function"){tacRootAvailableEvent=new Event("tac.root_available")}else if(typeof document.createEvent==="function"){tacRootAvailableEvent=document.createEvent("Event");tacRootAvailableEvent.initEvent("tac.root_available",true,true)}if(typeof window.dispatchEvent==="function"){window.dispatchEvent(tacRootAvailableEvent)}if(tarteaucitron.job!==undefined){tarteaucitron.job=tarteaucitron.cleanArray(tarteaucitron.job);for(index=0;index';html+='

';html+=" "+tarteaucitron.lang.adblock+"
";html+=" "+tarteaucitron.lang.adblock_call+"";html+="

";html+=' ";html+="";html+='
'+tarteaucitron.lang.title+"
";html+='
';div.id="tarteaucitronRoot";if(tarteaucitron.parameters.bodyPosition==="top"){var bodyFirstChild=body.firstChild;body.insertBefore(div,bodyFirstChild)}else{body.appendChild(div,body)}div.setAttribute("data-nosnippet","true");div.setAttribute("lang",language);div.setAttribute("role","region");div.setAttribute("aria-labelledby","tac_title");div.innerHTML=html}},1500)}if(tarteaucitron.parameters.closePopup===true){setTimeout(function(){var closeElement=document.getElementById("tarteaucitronAlertBig"),closeButton=document.createElement("button");if(closeElement){closeButton.innerHTML=''+tarteaucitron.lang.closeBanner+"";closeButton.setAttribute("id","tarteaucitronCloseCross");closeElement.insertAdjacentElement("beforeend",closeButton)}},100)}if(tarteaucitron.parameters.groupServices===true){var tac_group_style=document.createElement("style");tac_group_style.innerHTML=".tarteaucitronTitle{display:none}";document.head.appendChild(tac_group_style);var cats=document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]');Array.prototype.forEach.call(cats,function(item){var cat=item.getAttribute("id").replace(/^(tarteaucitronServicesTitle_)/,"");if(cat!=="mandatory"){var html="";html+='
  • ';html+='
    ';html+=' '+tarteaucitron.lang[cat].title+"";html+=" "+tarteaucitron.lang[cat].details+"";html+=' ";html+="
    ";html+='
    ';html+=' ";html+=' ";html+="
    ";html+="
  • ";var ul=document.createElement("ul");ul.innerHTML=html;item.insertBefore(ul,item.querySelector("#tarteaucitronServices_"+cat+""));document.querySelector("#tarteaucitronServices_"+cat).style.display="none";tarteaucitron.addClickEventToId("tarteaucitron-toggle-group-"+cat,function(){tarteaucitron.userInterface.toggle("tarteaucitronServices_"+cat);if(document.getElementById("tarteaucitronServices_"+cat).style.display=="block"){tarteaucitron.userInterface.addClass("tarteaucitronServicesTitle_"+cat,"tarteaucitronIsExpanded");document.getElementById("tarteaucitron-toggle-group-"+cat).setAttribute("aria-expanded","true")}else{tarteaucitron.userInterface.removeClass("tarteaucitronServicesTitle_"+cat,"tarteaucitronIsExpanded");document.getElementById("tarteaucitron-toggle-group-"+cat).setAttribute("aria-expanded","false")}});tarteaucitron.addClickEventToId("tarteaucitron-accept-group-"+cat,function(){tarteaucitron.userInterface.respondAll(true,cat)});tarteaucitron.addClickEventToId("tarteaucitron-reject-group-"+cat,function(){tarteaucitron.userInterface.respondAll(false,cat)})}})}if(tarteaucitron.parameters.partnersList===true&&(tarteaucitron.parameters.orientation==="middle"||tarteaucitron.parameters.orientation==="popup")){setTimeout(function(){var liPartners="";var tarteaucitronPartnersCat=[];tarteaucitron.job.forEach(function(id){if(tarteaucitronPartnersCat[tarteaucitron.services[id].type]===undefined){tarteaucitronPartnersCat[tarteaucitron.services[id].type]=true;liPartners+="
  • "+tarteaucitron.lang[tarteaucitron.services[id].type].title+"
  • "}});var tacPartnersInfoParent=document.getElementById("tarteaucitronDisclaimerAlert");if(tacPartnersInfoParent!==null){tacPartnersInfoParent.insertAdjacentHTML("beforeend",'
    '+tarteaucitron.lang.ourpartners+" ("+tarteaucitron.job.length+")
      "+liPartners+"
    ")}},100)}setTimeout(function(){var tacSaveButtonParent=document.getElementById("tarteaucitronServices");if(tacSaveButtonParent!==null){tacSaveButtonParent.insertAdjacentHTML("beforeend",'
    ")}},100);tarteaucitron.userInterface.color("",true);setTimeout(function(){tarteaucitron.addClickEventToId("tarteaucitronCloseCross",function(){tarteaucitron.userInterface.closeAlert()});tarteaucitron.addClickEventToId("tarteaucitronPersonalize",function(){tarteaucitron.userInterface.openPanel()});tarteaucitron.addClickEventToId("tarteaucitronPersonalize2",function(){tarteaucitron.userInterface.respondAll(true)});tarteaucitron.addClickEventToId("tarteaucitronManager",function(){tarteaucitron.userInterface.openPanel()});tarteaucitron.addClickEventToId("tarteaucitronBack",function(){tarteaucitron.userInterface.closePanel()});tarteaucitron.addClickEventToId("tarteaucitronClosePanel",function(){tarteaucitron.userInterface.closePanel()});tarteaucitron.addClickEventToId("tarteaucitronClosePanelCookie",function(){tarteaucitron.userInterface.closePanel()});tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrl",function(){document.location=tarteaucitron.parameters.privacyUrl});tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrlDialog",function(){document.location=tarteaucitron.parameters.privacyUrl});tarteaucitron.addClickEventToId("tarteaucitronCookiesNumber",function(){tarteaucitron.userInterface.toggleCookiesList()});tarteaucitron.addClickEventToId("tarteaucitronAllAllowed",function(){tarteaucitron.userInterface.respondAll(true)});tarteaucitron.addClickEventToId("tarteaucitronAllDenied",function(){tarteaucitron.userInterface.respondAll(false)});tarteaucitron.addClickEventToId("tarteaucitronAllDenied2",function(){tarteaucitron.userInterface.respondAll(false,"",true);if(tarteaucitron.reloadThePage===true){window.location.reload()}});tarteaucitron.addClickEventToId("tarteaucitronCloseAlert",function(){tarteaucitron.userInterface.openPanel()});tarteaucitron.addClickEventToId("tarteaucitronCTAButton",function(){location.reload()});tarteaucitron.addClickEventToId("tarteaucitronSaveButton",function(){var timeoutSaveButton=0;tarteaucitron.job.forEach(function(id){if(tarteaucitron.state[id]!==true&&tarteaucitron.state[id]!==false){timeoutSaveButton=500;tarteaucitron.setConsent(id,false)}});setTimeout(tarteaucitron.userInterface.closePanel,timeoutSaveButton)});var toggleBtns=document.getElementsByClassName("catToggleBtn"),i;for(i=0;i=0,isDenied=cookie.indexOf(service.key+"=false")>=0,isAllowed=cookie.indexOf(service.key+"=true")>=0||!service.needConsent&&cookie.indexOf(service.key+"=false")<0,isResponded=cookie.indexOf(service.key+"=false")>=0||cookie.indexOf(service.key+"=true")>=0,isDNTRequested=navigator.doNotTrack==="1"||navigator.doNotTrack==="yes"||navigator.msDoNotTrack==="1"||window.doNotTrack==="1",currentStatus=isAllowed?tarteaucitron.lang.allowed:tarteaucitron.lang.disallowed,state=undefined!==service.defaultState?service.defaultState:undefined!==tarteaucitron.parameters.serviceDefaultState?tarteaucitron.parameters.serviceDefaultState:"wait";if(tarteaucitron.added[service.key]!==true){tarteaucitron.added[service.key]=true;html+='
  • ';html+='
    ';html+=' '+service.name+"";html+='
    ';html+=' '+currentStatus+"";html+=' - ';html+=' ';html+="
    ";if(tarteaucitron.parameters.moreInfoLink==true){var link="https://tarteaucitron.io/service/"+service.key+"/";if(service.readmoreLink!==undefined&&service.readmoreLink!==""){link=service.readmoreLink}if(tarteaucitron.parameters.readmoreLink!==undefined&&tarteaucitron.parameters.readmoreLink!==""){link=tarteaucitron.parameters.readmoreLink}html+=' '+tarteaucitron.lang.more+"";html+=' - ';html+=' '+tarteaucitron.lang.source+""}html+="
    ";html+='
    ';html+=' ";html+=' ";html+="
    ";html+="
  • ";tarteaucitron.userInterface.css("tarteaucitronServicesTitle_"+service.type,"display","block");if(document.getElementById("tarteaucitronServices_"+service.type)!==null){document.getElementById("tarteaucitronServices_"+service.type).innerHTML+=html}tarteaucitron.userInterface.css("tarteaucitronNoServicesTitle","display","none");tarteaucitron.userInterface.order(service.type);tarteaucitron.addClickEventToId(service.key+"Allowed",function(){tarteaucitron.userInterface.respond(this,true)});tarteaucitron.addClickEventToId(service.key+"Denied",function(){tarteaucitron.userInterface.respond(this,false)})}tarteaucitron.pro("!"+service.key+"="+isAllowed);if(isResponded===false&&tarteaucitron.user.bypass===true){isAllowed=true;tarteaucitron.cookie.create(service.key,true)}if(!isResponded&&(isAutostart||isNavigating&&isWaiting)&&!tarteaucitron.highPrivacy||isAllowed){if(!isAllowed||!service.needConsent&&cookie.indexOf(service.key+"=false")<0){tarteaucitron.cookie.create(service.key,true)}if(tarteaucitron.launch[service.key]!==true){tarteaucitron.launch[service.key]=true;if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.js()}tarteaucitron.sendEvent(service.key+"_loaded")}tarteaucitron.state[service.key]=true;tarteaucitron.userInterface.color(service.key,true)}else if(isDenied){if(typeof service.fallback==="function"){if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.fallback()}}tarteaucitron.state[service.key]=false;tarteaucitron.userInterface.color(service.key,false)}else if(!isResponded&&isDNTRequested&&tarteaucitron.handleBrowserDNTRequest){tarteaucitron.cookie.create(service.key,"false");if(typeof service.fallback==="function"){if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.fallback()}}tarteaucitron.state[service.key]=false;tarteaucitron.userInterface.color(service.key,false)}else if(!isResponded){tarteaucitron.cookie.create(service.key,state);if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){if(true===state&&typeof service.js==="function"){service.js();tarteaucitron.sendEvent(service.key+"_loaded")}else if(typeof service.fallback==="function"){service.fallback()}}tarteaucitron.userInterface.color(service.key,state);if("wait"===state){tarteaucitron.userInterface.openAlert()}}tarteaucitron.cookie.checkCount(service.key);tarteaucitron.sendEvent(service.key+"_added")},sendEvent:function(event_key){if(event_key!==undefined){var send_event_item;if(typeof Event==="function"){send_event_item=new Event(event_key)}else if(typeof document.createEvent==="function"){send_event_item=document.createEvent("Event");send_event_item.initEvent(event_key,true,true)}document.dispatchEvent(send_event_item)}},cleanArray:function cleanArray(arr){"use strict";var i,len=arr.length,out=[],obj={},s=tarteaucitron.services;for(i=0;is[b].type+s[b].key){return 1}if(s[a].type+s[a].key0&&status===false){tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies)}if(status===true){if(document.getElementById("tacCL"+key)!==null){document.getElementById("tacCL"+key).innerHTML="..."}setTimeout(function(){tarteaucitron.cookie.checkCount(key)},2500)}else{tarteaucitron.cookie.checkCount(key)}}var cats=document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]');Array.prototype.forEach.call(cats,function(item){var cat=item.getAttribute("id").replace(/^(tarteaucitronServicesTitle_)/,""),total=document.getElementById("tarteaucitronServices_"+cat).childElementCount;var doc=document.getElementById("tarteaucitronServices_"+cat),groupdenied=0,groupallowed=0;for(var ii=0;ii0){filtered.push(focusableEls[i])}}firstFocusableEl=filtered[0];lastFocusableEl=filtered[filtered.length-1];document.getElementById(parentElement).addEventListener("keydown",function(evt){if(evt.key==="Tab"||evt.keyCode===9){if(evt.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();evt.preventDefault()}}else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();evt.preventDefault()}}}})},openAlert:function(){"use strict";var c="tarteaucitron";tarteaucitron.userInterface.css(c+"Percentage","display","block");tarteaucitron.userInterface.css(c+"AlertSmall","display","none");tarteaucitron.userInterface.css(c+"Icon","display","none");tarteaucitron.userInterface.css(c+"AlertBig","display","block");tarteaucitron.userInterface.addClass(c+"Root","tarteaucitronBeforeVisible");var tacOpenAlertEvent;if(typeof Event==="function"){tacOpenAlertEvent=new Event("tac.open_alert")}else if(typeof document.createEvent==="function"){tacOpenAlertEvent=document.createEvent("Event");tacOpenAlertEvent.initEvent("tac.open_alert",true,true)}if(document.getElementById("tarteaucitronAlertBig")!==null&&tarteaucitron.parameters.orientation==="middle"){document.getElementById("tarteaucitronAlertBig").focus()}if(typeof window.dispatchEvent==="function"){window.dispatchEvent(tacOpenAlertEvent)}},closeAlert:function(){"use strict";var c="tarteaucitron";tarteaucitron.userInterface.css(c+"Percentage","display","none");tarteaucitron.userInterface.css(c+"AlertSmall","display","block");tarteaucitron.userInterface.css(c+"Icon","display","block");tarteaucitron.userInterface.css(c+"AlertBig","display","none");tarteaucitron.userInterface.removeClass(c+"Root","tarteaucitronBeforeVisible");tarteaucitron.userInterface.jsSizing("box");var tacCloseAlertEvent;if(typeof Event==="function"){tacCloseAlertEvent=new Event("tac.close_alert")}else if(typeof document.createEvent==="function"){tacCloseAlertEvent=document.createEvent("Event");tacCloseAlertEvent.initEvent("tac.close_alert",true,true)}if(typeof window.dispatchEvent==="function"){window.dispatchEvent(tacCloseAlertEvent)}},toggleCookiesList:function(){"use strict";var div=document.getElementById("tarteaucitronCookiesListContainer"),togglediv=document.getElementById("tarteaucitronCookiesNumber");if(div===null){return}if(div.style.display!=="block"){tarteaucitron.cookie.number();div.style.display="block";togglediv.setAttribute("aria-expanded","true");tarteaucitron.userInterface.jsSizing("cookie");tarteaucitron.userInterface.css("tarteaucitron","display","none");tarteaucitron.userInterface.css("tarteaucitronBack","display","block");tarteaucitron.fallback(["tarteaucitronInfoBox"],function(elem){elem.style.display="none"},true)}else{div.style.display="none";togglediv.setAttribute("aria-expanded","false");tarteaucitron.userInterface.css("tarteaucitron","display","none");tarteaucitron.userInterface.css("tarteaucitronBack","display","none")}},toggle:function(id,closeClass){"use strict";var div=document.getElementById(id);if(div===null){return}if(closeClass!==undefined){tarteaucitron.fallback([closeClass],function(elem){if(elem.id!==id){elem.style.display="none"}},true)}if(div.style.display!=="block"){div.style.display="block"}else{div.style.display="none"}},order:function(id){"use strict";var main=document.getElementById("tarteaucitronServices_"+id),allDivs,store=[],i;if(main===null){return}allDivs=main.childNodes;if(typeof Array.prototype.map==="function"&&typeof Enumerable==="undefined"){Array.prototype.map.call(main.children,Object).sort(function(a,b){if(tarteaucitron.services[a.id.replace(/Line/g,"")].name>tarteaucitron.services[b.id.replace(/Line/g,"")].name){return 1}if(tarteaucitron.services[a.id.replace(/Line/g,"")].name=0&&nb===0){html+=tarteaucitron.lang.useNoCookie}else if(status>=0){for(i=0;i0){html+=tarteaucitron.lang.useCookieCurrent+" "+nbCurrent+" "+cookieLabel;if(nbCurrent>1){html+="s"}html+="."}else{html+=tarteaucitron.lang.useNoCookie}}else if(nb===0){html=tarteaucitron.lang.noCookie}else{html+=tarteaucitron.lang.useCookie+" "+nb+" "+cookieLabel;if(nb>1){html+="s"}html+="."}if(document.getElementById("tacCL"+key)!==null){document.getElementById("tacCL"+key).innerHTML=html}},crossIndexOf:function(arr,match){"use strict";var i;for(i=0;i1?"s":"",savedname,regex=/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,regexedDomain=tarteaucitron.cdn.match(regex)!==null?tarteaucitron.cdn.match(regex)[1]:tarteaucitron.cdn,host=tarteaucitron.domain!==undefined?tarteaucitron.domain:regexedDomain;cookies=cookies.sort(function(a,b){namea=a.split("=",1).toString().replace(/ /g,"");nameb=b.split("=",1).toString().replace(/ /g,"");c=tarteaucitron.cookie.owner[namea]!==undefined?tarteaucitron.cookie.owner[namea]:"0";d=tarteaucitron.cookie.owner[nameb]!==undefined?tarteaucitron.cookie.owner[nameb]:"0";if(c+a>d+b){return 1}if(c+a';html+=' ';html+=" "+host;html+=" ";html+='"}else{html+='
    ';html+='
    -
    ';html+='
    ';html+="
    "}html+='
    ';if(document.getElementById("tarteaucitronCookiesList")!==null){document.getElementById("tarteaucitronCookiesList").innerHTML=html}if(document.getElementById("tarteaucitronCookiesNumber")!==null){document.getElementById("tarteaucitronCookiesNumber").innerHTML=nb;document.getElementById("tarteaucitronCookiesNumber").setAttribute("aria-label",nb+" cookie"+s+" - "+tarteaucitron.lang.toggleInfoBox);document.getElementById("tarteaucitronCookiesNumber").setAttribute("title",nb+" cookie"+s+" - "+tarteaucitron.lang.toggleInfoBox)}if(document.getElementById("tarteaucitronCookiesNumberBis")!==null){document.getElementById("tarteaucitronCookiesNumberBis").innerHTML=nb+" cookie"+s}var purgeBtns=document.getElementsByClassName("purgeBtn");for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")},getLanguage:function(){"use strict";var availableLanguages="ar,bg,ca,cn,cs,da,de,et,el,en,es,fi,fr,hr,hu,it,ja,ko,lb,lt,lv,nl,no,oc,pl,pt,ro,ru,se,sk,sv,tr,uk,vi,zh",defaultLanguage="en";if(tarteaucitronForceLanguage!==""){if(availableLanguages.indexOf(tarteaucitronForceLanguage)!==-1){return tarteaucitronForceLanguage}}if(document.documentElement.getAttribute("lang")!==undefined&&document.documentElement.getAttribute("lang")!==null&&document.documentElement.getAttribute("lang")!==""){if(availableLanguages.indexOf(document.documentElement.getAttribute("lang").substr(0,2))!==-1){return document.documentElement.getAttribute("lang").substr(0,2)}}if(!navigator){return defaultLanguage}var lang=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,userLanguage=lang?lang.substr(0,2):null;if(availableLanguages.indexOf(userLanguage)!==-1){return userLanguage}return defaultLanguage},getLocale:function(){"use strict";if(!navigator){return"en_US"}var lang=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,userLanguage=lang?lang.substr(0,2):null;if(userLanguage==="fr"){return"fr_FR"}else if(userLanguage==="en"){return"en_US"}else if(userLanguage==="de"){return"de_DE"}else if(userLanguage==="es"){return"es_ES"}else if(userLanguage==="it"){return"it_IT"}else if(userLanguage==="pt"){return"pt_PT"}else if(userLanguage==="nl"){return"nl_NL"}else if(userLanguage==="el"){return"el_EL"}else{return"en_US"}},addScript:function(url,id,callback,execute,attrName,attrVal,internal){"use strict";var script,done=false;if(execute===false){if(typeof callback==="function"){callback()}}else{script=document.createElement("script");if(id!==undefined){script.id=id}script.async=true;script.src=url;if(attrName!==undefined&&attrVal!==undefined){script.setAttribute(attrName,attrVal)}if(typeof callback==="function"){if(!tarteaucitron.parameters.useExternalJs||!internal){script.onreadystatechange=script.onload=function(){var state=script.readyState;if(!done&&(!state||/loaded|complete/.test(state))){done=true;callback()}}}else{callback()}}if(!tarteaucitron.parameters.useExternalJs||!internal){document.getElementsByTagName("head")[0].appendChild(script)}}},addInternalScript:function(url,id,callback,execute,attrName,attrVal){tarteaucitron.addScript(url,id,callback,execute,attrName,attrVal,true)},checkIfExist:function(elemId){"use strict";return document.getElementById(elemId)!==null&&document.getElementById(elemId).offsetWidth!==0&&document.getElementById(elemId).offsetHeight!==0},makeAsync:{antiGhost:0,buffer:"",init:function(url,id){"use strict";var savedWrite=document.write,savedWriteln=document.writeln;document.write=function(content){tarteaucitron.makeAsync.buffer+=content};document.writeln=function(content){tarteaucitron.makeAsync.buffer+=content.concat("\n")};setTimeout(function(){document.write=savedWrite;document.writeln=savedWriteln},2e4);tarteaucitron.makeAsync.getAndParse(url,id)},getAndParse:function(url,id){"use strict";if(tarteaucitron.makeAsync.antiGhost>9){tarteaucitron.makeAsync.antiGhost=0;return}tarteaucitron.makeAsync.antiGhost+=1;tarteaucitron.addInternalScript(url,"",function(){if(document.getElementById(id)!==null){document.getElementById(id).innerHTML+=" "+tarteaucitron.makeAsync.buffer;tarteaucitron.makeAsync.buffer="";tarteaucitron.makeAsync.execJS(id)}})},execJS:function(id){var i,scripts,childId,type;if(document.getElementById(id)===null){return}scripts=document.getElementById(id).getElementsByTagName("script");for(i=0;i';tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute("src"),childId)}else if(type.indexOf("javascript")!==-1||type===""){eval(scripts[i].innerHTML)}}}},fallback:function(matchClass,content,noInner){"use strict";var elems=document.getElementsByTagName("*"),i,index=0;for(i in elems){if(elems[i]!==undefined){for(index=0;index-1){if(typeof content==="function"){if(noInner===true){content(elems[i])}else{elems[i].innerHTML=content(elems[i])}}else{elems[i].innerHTML=content}}}}}},engage:function(id){"use strict";var html="",r=Math.floor(Math.random()*1e5),engage=tarteaucitron.services[id].name+" "+tarteaucitron.lang.fallback;if(tarteaucitron.lang["engage-"+id]!==undefined){engage=tarteaucitron.lang["engage-"+id]}html+='
    ';html+='
    ';html+=" "+engage;html+=' ";html+="
    ";html+="
    ";return html},extend:function(a,b){"use strict";var prop;for(prop in b){if(b.hasOwnProperty(prop)){a[prop]=b[prop]}}},proTemp:"",proTimer:function(){"use strict";setTimeout(tarteaucitron.proPing,Math.floor(Math.random()*(1200-500+1))+500)},pro:function(list){"use strict";tarteaucitron.proTemp+=list;clearTimeout(tarteaucitron.proTimer);tarteaucitron.proTimer=setTimeout(tarteaucitron.proPing,Math.floor(Math.random()*(1200-500+1))+500)},proPing:function(){"use strict";if(tarteaucitron.uuid!==""&&tarteaucitron.uuid!==undefined&&tarteaucitron.proTemp!==""&&tarteaucitronStatsEnabled){var div=document.getElementById("tarteaucitronPremium"),timestamp=(new Date).getTime(),url="https://tarteaucitron.io/log/?";if(div===null){return}url+="account="+tarteaucitron.uuid+"&";url+="domain="+tarteaucitron.domain+"&";url+="status="+encodeURIComponent(tarteaucitron.proTemp)+"&";url+="_time="+timestamp;div.innerHTML='';tarteaucitron.proTemp=""}tarteaucitron.cookie.number()},AddOrUpdate:function(source,custom){for(var key in custom){if(custom[key]instanceof Object){source[key]=tarteaucitron.AddOrUpdate(source[key],custom[key])}else{source[key]=custom[key]}}return source},getElemWidth:function(elem){return tarteaucitron.getElemAttr(elem,"width")||elem.clientWidth},getElemHeight:function(elem){return tarteaucitron.getElemAttr(elem,"height")||elem.clientHeight},getElemAttr:function(elem,attr){var attribute=elem.getAttribute("data-"+attr)||elem.getAttribute(attr);if(typeof attribute==="string"){return tarteaucitron.fixSelfXSS(attribute)}return""},addClickEventToId:function(elemId,func){tarteaucitron.addClickEventToElement(document.getElementById(elemId),func)},addClickEventToElement:function(e,func){if(e){if(e.addEventListener){e.addEventListener("click",func)}else{e.attachEvent("onclick",func)}}},triggerJobsAfterAjaxCall:function(){tarteaucitron.job.forEach(function(e){tarteaucitron.job.push(e)});var i;var allowBtns=document.getElementsByClassName("tarteaucitronAllow");for(i=0;i=0){if(evt.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();evt.preventDefault()}}else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();evt.preventDefault()}}}}},hashchangeEvent:function(){if(document.location.hash===tarteaucitron.hashtag&&tarteaucitron.hashtag!==""){tarteaucitron.userInterface.openPanel()}},resizeEvent:function(){var tacElem=document.getElementById("tarteaucitron");var tacCookieContainer=document.getElementById("tarteaucitronCookiesListContainer");if(tacElem&&tacElem.style.display==="block"){tarteaucitron.userInterface.jsSizing("main")}if(tacCookieContainer&&tacCookieContainer.style.display==="block"){tarteaucitron.userInterface.jsSizing("cookie")}},scrollEvent:function(){var scrollPos=window.pageYOffset||document.documentElement.scrollTop;var heightPosition;var tacPercentage=document.getElementById("tarteaucitronPercentage");var tacAlertBig=document.getElementById("tarteaucitronAlertBig");if(tacAlertBig&&!tarteaucitron.highPrivacy){if(tacAlertBig.style.display==="block"){heightPosition=tacAlertBig.offsetHeight+"px";if(scrollPos>screen.height*2){tarteaucitron.userInterface.respondAll(true)}else if(scrollPos>screen.height/2){document.getElementById("tarteaucitronDisclaimerAlert").innerHTML=""+tarteaucitron.lang.alertBigScroll+" "+tarteaucitron.lang.alertBig}if(tacPercentage){if(tarteaucitron.orientation==="top"){tacPercentage.style.top=heightPosition}else{tacPercentage.style.bottom=heightPosition}tacPercentage.style.width=100/(screen.height*2)*scrollPos+"%"}}}}},load:function(){"use strict";if(tarteaucitronIsLoaded===true){return}var cdn=tarteaucitron.cdn,language=tarteaucitron.getLanguage(),useMinifiedJS=cdn.indexOf("cdn.jsdelivr.net")>=0||tarteaucitronPath.indexOf(".min.")>=0||tarteaucitronUseMin!=="",pathToLang=cdn+"lang/tarteaucitron."+language+(useMinifiedJS?".min":"")+".js",pathToServices=cdn+"tarteaucitron.services"+(useMinifiedJS?".min":"")+".js",linkElement=document.createElement("link"),defaults={adblocker:false,hashtag:"#tarteaucitron",cookieName:"tarteaucitron",highPrivacy:true,orientation:"middle",bodyPosition:"bottom",removeCredit:false,showAlertSmall:false,showDetailsOnClick:true,showIcon:true,iconPosition:"BottomRight",cookieslist:false,handleBrowserDNTRequest:false,DenyAllCta:true,AcceptAllCta:true,moreInfoLink:true,privacyUrl:"",useExternalCss:false,useExternalJs:false,mandatory:true,mandatoryCta:true,closePopup:false,groupServices:false,serviceDefaultState:"wait",googleConsentMode:true,partnersList:false,alwaysNeedConsent:false},params=tarteaucitron.parameters;tarteaucitronIsLoaded=true;if((tarteaucitron.parameters.readmoreLink!==undefined&&window.location.href==tarteaucitron.parameters.readmoreLink||window.location.href==tarteaucitron.parameters.privacyUrl)&&tarteaucitron.parameters.orientation=="middle"){tarteaucitron.parameters.orientation="bottom"}if(typeof tarteaucitronCustomPremium!=="undefined"){tarteaucitronCustomPremium()}if(params!==undefined){for(var k in defaults){if(!tarteaucitron.parameters.hasOwnProperty(k)){tarteaucitron.parameters[k]=defaults[k]}}}tarteaucitron.orientation=tarteaucitron.parameters.orientation;tarteaucitron.hashtag=tarteaucitron.parameters.hashtag;tarteaucitron.highPrivacy=tarteaucitron.parameters.highPrivacy;tarteaucitron.handleBrowserDNTRequest=tarteaucitron.parameters.handleBrowserDNTRequest;tarteaucitron.customCloserId=tarteaucitron.parameters.customCloserId;if(tarteaucitron.parameters.googleConsentMode===true){window.dataLayer=window.dataLayer||[];window.tac_gtag=function tac_gtag(){dataLayer.push(arguments)};window.tac_gtag("consent","default",{ad_storage:"denied",analytics_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",wait_for_update:800});document.addEventListener("googleads_added",function(){if(tarteaucitron.added["gcmads"]===true){return}tarteaucitron.services.gcmads={key:"gcmads",type:"ads",name:"Google Ads (personalized ads)",uri:"https://support.google.com/analytics/answer/9976101",needConsent:true,cookies:[],js:function(){},fallback:function(){}};tarteaucitron.job.push("gcmads");var i,allowBtns=document.getElementsByClassName("tarteaucitronAllow"),denyBtns=document.getElementsByClassName("tarteaucitronDeny");for(i=0;itarteaucitron.lang[b].title){return 1}if(tarteaucitron.lang[a].title";html+='
    ';if(tarteaucitron.reloadThePage){html+=''}else{html+=''}html+='";if(tarteaucitron.parameters.orientation==="bottom"){orientation="Bottom"}if(tarteaucitron.parameters.orientation==="middle"||tarteaucitron.parameters.orientation==="popup"){modalAttrs=' role="dialog" aria-modal="true" aria-labelledby="tac_title"'}if(tarteaucitron.parameters.highPrivacy&&!tarteaucitron.parameters.AcceptAllCta){html+='
    ";html+=' ';html+=" "+tarteaucitron.lang.alertBigPrivacy;html+=" ";html+=' ";if(tarteaucitron.parameters.privacyUrl!==""){html+=' "}html+="
    "}else{html+='
    ";html+=' ';if(tarteaucitron.parameters.highPrivacy){html+=" "+tarteaucitron.lang.alertBigPrivacy}else{html+=" "+tarteaucitron.lang.alertBigClick+" "+tarteaucitron.lang.alertBig}html+=" ";html+=' ";if(tarteaucitron.parameters.DenyAllCta){if(tarteaucitron.reloadThePage){html+=' "}html+=' ";if(tarteaucitron.parameters.privacyUrl!==""){html+=' "}html+="
    ";html+='
    '}if(tarteaucitron.parameters.showIcon===true){html+='
    ';html+=' ";html+="
    "}if(tarteaucitron.parameters.showAlertSmall===true){html+='
    ';html+=' \x3c!-- @whitespace";html+=' --\x3e';html+='
    ';if(tarteaucitron.reloadThePage){html+=' ";html+='
    ';html+=' 0 cookie';html+="
    ";html+='
    ';html+="
    "}else{html+="
    "}html+=""}tarteaucitron.addInternalScript(tarteaucitron.cdn+"advertising"+(useMinifiedJS?".min":"")+".js","",function(){if(tarteaucitronNoAdBlocker===true||tarteaucitron.parameters.adblocker===false){div.id="tarteaucitronRoot";if(tarteaucitron.parameters.bodyPosition==="top"){var bodyFirstChild=body.firstChild;body.insertBefore(div,bodyFirstChild)}else{body.appendChild(div,body)}div.setAttribute("data-nosnippet","true");div.setAttribute("lang",language);div.setAttribute("role","region");div.setAttribute("aria-labelledby","tac_title");div.innerHTML=html;var tacRootAvailableEvent;if(typeof Event==="function"){tacRootAvailableEvent=new Event("tac.root_available")}else if(typeof document.createEvent==="function"){tacRootAvailableEvent=document.createEvent("Event");tacRootAvailableEvent.initEvent("tac.root_available",true,true)}if(typeof window.dispatchEvent==="function"){window.dispatchEvent(tacRootAvailableEvent)}if(tarteaucitron.job!==undefined){tarteaucitron.job=tarteaucitron.cleanArray(tarteaucitron.job);for(index=0;index';html+='

    ';html+=" "+tarteaucitron.lang.adblock+"
    ";html+=" "+tarteaucitron.lang.adblock_call+"";html+="

    ";html+=' ";html+="";html+='
    '+tarteaucitron.lang.title+"
    ";html+='
    ';div.id="tarteaucitronRoot";if(tarteaucitron.parameters.bodyPosition==="top"){var bodyFirstChild=body.firstChild;body.insertBefore(div,bodyFirstChild)}else{body.appendChild(div,body)}div.setAttribute("data-nosnippet","true");div.setAttribute("lang",language);div.setAttribute("role","region");div.setAttribute("aria-labelledby","tac_title");div.innerHTML=html}},1500)}if(tarteaucitron.parameters.closePopup===true){setTimeout(function(){var closeElement=document.getElementById("tarteaucitronAlertBig"),closeButton=document.createElement("button");if(closeElement){closeButton.innerHTML=''+tarteaucitron.lang.closeBanner+"";closeButton.setAttribute("id","tarteaucitronCloseCross");closeElement.insertAdjacentElement("beforeend",closeButton)}},100)}if(tarteaucitron.parameters.groupServices===true){var tac_group_style=document.createElement("style");tac_group_style.innerHTML=".tarteaucitronTitle{display:none}";document.head.appendChild(tac_group_style);var cats=document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]');Array.prototype.forEach.call(cats,function(item){var cat=item.getAttribute("id").replace(/^(tarteaucitronServicesTitle_)/,"");if(cat!=="mandatory"){var html="";html+='
  • ';html+='
    ';html+=' '+tarteaucitron.lang[cat].title+"";html+=" "+tarteaucitron.lang[cat].details+"";html+=' ";html+="
    ";html+='
    ';html+=' ";html+=' ";html+="
    ";html+="
  • ";var ul=document.createElement("ul");ul.innerHTML=html;item.insertBefore(ul,item.querySelector("#tarteaucitronServices_"+cat+""));document.querySelector("#tarteaucitronServices_"+cat).style.display="none";tarteaucitron.addClickEventToId("tarteaucitron-toggle-group-"+cat,function(){tarteaucitron.userInterface.toggle("tarteaucitronServices_"+cat);if(document.getElementById("tarteaucitronServices_"+cat).style.display=="block"){tarteaucitron.userInterface.addClass("tarteaucitronServicesTitle_"+cat,"tarteaucitronIsExpanded");document.getElementById("tarteaucitron-toggle-group-"+cat).setAttribute("aria-expanded","true")}else{tarteaucitron.userInterface.removeClass("tarteaucitronServicesTitle_"+cat,"tarteaucitronIsExpanded");document.getElementById("tarteaucitron-toggle-group-"+cat).setAttribute("aria-expanded","false")}});tarteaucitron.addClickEventToId("tarteaucitron-accept-group-"+cat,function(){tarteaucitron.userInterface.respondAll(true,cat)});tarteaucitron.addClickEventToId("tarteaucitron-reject-group-"+cat,function(){tarteaucitron.userInterface.respondAll(false,cat)})}})}if(tarteaucitron.parameters.partnersList===true&&(tarteaucitron.parameters.orientation==="middle"||tarteaucitron.parameters.orientation==="popup")){setTimeout(function(){var liPartners="";var tarteaucitronPartnersCat=[];tarteaucitron.job.forEach(function(id){if(tarteaucitronPartnersCat[tarteaucitron.services[id].type]===undefined){tarteaucitronPartnersCat[tarteaucitron.services[id].type]=true;liPartners+="
  • "+tarteaucitron.lang[tarteaucitron.services[id].type].title+"
  • "}});var tacPartnersInfoParent=document.getElementById("tarteaucitronDisclaimerAlert");if(tacPartnersInfoParent!==null){tacPartnersInfoParent.insertAdjacentHTML("beforeend",'
    '+tarteaucitron.lang.ourpartners+" ("+tarteaucitron.job.length+")
      "+liPartners+"
    ")}},100)}setTimeout(function(){var tacSaveButtonParent=document.getElementById("tarteaucitronServices");if(tacSaveButtonParent!==null){tacSaveButtonParent.insertAdjacentHTML("beforeend",'
    ")}},100);tarteaucitron.userInterface.color("",true);setTimeout(function(){tarteaucitron.addClickEventToId("tarteaucitronCloseCross",function(){tarteaucitron.userInterface.closeAlert()});tarteaucitron.addClickEventToId("tarteaucitronPersonalize",function(){tarteaucitron.userInterface.openPanel()});tarteaucitron.addClickEventToId("tarteaucitronPersonalize2",function(){tarteaucitron.userInterface.respondAll(true)});tarteaucitron.addClickEventToId("tarteaucitronManager",function(){tarteaucitron.userInterface.openPanel()});tarteaucitron.addClickEventToId("tarteaucitronBack",function(){tarteaucitron.userInterface.closePanel()});tarteaucitron.addClickEventToId("tarteaucitronClosePanel",function(){tarteaucitron.userInterface.closePanel()});tarteaucitron.addClickEventToId("tarteaucitronClosePanelCookie",function(){tarteaucitron.userInterface.closePanel()});tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrl",function(){document.location=tarteaucitron.parameters.privacyUrl});tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrlDialog",function(){document.location=tarteaucitron.parameters.privacyUrl});tarteaucitron.addClickEventToId("tarteaucitronCookiesNumber",function(){tarteaucitron.userInterface.toggleCookiesList()});tarteaucitron.addClickEventToId("tarteaucitronAllAllowed",function(){tarteaucitron.userInterface.respondAll(true)});tarteaucitron.addClickEventToId("tarteaucitronAllDenied",function(){tarteaucitron.userInterface.respondAll(false)});tarteaucitron.addClickEventToId("tarteaucitronAllDenied2",function(){tarteaucitron.userInterface.respondAll(false,"",true);if(tarteaucitron.reloadThePage===true){window.location.reload()}});tarteaucitron.addClickEventToId("tarteaucitronCloseAlert",function(){tarteaucitron.userInterface.openPanel()});tarteaucitron.addClickEventToId("tarteaucitronCTAButton",function(){location.reload()});tarteaucitron.addClickEventToId("tarteaucitronSaveButton",function(){var timeoutSaveButton=0;tarteaucitron.job.forEach(function(id){if(tarteaucitron.state[id]!==true&&tarteaucitron.state[id]!==false){timeoutSaveButton=500;tarteaucitron.setConsent(id,false)}});setTimeout(tarteaucitron.userInterface.closePanel,timeoutSaveButton)});var toggleBtns=document.getElementsByClassName("catToggleBtn"),i;for(i=0;i=0,isDenied=cookie.indexOf(service.key+"=false")>=0,isAllowed=cookie.indexOf(service.key+"=true")>=0||!service.needConsent&&cookie.indexOf(service.key+"=false")<0,isResponded=cookie.indexOf(service.key+"=false")>=0||cookie.indexOf(service.key+"=true")>=0,isDNTRequested=navigator.doNotTrack==="1"||navigator.doNotTrack==="yes"||navigator.msDoNotTrack==="1"||window.doNotTrack==="1",currentStatus=isAllowed?tarteaucitron.lang.allowed:tarteaucitron.lang.disallowed,state=undefined!==service.defaultState?service.defaultState:undefined!==tarteaucitron.parameters.serviceDefaultState?tarteaucitron.parameters.serviceDefaultState:"wait";if(tarteaucitron.added[service.key]!==true){tarteaucitron.added[service.key]=true;html+='
  • ';html+='
    ';html+=' '+service.name+"";html+='
    ';html+=' '+currentStatus+"";html+=' - ';html+=' ';html+="
    ";if(tarteaucitron.parameters.moreInfoLink==true){var link="https://tarteaucitron.io/service/"+service.key+"/";if(service.readmoreLink!==undefined&&service.readmoreLink!==""){link=service.readmoreLink}if(tarteaucitron.parameters.readmoreLink!==undefined&&tarteaucitron.parameters.readmoreLink!==""){link=tarteaucitron.parameters.readmoreLink}html+=' '+tarteaucitron.lang.more+"";html+=' - ';html+=' '+tarteaucitron.lang.source+""}html+="
    ";html+='
    ';html+=' ";html+=' ";html+="
    ";html+="
  • ";tarteaucitron.userInterface.css("tarteaucitronServicesTitle_"+service.type,"display","block");if(document.getElementById("tarteaucitronServices_"+service.type)!==null){document.getElementById("tarteaucitronServices_"+service.type).innerHTML+=html}tarteaucitron.userInterface.css("tarteaucitronNoServicesTitle","display","none");tarteaucitron.userInterface.order(service.type);tarteaucitron.addClickEventToId(service.key+"Allowed",function(){tarteaucitron.userInterface.respond(this,true)});tarteaucitron.addClickEventToId(service.key+"Denied",function(){tarteaucitron.userInterface.respond(this,false)})}tarteaucitron.pro("!"+service.key+"="+isAllowed);if(isResponded===false&&tarteaucitron.user.bypass===true){isAllowed=true;tarteaucitron.cookie.create(service.key,true)}if(!isResponded&&(isAutostart||isNavigating&&isWaiting)&&!tarteaucitron.highPrivacy||isAllowed){if(!isAllowed||!service.needConsent&&cookie.indexOf(service.key+"=false")<0){tarteaucitron.cookie.create(service.key,true)}if(tarteaucitron.launch[service.key]!==true){tarteaucitron.launch[service.key]=true;if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.js()}tarteaucitron.sendEvent(service.key+"_loaded")}tarteaucitron.state[service.key]=true;tarteaucitron.userInterface.color(service.key,true)}else if(isDenied){if(typeof service.fallback==="function"){if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.fallback()}}tarteaucitron.state[service.key]=false;tarteaucitron.userInterface.color(service.key,false)}else if(!isResponded&&isDNTRequested&&tarteaucitron.handleBrowserDNTRequest){tarteaucitron.cookie.create(service.key,"false");if(typeof service.fallback==="function"){if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.fallback()}}tarteaucitron.state[service.key]=false;tarteaucitron.userInterface.color(service.key,false)}else if(!isResponded){tarteaucitron.cookie.create(service.key,state);if(typeof tarteaucitronMagic==="undefined"||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){if(true===state&&typeof service.js==="function"){service.js()}else if(typeof service.fallback==="function"){service.fallback()}}if(true===state){tarteaucitron.sendEvent(service.key+"_loaded")}if(true===state||false===state){tarteaucitron.state[service.key]=state}tarteaucitron.userInterface.color(service.key,state);if("wait"===state){tarteaucitron.userInterface.openAlert()}}tarteaucitron.cookie.checkCount(service.key);tarteaucitron.sendEvent(service.key+"_added")},sendEvent:function(event_key){if(event_key!==undefined){var send_event_item;if(typeof Event==="function"){send_event_item=new Event(event_key)}else if(typeof document.createEvent==="function"){send_event_item=document.createEvent("Event");send_event_item.initEvent(event_key,true,true)}document.dispatchEvent(send_event_item)}},cleanArray:function cleanArray(arr){"use strict";var i,len=arr.length,out=[],obj={},s=tarteaucitron.services;for(i=0;is[b].type+s[b].key){return 1}if(s[a].type+s[a].key0&&status===false){tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies)}if(status===true){if(document.getElementById("tacCL"+key)!==null){document.getElementById("tacCL"+key).innerHTML="..."}setTimeout(function(){tarteaucitron.cookie.checkCount(key)},2500)}else{tarteaucitron.cookie.checkCount(key)}}var cats=document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]');Array.prototype.forEach.call(cats,function(item){var cat=item.getAttribute("id").replace(/^(tarteaucitronServicesTitle_)/,""),total=document.getElementById("tarteaucitronServices_"+cat).childElementCount;var doc=document.getElementById("tarteaucitronServices_"+cat),groupdenied=0,groupallowed=0;for(var ii=0;ii0){filtered.push(focusableEls[i])}}firstFocusableEl=filtered[0];lastFocusableEl=filtered[filtered.length-1];document.getElementById(parentElement).addEventListener("keydown",function(evt){if(evt.key==="Tab"||evt.keyCode===9){if(evt.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();evt.preventDefault()}}else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();evt.preventDefault()}}}})},openAlert:function(){"use strict";var c="tarteaucitron";tarteaucitron.userInterface.css(c+"Percentage","display","block");tarteaucitron.userInterface.css(c+"AlertSmall","display","none");tarteaucitron.userInterface.css(c+"Icon","display","none");tarteaucitron.userInterface.css(c+"AlertBig","display","block");tarteaucitron.userInterface.addClass(c+"Root","tarteaucitronBeforeVisible");var tacOpenAlertEvent;if(typeof Event==="function"){tacOpenAlertEvent=new Event("tac.open_alert")}else if(typeof document.createEvent==="function"){tacOpenAlertEvent=document.createEvent("Event");tacOpenAlertEvent.initEvent("tac.open_alert",true,true)}if(document.getElementById("tarteaucitronAlertBig")!==null&&tarteaucitron.parameters.orientation==="middle"){document.getElementById("tarteaucitronAlertBig").focus()}if(typeof window.dispatchEvent==="function"){window.dispatchEvent(tacOpenAlertEvent)}},closeAlert:function(){"use strict";var c="tarteaucitron";tarteaucitron.userInterface.css(c+"Percentage","display","none");tarteaucitron.userInterface.css(c+"AlertSmall","display","block");tarteaucitron.userInterface.css(c+"Icon","display","block");tarteaucitron.userInterface.css(c+"AlertBig","display","none");tarteaucitron.userInterface.removeClass(c+"Root","tarteaucitronBeforeVisible");tarteaucitron.userInterface.jsSizing("box");var tacCloseAlertEvent;if(typeof Event==="function"){tacCloseAlertEvent=new Event("tac.close_alert")}else if(typeof document.createEvent==="function"){tacCloseAlertEvent=document.createEvent("Event");tacCloseAlertEvent.initEvent("tac.close_alert",true,true)}if(typeof window.dispatchEvent==="function"){window.dispatchEvent(tacCloseAlertEvent)}},toggleCookiesList:function(){"use strict";var div=document.getElementById("tarteaucitronCookiesListContainer"),togglediv=document.getElementById("tarteaucitronCookiesNumber");if(div===null){return}if(div.style.display!=="block"){tarteaucitron.cookie.number();div.style.display="block";togglediv.setAttribute("aria-expanded","true");tarteaucitron.userInterface.jsSizing("cookie");tarteaucitron.userInterface.css("tarteaucitron","display","none");tarteaucitron.userInterface.css("tarteaucitronBack","display","block");tarteaucitron.fallback(["tarteaucitronInfoBox"],function(elem){elem.style.display="none"},true)}else{div.style.display="none";togglediv.setAttribute("aria-expanded","false");tarteaucitron.userInterface.css("tarteaucitron","display","none");tarteaucitron.userInterface.css("tarteaucitronBack","display","none")}},toggle:function(id,closeClass){"use strict";var div=document.getElementById(id);if(div===null){return}if(closeClass!==undefined){tarteaucitron.fallback([closeClass],function(elem){if(elem.id!==id){elem.style.display="none"}},true)}if(div.style.display!=="block"){div.style.display="block"}else{div.style.display="none"}},order:function(id){"use strict";var main=document.getElementById("tarteaucitronServices_"+id),allDivs,store=[],i;if(main===null){return}allDivs=main.childNodes;if(typeof Array.prototype.map==="function"&&typeof Enumerable==="undefined"){Array.prototype.map.call(main.children,Object).sort(function(a,b){if(tarteaucitron.services[a.id.replace(/Line/g,"")].name>tarteaucitron.services[b.id.replace(/Line/g,"")].name){return 1}if(tarteaucitron.services[a.id.replace(/Line/g,"")].name=0&&nb===0){html+=tarteaucitron.lang.useNoCookie}else if(status>=0){for(i=0;i0){html+=tarteaucitron.lang.useCookieCurrent+" "+nbCurrent+" "+cookieLabel;if(nbCurrent>1){html+="s"}html+="."}else{html+=tarteaucitron.lang.useNoCookie}}else if(nb===0){html=tarteaucitron.lang.noCookie}else{html+=tarteaucitron.lang.useCookie+" "+nb+" "+cookieLabel;if(nb>1){html+="s"}html+="."}if(document.getElementById("tacCL"+key)!==null){document.getElementById("tacCL"+key).innerHTML=html}},crossIndexOf:function(arr,match){"use strict";var i;for(i=0;i1?"s":"",savedname,regex=/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,regexedDomain=tarteaucitron.cdn.match(regex)!==null?tarteaucitron.cdn.match(regex)[1]:tarteaucitron.cdn,host=tarteaucitron.domain!==undefined?tarteaucitron.domain:regexedDomain;cookies=cookies.sort(function(a,b){namea=a.split("=",1).toString().replace(/ /g,"");nameb=b.split("=",1).toString().replace(/ /g,"");c=tarteaucitron.cookie.owner[namea]!==undefined?tarteaucitron.cookie.owner[namea]:"0";d=tarteaucitron.cookie.owner[nameb]!==undefined?tarteaucitron.cookie.owner[nameb]:"0";if(c+a>d+b){return 1}if(c+a';html+=' ';html+=" "+host;html+=" ";html+='"}else{html+='
    ';html+='
    -
    ';html+='
    ';html+="
    "}html+='
    ';if(document.getElementById("tarteaucitronCookiesList")!==null){document.getElementById("tarteaucitronCookiesList").innerHTML=html}if(document.getElementById("tarteaucitronCookiesNumber")!==null){document.getElementById("tarteaucitronCookiesNumber").innerHTML=nb;document.getElementById("tarteaucitronCookiesNumber").setAttribute("aria-label",nb+" cookie"+s+" - "+tarteaucitron.lang.toggleInfoBox);document.getElementById("tarteaucitronCookiesNumber").setAttribute("title",nb+" cookie"+s+" - "+tarteaucitron.lang.toggleInfoBox)}if(document.getElementById("tarteaucitronCookiesNumberBis")!==null){document.getElementById("tarteaucitronCookiesNumberBis").innerHTML=nb+" cookie"+s}var purgeBtns=document.getElementsByClassName("purgeBtn");for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")},getLanguage:function(){"use strict";var availableLanguages="ar,bg,ca,cn,cs,da,de,et,el,en,es,fi,fr,hr,hu,it,ja,ko,lb,lt,lv,nl,no,oc,pl,pt,ro,ru,se,sk,sv,tr,uk,vi,zh",defaultLanguage="en";if(tarteaucitronForceLanguage!==""){if(availableLanguages.indexOf(tarteaucitronForceLanguage)!==-1){return tarteaucitronForceLanguage}}if(document.documentElement.getAttribute("lang")!==undefined&&document.documentElement.getAttribute("lang")!==null&&document.documentElement.getAttribute("lang")!==""){if(availableLanguages.indexOf(document.documentElement.getAttribute("lang").substr(0,2))!==-1){return document.documentElement.getAttribute("lang").substr(0,2)}}if(!navigator){return defaultLanguage}var lang=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,userLanguage=lang?lang.substr(0,2):null;if(availableLanguages.indexOf(userLanguage)!==-1){return userLanguage}return defaultLanguage},getLocale:function(){"use strict";if(!navigator){return"en_US"}var lang=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,userLanguage=lang?lang.substr(0,2):null;if(userLanguage==="fr"){return"fr_FR"}else if(userLanguage==="en"){return"en_US"}else if(userLanguage==="de"){return"de_DE"}else if(userLanguage==="es"){return"es_ES"}else if(userLanguage==="it"){return"it_IT"}else if(userLanguage==="pt"){return"pt_PT"}else if(userLanguage==="nl"){return"nl_NL"}else if(userLanguage==="el"){return"el_EL"}else{return"en_US"}},addScript:function(url,id,callback,execute,attrName,attrVal,internal){"use strict";var script,done=false;if(execute===false){if(typeof callback==="function"){callback()}}else{script=document.createElement("script");if(id!==undefined){script.id=id}script.async=true;script.src=url;if(attrName!==undefined&&attrVal!==undefined){script.setAttribute(attrName,attrVal)}if(typeof callback==="function"){if(!tarteaucitron.parameters.useExternalJs||!internal){script.onreadystatechange=script.onload=function(){var state=script.readyState;if(!done&&(!state||/loaded|complete/.test(state))){done=true;callback()}}}else{callback()}}if(!tarteaucitron.parameters.useExternalJs||!internal){document.getElementsByTagName("head")[0].appendChild(script)}}},addInternalScript:function(url,id,callback,execute,attrName,attrVal){tarteaucitron.addScript(url,id,callback,execute,attrName,attrVal,true)},checkIfExist:function(elemId){"use strict";return document.getElementById(elemId)!==null&&document.getElementById(elemId).offsetWidth!==0&&document.getElementById(elemId).offsetHeight!==0},makeAsync:{antiGhost:0,buffer:"",init:function(url,id){"use strict";var savedWrite=document.write,savedWriteln=document.writeln;document.write=function(content){tarteaucitron.makeAsync.buffer+=content};document.writeln=function(content){tarteaucitron.makeAsync.buffer+=content.concat("\n")};setTimeout(function(){document.write=savedWrite;document.writeln=savedWriteln},2e4);tarteaucitron.makeAsync.getAndParse(url,id)},getAndParse:function(url,id){"use strict";if(tarteaucitron.makeAsync.antiGhost>9){tarteaucitron.makeAsync.antiGhost=0;return}tarteaucitron.makeAsync.antiGhost+=1;tarteaucitron.addInternalScript(url,"",function(){if(document.getElementById(id)!==null){document.getElementById(id).innerHTML+=" "+tarteaucitron.makeAsync.buffer;tarteaucitron.makeAsync.buffer="";tarteaucitron.makeAsync.execJS(id)}})},execJS:function(id){var i,scripts,childId,type;if(document.getElementById(id)===null){return}scripts=document.getElementById(id).getElementsByTagName("script");for(i=0;i';tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute("src"),childId)}else if(type.indexOf("javascript")!==-1||type===""){eval(scripts[i].innerHTML)}}}},fallback:function(matchClass,content,noInner){"use strict";var elems=document.getElementsByTagName("*"),i,index=0;for(i in elems){if(elems[i]!==undefined){for(index=0;index-1){if(typeof content==="function"){if(noInner===true){content(elems[i])}else{elems[i].innerHTML=content(elems[i])}}else{elems[i].innerHTML=content}}}}}},engage:function(id){"use strict";var html="",r=Math.floor(Math.random()*1e5),engage=tarteaucitron.services[id].name+" "+tarteaucitron.lang.fallback;if(tarteaucitron.lang["engage-"+id]!==undefined){engage=tarteaucitron.lang["engage-"+id]}html+='
    ';html+='
    ';html+=" "+engage;html+=' ";html+="
    ";html+="
    ";return html},extend:function(a,b){"use strict";var prop;for(prop in b){if(b.hasOwnProperty(prop)){a[prop]=b[prop]}}},proTemp:"",proTimer:function(){"use strict";setTimeout(tarteaucitron.proPing,Math.floor(Math.random()*(1200-500+1))+500)},pro:function(list){"use strict";tarteaucitron.proTemp+=list;clearTimeout(tarteaucitron.proTimer);tarteaucitron.proTimer=setTimeout(tarteaucitron.proPing,Math.floor(Math.random()*(1200-500+1))+500)},proPing:function(){"use strict";if(tarteaucitron.uuid!==""&&tarteaucitron.uuid!==undefined&&tarteaucitron.proTemp!==""&&tarteaucitronStatsEnabled){var div=document.getElementById("tarteaucitronPremium"),timestamp=(new Date).getTime(),url="https://tarteaucitron.io/log/?";if(div===null){return}url+="account="+tarteaucitron.uuid+"&";url+="domain="+tarteaucitron.domain+"&";url+="status="+encodeURIComponent(tarteaucitron.proTemp)+"&";url+="_time="+timestamp;div.innerHTML='';tarteaucitron.proTemp=""}tarteaucitron.cookie.number()},AddOrUpdate:function(source,custom){for(var key in custom){if(custom[key]instanceof Object){source[key]=tarteaucitron.AddOrUpdate(source[key],custom[key])}else{source[key]=custom[key]}}return source},getElemWidth:function(elem){return tarteaucitron.getElemAttr(elem,"width")||elem.clientWidth},getElemHeight:function(elem){return tarteaucitron.getElemAttr(elem,"height")||elem.clientHeight},getElemAttr:function(elem,attr){var attribute=elem.getAttribute("data-"+attr)||elem.getAttribute(attr);if(typeof attribute==="string"){return tarteaucitron.fixSelfXSS(attribute)}return""},addClickEventToId:function(elemId,func){tarteaucitron.addClickEventToElement(document.getElementById(elemId),func)},addClickEventToElement:function(e,func){if(e){if(e.addEventListener){e.addEventListener("click",func)}else{e.attachEvent("onclick",func)}}},triggerJobsAfterAjaxCall:function(){tarteaucitron.job.forEach(function(e){tarteaucitron.job.push(e)});var i;var allowBtns=document.getElementsByClassName("tarteaucitronAllow");for(i=0;i