import{d as c,e as y,f as u,g as h}from"./chunk-PE7DX7ZZ.mjs";import{a as f,e as g,g as w}from"./chunk-NLANEA3F.mjs";import{e as m}from"./chunk-7CWYLC5S.mjs";import{G as l,t as p}from"./chunk-2AEHWXPW.mjs";import{b as a}from"./chunk-LIEV3EAG.mjs";import{a as o}from"./chunk-AQ6EADP3.mjs";var L={common:l,getConfig:p,insertCluster:g,insertEdge:u,insertEdgeLabel:c,insertMarkers:h,insertNode:w,interpolateToCurve:m,labelHelper:f,log:a,positionEdgeLabel:y};var i={},S=o(t=>{for(let r of t)i[r.name]=r},"registerLayoutLoaders"),j=o(()=>{S([{name:"dagre",loader:o(async()=>await import("./dagre-K64A6Z3X.mjs"),"loader")},{name:"swimlane",loader:o(async()=>await import("./swimlanes-OSWOYLSK.mjs"),"loader")},{name:"cose-bilkent",loader:o(async()=>await import("./cose-bilkent-RZA4XIPR.mjs"),"loader")}])},"registerDefaultLayoutLoaders");j();var M=o(async(t,r,x)=>{if(!(t.layoutAlgorithm in i))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let H=e.domId||e.id;e.domId=`${t.diagramId}-${H}`}let n=i[t.layoutAlgorithm],D=await n.loader(),{theme:s,themeVariables:F}=t.config,{useGradient:$,gradientStart:I,gradientStop:A}=F,d=r.attr("id");if(r.append("defs").append("filter").attr("id",`${d}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${d}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),$){let e=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",I).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",A).attr("stop-opacity",1)}return D.render(t,r,L,{algorithm:n.algorithm},x)},"render"),N=o((t="",{fallback:r="dagre"}={})=>{if(t in i)return t;if(r in i)return a.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${t} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm");export{S as a,M as b,N as c};
