(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[565],{1012:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/coax/[[...slug]]",function(){return n(7468)}])},4230:function(t,e,n){"use strict";n.d(e,{r:function(){return a}});var i=n(1163),l=n(8592),r=n(2783);let s=(t,e)=>(0,r.lx)(t,e)||t.localized[0];function a(t){var e;let{query:n,push:r}=(0,i.useRouter)(),{locale:a}=(0,l.Q)(),c=Array.isArray(n.slug)&&n.slug[0]?null===(e=t.find(t=>s(t,a).slug.replace(/-+/g,"-")===n.slug[0].replace(/-+/g,"-")))||void 0===e?void 0:e.id:void 0;return{active:c,push:r,findSlug:e=>{let n=null;if("number"==typeof e){let l=t.find(t=>t.id===e);if(l){var i;n=(null===(i=s(l,a))||void 0===i?void 0:i.slug)||null}}return n}}}},1851:function(t,e,n){"use strict";n.d(e,{k:function(){return o}});var i=n(5893);n(7294);var l=n(5052),r=n.n(l),s=n(2344),a=n(9583),c=n(4171);function o(t){let{src:e,className:n,Icon:l}=t;return l||(l=a.wEH),(0,i.jsxs)("div",{className:(0,c.cn)(r().image,n),children:[(0,i.jsx)("img",{src:(0,s.$G)(e),alt:""}),(0,i.jsx)(l,{})]})}},333:function(t,e,n){"use strict";n.d(e,{s:function(){return m}});var i=n(5893),l=n(7294),r=n(4171),s=n(3399),a=n.n(s),c=n(1851),o=n(9583),u=n(1664),d=n.n(u),f=n(2537);function m(t){let{items:e,className:n,active:s,onActiveUpdate:u,withTitle:m,titleClassName:h}=t,[p,x]=(0,l.useState)(s||null),[g,_]=(0,l.useState)(6);(0,l.useEffect)(()=>{window.addEventListener("resize",t=>{_(Math.max(Math.min(5,Math.floor(window.innerWidth/200)),2))}),_(Math.max(Math.min(5,Math.floor(window.innerWidth/200)),2))},[]);let w=Array.from({length:Math.ceil(e.length/g)},(t,n)=>e.slice(n*g,n*g+g));return(0,i.jsx)("section",{className:(0,r.cn)(a().list,n),children:w.map((t,e)=>{let n=null!==p&&t.find(t=>t.id===p);return(0,i.jsxs)("div",{className:a().group,children:[(0,i.jsx)("ul",{className:"mw padded",style:{gridTemplateColumns:"repeat(".concat(g,", 1fr)")},children:t.map(t=>{let e=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.k,{src:t.logo||"/images/logo.svg",Icon:p===t.id?o.iFH:o.wEH,className:(0,r.cn)(a().image,p===t.id&&"is-active")}),m&&t.title&&(0,i.jsx)("span",{className:(0,r.cn)(a().title,h),children:t.title})]});return(0,i.jsx)("li",{className:(0,r.cn)(a().item),children:t.link?(0,i.jsx)(d(),{href:t.link,children:e}):(0,i.jsx)("button",{onClick:()=>{let e=p===t.id?null:t.id;x(e),u&&u(e)},children:e})},t.id)})}),n&&(0,i.jsx)("div",{className:a().content,children:"string"==typeof n.body?(0,i.jsx)("div",{className:"mw padded",children:(0,i.jsx)(f.H,{text:n.body})}):(0,i.jsx)("div",{className:"section",children:n.body})})]},e)})})}},568:function(t,e,n){"use strict";n.d(e,{Q:function(){return h}});var i=n(5893),l=n(9850),r=n.n(l);function s(t){let{videoId:e}=t;return(0,i.jsx)("iframe",{id:"ytplayer",width:"750px",height:"440px",style:{margin:"20px"},src:"https://www.youtube.com/embed/".concat(e,"?autoplay=1"),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})}var a=n(7294),c=n(4480),o=n(7436),u=n(6922),d=n(1174);let f=t=>(0,u.S)(d.GN.playlist,{params:{playlistId:t}});var m=n(34);function h(t){let{playlistId:e}=t,[n,l]=(0,a.useState)(),u=(0,c.Zl)(o.h);return(0,a.useEffect)(()=>{f(e).then(t=>l(t))},[e]),console.log(n),n?(0,i.jsx)("ul",{className:r().playlist,children:n.map(t=>(0,i.jsx)("li",{className:r().item,children:(0,i.jsx)("button",{onClick:()=>u((0,i.jsx)(s,{videoId:t.videoId})),children:(0,i.jsx)("img",{src:t.thumbnail,alt:""})})},t.videoId))}):(0,i.jsx)(m.a,{})}},2537:function(t,e,n){"use strict";n.d(e,{H:function(){return o}});var i=n(5893),l=n(7294),r=n(18),s=n.n(r),a=n(3935),c=n(568);function o(t){let{text:e}=t,n=(0,l.useRef)(null),[r,o]=(0,l.useState)([]);return(0,l.useEffect)(()=>{var t;let e=Array.from((null===(t=n.current)||void 0===t?void 0:t.querySelectorAll("[data-playlistId]"))||[]);o(e)},[e]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:s().text,ref:n,dangerouslySetInnerHTML:{__html:e||""}}),r.map(t=>a.createPortal((0,i.jsx)(c.Q,{playlistId:t.getAttribute("data-playlistId")}),t.getElementsByClassName("playlist-content")[0]))]})}},7468:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSP:function(){return c},default:function(){return o}});var i=n(5893),l=n(4657),r=n(333),s=n(8592),a=n(4230),c=!0,o=function(t){let{pages:e}=t,n=e.filter(t=>t.fields.find(t=>"about"===t.field&&"true"===t.value)),c=(0,l.mx)(n,{logo:!0,localized:!0}),{t:o}=(0,s.Q)(),{active:u,push:d,findSlug:f}=(0,a.r)(n);return(0,i.jsxs)("section",{className:"section",children:[(0,i.jsx)("h1",{className:"mw padded",children:o("COAX")}),(0,i.jsx)(r.s,{active:u,withTitle:!0,onActiveUpdate:t=>{let e=f(t);d(e?"/coax/".concat(e):"/coax",void 0,{shallow:!0})},items:c.map(t=>({id:t.id,title:t.localized.title,logo:t.logo,body:t.localized.body}))})]})}},2344:function(t,e,n){"use strict";function i(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let i=e.join(" ");return i.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9_\-\. ]/g,"").replace(/\s+/g,"-")}function l(t){return t.startsWith("http")?t:t.replace(/contrib\//g,"https://www.collectifcoax.com/contrib/")}n.d(e,{$G:function(){return l},lV:function(){return i}})},5052:function(t){t.exports={image:"hover-image_image__FL9_R"}},3399:function(t){t.exports={list:"square-list-with-content_list__s5BDp",group:"square-list-with-content_group__UM8bq",item:"square-list-with-content_item__QfcH4",title:"square-list-with-content_title__nB4wn",content:"square-list-with-content_content__PCim1"}},9850:function(t){t.exports={playlist:"youtube-list_playlist__Kw5og",item:"youtube-list_item__hNn3N"}},18:function(t){t.exports={text:"rich-text_text__3JyQS"}}},function(t){t.O(0,[774,888,179],function(){return t(t.s=1012)}),_N_E=t.O()}]);