1import{j as r,d as y,b as C,I,c as f,P as L}from"./npm.sellpy-design-system.sUaPRvy7.bundle.js";import{r as S}from"./npm.react-hook-form.C-gy3V91.bundle.js";import{L as v}from"./npm.react-router.eGoWS0aR.bundle.js";import{g as d}from"./npm.styled-components.CXmCnM24.bundle.js";import{C as u}from"./colorManagement.DjDKmvV5.bundle.js";import{m,dn as M,dp as _}from"./index.OKbXaoKY.bundle.js";import"./npm.apollo-client.D2roezfX.bundle.js";import{M as A}from"./MetaTagPlacer.DzHyTaDQ.bundle.js";try{let e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dfb8ed46-c886-4cd5-9f1b-fb778b53ac63",e._sentryDebugIdIdentifier="sentry-dbid-dfb8ed46-c886-4cd5-9f1b-fb778b53ac63")}catch(e){}{let e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:sellpy-market":!0})}const E=d(L)` 2 padding-right: 3rem; 3 width: 33%; 4 ${m.mobile} { 5 min-width: 300px; 6 } 7`,R=({category:e,categoryType:t})=>{const s=`/store/${M[t].replace("metadata.","")}/${t==="brand"?encodeURIComponent(encodeURIComponent(e[t])):e[t]}`;return r.jsx(E,{children:r.jsx(v,{to:s,style:{fontSize:"1.5rem",color:u.text},children:e[t]})})},k=d.div` 8 display: flex; 9 flex-flow: column wrap; 10 align-content: flex-start; 11 max-height: 32rem; 12 max-width: 1024px; 13 ${m.tablet} { 14 flex-flow: column nowrap; 15 max-height: none; 16 } 17`,p=({categories:e,categoryType:t})=>r.jsx(k,{children:e.map((s,n)=>r.jsx(R,{category:s,categoryType:t},n))}),q=({letter:e,categories:t,categoryType:s})=>{const n=t.slice(0,30).sort((o,a)=>o[s].toLocaleLowerCase("sv").localeCompare(a[s].toLocaleLowerCase("sv")));return t.length>0&&r.jsxs("div",{children:[r.jsx(f,{style:{textTransform:"uppercase"},children:e}),r.jsx(p,{categories:n,categoryType:s})]})},z=({header:e,categories:t,categoryType:s})=>{const n=t.filter(o=>o.freq>10).sort((o,a)=>a.freq-o.freq).slice(0,30);return n.length>0&&r.jsxs("div",{children:[r.jsx(f,{children:e}),r.jsx(p,{categories:n,categoryType:s})]})},O=(e="")=>{const t=e.toLocaleLowerCase("sv"),s=t.search(/[a-zåäöà áâãòóôõøèéêëðçìÃîïùúûüñšÿýž]/),n="à áâãòóôõøèéêëðçìÃîïùúûüñšÿýž",o="aaaaoooooeeeedciiiiuuuunsyyz",a=n.indexOf(t[s]);return s>=0?a>=0?o[a]:t[s]:"#"},T=d(_)` 18 padding: 0.75em; 19 font-size: 1.2em; 20 border: none; 21 focus: { 22 outline: 'none'; 23 } 24`,B=({onSearchBarChange:e,searchMessage:t})=>r.jsxs("div",{style:{display:"flex",maxWidth:"440px",alignItems:"center",border:"solid lightgray",borderRadius:"4px",borderWidth:"thin",margin:"1.5rem 0"},children:[r.jsx(T,{onChange:e,placeholder:t,style:{width:"100%",margin:"0"}}),r.jsx("div",{style:{padding:"0 0.75em"},children:r.jsx(C,{name:I.SEARCH,style:{fontSize:"3rem",color:u.primary}})})]}),K=({categories:e,categoryType:t,headerMessage:s,searchMessage:n,resultsMessage:o,onSearch:a,metaUrl:x,metaTitle:h,metaDescription:g,metaRequiredFeature:b})=>{const[l,w]=S.useState(""),j=i=>{w(i.target.value),a(i.target.value)};return r.jsxs("div",{style:{margin:"3rem auto",width:"90%"},children:[r.jsx(A,{url:x,title:h,description:g,requiredFeature:b}),r.jsx(y,{children:s}),r.jsx(B,{searchMessage:n,onSearchBarChange:j}),l.length>0&&r.jsx(z,{categories:e,categoryType:t,header:o}),"abcdefghijklmnopqrstuvwxyzåäö#".split("").map(i=>r.jsx(q,{categories:e.filter(c=>O(c[t])===i&&c.freq>(l.length>0?0:1)),letter:i,categoryType:t},i))]})};export{K as C,B as S}; 25//# sourceMappingURL=Categories.CpgZNvXa.bundle.js.map
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.