import { t as e } from "./isEmpty-DLTQgX7m.js";
import { _ as t, g as n, h as r, p as i } from "./src-BZm6Awwh.js";
import { F as a, G as o, H as s, J as c, M as l, N as u, S as d, T as f, X as p, Y as m, Z as h, c as g, f as _, g as v, h as y, l as b, n as x, p as S, r as C, t as w, w as ee, x as T, y as E, z as te } from "./chunk-ICPOFSXX-BQ7-Poft.js";
import { a as D, d as O, h as k, i as ne, m as A, r as re } from "./chunk-5PVQY5BW-CQdr0IGy.js";
import { t as ie } from "./chunk-426QAEUC-b2PRuT9o.js";
import { i as ae, o as oe } from "./chunk-U2HBQHQK-CNpf2t7b.js";
import "./chunk-BSJP7CBP-BRqWaFD3.js";
import "./chunk-ZZ45TVLE-CP_4OsJR.js";
import "./chunk-X2U36JSP-Dh9T66Fy.js";
import "./chunk-5FUZZQ4R-Hp5ZXYAE.js";
import "./chunk-ENJZ2VHE-D1RBdOy4.js";
import { n as se } from "./chunk-336JU56O-24m8cXIL.js";
import { n as ce, t as le } from "./chunk-XPW4576I-CdsuZylH.js";
//#region ../../node_modules/stylis/src/Enum.js
var ue = "comm", de = "rule", fe = "decl", pe = "@import", me = "@namespace", he = "@keyframes", ge = "@layer", _e = Math.abs, j = String.fromCharCode;
function ve(e) {
	return e.trim();
}
function ye(e, t, n) {
	return e.replace(t, n);
}
function M(e, t) {
	return e.charCodeAt(t) | 0;
}
function N(e, t, n) {
	return e.slice(t, n);
}
function P(e) {
	return e.length;
}
function be(e) {
	return e.length;
}
function F(e, t) {
	return t.push(e), e;
}
//#endregion
//#region ../../node_modules/stylis/src/Tokenizer.js
var I = 1, L = 1, xe = 0, R = 0, z = 0, B = "";
function V(e, t, n, r, i, a, o, s) {
	return {
		value: e,
		root: t,
		parent: n,
		type: r,
		props: i,
		children: a,
		line: I,
		column: L,
		length: o,
		return: "",
		siblings: s
	};
}
function Se() {
	return z;
}
function Ce() {
	return z = R > 0 ? M(B, --R) : 0, L--, z === 10 && (L = 1, I--), z;
}
function H() {
	return z = R < xe ? M(B, R++) : 0, L++, z === 10 && (L = 1, I++), z;
}
function U() {
	return M(B, R);
}
function W() {
	return R;
}
function G(e, t) {
	return N(B, e, t);
}
function K(e) {
	switch (e) {
		case 0:
		case 9:
		case 10:
		case 13:
		case 32: return 5;
		case 33:
		case 43:
		case 44:
		case 47:
		case 62:
		case 64:
		case 126:
		case 59:
		case 123:
		case 125: return 4;
		case 58: return 3;
		case 34:
		case 39:
		case 40:
		case 91: return 2;
		case 41:
		case 93: return 1;
	}
	return 0;
}
function we(e) {
	return I = L = 1, xe = P(B = e), R = 0, [];
}
function Te(e) {
	return B = "", e;
}
function q(e) {
	return ve(G(R - 1, J(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function Ee(e) {
	for (; (z = U()) && z < 33;) H();
	return K(e) > 2 || K(z) > 3 ? "" : " ";
}
function De(e, t) {
	for (; --t && H() && !(z < 48 || z > 102 || z > 57 && z < 65 || z > 70 && z < 97););
	return G(e, W() + (t < 6 && U() == 32 && H() == 32));
}
function J(e) {
	for (; H();) switch (z) {
		case e: return R;
		case 34:
		case 39:
			e !== 34 && e !== 39 && J(z);
			break;
		case 40:
			e === 41 && J(e);
			break;
		case 92:
			H();
			break;
	}
	return R;
}
function Oe(e, t) {
	for (; H() && e + z !== 57 && !(e + z === 84 && U() === 47););
	return "/*" + G(t, R - 1) + "*" + j(e === 47 ? e : H());
}
function ke(e) {
	for (; !K(U());) H();
	return G(e, R);
}
//#endregion
//#region ../../node_modules/stylis/src/Parser.js
function Ae(e) {
	return Te(Y("", null, null, null, [""], e = we(e), 0, [0], e));
}
function Y(e, t, n, r, i, a, o, s, c) {
	for (var l = 0, u = 0, d = o, f = 0, p = 0, m = 0, h = 1, g = 1, _ = 1, v = 0, y = 0, b = "", x = i, S = a, C = r, w = b; g;) switch (m = y, y = H()) {
		case 40:
			m != 108 && M(w, d - 1) == 58 ? (v++, w += "(") : w += q(y);
			break;
		case 41:
			v--, w += ")";
			break;
		case 34:
		case 39:
		case 91:
			w += q(y);
			break;
		case 9:
		case 10:
		case 13:
		case 32:
			if (v > 0) {
				w += j(y);
				break;
			}
			w += Ee(m);
			break;
		case 92:
			w += De(W() - 1, 7);
			continue;
		case 47:
			switch (U()) {
				case 42:
				case 47:
					F(Me(Oe(H(), W()), t, n, c), c), (K(m || 1) == 5 || K(U() || 1) == 5) && P(w) && N(w, -1, void 0) !== " " && (w += " ");
					break;
				default: w += "/";
			}
			break;
		case 123 * h: s[l++] = P(w) * _;
		case 125 * h:
		case 59:
		case 0:
			if (v > 0 && y) {
				w += j(y);
				break;
			}
			switch (y) {
				case 0:
				case 125: g = 0;
				case 59 + u:
					_ == -1 && (w = ye(w, /\f/g, "")), p > 0 && (P(w) - d || h === 0) && F(p > 32 ? Ne(w + ";", r, n, d - 1, c) : Ne(ye(w, " ", "") + ";", r, n, d - 2, c), c);
					break;
				case 59: w += ";";
				default: if (F(C = je(w, t, n, l, u, i, s, b, x = [], S = [], d, a), a), y === 123) if (u === 0) Y(w, t, C, C, x, a, d, s, S);
				else {
					switch (f) {
						case 99: if (M(w, 3) === 110) break;
						case 108: if (M(w, 2) === 97) break;
						default: u = 0;
						case 100:
						case 109:
						case 115:
					}
					u ? Y(e, C, C, r && F(je(e, C, C, 0, 0, i, s, b, i, x = [], d, S), S), i, S, d, s, r ? x : S) : Y(w, C, C, C, [""], S, 0, s, S);
				}
			}
			l = u = p = 0, h = _ = 1, b = w = "", d = o;
			break;
		case 58: d = 1 + P(w), p = m;
		default:
			if (h < 1) {
				if (y == 123) --h;
				else if (y == 125 && h++ == 0 && Ce() == 125) continue;
			}
			switch (w += j(y), y * h) {
				case 38:
					_ = u > 0 ? 1 : (w += "\f", -1);
					break;
				case 44:
					if (v > 0) break;
					s[l++] = (P(w) - 1) * _, _ = 1;
					break;
				case 64:
					U() === 45 && (w += q(H())), f = U(), u = d = P(b = w += ke(W())), y++;
					break;
				case 45: m === 45 && P(w) == 2 && (h = 0);
			}
	}
	return a;
}
function je(e, t, n, r, i, a, o, s, c, l, u, d) {
	for (var f = i - 1, p = i === 0 ? a : [""], m = be(p), h = 0, g = 0, _ = 0; h < r; ++h) for (var v = 0, y = N(e, f + 1, f = _e(g = o[h])), b = e; v < m; ++v) (b = ve(g > 0 ? p[v] + " " + y : ye(y, /&\f/g, p[v]))) && (c[_++] = b);
	return V(e, t, n, i === 0 ? de : s, c, l, u, d);
}
function Me(e, t, n, r) {
	return V(e, t, n, ue, j(Se()), N(e, 2, -2), 0, r);
}
function Ne(e, t, n, r, i) {
	return V(e, t, n, fe, N(e, 0, r), N(e, r + 1, -1), r, i);
}
//#endregion
//#region ../../node_modules/stylis/src/Serializer.js
function Pe(e, t) {
	for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
	return n;
}
function Fe(e, t, n, r) {
	switch (e.type) {
		case ge: if (e.children.length) break;
		case pe:
		case me:
		case fe: return e.return = e.return || e.value;
		case ue: return "";
		case he: return e.return = e.value + "{" + Pe(e.children, r) + "}";
		case de: if (!P(e.value = e.props.join(","))) return "";
	}
	return P(n = Pe(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
}
//#endregion
//#region ../../node_modules/mermaid/dist/mermaid.core.mjs
var Ie = "c4", Le = {
	id: Ie,
	detector: /* @__PURE__ */ r((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./c4Diagram-AHTNJAMY-DxAt6CyF.js");
		return {
			id: Ie,
			diagram: e
		};
	}, "loader")
}, Re = "flowchart", ze = {
	id: Re,
	detector: /* @__PURE__ */ r((e, t) => t?.flowchart?.defaultRenderer === "dagre-wrapper" || t?.flowchart?.defaultRenderer === "elk" ? !1 : /^\s*graph/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./flowDiagram-DWJPFMVM-BlOft6GA.js");
		return {
			id: Re,
			diagram: e
		};
	}, "loader")
}, Be = "flowchart-v2", Ve = {
	id: Be,
	detector: /* @__PURE__ */ r((e, t) => t?.flowchart?.defaultRenderer === "dagre-d3" ? !1 : (t?.flowchart?.defaultRenderer === "elk" && (t.layout = "elk"), /^\s*graph/.test(e) && t?.flowchart?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(e)), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./flowDiagram-DWJPFMVM-BlOft6GA.js");
		return {
			id: Be,
			diagram: e
		};
	}, "loader")
}, He = "er", Ue = {
	id: He,
	detector: /* @__PURE__ */ r((e) => /^\s*erDiagram/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./erDiagram-SMLLAGMA-sgCGzaHO.js");
		return {
			id: He,
			diagram: e
		};
	}, "loader")
}, We = "gitGraph", Ge = {
	id: We,
	detector: /* @__PURE__ */ r((e) => /^\s*gitGraph/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./gitGraphDiagram-UUTBAWPF-BV73nor5.js");
		return {
			id: We,
			diagram: e
		};
	}, "loader")
}, Ke = "gantt", qe = {
	id: Ke,
	detector: /* @__PURE__ */ r((e) => /^\s*gantt/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./ganttDiagram-T4ZO3ILL-BGrn6yEi.js");
		return {
			id: Ke,
			diagram: e
		};
	}, "loader")
}, Je = "info", Ye = {
	id: Je,
	detector: /* @__PURE__ */ r((e) => /^\s*info/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./infoDiagram-42DDH7IO-CYONnQuR.js");
		return {
			id: Je,
			diagram: e
		};
	}, "loader")
}, Xe = "pie", Ze = {
	id: Xe,
	detector: /* @__PURE__ */ r((e) => /^\s*pie/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./pieDiagram-DEJITSTG-YByZ__0R.js");
		return {
			id: Xe,
			diagram: e
		};
	}, "loader")
}, Qe = "quadrantChart", $e = {
	id: Qe,
	detector: /* @__PURE__ */ r((e) => /^\s*quadrantChart/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./quadrantDiagram-34T5L4WZ-DLFKZc02.js");
		return {
			id: Qe,
			diagram: e
		};
	}, "loader")
}, et = "xychart", tt = {
	id: et,
	detector: /* @__PURE__ */ r((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./xychartDiagram-5P7HB3ND-C2ITEA5J.js");
		return {
			id: et,
			diagram: e
		};
	}, "loader")
}, nt = "requirement", rt = {
	id: nt,
	detector: /* @__PURE__ */ r((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./requirementDiagram-MS252O5E-CJXcr8r4.js");
		return {
			id: nt,
			diagram: e
		};
	}, "loader")
}, it = "sequence", at = {
	id: it,
	detector: /* @__PURE__ */ r((e) => /^\s*sequenceDiagram/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./sequenceDiagram-FGHM5R23-vJC9cjdX.js");
		return {
			id: it,
			diagram: e
		};
	}, "loader")
}, ot = "class", st = {
	id: ot,
	detector: /* @__PURE__ */ r((e, t) => t?.class?.defaultRenderer === "dagre-wrapper" ? !1 : /^\s*classDiagram/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./classDiagram-6PBFFD2Q-CfClLEok.js");
		return {
			id: ot,
			diagram: e
		};
	}, "loader")
}, ct = "classDiagram", lt = {
	id: ct,
	detector: /* @__PURE__ */ r((e, t) => /^\s*classDiagram/.test(e) && t?.class?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./classDiagram-v2-HSJHXN6E-BlbDAEH6.js");
		return {
			id: ct,
			diagram: e
		};
	}, "loader")
}, ut = "state", dt = {
	id: ut,
	detector: /* @__PURE__ */ r((e, t) => t?.state?.defaultRenderer === "dagre-wrapper" ? !1 : /^\s*stateDiagram/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./stateDiagram-FHFEXIEX-G9WWEBGm.js");
		return {
			id: ut,
			diagram: e
		};
	}, "loader")
}, ft = "stateDiagram", pt = {
	id: ft,
	detector: /* @__PURE__ */ r((e, t) => !!(/^\s*stateDiagram-v2/.test(e) || /^\s*stateDiagram/.test(e) && t?.state?.defaultRenderer === "dagre-wrapper"), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./stateDiagram-v2-QKLJ7IA2-BSg62pbb.js");
		return {
			id: ft,
			diagram: e
		};
	}, "loader")
}, mt = "journey", ht = {
	id: mt,
	detector: /* @__PURE__ */ r((e) => /^\s*journey/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./journeyDiagram-VCZTEJTY-CjNMX7wx.js");
		return {
			id: mt,
			diagram: e
		};
	}, "loader")
}, gt = { draw: /* @__PURE__ */ r((e, t, r) => {
	n.debug("rendering svg for syntax error\n");
	let i = ie(t), a = i.append("g");
	i.attr("viewBox", "0 0 2412 512"), g(i, 100, 512, !0), a.append("path").attr("class", "error-icon").attr("d", "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"), a.append("path").attr("class", "error-icon").attr("d", "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"), a.append("path").attr("class", "error-icon").attr("d", "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"), a.append("path").attr("class", "error-icon").attr("d", "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"), a.append("path").attr("class", "error-icon").attr("d", "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"), a.append("path").attr("class", "error-icon").attr("d", "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"), a.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"), a.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${r}`);
}, "draw") }, _t = gt, vt = {
	db: {},
	renderer: gt,
	parser: { parse: /* @__PURE__ */ r(() => {}, "parse") }
}, yt = "flowchart-elk", bt = {
	id: yt,
	detector: /* @__PURE__ */ r((e, t = {}) => /^\s*flowchart-elk/.test(e) || /^\s*(flowchart|graph)/.test(e) && t?.flowchart?.defaultRenderer === "elk" ? (t.layout = "elk", !0) : !1, "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./flowDiagram-DWJPFMVM-BlOft6GA.js");
		return {
			id: yt,
			diagram: e
		};
	}, "loader")
}, xt = "timeline", St = {
	id: xt,
	detector: /* @__PURE__ */ r((e) => /^\s*timeline/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./timeline-definition-GMOUNBTQ-DeWjV_e-.js");
		return {
			id: xt,
			diagram: e
		};
	}, "loader")
}, Ct = "mindmap", wt = {
	id: Ct,
	detector: /* @__PURE__ */ r((e) => /^\s*mindmap/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./mindmap-definition-QFDTVHPH-C63UTb48.js");
		return {
			id: Ct,
			diagram: e
		};
	}, "loader")
}, Tt = "kanban", Et = {
	id: Tt,
	detector: /* @__PURE__ */ r((e) => /^\s*kanban/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./kanban-definition-6JOO6SKY-BNsv25Cl.js");
		return {
			id: Tt,
			diagram: e
		};
	}, "loader")
}, Dt = "sankey", Ot = {
	id: Dt,
	detector: /* @__PURE__ */ r((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./sankeyDiagram-XADWPNL6-DMByY6gK.js");
		return {
			id: Dt,
			diagram: e
		};
	}, "loader")
}, kt = "packet", At = {
	id: kt,
	detector: /* @__PURE__ */ r((e) => /^\s*packet(-beta)?/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./diagram-TYMM5635-D3ecq7oF.js");
		return {
			id: kt,
			diagram: e
		};
	}, "loader")
}, jt = "radar", Mt = {
	id: jt,
	detector: /* @__PURE__ */ r((e) => /^\s*radar-beta/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./diagram-MMDJMWI5-DsPB2uYP.js");
		return {
			id: jt,
			diagram: e
		};
	}, "loader")
}, Nt = "block", Pt = {
	id: Nt,
	detector: /* @__PURE__ */ r((e) => /^\s*block(-beta)?/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./blockDiagram-DXYQGD6D-DJxDffAk.js");
		return {
			id: Nt,
			diagram: e
		};
	}, "loader")
}, Ft = "treeView", It = {
	id: Ft,
	detector: /* @__PURE__ */ r((e) => /^\s*treeView-beta/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./diagram-5BDNPKRD-w19gCTBw.js");
		return {
			id: Ft,
			diagram: e
		};
	}, "loader")
}, Lt = "architecture", Rt = {
	id: Lt,
	detector: /* @__PURE__ */ r((e) => /^\s*architecture/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./architectureDiagram-Q4EWVU46-DpoNV55s.js");
		return {
			id: Lt,
			diagram: e
		};
	}, "loader")
}, zt = "ishikawa", Bt = {
	id: zt,
	detector: /* @__PURE__ */ r((e) => /^\s*ishikawa(-beta)?\b/i.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./ishikawaDiagram-UXIWVN3A-B2ISni0r.js");
		return {
			id: zt,
			diagram: e
		};
	}, "loader")
}, Vt = "venn", Ht = {
	id: Vt,
	detector: /* @__PURE__ */ r((e) => /^\s*venn-beta/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./vennDiagram-DHZGUBPP-CKdXCzw7.js");
		return {
			id: Vt,
			diagram: e
		};
	}, "loader")
}, Ut = "treemap", Wt = {
	id: Ut,
	detector: /* @__PURE__ */ r((e) => /^\s*treemap/.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./diagram-G4DWMVQ6-EfJtDPEB.js");
		return {
			id: Ut,
			diagram: e
		};
	}, "loader")
}, Gt = "wardley-beta", Kt = {
	id: Gt,
	detector: /* @__PURE__ */ r((e) => /^\s*wardley-beta/i.test(e), "detector"),
	loader: /* @__PURE__ */ r(async () => {
		let { diagram: e } = await import("./wardleyDiagram-NUSXRM2D-BzD8LDJv.js");
		return {
			id: Gt,
			diagram: e
		};
	}, "loader")
}, qt = !1, X = /* @__PURE__ */ r(() => {
	qt || (qt = !0, l("error", vt, (e) => e.toLowerCase().trim() === "error"), l("---", {
		db: { clear: /* @__PURE__ */ r(() => {}, "clear") },
		styles: {},
		renderer: { draw: /* @__PURE__ */ r(() => {}, "draw") },
		parser: { parse: /* @__PURE__ */ r(() => {
			throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks");
		}, "parse") },
		init: /* @__PURE__ */ r(() => null, "init")
	}, (e) => e.toLowerCase().trimStart().startsWith("---")), u(bt, wt, Rt), u(Le, Et, lt, st, Ue, qe, Ye, Ze, rt, at, Ve, ze, St, Ge, pt, dt, ht, $e, Ot, At, tt, Pt, It, Mt, Bt, Wt, Ht, Kt));
}, "addDiagrams"), Jt = /* @__PURE__ */ r(async () => {
	n.debug("Loading registered diagrams");
	let e = (await Promise.allSettled(Object.entries(S).map(async ([e, { detector: t, loader: r }]) => {
		if (r) try {
			T(e);
		} catch {
			try {
				let { diagram: e, id: n } = await r();
				l(n, e, t);
			} catch (t) {
				throw n.error(`Failed to load external diagram with key ${e}. Removing from detectors.`), delete S[e], t;
			}
		}
	}))).filter((e) => e.status === "rejected");
	if (e.length > 0) {
		n.error(`Failed to load ${e.length} external diagrams`);
		for (let t of e) n.error(t);
		throw Error(`Failed to load ${e.length} external diagrams`);
	}
}, "loadRegisteredDiagrams"), Yt = "graphics-document document";
function Xt(e, t) {
	e.attr("role", Yt), t !== "" && e.attr("aria-roledescription", t);
}
r(Xt, "setA11yDiagramInfo");
function Zt(e, t, n, r) {
	if (e.insert !== void 0) {
		if (n) {
			let t = `chart-desc-${r}`;
			e.attr("aria-describedby", t), e.insert("desc", ":first-child").attr("id", t).text(n);
		}
		if (t) {
			let n = `chart-title-${r}`;
			e.attr("aria-labelledby", n), e.insert("title", ":first-child").attr("id", n).text(t);
		}
	}
}
r(Zt, "addSVGa11yTitleDescription");
var Qt = class e {
	constructor(e, t, n, r, i) {
		this.type = e, this.text = t, this.db = n, this.parser = r, this.renderer = i;
	}
	static {
		r(this, "Diagram");
	}
	static async fromText(t, n = {}) {
		let r = E(), i = _(t, r);
		t = D(t) + "\n";
		try {
			T(i);
		} catch {
			let e = d(i);
			if (!e) throw new w(`Diagram ${i} not found.`);
			let { id: t, diagram: n } = await e();
			l(t, n);
		}
		let { db: a, parser: o, renderer: s, init: c } = T(i);
		return o.parser && (o.parser.yy = a), a.clear?.(), c?.(r), n.title && a.setDiagramTitle?.(n.title), await o.parse(t), new e(i, t, a, o, s);
	}
	async render(e, t) {
		await this.renderer.draw(this.text, e, t, this);
	}
	getParser() {
		return this.parser;
	}
	getType() {
		return this.type;
	}
}, $t = [], en = /* @__PURE__ */ r(() => {
	$t.forEach((e) => {
		e();
	}), $t = [];
}, "attachFunctions"), tn = /* @__PURE__ */ r((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
function nn(e) {
	let t = e.match(v);
	if (!t) return {
		text: e,
		metadata: {}
	};
	let n = ce(t[1], { schema: le }) ?? {};
	n = typeof n == "object" && !Array.isArray(n) ? n : {};
	let r = {};
	return n.displayMode && (r.displayMode = n.displayMode.toString()), n.title && (r.title = n.title.toString()), n.config && (r.config = n.config), {
		text: e.slice(t[0].length),
		metadata: r
	};
}
r(nn, "extractFrontMatter");
var rn = /* @__PURE__ */ r((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e, t, n) => "<" + t + n.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), an = /* @__PURE__ */ r((e) => {
	let { text: t, metadata: n } = nn(e), { displayMode: r, title: i, config: a = {} } = n;
	return r && (a.gantt ||= {}, a.gantt.displayMode = r), {
		title: i,
		config: a,
		text: t
	};
}, "processFrontmatter"), on = /* @__PURE__ */ r((e) => {
	let t = k.detectInit(e) ?? {}, n = k.detectDirective(e, "wrap");
	return Array.isArray(n) ? t.wrap = n.some(({ type: e }) => e === "wrap") : n?.type === "wrap" && (t.wrap = !0), {
		text: A(e),
		directive: t
	};
}, "processDirectives");
function sn(e) {
	let t = an(rn(e)), n = on(t.text), r = re(t.config, n.directive);
	return e = tn(n.text), {
		code: e,
		title: t.title,
		config: r
	};
}
r(sn, "preprocessDiagram");
function cn(e) {
	let t = new TextEncoder().encode(e), n = Array.from(t, (e) => String.fromCodePoint(e)).join("");
	return btoa(n);
}
r(cn, "toBase64");
var ln = 5e4, un = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", dn = "sandbox", fn = "loose", pn = "http://www.w3.org/2000/svg", mn = "http://www.w3.org/1999/xlink", hn = "http://www.w3.org/1999/xhtml", gn = "100%", _n = "100%", vn = "border:0;margin:0;", yn = "margin:0", bn = "allow-top-navigation-by-user-activation allow-popups", xn = "The \"iframe\" tag is not supported by your browser.", Sn = ["foreignobject"], Cn = ["dominant-baseline"];
function wn(e) {
	let t = sn(e);
	return a(), x(t.config ?? {}), t;
}
r(wn, "processAndSetConfigs");
async function Tn(e, t) {
	X();
	try {
		let { code: t, config: n } = wn(e);
		return {
			diagramType: (await In(t)).type,
			config: n
		};
	} catch (e) {
		if (t?.suppressErrors) return !1;
		throw e;
	}
}
r(Tn, "parse");
var En = /* @__PURE__ */ r((e, t, n = []) => `
.${e} ${t} { ${n.join(" !important; ")} !important; }`, "cssImportantStyles"), Dn = /* @__PURE__ */ r((t, n = /* @__PURE__ */ new Map()) => {
	let r = "";
	if (t.themeCSS !== void 0 && (r += `
${t.themeCSS}`), t.fontFamily !== void 0 && (r += `
:root { --mermaid-font-family: ${t.fontFamily}}`), t.altFontFamily !== void 0 && (r += `
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`), n instanceof Map) {
		let i = ee(t) ? ["> *", "span"] : [
			"rect",
			"polygon",
			"ellipse",
			"circle",
			"path"
		];
		n.forEach((t) => {
			e(t.styles) || i.forEach((e) => {
				r += En(t.id, e, t.styles);
			}), e(t.textStyles) || (r += En(t.id, "tspan", (t?.textStyles || []).map((e) => e.replace("color", "fill"))));
		});
	}
	return r;
}, "createCssStyles"), On = /* @__PURE__ */ r((e, t, n, r) => Pe(Ae(`${r}{${c(t, Dn(e, n), {
	...e.themeVariables,
	theme: e.theme,
	look: e.look
}, r)}}`), Fe), "createUserStyles"), kn = /* @__PURE__ */ r((e = "", t, n) => {
	let r = e;
	return !n && !t && (r = r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, "marker-end=\"url(#")), r = ne(r), r = r.replace(/<br>/g, "<br/>"), r;
}, "cleanUpSvgCode"), An = /* @__PURE__ */ r((e = "", t) => `<iframe style="width:${gn};height:${t?.viewBox?.baseVal?.height ? t.viewBox.baseVal.height + "px" : _n};${vn}" src="data:text/html;charset=UTF-8;base64,${cn(`<body style="${yn}">${e}</body>`)}" sandbox="${bn}">
  ${xn}
</iframe>`, "putIntoIFrame"), jn = /* @__PURE__ */ r((e, t, n, r, i) => {
	let a = e.append("div");
	a.attr("id", n), r && a.attr("style", r);
	let o = a.append("svg").attr("id", t).attr("width", "100%").attr("xmlns", pn);
	return i && o.attr("xmlns:xlink", i), o.append("g"), e;
}, "appendDivSvgG");
function Mn(e, t) {
	return e.append("iframe").attr("id", t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
}
r(Mn, "sandboxedIframe");
var Nn = /* @__PURE__ */ r((e, t, n, r) => {
	e.getElementById(t)?.remove(), e.getElementById(n)?.remove(), e.getElementById(r)?.remove();
}, "removeExistingElements"), Pn = /* @__PURE__ */ r(async function(e, t, a) {
	X();
	let o = wn(t);
	t = o.code;
	let s = E();
	n.debug(s), t.length > (s?.maxTextSize ?? ln) && (t = un);
	let c = "#" + e, l = "i" + e, u = "#" + l, d = "d" + e, f = "#" + d, p = /* @__PURE__ */ r(() => {
		let e = i(g ? u : f).node();
		e && "remove" in e && e.remove();
	}, "removeTempElements"), m = i("body"), g = s.securityLevel === dn, _ = s.securityLevel === fn, v = s.fontFamily;
	a === void 0 ? (Nn(document, e, d, l), g ? (m = i(Mn(i("body"), l).nodes()[0].contentDocument.body), m.node().style.margin = 0) : m = i("body"), jn(m, e, d)) : (a && (a.innerHTML = ""), g ? (m = i(Mn(i(a), l).nodes()[0].contentDocument.body), m.node().style.margin = 0) : m = i(a), jn(m, e, d, `font-family: ${v}`, mn));
	let b, x;
	try {
		b = await Qt.fromText(t, { title: o.title });
	} catch (e) {
		if (s.suppressErrorRendering) throw p(), e;
		b = await Qt.fromText("error"), x = e;
	}
	let S = m.select(f).node(), C = b.type, w = S.firstChild, ee = w.firstChild, T = b.renderer.getClasses?.(t, b), te = On(s, C, T, c), D = document.createElement("style");
	D.innerHTML = te, w.insertBefore(D, ee);
	try {
		await b.renderer.draw(t, e, "11.14.0", b);
	} catch (n) {
		throw s.suppressErrorRendering ? p() : _t.draw(t, e, "11.14.0"), n;
	}
	let O = m.select(`${f} svg`), k = b.db.getAccTitle?.(), ne = b.db.getAccDescription?.();
	Ln(C, O, k, ne), m.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns", hn);
	let A = m.select(f).node().innerHTML;
	if (n.debug("config.arrowMarkerAbsolute", s.arrowMarkerAbsolute), A = kn(A, g, y(s.arrowMarkerAbsolute)), g) {
		let e = m.select(f + " svg").node();
		A = An(A, e);
	} else _ || (A = h.sanitize(A, {
		ADD_TAGS: Sn,
		ADD_ATTR: Cn,
		HTML_INTEGRATION_POINTS: { foreignobject: !0 }
	}));
	if (en(), x) throw x;
	return p(), {
		diagramType: C,
		svg: A,
		bindFunctions: b.db.bindFunctions
	};
}, "render");
function Fn(e = {}) {
	let n = C({}, e);
	n?.fontFamily && !n.themeVariables?.fontFamily && (n.themeVariables ||= {}, n.themeVariables.fontFamily = n.fontFamily), te(n), n?.theme && n.theme in m ? n.themeVariables = m[n.theme].getThemeVariables(n.themeVariables) : n && (n.themeVariables = m.default.getThemeVariables(n.themeVariables)), t((typeof n == "object" ? o(n) : f()).logLevel), X();
}
r(Fn, "initialize");
var In = /* @__PURE__ */ r((e, t = {}) => {
	let { code: n } = sn(e);
	return Qt.fromText(n, t);
}, "getDiagramFromText");
function Ln(e, t, n, r) {
	Xt(t, e), Zt(t, n, r, t.attr("id"));
}
r(Ln, "addA11yInfo");
var Z = Object.freeze({
	render: Pn,
	parse: Tn,
	getDiagramFromText: In,
	initialize: Fn,
	getConfig: E,
	setConfig: s,
	getSiteConfig: f,
	updateSiteConfig: p,
	reset: /* @__PURE__ */ r(() => {
		a();
	}, "reset"),
	globalReset: /* @__PURE__ */ r(() => {
		a(b);
	}, "globalReset"),
	defaultConfig: b
});
t(E().logLevel), a(E());
var Rn = /* @__PURE__ */ r((e, t, r) => {
	n.warn(e), O(e) ? (r && r(e.str, e.hash), t.push({
		...e,
		message: e.str,
		error: e
	})) : (r && r(e), e instanceof Error && t.push({
		str: e.message,
		message: e.message,
		hash: e.name,
		error: e
	}));
}, "handleError"), zn = /* @__PURE__ */ r(async function(e = { querySelector: ".mermaid" }) {
	try {
		await Bn(e);
	} catch (t) {
		if (O(t) && n.error(t.str), $.parseError && $.parseError(t), !e.suppressErrors) throw n.error("Use the suppressErrors option to suppress these errors"), t;
	}
}, "run"), Bn = /* @__PURE__ */ r(async function({ postRenderCallback: e, querySelector: t, nodes: r } = { querySelector: ".mermaid" }) {
	let i = Z.getConfig();
	n.debug(`${e ? "" : "No "}Callback function found`);
	let a;
	if (r) a = r;
	else if (t) a = document.querySelectorAll(t);
	else throw Error("Nodes and querySelector are both undefined");
	n.debug(`Found ${a.length} diagrams`), i?.startOnLoad !== void 0 && (n.debug("Start On Load: " + i?.startOnLoad), Z.updateSiteConfig({ startOnLoad: i?.startOnLoad }));
	let o = new k.InitIDGenerator(i.deterministicIds, i.deterministicIDSeed), s, c = [];
	for (let t of Array.from(a)) {
		if (n.info("Rendering diagram: " + t.id), t.getAttribute("data-processed")) continue;
		t.setAttribute("data-processed", "true");
		let r = `mermaid-${o.next()}`;
		s = t.innerHTML, s = oe(k.entityDecode(s)).trim().replace(/<br\s*\/?>/gi, "<br/>");
		let i = k.detectInit(s);
		i && n.debug("Detected early reinit: ", i);
		try {
			let { svg: n, bindFunctions: i } = await Yn(r, s, t);
			t.innerHTML = n, e && await e(r), i && i(t);
		} catch (e) {
			Rn(e, c, $.parseError);
		}
	}
	if (c.length > 0) throw c[0];
}, "runThrowsErrors"), Vn = /* @__PURE__ */ r(function(e) {
	Z.initialize(e);
}, "initialize"), Hn = /* @__PURE__ */ r(async function(e, t, r) {
	n.warn("mermaid.init is deprecated. Please use run instead."), e && Vn(e);
	let i = {
		postRenderCallback: r,
		querySelector: ".mermaid"
	};
	typeof t == "string" ? i.querySelector = t : t && (t instanceof HTMLElement ? i.nodes = [t] : i.nodes = t), await zn(i);
}, "init"), Un = /* @__PURE__ */ r(async (e, { lazyLoad: t = !0 } = {}) => {
	X(), u(...e), t === !1 && await Jt();
}, "registerExternalDiagrams"), Wn = /* @__PURE__ */ r(function() {
	if ($.startOnLoad) {
		let { startOnLoad: e } = Z.getConfig();
		e && $.run().catch((e) => n.error("Mermaid failed to initialize", e));
	}
}, "contentLoaded");
typeof document < "u" && window.addEventListener("load", Wn, !1);
var Gn = /* @__PURE__ */ r(function(e) {
	$.parseError = e;
}, "setParseErrorHandler"), Q = [], Kn = !1, qn = /* @__PURE__ */ r(async () => {
	if (!Kn) {
		for (Kn = !0; Q.length > 0;) {
			let e = Q.shift();
			if (e) try {
				await e();
			} catch (e) {
				n.error("Error executing queue", e);
			}
		}
		Kn = !1;
	}
}, "executeQueue"), Jn = /* @__PURE__ */ r(async (e, t) => new Promise((i, a) => {
	let o = /* @__PURE__ */ r(() => new Promise((r, o) => {
		Z.parse(e, t).then((e) => {
			r(e), i(e);
		}, (e) => {
			n.error("Error parsing", e), $.parseError?.(e), o(e), a(e);
		});
	}), "performCall");
	Q.push(o), qn().catch(a);
}), "parse"), Yn = /* @__PURE__ */ r((e, t, i) => new Promise((a, o) => {
	let s = /* @__PURE__ */ r(() => new Promise((r, s) => {
		Z.render(e, t, i).then((e) => {
			r(e), a(e);
		}, (e) => {
			n.error("Error parsing", e), $.parseError?.(e), s(e), o(e);
		});
	}), "performCall");
	Q.push(s), qn().catch(o);
}), "render"), $ = {
	startOnLoad: !0,
	mermaidAPI: Z,
	parse: Jn,
	render: Yn,
	init: Hn,
	run: zn,
	registerExternalDiagrams: Un,
	registerLayoutLoaders: se,
	initialize: Vn,
	parseError: void 0,
	contentLoaded: Wn,
	setParseErrorHandler: Gn,
	detectType: _,
	registerIconPacks: ae,
	getRegisteredDiagramsMetadata: /* @__PURE__ */ r(() => Object.keys(S).map((e) => ({ id: e })), "getRegisteredDiagramsMetadata")
}, Xn = $;
//#endregion
export { Xn as default };

//# sourceMappingURL=mermaid.core-o6lwF-Gt.js.map