1import{At as g,Bt as he,Dn as R,En as pe,Ht as ee,Jt as ge,Nt as te,Ot as _e,Qt as S,St as ae,Tn as z,Tt as xe,Ut as fe,X as Q,an as a,at as j,dt as ce,f as ke,ft as W,mt as ne,nt as b,ot as f,p as we,rt as l,zt as se}from"./BId1R4El.js";import{X as Ce,_t as Z,mt as ye,st as Te,t as oe}from"./Cbbb9ky4.js";import{t as le}from"./B5Ht4kbL.js";import"./CmHwayYR.js";import{c as Le,d as Y,n as Me,t as re}from"./BFygqPSS.js";import{n as $e,r as qe}from"./DO6c05g3.js";import{t as Ae}from"./CYxwe3mU.js";import{s as Oe}from"./C1Zl1HzX.js";import{n as be,t as de}from"./DpwA4pFy.js";function ve(e){return{product:e.productsLabel,kit:e.kitsLabel,category:e.categoriesLabel,tag:e.tagsLabel,content:e.pagesLabel,helper:e.helperLabel,calc:e.calculatorsLabel,default:e.genericGroupLabel}}function St(e){if(e.type==="content"){const c=e.contentKind??"page";return c==="manual"?"content-manual":c==="protocol"?"content-protocol":"content-page"}return e.type}function xt(e,c){if(e.type==="content"){const d=e.contentKind??"page";return d==="manual"?c.manualLabel:d==="protocol"?c.protocolLabel:c.webPageLabel}const L=ve(c);return L[e.type]||L.default}var Ee=["aria-activedescendant"],Ne={key:0,class:"search-dropdown__state"},Re={key:0,class:"search-dropdown__state",role:"status","aria-live":"polite"},Pe={key:1,class:"search-dropdown__list"},Ie=["id","aria-selected","onMouseenter","onMousedown"],Be={class:"search-dropdown__title"},De=["innerHTML"],Fe=ne({__name:"SearchDropdown",props:{groups:{},visible:{type:Boolean},highlightedIndex:{},activeOptionId:{},loading:{type:Boolean},hasSynonymFilter:{type:Boolean}},emits:["hover","select","view-all"],setup(e,{emit:c}){const L=e,d=c,x={product:"#86c542",kit:"#00bcd4",category:"#2196f3",tag:"#3f51b5",content:"#f44336",helper:"#f59e0b",calc:"#9c27b0"},C=o=>x[o]||"#64748b",y=re(),{getCurrentTranslations:M}=Y(y),v=b(()=>M.value?.searchUi??de),h=b(()=>{const o=[];let u=0;return L.groups.forEach(_=>{o.push(u),u+=_.items.length}),o}),q=(o,u)=>(h.value[o]||0)+u,m=(o,u)=>`search-option-${q(o,u)}`,p=o=>{d("hover",o)},D=o=>{d("select",o)},O=o=>{const u=ve(v.value);return u[o]||u.default};return(o,u)=>e.visible?(g(),f("div",{key:0,class:"search-dropdown",role:"listbox","aria-activedescendant":e.activeOptionId},[e.loading?(g(),f("div",Ne,[u[1]||(u[1]=l("span",{class:"search-dropdown__spinner","aria-hidden":"true"},null,-1)),l("span",null,R(v.value.loading),1)])):(g(),f(Q,{key:1},[e.groups.length?(g(),f("ul",Pe,[(g(!0),f(Q,null,te(e.groups,(_,E)=>(g(),f(Q,{key:_.type},[l("li",{class:"search-dropdown__group-label",style:pe({color:C(_.type)})},[l("span",{class:"search-dropdown__group-dot",style:pe({backgroundColor:C(_.type)}),"aria-hidden":"true"},null,4),ce(" "+R(O(_.type)),1)],4),(g(!0),f(Q,null,te(_.items,(k,N)=>(g(),f("li",{key:k.id,id:m(E,N),class:z(["search-dropdown__option",{"search-dropdown__option--active":e.highlightedIndex===q(E,N)}]),role:"option","aria-selected":e.highlightedIndex===q(E,N),onMouseenter:F=>p(q(E,N)),onMousedown:Z(F=>D(q(E,N)),["prevent"])},[l("span",Be,R(k.title),1),k.snippet?(g(),f("span",{key:0,class:"search-dropdown__snippet",innerHTML:k.snippet},null,8,De)):j("",!0)],42,Ie))),128))],64))),128))])):(g(),f("div",Re,[l("span",null,R(v.value.noSuggestions),1)])),e.groups.length?(g(),f("button",{key:2,type:"button",class:"search-dropdown__footer",onMousedown:u[0]||(u[0]=Z(_=>d("view-all"),["prevent"]))},[l("span",null,R(v.value.viewAllResults||"View all results"),1),u[2]||(u[2]=l("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[l("path",{d:"M5 12h14M13 6l6 6-6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],32)):j("",!0)],64))],8,Ee)):j("",!0)}}),me=oe(Fe,[["__scopeId","data-v-966a9613"]]),Ue=250,He=()=>{const e=we(),c=ke(),L=re(),{getCurrentLocale:d}=Y(L),x=S(""),C=S([]),y=S(!1),M=S(!1),v=S(!1),h=S(-1),q=S(!1),m=S(!1),p=b(()=>C.value.flatMap(i=>i.items)),D=b(()=>h.value>=0?`search-option-${h.value}`:void 0);let O=null,o=null;const u=()=>{C.value=[],h.value=-1,v.value=!1},_=i=>{document.documentElement.classList.toggle("search-overlay-open",i)},E=()=>{o?.abort(),o=null,M.value=!1},k=()=>{y.value=!1,h.value=-1},N=async()=>{u(),y.value=!1,M.value=!1},F=()=>{O&&clearTimeout(O),O=setTimeout(()=>{N()},Ue)},H=i=>
1{x.value=i,F()},I=i=>{if(i){if(E(),m.value?P():k(),!i.url||i.url==="#"){e.push({path:"/search",query:{q:x.value.trim()}});return}e.push(i.url)}},B=async()=>{const i=x.value.trim();i&&(m.value?P():k(),await e.push({path:"/search",query:{q:i}}))},s=async()=>{await B()},A=async()=>{if(x.value.trim()){if(h.value>=0&&p.value[h.value]){const i=p.value[h.value];if(i.url&&i.url!=="#"){I(i);return}}await B()}},V=i=>{if(!(!y.value&&i.key!=="Enter"))switch(i.key){case"ArrowDown":if(i.preventDefault(),!p.value.length)return;h.value=(h.value+1+p.value.length)%p.value.length;break;case"ArrowUp":if(i.preventDefault(),!p.value.length)return;h.value=(h.value-1+p.value.length)%p.value.length;break;case"Home":i.preventDefault(),h.value=p.value.length?0:-1;break;case"End":i.preventDefault(),h.value=p.value.length?p.value.length-1:-1;break;case"Enter":i.preventDefault(),A();break;case"Escape":i.preventDefault(),y.value?k():m.value&&P()}},K=()=>{q.value=!0,p.value.length>0&&(y.value=!0)},$=()=>{q.value=!1,ae(()=>{q.value||k()})},t=async()=>{m.value=!0,await ae(),_(!0)},P=()=>{m.value=!1,_(!1),k()},n=i=>{h.value=i},X=()=>{x.value="",E(),u(),k()},U=i=>{const r=p.value[i];r&&I(r)};return se(()=>c.fullPath,()=>{if(m.value){P();return}k()}),xe(()=>{O&&clearTimeout(O),o?.abort(),o=null,_(!1)}),{query:x,onInput:H,suggestions:C,isDropdownOpen:y,isLoading:M,highlightedIndex:h,activeOptionId:D,flatSuggestions:p,submitSearch:s,handleKeydown:V,onSuggestionHover:n,onSuggestionClick:U,onFocusIn:K,onFocusOut:$,closeDropdown:k,openMobileOverlay:t,closeMobileOverlay:P,mobileOverlay:m,clearQuery:X,hasSynonymFilter:v}},Ve=["aria-label"],Ke=["aria-expanded","aria-controls","aria-activedescendant"],je=["id","placeholder","maxlength"],Ge=["aria-label"],ze={class:"search-box_sp__shortcut-badge"},Qe=["aria-label"],Xe={class:"search-overlay__header"},Je=["aria-expanded","aria-controls","aria-activedescendant"],We=["placeholder","maxlength"],Ze=["aria-label"],Ye=ne({__name:"SearchInput",props:{initialQuery:{default:""},variant:{default:"default"},inputId:{default:"global-search-input"},suggestionsId:{default:"global-search-suggestions"}},setup(e,{expose:c}){const L=e,{query:d,suggestions:x,isDropdownOpen:C,isLoading:y,highlightedIndex:M,activeOptionId:v,hasSynonymFilter:h,onInput:q,handleKeydown:m,onSuggestionHover:p,onSuggestionClick:D,onFocusIn:O,onFocusOut:o,submitSearch:u,clearQuery:_,openMobileOverlay:E,closeMobileOverlay:k,mobileOverlay:N}=He(),F=re(),{getCurrentTranslations:H}=Y(F),I=S(null),B=S(null),s=b(()=>H.value?.searchUi??de),A=b(()=>s.value.placeholder),V=S(!1),K=b(()=>V.value?"âK":"Ctrl K");return he(()=>{N.value&&ae(()=>{B.value?.focus()})}),he(()=>{N.value||ae(()=>{I.value?.blur()})}),se(()=>L.initialQuery,$=>{$!==void 0&&(d.value=$)},{immediate:!0}),_e(()=>{V.value=navigator.platform.toUpperCase().indexOf("MAC")>=0}),c({openMobileOverlay:E,closeMobileOverlay:k}),($,t)=>{const P=qe;return g(),f("div",{class:z(["search-box_sp",{"search-box_sp--page":e.variant==="page","search-box_sp--header":e.variant==="header"}])},[l("button",{class:"search-box_sp__trigger",type:"button",onClick:t[0]||(t[0]=(...n)=>a(E)&&a(E)(...n)),"aria-label":s.value.openLabel},[...t[18]||(t[18]=[l("svg",{class:"search-box_sp__trigger-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[l("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor","stroke-width":"2"}),l("path",{d:"m20 20-4.35-4.35",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,Ve),l("form",{class:"search-box_sp__form",role:"search","aria-label":"Site search",onSubmit:t[8]||(t[8]=Z((...n)=>a(u)&&a(u)(...n),["prevent"]))},[l("div",{class:"search-box_sp__field",role:"combobox","aria-expanded":a(C),"aria-haspopup":"listbox","aria-controls":e.suggestionsId,"aria-activedescendant":a(v)},[t[21]||(t[21]=l("svg",{class:"search-box_sp__icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[l("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor","stroke-width":"2"}),l("path",{d:"m20 20-4.35-4.35",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),fe(l("input",{id:e.inputId,ref_key:"inputEl",ref:I,"onUpdate:modelValue":t[1]||(t[1]=n=>ge(d)?d.value=n:null),type:"search",placeholder:A.value,class:"search-box_sp__input",maxlength:a(90),autocomplete:"off",autocapitalize:"none",spellcheck:"false",onInput:t[2]||(t[2]=n=>a(q)(n.target.value)),onKeydown:t[3]||(t[3]=(...n)=>a(m)&&a(m)(...n)),onFocus:t[4]||(t[4]=(...n)=>a(O)&&a(O)(...n)),onBlur:t[5]||(t[5]=(...n)=>a(o)&&a(o)(...n))}
1,null,40,je),[[ye,a(d)]]),a(d)?(g(),f("button",{key:0,type:"button",class:"search-box_sp__clear","aria-label":s.value.clearLabel,onClick:t[6]||(t[6]=(...n)=>a(_)&&a(_)(...n))},[...t[19]||(t[19]=[l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},[l("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,Ge)):j("",!0),W(P,null,{fallback:ee(()=>[...t[20]||(t[20]=[l("kbd",{class:"search-box_sp__shortcut-badge","aria-hidden":"true"},"Ctrl K",-1)])]),default:ee(()=>[l("kbd",ze,R(K.value),1)]),_:1})],8,Ke),l("button",{type:"submit",class:"search-box_sp__submit","aria-label":s.value.submitLabel,onClick:t[7]||(t[7]=(...n)=>a(u)&&a(u)(...n))},[...t[22]||(t[22]=[l("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true"},[l("path",{d:"M4 10h9M11 6l4 4-4 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,Qe),W(me,{id:e.suggestionsId,groups:a(x),visible:a(C),"highlighted-index":a(M),"active-option-id":a(v),loading:a(y),"has-synonym-filter":a(h),onHover:a(p),onSelect:a(D),onViewAll:a(u)},null,8,["id","groups","visible","highlighted-index","active-option-id","loading","has-synonym-filter","onHover","onSelect","onViewAll"])],32),W(Te,{name:"search-overlay"},{default:ee(()=>[a(N)?(g(),f("div",{key:0,class:"search-overlay",role:"dialog","aria-modal":"true",onClick:t[17]||(t[17]=Z((...n)=>a(k)&&a(k)(...n),["self"]))},[l("div",Xe,[l("form",{class:"search-overlay__form",onSubmit:t[16]||(t[16]=Z((...n)=>a(u)&&a(u)(...n),["prevent"]))},[l("div",{class:"search-overlay__field",role:"combobox","aria-expanded":a(C),"aria-haspopup":"listbox","aria-controls":e.suggestionsId,"aria-activedescendant":a(v)},[t[24]||(t[24]=l("svg",{class:"search-overlay__icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[l("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor","stroke-width":"2"}),l("path",{d:"m20 20-4.35-4.35",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),fe(l("input",{ref_key:"mobileInputEl",ref:B,"onUpdate:modelValue":t[9]||(t[9]=n=>ge(d)?d.value=n:null),type:"search",placeholder:A.value,maxlength:a(90),autocomplete:"off",autocapitalize:"none",spellcheck:"false",class:"search-overlay__input",onInput:t[10]||(t[10]=n=>a(q)(n.target.value)),onKeydown:t[11]||(t[11]=(...n)=>a(m)&&a(m)(...n)),onFocus:t[12]||(t[12]=(...n)=>a(O)&&a(O)(...n)),onBlur:t[13]||(t[13]=(...n)=>a(o)&&a(o)(...n))},null,40,We),[[ye,a(d)]]),a(d)?(g(),f("button",{key:0,type:"button",class:"search-overlay__clear","aria-label":s.value.clearLabel,onClick:t[14]||(t[14]=(...n)=>a(_)&&a(_)(...n))},[...t[23]||(t[23]=[l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},[l("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,Ze)):j("",!0)],8,Je),l("button",{type:"submit",class:"search-overlay__submit",onClick:t[15]||(t[15]=(...n)=>a(u)&&a(u)(...n))},R(s.value.submitAction),1)],32)]),W(me,{id:e.suggestionsId,groups:a(x),visible:a(C),"highlighted-index":a(M),"active-option-id":a(v),loading:a(y),"has-synonym-filter":a(h),onHover:a(p),onSelect:a(D),onViewAll:a(u)},null,8,["id","groups","visible","highlighted-index","active-option-id","loading","has-synonym-filter","onHover","onSelect","onViewAll"])])):j("",!0)]),_:1})],2)}}}),Ct=oe(Ye,[["__scopeId","data-v-4baba8cb"]]),et={class:"search-skeleton","aria-hidden":"true"},tt={key:0,class:"search-skeleton__chips"},at={class:"search-skeleton__list"},st=ne({__name:"SearchPageSkeleton",props:{chipCount:{default:4},resultRows:{default:5}},setup(e){return(c,L)=>(g(),f("div",et,[e.chipCount?(g(),f("div",tt,[(g(!0),f(Q,null,te(e.chipCount,d=>(g(),f("span",{key:`c-${d}`,class:"search-skeleton__chip"}))),128))])):j("",!0),l("div",at,[(g(!0),f(Q,null,te(e.resultRows,d=>(g(),f("div",{key:`r-${d}`,class:"search-skeleton__hit"},[...L[0]||(L[0]=[l("span",{class:"search-skeleton__block search-skeleton__block--tag"},null,-1),l("span",{class:"search-skeleton__block search-skeleton__block--hit-title"},null,-1),l("span",{class:"search-skeleton__block search-skeleton__line"},null,-1),l("span",{class:"search-skeleton__block search-skeleton__line search-skeleton__line--short"},null,-1)])]))),128))])]))}}),Tt=oe(st,[["__scopeId","data-v-9850a94a"]]),lt={key:0,class:"search-hit__description"},nt=["innerHTML"],ot={key:1,class:"search-hit__snippet"},rt=["innerHTML"],it={key:2,class:"search-hit__description"},ut={key:3,class:"search-hit__catalog"},ct={class:"search-hit__catalog-label"},dt=ne({__name:"SearchResultItem",props:{result:{},variant:{},typeLabel:{},catalogNoLabel:{}},setup(e){return(c,L)=>{const d=Me;return g(),f("li",{class:z(["search-hit",`search-hit--${e.variant}`])},[W(d,{to:e.result.url,class:"search-hit__title"},{default:ee(()=>
1[ce(R(e.result.title),1)]),_:1},8,["to"]),e.result.description?(g(),f("p",lt,[l("span",{class:z(["search-hit__tag",`search-hit__tag--${e.variant}`])},R(e.typeLabel),3),l("span",{innerHTML:e.result.description},null,8,nt)])):e.result.snippet?(g(),f("p",ot,[l("span",{class:z(["search-hit__tag",`search-hit__tag--${e.variant}`])},R(e.typeLabel),3),l("span",{innerHTML:e.result.snippet},null,8,rt)])):(g(),f("p",it,[l("span",{class:z(["search-hit__tag",`search-hit__tag--${e.variant}`])},R(e.typeLabel),3)])),e.result.items&&e.result.items.length?(g(),f("p",ut,[l("span",ct,R(e.catalogNoLabel),1),ce(" "+R(e.result.items.join(", ")),1)])):j("",!0)],2)}}}),Lt=oe(dt,[["__scopeId","data-v-fa5fcfb7"]]);function vt(e,c){return new Intl.NumberFormat(c).format(e)}function Mt(){const e=ke(),c=we(),L=re(),d=Ae(),{getCurrentLocale:x,getCurrentTranslations:C}=Y(L),{currentRegion:y}=Y(d),M=b(()=>String(e.query.q||"").trim()),v=b(()=>M.value.slice(0,90)),h=b(()=>Math.max(1,Number(e.query.page||"1"))),q=()=>{M.value.length>90&&c.replace({path:e.path,query:{...e.query,q:v.value}})};_e(q),se(M,q);const m=b(()=>{const r=e.query.type;return r?Array.isArray(r)?new Set(r.map(w=>String(w))):new Set(String(r).split(",").map(w=>w.trim()).filter(Boolean)):new Set}),p=b(()=>C.value?.searchUi??de),D=b(()=>ve(p.value));let O="";Ce(()=>{const r=p.value.pageTitle,w=v.value?` â ${v.value}`:"",T=typeof window<"u"?window.location.origin:O;return{title:`${r}${w}`,titleTemplate:Oe.titleTemplate,meta:[{name:"description",content:p.value.pageDescription.replace("{query}",v.value||"")},{name:"robots",content:"noindex, follow"}],link:[{rel:"canonical",href:`${T}/search${v.value?`?q=${encodeURIComponent(v.value)}`:""}`}]}});const{data:o,pending:u,error:_,refresh:E}=$e("search-results",async(r,{signal:w})=>{if(!v.value)return{...be,page:h.value};const T={query:v.value,page:h.value,pageSize:10,locale:x.value||"en",mode:"results",filters:{types:Array.from(m.value)}};try{return await le("/api/search",{method:"POST",body:T,signal:w,timeout:8e3})}catch(J){if(w.aborted)throw J;return{...be,query:v.value,page:h.value,searchUnavailable:!0}}},{watch:[()=>e.query.q,()=>e.query.page,()=>e.query.type,()=>y.value?.id,()=>d.getCurrentCountryId,()=>x.value],server:!1,lazy:!0}),k=b(()=>o.value?.results||[]),N=b(()=>!!o.value?.searchUnavailable),F=b(()=>o.value?.facets?.types||[]),H=b(()=>o.value?.synonymsApplied?p.value.synonymNotice:""),I=10,B=b(()=>(o.value?.excluded||[]).filter(r=>r.type==="product"||r.type==="kit")),s=S(1);se(()=>[v.value,B.value.length],()=>{s.value=1});const A=b(()=>Math.max(1,Math.ceil(B.value.length/I))),V=b(()=>{const r=(s.value-1)*I;return B.value.slice(r,r+I)}),K=r=>{s.value=Math.min(Math.max(1,r),A.value)},$=b(()=>m.value.size>0),t=b(()=>{const r=o.value?.totalPages||0,w=h.value;if(r<=1)return[1];const T=[],J=(G,Se)=>{for(let ie=G;ie<=Se;ie++)T.push(ie)};return T.push(1),w>3&&T.push("â¦"),J(Math.max(2,w-1),Math.min(r-1,w+1)),w<r-2&&T.push("â¦"),r>1&&T.push(r),T}),P=()=>{window.scrollTo({top:0,behavior:"smooth"})};return{route:e,t:p,currentQuery:v,currentPage:h,activeTypeFilter:m,facetLabels:D,data:o,pending:u,error:_,refresh:E,results:k,isSearchUnavailable:N,typeFacets:F,synonymNotice:H,hasActiveFilters:$,visiblePages:t,goToPage:r=>{const w=Math.max(1,r);c.push({path:e.path,query:{...e.query,page:w!==1?String(w):void 0}}),P()},toggleTypeFilter:r=>{const w=Array.isArray(r)?r:[r],T=new Set(m.value),J=w.every(G=>T.has(G));for(const G of w)J?T.delete(G):T.add(G);c.push({path:e.path,query:{...e.query,page:void 0,type:T.size?Array.from(T).join(","):void 0}})},resetFilters:()=>{c.push({path:e.path,query:{...e.query,page:void 0,type:void 0}})},formatNumber:r=>vt(r,x.value||"en"),excludedVisible:V,excludedPage:s,excludedTotalPages:A,goToExcludedPage:K}}var ht=6e5,ue=new Map,$t=Le("sidebar",()=>{const e=S(!1),c=S(new Set),L=S([]),d=S(""),x=S([]),C=S({}),y=S(""),M=S(null),v=S(!1),h=()=>{e.value=!0},q=()=>{e.value=!1},m=()=>{e.value=!e.value},p=s=>{s==null||s<=0||(c.value.has(s)?c.value.delete(s):c.value.add(s))},D=s=>{s!=null&&s>0&&c.value.add(s)},O=s=>{s!=null&&s>0&&c.value.delete(s)},o=()=>{c.value.clear()},u=s=>{L.value=s??[]},_=s=>{x.value=s??[]},E=s=>{v.value=s},k=(s,A)=>`${s}:${A||1}`,N=(s,A)=>{L.value=A.categories,d.value=A.catalogRootTitle,x.value=A.tagMenuGroups,y.value=s},F=s=>!!(s&&Date.now()-s.fetchedAt<ht),H=async({locale:s,regionId:A,force:V=!1,background:K=!1}
1)=>{const $=k(s,A),t=C.value[$];if(t?N($,t):(!K||!y.value)&&(y.value=$),!V&&F(t))return;const P=ue.get($);if(P){await P;return}(!K||!t)&&(v.value=!0);const n=(async()=>{try{const X=await Promise.allSettled([le("/api/sidebar-categories",{method:"POST",headers:{"x-locale":s,"x-region-id":String(A)},body:{locale:s,regionId:A}}),le("/api/navigation/tag-menu",{headers:{"x-locale":s}})]),U=X[0],i=X[1],r={categories:U.status==="fulfilled"?U.value?.categories||[]:t?.categories||[],catalogRootTitle:U.status==="fulfilled"?U.value?.catalogRootTitle||"":t?.catalogRootTitle||"",tagMenuGroups:i.status==="fulfilled"?i.value?.groups||[]:t?.tagMenuGroups||[],fetchedAt:Date.now()};C.value={...C.value,[$]:r},(y.value===$||t)&&N($,r),M.value=U.status==="rejected"&&i.status==="rejected"?[U.reason,i.reason]:null}finally{ue.delete($),(y.value===$||!y.value)&&(v.value=!1)}})();ue.set($,n),await n},I=s=>{H({...s,background:!0})},B=s=>s==null||s<=0?!1:c.value.has(s);return{isOpen:e,expandedCategories:b(()=>Array.from(c.value)),categories:L,catalogRootTitle:d,tagMenuGroups:x,currentNavigationKey:y,navigationError:M,loading:v,openSidebar:h,closeSidebar:q,toggleSidebar:m,toggleCategory:p,expandCategory:D,collapseCategory:O,collapseAll:o,setCategories:u,setTagMenuGroups:_,setLoading:E,loadNavigation:H,prefetchNavigation:I,isCategoryExpanded:B}});export{Ct as a,xt as c,Tt as i,St as l,Mt as n,He as o,Lt as r,me as s,$t as t};
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.