import{s as p}from"./chunk-DZLz74EQ.js";import"./jotai-DDOP7CKM.js";import{t as f}from"./react-BcIddLXZ.js";import"./zod-U2NFpcFA.js";import{n as u,t as h}from"./jsx-runtime-DvsdsEjx.js";import"./_Uint8Array-D5Z9rM2X.js";import"./isArrayLikeObject-DKyJYtr8.js";import"./_getTag-CVRrQL_Q.js";import"./_baseIsEqual-BF8660ot.js";import"./memoize-CAcr7Wct.js";import"./merge-BgA7kxZb.js";import"./isEmpty-z92iM7uZ.js";import{u as c}from"./hotkeys-Lbk6RHir.js";import"./invariant-DPGusy7Z.js";import"./utils-DnJCRgaX.js";import"./preload-helper-BpItL31i.js";import"./marked.esm-DCf1d_lA.js";import{r as M}from"./useTheme-BMknLtnH.js";import"./useEvent-d8iQXgui.js";import"./purify.es-D83HMRRD.js";import{n as v}from"./useAsyncData-CsBCDF11.js";import"./timer-9ePNNBwU.js";import"./src-D-O4qgKm.js";import"./path-DE1VIUo_.js";import"./math-Cpuq8NJh.js";import"./array-pmtsE1gt.js";import"./step-DCnHyPDa.js";import"./line-D2-zCSal.js";import"./chunk-S3R3BYOJ-uZNU-Kd7.js";import"./chunk-57QY23SG-CNHrXEp-.js";import"./src-Ci62OB0C.js";import"./chunk-ABZYJK2D-D-T6tPym.js";import"./chunk-EXTU4WIE-DwsJ54Id.js";import"./chunk-ZPAFE4SF-Xkef8tMM.js";import"./chunk-7GE3RBXV-Ds_00JTJ.js";import"./chunk-CVBHYZKI-SXlNTOC2.js";import"./chunk-QYVHNE3D-B1-zbM-O.js";import"./dist-D3R7S_yk.js";import"./chunk-JA3XYJ7Z-PWzZnWG4.js";import"./chunk-CXMOBAN2-CX9vAWIk.js";import"./chunk-3AY6CYHV-B46AUeLq.js";import"./chunk-6OXUPJBA-BJaxvnSk.js";import{t as l}from"./mermaid.core-BQ1eS5lt.js";var b=p(u(),1),x=p(f(),1),w=p(h(),1),y={startOnLoad:!0,theme:"forest",logLevel:"fatal",securityLevel:"strict",fontFamily:"var(--text-font)",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};function S(){return Array.from({length:6},()=>"abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)]).join("")}var L=g=>{let r=(0,b.c)(9),{diagram:i}=g,[t]=(0,x.useState)(k),o=M().theme==="dark";l.initialize({...y,theme:o?"dark":"forest",darkMode:o});let m;r[0]!==i||r[1]!==t?(m=async()=>(await l.render(t,i,void 0).catch(d=>{var s;throw(s=document.getElementById(t))==null||s.remove(),c.warn("Failed to render mermaid diagram",d),d})).svg,r[0]=i,r[1]=t,r[2]=m):m=r[2];let e;r[3]!==o||r[4]!==i||r[5]!==t?(e=[i,t,o],r[3]=o,r[4]=i,r[5]=t,r[6]=e):e=r[6];let{data:a}=v(m,e);if(!a)return null;let n;return r[7]===a?n=r[8]:(n=(0,w.jsx)("div",{dangerouslySetInnerHTML:{__html:a}}),r[7]=a,r[8]=n),n};function k(){return S()}export{L as default};
