1import{On as e,g as t}from"./CoKk4mC0.js";import{i as n}from"./B91x8EJ9.js";function r(n){let r=t(()=>e(n)),i=t(()=>new Intl.Collator(`en`,{usage:`search`,...r.value}));return{startsWith:(e,t)=>t.length===0?!0:(e=e.normalize(`NFC`),t=t.normalize(`NFC`),i.value.compare(e.slice(0,t.length),t)===0),endsWith:(e,t)=>t.length===0?!0:(e=e.normalize(`NFC`),t=t.normalize(`NFC`),i.value.compare(e.slice(-t.length),t)===0),contains:(e,t)=>{if(t.length===0)return!0;e=e.normalize(`NFC`),t=t.normalize(`NFC`);let n=0,r=t.length;for(;n+r<=e.length;n++){let a=e.slice(n,n+r);if(i.value.compare(t,a)===0)return!0}return!1}}}function i(){let{contains:e,startsWith:t}=r({sensitivity:`base`});function i(n,r){return e(n,r)?e(r,n)?0:t(n,r)?1:2:null}function a(e,t,r){if(typeof e!=`object`||!e)return i(String(e),t);let a=null;for(let o of r){let r=n(e,o);if(r==null)continue;let s=Array.isArray(r)?r.map(String):[String(r)];for(let e of s){let n=i(e,t);if(n!==null&&(a===null||n<a)&&(a=n),a===0)return 0}}return a}function o(e,t,n){if(!t)return e;let r=[];for(let i of e){let e=a(i,t,n);e!==null&&r.push({item:i,score:e})}return r.sort((e,t)=>e.score-t.score),r.map(({item:e})=>e)}function s(e,t,n){return t?e.map(e=>{let r=[];for(let i of e){if(i==null)continue;if(n.isStructural?.(i)){r.push({item:i,score:-1});continue}let e=a(i,t,n.fields);e!==null&&r.push({item:i,score:e})}return r.sort((e,t)=>e.score-t.score),r.map(({item:e})=>e)}).filter(e=>e.some(e=>!n.isStructural?.(e))):e}return{score:i,scoreItem:a,filter:o,filterGroups:s}}export{r as n,i 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.