1import{it as e}from"./vendor-vue-Bu-KQjoC.js";import{lt as t}from"./index-BE2-dWra.js";function n(n=12){let r=e([]),i=e(!1),a=e(!1),o=e(!1),s=e(!1),c=e(``),l=null,u=0;function d(){l&&(clearTimeout(l),l=null),u+=1,r.value=[],o.value=!1,s.value=!1,c.value=``,i.value=!1,a.value=!1}function f(e,t=200){let n=e.trim();if(!n){d();return}s.value=!0,c.value=n,u+=1,a.value=!1,l&&clearTimeout(l),l=setTimeout(()=>void p(n,!1),t)}async function p(e,s){if(!e){d();return}if(s){if(i.value||a.value||!o.value)return;a.value=!0}else i.value=!0,o.value=!1,r.value=[];let c=++u,l=Math.min(s?r.value.length+n:n,30);try{let n=await t(e,l);if(c!==u)return;if(s){let e=n.slice(r.value.length);e.length>0&&(r.value=[...r.value,...e])}else r.value=n;o.value=n.length===l&&l<30}catch{c===u&&!s&&(r.value=[],o.value=!1)}finally{c===u&&(i.value=!1,a.value=!1)}}function m(){c.value&&p(c.value,!0)}return{suggestions:r,loading:i,loadingMore:a,hasMore:o,hasQuery:s,currentMatch:c,schedule:f,clear:d,loadMore:m}}export{n 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.