var c=Object.defineProperty;var o=(n,r)=>c(n,"name",{value:r,configurable:!0});import{_ as i}from"./mermaid.core-CzZmBq1L.js";import"./mermaid-GHXKKRXX-IUK0bIya.js";import"./HostCapabilitiesProvider-30w3CGIu.js";var m=1;function a(){if(!(typeof globalThis>"u"))return globalThis}o(a,"getCaptureGlobal");i(a,"getCaptureGlobal");function l(){return!!a()?.mermaidCaptureSizes}o(l,"shouldCaptureSizes");i(l,"shouldCaptureSizes");function d(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(d,"capturedFromLocation");i(d,"capturedFromLocation");function s(n,r){const t=a();if(!t)return;const e=r.node(),p=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const u={svgId:p,sizes:n};t.mermaidCapturedSizes.push(u),t.mermaidLastCapturedSizes=u}o(s,"emitCapturedSizes");i(s,"emitCapturedSizes");function S(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&s({metadata:{captureVersion:m,capturedAt:new Date().toISOString(),capturedFrom:d()},nodes:t},n)}o(S,"captureNodeSizes");i(S,"captureNodeSizes");export{S as captureNodeSizes,l as shouldCaptureSizes};
