import{b as u,c as y,d as w,e as F}from"./chunk-VZBWMYZM.js";import{a as f,d as c,g as h}from"./chunk-NRMNZ7EH.js";import{t as m}from"./chunk-UKZIEWH5.js";import{A as p,M as g}from"./chunk-37QI3DOO.js";import{g as e,i as d}from"./chunk-JRNAXTJ7.js";import{j as i}from"./chunk-RMXJBC7V.js";var L={common:g,getConfig:p,insertCluster:c,insertEdge:w,insertEdgeLabel:u,insertMarkers:F,insertNode:h,interpolateToCurve:m,labelHelper:f,log:d,positionEdgeLabel:y},a={},E=e(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),b=e(()=>{E([{name:"dagre",loader:e(()=>i(null,null,function*(){return yield import("./chunk-Y55XRFJI.js")}),"loader")},{name:"cose-bilkent",loader:e(()=>i(null,null,function*(){return yield import("./chunk-HD4LLD2O.js")}),"loader")}])},"registerDefaultLayoutLoaders");b();var R=e((t,r)=>i(null,null,function*(){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],$=yield n.loader(),{theme:s,themeVariables:D}=t.config,{useGradient:v,gradientStart:x,gradientStop:A}=D,l=r.attr("id");if(r.append("defs").append("filter").attr("id",`${l}-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",`${l}-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"}`),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})}),"render"),U=e((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return d.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,R as b,U as c};
