PageSourceSearch

https://www.bilia.no/_nuxt/FaqSearchBarBlock.BjQ0KHMw.js

js bilia.no collected 2026-09-25 06:48:16 UTC 4,286 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./entry.BwY72Qvg.css","./Icon.DvATP36s.css","./AutoSuggest2.6CZvAE6w.css"])))=>i.map(i=>d[i]);
2import{k as E,D as P,a as M,m as U,e as z,u as F,y as O,l as G,f as j,p,I as k,K as l,s as d,r as n,t as r,X as x,L as h,q as _,M as y,v as C,h as H,R as $,a5 as W,b as J,B as R,_ as T,N as K}from"./entry.CJZFOGA5.js";import{_ as X}from"./DelayHydration.CNzQ_6-p.js";import B from"./Button.oXCyFRhS.js";import Q from"./LogoSVG.B87pOBkc.js";import Y from"./CallToAction.Dingv8xA.js";import"./CallToAction.DN6zkjnP.js";import"./LinkHelper.CylDFz9W.js";import"./Modal.57znoi80.js";import"./Link.CQeTiuDy.js";import"./pageContent._GybTacs.js";import"./Loading.C6X970oD.js";var I=(a=>(a.MEDIUM="",a.LARGE="large",a))(I||{});const Z=R(()=>T(()=>import("./Icon.PKxwNF9q.js"),__vite__mapDeps([0,1]),import.meta.url).then(a=>a.default||a)),ee=R(()=>T(()=>import("./AutoSuggest2.BgVnckdT.js"),__vite__mapDeps([0,2]),import.meta.url).then(a=>a.default||a)),te={class:"faq-search-bar-block-wrapper"},ae={class:"search-container"},se={class:"suggestion-item"},re=["innerHTML"],oe={key:0,class:"no-results-dropdown"},ne={class:"no-results-text-wrapper"},ce={class:"no-results-title"},ue={class:"no-results-description"},ie=E({__name:"FaqSearchBarBlock",props:{data:{type:Object,required:!0}},setup(a){const{systemText:c}=P(),g=M(),S=U(),m=z(),L=F(),q=J(),t=O({search:{query:m.query.faqquery||"",options:[]}});G(()=>m.query.faqquery,s=>{t.value.search.query=s||""});const w=H(()=>t.value.search.query.length>1&&t.value.search.options.length<1);let f;const v=s=>{if(t.value.search.query=s,clearTimeout(f),s.length<=1){t.value.search.options=[];return}f=setTimeout(async()=>{try{t.value.search.options=await V(s)}catch{t.value.search.options=[]}},400)},N=s=>{if(!s)return;const[e,u]=s.faq.route.split("?"),i=u?Object.fromEntries(new URLSearchParams(u).entries()):{};S.push({path:e,query:i})},b=()=>{const s=g.defaultFaqSearchUrl||m.path;S.push({path:s,query:{...m.query,faqquery:t.value.search.query}})},V=async s=>{try{const e={query:s.toLowerCase(),indexPrefix:q.public.indexPrefix,siteId:q.public.siteId,sessionId:"",searchId:$.uuid(),tireDimension:"",languageCode:g.languageCode,numberOfVariations:1,registrationNumber:void 0,hasRegistrationNumber:!1,enableFaqSearch:!0,enableBranchSearch:!1,enableCarModelSearch:!1,enableCarSearch:!1,enableContentSearch:!1,enableProductSearch:!1,enableTireSearch:!1,enableWorkshopServiceSearch:!1};return(await L.$siteSearchRepository.fetchSiteSearch(e)).siteSearch?.faq?.faqs?.map(i=>({displayValue:i.question,valid:!0,faq:i}))??[]}catch(e){return W.track({e}),[]}},A=()=>{t.value.search.query="",t.value.search.options=[]};return j(()=>{clearTimeout(f)}),(s,e)=>{const u=Z,i=ee,D=X;return p(),k("div",te,[l("div",ae,[d(D,null,{default:n(()=>[d(i,{id:"faq-search-autosuggest",ref:"autoSuggestRef",value:r(t).search.query,"onUpdate:value":e[1]||(e[1]=o=>r(t).search.query=o),class:"auto-suggest-wrapper shade-layer-two",label:r(c)("SearchLabel"),placeholder:a.data.placeholderText||r(c)("SearchPlaceholder"),items:r(t).search.options,"clear-input-on-select":!0,"max-number-of-suggestions":10,onInput:e[2]||(e[2]=o=>v(o)),onSelect:e[3]||(e[3]=o=>N(o)),onClear:e[4]||(e[4]=o=>v(""))},{"left-icon":n(()=>[d(u,{name:"search"})]),"right-icon":n(()=>[r(t).search.query?(p(),_(B,{key:0,variant:"ghost",onClick:e[0]||(e[0]=y(o=>A(),["stop"]))},{default:n(()=>[d(u,{name:"close"})]),_:1})):C("",!0)]),"list-header":n(()=>[x(h(r(c)("SearchSuggestionsLabel")),1)]),item:n(o=>[l("div",se,[l("span",{innerHTML:o.markWord(o.item.displayValue)},null,8,re)])]),_:1},8,["value","label","placeholder","items"])]),_:1}),r(w)?(p(),k("div",oe,[d(Q,{name:"empty-states/default"}),l("div",ne,[l("h3",ce,h(r(c)("NoSearchResults"))+'"'+h(r(t).search.query)+'"',1),l("p",ue,h(r(c)("NoSearchResultsSuggestion")),1)])])):C("",!0)]),a.data.button?(p(),_(Y,{key:0,data:a.data.button,size:r(I).LARGE,onClick:y(b,["prevent"])},null,8,["data","size"])):(p(),_(B,{key:1,size:"large",onClick:y(b,["prevent"])},{default:n(()=>[x(h(r(c)("SearchPlaceholder")),1)]),_:1}))])}}}),ve=Object.assign(K(ie,[["__scopeId","data-v-6a00ffb3"]]),{__name:"BlocksFaqSearchBarBlock"});export{ve as default};
3//# sourceMappingURL=FaqSearchBarBlock.BjQ0KHMw.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.