1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1533],{81533:function(e,t,a){a.r(t),a.d(t,{default:function(){return h},getStaticProductProps:function(){return P}});var o=a(48282),n=a(11713),l=a(95818),r=a(88071),s=a(70521),u=a(60032),i=a(2218),m=a(11161),c=a.n(m),d=a(90227),v=a(18529),g=a(88321),p=a.n(g),f=a(99432),y=a(94316),_=a(70487);function h(e){let{ContentPages:t,FeaturedSpot:a,Sector:n,urlSector:m,OverviewPage:c}=e,g=(0,i.S)(),{multiple:_,sector:h,common:P}=g,w=()=>{let e=0,a=0,o=[[]];return t.forEach(t=>{var n,l,r,s;if(a%10==0&&0!==a&&(null===(n=o[e])||void 0===n?void 0:n.length)>=10&&e++,(null===(l=t.elements.tagsSector.value)||void 0===l?void 0:l.length)>0)t.elements.tagsSector.value.forEach(a=>{let n=null==a?void 0:a.codename;(E.includes(n)||!E[0])&&(Array.isArray(o[e])||(o[e]=[]),o[e].some(e=>e.system.codename===t.system.codename)||o[e].push(t),o[e].length>=10&&e++)});else{let a=null===(r=t.elements.tagsSector.value[0])||void 0===r?void 0:r.codename;(E.includes(a)||!E[0])&&(Array.isArray(o[e])||(o[e]=[]),(null===(s=o[e])||void 0===s?void 0:s.length)<10&&o[e].push(t))}a++}),(0,y.m)(o)},S=()=>n.map(e=>{let a=0;return t.forEach(t=>{t.elements.tagsSector.value.forEach(t=>{let o=t.codename;e.codename===o&&a++})}),Object.assign({amountOfPagesWithTag:a,...e,name:h(e.codename)})}).sort((e,t)=>(0,f.T)(e.name,t.name)),x=()=>{let e=A.asPath.includes("?")&&A.asPath.split("?").reverse().pop(),t=!1!==e&&void 0!==e?e.split("/"):A.asPath.split("/");t.length>=3&&t.pop();let a=E[0]?t.join("/")+"?".concat(p()(P("sector"),{lower:!0}),"=").concat(E.map(e=>p()(h(e),{lower:!0})).join(",")):t.join("/");A.replace(a,void 0,{shallow:!0,scroll:!1})},[E,j]=(0,v.useState)(m?[m]:[]),[F,D]=(0,v.useState)(0),[O,T]=(0,v.useState)(w()),[b,k]=(0,v.useState)([]),A=(0,d.useRouter)();return(0,v.useEffect)(()=>{k(S()),T(w()),m&&(0,u.I)("sector",m,j,A.locale)},[]),(0,v.useEffect)(()=>{k(S()),T(w()),m&&(0,u.I)("sector",m,j,A.locale)},[A.locale,A.isReady,g.isReady]),(0,v.useEffect)(()=>{D(E.length),x(),k(S()),T(w())},[E]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.i,{page:c[0]}),!!a&&(0,o.jsx)(l.X,{model:a}),(0,o.jsx)(s.Z,{PagesToShow:O,overviewTitle:_("product"),amountOfFilters:F,filterTwo:{value:E,set:j,state:b,label:"sector"}})]})}let P=async e=>{let{locale:t,urlParam:a}=e,o=null!=t?t:"en",l=await n.e.items().type("content_page").containsFilter("elements.category",["product"]).languageParameter(o).equalsFilter("system.language",o).orderByDescending("elements.summary_date").elementsParameter(["featured","category","url","summary__title","summary__description","summary__image_frontify","part_of_campaign_page","summary__date","tags__content_type","tags__sector","dont_include_in_overview_page"]).collection("default").toPromise().then(e=>e.data.items.filter(e=>{var t;return!(null===(t=e.elements.dontIncludeInOverviewPage.value)||void 0===t?void 0:t.some(e=>"yes"===e.codename))}).sort((e,t)=>{var a,o;return Date.parse(null!==(a=e.elements.summaryDate.value)&&void 0!==a?a:e.system.lastModified)<Date.parse(null!==(o=t.elements.summaryDate.value)&&void 0!==o?o:t.system.lastModified)?1:-1}).sort((e,t)=>{var a,o,n;return((null===(a=e.elements.featured.value[0])||void 0===a?void 0:a.codename)?e.elements.featured.value[0].codename:"no")>((null===(o=t.elements.featured.value[0])||void 0===o?void 0:o.codename)?null===(n=t.elements.featured.value[0])||void 0===n?void 0:n.codename:"no")?-1:1})),r=await n.e.items().type("overview_page").languageParameter(o).containsFilter("elements.category",["product"]).collection("default").toPromise().then(e=>e.data.items);return{ContentPages:l,FeaturedSpot:!!r.length&&!!r[0].elements.hero.value[0]&&await n.e.item(r[0].elements.hero.value[0]).languageParameter(o).depthParameter(2).toPromise().then(e=>e.data.item),Sector:null==c().get("taxonomy_sector")?await n.e.taxonomy("sector").toPromise().then(e=>(c().put("taxonomy_sector",e.data.taxonomy.terms,864e5,function(){c().del("taxonomy_sector")}),e.data.taxonomy.terms)):c().get("taxonomy_sector"),urlSector:null!=a?a:null,OverviewPage:r,variants:await (0,_.F)("product")}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.