1import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{A as t}from"./vendor-CcCeHn9T.js";var n=e(t(),1);function r(e,t=1500){let[r,i]=(0,n.useState)(e),a=(0,n.useRef)(null),o=(0,n.useRef)(e),s=(0,n.useCallback)(e=>{i(e),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(o.current),t)},[t]);return(0,n.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),[r,s]}function i(e=1500){let[t,i]=r(!1,e);return{copied:t,copy:(0,n.useCallback)(e=>{navigator.clipboard?.writeText(e).then(()=>i(!0)).catch(()=>void 0)},[i])}}function a(e=3e4){let[t,r]=(0,n.useState)(()=>Date.now());return(0,n.useEffect)(()=>{let t=()=>r(Date.now()),n=window.setInterval(t,e);return window.addEventListener(`focus`,t),document.addEventListener(`visibilitychange`,t),()=>{window.clearInterval(n),window.removeEventListener(`focus`,t),document.removeEventListener(`visibilitychange`,t)}},[e]),t}function o(e){let t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{function n(n){t.current&&!t.current.contains(n.target)&&e()}return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e]),t}export{r as i,a as n,o as r,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.