import { g as e, h as t } from "./src-CUQ6oOYk.js";
import { u as n } from "./chunk-GEFDOKGD-BWpC-zoH.js";
import { s as r, y as i } from "./chunk-7R4GIKGN-QT6IorJ_.js";
import { a, i as o, s } from "./chunk-KYZI473N-BHJ3T5Zv.js";
import { a as c, i as l, n as u, r as d } from "./chunk-O4XLMI2P-qjOoGpnx.js";
//#region ../../node_modules/.pnpm/mermaid@11.13.0/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: n,
	labelHelper: s,
	log: e,
	positionEdgeLabel: c
}, p = {}, m = /* @__PURE__ */ t((e) => {
	for (let t of e) p[t.name] = t;
}, "registerLayoutLoaders");
(/* @__PURE__ */ t(() => {
	m([{
		name: "dagre",
		loader: /* @__PURE__ */ t(async () => await import("./dagre-KLK3FWXG-BI5QQMXo.js"), "loader")
	}, ...[{
		name: "cose-bilkent",
		loader: /* @__PURE__ */ t(async () => await import("./cose-bilkent-S5V4N54A-B5OQuIhl.js"), "loader")
	}]]);
}, "registerDefaultLayoutLoaders"))();
var h = /* @__PURE__ */ t(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__ */ t((t = "", { fallback: n = "dagre" } = {}) => {
	if (t in p) return t;
	if (n in p) return e.warn(`Layout algorithm ${t} is not registered. Using ${n} as fallback.`), n;
	throw Error(`Both layout algorithms ${t} and ${n} are not registered.`);
}, "getRegisteredLayoutAlgorithm");
//#endregion
export { m as n, h as r, g as t };
