1import{r as t}from"./mod-1bc04b52-LZlvPb-j.js";import{u as l}from"./mod-b79606fb-vtMp_OjH.js";import{u as E}from"./mod-e4025d56-C3MmkLxk.js";import{i as T}from"./mod-edbd804e-sxU84gG9.js";function D({threshold:n=.5,delayMs:f=100,onItemViewable:e,enabled:i=!0}={}){const r=t.useRef(null),u=t.useRef(new Map),a=t.useRef(new Set),g=t.useRef(e);t.useEffect(()=>{g.current=e},[e]);const d=t.useCallback(c=>{const o=u.current.get(c);o&&(clearTimeout(o),u.current.delete(c))},[]),p=t.useCallback((c,o)=>{!i||!e||a.current.has(o)||typeof IntersectionObserver>"u"||(r.current||(r.current=new IntersectionObserver(R=>{R.forEach(m=>{const s=m.target.getAttribute("data-item-id");if(s)if(m.isIntersecting&&m.intersectionRatio>=n){const v=setTimeout(()=>{a.current.has(s)||(a.current.add(s),g.current?.(s)),d(s),r.current?.unobserve(m.target)},f);u.current.set(s,v)}else d(s)})},{threshold:n})),c.setAttribute("data-item-id",o),r.current.observe(c))},[i,n,f,e,d]);return t.useEffect(()=>{const c=u.current;return()=>{r.current?.disconnect(),c.forEach(o=>clearTimeout(o))}},[]),{observeItem:p}}function y(n){const f=l(),e=T(f),{pageType:i,data:r,provisional:u}=E(),a=t.useMemo(()=>e?{...n,pageType:i,context:r}:n,[e,n,i,r]);return{isDyActive:e,ready:!e||!u,recommendationArgs:a}}export{D as a,y 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.