1import{c as b,r as n}from"./jsx-runtime-Dt5Dsy05.js";var O=typeof b=="object"&&b&&b.Object===Object&&b,T=typeof self=="object"&&self&&self.Object===Object&&self;O||T||Function("return this")();var y=typeof window<"u"?n.useLayoutEffect:n.useEffect;function m(r,e,o,s){const u=n.useRef(e);y(()=>{u.current=e},[e]),n.useEffect(()=>{const f=window;if(!(f&&f.addEventListener))return;const a=i=>{u.current(i)};return f.addEventListener(r,a,s),()=>{f.removeEventListener(r,a,s)}},[r,o,s])}function x(){const[r,e]=n.useState(null),o=n.useCallback(async s=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(s),e(s),!0}catch(u){return console.warn("Copy failed",u),e(null),!1}},[]);return[r,o]}function z(r,e){const o=n.useRef(r);y(()=>{o.current=r},[r]),n.useEffect(()=>{if(e===null)return;const s=setInterval(()=>{o.current()},e);return()=>{clearInterval(s)}},[e])}function I(r){const e=n.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return y(()=>{e.current=r},[r]),n.useCallback((...o)=>{var s;return(s=e.current)==null?void 0:s.call(e,...o)},[e])}var p=typeof window>"u";function D(r,e,o={}){const{initializeWithValue:s=!0}=o,u=n.useCallback(t=>o.serializer?o.serializer(t):JSON.stringify(t),[o]),f=n.useCallback(t=>{if(o.deserializer)return o.deserializer(t);if(t==="undefined")return;const c=e instanceof Function?e():e;let l;try{l=JSON.parse(t)}catch(v){return console.error("Error parsing JSON:",v),c}return l},[o,e]),a=n.useCallback(()=>{const t=e instanceof Function?e():e;if(p)return t;try{const c=window.localStorage.getItem(r);return c?f(c):t}catch(c){return console.warn(`Error reading localStorage key â${r}â:`,c),t}},[e,r,f]),[i,g]=n.useState(()=>s?a():e instanceof Function?e():e),d=I(t=>{p&&console.warn(`Tried setting localStorage key â${r}â even though environment is not a client`);try{const c=t instanceof Function?t(a()):t;window.localStorage.setItem(r,u(c)),g(c),window.dispatchEvent(new StorageEvent("local-storage",{key:r}))}catch(c){console.warn(`Error setting localStorage key â${r}â:`,c)}}),S=I(()=>{p&&console.warn(`Tried removing localStorage key â${r}â even though environment is not a client`);const t=e instanceof Function?e():e;window.localStorage.removeItem(r),g(t),window.dispatchEvent(new StorageEvent("local-storage",{key:r}))});n.useEffect(()=>{g(a())},[r]);const w=n.useCallback(t=>{t.key&&t.key!==r||g(a())},[r,a]);return m("storage",w),m("local-storage",w),[i,d,S]}function J({threshold:r=0,root:e=null,rootMargin:o="0%",freezeOnceVisible:s=!1,initialIsIntersecting:u=!1,onChange:f}={}){var a;const[i,g]=n.useState(null),[d,S]=n.useState(()=>({isIntersecting:u,entry:void 0})),w=n.useRef();w.current=f;const t=((a=d.entry)==null?void 0:a.isIntersecting)&&s;n.useEffect(()=>{if(!i||!("IntersectionObserver"in window)||t)return;let v;const E=new IntersectionObserver(R=>{const j=Array.isArray(E.thresholds)?E.thresholds:[E.thresholds];R.forEach(h=>{const C=h.isIntersecting&&j.some(L=>h.intersectionRatio>=L);S({isIntersecting:C,entry:h}),w.current&&w.current(C,h),C&&s&&v&&(v(),v=void 0)})},{threshold:r,root:e,rootMargin:o});return E.observe(i),()=>{E.disconnect()}},[i,JSON.stringify(r),e,o,t,s]);const c=n.useRef(null);n.useEffect(()=>{var v;!i&&((v=d.entry)!=null&&v.target)&&!s&&!t&&c.current!==d.entry.target&&(c.current=d.entry.target,S({isIntersecting:u,entry:void 0}))},[i,d.entry,s,t,u]);const l=[g,!!d.isIntersecting,d.entry];return l.ref=l[0],l.isIntersecting=l[1],l.entry=l[2],l}export{D as a,x as b,J as c,z as u};
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.