"use strict";exports.id=9015,exports.ids=[9015],exports.modules={9015:(a,b,c)=>{c.r(b),c.d(b,{default:()=>i});var d=c(4343);let e=!1;async function f(){if(e)return;let{default:a}=await c.e(7462).then(c.bind(c,97462));a.initialize({startOnLoad:!1,theme:"default"}),e=!0}let g=0;async function h(a){try{await f();let{default:b}=await c.e(7462).then(c.bind(c,97462)),{toPng:d}=await c.e(9451).then(c.bind(c,49451)),e=`mermaid-export-${g++}`,{svg:h}=await b.render(e,a),i=document.createElement("div");i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.background="white",i.style.zIndex="99999",i.style.pointerEvents="none",i.innerHTML=h,document.body.appendChild(i),await new Promise(a=>requestAnimationFrame(()=>requestAnimationFrame(a)));try{let a=i.querySelector("svg"),b=window.devicePixelRatio||2;if(a){let c=a.viewBox?.baseVal,d=(c&&c.width>0?c.width:0)||parseFloat(a.style.maxWidth)||parseFloat(a.getAttribute("width")||"0"),e=i.offsetWidth;d>0&&e>0&&(b=Math.max(b,d/e*1.5))}return b=Math.min(b,8),await d(i,{backgroundColor:"#ffffff",pixelRatio:b})}finally{document.body.removeChild(i)}}catch{return null}}let i=function(){return async a=>{let b=[];for(let{node:c,index:e,parent:f}of((0,d.YR)(a,"code",(a,c,d)=>{"mermaid"===a.lang&&void 0!==c&&d&&b.push({node:a,index:c,parent:d})}),b)){let a=await h(c.value);a&&f.children&&(f.children[e]={type:"paragraph",children:[{type:"image",url:a,alt:"Mermaid diagram"}]})}}}}};