1import{r as e}from"./jsx-runtime-DGeXAQPT.js";import{t}from"./react-BhjfaixL.js";var n=e(t(),1),r=`so:session-read`,i=300,a=`so:session-read-change`;function o(){if(typeof window>`u`)return[];try{let e=window.sessionStorage.getItem(r),t=e?JSON.parse(e):null;return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function s(e){try{window.sessionStorage.setItem(r,JSON.stringify(e.slice(0,i)))}catch{}window.dispatchEvent(new Event(a))}function c(e){if(typeof window>`u`||!e)return;let t=o();t[0]!==e&&s([e,...t.filter(t=>t!==e)])}function l(){let[e,t]=(0,n.useState)(()=>new Set);return(0,n.useEffect)(()=>{let e=()=>t(new Set(o()));return e(),window.addEventListener(a,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(a,e),window.removeEventListener(`storage`,e)}},[]),e}function u(e){(0,n.useEffect)(()=>{e&&c(e)},[e])}function d(e,t){if(t.size===0)return e;let n=[],r=[];for(let i of e)(t.has(i.slug)?r:n).push(i);return[...n,...r]}function f(e,t){return t.size===0?e.length:e.reduce((e,n)=>t.has(n.slug)?e:e+1,0)}export{l as i,d as n,u as r,f 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.