@antdv-next/x 1.2.1-beta.1 → 1.2.2
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/attachments/index.js +1 -2
- package/dist/code-highlighter/style/index.d.ts +51 -19
- package/dist/code-highlighter/style/index.js +44 -31
- package/dist/index.umd.js +133 -52
- package/dist/package.js +1 -1
- package/dist/sender/hooks/use-speech.js +1 -2
- package/dist/suggestion/Suggestion.js +37 -6
- package/dist/suggestion/useActive.d.ts +1 -1
- package/dist/suggestion/useActive.js +44 -2
- package/dist/theme/util/alias.js +5 -5
- package/dist/think/Think.js +2 -3
- package/dist/thought-chain/Node.js +2 -3
- package/dist/x-provider/index.js +2 -3
- package/es/{_basePickBy-CrbncDqR.js → _basePickBy-BL4DHvHb.js} +1 -1
- package/es/{_baseUniq-B-qU_Imh.js → _baseUniq-CyFYmJd-.js} +7 -7
- package/es/antdv-next-x.esm.js +374 -335
- package/es/architecture-PBZL5I3N-M9p1teRv.js +3 -0
- package/es/{architectureDiagram-2XIMDMQ5-OvuktNfv.js → architectureDiagram-2XIMDMQ5-zW5aGalx.js} +99 -89
- package/es/{blockDiagram-WCTKOSBZ-CS-kh74L.js → blockDiagram-WCTKOSBZ-0QujSG-h.js} +36 -33
- package/es/{c4Diagram-IC4MRINW-BZGIF4Dk.js → c4Diagram-IC4MRINW-B7y07WFn.js} +24 -16
- package/es/{channel-DrSSYyxp.js → channel-CxLj88Pg.js} +1 -1
- package/es/{chunk-4BX2VUAB-Rm8-te6i.js → chunk-4BX2VUAB-CprgMM4u.js} +1 -1
- package/es/{chunk-55IACEB6-Tre45n-8.js → chunk-55IACEB6-BpkEkHy8.js} +1 -1
- package/es/{chunk-7R4GIKGN-scch4dXY.js → chunk-7R4GIKGN-mKY502R8.js} +6 -4
- package/es/{chunk-FMBD7UC4-JmekSPZP.js → chunk-FMBD7UC4-B88neS61.js} +1 -1
- package/es/{chunk-GEFDOKGD-BEzc6NZw.js → chunk-GEFDOKGD-oBEpn5hN.js} +67 -27
- package/es/chunk-GLR3WWYH-B2D9kjtF.js +41 -0
- package/es/chunk-HHEYEP7N-DcZkCke2.js +9 -0
- package/es/{chunk-JSJVCQXG-_l_UVbaa.js → chunk-JSJVCQXG-BbVOaXjl.js} +3 -3
- package/es/{chunk-KX2RTZJC-BUWM8pJz.js → chunk-KX2RTZJC-Dw3D7Wrw.js} +2 -2
- package/es/{chunk-KYZI473N-BSgb_E0Q.js → chunk-KYZI473N-33-uii7Y.js} +10 -10
- package/es/{chunk-MX3YWQON-D602L8pU.js → chunk-MX3YWQON-D4cz36rq.js} +1 -1
- package/es/{chunk-NQ4KR5QH-BPQV0i93.js → chunk-NQ4KR5QH-CprADZhD.js} +44 -40
- package/es/{chunk-O4XLMI2P-BMqc3iYa.js → chunk-O4XLMI2P-DBAvycZ-.js} +13 -14
- package/es/{chunk-PQ6SQG4A-DcYrzB1X.js → chunk-PQ6SQG4A-BITIwHAS.js} +2 -2
- package/es/{chunk-PU5JKC2W-TuGY6X1n.js → chunk-PU5JKC2W-DIl8TkGX.js} +22 -26
- package/es/{chunk-QZHKN3VN-CKbD02cl.js → chunk-QZHKN3VN-Cg0ROtzE.js} +1 -1
- package/es/{chunk-WL4C6EOR-B31ErTFp.js → chunk-WL4C6EOR-Bhp_3T_o.js} +15 -15
- package/es/chunk-XPW4576I-255j2Rgd.js +1146 -0
- package/es/{chunk-XZSTWKYB-DYKLwCEy.js → chunk-XZSTWKYB-kjAdbx6i.js} +266 -321
- package/es/{chunk-YBOYWFTD-CRiKEIiS.js → chunk-YBOYWFTD-C2IdGsg8.js} +5 -5
- package/es/classDiagram-VBA2DB6C-BQonl2jX.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-C9U3lqTc.js +29 -0
- package/es/{clone-yzFtXY5G.js → clone-DIGEZsKS.js} +1 -1
- package/es/{cose-bilkent-S5V4N54A-BM90wTBk.js → cose-bilkent-S5V4N54A-Cyxewg9z.js} +36 -31
- package/es/{cytoscape.esm-B_-hKv4-.js → cytoscape.esm-DBPri10E.js} +197 -155
- package/es/{dagre-DCYVBij1.js → dagre-BHOjJWBG.js} +26 -24
- package/es/{dagre-KLK3FWXG-Ced70SgJ.js → dagre-KLK3FWXG-CnJPDj7X.js} +17 -18
- package/es/{defaultLocale-yzzuPw6P.js → defaultLocale-aSMWOJHq.js} +4 -1
- package/es/{diagram-E7M64L7V-xZCloH_i.js → diagram-E7M64L7V-CBOCgbMd.js} +22 -24
- package/es/{diagram-IFDJBPK2-BTmFZhvz.js → diagram-IFDJBPK2-BtubJp0H.js} +11 -11
- package/es/{diagram-P4PSJMXO-DX_3B0LB.js → diagram-P4PSJMXO-CI30BBYG.js} +10 -10
- package/es/{dist-h4ggShny.js → dist-BpM0Gz7z.js} +1 -1
- package/es/{erDiagram-INFDFZHY-MJ_HVY-7.js → erDiagram-INFDFZHY-C8hYuPxm.js} +21 -21
- package/es/{flowDiagram-PKNHOUZH-CQIRy1sx.js → flowDiagram-PKNHOUZH-D5vrDkks.js} +40 -33
- package/es/{ganttDiagram-A5KZAMGK-Dw9bjWjx.js → ganttDiagram-A5KZAMGK-BmIEQBGq.js} +33 -21
- package/es/gitGraph-HDMCJU4V-x8fnR2OX.js +3 -0
- package/es/{gitGraphDiagram-K3NZZRJ6-Gk6FiGbZ.js → gitGraphDiagram-K3NZZRJ6-PO0pMJD3.js} +7 -7
- package/es/{graphlib-BMvIh7N7.js → graphlib-DqWOhV4K.js} +2 -2
- package/es/info-3K5VOQVL-CRBCVSej.js +3 -0
- package/es/{infoDiagram-LFFYTUFH-CS64-uil.js → infoDiagram-LFFYTUFH-DOcKfbXf.js} +4 -4
- package/es/{init-sjaVZO3f.js → init-Co4dhKfe.js} +3 -1
- package/es/isEmpty-BJdINx-6.js +35 -0
- package/es/{ishikawaDiagram-PHBUUO56-C_Hw5UnV.js → ishikawaDiagram-PHBUUO56-DM1elxPS.js} +12 -12
- package/es/{journeyDiagram-4ABVD52K-CFFyM4Ar.js → journeyDiagram-4ABVD52K-BnYWOH1P.js} +11 -11
- package/es/{kanban-definition-K7BYSVSG-B_R-mA10.js → kanban-definition-K7BYSVSG-Ys7nAs7y.js} +27 -26
- package/es/{katex-C-qdUNlg.js → katex-olkKUfKs.js} +52 -62
- package/es/{line-D05MESIS.js → line-Cm2n2y9Z.js} +1 -1
- package/es/{linear-B8tPH2Pw.js → linear-D-yDc6KG.js} +6 -4
- package/es/{mermaid-parser.core-C_69nk7j.js → mermaid-parser.core-DFgQn74w.js} +8 -8
- package/es/mermaid.core-BzgA0NbC.js +680 -0
- package/es/{mindmap-definition-YRQLILUH-qgGUYYe3.js → mindmap-definition-YRQLILUH-Ca8psfLi.js} +26 -24
- package/es/{ordinal-CNQzPcrr.js → ordinal-95c16pGC.js} +1 -1
- package/es/packet-RMMSAZCW-CyE-elPF.js +3 -0
- package/es/pie-UPGHQEXC-EfdQ-_OF.js +3 -0
- package/es/{pieDiagram-SKSYHLDU-B8-AVOmP.js → pieDiagram-SKSYHLDU-DhQSMJCw.js} +11 -11
- package/es/{quadrantDiagram-337W2JSQ-C2Z0CN4Z.js → quadrantDiagram-337W2JSQ-jOtIC8r0.js} +9 -9
- package/es/radar-KQ55EAFF-B68vkNB4.js +3 -0
- package/es/{requirementDiagram-Z7DCOOCP-Cdj7PwWC.js → requirementDiagram-Z7DCOOCP-CNngzPE4.js} +18 -18
- package/es/{rolldown-runtime-CEY2VRuR.js → rolldown-runtime-Dv1pqm0U.js} +2 -2
- package/es/{sankeyDiagram-WA2Y5GQK-BNmU-dM1.js → sankeyDiagram-WA2Y5GQK-BgsyVNdD.js} +9 -9
- package/es/{sequenceDiagram-2WXFIKYE-pj0uPf22.js → sequenceDiagram-2WXFIKYE-BAc5PP9P.js} +46 -34
- package/es/{shiki-runtime-7QG17np_.js → shiki-runtime-BlKUZiZP.js} +41 -44
- package/es/{src-Dynw_Lub.js → src-3T61hYex.js} +1 -1
- package/es/{stateDiagram-RAJIS63D-BgCfMnGb.js → stateDiagram-RAJIS63D-153LjStx.js} +18 -18
- package/es/stateDiagram-v2-FVOUBMTO-BXEvy1YD.js +27 -0
- package/es/{timeline-definition-YZTLITO2-Bj5QKnBI.js → timeline-definition-YZTLITO2-BLhlkb_X.js} +8 -8
- package/es/treemap-KZPCXAKY-Dg_ShzRB.js +3 -0
- package/es/{vennDiagram-LZ73GAT5-lpWcIvN6.js → vennDiagram-LZ73GAT5-BTYWphmf.js} +13 -13
- package/es/{xychartDiagram-JWTSCODW-De1M-7Yz.js → xychartDiagram-JWTSCODW-B9Nlu6S_.js} +29 -25
- package/package.json +1 -1
- package/es/architecture-PBZL5I3N-BRGGaMu3.js +0 -3
- package/es/classDiagram-VBA2DB6C-BDqwxUdU.js +0 -29
- package/es/classDiagram-v2-RAHNMMFH-DdmOjeUb.js +0 -29
- package/es/gitGraph-HDMCJU4V-oForq_Vw.js +0 -3
- package/es/info-3K5VOQVL-0F-ZLEMx.js +0 -3
- package/es/mermaid.core-BVGVwWcu.js +0 -1914
- package/es/packet-RMMSAZCW-CeqtQQ_e.js +0 -3
- package/es/pie-UPGHQEXC-BI60FhK4.js +0 -3
- package/es/radar-KQ55EAFF-CRwOOFw0.js +0 -3
- package/es/stateDiagram-v2-FVOUBMTO-ByMhP6Xo.js +0 -27
- package/es/treemap-KZPCXAKY-BlOAFUbR.js +0 -3
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./Serializer-Sc9uEpQk.js";
|
|
2
|
+
import { _ as r, g as i, h as a, p as o } from "./src-3T61hYex.js";
|
|
3
|
+
import { t as s } from "./isEmpty-BJdINx-6.js";
|
|
4
|
+
import { a as c, d as l, h as u, i as d, m as f, r as p } from "./chunk-GEFDOKGD-oBEpn5hN.js";
|
|
5
|
+
import { F as m, G as h, H as ee, J as te, M as g, N as _, S as ne, T as v, X as y, Y as b, Z as re, c as ie, f as x, g as S, h as ae, l as C, n as oe, p as w, r as T, t as se, w as ce, x as E, y as D, z as le } from "./chunk-7R4GIKGN-mKY502R8.js";
|
|
6
|
+
import { t as ue } from "./chunk-HHEYEP7N-DcZkCke2.js";
|
|
7
|
+
import { i as de, o as fe } from "./chunk-PU5JKC2W-DIl8TkGX.js";
|
|
8
|
+
import "./chunk-MX3YWQON-D4cz36rq.js";
|
|
9
|
+
import "./chunk-YBOYWFTD-C2IdGsg8.js";
|
|
10
|
+
import "./chunk-PQ6SQG4A-BITIwHAS.js";
|
|
11
|
+
import "./chunk-KYZI473N-33-uii7Y.js";
|
|
12
|
+
import "./chunk-O4XLMI2P-DBAvycZ-.js";
|
|
13
|
+
import { n as pe } from "./chunk-GLR3WWYH-B2D9kjtF.js";
|
|
14
|
+
import { n as me, t as he } from "./chunk-XPW4576I-255j2Rgd.js";
|
|
15
|
+
//#region ../../node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/mermaid.core.mjs
|
|
16
|
+
var O = "c4", ge = {
|
|
17
|
+
id: O,
|
|
18
|
+
detector: /* @__PURE__ */ a((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
|
|
19
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
20
|
+
let { diagram: e } = await import("./c4Diagram-IC4MRINW-B7y07WFn.js");
|
|
21
|
+
return {
|
|
22
|
+
id: O,
|
|
23
|
+
diagram: e
|
|
24
|
+
};
|
|
25
|
+
}, "loader")
|
|
26
|
+
}, k = "flowchart", _e = {
|
|
27
|
+
id: k,
|
|
28
|
+
detector: /* @__PURE__ */ a((e, t) => t?.flowchart?.defaultRenderer === "dagre-wrapper" || t?.flowchart?.defaultRenderer === "elk" ? !1 : /^\s*graph/.test(e), "detector"),
|
|
29
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
30
|
+
let { diagram: e } = await import("./flowDiagram-PKNHOUZH-D5vrDkks.js");
|
|
31
|
+
return {
|
|
32
|
+
id: k,
|
|
33
|
+
diagram: e
|
|
34
|
+
};
|
|
35
|
+
}, "loader")
|
|
36
|
+
}, A = "flowchart-v2", ve = {
|
|
37
|
+
id: A,
|
|
38
|
+
detector: /* @__PURE__ */ a((e, t) => t?.flowchart?.defaultRenderer === "dagre-d3" ? !1 : (t?.flowchart?.defaultRenderer === "elk" && (t.layout = "elk"), /^\s*graph/.test(e) && t?.flowchart?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(e)), "detector"),
|
|
39
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
40
|
+
let { diagram: e } = await import("./flowDiagram-PKNHOUZH-D5vrDkks.js");
|
|
41
|
+
return {
|
|
42
|
+
id: A,
|
|
43
|
+
diagram: e
|
|
44
|
+
};
|
|
45
|
+
}, "loader")
|
|
46
|
+
}, j = "er", ye = {
|
|
47
|
+
id: j,
|
|
48
|
+
detector: /* @__PURE__ */ a((e) => /^\s*erDiagram/.test(e), "detector"),
|
|
49
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
50
|
+
let { diagram: e } = await import("./erDiagram-INFDFZHY-C8hYuPxm.js");
|
|
51
|
+
return {
|
|
52
|
+
id: j,
|
|
53
|
+
diagram: e
|
|
54
|
+
};
|
|
55
|
+
}, "loader")
|
|
56
|
+
}, M = "gitGraph", be = {
|
|
57
|
+
id: M,
|
|
58
|
+
detector: /* @__PURE__ */ a((e) => /^\s*gitGraph/.test(e), "detector"),
|
|
59
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
60
|
+
let { diagram: e } = await import("./gitGraphDiagram-K3NZZRJ6-PO0pMJD3.js");
|
|
61
|
+
return {
|
|
62
|
+
id: M,
|
|
63
|
+
diagram: e
|
|
64
|
+
};
|
|
65
|
+
}, "loader")
|
|
66
|
+
}, N = "gantt", xe = {
|
|
67
|
+
id: N,
|
|
68
|
+
detector: /* @__PURE__ */ a((e) => /^\s*gantt/.test(e), "detector"),
|
|
69
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
70
|
+
let { diagram: e } = await import("./ganttDiagram-A5KZAMGK-BmIEQBGq.js");
|
|
71
|
+
return {
|
|
72
|
+
id: N,
|
|
73
|
+
diagram: e
|
|
74
|
+
};
|
|
75
|
+
}, "loader")
|
|
76
|
+
}, P = "info", Se = {
|
|
77
|
+
id: P,
|
|
78
|
+
detector: /* @__PURE__ */ a((e) => /^\s*info/.test(e), "detector"),
|
|
79
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
80
|
+
let { diagram: e } = await import("./infoDiagram-LFFYTUFH-DOcKfbXf.js");
|
|
81
|
+
return {
|
|
82
|
+
id: P,
|
|
83
|
+
diagram: e
|
|
84
|
+
};
|
|
85
|
+
}, "loader")
|
|
86
|
+
}, F = "pie", Ce = {
|
|
87
|
+
id: F,
|
|
88
|
+
detector: /* @__PURE__ */ a((e) => /^\s*pie/.test(e), "detector"),
|
|
89
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
90
|
+
let { diagram: e } = await import("./pieDiagram-SKSYHLDU-DhQSMJCw.js");
|
|
91
|
+
return {
|
|
92
|
+
id: F,
|
|
93
|
+
diagram: e
|
|
94
|
+
};
|
|
95
|
+
}, "loader")
|
|
96
|
+
}, I = "quadrantChart", we = {
|
|
97
|
+
id: I,
|
|
98
|
+
detector: /* @__PURE__ */ a((e) => /^\s*quadrantChart/.test(e), "detector"),
|
|
99
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
100
|
+
let { diagram: e } = await import("./quadrantDiagram-337W2JSQ-jOtIC8r0.js");
|
|
101
|
+
return {
|
|
102
|
+
id: I,
|
|
103
|
+
diagram: e
|
|
104
|
+
};
|
|
105
|
+
}, "loader")
|
|
106
|
+
}, L = "xychart", Te = {
|
|
107
|
+
id: L,
|
|
108
|
+
detector: /* @__PURE__ */ a((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
|
|
109
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
110
|
+
let { diagram: e } = await import("./xychartDiagram-JWTSCODW-B9Nlu6S_.js");
|
|
111
|
+
return {
|
|
112
|
+
id: L,
|
|
113
|
+
diagram: e
|
|
114
|
+
};
|
|
115
|
+
}, "loader")
|
|
116
|
+
}, R = "requirement", Ee = {
|
|
117
|
+
id: R,
|
|
118
|
+
detector: /* @__PURE__ */ a((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
|
|
119
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
120
|
+
let { diagram: e } = await import("./requirementDiagram-Z7DCOOCP-CNngzPE4.js");
|
|
121
|
+
return {
|
|
122
|
+
id: R,
|
|
123
|
+
diagram: e
|
|
124
|
+
};
|
|
125
|
+
}, "loader")
|
|
126
|
+
}, z = "sequence", De = {
|
|
127
|
+
id: z,
|
|
128
|
+
detector: /* @__PURE__ */ a((e) => /^\s*sequenceDiagram/.test(e), "detector"),
|
|
129
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
130
|
+
let { diagram: e } = await import("./sequenceDiagram-2WXFIKYE-BAc5PP9P.js");
|
|
131
|
+
return {
|
|
132
|
+
id: z,
|
|
133
|
+
diagram: e
|
|
134
|
+
};
|
|
135
|
+
}, "loader")
|
|
136
|
+
}, B = "class", Oe = {
|
|
137
|
+
id: B,
|
|
138
|
+
detector: /* @__PURE__ */ a((e, t) => t?.class?.defaultRenderer !== "dagre-wrapper" && /^\s*classDiagram/.test(e), "detector"),
|
|
139
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
140
|
+
let { diagram: e } = await import("./classDiagram-VBA2DB6C-BQonl2jX.js");
|
|
141
|
+
return {
|
|
142
|
+
id: B,
|
|
143
|
+
diagram: e
|
|
144
|
+
};
|
|
145
|
+
}, "loader")
|
|
146
|
+
}, V = "classDiagram", ke = {
|
|
147
|
+
id: V,
|
|
148
|
+
detector: /* @__PURE__ */ a((e, t) => /^\s*classDiagram/.test(e) && t?.class?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(e), "detector"),
|
|
149
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
150
|
+
let { diagram: e } = await import("./classDiagram-v2-RAHNMMFH-C9U3lqTc.js");
|
|
151
|
+
return {
|
|
152
|
+
id: V,
|
|
153
|
+
diagram: e
|
|
154
|
+
};
|
|
155
|
+
}, "loader")
|
|
156
|
+
}, H = "state", Ae = {
|
|
157
|
+
id: H,
|
|
158
|
+
detector: /* @__PURE__ */ a((e, t) => t?.state?.defaultRenderer !== "dagre-wrapper" && /^\s*stateDiagram/.test(e), "detector"),
|
|
159
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
160
|
+
let { diagram: e } = await import("./stateDiagram-RAJIS63D-153LjStx.js");
|
|
161
|
+
return {
|
|
162
|
+
id: H,
|
|
163
|
+
diagram: e
|
|
164
|
+
};
|
|
165
|
+
}, "loader")
|
|
166
|
+
}, U = "stateDiagram", je = {
|
|
167
|
+
id: U,
|
|
168
|
+
detector: /* @__PURE__ */ a((e, t) => !!(/^\s*stateDiagram-v2/.test(e) || /^\s*stateDiagram/.test(e) && t?.state?.defaultRenderer === "dagre-wrapper"), "detector"),
|
|
169
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
170
|
+
let { diagram: e } = await import("./stateDiagram-v2-FVOUBMTO-BXEvy1YD.js");
|
|
171
|
+
return {
|
|
172
|
+
id: U,
|
|
173
|
+
diagram: e
|
|
174
|
+
};
|
|
175
|
+
}, "loader")
|
|
176
|
+
}, Me = "journey", Ne = {
|
|
177
|
+
id: Me,
|
|
178
|
+
detector: /* @__PURE__ */ a((e) => /^\s*journey/.test(e), "detector"),
|
|
179
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
180
|
+
let { diagram: e } = await import("./journeyDiagram-4ABVD52K-BnYWOH1P.js");
|
|
181
|
+
return {
|
|
182
|
+
id: Me,
|
|
183
|
+
diagram: e
|
|
184
|
+
};
|
|
185
|
+
}, "loader")
|
|
186
|
+
}, Pe = { draw: /* @__PURE__ */ a((e, t, n) => {
|
|
187
|
+
i.debug("rendering svg for syntax error\n");
|
|
188
|
+
let r = ue(t), a = r.append("g");
|
|
189
|
+
r.attr("viewBox", "0 0 2412 512"), ie(r, 100, 512, !0), a.append("path").attr("class", "error-icon").attr("d", "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"), a.append("path").attr("class", "error-icon").attr("d", "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"), a.append("path").attr("class", "error-icon").attr("d", "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"), a.append("path").attr("class", "error-icon").attr("d", "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"), a.append("path").attr("class", "error-icon").attr("d", "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"), a.append("path").attr("class", "error-icon").attr("d", "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"), a.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"), a.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${n}`);
|
|
190
|
+
}, "draw") }, Fe = Pe, Ie = {
|
|
191
|
+
db: {},
|
|
192
|
+
renderer: Pe,
|
|
193
|
+
parser: { parse: /* @__PURE__ */ a(() => {}, "parse") }
|
|
194
|
+
}, Le = "flowchart-elk", Re = {
|
|
195
|
+
id: Le,
|
|
196
|
+
detector: /* @__PURE__ */ a((e, t = {}) => /^\s*flowchart-elk/.test(e) || /^\s*(flowchart|graph)/.test(e) && t?.flowchart?.defaultRenderer === "elk" ? (t.layout = "elk", !0) : !1, "detector"),
|
|
197
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
198
|
+
let { diagram: e } = await import("./flowDiagram-PKNHOUZH-D5vrDkks.js");
|
|
199
|
+
return {
|
|
200
|
+
id: Le,
|
|
201
|
+
diagram: e
|
|
202
|
+
};
|
|
203
|
+
}, "loader")
|
|
204
|
+
}, ze = "timeline", Be = {
|
|
205
|
+
id: ze,
|
|
206
|
+
detector: /* @__PURE__ */ a((e) => /^\s*timeline/.test(e), "detector"),
|
|
207
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
208
|
+
let { diagram: e } = await import("./timeline-definition-YZTLITO2-BLhlkb_X.js");
|
|
209
|
+
return {
|
|
210
|
+
id: ze,
|
|
211
|
+
diagram: e
|
|
212
|
+
};
|
|
213
|
+
}, "loader")
|
|
214
|
+
}, Ve = "mindmap", He = {
|
|
215
|
+
id: Ve,
|
|
216
|
+
detector: /* @__PURE__ */ a((e) => /^\s*mindmap/.test(e), "detector"),
|
|
217
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
218
|
+
let { diagram: e } = await import("./mindmap-definition-YRQLILUH-Ca8psfLi.js");
|
|
219
|
+
return {
|
|
220
|
+
id: Ve,
|
|
221
|
+
diagram: e
|
|
222
|
+
};
|
|
223
|
+
}, "loader")
|
|
224
|
+
}, Ue = "kanban", We = {
|
|
225
|
+
id: Ue,
|
|
226
|
+
detector: /* @__PURE__ */ a((e) => /^\s*kanban/.test(e), "detector"),
|
|
227
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
228
|
+
let { diagram: e } = await import("./kanban-definition-K7BYSVSG-Ys7nAs7y.js");
|
|
229
|
+
return {
|
|
230
|
+
id: Ue,
|
|
231
|
+
diagram: e
|
|
232
|
+
};
|
|
233
|
+
}, "loader")
|
|
234
|
+
}, Ge = "sankey", Ke = {
|
|
235
|
+
id: Ge,
|
|
236
|
+
detector: /* @__PURE__ */ a((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
|
|
237
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
238
|
+
let { diagram: e } = await import("./sankeyDiagram-WA2Y5GQK-BgsyVNdD.js");
|
|
239
|
+
return {
|
|
240
|
+
id: Ge,
|
|
241
|
+
diagram: e
|
|
242
|
+
};
|
|
243
|
+
}, "loader")
|
|
244
|
+
}, qe = "packet", Je = {
|
|
245
|
+
id: qe,
|
|
246
|
+
detector: /* @__PURE__ */ a((e) => /^\s*packet(-beta)?/.test(e), "detector"),
|
|
247
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
248
|
+
let { diagram: e } = await import("./diagram-P4PSJMXO-CI30BBYG.js");
|
|
249
|
+
return {
|
|
250
|
+
id: qe,
|
|
251
|
+
diagram: e
|
|
252
|
+
};
|
|
253
|
+
}, "loader")
|
|
254
|
+
}, Ye = "radar", Xe = {
|
|
255
|
+
id: Ye,
|
|
256
|
+
detector: /* @__PURE__ */ a((e) => /^\s*radar-beta/.test(e), "detector"),
|
|
257
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
258
|
+
let { diagram: e } = await import("./diagram-IFDJBPK2-BtubJp0H.js");
|
|
259
|
+
return {
|
|
260
|
+
id: Ye,
|
|
261
|
+
diagram: e
|
|
262
|
+
};
|
|
263
|
+
}, "loader")
|
|
264
|
+
}, Ze = "block", Qe = {
|
|
265
|
+
id: Ze,
|
|
266
|
+
detector: /* @__PURE__ */ a((e) => /^\s*block(-beta)?/.test(e), "detector"),
|
|
267
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
268
|
+
let { diagram: e } = await import("./blockDiagram-WCTKOSBZ-0QujSG-h.js");
|
|
269
|
+
return {
|
|
270
|
+
id: Ze,
|
|
271
|
+
diagram: e
|
|
272
|
+
};
|
|
273
|
+
}, "loader")
|
|
274
|
+
}, $e = "architecture", et = {
|
|
275
|
+
id: $e,
|
|
276
|
+
detector: /* @__PURE__ */ a((e) => /^\s*architecture/.test(e), "detector"),
|
|
277
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
278
|
+
let { diagram: e } = await import("./architectureDiagram-2XIMDMQ5-zW5aGalx.js");
|
|
279
|
+
return {
|
|
280
|
+
id: $e,
|
|
281
|
+
diagram: e
|
|
282
|
+
};
|
|
283
|
+
}, "loader")
|
|
284
|
+
}, tt = "ishikawa", nt = {
|
|
285
|
+
id: tt,
|
|
286
|
+
detector: /* @__PURE__ */ a((e) => /^\s*ishikawa(-beta)?\b/i.test(e), "detector"),
|
|
287
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
288
|
+
let { diagram: e } = await import("./ishikawaDiagram-PHBUUO56-DM1elxPS.js");
|
|
289
|
+
return {
|
|
290
|
+
id: tt,
|
|
291
|
+
diagram: e
|
|
292
|
+
};
|
|
293
|
+
}, "loader")
|
|
294
|
+
}, rt = "venn", it = {
|
|
295
|
+
id: rt,
|
|
296
|
+
detector: /* @__PURE__ */ a((e) => /^\s*venn-beta/.test(e), "detector"),
|
|
297
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
298
|
+
let { diagram: e } = await import("./vennDiagram-LZ73GAT5-BTYWphmf.js");
|
|
299
|
+
return {
|
|
300
|
+
id: rt,
|
|
301
|
+
diagram: e
|
|
302
|
+
};
|
|
303
|
+
}, "loader")
|
|
304
|
+
}, at = "treemap", ot = {
|
|
305
|
+
id: at,
|
|
306
|
+
detector: /* @__PURE__ */ a((e) => /^\s*treemap/.test(e), "detector"),
|
|
307
|
+
loader: /* @__PURE__ */ a(async () => {
|
|
308
|
+
let { diagram: e } = await import("./diagram-E7M64L7V-CBOCgbMd.js");
|
|
309
|
+
return {
|
|
310
|
+
id: at,
|
|
311
|
+
diagram: e
|
|
312
|
+
};
|
|
313
|
+
}, "loader")
|
|
314
|
+
}, st = !1, W = /* @__PURE__ */ a(() => {
|
|
315
|
+
st || (st = !0, g("error", Ie, (e) => e.toLowerCase().trim() === "error"), g("---", {
|
|
316
|
+
db: { clear: /* @__PURE__ */ a(() => {}, "clear") },
|
|
317
|
+
styles: {},
|
|
318
|
+
renderer: { draw: /* @__PURE__ */ a(() => {}, "draw") },
|
|
319
|
+
parser: { parse: /* @__PURE__ */ a(() => {
|
|
320
|
+
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");
|
|
321
|
+
}, "parse") },
|
|
322
|
+
init: /* @__PURE__ */ a(() => null, "init")
|
|
323
|
+
}, (e) => e.toLowerCase().trimStart().startsWith("---")), _(Re, He, et), _(ge, We, ke, Oe, ye, xe, Se, Ce, Ee, De, ve, _e, Be, be, je, Ae, Ne, we, Ke, Je, Te, Qe, Xe, nt, ot, it));
|
|
324
|
+
}, "addDiagrams"), ct = /* @__PURE__ */ a(async () => {
|
|
325
|
+
i.debug("Loading registered diagrams");
|
|
326
|
+
let e = (await Promise.allSettled(Object.entries(w).map(async ([e, { detector: t, loader: n }]) => {
|
|
327
|
+
if (n) try {
|
|
328
|
+
E(e);
|
|
329
|
+
} catch {
|
|
330
|
+
try {
|
|
331
|
+
let { diagram: e, id: r } = await n();
|
|
332
|
+
g(r, e, t);
|
|
333
|
+
} catch (t) {
|
|
334
|
+
throw i.error(`Failed to load external diagram with key ${e}. Removing from detectors.`), delete w[e], t;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}))).filter((e) => e.status === "rejected");
|
|
338
|
+
if (e.length > 0) {
|
|
339
|
+
i.error(`Failed to load ${e.length} external diagrams`);
|
|
340
|
+
for (let t of e) i.error(t);
|
|
341
|
+
throw Error(`Failed to load ${e.length} external diagrams`);
|
|
342
|
+
}
|
|
343
|
+
}, "loadRegisteredDiagrams"), lt = "graphics-document document";
|
|
344
|
+
function ut(e, t) {
|
|
345
|
+
e.attr("role", lt), t !== "" && e.attr("aria-roledescription", t);
|
|
346
|
+
}
|
|
347
|
+
a(ut, "setA11yDiagramInfo");
|
|
348
|
+
function dt(e, t, n, r) {
|
|
349
|
+
if (e.insert !== void 0) {
|
|
350
|
+
if (n) {
|
|
351
|
+
let t = `chart-desc-${r}`;
|
|
352
|
+
e.attr("aria-describedby", t), e.insert("desc", ":first-child").attr("id", t).text(n);
|
|
353
|
+
}
|
|
354
|
+
if (t) {
|
|
355
|
+
let n = `chart-title-${r}`;
|
|
356
|
+
e.attr("aria-labelledby", n), e.insert("title", ":first-child").attr("id", n).text(t);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
a(dt, "addSVGa11yTitleDescription");
|
|
361
|
+
var G = class e {
|
|
362
|
+
constructor(e, t, n, r, i) {
|
|
363
|
+
this.type = e, this.text = t, this.db = n, this.parser = r, this.renderer = i;
|
|
364
|
+
}
|
|
365
|
+
static {
|
|
366
|
+
a(this, "Diagram");
|
|
367
|
+
}
|
|
368
|
+
static async fromText(t, n = {}) {
|
|
369
|
+
let r = D(), i = x(t, r);
|
|
370
|
+
t = c(t) + "\n";
|
|
371
|
+
try {
|
|
372
|
+
E(i);
|
|
373
|
+
} catch {
|
|
374
|
+
let e = ne(i);
|
|
375
|
+
if (!e) throw new se(`Diagram ${i} not found.`);
|
|
376
|
+
let { id: t, diagram: n } = await e();
|
|
377
|
+
g(t, n);
|
|
378
|
+
}
|
|
379
|
+
let { db: a, parser: o, renderer: s, init: l } = E(i);
|
|
380
|
+
return o.parser && (o.parser.yy = a), a.clear?.(), l?.(r), n.title && a.setDiagramTitle?.(n.title), await o.parse(t), new e(i, t, a, o, s);
|
|
381
|
+
}
|
|
382
|
+
async render(e, t) {
|
|
383
|
+
await this.renderer.draw(this.text, e, t, this);
|
|
384
|
+
}
|
|
385
|
+
getParser() {
|
|
386
|
+
return this.parser;
|
|
387
|
+
}
|
|
388
|
+
getType() {
|
|
389
|
+
return this.type;
|
|
390
|
+
}
|
|
391
|
+
}, ft = [], pt = /* @__PURE__ */ a(() => {
|
|
392
|
+
ft.forEach((e) => {
|
|
393
|
+
e();
|
|
394
|
+
}), ft = [];
|
|
395
|
+
}, "attachFunctions"), mt = /* @__PURE__ */ a((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
|
|
396
|
+
function ht(e) {
|
|
397
|
+
let t = e.match(S);
|
|
398
|
+
if (!t) return {
|
|
399
|
+
text: e,
|
|
400
|
+
metadata: {}
|
|
401
|
+
};
|
|
402
|
+
let n = me(t[1], { schema: he }) ?? {};
|
|
403
|
+
n = typeof n == "object" && !Array.isArray(n) ? n : {};
|
|
404
|
+
let r = {};
|
|
405
|
+
return n.displayMode && (r.displayMode = n.displayMode.toString()), n.title && (r.title = n.title.toString()), n.config && (r.config = n.config), {
|
|
406
|
+
text: e.slice(t[0].length),
|
|
407
|
+
metadata: r
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
a(ht, "extractFrontMatter");
|
|
411
|
+
var gt = /* @__PURE__ */ a((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e, t, n) => "<" + t + n.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), _t = /* @__PURE__ */ a((e) => {
|
|
412
|
+
let { text: t, metadata: n } = ht(e), { displayMode: r, title: i, config: a = {} } = n;
|
|
413
|
+
return r && (a.gantt ||= {}, a.gantt.displayMode = r), {
|
|
414
|
+
title: i,
|
|
415
|
+
config: a,
|
|
416
|
+
text: t
|
|
417
|
+
};
|
|
418
|
+
}, "processFrontmatter"), vt = /* @__PURE__ */ a((e) => {
|
|
419
|
+
let t = u.detectInit(e) ?? {}, n = u.detectDirective(e, "wrap");
|
|
420
|
+
return Array.isArray(n) ? t.wrap = n.some(({ type: e }) => e === "wrap") : n?.type === "wrap" && (t.wrap = !0), {
|
|
421
|
+
text: f(e),
|
|
422
|
+
directive: t
|
|
423
|
+
};
|
|
424
|
+
}, "processDirectives");
|
|
425
|
+
function K(e) {
|
|
426
|
+
let t = _t(gt(e)), n = vt(t.text), r = p(t.config, n.directive);
|
|
427
|
+
return e = mt(n.text), {
|
|
428
|
+
code: e,
|
|
429
|
+
title: t.title,
|
|
430
|
+
config: r
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
a(K, "preprocessDiagram");
|
|
434
|
+
function yt(e) {
|
|
435
|
+
let t = new TextEncoder().encode(e), n = Array.from(t, (e) => String.fromCodePoint(e)).join("");
|
|
436
|
+
return btoa(n);
|
|
437
|
+
}
|
|
438
|
+
a(yt, "toBase64");
|
|
439
|
+
var bt = 5e4, xt = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", St = "sandbox", Ct = "loose", wt = "http://www.w3.org/2000/svg", Tt = "http://www.w3.org/1999/xlink", Et = "http://www.w3.org/1999/xhtml", Dt = "100%", Ot = "100%", kt = "border:0;margin:0;", At = "margin:0", jt = "allow-top-navigation-by-user-activation allow-popups", Mt = "The \"iframe\" tag is not supported by your browser.", Nt = ["foreignobject"], Pt = ["dominant-baseline"];
|
|
440
|
+
function q(e) {
|
|
441
|
+
let t = K(e);
|
|
442
|
+
return m(), oe(t.config ?? {}), t;
|
|
443
|
+
}
|
|
444
|
+
a(q, "processAndSetConfigs");
|
|
445
|
+
async function Ft(e, t) {
|
|
446
|
+
W();
|
|
447
|
+
try {
|
|
448
|
+
let { code: t, config: n } = q(e);
|
|
449
|
+
return {
|
|
450
|
+
diagramType: (await Y(t)).type,
|
|
451
|
+
config: n
|
|
452
|
+
};
|
|
453
|
+
} catch (e) {
|
|
454
|
+
if (t?.suppressErrors) return !1;
|
|
455
|
+
throw e;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
a(Ft, "parse");
|
|
459
|
+
var It = /* @__PURE__ */ a((e, t, n = []) => `
|
|
460
|
+
.${e} ${t} { ${n.join(" !important; ")} !important; }`, "cssImportantStyles"), Lt = /* @__PURE__ */ a((e, t = /* @__PURE__ */ new Map()) => {
|
|
461
|
+
let n = "";
|
|
462
|
+
if (e.themeCSS !== void 0 && (n += `
|
|
463
|
+
${e.themeCSS}`), e.fontFamily !== void 0 && (n += `
|
|
464
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`), e.altFontFamily !== void 0 && (n += `
|
|
465
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`), t instanceof Map) {
|
|
466
|
+
let r = ce(e) ? ["> *", "span"] : [
|
|
467
|
+
"rect",
|
|
468
|
+
"polygon",
|
|
469
|
+
"ellipse",
|
|
470
|
+
"circle",
|
|
471
|
+
"path"
|
|
472
|
+
];
|
|
473
|
+
t.forEach((e) => {
|
|
474
|
+
s(e.styles) || r.forEach((t) => {
|
|
475
|
+
n += It(e.id, t, e.styles);
|
|
476
|
+
}), s(e.textStyles) || (n += It(e.id, "tspan", (e?.textStyles || []).map((e) => e.replace("color", "fill"))));
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
return n;
|
|
480
|
+
}, "createCssStyles"), Rt = /* @__PURE__ */ a((r, i, a, o) => n(t(`${o}{${te(i, Lt(r, a), r.themeVariables)}}`), e), "createUserStyles"), zt = /* @__PURE__ */ a((e = "", t, n) => {
|
|
481
|
+
let r = e;
|
|
482
|
+
return !n && !t && (r = r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, "marker-end=\"url(#")), r = d(r), r = r.replace(/<br>/g, "<br/>"), r;
|
|
483
|
+
}, "cleanUpSvgCode"), Bt = /* @__PURE__ */ a((e = "", t) => `<iframe style="width:${Dt};height:${t?.viewBox?.baseVal?.height ? t.viewBox.baseVal.height + "px" : Ot};${kt}" src="data:text/html;charset=UTF-8;base64,${yt(`<body style="${At}">${e}</body>`)}" sandbox="${jt}">
|
|
484
|
+
${Mt}
|
|
485
|
+
</iframe>`, "putIntoIFrame"), Vt = /* @__PURE__ */ a((e, t, n, r, i) => {
|
|
486
|
+
let a = e.append("div");
|
|
487
|
+
a.attr("id", n), r && a.attr("style", r);
|
|
488
|
+
let o = a.append("svg").attr("id", t).attr("width", "100%").attr("xmlns", wt);
|
|
489
|
+
return i && o.attr("xmlns:xlink", i), o.append("g"), e;
|
|
490
|
+
}, "appendDivSvgG");
|
|
491
|
+
function J(e, t) {
|
|
492
|
+
return e.append("iframe").attr("id", t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
|
|
493
|
+
}
|
|
494
|
+
a(J, "sandboxedIframe");
|
|
495
|
+
var Ht = /* @__PURE__ */ a((e, t, n, r) => {
|
|
496
|
+
e.getElementById(t)?.remove(), e.getElementById(n)?.remove(), e.getElementById(r)?.remove();
|
|
497
|
+
}, "removeExistingElements"), Ut = /* @__PURE__ */ a(async function(e, t, n) {
|
|
498
|
+
W();
|
|
499
|
+
let r = q(t);
|
|
500
|
+
t = r.code;
|
|
501
|
+
let s = D();
|
|
502
|
+
i.debug(s), t.length > (s?.maxTextSize ?? bt) && (t = xt);
|
|
503
|
+
let c = "#" + e, l = "i" + e, u = "#" + l, d = "d" + e, f = "#" + d, p = /* @__PURE__ */ a(() => {
|
|
504
|
+
let e = o(h ? u : f).node();
|
|
505
|
+
e && "remove" in e && e.remove();
|
|
506
|
+
}, "removeTempElements"), m = o("body"), h = s.securityLevel === St, ee = s.securityLevel === Ct, te = s.fontFamily;
|
|
507
|
+
n === void 0 ? (Ht(document, e, d, l), h ? (m = o(J(o("body"), l).nodes()[0].contentDocument.body), m.node().style.margin = 0) : m = o("body"), Vt(m, e, d)) : (n && (n.innerHTML = ""), h ? (m = o(J(o(n), l).nodes()[0].contentDocument.body), m.node().style.margin = 0) : m = o(n), Vt(m, e, d, `font-family: ${te}`, Tt));
|
|
508
|
+
let g, _;
|
|
509
|
+
try {
|
|
510
|
+
g = await G.fromText(t, { title: r.title });
|
|
511
|
+
} catch (e) {
|
|
512
|
+
if (s.suppressErrorRendering) throw p(), e;
|
|
513
|
+
g = await G.fromText("error"), _ = e;
|
|
514
|
+
}
|
|
515
|
+
let ne = m.select(f).node(), v = g.type, y = ne.firstChild, b = y.firstChild, ie = g.renderer.getClasses?.(t, g), x = Rt(s, v, ie, c), S = document.createElement("style");
|
|
516
|
+
S.innerHTML = x, y.insertBefore(S, b);
|
|
517
|
+
try {
|
|
518
|
+
await g.renderer.draw(t, e, "11.13.0", g);
|
|
519
|
+
} catch (n) {
|
|
520
|
+
throw s.suppressErrorRendering ? p() : Fe.draw(t, e, "11.13.0"), n;
|
|
521
|
+
}
|
|
522
|
+
let C = m.select(`${f} svg`), oe = g.db.getAccTitle?.(), w = g.db.getAccDescription?.();
|
|
523
|
+
Gt(v, C, oe, w), m.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns", Et);
|
|
524
|
+
let T = m.select(f).node().innerHTML;
|
|
525
|
+
if (i.debug("config.arrowMarkerAbsolute", s.arrowMarkerAbsolute), T = zt(T, h, ae(s.arrowMarkerAbsolute)), h) {
|
|
526
|
+
let e = m.select(f + " svg").node();
|
|
527
|
+
T = Bt(T, e);
|
|
528
|
+
} else ee || (T = re.sanitize(T, {
|
|
529
|
+
ADD_TAGS: Nt,
|
|
530
|
+
ADD_ATTR: Pt,
|
|
531
|
+
HTML_INTEGRATION_POINTS: { foreignobject: !0 }
|
|
532
|
+
}));
|
|
533
|
+
if (pt(), _) throw _;
|
|
534
|
+
return p(), {
|
|
535
|
+
diagramType: v,
|
|
536
|
+
svg: T,
|
|
537
|
+
bindFunctions: g.db.bindFunctions
|
|
538
|
+
};
|
|
539
|
+
}, "render");
|
|
540
|
+
function Wt(e = {}) {
|
|
541
|
+
let t = T({}, e);
|
|
542
|
+
t?.fontFamily && !t.themeVariables?.fontFamily && (t.themeVariables ||= {}, t.themeVariables.fontFamily = t.fontFamily), le(t), t?.theme && t.theme in b ? t.themeVariables = b[t.theme].getThemeVariables(t.themeVariables) : t && (t.themeVariables = b.default.getThemeVariables(t.themeVariables)), r((typeof t == "object" ? h(t) : v()).logLevel), W();
|
|
543
|
+
}
|
|
544
|
+
a(Wt, "initialize");
|
|
545
|
+
var Y = /* @__PURE__ */ a((e, t = {}) => {
|
|
546
|
+
let { code: n } = K(e);
|
|
547
|
+
return G.fromText(n, t);
|
|
548
|
+
}, "getDiagramFromText");
|
|
549
|
+
function Gt(e, t, n, r) {
|
|
550
|
+
ut(t, e), dt(t, n, r, t.attr("id"));
|
|
551
|
+
}
|
|
552
|
+
a(Gt, "addA11yInfo");
|
|
553
|
+
var X = Object.freeze({
|
|
554
|
+
render: Ut,
|
|
555
|
+
parse: Ft,
|
|
556
|
+
getDiagramFromText: Y,
|
|
557
|
+
initialize: Wt,
|
|
558
|
+
getConfig: D,
|
|
559
|
+
setConfig: ee,
|
|
560
|
+
getSiteConfig: v,
|
|
561
|
+
updateSiteConfig: y,
|
|
562
|
+
reset: /* @__PURE__ */ a(() => {
|
|
563
|
+
m();
|
|
564
|
+
}, "reset"),
|
|
565
|
+
globalReset: /* @__PURE__ */ a(() => {
|
|
566
|
+
m(C);
|
|
567
|
+
}, "globalReset"),
|
|
568
|
+
defaultConfig: C
|
|
569
|
+
});
|
|
570
|
+
r(D().logLevel), m(D());
|
|
571
|
+
var Kt = /* @__PURE__ */ a((e, t, n) => {
|
|
572
|
+
i.warn(e), l(e) ? (n && n(e.str, e.hash), t.push({
|
|
573
|
+
...e,
|
|
574
|
+
message: e.str,
|
|
575
|
+
error: e
|
|
576
|
+
})) : (n && n(e), e instanceof Error && t.push({
|
|
577
|
+
str: e.message,
|
|
578
|
+
message: e.message,
|
|
579
|
+
hash: e.name,
|
|
580
|
+
error: e
|
|
581
|
+
}));
|
|
582
|
+
}, "handleError"), qt = /* @__PURE__ */ a(async function(e = { querySelector: ".mermaid" }) {
|
|
583
|
+
try {
|
|
584
|
+
await Jt(e);
|
|
585
|
+
} catch (t) {
|
|
586
|
+
if (l(t) && i.error(t.str), $.parseError && $.parseError(t), !e.suppressErrors) throw i.error("Use the suppressErrors option to suppress these errors"), t;
|
|
587
|
+
}
|
|
588
|
+
}, "run"), Jt = /* @__PURE__ */ a(async function({ postRenderCallback: e, querySelector: t, nodes: n } = { querySelector: ".mermaid" }) {
|
|
589
|
+
let r = X.getConfig();
|
|
590
|
+
i.debug(`${e ? "" : "No "}Callback function found`);
|
|
591
|
+
let a;
|
|
592
|
+
if (n) a = n;
|
|
593
|
+
else if (t) a = document.querySelectorAll(t);
|
|
594
|
+
else throw Error("Nodes and querySelector are both undefined");
|
|
595
|
+
i.debug(`Found ${a.length} diagrams`), r?.startOnLoad !== void 0 && (i.debug("Start On Load: " + r?.startOnLoad), X.updateSiteConfig({ startOnLoad: r?.startOnLoad }));
|
|
596
|
+
let o = new u.InitIDGenerator(r.deterministicIds, r.deterministicIDSeed), s, c = [];
|
|
597
|
+
for (let t of Array.from(a)) {
|
|
598
|
+
if (i.info("Rendering diagram: " + t.id), t.getAttribute("data-processed")) continue;
|
|
599
|
+
t.setAttribute("data-processed", "true");
|
|
600
|
+
let n = `mermaid-${o.next()}`;
|
|
601
|
+
s = t.innerHTML, s = fe(u.entityDecode(s)).trim().replace(/<br\s*\/?>/gi, "<br/>");
|
|
602
|
+
let r = u.detectInit(s);
|
|
603
|
+
r && i.debug("Detected early reinit: ", r);
|
|
604
|
+
try {
|
|
605
|
+
let { svg: r, bindFunctions: i } = await nn(n, s, t);
|
|
606
|
+
t.innerHTML = r, e && await e(n), i && i(t);
|
|
607
|
+
} catch (e) {
|
|
608
|
+
Kt(e, c, $.parseError);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
if (c.length > 0) throw c[0];
|
|
612
|
+
}, "runThrowsErrors"), Yt = /* @__PURE__ */ a(function(e) {
|
|
613
|
+
X.initialize(e);
|
|
614
|
+
}, "initialize"), Xt = /* @__PURE__ */ a(async function(e, t, n) {
|
|
615
|
+
i.warn("mermaid.init is deprecated. Please use run instead."), e && Yt(e);
|
|
616
|
+
let r = {
|
|
617
|
+
postRenderCallback: n,
|
|
618
|
+
querySelector: ".mermaid"
|
|
619
|
+
};
|
|
620
|
+
typeof t == "string" ? r.querySelector = t : t && (t instanceof HTMLElement ? r.nodes = [t] : r.nodes = t), await qt(r);
|
|
621
|
+
}, "init"), Zt = /* @__PURE__ */ a(async (e, { lazyLoad: t = !0 } = {}) => {
|
|
622
|
+
W(), _(...e), t === !1 && await ct();
|
|
623
|
+
}, "registerExternalDiagrams"), Qt = /* @__PURE__ */ a(function() {
|
|
624
|
+
if ($.startOnLoad) {
|
|
625
|
+
let { startOnLoad: e } = X.getConfig();
|
|
626
|
+
e && $.run().catch((e) => i.error("Mermaid failed to initialize", e));
|
|
627
|
+
}
|
|
628
|
+
}, "contentLoaded");
|
|
629
|
+
typeof document < "u" && window.addEventListener("load", Qt, !1);
|
|
630
|
+
var $t = /* @__PURE__ */ a(function(e) {
|
|
631
|
+
$.parseError = e;
|
|
632
|
+
}, "setParseErrorHandler"), Z = [], Q = !1, en = /* @__PURE__ */ a(async () => {
|
|
633
|
+
if (!Q) {
|
|
634
|
+
for (Q = !0; Z.length > 0;) {
|
|
635
|
+
let e = Z.shift();
|
|
636
|
+
if (e) try {
|
|
637
|
+
await e();
|
|
638
|
+
} catch (e) {
|
|
639
|
+
i.error("Error executing queue", e);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
Q = !1;
|
|
643
|
+
}
|
|
644
|
+
}, "executeQueue"), tn = /* @__PURE__ */ a(async (e, t) => new Promise((n, r) => {
|
|
645
|
+
let o = /* @__PURE__ */ a(() => new Promise((a, o) => {
|
|
646
|
+
X.parse(e, t).then((e) => {
|
|
647
|
+
a(e), n(e);
|
|
648
|
+
}, (e) => {
|
|
649
|
+
i.error("Error parsing", e), $.parseError?.(e), o(e), r(e);
|
|
650
|
+
});
|
|
651
|
+
}), "performCall");
|
|
652
|
+
Z.push(o), en().catch(r);
|
|
653
|
+
}), "parse"), nn = /* @__PURE__ */ a((e, t, n) => new Promise((r, o) => {
|
|
654
|
+
let s = /* @__PURE__ */ a(() => new Promise((a, s) => {
|
|
655
|
+
X.render(e, t, n).then((e) => {
|
|
656
|
+
a(e), r(e);
|
|
657
|
+
}, (e) => {
|
|
658
|
+
i.error("Error parsing", e), $.parseError?.(e), s(e), o(e);
|
|
659
|
+
});
|
|
660
|
+
}), "performCall");
|
|
661
|
+
Z.push(s), en().catch(o);
|
|
662
|
+
}), "render"), $ = {
|
|
663
|
+
startOnLoad: !0,
|
|
664
|
+
mermaidAPI: X,
|
|
665
|
+
parse: tn,
|
|
666
|
+
render: nn,
|
|
667
|
+
init: Xt,
|
|
668
|
+
run: qt,
|
|
669
|
+
registerExternalDiagrams: Zt,
|
|
670
|
+
registerLayoutLoaders: pe,
|
|
671
|
+
initialize: Yt,
|
|
672
|
+
parseError: void 0,
|
|
673
|
+
contentLoaded: Qt,
|
|
674
|
+
setParseErrorHandler: $t,
|
|
675
|
+
detectType: x,
|
|
676
|
+
registerIconPacks: de,
|
|
677
|
+
getRegisteredDiagramsMetadata: /* @__PURE__ */ a(() => Object.keys(w).map((e) => ({ id: e })), "getRegisteredDiagramsMetadata")
|
|
678
|
+
}, rn = $;
|
|
679
|
+
//#endregion
|
|
680
|
+
export { rn as default };
|