import{d as h,e as u,f as y,g as w}from"./chunk-RSYYWCFT.js";import{a as g,d as f,g as c}from"./chunk-QDZMYZBI.js";import{e as m}from"./chunk-55QKDJ5H.js";import{N as p,u as l}from"./chunk-E5GXGYZM.js";import{b as i}from"./chunk-ZZZJFKF2.js";import{a as e}from"./chunk-YUSHYV7C.js";var L={common:p,getConfig:l,insertCluster:f,insertEdge:y,insertEdgeLabel:h,insertMarkers:w,insertNode:c,interpolateToCurve:m,labelHelper:g,log:i,positionEdgeLabel:u},a={},E=e(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),b=e(()=>{E([{name:"dagre",loader:e(async()=>await import("./chunk-VHZLFEF4.js"),"loader")},{name:"swimlane",loader:e(async()=>await import("./chunk-GRVF5ZE5.js"),"loader")},{name:"cose-bilkent",loader:e(async()=>await import("./chunk-O3EN7OFQ.js"),"loader")}])},"registerDefaultLayoutLoaders");b();var U=e(async(t,r,F)=>{if(!(t.layoutAlgorithm in a))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let o of t.nodes){let I=o.domId||o.id;o.domId=`${t.diagramId}-${I}`}let n=a[t.layoutAlgorithm],$=await n.loader(),{theme:d,themeVariables:D}=t.config,{useGradient:v,gradientStart:x,gradientStop:A}=D,s=r.attr("id");if(r.append("defs").append("filter").attr("id",`${s}-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",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${s}-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",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),v){let o=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");o.append("svg:stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),o.append("svg:stop").attr("offset","100%").attr("stop-color",A).attr("stop-opacity",1)}return $.render(t,r,L,{algorithm:n.algorithm},F)},"render"),G=e((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return i.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{E as a,U as b,G as c};
