!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f3202d13-6f51-471a-b251-e4c0765bc09c",e._sentryDebugIdIdentifier="sentry-dbid-f3202d13-6f51-471a-b251-e4c0765bc09c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6662],{41714:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return m},default:function(){return h}});var a=r(95235),n=r(64897),s=r(94922),i=r(46420),l=r(2002),o=r(36734),c=r(15188),u=r(84553),d=r(82090),p=r(52322);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function f(e){for(var t=1;t{let{preview:t,breadcrumbLinks:r,filterSections:n,lightScrim:F,page:B,pageIcon:T,sortByOptions:G,showRating:R,analytics:$,enableStickyCollectionNav:A,fullBleedHero:q,cmsProductPageSize:V,hiddenFilters:U,disableDefaultMarketingPageHeading:X}=e;const{pageHeader:K,ctaCollection:Q,merchandisedGrid:W,legalText:Y,marketingPage:J}=B||{},ee=J?_[J?.templateName??"plmpStandard"]:null,te=X?s.Fragment:f.H.NewLevel,re=(0,O.O_)(),{text:ae}=(0,o.useLocalizer)(),{trackLoadMoreProducts:ne}=(0,u.u)(),se=(0,i.useRouter)(),{asPath:ie,pathname:le,query:oe}=se,ce=(0,O.D9)(oe?.slug),ue=(0,o.useFeature)("wdev-1631-horizontal-tiles"),de=ue?.variant?.payload?.value,pe=(0,x.Z)(x.o.TABLET_SMALL),ge="horizontal"===de&&!pe,fe=(0,o.deserializeHash)(ie),me=(0,s.useRef)(),{0:he,1:be}=(0,s.useState)((()=>G.find((e=>{let{param:t}=e;return t===fe.sort}))?.value||G[0].value)),{0:ye,1:je}=(0,s.useState)((()=>parseInt(fe.p)||0)),{isFilterModalOpen:Pe,selectedSortByOption:ve,toggleModalFiltersMenu:we,handleSortByChange:Oe}=(0,d.sI)({sortBy:he,sortByOptions:G,analytics:$,applySortBy:e=>{be((()=>e))}}),xe=(0,s.useMemo)((()=>G.map((e=>{let{value:t,label:r}=e;return{value:t,label:ae(r)}}))),[G,ae]),ke=(0,s.useMemo)((()=>({value:ve.value,label:ae(ve.label)})),[ve,ae]),Se=(0,s.useMemo)((()=>n.map((e=>{let{attribute:t}=e;return t}))),[n]),Fe=(W||[]).flat(),Me=(W||[]).flat().filter((e=>{let{sku:t}=e;return Boolean(t)})),{appliedFilters:De,appliedFiltersQuery:Ce,filteredProducts:Ne,filteredState:_e,refine:Le,refineByQuery:Ee,clearFilters:He}=(0,O.x3)(Me,Se,{operator:O.fP.AND,queryToInitializeFilters:fe,hidden:U}),Ie=0===De?.length&&ve.value===G[0].value,Be=(0,x.Z)(x.o.DESKTOP),Ze=(0,s.useRef)();Ze.current=Be;const ze=Ie?Fe:Ne,Te=(0,s.useMemo)((()=>ze.slice(0,(V||ze.length)*(ye+1))),[ye,ze,V]),Ge=Te.lengthhe?[...Te].sort(he):Te),[Te,he]),$e=(0,s.useCallback)((()=>{const e=(0,o.deserializeHash)(ie),t=G.find((t=>{let{param:r}=t;return r===e.sort}))?.value||G[0].value;Ee(e),be((()=>t)),je(parseInt(e.p)||0)}),[G,ie,Ee]),Ae=(0,s.useCallback)((e=>{const t=G.find((e=>{let{value:t}=e;return t===he}))?.param||G[0].value;return`#${new URLSearchParams(Z(Z({},e),{},{sort:t,p:ye})).toString()}`}),[G,he,ye]),qe=(0,s.useCallback)((e=>(je((()=>0)),e)),[]),Ve=(0,s.useCallback)((function(){qe(Le)(...arguments)}),[Le,qe]),Ue=(0,s.useCallback)((function(){qe(He)(...arguments)}),[He,qe]),Xe=(0,s.useCallback)((function(){qe(Oe)(...arguments)}),[Oe,qe]),Ke=(0,s.useCallback)((()=>{const{pageName:e}=$;ne(e);const t=(0,o.deserializeHash)(),r=ye+1;t.p=r,je((()=>r))}),[ye,$,ne]),Qe=(0,s.useMemo)((()=>Ae(Ce)),[Ce,Ae]),We=(0,s.useMemo)((()=>De.map((e=>({attribute:e.split(O.HA)[0],label:e.split(O.HA)[1],value:e})))),[De]),Ye=(0,s.useMemo)((()=>$?.featureFlag?{featureFlag:$.featureFlag}:{featureFlag:ue?.id,featureFlagVariant:de}),[$,ue,de]),Je=(0,s.useMemo)((()=>n.filter((e=>{let{attribute:t}=e;return _e[t]?.items?.length>0})).map(((e,t)=>{let{title:r,attribute:n}=e,s=(0,a.Z)(e,I);return(0,H.jsx)(S.vT,Z({attribute:n,title:r&&ae(r),startCollapsed:0!==t,refine:Ve,items:_e[n]?.items||[],showMoreLabel:ae("Show more"),showLessLabel:ae("Show less"),collapsible:!0,limit:5,showMore:!0,analytics:{pageName:$?.pageName}},s),n)}))),[n,_e,Ve,ae,$]),et=(0,s.useMemo)((()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(S.en,{$singleColumnMobile:ge,children:Re.map(((e,t)=>e.sku?(0,s.createElement)(v.I8,Z(Z(Z({},Ye),{},{key:e.sku+t},e),{},{constrain:!1,showRating:R||Boolean(se.query[M.Tx.UTM_CODE])||!1,mobileHorizontal:ge,analytics:{listDetails:{id:`clp-${(0,w.GL)($.pageName)}`,name:$.pageName}}})):(0,H.jsx)(C.Z,{asset:e.asset.primary.assetPath,cta:e.cta,heading:e.heading},e.heading+t)))}),Ge&&(0,H.jsx)(E.VR,{children:(0,H.jsx)(m.B,{variant:"tertiary",icon:h.Z,onClick:Ke,children:ae("Load more")})})]})),[se.query,$,Ye,R,Ge,Re,ge,Ke,ae]);(0,k.Z)({isDesktop:Be,scrollToRef:me,scrollToElementID:z,enableStickyCollectionNav:A,pillFarm:Q.list}),(0,s.useEffect)((()=>{l().push({pathname:l().pathname,query:l().query,hash:Qe},null,{shallow:!0}).catch((e=>{if(!e.cancelled)throw e}))}),[Qe]),(0,w.nw)((()=>{$e()})),(0,s.useEffect)((()=>{!0===Ze.current&&me.current&&(0,w.n5)(me.current,{offsetY:A&&L.d})}),[De.length,A]),(0,s.useEffect)((()=>{A&&me.current&&oe?.slug!==ce&&(0,w.n5)(me.current,{offsetY:L.d,behavior:"smooth",onlyScrollIfAbove:!0})}),[A,oe?.slug,ce]),(0,s.useEffect)((()=>{const e=oe?.slug;Boolean(ce)&&Boolean(e)&&e!==ce&&$e()}),[$e,ce,oe?.slug]);const tt=(0,s.useMemo)((()=>r?(0,H.jsx)(b.B,{currentPage:le,children:r.map(((e,t)=>(0,H.jsx)(c.Z,{href:e.href,children:(0,H.jsx)("a",{children:ae(e.title)})},e.title+t)))}):null),[r,ae,le]),rt=(0,s.useMemo)((()=>K?.asset?.primary?.assetPath?q?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y.F,{heading:K.heading,subtitle:K.description,image:{desktop:{assetPath:K.asset?.primary?.assetPath},mobile:{assetPath:K.asset?.secondary?.assetPath}},pillFarm:Q.list,icon:T}),(0,H.jsx)(S.Hr,{})]}):(0,H.jsx)(S.tm,{iconName:T,content:{assetPath:K.asset?.primary?.assetPath,assetPathAlt:K.asset?.alt,background:K.background,cta:K.cta,description:K.description,heading:K.heading,modifiers:K.modifiers},lightScrim:F}):null),[K,q,T,F,Q]);return(0,H.jsxs)(N.Kq,{preview:t,children:[J&&(0,H.jsx)(te,{children:(0,H.jsx)(ee,{marketingPage:J})}),r&&(0,H.jsx)(S.JL,{children:tt}),rt,(0,H.jsxs)(f.H.NewLevel,{children:[!q&&Q?.list.length>0&&(0,H.jsx)(S.$0,{constrained:!0,small:!0,divider:["bottom"],children:(0,H.jsx)(S.l6,{center:!0,items:Q.list})}),(0,H.jsx)("span",{ref:me,id:"products","data-drawer-id":z}),(0,H.jsx)(j.S,{size:36,axis:"vertical"}),(0,H.jsxs)(S.He,{children:[(0,H.jsxs)(E.zB,{$breadcrumbs:!!r,children:[(0,H.jsx)(p.D,{children:tt}),(0,H.jsx)(g.S,{label:ae("Sort by"),onSelect:Xe,options:xe,dropdownValue:re?ke:null}),(0,H.jsx)(p.M,{children:(0,H.jsx)(S.Lb,{icon:P.Z,variant:"tertiary",onClick:we,children:ae("Filter")})})]}),(0,H.jsx)(j.S,{size:32,axis:"vertical"}),(0,H.jsx)(S.dA,{enableStickyFilterPanel:!0,isFilterModalOpen:Pe,toggleModalFiltersMenu:we,attributeFilterSets:Je,isDesktop:Be,stickyOffset:A&&parseInt(D.TH)+16,customizeFilters:{clearFilters:Ue,removeFilter:Ve,activeFilters:We,totalHits:Ne.length},children:et}),Y&&(0,H.jsx)(E.VH,{children:(0,H.jsx)(S.Ho,{data:Y,textVariant:"legal"})})]}),(0,H.jsx)(S.y4,{})]})]})};T.defaultProps={sortByOptions:F.Op},t.Z=T},83069:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/indie-world",function(){return r(41714)}])}},function(e){e.O(0,[8286,4511,402,5806,5188,9774,2888,179],(function(){return t=83069,e(e.s=t);var t}));var t=e.O();_N_E=t}]); //# sourceMappingURL=indie-world-bde33099cb3d2595.js.map