(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[434],{6541:function(e,t,r){"use strict";var n=r(5893),o=r(7294),l=r(5059),s=r.n(l),a=r(4794),c=r(86);let i="img, a, button";function u(e){let{count:t,current:r,setCurrent:o}=e,l=[...Array(t)];return(0,n.jsx)("div",{className:"carousel__dots",children:l.map((e,t)=>{let l=s()("carousel__dot",{"carousel__dot--current":t===r});return(0,n.jsx)("button",{className:l,onClick:e=>{e.stopPropagation(),o(t)},"aria-label":t},t)})})}function d(e){let{carouselRef:t,current:r,setCurrent:l,sections:a}=e,[c,i]=o.useState([]);return(o.useEffect(()=>{t.current&&a.length&&i(Array.from(a).reduce((e,t)=>{let r=t.querySelector("img");return(null==r?void 0:r.src)?[...e,r.src]:e},[]))},[t,a]),c.length)?(0,n.jsx)("div",{className:"carousel__thumbnails",children:c.map((e,t)=>{let o=s()("carousel__thumbnail",{"carousel__thumbnail--current":t===r});return(0,n.jsx)("input",{type:"image",className:o,src:e,onClick:e=>{e.stopPropagation(),l(t)}},t)})}):null}function f(e,t){let r=e%t;return r<0?t<0?r-t:r+t:r}function v(e){e.setAttribute("draggable",!1)}function h(e){e.removeAttribute("draggable")}function m(e){["opacity","pointer-events","touch-action"].forEach(t=>e.style.removeProperty(t))}t.Z=o.memo(function(e){let{delay:t=4e3,fade:r=!1,controls:l,dots:b,thumbnails:p,alwaysShowControls:y,allowDragOnDesktop:E,children:g,onChange:_,currentSlide:L}=e,x=o.useRef(),{cmsMode:w,lang:A,path:C}=(0,a.W9)(),[j,k]=o.useState([]),[S,N]=o.useState(null!=L?L:0),[M,P]=o.useState(),[R,W]=o.useState(0),q="editing"===w,X=!q&&E,D=j.length,I=S<D-1,T=0!==S,O=o.useCallback(e=>{null==e||e.stopPropagation(),N(f(S+1,D))},[S,D]),z=o.useCallback(e=>{null==e||e.stopPropagation(),N(f(S-1,D))},[S,D]),Z=e=>{var t;if(r)return;let{type:n}=e,o="mousedown"===n;if(!X&&o||M||!o&&!(null===(t=e.targetTouches)||void 0===t?void 0:t.length)){let e=x.current.firstElementChild;e.style.transform="translateX(".concat(-(100*S),"%)"),e.style.removeProperty("transition"),W(void 0),P(void 0);return}let{clientX:l,clientY:s}=o?e:e.targetTouches[0];P({startX:l,startY:s})},Y=e=>{var t;if(r)return;let{type:n}=e,o="mousemove"===n;if(!M||!X&&o||!o&&!(null===(t=e.targetTouches)||void 0===t?void 0:t.length)){P(void 0);return}let{startX:l}=M,{clientX:s}=o?e:e.targetTouches[0],a=l-s,c=a>0?"-":"+",i=x.current.firstElementChild,u="translateX(calc(".concat(-(100*S),"% ").concat(c," ").concat(Math.abs(a),"px))");Object.assign(i.style,{transform:u,transition:"none"}),W(a)},F=e=>{var t;if(r)return;let{type:n}=e,o="mouseup"===n;W(void 0);let l=x.current.firstElementChild;if(!M||!X&&o||!o&&!(null===(t=e.changedTouches)||void 0===t?void 0:t.length)){l.style.transform="translateX(".concat(-(100*S),"%)"),l.style.removeProperty("transition"),P(void 0);return}l.style.transform="translateX(".concat(-(100*S),"%)"),l.style.removeProperty("transition");let{startX:s,startY:a}=M,{clientX:c,clientY:i}=o?e:e.changedTouches[0],u=Math.abs(s-c);if(u<80&&u<Math.abs(a-i)){l.style.transform="translateX(".concat(-(100*S),"%)"),l.style.removeProperty("transition"),P(void 0);return}s<c&&S>0&&z(),s>c&&S<D-1&&O(),P(void 0)},B=o.useCallback(()=>Array.from(x.current.querySelectorAll("section[data-class]")).filter(e=>"none"!==window.getComputedStyle(e).display),[]),H=o.useCallback(()=>{k(B())},[B]);o.useEffect(()=>{t||void 0===L||N(L)},[L,t]),o.useEffect(()=>{var e;let t=null===(e=x.current)||void 0===e?void 0:e.querySelector(".cms");if(t)return t.addEventListener("ublo-section-created",H),t.addEventListener("ublo-section-pasted",H),t.addEventListener("ublo-section-removed",H),()=>{t.removeEventListener("ublo-section-removed",H),t.removeEventListener("ublo-section-pasted",H),t.removeEventListener("ublo-section-created",H)}},[H]),o.useEffect(()=>{let e=x.current,t=e.firstElementChild,n=B(),o=Array.from(e.querySelectorAll(i));k(n),q||(n.forEach((e,t)=>{Array.from(e.querySelectorAll("a")).forEach(e=>{e.setAttribute("tabindex",S===t?"0":"-1")})}),o.forEach(v)),!r||q?(n.forEach((e,t)=>{m(e),q||S!==t?e.removeAttribute("data-current"):e.setAttribute("data-current","")}),t.style.transform="translateX(".concat(-(100*S),"%)"),t.style.removeProperty("transition")):(o.forEach(h),n.forEach((e,t)=>{S===t?(m(e),e.setAttribute("data-current","")):(e.removeAttribute("data-current"),Object.assign(e.style,{opacity:0,pointerEvents:"none",touchAction:"none"}))}),r&&t.style.removeProperty("transform"))},[S,q,r,B,A,C]);let K=o.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);o.useEffect(()=>{"function"==typeof _&&_(S)},[S,_]),o.useEffect(()=>{let e=Array.from(x.current.firstElementChild.querySelectorAll(i));R?e.forEach(e=>e.addEventListener("click",K)):e.forEach(e=>setTimeout(()=>e.removeEventListener("click",K),100))},[R,K]),function(e,t,r,n){let l=o.useRef();o.useEffect(()=>{l.current=e},[e]),o.useEffect(()=>{if(!n&&null!==t&&0!==t){let e=setInterval(function(){l.current()},t);return()=>clearInterval(e)}},[r,t,n])}(()=>{q||O()},t,S,R);let U=s()("carousel",{carousel__fade:r&&!q,carousel__editing:q});return(0,n.jsxs)("div",{ref:x,className:U,onMouseDown:Z,onTouchStart:Z,onMouseMove:Y,onTouchMove:Y,onMouseUp:F,onTouchEnd:F,onMouseLeave:F,children:[g,(q||l&&T||y)&&(0,n.jsx)("button",{className:"carousel--prev",onClick:z,disabled:y&&!T,"aria-label":"Pr\xe9cedent / Previous",children:(0,n.jsx)(c.ArrowLeft,{className:"carousel--icon"})}),(q||l&&I||y)&&(0,n.jsx)("button",{className:"carousel--next",onClick:O,disabled:y&&!I,"aria-label":"Suivant / Next",children:(0,n.jsx)(c.ArrowRight,{className:"carousel--icon"})}),b&&(0,n.jsx)(u,{count:D,current:S,setCurrent:N,sections:j}),p&&D>1&&(0,n.jsx)(d,{carouselRef:x,count:D,current:S,setCurrent:N,sections:j})]})})},9010:function(e,t,r){"use strict";r.d(t,{Z:function(){return v}});var n=r(5893),o=r(7294),l=r(5059),s=r.n(l),a=r(4794),c=r(8979),i=r(86);let u={width:void 0,height:void 0};var d=r(1931),f=r.n(d),v=function(e){let{className:t,children:r}=e,{cmsMode:l}=(0,a.W9)(),d=o.useRef(null),v=o.useRef(null),[h,m]=o.useState(!1),[b,p]=o.useState({prevDisabled:!1,nextDisabled:!1}),{width:y}=function(){let[e,t]=o.useState(u),r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return o.useEffect(()=>{if(r(),!("undefined"!=typeof ResizeObserver))return window.addEventListener("resize",r,{passive:!0}),()=>{window.removeEventListener("resize",r)};{let e=new ResizeObserver(r);return e.observe(document.body),()=>{e.unobserve(document.body)}}},[]),e}(),E=()=>{let e=d.current;e&&(e.scrollLeft=0)},g=e=>()=>{let t=v.current,r=d.current;if(t&&r){let n=t.querySelector("section:not([data-hidden], [hidden], [style*='display: none'])");if(n){let t=n.clientWidth;0===e&&(r.scrollLeft-=t),1===e&&(r.scrollLeft+=t)}}},_=o.useCallback(()=>{let e=v.current,t=d.current;e&&t&&(m(t.clientWidth<e.clientWidth),p({prevDisabled:0===Math.floor(t.scrollLeft),nextDisabled:Math.floor(t.scrollLeft)===Math.floor(t.scrollWidth)-Math.floor(t.clientWidth)}))},[]);o.useEffect(()=>{let e=v.current;if(!l&&e){let t=new MutationObserver(E);return t.observe(e,{attributes:!0,childList:!0,subtree:!0}),()=>{t&&t.disconnect()}}},[l]),o.useEffect(()=>{_()},[l,_,y]),o.useEffect(()=>{E()},[y]);let L=s()(f().carousel,t);return(0,n.jsxs)("div",{className:L,children:[h&&(0,n.jsxs)("div",{className:f().controls,"data-controls":"",children:[(0,n.jsx)(c.Z,{className:f().control,variant:"link",onClick:g(0),disabled:b.prevDisabled,"data-control":"prev",children:(0,n.jsx)(i.ChevronLeft,{className:f().controlIcon})}),(0,n.jsx)(c.Z,{className:f().control,variant:"link",onClick:g(1),disabled:b.nextDisabled,"data-control":"next",children:(0,n.jsx)(i.ChevronRight,{className:f().controlIcon})})]}),(0,n.jsx)("div",{className:f().inner,ref:d,onScroll:_,"data-inner":"",children:o.cloneElement(r,{ref:v})})]})}},6856:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(7294),o=r(4794);let l={rootMargin:"0px",threshold:Array.from({length:101}).map((e,t)=>t/100)};function s(e,t,r){let s=!(arguments.length>3)||void 0===arguments[3]||arguments[3],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.2,i=arguments.length>5?arguments[5]:void 0,{lang:u,path:d}=(0,o.W9)(),[f,v]=n.useState(!1),h=n.useCallback(e=>{e.forEach(e=>{let{intersectionRatio:t,target:r}=e;if(!r||!r.classList[0])return;let n=a(r.classList[0]);0!==t&&(s?t<=c?r.classList.remove(n):r.classList.add(n):t>=c&&r.classList.add(n))})},[c,s]);n.useEffect(()=>{v("undefined"!=typeof IntersectionObserver);let n=e.current,o=void 0!==r?Array.from(n.querySelectorAll(r)):[n];if(n&&!t){if(f){o.forEach(e=>{let t=e.classList[0];if(t){let r=a(t);e.classList.remove(r)}e.removeAttribute("data-in-view")});let e=new IntersectionObserver(h,l),t=()=>o.forEach(t=>{if(!t)return;let r=t.classList[0];if(r){let e=a(r);t.classList.remove(e)}t.removeAttribute("data-in-view"),e.disconnect()});return o.forEach(t=>null==e?void 0:e.observe(t)),()=>{t()}}o.forEach(e=>{let t=e.classList[0];if(t){let r=a(t);e.classList.add(r)}e.setAttribute("data-in-view","")})}},[h,t,f,u,d,e,r,i])}function a(e){return"".concat(e,"--in-view")}},1931:function(e){e.exports={carousel:"scrolling-carousel_carousel__Rj6dF",controls:"scrolling-carousel_controls__2YdBz",control:"scrolling-carousel_control__2qTKW",controlIcon:"scrolling-carousel_controlIcon__Fh_0w",inner:"scrolling-carousel_inner__NS4M8"}}}]);