"use strict";const r=require("vue");function d(n){const e=r.ref({width:void 0,height:void 0});if(typeof window!="object"||!("ResizeObserver"in window)||!("ResizeObserverEntry"in window))return e;const i=new window.ResizeObserver(o=>{const t=o[0];t&&(e.value={width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize})});let s=!1;return r.onMounted(()=>{s=!0,n.value&&i.observe(n.value)}),r.onUnmounted(()=>{s=!1,i.disconnect()}),r.watch(n,o=>{s&&(i.disconnect(),e.value={width:void 0,height:void 0},o&&i.observe(o))}),e}module.exports=d;
