@20minutes/tyr
Advanced tools
Comparing version 0.1.19 to 0.1.20
@@ -1,1 +0,1 @@ | ||
(function(){"use strict";const B={horoscope:{BAN_ATF:"[[1,1], [728,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600]]",PAVE_MTF:"[[1,1], [300,250], [300,600]]",HEADER_AD:"[[1,1], [300,50], [300,100], [320,50], [320,100]]",INTRASTITIAL_GAG:"[[1,1], [300,480]]",INTRASTITIAL_PROG:"[[1,1], [300,480]]"},misc:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",HEADER_AD:'[[1,1], [320,50], [320,100], "fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v], "fluid"]',INTRASTITIAL_GAG:"[[1,1], [320,480]]",INTRASTITIAL_PROG:"[[1,1], [320,480]]",NFB_1:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",NFB_2:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",PAVE_COM:"[[1,1], [300,168], [300,250], [320,50], [320,100], [320,480]]"}};var _=(t=>(t.HOROSCOPE="horoscope",t.MISC="divers",t))(_||{}),p=(t=>(t.UNKNOWN="Non connu",t.SLIDESHOW_COVER="Slideshow cover",t.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",t.SLIDESHOW_PAGE="Slideshow page",t.ARTICLE="article",t.MISC="divers",t.HOME="home",t.LIVE="live",t.SECTION="section",t.TAG="tag",t))(p||{}),g=(t=>(t.MISC="divers",t.HOME="home",t.LOCAL="local",t.PLANET="plan\xE8te",t))(g||{}),y=(t=>(t.PAGETYPE="pageType",t.TAGS="tags",t))(y||{});const G=t=>{var e,n,o,a;switch(t){case"pageType":return Object.values(p).includes((e=window.datalayer)==null?void 0:e.page_type)?(n=window.datalayer.page_type)==null?void 0:n.toLowerCase():p.MISC;case"tags":return Object.values(g).includes((o=window.datalayer)==null?void 0:o.tags)?(a=window.datalayer.tags)==null?void 0:a.toLowerCase():g.MISC}return window.datalayer[t]},U=()=>{window.dfp=window.dfp||{},window.dfp.targeting=window.dfp.targeting||{},Object.values(y).forEach(t=>{window.dfp.targeting[t]=G(t)})},H=["nfb_1","nfb_2"],q=t=>{var e;const n=t instanceof Array?t:[t];window.dfp.slots=((e=window.dfp)==null?void 0:e.slots)||[],window.dfp.slots=[...window.dfp.slots,...n]},z=t=>{window.dfp.slotsReady=!1;const e=[];googletag.cmd.push(()=>{document.querySelectorAll("div[data-dfp-path]").forEach(n=>{const o=n.getAttribute("data-dfp-name"),a=n.getAttribute("data-dfp-path"),c=n.getAttribute("id"),d=a?.split("/"),V=d?.[d.length-1]||null;if(Object.values(_).includes(V)){const u=o&&JSON.parse(B[V][o.toUpperCase()])||null;if(c&&o&&a&&u&&googletag){let i=null;if(H.includes(o)&&(i=googletag.defineSlot([a,o].join("/"),u),i!=null&&i.getSlotElementId()&&n.setAttribute("id",i.getSlotElementId())),i=googletag.defineSlot([a,o].join("/"),u,c),!i)return;i.addService(googletag.pubads()),e.push({slotElementId:i.getSlotElementId(),path:a,sizes:JSON.stringify(u)}),Object.entries(t).map(([Ve,Be])=>i?.setTargeting(Ve,Be))}}})}),window.dfp.slotsReady=!0,q(e)};let f=!1,h=0;const J=1500,m="renderAd",K=()=>f||googletag&&googletag.pubadsReady&&window.dfp.slotsReady&&window.dfp.hubvisorEnd,b=t=>{googletag&&googletag.cmd.push(()=>{const e={};googletag.pubads().getSlots().forEach(o=>{e[o.getSlotElementId()]=o});const n=[];t.forEach(o=>{e[o]&&n.push(e[o])}),n.length&&googletag.pubads().refresh(n)})},W=()=>{document.addEventListener(m,t=>{if(!t.target)return;const e=t;e&&e.target.closest("[data-dfp-name]")&&e.detail.length&&b([e.detail[0].id])},!0)},Y=()=>{const t=document.querySelectorAll('div[data-dfp-name][data-delayed="true"]');Array.prototype.forEach.call(t,e=>{e.addEventListener(e.getAttribute("id"),function n(){e.dispatchEvent(new CustomEvent(m,{detail:[{id:e.getAttribute("id")}]})),e.removeEventListener(m,n)})})},Q=()=>{const t=[],e=document.querySelectorAll('div[data-dfp-name][data-delayed="false"]');e.length>0&&Array.prototype.forEach.call(e,n=>{t.push(n.getAttribute("id"))}),b(t)},X=()=>{const t=setInterval(()=>{if(!K&&h<J){h+=100;return}clearInterval(t),f=!0,W(),window.addEventListener("DOMContentLoaded",()=>{Q(),Y()})},100)},Z=()=>{googletag.cmd.push(()=>{googletag.pubads().setTargeting("lang","fr"),googletag.pubads().setTargeting("dn",window.location.hostname);try{const e=window.location.href.split("?")[1];e&&e.split("&").forEach(n=>{const o=n.split("=");o[0]==="20minutest"&&googletag.pubads().setTargeting(o[0],o[1])})}catch{}googletag.pubads().enableSingleRequest(),googletag.pubads().disableInitialLoad(),googletag.enableServices();const t=Math.max(document.documentElement.clientWidth,window.innerWidth||0);t>=1400?googletag.pubads().setTargeting("screen",["1400","1000"]):t>=1e3&&googletag.pubads().setTargeting("screen","1000")})},E=t=>{const e=document.cookie.split(";").filter(n=>n.indexOf(t)!==-1)[0];return e?e.split("=")[1]:"{}"},l=t=>{const e=[`${t.name}=`,"expires=Thu, 1 Jan 1970 00:00:01 UTC","path=/"];t.domain&&e.push(`domain=${t.domain}`),document.cookie=e.join("; ")},S=t=>{document.cookie.split(";").map(e=>e.split("=")[0].trim()).filter(e=>t.indexOf(e)===-1).forEach(e=>{const{hostname:n}=window.location;l({name:e}),l({name:e,domain:n.substring(n.indexOf(".")+1)}),l({name:e,domain:n.substring(n.indexOf("."))}),l({name:e,domain:`.${n}`})})},T=t=>{for(let e=0;e<sessionStorage.length;e+=1){const n=sessionStorage.key(e);n&&t.indexOf(n)===-1&&sessionStorage.removeItem(n)}},I=t=>{for(let e=0;e<localStorage.length;e+=1){const n=localStorage.key(e);n&&t.indexOf(n)===-1&&localStorage.removeItem(n)}};function ee(t){let e=t;const n="\xE3\xE0\xE1\xE4\xE2\u1EBD\xE8\xE9\xEB\xEA\xEC\xED\xEF\xEE\xF5\xF2\xF3\xF6\xF4\xF9\xFA\xFC\xFB\xF1\xE7\xB7/_,:;",o="aaaaaeeeeeiiiiooooouuuunc------";for(let a=0;a<n.length;a+=1)e=t.replace(new RegExp(n.charAt(a),"g"),o.charAt(a));return e}const r=t=>{let e=t.toLowerCase().replace(/[\s-]+/g,"_");return e=ee(e),e.replace(/[^\w-]+/g,"")},te=(t,e=100)=>{const n=t.getBoundingClientRect(),o=window.pageYOffset||document.documentElement.scrollTop,a=Math.max(document.documentElement.clientHeight,window.innerHeight||0),c=o+a,d=n.top+o;return c>d-e},ne=()=>document.body.dataset.device,A=()=>{const t=new URLSearchParams(window.location.search);return Object.fromEntries(t.entries())},O=["20mnToken","20mnUserDataLayer","20mnTutorial","20mnUserInfo","20mnUserSession","_vfa","_vfb","_vfz","atauthority","atid","atidvisitor","atidx","atuserid","didomi_token","euconsent-v2","_pbjs_userid_consent_data","osano_consentmanager","osano_consentmanager_expdate","osano_consentmanager_uuid","SESSIDSF","SESSIDSFRM","TCPID","TSTD","ei_client_id","_biz_pendingA","_biz_flagsA","_biz_uid","_biz_nA","ajs_group_id","ajs_user_id","ajs_anonymous_id","TSNGUID","_mkto_trk","JSESSIONID","staging-login_idle_session_timeout","login_service_login_newrelic_com_tokens","login_idle_session_timeout","lang","auth_expiration_timestamp","sticky-scorecast-business-chat","__utna","__utnv","auth_token","PHPSESSID","sticky-scorecast-business-app","sticky-scorecast-prod-app","realm"],L=["_vf_sid","consent_validity_date","20mn-articlesSaved","20mn-font","closedInfo","20mn-known-user","20mn-block-links","20mnBreakingNewsBanner","20mnAppBanner","20mn-visits-content","20minutes-font"],C=["vfThirdpartyCookiesEnabled","com.batch.sessionId","loadIntrasticial"],oe=()=>{window.didomiOnReady.push(()=>{let t=new Date;const e=t.getTimezoneOffset();t=new Date(t.getTime()-e*60*1e3);const n=t.toISOString().split("T")[0],o=localStorage.getItem("consent_validity_date");o&&n>o&&(window.Didomi.reset(),localStorage.removeItem("consent_validity_date"),window.disapproveDidomiGTMEvents=!0,S(O),I(L),T(C),window.Didomi.notice.show())})},ae=()=>{window.didomiEventListeners.push({event:"notice.clickagree",listener:()=>{console.log("notice.clickagree")}}),window.didomiEventListeners.push({event:"notice.clickmoreinfo",listener:()=>{console.log("notice.clickmoreinfo")}}),window.didomiEventListeners.push({event:"notice.clickdisagree",listener:()=>{console.log("notice.clickdisagree")}})},ie=()=>{window.cmpVariables={consentEventsCount:0},window.didomiEventListeners.push({event:"consent.changed",listener:()=>{const t=E("euconsent-v2"),e=window.cmpVariables.consentEventsCount>0?!0:!!t,n=!window.Didomi.getUserConsentStatusForPurpose("Cookies"),o=window.sessionStorage.getItem("cmpModal");e&&!o&&(n&&(S(O),I(L),T(C)),setTimeout(()=>{window.location.reload()})),o&&window.sessionStorage.removeItem("cmpModal"),window.cmpVariables.consentEventsCount+=1}})},w=(t,e,n=()=>{})=>{performance.mark(`20mn:${t}:Start`);const o=document.getElementsByTagName("script")[0],a=document.createElement("script");a.async=!0,a.src=e,a.onload=()=>{n(),performance.mark(`20mn:${t}:End`)},o&&o.parentNode&&o.parentNode.insertBefore(a,o)},re=()=>{window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:()=>{var t,e;(e=(t=window.ATInternet)==null?void 0:t.Tracker)!=null&&e.instances&&window.ATInternet.Tracker.instances.forEach(n=>{n.privacy.getVisitorMode().name!=="optout"&&(n.privacy.setVisitorMode("cnil","exempt"),window.Didomi.getUserConsentStatusForPurpose("mesureda-6qyqaZXC")&&n.privacy.setVisitorOptin())})}})},se=()=>{window.didomiOnReady=window.didomiOnReady||[];const t=(e,n)=>{n?(e.eventStatus==="tcloaded"||e.eventStatus==="useractioncomplete")&&(w("DFP_init","https://securepubads.g.doubleclick.net/tag/js/gpt.js"),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)):console.log("Issue with dfp callback")};window.didomiOnReady.push(()=>{typeof t<"u"&&window.__tcfapi("addEventListener",2,t)})},de=()=>{se(),re()};var le=Object.defineProperty,k=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,D=(t,e,n)=>e in t?le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v=(t,e)=>{for(var n in e||(e={}))ce.call(e,n)&&D(t,n,e[n]);if(k)for(var n of k(e))ue.call(e,n)&&D(t,n,e[n]);return t};const pe=()=>{var t;return{page_uri:"/",page_type:((t=window.datalayer)==null?void 0:t.pageType)||"divers"}},ge=()=>({darkmode:"0"}),me=()=>{var t,e;return{signature:((t=window.datalayer)==null?void 0:t.signature)||void 0,nbParagraphs:((e=window.datalayer)==null?void 0:e.nbParagraphs)||void 0}},we=({signature:t,nbParagraphs:e}={})=>{window.datalayer=window.datalayer||{},window.datalayer.signature=t||"",e&&(window.datalayer.nbParagraphs=e)},ve=()=>{const t=pe(),e=ge(),n=me();window.datalayer=v(v(v({},t),e),n)};let s=[],P;const _e=(t,e)=>{let n=!1;return()=>{n||(t(),n=!0,P=setTimeout(()=>{n=!1},e))}},ye=t=>t.event&&te(t.elem,Number(t.distance))?(t.elem.dispatchEvent(new Event(t.event)),t.elem.dataset.lazyLoaded="true",!1):!0,x=()=>{_e(()=>{s=s.filter(ye),s.length<=0&&(clearTimeout(P),window.removeEventListener("scroll",x))},50)()},fe=()=>{s.length<=0||window.addEventListener("scroll",x)},he=t=>{s.push(t),fe()},be=()=>{window.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('[data-delayed="true"]').forEach(t=>{const e={elem:t,event:t.getAttribute("id"),distance:t.dataset.distanceVisible};he(e)})})};var Ee=Object.defineProperty,$=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,N=(t,e,n)=>e in t?Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Se.call(e,n)&&N(t,n,e[n]);if($)for(var n of $(e))Te.call(e,n)&&N(t,n,e[n]);return t};const Ie=()=>{const t=window.datalayer,e={};if(e["b:user_darkmode"]=t.darkmode==="1",e["b:user_status"]=t.user_status==="Connecte",e["b:user_status"]){const n=E("20mnUserDataLayer"),o=n?JSON.parse(decodeURIComponent(n)):null;o&&(e["s:user_id"]=String(o.i),Number.isNaN(o.d)||(e["n:user_a"]=parseInt(o.d,10)),Number.isNaN(o.l)||(e["n:user_zip"]=parseInt(o.l,10)),Number.isNaN(o.g)||(e["n:user_g"]=parseInt(o.g,10)))}return e},Ae=()=>{var t,e,n;const o={},a=A();return("utm_source"in a||"utm_campaign"in a||"utm_medium"in a)&&("utm_source"in a||(o.utm_source=(t=a.utm_medium)!=null?t:a.utm_campaign),"utm_campaign"in a||(o.utm_campaign=(e=a.utm_source)!=null?e:a.utm_medium),"utm_medium"in a||(o.utm_medium=(n=a.utm_source)!=null?n:a.utm_campaign)),o},Oe=()=>{var t;const e=window.datalayer,n={};n["b:user_adblock"]=e.adblock==="1",n["s:page_url_raw"]=window.location.href,e.source_type&&(n["s:content_source"]=e.source_type),e.referrer&&(n["s:misc_referrer"]=e.referrer),n["s:page_type"]=e.page_type||"other";const o=document.querySelector("link[rel='canonical']");if(o&&(n["s:page_canonical"]=(t=o.getAttribute("href"))!=null?t:""),e.chapter4&&(n["s:chapter4"]=e.chapter4),e.page_uri==="/search"){const a=A();n["s:misc_search"]=a.q||""}return j(j({},n),Ie())};var Le=Object.defineProperty,Ce=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,M=(t,e,n)=>e in t?Le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e)=>{for(var n in e||(e={}))De.call(e,n)&&M(t,n,e[n]);if(R)for(var n of R(e))Pe.call(e,n)&&M(t,n,e[n]);return t},xe=(t,e)=>Ce(t,ke(e));const $e=()=>{w("ATInternet","https://www.20minutes.fr/js/script-at.js")},Ne=()=>{window.ATInternet={onTrackerLoad:()=>{var t,e,n;if(window.ATInternet.Tracker){const o=new window.ATInternet.Tracker.Tag;o.privacy.getVisitorMode()===null&&o.privacy.setVisitorMode("cnil","exempt");const a=window.datalayer.article_section?r(window.datalayer.article_section):"";o.page.set({name:window.datalayer.libelle?r(window.datalayer.libelle):"",chapter1:window.datalayer.chapter1?r(window.datalayer.chapter1):a,chapter2:window.datalayer.chapter2?r(window.datalayer.chapter2):"",chapter3:window.datalayer.chapter3?r(window.datalayer.chapter3):"",customObject:{device:ne()==="desktop"?"desktop":"smartphone"}}),o.customVars.set({site:{2:(t=window.datalayer.content_id)!=null?t:""}}),o.setProps(xe(F(F({},Oe()),Ae()),{"b:pageview_with_consent":o.privacy.getVisitorMode().name==="optin","s:site_level2":window.location.hostname}),!0),o.identifiedVisitor.set({id:(e=window.datalayer.ac)!=null?e:"",category:(n=window.datalayer.an)!=null?n:""}),o.dispatch()}}}},je=()=>{window.addEventListener("DOMContentLoaded",()=>{Ne(),$e()})},Re=()=>{window.addEventListener("DOMContentLoaded",()=>{!document.querySelector(".gcse-search")||w("googlesearch","https://cse.google.com/cse.js?cx=954c975a1d4164f88")})},Me=()=>{var t;return(t=Array.from(document.querySelectorAll(".c-tags--breadcrumb")))==null?void 0:t.reduce((e,n)=>e+n.innerHTML,"")},Fe=()=>{window.gtmDatalayer=window.gtmDatalayer||[];const t=document.cookie.match("(^|;)\\s*20mnUserDataLayer\\s*=\\s*([^;]+)"),e=t?JSON.parse(decodeURIComponent(t.pop())):null;window.gtmDatalayer=[{page_uri:window.location.pathname,user_status:window.datalayer.user_status,referrer:document.referrer,breadcrumb:Me(),user:{d:e?.d||null,g:e?.g||null,i:e?.i||null,l:e?.l||null,o:e?.o||null}}]};(()=>{we(),ve(),Fe(),oe(),de(),ie(),ae(),Z(),U(),z(window.dfp.targeting),X(),je(),be(),Re()})()})(); | ||
(function(){"use strict";const B={horoscope:{ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",BAN_ATF:"[[1,1], [728,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600]]",PAVE_MTF:"[[1,1], [300,250], [300,600]]",HEADER_AD:"[[1,1], [300,50], [300,100], [320,50], [320,100]]",INTRASTITIAL_GAG:"[[1,1], [300,480]]",INTRASTITIAL_PROG:"[[1,1], [300,480]]"},divers:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",HEADER_AD:'[[1,1], [320,50], [320,100], "fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v], "fluid"]',INTRASTITIAL_GAG:"[[1,1], [320,480]]",INTRASTITIAL_PROG:"[[1,1], [320,480]]",NFB_1:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",NFB_2:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",PAVE_COM:"[[1,1], [300,168], [300,250], [320,50], [320,100], [320,480]]"}};var _=(t=>(t.HOROSCOPE="horoscope",t.MISC="divers",t))(_||{}),p=(t=>(t.UNKNOWN="Non connu",t.SLIDESHOW_COVER="Slideshow cover",t.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",t.SLIDESHOW_PAGE="Slideshow page",t.ARTICLE="article",t.MISC="divers",t.HOME="home",t.LIVE="live",t.SECTION="section",t.TAG="tag",t))(p||{}),g=(t=>(t.MISC="divers",t.HOME="home",t.LOCAL="local",t.PLANET="plan\xE8te",t))(g||{}),y=(t=>(t.PAGETYPE="pageType",t.TAGS="tags",t))(y||{});const G=t=>{var e,n,o,a;switch(t){case"pageType":return Object.values(p).includes((e=window.datalayer)==null?void 0:e.page_type)?(n=window.datalayer.page_type)==null?void 0:n.toLowerCase():p.MISC;case"tags":return Object.values(g).includes((o=window.datalayer)==null?void 0:o.tags)?(a=window.datalayer.tags)==null?void 0:a.toLowerCase():g.MISC}return window.datalayer[t]},U=()=>{window.dfp=window.dfp||{},window.dfp.targeting=window.dfp.targeting||{},Object.values(y).forEach(t=>{window.dfp.targeting[t]=G(t)})},H=["nfb_1","nfb_2"],q=t=>{var e;const n=t instanceof Array?t:[t];window.dfp.slots=((e=window.dfp)==null?void 0:e.slots)||[],window.dfp.slots=[...window.dfp.slots,...n]},z=t=>{window.dfp.slotsReady=!1;const e=[];googletag.cmd.push(()=>{document.querySelectorAll("div[data-dfp-path]").forEach(n=>{const o=n.getAttribute("data-dfp-name"),a=n.getAttribute("data-dfp-path"),c=n.getAttribute("id"),d=a?.split("/"),V=d?.[d.length-1]||null;if(Object.values(_).includes(V)){const u=o&&JSON.parse(B[V][o.toUpperCase()])||null;if(c&&o&&a&&u&&googletag){let i=null;if(H.includes(o)?(i=googletag.defineSlot([a,o].join("/"),u),i!=null&&i.getSlotElementId()&&n.setAttribute("id",i.getSlotElementId())):i=googletag.defineSlot([a,o].join("/"),u,c),!i)return;i.addService(googletag.pubads()),e.push({slotElementId:i.getSlotElementId(),path:a,sizes:JSON.stringify(u)}),Object.entries(t).map(([Ve,Be])=>i?.setTargeting(Ve,Be))}}})}),window.dfp.slotsReady=!0,q(e)};let f=!1,h=0;const J=1500,m="renderAd",K=()=>f||googletag&&googletag.pubadsReady&&window.dfp.slotsReady&&window.dfp.hubvisorEnd,b=t=>{googletag&&googletag.cmd.push(()=>{const e={};googletag.pubads().getSlots().forEach(o=>{e[o.getSlotElementId()]=o});const n=[];t.forEach(o=>{e[o]&&n.push(e[o])}),n.length&&googletag.pubads().refresh(n)})},W=()=>{document.addEventListener(m,t=>{if(!t.target)return;const e=t;e&&e.target.closest("[data-dfp-name]")&&e.detail.length&&b([e.detail[0].id])},!0)},Y=()=>{const t=document.querySelectorAll('div[data-dfp-name][data-delayed="true"]');Array.prototype.forEach.call(t,e=>{e.addEventListener(e.getAttribute("id"),function n(){e.dispatchEvent(new CustomEvent(m,{detail:[{id:e.getAttribute("id")}]})),e.removeEventListener(m,n)})})},Q=()=>{const t=[],e=document.querySelectorAll('div[data-dfp-name][data-delayed="false"]');e.length>0&&Array.prototype.forEach.call(e,n=>{t.push(n.getAttribute("id"))}),b(t)},X=()=>{const t=setInterval(()=>{if(!K&&h<J){h+=100;return}clearInterval(t),f=!0,W(),window.addEventListener("DOMContentLoaded",()=>{Q(),Y()})},100)},Z=()=>{googletag.cmd.push(()=>{googletag.pubads().setTargeting("lang","fr"),googletag.pubads().setTargeting("dn",window.location.hostname);try{const e=window.location.href.split("?")[1];e&&e.split("&").forEach(n=>{const o=n.split("=");o[0]==="20minutest"&&googletag.pubads().setTargeting(o[0],o[1])})}catch{}googletag.pubads().enableSingleRequest(),googletag.pubads().disableInitialLoad(),googletag.enableServices();const t=Math.max(document.documentElement.clientWidth,window.innerWidth||0);t>=1400?googletag.pubads().setTargeting("screen",["1400","1000"]):t>=1e3&&googletag.pubads().setTargeting("screen","1000")})},E=t=>{const e=document.cookie.split(";").filter(n=>n.indexOf(t)!==-1)[0];return e?e.split("=")[1]:"{}"},l=t=>{const e=[`${t.name}=`,"expires=Thu, 1 Jan 1970 00:00:01 UTC","path=/"];t.domain&&e.push(`domain=${t.domain}`),document.cookie=e.join("; ")},S=t=>{document.cookie.split(";").map(e=>e.split("=")[0].trim()).filter(e=>t.indexOf(e)===-1).forEach(e=>{const{hostname:n}=window.location;l({name:e}),l({name:e,domain:n.substring(n.indexOf(".")+1)}),l({name:e,domain:n.substring(n.indexOf("."))}),l({name:e,domain:`.${n}`})})},T=t=>{for(let e=0;e<sessionStorage.length;e+=1){const n=sessionStorage.key(e);n&&t.indexOf(n)===-1&&sessionStorage.removeItem(n)}},I=t=>{for(let e=0;e<localStorage.length;e+=1){const n=localStorage.key(e);n&&t.indexOf(n)===-1&&localStorage.removeItem(n)}};function ee(t){let e=t;const n="\xE3\xE0\xE1\xE4\xE2\u1EBD\xE8\xE9\xEB\xEA\xEC\xED\xEF\xEE\xF5\xF2\xF3\xF6\xF4\xF9\xFA\xFC\xFB\xF1\xE7\xB7/_,:;",o="aaaaaeeeeeiiiiooooouuuunc------";for(let a=0;a<n.length;a+=1)e=t.replace(new RegExp(n.charAt(a),"g"),o.charAt(a));return e}const r=t=>{let e=t.toLowerCase().replace(/[\s-]+/g,"_");return e=ee(e),e.replace(/[^\w-]+/g,"")},te=(t,e=100)=>{const n=t.getBoundingClientRect(),o=window.pageYOffset||document.documentElement.scrollTop,a=Math.max(document.documentElement.clientHeight,window.innerHeight||0),c=o+a,d=n.top+o;return c>d-e},ne=()=>document.body.dataset.device,A=()=>{const t=new URLSearchParams(window.location.search);return Object.fromEntries(t.entries())},O=["20mnToken","20mnUserDataLayer","20mnTutorial","20mnUserInfo","20mnUserSession","_vfa","_vfb","_vfz","atauthority","atid","atidvisitor","atidx","atuserid","didomi_token","euconsent-v2","_pbjs_userid_consent_data","osano_consentmanager","osano_consentmanager_expdate","osano_consentmanager_uuid","SESSIDSF","SESSIDSFRM","TCPID","TSTD","ei_client_id","_biz_pendingA","_biz_flagsA","_biz_uid","_biz_nA","ajs_group_id","ajs_user_id","ajs_anonymous_id","TSNGUID","_mkto_trk","JSESSIONID","staging-login_idle_session_timeout","login_service_login_newrelic_com_tokens","login_idle_session_timeout","lang","auth_expiration_timestamp","sticky-scorecast-business-chat","__utna","__utnv","auth_token","PHPSESSID","sticky-scorecast-business-app","sticky-scorecast-prod-app","realm"],L=["_vf_sid","consent_validity_date","20mn-articlesSaved","20mn-font","closedInfo","20mn-known-user","20mn-block-links","20mnBreakingNewsBanner","20mnAppBanner","20mn-visits-content","20minutes-font"],C=["vfThirdpartyCookiesEnabled","com.batch.sessionId","loadIntrasticial"],oe=()=>{window.didomiOnReady.push(()=>{let t=new Date;const e=t.getTimezoneOffset();t=new Date(t.getTime()-e*60*1e3);const n=t.toISOString().split("T")[0],o=localStorage.getItem("consent_validity_date");o&&n>o&&(window.Didomi.reset(),localStorage.removeItem("consent_validity_date"),window.disapproveDidomiGTMEvents=!0,S(O),I(L),T(C),window.Didomi.notice.show())})},ae=()=>{window.didomiEventListeners.push({event:"notice.clickagree",listener:()=>{console.log("notice.clickagree")}}),window.didomiEventListeners.push({event:"notice.clickmoreinfo",listener:()=>{console.log("notice.clickmoreinfo")}}),window.didomiEventListeners.push({event:"notice.clickdisagree",listener:()=>{console.log("notice.clickdisagree")}})},ie=()=>{window.cmpVariables={consentEventsCount:0},window.didomiEventListeners.push({event:"consent.changed",listener:()=>{const t=E("euconsent-v2"),e=window.cmpVariables.consentEventsCount>0?!0:!!t,n=!window.Didomi.getUserConsentStatusForPurpose("Cookies"),o=window.sessionStorage.getItem("cmpModal");e&&!o&&(n&&(S(O),I(L),T(C)),setTimeout(()=>{window.location.reload()})),o&&window.sessionStorage.removeItem("cmpModal"),window.cmpVariables.consentEventsCount+=1}})},w=(t,e,n=()=>{})=>{performance.mark(`20mn:${t}:Start`);const o=document.getElementsByTagName("script")[0],a=document.createElement("script");a.async=!0,a.src=e,a.onload=()=>{n(),performance.mark(`20mn:${t}:End`)},o&&o.parentNode&&o.parentNode.insertBefore(a,o)},re=()=>{window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:()=>{var t,e;(e=(t=window.ATInternet)==null?void 0:t.Tracker)!=null&&e.instances&&window.ATInternet.Tracker.instances.forEach(n=>{n.privacy.getVisitorMode().name!=="optout"&&(n.privacy.setVisitorMode("cnil","exempt"),window.Didomi.getUserConsentStatusForPurpose("mesureda-6qyqaZXC")&&n.privacy.setVisitorOptin())})}})},se=()=>{window.didomiOnReady=window.didomiOnReady||[];const t=(e,n)=>{n?(e.eventStatus==="tcloaded"||e.eventStatus==="useractioncomplete")&&(w("DFP_init","https://securepubads.g.doubleclick.net/tag/js/gpt.js"),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)):console.log("Issue with dfp callback")};window.didomiOnReady.push(()=>{typeof t<"u"&&window.__tcfapi("addEventListener",2,t)})},de=()=>{se(),re()};var le=Object.defineProperty,k=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,D=(t,e,n)=>e in t?le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v=(t,e)=>{for(var n in e||(e={}))ce.call(e,n)&&D(t,n,e[n]);if(k)for(var n of k(e))ue.call(e,n)&&D(t,n,e[n]);return t};const pe=()=>{var t;return{page_uri:"/",page_type:((t=window.datalayer)==null?void 0:t.pageType)||"divers"}},ge=()=>({darkmode:"0"}),me=()=>{var t,e;return{signature:((t=window.datalayer)==null?void 0:t.signature)||void 0,nbParagraphs:((e=window.datalayer)==null?void 0:e.nbParagraphs)||void 0}},we=({signature:t,nbParagraphs:e}={})=>{window.datalayer=window.datalayer||{},window.datalayer.signature=t||"",e&&(window.datalayer.nbParagraphs=e)},ve=()=>{const t=pe(),e=ge(),n=me();window.datalayer=v(v(v({},t),e),n)};let s=[],P;const _e=(t,e)=>{let n=!1;return()=>{n||(t(),n=!0,P=setTimeout(()=>{n=!1},e))}},ye=t=>t.event&&te(t.elem,Number(t.distance))?(t.elem.dispatchEvent(new Event(t.event)),t.elem.dataset.lazyLoaded="true",!1):!0,x=()=>{_e(()=>{s=s.filter(ye),s.length<=0&&(clearTimeout(P),window.removeEventListener("scroll",x))},50)()},fe=()=>{s.length<=0||window.addEventListener("scroll",x)},he=t=>{s.push(t),fe()},be=()=>{window.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('[data-delayed="true"]').forEach(t=>{const e={elem:t,event:t.getAttribute("id"),distance:t.dataset.distanceVisible};he(e)})})};var Ee=Object.defineProperty,$=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,N=(t,e,n)=>e in t?Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Se.call(e,n)&&N(t,n,e[n]);if($)for(var n of $(e))Te.call(e,n)&&N(t,n,e[n]);return t};const Ie=()=>{const t=window.datalayer,e={};if(e["b:user_darkmode"]=t.darkmode==="1",e["b:user_status"]=t.user_status==="Connecte",e["b:user_status"]){const n=E("20mnUserDataLayer"),o=n?JSON.parse(decodeURIComponent(n)):null;o&&(e["s:user_id"]=String(o.i),Number.isNaN(o.d)||(e["n:user_a"]=parseInt(o.d,10)),Number.isNaN(o.l)||(e["n:user_zip"]=parseInt(o.l,10)),Number.isNaN(o.g)||(e["n:user_g"]=parseInt(o.g,10)))}return e},Ae=()=>{var t,e,n;const o={},a=A();return("utm_source"in a||"utm_campaign"in a||"utm_medium"in a)&&("utm_source"in a||(o.utm_source=(t=a.utm_medium)!=null?t:a.utm_campaign),"utm_campaign"in a||(o.utm_campaign=(e=a.utm_source)!=null?e:a.utm_medium),"utm_medium"in a||(o.utm_medium=(n=a.utm_source)!=null?n:a.utm_campaign)),o},Oe=()=>{var t;const e=window.datalayer,n={};n["b:user_adblock"]=e.adblock==="1",n["s:page_url_raw"]=window.location.href,e.source_type&&(n["s:content_source"]=e.source_type),e.referrer&&(n["s:misc_referrer"]=e.referrer),n["s:page_type"]=e.page_type||"other";const o=document.querySelector("link[rel='canonical']");if(o&&(n["s:page_canonical"]=(t=o.getAttribute("href"))!=null?t:""),e.chapter4&&(n["s:chapter4"]=e.chapter4),e.page_uri==="/search"){const a=A();n["s:misc_search"]=a.q||""}return j(j({},n),Ie())};var Le=Object.defineProperty,Ce=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,F=(t,e,n)=>e in t?Le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,M=(t,e)=>{for(var n in e||(e={}))De.call(e,n)&&F(t,n,e[n]);if(R)for(var n of R(e))Pe.call(e,n)&&F(t,n,e[n]);return t},xe=(t,e)=>Ce(t,ke(e));const $e=()=>{w("ATInternet","https://www.20minutes.fr/js/script-at.js")},Ne=()=>{window.ATInternet={onTrackerLoad:()=>{var t,e,n;if(window.ATInternet.Tracker){const o=new window.ATInternet.Tracker.Tag;o.privacy.getVisitorMode()===null&&o.privacy.setVisitorMode("cnil","exempt");const a=window.datalayer.article_section?r(window.datalayer.article_section):"";o.page.set({name:window.datalayer.libelle?r(window.datalayer.libelle):"",chapter1:window.datalayer.chapter1?r(window.datalayer.chapter1):a,chapter2:window.datalayer.chapter2?r(window.datalayer.chapter2):"",chapter3:window.datalayer.chapter3?r(window.datalayer.chapter3):"",customObject:{device:ne()==="desktop"?"desktop":"smartphone"}}),o.customVars.set({site:{2:(t=window.datalayer.content_id)!=null?t:""}}),o.setProps(xe(M(M({},Oe()),Ae()),{"b:pageview_with_consent":o.privacy.getVisitorMode().name==="optin","s:site_level2":window.location.hostname}),!0),o.identifiedVisitor.set({id:(e=window.datalayer.ac)!=null?e:"",category:(n=window.datalayer.an)!=null?n:""}),o.dispatch()}}}},je=()=>{window.addEventListener("DOMContentLoaded",()=>{Ne(),$e()})},Re=()=>{window.addEventListener("DOMContentLoaded",()=>{!document.querySelector(".gcse-search")||w("googlesearch","https://cse.google.com/cse.js?cx=954c975a1d4164f88")})},Fe=()=>{var t;return(t=Array.from(document.querySelectorAll(".c-tags--breadcrumb")))==null?void 0:t.reduce((e,n)=>e+n.innerHTML,"")},Me=()=>{window.gtmDatalayer=window.gtmDatalayer||[];const t=document.cookie.match("(^|;)\\s*20mnUserDataLayer\\s*=\\s*([^;]+)"),e=t?JSON.parse(decodeURIComponent(t.pop())):null;window.gtmDatalayer=[{page_uri:window.location.pathname,user_status:window.datalayer.user_status,referrer:document.referrer,breadcrumb:Fe(),user:{d:e?.d||null,g:e?.g||null,i:e?.i||null,l:e?.l||null,o:e?.o||null}}]};(()=>{we(),ve(),Me(),oe(),de(),ie(),ae(),Z(),U(),z(window.dfp.targeting),X(),je(),be(),Re()})()})(); |
{ | ||
"name": "@20minutes/tyr", | ||
"version": "0.1.19", | ||
"version": "0.1.20", | ||
"repository": "git@github.com:20minutes/tyr.git", | ||
@@ -44,3 +44,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@20minutes/hela": "^0.1.14", | ||
"@20minutes/hela": "^0.1.15", | ||
"aws-rum-web": "^1.11.0", | ||
@@ -47,0 +47,0 @@ "react": "^18.2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3528689
40414
+ Addedua-parser-js@1.0.39(transitive)
- Removedua-parser-js@1.0.40(transitive)
Updated@20minutes/hela@^0.1.15