"use strict";(globalThis["__LOADABLE_LOADED_CHUNKS__"]=globalThis["__LOADABLE_LOADED_CHUNKS__"]||[]).push([[187],{96146:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(52703),l=a(96540),i=a(35830);const o=e=>l.createElement(n.nD,e);o.displayName="Accordion",o.Section=(0,i["default"])((e=>l.createElement(n.nD.Section,e))).withConfig({componentId:"sc-94xu1k-0"})({});const r=(0,i["default"])(o).withConfig({componentId:"sc-94xu1k-1"})({})},21581:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(52703),l=a(96540),i=a(35830);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},o.apply(null,arguments)}const r=l.forwardRef(((e,t)=>l.createElement(n.Sc,o({ref:t},e))));r.displayName="Checkbox";const c=(0,i["default"])(r).withConfig({componentId:"sc-1mcfr9t-0"})({})},60297:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(96540);const l=function(e,t,a){void 0===t&&(t=100),void 0===a&&(a=!1);const l=(0,n.useRef)(e),i=(0,n.useRef)();l.current=e,(0,n.useEffect)((()=>()=>{window.clearTimeout(i.current),i.current=void 0}),[a,t]);const o=(0,n.useCallback)((function(){const e=arguments,n=i.current;if(void 0===n&&a)return i.current=window.setTimeout((()=>{i.current=void 0}),t),l.current.apply(null,e);clearTimeout(n),i.current=window.setTimeout((()=>{i.current=void 0,l.current.apply(null,e)}),t)}),[a,t]);return[o,(0,n.useCallback)((()=>{clearTimeout(i.current),i.current=void 0}),[])]}},13885:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(96540),l=a(61225),i=a(92349),o=a(81074),r=a(18590),c=a(46401),s=a(33987);const d=e=>{const{products:t=[]}=e,a=(0,i.y2)(e),d=(0,l.d4)((0,s.OD)(a)),m=(0,l.d4)(s.Vm);return(0,n.useMemo)((()=>t.map((e=>{const t=(0,r.YR)(e.pid),a=d.find((e=>{let{pid:a}=e;return t===a}));return!a&&m.includes(t)?null:a?{...e,...a}:{pid:t,...o.F5}})).filter(c.R)),[d,t,m])}},25547:(e,t,a)=>{a.d(t,{A:()=>p});var n=a(96540),l=a(61225),i=a(56347),o=a(18590),r=a(84732),c=a(7369),s=a(57757),d=a(59087);const m=e=>{const t=new URLSearchParams(e).get("list");return t?(0,r.Jf)((0,o.YR)(t)):null},u={suuret_kortit:r.Jw,pienet_kortit:r.Zc,control:r.rl},p=()=>{const e=(0,l.d4)(d.wl),t=(0,i.zy)(),[a,o]=(0,n.useState)((()=>(0?0:e)??r.PC));(0,n.useEffect)((()=>{const a=m(t.search);o(null!==a?a:void 0!==e?e:r.PC)}),[t.search,e]);const p=null!==c.jK.matchPath(t.pathname),f=(0,l.d4)((0,s.Xb)("tuotelistojen_kortit_haku")),h=(0,l.d4)(d.BN),g=m(t.search);return p&&!h&&null===g&&f?u[f]??a:a}},10731:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var n=a(96540),l=a(56347),i=a(13248),o=a(97761),r=a(40258),c=a(16808);const s=e=>e+(e.includes(" ")?" ":""),d=[{label:"Haku",to:""}],m=()=>{const e=(0,l.zy)(),t=(0,n.useMemo)((()=>new URLSearchParams(e.search)),[e.search]).get("query")||"";return(0,i.A)("tuotelistojen_kortit_haku"),n.createElement(r.A,{breadcrumbItems:d,className:"page page--search",searchTerm:t,type:"search",main:!0},n.createElement(o.A.NoIndex,{description:"Todennäköisesti aina halvempi!",socialTitle:t?`Katso haulla ${s(t)} löytyvät tuotteet!`:"Hakulistaus",socialType:"product.group",socialUrl:`https://www.verkkokauppa.com${e.pathname}${e.search}`,title:"Haun tulokset"}),n.createElement(c["default"],{analyticsContext:"Internal Search"}))}},81330:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(96540),l=a(61225),i=a(70034),o=a(44882),r=a(89732);const c=e=>{let{children:t,context:a,id:c}=e;const[s,d]=(0,n.useState)([]),m=(0,l.wA)(),u=(0,o.A)(c),p=(0,n.useRef)([]),f=(0,n.useRef)(),h=(0,n.useCallback)((e=>{const t=setTimeout((()=>{p.current=p.current.filter((e=>e!==t)),d((t=>{if(u&&c!==u)return e;const a=t.concat(e.filter((e=>!t.includes(e))));return a.length!==t.length?a:t}))}),0);p.current.push(t)}),[c,u]);return(0,n.useEffect)((()=>{"undefined"!=typeof window&&(clearTimeout(f.current),null!=a&&a.type&&s.length>0&&c===u&&(f.current=setTimeout((()=>{m((0,r.wD)({id:c,context:a,placements:s}))}),0)))}),[a,m,c,s,u]),(0,n.useEffect)((()=>()=>{p.current.forEach((e=>clearTimeout(e))),clearTimeout(f.current)}),[]),n.createElement(i.A.Provider,{value:{id:c,context:a,registerPlacements:h}},t)}},40258:(e,t,a)=>{a.d(t,{A:()=>I});var n=a(90377),l=a(14181),i=a(96540),o=a(56347),r=a(35830),c=a(7365),s=a(35120),d=a(81330),m=a(47699),u=a(4400),p=a(15973),f=a(18780),h=a(1875);const g=r["default"].span.withConfig({componentId:"sc-9a4zux-0"})({alignItems:"center",display:"flex",minHeight:l.size.S,[`&:not(:first-child)`]:{marginLeft:"0.25rem"}}),y=e=>{let{children:t,className:a,icon:n}=e;return i.createElement(h.A.UI,{className:a,forwardedAs:"article",role:"alert"},n,i.createElement(g,null,t))};y.displayName="SitewideRibbon";const b=(0,u.variant)({green:{backgroundColor:l.color.fundaments.greens[500],color:l.color.fundaments.white},grey:{backgroundColor:l.color.fundaments.greys[500],color:l.color.fundaments.white},yellow:{backgroundColor:l.color.fundaments.yellows[400],color:l.color.text.primary},white:{backgroundColor:l.color.fundaments.white,color:l.color.fundaments.blues[400]},black:{backgroundColor:l.color.fundaments.black,color:l.color.fundaments.white}},{defaultVariant:"yellow",propName:"color"}),v=(0,r["default"])(y).withConfig({componentId:"sc-9a4zux-1"})({display:"flex",justifyContent:"center",padding:"0.5rem 1rem",transition:"none","[data-icon]":{flexShrink:0,fontSize:l.font.size.XL,marginTop:"0.05em"},"a:link, a:visited":{color:"inherit",fontWeight:"normal"},[f.$.min.tablet]:{fontSize:l.font.size.XS}},b);v.defaultProps={color:"yellow",icon:i.createElement(p.A,null)};const k=v,E="https://asiakaspalvelu.verkkokauppa.com/hc/fi/articles/360018938499-Tuetut-selaimet-ja-laitteet",x=(0,r["default"])(k).withConfig({componentId:"sc-1y7xu99-0"})({display:"none","html.unsupported-browser &":{display:"flex"}}),w=()=>(0,i.useMemo)((()=>{if(0||"undefined"==typeof document)return!0;try{return document.documentElement.classList.contains("unsupported-browser")}catch{return!0}}),[])?i.createElement(x,null,i.createElement("a",{href:E,target:"_blank"},i.createElement("strong",null,"Käytössäsi on vanhempi selain, jota Verkkokauppa.com-sivusto ei enää tue. Lue lisää täältä."))):null;function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},C.apply(null,arguments)}const S=(0,r["default"])(m.A).withConfig({componentId:"sc-1cp349s-0"})({padding:`${l.space.XXS} ${l.space.XXS} ${l.space.XXS} 0`,marginRight:l.space.XXS,marginLeft:l.space.XXS,maxWidth:l.widths.content.L,[c.Rw]:{marginLeft:0}}),X=r["default"].div.withConfig({componentId:"sc-1cp349s-1"})((e=>{let{container:t}=e;return t&&{...n.containerStyle.L.withoutGutter}})),$=(0,i.forwardRef)(((e,t)=>{let{brand:a,breadcrumbItems:n=[],showBreadcrumbs:l=!0,category:r,main:c,pids:m,pid:u,searchTerm:p,staticContext:f,type:h="generic",children:g,container:y=!0,...b}=e;const{pathname:v,search:k}=(0,o.zy)(),E=(0,s.N4)({pid:u,searchParams:new URLSearchParams(k)}),x="noRR"!==h,$="search"!==h&&(null==r?void 0:r.id)||"",I=(0,i.useMemo)((()=>({brand:a,category:r,pid:E,pids:m,searchTerm:p,staticContext:f,type:h,url:`https://www.verkkokauppa.com${v}`})),[a,r,v,E,m,p,f,h]),A=c?i.createElement("main",C({},b,{ref:t,id:"main"}),i.createElement(w,null),g):i.createElement("div",C({},b,{ref:t}),i.createElement(w,null),g);return x?i.createElement(X,{container:y},l&&i.createElement(S,{breadcrumbItems:n,categoryId:$,pid:E}),i.createElement(d.A,{context:I,id:h||"default"},A)):i.createElement(X,{container:y},l&&i.createElement(S,{breadcrumbItems:n,categoryId:$,pid:E}),A)}));$.displayName="Page";const I=(0,i.memo)($)},88582:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(90377),l=a(14181),i=a(96540),o=a(35830),r=a(1875);const c=(0,o["default"])(r.A.H2).withConfig({componentId:"sc-txhvhy-0"})({...n.textStyle.h3,margin:0,padding:`${l.space.XS} ${l.space.XS} ${l.space.XXS}`}),s=e=>{let{children:t,className:a}=e;return i.createElement(c,{className:a},t)};s.displayName="PageTitle";const d=(0,o["default"])(s).withConfig({componentId:"sc-txhvhy-1"})({})},85949:(e,t,a)=>{a.d(t,{A:()=>j});var n=a(14181),l=a(4400),i=a(72090),o=a(7889),r=a(47375),c=a(86360),s=a(18780),d=a(96540),m=a(35830),u=a(97106),p=a(79507),f=a(57828),h=a(1341),g=a(90377);const y=m["default"].button.withConfig({componentId:"sc-1seer3s-0"})({...g.resetButtonStyle,position:"relative",width:n.space.L,height:n.space.L,color:n.color.text.link,fontWeight:n.font.weight.semiBold,boxShadow:"none",textDecoration:"none","&:hover":{boxShadow:`inset 0 -2px 0 -1px ${n.color.border.primary}`,textDecoration:"none"},"@supports selector(:focus-visible)":{":focus-visible":{outline:"none",textDecoration:"none",boxShadow:`inset 0 0 0 2px ${n.color.border.highlight.secondary}`}},"@supports not selector(:focus-visible)":{":focus":{outline:"none",textDecoration:"none",boxShadow:`inset 0 0 0 2px ${n.color.border.highlight.secondary}`}},"::before":{content:'""',display:"block",minWidth:n.size.target,width:"100%",minHeight:n.size.target,height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}},(e=>{let{checked:t}=e;return t&&{color:`${n.color.text.primary} !important`,boxShadow:`inset 0 -2px 0 -1px ${n.color.border.highlight.primary}`}}));var b=a(5556),v=a.n(b),k=a(54625),E=a(55097),x=a(76651),w=a(22933);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},C.apply(null,arguments)}const S=d.forwardRef(((e,t)=>{let{className:a,children:n,replace:i,to:o,...r}=e;return d.createElement(k.N_,C({},(0,l.filterDomProps)(r),{ref:t,className:a,replace:i,to:o}),n)}));S.displayName="LinkIconButton",S.propTypes={className:v().string,children:v().node.isRequired,replace:w.VC.replace,to:w.VC.to};const X=(0,m["default"])(h.A).attrs({forwardedAs:S,type:void 0}).withConfig({componentId:"sc-dzb6j1-0"})(E.K);X.defaultProps={onDragStart:x.wo,onKeyPress:x.SH,role:"button"};const $=X,I=(0,m["default"])(k.N_).withConfig({componentId:"sc-11kppzo-0"})({position:"relative",width:n.space.L,height:n.space.L,color:n.color.text.link,fontWeight:n.font.weight.semiBold,boxShadow:"none",textDecoration:"none !important",transition:`box-shadow ${n.motion.duration[125]} ${n.motion.easing.inOut}`,"&:hover":{boxShadow:`inset 0 -2px 0 -1px ${n.color.border.primary}`},"@supports selector(:focus-visible)":{":focus-visible":{outline:"none",boxShadow:`inset 0 0 0 2px ${n.color.border.highlight.secondary}`}},"@supports not selector(:focus-visible)":{":focus":{outline:"none",boxShadow:`inset 0 0 0 2px ${n.color.border.highlight.secondary}`}},"::before":{content:'""',display:"block",minWidth:n.size.target,width:"100%",minHeight:n.size.target,height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}},(e=>{let{checked:t}=e;return t&&{color:`${n.color.text.primary} !important`,boxShadow:`inset 0 -2px 0 -1px ${n.color.border.highlight.primary}`}}));function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},A.apply(null,arguments)}const N=e=>{let{checked:t=!1,hidden:a=!1,children:n,className:i,disabled:o,href:r,index:c,isNext:s,isPrevious:m,onClick:u,title:p,size:f,...g}=e;const b=(0,d.useCallback)((e=>{u(e,c)}),[u,c]);if(a)return null;const v=r?I:y;return s||m?r?d.createElement($,A({appearance:"ghost",checked:t,className:i,disabled:o,role:r?null:"link",size:f,title:p,to:r,onClick:b},(0,l.filterDomProps)(g)),n):d.createElement(h.A,A({appearance:"ghost",className:i,disabled:o,pressed:t,role:"link",size:f,title:p,onClick:b},(0,l.filterDomProps)(g)),n):d.createElement(v,A({checked:t,className:i,disabled:o,role:r?null:"link",size:f,slug:r,title:p,to:r,onClick:b},(0,l.filterDomProps)(g)),n)};N.displayName="Pagination.PaginateItem";const L=(0,m["default"])(N).withConfig({componentId:"sc-1rj6jkl-0"})({display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),P=(0,m["default"])(L).withConfig({componentId:"sc-15vrf2o-0"})({order:1}),T=m["default"].nav.withConfig({componentId:"sc-15vrf2o-1"})({boxSizing:"border-box",display:"flex",width:"100%",padding:0,position:"relative",justifyContent:"center",alignItems:"center",textAlign:"center",userSelect:"none"}),z=m["default"].ol.withConfig({componentId:"sc-15vrf2o-2"})({display:"flex",justifyContent:"center",listStyle:"none",margin:0,padding:0}),R=(0,m["default"])(z).withConfig({componentId:"sc-15vrf2o-3"})({"&::after, &::before":{display:"inline-block",fontWeight:n.font.weight.semiBold,margin:n.space.XXS},'&[start="1"]::after':{content:'"…"'},'&:not([start="1"])::before':{content:'"…"'}}),F=e=>{let{asLinks:t=!0,className:a,hrefPrefix:n="",hrefSuffix:s="",pageNo:m,isLoading:h=!1,isPathParam:g=!1,next:y=d.createElement(o.A,{size:"M"}),nextLabel:b="Seuraava sivu",onClick:v,pageCount:k,preventDefault:E=!1,previous:x=d.createElement(i.A,{size:"M"}),previousLabel:w="Edellinen sivu"}=e;const C=(0,d.useRef)(null),{width:S}=(0,l.useElementSize)(C),X=(0,d.useCallback)(((e,t)=>{var a;E&&e.preventDefault(),v?v(t):(0,p.h)(null==(a=C.current)?void 0:a.parentElement)}),[v,E]),$=(0,d.useMemo)((()=>{if(S){const e=S-4*(c.M+c.XXXS)-2*c.M,t=Math.floor(e/(c.M+c.XXXS));return t>1?Math.min(t,16):1}return 4}),[S]),{pageRange:I,isFirstPage:A,isLastPage:N,nextIndex:F,previousIndex:j,showFirstPage:M,showLastPage:D}=(0,d.useMemo)((()=>{const e=1===m,t=m===k,a=e?m:m-1,n=t?m:m+1,l=Math.floor($/2),i=m-l<1?1:m+l>k?k-$+1:m-l,o=m+l>k?k:m-l<1?$:m+l;return{pageRange:(0,u.y1)(Math.max(0,i-1),Math.min(k,o)-1),isFirstPage:e,isLastPage:t,nextIndex:n,previousIndex:a,showFirstPage:i>1,showLastPage:o<k}}),[m,k,$]);if(t&&!n||!t&&!v)return f.yz&&console.error("Pagination needs either hrefPrefix or onClick handler"),null;const O=g?"/":"";return d.createElement("div",{ref:C,className:a},k>1&&d.createElement(T,{"aria-label":"Valitse sivu",role:"navigation"},d.createElement(P,{"aria-label":b,disabled:N,href:t?`${n}${F?`${O}${F}`:""}${s}`:void 0,index:F,size:"L",title:b,isNext:!0,onClick:X},y),d.createElement(L,{"aria-label":w,disabled:A,href:t?`${n}${j?`${O}${j}`:""}${s}`:void 0,index:j,size:"L",title:w,isPrevious:!0,onClick:X},x),M&&d.createElement(R,{start:1},d.createElement("li",null,d.createElement(L,{"aria-label":`Ensimmäinen sivu (sivu 1)`,href:t?`${n}${s}`:void 0,index:1,size:"M",title:`Ensimmäinen sivu (sivu 1)`,onClick:X},"1"))),d.createElement(z,{start:I[0]+1},I.map((e=>d.createElement("li",{key:e},d.createElement(L,{"aria-current":e+1===m?"page":void 0,"aria-label":e+1===m?`Tämä sivu (sivu ${e+1})`:`Sivu ${e+1}`,checked:e+1===m,href:t?`${n}${O}${e+1}${s}`:void 0,index:e+1,size:"M",title:e+1===m?`Tämä sivu (sivu ${e+1})`:`Sivu ${e+1}`,onClick:X},e+1===m&&h?d.createElement(r["default"],null):e+1))))),D&&d.createElement(R,{start:k},d.createElement("li",null,d.createElement(L,{"aria-label":`Viimeinen sivu (sivu ${k})`,href:t?`${n}${k?`${O}${k}`:""}${s}`:void 0,index:k,size:"M",title:`Viimeinen sivu (sivu ${k})`,onClick:X},k)))))};F.displayName="Pagination";const j=(0,m["default"])(F).withConfig({componentId:"sc-15vrf2o-4"})((e=>{let{pageCount:t}=e;return{display:t>1?void 0:"none",margin:`${n.space.XS} 0`,[s.$.min.tablet]:{margin:n.space.XS}}}))},84986:(e,t,a)=>{a.d(t,{A:()=>v,h:()=>g});var n=a(52703),l=a(14181),i=a(86360),o=a(18780),r=a(96540),c=a(35830),s=a(85457),d=a(34321),m=a(97106),u=a(35120),p=a(88582),f=a(82911);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},h.apply(null,arguments)}const g=(0,c["default"])(p.A).withConfig({componentId:"sc-sbzbtg-0"})({minHeight:`${l.font.lineHeight.normal}rem`}),y=(0,c["default"])(f.A).attrs({loading:!0,product:void 0}).withConfig({componentId:"sc-sbzbtg-1"})({opacity:0,visibility:"hidden"}),b=e=>{let{dataLayerListName:t="",className:a,indexOffset:l=0,loading:o=!1,isOutletProductList:c=!1,loadingPlaceholders:p=!1,padding:b=i.XXXS,products:v=[],small:k=!1,extraSmall:E=!1,title:x}=e;const w=(0,r.useRef)(null),C=(0,d.A)(w,{dataLayerListName:t,indexOffset:l,isOutletProductList:c,products:v}),S=(0,r.useMemo)((()=>function(e){return void 0===e&&(e=5),(0,m.y1)(1,e).map((()=>{}))}(E?8:5)),[E]);if(o&&!p)return r.createElement("div",{ref:w,className:a},r.createElement(g,null),r.createElement(n.FN,{gap:i.XXXS,padding:i.XXXS},r.createElement(y,{extraSmall:E,small:k})));const X=p&&o?" ":x,$=o&&p&&S||v;return r.createElement("div",h({},C,{ref:w,className:a}),X&&r.createElement(g,null,X),r.createElement(s.A.Provider,{value:{indexOffset:l,isOutlet:c,name:t,urlParam:(0,u.Ml)(v.filter(Boolean))}},r.createElement(n.FN,{gap:i.XXXS,padding:b},$.map(((e,t)=>r.createElement(f.A,{key:(null==e?void 0:e.pid)??t,extraSmall:E,index:t,loading:o,product:e,small:k}))))))},v=(0,c["default"])(b).withConfig({componentId:"sc-sbzbtg-2"})({backgroundColor:l.color.background.secondary,position:"relative","> ol":{boxSizing:"border-box"},[f.A]:{flexGrow:1,minWidth:`14rem`,width:`calc(100vw / 1.67)`,[o.$.min.s]:{width:`calc(100vw / 2.67)`},[o.$.min.m]:{width:`calc(100vw / 3.67)`},[o.$.min.l]:{width:`calc(100vw / 4.67)`},[o.$.min.xl]:{width:`calc(1192px / 4.67)`}}})},79679:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(52703),l=a(96540),i=a(35830),o=a(84732),r=a(1341);const c=e=>{let{checked:t,listType:a,onClick:n}=e;const i=o.u8[a],c=o.IU[a],s=(0,l.useCallback)((()=>{n(a)}),[a,n]);return l.createElement(r.A,{appearance:"secondary","aria-label":c,"aria-selected":t,name:c,pressed:t,title:c,onClick:s},l.createElement(i,null))},s=e=>{let{className:t,currentListType:a,onChange:i}=e;return l.createElement(n.ob,{className:t,gap:"XXS",wrap:!1},o.go.map((e=>l.createElement(c,{key:e,checked:!0&&e===a,listType:e,onClick:i}))))};s.displayName="ProductListTypeControl";const d=(0,i["default"])(s).withConfig({componentId:"sc-vp5gsx-0"})({})},95833:(e,t,a)=>{a.d(t,{A:()=>w});var n=a(96540),l=a(61225),i=a(70034),o=a(43016),r=a(93025);const c=function(e,t){void 0===t&&(t=!1);const{id:a,context:c,registerPlacements:s}=(0,n.useContext)(i.A),d=(0,n.useMemo)((()=>(null==c?void 0:c.type)&&(0,o.V1)({type:c.type})),[null==c?void 0:c.type]),m=(0,n.useMemo)((()=>d?t?e:e.map(d):[]),[d,e,t]),[u,p,f]=(0,n.useMemo)((()=>[(0,r.bn)(a),(0,r.iJ)(a),(0,r.Ml)(a,m)]),[a,m]),h=(0,l.d4)(u),g=(0,l.d4)(p),y=(0,l.d4)(f),[b,v]=(0,n.useMemo)((()=>{const e=m.every((e=>Object.keys(y).includes(e)));return[e,Object.values(y).filter(Boolean)]}),[y,m]);return(0,n.useEffect)((()=>{null==s||s(m)}),[null==c?void 0:c.type,m,b,s]),{data:v,id:a,isLoaded:h&&b,isUpdating:g,pageType:(null==c?void 0:c.type)??""}};var s=a(13885),d=a(84732),m=a(84986),u=a(14181),p=a(35830),f=a(88582),h=a(75860);const g=p["default"].div.withConfig({componentId:"sc-93gnz-0"})({padding:u.space.XXS}),y=e=>{let{className:t,title:a,listType:l,products:i,dataLayerListName:o}=e;return n.createElement("div",{className:t},n.createElement(f.A,null,a),n.createElement(g,null,n.createElement(h.A,{dataLayerListName:o,products:i,type:l})))};y.displayName="RecommendationsWithTitle";const b=(0,p["default"])(y).withConfig({componentId:"sc-93gnz-1"})({backgroundColor:u.color.background.secondary}),v={bottom:"Bottom",middle:"Middle",promoarea1:"Promo Area 1",promoarea2:"Promo Area 2",top:"Top"},k={brand:"Shop-in-Shop Page",category:"Category Page",home:"Front Page",item:"Product Page",cart:"Cart Page",purchase_complete:"Order Page"},E=e=>{let{listType:t,...a}=e;const l=(0,d.Cm)(t);return void 0!==l?n.createElement(b,{dataLayerListName:a.dataLayerListName,listType:l,products:a.products,title:a.title||""}):n.createElement(m.A,a)},x=e=>{let{dataLayerListName:t,placements:a,render:l=E,listType:i,productCardType:o,useRawPlacementIds:r=!1,loadingPlaceholders:d=!1}=e;const{data:m,isLoaded:u,isUpdating:p,pageType:f}=c(a,r),h=a[0],g=(0,n.useMemo)((()=>{const e=k[f]||f,a=v[h]||h||"Unknown Placement";return t||o?`RichRelevance - ${e} - ${a} - ${o}`:`RichRelevance - ${e} - ${a}`}),[t,f,h,o]),y=(null==m?void 0:m[0])??{},{products:b=[],strategyMessage:x}=y,w=(0,s.A)(y);if(!Array.isArray(a)||u&&!w.length&&!p)return null;return l({dataLayerListName:g,title:x,loading:!u||b.length>0&&!w.length&&(u||p),products:w,listType:i,productCardType:o,loadingPlaceholders:d})},w=(0,n.memo)(x)},16808:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Gt});var n=a(14181),l=a(37194),i=a(18780),o=a(96540),r=a(61225),c=a(56347),s=a(35830),d=a(90343),m=a(94619),u=a(81146),p=a(1875),f=a(18078),h=a(25547),g=a(92349),y=a(32824),b=a(9915),v=a(96946),k=a(26635),E=a(95833),x=a(47375),w=a(11613),C=a(45983),S=a(36388),X=a(53494),$=a(22259);const I=e=>{let{className:t}=e;const a=(0,r.d4)(k.iT),n=(0,r.d4)(k.v6),l=(0,r.d4)(k.yZ),i=!!n||!!a;return(0,r.d4)(k.S2)&&(0===l||l>0&&i)?o.createElement(p.A.UI,{className:t,size:"large"},0===l&&"Ei tuloksia haulla",l>0&&"Hakutulokset haulle",(0===l&&i||l>0)&&o.createElement(o.Fragment,null," ",'"',o.createElement("strong",null,n||a),'"')):null};I.displayName="ActualQuery";const A=(0,s["default"])(I).withConfig({componentId:"sc-nt9nem-0"})({textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"100%"}),N=s["default"].strong.withConfig({componentId:"sc-1ogooy6-0"})({whiteSpace:"nowrap"}),L=e=>{let{className:t}=e;const a=(0,r.d4)(k.YR),n=(0,r.d4)(k.kk);return n>1?o.createElement(p.A.UI,{className:t},o.createElement("span",null,"sivu "),o.createElement(N,null,a," / ",n)):null};L.displayName="CurrentPage";const P=(0,s["default"])(L).withConfig({componentId:"sc-1ogooy6-1"})({display:"flex",flex:1,flexWrap:"wrap",justifyContent:"center",margin:`0 ${n.space.XXS}`});var T=a(17277),z=a(29807),R=a(1341),F=a(44792);const j=s["default"].span.withConfig({componentId:"sc-1n2jwdk-0"})({[T.breakpoint.max.S]:{display:"none"}}),M=s["default"].span.withConfig({componentId:"sc-1n2jwdk-1"})({[T.breakpoint.max.S]:{textTransform:"capitalize"}}),D=e=>{let{className:t}=e;const a=(0,r.d4)(k.Lb),n=(0,r.d4)(k._A),l=(0,r.d4)(k.E6),i=(0,f.A)(),c=(0,o.useCallback)((()=>{i((0,v.p$)({id:a,facetId:"category",showAll:!0}))}),[i,a]);return o.createElement(u.A,{appearance:"secondary",className:t,disabled:0===n.length,onClick:c},o.createElement(F.A,null),o.createElement(j,null,"Kaikki"),o.createElement(M,null,"suodattimet"),l>0&&o.createElement(w.A,{appearance:"info"},l))};D.displayName="FilterButton";const O=(0,s["default"])(D).withConfig({componentId:"sc-1n2jwdk-2"})({display:"flex",alignItems:"center"});var B=a(70269),_=a(7365),U=a(96146),V=a(52703);const H={Accordion:`${V.nD}`,Section:`${V.nD.Section}`};var W=a(2270);const K=(0,s["default"])(p.A.UI).attrs({weight:"semiBold"}).withConfig({componentId:"sc-1tbvs38-0"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),Y=e=>{let{className:t,facet:a}=e;const n=(0,r.d4)((0,k.Zt)(a.id)),l=(0,f.A)(),i=(0,o.useCallback)((e=>{e.stopPropagation(),l((0,v.VT)(a.id))}),[l,a.id]);return o.createElement(p.A.UI,{className:t},o.createElement(K,null,a.displayName),void 0!==n&&n.length>0&&o.createElement(o.Fragment,null,o.createElement(w.A,{appearance:"info"},n.length),o.createElement(W.A,{onClick:i},"Tyhjennä")))};Y.displayName="FacetHeader";const q=(0,s["default"])(Y).withConfig({componentId:"sc-1tbvs38-1"})({display:"flex",alignItems:"center",height:n.size.S,width:`calc(100% - ${l.M})`,"*:not(:first-child)":{marginLeft:n.space.XXS}});var Q=a(70805),Z=a(13028),G=a(7251),J=a(74628),ee=a(59858),te=a(31462),ae=a(7054),ne=a(86360),le=a(78701),ie=a(18590),oe=a(21581);const re=s["default"].span.withConfig({componentId:"sc-20ebln-0"})({paddingLeft:n.space.XXS}),ce=e=>{let{checked:t,children:a,className:n,id:l,name:i,onChange:r,value:c}=e;return o.createElement(V.JU,{className:n},o.createElement(oe.A,{checked:t,id:l,name:i,value:c,onChange:r}),o.createElement(re,null,a))},se=(0,s["default"])(ce).withConfig({componentId:"sc-20ebln-1"})({transition:`background ${n.motion.duration[125]} ${n.motion.easing.inOut}`,background:n.color.fundaments.greys[50],alignItems:"center",cursor:"pointer",display:"flex",width:"100%",boxSizing:"border-box",minHeight:`${ne.L}px`,padding:`${ne.XXXS}px ${ne.XS}px`,userSelect:"none",":hover":{background:n.color.background.secondary},":focus":{boxShadow:`inset 0 0 0 2px ${n.color.border.highlight.secondary}`},":active":{background:n.color.fundaments.greys[150]},"& > span:last-of-type":{width:"100%"}},(e=>{let{checked:t,indeterminate:a,level:l=0,isTree:i}=e;return{paddingLeft:`${ne.XS+ne.XS*l+(i?ne.S:0)}px`,...!t&&a?{"& > span:first-of-type, & > span > span:first-of-type":{backgroundColor:n.color.fundaments.blues[400],":after":{opacity:1,width:"50%",transform:"rotate(0deg)",left:"25%",top:"45%"}}}:{}}})),de=(0,s["default"])(Z.P.ol).withConfig({componentId:"sc-bkhabz-0"})({position:"relative",background:n.color.fundaments.greys[50],listStyleType:"none",margin:0,padding:0,'&[aria-expanded="false"]':{display:"none"}}),me=(0,s["default"])(le.A).withConfig({componentId:"sc-bkhabz-1"})({pointerEvents:"none",[ee.Icon]:{marginTop:0}}),ue=s["default"].div.withConfig({componentId:"sc-bkhabz-2"})({display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",[`& > span:first-child, & > ${me}`]:{flexGrow:1},[w.A]:{marginLeft:n.space.XS,flexShrink:0}},(e=>{let{level:t=0,isTree:a}=e;return a&&{[`& > ${ee.Icon}`]:{position:"absolute",left:`${t*ne.XS+(t>0?ne.XXXXS:0)}px`,padding:`${l.XXS} ${l.XXXXS} ${l.XXS} ${ne.XS+t*ne.XS+(t>0?ne.XXXXS:0)}px`,marginTop:"1px",marginLeft:`-${ne.XS*t+(t>0?ne.XXXXS:0)}px`,boxSizing:"content-box",...t>0?{height:l.XXS,width:l.XXS}:{marginTop:"1px"}}}})),pe={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},fe=(e,t)=>e.children&&0!==e.children.length?t.concat(e.children.map((e=>fe(e,[]).concat(`${e.value}`))).reduce(((e,t)=>e.concat(t)),[])):t,he=e=>{let{className:t,facetId:a,facetValue:n,level:l=0,parentValues:i=[],isTree:c}=e;const s=(0,r.d4)((0,k.Zt)(a)),[d,m]=(0,o.useState)(!1),{title:u,value:h,productCount:g,children:y}=n,E=(0,f.A)(),x=(0,o.useMemo)((()=>(null==s?void 0:s.includes(`${h}`))??!1),[s,h]),C=(0,o.useMemo)((()=>fe(n,[]).filter((e=>null==s?void 0:s.includes(e)))),[n,s]),S=`checkbox-search-${a}-${h}`,X=(0,o.useCallback)((()=>{const e=x?v.my:v.Pk;E(e({key:a,value:`${h}`})),i.forEach((e=>{E((0,v.my)({key:a,value:`${e}`}))})),C.forEach((e=>{E((0,v.my)({key:a,value:`${e}`}))})),x||m(!1)}),[E,a,x,h,i,C]),$=(0,o.useCallback)((e=>{e.preventDefault(),m(!d)}),[d]),I=d?te["default"]:ae.A,A=!(null==y||!y.length),N={weight:c&&0===l?"semiBold":"regular",size:l>1?"small":"medium"};return o.createElement(Z.P.li,{className:t,variants:pe},o.createElement(se,{checked:x,id:S,indeterminate:!!C.length,isTree:c,level:l,name:a,value:`${h}`,onChange:X},o.createElement(ue,{isTree:c,level:l},"rating"===a?"0"===h||0===h?o.createElement(p.A.UI,N,"Ei arvosteluja"):o.createElement(me,{value:(0,ie.YR)(h,0)}):(0,b.WV)(n,a)?o.createElement(p.A.UI,N,b._X[n.title]):(0,b.dG)(n,a)?o.createElement(p.A.UI,N,b.m[n.title]):o.createElement(p.A.UI,N,(e=>isNaN(Number(e.toString()))?"yes"===e||"true"===e?"Kyllä":"no"===e||"false"===e?"Ei":e:(0,ie.YR)(e))(u)),o.createElement(w.A,null,g||0),A&&o.createElement(I,{"aria-expanded":d,"aria-label":`${n.title} lapset`,role:"button",inline:!0,small:!0,onClick:$}))),!(null==y||!y.length)&&d&&o.createElement(de,{animate:"open"},y.map((e=>o.createElement(he,{key:e.value,facetId:a,facetValue:e,isTree:c,level:l+1,parentValues:i.concat(h)})))))},ge=he,ye=(0,s["default"])(J.A).withConfig({componentId:"sc-1p0xv1u-0"})({margin:`${l.XXS} ${n.space.XS} ${n.space.XXS}`}),be=(0,s["default"])(Z.P.ol).withConfig({componentId:"sc-1p0xv1u-1"})({position:"relative",background:n.color.fundaments.greys[50],listStyleType:"none",margin:0,padding:0,'&[aria-expanded="false"]':{display:"none"}}),ve=(0,s["default"])(W.A).withConfig({componentId:"sc-1p0xv1u-2"})({fontSize:"0.875rem",height:l.L,width:"100%",padding:`0 ${n.space.XS}`,display:"flex"}),ke=8,Ee=10,xe="rest-of-the-facets",we={open:{transition:{staggerChildren:.01,delayChildren:.01}}},Ce=e=>{let{facet:t}=e;const[a,n]=(0,o.useState)(""),l=(0,r.d4)(k.Lb),i=(0,r.d4)((0,k.rX)(t.id)),c=(0,f.A)(),s=t.values.length>Ee,d=(0,o.useMemo)((()=>{let e=t.values.filter((e=>{let{title:t}=e;return`${t}`.toLowerCase().includes(a.toLowerCase())}));return"rating"===t.id&&e.length>0&&e.sort(((e,t)=>`${t.title}`.localeCompare(`${e.title}`))),(0,b._E)(t)&&(e=e.filter((e=>"true"===e.value))),e}),[t,a]),m=(0,o.useMemo)((()=>t.values.some((e=>{var t;return!(null==e||null==(t=e.children)||!t.length)}))),[t.values]),[u,p]=(0,o.useMemo)((()=>[s?d.slice(0,ke):d,s?d.slice(ke):[]]),[s,d]),h=(0,o.useCallback)((e=>{n(e.target.value)}),[n]),g=(0,o.useCallback)((()=>{c((0,v.kl)({id:l,facetId:t.id}))}),[c,l,t.id]),y=(0,o.useCallback)((()=>{c((0,v.UY)({id:l,facetId:t.id}))}),[c,l,t.id]),E=d.length>Ee&&!i;return o.createElement(o.Fragment,null,s&&o.createElement(ye,{"aria-label":"Rajaa vaihtoehtoja",id:"filter-title",label:"Rajaa vaihtoehtoja",name:"filter-title",placeholder:`Hae ${t.partitive}`,postfixContent:o.createElement(Q["default"],null),size:"M",type:"search",value:a,hideLabel:!0,onChange:h}),o.createElement(be,{animate:"open"},u.map((e=>o.createElement(ge,{key:e.value,facetId:t.id,facetValue:e,isTree:m})))),p.length>0&&o.createElement(G.N,null,o.createElement(be,{animate:E?"closed":"open","aria-expanded":!E,"data-hidden":!E,id:xe,start:ke,variants:we},p.map((e=>o.createElement(ge,{key:e.value,facetId:t.id,facetValue:e,isTree:m}))))),p.length>0&&(E?o.createElement(ve,{"aria-controls":xe,onClick:g},"+ Näytä kaikki"):o.createElement(ve,{"aria-controls":xe,onClick:y},"- Näytä vähemmän")))},Se=e=>o.createElement(V.Ap,e);Se.displayName="Slider";const Xe=(0,s["default"])(Se).withConfig({componentId:"sc-1tkgk2h-0"})({});var $e=a(60297);const Ie=(e,t,a,n)=>{const[l,i]=(0,o.useState)(e),[r]=(0,$e.A)(t,a,n);return[l,(0,o.useCallback)((e=>{i(e),r(e)}),[i,r]),i]},Ae=500,Ne=s["default"].div.withConfig({componentId:"sc-bhy96l-0"})({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}),Le=(0,s["default"])(J.A).attrs({type:"tel",inputMode:"numeric"}).withConfig({componentId:"sc-bhy96l-1"})({width:"4.5rem","& > input":{textAlign:"right"}}),Pe=e=>{let{className:t,facet:a}=e;const n=(0,o.useRef)(null),l=(0,o.useRef)(null),i=(0,r.d4)((0,k.Zt)(a.id)),[c,s]=(0,o.useMemo)((()=>{if(Array.isArray(i)&&1===i.length){const e=i[0].match(b.fN);if(null!==e&&e.groups){const{min:t,max:n}=e.groups;return["*"===t?a.min:parseFloat(t),"*"===n?a.max:parseFloat(n)]}}return[a.min,a.max]}),[i,a.min,a.max]),d=(0,f.A)(),m=(0,o.useCallback)((e=>(0,ie.qE)(e,a.min,s-1)),[a.min,s]),u=(0,o.useCallback)((e=>(0,ie.qE)(e,c+1,a.max)),[c,a.max]),[p,h,g]=Ie(`${c}`,(e=>{const t=parseInt(e,10);Number.isFinite(t)&&d((0,v.ul)({key:a.id,value:`[${m(t)} TO ${s}]`}))}),Ae),[y,E,x]=Ie(`${s}`,(e=>{const t=parseInt(e,10);Number.isFinite(t)&&d((0,v.ul)({key:a.id,value:`[${c} TO ${u(t)}]`}))}),Ae),[w,C,S]=Ie(c,(e=>{d((0,v.ul)({key:a.id,value:`[${e} TO ${s}]`}))}),Ae),[X,$,I]=Ie(s,(e=>{d((0,v.ul)({key:a.id,value:`[${c} TO ${e}]`}))}),Ae),A=(0,o.useCallback)((e=>{h(e.target.value);const t=parseInt(e.target.value,10);Number.isFinite(t)&&S(m(t))}),[h,S,m]),N=(0,o.useCallback)((()=>{const e=parseInt(p,10);g(`${Number.isFinite(e)?m(e):a.min}`)}),[g,m,p,a.min]),L=(0,o.useCallback)((()=>{const e=parseInt(y,10);x(`${Number.isFinite(e)?u(e):a.max}`)}),[x,u,y,a.max]),P=(0,o.useCallback)((e=>{E(e.target.value);const t=parseInt(e.target.value,10);Number.isFinite(t)&&I(u(t))}),[E,I,u]),T=(0,o.useCallback)((e=>{const t=a.min>e?a.min:e;C(t),g(`${t}`)}),[C,g,a.min]),z=(0,o.useCallback)((e=>{const t=a.max<e?a.max:e;$(t),x(`${t}`)}),[$,x,a.max]),R=(e=>Array.isArray(e)&&1===e.length&&null!==e[0].match(b.fN))(i);return(0,o.useEffect)((()=>{R||(g(`${a.min}`),S(a.min),x(`${a.max}`),I(a.max))}),[a.min,a.max,R]),o.createElement("div",{className:t},o.createElement(Ne,null,o.createElement(Le,{"aria-label":"minimi",id:"min",label:"minimi",max:s-1,min:a.min,name:"min",size:"M",value:p,hideLabel:!0,onBlur:N,onChange:A}),o.createElement(Le,{"aria-label":"maksimi",id:"max",label:"maksimi",max:a.max,min:c+1,name:"max",size:"M",value:y,hideLabel:!0,onBlur:L,onChange:P})),o.createElement(Xe,{id:a.id,max:Math.max(Math.ceil(a.max),X),maxRef:l,maxValue:X,maxValueLabel:"maksimi",maxValueText:`${X}`,min:Math.min(Math.floor(a.min),w),minRef:n,minValue:w,minValueLabel:"minimi",minValueText:`${w}`,step:1,stepBig:10,onMaxChange:z,onMinChange:T}))};Pe.displayName="MinMaxFacet";const Te=(0,s["default"])(Pe).withConfig({componentId:"sc-bhy96l-2"})({background:n.color.fundaments.greys[50],display:"flex",flexDirection:"column",padding:`0 ${n.space.XS}`,margin:`${n.space.XS} 0`,[Xe]:{marginTop:n.space.XS}}),ze=e=>{let{className:t,hiddenFacets:a}=e;const n=(0,r.d4)(k._A),l=(0,r.d4)(k.Bu),i=(0,r.d4)(k.Lb),c=(0,f.A)(),s=(0,o.useCallback)(((e,t)=>{l.includes(t)?c((0,v.ep)({facetId:t,id:i})):c((0,v.Il)({facetId:t,id:i}))}),[l,c,i]);return o.createElement(U.A,{appearance:"secondary",className:t,headingLevel:3,name:"filters",radius:"none"},n.filter((e=>!a.includes(e.id)&&!(0,b.tm)(e))).map((e=>o.createElement(U.A.Section,{key:e.id,header:o.createElement(q,{facet:e}),id:e.id,open:l.includes(e.id),paddingBlockEnd:"none",paddingBlockStart:"none",paddingInlineEnd:"none",paddingInlineStart:"none",onChange:s},(0,b.SP)(e)?o.createElement(Te,{facet:e}):o.createElement(Ce,{facet:e})))))};ze.displayName="FacetAccordion";const Re=(0,s["default"])(ze).withConfig({componentId:"sc-9x8dt6-0"})({[H.Section]:{display:"flex",flexDirection:"column",background:n.color.fundaments.greys[50]}});var Fe=a(90377);const je=(0,s["default"])(p.A.H2).withConfig({componentId:"sc-1rzpzb5-0"})({...Fe.textStyle.h5,display:"flex",alignItems:"center",[w.A]:{marginLeft:n.space.XXS}}),Me=e=>{let{className:t,showCloseButton:a=!0}=e;const n=(0,r.d4)(k.E6),l=(0,r.d4)(k.Lb),i=(0,f.A)(),c=(0,o.useCallback)((()=>{i((0,v.$t)({id:l},{source:"header"}))}),[i,l]);return o.createElement("header",{className:t},o.createElement(F.A,null),o.createElement(je,{id:"search-filters-title"},o.createElement("span",null,"Suodattimet"),n>0&&o.createElement(w.A,{appearance:"info",size:"S"},n)),a&&o.createElement(R.A,{appearance:"ghostSecondary","aria-label":"Sulje",onClick:c},o.createElement(z["default"],null)))};Me.displayName="Header";const De=(0,s["default"])(Me).withConfig({componentId:"sc-1rzpzb5-1"})({alignItems:"center",boxShadow:`0 1px ${n.color.fundaments.blackOpacities[200]}`,boxSizing:"border-box",display:"flex",padding:`0 ${n.space.XS}`,[je]:{marginLeft:n.space.XXS},[R.A]:{position:"absolute",right:n.space.XXS}}),Oe=s["default"].div.withConfig({componentId:"sc-n2o5o6-0"})({display:"flex",flexDirection:"column"}),Be=s["default"].footer.withConfig({componentId:"sc-n2o5o6-1"})({backgroundColor:n.color.background.secondary,position:"sticky",boxSizing:"border-box",boxShadow:`0 -1px ${n.color.fundaments.blackOpacities[200]}`,bottom:0,height:l.XXL,width:"100%",zIndex:2,display:"flex",margin:"auto 0 0 0",padding:`${n.space.XS} 0`,[u.A]:{flex:"1 0",whiteSpace:"nowrap",marginLeft:n.space.XS,":last-of-type":{marginRight:n.space.XS}}}),_e=(0,s["default"])(w.A).withConfig({componentId:"sc-n2o5o6-2"})({marginLeft:n.space.XXS}),Ue=s["default"].section.withConfig({componentId:"sc-n2o5o6-3"})({position:"fixed",left:0,bottom:0,width:`${_.zP}px`,backgroundColor:n.color.background.secondary,overflow:"auto",zIndex:10,boxShadow:`0 1px 1px 0 ${n.color.fundaments.blackOpacities[600]}`,top:`${_.Be}px`}),Ve=s["default"].span.withConfig({componentId:"sc-n2o5o6-4"})({alignSelf:"center",marginRight:n.space.XXS,textAlign:"center"}),He=e=>{let{className:t,hiddenFacets:a,stickySidebarVisible:l}=e;const i=(0,r.d4)(k.Kp),c=(0,r.d4)(k.E6),s=(0,r.d4)(k.yZ),d=(0,r.d4)(k.Lb),m=(0,f.A)(),p=(0,o.useCallback)((()=>{m((0,v.$t)({id:d},{source:"other"}))}),[m,d]),h=(0,o.useCallback)((()=>{m((0,v.DK)("sidebar")),m((0,v.$t)({id:d},{source:"other"}))}),[m,d]),g=(0,o.useCallback)((()=>{m((0,v.$t)({id:d},{source:"confirm"}))}),[m,d]),y=o.createElement(Oe,null,o.createElement(Re,{hiddenFacets:a}),o.createElement(Be,null,l&&o.createElement(Ve,null,o.createElement(_e,null,s)," tuotetta"),o.createElement(u.A,{appearance:"secondary",disabled:0===c,onClick:h},l?"Tyhjennä suodattimet":"Tyhjennä kaikki"),!l&&o.createElement(u.A,{onClick:g},o.createElement("span",null,"Suodata"),o.createElement(_e,null,s))),o.createElement(De,{showCloseButton:!l}));return l?o.createElement(Ue,{className:t},y):o.createElement(B.A,{"aria-labelledby":"search-filters-title",attachPlacement:"left",background:n.color.background.secondary,className:t,id:"search-filters",open:i,onClose:p},y)};He.displayName="FilterSidebar";const We=(0,s["default"])(He).withConfig({componentId:"sc-n2o5o6-5"})({[Oe]:{flexGrow:1,minHeight:"100%"},[De]:{backgroundColor:n.color.background.secondary,height:l.XL,marginBottom:1,order:-1,position:"sticky",top:0,width:"100%",zIndex:3},[Re]:{boxSizing:"border-box"}});var Ke=a(4400);const Ye=e=>{let{className:t,facetId:a,displayName:n}=e;const l=(0,r.d4)(k.Lb),i=(0,r.d4)((0,k.IB)(a)),c=(0,f.A)(),s=(0,o.useRef)(null),d=(0,Ke.useIsIntersecting)(s,{once:!1}),m=(0,o.useCallback)((()=>{c((0,v.p$)({id:l,facetId:a}))}),[c,a,l]);return o.createElement(u.A,{ref:s,appearance:"secondary",className:t,tabIndex:d?0:-1,onClick:m},n,i>0&&o.createElement(w.A,{appearance:"info"},i))};Ye.displayName="PromotedFacet";const qe=(0,s["default"])(Ye).withConfig({componentId:"sc-1k3sknk-0"})({display:"flex",alignItems:"center",marginBottom:n.space.XXXS}),Qe=["category","brand","price","AvailableImmediatelyAllChannels","rating","color","DemoLocationIds"],Ze=e=>{let{className:t,hiddenFacets:a}=e;const n=(0,r.d4)(k._A);return o.createElement(V.ob,{align:"end",className:t,gap:"XXS"},n.filter((e=>{let{id:t}=e;return!(null!=a&&a.includes(t))})).filter((e=>{let{id:t}=e;return Qe.includes(t)})).map((e=>{let{id:t,displayName:a}=e;return o.createElement(qe,{key:t,displayName:a,facetId:t})})))};Ze.displayName="PromotedFacets";const Ge=(0,s["default"])(Ze).withConfig({componentId:"sc-1v4gk27-0"})({height:n.size.M,marginLeft:n.space.XXS}),Je=s["default"].span.withConfig({componentId:"sc-1udvkbv-0"})({[T.breakpoint.max.S]:{display:"none"}}),et=s["default"].div.withConfig({componentId:"sc-1udvkbv-1"})({height:n.size.M}),tt=s["default"].div.withConfig({componentId:"sc-1udvkbv-2"})({display:"flex",gap:n.space.XXXXS}),at=e=>{let{className:t,hiddenFacets:a=[],stickySidebarVisible:n}=e;const l=(0,r.d4)(k.E6),i=(0,f.A)(),c=(0,o.useCallback)((()=>{i((0,v.DK)("icon"))}),[i]);return o.createElement("div",{className:t},n?o.createElement(et,null):o.createElement(o.Fragment,null,o.createElement(Je,null,o.createElement(Ge,{hiddenFacets:a})),l>0?o.createElement(tt,null,o.createElement(O,null),o.createElement(R.A,{appearance:"secondary","aria-label":"Tyhjennä valinnat",onClick:c},o.createElement(z["default"],null))):o.createElement(O,null)),o.createElement(We,{hiddenFacets:a,stickySidebarVisible:n}))};at.displayName="Filters";const nt=(0,s["default"])(at).withConfig({componentId:"sc-1udvkbv-3"})({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",overflow:"hidden",padding:`${n.space.XXXXS} ${n.space.XXXXS} ${n.space.XXXXS} ${n.space.none}`,[O]:{marginLeft:n.space.XXS}});var lt=a(79679),it=a(8374);const ot=()=>{const e=(0,r.d4)(k.SE),t=(0,r.d4)(k.Lb),a=(0,f.A)(),n=(0,o.useCallback)((n=>{e!==n&&(a((0,it.r_)(n)),a((0,v.dT)({id:t,list:n,previous:e})))}),[e,a,t]);return o.createElement(lt.A,{currentListType:e,onChange:n})};var rt=a(85526),ct=a(68367);const st=e=>{const t=(0,r.wA)(),a=(0,r.d4)((0,ct.HG)(e)),n=e.filter((e=>!a.find((t=>{let{id:a}=t;return e===a}))));(0,o.useEffect)((()=>{n.length>0&&t(rt.bW.started({categoryIds:n,children:!0}))}),[t,n])},dt=e=>{let{className:t,facetId:a,filter:n}=e;const l=(0,f.A)(),i=(0,o.useCallback)((()=>l((0,v.my)({key:a,value:n}))),[a,n,l]),c=(0,r.d4)((0,ct.I7)(n)),s=(0,o.useMemo)((()=>"price"===a?(e=>e.substring(1,e.length-1).replace(" TO ","–"))(n):"category"===a&&null!=c&&c.attributes.labels.fi_FI?c.attributes.labels.fi_FI:(0,b.Ab)(n,a)?b._X[n]:(0,b.XY)(n,a)?b.m[n]:"yes"===n?"Kyllä":"no"===n?"Ei":n),[a,n,c]);return o.createElement(u.A,{appearance:"secondary",className:t,postfixContent:o.createElement(z["default"],{small:!0}),onClick:i},o.createElement("span",null,s))};dt.displayName="FilterButton";const mt=(0,s["default"])(dt).withConfig({componentId:"sc-o4l61q-0"})({margin:`0 ${n.space.XXS} ${n.space.XXS} 0`,fontWeight:"lighter",[z["default"]]:{marginLeft:n.space.XXS}}),ut=e=>{let{className:t,displayName:a,facetId:n,filterArray:l}=e;return st("category"===n?l:[]),o.createElement("div",{className:t},o.createElement(p.A.H3,null,a,":"),o.createElement("div",null,l.map(((e,t)=>o.createElement(mt,{key:t,facetId:n,filter:e})))))};ut.displayName="FilterCategory";const pt=(0,s["default"])(ut).withConfig({componentId:"sc-rhxycr-0"})({margin:`${l.XXXXS} ${n.space.S}`,display:"inline-block"}),ft=()=>{const e=(0,r.d4)(k.No),t=(0,r.d4)(k.yL);return o.createElement("div",null,Object.entries(e).map((e=>{var a,n;let[l,i]=e;return i&&(null==(a=t[l])?void 0:a.displayName)&&o.createElement(pt,{key:l,displayName:null==(n=t[l])?void 0:n.displayName,facetId:l,filterArray:i})})))},ht=e=>{let{className:t}=e;const a=(0,r.d4)(k.iT),n=(0,r.d4)(k.E6);return o.createElement("div",{className:t},a&&o.createElement(p.A.UI,null,"Tarkista oikeinkirjoitus tai kokeile muita hakusanoja."),n>0&&o.createElement(o.Fragment,null,o.createElement(p.A.UI,null,a?"Tai poista joku suodattimista:":"Poista joku hakusuodattimista:"),o.createElement(ft,null)))};ht.displayName="NoResults";const gt=(0,s["default"])(ht).withConfig({componentId:"sc-1p4ovha-0"})({display:"flex",flexDirection:"column",alignItems:"center",[p.A.UI]:{marginBottom:n.space.XXS}});var yt=a(7369),bt=a(90132);const vt=(0,s["default"])(z["default"]).withConfig({componentId:"sc-1b6gtsc-0"})({'&[aria-disabled="true"]':{color:n.color.text.disabled,cursor:"default"}}),kt=e=>{let{className:t}=e;const{pathname:a}=(0,c.zy)(),n=(0,r.d4)(k.iT),[l,i]=(0,o.useState)(n),[s,d]=(0,o.useState)(!1),m=(0,f.A)();(0,o.useEffect)((()=>{i(n)}),[n]);const u=(0,o.useCallback)((()=>{""!==l&&(i(""),yt.jK.matchPath(a)?m((0,bt.b_)()):m((0,v.NY)("")))}),[l,a,m]),p=(0,o.useCallback)((e=>{i(e.target.value),d(!0)}),[i,d]),h=(0,o.useCallback)((e=>{e.preventDefault(),yt.jK.matchPath(a)&&""===l||(m((0,v.NY)(l)),d(!1))}),[l,m,d,a]);return o.createElement("form",{"aria-label":"Hae tuotteita",className:t,role:"search",onSubmit:h},o.createElement(J.A,{"aria-label":"Rajaa hakusanalla",id:"search-query",label:"Rajaa hakusanalla",name:"query",placeholder:"Rajaa hakusanalla",postfixContent:o.createElement(vt,{"aria-disabled":""===l,"aria-label":"Poista hakusana",role:"button",onClick:u}),size:"M",type:"search",value:l,hideLabel:!0,onChange:p}),s&&o.createElement(R.A,{"aria-label":"Hae",type:"submit"},o.createElement(Q["default"],null)))};kt.displayName="Query";const Et=(0,s["default"])(kt).withConfig({componentId:"sc-1b6gtsc-1"})({display:"flex",flexWrap:"nowrap",width:"100%",maxWidth:"360px",[J.A]:{flex:1,"&:not(:last-child) input":{borderTopRightRadius:0,borderBottomRightRadius:0}},[R.A]:{borderTopLeftRadius:0,borderBottomLeftRadius:0,marginLeft:-1,position:"relative"}}),xt=e=>o.createElement(V.JC,e);xt.displayName="SelectButton";const wt=(0,s["default"])(xt).withConfig({componentId:"sc-unq3aw-0"})({}),Ct=e=>{let{className:t}=e;const a=(0,r.d4)(k.MF),n=(0,r.d4)(k.A2),l=(0,f.A)(),i=(0,b.$A)(n),c=(0,o.useCallback)((e=>{l((0,v.d1)(e.target.value))}),[l]);return o.createElement(wt,{"aria-label":"Tuotteiden järjestys",className:t,id:"sort_select",name:"sort",value:a,onChange:c},i.map((e=>o.createElement("option",{key:e,value:e},b.xr[e]))))};Ct.displayName="Sort";const St=(0,s["default"])(Ct).withConfig({componentId:"sc-19w3yp1-0"})({display:"inline-block",minWidth:"8.5rem"}),Xt=(0,s["default"])(p.A.UI).withConfig({componentId:"sc-1dy8ob6-0"})({alignItems:"center",display:"flex",flexWrap:"nowrap",[w.A]:{marginRight:l.XXXXS}}),$t=s["default"].div.withConfig({componentId:"sc-1dy8ob6-1"})({}),It=s["default"].div.withConfig({componentId:"sc-1dy8ob6-2"})({alignItems:"center",alignSelf:"stretch",display:"flex",flexDirection:"row",justifyContent:"space-between"},(e=>{let{stickySidebarVisible:t}=e;return t?{[`${Xt}, ${A}, ${$t}`]:{flexGrow:1,maxWidth:"33.3%"},[A]:{textAlign:"center"}}:{}})),At=(0,s["default"])(C.A).withConfig({componentId:"sc-1dy8ob6-3"})({marginBottom:`${n.space.XXS} !important`,marginTop:`-${l.XXXXS}`,width:"100%"}),Nt=s["default"].div.withConfig({componentId:"sc-1dy8ob6-4"})({alignItems:"center",alignSelf:"stretch",display:"flex",flexDirection:"row",justifyContent:"space-between",[i.$.min.m]:{[P]:{pointerEvents:"none",position:"absolute",width:"100%"}}}),Lt=s["default"].div.withConfig({componentId:"sc-1dy8ob6-5"})({flex:1}),Pt=e=>{let{className:t,hiddenFacets:a,hideQuery:n=!1,hideFilters:l=!1,hideSort:i=!1,hideListType:c=!1}=e;const s=(0,r.d4)(k.yZ),d=(0,r.d4)(k.kk),m=(0,r.d4)(k.S2),u=(0,r.d4)(X.PK),p=(0,r.d4)($.w),f=(0,r.d4)(X.wk),h=!p&&u===S.t7&&!f;return o.createElement("div",{className:t},!n&&o.createElement(o.Fragment,null,o.createElement(Et,null),!h&&o.createElement(A,null)),m&&0===s?o.createElement(gt,null):o.createElement(o.Fragment,null,o.createElement(It,{stickySidebarVisible:h},o.createElement(Xt,null,o.createElement(w.A,{size:"S"},s||o.createElement(x["default"],{size:"1rem"})),o.createElement("span",null,1===s?"tuote":"tuotetta")),!l&&o.createElement(nt,{hiddenFacets:a,stickySidebarVisible:h}),!n&&h&&o.createElement(o.Fragment,null,o.createElement(A,null),o.createElement($t,null))),(!i||!c||d>1)&&o.createElement(o.Fragment,null,o.createElement(At,null),o.createElement(Nt,null,i?o.createElement(Lt,null):o.createElement(St,null),o.createElement(P,null),c?o.createElement(Lt,null):o.createElement(ot,null)))))};Pt.displayName="Controls";const Tt=(0,s["default"])(Pt).withConfig({componentId:"sc-1dy8ob6-6"})({alignItems:"center",display:"flex",flexDirection:"column",marginBottom:n.space.XXS,position:"relative",minHeight:"129px","> :not(:last-child)":{marginBottom:l.XXS},[i.$.min.tablet]:{marginBottom:l.XXS},[i.$.min.desktop]:{marginBottom:n.space.XS}});var zt=a(79507),Rt=a(85949);const Ft=e=>{let{className:t,topLevelRef:a}=e;const n=(0,f.A)(),l=(0,r.d4)(k.YR),i=(0,r.d4)(k.kk),c=(0,o.useCallback)((()=>{(0,zt.h)((null==a?void 0:a.current)??0)}),[a]),s=(0,o.useCallback)((e=>{c(),n((0,v.H2)({pageNo:e}))}),[n,c]),{pathname:d,search:m}=(0,r.d4)(X.bS),u=(0,o.useMemo)((()=>{const e=new URLSearchParams(m);e.sort(),e.delete("pageNo");const t=e.toString().length;return`${d.endsWith("/")?d.slice(0,-1):d}${t?"?":""}${e.toString()}${t?"&":"?"}pageNo=`}),[m,d]);return o.createElement(Rt.A,{className:t,hrefPrefix:u,pageCount:i,pageNo:l,preventDefault:!0,onClick:s})};Ft.displayName="Pagination";const jt=(0,s["default"])(Ft).withConfig({componentId:"sc-oltix7-0"})({});var Mt=a(81074),Dt=a(88582),Ot=a(84986),Bt=a(75860),_t=a(31024);const Ut=12,Vt=(0,s["default"])(Ot.A).withConfig({componentId:"sc-1tg0wl0-0"})({marginLeft:`-${n.space.XXS}`,minHeight:n.size.XS,width:`calc(100% + 2 * ${n.space.XXS})`,[i.$.min.s]:{marginLeft:`-${n.space.XS}`,width:`calc(100% + 2 * ${n.size.XS})`},[i.$.min.m]:{[`${V.FN} > li`]:{"&:first-child":{paddingLeft:n.space.XS},"&:last-child":{paddingRight:n.space.XS}}},[i.$.min.l]:{marginLeft:`-${n.space.S}`,width:`calc(100% + 2 * ${n.space.S})`,[`${V.FN} > li`]:{"&:first-child":{paddingLeft:n.space.S},"&:last-child":{paddingRight:n.space.S}}}}),Ht=e=>o.createElement(Vt,e),Wt=Mt.F5,Kt=e=>{let{analyticsContext:t,className:a,isCustomerReturn:n,placeholdersCount:l}=e;const{pathname:i}=(0,c.zy)(),s=(0,r.d4)(k.S2),d=(0,r.d4)(k.Uc),m=(0,r.d4)(k.wb),u=(0,r.d4)(k.YR),p=(0,r.d4)(k.ah),f=(0,r.wA)(),y=(0,h.A)(),b=(0,o.useMemo)((()=>new Array(l).fill(Wt)),[l]),v=(0,r.d4)((0,k.fO)(n?-1:u)),x=(0,r.d4)((0,k.QC)(n?u:-1)),w=!s||d||m,C=(0,o.useMemo)((()=>w?b:n?x:v),[n,v,w,x,b]),S=u>1?(u-1)*p:0,X=(0,r.d4)(k.iT);(0,o.useEffect)((()=>{X&&f((0,bt.q9)({searchTerm:X}))}),[f,X]);const[$,I]=(0,o.useMemo)((()=>yt.jK.matchPath(i)?[C.slice(0,Ut),C.slice(Ut)]:[C,[]]),[i,C]);return o.createElement("div",{className:a},o.createElement(Bt.A,{dataLayerListName:`${t} - Top${X?`: ${X}`:""}`,indexOffset:S,isOutletProductList:Boolean(n),loading:!s,loadingPlaceholders:Boolean(l),products:$,type:y}),I.length>0&&o.createElement(o.Fragment,null,o.createElement(E.A,{placements:g.DD.top,render:Ht,loadingPlaceholders:!0}),o.createElement(Bt.A,{dataLayerListName:`${t} - Bottom${X?`: ${X}`:""}`,indexOffset:Ut+S,loading:!s,loadingPlaceholders:Boolean(l),products:I,type:y})))};Kt.displayName="SearchResults";const Yt=(0,s["default"])(Kt).withConfig({componentId:"sc-1tg0wl0-1"})({background:n.color.background.secondary,display:"flex",flexDirection:"column",[`${_t.tE}:not(:last-child)`]:{marginBottom:n.space.XXS},[Vt]:{marginBottom:n.space.XS,marginTop:n.space.XXS,[Dt.A]:{marginLeft:n.space.S}}}),qt=(0,s["default"])(m.A).withConfig({componentId:"sc-lzcnd7-0"})({alignItems:"flex-start",display:"flex",flexDirection:"column",marginBottom:l.XXS,[u.A]:{margin:`${l.XXS} 0 0 0`,whiteSpace:"nowrap"},[l.breakpoint.min.tablet]:{flexDirection:"row",alignItems:"center",[u.A]:{margin:`0 0 0 ${l.XXS}`}}}),Qt=(0,s["default"])(p.A.UI).attrs({size:"large"}).withConfig({componentId:"sc-lzcnd7-1"})({alignSelf:"center"}),Zt=e=>{let{analyticsContext:t,baseFilters:a,baseQuery:n,className:l,hiddenFacets:i,hideFilters:s,hideListType:m,hideQuery:x,hideSort:w,initialBrandFilter:C,initialCategoryFilter:S,initialList:X,initialPageSize:$,initialQuery:I,initialSort:A,isCustomerReturn:N,placeholdersCount:L=b.yQ,scrollToRef:P}=e;const{pathname:T}=(0,c.zy)(),z=(0,f.A)(t),R=(0,r.d4)(k.Lb),F=(0,r.d4)(k.yZ),j=(0,r.d4)(k.n5),M=(0,r.d4)(k.S2),D=(0,r.d4)(k.te),O=(0,h.A)(),B=D?`${t} - ${D}`:t,_=(0,o.useRef)(null),U=(0,o.useMemo)((()=>(0,y.ef)({baseQuery:n,baseFilters:a,list:X,pageSize:$,sort:A,query:I,...C||S?{sisuFilters:{brand:C,category:S}}:{},isCustomerReturn:N})),[a,n,C,S,X,$,A,I,N]),V=(0,o.useCallback)((e=>{e.preventDefault(),window.location.reload()}),[]);return(0,o.useEffect)((()=>{if((encodeURI(T)===R||N||T.endsWith("/")&&T.includes(R))&&void 0!==O){const e=null!=U&&U.list?U:{...U,list:O};z((0,v.n_)({id:R,initial:e}))}}),[z,R,U,N,T,O]),o.createElement("div",{ref:_,className:l},D===b.Mn.internal&&!N&&o.createElement(qt,{appearance:"info"},o.createElement(p.A.UI,null,"Tuotevalikoiman rajaaminen ei tällä hetkellä kaikilta osin toimi. Saadaksesi toiminnallisuudet käyttöön kokeile ladata sivu hetken kuluttua uudelleen. Jos ongelma jatkuu, kokeile rajata hakua uudelleen."),o.createElement(u.A,{size:"M",onClick:V},"Päivitä sivu")),o.createElement(d.A.Provider,{value:B},o.createElement(Tt,{hiddenFacets:i,hideFilters:s,hideListType:m,hideQuery:x,hideSort:w}),j?o.createElement(Qt,null,"Jotain meni pieleen, yritä myöhemmin uudelleen"):o.createElement(Yt,{analyticsContext:B,isCustomerReturn:N,placeholdersCount:j?0:L}),M&&0===F&&!N&&o.createElement(E.A,{placements:g.DD.noHit}),o.createElement(jt,{topLevelRef:P??_})))};Zt.displayName="Search";const Gt=(0,s["default"])(Zt).withConfig({componentId:"sc-lzcnd7-2"})({position:"relative",background:n.color.background.secondary,display:"flex",flexDirection:"column",padding:`${n.space.XS} ${n.space.XXS}`,[jt]:{marginTop:n.space.XS},[i.$.min.tablet]:{padding:n.space.XS},[i.$.min.desktop]:{padding:n.space.S},"#sisuDocumentNS &":{marginLeft:"-1rem",marginRight:"-1rem","@media only screen and (min-width: 63em)":{marginLeft:"-2rem",marginRight:"-2rem"}}})},47699:(e,t,a)=>{a.d(t,{A:()=>m});var n=a(96540),l=a(61225),i=a(56347),o=a(77428),r=a(24005),c=a(37325),s=a(68367),d=a(33987);const m=e=>{var t;let{breadcrumbItems:a=[],categoryId:m,className:u,pid:p=0}=e;const f=(0,l.d4)((0,d.l1)(p)),h=(0,i.zy)(),{language:g}=(0,r.A)(),y=(0,l.d4)((0,s.nt)(p?(null==f?void 0:f.pim_primary_category)??void 0:m));if(!(m&&"0"!==m||a&&0!==a.length))return null;if(null!=f&&f.assortmentHref)return n.createElement(o.A,{breadcrumbs:(0,c.E)(a,g,h.pathname),className:u});const b=("Etusivu"===(null==(t=y[0])?void 0:t.label)?y.slice(1):y).concat(a);return n.createElement(o.A,{breadcrumbs:(0,c.E)(b,g,h.pathname),className:u})}},22933:(e,t,a)=>{a.d(t,{VC:()=>m});var n=a(5556),l=a.n(n);const{bool:i,func:o,object:r,oneOfType:c,shape:s,string:d}=l(),m={replace:i,to:c([o,s({hash:d,pathname:d,search:d,state:r}),d])}}}]);
//# sourceMappingURL=/assets/maps/187.ff8397e0d1.js.map