for-humanity 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +16 -9
- package/dist/browser.js +14 -16
- package/dist/cli.css +2 -968
- package/dist/cli.js +92 -2318
- package/dist/config.js +1 -0
- package/dist/constant/copy.d.ts +100 -0
- package/dist/constant/site.d.ts +20 -0
- package/dist/constant/status.d.ts +19 -0
- package/dist/copy-C1uzvEnr.js +103 -0
- package/dist/group-path-XAThmzvC.js +10 -0
- package/dist/load-site-B-u5-jv0.js +2343 -0
- package/dist/logger-Dv1i9xSV.js +9 -0
- package/dist/mermaid/THIRD-PARTY-NOTICES.txt +3134 -0
- package/dist/mermaid/chunk--TN-qHgG.js +2 -0
- package/dist/mermaid/chunk-0kM1Lv4D.js +2 -0
- package/dist/mermaid/chunk-3FHei3pH.js +2001 -0
- package/dist/mermaid/chunk-3_2p2GqN.js +2 -0
- package/dist/mermaid/chunk-6HLei9i0.js +84 -0
- package/dist/mermaid/chunk-7Sz3kAwl.js +2214 -0
- package/dist/mermaid/chunk-7Tarqbpa.js +18047 -0
- package/dist/mermaid/chunk-9kkt8lzL.js +10 -0
- package/dist/mermaid/chunk-B--pNBQF.js +884 -0
- package/dist/mermaid/chunk-B4F-pysn.js +4241 -0
- package/dist/mermaid/chunk-B58sEIY_.js +14 -0
- package/dist/mermaid/chunk-B9_UWzSH.js +1517 -0
- package/dist/mermaid/chunk-BB8uZHwY.js +75 -0
- package/dist/mermaid/chunk-BFfk0LEc.js +717 -0
- package/dist/mermaid/chunk-BKri0qr7.js +89 -0
- package/dist/mermaid/chunk-BL404pH5.js +26 -0
- package/dist/mermaid/chunk-BLeiQSWo.js +354 -0
- package/dist/mermaid/chunk-BOmH_UFd.js +2 -0
- package/dist/mermaid/chunk-BSej9Nhy.js +1361 -0
- package/dist/mermaid/chunk-BYzrzvCI.js +12 -0
- package/dist/mermaid/chunk-BariMtWr.js +3020 -0
- package/dist/mermaid/chunk-BcrBoMwH.js +2352 -0
- package/dist/mermaid/chunk-Bok8z-Yo.js +67 -0
- package/dist/mermaid/chunk-BpTHLKQM.js +1970 -0
- package/dist/mermaid/chunk-BqjuxRsC.js +733 -0
- package/dist/mermaid/chunk-BuvPd-s5.js +1073 -0
- package/dist/mermaid/chunk-BvVehae3.js +5069 -0
- package/dist/mermaid/chunk-C-JABYpd.js +3075 -0
- package/dist/mermaid/chunk-C9XlTm4w.js +2 -0
- package/dist/mermaid/chunk-CApNbSU9.js +6 -0
- package/dist/mermaid/chunk-CCM2AH-C.js +9 -0
- package/dist/mermaid/chunk-CD1E0F_N.js +2 -0
- package/dist/mermaid/chunk-CDWvKG7D.js +2 -0
- package/dist/mermaid/chunk-CEVPpC1F.js +34 -0
- package/dist/mermaid/chunk-CLDr12lf.js +47504 -0
- package/dist/mermaid/chunk-CLVYqOBI.js +61 -0
- package/dist/mermaid/chunk-CLeOkFb5.js +15 -0
- package/dist/mermaid/chunk-CLgRAtOz.js +37 -0
- package/dist/mermaid/chunk-CMqFNUBl.js +134 -0
- package/dist/mermaid/chunk-CTPaBJXB.js +2 -0
- package/dist/mermaid/chunk-CVi6IGBL.js +2 -0
- package/dist/mermaid/chunk-CWV_EN-4.js +4745 -0
- package/dist/mermaid/chunk-CZ0dAs3g.js +2 -0
- package/dist/mermaid/chunk-C_YGy4Fn.js +236 -0
- package/dist/mermaid/chunk-CcVH22Yt.js +100 -0
- package/dist/mermaid/chunk-CgG6CD9_.js +7175 -0
- package/dist/mermaid/chunk-CgOP6IDB.js +3397 -0
- package/dist/mermaid/chunk-Cgg2UTSf.js +13 -0
- package/dist/mermaid/chunk-ChJfJJ1A.js +214 -0
- package/dist/mermaid/chunk-Ck5XRA46.js +447 -0
- package/dist/mermaid/chunk-Ckuw16cl.js +203 -0
- package/dist/mermaid/chunk-CpAbRCbF.js +1880 -0
- package/dist/mermaid/chunk-CuYekbSv.js +2 -0
- package/dist/mermaid/chunk-CwS4wZ5a.js +2 -0
- package/dist/mermaid/chunk-D-bcrBO3.js +82 -0
- package/dist/mermaid/chunk-D3IEAkCW.js +76 -0
- package/dist/mermaid/chunk-D8XfBJ_K.js +645 -0
- package/dist/mermaid/chunk-D9Ddd9y4.js +2228 -0
- package/dist/mermaid/chunk-DBh1mIbK.js +12 -0
- package/dist/mermaid/chunk-DD6Df6Ic.js +5 -0
- package/dist/mermaid/chunk-DGVDaXjx.js +8 -0
- package/dist/mermaid/chunk-DK9KqIXj.js +632 -0
- package/dist/mermaid/chunk-DORnIAsy.js +4487 -0
- package/dist/mermaid/chunk-DU69_VcF.js +363 -0
- package/dist/mermaid/chunk-DVNvSFoz.js +2144 -0
- package/dist/mermaid/chunk-DZe-4kde.js +20 -0
- package/dist/mermaid/chunk-D_a06Rz4.js +287 -0
- package/dist/mermaid/chunk-DfyFJJi2.js +972 -0
- package/dist/mermaid/chunk-DhKYPp1Z.js +2 -0
- package/dist/mermaid/chunk-DjFqgNTG.js +94 -0
- package/dist/mermaid/chunk-DmbDDrr-.js +65 -0
- package/dist/mermaid/chunk-DpuxlyL_.js +696 -0
- package/dist/mermaid/chunk-DqGhppWe.js +2 -0
- package/dist/mermaid/chunk-DqPZxHXa.js +5 -0
- package/dist/mermaid/chunk-Dt_1Jyif.js +293 -0
- package/dist/mermaid/chunk-DyQBE_NW.js +1935 -0
- package/dist/mermaid/chunk-JckyC4mW.js +1009 -0
- package/dist/mermaid/chunk-K7Myuj2-.js +1334 -0
- package/dist/mermaid/chunk-KuPYb48V.js +275 -0
- package/dist/mermaid/chunk-MFVRUoO0.js +4020 -0
- package/dist/mermaid/chunk-MbInCS_6.js +28 -0
- package/dist/mermaid/chunk-MexOLyKV.js +355 -0
- package/dist/mermaid/chunk-NnbDtJzg.js +21856 -0
- package/dist/mermaid/chunk-SGpOYZbI.js +2139 -0
- package/dist/mermaid/chunk-TbxLDlcU.js +198 -0
- package/dist/mermaid/chunk-TftHqGLg.js +490 -0
- package/dist/mermaid/chunk-UjQ8vA_Z.js +4138 -0
- package/dist/mermaid/chunk-YgmVTKqc.js +16 -0
- package/dist/mermaid/chunk-_a9EZE1v.js +1798 -0
- package/dist/mermaid/chunk-dTb8jqeP.js +2 -0
- package/dist/mermaid/chunk-fFdMfF8S.js +2240 -0
- package/dist/mermaid/chunk-feYbMzBj.js +1267 -0
- package/dist/mermaid/chunk-g3Pn8DkW.js +46 -0
- package/dist/mermaid/chunk-hM77LvCb.js +19832 -0
- package/dist/mermaid/chunk-hUDb-eAW.js +527 -0
- package/dist/mermaid/chunk-tpABtZ-3.js +4252 -0
- package/dist/mermaid/chunk-xIbz3oFK.js +59 -0
- package/dist/mermaid/chunk-yBz-vst0.js +976 -0
- package/dist/mermaid/mermaid-BhtR3wyB.js +1145 -0
- package/dist/run-site-command-cqCjpIlc.js +129 -0
- package/dist/site-config-bllORGpm.js +90 -0
- package/dist/site.js +1 -0
- package/dist/start-dev-server-x7Ja5uwv.js +184 -0
- package/dist/to-change-queue-DbEnZGNK.js +34 -0
- package/dist/to-error-message-pF6_7wGK.js +16 -0
- package/dist/type/group-path.d.ts +7 -0
- package/dist/type/site-config.d.ts +57 -0
- package/package.json +34 -17
- package/src/component/widget/cursor-face/_constant/cursor-face.ts +0 -14
- package/src/component/widget/cursor-face/wg-cursor-face.css +0 -15
- package/src/component/widget/cursor-face/wg-cursor-face.tsx +0 -153
- package/src/component/widget/navigation/_constant/locale.ts +0 -9
- package/src/component/widget/navigation/_constant/navigation-data-schema.ts +0 -33
- package/src/component/widget/navigation/_constant/navigation.ts +0 -9
- package/src/component/widget/navigation/_constant/reading-line.ts +0 -4
- package/src/component/widget/navigation/_function/restore-navigation-scroll.ts +0 -59
- package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-branches.ts +0 -15
- package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-group-branches.ts +0 -70
- package/src/component/widget/navigation/_function/to-doc-groups/to-doc-groups.ts +0 -15
- package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-document.ts +0 -13
- package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-group.ts +0 -13
- package/src/component/widget/navigation/_function/to-navigation-data/to-navigation-data.ts +0 -18
- package/src/component/widget/navigation/_function/to-navigation-json.ts +0 -8
- package/src/component/widget/navigation/_function/to-toc-groups.ts +0 -38
- package/src/component/widget/navigation/_type/doc-branch.ts +0 -11
- package/src/component/widget/navigation/_type/doc-group.ts +0 -24
- package/src/component/widget/navigation/_type/navigation-data.ts +0 -75
- package/src/component/widget/navigation/_type/navigation-focus-snapshot.ts +0 -17
- package/src/component/widget/navigation/_type/toc-group.ts +0 -39
- package/src/component/widget/navigation/_wg-navigation-nav-list.css +0 -48
- package/src/component/widget/navigation/_wg-navigation-nav-list.tsx +0 -61
- package/src/component/widget/navigation/_wg-navigation-nav.css +0 -21
- package/src/component/widget/navigation/_wg-navigation-nav.tsx +0 -33
- package/src/component/widget/navigation/_wg-navigation-scroll.tsx +0 -117
- package/src/component/widget/navigation/_wg-navigation-toc.css +0 -91
- package/src/component/widget/navigation/_wg-navigation-toc.tsx +0 -114
- package/src/component/widget/navigation/wg-navigation.css +0 -282
- package/src/component/widget/navigation/wg-navigation.tsx +0 -420
- package/src/component/widget/prose/_constant/heading-highlight.ts +0 -4
- package/src/component/widget/prose/_constant/section.ts +0 -7
- package/src/component/widget/prose/_constant/status.ts +0 -9
- package/src/component/widget/prose/_function/has-block-content.ts +0 -30
- package/src/component/widget/prose/_function/rehype-head.ts +0 -31
- package/src/component/widget/prose/_function/rehype-sections/_to-section-headings.ts +0 -20
- package/src/component/widget/prose/_function/rehype-sections/rehype-sections.ts +0 -21
- package/src/component/widget/prose/_function/rehype-tables.ts +0 -22
- package/src/component/widget/prose/_function/remark-blocks.ts +0 -112
- package/src/component/widget/prose/_function/remark-flow.ts +0 -26
- package/src/component/widget/prose/_function/remark-links.ts +0 -33
- package/src/component/widget/prose/_function/remark-parts.ts +0 -26
- package/src/component/widget/prose/_function/remark-status.ts +0 -59
- package/src/component/widget/prose/_function/remark-swatch.ts +0 -16
- package/src/component/widget/prose/_function/remark-unknown-directives.ts +0 -25
- package/src/component/widget/prose/wg-prose.css +0 -484
- package/src/component/widget/prose/wg-prose.tsx +0 -43
- package/src/component/widget/shell/wg-shell.css +0 -63
- package/src/component/widget/shell/wg-shell.tsx +0 -88
- package/src/component/widget/shell-controls/wg-shell-controls.css +0 -4
- package/src/component/widget/shell-controls/wg-shell-controls.tsx +0 -170
- package/src/constant/asset.ts +0 -63
- package/src/constant/copy.ts +0 -133
- package/src/constant/doc.ts +0 -13
- package/src/constant/font.ts +0 -34
- package/src/constant/site.ts +0 -24
- package/src/constant/status.ts +0 -15
- package/src/entry/browser/browser.tsx +0 -22
- package/src/entry/cli/_constant/cli.ts +0 -19
- package/src/entry/cli/_constant/crawling.ts +0 -14
- package/src/entry/cli/_constant/snippet.ts +0 -21
- package/src/entry/cli/_function/create-app.tsx +0 -57
- package/src/entry/cli/_function/create-dev-app.ts +0 -87
- package/src/entry/cli/_function/create-processor/_rehype-assets.ts +0 -70
- package/src/entry/cli/_function/create-processor/_rehype-heading-ids.ts +0 -34
- package/src/entry/cli/_function/create-processor/_remark-report.ts +0 -15
- package/src/entry/cli/_function/create-processor/_remark-snippets.ts +0 -117
- package/src/entry/cli/_function/create-processor/_shiki-transformers.ts +0 -91
- package/src/entry/cli/_function/create-processor/create-processor.ts +0 -64
- package/src/entry/cli/_function/read-docs.ts +0 -128
- package/src/entry/cli/_function/read-home.ts +0 -32
- package/src/entry/cli/_function/to-crawling-app.ts +0 -42
- package/src/entry/cli/cli.test.ts +0 -804
- package/src/entry/cli/cli.ts +0 -206
- package/src/env.d.ts +0 -6
- package/src/page/doc/pg-doc.tsx +0 -35
- package/src/page/home/pg-home.tsx +0 -40
- package/src/store/navigation/create-navigation-stores.test.ts +0 -74
- package/src/store/navigation/create-navigation-stores.ts +0 -59
- package/src/store/navigation/navigation-state.ts +0 -36
- package/src/store/navigation/navigation-storage.ts +0 -9
- package/src/store/navigation/to-navigation-scroll-state.ts +0 -42
- package/src/style/base.css +0 -28
- package/src/style/token.css +0 -188
- package/src/type/doc-content.ts +0 -15
- package/src/type/doc-data.ts +0 -38
- package/src/type/doc-file-data.ts +0 -21
- package/src/type/doc-heading.ts +0 -17
- package/src/type/doc-outline.ts +0 -16
- package/src/type/doc-section.ts +0 -9
- package/src/type/doc.ts +0 -20
- package/src/type/group-path.ts +0 -7
- package/src/type/site-assets.ts +0 -25
- package/src/type/site-config.ts +0 -73
- package/src/type/vfile-data.d.ts +0 -10
- package/src/util/async/to-change-queue.test.ts +0 -58
- package/src/util/async/to-change-queue.ts +0 -43
- package/src/util/dom/find-hash-target.ts +0 -18
- package/src/util/dom/reveal-hash-target.ts +0 -15
- package/src/util/error/to-error-message.ts +0 -10
- package/src/util/file/to-asset-path.ts +0 -26
- package/src/util/font/to-font-css.test.ts +0 -41
- package/src/util/font/to-font-css.ts +0 -28
- package/src/util/mermaid/render-flow.js +0 -321
|
@@ -0,0 +1,1145 @@
|
|
|
1
|
+
import { h as e, m as t, p as n } from "./chunk-DVNvSFoz.js";
|
|
2
|
+
import { n as r } from "./chunk-BYzrzvCI.js";
|
|
3
|
+
import { $ as i, I as a, J as o, K as s, L as c, N as l, P as u, Q as d, S as f, T as p, V as m, W as h, Z as g, c as _, et as v, f as y, g as b, j as x, l as S, m as C, n as w, p as T, r as ee, t as te, u as E, w as ne, x as D, y as O } from "./chunk-MFVRUoO0.js";
|
|
4
|
+
import { C as re, S as ie, _ as k, a as ae, b as oe, g as se, i as ce, l as le, o as ue, p as de, y as fe } from "./chunk-K7Myuj2-.js";
|
|
5
|
+
import { t as pe } from "./chunk-B58sEIY_.js";
|
|
6
|
+
import { n as me, t as he } from "./chunk-B9_UWzSH.js";
|
|
7
|
+
import "./chunk-Bok8z-Yo.js";
|
|
8
|
+
import { r as ge } from "./chunk-KuPYb48V.js";
|
|
9
|
+
import { a as _e } from "./chunk-_a9EZE1v.js";
|
|
10
|
+
import "./chunk-DORnIAsy.js";
|
|
11
|
+
import "./chunk-CLgRAtOz.js";
|
|
12
|
+
import "./chunk-DU69_VcF.js";
|
|
13
|
+
import "./chunk-DpuxlyL_.js";
|
|
14
|
+
import { n as ve } from "./chunk-BB8uZHwY.js";
|
|
15
|
+
//#region node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs
|
|
16
|
+
function ye(e) {
|
|
17
|
+
let t = e?.constructor;
|
|
18
|
+
return e === (typeof t == "function" ? t.prototype : Object.prototype);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isEmpty.mjs
|
|
22
|
+
function be(e) {
|
|
23
|
+
if (e == null) return !0;
|
|
24
|
+
if (ie(e)) return typeof e.splice != "function" && typeof e != "string" && !re(e) && !fe(e) && !oe(e) ? !1 : e.length === 0;
|
|
25
|
+
if (typeof e == "object" || typeof e == "function") {
|
|
26
|
+
if (e instanceof Map || e instanceof Set) return e.size === 0;
|
|
27
|
+
let t = Object.keys(e);
|
|
28
|
+
return ye(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
|
|
29
|
+
}
|
|
30
|
+
return !0;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Enum.js
|
|
34
|
+
var xe = "comm", Se = "rule", Ce = "decl", we = "@import", Te = "@namespace", Ee = "@keyframes", De = "@layer", Oe = Math.abs, A = String.fromCharCode;
|
|
35
|
+
function ke(e) {
|
|
36
|
+
return e.trim();
|
|
37
|
+
}
|
|
38
|
+
function j(e, t, n) {
|
|
39
|
+
return e.replace(t, n);
|
|
40
|
+
}
|
|
41
|
+
function M(e, t) {
|
|
42
|
+
return e.charCodeAt(t) | 0;
|
|
43
|
+
}
|
|
44
|
+
function N(e, t, n) {
|
|
45
|
+
return e.slice(t, n);
|
|
46
|
+
}
|
|
47
|
+
function P(e) {
|
|
48
|
+
return e.length;
|
|
49
|
+
}
|
|
50
|
+
function Ae(e) {
|
|
51
|
+
return e.length;
|
|
52
|
+
}
|
|
53
|
+
function F(e, t) {
|
|
54
|
+
return t.push(e), e;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Tokenizer.js
|
|
58
|
+
var I = 1, L = 1, je = 0, R = 0, z = 0, B = "";
|
|
59
|
+
function Me(e, t, n, r, i, a, o, s) {
|
|
60
|
+
return {
|
|
61
|
+
value: e,
|
|
62
|
+
root: t,
|
|
63
|
+
parent: n,
|
|
64
|
+
type: r,
|
|
65
|
+
props: i,
|
|
66
|
+
children: a,
|
|
67
|
+
line: I,
|
|
68
|
+
column: L,
|
|
69
|
+
length: o,
|
|
70
|
+
return: "",
|
|
71
|
+
siblings: s
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function Ne() {
|
|
75
|
+
return z;
|
|
76
|
+
}
|
|
77
|
+
function Pe() {
|
|
78
|
+
return z = R > 0 ? M(B, --R) : 0, L--, z === 10 && (L = 1, I--), z;
|
|
79
|
+
}
|
|
80
|
+
function V() {
|
|
81
|
+
return z = R < je ? M(B, R++) : 0, L++, z === 10 && (L = 1, I++), z;
|
|
82
|
+
}
|
|
83
|
+
function H() {
|
|
84
|
+
return M(B, R);
|
|
85
|
+
}
|
|
86
|
+
function U() {
|
|
87
|
+
return R;
|
|
88
|
+
}
|
|
89
|
+
function W(e, t) {
|
|
90
|
+
return N(B, e, t);
|
|
91
|
+
}
|
|
92
|
+
function G(e) {
|
|
93
|
+
switch (e) {
|
|
94
|
+
case 0:
|
|
95
|
+
case 9:
|
|
96
|
+
case 10:
|
|
97
|
+
case 13:
|
|
98
|
+
case 32: return 5;
|
|
99
|
+
case 33:
|
|
100
|
+
case 43:
|
|
101
|
+
case 44:
|
|
102
|
+
case 47:
|
|
103
|
+
case 62:
|
|
104
|
+
case 64:
|
|
105
|
+
case 126:
|
|
106
|
+
case 59:
|
|
107
|
+
case 123:
|
|
108
|
+
case 125: return 4;
|
|
109
|
+
case 58: return 3;
|
|
110
|
+
case 34:
|
|
111
|
+
case 39:
|
|
112
|
+
case 40:
|
|
113
|
+
case 91: return 2;
|
|
114
|
+
case 41:
|
|
115
|
+
case 93: return 1;
|
|
116
|
+
}
|
|
117
|
+
return 0;
|
|
118
|
+
}
|
|
119
|
+
function Fe(e) {
|
|
120
|
+
return I = L = 1, je = P(B = e), R = 0, [];
|
|
121
|
+
}
|
|
122
|
+
function Ie(e) {
|
|
123
|
+
return B = "", e;
|
|
124
|
+
}
|
|
125
|
+
function Le(e) {
|
|
126
|
+
return ke(W(R - 1, Be(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
127
|
+
}
|
|
128
|
+
function Re(e) {
|
|
129
|
+
for (; (z = H()) && z < 33;) V();
|
|
130
|
+
return G(e) > 2 || G(z) > 3 ? "" : " ";
|
|
131
|
+
}
|
|
132
|
+
function ze(e, t) {
|
|
133
|
+
for (; --t && V() && !(z < 48 || z > 102 || z > 57 && z < 65 || z > 70 && z < 97););
|
|
134
|
+
return W(e, U() + (t < 6 && H() == 32 && V() == 32));
|
|
135
|
+
}
|
|
136
|
+
function Be(e) {
|
|
137
|
+
for (; V();) switch (z) {
|
|
138
|
+
case e: return R;
|
|
139
|
+
case 34:
|
|
140
|
+
case 39:
|
|
141
|
+
e !== 34 && e !== 39 && Be(z);
|
|
142
|
+
break;
|
|
143
|
+
case 40:
|
|
144
|
+
e === 41 && Be(e);
|
|
145
|
+
break;
|
|
146
|
+
case 92: V();
|
|
147
|
+
}
|
|
148
|
+
return R;
|
|
149
|
+
}
|
|
150
|
+
function Ve(e, t) {
|
|
151
|
+
for (; V() && e + z !== 57 && (e + z !== 84 || H() !== 47););
|
|
152
|
+
return "/*" + W(t, R - 1) + "*" + A(e === 47 ? e : V());
|
|
153
|
+
}
|
|
154
|
+
function He(e) {
|
|
155
|
+
for (; !G(H());) V();
|
|
156
|
+
return W(e, R);
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Parser.js
|
|
160
|
+
function Ue(e) {
|
|
161
|
+
return Ie(K("", null, null, null, [""], e = Fe(e), 0, [0], e));
|
|
162
|
+
}
|
|
163
|
+
function K(e, t, n, r, i, a, o, s, c) {
|
|
164
|
+
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 = V()) {
|
|
165
|
+
case 40:
|
|
166
|
+
m != 108 && M(w, d - 1) == 58 ? (v++, w += "(") : w += Le(y);
|
|
167
|
+
break;
|
|
168
|
+
case 41:
|
|
169
|
+
v--, w += ")";
|
|
170
|
+
break;
|
|
171
|
+
case 34:
|
|
172
|
+
case 39:
|
|
173
|
+
case 91:
|
|
174
|
+
w += Le(y);
|
|
175
|
+
break;
|
|
176
|
+
case 9:
|
|
177
|
+
case 10:
|
|
178
|
+
case 13:
|
|
179
|
+
case 32:
|
|
180
|
+
if (v > 0) {
|
|
181
|
+
w += A(y);
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
w += Re(m);
|
|
185
|
+
break;
|
|
186
|
+
case 92:
|
|
187
|
+
w += ze(U() - 1, 7);
|
|
188
|
+
continue;
|
|
189
|
+
case 47:
|
|
190
|
+
switch (H()) {
|
|
191
|
+
case 42:
|
|
192
|
+
case 47:
|
|
193
|
+
F(Ge(Ve(V(), U()), t, n, c), c), (G(m || 1) == 5 || G(H() || 1) == 5) && P(w) && N(w, -1, void 0) !== " " && (w += " ");
|
|
194
|
+
break;
|
|
195
|
+
default: w += "/";
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
case 123 * h: s[l++] = P(w) * _;
|
|
199
|
+
case 125 * h:
|
|
200
|
+
case 59:
|
|
201
|
+
case 0:
|
|
202
|
+
if (v > 0 && y) {
|
|
203
|
+
w += A(y);
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
switch (y) {
|
|
207
|
+
case 0:
|
|
208
|
+
case 125: g = 0;
|
|
209
|
+
case 59 + u:
|
|
210
|
+
_ == -1 && (w = j(w, /\f/g, "")), p > 0 && (P(w) - d || h === 0) && F(p > 32 ? Ke(w + ";", r, n, d - 1, c) : Ke(j(w, " ", "") + ";", r, n, d - 2, c), c);
|
|
211
|
+
break;
|
|
212
|
+
case 59: w += ";";
|
|
213
|
+
default: if (F(C = We(w, t, n, l, u, i, s, b, x = [], S = [], d, a), a), y === 123) {
|
|
214
|
+
if (u === 0) K(w, t, C, C, x, a, d, s, S);
|
|
215
|
+
else {
|
|
216
|
+
switch (f) {
|
|
217
|
+
case 99: if (M(w, 3) === 110) break;
|
|
218
|
+
case 108: if (M(w, 2) === 97) break;
|
|
219
|
+
default: u = 0;
|
|
220
|
+
case 100:
|
|
221
|
+
case 109:
|
|
222
|
+
case 115:
|
|
223
|
+
}
|
|
224
|
+
u ? K(e, C, C, r && F(We(e, C, C, 0, 0, i, s, b, i, x = [], d, S), S), i, S, d, s, r ? x : S) : K(w, C, C, C, [""], S, 0, s, S);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
l = u = p = 0, h = _ = 1, b = w = "", d = o;
|
|
229
|
+
break;
|
|
230
|
+
case 58: d = 1 + P(w), p = m;
|
|
231
|
+
default:
|
|
232
|
+
if (h < 1) {
|
|
233
|
+
if (y == 123) --h;
|
|
234
|
+
else if (y == 125 && h++ == 0 && Pe() == 125) continue;
|
|
235
|
+
}
|
|
236
|
+
switch (w += A(y), y * h) {
|
|
237
|
+
case 38:
|
|
238
|
+
_ = u > 0 ? 1 : (w += "\f", -1);
|
|
239
|
+
break;
|
|
240
|
+
case 44:
|
|
241
|
+
if (v > 0) break;
|
|
242
|
+
s[l++] = (P(w) - 1) * _, _ = 1;
|
|
243
|
+
break;
|
|
244
|
+
case 64:
|
|
245
|
+
H() === 45 && (w += Le(V())), f = H(), u = d = P(b = w += He(U())), y++;
|
|
246
|
+
break;
|
|
247
|
+
case 45: m === 45 && P(w) == 2 && (h = 0);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return a;
|
|
251
|
+
}
|
|
252
|
+
function We(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
253
|
+
for (var f = i - 1, p = i === 0 ? a : [""], m = Ae(p), h = 0, g = 0, _ = 0; h < r; ++h) for (var v = 0, y = N(e, f + 1, f = Oe(g = o[h])), b = e; v < m; ++v) (b = ke(g > 0 ? p[v] + " " + y : j(y, /&\f/g, p[v]))) && (c[_++] = b);
|
|
254
|
+
return Me(e, t, n, i === 0 ? Se : s, c, l, u, d);
|
|
255
|
+
}
|
|
256
|
+
function Ge(e, t, n, r) {
|
|
257
|
+
return Me(e, t, n, xe, A(Ne()), N(e, 2, -2), 0, r);
|
|
258
|
+
}
|
|
259
|
+
function Ke(e, t, n, r, i) {
|
|
260
|
+
return Me(e, t, n, Ce, N(e, 0, r), N(e, r + 1, -1), r, i);
|
|
261
|
+
}
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Serializer.js
|
|
264
|
+
function qe(e, t) {
|
|
265
|
+
for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
|
|
266
|
+
return n;
|
|
267
|
+
}
|
|
268
|
+
function Je(e, t, n, r) {
|
|
269
|
+
switch (e.type) {
|
|
270
|
+
case De: if (e.children.length) break;
|
|
271
|
+
case we:
|
|
272
|
+
case Te:
|
|
273
|
+
case Ce: return e.return = e.return || e.value;
|
|
274
|
+
case xe: return "";
|
|
275
|
+
case Ee: return e.return = e.value + "{" + qe(e.children, r) + "}";
|
|
276
|
+
case Se: if (!P(e.value = e.props.join(","))) return "";
|
|
277
|
+
}
|
|
278
|
+
return P(n = qe(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region node_modules/.pnpm/stylis@4.4.0/node_modules/stylis/src/Middleware.js
|
|
282
|
+
function Ye(e) {
|
|
283
|
+
var t = Ae(e);
|
|
284
|
+
return function(n, r, i, a) {
|
|
285
|
+
for (var o = "", s = 0; s < t; s++) o += e[s](n, r, i, a) || "";
|
|
286
|
+
return o;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/mermaid.core.mjs
|
|
291
|
+
var Xe = "c4", Ze = {
|
|
292
|
+
id: Xe,
|
|
293
|
+
detector: /* @__PURE__ */ r((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
|
|
294
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
295
|
+
let { diagram: e } = await import("./chunk-BariMtWr.js");
|
|
296
|
+
return {
|
|
297
|
+
id: Xe,
|
|
298
|
+
diagram: e
|
|
299
|
+
};
|
|
300
|
+
}, "loader")
|
|
301
|
+
}, Qe = "flowchart-v2", $e = {
|
|
302
|
+
id: Qe,
|
|
303
|
+
detector: /* @__PURE__ */ r((e) => /^\s*(graph|flowchart)/.test(e), "detector"),
|
|
304
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
305
|
+
let { diagram: e } = await import("./chunk-YgmVTKqc.js");
|
|
306
|
+
return {
|
|
307
|
+
id: Qe,
|
|
308
|
+
diagram: e
|
|
309
|
+
};
|
|
310
|
+
}, "loader")
|
|
311
|
+
}, et = "agentflow", tt = {
|
|
312
|
+
id: et,
|
|
313
|
+
detector: /* @__PURE__ */ r((e) => /^\s*agentflow-beta\b/.test(e), "detector"),
|
|
314
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
315
|
+
let { diagram: e } = await import("./chunk-BvVehae3.js");
|
|
316
|
+
return {
|
|
317
|
+
id: et,
|
|
318
|
+
diagram: e
|
|
319
|
+
};
|
|
320
|
+
}, "loader")
|
|
321
|
+
}, nt = "swimlane", rt = {
|
|
322
|
+
id: nt,
|
|
323
|
+
detector: /* @__PURE__ */ r((e) => /^\s*swimlane-beta\b/.test(e), "detector"),
|
|
324
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
325
|
+
let { diagram: e } = await import("./chunk-MbInCS_6.js");
|
|
326
|
+
return {
|
|
327
|
+
id: nt,
|
|
328
|
+
diagram: e
|
|
329
|
+
};
|
|
330
|
+
}, "loader")
|
|
331
|
+
}, it = "er", at = {
|
|
332
|
+
id: it,
|
|
333
|
+
detector: /* @__PURE__ */ r((e) => /^\s*erDiagram/.test(e), "detector"),
|
|
334
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
335
|
+
let { diagram: e } = await import("./chunk-BpTHLKQM.js");
|
|
336
|
+
return {
|
|
337
|
+
id: it,
|
|
338
|
+
diagram: e
|
|
339
|
+
};
|
|
340
|
+
}, "loader")
|
|
341
|
+
}, ot = "gitGraph", st = {
|
|
342
|
+
id: ot,
|
|
343
|
+
detector: /* @__PURE__ */ r((e) => /^\s*gitGraph/.test(e), "detector"),
|
|
344
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
345
|
+
let { diagram: e } = await import("./chunk-BqjuxRsC.js");
|
|
346
|
+
return {
|
|
347
|
+
id: ot,
|
|
348
|
+
diagram: e
|
|
349
|
+
};
|
|
350
|
+
}, "loader")
|
|
351
|
+
}, ct = "gantt", lt = {
|
|
352
|
+
id: ct,
|
|
353
|
+
detector: /* @__PURE__ */ r((e) => /^\s*gantt/.test(e), "detector"),
|
|
354
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
355
|
+
let { diagram: e } = await import("./chunk-C-JABYpd.js");
|
|
356
|
+
return {
|
|
357
|
+
id: ct,
|
|
358
|
+
diagram: e
|
|
359
|
+
};
|
|
360
|
+
}, "loader")
|
|
361
|
+
}, ut = "info", dt = {
|
|
362
|
+
id: ut,
|
|
363
|
+
detector: /* @__PURE__ */ r((e) => /^\s*info/.test(e), "detector"),
|
|
364
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
365
|
+
let { diagram: e } = await import("./chunk-DZe-4kde.js");
|
|
366
|
+
return {
|
|
367
|
+
id: ut,
|
|
368
|
+
diagram: e
|
|
369
|
+
};
|
|
370
|
+
}, "loader")
|
|
371
|
+
}, ft = "pie", pt = {
|
|
372
|
+
id: ft,
|
|
373
|
+
detector: /* @__PURE__ */ r((e) => /^\s*pie/.test(e), "detector"),
|
|
374
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
375
|
+
let { diagram: e } = await import("./chunk-Ckuw16cl.js");
|
|
376
|
+
return {
|
|
377
|
+
id: ft,
|
|
378
|
+
diagram: e
|
|
379
|
+
};
|
|
380
|
+
}, "loader")
|
|
381
|
+
}, mt = "quadrantChart", ht = {
|
|
382
|
+
id: mt,
|
|
383
|
+
detector: /* @__PURE__ */ r((e) => /^\s*quadrantChart/.test(e), "detector"),
|
|
384
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
385
|
+
let { diagram: e } = await import("./chunk-3FHei3pH.js");
|
|
386
|
+
return {
|
|
387
|
+
id: mt,
|
|
388
|
+
diagram: e
|
|
389
|
+
};
|
|
390
|
+
}, "loader")
|
|
391
|
+
}, gt = "xychart", _t = {
|
|
392
|
+
id: gt,
|
|
393
|
+
detector: /* @__PURE__ */ r((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
|
|
394
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
395
|
+
let { diagram: e } = await import("./chunk-7Sz3kAwl.js");
|
|
396
|
+
return {
|
|
397
|
+
id: gt,
|
|
398
|
+
diagram: e
|
|
399
|
+
};
|
|
400
|
+
}, "loader")
|
|
401
|
+
}, vt = "requirement", yt = {
|
|
402
|
+
id: vt,
|
|
403
|
+
detector: /* @__PURE__ */ r((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
|
|
404
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
405
|
+
let { diagram: e } = await import("./chunk-D9Ddd9y4.js");
|
|
406
|
+
return {
|
|
407
|
+
id: vt,
|
|
408
|
+
diagram: e
|
|
409
|
+
};
|
|
410
|
+
}, "loader")
|
|
411
|
+
}, bt = "sequence", xt = {
|
|
412
|
+
id: bt,
|
|
413
|
+
detector: /* @__PURE__ */ r((e) => /^\s*sequenceDiagram/.test(e), "detector"),
|
|
414
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
415
|
+
let { diagram: e } = await import("./chunk-B4F-pysn.js");
|
|
416
|
+
return {
|
|
417
|
+
id: bt,
|
|
418
|
+
diagram: e
|
|
419
|
+
};
|
|
420
|
+
}, "loader")
|
|
421
|
+
}, St = "classDiagram", Ct = {
|
|
422
|
+
id: St,
|
|
423
|
+
detector: /* @__PURE__ */ r((e) => /^\s*classDiagram/.test(e), "detector"),
|
|
424
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
425
|
+
let { diagram: e } = await import("./chunk-CgOP6IDB.js");
|
|
426
|
+
return {
|
|
427
|
+
id: St,
|
|
428
|
+
diagram: e
|
|
429
|
+
};
|
|
430
|
+
}, "loader")
|
|
431
|
+
}, wt = "stateDiagram", Tt = {
|
|
432
|
+
id: wt,
|
|
433
|
+
detector: /* @__PURE__ */ r((e) => /^\s*stateDiagram/.test(e), "detector"),
|
|
434
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
435
|
+
let { diagram: e } = await import("./chunk-SGpOYZbI.js");
|
|
436
|
+
return {
|
|
437
|
+
id: wt,
|
|
438
|
+
diagram: e
|
|
439
|
+
};
|
|
440
|
+
}, "loader")
|
|
441
|
+
}, Et = "journey", Dt = {
|
|
442
|
+
id: Et,
|
|
443
|
+
detector: /* @__PURE__ */ r((e) => /^\s*journey/.test(e), "detector"),
|
|
444
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
445
|
+
let { diagram: e } = await import("./chunk-B--pNBQF.js");
|
|
446
|
+
return {
|
|
447
|
+
id: Et,
|
|
448
|
+
diagram: e
|
|
449
|
+
};
|
|
450
|
+
}, "loader")
|
|
451
|
+
}, q = 4, J = 75, Ot = /* @__PURE__ */ r((e) => {
|
|
452
|
+
let t = [];
|
|
453
|
+
for (let n of e.split(/\s+/)) {
|
|
454
|
+
let e = [...n];
|
|
455
|
+
for (; e.length > J;) t.push(e.slice(0, J).join("")), e = e.slice(J);
|
|
456
|
+
e.length > 0 && t.push(e.join(""));
|
|
457
|
+
}
|
|
458
|
+
let n = [], r = "";
|
|
459
|
+
for (let e of t) {
|
|
460
|
+
let t = r ? `${r} ${e}` : e;
|
|
461
|
+
[...t].length > J ? (n.push(r), r = e) : r = t;
|
|
462
|
+
}
|
|
463
|
+
if (r && n.push(r), n.length > q) {
|
|
464
|
+
n.length = q;
|
|
465
|
+
let e = n[q - 1] ?? "";
|
|
466
|
+
n[q - 1] = `${[...e].slice(0, J - 3).join("")}...`;
|
|
467
|
+
}
|
|
468
|
+
return n;
|
|
469
|
+
}, "wrapErrorMessage"), kt = { draw: /* @__PURE__ */ r((e, n, r, i) => {
|
|
470
|
+
t.debug("rendering svg for syntax error\n");
|
|
471
|
+
let a = pe(n), o = a.append("g"), s = Ot(i?.db.getErrorMessage?.() ?? ""), c = s.length > 0 ? 500 + s.length * 56 : 512;
|
|
472
|
+
a.attr("viewBox", `0 0 2412 ${c}`), _(a, 100, c, !0), o.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"), o.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"), o.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"), o.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"), o.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"), o.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"), o.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"), o.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${r}`), s.forEach((e, t) => {
|
|
473
|
+
o.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 510 + t * 56).attr("font-size", "42px").style("text-anchor", "middle").text(e);
|
|
474
|
+
});
|
|
475
|
+
}, "draw") }, At = kt, jt, Mt = {
|
|
476
|
+
db: {
|
|
477
|
+
clear() {
|
|
478
|
+
jt = void 0;
|
|
479
|
+
},
|
|
480
|
+
setErrorMessage(e) {
|
|
481
|
+
jt = e;
|
|
482
|
+
},
|
|
483
|
+
getErrorMessage() {
|
|
484
|
+
return jt;
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
renderer: kt,
|
|
488
|
+
parser: { parse: /* @__PURE__ */ r(() => {}, "parse") }
|
|
489
|
+
}, Nt = "flowchart-elk", Pt = {
|
|
490
|
+
id: Nt,
|
|
491
|
+
detector: /* @__PURE__ */ r((e, t = {}) => /^\s*flowchart-elk/.test(e) ? (t.layout = "elk", !0) : !1, "detector"),
|
|
492
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
493
|
+
let { diagram: e } = await import("./chunk-YgmVTKqc.js");
|
|
494
|
+
return {
|
|
495
|
+
id: Nt,
|
|
496
|
+
diagram: e
|
|
497
|
+
};
|
|
498
|
+
}, "loader")
|
|
499
|
+
}, Ft = "timeline", It = {
|
|
500
|
+
id: Ft,
|
|
501
|
+
detector: /* @__PURE__ */ r((e) => /^\s*timeline/.test(e), "detector"),
|
|
502
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
503
|
+
let { diagram: e } = await import("./chunk-BuvPd-s5.js");
|
|
504
|
+
return {
|
|
505
|
+
id: Ft,
|
|
506
|
+
diagram: e
|
|
507
|
+
};
|
|
508
|
+
}, "loader")
|
|
509
|
+
}, Lt = "mindmap", Rt = {
|
|
510
|
+
id: Lt,
|
|
511
|
+
detector: /* @__PURE__ */ r((e) => /^\s*mindmap/.test(e), "detector"),
|
|
512
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
513
|
+
let { diagram: e } = await import("./chunk-JckyC4mW.js");
|
|
514
|
+
return {
|
|
515
|
+
id: Lt,
|
|
516
|
+
diagram: e
|
|
517
|
+
};
|
|
518
|
+
}, "loader")
|
|
519
|
+
}, zt = "kanban", Bt = {
|
|
520
|
+
id: zt,
|
|
521
|
+
detector: /* @__PURE__ */ r((e) => /^\s*kanban/.test(e), "detector"),
|
|
522
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
523
|
+
let { diagram: e } = await import("./chunk-yBz-vst0.js");
|
|
524
|
+
return {
|
|
525
|
+
id: zt,
|
|
526
|
+
diagram: e
|
|
527
|
+
};
|
|
528
|
+
}, "loader")
|
|
529
|
+
}, Vt = "sankey", Ht = {
|
|
530
|
+
id: Vt,
|
|
531
|
+
detector: /* @__PURE__ */ r((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
|
|
532
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
533
|
+
let { diagram: e } = await import("./chunk-DfyFJJi2.js");
|
|
534
|
+
return {
|
|
535
|
+
id: Vt,
|
|
536
|
+
diagram: e
|
|
537
|
+
};
|
|
538
|
+
}, "loader")
|
|
539
|
+
}, Ut = "packet", Wt = {
|
|
540
|
+
id: Ut,
|
|
541
|
+
detector: /* @__PURE__ */ r((e) => /^\s*packet(-beta)?/.test(e), "detector"),
|
|
542
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
543
|
+
let { diagram: e } = await import("./chunk-CMqFNUBl.js");
|
|
544
|
+
return {
|
|
545
|
+
id: Ut,
|
|
546
|
+
diagram: e
|
|
547
|
+
};
|
|
548
|
+
}, "loader")
|
|
549
|
+
}, Gt = "radar", Kt = {
|
|
550
|
+
id: Gt,
|
|
551
|
+
detector: /* @__PURE__ */ r((e) => /^\s*radar-beta/.test(e), "detector"),
|
|
552
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
553
|
+
let { diagram: e } = await import("./chunk-ChJfJJ1A.js");
|
|
554
|
+
return {
|
|
555
|
+
id: Gt,
|
|
556
|
+
diagram: e
|
|
557
|
+
};
|
|
558
|
+
}, "loader")
|
|
559
|
+
}, qt = "block", Jt = {
|
|
560
|
+
id: qt,
|
|
561
|
+
detector: /* @__PURE__ */ r((e) => /^\s*block(-beta)?/.test(e), "detector"),
|
|
562
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
563
|
+
let { diagram: e } = await import("./chunk-DyQBE_NW.js");
|
|
564
|
+
return {
|
|
565
|
+
id: qt,
|
|
566
|
+
diagram: e
|
|
567
|
+
};
|
|
568
|
+
}, "loader")
|
|
569
|
+
}, Yt = "treeView", Xt = {
|
|
570
|
+
id: Yt,
|
|
571
|
+
detector: /* @__PURE__ */ r((e) => /^\s*treeView-beta/.test(e), "detector"),
|
|
572
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
573
|
+
let { diagram: e } = await import("./chunk-Dt_1Jyif.js");
|
|
574
|
+
return {
|
|
575
|
+
id: Yt,
|
|
576
|
+
diagram: e
|
|
577
|
+
};
|
|
578
|
+
}, "loader")
|
|
579
|
+
}, Zt = "architecture", Qt = {
|
|
580
|
+
id: Zt,
|
|
581
|
+
detector: /* @__PURE__ */ r((e) => /^\s*architecture/.test(e), "detector"),
|
|
582
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
583
|
+
let { diagram: e } = await import("./chunk-UjQ8vA_Z.js");
|
|
584
|
+
return {
|
|
585
|
+
id: Zt,
|
|
586
|
+
diagram: e
|
|
587
|
+
};
|
|
588
|
+
}, "loader")
|
|
589
|
+
}, $t = "eventmodeling", en = {
|
|
590
|
+
id: $t,
|
|
591
|
+
detector: /* @__PURE__ */ r((e) => /^\s*eventmodeling/.test(e), "detector"),
|
|
592
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
593
|
+
let { diagram: e } = await import("./chunk-Ck5XRA46.js");
|
|
594
|
+
return {
|
|
595
|
+
id: $t,
|
|
596
|
+
diagram: e
|
|
597
|
+
};
|
|
598
|
+
}, "loader")
|
|
599
|
+
}, tn = "ishikawa", nn = {
|
|
600
|
+
id: tn,
|
|
601
|
+
detector: /* @__PURE__ */ r((e) => /^\s*ishikawa(-beta)?\b/i.test(e), "detector"),
|
|
602
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
603
|
+
let { diagram: e } = await import("./chunk-BFfk0LEc.js");
|
|
604
|
+
return {
|
|
605
|
+
id: tn,
|
|
606
|
+
diagram: e
|
|
607
|
+
};
|
|
608
|
+
}, "loader")
|
|
609
|
+
}, rn = "venn", an = {
|
|
610
|
+
id: rn,
|
|
611
|
+
detector: /* @__PURE__ */ r((e) => /^\s*venn-beta/.test(e), "detector"),
|
|
612
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
613
|
+
let { diagram: e } = await import("./chunk-CpAbRCbF.js");
|
|
614
|
+
return {
|
|
615
|
+
id: rn,
|
|
616
|
+
diagram: e
|
|
617
|
+
};
|
|
618
|
+
}, "loader")
|
|
619
|
+
}, on = "treemap", sn = {
|
|
620
|
+
id: on,
|
|
621
|
+
detector: /* @__PURE__ */ r((e) => /^\s*treemap/.test(e), "detector"),
|
|
622
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
623
|
+
let { diagram: e } = await import("./chunk-hUDb-eAW.js");
|
|
624
|
+
return {
|
|
625
|
+
id: on,
|
|
626
|
+
diagram: e
|
|
627
|
+
};
|
|
628
|
+
}, "loader")
|
|
629
|
+
}, cn = "usecase", ln = {
|
|
630
|
+
id: cn,
|
|
631
|
+
detector: /* @__PURE__ */ r((e) => /^\s*usecase-beta(?:\s|$)/.test(e), "detector"),
|
|
632
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
633
|
+
let { diagram: e } = await import("./chunk-CgG6CD9_.js");
|
|
634
|
+
return {
|
|
635
|
+
id: cn,
|
|
636
|
+
diagram: e
|
|
637
|
+
};
|
|
638
|
+
}, "loader")
|
|
639
|
+
}, un = "wardley", dn = {
|
|
640
|
+
id: un,
|
|
641
|
+
detector: /* @__PURE__ */ r((e) => /^\s*wardley-beta/i.test(e), "detector"),
|
|
642
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
643
|
+
let { diagram: e } = await import("./chunk-D8XfBJ_K.js");
|
|
644
|
+
return {
|
|
645
|
+
id: un,
|
|
646
|
+
diagram: e
|
|
647
|
+
};
|
|
648
|
+
}, "loader")
|
|
649
|
+
}, fn = "cynefin", pn = {
|
|
650
|
+
id: fn,
|
|
651
|
+
detector: /* @__PURE__ */ r((e) => /^\s*cynefin-beta(?:[\s:]|$)/.test(e), "detector"),
|
|
652
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
653
|
+
let { diagram: e } = await import("./chunk-MexOLyKV.js");
|
|
654
|
+
return {
|
|
655
|
+
id: fn,
|
|
656
|
+
diagram: e
|
|
657
|
+
};
|
|
658
|
+
}, "loader")
|
|
659
|
+
}, mn = "railroad", hn = {
|
|
660
|
+
id: mn,
|
|
661
|
+
detector: /* @__PURE__ */ r((e) => /^\s*railroad-beta/i.test(e), "detector"),
|
|
662
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
663
|
+
let { diagram: e } = await import("./chunk-D3IEAkCW.js");
|
|
664
|
+
return {
|
|
665
|
+
id: mn,
|
|
666
|
+
diagram: e
|
|
667
|
+
};
|
|
668
|
+
}, "loader")
|
|
669
|
+
}, gn = "railroadEbnf", _n = {
|
|
670
|
+
id: gn,
|
|
671
|
+
detector: /* @__PURE__ */ r((e) => /^\s*railroad-ebnf-beta/i.test(e), "detector"),
|
|
672
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
673
|
+
let { diagram: e } = await import("./chunk-CcVH22Yt.js");
|
|
674
|
+
return {
|
|
675
|
+
id: gn,
|
|
676
|
+
diagram: e
|
|
677
|
+
};
|
|
678
|
+
}, "loader")
|
|
679
|
+
}, vn = "railroadAbnf", yn = {
|
|
680
|
+
id: vn,
|
|
681
|
+
detector: /* @__PURE__ */ r((e) => /^\s*railroad-abnf-beta/i.test(e), "detector"),
|
|
682
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
683
|
+
let { diagram: e } = await import("./chunk-BKri0qr7.js");
|
|
684
|
+
return {
|
|
685
|
+
id: vn,
|
|
686
|
+
diagram: e
|
|
687
|
+
};
|
|
688
|
+
}, "loader")
|
|
689
|
+
}, bn = "railroadPeg", xn = {
|
|
690
|
+
id: bn,
|
|
691
|
+
detector: /* @__PURE__ */ r((e) => /^\s*railroad-peg-beta/i.test(e), "detector"),
|
|
692
|
+
loader: /* @__PURE__ */ r(async () => {
|
|
693
|
+
let { diagram: e } = await import("./chunk-DjFqgNTG.js");
|
|
694
|
+
return {
|
|
695
|
+
id: bn,
|
|
696
|
+
diagram: e
|
|
697
|
+
};
|
|
698
|
+
}, "loader")
|
|
699
|
+
}, Sn = !1, Y = /* @__PURE__ */ r(() => {
|
|
700
|
+
Sn || (Sn = !0, l("error", Mt, (e) => e.toLowerCase().trim() === "error"), l("---", {
|
|
701
|
+
db: { clear: /* @__PURE__ */ r(() => {}, "clear") },
|
|
702
|
+
styles: {},
|
|
703
|
+
renderer: { draw: /* @__PURE__ */ r(() => {}, "draw") },
|
|
704
|
+
parser: { parse: /* @__PURE__ */ r(() => {
|
|
705
|
+
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");
|
|
706
|
+
}, "parse") },
|
|
707
|
+
init: /* @__PURE__ */ r(() => null, "init")
|
|
708
|
+
}, (e) => e.toLowerCase().trimStart().startsWith("---")), u(Pt, Rt, Qt), u(tt, Ze, Bt, Ct, at, lt, dt, pt, yt, xt, rt, $e, It, st, Tt, Dt, ht, Ht, Wt, _t, Jt, en, Xt, Kt, nn, sn, hn, _n, yn, xn, an, dn, pn, ln));
|
|
709
|
+
}, "addDiagrams"), Cn = /* @__PURE__ */ r(async () => {
|
|
710
|
+
t.debug("Loading registered diagrams");
|
|
711
|
+
let e = (await Promise.allSettled(Object.entries(C).map(async ([e, { detector: n, loader: r }]) => {
|
|
712
|
+
if (r) try {
|
|
713
|
+
D(e);
|
|
714
|
+
} catch {
|
|
715
|
+
try {
|
|
716
|
+
let { diagram: e, id: t } = await r();
|
|
717
|
+
l(t, e, n);
|
|
718
|
+
} catch (n) {
|
|
719
|
+
throw t.error(`Failed to load external diagram with key ${e}. Removing from detectors.`), delete C[e], n;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}))).filter((e) => e.status === "rejected");
|
|
723
|
+
if (e.length > 0) {
|
|
724
|
+
t.error(`Failed to load ${e.length} external diagrams`);
|
|
725
|
+
for (let n of e) t.error(n);
|
|
726
|
+
throw Error(`Failed to load ${e.length} external diagrams`);
|
|
727
|
+
}
|
|
728
|
+
}, "loadRegisteredDiagrams"), wn = "graphics-document document";
|
|
729
|
+
function Tn(e, t) {
|
|
730
|
+
e.attr("role", wn), t !== "" && e.attr("aria-roledescription", t);
|
|
731
|
+
}
|
|
732
|
+
r(Tn, "setA11yDiagramInfo");
|
|
733
|
+
function En(e, t, n, r) {
|
|
734
|
+
if (e.insert !== void 0) {
|
|
735
|
+
if (n) {
|
|
736
|
+
let t = `chart-desc-${r}`;
|
|
737
|
+
e.attr("aria-describedby", t), e.insert("desc", ":first-child").attr("id", t).text(n);
|
|
738
|
+
}
|
|
739
|
+
if (t) {
|
|
740
|
+
let n = `chart-title-${r}`;
|
|
741
|
+
e.attr("aria-labelledby", n), e.insert("title", ":first-child").attr("id", n).text(t);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
r(En, "addSVGa11yTitleDescription");
|
|
746
|
+
var X = class e {
|
|
747
|
+
constructor(e, t, n, r, i) {
|
|
748
|
+
this.type = e, this.text = t, this.db = n, this.parser = r, this.renderer = i;
|
|
749
|
+
}
|
|
750
|
+
static {
|
|
751
|
+
r(this, "Diagram");
|
|
752
|
+
}
|
|
753
|
+
static async fromText(n, r = {}) {
|
|
754
|
+
let i = typeof n == "string" ? {
|
|
755
|
+
raw: n,
|
|
756
|
+
cleaned: n
|
|
757
|
+
} : n, a = O(), o = T(i.cleaned, a);
|
|
758
|
+
try {
|
|
759
|
+
D(o);
|
|
760
|
+
} catch {
|
|
761
|
+
let e = f(o);
|
|
762
|
+
if (!e) throw new te(`Diagram ${o} not found.`);
|
|
763
|
+
let { id: t, diagram: n } = await e();
|
|
764
|
+
l(t, n);
|
|
765
|
+
}
|
|
766
|
+
let { db: s, parser: c, renderer: u, init: d } = D(o);
|
|
767
|
+
c.parser && (c.parser.yy = s), s.clear?.(), d?.(a), r.title && s.setDiagramTitle?.(r.title);
|
|
768
|
+
let p = i.cleaned;
|
|
769
|
+
if (s.preserveCommentsWhenParsing && i.withComments) {
|
|
770
|
+
let e = a.maxTextSize ?? y.maxTextSize;
|
|
771
|
+
i.withComments.length > e ? t.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${e}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`) : p = i.withComments;
|
|
772
|
+
}
|
|
773
|
+
let m = ue(p) + "\n";
|
|
774
|
+
return i.frontmatterLineOffset && s.setFrontmatterLineOffset?.(i.frontmatterLineOffset), await c.parse(m), new e(o, m, s, c, u);
|
|
775
|
+
}
|
|
776
|
+
async render(e, t) {
|
|
777
|
+
await this.renderer.draw(this.text, e, t, this);
|
|
778
|
+
}
|
|
779
|
+
getParser() {
|
|
780
|
+
return this.parser;
|
|
781
|
+
}
|
|
782
|
+
getType() {
|
|
783
|
+
return this.type;
|
|
784
|
+
}
|
|
785
|
+
}, Dn = [], On = /* @__PURE__ */ r(() => {
|
|
786
|
+
Dn.forEach((e) => {
|
|
787
|
+
e();
|
|
788
|
+
}), Dn = [];
|
|
789
|
+
}, "attachFunctions"), kn = /* @__PURE__ */ r((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
|
|
790
|
+
function An(e) {
|
|
791
|
+
let t = x(e);
|
|
792
|
+
if (!t) return {
|
|
793
|
+
text: e,
|
|
794
|
+
metadata: {}
|
|
795
|
+
};
|
|
796
|
+
let n = t.indent, r = n ? t.body.split("\n").map((e) => e.startsWith(n) ? e.slice(n.length) : e).join("\n") : t.body, i = me(r, { schema: he }) ?? {};
|
|
797
|
+
i = typeof i == "object" && !Array.isArray(i) ? i : {};
|
|
798
|
+
let a = {};
|
|
799
|
+
return i.displayMode && (a.displayMode = i.displayMode.toString()), i.title && (a.title = i.title.toString()), i.config && (a.config = i.config), {
|
|
800
|
+
text: e.slice(t.length),
|
|
801
|
+
metadata: a
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
r(An, "extractFrontMatter");
|
|
805
|
+
var jn = /* @__PURE__ */ r((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e, t, n) => "<" + t + n.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), Mn = /* @__PURE__ */ r((e) => {
|
|
806
|
+
let { text: t, metadata: n } = An(e), { displayMode: r, title: i, config: a = {} } = n;
|
|
807
|
+
return r && (a.gantt ||= {}, a.gantt.displayMode = r), {
|
|
808
|
+
title: i,
|
|
809
|
+
config: a,
|
|
810
|
+
text: t
|
|
811
|
+
};
|
|
812
|
+
}, "processFrontmatter"), Nn = /* @__PURE__ */ r((e) => {
|
|
813
|
+
let t = k.detectInit(e) ?? {}, n = k.detectDirective(e, "wrap");
|
|
814
|
+
return Array.isArray(n) ? t.wrap = n.some(({ type: e }) => e === "wrap") : n?.type === "wrap" && (t.wrap = !0), {
|
|
815
|
+
text: se(e),
|
|
816
|
+
directive: t
|
|
817
|
+
};
|
|
818
|
+
}, "processDirectives");
|
|
819
|
+
function Pn(e) {
|
|
820
|
+
let t = e, n = jn(e), r = Mn(n), i = Nn(r.text), a = ce(r.config, i.directive), o = i.text;
|
|
821
|
+
return {
|
|
822
|
+
code: {
|
|
823
|
+
raw: t,
|
|
824
|
+
cleaned: kn(o),
|
|
825
|
+
withComments: o,
|
|
826
|
+
frontmatterLineOffset: n.length > r.text.length ? (n.substring(0, n.length - r.text.length).match(/\n/g) ?? []).length : 0
|
|
827
|
+
},
|
|
828
|
+
title: r.title,
|
|
829
|
+
config: a
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
r(Pn, "preprocessDiagram");
|
|
833
|
+
function Fn(e) {
|
|
834
|
+
let t = new TextEncoder().encode(e), n = Array.from(t, (e) => String.fromCodePoint(e)).join("");
|
|
835
|
+
return btoa(n);
|
|
836
|
+
}
|
|
837
|
+
r(Fn, "toBase64");
|
|
838
|
+
var In = 5e4, Ln = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", Rn = "sandbox", zn = "loose", Bn = "http://www.w3.org/2000/svg", Vn = "http://www.w3.org/1999/xlink", Hn = "http://www.w3.org/1999/xhtml", Un = "100%", Wn = "100%", Gn = "border:0;margin:0;", Kn = "margin:0", qn = "allow-top-navigation-by-user-activation allow-popups", Jn = "The \"iframe\" tag is not supported by your browser.", Yn = ["foreignobject"], Xn = ["dominant-baseline"];
|
|
839
|
+
function Zn(e) {
|
|
840
|
+
let t = Pn(e);
|
|
841
|
+
a();
|
|
842
|
+
let n;
|
|
843
|
+
try {
|
|
844
|
+
n = T(t.code.cleaned, O());
|
|
845
|
+
} catch {
|
|
846
|
+
n = void 0;
|
|
847
|
+
}
|
|
848
|
+
return s(n), w(t.config ?? {}), t;
|
|
849
|
+
}
|
|
850
|
+
r(Zn, "processAndSetConfigs");
|
|
851
|
+
async function Qn(e, t) {
|
|
852
|
+
Y();
|
|
853
|
+
try {
|
|
854
|
+
let { code: t, config: n } = Zn(e);
|
|
855
|
+
return {
|
|
856
|
+
diagramType: (await X.fromText(t)).type,
|
|
857
|
+
config: n
|
|
858
|
+
};
|
|
859
|
+
} catch (e) {
|
|
860
|
+
if (t?.suppressErrors) return !1;
|
|
861
|
+
throw e;
|
|
862
|
+
} finally {
|
|
863
|
+
s(void 0);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
r(Qn, "parse");
|
|
867
|
+
var $n = /* @__PURE__ */ r((e, t, n = []) => `.${e} ${t} ${c(`{ ${n.join(" !important; ")} !important; }`)}`, "cssImportantStyles"), er = /* @__PURE__ */ r((e, t = /* @__PURE__ */ new Map()) => {
|
|
868
|
+
let n = new CSSStyleSheet();
|
|
869
|
+
if (e.fontFamily !== void 0 && n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`, n.cssRules.length), e.altFontFamily !== void 0 && n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`, n.cssRules.length), t instanceof Map) {
|
|
870
|
+
let r = ne(e) ? ["> *", "span"] : [
|
|
871
|
+
"rect",
|
|
872
|
+
"polygon",
|
|
873
|
+
"ellipse",
|
|
874
|
+
"circle",
|
|
875
|
+
"path"
|
|
876
|
+
];
|
|
877
|
+
t.forEach((e) => {
|
|
878
|
+
be(e.styles) || r.forEach((t) => {
|
|
879
|
+
n.insertRule($n(e.id, t, e.styles), n.cssRules.length);
|
|
880
|
+
}), be(e.textStyles) || n.insertRule($n(e.id, "tspan", (e?.textStyles || []).map((e) => e.replace("color", "fill"))), n.cssRules.length);
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
let r = "";
|
|
884
|
+
if (e.themeCSS !== void 0) {
|
|
885
|
+
if (typeof n.replaceSync == "function") {
|
|
886
|
+
let t = new CSSStyleSheet();
|
|
887
|
+
t.replaceSync(e.themeCSS), r = S(t) + "\n";
|
|
888
|
+
} else r += `${e.themeCSS}
|
|
889
|
+
`;
|
|
890
|
+
}
|
|
891
|
+
return r + S(n);
|
|
892
|
+
}, "createCssStyles"), tr = /* @__PURE__ */ r((e, n) => qe(Ue(`${e}{${n}}`), Ye([/* @__PURE__ */ r(function(n, r, i, a) {
|
|
893
|
+
if (n.type === "rule" && Array.isArray(n.props)) {
|
|
894
|
+
if (n.parent && n.parent.type === "@keyframes") return;
|
|
895
|
+
n.props = n.props.map((t) => t === e && Array.isArray(n.children) && n.children.every((e) => e.type === "decl" && (/* @__PURE__ */ new Set([
|
|
896
|
+
"font-family",
|
|
897
|
+
"font-size",
|
|
898
|
+
"fill"
|
|
899
|
+
])).has(e.props)) ? t : !t.startsWith(`${e} `) && !t.startsWith(`${e}>`) || t.startsWith(`${e} ||`) ? `${e} ${t}` : t);
|
|
900
|
+
} else n.type.startsWith("@") && ([
|
|
901
|
+
"@media",
|
|
902
|
+
"@supports",
|
|
903
|
+
"@layer",
|
|
904
|
+
"@scope",
|
|
905
|
+
"@container",
|
|
906
|
+
"@starting-style",
|
|
907
|
+
"@keyframes"
|
|
908
|
+
].includes(n.type) || (t.warn(`Removing unsupported at-rule ${n.type} from CSS`), n.type = xe));
|
|
909
|
+
}, "addNamespace"), Je])), "compileCSS"), nr = /* @__PURE__ */ r((e, t, n, r) => {
|
|
910
|
+
let i = er(e, n);
|
|
911
|
+
return tr(r, g(t, i, {
|
|
912
|
+
...e.themeVariables,
|
|
913
|
+
theme: e.theme,
|
|
914
|
+
look: e.look
|
|
915
|
+
}, r));
|
|
916
|
+
}, "createUserStyles"), rr = /* @__PURE__ */ r((e = "", t, n) => {
|
|
917
|
+
let r = e;
|
|
918
|
+
return !n && !t && (r = r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, "marker-end=\"url(#")), r = ae(r), r = r.replace(/<br>/g, "<br/>"), r;
|
|
919
|
+
}, "cleanUpSvgCode"), ir = /* @__PURE__ */ r((e = "", t) => `<iframe style="width:${Un};height:${t?.viewBox?.baseVal?.height ? t.viewBox.baseVal.height + "px" : Wn};${Gn}" src="data:text/html;charset=UTF-8;base64,${Fn(`<body style="${Kn}">${e}</body>`)}" sandbox="${qn}">
|
|
920
|
+
${Jn}
|
|
921
|
+
</iframe>`, "putIntoIFrame"), ar = /* @__PURE__ */ r((e, t, n, r, i) => {
|
|
922
|
+
let a = e.append("div");
|
|
923
|
+
a.attr("id", n), r && a.attr("style", r);
|
|
924
|
+
let o = a.append("svg").attr("id", t).attr("width", "100%").attr("xmlns", Bn);
|
|
925
|
+
return i && o.attr("xmlns:xlink", i), o.append("g"), e;
|
|
926
|
+
}, "appendDivSvgG");
|
|
927
|
+
function or(e, t) {
|
|
928
|
+
return e.append("iframe").attr("id", t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
|
|
929
|
+
}
|
|
930
|
+
r(or, "sandboxedIframe");
|
|
931
|
+
var sr = /* @__PURE__ */ r((e, t, n, r) => {
|
|
932
|
+
e.getElementById(t)?.remove(), e.getElementById(n)?.remove(), e.getElementById(r)?.remove();
|
|
933
|
+
}, "removeExistingElements"), cr = /* @__PURE__ */ r(async function(e, i, a) {
|
|
934
|
+
Y();
|
|
935
|
+
let o = Zn(i), s = o.code;
|
|
936
|
+
i = s.cleaned;
|
|
937
|
+
let c = O();
|
|
938
|
+
t.debug(c), i.length > (c?.maxTextSize ?? In) && (i = Ln, s = {
|
|
939
|
+
raw: i,
|
|
940
|
+
cleaned: i
|
|
941
|
+
});
|
|
942
|
+
let l = `#${e}`, u = "i" + e, d = "#" + u, f = "d" + e, p = "#" + f, m = /* @__PURE__ */ r(() => {
|
|
943
|
+
let e = n(g ? d : p).node();
|
|
944
|
+
e && "remove" in e && e.remove();
|
|
945
|
+
}, "removeTempElements"), h = n(document.body), g = c.securityLevel === Rn, _ = c.securityLevel === zn, y = c.fontFamily;
|
|
946
|
+
if (a !== void 0) {
|
|
947
|
+
if (a && (a.innerHTML = ""), g) {
|
|
948
|
+
let e = or(n(a), u);
|
|
949
|
+
h = n(e.nodes()[0].contentDocument.body), h.node().style.margin = "0";
|
|
950
|
+
} else h = n(a);
|
|
951
|
+
ar(h, e, f, `font-family: ${y}`, Vn);
|
|
952
|
+
} else {
|
|
953
|
+
if (sr(document, e, f, u), g) {
|
|
954
|
+
let e = or(n(document.body), u);
|
|
955
|
+
h = n(e.nodes()[0].contentDocument.body), h.node().style.margin = "0";
|
|
956
|
+
} else h = n("body");
|
|
957
|
+
ar(h, e, f);
|
|
958
|
+
}
|
|
959
|
+
let x, S;
|
|
960
|
+
try {
|
|
961
|
+
x = await X.fromText(s, { title: o.title });
|
|
962
|
+
} catch (e) {
|
|
963
|
+
if (c.suppressErrorRendering) throw m(), e;
|
|
964
|
+
x = await X.fromText("error"), S = e, x.db.setErrorMessage?.(le(e));
|
|
965
|
+
}
|
|
966
|
+
let C = h.select(p).node(), w = x.type, T = C.firstChild, ee = T.firstChild, te = x.renderer.getClasses?.(i, x), E = nr(c, w, te, l), ne = document.createElement("style");
|
|
967
|
+
ne.innerHTML = E, T.insertBefore(ne, ee);
|
|
968
|
+
try {
|
|
969
|
+
await x.renderer.draw(i, e, "12.2.0", x);
|
|
970
|
+
} catch (t) {
|
|
971
|
+
throw c.suppressErrorRendering ? m() : At.draw(i, e, "12.2.0"), t;
|
|
972
|
+
}
|
|
973
|
+
let D = h.select(`${p} svg`), re = x.db.getAccTitle?.(), ie = x.db.getAccDescription?.();
|
|
974
|
+
fr(w, D, re, ie);
|
|
975
|
+
let k = (/* @__PURE__ */ r(() => {
|
|
976
|
+
h.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns", Hn);
|
|
977
|
+
let n = h.select(p).node().innerHTML;
|
|
978
|
+
if (t.debug("config.arrowMarkerAbsolute", c.arrowMarkerAbsolute), n = rr(n, g, b(c.arrowMarkerAbsolute)), g) {
|
|
979
|
+
let e = h.select(p + " svg").node();
|
|
980
|
+
n = ir(n, e);
|
|
981
|
+
} else _ || (n = v.sanitize(n, {
|
|
982
|
+
ADD_TAGS: Yn,
|
|
983
|
+
ADD_ATTR: Xn,
|
|
984
|
+
HTML_INTEGRATION_POINTS: { foreignobject: !0 }
|
|
985
|
+
}));
|
|
986
|
+
return On(), n;
|
|
987
|
+
}, "serializeSvg"))();
|
|
988
|
+
if (S) throw S;
|
|
989
|
+
return m(), {
|
|
990
|
+
diagramType: w,
|
|
991
|
+
svg: k,
|
|
992
|
+
bindFunctions: x.db.bindFunctions
|
|
993
|
+
};
|
|
994
|
+
}, "renderDiagram"), lr = /* @__PURE__ */ r(async function(e, t, n) {
|
|
995
|
+
try {
|
|
996
|
+
return await cr(e, t, n);
|
|
997
|
+
} finally {
|
|
998
|
+
s(void 0);
|
|
999
|
+
}
|
|
1000
|
+
}, "render");
|
|
1001
|
+
function ur(t = {}) {
|
|
1002
|
+
let n = ee({}, t);
|
|
1003
|
+
n?.fontFamily && !n.themeVariables?.fontFamily && (n.themeVariables ||= {}, n.themeVariables.fontFamily = n.fontFamily), m(n);
|
|
1004
|
+
let r = E.theme;
|
|
1005
|
+
n?.theme && Object.hasOwn(d, n.theme) ? n.themeVariables = d[n.theme].getThemeVariables(n.themeVariables) : n && (n.theme != null && n.theme !== "null" && (n.theme = r), n.themeVariables = d[r].getThemeVariables(n.themeVariables));
|
|
1006
|
+
let i = typeof n == "object" ? o(n) : p();
|
|
1007
|
+
e(i.logLevel), Y();
|
|
1008
|
+
}
|
|
1009
|
+
r(ur, "initialize");
|
|
1010
|
+
var dr = /* @__PURE__ */ r((e, t = {}) => {
|
|
1011
|
+
let { code: n } = Pn(e);
|
|
1012
|
+
return X.fromText(n, t);
|
|
1013
|
+
}, "getDiagramFromText");
|
|
1014
|
+
function fr(e, t, n, r) {
|
|
1015
|
+
Tn(t, e), En(t, n, r, t.attr("id"));
|
|
1016
|
+
}
|
|
1017
|
+
r(fr, "addA11yInfo");
|
|
1018
|
+
var Z = Object.freeze({
|
|
1019
|
+
render: lr,
|
|
1020
|
+
parse: Qn,
|
|
1021
|
+
getDiagramFromText: dr,
|
|
1022
|
+
initialize: ur,
|
|
1023
|
+
getConfig: O,
|
|
1024
|
+
setConfig: h,
|
|
1025
|
+
getSiteConfig: p,
|
|
1026
|
+
updateSiteConfig: i,
|
|
1027
|
+
reset: /* @__PURE__ */ r(() => {
|
|
1028
|
+
a();
|
|
1029
|
+
}, "reset"),
|
|
1030
|
+
globalReset: /* @__PURE__ */ r(() => {
|
|
1031
|
+
a(E);
|
|
1032
|
+
}, "globalReset"),
|
|
1033
|
+
defaultConfig: E
|
|
1034
|
+
});
|
|
1035
|
+
e(O().logLevel), a(O());
|
|
1036
|
+
var pr = /* @__PURE__ */ r((e, n, r) => {
|
|
1037
|
+
t.warn(e), de(e) ? (r && r(e.str, e.hash), n.push({
|
|
1038
|
+
...e,
|
|
1039
|
+
message: e.str,
|
|
1040
|
+
error: e
|
|
1041
|
+
})) : (r && r(e), e instanceof Error && n.push({
|
|
1042
|
+
str: e.message,
|
|
1043
|
+
message: e.message,
|
|
1044
|
+
hash: e.name,
|
|
1045
|
+
error: e
|
|
1046
|
+
}));
|
|
1047
|
+
}, "handleError"), mr = /* @__PURE__ */ r(async function(e = { querySelector: ".mermaid" }) {
|
|
1048
|
+
try {
|
|
1049
|
+
await hr(e);
|
|
1050
|
+
} catch (n) {
|
|
1051
|
+
if (de(n) && t.error(n.str), $.parseError && $.parseError(n), !e.suppressErrors) throw t.error("Use the suppressErrors option to suppress these errors"), n;
|
|
1052
|
+
}
|
|
1053
|
+
}, "run"), hr = /* @__PURE__ */ r(async function({ postRenderCallback: e, querySelector: n, nodes: r } = { querySelector: ".mermaid" }) {
|
|
1054
|
+
let i = Z.getConfig();
|
|
1055
|
+
t.debug(`${e ? "" : "No "}Callback function found`);
|
|
1056
|
+
let a;
|
|
1057
|
+
if (r) a = r;
|
|
1058
|
+
else if (n) a = document.querySelectorAll(n);
|
|
1059
|
+
else throw Error("Nodes and querySelector are both undefined");
|
|
1060
|
+
t.debug(`Found ${a.length} diagrams`), i?.startOnLoad !== void 0 && (t.debug("Start On Load: " + i?.startOnLoad), Z.updateSiteConfig({ startOnLoad: i?.startOnLoad }));
|
|
1061
|
+
let o = new k.InitIDGenerator(i.deterministicIds, i.deterministicIDSeed), s, c = [];
|
|
1062
|
+
for (let n of Array.from(a)) {
|
|
1063
|
+
if (t.info("Rendering diagram: " + n.id), n.getAttribute("data-processed")) continue;
|
|
1064
|
+
n.setAttribute("data-processed", "true");
|
|
1065
|
+
let r = `mermaid-${o.next()}`;
|
|
1066
|
+
s = n.innerHTML, s = _e(k.entityDecode(s)).trim().replace(/<br\s*\/?>/gi, "<br/>");
|
|
1067
|
+
let i = k.detectInit(s);
|
|
1068
|
+
i && t.debug("Detected early reinit: ", i);
|
|
1069
|
+
try {
|
|
1070
|
+
let { svg: t, bindFunctions: i } = await wr(r, s, n);
|
|
1071
|
+
n.innerHTML = t, e && await e(r), i && i(n);
|
|
1072
|
+
} catch (e) {
|
|
1073
|
+
pr(e, c, $.parseError);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
if (c.length > 0) throw c[0];
|
|
1077
|
+
}, "runThrowsErrors"), gr = /* @__PURE__ */ r(function(e) {
|
|
1078
|
+
Z.initialize(e);
|
|
1079
|
+
}, "initialize"), _r = /* @__PURE__ */ r(async function(e, n, r) {
|
|
1080
|
+
t.warn("mermaid.init is deprecated. Please use run instead."), e && gr(e);
|
|
1081
|
+
let i = {
|
|
1082
|
+
postRenderCallback: r,
|
|
1083
|
+
querySelector: ".mermaid"
|
|
1084
|
+
};
|
|
1085
|
+
typeof n == "string" ? i.querySelector = n : n && (i.nodes = n instanceof HTMLElement ? [n] : n), await mr(i);
|
|
1086
|
+
}, "init"), vr = /* @__PURE__ */ r(async (e, { lazyLoad: t = !0 } = {}) => {
|
|
1087
|
+
Y(), u(...e), t === !1 && await Cn();
|
|
1088
|
+
}, "registerExternalDiagrams"), yr = /* @__PURE__ */ r(function() {
|
|
1089
|
+
if ($.startOnLoad) {
|
|
1090
|
+
let { startOnLoad: e } = Z.getConfig();
|
|
1091
|
+
e && $.run().catch((e) => t.error("Mermaid failed to initialize", e));
|
|
1092
|
+
}
|
|
1093
|
+
}, "contentLoaded");
|
|
1094
|
+
typeof document < "u" && window.addEventListener("load", yr, !1);
|
|
1095
|
+
var br = /* @__PURE__ */ r(function(e) {
|
|
1096
|
+
$.parseError = e;
|
|
1097
|
+
}, "setParseErrorHandler"), Q = [], xr = !1, Sr = /* @__PURE__ */ r(async () => {
|
|
1098
|
+
if (!xr) {
|
|
1099
|
+
for (xr = !0; Q.length > 0;) {
|
|
1100
|
+
let e = Q.shift();
|
|
1101
|
+
if (e) try {
|
|
1102
|
+
await e();
|
|
1103
|
+
} catch (e) {
|
|
1104
|
+
t.error("Error executing queue", e);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
xr = !1;
|
|
1108
|
+
}
|
|
1109
|
+
}, "executeQueue"), Cr = /* @__PURE__ */ r(async (e, n) => new Promise((i, a) => {
|
|
1110
|
+
let o = /* @__PURE__ */ r(() => new Promise((r, o) => {
|
|
1111
|
+
Z.parse(e, n).then((e) => {
|
|
1112
|
+
r(e), i(e);
|
|
1113
|
+
}, (e) => {
|
|
1114
|
+
t.error("Error parsing", e), $.parseError?.(e), o(e), a(e);
|
|
1115
|
+
});
|
|
1116
|
+
}), "performCall");
|
|
1117
|
+
Q.push(o), Sr().catch(a);
|
|
1118
|
+
}), "parse"), wr = /* @__PURE__ */ r((e, n, i) => new Promise((a, o) => {
|
|
1119
|
+
let s = /* @__PURE__ */ r(() => new Promise((r, s) => {
|
|
1120
|
+
Z.render(e, n, i).then((e) => {
|
|
1121
|
+
r(e), a(e);
|
|
1122
|
+
}, (e) => {
|
|
1123
|
+
t.error("Error parsing", e), $.parseError?.(e), s(e), o(e);
|
|
1124
|
+
});
|
|
1125
|
+
}), "performCall");
|
|
1126
|
+
Q.push(s), Sr().catch(o);
|
|
1127
|
+
}), "render"), $ = {
|
|
1128
|
+
startOnLoad: !0,
|
|
1129
|
+
mermaidAPI: Z,
|
|
1130
|
+
parse: Cr,
|
|
1131
|
+
render: wr,
|
|
1132
|
+
init: _r,
|
|
1133
|
+
run: mr,
|
|
1134
|
+
registerExternalDiagrams: vr,
|
|
1135
|
+
registerLayoutLoaders: ve,
|
|
1136
|
+
initialize: gr,
|
|
1137
|
+
parseError: void 0,
|
|
1138
|
+
contentLoaded: yr,
|
|
1139
|
+
setParseErrorHandler: br,
|
|
1140
|
+
detectType: T,
|
|
1141
|
+
registerIconPacks: ge,
|
|
1142
|
+
getRegisteredDiagramsMetadata: /* @__PURE__ */ r(() => Object.keys(C).map((e) => ({ id: e })), "getRegisteredDiagramsMetadata")
|
|
1143
|
+
}, Tr = $;
|
|
1144
|
+
//#endregion
|
|
1145
|
+
export { Tr as default };
|