1import{N as R,O as k,D as v,F as g,Q as F,A as N,R as P,_ as C,o as Q,f as h,j as y,k as n,l as _,S as b,m as c,s as B,K as D,P as L,n as U,T as x,i as m,q as f,t as p}from"./DCocS28a.js";import{_ as j}from"./DObm1b7W.js";import"./Cxpw74YO.js";import"./BufK8BYh.js";const z=()=>{const q=R();k();const s=v(""),r=v([]),a=v(!1),t=v(!1),i=async e=>{if(!e.trim()){r.value=[],t.value=!1;return}a.value=!0,t.value=!0;try{const o=await N().fetch(P,{searchTerm:e.trim()});r.value=o||[]}catch(l){console.error("Search error:",l),r.value=[]}finally{a.value=!1}},u=()=>{s.value="",r.value=[],t.value=!1},d=()=>{const e=q.query.q;e&&e.trim()?(s.value=e.trim(),i(e.trim())):u()};return g(()=>q.query.q,e=>{e!==s.value&&d()},{immediate:!0}),F(s,e=>{!e||e.trim()===""?u():i(e)},{debounce:300,maxWait:1e3}),{searchTerm:s,searchResults:r,isLoading:a,hasSearched:t,performSearch:i,clearSearch:u,updateSearchFromUrl:d}},A={class:"search"},E={class:"container"},I={class:"search-header"},K={class:"search-results"},M={key:0,class:"loading"},O={key:1,class:"no-results"},T={key:2,class:"results-section"},W={key:3,class:"search-prompt"},G={__name:"search",setup(q){const s=R(),r=k(),{searchTerm:a,searchResults:t,isLoading:i,hasSearched:u,updateSearchFromUrl:d}=z();return Q(()=>{d()}),g(()=>s.query.q,e=>{e!==a.value&&d()}),g(a,e=>{const l=s.query.q;if(e!==l)if(e&&e.trim())r.replace({query:{...s.query,q:e.trim()}});else{const{q:o,...S}=s.query;r.replace({query:S})}}),(e,l)=>{const o=U,S=x,V=j;return m(),h("div",{class:D((e._.provides[L]||e.$route).name)},[y("section",A,[y("div",E,[y("div",I,[n(o,{tag:"h1",variant:"heading2",class:"search-title"},{default:_(()=>[f(p(e.$t("search.title")),1)]),_:1}),n(S,{modelValue:c(a),"onUpdate:modelValue":l[0]||(l[0]=$=>b(a)?a.value=$:null),class:"search-input"},null,8,["modelValue"])]),y("div",K,[c(i)?(m(),h("div",M,[n(o,null,{default:_(()=>[f(p(e.$t("search.loading")),1)]),_:1})])):c(u)&&c(t).length===0?(m(),h("div",O,[n(o,null,{default:_(()=>[f(p(e.$t("search.noResults")),1)]),_:1})])):c(t).length>0?(m(),h("div",T,[n(o,{class:"results-count"},{default:_(()=>[f(p(e.$t("search.resultsCount",{count:c(t).length})),1)]),_:1}),n(V,{data:c(t)},null,8,["data"])])):c(u)?B("",!0):(m(),h("div",W,[n(o,null,{default:_(()=>[f(p(e.$t("search.prompt")),1)]),_:1})]))])])])],2)}}},Z=C(G,[["__scopeId","data-v-107a24da"]]);export{Z as default};
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.