@blueking/ai-blueking 2.0.0-dev.1 → 2.0.0-dev.3
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/dist/vue2/_baseFor-DAbrc8SN.js +309 -0
- package/dist/vue2/arc-BqlAOiZb.js +78 -0
- package/dist/vue2/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
- package/dist/vue2/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
- package/dist/vue2/array-TB8zN_HT.js +5 -0
- package/dist/vue2/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
- package/dist/vue2/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
- package/dist/vue2/channel-edTl5mpN.js +3 -0
- package/dist/vue2/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
- package/dist/vue2/chunk-55IACEB6-CTzuTcHv.js +6 -0
- package/dist/vue2/chunk-76Q3JFCE-BrJX66ha.js +19 -0
- package/dist/vue2/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
- package/dist/vue2/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
- package/dist/vue2/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
- package/dist/vue2/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
- package/dist/vue2/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
- package/dist/vue2/chunk-DNh5sLlG.js +18 -0
- package/dist/vue2/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
- package/dist/vue2/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
- package/dist/vue2/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
- package/dist/vue2/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
- package/dist/vue2/chunk-HN2XXSSU-DueSY85P.js +74 -0
- package/dist/vue2/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
- package/dist/vue2/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
- package/dist/vue2/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
- package/dist/vue2/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
- package/dist/vue2/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
- package/dist/vue2/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
- package/dist/vue2/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
- package/dist/vue2/chunk-QN33PNHL-DsC-XeM9.js +23 -0
- package/dist/vue2/chunk-QXUST7PY-DxFRymyS.js +486 -0
- package/dist/vue2/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
- package/dist/vue2/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
- package/dist/vue2/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
- package/dist/vue2/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
- package/dist/vue2/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
- package/dist/vue2/chunk-XAJISQIX-XsDvU4jW.js +135 -0
- package/dist/vue2/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
- package/dist/vue2/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
- package/dist/vue2/clone-Bbr3WSpg.js +7 -0
- package/dist/vue2/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
- package/dist/vue2/cytoscape.esm-nrcriBSO.js +18100 -0
- package/dist/vue2/dagre-6UL2VRFP-CTl_U96l.js +298 -0
- package/dist/vue2/dagre-DUjlMe_B.js +1496 -0
- package/dist/vue2/defaultLocale-BLATqOV5.js +177 -0
- package/dist/vue2/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
- package/dist/vue2/diagram-QEK2KX5R-CAeywSxy.js +226 -0
- package/dist/vue2/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
- package/dist/vue2/dist-xWJvauxf.js +49 -0
- package/dist/vue2/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
- package/dist/vue2/flatten-CfPhNHUL.js +34 -0
- package/dist/vue2/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
- package/dist/vue2/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
- package/dist/vue2/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
- package/dist/vue2/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
- package/dist/vue2/graphlib-KDKEjVHX.js +344 -0
- package/dist/vue2/index.es.min.js +26703 -786
- package/dist/vue2/index.umd.min.js +2796 -9
- package/dist/vue2/info-NVLQJR56-DBsOnIKy.js +7 -0
- package/dist/vue2/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
- package/dist/vue2/init-hAkIK9Bd.js +13 -0
- package/dist/vue2/isEmpty-z27q3o-D.js +32 -0
- package/dist/vue2/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
- package/dist/vue2/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
- package/dist/vue2/katex-CEAw-xiA.js +22097 -0
- package/dist/vue2/katex-D8o5-F7C.js +2 -0
- package/dist/vue2/line-wvheYP7S.js +30 -0
- package/dist/vue2/linear-STTevhnH.js +250 -0
- package/dist/vue2/math-DF_v6dOl.js +8 -0
- package/dist/vue2/mermaid-parser.core-VAa8Vi1g.js +48 -0
- package/dist/vue2/mermaid.core-vqI6KB9k.js +895 -0
- package/dist/vue2/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
- package/dist/vue2/ordinal-DOM6Fa9P.js +61 -0
- package/dist/vue2/packet-BFZMPI3H-CG049KmZ.js +7 -0
- package/dist/vue2/path-CW_-_Ti7.js +79 -0
- package/dist/vue2/pie-7BOR55EZ-BHq0KcLP.js +7 -0
- package/dist/vue2/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
- package/dist/vue2/purify.es-Cm_tUMzZ.js +547 -0
- package/dist/vue2/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
- package/dist/vue2/radar-NHE76QYJ-CUoVtrAx.js +7 -0
- package/dist/vue2/reduce-BFKSG9Rs.js +451 -0
- package/dist/vue2/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
- package/dist/vue2/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
- package/dist/vue2/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
- package/dist/vue2/src-VlKYSsxJ.js +1975 -0
- package/dist/vue2/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
- package/dist/vue2/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
- package/dist/vue2/style.css +1 -1
- package/dist/vue2/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
- package/dist/vue2/treemap-KMMF4GRG--FdijCcy.js +7 -0
- package/dist/vue2/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
- package/dist/vue3/_baseFor-DAbrc8SN.js +309 -0
- package/dist/vue3/arc-BqlAOiZb.js +78 -0
- package/dist/vue3/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
- package/dist/vue3/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
- package/dist/vue3/array-TB8zN_HT.js +5 -0
- package/dist/vue3/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
- package/dist/vue3/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
- package/dist/vue3/channel-edTl5mpN.js +3 -0
- package/dist/vue3/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
- package/dist/vue3/chunk-55IACEB6-CTzuTcHv.js +6 -0
- package/dist/vue3/chunk-76Q3JFCE-BrJX66ha.js +19 -0
- package/dist/vue3/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
- package/dist/vue3/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
- package/dist/vue3/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
- package/dist/vue3/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
- package/dist/vue3/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
- package/dist/vue3/chunk-DNh5sLlG.js +18 -0
- package/dist/vue3/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
- package/dist/vue3/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
- package/dist/vue3/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
- package/dist/vue3/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
- package/dist/vue3/chunk-HN2XXSSU-DueSY85P.js +74 -0
- package/dist/vue3/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
- package/dist/vue3/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
- package/dist/vue3/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
- package/dist/vue3/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
- package/dist/vue3/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
- package/dist/vue3/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
- package/dist/vue3/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
- package/dist/vue3/chunk-QN33PNHL-DsC-XeM9.js +23 -0
- package/dist/vue3/chunk-QXUST7PY-DxFRymyS.js +486 -0
- package/dist/vue3/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
- package/dist/vue3/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
- package/dist/vue3/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
- package/dist/vue3/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
- package/dist/vue3/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
- package/dist/vue3/chunk-XAJISQIX-XsDvU4jW.js +135 -0
- package/dist/vue3/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
- package/dist/vue3/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
- package/dist/vue3/clone-Bbr3WSpg.js +7 -0
- package/dist/vue3/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
- package/dist/vue3/cytoscape.esm-nrcriBSO.js +18100 -0
- package/dist/vue3/dagre-6UL2VRFP-CTl_U96l.js +298 -0
- package/dist/vue3/dagre-DUjlMe_B.js +1496 -0
- package/dist/vue3/defaultLocale-BLATqOV5.js +177 -0
- package/dist/vue3/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
- package/dist/vue3/diagram-QEK2KX5R-CAeywSxy.js +226 -0
- package/dist/vue3/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
- package/dist/vue3/dist-xWJvauxf.js +49 -0
- package/dist/vue3/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
- package/dist/vue3/flatten-CfPhNHUL.js +34 -0
- package/dist/vue3/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
- package/dist/vue3/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
- package/dist/vue3/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
- package/dist/vue3/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
- package/dist/vue3/graphlib-KDKEjVHX.js +344 -0
- package/dist/vue3/index.es.min.js +26730 -813
- package/dist/vue3/index.umd.min.js +2796 -9
- package/dist/vue3/info-NVLQJR56-DBsOnIKy.js +7 -0
- package/dist/vue3/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
- package/dist/vue3/init-hAkIK9Bd.js +13 -0
- package/dist/vue3/isEmpty-z27q3o-D.js +32 -0
- package/dist/vue3/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
- package/dist/vue3/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
- package/dist/vue3/katex-CEAw-xiA.js +22097 -0
- package/dist/vue3/katex-D8o5-F7C.js +2 -0
- package/dist/vue3/line-wvheYP7S.js +30 -0
- package/dist/vue3/linear-STTevhnH.js +250 -0
- package/dist/vue3/math-DF_v6dOl.js +8 -0
- package/dist/vue3/mermaid-parser.core-VAa8Vi1g.js +48 -0
- package/dist/vue3/mermaid.core-vqI6KB9k.js +895 -0
- package/dist/vue3/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
- package/dist/vue3/ordinal-DOM6Fa9P.js +61 -0
- package/dist/vue3/packet-BFZMPI3H-CG049KmZ.js +7 -0
- package/dist/vue3/path-CW_-_Ti7.js +79 -0
- package/dist/vue3/pie-7BOR55EZ-BHq0KcLP.js +7 -0
- package/dist/vue3/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
- package/dist/vue3/purify.es-Cm_tUMzZ.js +547 -0
- package/dist/vue3/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
- package/dist/vue3/radar-NHE76QYJ-CUoVtrAx.js +7 -0
- package/dist/vue3/reduce-BFKSG9Rs.js +451 -0
- package/dist/vue3/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
- package/dist/vue3/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
- package/dist/vue3/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
- package/dist/vue3/src-VlKYSsxJ.js +1975 -0
- package/dist/vue3/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
- package/dist/vue3/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
- package/dist/vue3/treemap-KMMF4GRG--FdijCcy.js +7 -0
- package/dist/vue3/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
- package/package.json +3 -3
|
@@ -0,0 +1,895 @@
|
|
|
1
|
+
import { t as purify } from "./purify.es-Cm_tUMzZ.js";
|
|
2
|
+
import "./_baseFor-DAbrc8SN.js";
|
|
3
|
+
import { t as isEmpty_default } from "./isEmpty-z27q3o-D.js";
|
|
4
|
+
import { _ as setLogLevel, g as log, h as __name, p as select_default } from "./src-VlKYSsxJ.js";
|
|
5
|
+
import { J as themes_default, M as registerLazyLoadedDiagrams, P as reset, R as saveConfigFromInitialize, S as getDiagramLoader, V as setConfig, W as setSiteConfig, Y as updateSiteConfig, c as configureSvgSize, f as detectType, g as frontMatterRegex, h as evaluate, j as registerDiagram, l as defaultConfig, n as addDirective, p as detectors, q as styles_default, r as assignWithDepth_default, t as UnknownDiagramError, w as getSiteConfig, x as getDiagram, y as getConfig } from "./chunk-ABZYJK2D-gsx40GnJ.js";
|
|
6
|
+
import "./path-CW_-_Ti7.js";
|
|
7
|
+
import "./math-DF_v6dOl.js";
|
|
8
|
+
import "./array-TB8zN_HT.js";
|
|
9
|
+
import { a as decodeEntities, f as isDetailedError, g as utils_default, h as removeDirectives, i as cleanAndMerge, o as encodeEntities } from "./chunk-S3R3BYOJ-Bs_r55Kk.js";
|
|
10
|
+
import "./line-wvheYP7S.js";
|
|
11
|
+
import { t as selectSvgElement } from "./chunk-EXTU4WIE-BPc8ye_N.js";
|
|
12
|
+
import "./dist-xWJvauxf.js";
|
|
13
|
+
import { i as registerIconPacks, s as dedent } from "./chunk-JA3XYJ7Z-CRet4f6a.js";
|
|
14
|
+
import "./chunk-HN2XXSSU-DueSY85P.js";
|
|
15
|
+
import "./chunk-CVBHYZKI-Cs8lCw3u.js";
|
|
16
|
+
import "./chunk-ATLVNIR6-CTTwtx-5.js";
|
|
17
|
+
import "./chunk-JZLCHNYA-Df0-MseJ.js";
|
|
18
|
+
import "./chunk-QXUST7PY-DxFRymyS.js";
|
|
19
|
+
import { n as registerLayoutLoaders } from "./chunk-N4CR4FBY-jNnt5D3v.js";
|
|
20
|
+
import { n as load, t as JSON_SCHEMA } from "./chunk-MI3HLSF2-6-T1J0MS.js";
|
|
21
|
+
import { t as package_default } from "./chunk-XAJISQIX-XsDvU4jW.js";
|
|
22
|
+
var COMMENT = "comm", RULESET = "rule", DECLARATION = "decl", IMPORT = "@import", NAMESPACE = "@namespace", KEYFRAMES = "@keyframes", LAYER = "@layer", abs = Math.abs, from = String.fromCharCode;
|
|
23
|
+
function trim(e) {
|
|
24
|
+
return e.trim();
|
|
25
|
+
}
|
|
26
|
+
function replace(e, S, C) {
|
|
27
|
+
return e.replace(S, C);
|
|
28
|
+
}
|
|
29
|
+
function indexof(e, S, C) {
|
|
30
|
+
return e.indexOf(S, C);
|
|
31
|
+
}
|
|
32
|
+
function charat(e, S) {
|
|
33
|
+
return e.charCodeAt(S) | 0;
|
|
34
|
+
}
|
|
35
|
+
function substr(e, S, C) {
|
|
36
|
+
return e.slice(S, C);
|
|
37
|
+
}
|
|
38
|
+
function strlen(e) {
|
|
39
|
+
return e.length;
|
|
40
|
+
}
|
|
41
|
+
function sizeof(e) {
|
|
42
|
+
return e.length;
|
|
43
|
+
}
|
|
44
|
+
function append(e, S) {
|
|
45
|
+
return S.push(e), e;
|
|
46
|
+
}
|
|
47
|
+
var line = 1, column = 1, length = 0, position = 0, character = 0, characters = "";
|
|
48
|
+
function node(e, S, C, w, T, E, D, O) {
|
|
49
|
+
return {
|
|
50
|
+
value: e,
|
|
51
|
+
root: S,
|
|
52
|
+
parent: C,
|
|
53
|
+
type: w,
|
|
54
|
+
props: T,
|
|
55
|
+
children: E,
|
|
56
|
+
line,
|
|
57
|
+
column,
|
|
58
|
+
length: D,
|
|
59
|
+
return: "",
|
|
60
|
+
siblings: O
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function char() {
|
|
64
|
+
return character;
|
|
65
|
+
}
|
|
66
|
+
function prev() {
|
|
67
|
+
return character = position > 0 ? charat(characters, --position) : 0, column--, character === 10 && (column = 1, line--), character;
|
|
68
|
+
}
|
|
69
|
+
function next() {
|
|
70
|
+
return character = position < length ? charat(characters, position++) : 0, column++, character === 10 && (column = 1, line++), character;
|
|
71
|
+
}
|
|
72
|
+
function peek() {
|
|
73
|
+
return charat(characters, position);
|
|
74
|
+
}
|
|
75
|
+
function caret() {
|
|
76
|
+
return position;
|
|
77
|
+
}
|
|
78
|
+
function slice(e, S) {
|
|
79
|
+
return substr(characters, e, S);
|
|
80
|
+
}
|
|
81
|
+
function token(e) {
|
|
82
|
+
switch (e) {
|
|
83
|
+
case 0:
|
|
84
|
+
case 9:
|
|
85
|
+
case 10:
|
|
86
|
+
case 13:
|
|
87
|
+
case 32: return 5;
|
|
88
|
+
case 33:
|
|
89
|
+
case 43:
|
|
90
|
+
case 44:
|
|
91
|
+
case 47:
|
|
92
|
+
case 62:
|
|
93
|
+
case 64:
|
|
94
|
+
case 126:
|
|
95
|
+
case 59:
|
|
96
|
+
case 123:
|
|
97
|
+
case 125: return 4;
|
|
98
|
+
case 58: return 3;
|
|
99
|
+
case 34:
|
|
100
|
+
case 39:
|
|
101
|
+
case 40:
|
|
102
|
+
case 91: return 2;
|
|
103
|
+
case 41:
|
|
104
|
+
case 93: return 1;
|
|
105
|
+
}
|
|
106
|
+
return 0;
|
|
107
|
+
}
|
|
108
|
+
function alloc(e) {
|
|
109
|
+
return line = column = 1, length = strlen(characters = e), position = 0, [];
|
|
110
|
+
}
|
|
111
|
+
function dealloc(e) {
|
|
112
|
+
return characters = "", e;
|
|
113
|
+
}
|
|
114
|
+
function delimit(e) {
|
|
115
|
+
return trim(slice(position - 1, delimiter(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
116
|
+
}
|
|
117
|
+
function whitespace(e) {
|
|
118
|
+
for (; (character = peek()) && character < 33;) next();
|
|
119
|
+
return token(e) > 2 || token(character) > 3 ? "" : " ";
|
|
120
|
+
}
|
|
121
|
+
function escaping(e, S) {
|
|
122
|
+
for (; --S && next() && !(character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97););
|
|
123
|
+
return slice(e, caret() + (S < 6 && peek() == 32 && next() == 32));
|
|
124
|
+
}
|
|
125
|
+
function delimiter(e) {
|
|
126
|
+
for (; next();) switch (character) {
|
|
127
|
+
case e: return position;
|
|
128
|
+
case 34:
|
|
129
|
+
case 39:
|
|
130
|
+
e !== 34 && e !== 39 && delimiter(character);
|
|
131
|
+
break;
|
|
132
|
+
case 40:
|
|
133
|
+
e === 41 && delimiter(e);
|
|
134
|
+
break;
|
|
135
|
+
case 92:
|
|
136
|
+
next();
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
return position;
|
|
140
|
+
}
|
|
141
|
+
function commenter(e, S) {
|
|
142
|
+
for (; next() && e + character !== 57 && !(e + character === 84 && peek() === 47););
|
|
143
|
+
return "/*" + slice(S, position - 1) + "*" + from(e === 47 ? e : next());
|
|
144
|
+
}
|
|
145
|
+
function identifier(e) {
|
|
146
|
+
for (; !token(peek());) next();
|
|
147
|
+
return slice(e, position);
|
|
148
|
+
}
|
|
149
|
+
function compile(e) {
|
|
150
|
+
return dealloc(parse$1("", null, null, null, [""], e = alloc(e), 0, [0], e));
|
|
151
|
+
}
|
|
152
|
+
function parse$1(e, S, C, w, T, E, D, O, k) {
|
|
153
|
+
for (var A = 0, j = 0, M = D, N = 0, P = 0, F = 0, I = 1, L = 1, R = 1, z = 0, B = "", V = T, H = E, U = w, W = B; L;) switch (F = z, z = next()) {
|
|
154
|
+
case 40: if (F != 108 && charat(W, M - 1) == 58) {
|
|
155
|
+
indexof(W += replace(delimit(z), "&", "&\f"), "&\f", abs(A ? O[A - 1] : 0)) != -1 && (R = -1);
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
case 34:
|
|
159
|
+
case 39:
|
|
160
|
+
case 91:
|
|
161
|
+
W += delimit(z);
|
|
162
|
+
break;
|
|
163
|
+
case 9:
|
|
164
|
+
case 10:
|
|
165
|
+
case 13:
|
|
166
|
+
case 32:
|
|
167
|
+
W += whitespace(F);
|
|
168
|
+
break;
|
|
169
|
+
case 92:
|
|
170
|
+
W += escaping(caret() - 1, 7);
|
|
171
|
+
continue;
|
|
172
|
+
case 47:
|
|
173
|
+
switch (peek()) {
|
|
174
|
+
case 42:
|
|
175
|
+
case 47:
|
|
176
|
+
append(comment(commenter(next(), caret()), S, C, k), k), (token(F || 1) == 5 || token(peek() || 1) == 5) && strlen(W) && substr(W, -1, void 0) !== " " && (W += " ");
|
|
177
|
+
break;
|
|
178
|
+
default: W += "/";
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
case 123 * I: O[A++] = strlen(W) * R;
|
|
182
|
+
case 125 * I:
|
|
183
|
+
case 59:
|
|
184
|
+
case 0:
|
|
185
|
+
switch (z) {
|
|
186
|
+
case 0:
|
|
187
|
+
case 125: L = 0;
|
|
188
|
+
case 59 + j:
|
|
189
|
+
R == -1 && (W = replace(W, /\f/g, "")), P > 0 && (strlen(W) - M || I === 0 && F === 47) && append(P > 32 ? declaration(W + ";", w, C, M - 1, k) : declaration(replace(W, " ", "") + ";", w, C, M - 2, k), k);
|
|
190
|
+
break;
|
|
191
|
+
case 59: W += ";";
|
|
192
|
+
default: if (append(U = ruleset(W, S, C, A, j, T, O, B, V = [], H = [], M, E), E), z === 123) if (j === 0) parse$1(W, S, U, U, V, E, M, O, H);
|
|
193
|
+
else {
|
|
194
|
+
switch (N) {
|
|
195
|
+
case 99: if (charat(W, 3) === 110) break;
|
|
196
|
+
case 108: if (charat(W, 2) === 97) break;
|
|
197
|
+
default: j = 0;
|
|
198
|
+
case 100:
|
|
199
|
+
case 109:
|
|
200
|
+
case 115:
|
|
201
|
+
}
|
|
202
|
+
j ? parse$1(e, U, U, w && append(ruleset(e, U, U, 0, 0, T, O, B, T, V = [], M, H), H), T, H, M, O, w ? V : H) : parse$1(W, U, U, U, [""], H, 0, O, H);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
A = j = P = 0, I = R = 1, B = W = "", M = D;
|
|
206
|
+
break;
|
|
207
|
+
case 58: M = 1 + strlen(W), P = F;
|
|
208
|
+
default:
|
|
209
|
+
if (I < 1) {
|
|
210
|
+
if (z == 123) --I;
|
|
211
|
+
else if (z == 125 && I++ == 0 && prev() == 125) continue;
|
|
212
|
+
}
|
|
213
|
+
switch (W += from(z), z * I) {
|
|
214
|
+
case 38:
|
|
215
|
+
R = j > 0 ? 1 : (W += "\f", -1);
|
|
216
|
+
break;
|
|
217
|
+
case 44:
|
|
218
|
+
O[A++] = (strlen(W) - 1) * R, R = 1;
|
|
219
|
+
break;
|
|
220
|
+
case 64:
|
|
221
|
+
peek() === 45 && (W += delimit(next())), N = peek(), j = M = strlen(B = W += identifier(caret())), z++;
|
|
222
|
+
break;
|
|
223
|
+
case 45: F === 45 && strlen(W) == 2 && (I = 0);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return E;
|
|
227
|
+
}
|
|
228
|
+
function ruleset(e, S, C, w, T, E, D, O, k, A, j, M) {
|
|
229
|
+
for (var N = T - 1, P = T === 0 ? E : [""], F = sizeof(P), I = 0, L = 0, R = 0; I < w; ++I) for (var z = 0, B = substr(e, N + 1, N = abs(L = D[I])), V = e; z < F; ++z) (V = trim(L > 0 ? P[z] + " " + B : replace(B, /&\f/g, P[z]))) && (k[R++] = V);
|
|
230
|
+
return node(e, S, C, T === 0 ? RULESET : O, k, A, j, M);
|
|
231
|
+
}
|
|
232
|
+
function comment(e, S, C, w) {
|
|
233
|
+
return node(e, S, C, COMMENT, from(char()), substr(e, 2, -2), 0, w);
|
|
234
|
+
}
|
|
235
|
+
function declaration(e, S, C, w, T) {
|
|
236
|
+
return node(e, S, C, DECLARATION, substr(e, 0, w), substr(e, w + 1, -1), w, T);
|
|
237
|
+
}
|
|
238
|
+
function serialize(e, S) {
|
|
239
|
+
for (var C = "", w = 0; w < e.length; w++) C += S(e[w], w, e, S) || "";
|
|
240
|
+
return C;
|
|
241
|
+
}
|
|
242
|
+
function stringify(e, S, C, w) {
|
|
243
|
+
switch (e.type) {
|
|
244
|
+
case LAYER: if (e.children.length) break;
|
|
245
|
+
case IMPORT:
|
|
246
|
+
case NAMESPACE:
|
|
247
|
+
case DECLARATION: return e.return = e.return || e.value;
|
|
248
|
+
case COMMENT: return "";
|
|
249
|
+
case KEYFRAMES: return e.return = e.value + "{" + serialize(e.children, w) + "}";
|
|
250
|
+
case RULESET: if (!strlen(e.value = e.props.join(","))) return "";
|
|
251
|
+
}
|
|
252
|
+
return strlen(C = serialize(e.children, w)) ? e.return = e.value + "{" + C + "}" : "";
|
|
253
|
+
}
|
|
254
|
+
var id = "c4", c4Detector_default = {
|
|
255
|
+
id,
|
|
256
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
|
|
257
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
258
|
+
let { diagram: e } = await import("./c4Diagram-YG6GDRKO-B15ZDn3Z.js");
|
|
259
|
+
return {
|
|
260
|
+
id,
|
|
261
|
+
diagram: e
|
|
262
|
+
};
|
|
263
|
+
}, "loader")
|
|
264
|
+
}, id2 = "flowchart", flowDetector_default = {
|
|
265
|
+
id: id2,
|
|
266
|
+
detector: /* @__PURE__ */ __name((e, S) => S?.flowchart?.defaultRenderer === "dagre-wrapper" || S?.flowchart?.defaultRenderer === "elk" ? !1 : /^\s*graph/.test(e), "detector"),
|
|
267
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
268
|
+
let { diagram: e } = await import("./flowDiagram-NV44I4VS-lFr4G2WN.js");
|
|
269
|
+
return {
|
|
270
|
+
id: id2,
|
|
271
|
+
diagram: e
|
|
272
|
+
};
|
|
273
|
+
}, "loader")
|
|
274
|
+
}, id3 = "flowchart-v2", flowDetector_v2_default = {
|
|
275
|
+
id: id3,
|
|
276
|
+
detector: /* @__PURE__ */ __name((e, S) => S?.flowchart?.defaultRenderer === "dagre-d3" ? !1 : (S?.flowchart?.defaultRenderer === "elk" && (S.layout = "elk"), /^\s*graph/.test(e) && S?.flowchart?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(e)), "detector"),
|
|
277
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
278
|
+
let { diagram: e } = await import("./flowDiagram-NV44I4VS-lFr4G2WN.js");
|
|
279
|
+
return {
|
|
280
|
+
id: id3,
|
|
281
|
+
diagram: e
|
|
282
|
+
};
|
|
283
|
+
}, "loader")
|
|
284
|
+
}, id4 = "er", erDetector_default = {
|
|
285
|
+
id: id4,
|
|
286
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*erDiagram/.test(e), "detector"),
|
|
287
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
288
|
+
let { diagram: e } = await import("./erDiagram-Q2GNP2WA-C8EbfuTj.js");
|
|
289
|
+
return {
|
|
290
|
+
id: id4,
|
|
291
|
+
diagram: e
|
|
292
|
+
};
|
|
293
|
+
}, "loader")
|
|
294
|
+
}, id5 = "gitGraph", gitGraphDetector_default = {
|
|
295
|
+
id: id5,
|
|
296
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*gitGraph/.test(e), "detector"),
|
|
297
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
298
|
+
let { diagram: e } = await import("./gitGraphDiagram-NY62KEGX-Cjvy4fHM.js");
|
|
299
|
+
return {
|
|
300
|
+
id: id5,
|
|
301
|
+
diagram: e
|
|
302
|
+
};
|
|
303
|
+
}, "loader")
|
|
304
|
+
}, id6 = "gantt", ganttDetector_default = {
|
|
305
|
+
id: id6,
|
|
306
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*gantt/.test(e), "detector"),
|
|
307
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
308
|
+
let { diagram: e } = await import("./ganttDiagram-JELNMOA3-Bvtip7yn.js");
|
|
309
|
+
return {
|
|
310
|
+
id: id6,
|
|
311
|
+
diagram: e
|
|
312
|
+
};
|
|
313
|
+
}, "loader")
|
|
314
|
+
}, id7 = "info", info = {
|
|
315
|
+
id: id7,
|
|
316
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*info/.test(e), "detector"),
|
|
317
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
318
|
+
let { diagram: e } = await import("./infoDiagram-WHAUD3N6-D_isj7oC.js");
|
|
319
|
+
return {
|
|
320
|
+
id: id7,
|
|
321
|
+
diagram: e
|
|
322
|
+
};
|
|
323
|
+
}, "loader")
|
|
324
|
+
}, id8 = "pie", pie = {
|
|
325
|
+
id: id8,
|
|
326
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*pie/.test(e), "detector"),
|
|
327
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
328
|
+
let { diagram: e } = await import("./pieDiagram-ADFJNKIX-CTUoM-kp.js");
|
|
329
|
+
return {
|
|
330
|
+
id: id8,
|
|
331
|
+
diagram: e
|
|
332
|
+
};
|
|
333
|
+
}, "loader")
|
|
334
|
+
}, id9 = "quadrantChart", quadrantDetector_default = {
|
|
335
|
+
id: id9,
|
|
336
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*quadrantChart/.test(e), "detector"),
|
|
337
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
338
|
+
let { diagram: e } = await import("./quadrantDiagram-AYHSOK5B-Njl7BMW7.js");
|
|
339
|
+
return {
|
|
340
|
+
id: id9,
|
|
341
|
+
diagram: e
|
|
342
|
+
};
|
|
343
|
+
}, "loader")
|
|
344
|
+
}, id10 = "xychart", xychartDetector_default = {
|
|
345
|
+
id: id10,
|
|
346
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
|
|
347
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
348
|
+
let { diagram: e } = await import("./xychartDiagram-PRI3JC2R-UcfQmj72.js");
|
|
349
|
+
return {
|
|
350
|
+
id: id10,
|
|
351
|
+
diagram: e
|
|
352
|
+
};
|
|
353
|
+
}, "loader")
|
|
354
|
+
}, id11 = "requirement", requirementDetector_default = {
|
|
355
|
+
id: id11,
|
|
356
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
|
|
357
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
358
|
+
let { diagram: e } = await import("./requirementDiagram-UZGBJVZJ-DKjE3cDK.js");
|
|
359
|
+
return {
|
|
360
|
+
id: id11,
|
|
361
|
+
diagram: e
|
|
362
|
+
};
|
|
363
|
+
}, "loader")
|
|
364
|
+
}, id12 = "sequence", sequenceDetector_default = {
|
|
365
|
+
id: id12,
|
|
366
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*sequenceDiagram/.test(e), "detector"),
|
|
367
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
368
|
+
let { diagram: e } = await import("./sequenceDiagram-WL72ISMW-BjMq4OjH.js");
|
|
369
|
+
return {
|
|
370
|
+
id: id12,
|
|
371
|
+
diagram: e
|
|
372
|
+
};
|
|
373
|
+
}, "loader")
|
|
374
|
+
}, id13 = "class", classDetector_default = {
|
|
375
|
+
id: id13,
|
|
376
|
+
detector: /* @__PURE__ */ __name((e, S) => S?.class?.defaultRenderer === "dagre-wrapper" ? !1 : /^\s*classDiagram/.test(e), "detector"),
|
|
377
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
378
|
+
let { diagram: e } = await import("./classDiagram-2ON5EDUG-Cgf9yVXj.js");
|
|
379
|
+
return {
|
|
380
|
+
id: id13,
|
|
381
|
+
diagram: e
|
|
382
|
+
};
|
|
383
|
+
}, "loader")
|
|
384
|
+
}, id14 = "classDiagram", classDetector_V2_default = {
|
|
385
|
+
id: id14,
|
|
386
|
+
detector: /* @__PURE__ */ __name((e, S) => /^\s*classDiagram/.test(e) && S?.class?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(e), "detector"),
|
|
387
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
388
|
+
let { diagram: e } = await import("./classDiagram-v2-WZHVMYZB-BtF1_0UK.js");
|
|
389
|
+
return {
|
|
390
|
+
id: id14,
|
|
391
|
+
diagram: e
|
|
392
|
+
};
|
|
393
|
+
}, "loader")
|
|
394
|
+
}, id15 = "state", stateDetector_default = {
|
|
395
|
+
id: id15,
|
|
396
|
+
detector: /* @__PURE__ */ __name((e, S) => S?.state?.defaultRenderer === "dagre-wrapper" ? !1 : /^\s*stateDiagram/.test(e), "detector"),
|
|
397
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
398
|
+
let { diagram: e } = await import("./stateDiagram-FKZM4ZOC-CnvtGM9U.js");
|
|
399
|
+
return {
|
|
400
|
+
id: id15,
|
|
401
|
+
diagram: e
|
|
402
|
+
};
|
|
403
|
+
}, "loader")
|
|
404
|
+
}, id16 = "stateDiagram", stateDetector_V2_default = {
|
|
405
|
+
id: id16,
|
|
406
|
+
detector: /* @__PURE__ */ __name((e, S) => !!(/^\s*stateDiagram-v2/.test(e) || /^\s*stateDiagram/.test(e) && S?.state?.defaultRenderer === "dagre-wrapper"), "detector"),
|
|
407
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
408
|
+
let { diagram: e } = await import("./stateDiagram-v2-4FDKWEC3-C15xi-04.js");
|
|
409
|
+
return {
|
|
410
|
+
id: id16,
|
|
411
|
+
diagram: e
|
|
412
|
+
};
|
|
413
|
+
}, "loader")
|
|
414
|
+
}, id17 = "journey", journeyDetector_default = {
|
|
415
|
+
id: id17,
|
|
416
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*journey/.test(e), "detector"),
|
|
417
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
418
|
+
let { diagram: e } = await import("./journeyDiagram-XKPGCS4Q-DlXHMS3v.js");
|
|
419
|
+
return {
|
|
420
|
+
id: id17,
|
|
421
|
+
diagram: e
|
|
422
|
+
};
|
|
423
|
+
}, "loader")
|
|
424
|
+
}, renderer = { draw: /* @__PURE__ */ __name((e, S, C) => {
|
|
425
|
+
log.debug("rendering svg for syntax error\n");
|
|
426
|
+
let T = selectSvgElement(S), E = T.append("g");
|
|
427
|
+
T.attr("viewBox", "0 0 2412 512"), configureSvgSize(T, 100, 512, !0), E.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"), E.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"), E.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"), E.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"), E.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"), E.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"), E.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"), E.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${C}`);
|
|
428
|
+
}, "draw") }, errorRenderer_default = renderer, errorDiagram_default = {
|
|
429
|
+
db: {},
|
|
430
|
+
renderer,
|
|
431
|
+
parser: { parse: /* @__PURE__ */ __name(() => {}, "parse") }
|
|
432
|
+
}, id18 = "flowchart-elk", detector_default = {
|
|
433
|
+
id: id18,
|
|
434
|
+
detector: /* @__PURE__ */ __name((e, S = {}) => /^\s*flowchart-elk/.test(e) || /^\s*(flowchart|graph)/.test(e) && S?.flowchart?.defaultRenderer === "elk" ? (S.layout = "elk", !0) : !1, "detector"),
|
|
435
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
436
|
+
let { diagram: e } = await import("./flowDiagram-NV44I4VS-lFr4G2WN.js");
|
|
437
|
+
return {
|
|
438
|
+
id: id18,
|
|
439
|
+
diagram: e
|
|
440
|
+
};
|
|
441
|
+
}, "loader")
|
|
442
|
+
}, id19 = "timeline", detector_default2 = {
|
|
443
|
+
id: id19,
|
|
444
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*timeline/.test(e), "detector"),
|
|
445
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
446
|
+
let { diagram: e } = await import("./timeline-definition-IT6M3QCI-C7q6jdLA.js");
|
|
447
|
+
return {
|
|
448
|
+
id: id19,
|
|
449
|
+
diagram: e
|
|
450
|
+
};
|
|
451
|
+
}, "loader")
|
|
452
|
+
}, id20 = "mindmap", detector_default3 = {
|
|
453
|
+
id: id20,
|
|
454
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*mindmap/.test(e), "detector"),
|
|
455
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
456
|
+
let { diagram: e } = await import("./mindmap-definition-VGOIOE7T-gtjvHqQ-.js");
|
|
457
|
+
return {
|
|
458
|
+
id: id20,
|
|
459
|
+
diagram: e
|
|
460
|
+
};
|
|
461
|
+
}, "loader")
|
|
462
|
+
}, id21 = "kanban", detector_default4 = {
|
|
463
|
+
id: id21,
|
|
464
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*kanban/.test(e), "detector"),
|
|
465
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
466
|
+
let { diagram: e } = await import("./kanban-definition-3W4ZIXB7-CV6572lv.js");
|
|
467
|
+
return {
|
|
468
|
+
id: id21,
|
|
469
|
+
diagram: e
|
|
470
|
+
};
|
|
471
|
+
}, "loader")
|
|
472
|
+
}, id22 = "sankey", sankeyDetector_default = {
|
|
473
|
+
id: id22,
|
|
474
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
|
|
475
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
476
|
+
let { diagram: e } = await import("./sankeyDiagram-TZEHDZUN-DW2ap3zY.js");
|
|
477
|
+
return {
|
|
478
|
+
id: id22,
|
|
479
|
+
diagram: e
|
|
480
|
+
};
|
|
481
|
+
}, "loader")
|
|
482
|
+
}, id23 = "packet", packet = {
|
|
483
|
+
id: id23,
|
|
484
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*packet(-beta)?/.test(e), "detector"),
|
|
485
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
486
|
+
let { diagram: e } = await import("./diagram-S2PKOQOG-6I6J4WRC.js");
|
|
487
|
+
return {
|
|
488
|
+
id: id23,
|
|
489
|
+
diagram: e
|
|
490
|
+
};
|
|
491
|
+
}, "loader")
|
|
492
|
+
}, id24 = "radar", radar = {
|
|
493
|
+
id: id24,
|
|
494
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*radar-beta/.test(e), "detector"),
|
|
495
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
496
|
+
let { diagram: e } = await import("./diagram-QEK2KX5R-CAeywSxy.js");
|
|
497
|
+
return {
|
|
498
|
+
id: id24,
|
|
499
|
+
diagram: e
|
|
500
|
+
};
|
|
501
|
+
}, "loader")
|
|
502
|
+
}, id25 = "block", blockDetector_default = {
|
|
503
|
+
id: id25,
|
|
504
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*block(-beta)?/.test(e), "detector"),
|
|
505
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
506
|
+
let { diagram: e } = await import("./blockDiagram-VD42YOAC-Bp6L6c6e.js");
|
|
507
|
+
return {
|
|
508
|
+
id: id25,
|
|
509
|
+
diagram: e
|
|
510
|
+
};
|
|
511
|
+
}, "loader")
|
|
512
|
+
}, id26 = "architecture", architectureDetector_default = {
|
|
513
|
+
id: id26,
|
|
514
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*architecture/.test(e), "detector"),
|
|
515
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
516
|
+
let { diagram: e } = await import("./architectureDiagram-VXUJARFQ-BQS5Ixrn.js");
|
|
517
|
+
return {
|
|
518
|
+
id: id26,
|
|
519
|
+
diagram: e
|
|
520
|
+
};
|
|
521
|
+
}, "loader")
|
|
522
|
+
}, id27 = "treemap", treemap = {
|
|
523
|
+
id: id27,
|
|
524
|
+
detector: /* @__PURE__ */ __name((e) => /^\s*treemap/.test(e), "detector"),
|
|
525
|
+
loader: /* @__PURE__ */ __name(async () => {
|
|
526
|
+
let { diagram: e } = await import("./diagram-PSM6KHXK-Bl7brR-1.js");
|
|
527
|
+
return {
|
|
528
|
+
id: id27,
|
|
529
|
+
diagram: e
|
|
530
|
+
};
|
|
531
|
+
}, "loader")
|
|
532
|
+
}, hasLoadedDiagrams = !1, addDiagrams = /* @__PURE__ */ __name(() => {
|
|
533
|
+
hasLoadedDiagrams || (hasLoadedDiagrams = !0, registerDiagram("error", errorDiagram_default, (e) => e.toLowerCase().trim() === "error"), registerDiagram("---", {
|
|
534
|
+
db: { clear: /* @__PURE__ */ __name(() => {}, "clear") },
|
|
535
|
+
styles: {},
|
|
536
|
+
renderer: { draw: /* @__PURE__ */ __name(() => {}, "draw") },
|
|
537
|
+
parser: { parse: /* @__PURE__ */ __name(() => {
|
|
538
|
+
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");
|
|
539
|
+
}, "parse") },
|
|
540
|
+
init: /* @__PURE__ */ __name(() => null, "init")
|
|
541
|
+
}, (e) => e.toLowerCase().trimStart().startsWith("---")), registerLazyLoadedDiagrams(detector_default, detector_default3, architectureDetector_default), registerLazyLoadedDiagrams(c4Detector_default, detector_default4, classDetector_V2_default, classDetector_default, erDetector_default, ganttDetector_default, info, pie, requirementDetector_default, sequenceDetector_default, flowDetector_v2_default, flowDetector_default, detector_default2, gitGraphDetector_default, stateDetector_V2_default, stateDetector_default, journeyDetector_default, quadrantDetector_default, sankeyDetector_default, packet, xychartDetector_default, blockDetector_default, radar, treemap));
|
|
542
|
+
}, "addDiagrams"), loadRegisteredDiagrams = /* @__PURE__ */ __name(async () => {
|
|
543
|
+
log.debug("Loading registered diagrams");
|
|
544
|
+
let e = (await Promise.allSettled(Object.entries(detectors).map(async ([e, { detector: S, loader: C }]) => {
|
|
545
|
+
if (C) try {
|
|
546
|
+
getDiagram(e);
|
|
547
|
+
} catch {
|
|
548
|
+
try {
|
|
549
|
+
let { diagram: e, id: w } = await C();
|
|
550
|
+
registerDiagram(w, e, S);
|
|
551
|
+
} catch (S) {
|
|
552
|
+
throw log.error(`Failed to load external diagram with key ${e}. Removing from detectors.`), delete detectors[e], S;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}))).filter((e) => e.status === "rejected");
|
|
556
|
+
if (e.length > 0) {
|
|
557
|
+
log.error(`Failed to load ${e.length} external diagrams`);
|
|
558
|
+
for (let S of e) log.error(S);
|
|
559
|
+
throw Error(`Failed to load ${e.length} external diagrams`);
|
|
560
|
+
}
|
|
561
|
+
}, "loadRegisteredDiagrams"), SVG_ROLE = "graphics-document document";
|
|
562
|
+
function setA11yDiagramInfo(e, S) {
|
|
563
|
+
e.attr("role", SVG_ROLE), S !== "" && e.attr("aria-roledescription", S);
|
|
564
|
+
}
|
|
565
|
+
__name(setA11yDiagramInfo, "setA11yDiagramInfo");
|
|
566
|
+
function addSVGa11yTitleDescription(e, S, C, w) {
|
|
567
|
+
if (e.insert !== void 0) {
|
|
568
|
+
if (C) {
|
|
569
|
+
let S = `chart-desc-${w}`;
|
|
570
|
+
e.attr("aria-describedby", S), e.insert("desc", ":first-child").attr("id", S).text(C);
|
|
571
|
+
}
|
|
572
|
+
if (S) {
|
|
573
|
+
let C = `chart-title-${w}`;
|
|
574
|
+
e.attr("aria-labelledby", C), e.insert("title", ":first-child").attr("id", C).text(S);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
__name(addSVGa11yTitleDescription, "addSVGa11yTitleDescription");
|
|
579
|
+
var Diagram = class e {
|
|
580
|
+
constructor(e, S, C, w, T) {
|
|
581
|
+
this.type = e, this.text = S, this.db = C, this.parser = w, this.renderer = T;
|
|
582
|
+
}
|
|
583
|
+
static #e = __name(this, "Diagram");
|
|
584
|
+
static async fromText(S, C = {}) {
|
|
585
|
+
let w = getConfig(), T = detectType(S, w);
|
|
586
|
+
S = encodeEntities(S) + "\n";
|
|
587
|
+
try {
|
|
588
|
+
getDiagram(T);
|
|
589
|
+
} catch {
|
|
590
|
+
let e = getDiagramLoader(T);
|
|
591
|
+
if (!e) throw new UnknownDiagramError(`Diagram ${T} not found.`);
|
|
592
|
+
let { id: S, diagram: C } = await e();
|
|
593
|
+
registerDiagram(S, C);
|
|
594
|
+
}
|
|
595
|
+
let { db: E, parser: D, renderer: O, init: k } = getDiagram(T);
|
|
596
|
+
return D.parser && (D.parser.yy = E), E.clear?.(), k?.(w), C.title && E.setDiagramTitle?.(C.title), await D.parse(S), new e(T, S, E, D, O);
|
|
597
|
+
}
|
|
598
|
+
async render(e, S) {
|
|
599
|
+
await this.renderer.draw(this.text, e, S, this);
|
|
600
|
+
}
|
|
601
|
+
getParser() {
|
|
602
|
+
return this.parser;
|
|
603
|
+
}
|
|
604
|
+
getType() {
|
|
605
|
+
return this.type;
|
|
606
|
+
}
|
|
607
|
+
}, interactionFunctions = [], attachFunctions = /* @__PURE__ */ __name(() => {
|
|
608
|
+
interactionFunctions.forEach((e) => {
|
|
609
|
+
e();
|
|
610
|
+
}), interactionFunctions = [];
|
|
611
|
+
}, "attachFunctions"), cleanupComments = /* @__PURE__ */ __name((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
|
|
612
|
+
function extractFrontMatter(e) {
|
|
613
|
+
let S = e.match(frontMatterRegex);
|
|
614
|
+
if (!S) return {
|
|
615
|
+
text: e,
|
|
616
|
+
metadata: {}
|
|
617
|
+
};
|
|
618
|
+
let C = load(S[1], { schema: JSON_SCHEMA }) ?? {};
|
|
619
|
+
C = typeof C == "object" && !Array.isArray(C) ? C : {};
|
|
620
|
+
let w = {};
|
|
621
|
+
return C.displayMode && (w.displayMode = C.displayMode.toString()), C.title && (w.title = C.title.toString()), C.config && (w.config = C.config), {
|
|
622
|
+
text: e.slice(S[0].length),
|
|
623
|
+
metadata: w
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
__name(extractFrontMatter, "extractFrontMatter");
|
|
627
|
+
var cleanupText = /* @__PURE__ */ __name((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e, S, C) => "<" + S + C.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), processFrontmatter = /* @__PURE__ */ __name((e) => {
|
|
628
|
+
let { text: S, metadata: C } = extractFrontMatter(e), { displayMode: w, title: T, config: E = {} } = C;
|
|
629
|
+
return w && (E.gantt ||= {}, E.gantt.displayMode = w), {
|
|
630
|
+
title: T,
|
|
631
|
+
config: E,
|
|
632
|
+
text: S
|
|
633
|
+
};
|
|
634
|
+
}, "processFrontmatter"), processDirectives = /* @__PURE__ */ __name((e) => {
|
|
635
|
+
let S = utils_default.detectInit(e) ?? {}, C = utils_default.detectDirective(e, "wrap");
|
|
636
|
+
return Array.isArray(C) ? S.wrap = C.some(({ type: e }) => e === "wrap") : C?.type === "wrap" && (S.wrap = !0), {
|
|
637
|
+
text: removeDirectives(e),
|
|
638
|
+
directive: S
|
|
639
|
+
};
|
|
640
|
+
}, "processDirectives");
|
|
641
|
+
function preprocessDiagram(e) {
|
|
642
|
+
let S = processFrontmatter(cleanupText(e)), C = processDirectives(S.text), w = cleanAndMerge(S.config, C.directive);
|
|
643
|
+
return e = cleanupComments(C.text), {
|
|
644
|
+
code: e,
|
|
645
|
+
title: S.title,
|
|
646
|
+
config: w
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
__name(preprocessDiagram, "preprocessDiagram");
|
|
650
|
+
function toBase64(e) {
|
|
651
|
+
let S = new TextEncoder().encode(e), C = Array.from(S, (e) => String.fromCodePoint(e)).join("");
|
|
652
|
+
return btoa(C);
|
|
653
|
+
}
|
|
654
|
+
__name(toBase64, "toBase64");
|
|
655
|
+
var MAX_TEXTLENGTH = 5e4, MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", SECURITY_LVL_SANDBOX = "sandbox", SECURITY_LVL_LOOSE = "loose", XMLNS_SVG_STD = "http://www.w3.org/2000/svg", XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink", XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml", IFRAME_WIDTH = "100%", IFRAME_HEIGHT = "100%", IFRAME_STYLES = "border:0;margin:0;", IFRAME_BODY_STYLE = "margin:0", IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups", IFRAME_NOT_SUPPORTED_MSG = "The \"iframe\" tag is not supported by your browser.", DOMPURIFY_TAGS = ["foreignobject"], DOMPURIFY_ATTR = ["dominant-baseline"];
|
|
656
|
+
function processAndSetConfigs(e) {
|
|
657
|
+
let S = preprocessDiagram(e);
|
|
658
|
+
return reset(), addDirective(S.config ?? {}), S;
|
|
659
|
+
}
|
|
660
|
+
__name(processAndSetConfigs, "processAndSetConfigs");
|
|
661
|
+
async function parse(e, S) {
|
|
662
|
+
addDiagrams();
|
|
663
|
+
try {
|
|
664
|
+
let { code: S, config: C } = processAndSetConfigs(e);
|
|
665
|
+
return {
|
|
666
|
+
diagramType: (await getDiagramFromText(S)).type,
|
|
667
|
+
config: C
|
|
668
|
+
};
|
|
669
|
+
} catch (e) {
|
|
670
|
+
if (S?.suppressErrors) return !1;
|
|
671
|
+
throw e;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
__name(parse, "parse");
|
|
675
|
+
var cssImportantStyles = /* @__PURE__ */ __name((e, S, C = []) => `
|
|
676
|
+
.${e} ${S} { ${C.join(" !important; ")} !important; }`, "cssImportantStyles"), createCssStyles = /* @__PURE__ */ __name((e, C = /* @__PURE__ */ new Map()) => {
|
|
677
|
+
let w = "";
|
|
678
|
+
if (e.themeCSS !== void 0 && (w += `
|
|
679
|
+
${e.themeCSS}`), e.fontFamily !== void 0 && (w += `
|
|
680
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`), e.altFontFamily !== void 0 && (w += `
|
|
681
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`), C instanceof Map) {
|
|
682
|
+
let T = e.htmlLabels ?? e.flowchart?.htmlLabels ? ["> *", "span"] : [
|
|
683
|
+
"rect",
|
|
684
|
+
"polygon",
|
|
685
|
+
"ellipse",
|
|
686
|
+
"circle",
|
|
687
|
+
"path"
|
|
688
|
+
];
|
|
689
|
+
C.forEach((e) => {
|
|
690
|
+
isEmpty_default(e.styles) || T.forEach((S) => {
|
|
691
|
+
w += cssImportantStyles(e.id, S, e.styles);
|
|
692
|
+
}), isEmpty_default(e.textStyles) || (w += cssImportantStyles(e.id, "tspan", (e?.textStyles || []).map((e) => e.replace("color", "fill"))));
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
return w;
|
|
696
|
+
}, "createCssStyles"), createUserStyles = /* @__PURE__ */ __name((e, S, C, w) => serialize(compile(`${w}{${styles_default(S, createCssStyles(e, C), e.themeVariables)}}`), stringify), "createUserStyles"), cleanUpSvgCode = /* @__PURE__ */ __name((e = "", S, C) => {
|
|
697
|
+
let w = e;
|
|
698
|
+
return !C && !S && (w = w.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, "marker-end=\"url(#")), w = decodeEntities(w), w = w.replace(/<br>/g, "<br/>"), w;
|
|
699
|
+
}, "cleanUpSvgCode"), putIntoIFrame = /* @__PURE__ */ __name((e = "", S) => `<iframe style="width:${IFRAME_WIDTH};height:${S?.viewBox?.baseVal?.height ? S.viewBox.baseVal.height + "px" : IFRAME_HEIGHT};${IFRAME_STYLES}" src="data:text/html;charset=UTF-8;base64,${toBase64(`<body style="${IFRAME_BODY_STYLE}">${e}</body>`)}" sandbox="${IFRAME_SANDBOX_OPTS}">
|
|
700
|
+
${IFRAME_NOT_SUPPORTED_MSG}
|
|
701
|
+
</iframe>`, "putIntoIFrame"), appendDivSvgG = /* @__PURE__ */ __name((e, S, C, w, T) => {
|
|
702
|
+
let E = e.append("div");
|
|
703
|
+
E.attr("id", C), w && E.attr("style", w);
|
|
704
|
+
let D = E.append("svg").attr("id", S).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD);
|
|
705
|
+
return T && D.attr("xmlns:xlink", T), D.append("g"), e;
|
|
706
|
+
}, "appendDivSvgG");
|
|
707
|
+
function sandboxedIframe(e, S) {
|
|
708
|
+
return e.append("iframe").attr("id", S).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
|
|
709
|
+
}
|
|
710
|
+
__name(sandboxedIframe, "sandboxedIframe");
|
|
711
|
+
var removeExistingElements = /* @__PURE__ */ __name((e, S, C, w) => {
|
|
712
|
+
e.getElementById(S)?.remove(), e.getElementById(C)?.remove(), e.getElementById(w)?.remove();
|
|
713
|
+
}, "removeExistingElements"), render = /* @__PURE__ */ __name(async function(S, C, D) {
|
|
714
|
+
addDiagrams();
|
|
715
|
+
let O = processAndSetConfigs(C);
|
|
716
|
+
C = O.code;
|
|
717
|
+
let k = getConfig();
|
|
718
|
+
log.debug(k), C.length > (k?.maxTextSize ?? MAX_TEXTLENGTH) && (C = MAX_TEXTLENGTH_EXCEEDED_MSG);
|
|
719
|
+
let A = "#" + S, j = "i" + S, M = "#" + j, N = "d" + S, P = "#" + N, F = /* @__PURE__ */ __name(() => {
|
|
720
|
+
let e = select_default(L ? M : P).node();
|
|
721
|
+
e && "remove" in e && e.remove();
|
|
722
|
+
}, "removeTempElements"), I = select_default("body"), L = k.securityLevel === SECURITY_LVL_SANDBOX, z = k.securityLevel === SECURITY_LVL_LOOSE, B = k.fontFamily;
|
|
723
|
+
D === void 0 ? (removeExistingElements(document, S, N, j), L ? (I = select_default(sandboxedIframe(select_default("body"), j).nodes()[0].contentDocument.body), I.node().style.margin = 0) : I = select_default("body"), appendDivSvgG(I, S, N)) : (D && (D.innerHTML = ""), L ? (I = select_default(sandboxedIframe(select_default(D), j).nodes()[0].contentDocument.body), I.node().style.margin = 0) : I = select_default(D), appendDivSvgG(I, S, N, `font-family: ${B}`, XMLNS_XLINK_STD));
|
|
724
|
+
let V, H;
|
|
725
|
+
try {
|
|
726
|
+
V = await Diagram.fromText(C, { title: O.title });
|
|
727
|
+
} catch (e) {
|
|
728
|
+
if (k.suppressErrorRendering) throw F(), e;
|
|
729
|
+
V = await Diagram.fromText("error"), H = e;
|
|
730
|
+
}
|
|
731
|
+
let U = I.select(P).node(), W = V.type, G = U.firstChild, K = G.firstChild, q = V.renderer.getClasses?.(C, V), J = createUserStyles(k, W, q, A), Y = document.createElement("style");
|
|
732
|
+
Y.innerHTML = J, G.insertBefore(Y, K);
|
|
733
|
+
try {
|
|
734
|
+
await V.renderer.draw(C, S, package_default.version, V);
|
|
735
|
+
} catch (e) {
|
|
736
|
+
throw k.suppressErrorRendering ? F() : errorRenderer_default.draw(C, S, package_default.version), e;
|
|
737
|
+
}
|
|
738
|
+
let X = I.select(`${P} svg`), Z = V.db.getAccTitle?.(), Q = V.db.getAccDescription?.();
|
|
739
|
+
addA11yInfo(W, X, Z, Q), I.select(`[id="${S}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD);
|
|
740
|
+
let $ = I.select(P).node().innerHTML;
|
|
741
|
+
if (log.debug("config.arrowMarkerAbsolute", k.arrowMarkerAbsolute), $ = cleanUpSvgCode($, L, evaluate(k.arrowMarkerAbsolute)), L) {
|
|
742
|
+
let e = I.select(P + " svg").node();
|
|
743
|
+
$ = putIntoIFrame($, e);
|
|
744
|
+
} else z || ($ = purify.sanitize($, {
|
|
745
|
+
ADD_TAGS: DOMPURIFY_TAGS,
|
|
746
|
+
ADD_ATTR: DOMPURIFY_ATTR,
|
|
747
|
+
HTML_INTEGRATION_POINTS: { foreignobject: !0 }
|
|
748
|
+
}));
|
|
749
|
+
if (attachFunctions(), H) throw H;
|
|
750
|
+
return F(), {
|
|
751
|
+
diagramType: W,
|
|
752
|
+
svg: $,
|
|
753
|
+
bindFunctions: V.db.bindFunctions
|
|
754
|
+
};
|
|
755
|
+
}, "render");
|
|
756
|
+
function initialize(e = {}) {
|
|
757
|
+
let S = assignWithDepth_default({}, e);
|
|
758
|
+
S?.fontFamily && !S.themeVariables?.fontFamily && (S.themeVariables ||= {}, S.themeVariables.fontFamily = S.fontFamily), saveConfigFromInitialize(S), S?.theme && S.theme in themes_default ? S.themeVariables = themes_default[S.theme].getThemeVariables(S.themeVariables) : S && (S.themeVariables = themes_default.default.getThemeVariables(S.themeVariables)), setLogLevel((typeof S == "object" ? setSiteConfig(S) : getSiteConfig()).logLevel), addDiagrams();
|
|
759
|
+
}
|
|
760
|
+
__name(initialize, "initialize");
|
|
761
|
+
var getDiagramFromText = /* @__PURE__ */ __name((e, S = {}) => {
|
|
762
|
+
let { code: C } = preprocessDiagram(e);
|
|
763
|
+
return Diagram.fromText(C, S);
|
|
764
|
+
}, "getDiagramFromText");
|
|
765
|
+
function addA11yInfo(e, S, C, w) {
|
|
766
|
+
setA11yDiagramInfo(S, e), addSVGa11yTitleDescription(S, C, w, S.attr("id"));
|
|
767
|
+
}
|
|
768
|
+
__name(addA11yInfo, "addA11yInfo");
|
|
769
|
+
var mermaidAPI = Object.freeze({
|
|
770
|
+
render,
|
|
771
|
+
parse,
|
|
772
|
+
getDiagramFromText,
|
|
773
|
+
initialize,
|
|
774
|
+
getConfig,
|
|
775
|
+
setConfig,
|
|
776
|
+
getSiteConfig,
|
|
777
|
+
updateSiteConfig,
|
|
778
|
+
reset: /* @__PURE__ */ __name(() => {
|
|
779
|
+
reset();
|
|
780
|
+
}, "reset"),
|
|
781
|
+
globalReset: /* @__PURE__ */ __name(() => {
|
|
782
|
+
reset(defaultConfig);
|
|
783
|
+
}, "globalReset"),
|
|
784
|
+
defaultConfig
|
|
785
|
+
});
|
|
786
|
+
setLogLevel(getConfig().logLevel), reset(getConfig());
|
|
787
|
+
var handleError = /* @__PURE__ */ __name((e, S, C) => {
|
|
788
|
+
log.warn(e), isDetailedError(e) ? (C && C(e.str, e.hash), S.push({
|
|
789
|
+
...e,
|
|
790
|
+
message: e.str,
|
|
791
|
+
error: e
|
|
792
|
+
})) : (C && C(e), e instanceof Error && S.push({
|
|
793
|
+
str: e.message,
|
|
794
|
+
message: e.message,
|
|
795
|
+
hash: e.name,
|
|
796
|
+
error: e
|
|
797
|
+
}));
|
|
798
|
+
}, "handleError"), run = /* @__PURE__ */ __name(async function(e = { querySelector: ".mermaid" }) {
|
|
799
|
+
try {
|
|
800
|
+
await runThrowsErrors(e);
|
|
801
|
+
} catch (S) {
|
|
802
|
+
if (isDetailedError(S) && log.error(S.str), mermaid.parseError && mermaid.parseError(S), !e.suppressErrors) throw log.error("Use the suppressErrors option to suppress these errors"), S;
|
|
803
|
+
}
|
|
804
|
+
}, "run"), runThrowsErrors = /* @__PURE__ */ __name(async function({ postRenderCallback: e, querySelector: S, nodes: C } = { querySelector: ".mermaid" }) {
|
|
805
|
+
let T = mermaidAPI.getConfig();
|
|
806
|
+
log.debug(`${e ? "" : "No "}Callback function found`);
|
|
807
|
+
let E;
|
|
808
|
+
if (C) E = C;
|
|
809
|
+
else if (S) E = document.querySelectorAll(S);
|
|
810
|
+
else throw Error("Nodes and querySelector are both undefined");
|
|
811
|
+
log.debug(`Found ${E.length} diagrams`), T?.startOnLoad !== void 0 && (log.debug("Start On Load: " + T?.startOnLoad), mermaidAPI.updateSiteConfig({ startOnLoad: T?.startOnLoad }));
|
|
812
|
+
let D = new utils_default.InitIDGenerator(T.deterministicIds, T.deterministicIDSeed), O, k = [];
|
|
813
|
+
for (let S of Array.from(E)) {
|
|
814
|
+
if (log.info("Rendering diagram: " + S.id), S.getAttribute("data-processed")) continue;
|
|
815
|
+
S.setAttribute("data-processed", "true");
|
|
816
|
+
let C = `mermaid-${D.next()}`;
|
|
817
|
+
O = S.innerHTML, O = dedent(utils_default.entityDecode(O)).trim().replace(/<br\s*\/?>/gi, "<br/>");
|
|
818
|
+
let T = utils_default.detectInit(O);
|
|
819
|
+
T && log.debug("Detected early reinit: ", T);
|
|
820
|
+
try {
|
|
821
|
+
let { svg: w, bindFunctions: T } = await render2(C, O, S);
|
|
822
|
+
S.innerHTML = w, e && await e(C), T && T(S);
|
|
823
|
+
} catch (e) {
|
|
824
|
+
handleError(e, k, mermaid.parseError);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
if (k.length > 0) throw k[0];
|
|
828
|
+
}, "runThrowsErrors"), initialize2 = /* @__PURE__ */ __name(function(e) {
|
|
829
|
+
mermaidAPI.initialize(e);
|
|
830
|
+
}, "initialize"), init = /* @__PURE__ */ __name(async function(e, S, C) {
|
|
831
|
+
log.warn("mermaid.init is deprecated. Please use run instead."), e && initialize2(e);
|
|
832
|
+
let T = {
|
|
833
|
+
postRenderCallback: C,
|
|
834
|
+
querySelector: ".mermaid"
|
|
835
|
+
};
|
|
836
|
+
typeof S == "string" ? T.querySelector = S : S && (S instanceof HTMLElement ? T.nodes = [S] : T.nodes = S), await run(T);
|
|
837
|
+
}, "init"), registerExternalDiagrams = /* @__PURE__ */ __name(async (e, { lazyLoad: S = !0 } = {}) => {
|
|
838
|
+
addDiagrams(), registerLazyLoadedDiagrams(...e), S === !1 && await loadRegisteredDiagrams();
|
|
839
|
+
}, "registerExternalDiagrams"), contentLoaded = /* @__PURE__ */ __name(function() {
|
|
840
|
+
if (mermaid.startOnLoad) {
|
|
841
|
+
let { startOnLoad: e } = mermaidAPI.getConfig();
|
|
842
|
+
e && mermaid.run().catch((e) => log.error("Mermaid failed to initialize", e));
|
|
843
|
+
}
|
|
844
|
+
}, "contentLoaded");
|
|
845
|
+
typeof document < "u" && window.addEventListener("load", contentLoaded, !1);
|
|
846
|
+
var setParseErrorHandler = /* @__PURE__ */ __name(function(e) {
|
|
847
|
+
mermaid.parseError = e;
|
|
848
|
+
}, "setParseErrorHandler"), executionQueue = [], executionQueueRunning = !1, executeQueue = /* @__PURE__ */ __name(async () => {
|
|
849
|
+
if (!executionQueueRunning) {
|
|
850
|
+
for (executionQueueRunning = !0; executionQueue.length > 0;) {
|
|
851
|
+
let e = executionQueue.shift();
|
|
852
|
+
if (e) try {
|
|
853
|
+
await e();
|
|
854
|
+
} catch (e) {
|
|
855
|
+
log.error("Error executing queue", e);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
executionQueueRunning = !1;
|
|
859
|
+
}
|
|
860
|
+
}, "executeQueue"), parse2 = /* @__PURE__ */ __name(async (e, S) => new Promise((C, E) => {
|
|
861
|
+
let D = /* @__PURE__ */ __name(() => new Promise((T, D) => {
|
|
862
|
+
mermaidAPI.parse(e, S).then((e) => {
|
|
863
|
+
T(e), C(e);
|
|
864
|
+
}, (e) => {
|
|
865
|
+
log.error("Error parsing", e), mermaid.parseError?.(e), D(e), E(e);
|
|
866
|
+
});
|
|
867
|
+
}), "performCall");
|
|
868
|
+
executionQueue.push(D), executeQueue().catch(E);
|
|
869
|
+
}), "parse"), render2 = /* @__PURE__ */ __name((e, S, C) => new Promise((E, D) => {
|
|
870
|
+
let O = /* @__PURE__ */ __name(() => new Promise((T, O) => {
|
|
871
|
+
mermaidAPI.render(e, S, C).then((e) => {
|
|
872
|
+
T(e), E(e);
|
|
873
|
+
}, (e) => {
|
|
874
|
+
log.error("Error parsing", e), mermaid.parseError?.(e), O(e), D(e);
|
|
875
|
+
});
|
|
876
|
+
}), "performCall");
|
|
877
|
+
executionQueue.push(O), executeQueue().catch(D);
|
|
878
|
+
}), "render"), mermaid = {
|
|
879
|
+
startOnLoad: !0,
|
|
880
|
+
mermaidAPI,
|
|
881
|
+
parse: parse2,
|
|
882
|
+
render: render2,
|
|
883
|
+
init,
|
|
884
|
+
run,
|
|
885
|
+
registerExternalDiagrams,
|
|
886
|
+
registerLayoutLoaders,
|
|
887
|
+
initialize: initialize2,
|
|
888
|
+
parseError: void 0,
|
|
889
|
+
contentLoaded,
|
|
890
|
+
setParseErrorHandler,
|
|
891
|
+
detectType,
|
|
892
|
+
registerIconPacks,
|
|
893
|
+
getRegisteredDiagramsMetadata: /* @__PURE__ */ __name(() => Object.keys(detectors).map((e) => ({ id: e })), "getRegisteredDiagramsMetadata")
|
|
894
|
+
}, mermaid_default = mermaid;
|
|
895
|
+
export { mermaid_default as default };
|