!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]="d7d1941d-55aa-4d80-bbc6-ed9aca5ebf31",e._sentryDebugIdIdentifier="sentry-dbid-d7d1941d-55aa-4d80-bbc6-ed9aca5ebf31")}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(50802),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{breadcrumbLinks:t,filterSections:r,lightScrim:n,page:F,pageIcon:B,sortByOptions:T,showRating:G,analytics:R,enableStickyCollectionNav:$,fullBleedHero:A,cmsProductPageSize:q,hiddenFilters:V,disableDefaultMarketingPageHeading:U}=e;const{pageHeader:X,ctaCollection:K,merchandisedGrid:Q,legalText:W,marketingPage:Y}=F||{},J=Y?_[Y?.templateName??"plmpStandard"]:null,ee=U?s.Fragment:f.H.NewLevel,te=(0,x.O_)(),{text:re}=(0,o.useLocalizer)(),{trackLoadMoreProducts:ae}=(0,u.u)(),ne=(0,i.useRouter)(),{asPath:se,pathname:ie,query:le}=ne,oe=(0,x.D9)(le?.slug),ce=(0,o.useFeature)("wdev-1631-horizontal-tiles"),ue=ce?.variant?.payload?.value,de=(0,w.Z)(w.o.TABLET_SMALL),pe="horizontal"===ue&&!de,ge=(0,o.deserializeHash)(se),fe=(0,s.useRef)(),{0:me,1:he}=(0,s.useState)((()=>T.find((e=>{let{param:t}=e;return t===ge.sort}))?.value||T[0].value)),{0:be,1:ye}=(0,s.useState)((()=>parseInt(ge.p)||0)),{isFilterModalOpen:je,selectedSortByOption:Pe,toggleModalFiltersMenu:Oe,handleSortByChange:ve}=(0,d.sI)({sortBy:me,sortByOptions:T,analytics:R,applySortBy:e=>{he((()=>e))}}),xe=(0,s.useMemo)((()=>T.map((e=>{let{value:t,label:r}=e;return{value:t,label:re(r)}}))),[T,re]),we=(0,s.useMemo)((()=>({value:Pe.value,label:re(Pe.label)})),[Pe,re]),ke=(0,s.useMemo)((()=>r.map((e=>{let{attribute:t}=e;return t}))),[r]),Se=(Q||[]).flat(),Fe=(Q||[]).flat().filter((e=>{let{sku:t}=e;return Boolean(t)})),{appliedFilters:Me,appliedFiltersQuery:De,filteredProducts:Ce,filteredState:Ne,refine:_e,refineByQuery:Le,clearFilters:Ee}=(0,x.x3)(Fe,ke,{operator:x.fP.AND,queryToInitializeFilters:ge,hidden:V}),He=0===Me?.length&&Pe.value===T[0].value,Ie=(0,w.Z)(w.o.DESKTOP),Be=(0,s.useRef)();Be.current=Ie;const Ze=He?Se:Ce,ze=(0,s.useMemo)((()=>Ze.slice(0,(q||Ze.length)*(be+1))),[be,Ze,q]),Te=ze.lengthme?[...ze].sort(me):ze),[ze,me]),Re=(0,s.useCallback)((()=>{const e=(0,o.deserializeHash)(se),t=T.find((t=>{let{param:r}=t;return r===e.sort}))?.value||T[0].value;Le(e),he((()=>t)),ye(parseInt(e.p)||0)}),[T,se,Le]),$e=(0,s.useCallback)((e=>{const t=T.find((e=>{let{value:t}=e;return t===me}))?.param||T[0].value;return`#${new URLSearchParams(Z(Z({},e),{},{sort:t,p:be})).toString()}`}),[T,me,be]),Ae=(0,s.useCallback)((e=>(ye((()=>0)),e)),[]),qe=(0,s.useCallback)((function(){Ae(_e)(...arguments)}),[_e,Ae]),Ve=(0,s.useCallback)((function(){Ae(Ee)(...arguments)}),[Ee,Ae]),Ue=(0,s.useCallback)((function(){Ae(ve)(...arguments)}),[ve,Ae]),Xe=(0,s.useCallback)((()=>{const{pageName:e}=R;ae(e);const t=(0,o.deserializeHash)(),r=be+1;t.p=r,ye((()=>r))}),[be,R,ae]),Ke=(0,s.useMemo)((()=>$e(De)),[De,$e]),Qe=(0,s.useMemo)((()=>Me.map((e=>({attribute:e.split(x.HA)[0],label:e.split(x.HA)[1],value:e})))),[Me]),We=(0,s.useMemo)((()=>R?.featureFlag?{featureFlag:R.featureFlag}:{featureFlag:ce?.id,featureFlagVariant:ue}),[R,ce,ue]),Ye=(0,s.useMemo)((()=>r.filter((e=>{let{attribute:t}=e;return Ne[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&&re(r),startCollapsed:0!==t,refine:qe,items:Ne[n]?.items||[],showMoreLabel:re("Show more"),showLessLabel:re("Show less"),collapsible:!0,limit:5,showMore:!0,analytics:{pageName:R?.pageName}},s),n)}))),[r,Ne,qe,re,R]),Je=(0,s.useMemo)((()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(S.en,{$singleColumnMobile:pe,children:Ge.map(((e,t)=>e.sku?(0,s.createElement)(O.I8,Z(Z(Z({},We),{},{key:e.sku+t},e),{},{constrain:!1,showRating:G||Boolean(ne.query[M.Tx.UTM_CODE])||!1,mobileHorizontal:pe,analytics:{listDetails:{id:`clp-${(0,v.GL)(R.pageName)}`,name:R.pageName}}})):(0,H.jsx)(C.Z,{asset:e.asset.primary.assetPath,cta:e.cta,heading:e.heading},e.heading+t)))}),Te&&(0,H.jsx)(E.VR,{children:(0,H.jsx)(m.B,{variant:"tertiary",icon:h.Z,onClick:Xe,children:re("Load more")})})]})),[ne.query,R,We,G,Te,Ge,pe,Xe,re]);(0,k.Z)({isDesktop:Ie,scrollToRef:fe,scrollToElementID:z,enableStickyCollectionNav:$,pillFarm:K.list}),(0,s.useEffect)((()=>{l().push({pathname:l().pathname,query:l().query,hash:Ke},null,{shallow:!0}).catch((e=>{if(!e.cancelled)throw e}))}),[Ke]),(0,v.nw)((()=>{Re()})),(0,s.useEffect)((()=>{!0===Be.current&&fe.current&&(0,v.n5)(fe.current,{offsetY:$&&L.d})}),[Me.length,$]),(0,s.useEffect)((()=>{$&&fe.current&&le?.slug!==oe&&(0,v.n5)(fe.current,{offsetY:L.d,behavior:"smooth",onlyScrollIfAbove:!0})}),[$,le?.slug,oe]),(0,s.useEffect)((()=>{const e=le?.slug;Boolean(oe)&&Boolean(e)&&e!==oe&&Re()}),[Re,oe,le?.slug]);const et=(0,s.useMemo)((()=>t?(0,H.jsx)(b.B,{currentPage:ie,children:t.map(((e,t)=>(0,H.jsx)(c.Z,{href:e.href,children:(0,H.jsx)("a",{children:re(e.title)})},e.title+t)))}):null),[t,re,ie]),tt=(0,s.useMemo)((()=>X?.asset?.primary?.assetPath?A?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y.F,{heading:X.heading,subtitle:X.description,image:{desktop:{assetPath:X.asset?.primary?.assetPath},mobile:{assetPath:X.asset?.secondary?.assetPath}},pillFarm:K.list,icon:B}),(0,H.jsx)(S.Hr,{})]}):(0,H.jsx)(S.tm,{iconName:B,content:{assetPath:X.asset?.primary?.assetPath,assetPathAlt:X.asset?.alt,background:X.background,cta:X.cta,description:X.description,heading:X.heading,modifiers:X.modifiers},lightScrim:n}):null),[X,A,B,n,K]);return(0,H.jsxs)(N.Kq,{children:[Y&&(0,H.jsx)(ee,{children:(0,H.jsx)(J,{marketingPage:Y})}),t&&(0,H.jsx)(S.JL,{children:et}),tt,(0,H.jsxs)(f.H.NewLevel,{children:[!A&&K?.list.length>0&&(0,H.jsx)(S.$0,{constrained:!0,small:!0,divider:["bottom"],children:(0,H.jsx)(S.l6,{center:!0,items:K.list})}),(0,H.jsx)("span",{ref:fe,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:!!t,children:[(0,H.jsx)(p.D,{children:et}),(0,H.jsx)(g.S,{label:re("Sort by"),onSelect:Ue,options:xe,dropdownValue:te?we:null}),(0,H.jsx)(p.M,{children:(0,H.jsx)(S.Lb,{icon:P.Z,variant:"tertiary",onClick:Oe,children:re("Filter")})})]}),(0,H.jsx)(j.S,{size:32,axis:"vertical"}),(0,H.jsx)(S.dA,{enableStickyFilterPanel:!0,isFilterModalOpen:je,toggleModalFiltersMenu:Oe,attributeFilterSets:Ye,isDesktop:Ie,stickyOffset:$&&parseInt(D.TH)+16,customizeFilters:{clearFilters:Ve,removeFilter:qe,activeFilters:Qe,totalHits:Ce.length},children:Je}),W&&(0,H.jsx)(E.VH,{children:(0,H.jsx)(S.Ho,{data:W,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-ff619ef74f2bf9d1.js.map