import{r as s}from"./index-B-YXshIJ.js";const c=t=>{const r=s.useRef(null),e=s.useCallback(()=>{t(),r.current=requestAnimationFrame(e)},[t]);s.useEffect(()=>(r.current=requestAnimationFrame(e),()=>cancelAnimationFrame(r.current)),[t,e])},a=(t,r,e)=>s.useEffect(()=>{const u=t.current;if(u)return u.addEventListener(r,e),()=>u.removeEventListener(r,e)},[e,r,t]);export{a,c as u};
