import{n as p}from"./chunk-55QKDJ5H.js";import{_ as s,k as g}from"./chunk-E5GXGYZM.js";import{a}from"./chunk-YUSHYV7C.js";var h=a(({flowchart:o})=>{let n=o?.subGraphTitleMargin?.top??0,t=o?.subGraphTitleMargin?.bottom??0,r=n+t;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:t,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins");async function d(o,n){let t=o.getElementsByTagName("img");if(!t||t.length===0)return;let r=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...t].map(e=>new Promise(m=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",r){let u=s().fontSize?s().fontSize:window.getComputedStyle(document.body).fontSize,f=5,[c=g.fontSize]=p(u),l=c*f+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";m(e)}a(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}a(d,"configureLabelImages");export{h as a,d as b};
