1import{i as h,r as e,j as m}from"./vendor.C--JXtB9.chunk.js";import{u as p}from"./useElementIntersection.DtGBcdct.chunk.js";const x=h.div.withConfig({componentId:"sc-19dg2ls-0"})(["visibility:hidden;height:1px;width:1px;z-index:-100;"]),n=.5;function I({onVisible:o,triggerDelay:c=0,children:i,className:l,singleElementRef:a=!1}){const{elementRef:u,intersectionRatio:t}=p({threshold:[n]}),f=e.useRef(t),[r,d]=e.useState(!1),s=e.useRef(void 0);if(e.useEffect(()=>(f.current=t,!r&&t>=n&&(s.current=setTimeout(()=>{f.current>=n&&!r&&(d(!0),o())},c)),()=>{s.current&&clearTimeout(s.current)}),[t,r,c,o]),a){if(e.Children.count(i)!==1)throw new Error("singleElementRef is true but there is more than one child");return e.cloneElement(i,{ref:u})}return m.jsx("div",{ref:u,className:l,children:i||m.jsx(x,{})})}export{I as V}; 2//# sourceMappingURL=VisibilityDetector.DgAxKI3U.chunk.js.map
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.