@20minutes/tyr 2.29.4 → 2.29.5

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.
@@ -3,5 +3,5 @@
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */var I,R=(C||(C=1,I=T,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var a in r)e.call(r,a)&&r[a]&&(o=n(o,a));return o}function n(e,t){return t?e?e+" "+t:e+t:e}I.exports?(t.default=t,I.exports=t):window.classNames=t}()),T.exports);const $=k(R);var j="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Button/Button.tsx";const A=O(({as:e="button",variant:t="primary",children:r,iconProps:n,counter:o,isCentered:a=!1,isSquare:i=!1,isLoading:s=!1,size:l,...c},u)=>_.createElement(Y,{...c,as:e,ref:u,alignItems:"center",justifyContent:"center",gap:"xxs",inline:"link"===t||"a"===e,radius:i?"0":void 0,className:$("c-btn",{[`c-btn--${t}`]:t,[`c-btn--${l}`]:l,"c-btn--is-centered":a,"c-btn--is-loading":s},null==c?void 0:c.className),__self:void 0,__source:{fileName:j,lineNumber:57,columnNumber:5}},n&&_.createElement(L,{...n,__self:void 0,__source:{fileName:j,lineNumber:79,columnNumber:21}}),r,(0===o||o)&&_.createElement(Y,{justifyContent:"center",alignItems:"center",color:"grey-900",bg:"white",px:"xxs",radius:"s",className:"c-btn__counter",__self:void 0,__source:{fileName:j,lineNumber:82,columnNumber:9}},o)));A.displayName="Button";var P="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Divider/Divider.tsx";O(({text:e,color:t="black",thickness:r="thin",...n},o)=>{const a=_.createElement(J,{bg:t,align:"center",className:$("c-divider__line",{[`c-divider__line--${r}`]:"thin"!==r}),__self:void 0,__source:{fileName:P,lineNumber:15,columnNumber:7}});return _.createElement(Y,{...n,ref:o,className:$("c-divider",{"c-divider--has-text":!!e},null==n?void 0:n.className),__self:void 0,__source:{fileName:P,lineNumber:25,columnNumber:7}},e?_.createElement(_.Fragment,null,a,_.createElement(J,{px:"xxs-2",className:"c-divider__text",__self:void 0,__source:{fileName:P,lineNumber:37,columnNumber:13}},_.createElement(re,{size:"xxs",color:t,textTransform:"uppercase",__self:void 0,__source:{fileName:P,lineNumber:38,columnNumber:15}},e)),a):a)});O(({color:e="black",thickness:t="thin",...r},n)=>_.createElement(W,{...r,ref:n,bg:e,className:$("c-divider-vertical",{[`c-divider-vertical--${t}`]:"thin"!==t},null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/DividerVertical/DividerVertical.tsx",lineNumber:13,columnNumber:5}}));var V="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Icon/Icon.tsx";const L=O(({name:e,size:t=28,isRounded:r=!1,border:n,rotation:o,svgTitle:a,...i},s)=>{const l=Array.isArray(t)?null==t?void 0:t[0]:t,c=Array.isArray(t)?null==t?void 0:t[1]:t;return _.createElement(W,{...i,ref:s,className:$("c-icon",{[`c-icon--has-border-${n}`]:n,"c-icon--is-rounded":r,[`c-icon--${o}`]:o},null==i?void 0:i.className),__self:void 0,__source:{fileName:V,lineNumber:28,columnNumber:7}},_.createElement("svg",{width:l,height:c,__self:void 0,__source:{fileName:V,lineNumber:41,columnNumber:9}},a&&_.createElement("title",{__self:void 0,__source:{fileName:V,lineNumber:42,columnNumber:24}},a),"circle"===e?_.createElement("circle",{__self:void 0,__source:{fileName:V,lineNumber:43,columnNumber:32}}):_.createElement("use",{xlinkHref:`#${e}`,__self:void 0,__source:{fileName:V,lineNumber:43,columnNumber:45}})))});var M="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Input/Input.tsx";O(({id:e,className:t,color:r,required:n,label:o,icon:a,positionIcon:i="right",isIconButton:s=!1,iconButtonProps:l,variant:c,msg:u,containerProps:m,isRounded:d,isTransparent:f,isLarge:p,children:b,hint:v,error:N,...h},y)=>{const g=a&&_.createElement(A,{className:"c-input-container__icon",iconProps:{name:a,size:18},variant:"ghost",color:r||"black",...l,__self:void 0,__source:{fileName:M,lineNumber:50,columnNumber:7}}),w=a&&_.createElement(L,{className:"c-input-container__icon",name:a,size:18,color:r||"black",__self:void 0,__source:{fileName:M,lineNumber:63,columnNumber:7}});return _.createElement(Y,{direction:"column",...m,className:$("c-input",null==m?void 0:m.className),__self:void 0,__source:{fileName:M,lineNumber:67,columnNumber:7}},o&&_.createElement("label",{htmlFor:e,className:"c-input__label",__self:void 0,__source:{fileName:M,lineNumber:73,columnNumber:11}},o,n&&_.createElement(re,{as:"span",size:"xxs",weight:"regular",__self:void 0,__source:{fileName:M,lineNumber:76,columnNumber:15}}," ","(obligatoire)")),v&&_.createElement(re,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",__self:void 0,__source:{fileName:M,lineNumber:84,columnNumber:11}},v),_.createElement(Y,{gap:a&&b?"xs":void 0,className:$("c-input-container",{[`c-input-container--${c}`]:c,"c-input-container--rounded":d,"c-input-container--transparent":f,"c-input-container--large":p,[`c-input-container--${i}`]:a||b}),__self:void 0,__source:{fileName:M,lineNumber:88,columnNumber:9}},(a||b)&&_.createElement(Y,{gap:"s",__self:void 0,__source:{fileName:M,lineNumber:99,columnNumber:13}},s?g:w,b),_.createElement("input",{id:e,className:$("c-input-container__input",t),required:n,ref:y,"aria-describedby":[v?`${e}-hint`:null,N?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...h,__self:void 0,__source:{fileName:M,lineNumber:104,columnNumber:11}})),u&&u.length&&_.createElement(Y,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",__self:void 0,__source:{fileName:M,lineNumber:118,columnNumber:11}},u.map(({iconProps:e,textProps:t,value:r},n)=>_.createElement(Y,{key:null==n?void 0:n.toString(),alignItems:"center",gap:"xxs",__self:void 0,__source:{fileName:M,lineNumber:120,columnNumber:15}},e&&_.createElement(L,{...e,__self:void 0,__source:{fileName:M,lineNumber:121,columnNumber:31}}),_.createElement(re,{dangerouslySetInnerHTML:{__html:r},role:"alert",...t,__self:void 0,__source:{fileName:M,lineNumber:122,columnNumber:17}})))),N&&_.createElement(re,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",__self:void 0,__source:{fileName:M,lineNumber:128,columnNumber:11}},N))});const D=e=>{if(void 0!==e.propValue){if("boolean"!=typeof e.propValue){const t=(e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase())("number"==typeof e.propValue?e.propValue.toString():e.propValue);return e.className?`${e.className}-${t}@${e.defaultModifier}`:`${t}@${e.defaultModifier}`}if(!e.className)throw new Error('It is necessary to define the argument "className" !');return`${e.className}@${e.defaultModifier}`}},B=e=>{if(e.propValue&&["boolean","string","number"].includes(typeof e.propValue)||!e.propValue){const t=D({className:e.className,defaultModifier:e.defaultModifier||"xs",propValue:e.propValue});return t?[t]:[]}return Object.entries(e.propValue).reduce((t,[r,n])=>{const o=D({className:e.className,defaultModifier:r,propValue:n});return o&&t.push(o),t},[])},z=e=>"object"==typeof e.props?Object.keys(e.props).reduce((t,r)=>(e.systemPropNames.includes(r)||(t[r]=e.props[r]),t),{}):{},q=e=>$(Object.entries(e).filter(([e])=>Object.keys(E).includes(e)).reduce((e,[t,r])=>(e.push(...B({className:t,propValue:r})),e),[])),H=({textAlign:e,weight:t,textTransform:r,textDecoration:n,italic:o,fontFamily:a,whiteSpace:i})=>$(B({className:"text",propValue:e}),B({className:"font-weight",propValue:t}),{[`white-space-${i}`]:!!i,[`text-transform-${r}`]:!!r,[`text-decoration-${n}`]:!!n,"text-italic":!!o,[`font-${a}`]:!!a}),U=e=>$(q(e),(e=>$({[`bg-${e.bg}`]:e.bg,[`color-${e.color}`]:e.color,[`border-color-${e.borderColor}`]:e.borderColor}))(e),(e=>$(Object.entries(e).filter(([e])=>Object.keys(g).includes(e)).reduce((e,[t,r])=>(e.push(...B({className:t,propValue:r})),e),[])))(e)),F=({inline:e=!1,direction:t,wrap:r,...n})=>$(...B({propValue:e,className:e?"inline-flex":"flex"}),...B({propValue:t,className:"direction"}),...B({propValue:r}),(e=>$(...B({propValue:e.alignItems,className:"items"}),...B({propValue:e.alignContent,className:"content"}),...B({propValue:e.justifyContent,className:"justify"}),...B({propValue:e.gap,className:"gap"}),...B({propValue:e.gapX,className:"gap-x"}),...B({propValue:e.gapY,className:"gap-y"}),...B({propValue:e.flexGrow,className:"grow"})))(n)),G=({basis:e,shrink:t,grow:r,...n})=>$(...B({propValue:e,className:"basis"}),...B({propValue:t,className:"shrink"}),...B({propValue:r,className:"grow"}),(e=>$(...B({propValue:e.align,className:"self"})))(n));const W=O(({as:e="div",children:t,...r},n)=>_.createElement(e,{...z({props:r,systemPropNames:Object.keys(x)}),ref:n,className:$(U(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Layout/Box/Box.tsx",lineNumber:13,columnNumber:3}},t));W.displayName="Box";const Y=O(({as:e="div",children:t,...r},n)=>_.createElement(W,{...z({props:r,systemPropNames:Object.keys(y)}),as:e,ref:n,className:$(F(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Layout/Flex/Flex.tsx",lineNumber:12,columnNumber:3}},t));const J=O(({as:e="div",children:t,...r},n)=>_.createElement(W,{...z({props:r,systemPropNames:Object.keys(h)}),as:e,ref:n,className:$(G(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Layout/Flex/FlexItem/FlexItem.tsx",lineNumber:13,columnNumber:5}},t));O(({as:e="a",children:t,color:r,size:n,variant:o,weight:a,whiteSpace:i,tabIsSelected:s,tabVariant:l,tabColor:c,defaultColor:u="ultramarine",isUnderlined:m,...d},f)=>{if(o&&r)throw new Error("You can't use color and variant props together");const p=l||c?$("c-tab",{[`c-tab--${l}`]:l,[`c-tab--${c}`]:c,"c-tab--selected":s,"c-tab--unselected":!s},H({weight:a,whiteSpace:i}),null==d?void 0:d.className):$("c-link",{[`c-btn c-btn--${o}`]:o&&!r},H({weight:a,whiteSpace:i}),B({className:"text",propValue:n}),{"c-link--is-underlined":m},null==d?void 0:d.className);return _.createElement(W,{...d,as:e,ref:f,...!l&&!c&&{color:o?void 0:r||("inherit"===u?void 0:u)},className:p,__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Link/Link.tsx",lineNumber:79,columnNumber:7}},t)});var X="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/ScrollProgressBar/ScrollProgressBar.tsx";O(({variant:e,progressColor:t="ultramarine"},r)=>_.createElement(W,{ref:r,bg:"grey-100",className:$("c-progress",{[`c-progress--${e}`]:e}),__self:void 0,__source:{fileName:X,lineNumber:14,columnNumber:5}},_.createElement(W,{className:"c-progress__bar",bg:t,style:{width:"0%"},__self:void 0,__source:{fileName:X,lineNumber:19,columnNumber:7}})));var Z="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Select/Select.tsx";O(({id:e,className:t,required:r,label:n,defaultValue:o,options:a,placeholder:i,containerProps:s,variant:l="default",icon:c,isLarge:u,hint:m,error:d,...f},p)=>{var b,v;return _.createElement(Y,{...s,ref:p,direction:"column",className:$("c-select",null==s?void 0:s.className),__self:void 0,__source:{fileName:Z,lineNumber:48,columnNumber:5}},n&&_.createElement("label",{htmlFor:e,className:"c-select__label",__self:void 0,__source:{fileName:Z,lineNumber:55,columnNumber:9}},n,r&&_.createElement(re,{as:"span",size:"xxs",weight:"regular",__self:void 0,__source:{fileName:Z,lineNumber:58,columnNumber:13}}," ","(obligatoire)")),m&&_.createElement(re,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",__self:void 0,__source:{fileName:Z,lineNumber:66,columnNumber:9}},m),_.createElement("div",{className:"c-select__container",__self:void 0,__source:{fileName:Z,lineNumber:70,columnNumber:7}},c&&_.createElement(L,{className:"c-select__icon",name:c,size:18,__self:void 0,__source:{fileName:Z,lineNumber:71,columnNumber:18}}),_.createElement(L,{className:`c-select__caret c-select__caret--${l}`,name:"arrow",size:12,__self:void 0,__source:{fileName:Z,lineNumber:72,columnNumber:9}}),_.createElement("select",{id:e,className:$("c-select__select",`c-select__select--${l}`,{"c-select__select--has-icon":!!c},{"c-select__select--large":u},q(f),t),required:r,defaultValue:o||(null==(v=null==(b=a.filter(e=>e.isSelected))?void 0:b.pop())?void 0:v.value)||"","aria-describedby":[m?`${e}-hint`:null,d?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...z({props:f,systemPropNames:Object.keys(w)}),__self:void 0,__source:{fileName:Z,lineNumber:73,columnNumber:9}},i&&_.createElement("option",{value:"",disabled:!0,hidden:!0,__self:void 0,__source:{fileName:Z,lineNumber:97,columnNumber:13}},i),a.map(e=>_.createElement("option",{key:e.value,value:e.value,__self:void 0,__source:{fileName:Z,lineNumber:102,columnNumber:13}},e.title)))),d&&_.createElement(re,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",__self:void 0,__source:{fileName:Z,lineNumber:109,columnNumber:9}},d))});var K="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Slider/Slider.tsx";O(({layout:e,children:t,itemsGap:r,hasSpaceAroundButtons:n=!1,buttonsVariant:o,colorVariant:a,sliderVariant:i="default",auto:s=!1,delay:l=3e3,...c},u)=>_.createElement(W,{...c,ref:u,className:$("c-slider js-navigation-container",null==c?void 0:c.className),"data-slider-variant":i,"data-slider-auto":s,"data-slider-delay":l,__self:void 0,__source:{fileName:K,lineNumber:45,columnNumber:5}},_.createElement(W,{className:"c-slider__viewport js-navigation-container__list",__self:void 0,__source:{fileName:K,lineNumber:53,columnNumber:7}},_.createElement(Y,{className:"c-slider__list",alignItems:"center",gap:r,__self:void 0,__source:{fileName:K,lineNumber:54,columnNumber:9}},t)),e===b.DESKTOP&&_.createElement(W,{className:"c-slider__buttons-container",__self:void 0,__source:{fileName:K,lineNumber:59,columnNumber:9}},Array.from(["previous","next"],e=>_.createElement(W,{key:e,pr:n&&"previous"===e?"l":void 0,pl:n&&"next"===e?"l":void 0,className:$(`c-slider__button-container c-slider__button-container--${e} o-nav-button o-nav-button--${e}-button`,{"c-slider__button-container--has-space-around":n},{[`c-slider__button-container--${i}`]:i}),__self:void 0,__source:{fileName:K,lineNumber:61,columnNumber:13}},_.createElement(A,{variant:o||"round",color:a,..."videos"===i&&{p:"m"},iconProps:{name:"chevron",size:"videos"===i?14:12,rotation:"previous"===e?"half":void 0,svgTitle:"previous"===e?"Précédent":"Suivant"},__self:void 0,__source:{fileName:K,lineNumber:71,columnNumber:15}}))))));O(({as:e="a",id:t,variant:r="primary",children:n,...o},a)=>_.createElement(W,{...o,as:"span"===r?"span":e,href:"span"===r||null==o?void 0:o.href,ref:a,className:$("c-tags",`c-tags--${r}`,null==o?void 0:o.className),"data-id":t,__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Tag/Tag.tsx",lineNumber:14,columnNumber:5}},n));var Q="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Textarea/Textarea.tsx";O(({id:e,required:t,label:r,variant:n,msg:o,rows:a=5,containerProps:i,hint:s,error:l,...c},u)=>_.createElement(Y,{direction:"column",ref:u,...i,className:$("c-textarea",null==i?void 0:i.className),__self:void 0,__source:{fileName:Q,lineNumber:21,columnNumber:5}},r&&_.createElement("label",{htmlFor:e,className:"c-textarea__label",__self:void 0,__source:{fileName:Q,lineNumber:28,columnNumber:9}},r,t&&_.createElement(re,{as:"span",size:"xxs",weight:"regular",__self:void 0,__source:{fileName:Q,lineNumber:31,columnNumber:13}}," ","(obligatoire)")),s&&_.createElement(re,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",__self:void 0,__source:{fileName:Q,lineNumber:39,columnNumber:9}},s),_.createElement(Y,{className:"c-textarea-container",__self:void 0,__source:{fileName:Q,lineNumber:43,columnNumber:7}},_.createElement("textarea",{rows:a,placeholder:"Votre message...",required:t,...c,id:e,name:e,className:$("c-textarea-container__input",{[`c-textarea-container__input--${n}`]:n,"c-textarea-container__input--hint":!!s,"c-textarea-container__input--error":!!l},null==c?void 0:c.className),"aria-describedby":[s?`${e}-hint`:null,l?`${e}-error`:null].filter(Boolean).join(" ")||void 0,__self:void 0,__source:{fileName:Q,lineNumber:44,columnNumber:9}})),o&&o.length&&_.createElement(Y,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",__self:void 0,__source:{fileName:Q,lineNumber:67,columnNumber:9}},o.map(({iconProps:e,textProps:t,value:r},n)=>_.createElement(Y,{key:null==n?void 0:n.toString(),alignItems:"center",gap:"xxs",__self:void 0,__source:{fileName:Q,lineNumber:69,columnNumber:13}},e&&_.createElement(L,{...e,__self:void 0,__source:{fileName:Q,lineNumber:70,columnNumber:29}}),_.createElement(re,{dangerouslySetInnerHTML:{__html:r},role:"alert",...t,__self:void 0,__source:{fileName:Q,lineNumber:71,columnNumber:15}})))),l&&_.createElement(re,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",__self:void 0,__source:{fileName:Q,lineNumber:77,columnNumber:9}},l)));const ee=O(({as:e="p",children:t,...r},n)=>t&&t.toString().length||null!=r&&r.dangerouslySetInnerHTML?_.createElement(W,{...z({props:r,systemPropNames:Object.keys(S)}),as:e,ref:n,className:$(H(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Typography/Typography.tsx",lineNumber:14,columnNumber:7}},t):null);const te=O(({as:e="h1",size:t,children:r,...n},o)=>_.createElement(ee,{...n,as:e,ref:o,className:$(B({className:"heading",propValue:t}),null==n?void 0:n.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Typography/Heading/Heading.tsx",lineNumber:15,columnNumber:5}},r));const re=O(({as:e="p",size:t,highlighted:r,children:n,...o},a)=>_.createElement(ee,{as:r?"span":e,bg:r?"sponsoring":o.bg,p:r?"xxs":o.p,color:r?"grey-800":o.color,...o,ref:a,className:$(B({className:"text",propValue:t}),{"text-highlighted":r},null==o?void 0:o.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Typography/Text/Text.tsx",lineNumber:16,columnNumber:5}},n));O(({as:e="article",children:t,className:r,clickable:n=!1,...o},a)=>_.createElement(Y,{...o,as:e,ref:a,justifyContent:(null==o?void 0:o.justifyContent)||"between",className:$("c-card-container",{"c-card-container--clickable":n},r),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/molecules/Card/CardContainer/CardContainer.tsx",lineNumber:14,columnNumber:5}},t));var ne="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/molecules/Collapse/Collapse.tsx";O(({index:e,textTitleProps:t,headingTitleProps:r,titleIconProps:n,isOpen:o,contentWithBorder:a=!0,contentProps:i,iconProps:s,btnProps:l,children:c,isDropdown:u,...m},d)=>_.createElement(W,{...m,className:$("c-collapse js-collapse",{"c-collapse--dropdown":u}),ref:d,__self:void 0,__source:{fileName:ne,lineNumber:66,columnNumber:7}},_.createElement(W,{...l,as:"button",type:"button",id:`c-collapse__button-${e}`,pl:(null==l?void 0:l.pl)||"l",py:(null==l?void 0:l.py)||"xxs",className:$("c-collapse__button js-collapse__button",null==l?void 0:l.className),"aria-controls":`c-collapse__content-${e}`,"aria-expanded":o||"false",__self:void 0,__source:{fileName:ne,lineNumber:71,columnNumber:9}},n?_.createElement(Y,{alignItems:"center",__self:void 0,__source:{fileName:ne,lineNumber:83,columnNumber:13}},_.createElement(L,{size:34,mr:"xs",...n,__self:void 0,__source:{fileName:ne,lineNumber:84,columnNumber:15}}),t&&t.children):r?_.createElement(te,{as:"h3",size:"xxs",color:"black",...r,__self:void 0,__source:{fileName:ne,lineNumber:52,columnNumber:11}},r&&r.children):_.createElement(re,{size:"l",color:"black",...t,__self:void 0,__source:{fileName:ne,lineNumber:59,columnNumber:9}},t&&t.children),_.createElement(L,{name:"chevron",size:16,...s,className:$("c-collapse__icon",null==s?void 0:s.className),__self:void 0,__source:{fileName:ne,lineNumber:90,columnNumber:11}})),_.createElement(Y,{...i,direction:"column",p:(null==i?void 0:i.p)||"xl",id:`c-collapse__content-${e}`,"aria-hidden":o?!o:"true","aria-labelledby":`c-collapse__button-${e}`,className:$("c-collapse__content",{"c-collapse__content--with-border":a}),role:"tabpanel",__self:void 0,__source:{fileName:ne,lineNumber:97,columnNumber:9}},c)));var oe="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/molecules/Horoscope/HoroscopeTopicCard/HoroscopeTopicCard.tsx";O(({icon:e,title:t,content:r,...n},o)=>_.createElement(W,{...n,ref:o,className:$("c-horoscope-topic-card",null==n?void 0:n.className),__self:void 0,__source:{fileName:oe,lineNumber:16,columnNumber:5}},_.createElement(Y,{alignItems:"center",mb:"s",__self:void 0,__source:{fileName:oe,lineNumber:17,columnNumber:7}},_.createElement(L,{className:"c-horoscope-topic-card__icon",name:e,size:21,__self:void 0,__source:{fileName:oe,lineNumber:18,columnNumber:9}}),_.createElement(te,{as:"h3",size:"xs",__self:void 0,__source:{fileName:oe,lineNumber:19,columnNumber:9}},t)),_.createElement(re,{size:"m",__self:void 0,__source:{fileName:oe,lineNumber:23,columnNumber:7}},r)));var ae,ie={};!function(){if(ae)return ie;ae=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.StickyShareButtons=ie.InlineShareButtons=ie.InlineReactionButtons=ie.InlineFollowButtons=void 0;var e,t=(e=_)&&e.__esModule?e:{default:e};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,o=l(e);if(t){var a=l(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=function(e,t){var r=e.props.config||{enabled:!0};r=JSON.parse(JSON.stringify(r));var n=window.onShareThisLoaded;if(window.onShareThisLoaded=function o(){if(!o.complete){if(!r.id){var a="sharethis-"+Date.now();r.id=a}e.buttons.current&&(e.buttons.current.id=r.id,window.__sharethis__.load(t,r)),n&&n(),o.complete=!0}},document.getElementById("sharethis-js"))window.__sharethis__&&window.onShareThisLoaded();else{var o=document.createElement("script");o.setAttribute("id","sharethis-js");var a={property:r.property||"",product:t,source:"reactjs"},i=Object.keys(a).map(function(e){return e+"="+a[e]}).join("&");o.src="https://platform-api.sharethis.com/js/sharethis.js?"+i,o.async=!0,document.body.appendChild(o)}},u=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-follow-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.InlineFollowButtons=u;var m=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-share-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.InlineShareButtons=m;var d=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-reaction-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.InlineReactionButtons=d;var f=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"sticky-share-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.StickyShareButtons=f}();const se=_.forwardRef(({href:e,children:t,...r},n)=>_.createElement("a",{href:e,className:$("c-skip-link",U(r),null==r?void 0:r.className),ref:n,...r,__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/SkipLink/SkipLink.tsx",lineNumber:11,columnNumber:5}},t));se.displayName="SkipLink";const le=["20mnToken","20mnUserDataLayer","20mnTutorial","20mnUserInfo","20mnUserSession","_vfa","_vfb","_vfz","atauthority","atid","atidvisitor","atidx","atuserid","didomi_token","euconsent-v2","osano_consentmanager","osano_consentmanager_expdate","osano_consentmanager_uuid","SESSIDSF","SESSIDSFRM","TCPID","TSTD","ei_client_id","_biz_pendingA","_biz_flagsA","_biz_uid","_biz_nA","ajs_group_id","ajs_user_id","ajs_anonymous_id","TSNGUID","_mkto_trk","JSESSIONID","staging-login_idle_session_timeout","login_idle_session_timeout","lang","auth_expiration_timestamp","sticky-scorecast-business-chat","__utna","__utnv","auth_token","PHPSESSID","sticky-scorecast-business-app","sticky-scorecast-prod-app","realm","_pcid"],ce=["_vf_sid","consent_validity_date","20mn-articlesSaved","20mn-font","closedInfo","20mn-known-user","20mn-block-links","20mnBreakingNewsBanner","20mnBreakingNews","20mnAppBanner","20mn-visits-content","20minutes-font"],ue=["vfThirdpartyCookiesEnabled","com.batch.sessionId","loadIntrasticial"],me=()=>{window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:()=>{window.pa&&"optout"!==window.pa.privacy.getMode()&&(window.pa.privacy.setMode("exempt"),window.Didomi.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled&&window.pa.privacy.setMode("optin"))}})},de=()=>{window.cmpVariables={consentEventsCount:0},window.didomiEventListeners.push({event:"consent.changed",listener:()=>{(()=>{const e=window?.mics?.vid;!window.Didomi.getCurrentUserStatus().purposes["publicite-Nfb9aWMW"]?.enabled&&e&&fetch("https://splash.20minutes.fr/consent",{headers:{"Content-Type":"application/json"},referrerPolicy:"strict-origin-when-cross-origin",method:"POST",body:JSON.stringify({account_id:`mum:${e}`})})})();const e=(e=>{const t=document.cookie.split(";").filter(t=>-1!==t.indexOf(e))[0];return t?t.split("=")[1]:"{}"})("euconsent-v2"),t=window.cmpVariables.consentEventsCount>0||!!e,r=!window.Didomi.getCurrentUserStatus().purposes.cookies?.enabled,n=!window.Didomi.getCurrentUserStatus().purposes["publicite-Nfb9aWMW"]?.enabled,o=!window.Didomi.getCurrentUserStatus().purposes["publicite-9qedKJMX"]?.enabled,l=!window.Didomi.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled,c=window.sessionStorage.getItem("cmpModal");t&&!c&&((r||n||o||l)&&(a(le),s(ce),i(ue)),setTimeout(()=>{document.location.href=document.location.href},window.layout===b.DESKTOP?300:400)),c&&window.sessionStorage.removeItem("cmpModal"),window.cmpVariables.consentEventsCount+=1}})},fe=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{if(e.getCurrentUserStatus().purposes["activation-gGierZpp"]?.enabled){Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.add("u-hidden")});Array.from(document.getElementsByClassName("embed-wrapper")).forEach(e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})}else{Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.remove("u-hidden")})}})},pe=()=>{document.querySelectorAll(".embed-placeholder").forEach(e=>{e.addEventListener("click",e=>{const t=e.target;if(!(t instanceof HTMLElement&&t.closest(".cmp-button")))return;e.preventDefault(),window.didomiOnReady.push(()=>{(()=>{const e=window.Didomi.openCurrentUserStatusTransaction();e.enablePurpose("activation-gGierZpp"),window.sessionStorage.setItem("cmpModal","accepted"),e.commit(),fe()})()});const r=t.closest("div.embed-placeholder");r&&r.focus()})})};window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3);const r=e.toISOString().split("T")[0],n=localStorage.getItem("consent_validity_date");n&&r>n&&(window.Didomi.reset(),localStorage.removeItem("consent_validity_date"),window.disapproveDidomiGTMEvents=!0,a(le),s(ce),i(ue),window.Didomi.notice.show())}),me(),de(),window.didomiOnReady=window.didomiOnReady||[],fe(),window.didomiEventListeners.push({event:"consent.changed",listener(){fe()}}),pe(),window.datalayerInfo?.pageName&&[l.GAME,l.GAME_APP].includes(window.datalayerInfo?.pageName)&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(()=>{const e=document.getElementById("choice-consent");e&&window?.Didomi?.preferences?.show&&e.addEventListener("click",()=>{window.Didomi.preferences.show()})}),setTimeout(()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{e.getCurrentUserStatus().purposes.cookies?.enabled||a(le)})},3e4),window.didomiOnReady.push(t=>{if("true"===function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0}(e)){r=e,localStorage.removeItem(r);const n=t.openCurrentUserStatusTransaction();n.disablePurpose("mesureda-6qyqaZXC"),n.commit()}var r})}();
6
+ */var I,R=(C||(C=1,I=T,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var a in r)e.call(r,a)&&r[a]&&(o=n(o,a));return o}function n(e,t){return t?e?e+" "+t:e+t:e}I.exports?(t.default=t,I.exports=t):window.classNames=t}()),T.exports);const $=k(R);var j="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Button/Button.tsx";const A=O(({as:e="button",variant:t="primary",children:r,iconProps:n,counter:o,isCentered:a=!1,isSquare:i=!1,isLoading:s=!1,size:l,...c},u)=>_.createElement(X,{...c,as:e,ref:u,alignItems:"center",justifyContent:"center",gap:"xxs",inline:"link"===t||"a"===e,radius:i?"0":void 0,className:$("c-btn",{[`c-btn--${t}`]:t,[`c-btn--${l}`]:l,"c-btn--is-centered":a,"c-btn--is-loading":s},null==c?void 0:c.className),__self:void 0,__source:{fileName:j,lineNumber:57,columnNumber:5}},n&&_.createElement(L,{...n,__self:void 0,__source:{fileName:j,lineNumber:79,columnNumber:21}}),r,(0===o||o)&&_.createElement(X,{justifyContent:"center",alignItems:"center",color:"grey-900",bg:"white",px:"xxs",radius:"s",className:"c-btn__counter",__self:void 0,__source:{fileName:j,lineNumber:82,columnNumber:9}},o)));A.displayName="Button";var P="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Divider/Divider.tsx";O(({text:e,color:t="black",thickness:r="thin",...n},o)=>{const a=_.createElement(Y,{bg:t,align:"center",className:$("c-divider__line",{[`c-divider__line--${r}`]:"thin"!==r}),__self:void 0,__source:{fileName:P,lineNumber:15,columnNumber:7}});return _.createElement(X,{...n,ref:o,className:$("c-divider",{"c-divider--has-text":!!e},null==n?void 0:n.className),__self:void 0,__source:{fileName:P,lineNumber:25,columnNumber:7}},e?_.createElement(_.Fragment,null,a,_.createElement(Y,{px:"xxs-2",className:"c-divider__text",__self:void 0,__source:{fileName:P,lineNumber:37,columnNumber:13}},_.createElement(re,{size:"xxs",color:t,textTransform:"uppercase",__self:void 0,__source:{fileName:P,lineNumber:38,columnNumber:15}},e)),a):a)});O(({color:e="black",thickness:t="thin",...r},n)=>_.createElement(W,{...r,ref:n,bg:e,className:$("c-divider-vertical",{[`c-divider-vertical--${t}`]:"thin"!==t},null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/DividerVertical/DividerVertical.tsx",lineNumber:13,columnNumber:5}}));var V="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Icon/Icon.tsx";const L=O(({name:e,size:t=28,isRounded:r=!1,border:n,rotation:o,svgTitle:a,...i},s)=>{const l=Array.isArray(t)?null==t?void 0:t[0]:t,c=Array.isArray(t)?null==t?void 0:t[1]:t;return _.createElement(W,{...i,ref:s,className:$("c-icon",{[`c-icon--has-border-${n}`]:n,"c-icon--is-rounded":r,[`c-icon--${o}`]:o},null==i?void 0:i.className),__self:void 0,__source:{fileName:V,lineNumber:28,columnNumber:7}},_.createElement("svg",{width:l,height:c,__self:void 0,__source:{fileName:V,lineNumber:41,columnNumber:9}},a&&_.createElement("title",{__self:void 0,__source:{fileName:V,lineNumber:42,columnNumber:24}},a),"circle"===e?_.createElement("circle",{__self:void 0,__source:{fileName:V,lineNumber:43,columnNumber:32}}):_.createElement("use",{xlinkHref:`#${e}`,__self:void 0,__source:{fileName:V,lineNumber:43,columnNumber:45}})))});var M="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Input/Input.tsx";O(({id:e,className:t,color:r,required:n,label:o,icon:a,positionIcon:i="right",isIconButton:s=!1,iconButtonProps:l,variant:c,msg:u,containerProps:m,isRounded:d,isTransparent:f,isLarge:p,children:b,hint:v,error:N,...h},y)=>{const g=a&&_.createElement(A,{className:"c-input-container__icon",iconProps:{name:a,size:18},variant:"ghost",color:r||"black",...l,__self:void 0,__source:{fileName:M,lineNumber:50,columnNumber:7}}),w=a&&_.createElement(L,{className:"c-input-container__icon",name:a,size:18,color:r||"black",__self:void 0,__source:{fileName:M,lineNumber:63,columnNumber:7}});return _.createElement(X,{direction:"column",...m,className:$("c-input",null==m?void 0:m.className),__self:void 0,__source:{fileName:M,lineNumber:67,columnNumber:7}},o&&_.createElement("label",{htmlFor:e,className:"c-input__label",__self:void 0,__source:{fileName:M,lineNumber:73,columnNumber:11}},o,n&&_.createElement(re,{as:"span",size:"xxs",weight:"regular",__self:void 0,__source:{fileName:M,lineNumber:76,columnNumber:15}}," ","(obligatoire)")),v&&_.createElement(re,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",__self:void 0,__source:{fileName:M,lineNumber:84,columnNumber:11}},v),_.createElement(X,{gap:a&&b?"xs":void 0,className:$("c-input-container",{[`c-input-container--${c}`]:c,"c-input-container--rounded":d,"c-input-container--transparent":f,"c-input-container--large":p,[`c-input-container--${i}`]:a||b}),__self:void 0,__source:{fileName:M,lineNumber:88,columnNumber:9}},(a||b)&&_.createElement(X,{gap:"s",__self:void 0,__source:{fileName:M,lineNumber:99,columnNumber:13}},s?g:w,b),_.createElement("input",{id:e,className:$("c-input-container__input",t),required:n,ref:y,"aria-describedby":[v?`${e}-hint`:null,N?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...h,__self:void 0,__source:{fileName:M,lineNumber:104,columnNumber:11}})),u&&u.length&&_.createElement(X,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",__self:void 0,__source:{fileName:M,lineNumber:118,columnNumber:11}},u.map(({iconProps:e,textProps:t,value:r},n)=>_.createElement(X,{key:null==n?void 0:n.toString(),alignItems:"center",gap:"xxs",__self:void 0,__source:{fileName:M,lineNumber:120,columnNumber:15}},e&&_.createElement(L,{...e,__self:void 0,__source:{fileName:M,lineNumber:121,columnNumber:31}}),_.createElement(re,{dangerouslySetInnerHTML:{__html:r},role:"alert",...t,__self:void 0,__source:{fileName:M,lineNumber:122,columnNumber:17}})))),N&&_.createElement(re,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",__self:void 0,__source:{fileName:M,lineNumber:128,columnNumber:11}},N))});const D=e=>{if(void 0!==e.propValue){if("boolean"!=typeof e.propValue){const t=(e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase())("number"==typeof e.propValue?e.propValue.toString():e.propValue);return e.className?`${e.className}-${t}@${e.defaultModifier}`:`${t}@${e.defaultModifier}`}if(!e.className)throw new Error('It is necessary to define the argument "className" !');return`${e.className}@${e.defaultModifier}`}},B=e=>{if(e.propValue&&["boolean","string","number"].includes(typeof e.propValue)||!e.propValue){const t=D({className:e.className,defaultModifier:e.defaultModifier||"xs",propValue:e.propValue});return t?[t]:[]}return Object.entries(e.propValue).reduce((t,[r,n])=>{const o=D({className:e.className,defaultModifier:r,propValue:n});return o&&t.push(o),t},[])},z=e=>"object"==typeof e.props?Object.keys(e.props).reduce((t,r)=>(e.systemPropNames.includes(r)||(t[r]=e.props[r]),t),{}):{},q=e=>$(Object.entries(e).filter(([e])=>Object.keys(E).includes(e)).reduce((e,[t,r])=>(e.push(...B({className:t,propValue:r})),e),[])),H=({textAlign:e,weight:t,textTransform:r,textDecoration:n,italic:o,fontFamily:a,whiteSpace:i})=>$(B({className:"text",propValue:e}),B({className:"font-weight",propValue:t}),{[`white-space-${i}`]:!!i,[`text-transform-${r}`]:!!r,[`text-decoration-${n}`]:!!n,"text-italic":!!o,[`font-${a}`]:!!a}),U=e=>$(q(e),(e=>$({[`bg-${e.bg}`]:e.bg,[`color-${e.color}`]:e.color,[`border-color-${e.borderColor}`]:e.borderColor}))(e),(e=>$(Object.entries(e).filter(([e])=>Object.keys(g).includes(e)).reduce((e,[t,r])=>(e.push(...B({className:t,propValue:r})),e),[])))(e)),F=({inline:e=!1,direction:t,wrap:r,...n})=>$(...B({propValue:e,className:e?"inline-flex":"flex"}),...B({propValue:t,className:"direction"}),...B({propValue:r}),(e=>$(...B({propValue:e.alignItems,className:"items"}),...B({propValue:e.alignContent,className:"content"}),...B({propValue:e.justifyContent,className:"justify"}),...B({propValue:e.gap,className:"gap"}),...B({propValue:e.gapX,className:"gap-x"}),...B({propValue:e.gapY,className:"gap-y"}),...B({propValue:e.flexGrow,className:"grow"})))(n)),G=({basis:e,shrink:t,grow:r,...n})=>$(...B({propValue:e,className:"basis"}),...B({propValue:t,className:"shrink"}),...B({propValue:r,className:"grow"}),(e=>$(...B({propValue:e.align,className:"self"})))(n));const W=O(({as:e="div",children:t,...r},n)=>_.createElement(e,{...z({props:r,systemPropNames:Object.keys(x)}),ref:n,className:$(U(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Layout/Box/Box.tsx",lineNumber:13,columnNumber:3}},t));W.displayName="Box";const X=O(({as:e="div",children:t,...r},n)=>_.createElement(W,{...z({props:r,systemPropNames:Object.keys(y)}),as:e,ref:n,className:$(F(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Layout/Flex/Flex.tsx",lineNumber:12,columnNumber:3}},t));const Y=O(({as:e="div",children:t,...r},n)=>_.createElement(W,{...z({props:r,systemPropNames:Object.keys(h)}),as:e,ref:n,className:$(G(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Layout/Flex/FlexItem/FlexItem.tsx",lineNumber:13,columnNumber:5}},t));O(({as:e="a",children:t,color:r,size:n,variant:o,weight:a,whiteSpace:i,tabIsSelected:s,tabVariant:l,tabColor:c,defaultColor:u="ultramarine",isUnderlined:m,...d},f)=>{if(o&&r)throw new Error("You can't use color and variant props together");const p=l||c?$("c-tab",{[`c-tab--${l}`]:l,[`c-tab--${c}`]:c,"c-tab--selected":s,"c-tab--unselected":!s},H({weight:a,whiteSpace:i}),null==d?void 0:d.className):$("c-link",{[`c-btn c-btn--${o}`]:o&&!r},H({weight:a,whiteSpace:i}),B({className:"text",propValue:n}),{"c-link--is-underlined":m},null==d?void 0:d.className);return _.createElement(W,{...d,as:e,ref:f,...!l&&!c&&{color:o?void 0:r||("inherit"===u?void 0:u)},className:p,__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Link/Link.tsx",lineNumber:79,columnNumber:7}},t)});var J="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/ScrollProgressBar/ScrollProgressBar.tsx";O(({variant:e,progressColor:t="ultramarine"},r)=>_.createElement(W,{ref:r,bg:"grey-100",className:$("c-progress",{[`c-progress--${e}`]:e}),__self:void 0,__source:{fileName:J,lineNumber:14,columnNumber:5}},_.createElement(W,{className:"c-progress__bar",bg:t,style:{width:"0%"},__self:void 0,__source:{fileName:J,lineNumber:19,columnNumber:7}})));var Z="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Select/Select.tsx";O(({id:e,className:t,required:r,label:n,defaultValue:o,options:a,placeholder:i,containerProps:s,variant:l="default",icon:c,isLarge:u,hint:m,error:d,...f},p)=>{var b,v;return _.createElement(X,{...s,ref:p,direction:"column",className:$("c-select",null==s?void 0:s.className),__self:void 0,__source:{fileName:Z,lineNumber:48,columnNumber:5}},n&&_.createElement("label",{htmlFor:e,className:"c-select__label",__self:void 0,__source:{fileName:Z,lineNumber:55,columnNumber:9}},n,r&&_.createElement(re,{as:"span",size:"xxs",weight:"regular",__self:void 0,__source:{fileName:Z,lineNumber:58,columnNumber:13}}," ","(obligatoire)")),m&&_.createElement(re,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",__self:void 0,__source:{fileName:Z,lineNumber:66,columnNumber:9}},m),_.createElement("div",{className:"c-select__container",__self:void 0,__source:{fileName:Z,lineNumber:70,columnNumber:7}},c&&_.createElement(L,{className:"c-select__icon",name:c,size:18,__self:void 0,__source:{fileName:Z,lineNumber:71,columnNumber:18}}),_.createElement(L,{className:`c-select__caret c-select__caret--${l}`,name:"arrow",size:12,__self:void 0,__source:{fileName:Z,lineNumber:72,columnNumber:9}}),_.createElement("select",{id:e,className:$("c-select__select",`c-select__select--${l}`,{"c-select__select--has-icon":!!c},{"c-select__select--large":u},q(f),t),required:r,defaultValue:o||(null==(v=null==(b=a.filter(e=>e.isSelected))?void 0:b.pop())?void 0:v.value)||"","aria-describedby":[m?`${e}-hint`:null,d?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...z({props:f,systemPropNames:Object.keys(w)}),__self:void 0,__source:{fileName:Z,lineNumber:73,columnNumber:9}},i&&_.createElement("option",{value:"",disabled:!0,hidden:!0,__self:void 0,__source:{fileName:Z,lineNumber:97,columnNumber:13}},i),a.map(e=>_.createElement("option",{key:e.value,value:e.value,__self:void 0,__source:{fileName:Z,lineNumber:102,columnNumber:13}},e.title)))),d&&_.createElement(re,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",__self:void 0,__source:{fileName:Z,lineNumber:109,columnNumber:9}},d))});var K="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Slider/Slider.tsx";O(({layout:e,children:t,itemsGap:r,hasSpaceAroundButtons:n=!1,buttonsVariant:o,colorVariant:a,sliderVariant:i="default",auto:s=!1,delay:l=3e3,...c},u)=>_.createElement(W,{...c,ref:u,className:$("c-slider js-navigation-container",null==c?void 0:c.className),"data-slider-variant":i,"data-slider-auto":s,"data-slider-delay":l,__self:void 0,__source:{fileName:K,lineNumber:45,columnNumber:5}},_.createElement(W,{className:"c-slider__viewport js-navigation-container__list",__self:void 0,__source:{fileName:K,lineNumber:53,columnNumber:7}},_.createElement(X,{className:"c-slider__list",alignItems:"center",gap:r,__self:void 0,__source:{fileName:K,lineNumber:54,columnNumber:9}},t)),e===b.DESKTOP&&_.createElement(W,{className:"c-slider__buttons-container",__self:void 0,__source:{fileName:K,lineNumber:59,columnNumber:9}},Array.from(["previous","next"],e=>_.createElement(W,{key:e,pr:n&&"previous"===e?"l":void 0,pl:n&&"next"===e?"l":void 0,className:$(`c-slider__button-container c-slider__button-container--${e} o-nav-button o-nav-button--${e}-button`,{"c-slider__button-container--has-space-around":n},{[`c-slider__button-container--${i}`]:i}),__self:void 0,__source:{fileName:K,lineNumber:61,columnNumber:13}},_.createElement(A,{variant:o||"round",color:a,..."videos"===i&&{p:"m"},iconProps:{name:"chevron",size:"videos"===i?14:12,rotation:"previous"===e?"half":void 0,svgTitle:"previous"===e?"Précédent":"Suivant"},__self:void 0,__source:{fileName:K,lineNumber:71,columnNumber:15}}))))));O(({as:e="a",id:t,variant:r="primary",children:n,...o},a)=>_.createElement(W,{...o,as:"span"===r?"span":e,href:"span"===r||null==o?void 0:o.href,ref:a,className:$("c-tags",`c-tags--${r}`,null==o?void 0:o.className),"data-id":t,__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Tag/Tag.tsx",lineNumber:14,columnNumber:5}},n));var Q="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Textarea/Textarea.tsx";O(({id:e,required:t,label:r,variant:n,msg:o,rows:a=5,containerProps:i,hint:s,error:l,...c},u)=>_.createElement(X,{direction:"column",ref:u,...i,className:$("c-textarea",null==i?void 0:i.className),__self:void 0,__source:{fileName:Q,lineNumber:21,columnNumber:5}},r&&_.createElement("label",{htmlFor:e,className:"c-textarea__label",__self:void 0,__source:{fileName:Q,lineNumber:28,columnNumber:9}},r,t&&_.createElement(re,{as:"span",size:"xxs",weight:"regular",__self:void 0,__source:{fileName:Q,lineNumber:31,columnNumber:13}}," ","(obligatoire)")),s&&_.createElement(re,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",__self:void 0,__source:{fileName:Q,lineNumber:39,columnNumber:9}},s),_.createElement(X,{className:"c-textarea-container",__self:void 0,__source:{fileName:Q,lineNumber:43,columnNumber:7}},_.createElement("textarea",{rows:a,placeholder:"Votre message...",required:t,...c,id:e,name:e,className:$("c-textarea-container__input",{[`c-textarea-container__input--${n}`]:n,"c-textarea-container__input--hint":!!s,"c-textarea-container__input--error":!!l},null==c?void 0:c.className),"aria-describedby":[s?`${e}-hint`:null,l?`${e}-error`:null].filter(Boolean).join(" ")||void 0,__self:void 0,__source:{fileName:Q,lineNumber:44,columnNumber:9}})),o&&o.length&&_.createElement(X,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",__self:void 0,__source:{fileName:Q,lineNumber:67,columnNumber:9}},o.map(({iconProps:e,textProps:t,value:r},n)=>_.createElement(X,{key:null==n?void 0:n.toString(),alignItems:"center",gap:"xxs",__self:void 0,__source:{fileName:Q,lineNumber:69,columnNumber:13}},e&&_.createElement(L,{...e,__self:void 0,__source:{fileName:Q,lineNumber:70,columnNumber:29}}),_.createElement(re,{dangerouslySetInnerHTML:{__html:r},role:"alert",...t,__self:void 0,__source:{fileName:Q,lineNumber:71,columnNumber:15}})))),l&&_.createElement(re,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",__self:void 0,__source:{fileName:Q,lineNumber:77,columnNumber:9}},l)));const ee=O(({as:e="p",children:t,...r},n)=>t&&t.toString().length||null!=r&&r.dangerouslySetInnerHTML?_.createElement(W,{...z({props:r,systemPropNames:Object.keys(S)}),as:e,ref:n,className:$(H(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Typography/Typography.tsx",lineNumber:14,columnNumber:7}},t):null);const te=O(({as:e="h1",size:t,children:r,...n},o)=>_.createElement(ee,{...n,as:e,ref:o,className:$(B({className:"heading",propValue:t}),null==n?void 0:n.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Typography/Heading/Heading.tsx",lineNumber:15,columnNumber:5}},r));const re=O(({as:e="p",size:t,highlighted:r,children:n,...o},a)=>_.createElement(ee,{as:r?"span":e,bg:r?"sponsoring":o.bg,p:r?"xxs":o.p,color:r?"grey-800":o.color,...o,ref:a,className:$(B({className:"text",propValue:t}),{"text-highlighted":r},null==o?void 0:o.className),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/Typography/Text/Text.tsx",lineNumber:16,columnNumber:5}},n));O(({as:e="article",children:t,className:r,clickable:n=!1,...o},a)=>_.createElement(X,{...o,as:e,ref:a,justifyContent:(null==o?void 0:o.justifyContent)||"between",className:$("c-card-container",{"c-card-container--clickable":n},r),__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/molecules/Card/CardContainer/CardContainer.tsx",lineNumber:14,columnNumber:5}},t));var ne="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/molecules/Collapse/Collapse.tsx";O(({index:e,textTitleProps:t,headingTitleProps:r,titleIconProps:n,isOpen:o,contentWithBorder:a=!0,contentProps:i,iconProps:s,btnProps:l,children:c,isDropdown:u,...m},d)=>_.createElement(W,{...m,className:$("c-collapse js-collapse",{"c-collapse--dropdown":u}),ref:d,__self:void 0,__source:{fileName:ne,lineNumber:66,columnNumber:7}},_.createElement(W,{...l,as:"button",type:"button",id:`c-collapse__button-${e}`,pl:(null==l?void 0:l.pl)||"l",py:(null==l?void 0:l.py)||"xxs",className:$("c-collapse__button js-collapse__button",null==l?void 0:l.className),"aria-controls":`c-collapse__content-${e}`,"aria-expanded":o||"false",__self:void 0,__source:{fileName:ne,lineNumber:71,columnNumber:9}},n?_.createElement(X,{alignItems:"center",__self:void 0,__source:{fileName:ne,lineNumber:83,columnNumber:13}},_.createElement(L,{size:34,mr:"xs",...n,__self:void 0,__source:{fileName:ne,lineNumber:84,columnNumber:15}}),t&&t.children):r?_.createElement(te,{as:"h3",size:"xxs",color:"black",...r,__self:void 0,__source:{fileName:ne,lineNumber:52,columnNumber:11}},r&&r.children):_.createElement(re,{size:"l",color:"black",...t,__self:void 0,__source:{fileName:ne,lineNumber:59,columnNumber:9}},t&&t.children),_.createElement(L,{name:"chevron",size:16,...s,className:$("c-collapse__icon",null==s?void 0:s.className),__self:void 0,__source:{fileName:ne,lineNumber:90,columnNumber:11}})),_.createElement(X,{...i,direction:"column",p:(null==i?void 0:i.p)||"xl",id:`c-collapse__content-${e}`,"aria-hidden":o?!o:"true","aria-labelledby":`c-collapse__button-${e}`,className:$("c-collapse__content",{"c-collapse__content--with-border":a}),role:"tabpanel",__self:void 0,__source:{fileName:ne,lineNumber:97,columnNumber:9}},c)));var oe="/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/molecules/Horoscope/HoroscopeTopicCard/HoroscopeTopicCard.tsx";O(({icon:e,title:t,content:r,...n},o)=>_.createElement(W,{...n,ref:o,className:$("c-horoscope-topic-card",null==n?void 0:n.className),__self:void 0,__source:{fileName:oe,lineNumber:16,columnNumber:5}},_.createElement(X,{alignItems:"center",mb:"s",__self:void 0,__source:{fileName:oe,lineNumber:17,columnNumber:7}},_.createElement(L,{className:"c-horoscope-topic-card__icon",name:e,size:21,__self:void 0,__source:{fileName:oe,lineNumber:18,columnNumber:9}}),_.createElement(te,{as:"h3",size:"xs",__self:void 0,__source:{fileName:oe,lineNumber:19,columnNumber:9}},t)),_.createElement(re,{size:"m",__self:void 0,__source:{fileName:oe,lineNumber:23,columnNumber:7}},r)));var ae,ie={};!function(){if(ae)return ie;ae=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.StickyShareButtons=ie.InlineShareButtons=ie.InlineReactionButtons=ie.InlineFollowButtons=void 0;var e,t=(e=_)&&e.__esModule?e:{default:e};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,o=l(e);if(t){var a=l(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=function(e,t){var r=e.props.config||{enabled:!0};r=JSON.parse(JSON.stringify(r));var n=window.onShareThisLoaded;if(window.onShareThisLoaded=function o(){if(!o.complete){if(!r.id){var a="sharethis-"+Date.now();r.id=a}e.buttons.current&&(e.buttons.current.id=r.id,window.__sharethis__.load(t,r)),n&&n(),o.complete=!0}},document.getElementById("sharethis-js"))window.__sharethis__&&window.onShareThisLoaded();else{var o=document.createElement("script");o.setAttribute("id","sharethis-js");var a={property:r.property||"",product:t,source:"reactjs"},i=Object.keys(a).map(function(e){return e+"="+a[e]}).join("&");o.src="https://platform-api.sharethis.com/js/sharethis.js?"+i,o.async=!0,document.body.appendChild(o)}},u=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-follow-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.InlineFollowButtons=u;var m=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-share-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.InlineShareButtons=m;var d=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-reaction-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.InlineReactionButtons=d;var f=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"sticky-share-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);ie.StickyShareButtons=f}();const se=_.forwardRef(({href:e,children:t,...r},n)=>_.createElement("a",{href:e,className:$("c-skip-link",U(r),null==r?void 0:r.className),ref:n,...r,__self:void 0,__source:{fileName:"/codebuild/output/src1237935505/src/github.com/20minutes/hela/src/components/atoms/SkipLink/SkipLink.tsx",lineNumber:11,columnNumber:5}},t));se.displayName="SkipLink";const le=["20mnToken","20mnUserDataLayer","20mnTutorial","20mnUserInfo","20mnUserSession","_vfa","_vfb","_vfz","atauthority","atid","atidvisitor","atidx","atuserid","didomi_token","euconsent-v2","osano_consentmanager","osano_consentmanager_expdate","osano_consentmanager_uuid","SESSIDSF","SESSIDSFRM","TCPID","TSTD","ei_client_id","_biz_pendingA","_biz_flagsA","_biz_uid","_biz_nA","ajs_group_id","ajs_user_id","ajs_anonymous_id","TSNGUID","_mkto_trk","JSESSIONID","staging-login_idle_session_timeout","login_idle_session_timeout","lang","auth_expiration_timestamp","sticky-scorecast-business-chat","__utna","__utnv","auth_token","PHPSESSID","sticky-scorecast-business-app","sticky-scorecast-prod-app","realm","_pcid"],ce=["_vf_sid","consent_validity_date","20mn-articlesSaved","20mn-font","closedInfo","20mn-known-user","20mn-block-links","20mnBreakingNewsBanner","20mnBreakingNews","20mnAppBanner","20mn-visits-content","20minutes-font"],ue=["vfThirdpartyCookiesEnabled","com.batch.sessionId","loadIntrasticial"],me=()=>{window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:()=>{window.pa&&"optout"!==window.pa.privacy.getMode()&&(window.pa.privacy.setMode("exempt"),window.Didomi.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled&&window.pa.privacy.setMode("optin"))}})},de=()=>{window.cmpVariables={consentEventsCount:0},window.didomiEventListeners.push({event:"consent.changed",listener:()=>{(()=>{const e=window?.mics?.vid;!window.Didomi.getCurrentUserStatus().purposes["publicite-Nfb9aWMW"]?.enabled&&e&&fetch("https://splash.20minutes.fr/consent",{headers:{"Content-Type":"application/json"},referrerPolicy:"strict-origin-when-cross-origin",method:"POST",body:JSON.stringify({account_id:`mum:${e}`})})})();const e=(e=>{const t=document.cookie.split(";").filter(t=>-1!==t.indexOf(e))[0];return t?t.split("=")[1]:"{}"})("euconsent-v2"),t=window.cmpVariables.consentEventsCount>0||!!e,r=!window.Didomi.getCurrentUserStatus().purposes.cookies?.enabled,n=!window.Didomi.getCurrentUserStatus().purposes["publicite-Nfb9aWMW"]?.enabled,o=!window.Didomi.getCurrentUserStatus().purposes["publicite-9qedKJMX"]?.enabled,l=!window.Didomi.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled,c=window.sessionStorage.getItem("cmpModal");t&&!c&&((r||n||o||l)&&(a(le),s(ce),i(ue)),setTimeout(()=>{document.location.href=document.location.href},window.layout===b.DESKTOP?300:400)),c&&window.sessionStorage.removeItem("cmpModal"),window.cmpVariables.consentEventsCount+=1}})},fe=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{if(e.getCurrentUserStatus().purposes["activation-gGierZpp"]?.enabled){Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.add("u-hidden")});Array.from(document.getElementsByClassName("embed-wrapper")).forEach(e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})}else{Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.remove("u-hidden")})}})},pe=()=>{document.querySelectorAll(".embed-placeholder").forEach(e=>{e.addEventListener("click",e=>{const t=e.target;if(!(t instanceof HTMLElement&&t.closest(".cmp-button")))return;e.preventDefault(),window.didomiOnReady.push(()=>{(()=>{const e=window.Didomi.openCurrentUserStatusTransaction();e.enablePurpose("activation-gGierZpp"),window.sessionStorage.setItem("cmpModal","accepted"),e.commit(),fe()})()});const r=t.closest("div.embed-placeholder");r&&r.focus()})})};window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3);const r=e.toISOString().split("T")[0],n=localStorage.getItem("consent_validity_date");n&&r>n&&(window.Didomi.reset(),localStorage.removeItem("consent_validity_date"),window.disapproveDidomiGTMEvents=!0,a(le),s(ce),i(ue),window.Didomi.notice.show())}),me(),de(),window.didomiOnReady=window.didomiOnReady||[],fe(),window.didomiEventListeners.push({event:"consent.changed",listener(){fe()}}),pe(),window.datalayerInfo?.pageName&&[l.GAME,l.GAME_APP].includes(window.datalayerInfo?.pageName)&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(()=>{const e=document.getElementById("choice-consent");e&&window?.Didomi?.preferences?.show&&e.addEventListener("click",()=>{window.Didomi.preferences.show()})}),setTimeout(()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{e.getCurrentUserStatus().purposes.cookies?.enabled||a(le)})},3e4),window.didomiOnReady.push(t=>{const r=function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0}(e);if(void 0!==r){n=e,localStorage.removeItem(n);const o=t.openCurrentUserStatusTransaction();o.enablePurpose("mesureda-6qyqaZXC"),r&&o.disablePurpose("mesureda-6qyqaZXC"),o.commit()}var n})}();
7
7
  //# sourceMappingURL=cmp.min.js.map
@@ -39,5 +39,5 @@
39
39
  Copyright (c) 2018 Jed Watson.
40
40
  Licensed under the MIT License (MIT), see
41
41
  http://jedwatson.github.io/classnames
42
- */var Jb,Yb=(Zb||(Zb=1,Jb=Qb,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=n(e,r(i)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var o in r)e.call(r,o)&&r[o]&&(i=n(i,o));return i}function n(e,t){return t?e?e+" "+t:e+t:e}Jb.exports?(t.default=t,Jb.exports=t):window.classNames=t}()),Qb.exports),Xb=lo(Yb);const ey=({articles:t,seeMoreButton:r,layout:n,...i})=>{const{variablesForQuery:o,...a}=i;return e.createElement(Vr,{...a},t.map((r,i)=>{const o=`lastArticleKey${i}`,a=i===t.length-1;return e.createElement(e.Fragment,{key:o},e.createElement(oi,{...r,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:n===Qt.MOBILE?void 0:3,...r.cardTitleProps}}),!a&&e.createElement(Er,{color:"grey-200",my:"s"}),10===i&&n===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),20===i&&n===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(10===i||20===i)&&n===Qt.MOBILE&&e.createElement(Er,{color:"grey-200",my:"s"}))}),r&&e.createElement(_r,{...r,variant:"secondary",mx:"auto",mt:"s"}))},ty=({legalNotices:t,seeMoreLegalNotices:r,...n})=>0===t.length?null:e.createElement(Vr,{...n},t.map(t=>e.createElement(e.Fragment,null,e.createElement(ni,{key:t.link,...t,linkProps:{children:"Lire l’annonce"}}),e.createElement(Er,{my:"l",color:"grey-200"}))),r&&e.createElement(_r,{variant:"secondary",mx:"auto",mt:"xl",...r})),ry=e=>{const t=e=>`${e}`.padStart(2,"0");return`${t(Math.floor(e/60))}:${t(e%60)}`},ny=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),iy=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),oy=e=>{const t=(new Date).getTime(),r=new Date(e).getTime(),n=(r-t)/6e4;let i=ny.format(Math.round(n),"minutes");return n<=-60&&(i=ny.format(Math.ceil(n/60),"hours"),n<=-1440&&(i=iy.format(r))),"cette minute-ci"===i?"à l'instant":i};function ay(e,t=!0){const r=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0");let i=e.getFullYear();return t||(i=Number(e.getFullYear().toString().slice(2))),`${r}/${n}/${i}`}function sy(e){const[t,r,n]=e.split("-");return`${n}/${r}/${t.slice(-2)}`}const ly=({updatedAt:t,...r})=>e.createElement(Ei,{...r,...t&&{updatedAt:oy(t)}}),cy=({draftContent:t,pageEndpoint:r,imgEndpoint:n,withCmp:i=!0})=>{const o=e.useRef(null);return e.useEffect(()=>{const e=Gb({rawDraftContent:t,pageEndpoint:r,imgEndpoint:n,withCmp:i}),a=document.createRange().createContextualFragment(e);o.current&&(o.current.innerHTML="",o.current.appendChild(a))},[t]),e.createElement(Vr,{ref:o,mt:"s",className:"c-content"},Wb({rawDraftContent:t,pageEndpoint:r,imgEndpoint:n,withCmp:i}))},uy=".c-search-form__autocomplete",dy=({isSSR:t=!0,layout:r,searchFormProps:n,breadcrumbProps:i,selectProps:o})=>{const[a,s]=e.useState([]),l=e.useCallback(()=>{const e=document.querySelector(uy);a&&a.length>0&&e&&e.classList.remove("u-hidden")},[a]),c=e.useCallback(()=>{const e=document.querySelector(uy);a&&a.length>0&&e&&e.classList.remove("u-hidden")},[a]),u=e.useCallback(e=>{e.relatedTarget||document.querySelector(uy)?.classList?.add("u-hidden")},[]),d=e.useCallback(async e=>{if(e.target instanceof HTMLInputElement){const{target:t}=e;if(t.value.length<3)s([]);else try{const e=await Zt({url:`${t.closest("form")?.action??"#"}?searchValue=${t.value}`});s(e.map(e=>{const{_source:t}=e;return{value:t.output,url:t.url}}))}catch(e){console.error("20mn> Error while searching:",e)}}},[s]);return e.useEffect(()=>{wt()},[]),e.useEffect(()=>{const e=document.querySelector(uy);a&&e&&(a.length>0?e.classList.remove("u-hidden"):e.classList.add("u-hidden"))},[a]),e.createElement(e.Fragment,null,e.createElement(qi,{layout:r,breadcrumbProps:i,selectProps:o,searchFormProps:{...n,autocompleteResults:a,onSubmit:e=>{e.preventDefault()},inputProps:{placeholder:"Rechercher les résultats d'une ville, d'une circonscription, d'un département ou d'une région",name:"elections-search",onClick:l,onFocus:c,onBlur:u,onKeyUp:d,autoComplete:"off",required:!0,"aria-required":!0}}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsSearchBannerContainer:{layout:r,searchFormProps:n,breadcrumbProps:i,selectProps:o}})} };`}}))},fy=t=>{const{variablesForQuery:r,...n}=t;return e.createElement(si,{...n,headingProps:{...n.headingProps,as:"h2"},mb:"xxl"})},py=({layout:t,title:r,editions:n,selectorsLabel:i,editionSelector:o,monthSelector:a,variant:s="archivesByYear",enabled:l=!0})=>l?e.createElement(e.Fragment,null,e.createElement(Er,{my:{xs:"xl",md:"xxl-2"},color:"ultramarine"}),e.createElement(un,{size:"xs",mb:"xxl"},r),e.createElement(Kr,{alignItems:{xs:"start",md:"center"},gap:{xs:"xs",md:"l"},direction:{xs:"column",md:"row"}},e.createElement(dn,{size:"s",weight:"bold",...i}),e.createElement(tn,{...o,id:"archivePdfListEditionSelector",containerProps:{style:{width:t===Qt.MOBILE?"100%":"163px"}},py:"m",px:"s"}),"archivesByYear"===s&&a&&e.createElement(tn,{...a,id:"archivePdfListMonthSelector",containerProps:{style:{width:t===Qt.MOBILE?"100%":"193px"}},py:"m",px:"s"})),n&&n.length>0&&e.createElement(Kr,{direction:"column",gap:"l",mt:"l"},n.slice(0,20).map(t=>e.createElement(Kr,{key:t.name,alignItems:"baseline"},e.createElement(kr,{name:"diode",color:"ultramarine",size:11,mr:"xxs"}),e.createElement(Gr,{color:"ultramarine",href:t.href},t.name))),n.length>20&&e.createElement(dn,{as:"span"},"Vous ne trouvez pas le journal numérique recherché ? Sélectionnez une édition et un mois pour une recherche plus précise."))):null,my=e=>e?e.rightSubheader&&Boolean(new Date(e.rightSubheader?.text).getTime())?{...e,rightSubheader:{...e.rightSubheader,text:oy(e.rightSubheader.text)}}:{...e}:e,hy=({articles:t,layout:r,columnsNumber:n=2,hideFirstDivider:i=!1,dividerProps:o,seeMoreButton:a,seeMoreLink:s,tagTotalArticles:l,currentPagePath:c,currentPage:u="1",articlesLimit:d,hasCardLarge:f=!1,hasMarginOnCard:p=!0,heading:m,...h})=>{if(0===t.length)return null;const g=t=>e.createElement(Bn,{...t,cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps),mx:p?"m":void 0});let v=null;v=r===Qt.DESKTOP?e.createElement(Ur,{colsNumber:n,gap:"xl"},t.slice(0,d).map((t,r)=>{const{layout:n,...i}=t;return e.createElement(Vn,{key:t.title,...i,className:`card-item-${r+1}`,cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps)})})):e.createElement(e.Fragment,null,t.slice(0,d).map((t,n)=>e.createElement(Vr,{key:t.title,className:`card-item-${n+1}`},f?e.createElement(e.Fragment,null,0===n&&e.createElement(jn,{...t,layout:r}),n>0&&e.createElement(e.Fragment,null,e.createElement(Er,{color:"grey-200",my:"s",...o}),g({...t,layout:r}))):e.createElement(e.Fragment,null,e.createElement(Er,{color:"grey-200",my:"s",...o,className:Xb({"u-hidden":0===n&&i},o?.className)}),g({...t,layout:r})))));const b=e.createElement(e.Fragment,null,m&&e.createElement(un,{size:"m",mb:"xl",mx:{xs:"m",md:"0"},...m}),v,(s||a)&&e.createElement(Kr,{justifyContent:"center",mt:"l"},a&&e.createElement(_r,{variant:"secondary",...a}),s&&e.createElement(Gr,{variant:"secondary",...s}),l&&c&&e.createElement("noscript",null,e.createElement(Ii,{totalArticles:l,currentPage:u,pagePath:c,archivesUrl:"https://www.20minutes.fr/archives"}))));return 0===Object.keys(h).length?b:e.createElement(Vr,{...h},b)},gy=({header:{subtitle:t,...r},sectionId:n,liveIndicator:i,children:o,...a})=>{const s=t&&"string"!=typeof t?Wb({rawDraftContent:t}):t;return e.createElement(Vr,{...a,id:n,className:Xb({"u-anchor-link":Boolean(n)})},i&&e.createElement(ly,{...i,variant:"elections",mx:{xs:"m",md:"0"},mb:"xs"}),r?.heading?.children&&e.createElement(hi,{...r,subtitle:s,mb:{xs:"m",sm:"xl"}}),o)},vy=({articles:t,selectProps:r,seeMoreLink:n,layout:i,...o})=>{const{variablesForQuery:a,...s}=o,l=e.createElement(e.Fragment,null,e.createElement(vi,{as:"h2",size:{xs:"s",md:"m"},isCentered:i===Qt.MOBILE,mb:{xs:"l",md:"0"},iconProps:{name:"rubric-news",size:40}},"Actualité locale"),e.createElement(tn,{...r})),c=t=>e.createElement(Vn,{key:t.title,...t,cardTitleProps:{as:"h3",size:"xxs",weight:"semi-bold",fontFamily:"source-serif-pro",maxRows:4,...t.cardTitleProps},socialBarProps:void 0});return e.createElement(Vr,{...s},e.createElement(xr,{mb:"l"}),i===Qt.DESKTOP?e.createElement(Kr,{justifyContent:"between",mb:"xl",alignItems:"center"},l):e.createElement(Vr,{mx:"m",mb:"l"},l),i===Qt.DESKTOP?e.createElement(Ur,{colsNumber:4,gap:"xl",mx:i===Qt.DESKTOP?"0":"m"},t.map(e=>c(e))):e.createElement(Kr,{direction:"column",mx:"m"},t.map((r,n)=>e.createElement(e.Fragment,{key:r.title},c(r),n<t.length-1&&e.createElement(Er,{color:"grey-200",my:"s"})))),e.createElement(Kr,{justifyContent:"center",mt:"xxl"},e.createElement(Gr,{variant:"secondary",...n},"Voir plus d'articles")))},by=({post:t,postIndex:r,postsCount:n,pageEndpoint:i,imgEndpoint:o,layout:a,disableAds:s=!1,enableAnchoring:l=!0})=>e.createElement("section",{className:Xb("js-post",{"u-anchor-link":l}),...l?{id:`post-${t.id}`}:{},key:t.id},e.createElement(ki,{...t.title}),t.content&&e.createElement(cy,{draftContent:t.content,pageEndpoint:i,imgEndpoint:o}),t.talk&&e.createElement(xi,{...t.talk,mt:"s"}),e.createElement(Er,{color:"grey-200",my:"l"}),!s&&n>=4&&r%6==3&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isFullscreenMobile:!0}),!s&&n>=8&&r%6==0&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isFullscreenMobile:!0})),yy=({post:t,postIndex:r,postsCount:n,pageEndpoint:i,imgEndpoint:o,layout:a,disableAds:s=!1,enableAnchoring:l=!0})=>e.createElement("section",{className:Xb("js-post",{"u-anchor-link":l}),...l?{id:`post-${t.id}`}:{},key:t.id},e.createElement(ki,{...t.title}),t.content&&e.createElement(cy,{draftContent:t.content,pageEndpoint:i,imgEndpoint:o}),t.talk&&e.createElement(xi,{...t.talk,mt:"s"}),e.createElement(Er,{color:"grey-200",my:"l"}),!s&&n>=4&&r%6==3&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isFullscreenMobile:!0}),!s&&n>=8&&r%6==0&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isFullscreenMobile:!0})),_y=({posts:t,layout:r,pageEndpoint:n,imgEndpoint:i,seeMoreLink:o,disableAds:a,enableAnchoring:s=!0,...l})=>{const{variablesForQuery:c,refreshButton:u,...d}=l;return 0===t.length?null:e.createElement(e.Fragment,null,e.createElement(Vr,{...d,"data-state":u?.state,"data-latest-post-id":u?.latestPostId,"data-brand-id":c?.brandId,"data-live-id":c?.liveId},t.map((o,l)=>e.createElement(yy,{key:o.id,post:o,postIndex:l,postsCount:t.length,layout:r,pageEndpoint:n,imgEndpoint:i,disableAds:a,enableAnchoring:s}))),o&&e.createElement(Kr,{justifyContent:"center",my:"l"},e.createElement(_r,{variant:"secondary",...o})))},wy=({items:t,seeMoreButton:r,...n})=>t.length<=0?null:e.createElement(e.Fragment,null,e.createElement(Vr,{...n},t.map((r,n)=>{const{summaryProps:i,...o}=r;return e.createElement(e.Fragment,null,e.createElement(Kn,{key:o.link,...o,summaryProps:o.layout!==Qt.MOBILE?i:void 0,mb:"m",ml:{xs:"m",md:"0"}}),n!==t.length-1&&e.createElement(Er,{color:"grey-200",my:"s"}),2===n&&o.layout===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),7===n&&o.layout===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(2===n||7===n)&&o.layout===Qt.MOBILE&&e.createElement(Er,{color:"grey-200",my:"s"}))})),r&&e.createElement(Kr,{justifyContent:"center",mb:"m"},e.createElement(_r,{variant:"secondary",...r}))),Ey=({...t})=>{const{variablesForQuery:r,...n}=t;return e.createElement(to,{...n})},Sy=({items:t,layout:r,seeMoreButton:n,...i})=>t.length<=0?null:e.createElement(e.Fragment,null,e.createElement(Kr,{direction:"column",gap:"xxl-2",...i},t.map((t,n)=>e.createElement(e.Fragment,null,5===n&&r===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),e.createElement(Gn,{key:t.link,...t,layout:r,containerSpacing:{px:{xs:"m",lg:"0"}}})))),n&&e.createElement(Kr,{justifyContent:"center",mt:"xl"},e.createElement(_r,{variant:"secondary",...n})),r===Qt.DESKTOP&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_desktop/divers/ban_btf",variant:"BAN"}),r===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"BAN",mt:"xl"})),xy=({articles:t,layout:r,totalArticles:n,currentPagePath:i,currentPage:o="1",seeMoreButton:a,...s})=>{if(0===t.length)return null;const l=e.createElement(Ur,{colsNumber:1,gap:{xs:"xxl",md:"xxl-2"}},t.map((t,n)=>r===Qt.DESKTOP?e.createElement(Zn,{key:t.title,...t,className:Xb(`card-item-${n+1}`,t.className),cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps)}):e.createElement(Rn,{key:t.title,layout:r,...t,className:Xb(`card-item-${n+1}`,t.className),cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps)}))),c=e.createElement(e.Fragment,null,l,a&&e.createElement(e.Fragment,null,n&&i&&e.createElement("noscript",null,e.createElement(Ii,{totalArticles:n,currentPage:o,pagePath:i,archivesUrl:"https://www.20minutes.fr/archives"})),e.createElement(Kr,{justifyContent:"center",mt:"xxl"},e.createElement(_r,{variant:"secondary",...a}))));return 0===Object.keys(s).length?c:e.createElement(Vr,{...s},c)},Ny=()=>{document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach(e=>{(e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)})(e)})};var ky=(e=>(e.Article="Article",e.ExternalContent="ExternalContent",e.Live="Live",e.Page="Page",e.Story="Story",e))(ky||{}),Cy=(e=>(e.bold="bold",e.community="community",e.default="default",e.faq="faq",e.important="important",e.very_important="very_important",e))(Cy||{}),Ty=(e=>(e.closed="closed",e.open="open",e))(Ty||{}),Ay=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(Ay||{}),Ly=(e=>(e.CREATED_AT="CREATED_AT",e.EXPECTATION_LEVEL="EXPECTATION_LEVEL",e.RELEASE_DATE="RELEASE_DATE",e.TITLE_FR="TITLE_FR",e))(Ly||{}),Dy=(e=>(e.ASC="ASC",e.DESC="DESC",e))(Dy||{});const Py=({medias:e,imgEndpoint:t})=>{const r=e?.find(e=>e&&!0===e.illustration&&e.type===Ay.photo&&e.photo?.node?.id);if(!r?.photo?.node?.id)return"";const n=r.photo?.node?.slug?`%format_${r.photo.node.slug}`:"%format";return`${t}/${Ub(r.photo.node.id)}/${n}`},Oy=({medias:e,picto:t,editorialModel:r})=>{if(r===ky.Story)return{caption:{iconName:"diaporama"}};let n;if(t)switch(t){case"video":if(r!==ky.Page){const t=e?.find(e=>e&&!0===e?.illustration&&e?.type===Ay.video&&e[Ay.video]?.duration)?.video?.duration;return{caption:{iconName:"video",text:t?ry(Number(t)):""}}}break;case"podcast":return{caption:{iconName:"podcast"}};default:return n}else e?.forEach(e=>{if("podcast"===e?.type&&(n={caption:{iconName:"podcast"}}),"video"===e?.type&&r!==ky.Page){const t=e?.video?.duration?Number(e?.video?.duration):null;n={caption:{iconName:"video",text:t?ry(t):""}}}});return n},Iy=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery?.endCursor||null),[i,o]=e.useState(t.defaultVariablesForQuery?.hasNextPage||!1),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getTvReplaysOrExtracts&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery?.brandId,slug:t.defaultVariablesForQuery?.slug,first:8,after:r,filter:{publication_status:{eq:"published"},...t.defaultVariablesForQuery?.tagId?{tag_ids:{nin:[t.defaultVariablesForQuery.tagId]}}:{}}}))}`,options:{headers:i}}];try{const e=await Zt(...a),r=(({pageEndpoint:e,imgEndpoint:t,layout:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((n,i)=>i?.node?.short_title&&i?.node?.medias&&i?.node?.url_current?(n.push({title:i.node.short_title,cardImageProps:{cover:Py({medias:i.node.medias,imgEndpoint:t}),caption:{iconName:"video",text:i?.node?.video?.node?.duration?.toString()?ry(parseInt(i.node.video.node.duration.toString(),10)):void 0}},link:new URL(i.node.url_current,e).href,layout:r,...r===Qt.MOBILE&&{reverseCard:!0}}),n):n,[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,layout:t.layout,data:e});s(e=>[...e,...r]),n(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},My=({isSSR:t=!0,name:r,layout:n,articles:i,variablesForQuery:o,seeMoreButton:a,...s})=>{if(0===i.length)return null;const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=Iy({layout:n,defaultArticles:i,defaultVariablesForQuery:o});return e.useEffect(()=>{l||Ny()},[l]),e.createElement(e.Fragment,null,e.createElement(hy,{layout:n,articles:c,seeMoreButton:a&&u?{...a,disabled:l,onClick:d}:void 0,...s}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[`${r}TvExtractsAndReplaysContainer`]:{layout:n,articles:c,variablesForQuery:o,seeMoreButton:a,...s}})} };`}}))},qy=e=>{switch(e){case"FRA":return"Nationale";case"BOR":return"Bordeaux";case"LIL":return"Lille";case"MAR":return"Marseille";case"MON":return"Montpellier";case"NAN":return"Nantes";case"NIC":return"Nice";case"PAR":return"Paris";case"REN":return"Rennes";case"STR":return"Strasbourg";case"TOU":return"Toulouse";default:return""}},Ry=e=>{const t=e.slice(0,4),r=e.slice(4,6),n=e.slice(6,8),i=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"][parseInt(r,10)-1];return`${parseInt(n,10)} ${i} ${t}`},Fy="archivePdfListEditionSelector",By="archivePdfListMonthSelector",zy=({isSSR:t=!0,variablesForQuery:r,layout:n,title:i,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,enabled:c})=>{const[u,d]=e.useState(l),f=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const n=document.getElementById(Fy),i=document.getElementById(By),o=[{url:`${e}/?id=getPdfsByEditionSlug&variables=${encodeURIComponent(JSON.stringify({brandId:r?.brandId,slug:n?.value,first:100,sort:"ASC",year:r?.year,month:i?.value}))}`,options:{headers:t}}];try{const e=(({data:e})=>{const t=[];return Array.isArray(e)||e?.brand?.node?.edition?.node?.pdfs?.edges?.forEach(e=>{e?.node?.url&&e?.node?.publication_date&&t.push({href:e?.node?.url,name:`Lire le journal du ${Ry(e?.node?.publication_date)} - édition ${qy(e.node.url.match(/[0-9]{8}_([A-Z]{3})\.pdf/)?.[1]??"")}`})}),t})({data:await Zt(...o)});d(e)}catch(e){console.error("20mn> Error while searching:",e)}},[d]);return e.createElement(e.Fragment,null,e.createElement(py,{title:i,selectorsLabel:o,editionSelector:{...a,onChange:f},monthSelector:s&&{...s,onChange:f},editions:u,layout:n,enabled:c}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({archivePdfListContainer:{title:i,layout:n,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,variablesForQuery:r,enabled:c}})} };`}}))},jy=e=>e?sr.find(t=>e.includes(t)):void 0,Hy=e=>null!=e,Vy=({pageEndpoint:e,imgEndpoint:t,data:r,hasSummary:n=!1})=>Array.isArray(r)?[]:(r?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((r,i)=>{if(!i?.node?.title||!i?.node?.label||!i?.node?.url||!i?.node?.medias&&!i?.node?.photo?.node)return r;const o=i?.node?.editorial_model===ky.Story;let a=i.node.medias?i.node.medias.filter(Hy):[];return o&&i?.node?.photo?.node&&(a=[{type:Ay.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),r.push({link:new URL(i.node.url,e).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Py({medias:a,imgEndpoint:t}),...Oy({medias:a,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},cardHeaderProps:{headline:{text:i.node.label,color:jy(i?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:i.node.published_at||""}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},socialBarProps:{disableComment:!o&&!i.node.enable_comments,variant:"card",contentLink:new URL(i.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:i.node.comments_count??0,shareCount:i.node.facebook_count??0,contentId:i.node?.legacy_id?.toString()},...n&&{summaryProps:{children:i.node.lead}}}),r},[]),Uy=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]);return e.useEffect(()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const l=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...l),t=Vy({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e}),r={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),n(r.endCursor),o(r.hasNextPage),window?.localStorage.setItem("aticles-container-data",JSON.stringify(r)),It()}catch(e){console.error("20mn> Error while loading articles:",e)}})()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{(()=>{const e=document.getElementById("article-list-bottom-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(It(),t.unobserve(e.target))})}),r=e.querySelector(".card-item-1");r&&t.observe(r);const n=e.querySelector(".card-item-8");n&&t.observe(n);const i=e.querySelector(".card-item-16");i&&t.observe(i)})();const e=window?.performance?.getEntriesByType("navigation").map(e=>e.type).includes("back_forward");if(e){const e=At("aticles-container-data");e&&Object.hasOwn(e,"articles")&&Object.hasOwn(e,"endCursor")&&Object.hasOwn(e,"hasNextPage")&&(s(e.articles),n(e.endCursor),o(e.hasNextPage),It())}else window?.localStorage.removeItem("aticles-container-data")},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Ky=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l})=>{const{isLoading:c,articles:u,hasNextPage:d,onLoadMore:f}=Uy({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect(()=>{c||Ny()},[c]);const p=u.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return e.createElement(e.Fragment,null,e.createElement(hy,{layout:r,articles:p,seeMoreButton:d?{...o,disabled:c,onClick:f}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({articleListBottomContainer:{layout:r,articles:p,variablesForQuery:i,seeMoreButton:o}})} };`}}))},$y="20mnBreakingNews",Gy=18e4,Wy=()=>{const[t,r]=e.useState(!1),[n,i]=e.useState(At($y));e.useEffect(()=>{n&&localStorage.setItem($y,JSON.stringify(n))},[n]),e.useEffect(()=>{t&&document&&document.querySelectorAll("#c-alert-info 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&&(t=e.target.closest("a")?.href||""),Ot({name:"content",type:"action",customProps:{cta_context:"smartbanner_alert",cta_type:"link",cta_destination:t,cta_engagement:2}}),window.location.href=t})})},[t]),e.useEffect(()=>{if(Object.keys(n??{}).includes("opened")&&i(e=>({open:e?.opened??!1,time:e?.time,data:e?.data})),n?.time&&n.time+Gy>(new Date).getTime())return void(n.open&&r(!0));const{apiHost:e,imgHost:t}=document.body.dataset,o=new Headers;window.envVariables?.apiAuthKey&&o.append("auth-key",window.envVariables.apiAuthKey);Zt(...[{url:`${e}/?id=getBreakingNews&variables=%7B%22brandId%22%3A%22QnJhbmQ6MjBtaW51dGVz%22%7D`,options:{headers:o}}]).then(e=>{const o=e?.brand?.node?.home?.node?.homeBreakingNews?.node,a=o?.content?.editorial_model?.toLowerCase(),s=o?.content?.[a]?.node;if(!s?.title||!s?.url_current)return void r(!1);const l=o.custom_title??s.title;let c;if(o?.with_photo&&s?.medias?.[0]?.photo?.node?.id){const e=atob(s.medias[0].photo.node.id).replace("Photo:","");c=`${t}/${e}/147x96_${s?.medias?.photo?.node?.slug??"media"}`}const u=!n||n.data?.description!==l||n.open;i({open:u,time:(new Date).getTime(),data:{description:l,url:s.url_current,imageUrl:c}}),r(u)}).catch(e=>{console.error("20mn> Error while loading the breaking news:",e)})},[]);return t&&n?.data?e.createElement(pn,{title:"ALERTE INFO",description:n.data.description,cover:n.data.imageUrl,link:n?.data?.url?{href:n.data.url}:void 0,closeButton:{onClick:()=>{i(e=>({...e||{},open:!1})),r(!1)}}}):null},Zy=({mapConstituenciesProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerDistrict.length||0===Object.keys(t.mapDistrictsData||{}).length?null:e.createElement(gy,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(Li,{...t,mx:{xs:"m",md:"0"}})),Qy=t=>{const[r,n]=e.useState(t.defaultMapConstituenciesProps);return e.useEffect(()=>{(async()=>{try{const e=await Zt({url:"https://static.20mn.fr/elections/map-districts.json"});n(t=>({...t,mapDistrictsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}})(),wt(),Ct()},[]),e.useMemo(()=>({mapConstituenciesProps:r}),[r])},Jy=({isSSR:t=!0,mapConstituenciesProps:r,...n})=>{const{mapConstituenciesProps:i}=Qy({defaultMapConstituenciesProps:r});return e.createElement(e.Fragment,null,e.createElement(Zy,{mapConstituenciesProps:t?{electionName:"",electionYear:"",resultsPerDistrict:[],mapDistrictsData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsConstituenciesMapContainer:{mapConstituenciesProps:r,...n}})} };`}}))},Yy=({mapDepartmentsProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerDepartment.length?null:e.createElement(gy,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(Ti,{...t,mx:{xs:"m",md:"0"}})),Xy=t=>{const[r,n]=e.useState(t.defaultMapDepartmentsProps);return e.useEffect(()=>{(async()=>{try{const e=await Zt({url:"https://static.20mn.fr/elections/map-departments.json"});n(t=>({...t,mapDepartmentsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}})()},[]),e.useMemo(()=>({mapDepartmentsProps:r}),[r])},e_=({isSSR:t=!0,mapDepartmentsProps:r,...n})=>{const{mapDepartmentsProps:i}=Xy({defaultMapDepartmentsProps:r});return e.createElement(e.Fragment,null,e.createElement(Yy,{mapDepartmentsProps:t?{electionName:"",electionYear:"",resultsPerDepartment:[],mapDepartmentsData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsDepartmentsMapContainer:{mapDepartmentsProps:r,...n}})} };`}}))},t_=({mapEuropeProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerCountry.length||0===Object.keys(t.mapEuCountriesData||{}).length||0===Object.keys(t.mapNonEuCountriesData||{}).length?null:e.createElement(gy,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(Pi,{...t,mx:{xs:"m",md:"0"}})),r_=t=>{const[r,n]=e.useState(t.defaultMapEuropeProps);return e.useEffect(()=>{(async()=>{try{const e=await Promise.all([Zt({url:"https://static.20mn.fr/elections/map-eu-countries.json"}),Zt({url:"https://static.20mn.fr/elections/map-non-eu-countries.json"})]);n(t=>({...t,mapEuCountriesData:e[0],mapNonEuCountriesData:e[1]}))}catch(e){console.error("20mn> Error while loading map data:",e)}})()},[]),e.useMemo(()=>({mapEuropeProps:r}),[r])},n_=({isSSR:t=!0,mapEuropeProps:r,...n})=>{const{mapEuropeProps:i}=r_({defaultMapEuropeProps:r});return e.createElement(e.Fragment,null,e.createElement(t_,{mapEuropeProps:t?{electionName:"",electionYear:"",resultsPerCountry:[],mapEuCountriesData:{},mapNonEuCountriesData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsEuropeanMapContainer:{mapEuropeProps:r,...n}})} };`}}))},i_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getUserBackArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,userBackId:t.defaultVariablesForQuery.userBackId,first:10,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...a),t=(({pageEndpoint:e,imgEndpoint:t,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,n)=>{if(!n?.node?.title||!n?.node?.label||!n?.node?.url||!n?.node?.medias&&!n?.node?.photo?.node)return r;const i=n?.node?.editorial_model===ky.Story;let o=n.node.medias?n.node.medias.filter(Hy):[];return i&&n?.node?.photo?.node&&(o=[{type:Ay.photo,illustration:!0,photo:n.node.photo,legend:n.node.photo.node?.caption}]),r.push({link:new URL(n.node.url,e).href,title:n.node.short_title||n.node.title,cardImageProps:{cover:Py({medias:o,imgEndpoint:t}),...Oy({medias:o,picto:n?.node?.picto,editorialModel:n?.node.editorial_model})},cardHeaderProps:{headline:{text:n.node.label,color:jy(n?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:n.node.published_at||""}},cardTitleProps:{cartridge:"Live"===n?.node?.editorial_model?"live":void 0},socialBarProps:{disableComment:!i&&!n.node.enable_comments,variant:"card",contentLink:new URL(n.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:n.node.comments_count??0,shareCount:n.node.facebook_count??0,contentId:n.node?.legacy_id?.toString()}}),r},[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s(e=>[...e,...t]),n(e?.brand?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},o_=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c})=>{if(0===n.length)return null;const{isLoading:u,articles:d,hasNextPage:f,onLoadMore:p}=i_({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect(()=>{u||Ny()},[u]);const m=d.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return e.createElement(e.Fragment,null,e.createElement(hy,{layout:r,articles:m,seeMoreButton:f?{...o,disabled:u,onClick:p}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({journalistArticleListContainer:{layout:r,articles:m,variablesForQuery:i,seeMoreButton:o,heading:c}})} };`}}))},a_=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"}),s_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,sourceExcluded:t.defaultVariablesForQuery.sourceExcluded,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...a),t=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,i)=>{if(!(i?.node?.title&&i?.node?.label&&i?.node?.url&&i?.node?.published_at&&(i?.node?.medias||i?.node?.photo?.node)))return n;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=[{type:Ay.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),n.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Py({medias:o,imgEndpoint:r}),...Oy({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},socialBarProps:{commentCount:i.node.comments_count??0,shareCount:(i.node.facebook_count??0)+(i.node.pinterest_count??0),contentId:i.node?.legacy_id?.toString(),contentLink:new URL(i.node.url,t).href,commentAnchor:"mbrs-comments-container"},cardHeaderProps:{headline:{text:i.node.label,color:jy(i?.node?.rubric?.node?.themeColor?.node?.slug)},liveTime:a_.format(new Date(i.node.published_at).getTime()).replace(":","H")},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},summaryProps:{children:i?.node?.lead??""},layout:e}),n},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s(e=>[...e,...t]),n(e?.brand?.node?.publishableContents?.pageInfo?.endCursor??null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage??!1),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{(()=>{const e=document.getElementById("latest-articles-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(It(),t.unobserve(e.target))})}),r=e.querySelectorAll(".c-card-container")[10];r&&t.observe(r);const n=e.querySelectorAll(".c-card-container")[20];n&&t.observe(n)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},l_=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,articles:s,hasNextPage:l,onLoadMore:c}=s_({defaultArticles:n,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Ny()},[a]),e.createElement(e.Fragment,null,e.createElement(ey,{layout:r,articles:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestArticlesContainer:{layout:r,articles:s,variablesForQuery:i,seeMoreButton:o}})} };`}}))},c_=t=>{const[r,n]=e.useState(t.defaultArticles),i=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,first:t.variablesForQuery.first}))}`,options:{headers:r}}];try{const e=await Zt(...i),t=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,i)=>{if(!(i?.node?.title&&i?.node?.url&&i?.node?.medias&&i?.node?.rubric?.node?.label))return n;if(!i?.node?.medias.length&&!i?.node?.photo?.node)return n;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=[{type:Ay.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),n.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Py({medias:o,imgEndpoint:r}),...Oy({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model}),lazyLoad:!0},cardHeaderProps:{headline:{text:i?.node?.label||i.node.rubric.node.label,color:jy(i?.node?.rubric?.node?.themeColor?.node?.slug)}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0,as:"h3"},layout:e}),n},[]))({layout:window.layout,data:e,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint});n(t)}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{i()},[]),e.useMemo(()=>({articles:r}),[r])},u_=({isSSR:t=!0,articles:r,variablesForQuery:n,...i})=>{const{articles:o}=c_({defaultArticles:r,variablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(fy,{...i,articles:o,variablesForQuery:n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestContentsCarouselContainer:{articles:r,variablesForQuery:n,...i}})} };`}}))},d_=e=>{const t=[];return e.legalNotices.forEach(r=>{const n=r?.node;t.push({link:n?.external_id?new URL(`/al/${n?.external_id}`,e.legalNoticeEndpoint).href:"",title:n?.title??void 0,location:n?.legalNoticeDepartment?.node?.name||"",summaryProps:{children:n?.publishing_date?`Publié le ${ay(new Date(n.publishing_date),!1)}`:sy(new Date(Date.now()).toLocaleString())}})}),t},f_=e=>null!=e,p_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]);return e.useEffect(()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLegalNoticesFromDept&variables=${encodeURIComponent(JSON.stringify({slug:t.defaultVariablesForQuery.slug,first:10,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...a),t=e?.legalNotices?.edges?.filter(f_)??[],r=d_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...r]),n(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}})()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},m_=({isSSR:t=!0,variablesForQuery:r,legalNotices:n})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=p_({legalNotices:n,defaultVariablesForQuery:r});return e.useEffect(()=>{i||Ny()},[i]),e.createElement(e.Fragment,null,e.createElement(ty,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeDepartmentContainer:{legalNotices:o,variablesForQuery:r}})} };`}}))},h_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]);return e.useEffect(()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLegalNotices&variables=${encodeURIComponent(JSON.stringify({first:10,after:r}))}`,options:{headers:t}}];try{const e=await Zt(...i),t=e?.legalNotices?.edges?.filter(f_)??[],r=d_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...r]),n(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}})()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},g_=({isSSR:t=!0,variablesForQuery:r,legalNotices:n})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=h_({legalNotices:n,defaultVariablesForQuery:r});return e.useEffect(()=>{i||Ny()},[i]),e.createElement(e.Fragment,null,e.createElement(ty,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeHomeContainer:{legalNotices:o,variablesForQuery:r}})} };`}}))},v_=e=>{const t=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"});return{name:e.name,title:e.title,tabColor:e.tabColor,body:e.articleEdges.reduce((r,n)=>{if(n?.node?.title&&n?.node?.url&&n?.node?.rubric?.node?.slug&&n?.node?.rubric?.node?.label){const i={themeColor:n.node.rubric.node.themeColor?.node?.lightmode_color||void 0,rubricName:n?.node?.label||n.node.rubric.node.label,title:n?.node?.short_title||n.node.title,url:new URL(n.node.url,e.pageEndpoint).href,cartridge:n.node?.editorial_model===ky.Live&&n.node?.state===Ty.open?"live":void 0};"le-direct"===e.name&&n?.node?.published_at&&(i.liveTime=t.format(new Date(n.node.published_at).getTime()).replace(":","H")),r.push(i)}return r},[]).slice(0,e.limit)}},b_=t=>{const[r,n]=e.useState(t.defaultTabItems),i=async()=>{if(t.variablesForQuery.liveLimit&&t.variablesForQuery.mostReadLimit){const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLiveAndMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit}))}`,options:{headers:r}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:r,liveLimit:n,mostReadLimit:i})=>{if(Array.isArray(e))return[];const o=e?.brand?.node,a=o?.mostReadArticles?.edges,s=o?.liveArticles?.edges,l=[];if(s?.length){const e=v_({name:"le-direct",title:"Le direct",pageEndpoint:t,articleEdges:s,limit:n,tabColor:"red"});l.push(e)}if(a?.length){const e=v_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:a,limit:i});l.push(e)}return l})({data:await Zt(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit});n(e),wt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}};return e.useEffect(()=>{i()},[]),e.useMemo(()=>({tabItems:r}),[r])},y_=({isSSR:t=!0,layout:r,tabItems:n,variablesForQuery:i,...o})=>{const{tabItems:a}=b_({defaultTabItems:n,variablesForQuery:i});return e.createElement(e.Fragment,null,e.createElement(Ey,{...o,layout:r,tabItems:a,variablesForQuery:i,hasButton:!0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({liveAndMostReadContainer:{layout:r,tabItems:n,variablesForQuery:i}})} };`}}))},__=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{if(e.getCurrentUserStatus().purposes["activation-gGierZpp"]?.enabled){Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.add("u-hidden")});Array.from(document.getElementsByClassName("embed-wrapper")).forEach(e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})}else{Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.remove("u-hidden")})}})},w_=["nfb_1","nfb_2","article_btf","pave_com","pave_home","inread","pave_article","article_mtf","native_web"],E_=()=>{w_.forEach(e=>{const t=document?.querySelectorAll(`[id*=dfp_${e}]`)||[],r=document?.querySelectorAll(`[id=dfp_${e}]`)||[];let n=t.length-r.length;r.forEach(t=>{t.setAttribute("id",`dfp_${e}_${n}`),n+=1})})},S_=()=>{document.querySelectorAll(".embed-placeholder").forEach(e=>{e.addEventListener("click",e=>{const t=e.target;if(!(t instanceof HTMLElement&&t.closest(".cmp-button")))return;e.preventDefault(),window.didomiOnReady.push(()=>{(()=>{const e=window.Didomi.openCurrentUserStatusTransaction();e.enablePurpose("activation-gGierZpp"),window.sessionStorage.setItem("cmpModal","accepted"),e.commit(),__()})()});const r=t.closest("div.embed-placeholder");r&&r.focus()})})},x_=e=>{switch(e){case Cy.default:case Cy.important:case Cy.community:case Cy.faq:case Cy.bold:return e;case Cy.very_important:return"crucial";default:return"default"}},N_=(e,t)=>Array.isArray(e)?[]:(e?.brand?.node?.live?.node?.livePosts?.edges||[])?.reduce((e,r)=>{if(!r)return e;let n,i=r?.node?.content_md?.blocks;if(i){const e=[...i],t=e?.slice(-1);""===t?.[0]?.text&&"unstyled"===t?.[0]?.type&&(e.pop(),i=e)}return r?.node?.comment?.node&&(n={question:r.node.comment.node.content||"",author:r.node.comment.node.userFront?.node?.username||"",response:i?.[0]?.text}),e.push({cursor:r?.cursor||null,id:r.node.legacy_id,title:{status:x_(r?.node?.type),header:r?.node?.printed_hour||"",title:r?.node?.title||"",img:r?.node?.livePostLabel?.node&&t?{name:r.node.livePostLabel.node.slug||"",src:r.node.livePostLabel.node.logo?`${t}/${r.node.livePostLabel.node.logo}`:""}:void 0},content:n?void 0:{entityMap:{},...r?.node?.content_md,blocks:i??[]},talk:n}),e},[]),k_=e=>{const t=e.filter(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)));t.length&&t.forEach(({content:e})=>{Object.values(e?.entityMap||{}).forEach(({type:e,data:t})=>{if("iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)){const{js:e=[],css:r=[]}=t?.embedProps||{};e.length&&e.forEach((e,t)=>Ht({name:`embed_live-posts-${t}`,src:e,load:"async"})),r.length&&r.forEach(e=>{const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,document.head.appendChild(t)})}})})},C_=()=>{const{hash:e}=new URL(window.location.href),t=e.match(/#post-(\d+)/);return t?Number(t[1]):null},T_=async({first:e,after:t,filter:r,brandId:n,liveId:i})=>{const{apiHost:o}=document.body.dataset,a=new Headers;window.envVariables?.apiAuthKey&&a.append("auth-key",window.envVariables.apiAuthKey);const s=[{url:`${o}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:n,liveId:i,first:e,after:t,filter:r}))}`,options:{headers:a}}],l=await Zt(...s);return{nextPosts:N_(l,document.body.dataset.staticHost),pageInfo:l?.brand?.node?.live?.node?.livePosts?.pageInfo??null}},A_=async({batchSize:e,after:t,filter:r,brandId:n,liveId:i,accumulatedPosts:o,anchorPostId:a})=>{const{nextPosts:s,pageInfo:l}=await T_({first:100,after:t,filter:r,brandId:n,liveId:i}),c=[...o,...s],u=l?.endCursor??null,d=l?.hasNextPage??!1,f=c.findIndex(e=>e.id===a);if(-1!==f){const t=Math.ceil((f+1)/e)*e,r=t>c.length?c[c.length-1].cursor:c[t-1].cursor,n=c.length>t||d;return{nextPosts:c.slice(0,t),pageInfo:{endCursor:r,hasNextPage:n}}}return d&&u?A_({batchSize:e,after:t,filter:r,brandId:n,liveId:i,accumulatedPosts:c,anchorPostId:a}):{nextPosts:[],pageInfo:l}},L_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultPosts),[l,c]=e.useState(!1),[u,d]=e.useState(!1),f=e.useCallback(()=>{c(!0)},[]);return e.useEffect(()=>{C_()&&!document.getElementById(`post-${C_()}`)&&c(!0)},[]),e.useEffect(()=>{document.querySelector(`#tabpanel-le-direct #post-${C_()}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[u]),e.useEffect(()=>{l&&(async()=>{const e=C_(),i=t.defaultVariablesForQuery.first,{filter:a,brandId:l,liveId:c}=t.defaultVariablesForQuery;try{if(e&&!u&&a?.type?.eq!==Cy.very_important){const{nextPosts:t}=await A_({batchSize:i,after:r,filter:a,brandId:l,liveId:c,accumulatedPosts:[],anchorPostId:e});s(e=>[...e,...t]),d(Boolean(e)),k_(t)}else{const{nextPosts:e,pageInfo:t}=await T_({first:i,after:r,filter:a,brandId:l,liveId:c});n(t?.endCursor??null),o(t?.hasNextPage??!1),s(t=>[...t,...e]),k_(e)}It()}catch(e){console.error("20mn> Error while loading posts:",e)}})(),(e=>{const t=e.some(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&"idalgo"===t?.embedProps?.meta?.site&&"widget"===t?.embedProps?.meta?.type));t&&(window?.iDalgoLoader?window.iDalgoLoader.init():Ht({name:"widget_live-posts",src:"https://20minutes.idalgo-hosting.com/partners/i/cache/datasport/cache/page/r_js_jlu_url.php",load:"async"}))})(a),E_(),__()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{S_(),E_()},[a,r,l,i]),e.useMemo(()=>({isLoading:l,posts:a,hasNextPage:i,onLoadMore:f}),[l,a,i,f])},D_=e=>{const t=JSON.stringify(e).replaceAll("<\/script>","<\\\\/script>");return JSON.parse(t)},P_=e=>{const t=JSON.stringify(e).replaceAll("<\\\\/script>","<\/script>");return JSON.parse(t)},O_=({isSSR:t=!0,posts:r,variablesForQuery:n,seeMoreLink:i,staticHydrationDataName:o="livePostsContainer",disableAds:a,...s})=>{const{isLoading:l,posts:c,hasNextPage:u,onLoadMore:d}=L_({defaultPosts:r,defaultVariablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(_y,{...s,posts:c,variablesForQuery:n,disableAds:a,seeMoreLink:u?{...i,disabled:l,onClick:d}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[o]:{posts:D_(c),variablesForQuery:n,seeMoreLink:i,disableAds:a,...s}})} };`}}))},I_=()=>{const[t,r]=e.useState(null),[n,i]=e.useState(0),o=document.getElementById("tabpanel-le-direct"),a=document.getElementById("tabpanel-temps-forts");let s=o?.querySelector("div[data-state]")?.dataset?.latestPostId;const{state:l,brandId:c,liveId:u}=o?.querySelector("div[data-state]")?.dataset??{},d=()=>{const{apiHost:e}=document.body.dataset,t=new Headers;return window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey),[{url:`${e}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:c,liveId:u,first:20,filter:{status:{eq:"published"}}}))}`,options:{headers:t}}]},f=async()=>{const e=d();try{const t=await Zt(...e);let r=0;t?.brand?.node?.live?.node?.livePosts?.edges?.every(e=>e?.node?.legacy_id!==Number(s)&&(r+=1,!0)),i(r)}catch(e){console.error("20mn> Error while refreshing refresh button counter:",e)}},p=()=>{const e=document.querySelector('[data-tabs-name="live-tabs"]'),t=document.getElementById("tab-le-direct"),r=document.getElementById("tabpanel-le-direct");if(e){const n=e.querySelectorAll(".c-tab"),i=e.querySelectorAll(".c-tabpanel");n.forEach(e=>{e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),t&&(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),r&&r.setAttribute("aria-hidden","false")}};e.useEffect(()=>{l===Ty.open&&c&&s&&u?setInterval(f,6e4):console.info("Do not check for new post, live is either closed or miss information.")},[]),e.useEffect(()=>{if(r(n>0?`Actualiser (${n})`:"Actualiser"),window.layout!==Qt.MOBILE){const e=document.title.replace(/^\(\+?[0-9]+\) /,"");document.title=n>9?`(+${n}) ${e}`:n>0?`(${n}) ${e}`:e}},[n]);const m=e.useCallback(()=>{Ot({name:"refresh_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"}),(async()=>{p();const t=d();try{const r=[],n=[],i=await Zt(...t);let l=N_(i,document.querySelector("body")?.dataset.staticHost),c=0;if(l?.every(e=>e.id.toString()!==s&&(c+=1,!0)),0===c)return void window.location.reload();p();const u=document.getElementById("tabpanel-le-direct")?.querySelectorAll(".js-post").length||0,d=u+c;l=l.slice(0,c),l.reverse(),l?.every((t,i)=>{const o=i+u,a=ss.renderToStaticMarkup(e.createElement(by,{key:t.id,post:t,postIndex:o,postsCount:d,layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint}));return r.push(a),"crucial"===t.title.status&&n.push(a),!0});const f=a?.firstChild;if(f instanceof HTMLElement&&f.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=n.reverse().join("");e.lastChild;)f.prepend(e.lastChild)}const m=o?.firstChild;if(m instanceof HTMLElement&&m.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=r.reverse().join("");e.lastChild;)m.prepend(e.lastChild);const t=l.reverse()[0];if(t){const e=t.id.toString();s=e,o?.querySelector("div[data-state]")?.setAttribute("data-latest-post-id",e)}E_(),It()}}catch(e){console.error("20mn> Error while loading more live posts:",e)}})().then(()=>{i(0);const e=document.getElementById("live-posts-container")?.getBoundingClientRect();e&&window.scrollBy(0,e.top-100)})},[]);return t?e.createElement(Kr,{justifyContent:"center",mb:"xxl"},e.createElement(_r,{variant:"secondary",iconProps:{name:"refresh",size:22},onClick:m},t)):null},M_=e=>{let t;return e?.forEach(e=>{const r=[{title:"Ain",value:"ain"},{title:"Aisne",value:"aisne"},{title:"Allier",value:"allier"},{title:"Alpes-de-Haute-Provence",value:"alpes_de_haute_provence"},{title:"Alpes-Maritimes",value:"alpes-maritimes"},{title:"Ardèche",value:"ardeche"},{title:"Ardennes",value:"ardennes"},{title:"Ariège",value:"ariege"},{title:"Aube",value:"aube"},{title:"Aude",value:"aude"},{title:"Aveyron",value:"aveyron"},{title:"Bas-Rhin",value:"bas_rhin"},{title:"Bouches-du-Rhône",value:"bouches-rhone"},{title:"Calvados",value:"calvados"},{title:"Cantal",value:"cantal"},{title:"Charente",value:"charente"},{title:"Charente-Maritime",value:"charente-maritime"},{title:"Cher",value:"cher"},{title:"Correze",value:"correze"},{title:"Corse-du-Sud",value:"corse-sud"},{title:"Côte-d'Or",value:"cote_d_or"},{title:"Côtes-d'Armor",value:"cotes_d_armor"},{title:"Creuse",value:"creuse"},{title:"Deux-Sèvres",value:"deux-sevres"},{title:"Dordogne",value:"dordogne"},{title:"Doubs",value:"doubs"},{title:"Drôme",value:"drome"},{title:"Essonne",value:"essonne"},{title:"Eure",value:"eure"},{title:"Eure-et-Loir",value:"eure_et_loire"},{title:"Finistère",value:"finistere"},{title:"Gard",value:"gard"},{title:"Gers",value:"gers"},{title:"Gironde",value:"gironde"},{title:"Guadeloupe",value:"guadeloupe"},{title:"Guyane",value:"guyane"},{title:"Haut-Rhin",value:"haut-rhin"},{title:"Haute-Corse",value:"haute-corse"},{title:"Haute-Garonne",value:"haute-garonne"},{title:"Haute-Loire",value:"haute-loire"},{title:"Haute-Marne",value:"haute-marne"},{title:"Haute-Saône",value:"haute-saone"},{title:"Haute-Vienne",value:"haute-vienne"},{title:"Hautes-Alpes",value:"hautes-alpes"},{title:"Hautes-Pyrénées",value:"hautes_pyrenees"},{title:"Hauts-de-Seine",value:"hauts-de-seine"},{title:"Hérault",value:"herault"},{title:"Ille-et-Vilaine",value:"ille_et_vilaine"},{title:"Indre",value:"indre"},{title:"Indre-et-Loire",value:"indre-loire"},{title:"Isère",value:"isere"},{title:"Jura",value:"jura"},{title:"Landes",value:"landes"},{title:"Loir-et-Cher",value:"loir-cher"},{title:"Loire",value:"loire"},{title:"Loire-Atlantique",value:"loire-atlantique"},{title:"Loiret",value:"loiret"},{title:"Lot",value:"lot"},{title:"Lot-et-Garonne",value:"lot_et_garonne"},{title:"Lozère",value:"lozere"},{title:"Maine-et-Loire",value:"maine-et-loire"},{title:"Manche",value:"manche"},{title:"Marne",value:"marne"},{title:"Martinique",value:"martinique"},{title:"Mayenne",value:"mayenne"},{title:"Mayotte",value:"mayotte"},{title:"Meurthe-et-Moselle",value:"meurthe-et-moselle"},{title:"Meuse",value:"meuse"},{title:"Morbihan",value:"morbihan"},{title:"Moselle",value:"moselle"},{title:"Nièvre",value:"nievre"},{title:"Nord",value:"nord"},{title:"Oise",value:"oise"},{title:"Orne",value:"orne"},{title:"Paris",value:"paris"},{title:"Pas-de-Calais",value:"pas-de-calais"},{title:"Puy de Dôme",value:"puy-dome"},{title:"Pyrénées-Atlantiques",value:"pyrenees-atlantiques"},{title:"Pyrénées-Orientales",value:"pyrenees_orientales"},{title:"Rhône",value:"rhone"},{title:"Saône-et-Loire",value:"saone_et_loire"},{title:"Sarthe",value:"sarthe"},{title:"Savoie",value:"savoie"},{title:"Seine-et-Marne",value:"seine-et-marne"},{title:"Seine-Maritime",value:"seine_maritime-1"},{title:"Seine-Saint-Denis",value:"seine-saint-denis"},{title:"Somme",value:"somme"},{title:"Tarn",value:"tarn"},{title:"Tarn-et-Garonne",value:"tarn_et_garonne"},{title:"Territoire de Belfort",value:"territoire-belfort"},{title:"Val-d'Oise",value:"val_d_oise"},{title:"Val-de-Marne",value:"val-de-marne"},{title:"Var",value:"var"},{title:"Vaucluse",value:"vaucluse"},{title:"Vendée",value:"vendee"},{title:"Vienne",value:"vienne-france"},{title:"Vosges",value:"vosges"},{title:"Yonne",value:"yonne"},{title:"Yvelines",value:"yvelines"}].find(t=>t.value===e?.node?.slug);r&&(t=r)}),t?t.title:""},q_=t=>{const[r,n]=e.useState(t.defaultArticles),[i,o]=e.useState(!1),[a,s]=e.useState("locales"),[l,c]=e.useState(t.defaultSeeMoreLink.href),u=e.useCallback(e=>{s(e.target.value),o(!0)},[s,o]),d=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getHomeLocalNews&variables=${encodeURIComponent(JSON.stringify({...t.variablesForQuery,slug:a}))}`,options:{headers:r}}];try{const e=await Zt(...i),t=(({data:e,pageEndpoint:t})=>(e?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((e,r)=>{if(r?.node?.rubric?.node?.label&&r?.node?.title&&r?.node?.url&&r?.node?.tags?.edges){const n=r.node.tags.edges.filter(Hy);e.push({link:new URL(r.node.url,t).href,title:Pt(r?.node?.short_title||r.node.title),cardHeaderProps:{headline:{text:r?.node?.label||r.node.rubric.node.label},location:M_(n)},socialBarProps:{commentCount:r.node?.comments_count??0,shareCount:(r.node?.facebook_count??0)+(r.node?.pinterest_count??0),contentId:r.node?.legacy_id?.toString()}})}return e},[]))({data:e,pageEndpoint:window.envVariables.pageEndpoint});c(new URL(e?.brand?.node?.tag?.node?.url_current??"",window.envVariables.pageEndpoint).href),n(t)}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{i&&d()},[i]),e.useEffect(()=>{i&&o(!1),Mt()},[r]),e.useMemo(()=>({isLoading:i,articles:r,tagUrl:l,onDepartmentChange:u}),[r,i,l,u])},R_=({isSSR:t=!0,articles:r,variablesForQuery:n,seeMoreLink:i,selectProps:o,...a})=>{const{isLoading:s,articles:l,tagUrl:c,onDepartmentChange:u}=q_({defaultArticles:r,defaultSeeMoreLink:i,variablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(vy,{...a,articles:l,variablesForQuery:n,seeMoreLink:{href:c},selectProps:{...o,disabled:s,onChange:u}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({localNewsContainer:{articles:l,variablesForQuery:n,selectProps:o,seeMoreLink:i,...a}})} };`}}))},F_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.hasNextPage),[i,o]=e.useState(t.defaultItems),[a,s]=e.useState(!1),l=e.useCallback(()=>{s(!0)},[]),c=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostReadContents&variables=${encodeURIComponent(JSON.stringify({first:t.defaultVariablesForQuery.first,brandId:t.defaultVariablesForQuery.brandId,excludeModel:t.defaultVariablesForQuery.excludeModel,after:t.defaultVariablesForQuery.endCursor}))}`,options:{headers:r}}];try{const e=await Zt(...i),r=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n,lastNumber:i=0})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,o,a)=>{if(!(o?.node?.title&&o?.node?.label&&o?.node?.url&&o?.node?.published_at&&(o?.node?.medias||o?.node?.photo?.node)))return n;let s=o.node.medias??[];return"Story"===o?.node?.editorial_model&&o?.node?.photo?.node&&(s=[{type:Ay.photo,illustration:!0,photo:o.node.photo,legend:o.node.photo.node?.caption}]),n.push({link:new URL(o.node.url,t).href,title:o.node.title,cardImageProps:{cover:Py({medias:s,imgEndpoint:r})},cardHeaderProps:{headline:{text:o.node.label}},cardTitleProps:{cartridge:"Live"===o?.node?.editorial_model?"live":void 0},summaryProps:{children:o?.node?.lead??""},layout:e,cardNumber:{value:i+a+1,size:"medium"},viewCount:o?.node?.total_current_visits||0}),n},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e,lastNumber:t.defaultVariablesForQuery.first});o(e=>[...e,...r||[]]),n(!1),It()}catch(e){console.error("20mn> Error while loading contents:",e)}};return e.useEffect(()=>{a&&c()},[a]),e.useEffect(()=>{a&&s(!1)},[i]),e.useMemo(()=>({isLoading:a,items:i,hasNextPage:r,onLoadMore:l}),[a,i,r,l])},B_=({isSSR:t=!0,items:r,variablesForQuery:n,seeMoreButton:i})=>{const{isLoading:o,items:a,hasNextPage:s,onLoadMore:l}=F_({defaultItems:r,defaultVariablesForQuery:n});return e.useEffect(()=>{o||Ny()},[o]),e.createElement(e.Fragment,null,e.createElement(wy,{items:a,seeMoreButton:s?{...i,disabled:o,onClick:l}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mainMostReadContainer:{items:a,variablesForQuery:n,seeMoreButton:i}})} };`}}))},z_=t=>{const[r,n]=e.useState(t.defaultTabItems),i=async()=>{if(t.variablesForQuery.rubric){const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,rubricId:t.variablesForQuery.rubric.id}))}`,options:{headers:r}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:r,rubricSlug:n,rubricLabel:i})=>{if(Array.isArray(e))return[];const o=[],a=e?.brand?.node,s=a?.commonArticles?.edges,l=a?.rubricArticles?.edges;if(s?.length){const e=v_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:s,limit:5});o.push(e)}if(l?.length){const e=v_({name:`plus-lus-${n}`,title:`Les + lus ${i}`,pageEndpoint:t,articleEdges:l,limit:5});o.push(e)}return o})({data:await Zt(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,rubricSlug:t.variablesForQuery.rubric.slug,rubricLabel:t.variablesForQuery.rubric.label});n(e),wt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}};return e.useEffect(()=>{i(),qt()},[]),e.useMemo(()=>({tabItems:r}),[r])},j_=({isSSR:t=!0,layout:r,tabItems:n,variablesForQuery:i,...o})=>{const{tabItems:a}=z_({defaultTabItems:n,variablesForQuery:i});return e.createElement(e.Fragment,null,e.createElement(Ey,{layout:r,tabItems:a,variablesForQuery:i,...o}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mostReadContainer:{layout:r,tabItems:n,variablesForQuery:i,...o}})} };`}}))},H_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultMovies),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getMoviesData&variables=${encodeURIComponent(JSON.stringify({status:t.defaultVariablesForQuery.status,cursor:r,orderField:Ly.EXPECTATION_LEVEL,orderDirection:Dy.DESC}))}`,options:{headers:i}}];try{const e=await Zt(...a),{staticHost:t}=document.body.dataset,r=((e,t)=>Array.isArray(e)?[]:e?.movies?.edges?.map(e=>{const r=e?.node,n=r?.movieCastings?.edges?.find(e=>"Réalisateur"===e?.node?.position);return{link:r?.article_url||"#",title:r?.title_fr||"",cardImageProps:{cover:(r?.movieMedias?.edges?.length??0)>0?`${t}/movies/posters/${r?.movieMedias?.edges?.[0]?.node?.src?.replace("-%format","")??""}`:""},summary:r?.summary_short||"",castings:r?.movieCastings?.edges?.filter(e=>"cast"===e?.node?.type).map(e=>`${e?.node?.firstname} ${e?.node?.lastname}`)??[],genres:r?.genres?.filter(e=>null!==e)||[],directedBy:n?`${n?.node?.firstname} ${n?.node?.lastname}`:void 0,releaseDate:r?.release_date?ay(new Date(r.release_date)):"",seeMoreLink:{children:"Voir la fiche du film",href:r?.article_url||"#"}}})||[])(e,t);s(e=>[...e,...r||[]]),n(e?.movies?.pageInfo?.endCursor??null),o(e?.movies?.pageInfo?.hasNextPage??!1),It()}catch(e){console.error("20mn> Error while loading posts:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,items:a,hasNextPage:i,onLoadMore:u}),[l,a,i,u])},V_=({isSSR:t=!0,layout:r,items:n,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,items:s,hasNextPage:l,onLoadMore:c}=H_({defaultMovies:n,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Ny()},[a]),e.createElement(e.Fragment,null,e.createElement(Sy,{layout:r,items:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({moviesListContainer:{layout:r,items:s,variablesForQuery:i,seeMoreButton:o}})} };`}}))},U_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const l=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...l),t=(({pageEndpoint:e,imgEndpoint:t,data:r})=>Vy({pageEndpoint:e,imgEndpoint:t,data:r,hasSummary:!0}).map(e=>(delete e.socialBarProps,{...e,linkProps:{children:"Je participe","aria-label":"Je participe au quiz",href:e.link}})))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e}),r={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),n(r.endCursor),o(r.hasNextPage),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{(()=>{const e=document.getElementById("quiz-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(It(),t.unobserve(e.target))})}),r=e.querySelector(".card-item-1");r&&t.observe(r);const n=e.querySelector(".card-item-8");n&&t.observe(n);const i=e.querySelector(".card-item-16");i&&t.observe(i)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},K_=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,totalArticles:s})=>{const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=U_({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect(()=>{l||Ny()},[l]);const f=c.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return e.createElement(e.Fragment,null,e.createElement(xy,{layout:r,articles:f,seeMoreButton:u?{...o,disabled:l,onClick:d}:void 0,currentPagePath:a,totalArticles:s}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({quizContainer:{layout:r,articles:f,variablesForQuery:i,seeMoreButton:o}})} };`}}))},$_=(r,n)=>{const i=document.getElementById(r),o=n?window?.__staticHydrationData?.liveImportantPostsContainer:window?.__staticHydrationData?.livePostsContainer,a=n?"liveImportantPostsContainer":"livePostsContainer";if(i&&o){const r=t.createRoot(i);r&&r.render(e.createElement(O_,{isSSR:!1,staticHydrationDataName:a,...o,posts:P_(o?.posts),variablesForQuery:o.variablesForQuery}))}},G_=(e,t,r,n)=>{r?e.setAttribute(t,"true"):e.setAttribute(t,"false")},W_=(e,t,r)=>{t?e.classList.add(r):e.classList.remove(r)},Z_={"probleme-ordinateur":"Votre message. Veuillez préciser votre navigateur.","probleme-mobile":"Votre message. Veuillez préciser votre navigateur et l’appareil que vous utilisez.","probleme-app":"Votre message. Veuillez préciser l’appareil que vous utilisez."},Q_={"suppression-anonymisation":"Dans votre message, merci d'indiquer votre objet, nom / prénom, adresse mail et adresse URL vers l'article concerné si besoin.",jeux:"Ecrivez votre message en précisant votre appareil, le navigateur utilisé ainsi que les jeux concernés.",newsletter:"Ecrivez votre message en précisant la date et/ou le nom de la newsletter concernée.",accessibility:"Ecrivez votre message en précisant si nécessaire la/les page(s) ou le/es composant(s) concernés."};function J_(e){return{serviceSelect:e.querySelector("select#service"),subServiceSelect:e.querySelector("select#subservice"),subService:e.querySelector("select#subservice")?.parentElement?.parentElement,commonObjectSelect:e.querySelector("select#common-object"),commonObject:e.querySelector("select#common-object")?.parentElement?.parentElement,techObjectSelect:e.querySelector("select#tech-object"),techObject:e.querySelector("select#tech-object")?.parentElement?.parentElement,contentInput:e.querySelector("textarea#message"),sourceSelect:e.querySelector("select#source"),source:e.querySelector("select#source")?.parentElement?.parentElement,gamesObjectSelect:e.querySelector("select#games-object"),gamesObject:e.querySelector("select#games-object")?.parentElement?.parentElement,emailInput:e.querySelector("input[type=email]"),messageInput:e.querySelector("textarea#message")}}const Y_=(e,t,r)=>{const{subService:n,commonObject:i,techObject:o,gamesObject:a,source:s}=e,l="redaction"===t,c="service-technique"===t,u="jeux"===t;n&&(W_(n,r||!l,"u-mask"),G_(n,"aria-hidden",r||!l)),i&&(W_(i,r||!l,"u-mask"),G_(i,"aria-hidden",r||!l)),o&&(W_(o,r||!c,"u-mask"),G_(o,"aria-hidden",!c)),a&&(W_(a,r||!u,"u-mask"),G_(a,"aria-hidden",r||!u)),s&&(W_(s,r||!u,"u-mask"),G_(s,"aria-hidden",r||!u))},X_=(e,t)=>{e&&(G_(e,"required",t),G_(e,"aria-required",t))},ew=()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=J_(e),{serviceSelect:r,subServiceSelect:n,commonObjectSelect:i,techObjectSelect:o,gamesObjectSelect:a,sourceSelect:s,contentInput:l}=t,c=r?.selectedOptions?.[0]?.hidden??!1;Y_(t,r?.selectedOptions?.[0]?.value??"",c),(()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=J_(e),{emailInput:r,messageInput:n,serviceSelect:i}=t;r?.addEventListener("blur",()=>{const e=document.querySelector("#email-error");e&&(r.checkValidity()?W_(e,!0,"u-mask"):W_(e,!1,"u-mask"))}),n?.addEventListener("blur",()=>{const e=document.querySelector("#message-error");e&&(""!==n.value?W_(e,!0,"u-mask"):W_(e,!1,"u-mask"))}),i?.addEventListener("blur",()=>{const e=document.querySelector("#service-error");e&&(i.checkValidity()?W_(e,!0,"u-mask"):W_(e,!1,"u-mask"))})})(),r?.addEventListener("change",e=>{const{target:r}=e;if(!(r instanceof HTMLSelectElement))return;const c=r.value,u="service-technique"===c,d="jeux"===c,f="redaction"===c;X_(n,f),X_(i,f),X_(o,u),X_(a,d),X_(s,d),Y_(t,c,r.selectedOptions[0]?.hidden??!1),l&&l.setAttribute("placeholder",Q_[c]??"Votre message.")}),o?.addEventListener("change",e=>{const{target:t}=e;t instanceof HTMLSelectElement&&l&&l.setAttribute("placeholder",Z_[t.value]??"Votre message.")})};var tw=()=>{ew(),(()=>{const e=document.querySelector("form#contact-form");e&&e.addEventListener("submit",t=>{t.preventDefault();const r=new FormData(e),n=r.get("message")?.toString().trim(),i=r.get("email")?.toString().trim();let o=r.get("service")?.toString().trim();const a=r.get("subservice")?.toString().trim(),s=r.get("common-object")?.toString().trim(),l=r.get("tech-object")?.toString().trim(),c=r.get("games-object")?.toString().trim(),u=r.get("source")?.toString().trim();if([!!i,!!o,!!n,!!("redaction"!==o||a&&s),!("service-technique"===o&&!l),!("jeux"===o&&!c&&!u)].includes(!1))return void alert("Tous les champs obligatoires doivent être remplis.");let d,f=null;const p=e=>{if(!e)return"";const t=document.querySelector(`option[value="${e}"]`);return t&&t instanceof HTMLOptionElement?t.text:""};switch(o){case"redaction":d=s,f=p(d),a&&(o=a);break;case"jeux":{d=c;const e=p(d);f=u?`${e} (source: ${u})`:e;break}case"service-technique":d=l,f=p(d)}const m=document.querySelector("#li-antibot-token");if(!(m&&m instanceof HTMLInputElement))return void alert("Vous devez valider le captcha.");const h={antibotToken:m.value,service:o,email:i,message:n,object:f,objectId:d||null,accessSource:u?.includes("app-")?"apps":"site"},g=document.body.getAttribute("data-http-taskrunner-api-host");fetch(`${g}/contact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)}).then(e=>e.json()).then(e=>{e.success?(alert("Votre message a bien été envoyé à nos services."),window.location.reload()):alert("Merci de valider le captcha afin d'envoyer votre message.")}).catch(e=>{console.error("Error:",e)})})})()};const rw=(e=document)=>e.querySelectorAll('iframe[src*="www.ultimedia.com"], iframe[data-src*="www.ultimedia.com"]'),nw=()=>document.querySelectorAll('div[class*="c-content"] iframe[data-src*="www.ultimedia.com"], div[class*="c-content"] iframe[src*="www.ultimedia.com"]');var iw=()=>{(()=>{const e=rw(),t=window.datalayerInfo||{};0!==Object.keys(t).length&&0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:r,pathname:n,searchParams:i}=new URL(t),o=`${r}${n}`,a=`category=${no("category")}&sub_category=${no("subcategory")}&tags=${no("tags")}&content_id=${no("content_id")}&brand_safety=${no("brand_safety")}&page_type=${no("page_type")}&pos=instream`;i.append("tagparam",a),e.setAttribute("data-src",`${o}?${i.toString()}`)})})(),(()=>{const e=nw();e&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:r,pathname:n,search:i}=new URL(t),o=`${r}${n}`.replace(/\/chromeless\/1$/,"").replace(/\/$/,"");e.setAttribute("data-src",`${o}${window.layout===Qt.DESKTOP?"":"/chromeless/1"}${i}`)})})(),(()=>{const e=rw();0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})(),(()=>{if(window.layout!==Qt.DESKTOP||window.datalayerInfo?.pageName===Ft.TV_HOME){try{Vt(zt.DIGITEKA_VIDEO_FEED)}catch(e){e instanceof Error&&console.error(e.message)}Ht({text:'MDTK_videofeed = "01100132";'+(nw().length>0&&window.layout===Qt.DESKTOP?"CARROUSEL_videofeed=true;":"")})}})()};const ow=()=>{const e=Array.from(document.querySelectorAll('[data-script-loading="lazy"]'));e.length>0&&(e.forEach(e=>{const t=document.createElement("script");t.type="text/javascript",t.innerHTML=e.innerHTML.replace(/&quot;|&amp;/g,e=>"&quot;"===e?'"':"&"),t.innerHTML=t.innerHTML.replace(/&#x27;/g,"'"),e.after(t),e.remove()}),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{e.getCurrentUserStatus().purposes["activation-gGierZpp"]?.enabled?(Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.add("u-hidden")}),Array.from(document.getElementsByClassName("embed-wrapper")).forEach(e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})):Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.remove("u-hidden")})}))};var aw=()=>{(()=>{if(document.querySelector(".gcse-search")&&window.envVariables?.googleSearchCode)try{Vt(zt.GOOGLE_SEARCH)}catch(e){e instanceof Error&&console.error(e.message)}})()};let sw,lw;const cw=e=>{sw&&("show"===e?(sw.classList.remove("c-header-mini--is-hidden"),lw?.classList?.add("c-menu--with-header-mini")):(sw.classList.add("c-header-mini--is-hidden"),lw?.classList?.remove("c-menu--with-header-mini")))},uw=e=>{const t=e[0];sw&&(t.isIntersecting?cw("hidden"):cw("show"))};let dw;let fw=0;const pw=e=>{if(!dw)return;const t=document.querySelector("button.c-btn--close:not(.u-hidden)"),r=document.getElementById("live-refresh-button");if("show"===e)return dw.classList.remove("c-header-mobile--is-hidden"),t&&t.classList.add("c-btn--close-is-below-header"),void(r&&(r.classList.remove("u-sticky--spaced-top-screen"),r.classList.add("u-sticky--spaced-header-mobile")));dw.classList.add("c-header-mobile--is-hidden"),t&&t.classList.remove("c-btn--close-is-below-header"),r&&(r.classList.add("u-sticky--spaced-top-screen"),r.classList.remove("u-sticky--spaced-header-mobile"))},mw=()=>{dw=document.querySelector(".c-header-mobile"),dw&&window.addEventListener("scroll",()=>{window.scrollY<780?pw("show"):(()=>{const e=window.scrollY;e>fw?(pw("hidden"),fw=e):fw-e>100&&(pw("show"),fw=e)})()})},hw=e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)},gw=(e,t)=>{e.forEach(e=>{if(e.isIntersecting&&e.target instanceof HTMLElement){const{target:r}=e,n=r.id,i=r.dataset?.eventName;(n||i)&&(r.dataset.lazyLoaded="true",t.unobserve(r),i?(document.dispatchEvent(new CustomEvent(i,{detail:{target:r}})),console.log(`20minLazyCall: element event name %c${i}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")):n&&(r.dispatchEvent(new Event(n)),console.log(`20minLazyCall: element with id %c${n}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")))}})},vw=()=>{window.lazyObservers={},window.lazyObservers.defaultObserver=new IntersectionObserver(gw,{rootMargin:"700px",threshold:0}),window.lazyObservers.instantObserver=new IntersectionObserver(gw,{rootMargin:"0px",threshold:0});[].forEach(e=>{hw(e)}),document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach(e=>{hw(e)})};let bw;const yw=document.querySelector("button.c-btn--close"),_w=document.querySelectorAll('div[id^="taboola-below-article"]'),ww="20px",Ew="211px";let Sw=0,xw=0;const Nw=e=>{const t=[];return _w.forEach((r,n)=>{const i=r.getBoundingClientRect(),{top:o,bottom:a}=i;"top"===e&&o<=180||"bottom"===e&&o<document.documentElement.clientHeight&&a>0?t[n]=!0:t[n]=!1}),!!t.find(e=>!0===e)},kw=(e,t)=>{const r=Nw("bottom");"down"===t&&(r?(bw.classList.remove("c-read-also-banner--is-hidden"),bw.classList.remove("c-read-also-banner--is-fixed-below-header"),yw&&(yw.style.top="140px")):yw&&(yw.style.top=ww),xw=e),"up"===t&&xw-e>100&&(bw.classList.add("c-read-also-banner--is-fixed-below-header"),r?(bw.classList.remove("c-read-also-banner--is-hidden"),yw&&(yw.style.top=Ew)):(bw.classList.add("c-read-also-banner--is-hidden"),yw&&(yw.style.top=e>780?"90px":"")),xw=e)},Cw=(e=document.querySelector("div.c-read-also-banner"))=>{e&&(bw=e,bw.classList.add("c-read-also-banner--is-hidden"),setTimeout(()=>{bw.classList.remove("u-hidden")},500),window.addEventListener("scroll",()=>{if(Nw("top"))return void bw.classList.add("c-read-also-banner--is-hidden");const e=!!document.querySelector('body[data-layout="mobile"]'),t=(()=>{let e=null;return e=document.body.getBoundingClientRect().top>Sw?"up":"down",Sw=document.body.getBoundingClientRect().top,e})();e?kw(window.scrollY,t):((e,t)=>{const r=bw.dataset.bannerLimitTop||"0";"up"===t&&-document.body.getBoundingClientRect().top>=parseInt(r,10)&&(bw.classList.remove("c-read-also-banner--is-hidden"),yw&&(yw.style.top=Ew)),("down"===t||-document.body.getBoundingClientRect().top<=parseInt(r,10))&&(bw.classList.add("c-read-also-banner--is-hidden"),yw&&(yw.style.top=e>780?ww:""))})(window.scrollY,t)}))},Tw=()=>{const{refreshInterval:e}=document.body.dataset;Number(e)>0&&((e,t)=>{let r;const n=1e3*t,i=()=>{clearTimeout(r),r=setTimeout(e,n)};document.addEventListener("click",i),document.addEventListener("keypress",i),document.addEventListener("scroll",i),i()})(()=>{window.location.reload()},Number(e))},Aw=()=>{document.querySelectorAll(".c-skip-link").forEach(e=>{e.addEventListener("click",e=>{if(!(e.currentTarget instanceof HTMLAnchorElement))return;const t=e.currentTarget.getAttribute("href")?.substring(1),r=t?document.getElementById(t):null;r&&(r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),setTimeout(()=>{r.focus()},0))})})};wt(),Wt(),vw(),ow(),(()=>{const e=document.querySelector("div#dfp_header_ad"),t=document.querySelector("div#taboola-below-article-thumbnails");e&&t&&new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?e.style.visibility="hidden":e.style.visibility="visible"})}).observe(t)})(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Aw):Aw(),(()=>{const e=document.getElementById("data-preferences-switch");if(!(e&&e instanceof HTMLInputElement))return;const t=localStorage.getItem(St);if(null!==t){const r="true"===t;e.checked=r,xt(e,r)}e.addEventListener("change",({target:e})=>{if(!(e instanceof HTMLInputElement))return;const{checked:t}=e;xt(e,t),localStorage.setItem(St,t.toString()),localStorage.removeItem(Et),t&&localStorage.setItem(Et,"true"),window?.pa?.privacy&&(window.pa.privacy.setMode("exempt"),t&&window.pa.privacy.setMode("optout"))})})(),Rt(),jt(),Ct(),(()=>{const r=document.getElementById("c-alert-info");if(r){const n=t.createRoot(r);n&&n.render(e.createElement(Wy,null))}})(),(()=>{if(sw=document.querySelector(".c-header-mini"),sw){const e=document.documentElement.scrollTop,t=document.querySelector(".c-header");lw=document.querySelector(".c-menu"),t&&(e>t.offsetHeight?cw("show"):cw("hidden"),new IntersectionObserver(uw,{threshold:[0],rootMargin:"0px 0px -100%"}).observe(t))}})(),(()=>{const r=document.getElementById("tabpanel-le-direct"),n=document.getElementById("live-refresh-button");if(r&&n){const r=t.createRoot(n);r&&r.render(e.createElement(I_,null))}})(),Tw(),aw(),iw(),(()=>{try{"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>{e.active?.scriptURL?.endsWith("/sw.js")&&e.unregister()})})}catch(e){console.error("Error while unregistering service worker:",e)}})(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_status:"{}"!==Tt("20mnUserInfo")?"Connecte":"Pas connecte",an:document.referrer,referrer:document.referrer,darkmode:"dark"===document.documentElement.getAttribute("data-theme"),page_uri:window.datalayerInfo?.pageUri,page_type:window.datalayerInfo?.pageName}),mw(),Cw(),(()=>{const e=document.querySelector(".c-header-page__print-button");e&&e.addEventListener("click",()=>{window.print()})})(),(()=>{const e=document.getElementById("feedback-button");e&&e.addEventListener("click",()=>{try{window.$screeb("survey.start","5d850959-8e04-425c-b6fe-df5c7dafd4f9",{distribution_id:"dc76b85e-e248-4ac1-a988-30250b4abb80"})}catch(e){console.error("Error while starting survey",e)}})})(),(()=>{const r=document.getElementById("archive-pdf-list-container"),n=window?.__staticHydrationData?.archivePdfListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(zy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("article-list-bottom-container"),n=window?.__staticHydrationData?.articleListBottomContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Ky,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("journalist-article-list-container"),n=window?.__staticHydrationData?.journalistArticleListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(o_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("home-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeHomeContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(g_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("department-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeDepartmentContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(m_,{isSSR:!1,...n}))}})(),$_("tabpanel-le-direct"),$_("tabpanel-temps-forts",!0),(()=>{const r=document.getElementById("local-news-container"),n=window?.__staticHydrationData?.localNewsContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(R_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("latest-articles-container"),n=window?.__staticHydrationData?.latestArticlesContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(l_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("live-and-most-read-container"),n=window?.__staticHydrationData?.liveAndMostReadContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(y_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("most-read-container"),n=window?.__staticHydrationData?.mostReadContainer;if(r&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<(new Date).getTime()){const i=t.createRoot(r);i&&i.render(e.createElement(j_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("latest-contents-carousel-container"),n=window?.__staticHydrationData?.latestContentsCarouselContainer;if(r&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<(new Date).getTime()){const i=t.createRoot(r);i&&i.render(e.createElement(u_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-form-container"),n=window?.__staticHydrationData?.electionsSearchBannerContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(dy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-departments-map-container"),n=window?.__staticHydrationData?.electionsDepartmentsMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(e_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-european-map-container"),n=window?.__staticHydrationData?.electionsEuropeanMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(n_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-constituencies-map-container"),n=window?.__staticHydrationData?.electionsConstituenciesMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Jy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("movies-container"),n=window?.__staticHydrationData?.moviesListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(V_,{...n,isSSR:!1}))}})(),(()=>{const r=document.getElementById("main-most-read-container"),n=window?.__staticHydrationData?.mainMostReadContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(B_,{...n,isSSR:!1}))}})(),(()=>{const r=document.getElementById("quiz-container"),n=window?.__staticHydrationData?.quizContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(K_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("tv-tab-replays"),n=window?.__staticHydrationData?.replaysTvExtractsAndReplaysContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(My,{name:"replays",isSSR:!1,...n}))}const i=document.getElementById("tv-tab-extraits"),o=window?.__staticHydrationData?.extraitsTvExtractsAndReplaysContainer;if(i&&o){const r=t.createRoot(i);r&&r.render(e.createElement(My,{name:"extraits",isSSR:!1,...o}))}})(),(()=>{if(!document.querySelector("#contact-form"))return;const e=document.body.getAttribute("data-http-taskrunner-api-host"),t=window.sessionStorage.getItem("antibotId")||"";e?fetch(`${e}/captcha`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({antibotId:t})}).then(e=>e.json()).then(e=>{if(!e)return;const{captchaServerAntibotId:t,requestId:r}=e.body||{};t&&r&&(window.LI_ANTIBOT.loadAntibot(["IMAGE","QUESTION","FR","abuUFfA+tOvM","https://captcha.liveidentity.com/captcha",null,"https://static.20mn.fr/apps/20minutes/styles/captcha-override.css",t,r,!0]),window.sessionStorage.setItem("antibotId",t))}).catch(e=>{console.error("Error:",e)}):console.error("Error: goomUri is not defined")})(),tw(),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,$t(e))),(()=>{const e=document.querySelector("#game-help-button");e&&e.addEventListener("click",()=>{try{window.$screeb("survey.start","9beafda1-5240-40eb-975f-fa2be61d1a38",{distribution_id:"1f117b33-3bc3-4136-baa6-f0ac2be83ef0"})}catch(e){console.error("Error while starting survey",e)}})})(),Ut(),Gt()}(React,ReactDOMClient);
42
+ */var Jb,Yb=(Zb||(Zb=1,Jb=Qb,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=n(e,r(i)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var o in r)e.call(r,o)&&r[o]&&(i=n(i,o));return i}function n(e,t){return t?e?e+" "+t:e+t:e}Jb.exports?(t.default=t,Jb.exports=t):window.classNames=t}()),Qb.exports),Xb=lo(Yb);const ey=({articles:t,seeMoreButton:r,layout:n,...i})=>{const{variablesForQuery:o,...a}=i;return e.createElement(Vr,{...a},t.map((r,i)=>{const o=`lastArticleKey${i}`,a=i===t.length-1;return e.createElement(e.Fragment,{key:o},e.createElement(oi,{...r,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:n===Qt.MOBILE?void 0:3,...r.cardTitleProps}}),!a&&e.createElement(Er,{color:"grey-200",my:"s"}),10===i&&n===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),20===i&&n===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(10===i||20===i)&&n===Qt.MOBILE&&e.createElement(Er,{color:"grey-200",my:"s"}))}),r&&e.createElement(_r,{...r,variant:"secondary",mx:"auto",mt:"s"}))},ty=({legalNotices:t,seeMoreLegalNotices:r,...n})=>0===t.length?null:e.createElement(Vr,{...n},t.map(t=>e.createElement(e.Fragment,null,e.createElement(ni,{key:t.link,...t,linkProps:{children:"Lire l’annonce"}}),e.createElement(Er,{my:"l",color:"grey-200"}))),r&&e.createElement(_r,{variant:"secondary",mx:"auto",mt:"xl",...r})),ry=e=>{const t=e=>`${e}`.padStart(2,"0");return`${t(Math.floor(e/60))}:${t(e%60)}`},ny=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),iy=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),oy=e=>{const t=(new Date).getTime(),r=new Date(e).getTime(),n=(r-t)/6e4;let i=ny.format(Math.round(n),"minutes");return n<=-60&&(i=ny.format(Math.ceil(n/60),"hours"),n<=-1440&&(i=iy.format(r))),"cette minute-ci"===i?"à l'instant":i};function ay(e,t=!0){const r=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0");let i=e.getFullYear();return t||(i=Number(e.getFullYear().toString().slice(2))),`${r}/${n}/${i}`}function sy(e){const[t,r,n]=e.split("-");return`${n}/${r}/${t.slice(-2)}`}const ly=({updatedAt:t,...r})=>e.createElement(Ei,{...r,...t&&{updatedAt:oy(t)}}),cy=({draftContent:t,pageEndpoint:r,imgEndpoint:n,withCmp:i=!0})=>{const o=e.useRef(null);return e.useEffect(()=>{const e=Gb({rawDraftContent:t,pageEndpoint:r,imgEndpoint:n,withCmp:i}),a=document.createRange().createContextualFragment(e);o.current&&(o.current.innerHTML="",o.current.appendChild(a))},[t]),e.createElement(Vr,{ref:o,mt:"s",className:"c-content"},Wb({rawDraftContent:t,pageEndpoint:r,imgEndpoint:n,withCmp:i}))},uy=".c-search-form__autocomplete",dy=({isSSR:t=!0,layout:r,searchFormProps:n,breadcrumbProps:i,selectProps:o})=>{const[a,s]=e.useState([]),l=e.useCallback(()=>{const e=document.querySelector(uy);a&&a.length>0&&e&&e.classList.remove("u-hidden")},[a]),c=e.useCallback(()=>{const e=document.querySelector(uy);a&&a.length>0&&e&&e.classList.remove("u-hidden")},[a]),u=e.useCallback(e=>{e.relatedTarget||document.querySelector(uy)?.classList?.add("u-hidden")},[]),d=e.useCallback(async e=>{if(e.target instanceof HTMLInputElement){const{target:t}=e;if(t.value.length<3)s([]);else try{const e=await Zt({url:`${t.closest("form")?.action??"#"}?searchValue=${t.value}`});s(e.map(e=>{const{_source:t}=e;return{value:t.output,url:t.url}}))}catch(e){console.error("20mn> Error while searching:",e)}}},[s]);return e.useEffect(()=>{wt()},[]),e.useEffect(()=>{const e=document.querySelector(uy);a&&e&&(a.length>0?e.classList.remove("u-hidden"):e.classList.add("u-hidden"))},[a]),e.createElement(e.Fragment,null,e.createElement(qi,{layout:r,breadcrumbProps:i,selectProps:o,searchFormProps:{...n,autocompleteResults:a,onSubmit:e=>{e.preventDefault()},inputProps:{placeholder:"Rechercher les résultats d'une ville, d'une circonscription, d'un département ou d'une région",name:"elections-search",onClick:l,onFocus:c,onBlur:u,onKeyUp:d,autoComplete:"off",required:!0,"aria-required":!0}}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsSearchBannerContainer:{layout:r,searchFormProps:n,breadcrumbProps:i,selectProps:o}})} };`}}))},fy=t=>{const{variablesForQuery:r,...n}=t;return e.createElement(si,{...n,headingProps:{...n.headingProps,as:"h2"},mb:"xxl"})},py=({layout:t,title:r,editions:n,selectorsLabel:i,editionSelector:o,monthSelector:a,variant:s="archivesByYear",enabled:l=!0})=>l?e.createElement(e.Fragment,null,e.createElement(Er,{my:{xs:"xl",md:"xxl-2"},color:"ultramarine"}),e.createElement(un,{size:"xs",mb:"xxl"},r),e.createElement(Kr,{alignItems:{xs:"start",md:"center"},gap:{xs:"xs",md:"l"},direction:{xs:"column",md:"row"}},e.createElement(dn,{size:"s",weight:"bold",...i}),e.createElement(tn,{...o,id:"archivePdfListEditionSelector",containerProps:{style:{width:t===Qt.MOBILE?"100%":"163px"}},py:"m",px:"s"}),"archivesByYear"===s&&a&&e.createElement(tn,{...a,id:"archivePdfListMonthSelector",containerProps:{style:{width:t===Qt.MOBILE?"100%":"193px"}},py:"m",px:"s"})),n&&n.length>0&&e.createElement(Kr,{direction:"column",gap:"l",mt:"l"},n.slice(0,20).map(t=>e.createElement(Kr,{key:t.name,alignItems:"baseline"},e.createElement(kr,{name:"diode",color:"ultramarine",size:11,mr:"xxs"}),e.createElement(Gr,{color:"ultramarine",href:t.href},t.name))),n.length>20&&e.createElement(dn,{as:"span"},"Vous ne trouvez pas le journal numérique recherché ? Sélectionnez une édition et un mois pour une recherche plus précise."))):null,my=e=>e?e.rightSubheader&&Boolean(new Date(e.rightSubheader?.text).getTime())?{...e,rightSubheader:{...e.rightSubheader,text:oy(e.rightSubheader.text)}}:{...e}:e,hy=({articles:t,layout:r,columnsNumber:n=2,hideFirstDivider:i=!1,dividerProps:o,seeMoreButton:a,seeMoreLink:s,tagTotalArticles:l,currentPagePath:c,currentPage:u="1",articlesLimit:d,hasCardLarge:f=!1,hasMarginOnCard:p=!0,heading:m,...h})=>{if(0===t.length)return null;const g=t=>e.createElement(Bn,{...t,cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps),mx:p?"m":void 0});let v=null;v=r===Qt.DESKTOP?e.createElement(Ur,{colsNumber:n,gap:"xl"},t.slice(0,d).map((t,r)=>{const{layout:n,...i}=t;return e.createElement(Vn,{key:t.title,...i,className:`card-item-${r+1}`,cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps)})})):e.createElement(e.Fragment,null,t.slice(0,d).map((t,n)=>e.createElement(Vr,{key:t.title,className:`card-item-${n+1}`},f?e.createElement(e.Fragment,null,0===n&&e.createElement(jn,{...t,layout:r}),n>0&&e.createElement(e.Fragment,null,e.createElement(Er,{color:"grey-200",my:"s",...o}),g({...t,layout:r}))):e.createElement(e.Fragment,null,e.createElement(Er,{color:"grey-200",my:"s",...o,className:Xb({"u-hidden":0===n&&i},o?.className)}),g({...t,layout:r})))));const b=e.createElement(e.Fragment,null,m&&e.createElement(un,{size:"m",mb:"xl",mx:{xs:"m",md:"0"},...m}),v,(s||a)&&e.createElement(Kr,{justifyContent:"center",mt:"l"},a&&e.createElement(_r,{variant:"secondary",...a}),s&&e.createElement(Gr,{variant:"secondary",...s}),l&&c&&e.createElement("noscript",null,e.createElement(Ii,{totalArticles:l,currentPage:u,pagePath:c,archivesUrl:"https://www.20minutes.fr/archives"}))));return 0===Object.keys(h).length?b:e.createElement(Vr,{...h},b)},gy=({header:{subtitle:t,...r},sectionId:n,liveIndicator:i,children:o,...a})=>{const s=t&&"string"!=typeof t?Wb({rawDraftContent:t}):t;return e.createElement(Vr,{...a,id:n,className:Xb({"u-anchor-link":Boolean(n)})},i&&e.createElement(ly,{...i,variant:"elections",mx:{xs:"m",md:"0"},mb:"xs"}),r?.heading?.children&&e.createElement(hi,{...r,subtitle:s,mb:{xs:"m",sm:"xl"}}),o)},vy=({articles:t,selectProps:r,seeMoreLink:n,layout:i,...o})=>{const{variablesForQuery:a,...s}=o,l=e.createElement(e.Fragment,null,e.createElement(vi,{as:"h2",size:{xs:"s",md:"m"},isCentered:i===Qt.MOBILE,mb:{xs:"l",md:"0"},iconProps:{name:"rubric-news",size:40}},"Actualité locale"),e.createElement(tn,{...r})),c=t=>e.createElement(Vn,{key:t.title,...t,cardTitleProps:{as:"h3",size:"xxs",weight:"semi-bold",fontFamily:"source-serif-pro",maxRows:4,...t.cardTitleProps},socialBarProps:void 0});return e.createElement(Vr,{...s},e.createElement(xr,{mb:"l"}),i===Qt.DESKTOP?e.createElement(Kr,{justifyContent:"between",mb:"xl",alignItems:"center"},l):e.createElement(Vr,{mx:"m",mb:"l"},l),i===Qt.DESKTOP?e.createElement(Ur,{colsNumber:4,gap:"xl",mx:i===Qt.DESKTOP?"0":"m"},t.map(e=>c(e))):e.createElement(Kr,{direction:"column",mx:"m"},t.map((r,n)=>e.createElement(e.Fragment,{key:r.title},c(r),n<t.length-1&&e.createElement(Er,{color:"grey-200",my:"s"})))),e.createElement(Kr,{justifyContent:"center",mt:"xxl"},e.createElement(Gr,{variant:"secondary",...n},"Voir plus d'articles")))},by=({post:t,postIndex:r,postsCount:n,pageEndpoint:i,imgEndpoint:o,layout:a,disableAds:s=!1,enableAnchoring:l=!0})=>e.createElement("section",{className:Xb("js-post",{"u-anchor-link":l}),...l?{id:`post-${t.id}`}:{},key:t.id},e.createElement(ki,{...t.title}),t.content&&e.createElement(cy,{draftContent:t.content,pageEndpoint:i,imgEndpoint:o}),t.talk&&e.createElement(xi,{...t.talk,mt:"s"}),e.createElement(Er,{color:"grey-200",my:"l"}),!s&&n>=4&&r%6==3&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isFullscreenMobile:!0}),!s&&n>=8&&r%6==0&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isFullscreenMobile:!0})),yy=({post:t,postIndex:r,postsCount:n,pageEndpoint:i,imgEndpoint:o,layout:a,disableAds:s=!1,enableAnchoring:l=!0})=>e.createElement("section",{className:Xb("js-post",{"u-anchor-link":l}),...l?{id:`post-${t.id}`}:{},key:t.id},e.createElement(ki,{...t.title}),t.content&&e.createElement(cy,{draftContent:t.content,pageEndpoint:i,imgEndpoint:o}),t.talk&&e.createElement(xi,{...t.talk,mt:"s"}),e.createElement(Er,{color:"grey-200",my:"l"}),!s&&n>=4&&r%6==3&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isFullscreenMobile:!0}),!s&&n>=8&&r%6==0&&e.createElement(vr,{adUnitCompletePath:a===Qt.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isFullscreenMobile:!0})),_y=({posts:t,layout:r,pageEndpoint:n,imgEndpoint:i,seeMoreLink:o,disableAds:a,enableAnchoring:s=!0,...l})=>{const{variablesForQuery:c,refreshButton:u,...d}=l;return 0===t.length?null:e.createElement(e.Fragment,null,e.createElement(Vr,{...d,"data-state":u?.state,"data-latest-post-id":u?.latestPostId,"data-brand-id":c?.brandId,"data-live-id":c?.liveId},t.map((o,l)=>e.createElement(yy,{key:o.id,post:o,postIndex:l,postsCount:t.length,layout:r,pageEndpoint:n,imgEndpoint:i,disableAds:a,enableAnchoring:s}))),o&&e.createElement(Kr,{justifyContent:"center",my:"l"},e.createElement(_r,{variant:"secondary",...o})))},wy=({items:t,seeMoreButton:r,...n})=>t.length<=0?null:e.createElement(e.Fragment,null,e.createElement(Vr,{...n},t.map((r,n)=>{const{summaryProps:i,...o}=r;return e.createElement(e.Fragment,null,e.createElement(Kn,{key:o.link,...o,summaryProps:o.layout!==Qt.MOBILE?i:void 0,mb:"m",ml:{xs:"m",md:"0"}}),n!==t.length-1&&e.createElement(Er,{color:"grey-200",my:"s"}),2===n&&o.layout===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),7===n&&o.layout===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(2===n||7===n)&&o.layout===Qt.MOBILE&&e.createElement(Er,{color:"grey-200",my:"s"}))})),r&&e.createElement(Kr,{justifyContent:"center",mb:"m"},e.createElement(_r,{variant:"secondary",...r}))),Ey=({...t})=>{const{variablesForQuery:r,...n}=t;return e.createElement(to,{...n})},Sy=({items:t,layout:r,seeMoreButton:n,...i})=>t.length<=0?null:e.createElement(e.Fragment,null,e.createElement(Kr,{direction:"column",gap:"xxl-2",...i},t.map((t,n)=>e.createElement(e.Fragment,null,5===n&&r===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),e.createElement(Gn,{key:t.link,...t,layout:r,containerSpacing:{px:{xs:"m",lg:"0"}}})))),n&&e.createElement(Kr,{justifyContent:"center",mt:"xl"},e.createElement(_r,{variant:"secondary",...n})),r===Qt.DESKTOP&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_desktop/divers/ban_btf",variant:"BAN"}),r===Qt.MOBILE&&e.createElement(vr,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"BAN",mt:"xl"})),xy=({articles:t,layout:r,totalArticles:n,currentPagePath:i,currentPage:o="1",seeMoreButton:a,...s})=>{if(0===t.length)return null;const l=e.createElement(Ur,{colsNumber:1,gap:{xs:"xxl",md:"xxl-2"}},t.map((t,n)=>r===Qt.DESKTOP?e.createElement(Zn,{key:t.title,...t,className:Xb(`card-item-${n+1}`,t.className),cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps)}):e.createElement(Rn,{key:t.title,layout:r,...t,className:Xb(`card-item-${n+1}`,t.className),cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:my(t.cardHeaderProps)}))),c=e.createElement(e.Fragment,null,l,a&&e.createElement(e.Fragment,null,n&&i&&e.createElement("noscript",null,e.createElement(Ii,{totalArticles:n,currentPage:o,pagePath:i,archivesUrl:"https://www.20minutes.fr/archives"})),e.createElement(Kr,{justifyContent:"center",mt:"xxl"},e.createElement(_r,{variant:"secondary",...a}))));return 0===Object.keys(s).length?c:e.createElement(Vr,{...s},c)},Ny=()=>{document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach(e=>{(e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)})(e)})};var ky=(e=>(e.Article="Article",e.ExternalContent="ExternalContent",e.Live="Live",e.Page="Page",e.Story="Story",e))(ky||{}),Cy=(e=>(e.bold="bold",e.community="community",e.default="default",e.faq="faq",e.important="important",e.very_important="very_important",e))(Cy||{}),Ty=(e=>(e.closed="closed",e.open="open",e))(Ty||{}),Ay=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(Ay||{}),Ly=(e=>(e.CREATED_AT="CREATED_AT",e.EXPECTATION_LEVEL="EXPECTATION_LEVEL",e.RELEASE_DATE="RELEASE_DATE",e.TITLE_FR="TITLE_FR",e))(Ly||{}),Dy=(e=>(e.ASC="ASC",e.DESC="DESC",e))(Dy||{});const Py=({medias:e,imgEndpoint:t})=>{const r=e?.find(e=>e&&!0===e.illustration&&e.type===Ay.photo&&e.photo?.node?.id);if(!r?.photo?.node?.id)return"";const n=r.photo?.node?.slug?`%format_${r.photo.node.slug}`:"%format";return`${t}/${Ub(r.photo.node.id)}/${n}`},Oy=({medias:e,picto:t,editorialModel:r})=>{if(r===ky.Story)return{caption:{iconName:"diaporama"}};let n;if(t)switch(t){case"video":if(r!==ky.Page){const t=e?.find(e=>e&&!0===e?.illustration&&e?.type===Ay.video&&e[Ay.video]?.duration)?.video?.duration;return{caption:{iconName:"video",text:t?ry(Number(t)):""}}}break;case"podcast":return{caption:{iconName:"podcast"}};default:return n}else e?.forEach(e=>{if("podcast"===e?.type&&(n={caption:{iconName:"podcast"}}),"video"===e?.type&&r!==ky.Page){const t=e?.video?.duration?Number(e?.video?.duration):null;n={caption:{iconName:"video",text:t?ry(t):""}}}});return n},Iy=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery?.endCursor||null),[i,o]=e.useState(t.defaultVariablesForQuery?.hasNextPage||!1),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getTvReplaysOrExtracts&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery?.brandId,slug:t.defaultVariablesForQuery?.slug,first:8,after:r,filter:{publication_status:{eq:"published"},...t.defaultVariablesForQuery?.tagId?{tag_ids:{nin:[t.defaultVariablesForQuery.tagId]}}:{}}}))}`,options:{headers:i}}];try{const e=await Zt(...a),r=(({pageEndpoint:e,imgEndpoint:t,layout:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((n,i)=>i?.node?.short_title&&i?.node?.medias&&i?.node?.url_current?(n.push({title:i.node.short_title,cardImageProps:{cover:Py({medias:i.node.medias,imgEndpoint:t}),caption:{iconName:"video",text:i?.node?.video?.node?.duration?.toString()?ry(parseInt(i.node.video.node.duration.toString(),10)):void 0}},link:new URL(i.node.url_current,e).href,layout:r,...r===Qt.MOBILE&&{reverseCard:!0}}),n):n,[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,layout:t.layout,data:e});s(e=>[...e,...r]),n(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},My=({isSSR:t=!0,name:r,layout:n,articles:i,variablesForQuery:o,seeMoreButton:a,...s})=>{if(0===i.length)return null;const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=Iy({layout:n,defaultArticles:i,defaultVariablesForQuery:o});return e.useEffect(()=>{l||Ny()},[l]),e.createElement(e.Fragment,null,e.createElement(hy,{layout:n,articles:c,seeMoreButton:a&&u?{...a,disabled:l,onClick:d}:void 0,...s}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[`${r}TvExtractsAndReplaysContainer`]:{layout:n,articles:c,variablesForQuery:o,seeMoreButton:a,...s}})} };`}}))},qy=e=>{switch(e){case"FRA":return"Nationale";case"BOR":return"Bordeaux";case"LIL":return"Lille";case"MAR":return"Marseille";case"MON":return"Montpellier";case"NAN":return"Nantes";case"NIC":return"Nice";case"PAR":return"Paris";case"REN":return"Rennes";case"STR":return"Strasbourg";case"TOU":return"Toulouse";default:return""}},Ry=e=>{const t=e.slice(0,4),r=e.slice(4,6),n=e.slice(6,8),i=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"][parseInt(r,10)-1];return`${parseInt(n,10)} ${i} ${t}`},Fy="archivePdfListEditionSelector",By="archivePdfListMonthSelector",zy=({isSSR:t=!0,variablesForQuery:r,layout:n,title:i,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,enabled:c})=>{const[u,d]=e.useState(l),f=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const n=document.getElementById(Fy),i=document.getElementById(By),o=[{url:`${e}/?id=getPdfsByEditionSlug&variables=${encodeURIComponent(JSON.stringify({brandId:r?.brandId,slug:n?.value,first:100,sort:"ASC",year:r?.year,month:i?.value}))}`,options:{headers:t}}];try{const e=(({data:e})=>{const t=[];return Array.isArray(e)||e?.brand?.node?.edition?.node?.pdfs?.edges?.forEach(e=>{e?.node?.url&&e?.node?.publication_date&&t.push({href:e?.node?.url,name:`Lire le journal du ${Ry(e?.node?.publication_date)} - édition ${qy(e.node.url.match(/[0-9]{8}_([A-Z]{3})\.pdf/)?.[1]??"")}`})}),t})({data:await Zt(...o)});d(e)}catch(e){console.error("20mn> Error while searching:",e)}},[d]);return e.createElement(e.Fragment,null,e.createElement(py,{title:i,selectorsLabel:o,editionSelector:{...a,onChange:f},monthSelector:s&&{...s,onChange:f},editions:u,layout:n,enabled:c}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({archivePdfListContainer:{title:i,layout:n,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,variablesForQuery:r,enabled:c}})} };`}}))},jy=e=>e?sr.find(t=>e.includes(t)):void 0,Hy=e=>null!=e,Vy=({pageEndpoint:e,imgEndpoint:t,data:r,hasSummary:n=!1})=>Array.isArray(r)?[]:(r?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((r,i)=>{if(!i?.node?.title||!i?.node?.label||!i?.node?.url||!i?.node?.medias&&!i?.node?.photo?.node)return r;const o=i?.node?.editorial_model===ky.Story;let a=i.node.medias?i.node.medias.filter(Hy):[];return o&&i?.node?.photo?.node&&(a=[{type:Ay.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),r.push({link:new URL(i.node.url,e).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Py({medias:a,imgEndpoint:t}),...Oy({medias:a,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},cardHeaderProps:{headline:{text:i.node.label,color:jy(i?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:i.node.published_at||""}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},socialBarProps:{disableComment:!o&&!i.node.enable_comments,variant:"card",contentLink:new URL(i.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:i.node.comments_count??0,shareCount:i.node.facebook_count??0,contentId:i.node?.legacy_id?.toString()},...n&&{summaryProps:{children:i.node.lead}}}),r},[]),Uy=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]);return e.useEffect(()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const l=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...l),t=Vy({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e}),r={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),n(r.endCursor),o(r.hasNextPage),window?.localStorage.setItem("aticles-container-data",JSON.stringify(r)),It()}catch(e){console.error("20mn> Error while loading articles:",e)}})()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{(()=>{const e=document.getElementById("article-list-bottom-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(It(),t.unobserve(e.target))})}),r=e.querySelector(".card-item-1");r&&t.observe(r);const n=e.querySelector(".card-item-8");n&&t.observe(n);const i=e.querySelector(".card-item-16");i&&t.observe(i)})();const e=window?.performance?.getEntriesByType("navigation").map(e=>e.type).includes("back_forward");if(e){const e=At("aticles-container-data");e&&Object.hasOwn(e,"articles")&&Object.hasOwn(e,"endCursor")&&Object.hasOwn(e,"hasNextPage")&&(s(e.articles),n(e.endCursor),o(e.hasNextPage),It())}else window?.localStorage.removeItem("aticles-container-data")},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Ky=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l})=>{const{isLoading:c,articles:u,hasNextPage:d,onLoadMore:f}=Uy({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect(()=>{c||Ny()},[c]);const p=u.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return e.createElement(e.Fragment,null,e.createElement(hy,{layout:r,articles:p,seeMoreButton:d?{...o,disabled:c,onClick:f}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({articleListBottomContainer:{layout:r,articles:p,variablesForQuery:i,seeMoreButton:o}})} };`}}))},$y="20mnBreakingNews",Gy=18e4,Wy=()=>{const[t,r]=e.useState(!1),[n,i]=e.useState(At($y));e.useEffect(()=>{n&&localStorage.setItem($y,JSON.stringify(n))},[n]),e.useEffect(()=>{t&&document&&document.querySelectorAll("#c-alert-info 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&&(t=e.target.closest("a")?.href||""),Ot({name:"content",type:"action",customProps:{cta_context:"smartbanner_alert",cta_type:"link",cta_destination:t,cta_engagement:2}}),window.location.href=t})})},[t]),e.useEffect(()=>{if(Object.keys(n??{}).includes("opened")&&i(e=>({open:e?.opened??!1,time:e?.time,data:e?.data})),n?.time&&n.time+Gy>(new Date).getTime())return void(n.open&&r(!0));const{apiHost:e,imgHost:t}=document.body.dataset,o=new Headers;window.envVariables?.apiAuthKey&&o.append("auth-key",window.envVariables.apiAuthKey);Zt(...[{url:`${e}/?id=getBreakingNews&variables=%7B%22brandId%22%3A%22QnJhbmQ6MjBtaW51dGVz%22%7D`,options:{headers:o}}]).then(e=>{const o=e?.brand?.node?.home?.node?.homeBreakingNews?.node,a=o?.content?.editorial_model?.toLowerCase(),s=o?.content?.[a]?.node;if(!s?.title||!s?.url_current)return void r(!1);const l=o.custom_title??s.title;let c;if(o?.with_photo&&s?.medias?.[0]?.photo?.node?.id){const e=atob(s.medias[0].photo.node.id).replace("Photo:","");c=`${t}/${e}/147x96_${s?.medias?.photo?.node?.slug??"media"}`}const u=!n||n.data?.description!==l||n.open;i({open:u,time:(new Date).getTime(),data:{description:l,url:s.url_current,imageUrl:c}}),r(u)}).catch(e=>{console.error("20mn> Error while loading the breaking news:",e)})},[]);return t&&n?.data?e.createElement(pn,{title:"ALERTE INFO",description:n.data.description,cover:n.data.imageUrl,link:n?.data?.url?{href:n.data.url}:void 0,closeButton:{onClick:()=>{i(e=>({...e||{},open:!1})),r(!1)}}}):null},Zy=({mapConstituenciesProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerDistrict.length||0===Object.keys(t.mapDistrictsData||{}).length?null:e.createElement(gy,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(Li,{...t,mx:{xs:"m",md:"0"}})),Qy=t=>{const[r,n]=e.useState(t.defaultMapConstituenciesProps);return e.useEffect(()=>{(async()=>{try{const e=await Zt({url:"https://static.20mn.fr/elections/map-districts.json"});n(t=>({...t,mapDistrictsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}})(),wt(),Ct()},[]),e.useMemo(()=>({mapConstituenciesProps:r}),[r])},Jy=({isSSR:t=!0,mapConstituenciesProps:r,...n})=>{const{mapConstituenciesProps:i}=Qy({defaultMapConstituenciesProps:r});return e.createElement(e.Fragment,null,e.createElement(Zy,{mapConstituenciesProps:t?{electionName:"",electionYear:"",resultsPerDistrict:[],mapDistrictsData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsConstituenciesMapContainer:{mapConstituenciesProps:r,...n}})} };`}}))},Yy=({mapDepartmentsProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerDepartment.length?null:e.createElement(gy,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(Ti,{...t,mx:{xs:"m",md:"0"}})),Xy=t=>{const[r,n]=e.useState(t.defaultMapDepartmentsProps);return e.useEffect(()=>{(async()=>{try{const e=await Zt({url:"https://static.20mn.fr/elections/map-departments.json"});n(t=>({...t,mapDepartmentsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}})()},[]),e.useMemo(()=>({mapDepartmentsProps:r}),[r])},e_=({isSSR:t=!0,mapDepartmentsProps:r,...n})=>{const{mapDepartmentsProps:i}=Xy({defaultMapDepartmentsProps:r});return e.createElement(e.Fragment,null,e.createElement(Yy,{mapDepartmentsProps:t?{electionName:"",electionYear:"",resultsPerDepartment:[],mapDepartmentsData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsDepartmentsMapContainer:{mapDepartmentsProps:r,...n}})} };`}}))},t_=({mapEuropeProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerCountry.length||0===Object.keys(t.mapEuCountriesData||{}).length||0===Object.keys(t.mapNonEuCountriesData||{}).length?null:e.createElement(gy,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(Pi,{...t,mx:{xs:"m",md:"0"}})),r_=t=>{const[r,n]=e.useState(t.defaultMapEuropeProps);return e.useEffect(()=>{(async()=>{try{const e=await Promise.all([Zt({url:"https://static.20mn.fr/elections/map-eu-countries.json"}),Zt({url:"https://static.20mn.fr/elections/map-non-eu-countries.json"})]);n(t=>({...t,mapEuCountriesData:e[0],mapNonEuCountriesData:e[1]}))}catch(e){console.error("20mn> Error while loading map data:",e)}})()},[]),e.useMemo(()=>({mapEuropeProps:r}),[r])},n_=({isSSR:t=!0,mapEuropeProps:r,...n})=>{const{mapEuropeProps:i}=r_({defaultMapEuropeProps:r});return e.createElement(e.Fragment,null,e.createElement(t_,{mapEuropeProps:t?{electionName:"",electionYear:"",resultsPerCountry:[],mapEuCountriesData:{},mapNonEuCountriesData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsEuropeanMapContainer:{mapEuropeProps:r,...n}})} };`}}))},i_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getUserBackArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,userBackId:t.defaultVariablesForQuery.userBackId,first:10,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...a),t=(({pageEndpoint:e,imgEndpoint:t,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,n)=>{if(!n?.node?.title||!n?.node?.label||!n?.node?.url||!n?.node?.medias&&!n?.node?.photo?.node)return r;const i=n?.node?.editorial_model===ky.Story;let o=n.node.medias?n.node.medias.filter(Hy):[];return i&&n?.node?.photo?.node&&(o=[{type:Ay.photo,illustration:!0,photo:n.node.photo,legend:n.node.photo.node?.caption}]),r.push({link:new URL(n.node.url,e).href,title:n.node.short_title||n.node.title,cardImageProps:{cover:Py({medias:o,imgEndpoint:t}),...Oy({medias:o,picto:n?.node?.picto,editorialModel:n?.node.editorial_model})},cardHeaderProps:{headline:{text:n.node.label,color:jy(n?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:n.node.published_at||""}},cardTitleProps:{cartridge:"Live"===n?.node?.editorial_model?"live":void 0},socialBarProps:{disableComment:!i&&!n.node.enable_comments,variant:"card",contentLink:new URL(n.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:n.node.comments_count??0,shareCount:n.node.facebook_count??0,contentId:n.node?.legacy_id?.toString()}}),r},[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s(e=>[...e,...t]),n(e?.brand?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},o_=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c})=>{if(0===n.length)return null;const{isLoading:u,articles:d,hasNextPage:f,onLoadMore:p}=i_({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect(()=>{u||Ny()},[u]);const m=d.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return e.createElement(e.Fragment,null,e.createElement(hy,{layout:r,articles:m,seeMoreButton:f?{...o,disabled:u,onClick:p}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({journalistArticleListContainer:{layout:r,articles:m,variablesForQuery:i,seeMoreButton:o,heading:c}})} };`}}))},a_=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"}),s_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,sourceExcluded:t.defaultVariablesForQuery.sourceExcluded,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...a),t=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,i)=>{if(!(i?.node?.title&&i?.node?.label&&i?.node?.url&&i?.node?.published_at&&(i?.node?.medias||i?.node?.photo?.node)))return n;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=[{type:Ay.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),n.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Py({medias:o,imgEndpoint:r}),...Oy({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},socialBarProps:{commentCount:i.node.comments_count??0,shareCount:(i.node.facebook_count??0)+(i.node.pinterest_count??0),contentId:i.node?.legacy_id?.toString(),contentLink:new URL(i.node.url,t).href,commentAnchor:"mbrs-comments-container"},cardHeaderProps:{headline:{text:i.node.label,color:jy(i?.node?.rubric?.node?.themeColor?.node?.slug)},liveTime:a_.format(new Date(i.node.published_at).getTime()).replace(":","H")},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},summaryProps:{children:i?.node?.lead??""},layout:e}),n},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s(e=>[...e,...t]),n(e?.brand?.node?.publishableContents?.pageInfo?.endCursor??null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage??!1),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{(()=>{const e=document.getElementById("latest-articles-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(It(),t.unobserve(e.target))})}),r=e.querySelectorAll(".c-card-container")[10];r&&t.observe(r);const n=e.querySelectorAll(".c-card-container")[20];n&&t.observe(n)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},l_=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,articles:s,hasNextPage:l,onLoadMore:c}=s_({defaultArticles:n,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Ny()},[a]),e.createElement(e.Fragment,null,e.createElement(ey,{layout:r,articles:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestArticlesContainer:{layout:r,articles:s,variablesForQuery:i,seeMoreButton:o}})} };`}}))},c_=t=>{const[r,n]=e.useState(t.defaultArticles),i=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,first:t.variablesForQuery.first}))}`,options:{headers:r}}];try{const e=await Zt(...i),t=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,i)=>{if(!(i?.node?.title&&i?.node?.url&&i?.node?.medias&&i?.node?.rubric?.node?.label))return n;if(!i?.node?.medias.length&&!i?.node?.photo?.node)return n;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=[{type:Ay.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),n.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Py({medias:o,imgEndpoint:r}),...Oy({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model}),lazyLoad:!0},cardHeaderProps:{headline:{text:i?.node?.label||i.node.rubric.node.label,color:jy(i?.node?.rubric?.node?.themeColor?.node?.slug)}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0,as:"h3"},layout:e}),n},[]))({layout:window.layout,data:e,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint});n(t)}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{i()},[]),e.useMemo(()=>({articles:r}),[r])},u_=({isSSR:t=!0,articles:r,variablesForQuery:n,...i})=>{const{articles:o}=c_({defaultArticles:r,variablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(fy,{...i,articles:o,variablesForQuery:n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestContentsCarouselContainer:{articles:r,variablesForQuery:n,...i}})} };`}}))},d_=e=>{const t=[];return e.legalNotices.forEach(r=>{const n=r?.node;t.push({link:n?.external_id?new URL(`/al/${n?.external_id}`,e.legalNoticeEndpoint).href:"",title:n?.title??void 0,location:n?.legalNoticeDepartment?.node?.name||"",summaryProps:{children:n?.publishing_date?`Publié le ${ay(new Date(n.publishing_date),!1)}`:sy(new Date(Date.now()).toLocaleString())}})}),t},f_=e=>null!=e,p_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]);return e.useEffect(()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLegalNoticesFromDept&variables=${encodeURIComponent(JSON.stringify({slug:t.defaultVariablesForQuery.slug,first:10,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...a),t=e?.legalNotices?.edges?.filter(f_)??[],r=d_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...r]),n(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}})()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},m_=({isSSR:t=!0,variablesForQuery:r,legalNotices:n})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=p_({legalNotices:n,defaultVariablesForQuery:r});return e.useEffect(()=>{i||Ny()},[i]),e.createElement(e.Fragment,null,e.createElement(ty,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeDepartmentContainer:{legalNotices:o,variablesForQuery:r}})} };`}}))},h_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]);return e.useEffect(()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLegalNotices&variables=${encodeURIComponent(JSON.stringify({first:10,after:r}))}`,options:{headers:t}}];try{const e=await Zt(...i),t=e?.legalNotices?.edges?.filter(f_)??[],r=d_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...r]),n(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),It()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}})()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},g_=({isSSR:t=!0,variablesForQuery:r,legalNotices:n})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=h_({legalNotices:n,defaultVariablesForQuery:r});return e.useEffect(()=>{i||Ny()},[i]),e.createElement(e.Fragment,null,e.createElement(ty,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeHomeContainer:{legalNotices:o,variablesForQuery:r}})} };`}}))},v_=e=>{const t=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"});return{name:e.name,title:e.title,tabColor:e.tabColor,body:e.articleEdges.reduce((r,n)=>{if(n?.node?.title&&n?.node?.url&&n?.node?.rubric?.node?.slug&&n?.node?.rubric?.node?.label){const i={themeColor:n.node.rubric.node.themeColor?.node?.lightmode_color||void 0,rubricName:n?.node?.label||n.node.rubric.node.label,title:n?.node?.short_title||n.node.title,url:new URL(n.node.url,e.pageEndpoint).href,cartridge:n.node?.editorial_model===ky.Live&&n.node?.state===Ty.open?"live":void 0};"le-direct"===e.name&&n?.node?.published_at&&(i.liveTime=t.format(new Date(n.node.published_at).getTime()).replace(":","H")),r.push(i)}return r},[]).slice(0,e.limit)}},b_=t=>{const[r,n]=e.useState(t.defaultTabItems),i=async()=>{if(t.variablesForQuery.liveLimit&&t.variablesForQuery.mostReadLimit){const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLiveAndMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit}))}`,options:{headers:r}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:r,liveLimit:n,mostReadLimit:i})=>{if(Array.isArray(e))return[];const o=e?.brand?.node,a=o?.mostReadArticles?.edges,s=o?.liveArticles?.edges,l=[];if(s?.length){const e=v_({name:"le-direct",title:"Le direct",pageEndpoint:t,articleEdges:s,limit:n,tabColor:"red"});l.push(e)}if(a?.length){const e=v_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:a,limit:i});l.push(e)}return l})({data:await Zt(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit});n(e),wt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}};return e.useEffect(()=>{i()},[]),e.useMemo(()=>({tabItems:r}),[r])},y_=({isSSR:t=!0,layout:r,tabItems:n,variablesForQuery:i,...o})=>{const{tabItems:a}=b_({defaultTabItems:n,variablesForQuery:i});return e.createElement(e.Fragment,null,e.createElement(Ey,{...o,layout:r,tabItems:a,variablesForQuery:i,hasButton:!0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({liveAndMostReadContainer:{layout:r,tabItems:n,variablesForQuery:i}})} };`}}))},__=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{if(e.getCurrentUserStatus().purposes["activation-gGierZpp"]?.enabled){Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.add("u-hidden")});Array.from(document.getElementsByClassName("embed-wrapper")).forEach(e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})}else{Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.remove("u-hidden")})}})},w_=["nfb_1","nfb_2","article_btf","pave_com","pave_home","inread","pave_article","article_mtf","native_web"],E_=()=>{w_.forEach(e=>{const t=document?.querySelectorAll(`[id*=dfp_${e}]`)||[],r=document?.querySelectorAll(`[id=dfp_${e}]`)||[];let n=t.length-r.length;r.forEach(t=>{t.setAttribute("id",`dfp_${e}_${n}`),n+=1})})},S_=()=>{document.querySelectorAll(".embed-placeholder").forEach(e=>{e.addEventListener("click",e=>{const t=e.target;if(!(t instanceof HTMLElement&&t.closest(".cmp-button")))return;e.preventDefault(),window.didomiOnReady.push(()=>{(()=>{const e=window.Didomi.openCurrentUserStatusTransaction();e.enablePurpose("activation-gGierZpp"),window.sessionStorage.setItem("cmpModal","accepted"),e.commit(),__()})()});const r=t.closest("div.embed-placeholder");r&&r.focus()})})},x_=e=>{switch(e){case Cy.default:case Cy.important:case Cy.community:case Cy.faq:case Cy.bold:return e;case Cy.very_important:return"crucial";default:return"default"}},N_=(e,t)=>Array.isArray(e)?[]:(e?.brand?.node?.live?.node?.livePosts?.edges||[])?.reduce((e,r)=>{if(!r)return e;let n,i=r?.node?.content_md?.blocks;if(i){const e=[...i],t=e?.slice(-1);""===t?.[0]?.text&&"unstyled"===t?.[0]?.type&&(e.pop(),i=e)}return r?.node?.comment?.node&&(n={question:r.node.comment.node.content||"",author:r.node.comment.node.userFront?.node?.username||"",response:i?.[0]?.text}),e.push({cursor:r?.cursor||null,id:r.node.legacy_id,title:{status:x_(r?.node?.type),header:r?.node?.printed_hour||"",title:r?.node?.title||"",img:r?.node?.livePostLabel?.node&&t?{name:r.node.livePostLabel.node.slug||"",src:r.node.livePostLabel.node.logo?`${t}/${r.node.livePostLabel.node.logo}`:""}:void 0},content:n?void 0:{entityMap:{},...r?.node?.content_md,blocks:i??[]},talk:n}),e},[]),k_=e=>{const t=e.filter(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)));t.length&&t.forEach(({content:e})=>{Object.values(e?.entityMap||{}).forEach(({type:e,data:t})=>{if("iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)){const{js:e=[],css:r=[]}=t?.embedProps||{};e.length&&e.forEach((e,t)=>Ht({name:`embed_live-posts-${t}`,src:e,load:"async"})),r.length&&r.forEach(e=>{const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,document.head.appendChild(t)})}})})},C_=()=>{const{hash:e}=new URL(window.location.href),t=e.match(/#post-(\d+)/);return t?Number(t[1]):null},T_=async({first:e,after:t,filter:r,brandId:n,liveId:i})=>{const{apiHost:o}=document.body.dataset,a=new Headers;window.envVariables?.apiAuthKey&&a.append("auth-key",window.envVariables.apiAuthKey);const s=[{url:`${o}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:n,liveId:i,first:e,after:t,filter:r}))}`,options:{headers:a}}],l=await Zt(...s);return{nextPosts:N_(l,document.body.dataset.staticHost),pageInfo:l?.brand?.node?.live?.node?.livePosts?.pageInfo??null}},A_=async({batchSize:e,after:t,filter:r,brandId:n,liveId:i,accumulatedPosts:o,anchorPostId:a})=>{const{nextPosts:s,pageInfo:l}=await T_({first:100,after:t,filter:r,brandId:n,liveId:i}),c=[...o,...s],u=l?.endCursor??null,d=l?.hasNextPage??!1,f=c.findIndex(e=>e.id===a);if(-1!==f){const t=Math.ceil((f+1)/e)*e,r=t>c.length?c[c.length-1].cursor:c[t-1].cursor,n=c.length>t||d;return{nextPosts:c.slice(0,t),pageInfo:{endCursor:r,hasNextPage:n}}}return d&&u?A_({batchSize:e,after:t,filter:r,brandId:n,liveId:i,accumulatedPosts:c,anchorPostId:a}):{nextPosts:[],pageInfo:l}},L_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultPosts),[l,c]=e.useState(!1),[u,d]=e.useState(!1),f=e.useCallback(()=>{c(!0)},[]);return e.useEffect(()=>{C_()&&!document.getElementById(`post-${C_()}`)&&c(!0)},[]),e.useEffect(()=>{document.querySelector(`#tabpanel-le-direct #post-${C_()}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[u]),e.useEffect(()=>{l&&(async()=>{const e=C_(),i=t.defaultVariablesForQuery.first,{filter:a,brandId:l,liveId:c}=t.defaultVariablesForQuery;try{if(e&&!u&&a?.type?.eq!==Cy.very_important){const{nextPosts:t}=await A_({batchSize:i,after:r,filter:a,brandId:l,liveId:c,accumulatedPosts:[],anchorPostId:e});s(e=>[...e,...t]),d(Boolean(e)),k_(t)}else{const{nextPosts:e,pageInfo:t}=await T_({first:i,after:r,filter:a,brandId:l,liveId:c});n(t?.endCursor??null),o(t?.hasNextPage??!1),s(t=>[...t,...e]),k_(e)}It()}catch(e){console.error("20mn> Error while loading posts:",e)}})(),(e=>{const t=e.some(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&"idalgo"===t?.embedProps?.meta?.site&&"widget"===t?.embedProps?.meta?.type));t&&(window?.iDalgoLoader?window.iDalgoLoader.init():Ht({name:"widget_live-posts",src:"https://20minutes.idalgo-hosting.com/partners/i/cache/datasport/cache/page/r_js_jlu_url.php",load:"async"}))})(a),E_(),__()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{S_(),E_()},[a,r,l,i]),e.useMemo(()=>({isLoading:l,posts:a,hasNextPage:i,onLoadMore:f}),[l,a,i,f])},D_=e=>{const t=JSON.stringify(e).replaceAll("<\/script>","<\\\\/script>");return JSON.parse(t)},P_=e=>{const t=JSON.stringify(e).replaceAll("<\\\\/script>","<\/script>");return JSON.parse(t)},O_=({isSSR:t=!0,posts:r,variablesForQuery:n,seeMoreLink:i,staticHydrationDataName:o="livePostsContainer",disableAds:a,...s})=>{const{isLoading:l,posts:c,hasNextPage:u,onLoadMore:d}=L_({defaultPosts:r,defaultVariablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(_y,{...s,posts:c,variablesForQuery:n,disableAds:a,seeMoreLink:u?{...i,disabled:l,onClick:d}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[o]:{posts:D_(c),variablesForQuery:n,seeMoreLink:i,disableAds:a,...s}})} };`}}))},I_=()=>{const[t,r]=e.useState(null),[n,i]=e.useState(0),o=document.getElementById("tabpanel-le-direct"),a=document.getElementById("tabpanel-temps-forts");let s=o?.querySelector("div[data-state]")?.dataset?.latestPostId;const{state:l,brandId:c,liveId:u}=o?.querySelector("div[data-state]")?.dataset??{},d=()=>{const{apiHost:e}=document.body.dataset,t=new Headers;return window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey),[{url:`${e}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:c,liveId:u,first:20,filter:{status:{eq:"published"}}}))}`,options:{headers:t}}]},f=async()=>{const e=d();try{const t=await Zt(...e);let r=0;t?.brand?.node?.live?.node?.livePosts?.edges?.every(e=>e?.node?.legacy_id!==Number(s)&&(r+=1,!0)),i(r)}catch(e){console.error("20mn> Error while refreshing refresh button counter:",e)}},p=()=>{const e=document.querySelector('[data-tabs-name="live-tabs"]'),t=document.getElementById("tab-le-direct"),r=document.getElementById("tabpanel-le-direct");if(e){const n=e.querySelectorAll(".c-tab"),i=e.querySelectorAll(".c-tabpanel");n.forEach(e=>{e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),t&&(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),r&&r.setAttribute("aria-hidden","false")}};e.useEffect(()=>{l===Ty.open&&c&&s&&u?setInterval(f,6e4):console.info("Do not check for new post, live is either closed or miss information.")},[]),e.useEffect(()=>{if(r(n>0?`Actualiser (${n})`:"Actualiser"),window.layout!==Qt.MOBILE){const e=document.title.replace(/^\(\+?[0-9]+\) /,"");document.title=n>9?`(+${n}) ${e}`:n>0?`(${n}) ${e}`:e}},[n]);const m=e.useCallback(()=>{Ot({name:"refresh_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"}),(async()=>{p();const t=d();try{const r=[],n=[],i=await Zt(...t);let l=N_(i,document.querySelector("body")?.dataset.staticHost),c=0;if(l?.every(e=>e.id.toString()!==s&&(c+=1,!0)),0===c)return void window.location.reload();p();const u=document.getElementById("tabpanel-le-direct")?.querySelectorAll(".js-post").length||0,d=u+c;l=l.slice(0,c),l.reverse(),l?.every((t,i)=>{const o=i+u,a=ss.renderToStaticMarkup(e.createElement(by,{key:t.id,post:t,postIndex:o,postsCount:d,layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint}));return r.push(a),"crucial"===t.title.status&&n.push(a),!0});const f=a?.firstChild;if(f instanceof HTMLElement&&f.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=n.reverse().join("");e.lastChild;)f.prepend(e.lastChild)}const m=o?.firstChild;if(m instanceof HTMLElement&&m.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=r.reverse().join("");e.lastChild;)m.prepend(e.lastChild);const t=l.reverse()[0];if(t){const e=t.id.toString();s=e,o?.querySelector("div[data-state]")?.setAttribute("data-latest-post-id",e)}E_(),It()}}catch(e){console.error("20mn> Error while loading more live posts:",e)}})().then(()=>{i(0);const e=document.getElementById("live-posts-container")?.getBoundingClientRect();e&&window.scrollBy(0,e.top-100)})},[]);return t?e.createElement(Kr,{justifyContent:"center",mb:"xxl"},e.createElement(_r,{variant:"secondary",iconProps:{name:"refresh",size:22},onClick:m},t)):null},M_=e=>{let t;return e?.forEach(e=>{const r=[{title:"Ain",value:"ain"},{title:"Aisne",value:"aisne"},{title:"Allier",value:"allier"},{title:"Alpes-de-Haute-Provence",value:"alpes_de_haute_provence"},{title:"Alpes-Maritimes",value:"alpes-maritimes"},{title:"Ardèche",value:"ardeche"},{title:"Ardennes",value:"ardennes"},{title:"Ariège",value:"ariege"},{title:"Aube",value:"aube"},{title:"Aude",value:"aude"},{title:"Aveyron",value:"aveyron"},{title:"Bas-Rhin",value:"bas_rhin"},{title:"Bouches-du-Rhône",value:"bouches-rhone"},{title:"Calvados",value:"calvados"},{title:"Cantal",value:"cantal"},{title:"Charente",value:"charente"},{title:"Charente-Maritime",value:"charente-maritime"},{title:"Cher",value:"cher"},{title:"Correze",value:"correze"},{title:"Corse-du-Sud",value:"corse-sud"},{title:"Côte-d'Or",value:"cote_d_or"},{title:"Côtes-d'Armor",value:"cotes_d_armor"},{title:"Creuse",value:"creuse"},{title:"Deux-Sèvres",value:"deux-sevres"},{title:"Dordogne",value:"dordogne"},{title:"Doubs",value:"doubs"},{title:"Drôme",value:"drome"},{title:"Essonne",value:"essonne"},{title:"Eure",value:"eure"},{title:"Eure-et-Loir",value:"eure_et_loire"},{title:"Finistère",value:"finistere"},{title:"Gard",value:"gard"},{title:"Gers",value:"gers"},{title:"Gironde",value:"gironde"},{title:"Guadeloupe",value:"guadeloupe"},{title:"Guyane",value:"guyane"},{title:"Haut-Rhin",value:"haut-rhin"},{title:"Haute-Corse",value:"haute-corse"},{title:"Haute-Garonne",value:"haute-garonne"},{title:"Haute-Loire",value:"haute-loire"},{title:"Haute-Marne",value:"haute-marne"},{title:"Haute-Saône",value:"haute-saone"},{title:"Haute-Vienne",value:"haute-vienne"},{title:"Hautes-Alpes",value:"hautes-alpes"},{title:"Hautes-Pyrénées",value:"hautes_pyrenees"},{title:"Hauts-de-Seine",value:"hauts-de-seine"},{title:"Hérault",value:"herault"},{title:"Ille-et-Vilaine",value:"ille_et_vilaine"},{title:"Indre",value:"indre"},{title:"Indre-et-Loire",value:"indre-loire"},{title:"Isère",value:"isere"},{title:"Jura",value:"jura"},{title:"Landes",value:"landes"},{title:"Loir-et-Cher",value:"loir-cher"},{title:"Loire",value:"loire"},{title:"Loire-Atlantique",value:"loire-atlantique"},{title:"Loiret",value:"loiret"},{title:"Lot",value:"lot"},{title:"Lot-et-Garonne",value:"lot_et_garonne"},{title:"Lozère",value:"lozere"},{title:"Maine-et-Loire",value:"maine-et-loire"},{title:"Manche",value:"manche"},{title:"Marne",value:"marne"},{title:"Martinique",value:"martinique"},{title:"Mayenne",value:"mayenne"},{title:"Mayotte",value:"mayotte"},{title:"Meurthe-et-Moselle",value:"meurthe-et-moselle"},{title:"Meuse",value:"meuse"},{title:"Morbihan",value:"morbihan"},{title:"Moselle",value:"moselle"},{title:"Nièvre",value:"nievre"},{title:"Nord",value:"nord"},{title:"Oise",value:"oise"},{title:"Orne",value:"orne"},{title:"Paris",value:"paris"},{title:"Pas-de-Calais",value:"pas-de-calais"},{title:"Puy de Dôme",value:"puy-dome"},{title:"Pyrénées-Atlantiques",value:"pyrenees-atlantiques"},{title:"Pyrénées-Orientales",value:"pyrenees_orientales"},{title:"Rhône",value:"rhone"},{title:"Saône-et-Loire",value:"saone_et_loire"},{title:"Sarthe",value:"sarthe"},{title:"Savoie",value:"savoie"},{title:"Seine-et-Marne",value:"seine-et-marne"},{title:"Seine-Maritime",value:"seine_maritime-1"},{title:"Seine-Saint-Denis",value:"seine-saint-denis"},{title:"Somme",value:"somme"},{title:"Tarn",value:"tarn"},{title:"Tarn-et-Garonne",value:"tarn_et_garonne"},{title:"Territoire de Belfort",value:"territoire-belfort"},{title:"Val-d'Oise",value:"val_d_oise"},{title:"Val-de-Marne",value:"val-de-marne"},{title:"Var",value:"var"},{title:"Vaucluse",value:"vaucluse"},{title:"Vendée",value:"vendee"},{title:"Vienne",value:"vienne-france"},{title:"Vosges",value:"vosges"},{title:"Yonne",value:"yonne"},{title:"Yvelines",value:"yvelines"}].find(t=>t.value===e?.node?.slug);r&&(t=r)}),t?t.title:""},q_=t=>{const[r,n]=e.useState(t.defaultArticles),[i,o]=e.useState(!1),[a,s]=e.useState("locales"),[l,c]=e.useState(t.defaultSeeMoreLink.href),u=e.useCallback(e=>{s(e.target.value),o(!0)},[s,o]),d=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getHomeLocalNews&variables=${encodeURIComponent(JSON.stringify({...t.variablesForQuery,slug:a}))}`,options:{headers:r}}];try{const e=await Zt(...i),t=(({data:e,pageEndpoint:t})=>(e?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((e,r)=>{if(r?.node?.rubric?.node?.label&&r?.node?.title&&r?.node?.url&&r?.node?.tags?.edges){const n=r.node.tags.edges.filter(Hy);e.push({link:new URL(r.node.url,t).href,title:Pt(r?.node?.short_title||r.node.title),cardHeaderProps:{headline:{text:r?.node?.label||r.node.rubric.node.label},location:M_(n)},socialBarProps:{commentCount:r.node?.comments_count??0,shareCount:(r.node?.facebook_count??0)+(r.node?.pinterest_count??0),contentId:r.node?.legacy_id?.toString()}})}return e},[]))({data:e,pageEndpoint:window.envVariables.pageEndpoint});c(new URL(e?.brand?.node?.tag?.node?.url_current??"",window.envVariables.pageEndpoint).href),n(t)}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{i&&d()},[i]),e.useEffect(()=>{i&&o(!1),Mt()},[r]),e.useMemo(()=>({isLoading:i,articles:r,tagUrl:l,onDepartmentChange:u}),[r,i,l,u])},R_=({isSSR:t=!0,articles:r,variablesForQuery:n,seeMoreLink:i,selectProps:o,...a})=>{const{isLoading:s,articles:l,tagUrl:c,onDepartmentChange:u}=q_({defaultArticles:r,defaultSeeMoreLink:i,variablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(vy,{...a,articles:l,variablesForQuery:n,seeMoreLink:{href:c},selectProps:{...o,disabled:s,onChange:u}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({localNewsContainer:{articles:l,variablesForQuery:n,selectProps:o,seeMoreLink:i,...a}})} };`}}))},F_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.hasNextPage),[i,o]=e.useState(t.defaultItems),[a,s]=e.useState(!1),l=e.useCallback(()=>{s(!0)},[]),c=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostReadContents&variables=${encodeURIComponent(JSON.stringify({first:t.defaultVariablesForQuery.first,brandId:t.defaultVariablesForQuery.brandId,excludeModel:t.defaultVariablesForQuery.excludeModel,after:t.defaultVariablesForQuery.endCursor}))}`,options:{headers:r}}];try{const e=await Zt(...i),r=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n,lastNumber:i=0})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,o,a)=>{if(!(o?.node?.title&&o?.node?.label&&o?.node?.url&&o?.node?.published_at&&(o?.node?.medias||o?.node?.photo?.node)))return n;let s=o.node.medias??[];return"Story"===o?.node?.editorial_model&&o?.node?.photo?.node&&(s=[{type:Ay.photo,illustration:!0,photo:o.node.photo,legend:o.node.photo.node?.caption}]),n.push({link:new URL(o.node.url,t).href,title:o.node.title,cardImageProps:{cover:Py({medias:s,imgEndpoint:r})},cardHeaderProps:{headline:{text:o.node.label}},cardTitleProps:{cartridge:"Live"===o?.node?.editorial_model?"live":void 0},summaryProps:{children:o?.node?.lead??""},layout:e,cardNumber:{value:i+a+1,size:"medium"},viewCount:o?.node?.total_current_visits||0}),n},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e,lastNumber:t.defaultVariablesForQuery.first});o(e=>[...e,...r||[]]),n(!1),It()}catch(e){console.error("20mn> Error while loading contents:",e)}};return e.useEffect(()=>{a&&c()},[a]),e.useEffect(()=>{a&&s(!1)},[i]),e.useMemo(()=>({isLoading:a,items:i,hasNextPage:r,onLoadMore:l}),[a,i,r,l])},B_=({isSSR:t=!0,items:r,variablesForQuery:n,seeMoreButton:i})=>{const{isLoading:o,items:a,hasNextPage:s,onLoadMore:l}=F_({defaultItems:r,defaultVariablesForQuery:n});return e.useEffect(()=>{o||Ny()},[o]),e.createElement(e.Fragment,null,e.createElement(wy,{items:a,seeMoreButton:s?{...i,disabled:o,onClick:l}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mainMostReadContainer:{items:a,variablesForQuery:n,seeMoreButton:i}})} };`}}))},z_=t=>{const[r,n]=e.useState(t.defaultTabItems),i=async()=>{if(t.variablesForQuery.rubric){const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,rubricId:t.variablesForQuery.rubric.id}))}`,options:{headers:r}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:r,rubricSlug:n,rubricLabel:i})=>{if(Array.isArray(e))return[];const o=[],a=e?.brand?.node,s=a?.commonArticles?.edges,l=a?.rubricArticles?.edges;if(s?.length){const e=v_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:s,limit:5});o.push(e)}if(l?.length){const e=v_({name:`plus-lus-${n}`,title:`Les + lus ${i}`,pageEndpoint:t,articleEdges:l,limit:5});o.push(e)}return o})({data:await Zt(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,rubricSlug:t.variablesForQuery.rubric.slug,rubricLabel:t.variablesForQuery.rubric.label});n(e),wt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}};return e.useEffect(()=>{i(),qt()},[]),e.useMemo(()=>({tabItems:r}),[r])},j_=({isSSR:t=!0,layout:r,tabItems:n,variablesForQuery:i,...o})=>{const{tabItems:a}=z_({defaultTabItems:n,variablesForQuery:i});return e.createElement(e.Fragment,null,e.createElement(Ey,{layout:r,tabItems:a,variablesForQuery:i,...o}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mostReadContainer:{layout:r,tabItems:n,variablesForQuery:i,...o}})} };`}}))},H_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultMovies),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getMoviesData&variables=${encodeURIComponent(JSON.stringify({status:t.defaultVariablesForQuery.status,cursor:r,orderField:Ly.EXPECTATION_LEVEL,orderDirection:Dy.DESC}))}`,options:{headers:i}}];try{const e=await Zt(...a),{staticHost:t}=document.body.dataset,r=((e,t)=>Array.isArray(e)?[]:e?.movies?.edges?.map(e=>{const r=e?.node,n=r?.movieCastings?.edges?.find(e=>"Réalisateur"===e?.node?.position);return{link:r?.article_url||"#",title:r?.title_fr||"",cardImageProps:{cover:(r?.movieMedias?.edges?.length??0)>0?`${t}/movies/posters/${r?.movieMedias?.edges?.[0]?.node?.src?.replace("-%format","")??""}`:""},summary:r?.summary_short||"",castings:r?.movieCastings?.edges?.filter(e=>"cast"===e?.node?.type).map(e=>`${e?.node?.firstname} ${e?.node?.lastname}`)??[],genres:r?.genres?.filter(e=>null!==e)||[],directedBy:n?`${n?.node?.firstname} ${n?.node?.lastname}`:void 0,releaseDate:r?.release_date?ay(new Date(r.release_date)):"",seeMoreLink:{children:"Voir la fiche du film",href:r?.article_url||"#"}}})||[])(e,t);s(e=>[...e,...r||[]]),n(e?.movies?.pageInfo?.endCursor??null),o(e?.movies?.pageInfo?.hasNextPage??!1),It()}catch(e){console.error("20mn> Error while loading posts:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useMemo(()=>({isLoading:l,items:a,hasNextPage:i,onLoadMore:u}),[l,a,i,u])},V_=({isSSR:t=!0,layout:r,items:n,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,items:s,hasNextPage:l,onLoadMore:c}=H_({defaultMovies:n,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Ny()},[a]),e.createElement(e.Fragment,null,e.createElement(Sy,{layout:r,items:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({moviesListContainer:{layout:r,items:s,variablesForQuery:i,seeMoreButton:o}})} };`}}))},U_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const l=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Zt(...l),t=(({pageEndpoint:e,imgEndpoint:t,data:r})=>Vy({pageEndpoint:e,imgEndpoint:t,data:r,hasSummary:!0}).map(e=>(delete e.socialBarProps,{...e,linkProps:{children:"Je participe","aria-label":"Je participe au quiz",href:e.link}})))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e}),r={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),n(r.endCursor),o(r.hasNextPage),It()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect(()=>{l&&d()},[l]),e.useEffect(()=>{l&&c(!1)},[a]),e.useEffect(()=>{(()=>{const e=document.getElementById("quiz-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(It(),t.unobserve(e.target))})}),r=e.querySelector(".card-item-1");r&&t.observe(r);const n=e.querySelector(".card-item-8");n&&t.observe(n);const i=e.querySelector(".card-item-16");i&&t.observe(i)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},K_=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,totalArticles:s})=>{const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=U_({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect(()=>{l||Ny()},[l]);const f=c.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return e.createElement(e.Fragment,null,e.createElement(xy,{layout:r,articles:f,seeMoreButton:u?{...o,disabled:l,onClick:d}:void 0,currentPagePath:a,totalArticles:s}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({quizContainer:{layout:r,articles:f,variablesForQuery:i,seeMoreButton:o}})} };`}}))},$_=(r,n)=>{const i=document.getElementById(r),o=n?window?.__staticHydrationData?.liveImportantPostsContainer:window?.__staticHydrationData?.livePostsContainer,a=n?"liveImportantPostsContainer":"livePostsContainer";if(i&&o){const r=t.createRoot(i);r&&r.render(e.createElement(O_,{isSSR:!1,staticHydrationDataName:a,...o,posts:P_(o?.posts),variablesForQuery:o.variablesForQuery}))}},G_=(e,t,r,n)=>{r?e.setAttribute(t,"true"):e.setAttribute(t,"false")},W_=(e,t,r)=>{t?e.classList.add(r):e.classList.remove(r)},Z_={"probleme-ordinateur":"Votre message. Veuillez préciser votre navigateur.","probleme-mobile":"Votre message. Veuillez préciser votre navigateur et l’appareil que vous utilisez.","probleme-app":"Votre message. Veuillez préciser l’appareil que vous utilisez."},Q_={"suppression-anonymisation":"Dans votre message, merci d'indiquer votre objet, nom / prénom, adresse mail et adresse URL vers l'article concerné si besoin.",jeux:"Ecrivez votre message en précisant votre appareil, le navigateur utilisé ainsi que les jeux concernés.",newsletter:"Ecrivez votre message en précisant la date et/ou le nom de la newsletter concernée.",accessibility:"Ecrivez votre message en précisant si nécessaire la/les page(s) ou le/es composant(s) concernés."};function J_(e){return{serviceSelect:e.querySelector("select#service"),subServiceSelect:e.querySelector("select#subservice"),subService:e.querySelector("select#subservice")?.parentElement?.parentElement,commonObjectSelect:e.querySelector("select#common-object"),commonObject:e.querySelector("select#common-object")?.parentElement?.parentElement,techObjectSelect:e.querySelector("select#tech-object"),techObject:e.querySelector("select#tech-object")?.parentElement?.parentElement,contentInput:e.querySelector("textarea#message"),sourceSelect:e.querySelector("select#source"),source:e.querySelector("select#source")?.parentElement?.parentElement,gamesObjectSelect:e.querySelector("select#games-object"),gamesObject:e.querySelector("select#games-object")?.parentElement?.parentElement,emailInput:e.querySelector("input[type=email]"),messageInput:e.querySelector("textarea#message")}}const Y_=(e,t,r)=>{const{subService:n,commonObject:i,techObject:o,gamesObject:a,source:s}=e,l="redaction"===t,c="service-technique"===t,u="jeux"===t;n&&(W_(n,r||!l,"u-mask"),G_(n,"aria-hidden",r||!l)),i&&(W_(i,r||!l,"u-mask"),G_(i,"aria-hidden",r||!l)),o&&(W_(o,r||!c,"u-mask"),G_(o,"aria-hidden",!c)),a&&(W_(a,r||!u,"u-mask"),G_(a,"aria-hidden",r||!u)),s&&(W_(s,r||!u,"u-mask"),G_(s,"aria-hidden",r||!u))},X_=(e,t)=>{e&&(G_(e,"required",t),G_(e,"aria-required",t))},ew=()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=J_(e),{serviceSelect:r,subServiceSelect:n,commonObjectSelect:i,techObjectSelect:o,gamesObjectSelect:a,sourceSelect:s,contentInput:l}=t,c=r?.selectedOptions?.[0]?.hidden??!1;Y_(t,r?.selectedOptions?.[0]?.value??"",c),(()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=J_(e),{emailInput:r,messageInput:n,serviceSelect:i}=t;r?.addEventListener("blur",()=>{const e=document.querySelector("#email-error");e&&(r.checkValidity()?W_(e,!0,"u-mask"):W_(e,!1,"u-mask"))}),n?.addEventListener("blur",()=>{const e=document.querySelector("#message-error");e&&(""!==n.value?W_(e,!0,"u-mask"):W_(e,!1,"u-mask"))}),i?.addEventListener("blur",()=>{const e=document.querySelector("#service-error");e&&(i.checkValidity()?W_(e,!0,"u-mask"):W_(e,!1,"u-mask"))})})(),r?.addEventListener("change",e=>{const{target:r}=e;if(!(r instanceof HTMLSelectElement))return;const c=r.value,u="service-technique"===c,d="jeux"===c,f="redaction"===c;X_(n,f),X_(i,f),X_(o,u),X_(a,d),X_(s,d),Y_(t,c,r.selectedOptions[0]?.hidden??!1),l&&l.setAttribute("placeholder",Q_[c]??"Votre message.")}),o?.addEventListener("change",e=>{const{target:t}=e;t instanceof HTMLSelectElement&&l&&l.setAttribute("placeholder",Z_[t.value]??"Votre message.")})};var tw=()=>{ew(),(()=>{const e=document.querySelector("form#contact-form");e&&e.addEventListener("submit",t=>{t.preventDefault();const r=new FormData(e),n=r.get("message")?.toString().trim(),i=r.get("email")?.toString().trim();let o=r.get("service")?.toString().trim();const a=r.get("subservice")?.toString().trim(),s=r.get("common-object")?.toString().trim(),l=r.get("tech-object")?.toString().trim(),c=r.get("games-object")?.toString().trim(),u=r.get("source")?.toString().trim();if([!!i,!!o,!!n,!!("redaction"!==o||a&&s),!("service-technique"===o&&!l),!("jeux"===o&&!c&&!u)].includes(!1))return void alert("Tous les champs obligatoires doivent être remplis.");let d,f=null;const p=e=>{if(!e)return"";const t=document.querySelector(`option[value="${e}"]`);return t&&t instanceof HTMLOptionElement?t.text:""};switch(o){case"redaction":d=s,f=p(d),a&&(o=a);break;case"jeux":{d=c;const e=p(d);f=u?`${e} (source: ${u})`:e;break}case"service-technique":d=l,f=p(d)}const m=document.querySelector("#li-antibot-token");if(!(m&&m instanceof HTMLInputElement))return void alert("Vous devez valider le captcha.");const h={antibotToken:m.value,service:o,email:i,message:n,object:f,objectId:d||null,accessSource:u?.includes("app-")?"apps":"site"},g=document.body.getAttribute("data-http-taskrunner-api-host");fetch(`${g}/contact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)}).then(e=>e.json()).then(e=>{e.success?(alert("Votre message a bien été envoyé à nos services."),window.location.reload()):alert("Merci de valider le captcha afin d'envoyer votre message.")}).catch(e=>{console.error("Error:",e)})})})()};const rw=(e=document)=>e.querySelectorAll('iframe[src*="www.ultimedia.com"], iframe[data-src*="www.ultimedia.com"]'),nw=()=>document.querySelectorAll('div[class*="c-content"] iframe[data-src*="www.ultimedia.com"], div[class*="c-content"] iframe[src*="www.ultimedia.com"]');var iw=()=>{(()=>{const e=rw(),t=window.datalayerInfo||{};0!==Object.keys(t).length&&0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:r,pathname:n,searchParams:i}=new URL(t),o=`${r}${n}`,a=`category=${no("category")}&sub_category=${no("subcategory")}&tags=${no("tags")}&content_id=${no("content_id")}&brand_safety=${no("brand_safety")}&page_type=${no("page_type")}&pos=instream`;i.append("tagparam",a),e.setAttribute("data-src",`${o}?${i.toString()}`)})})(),(()=>{const e=nw();e&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:r,pathname:n,search:i}=new URL(t),o=`${r}${n}`.replace(/\/chromeless\/1$/,"").replace(/\/$/,"");e.setAttribute("data-src",`${o}${window.layout===Qt.DESKTOP?"":"/chromeless/1"}${i}`)})})(),(()=>{const e=rw();0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})(),(()=>{if(window.layout!==Qt.DESKTOP||window.datalayerInfo?.pageName===Ft.TV_HOME){try{Vt(zt.DIGITEKA_VIDEO_FEED)}catch(e){e instanceof Error&&console.error(e.message)}Ht({text:'MDTK_videofeed = "01100132";'+(nw().length>0&&window.layout===Qt.DESKTOP?"CARROUSEL_videofeed=true;":"")})}})()};const ow=()=>{const e=Array.from(document.querySelectorAll('[data-script-loading="lazy"]'));e.length>0&&(e.forEach(e=>{const t=document.createElement("script");t.type="text/javascript",t.innerHTML=e.innerHTML.replace(/&quot;|&amp;/g,e=>"&quot;"===e?'"':"&"),t.innerHTML=t.innerHTML.replace(/&#x27;/g,"'"),e.after(t),e.remove()}),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{e.getCurrentUserStatus().purposes["activation-gGierZpp"]?.enabled?(Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.add("u-hidden")}),Array.from(document.getElementsByClassName("embed-wrapper")).forEach(e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})):Array.from(document.getElementsByClassName("cmp-placeholder")).forEach(e=>{e.classList.remove("u-hidden")})}))};var aw=()=>{(()=>{if(document.querySelector(".gcse-search")&&window.envVariables?.googleSearchCode)try{Vt(zt.GOOGLE_SEARCH)}catch(e){e instanceof Error&&console.error(e.message)}})()};let sw,lw;const cw=e=>{sw&&("show"===e?(sw.classList.remove("c-header-mini--is-hidden"),lw?.classList?.add("c-menu--with-header-mini")):(sw.classList.add("c-header-mini--is-hidden"),lw?.classList?.remove("c-menu--with-header-mini")))},uw=e=>{const t=e[0];sw&&(t.isIntersecting?cw("hidden"):cw("show"))};let dw;let fw=0;const pw=e=>{if(!dw)return;const t=document.querySelector("button.c-btn--close:not(.u-hidden)"),r=document.getElementById("live-refresh-button");if("show"===e)return dw.classList.remove("c-header-mobile--is-hidden"),t&&t.classList.add("c-btn--close-is-below-header"),void(r&&(r.classList.remove("u-sticky--spaced-top-screen"),r.classList.add("u-sticky--spaced-header-mobile")));dw.classList.add("c-header-mobile--is-hidden"),t&&t.classList.remove("c-btn--close-is-below-header"),r&&(r.classList.add("u-sticky--spaced-top-screen"),r.classList.remove("u-sticky--spaced-header-mobile"))},mw=()=>{dw=document.querySelector(".c-header-mobile"),dw&&window.addEventListener("scroll",()=>{window.scrollY<780?pw("show"):(()=>{const e=window.scrollY;e>fw?(pw("hidden"),fw=e):fw-e>100&&(pw("show"),fw=e)})()})},hw=e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)},gw=(e,t)=>{e.forEach(e=>{if(e.isIntersecting&&e.target instanceof HTMLElement){const{target:r}=e,n=r.id,i=r.dataset?.eventName;(n||i)&&(r.dataset.lazyLoaded="true",t.unobserve(r),i?(document.dispatchEvent(new CustomEvent(i,{detail:{target:r}})),console.log(`20minLazyCall: element event name %c${i}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")):n&&(r.dispatchEvent(new Event(n)),console.log(`20minLazyCall: element with id %c${n}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")))}})},vw=()=>{window.lazyObservers={},window.lazyObservers.defaultObserver=new IntersectionObserver(gw,{rootMargin:"700px",threshold:0}),window.lazyObservers.instantObserver=new IntersectionObserver(gw,{rootMargin:"0px",threshold:0});[].forEach(e=>{hw(e)}),document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach(e=>{hw(e)})};let bw;const yw=document.querySelector("button.c-btn--close"),_w=document.querySelectorAll('div[id^="taboola-below-article"]'),ww="20px",Ew="211px";let Sw=0,xw=0;const Nw=e=>{const t=[];return _w.forEach((r,n)=>{const i=r.getBoundingClientRect(),{top:o,bottom:a}=i;"top"===e&&o<=180||"bottom"===e&&o<document.documentElement.clientHeight&&a>0?t[n]=!0:t[n]=!1}),!!t.find(e=>!0===e)},kw=(e,t)=>{const r=Nw("bottom");"down"===t&&(r?(bw.classList.remove("c-read-also-banner--is-hidden"),bw.classList.remove("c-read-also-banner--is-fixed-below-header"),yw&&(yw.style.top="140px")):yw&&(yw.style.top=ww),xw=e),"up"===t&&xw-e>100&&(bw.classList.add("c-read-also-banner--is-fixed-below-header"),r?(bw.classList.remove("c-read-also-banner--is-hidden"),yw&&(yw.style.top=Ew)):(bw.classList.add("c-read-also-banner--is-hidden"),yw&&(yw.style.top=e>780?"90px":"")),xw=e)},Cw=(e=document.querySelector("div.c-read-also-banner"))=>{e&&(bw=e,bw.classList.add("c-read-also-banner--is-hidden"),setTimeout(()=>{bw.classList.remove("u-hidden")},500),window.addEventListener("scroll",()=>{if(Nw("top"))return void bw.classList.add("c-read-also-banner--is-hidden");const e=!!document.querySelector('body[data-layout="mobile"]'),t=(()=>{let e=null;return e=document.body.getBoundingClientRect().top>Sw?"up":"down",Sw=document.body.getBoundingClientRect().top,e})();e?kw(window.scrollY,t):((e,t)=>{const r=bw.dataset.bannerLimitTop||"0";"up"===t&&-document.body.getBoundingClientRect().top>=parseInt(r,10)&&(bw.classList.remove("c-read-also-banner--is-hidden"),yw&&(yw.style.top=Ew)),("down"===t||-document.body.getBoundingClientRect().top<=parseInt(r,10))&&(bw.classList.add("c-read-also-banner--is-hidden"),yw&&(yw.style.top=e>780?ww:""))})(window.scrollY,t)}))},Tw=()=>{const{refreshInterval:e}=document.body.dataset;Number(e)>0&&((e,t)=>{let r;const n=1e3*t,i=()=>{clearTimeout(r),r=setTimeout(e,n)};document.addEventListener("click",i),document.addEventListener("keypress",i),document.addEventListener("scroll",i),i()})(()=>{window.location.reload()},Number(e))},Aw=()=>{document.querySelectorAll(".c-skip-link").forEach(e=>{e.addEventListener("click",e=>{if(!(e.currentTarget instanceof HTMLAnchorElement))return;const t=e.currentTarget.getAttribute("href")?.substring(1),r=t?document.getElementById(t):null;r&&(r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),setTimeout(()=>{r.focus()},0))})})};wt(),Wt(),vw(),ow(),(()=>{const e=document.querySelector("div#dfp_header_ad"),t=document.querySelector("div#taboola-below-article-thumbnails");e&&t&&new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?e.style.visibility="hidden":e.style.visibility="visible"})}).observe(t)})(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Aw):Aw(),(()=>{const e=document.getElementById("data-preferences-switch");if(!(e&&e instanceof HTMLInputElement))return;const t=localStorage.getItem(St);if(null!==t){const r="true"===t;e.checked=r,xt(e,r)}e.addEventListener("change",({target:e})=>{if(!(e instanceof HTMLInputElement))return;const{checked:t}=e;xt(e,t),localStorage.setItem(St,t.toString()),localStorage.setItem(Et,"false"),t&&localStorage.setItem(Et,"true"),window?.pa?.privacy&&(window.pa.privacy.setMode("exempt"),t&&window.pa.privacy.setMode("optout"))})})(),Rt(),jt(),Ct(),(()=>{const r=document.getElementById("c-alert-info");if(r){const n=t.createRoot(r);n&&n.render(e.createElement(Wy,null))}})(),(()=>{if(sw=document.querySelector(".c-header-mini"),sw){const e=document.documentElement.scrollTop,t=document.querySelector(".c-header");lw=document.querySelector(".c-menu"),t&&(e>t.offsetHeight?cw("show"):cw("hidden"),new IntersectionObserver(uw,{threshold:[0],rootMargin:"0px 0px -100%"}).observe(t))}})(),(()=>{const r=document.getElementById("tabpanel-le-direct"),n=document.getElementById("live-refresh-button");if(r&&n){const r=t.createRoot(n);r&&r.render(e.createElement(I_,null))}})(),Tw(),aw(),iw(),(()=>{try{"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>{e.active?.scriptURL?.endsWith("/sw.js")&&e.unregister()})})}catch(e){console.error("Error while unregistering service worker:",e)}})(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_status:"{}"!==Tt("20mnUserInfo")?"Connecte":"Pas connecte",an:document.referrer,referrer:document.referrer,darkmode:"dark"===document.documentElement.getAttribute("data-theme"),page_uri:window.datalayerInfo?.pageUri,page_type:window.datalayerInfo?.pageName}),mw(),Cw(),(()=>{const e=document.querySelector(".c-header-page__print-button");e&&e.addEventListener("click",()=>{window.print()})})(),(()=>{const e=document.getElementById("feedback-button");e&&e.addEventListener("click",()=>{try{window.$screeb("survey.start","5d850959-8e04-425c-b6fe-df5c7dafd4f9",{distribution_id:"dc76b85e-e248-4ac1-a988-30250b4abb80"})}catch(e){console.error("Error while starting survey",e)}})})(),(()=>{const r=document.getElementById("archive-pdf-list-container"),n=window?.__staticHydrationData?.archivePdfListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(zy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("article-list-bottom-container"),n=window?.__staticHydrationData?.articleListBottomContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Ky,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("journalist-article-list-container"),n=window?.__staticHydrationData?.journalistArticleListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(o_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("home-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeHomeContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(g_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("department-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeDepartmentContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(m_,{isSSR:!1,...n}))}})(),$_("tabpanel-le-direct"),$_("tabpanel-temps-forts",!0),(()=>{const r=document.getElementById("local-news-container"),n=window?.__staticHydrationData?.localNewsContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(R_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("latest-articles-container"),n=window?.__staticHydrationData?.latestArticlesContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(l_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("live-and-most-read-container"),n=window?.__staticHydrationData?.liveAndMostReadContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(y_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("most-read-container"),n=window?.__staticHydrationData?.mostReadContainer;if(r&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<(new Date).getTime()){const i=t.createRoot(r);i&&i.render(e.createElement(j_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("latest-contents-carousel-container"),n=window?.__staticHydrationData?.latestContentsCarouselContainer;if(r&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<(new Date).getTime()){const i=t.createRoot(r);i&&i.render(e.createElement(u_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-form-container"),n=window?.__staticHydrationData?.electionsSearchBannerContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(dy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-departments-map-container"),n=window?.__staticHydrationData?.electionsDepartmentsMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(e_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-european-map-container"),n=window?.__staticHydrationData?.electionsEuropeanMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(n_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-constituencies-map-container"),n=window?.__staticHydrationData?.electionsConstituenciesMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Jy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("movies-container"),n=window?.__staticHydrationData?.moviesListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(V_,{...n,isSSR:!1}))}})(),(()=>{const r=document.getElementById("main-most-read-container"),n=window?.__staticHydrationData?.mainMostReadContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(B_,{...n,isSSR:!1}))}})(),(()=>{const r=document.getElementById("quiz-container"),n=window?.__staticHydrationData?.quizContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(K_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("tv-tab-replays"),n=window?.__staticHydrationData?.replaysTvExtractsAndReplaysContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(My,{name:"replays",isSSR:!1,...n}))}const i=document.getElementById("tv-tab-extraits"),o=window?.__staticHydrationData?.extraitsTvExtractsAndReplaysContainer;if(i&&o){const r=t.createRoot(i);r&&r.render(e.createElement(My,{name:"extraits",isSSR:!1,...o}))}})(),(()=>{if(!document.querySelector("#contact-form"))return;const e=document.body.getAttribute("data-http-taskrunner-api-host"),t=window.sessionStorage.getItem("antibotId")||"";e?fetch(`${e}/captcha`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({antibotId:t})}).then(e=>e.json()).then(e=>{if(!e)return;const{captchaServerAntibotId:t,requestId:r}=e.body||{};t&&r&&(window.LI_ANTIBOT.loadAntibot(["IMAGE","QUESTION","FR","abuUFfA+tOvM","https://captcha.liveidentity.com/captcha",null,"https://static.20mn.fr/apps/20minutes/styles/captcha-override.css",t,r,!0]),window.sessionStorage.setItem("antibotId",t))}).catch(e=>{console.error("Error:",e)}):console.error("Error: goomUri is not defined")})(),tw(),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,$t(e))),(()=>{const e=document.querySelector("#game-help-button");e&&e.addEventListener("click",()=>{try{window.$screeb("survey.start","9beafda1-5240-40eb-975f-fa2be61d1a38",{distribution_id:"1f117b33-3bc3-4136-baa6-f0ac2be83ef0"})}catch(e){console.error("Error while starting survey",e)}})})(),Ut(),Gt()}(React,ReactDOMClient);
43
43
  //# sourceMappingURL=main.min.js.map
@@ -1,3 +1,4 @@
1
1
  export declare const FORWARD_DISABLE_MESUREDA_KEY = "forward-disable-audience-measure";
2
+ export declare const CONSENT_SWITCH_KEY = "data-preferences-consent";
2
3
  declare const initConsentSwitch: () => void;
3
4
  export { initConsentSwitch };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@20minutes/tyr",
3
- "version": "2.29.4",
3
+ "version": "2.29.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/20minutes/tyr.git"