index-1e0585d5-1716977058336.js 734 B

1
  1. import{b as m,c as b,i as w}from"./index-04f2ff28-1716977058336.js";import{T as p,z as O,r as z,p as M,bT as h}from"./index-70c8ab8f-1716977058336.js";function l(e){var n;const o=b(e);return(n=o==null?void 0:o.$el)!=null?n:o}const y=w?window:void 0;function R(){const e=z(!1),n=h();return n&&M(()=>{e.value=!0},n),e}function S(e){const n=R();return p(()=>(n.value,!!e()))}function T(e,n,o={}){const{window:t=y,...d}=o;let s;const i=S(()=>t&&"ResizeObserver"in t),u=()=>{s&&(s.disconnect(),s=void 0)},f=p(()=>Array.isArray(e)?e.map(r=>l(r)):[l(e)]),v=O(f,r=>{if(u(),i.value&&t){s=new ResizeObserver(n);for(const c of r)c&&s.observe(c,d)}},{immediate:!0,flush:"post"}),a=()=>{u(),v()};return m(a),{isSupported:i,stop:a}}export{T as u};