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