import { u as e } from "./chunk-GEFDOKGD-8e2771NL.js";
import { g as t, h as n } from "./src-DI0MZP4m.js";
import { s as r, y as i } from "./chunk-7R4GIKGN-C19ZEV_b.js";
import { a, i as o, s } from "./chunk-KYZI473N-B9L8Kk83.js";
import { a as c, i as l, n as u, r as d } from "./chunk-O4XLMI2P-BlC0d_Zr.js";
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-GLR3WWYH.mjs
var f = {
	common: r,
	getConfig: i,
	insertCluster: o,
	insertEdge: u,
	insertEdgeLabel: d,
	insertMarkers: l,
	insertNode: a,
	interpolateToCurve: e,
	labelHelper: s,
	log: t,
	positionEdgeLabel: c
}, p = {}, m = /* @__PURE__ */ n((e) => {
	for (let t of e) p[t.name] = t;
}, "registerLayoutLoaders");
(/* @__PURE__ */ n(() => {
	m([{
		name: "dagre",
		loader: /* @__PURE__ */ n(async () => await import("./dagre-KLK3FWXG-BkGeaeJf.js"), "loader")
	}, ...[{
		name: "cose-bilkent",
		loader: /* @__PURE__ */ n(async () => await import("./cose-bilkent-S5V4N54A-DCXUWrka.js"), "loader")
	}]]);
}, "registerDefaultLayoutLoaders"))();
var h = /* @__PURE__ */ n(async (e, t) => {
	if (!(e.layoutAlgorithm in p)) throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);
	let n = p[e.layoutAlgorithm];
	return (await n.loader()).render(e, t, f, { algorithm: n.algorithm });
}, "render"), g = /* @__PURE__ */ n((e = "", { fallback: n = "dagre" } = {}) => {
	if (e in p) return e;
	if (n in p) return t.warn(`Layout algorithm ${e} is not registered. Using ${n} as fallback.`), n;
	throw Error(`Both layout algorithms ${e} and ${n} are not registered.`);
}, "getRegisteredLayoutAlgorithm");
//#endregion
export { m as n, h as r, g as t };
