import{s as m}from"./chunk-LvLJmgfZ.js";import{t as d}from"./react-Bj1aDYRI.js";import{t as p}from"./compiler-runtime-B3qBwwSJ.js";var v=p(),h=m(d(),1);function l(t,r){let e=(0,v.c)(4),n,i;e[0]!==r||e[1]!==t?(n=()=>{let o=t.current;if(!o||!r||typeof ResizeObserver>"u")return;let s=o.clientWidth,c=new ResizeObserver(f=>{var u;let a=((u=f[0])==null?void 0:u.contentRect.width)??0;if(a<=0){s=0;return}Math.round(a)!==Math.round(s)&&(s=a,requestAnimationFrame(w))});return c.observe(o),()=>c.disconnect()},i=[t,r],e[0]=r,e[1]=t,e[2]=n,e[3]=i):(n=e[2],i=e[3]),(0,h.useEffect)(n,i)}function w(){window.dispatchEvent(new Event("resize"))}export{l as t};
