1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[736],{736:(e,t,l)=>{"use strict";l.d(t,{A:()=>b});var r=l(7876),s=l(9099),n=l(4232),a=l(8343),i=l(751),c=l(8827),o=l.n(c);function d(e){let{menuItems:t,showMenu:l,setShowMenu:a,setProductFunction:c,heading:d}=e;(0,s.useRouter)();let u=(0,n.useRef)(null);return(0,r.jsx)("div",{className:"scroll fixed bottom-0 left-0 top-0 z-[9999] h-screen w-screen bg-black bg-opacity-20 shadow-lg ".concat(l?"":"hidden"),onClick:e=>u.current&&!u.current.contains(e.target)&&a(!l),children:(0,r.jsxs)("div",{ref:u,className:"relative h-full w-full bg-white px-6 py-6 dark:bg-darkest md:max-w-lg md:px-12 md:py-20 overflow-y-auto",children:[(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(i,{className:"mb-2 h-8 w-8 cursor-pointer ",onClick:()=>a(!l)})}),(0,r.jsxs)("div",{className:"sideMenu relative flex flex-col items-start pb-12 text-xs font-black lg:pb-24 text-center",children:[(0,r.jsx)("h4",{className:"mb-5",children:d}),(0,r.jsx)("div",{className:"grid w-full grid-cols-2 gap-x-2 gap-y-4",children:t.map(e=>{var t;return(0,r.jsxs)("div",{className:"cursor-pointer",onClick:()=>{c(e.id),a(!1)},children:[e.image[0]?(0,r.jsx)(o(),{src:void 0!==e.image?null==(t=e.image[0])?void 0:t.url:"",width:"100%",height:"100%",layout:"responsive",objectFit:"contain",alt:e.title}):"",e.title]},e.id)})})]})]})})}var u=l(8538),h=l(3573);function m(e){var t;let{productFunctions:l,productFunction:s,setProductFunction:a,tags:i,search:c,setTags:d,setSearch:u,activeFilters:m,setShowMenu:x}=e,[f,p]=(0,n.useState)(!1),[g,v]=(0,n.useState)(!1),j=l.find(e=>e.id===s);return 1===l.length?(0,r.jsx)("div",{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{className:"mb-4 flex w-full items-center justify-center rounded-md p-2 font-bold transition-colors lg:hidden ".concat(m?"bg-nordan text-black":"bg-black text-white","\n "),onClick:()=>v(!g),children:["Filter ",m?"(aktiv)":"",(0,r.jsx)(h,{className:"ml-2 h-4 w-4 stroke-[4px] transition-all ".concat(g&&"-rotate-180")})]}),(0,r.jsx)("div",{className:"".concat(g?"mb-4 h-auto border-b-2 border-black py-2":"h-0"," w-full overflow-hidden transition-all duration-300 lg:block lg:h-auto lg:w-48 lg:border-none"),children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-black uppercase text-xxs",children:"Funktion"}),(0,r.jsxs)("div",{className:"mb-6 flex cursor-pointer items-center rounded-2xl bg-white font-black text-xs",onClick:()=>x(!0),children:[j.image[0]?(0,r.jsx)("div",{className:"w-12 h-12 my-2 mx-4",children:(0,r.jsx)(o(),{src:null==(t=j.image[0])?void 0:t.url,width:"100%",height:"100%",alt:j.title})}):"",(0,r.jsx)("div",{className:"truncate",children:j.title})]}),i&&i.slice(0,void 0).map((e,t)=>(0,r.jsxs)("div",{className:"toggle-block mb-4",children:[(0,r.jsx)("input",{type:"checkbox",id:e.id,className:"hidden",checked:e.checked,onChange:t=>{e.checked=t.target.checked,d([...i])}}),(0,r.jsx)("label",{htmlFor:e.id,className:"toggle-label transform-gpu cursor-pointer font-black uppercase transition-transform text-xxs",children:e.heading}),(0,r.jsx)("div",{className:" "+(e.checked?"":"hidden"),children:e.productTags.map(e=>(0,r.jsxs)("label",{htmlFor:e.id,className:"my-1 flex cursor-pointer items-center py-1 text-xs lg:my-0 lg:py-0 ",children:[(0,r.jsx)("input",{type:"checkbox",className:"mr-2 h-4 w-4 appearance-none border-2 border-darker outline-none checked:bg-darker dark:border-white dark:checked:bg-white",name:e.title,id:e.id,checked:e.checked,onChange:t=>{e.checked=!e.checked,d([...i])}}),e.title]},e.id))})]},e.id)),!1,(0,r.jsx)("input",{type:"search",value:c,onChange:e=>u(e.target.value),className:"w-full border-2 border-black p-1 text-xs ring-black focus:outline-none focus:ring-1 dark:border-0 dark:bg-darker",placeholder:"S\xf6k produktnamn"})]})})]})}var x=l(5961),f=l.n(x),p=l(8230),g=l.n(p),v=l(9095);function j(e){let{products:t}=e;return(0,r.jsx)("div",{className:"mt-4 mb-12 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-4 ",children:t&&t.map((e,t)=>{var l,s,n;return(0,r.jsx)(g(),{href:e.url,children:(0,r.jsxs)("div",{className:"group flex h-full flex-1 cursor-pointer flex-col rounded-md bg-white p-4 dark:bg-darker",children:[(0,r.jsx)("div",{className:"relative mx-auto mb-4 h-48 w-full max-w-[192px] transition-opacity duration-300 ease-in-out hover:opacity-50",children:(null==(l=e.image[0])?void 0:l.url)&&(0,r.jsx)(o(),{src:e.image[0].url,width:"100%",height:"100%",alt:e.title,layout:"responsive",objectFit:"contain"})}),(0,r.jsxs)("div",{className:"jsx-ffdbeb08037f8b55 mb-auto",children:[(0,r.jsx)(f(),{id:"ffdbeb08037f8b55",children:".shopDesc.jsx-ffdbeb08037f8b55{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:30ch}"}),(0,r.jsxs)("p",{className:"jsx-ffdbeb08037f8b55 mb-0 font-black leading-tight",children:[e.title," "]}),(0,r.jsxs)("p",{className:"jsx-ffdbeb08037f8b55 shopDesc mb-2 text-xs",children:["Serie: ",null==e||null==(s=e.ancestors[0])?void 0:s.title," | ",null==e||null==(n=e.ancestors[1])?void 0:n.title]})]}),(0,r.jsx)("div",{className:"mb-0 mt-auto text-sm font-bold",children:(0,r.jsx)(v,{className:"stroke1 ml-2 inline-block h-10 w-10 transform-gpu transition-transform group-hover:translate-x-3"})})]})},t)})})}function b(e){var t;let{heading:l,page:i,categories:c,block:o,products:h,productFunctions:x,defaultProductFunction:f}
1=e,p=(0,s.useRouter)(),[g,v]=(0,n.useState)(h),[b,k]=(0,n.useState)(f.id),[w,N]=(0,n.useState)(""),[y,F]=(0,n.useState)([]),[E,C]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=h.filter(e=>{var t;return b===f.id?e:(null==(t=e.productFunction[0])?void 0:t.id)===b}),t=null==o?void 0:o.children.filter(t=>t.productTags.some(t=>e.some(e=>e.productTags.some(e=>e.id===t.id))));for(let e=0;e<(null==t?void 0:t.length);e++)t[e].checked=t[e].expanded,t[e].productTags.forEach(e=>e.checked=!1);N(""),v(h),F(t)},[p.asPath,o,h,f,b]),(0,n.useEffect)(()=>{let e=h.filter(e=>{var t;return b===f.id?e:(null==(t=e.productFunction[0])?void 0:t.id)===b}).filter(e=>w.length?e.title.toLowerCase().includes(w.toLowerCase()):e);null==y||y.forEach(t=>{let l=t.productTags.filter(e=>e.checked);e=e.filter(e=>l.length?l.some(t=>e.productTags.some(e=>t.id===e.id)):e)}),v(e)},[w,y,h,b,f]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{title:i.title,description:i.metaDescription,canonicalUrl:"https://www.nordan.se/".concat(i.uri),imageUrl:null==(t=i.ogImage[0])?void 0:t.url}),(0,r.jsx)(d,{showMenu:E,setShowMenu:C,menuItems:x,setProductFunction:k,heading:l+" funktioner"}),(0,r.jsxs)("div",{className:"px-dynamic",children:[(0,r.jsx)(u.A,{backButton:"/",levels:{root:c.map(e=>({title:e.title,uri:"produkter/"+e.slug}))},activeSerie:l,activeUtformning:" ",activeFunktion:" "}),(0,r.jsxs)("div",{className:"gap-12 lg:flex",children:[(0,r.jsx)(m,{search:w,setSearch:N,tags:y,setTags:F,productFunction:b,productFunctions:x,setProductFunction:k,setShowMenu:C}),(0,r.jsxs)("div",{className:"content flex-1",children:[(0,r.jsx)("h1",{className:"text-[1.8em]",children:l}),(0,r.jsx)(j,{products:g}),0===h.length&&(0,r.jsx)("p",{children:"Hittade inga produkter..."})]})]})]})]})}},3573:(e,t,l)=>{"use strict";let r=l(4232);e.exports=r.forwardRef(function(e,t){let{title:l,titleId:s,...n}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":s},n),l?r.createElement("title",{id:s},l):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))})},7328:(e,t,l)=>{e.exports=l(9269)},8108:(e,t,l)=>{"use strict";let r=l(4232);e.exports=r.forwardRef(function(e,t){let{title:l,titleId:s,...n}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":s},n),l?r.createElement("title",{id:s},l):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}))})},8343:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var r=l(7876),s=l(7328),n=l.n(s);let a=" | NorDan Sverige";function i(e){let{title:t,canonicalUrl:l,description:s,imageUrl:i,themeColor:c,pageType:o}=e;return(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:t+a}),l&&(0,r.jsx)("link",{rel:"canonical",href:l}),(0,r.jsx)("meta",{name:"theme-color",content:null!=c?c:"#ffffff"}),(0,r.jsx)("meta",{property:"og:type",content:null!=o?o:"website"}),(0,r.jsx)("meta",{property:"og:locale",content:"sv_SE"}),(0,r.jsx)("meta",{property:"og:title",content:"".concat(t).concat(a)}),s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:description",content:s}),(0,r.jsx)("meta",{name:"description",content:s})]}),i&&(0,r.jsx)("meta",{property:"og:image",name:"image",content:i})]})}},8538:(e,t,l)=>{"use strict";l.d(t,{A:()=>o});var r=l(7876),s=l(8230),n=l.n(s),a=l(8108),i=l(3573);let c=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:"absolute top-8 left-0 transition-all delay-200 duration-300 bg-white dark:bg-darker w-72 h-0 group-hover:h-60 z-20 shadow-lg rounded-md overflow-hidden group-hover:overflow-y-auto",children:(0,r.jsx)("div",{className:"p-6 flex-col inline-flex",children:t})})};function o(e){let{levels:t,activeSerie:l,activeUtformning:s,activeFunktion:o,backButton:d}=e;return(0,r.jsx)("div",{className:"hidden md:block uppercase text-xs font-black mb-16",children:(0,r.jsxs)("div",{className:"flex items-center",children:[d&&(0,r.jsx)(n(),{href:d,className:"mr-6 active:animate-click",children:(0,r.jsx)(a,{className:"h-6 w-6 hover:text-gray-200"})}),(null==t?void 0:t.root)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"root inline-flex flex-col relative group mr-6",children:[(0,r.jsxs)("span",{className:"flex items-center hover:text-gray-200 cursor-default",children:[l||"Produktserie"," ",(0,r.jsx)(i,{className:"h-4 w-4 ml-2"})]}),(0,r.jsx)(c,{children:t.root.map((e,t)=>(0,r.jsx)(n(),{href:"/".concat(e.uri),className:"hover:text-gray-200",children:e.title},t))})]}),(0,r.jsxs)("span",{className:"level1 inline-flex flex-col relative group mr-6",children:[(0,r.jsxs)("span",{className:"flex items-center hover:text-gray-200 cursor-default ".concat(!t.level1&&"text-gray-200"),children:[s||"Utformning"," ",(0,r.jsx)(i,{className:"h-4 w-4 ml-2"})]}),(null==t?void 0:t.level1)&&(0,r.jsx)(c,{children:t.level1.map((e,t)=>(0,r.jsx)(n(),{href:"/".concat(e.uri),className:"hover:text-gray-200",children:e.title},t))})]}),(0,r.jsxs)("span",{className:"level2 inline-flex flex-col relative group",children:[(0,r.jsxs)("span",{className:"flex items-center hover:text-gray-200 cursor-default ".concat(!t.level2&&"text-gray-200"),children:[o||"Funktion"," ",(0,r.jsx)(i,{className:"h-4 w-4 ml-2"})]}),(null==t?void 0:t.level2)&&(0,r.jsx)(c,{children:t.level2.map((e,t)=>(0,r.jsx)(n(),{href:"/".concat(e.uri),className:"hover:text-gray-200",children:e.title},t))})]})]})]})})}},9095:(e,t,l)=>{"use strict";let r=l(4232);e.exports=r.forwardRef(function(e,t){let{title:l,titleId:s,...n}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":s},n),l?r.createElement("title",{id:s},l):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"}))})}}]);
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.