index-4064e060-1734950731618.js 1021 B

1
  1. import{b as m,c as w,i as _}from"./index-5585b177-1734950731618.js";import{U as v,A as y,r as h,bS as S,q as $}from"./index-efb66432-1734950731618.js";function f(e){var n;const o=w(e);return(n=o==null?void 0:o.$el)!=null?n:o}const j=_?window:void 0;function M(){const e=h(!1);return S()&&$(()=>{e.value=!0}),e}function P(e){const n=M();return v(()=>(n.value,!!e()))}var c=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,z=(e,n)=>{var o={};for(var t in e)R.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&c)for(var t of c(e))n.indexOf(t)<0&&g.call(e,t)&&(o[t]=e[t]);return o};function I(e,n,o={}){const t=o,{window:s=j}=t,d=z(t,["window"]);let r;const i=P(()=>s&&"ResizeObserver"in s),u=()=>{r&&(r.disconnect(),r=void 0)},b=v(()=>Array.isArray(e)?e.map(a=>f(a)):[f(e)]),O=y(b,a=>{if(u(),i.value&&s){r=new ResizeObserver(n);for(const p of a)p&&r.observe(p,d)}},{immediate:!0,flush:"post",deep:!0}),l=()=>{u(),O()};return m(l),{isSupported:i,stop:l}}export{I as u};