@20minutes/tyr 2.29.10 → 2.29.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  /*!
7
7
  * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
8
8
  * (c) 2024 Dmytro Semenov
9
- */function je(e,t,r){const n=document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n}function He(e,t,r){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof r?`${r}px`:r}const Ve="idle",Ue="loading",Ke="loaded",$e="error";function Ge(e,t,r=document){let n=[];if(e instanceof Element)n=[e];else if(e instanceof NodeList||Array.isArray(e))n=Array.from(e);else{const i="string"==typeof e?e:t;i&&(n=Array.from(r.querySelectorAll(i)))}return n}function We(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Ze{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class Qe{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,r=100){var n,i,o;this._filters[e]||(this._filters[e]=[]),null===(n=this._filters[e])||void 0===n||n.push({fn:t,priority:r}),null===(i=this._filters[e])||void 0===i||i.sort((e,t)=>e.priority-t.priority),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,r)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var r;return null===(r=this._filters[e])||void 0===r||r.forEach(e=>{t[0]=e.fn.apply(this,t)}),t[0]}on(e,t){var r,n;this._listeners[e]||(this._listeners[e]=[]),null===(r=this._listeners[e])||void 0===r||r.push(t),null===(n=this.pswp)||void 0===n||n.on(e,t)}off(e,t){var r;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),null===(r=this.pswp)||void 0===r||r.off(e,t)}dispatch(e,t){var r;if(this.pswp)return this.pswp.dispatch(e,t);const n=new Ze(e,t);return null===(r=this._listeners[e])||void 0===r||r.forEach(e=>{e.call(this,n)}),n}}class Je{constructor(e,t){if(this.element=je("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(He(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,r){let n=`translate3d(${e}px,0px,0)`;return void 0!==r&&(n+=` scale3d(${r},${r},1)`),n}(0,0,e/250)):He(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}}class Ye{constructor(e,t,r){this.instance=t,this.data=e,this.index=r,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Ve,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Je(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=je("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=je("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,r;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(t=this.data.src)&&void 0!==t?t:"",n.alt=null!==(r=this.data.alt)&&void 0!==r?r:"",this.state=Ue,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=Ke,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===Ke||this.state===$e)&&this.removePlaceholder())}onError(){this.state=$e,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Ue,this)}isError(){return this.state===$e}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(He(this.element,e,t),this.isImageContent()&&!this.isError()))){const r=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,r?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==$e,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,t;let r=je("pswp__error-msg","div");r.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",r=this.instance.applyFilters("contentErrorElement",r,this),this.element=je("pswp__content pswp__error-msg-container","div"),this.element.appendChild(r),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===$e)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||We())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!We()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===Ke||this.state===$e)&&this.removePlaceholder()))}}function Xe(e,t,r,n,i){let o=0;if(t.paddingFn)o=t.paddingFn(r,n,i)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}class et{constructor(e,t,r,n){this.pswp=n,this.options=e,this.itemData=t,this.index=r,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,r){const n={x:e,y:t};this.elementSize=n,this.panAreaSize=r;const i=r.x/n.x,o=r.y/n.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",r=this.options[t];if(r)return"function"==typeof r?r(this):"fill"===r?this.fill:"fit"===r?this.fit:Number(r)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function tt(e,t,r){const n=t.createContentFromData(e,r);let i;const{options:o}=t;if(o){let a;i=new et(o,e,-1),a=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const r=e.getViewportSizeFn(e,t);if(r)return r}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,t);const s=function(e,t,r,n){return{x:t.x-Xe("left",e,t,r,n)-Xe("right",e,t,r,n),y:t.y-Xe("top",e,t,r,n)-Xe("bottom",e,t,r,n)}}(o,a,e,r);i.update(n.width,n.height,s)}return n.lazyLoad(),i&&n.setDisplayedSize(Math.ceil(n.width*i.initial),Math.ceil(n.height*i.initial)),n}class rt extends Qe{getNumItems(){var e;let t=0;const r=null===(e=this.options)||void 0===e?void 0:e.dataSource;r&&"length"in r?t=r.length:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(t=r.items.length));const n=this.dispatch("numItems",{dataSource:r,numItems:t});return this.applyFilters("numItems",n.numItems,r)}createContentFromData(e,t){return new Ye(e,this,t)}getItemData(e){var t;const r=null===(t=this.options)||void 0===t?void 0:t.dataSource;let n={};Array.isArray(r)?n=r[e]:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),n=r.items[e]);let i=n;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,r;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(r=this.options)&&void 0!==r&&r.childSelector?Ge(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},r="A"===e.tagName?e:e.querySelector("a");if(r){t.src=r.dataset.pswpSrc||r.href,r.dataset.pswpSrcset&&(t.srcset=r.dataset.pswpSrcset),t.width=r.dataset.pswpWidth?parseInt(r.dataset.pswpWidth,10):0,t.height=r.dataset.pswpHeight?parseInt(r.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,r.dataset.pswpType&&(t.type=r.dataset.pswpType);const i=e.querySelector("img");var n;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(n=i.getAttribute("alt"))&&void 0!==n?n:"";(r.dataset.pswpCropped||r.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,r)}lazyLoadData(e,t){return tt(e,this,t)}}class nt extends rt{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ge(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if("button"in(t=e)&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||window.pswp)return;var t;let r={x:e.clientX,y:e.clientY};!r.x&&!r.y&&(r=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);const i={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,i,r))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,r=Ge(this.options.children,this.options.childSelector,e.currentTarget).findIndex(e=>e===t||e.contains(t));return-1!==r?r:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,r){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Ge(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=r,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:r}=this;t&&(r.dataSource=t);const n=[],i=typeof r.pswpModule;if("function"==typeof(o=r.pswpModule)&&o.prototype&&o.prototype.goTo)n.push(Promise.resolve(r.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");n.push(r.pswpModule())}var o;"function"==typeof r.openPromise&&n.push(r.openPromise()),!1!==r.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const r=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:r}).defaultPrevented)return tt(r,t,e)}(e,this));const a=++this._uid;Promise.all(n).then(e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,a)}})}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const r="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=r,window.pswp=r,Object.keys(this._listeners).forEach(e=>{var t;null===(t=this._listeners[e])||void 0===t||t.forEach(t=>{r.on(e,t)})}),Object.keys(this._filters).forEach(e=>{var t;null===(t=this._filters[e])||void 0===t||t.forEach(t=>{r.addFilter(e,t.fn,t.priority)})}),this._preloadedContent&&(r.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),r.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),r.init()}destroy(){var e;null===(e=this.pswp)||void 0===e||e.destroy(),this.shouldOpen=!1,this._listeners={},Ge(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const it=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar");if(!t)return;const{documentElement:r}=document;let n=r.scrollHeight-r.clientHeight;if(!n)return;const i=r.scrollTop;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const o=Math.round(i/n*100);t.style.width=`${o}%`,o>=100&&(t.style.width="100%")},ot="#page-content",at="#text-tooltip",st="c-text-tooltip--show",lt=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],ct=(e,t)=>e instanceof Element&&t.some(t=>e.matches(t)),ut=()=>{const e=document.querySelector(`${at}`);e&&e.classList.remove(st)},dt=({type:e})=>{const t=window.getSelection();if("selectionchange"===e)return void ut();if(!t||!t.rangeCount)return;const r=t.getRangeAt(0),n=t.toString().trim();if(n.length){const e=((e,t)=>{const r=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentElement,n=e.endContainer.nodeType===Node.ELEMENT_NODE?e.endContainer:e.endContainer.parentElement;return!!r&&ct(r,t)||!!n&&ct(n,t)})(r,lt),i=(e=>{var t;if(!e.focusNode)return null;const r=null==(t=e.anchorNode)?void 0:t.compareDocumentPosition(e.focusNode);return r?(4&r)>0:e.anchorOffset<e.focusOffset})(t)||!1;return void(e&&((e,t,r)=>{const n=document.querySelector(`${ot} ${at}`),i=document.querySelector(`${ot}`),o=document.querySelectorAll(`${ot} ${at} .tooltip-btn`);if(!n||!i)return void console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");Array.from(o).forEach(e=>e.setAttribute("data-selected-text",r));const a=e.getClientRects(),s=a[t?a.length-1:0];n.style.top=s.top-i.getBoundingClientRect().top-(n.offsetHeight+10)+"px",s.width<n.offsetWidth?n.style.left=s.left-i.getBoundingClientRect().left+s.width/2-n.offsetWidth/2+"px":n.style.left=t?s.left-i.getBoundingClientRect().left+s.width-n.offsetWidth+"px":s.left-i.getBoundingClientRect().left+"px",n.classList.add(st)})(r,i,n))}ut()},ft=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",e=>{(e=>{const{target:t}=e;if(t instanceof Element){const r=t.closest(".c-search-form--button");r&&(e.preventDefault(),r.classList.remove("c-search-form--button"))}})(e)})},pt=e=>"ArrowLeft"===e.code||39===e.keyCode,mt=e=>"ArrowRight"===e.code||37===e.keyCode,ht=(e=document.querySelectorAll(".js-tabs"))=>{e.length>0&&e.forEach(e=>{const t=e.querySelectorAll('[role="tab"]');t.forEach(t=>{t.addEventListener("click",t=>{(({tabsContainerElement:e,event:t})=>{t.preventDefault();const r=t.target;if(!(r instanceof HTMLButtonElement))return;const n=e.querySelectorAll('[role="tab"]'),i=e.querySelectorAll('[role="tabpanel"]'),o=r.getAttribute("aria-controls"),a=Object.values(i).find(e=>e.id===o);n.forEach(e=>{e.setAttribute("aria-selected","false")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),r.setAttribute("aria-selected","true"),a&&a.removeAttribute("aria-hidden")})({tabsContainerElement:e,event:t})})});const r=e.querySelector('[role="tablist"]');if(r&&t.length>0){let e=0;r.addEventListener("keydown",r=>{r instanceof KeyboardEvent&&(pt(r)||mt(r))&&(t[e].setAttribute("tabindex","-1"),pt(r)?(e+=1,e>=t.length&&(e=0)):mt(r)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())})}})},gt=e=>{const[t,r]=e.split("h").map(Number);return 60*t+r},vt=()=>{const e=new Date;return 60*e.getHours()+e.getMinutes()},bt=()=>{const e=document.querySelectorAll(".c-timeline__time");if(!e||e.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:r,currentIntervalEndTime:n,currentIntervalIndex:i}=(e=>{const t=vt();let r=null,n=null,i=-1;return Array.from(e).find((e,o,a)=>{if(o===a.length-1)return!1;const s=gt(e.textContent),l=gt(a[o+1].textContent);return t>=s&&t<l&&(r=e.textContent,n=a[o+1].textContent,i=o,!0)}),{currentIntervalStartTime:r,currentIntervalEndTime:n,currentIntervalIndex:i}})(e);if(!r||!n)return;const o=((e,t)=>{const r=vt();return r<e||r>t?0:(r-e)/(t-e)})(gt(r),gt(n));if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&e.length>=5){const e="172px / 2";switch(i){case 0:t.style.width=`calc(${e} + (((${e} + 25% - ${e} / 2) - ${e}) * ${o})`;break;case 1:t.style.width=`calc((${e} + 25% - ${e} / 2) + (((50%) - (${e} + 25% - ${e} / 2)) * ${o})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${e} / 2) - (50%)) * ${o})`;break;case 3:t.style.width=`calc((75% - ${e} / 2) + (((100% - ${e}) - (75% - ${e} / 2)) * ${o}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const e="45px / 2",a="20px";switch(i){case 0:case 1:case 2:case 3:t.style.width=`calc((${a} + ${e}) + (((60% + ${e}) - (${a} + ${e})) * ${o})`;break;default:t.style.width="0%"}if(1===i||2===i||3===i){const e=document.querySelectorAll(".c-timeline__time"),t=document.querySelectorAll(".c-timeline__event");e.length>0&&t.length>0&&(e[0].textContent=r,e[1].textContent=n,t[0].textContent=t[i].textContent,t[1].textContent=t[i+1].textContent)}}}},yt="c-icon-item__container--is-highlighted",_t=()=>{const e=document.querySelector(".c-toolbar");if(e){const t=window.location.origin+window.location.pathname,r=Array.from(e.querySelectorAll(".c-icon-item__container"));(e=>{const t=e.find(e=>e.classList.contains(yt));null==t||t.classList.remove(yt)})(r);const n=r.find(e=>{var r;return(null==(r=e.querySelector("a"))?void 0:r.getAttribute("href"))===t});null==n||n.classList.add(yt)}},wt=()=>{((e=document.querySelector(".js-expand-button"))=>{e&&document.querySelectorAll(".js-expand-button").forEach(e=>e.addEventListener("click",f))})(),ht(),l(),((e=document.querySelector(".js-ellipsis-button"))=>{e&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const t="true"===e.getAttribute("data-multiple");e.addEventListener("click",e=>d(e,t))})})(),document.querySelector(".c-progress")&&window.addEventListener("scroll",it),(()=>{let e=null;e=new nt({gallery:"#photoswipe-gallery",children:"a",pswpModule:ze,zoom:!1,imageClickAction:"next",tapAction:"next"}),e.on("uiRegister",()=>{var t,r;null==(r=null==(t=null==e?void 0:e.pswp)?void 0:t.ui)||r.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{var r;null==(r=null==e?void 0:e.pswp)||r.on("change",()=>{var r,n;const i=null==(n=null==(r=null==e?void 0:e.pswp)?void 0:r.currSlide)?void 0:n.data.element;if(i){const e=i.querySelector(".caption-content");t.innerHTML=(null==e?void 0:e.innerHTML)||""}})}})}),e.init()})(),document.querySelectorAll(".js-modal").forEach(e=>{if(!(e instanceof HTMLElement))return;const t=new T(e);if("dialog-menu"===e.id){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),r=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&r.length>0&&(t.on("show",()=>{e.forEach(e=>e.classList.add("u-hidden")),r.forEach(e=>e.classList.remove("u-hidden"))}),t.on("hide",()=>{e.forEach(e=>e.classList.remove("u-hidden")),r.forEach(e=>e.classList.add("u-hidden"))}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),ft(),((e,t)=>{const r=document.querySelector(`#${t}`);if(r){const t=r.querySelector(".js-countdown-days"),n=r.querySelector(".js-countdown-hours"),i=r.querySelector(".js-countdown-minutes"),o=r.querySelector(".js-countdown-seconds");if(!(t&&n&&i&&o))return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const a=window.counters[e],s=new Date(a).getTime(),l=setInterval(()=>{const e=(new Date).getTime(),r=s-e;if(r<=0)clearInterval(l);else{const e=Math.floor(r/864e5),a=Math.floor(r%864e5/36e5),s=Math.floor(r%36e5/6e4),l=Math.floor(r%6e4/1e3);t.innerHTML=e.toString(),n.innerHTML=a.toString(),i.innerHTML=s.toString(),o.innerHTML=l.toString()}},1e3)}})("paralympicsGames","countdown-paralympics-games"),null!=window&&window.getSelection?(document.addEventListener("mouseup",dt),document.addEventListener("selectionchange",dt),document.addEventListener("touchend",dt),document.addEventListener("touchcancel",dt)):console.warn("Selection API isn't supported"),(()=>{const e=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),r=document.querySelector(".js-close-article-btn"),n=document.querySelector(".c-header-mobile"),i=n instanceof HTMLElement?n.offsetHeight:0;if(e&&t&&r){const n=new IntersectionObserver(()=>{const n=r.classList,o=n.contains("u-hidden"),a=e.getBoundingClientRect().bottom-i,s=t.getBoundingClientRect().bottom-i;o&&a<=0&&s>=0&&n.remove("u-hidden"),!o&&(a>=0||s<=0)&&n.add("u-hidden")},{root:document,rootMargin:`-${i}px 0px 0px 0px`});n.observe(e),n.observe(t)}})(),(()=>{const e=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(e)){const e=t.querySelector(".c-half-donut"),r=t.querySelector(".c-legend");if(!e||!r)return;r.querySelectorAll("[data-color]").forEach(t=>{const n=t.getAttribute("data-color"),i=e.querySelector(`.c-half-donut__zone--${n}`);null==i||i.addEventListener("mouseenter",()=>{t.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),r.classList.add("c-legend--is-hovered")}),null==i||i.addEventListener("mouseleave",()=>{t.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),r.classList.remove("c-legend--is-hovered")}),t.addEventListener("mouseenter",()=>{null==i||i.classList.add("c-half-donut__zone--is-hovered"),r.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),t.addEventListener("mouseleave",()=>{null==i||i.classList.remove("c-half-donut__zone--is-hovered"),r.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}})(),u(),s("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),c(),_t(),(()=>{const e=document.querySelector("#js-election-selector");e&&e.addEventListener("change",e=>{window.location.replace(e.target.value)})})(),(()=>{const e=document.querySelector(".c-search-banner");if(e){const t=document.querySelector("#js-search-banner-to-hide"),r=e.querySelector("#js-search-banner-dropdown-btn");null==r||r.addEventListener("click",()=>{const e=r.querySelector("svg"),n=null==e?void 0:e.querySelector("use");switch(null==n?void 0:n.getAttribute("xlink:href")){case"#chevron-up":null==n||n.setAttribute("xlink:href","#chevron-down"),null==t||t.classList.add("u-hidden");break;case"#chevron-down":null==n||n.setAttribute("xlink:href","#chevron-up"),null==t||t.classList.remove("u-hidden")}})}})(),p(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:e}=t.dataset,{sliderAuto:r}=t.dataset,{sliderDelay:n}=t.dataset,i=n?parseInt(n,10):3e3,o=t.closest(".js-overview-bar-container"),a=null==o?void 0:o.querySelector(".c-stepper"),s=null==a?void 0:a.querySelectorAll(".c-stepper__item");if(t){const n=t.querySelector(".js-navigation-container__list"),o=t.querySelector(".o-nav-button--next-button"),l=t.querySelector(".o-nav-button--previous-button");if(n&&n.clientWidth<n.scrollWidth&&(null==o||o.classList.add("o-nav-button--visible"),null!=o&&o.classList.contains("c-slider__button-container--has-space-around")&&(n.style.width=`calc(100% - ${L})`)),n&&o&&l&&(null==o||o.addEventListener("click",P.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e})),null==l||l.addEventListener("click",O.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e,delay:i}))),"true"===r&&o){const e=a?a.querySelector(".c-stepper__item--loading"):null;s&&(s.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)}),e||s[0].classList.add("c-stepper__item--loading")),setInterval(()=>{o.classList.contains("o-nav-button--visible")?o.click():n&&l&&(n.scrollLeft=0,s&&(s.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e.classList.remove("c-stepper__item--loading"),e.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)},0)}),setTimeout(()=>{s[0].classList.add("c-stepper__item--loading")},0)),l.click())},i)}}}})(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e))if(t){const e=t.querySelector(".js-navigation-container__list"),r=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&r&&n&&window.addEventListener("resize",I.bind(!1,{navigatedList:e,nextBtn:r,prevBtn:n}))}})(),(()=>{const e=document.querySelector(".js-game-alert");i&&e&&e.classList.remove("u-hidden")})(),o(),bt(),((e={})=>{const{buttonSelector:t=".c-scroll-to-top"}=e,r=document.querySelector(t),n=null==r?void 0:r.querySelector("button");if(!r||!n)return;const i=r.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(r.dataset.triggerOffset||"0",10);r.style.display="none";const a=()=>{const e=document.querySelector(i);let t=!1;if(e){const r=e.getBoundingClientRect().top;t=window.pageYOffset>=r-o}else t=window.pageYOffset>300;r.style.display=t?"block":"none"};window.addEventListener("scroll",a),n.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})}),a()})()},Et="forward-disable-audience-measure",St="data-preferences-consent",xt=(e,t)=>{let r=null;if(e.id&&(r=document.querySelector(`label[for="${e.id}"]`)),r||(r=e.closest("label")),!r){const t=e.nextElementSibling;if(t&&"LABEL"===t.tagName&&t instanceof HTMLElement)r=t;else{const t=e.previousElementSibling;t&&"LABEL"===t.tagName&&t instanceof HTMLElement&&(r=t)}}const n=r?.querySelector("span")||r;n&&(n.textContent=t?"Mon droit d'opposition est respecté et aucune donnée personnelle supplémentaire n'est collectée":"Mes données de navigation sont collectées à des fins d'analyse statistique")};function Nt(){if(this?.id)try{const e=document.getElementById(this.id);if(e){const t=e.getAttribute("value");if(t){const e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}}}catch(e){console.error("Oops, unable to copy",e)}}const kt=e=>{const t=e.currentTarget;if(e.preventDefault(),t instanceof HTMLButtonElement){const e=t.parentNode?.querySelectorAll(".js-toggle-target");"true"===t.getAttribute("aria-expanded")?((e,t)=>{t?.forEach(e=>e.setAttribute("aria-hidden","true")),e.setAttribute("aria-expanded","false"),e.innerHTML="Voir tous les résultats"})(t,e):((e,t)=>{e.setAttribute("aria-expanded","true"),e.innerHTML="Masquer tous les résultats",t?.forEach(e=>e.setAttribute("aria-hidden","false"))})(t,e)}};var Ct=()=>{(()=>{const e=document.getElementById("goto-distribution"),t=document.getElementById("goto-european-map"),r=document.getElementById("goto-map"),n=document.getElementById("goto-statistics"),i=document.getElementById("goto-results");e&&e.addEventListener("click",Nt),t&&t.addEventListener("click",Nt),r&&r.addEventListener("click",Nt),n&&n.addEventListener("click",Nt),i&&i.addEventListener("click",Nt)})(),((e=document.querySelector(".js-toggle-button"))=>{e&&document.querySelectorAll(".js-toggle-button").forEach(e=>e.addEventListener("click",kt))})(),(()=>{const e=document.getElementById("elections-form-container"),t=document.querySelector(".c-header-mini"),r=document.querySelector('body[data-layout="mobile"]');e&&t&&new MutationObserver(t=>{const r=t[0],n=r.target;n instanceof HTMLElement&&"attributes"===r.type&&"class"===r.attributeName&&(n.className.includes("c-header-mini--is-hidden")?(e.classList.remove("u-sticky"),e.classList.remove("u-sticky--under-header-mini")):(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header-mini")))}).observe(t,{attributes:!0});r&&e&&(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header"))})()};const Tt=e=>{const t=document.cookie.split(";").filter(t=>-1!==t.indexOf(e))[0];return t?t.split("=")[1]:"{}"},At=function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},Lt=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Dt=(e,t)=>{let r=e.toLowerCase().replace(/[\s-]+/g,t??"-");return r=(e=>{let t=e;const r="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)t=t.replace(new RegExp(r.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return t})(r),r.replace(/[^\w-]+/g,"").replace(/-*$/g,"")},Pt=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,Ot=e=>{const t={click:Dt(e.name),click_chapter1:e?.chapter1||null,click_chapter2:e?.chapter2||null,click_chapter3:e?.chapter3||null},r=`click.${e.type}`;if(window.pa?(e.customProps&&Object.keys(e.customProps).length>0&&window.pa.setProperties(e.customProps,{persistent:!1,events:[r]}),window.pa.sendEvent(r,t)):window._paq&&(e.customProps&&Object.keys(e.customProps).length>0&&window._paq.push(["setProperties",e.customProps,{persistent:!1,events:[r]}]),window._paq.push(["sendEvent",r,t])),!window.edgee?.track)return;const n=document.getElementById("__EDGEE_DATA_LAYER__");let i={};if(n)try{const e=JSON.parse(n.textContent||"");e.data_collection.context=e.data_collection.context||{},i=e.data_collection.context.page?.properties||{}}catch{i={}}window.edgee.track({name:r,properties:{...i,click:t.click,click_chapter1:t.click_chapter1,click_chapter2:t.click_chapter2,click_chapter3:t.click_chapter3,click_type:e?.type??"navigation",...e.customProps}},{"edgee/piano-analytics":!0})},It=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}]),window.edgee?.page&&!1!==e?.enableEdgee&&window.edgee.page()},Mt=()=>{"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("div#local-news-container div.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"local_news_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})},qt=()=>{window.datalayerInfo?.pageName&&["article","live"].includes(window.datalayerInfo?.pageName)&&document.querySelectorAll("div.c-tabpanel article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"most_read_content",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:t,cta_engagement:1},chapter1:"widget"}),window.location.href=t})})};var Rt=()=>{"guide-achat"===window.datalayerInfo?.subType&&document.querySelectorAll(".c-content a.c-btn").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),Ot({name:"affiliation",type:"action",chapter1:"guide_achat"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})}),"article"===window.datalayerInfo?.pageName&&document.querySelectorAll("footer article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"read_also",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),document.querySelectorAll('div[data-event-name="mbrs-game-save-favorite"]').forEach(e=>{e.addEventListener("click",()=>{Ot({name:"favorite",type:"action",customProps:{cta_context:"home_game",cta_type:"picto",cta_engagement:1}})})}),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("#featured-tag .c-card-container--clickable h3 a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"brief_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),document.querySelectorAll(".c-flink-related-content a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="",r="";e.target instanceof HTMLAnchorElement&&(t=e.target.href,r=e.target.target),Ot({name:"to_discover",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:t,cta_engagement:2},chapter1:"flink"}),"_blank"===r?window.open(t,"_blank","noopener"):window.location.href=t})}),(()=>{if(window.datalayerInfo?.pageName&&["game","gamehome"].includes(window.datalayerInfo?.pageName)){let e=document.querySelectorAll("main#page-wrap div.c-collapse__content a");"desktop"===window.layout&&(e=document.querySelectorAll("header.c-header-page div.c-collapse__content a")),e.forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement&&(t=e.target.href),Ot({name:"view_all_games",type:"action",customProps:{cta_context:"home_game",cta_type:"link",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),document.querySelectorAll(".c-slider__list a.c-tags--primary").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement&&(t=e.target.href),Ot({name:"game",type:"action",customProps:{cta_context:"breadcrumb",cta_type:"link",cta_destination:t,cta_engagement:1}}),window.location.href=t})})}})(),(()=>{const e=document.querySelector(".c-header-page__print-button");e&&e.addEventListener("click",()=>{Ot({name:"print",type:"action",customProps:{cta_context:"game",cta_type:"picto",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{let e=document.querySelector("article.c-card-large a");"mobile"===window.layout&&(e=document.querySelector("article.c-card-extra-large a")),e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"headline_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})(),window.datalayerInfo?.pageName&&["home","tag"].includes(window.datalayerInfo?.pageName)&&(document.querySelectorAll("div.c-icon-item__container--is-clickable a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:(e.target instanceof HTMLElement||e.target instanceof SVGElement)&&(t=e.target.closest("a")?.href||""),Ot({name:"comment_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),document.querySelectorAll('div.c-icon-item__container--is-clickable[data-event-name="mbrs-social-save-content"]').forEach(e=>{e.addEventListener("click",()=>{Ot({name:"save_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:window.location.href,cta_engagement:3}})})})),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll(".c-carousel__movies--in-long-list a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="",r="";e.target instanceof HTMLAnchorElement?(r=e.target.href,t=e.target.closest("section.c-carousel")?.querySelector("h2")?.textContent||""):e.target instanceof Element&&(r=e.target.closest("a")?.href||"",t=e.target.closest("section.c-carousel")?.querySelector("h2")?.textContent||"");let n="";switch(t){case"Idées de sorties à Paris":n="ticketNunc_content";break;case"On regarde quoi ce soir ?":n="program_tv_content";break;default:n="cinema_content"}Ot({name:n,type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:r,cta_engagement:1}}),window.location.href=r})}),[{name:"games",id:"#entertainment-item-game"},{name:"horoscope",id:"#entertainment-item-horoscope"}].forEach(e=>{const t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener("click",r=>{r.stopPropagation(),r.preventDefault(),Ot({name:e.name,type:"action",customProps:{cta_context:"widget_entertainment",cta_type:"link_with_icon",cta_destination:t.href,cta_engagement:2}}),window.location.href=t.href})}),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("#tabpanel-le-direct article.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"live",type:"action",customProps:{cta_context:"home",cta_type:"link",cta_destination:window.location.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=document.querySelector("#tab-resume");e&&e.addEventListener("click",()=>{Ot({name:"context",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})});const t=document.querySelector("#tab-temps-forts");t&&t.addEventListener("click",()=>{Ot({name:"highlights",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})})})(),Mt(),document.querySelectorAll("a.c-header-mobile__logo, a.c-header__logo, .c-header-mobile__logo a.c-link, .c-header__logo a.c-link, .c-header-mini__container > div:not(.c-header-mini__content) a.c-link").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"logo",type:"action",customProps:{cta_context:"header",cta_type:"image",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),(()=>{const e=(e,t,r)=>{let n="";r.target instanceof HTMLAnchorElement?n=r.target.href:r.target instanceof Element&&(n=r.target.closest("a")?.href||""),n&&(r.stopPropagation(),r.preventDefault(),Ot({name:t,type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:n,cta_engagement:1}}),"_blank"===e.target?window.open(n,"_blank")?.focus():window.location.href=n)};document.querySelectorAll(".c-header__container a.c-media-link").forEach(t=>{switch(t.title){case"Consulter la page 20 Minutes TV live":t.addEventListener("click",r=>{e(t,"20mn_tv",r)});break;case"Consulter la page 20 Minutes TV":t.addEventListener("click",r=>{e(t,"videos",r)})}})})(),qt(),document.querySelectorAll(".c-overview-bar__article a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"summary_banner",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),document.querySelectorAll("div.c-read-also-banner a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"read_also_banner",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2},chapter1:"banner"}),window.location.href=t})}),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),Ot({name:"recrutement",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})})(),"desktop"===window.layout&&document.querySelectorAll("li.c-header__link-and-submenu-container a.c-header__link").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"section_tag",type:"action",customProps:{cta_context:"header",cta_type:"link",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=document.querySelector('.c-social-bar a[href="#mbrs-comments-container"]');e&&e.addEventListener("click",()=>{Ot({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})});const t=document.querySelector('.c-social-bar div[data-a11y-dialog-show="dialog-comment"]');t&&t.addEventListener("click",()=>{Ot({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector(".c-social-bar div.mbrs-social-report-container");e&&e.addEventListener("click",()=>{Ot({name:"content_correction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector('.c-social-bar div[data-event-name="mbrs-social-save-content"]');e&&e.addEventListener("click",()=>{Ot({name:"save_content",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),document.querySelectorAll("div.c-sub-menu__right a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"content",type:"action",customProps:{cta_context:"sub_nav",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),Ot({name:e,type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:"home"===e?window.location.href:r,cta_engagement:1}}),window.location.href=r)};document.querySelectorAll(".c-toolbar a").forEach(t=>{const r=t.nextSibling;if(r instanceof HTMLParagraphElement)switch(r.innerText){case"À la Une":t.addEventListener("click",t=>{e("home",t)});break;case"Le Direct":t.addEventListener("click",t=>{e("live_feed",t)});break;case"Jeux":t.addEventListener("click",t=>{e("games",t)})}});const t=document.querySelector(".c-toolbar div.dtk-videofeed");t&&t.addEventListener("click",()=>{Ot({name:"video_feed",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),Ot({name:e,type:"action",customProps:{cta_context:"menu",cta_destination:r,cta_engagement:1,cta_type:"button"}}),window.location.href=r)};document.querySelectorAll("a.c-menu__tiles-items").forEach(t=>{switch(t.innerText){case"Jeux":t.addEventListener("click",t=>{e("games",t)});break;case"Horoscope":t.addEventListener("click",t=>{e("horoscope",t)})}})})()},Ft=(e=>(e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.ARTICLE="article",e.CONTACT="contact",e.DIRECT="direct",e.ELECTIONS="elections",e.ELECTIONSHOME="electionshome",e.GAME="game",e.GAME_APP="gameapp",e.GAMEHOME="gamehome",e.HOME="home",e.HOROSCOPE="horoscope",e.HOROSCOPE_HOME="horoscopehome",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.JOURNALIST="journalist",e.LA21E="la21e",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.LIVE="live",e.MOBILE_APPS="mobileapps",e.MOST_COMMENTED="mostcommented",e.MOST_READ="mostread",e.MOST_SHARED="mostshared",e.MOST_VIEWED="mostviewed",e.MOVIES="movies",e.NEWS="news",e.PARTNER="partner",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.SITEMAP="sitemap",e.SPORT="sport",e.STORY="story",e.TAG="tag",e.TRAFFIC="traffic",e.TV_HOME="tvhome",e.TV_LIVE="tvlive",e.TV_MOST_RECENT="tvmostrecent",e.TV_MOST_VIEWED="tvmostviewed",e.TV_SHOW="tvshow",e.TV_SHOWS="tvshows",e.TV_VIDEO="tvvideo",e.WEATHER="weather",e))(Ft||{}),Bt=(e=>(e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.ARTICLE="article",e.CONTACT="contact",e.DIRECT="direct",e.ELECTIONS="elections",e.ELECTIONSHOME="electionshome",e.GAME="game",e.GAME_APP="gameapp",e.GAMEHOME="gamehome",e.HOME="home",e.HOROSCOPE="horoscope",e.HOROSCOPE_HOME="horoscopehome",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.JOURNALIST="journalist",e.LA21E="la21e",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.LIVE="live",e.MOBILE_APPS="mobileapps",e.MOST_COMMENTED="mostcommented",e.MOST_READ="mostread",e.MOST_SHARED="mostshared",e.MOST_VIEWED="mostviewed",e.MOVIES="movies",e.NEWS="news",e.PARTNER="partner",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.SITEMAP="sitemap",e.SPORT="sport",e.STORY="story",e.TAG="tag",e.TRAFFIC="traffic",e.TV_HOME="tvhome",e.TV_LIVE="tvlive",e.TV_MOST_RECENT="tvmostrecent",e.TV_MOST_VIEWED="tvmostviewed",e.TV_SHOW="tvshow",e.TV_SHOWS="tvshows",e.TV_VIDEO="tvvideo",e.WEATHER="weather",e))(Bt||{}),zt=(e=>(e.POOOL_ACCESS="poool-access",e.POOOL_ENGAGE="poool-engage",e.AUDION="audion",e.GOOGLE_SEARCH="google-search",e.DIGITEKA_VISIBLE_PLAYER="digiteka-visible-player",e.DIGITEKA_VIDEO_FEED="digiteka-video-feed",e.IDALGO="idalgo",e.NONLI="nonli",e.TABOOLA="taboola-sdk",e.MEDIEGO="mediego",e))(zt||{});var jt=()=>{(()=>{const e=document.getElementById("dialog-menu");e&&"mobile"===window.layout&&e.addEventListener("show",()=>{It({name:"menu",chapter1:"menu",chapter2:""})})})(),(()=>{const e=document.getElementById("dialog-comment");if(e&&"mobile"===window.layout){const{datalayerInfo:t={}}=window;e.addEventListener("show",()=>{It({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:"commentaires"})})}})(),(()=>{if(window.datalayerInfo?.pageName!==Bt.STORY||!window.history)return;const e=[],t=new IntersectionObserver(t=>{t.forEach(t=>{if(!t.isIntersecting)return;const r=t.target.getAttribute("id");r&&t.intersectionRatio>=0&&(e.includes(r)||(e.push(r),It({name:`${window.PianoPageInfo?.name}-${e.length}`})),window.history.pushState({},"",`#${r}`))})},{rootMargin:"-70px 0px -25% 0px"});document.querySelectorAll(".u-story-container").forEach(e=>{t.observe(e)})})()};const Ht=e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>r(t)),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,r])=>{t.setAttribute(`data-${Lt(e)}`,r)}),"head"===e.target&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))},Vt=(e,t)=>{const r=window.thirdPartiesConfig?.conditional?.find(t=>Dt(t.name)===e);if(!r)throw new Error(`Script with name ${e} not found`);(e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>r(t)),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,r])=>{t.setAttribute(`data-${Lt(e)}`,r)}),"head"===e.target&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))})({...r,...t})},Ut=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,(e=>(t,r)=>{if(!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus)console.error("Issue with mediego callback");else{if(e.getCurrentUserStatus().purposes.cookies?.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled)try{Vt(zt.MEDIEGO)}catch(e){e instanceof Error&&console.error(e.message)}window.__tcfapi("removeEventListener",2,null,t.listenerId)}})(e)))},Kt=()=>{if(/Android/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-android"),document.body.appendChild(e)}else if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-ios"),document.body.appendChild(e)}},$t=e=>(t,r)=>{!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus?console.error("Issue with poool callback"):(e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled||"article"!==window.datalayerInfo?.pageName||["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo?.subType||"")||(e=>{try{Vt(zt.POOOL_ACCESS)}catch(e){e instanceof Error&&console.error(e.message)}const t=document.querySelector('[src="https://static.20mn.fr/apps/poool/access.min.js"]');t?.addEventListener("load",()=>{const t=document.querySelector(".c-content"),r=document.createElement("div");r.setAttribute("id","paywall"),t?.parentNode?.insertBefore(r,t.nextSibling);const n=window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config("locale","fr",!0).config({cookies_enabled:e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled,debug:!0,context:"cookie-wall",default_widget:"gift",app_name:"Poool"}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0);n.on("consent",()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3),localStorage.setItem("consent_validity_date",e.toISOString().split("T")[0]),window.Didomi.setUserAgreeToAll()});let i=!1;const o=document.querySelector("#cookie-banner");window.didomiEventListeners.push({event:"notice.hidden",listener(){window.didomiOnReady.push(e=>{i||(i=!0,n.config("cookies_enabled",e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled),o&&o.setAttribute("style","position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))})}}),window.didomiOnReady.push(e=>{const t=e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled;t&&(n.config("cookies_enabled",!0),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))}),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"})})})(e),(()=>{try{Vt(zt.POOOL_ENGAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=Tt("20mnUserInfo");Kt();const t=document.querySelector('[src="https://assets.poool.fr/engage.min.js"]'),r=JSON.parse(decodeURIComponent(e?.replace(/'/g,'"')||"")).newsletters_registration??[];t?.addEventListener("load",()=>{const t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init("C7B0O-ENPDW-DIJOO-VJO1M").autoCreate({filters:["{}"!==e?"connected":"disconnected",...r]})})})(),window.__tcfapi("removeEventListener",2,null,t.listenerId))},Gt=()=>{document.querySelectorAll(".taboola").length>0&&(()=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{if(!t||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus)console.error("Issue with taboola callback");else{window._taboola=window._taboola||[],"article"===window.datalayerInfo?.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"});try{Vt(zt.TABOOLA,{dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}})}catch(e){e instanceof Error&&console.error(e.message)}document.querySelectorAll(".taboola").forEach(e=>{const t=e.getAttribute("data-mode"),r=e.getAttribute("id"),n=e.getAttribute("data-placement"),i=e.getAttribute("data-target-type");t&&r&&n&&i?window._taboola.push({mode:t,container:r,placement:n,target_type:i}):console.log("Issue with taboola placement")}),window._taboola.push({flush:!0}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)}};window.didomiOnReady.push(()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)})})()};var Wt=()=>{(()=>{const e=document.querySelector(".js-close-article-btn");e&&window?.location&&window?.envVariables?.pageEndpoint&&e.addEventListener("click",()=>{Ot({name:"close_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:"home",cta_engagement:1}}),window.location.assign(window.envVariables.pageEndpoint)})})()};const Zt=async({url:e,options:t})=>{const r=t||{};r.headers=r.headers||new Headers,r.headers.append("Content-Type","application/json");const n=await fetch(e,r).then(e=>{if(e.ok)return e;throw new Error(`Fetch error: ${e.statusText}`)}).then(e=>e.json());return Object.keys(n).includes("data")?n.data:n};var Qt=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(Qt||{}),Jt=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(Jt||{});const Yt={primary:{ultramarine:{value:"#4742ff"},"ultramarine-light":{value:"#6b72fb"}},secondary:{orange:{value:"#fa9917"},yellow:{value:"#f2e500"},green:{value:"#6a9f4f"},purple:{value:"#ae6ba2"},red:{value:"#dc0e19"},scarlet:{value:"#ff3f3f"},blue:{value:"#0000ff"},"blue-grey":{value:"#253548"},"blue-dark":{value:"#16202b"},pink:{value:"#ef2a82"},sponsoring:{value:"#fff5f1"},"blue-light":{value:"#d4ecfb"}},greyscale:{black:{value:"#000000"},white:{value:"#ffffff"},"grey-50":{value:"#fffffe"},"grey-100":{value:"#f7f7f7"},"grey-200":{value:"#dddddd"},"grey-300":{value:"#898a8c"},"grey-400":{value:"#6a6a6a"},"grey-500":{value:"#484848"},"grey-600":{value:"#2f3134"},"grey-700":{value:"#181a1e"},"grey-800":{value:"#101d25"},"grey-900":{value:"#0f1115"}},status:{warning:{value:"#fa9917"},error:{value:"#dc0e19"},success:{value:"#6a9f4f"}},theme:{conso:{value:"#ff8689"},default:{value:"#4742ff"},entertainment:{value:"#9d61ff"},hightech:{value:"#8f98a9"},media:{value:"#4742ff"},"partenaires-externes":{value:"#4742ff"},partner:{value:"#fd8000"},planet:{value:"#00b482"},production:{value:"#c5be00"},publicommunique:{value:"#c5be00"},publishing:{value:"#c5be00"},sport:{value:"#6398ab"},tempo:{value:"#ecb200"},"vie-pro":{value:"#b49b56"},infolocale:{value:"#4742ff"},gaming:{value:"#fa6ee5"},jeux:{value:"#4742ff"}}},Xt={base:{value:"Arial"},obviously:{value:"'Obviously', sans-serif"},"source-serif-pro":{value:"'Source Serif Pro', serif"}};Object.keys(Yt.primary),Object.keys(Yt.secondary),Object.keys(Yt.greyscale),Object.keys(Yt.status),Object.keys(Yt.theme);const er={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},tr={alignItems:["align-items"],alignContent:["align-content"],justifyContent:["justify-content"],gap:["gap"],gapX:["row-gap"],gapY:["col-gap"],inline:["inline"],direction:["direction"],wrap:["wrap"],flexGrow:["flex-grow"]},rr={radius:["border-radius"]},nr={p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},ir={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],...nr},or={...ir,borderColor:["border-color"],bg:["background-color"],color:["color"],...rr},ar={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]};Object.keys(Xt).filter(e=>!["base"].includes(e));const sr=Object.keys(Yt.theme);function lr(t){return e.forwardRef(t)}const cr=({src:e,format:t})=>e.replace(/%format/,t),ur=(e,t="fr-FR")=>Intl.NumberFormat(t).format(e);function dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fr,pr={exports:{}};
9
+ */function je(e,t,r){const n=document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n}function He(e,t,r){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof r?`${r}px`:r}const Ve="idle",Ue="loading",Ke="loaded",$e="error";function Ge(e,t,r=document){let n=[];if(e instanceof Element)n=[e];else if(e instanceof NodeList||Array.isArray(e))n=Array.from(e);else{const i="string"==typeof e?e:t;i&&(n=Array.from(r.querySelectorAll(i)))}return n}function We(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Ze{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class Qe{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,r=100){var n,i,o;this._filters[e]||(this._filters[e]=[]),null===(n=this._filters[e])||void 0===n||n.push({fn:t,priority:r}),null===(i=this._filters[e])||void 0===i||i.sort((e,t)=>e.priority-t.priority),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,r)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var r;return null===(r=this._filters[e])||void 0===r||r.forEach(e=>{t[0]=e.fn.apply(this,t)}),t[0]}on(e,t){var r,n;this._listeners[e]||(this._listeners[e]=[]),null===(r=this._listeners[e])||void 0===r||r.push(t),null===(n=this.pswp)||void 0===n||n.on(e,t)}off(e,t){var r;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),null===(r=this.pswp)||void 0===r||r.off(e,t)}dispatch(e,t){var r;if(this.pswp)return this.pswp.dispatch(e,t);const n=new Ze(e,t);return null===(r=this._listeners[e])||void 0===r||r.forEach(e=>{e.call(this,n)}),n}}class Je{constructor(e,t){if(this.element=je("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(He(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,r){let n=`translate3d(${e}px,0px,0)`;return void 0!==r&&(n+=` scale3d(${r},${r},1)`),n}(0,0,e/250)):He(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}}class Ye{constructor(e,t,r){this.instance=t,this.data=e,this.index=r,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Ve,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Je(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=je("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=je("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,r;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(t=this.data.src)&&void 0!==t?t:"",n.alt=null!==(r=this.data.alt)&&void 0!==r?r:"",this.state=Ue,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=Ke,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===Ke||this.state===$e)&&this.removePlaceholder())}onError(){this.state=$e,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Ue,this)}isError(){return this.state===$e}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(He(this.element,e,t),this.isImageContent()&&!this.isError()))){const r=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,r?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==$e,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,t;let r=je("pswp__error-msg","div");r.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",r=this.instance.applyFilters("contentErrorElement",r,this),this.element=je("pswp__content pswp__error-msg-container","div"),this.element.appendChild(r),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===$e)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||We())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!We()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===Ke||this.state===$e)&&this.removePlaceholder()))}}function Xe(e,t,r,n,i){let o=0;if(t.paddingFn)o=t.paddingFn(r,n,i)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}class et{constructor(e,t,r,n){this.pswp=n,this.options=e,this.itemData=t,this.index=r,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,r){const n={x:e,y:t};this.elementSize=n,this.panAreaSize=r;const i=r.x/n.x,o=r.y/n.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",r=this.options[t];if(r)return"function"==typeof r?r(this):"fill"===r?this.fill:"fit"===r?this.fit:Number(r)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function tt(e,t,r){const n=t.createContentFromData(e,r);let i;const{options:o}=t;if(o){let a;i=new et(o,e,-1),a=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const r=e.getViewportSizeFn(e,t);if(r)return r}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,t);const s=function(e,t,r,n){return{x:t.x-Xe("left",e,t,r,n)-Xe("right",e,t,r,n),y:t.y-Xe("top",e,t,r,n)-Xe("bottom",e,t,r,n)}}(o,a,e,r);i.update(n.width,n.height,s)}return n.lazyLoad(),i&&n.setDisplayedSize(Math.ceil(n.width*i.initial),Math.ceil(n.height*i.initial)),n}class rt extends Qe{getNumItems(){var e;let t=0;const r=null===(e=this.options)||void 0===e?void 0:e.dataSource;r&&"length"in r?t=r.length:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(t=r.items.length));const n=this.dispatch("numItems",{dataSource:r,numItems:t});return this.applyFilters("numItems",n.numItems,r)}createContentFromData(e,t){return new Ye(e,this,t)}getItemData(e){var t;const r=null===(t=this.options)||void 0===t?void 0:t.dataSource;let n={};Array.isArray(r)?n=r[e]:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),n=r.items[e]);let i=n;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,r;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(r=this.options)&&void 0!==r&&r.childSelector?Ge(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},r="A"===e.tagName?e:e.querySelector("a");if(r){t.src=r.dataset.pswpSrc||r.href,r.dataset.pswpSrcset&&(t.srcset=r.dataset.pswpSrcset),t.width=r.dataset.pswpWidth?parseInt(r.dataset.pswpWidth,10):0,t.height=r.dataset.pswpHeight?parseInt(r.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,r.dataset.pswpType&&(t.type=r.dataset.pswpType);const i=e.querySelector("img");var n;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(n=i.getAttribute("alt"))&&void 0!==n?n:"";(r.dataset.pswpCropped||r.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,r)}lazyLoadData(e,t){return tt(e,this,t)}}class nt extends rt{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ge(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if("button"in(t=e)&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||window.pswp)return;var t;let r={x:e.clientX,y:e.clientY};!r.x&&!r.y&&(r=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);const i={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,i,r))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,r=Ge(this.options.children,this.options.childSelector,e.currentTarget).findIndex(e=>e===t||e.contains(t));return-1!==r?r:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,r){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Ge(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=r,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:r}=this;t&&(r.dataSource=t);const n=[],i=typeof r.pswpModule;if("function"==typeof(o=r.pswpModule)&&o.prototype&&o.prototype.goTo)n.push(Promise.resolve(r.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");n.push(r.pswpModule())}var o;"function"==typeof r.openPromise&&n.push(r.openPromise()),!1!==r.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const r=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:r}).defaultPrevented)return tt(r,t,e)}(e,this));const a=++this._uid;Promise.all(n).then(e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,a)}})}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const r="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=r,window.pswp=r,Object.keys(this._listeners).forEach(e=>{var t;null===(t=this._listeners[e])||void 0===t||t.forEach(t=>{r.on(e,t)})}),Object.keys(this._filters).forEach(e=>{var t;null===(t=this._filters[e])||void 0===t||t.forEach(t=>{r.addFilter(e,t.fn,t.priority)})}),this._preloadedContent&&(r.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),r.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),r.init()}destroy(){var e;null===(e=this.pswp)||void 0===e||e.destroy(),this.shouldOpen=!1,this._listeners={},Ge(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const it=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar");if(!t)return;const{documentElement:r}=document;let n=r.scrollHeight-r.clientHeight;if(!n)return;const i=r.scrollTop;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const o=Math.round(i/n*100);t.style.width=`${o}%`,o>=100&&(t.style.width="100%")},ot="#page-content",at="#text-tooltip",st="c-text-tooltip--show",lt=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],ct=(e,t)=>e instanceof Element&&t.some(t=>e.matches(t)),ut=()=>{const e=document.querySelector(`${at}`);e&&e.classList.remove(st)},dt=({type:e})=>{const t=window.getSelection();if("selectionchange"===e)return void ut();if(!t||!t.rangeCount)return;const r=t.getRangeAt(0),n=t.toString().trim();if(n.length){const e=((e,t)=>{const r=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentElement,n=e.endContainer.nodeType===Node.ELEMENT_NODE?e.endContainer:e.endContainer.parentElement;return!!r&&ct(r,t)||!!n&&ct(n,t)})(r,lt),i=(e=>{var t;if(!e.focusNode)return null;const r=null==(t=e.anchorNode)?void 0:t.compareDocumentPosition(e.focusNode);return r?(4&r)>0:e.anchorOffset<e.focusOffset})(t)||!1;return void(e&&((e,t,r)=>{const n=document.querySelector(`${ot} ${at}`),i=document.querySelector(`${ot}`),o=document.querySelectorAll(`${ot} ${at} .tooltip-btn`);if(!n||!i)return void console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");Array.from(o).forEach(e=>e.setAttribute("data-selected-text",r));const a=e.getClientRects(),s=a[t?a.length-1:0];n.style.top=s.top-i.getBoundingClientRect().top-(n.offsetHeight+10)+"px",s.width<n.offsetWidth?n.style.left=s.left-i.getBoundingClientRect().left+s.width/2-n.offsetWidth/2+"px":n.style.left=t?s.left-i.getBoundingClientRect().left+s.width-n.offsetWidth+"px":s.left-i.getBoundingClientRect().left+"px",n.classList.add(st)})(r,i,n))}ut()},ft=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",e=>{(e=>{const{target:t}=e;if(t instanceof Element){const r=t.closest(".c-search-form--button");r&&(e.preventDefault(),r.classList.remove("c-search-form--button"))}})(e)})},pt=e=>"ArrowLeft"===e.code||39===e.keyCode,mt=e=>"ArrowRight"===e.code||37===e.keyCode,ht=(e=document.querySelectorAll(".js-tabs"))=>{e.length>0&&e.forEach(e=>{const t=e.querySelectorAll('[role="tab"]');t.forEach(t=>{t.addEventListener("click",t=>{(({tabsContainerElement:e,event:t})=>{t.preventDefault();const r=t.target;if(!(r instanceof HTMLButtonElement))return;const n=e.querySelectorAll('[role="tab"]'),i=e.querySelectorAll('[role="tabpanel"]'),o=r.getAttribute("aria-controls"),a=Object.values(i).find(e=>e.id===o);n.forEach(e=>{e.setAttribute("aria-selected","false")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),r.setAttribute("aria-selected","true"),a&&a.removeAttribute("aria-hidden")})({tabsContainerElement:e,event:t})})});const r=e.querySelector('[role="tablist"]');if(r&&t.length>0){let e=0;r.addEventListener("keydown",r=>{r instanceof KeyboardEvent&&(pt(r)||mt(r))&&(t[e].setAttribute("tabindex","-1"),pt(r)?(e+=1,e>=t.length&&(e=0)):mt(r)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())})}})},gt=e=>{const[t,r]=e.split("h").map(Number);return 60*t+r},vt=()=>{const e=new Date;return 60*e.getHours()+e.getMinutes()},bt=()=>{const e=document.querySelectorAll(".c-timeline__time");if(!e||e.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:r,currentIntervalEndTime:n,currentIntervalIndex:i}=(e=>{const t=vt();let r=null,n=null,i=-1;return Array.from(e).find((e,o,a)=>{if(o===a.length-1)return!1;const s=gt(e.textContent),l=gt(a[o+1].textContent);return t>=s&&t<l&&(r=e.textContent,n=a[o+1].textContent,i=o,!0)}),{currentIntervalStartTime:r,currentIntervalEndTime:n,currentIntervalIndex:i}})(e);if(!r||!n)return;const o=((e,t)=>{const r=vt();return r<e||r>t?0:(r-e)/(t-e)})(gt(r),gt(n));if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&e.length>=5){const e="172px / 2";switch(i){case 0:t.style.width=`calc(${e} + (((${e} + 25% - ${e} / 2) - ${e}) * ${o})`;break;case 1:t.style.width=`calc((${e} + 25% - ${e} / 2) + (((50%) - (${e} + 25% - ${e} / 2)) * ${o})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${e} / 2) - (50%)) * ${o})`;break;case 3:t.style.width=`calc((75% - ${e} / 2) + (((100% - ${e}) - (75% - ${e} / 2)) * ${o}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const e="45px / 2",a="20px";switch(i){case 0:case 1:case 2:case 3:t.style.width=`calc((${a} + ${e}) + (((60% + ${e}) - (${a} + ${e})) * ${o})`;break;default:t.style.width="0%"}if(1===i||2===i||3===i){const e=document.querySelectorAll(".c-timeline__time"),t=document.querySelectorAll(".c-timeline__event");e.length>0&&t.length>0&&(e[0].textContent=r,e[1].textContent=n,t[0].textContent=t[i].textContent,t[1].textContent=t[i+1].textContent)}}}},yt="c-icon-item__container--is-highlighted",_t=()=>{const e=document.querySelector(".c-toolbar");if(e){const t=window.location.origin+window.location.pathname,r=Array.from(e.querySelectorAll(".c-icon-item__container"));(e=>{const t=e.find(e=>e.classList.contains(yt));null==t||t.classList.remove(yt)})(r);const n=r.find(e=>{var r;return(null==(r=e.querySelector("a"))?void 0:r.getAttribute("href"))===t});null==n||n.classList.add(yt)}},wt=()=>{((e=document.querySelector(".js-expand-button"))=>{e&&document.querySelectorAll(".js-expand-button").forEach(e=>e.addEventListener("click",f))})(),ht(),l(),((e=document.querySelector(".js-ellipsis-button"))=>{e&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const t="true"===e.getAttribute("data-multiple");e.addEventListener("click",e=>d(e,t))})})(),document.querySelector(".c-progress")&&window.addEventListener("scroll",it),(()=>{let e=null;e=new nt({gallery:"#photoswipe-gallery",children:"a",pswpModule:ze,zoom:!1,imageClickAction:"next",tapAction:"next"}),e.on("uiRegister",()=>{var t,r;null==(r=null==(t=null==e?void 0:e.pswp)?void 0:t.ui)||r.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{var r;null==(r=null==e?void 0:e.pswp)||r.on("change",()=>{var r,n;const i=null==(n=null==(r=null==e?void 0:e.pswp)?void 0:r.currSlide)?void 0:n.data.element;if(i){const e=i.querySelector(".caption-content");t.innerHTML=(null==e?void 0:e.innerHTML)||""}})}})}),e.init()})(),document.querySelectorAll(".js-modal").forEach(e=>{if(!(e instanceof HTMLElement))return;const t=new T(e);if("dialog-menu"===e.id){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),r=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&r.length>0&&(t.on("show",()=>{e.forEach(e=>e.classList.add("u-hidden")),r.forEach(e=>e.classList.remove("u-hidden"))}),t.on("hide",()=>{e.forEach(e=>e.classList.remove("u-hidden")),r.forEach(e=>e.classList.add("u-hidden"))}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),ft(),((e,t)=>{const r=document.querySelector(`#${t}`);if(r){const t=r.querySelector(".js-countdown-days"),n=r.querySelector(".js-countdown-hours"),i=r.querySelector(".js-countdown-minutes"),o=r.querySelector(".js-countdown-seconds");if(!(t&&n&&i&&o))return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const a=window.counters[e],s=new Date(a).getTime(),l=setInterval(()=>{const e=(new Date).getTime(),r=s-e;if(r<=0)clearInterval(l);else{const e=Math.floor(r/864e5),a=Math.floor(r%864e5/36e5),s=Math.floor(r%36e5/6e4),l=Math.floor(r%6e4/1e3);t.innerHTML=e.toString(),n.innerHTML=a.toString(),i.innerHTML=s.toString(),o.innerHTML=l.toString()}},1e3)}})("paralympicsGames","countdown-paralympics-games"),null!=window&&window.getSelection?(document.addEventListener("mouseup",dt),document.addEventListener("selectionchange",dt),document.addEventListener("touchend",dt),document.addEventListener("touchcancel",dt)):console.warn("Selection API isn't supported"),(()=>{const e=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),r=document.querySelector(".js-close-article-btn"),n=document.querySelector(".c-header-mobile"),i=n instanceof HTMLElement?n.offsetHeight:0;if(e&&t&&r){const n=new IntersectionObserver(()=>{const n=r.classList,o=n.contains("u-hidden"),a=e.getBoundingClientRect().bottom-i,s=t.getBoundingClientRect().bottom-i;o&&a<=0&&s>=0&&n.remove("u-hidden"),!o&&(a>=0||s<=0)&&n.add("u-hidden")},{root:document,rootMargin:`-${i}px 0px 0px 0px`});n.observe(e),n.observe(t)}})(),(()=>{const e=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(e)){const e=t.querySelector(".c-half-donut"),r=t.querySelector(".c-legend");if(!e||!r)return;r.querySelectorAll("[data-color]").forEach(t=>{const n=t.getAttribute("data-color"),i=e.querySelector(`.c-half-donut__zone--${n}`);null==i||i.addEventListener("mouseenter",()=>{t.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),r.classList.add("c-legend--is-hovered")}),null==i||i.addEventListener("mouseleave",()=>{t.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),r.classList.remove("c-legend--is-hovered")}),t.addEventListener("mouseenter",()=>{null==i||i.classList.add("c-half-donut__zone--is-hovered"),r.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),t.addEventListener("mouseleave",()=>{null==i||i.classList.remove("c-half-donut__zone--is-hovered"),r.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}})(),u(),s("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),c(),_t(),(()=>{const e=document.querySelector("#js-election-selector");e&&e.addEventListener("change",e=>{window.location.replace(e.target.value)})})(),(()=>{const e=document.querySelector(".c-search-banner");if(e){const t=document.querySelector("#js-search-banner-to-hide"),r=e.querySelector("#js-search-banner-dropdown-btn");null==r||r.addEventListener("click",()=>{const e=r.querySelector("svg"),n=null==e?void 0:e.querySelector("use");switch(null==n?void 0:n.getAttribute("xlink:href")){case"#chevron-up":null==n||n.setAttribute("xlink:href","#chevron-down"),null==t||t.classList.add("u-hidden");break;case"#chevron-down":null==n||n.setAttribute("xlink:href","#chevron-up"),null==t||t.classList.remove("u-hidden")}})}})(),p(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:e}=t.dataset,{sliderAuto:r}=t.dataset,{sliderDelay:n}=t.dataset,i=n?parseInt(n,10):3e3,o=t.closest(".js-overview-bar-container"),a=null==o?void 0:o.querySelector(".c-stepper"),s=null==a?void 0:a.querySelectorAll(".c-stepper__item");if(t){const n=t.querySelector(".js-navigation-container__list"),o=t.querySelector(".o-nav-button--next-button"),l=t.querySelector(".o-nav-button--previous-button");if(n&&n.clientWidth<n.scrollWidth&&(null==o||o.classList.add("o-nav-button--visible"),null!=o&&o.classList.contains("c-slider__button-container--has-space-around")&&(n.style.width=`calc(100% - ${L})`)),n&&o&&l&&(null==o||o.addEventListener("click",P.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e})),null==l||l.addEventListener("click",O.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e,delay:i}))),"true"===r&&o){const e=a?a.querySelector(".c-stepper__item--loading"):null;s&&(s.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)}),e||s[0].classList.add("c-stepper__item--loading")),setInterval(()=>{o.classList.contains("o-nav-button--visible")?o.click():n&&l&&(n.scrollLeft=0,s&&(s.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e.classList.remove("c-stepper__item--loading"),e.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)},0)}),setTimeout(()=>{s[0].classList.add("c-stepper__item--loading")},0)),l.click())},i)}}}})(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e))if(t){const e=t.querySelector(".js-navigation-container__list"),r=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&r&&n&&window.addEventListener("resize",I.bind(!1,{navigatedList:e,nextBtn:r,prevBtn:n}))}})(),(()=>{const e=document.querySelector(".js-game-alert");i&&e&&e.classList.remove("u-hidden")})(),o(),bt(),((e={})=>{const{buttonSelector:t=".c-scroll-to-top"}=e,r=document.querySelector(t),n=null==r?void 0:r.querySelector("button");if(!r||!n)return;const i=r.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(r.dataset.triggerOffset||"0",10);r.style.display="none";const a=()=>{const e=document.querySelector(i);let t=!1;if(e){const r=e.getBoundingClientRect().top;t=window.pageYOffset>=r-o}else t=window.pageYOffset>300;r.style.display=t?"block":"none"};window.addEventListener("scroll",a),n.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})}),a()})()},Et="forward-disable-audience-measure",St="data-preferences-consent",xt=(e,t)=>{let r=null;if(e.id&&(r=document.querySelector(`label[for="${e.id}"]`)),r||(r=e.closest("label")),!r){const t=e.nextElementSibling;if(t&&"LABEL"===t.tagName&&t instanceof HTMLElement)r=t;else{const t=e.previousElementSibling;t&&"LABEL"===t.tagName&&t instanceof HTMLElement&&(r=t)}}const n=r?.querySelector("span")||r;n&&(n.textContent=t?"Mon droit d'opposition est respecté et aucune donnée personnelle supplémentaire n'est collectée":"Mes données de navigation sont collectées à des fins d'analyse statistique")};function Nt(){if(this?.id)try{const e=document.getElementById(this.id);if(e){const t=e.getAttribute("value");if(t){const e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}}}catch(e){console.error("Oops, unable to copy",e)}}const kt=e=>{const t=e.currentTarget;if(e.preventDefault(),t instanceof HTMLButtonElement){const e=t.parentNode?.querySelectorAll(".js-toggle-target");"true"===t.getAttribute("aria-expanded")?((e,t)=>{t?.forEach(e=>e.setAttribute("aria-hidden","true")),e.setAttribute("aria-expanded","false"),e.innerHTML="Voir tous les résultats"})(t,e):((e,t)=>{e.setAttribute("aria-expanded","true"),e.innerHTML="Masquer tous les résultats",t?.forEach(e=>e.setAttribute("aria-hidden","false"))})(t,e)}};var Ct=()=>{(()=>{const e=document.getElementById("goto-distribution"),t=document.getElementById("goto-european-map"),r=document.getElementById("goto-map"),n=document.getElementById("goto-statistics"),i=document.getElementById("goto-results");e&&e.addEventListener("click",Nt),t&&t.addEventListener("click",Nt),r&&r.addEventListener("click",Nt),n&&n.addEventListener("click",Nt),i&&i.addEventListener("click",Nt)})(),((e=document.querySelector(".js-toggle-button"))=>{e&&document.querySelectorAll(".js-toggle-button").forEach(e=>e.addEventListener("click",kt))})(),(()=>{const e=document.getElementById("elections-form-container"),t=document.querySelector(".c-header-mini"),r=document.querySelector('body[data-layout="mobile"]');e&&t&&new MutationObserver(t=>{const r=t[0],n=r.target;n instanceof HTMLElement&&"attributes"===r.type&&"class"===r.attributeName&&(n.className.includes("c-header-mini--is-hidden")?(e.classList.remove("u-sticky"),e.classList.remove("u-sticky--under-header-mini")):(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header-mini")))}).observe(t,{attributes:!0});r&&e&&(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header"))})()};const Tt=e=>{const t=document.cookie.split(";").filter(t=>-1!==t.indexOf(e))[0];return t?t.split("=")[1]:"{}"},At=function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},Lt=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Dt=(e,t)=>{let r=e.toLowerCase().replace(/[\s-]+/g,t??"-");return r=(e=>{let t=e;const r="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)t=t.replace(new RegExp(r.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return t})(r),r.replace(/[^\w-]+/g,"").replace(/-*$/g,"")},Pt=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,Ot=e=>{const t={click:Dt(e.name),click_chapter1:e?.chapter1||null,click_chapter2:e?.chapter2||null,click_chapter3:e?.chapter3||null},r=`click.${e.type}`;if(window.pa?(e.customProps&&Object.keys(e.customProps).length>0&&window.pa.setProperties(e.customProps,{persistent:!1,events:[r]}),window.pa.sendEvent(r,t)):window._paq&&(e.customProps&&Object.keys(e.customProps).length>0&&window._paq.push(["setProperties",e.customProps,{persistent:!1,events:[r]}]),window._paq.push(["sendEvent",r,t])),!window.edgee?.track)return;const n=document.getElementById("__EDGEE_DATA_LAYER__");let i={};if(n)try{const e=JSON.parse(n.textContent||"");e.data_collection.context=e.data_collection.context||{},i=e.data_collection.context.page?.properties||{}}catch{i={}}window.edgee.track({name:r,properties:{...i,click:t.click,click_chapter1:t.click_chapter1,click_chapter2:t.click_chapter2,click_chapter3:t.click_chapter3,click_type:e?.type??"navigation",...e.customProps}},{"edgee/piano-analytics":!0})},It=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}]),window.edgee?.page&&!1!==e?.enableEdgee&&window.edgee.page()},Mt=()=>{"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("div#local-news-container div.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"local_news_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})},qt=()=>{window.datalayerInfo?.pageName&&["article","live"].includes(window.datalayerInfo?.pageName)&&document.querySelectorAll("div.c-tabpanel article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"most_read_content",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:t,cta_engagement:1},chapter1:"widget"}),window.location.href=t})})};var Rt=()=>{"guide-achat"===window.datalayerInfo?.subType&&document.querySelectorAll(".c-content a.c-btn").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),Ot({name:"affiliation",type:"action",chapter1:"guide_achat"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})}),"article"===window.datalayerInfo?.pageName&&document.querySelectorAll("footer article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"read_also",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),document.querySelectorAll('div[data-event-name="mbrs-game-save-favorite"]').forEach(e=>{e.addEventListener("click",()=>{Ot({name:"favorite",type:"action",customProps:{cta_context:"home_game",cta_type:"picto",cta_engagement:1}})})}),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("#featured-tag .c-card-container--clickable h3 a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"brief_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),document.querySelectorAll(".c-flink-related-content a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="",r="";e.target instanceof HTMLAnchorElement&&(t=e.target.href,r=e.target.target),Ot({name:"to_discover",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:t,cta_engagement:2},chapter1:"flink"}),"_blank"===r?window.open(t,"_blank","noopener"):window.location.href=t})}),(()=>{if(window.datalayerInfo?.pageName&&["game","gamehome"].includes(window.datalayerInfo?.pageName)){let e=document.querySelectorAll("main#page-wrap div.c-collapse__content a");"desktop"===window.layout&&(e=document.querySelectorAll("header.c-header-page div.c-collapse__content a")),e.forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement&&(t=e.target.href),Ot({name:"view_all_games",type:"action",customProps:{cta_context:"home_game",cta_type:"link",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),document.querySelectorAll(".c-slider__list a.c-tags--primary").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement&&(t=e.target.href),Ot({name:"game",type:"action",customProps:{cta_context:"breadcrumb",cta_type:"link",cta_destination:t,cta_engagement:1}}),window.location.href=t})})}})(),(()=>{const e=document.querySelector(".c-header-page__print-button");e&&e.addEventListener("click",()=>{Ot({name:"print",type:"action",customProps:{cta_context:"game",cta_type:"picto",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{let e=document.querySelector("article.c-card-large a");"mobile"===window.layout&&(e=document.querySelector("article.c-card-extra-large a")),e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"headline_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})(),window.datalayerInfo?.pageName&&["home","tag"].includes(window.datalayerInfo?.pageName)&&(document.querySelectorAll("div.c-icon-item__container--is-clickable a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:(e.target instanceof HTMLElement||e.target instanceof SVGElement)&&(t=e.target.closest("a")?.href||""),Ot({name:"comment_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),document.querySelectorAll('div.c-icon-item__container--is-clickable[data-event-name="mbrs-social-save-content"]').forEach(e=>{e.addEventListener("click",()=>{Ot({name:"save_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:window.location.href,cta_engagement:3}})})})),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll(".c-carousel__movies--in-long-list a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="",r="";e.target instanceof HTMLAnchorElement?(r=e.target.href,t=e.target.closest("section.c-carousel")?.querySelector("h2")?.textContent||""):e.target instanceof Element&&(r=e.target.closest("a")?.href||"",t=e.target.closest("section.c-carousel")?.querySelector("h2")?.textContent||"");let n="";switch(t){case"Idées de sorties à Paris":n="ticketNunc_content";break;case"On regarde quoi ce soir ?":n="program_tv_content";break;default:n="cinema_content"}Ot({name:n,type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:r,cta_engagement:1}}),window.location.href=r})}),[{name:"games",id:"#entertainment-item-game"},{name:"horoscope",id:"#entertainment-item-horoscope"}].forEach(e=>{const t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener("click",r=>{r.stopPropagation(),r.preventDefault(),Ot({name:e.name,type:"action",customProps:{cta_context:"widget_entertainment",cta_type:"link_with_icon",cta_destination:t.href,cta_engagement:2}}),window.location.href=t.href})}),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("#tabpanel-le-direct article.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"live",type:"action",customProps:{cta_context:"home",cta_type:"link",cta_destination:window.location.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=document.querySelector("#tab-resume");e&&e.addEventListener("click",()=>{Ot({name:"context",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})});const t=document.querySelector("#tab-temps-forts");t&&t.addEventListener("click",()=>{Ot({name:"highlights",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})})})(),Mt(),document.querySelectorAll("a.c-header-mobile__logo, a.c-header__logo, .c-header-mobile__logo a.c-link, .c-header__logo a.c-link, .c-header-mini__container > div:not(.c-header-mini__content) a.c-link").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"logo",type:"action",customProps:{cta_context:"header",cta_type:"image",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),(()=>{const e=(e,t,r)=>{let n="";r.target instanceof HTMLAnchorElement?n=r.target.href:r.target instanceof Element&&(n=r.target.closest("a")?.href||""),n&&(r.stopPropagation(),r.preventDefault(),Ot({name:t,type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:n,cta_engagement:1}}),"_blank"===e.target?window.open(n,"_blank")?.focus():window.location.href=n)};document.querySelectorAll(".c-header__container a.c-media-link").forEach(t=>{switch(t.title){case"Consulter la page 20 Minutes TV live":t.addEventListener("click",r=>{e(t,"20mn_tv",r)});break;case"Consulter la page 20 Minutes TV":t.addEventListener("click",r=>{e(t,"videos",r)})}})})(),qt(),document.querySelectorAll(".c-overview-bar__article a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"summary_banner",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),document.querySelectorAll("div.c-read-also-banner a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof Element&&(t=e.target.closest("a")?.href||""),Ot({name:"read_also_banner",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2},chapter1:"banner"}),window.location.href=t})}),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),Ot({name:"recrutement",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})})(),"desktop"===window.layout&&document.querySelectorAll("li.c-header__link-and-submenu-container a.c-header__link").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"section_tag",type:"action",customProps:{cta_context:"header",cta_type:"link",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=document.querySelector('.c-social-bar a[href="#mbrs-comments-container"]');e&&e.addEventListener("click",()=>{Ot({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})});const t=document.querySelector("#mbrs-social-comment-container");t&&t.addEventListener("click",()=>{Ot({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector(".c-social-bar div.mbrs-social-report-container");e&&e.addEventListener("click",()=>{Ot({name:"content_correction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector('.c-social-bar div[data-event-name="mbrs-social-save-content"]');e&&e.addEventListener("click",()=>{Ot({name:"save_content",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),document.querySelectorAll("div.c-sub-menu__right a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Ot({name:"content",type:"action",customProps:{cta_context:"sub_nav",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),Ot({name:e,type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:"home"===e?window.location.href:r,cta_engagement:1}}),window.location.href=r)};document.querySelectorAll(".c-toolbar a").forEach(t=>{const r=t.nextSibling;if(r instanceof HTMLParagraphElement)switch(r.innerText){case"À la Une":t.addEventListener("click",t=>{e("home",t)});break;case"Le Direct":t.addEventListener("click",t=>{e("live_feed",t)});break;case"Jeux":t.addEventListener("click",t=>{e("games",t)})}});const t=document.querySelector(".c-toolbar div.dtk-videofeed");t&&t.addEventListener("click",()=>{Ot({name:"video_feed",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),Ot({name:e,type:"action",customProps:{cta_context:"menu",cta_destination:r,cta_engagement:1,cta_type:"button"}}),window.location.href=r)};document.querySelectorAll("a.c-menu__tiles-items").forEach(t=>{switch(t.innerText){case"Jeux":t.addEventListener("click",t=>{e("games",t)});break;case"Horoscope":t.addEventListener("click",t=>{e("horoscope",t)})}})})()},Ft=(e=>(e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.ARTICLE="article",e.CONTACT="contact",e.DIRECT="direct",e.ELECTIONS="elections",e.ELECTIONSHOME="electionshome",e.GAME="game",e.GAME_APP="gameapp",e.GAMEHOME="gamehome",e.HOME="home",e.HOROSCOPE="horoscope",e.HOROSCOPE_HOME="horoscopehome",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.JOURNALIST="journalist",e.LA21E="la21e",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.LIVE="live",e.MOBILE_APPS="mobileapps",e.MOST_COMMENTED="mostcommented",e.MOST_READ="mostread",e.MOST_SHARED="mostshared",e.MOST_VIEWED="mostviewed",e.MOVIES="movies",e.NEWS="news",e.PARTNER="partner",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.SITEMAP="sitemap",e.SPORT="sport",e.STORY="story",e.TAG="tag",e.TRAFFIC="traffic",e.TV_HOME="tvhome",e.TV_LIVE="tvlive",e.TV_MOST_RECENT="tvmostrecent",e.TV_MOST_VIEWED="tvmostviewed",e.TV_SHOW="tvshow",e.TV_SHOWS="tvshows",e.TV_VIDEO="tvvideo",e.WEATHER="weather",e))(Ft||{}),Bt=(e=>(e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.ARTICLE="article",e.CONTACT="contact",e.DIRECT="direct",e.ELECTIONS="elections",e.ELECTIONSHOME="electionshome",e.GAME="game",e.GAME_APP="gameapp",e.GAMEHOME="gamehome",e.HOME="home",e.HOROSCOPE="horoscope",e.HOROSCOPE_HOME="horoscopehome",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.JOURNALIST="journalist",e.LA21E="la21e",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.LIVE="live",e.MOBILE_APPS="mobileapps",e.MOST_COMMENTED="mostcommented",e.MOST_READ="mostread",e.MOST_SHARED="mostshared",e.MOST_VIEWED="mostviewed",e.MOVIES="movies",e.NEWS="news",e.PARTNER="partner",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.SITEMAP="sitemap",e.SPORT="sport",e.STORY="story",e.TAG="tag",e.TRAFFIC="traffic",e.TV_HOME="tvhome",e.TV_LIVE="tvlive",e.TV_MOST_RECENT="tvmostrecent",e.TV_MOST_VIEWED="tvmostviewed",e.TV_SHOW="tvshow",e.TV_SHOWS="tvshows",e.TV_VIDEO="tvvideo",e.WEATHER="weather",e))(Bt||{}),zt=(e=>(e.POOOL_ACCESS="poool-access",e.POOOL_ENGAGE="poool-engage",e.AUDION="audion",e.GOOGLE_SEARCH="google-search",e.DIGITEKA_VISIBLE_PLAYER="digiteka-visible-player",e.DIGITEKA_VIDEO_FEED="digiteka-video-feed",e.IDALGO="idalgo",e.NONLI="nonli",e.TABOOLA="taboola-sdk",e.MEDIEGO="mediego",e))(zt||{});var jt=()=>{(()=>{const e=document.getElementById("dialog-menu");e&&"mobile"===window.layout&&e.addEventListener("show",()=>{It({name:"menu",chapter1:"menu",chapter2:""})})})(),(()=>{const e=document.getElementById("dialog-comment");if(e&&"mobile"===window.layout){const{datalayerInfo:t={}}=window;e.addEventListener("show",()=>{It({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:"commentaires"})})}})(),(()=>{if(window.datalayerInfo?.pageName!==Bt.STORY||!window.history)return;const e=[],t=new IntersectionObserver(t=>{t.forEach(t=>{if(!t.isIntersecting)return;const r=t.target.getAttribute("id");r&&t.intersectionRatio>=0&&(e.includes(r)||(e.push(r),It({name:`${window.PianoPageInfo?.name}-${e.length}`})),window.history.pushState({},"",`#${r}`))})},{rootMargin:"-70px 0px -25% 0px"});document.querySelectorAll(".u-story-container").forEach(e=>{t.observe(e)})})()};const Ht=e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>r(t)),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,r])=>{t.setAttribute(`data-${Lt(e)}`,r)}),"head"===e.target&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))},Vt=(e,t)=>{const r=window.thirdPartiesConfig?.conditional?.find(t=>Dt(t.name)===e);if(!r)throw new Error(`Script with name ${e} not found`);(e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>r(t)),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,r])=>{t.setAttribute(`data-${Lt(e)}`,r)}),"head"===e.target&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))})({...r,...t})},Ut=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,(e=>(t,r)=>{if(!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus)console.error("Issue with mediego callback");else{if(e.getCurrentUserStatus().purposes.cookies?.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled)try{Vt(zt.MEDIEGO)}catch(e){e instanceof Error&&console.error(e.message)}window.__tcfapi("removeEventListener",2,null,t.listenerId)}})(e)))},Kt=()=>{if(/Android/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-android"),document.body.appendChild(e)}else if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-ios"),document.body.appendChild(e)}},$t=e=>(t,r)=>{!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus?console.error("Issue with poool callback"):(e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled||"article"!==window.datalayerInfo?.pageName||["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo?.subType||"")||(e=>{try{Vt(zt.POOOL_ACCESS)}catch(e){e instanceof Error&&console.error(e.message)}const t=document.querySelector('[src="https://static.20mn.fr/apps/poool/access.min.js"]');t?.addEventListener("load",()=>{const t=document.querySelector(".c-content"),r=document.createElement("div");r.setAttribute("id","paywall"),t?.parentNode?.insertBefore(r,t.nextSibling);const n=window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config("locale","fr",!0).config({cookies_enabled:e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled,debug:!0,context:"cookie-wall",default_widget:"gift",app_name:"Poool"}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0);n.on("consent",()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3),localStorage.setItem("consent_validity_date",e.toISOString().split("T")[0]),window.Didomi.setUserAgreeToAll()});let i=!1;const o=document.querySelector("#cookie-banner");window.didomiEventListeners.push({event:"notice.hidden",listener(){window.didomiOnReady.push(e=>{i||(i=!0,n.config("cookies_enabled",e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled),o&&o.setAttribute("style","position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))})}}),window.didomiOnReady.push(e=>{const t=e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled;t&&(n.config("cookies_enabled",!0),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))}),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"})})})(e),(()=>{try{Vt(zt.POOOL_ENGAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=Tt("20mnUserInfo");Kt();const t=document.querySelector('[src="https://assets.poool.fr/engage.min.js"]'),r=JSON.parse(decodeURIComponent(e?.replace(/'/g,'"')||"")).newsletters_registration??[];t?.addEventListener("load",()=>{const t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init("C7B0O-ENPDW-DIJOO-VJO1M").autoCreate({filters:["{}"!==e?"connected":"disconnected",...r]})})})(),window.__tcfapi("removeEventListener",2,null,t.listenerId))},Gt=()=>{document.querySelectorAll(".taboola").length>0&&(()=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{if(!t||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus)console.error("Issue with taboola callback");else{window._taboola=window._taboola||[],"article"===window.datalayerInfo?.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"});try{Vt(zt.TABOOLA,{dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}})}catch(e){e instanceof Error&&console.error(e.message)}document.querySelectorAll(".taboola").forEach(e=>{const t=e.getAttribute("data-mode"),r=e.getAttribute("id"),n=e.getAttribute("data-placement"),i=e.getAttribute("data-target-type");t&&r&&n&&i?window._taboola.push({mode:t,container:r,placement:n,target_type:i}):console.log("Issue with taboola placement")}),window._taboola.push({flush:!0}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)}};window.didomiOnReady.push(()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)})})()};var Wt=()=>{(()=>{const e=document.querySelector(".js-close-article-btn");e&&window?.location&&window?.envVariables?.pageEndpoint&&e.addEventListener("click",()=>{Ot({name:"close_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:"home",cta_engagement:1}}),window.location.assign(window.envVariables.pageEndpoint)})})()};const Zt=async({url:e,options:t})=>{const r=t||{};r.headers=r.headers||new Headers,r.headers.append("Content-Type","application/json");const n=await fetch(e,r).then(e=>{if(e.ok)return e;throw new Error(`Fetch error: ${e.statusText}`)}).then(e=>e.json());return Object.keys(n).includes("data")?n.data:n};var Qt=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(Qt||{}),Jt=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(Jt||{});const Yt={primary:{ultramarine:{value:"#4742ff"},"ultramarine-light":{value:"#6b72fb"}},secondary:{orange:{value:"#fa9917"},yellow:{value:"#f2e500"},green:{value:"#6a9f4f"},purple:{value:"#ae6ba2"},red:{value:"#dc0e19"},scarlet:{value:"#ff3f3f"},blue:{value:"#0000ff"},"blue-grey":{value:"#253548"},"blue-dark":{value:"#16202b"},pink:{value:"#ef2a82"},sponsoring:{value:"#fff5f1"},"blue-light":{value:"#d4ecfb"}},greyscale:{black:{value:"#000000"},white:{value:"#ffffff"},"grey-50":{value:"#fffffe"},"grey-100":{value:"#f7f7f7"},"grey-200":{value:"#dddddd"},"grey-300":{value:"#898a8c"},"grey-400":{value:"#6a6a6a"},"grey-500":{value:"#484848"},"grey-600":{value:"#2f3134"},"grey-700":{value:"#181a1e"},"grey-800":{value:"#101d25"},"grey-900":{value:"#0f1115"}},status:{warning:{value:"#fa9917"},error:{value:"#dc0e19"},success:{value:"#6a9f4f"}},theme:{conso:{value:"#ff8689"},default:{value:"#4742ff"},entertainment:{value:"#9d61ff"},hightech:{value:"#8f98a9"},media:{value:"#4742ff"},"partenaires-externes":{value:"#4742ff"},partner:{value:"#fd8000"},planet:{value:"#00b482"},production:{value:"#c5be00"},publicommunique:{value:"#c5be00"},publishing:{value:"#c5be00"},sport:{value:"#6398ab"},tempo:{value:"#ecb200"},"vie-pro":{value:"#b49b56"},infolocale:{value:"#4742ff"},gaming:{value:"#fa6ee5"},jeux:{value:"#4742ff"}}},Xt={base:{value:"Arial"},obviously:{value:"'Obviously', sans-serif"},"source-serif-pro":{value:"'Source Serif Pro', serif"}};Object.keys(Yt.primary),Object.keys(Yt.secondary),Object.keys(Yt.greyscale),Object.keys(Yt.status),Object.keys(Yt.theme);const er={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},tr={alignItems:["align-items"],alignContent:["align-content"],justifyContent:["justify-content"],gap:["gap"],gapX:["row-gap"],gapY:["col-gap"],inline:["inline"],direction:["direction"],wrap:["wrap"],flexGrow:["flex-grow"]},rr={radius:["border-radius"]},nr={p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},ir={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],...nr},or={...ir,borderColor:["border-color"],bg:["background-color"],color:["color"],...rr},ar={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]};Object.keys(Xt).filter(e=>!["base"].includes(e));const sr=Object.keys(Yt.theme);function lr(t){return e.forwardRef(t)}const cr=({src:e,format:t})=>e.replace(/%format/,t),ur=(e,t="fr-FR")=>Intl.NumberFormat(t).format(e);function dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fr,pr={exports:{}};
10
10
  /*!
11
11
  Copyright (c) 2018 Jed Watson.
12
12
  Licensed under the MIT License (MIT), see
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@20minutes/tyr",
3
- "version": "2.29.10",
3
+ "version": "2.29.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/20minutes/tyr.git"