novelaid-markdown 0.2.0 → 0.3.0

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.
Files changed (104) hide show
  1. package/README.md +15 -0
  2. package/dist/_baseFor-Btt7qhvA.js +394 -0
  3. package/dist/arc-B1ElyJRe.js +80 -0
  4. package/dist/architecture-YZFGNWBL-DbwpLiaF.js +3 -0
  5. package/dist/architectureDiagram-Q4EWVU46-DPdA1a51.js +4057 -0
  6. package/dist/array-D9V22jUe.js +6 -0
  7. package/dist/blockDiagram-DXYQGD6D-Bf0IzYoN.js +3035 -0
  8. package/dist/c4Diagram-AHTNJAMY-BlTBDzAq.js +2961 -0
  9. package/dist/channel-CoqXOEHz.js +5 -0
  10. package/dist/chunk-2KRD3SAO-r21hNzXt.js +23 -0
  11. package/dist/chunk-336JU56O-DcVNMTsS.js +49 -0
  12. package/dist/chunk-426QAEUC-B4JQ_vPF.js +9 -0
  13. package/dist/chunk-4BX2VUAB-JBqrV_IE.js +8 -0
  14. package/dist/chunk-4TB4RGXK-DHS8LN6H.js +3255 -0
  15. package/dist/chunk-55IACEB6-C9COrGK_.js +8 -0
  16. package/dist/chunk-5FUZZQ4R-CdCLluck.js +3638 -0
  17. package/dist/chunk-5PVQY5BW-Dgwc0dUk.js +1299 -0
  18. package/dist/chunk-67CJDMHE-UQ-a7p3g.js +23 -0
  19. package/dist/chunk-7N4EOEYR-CPiwpV-A.js +35 -0
  20. package/dist/chunk-AA7GKIK3-DR_Iqho4.js +30 -0
  21. package/dist/chunk-BSJP7CBP-BrxQKL1l.js +82 -0
  22. package/dist/chunk-CIAEETIT-tbco3aB3.js +23 -0
  23. package/dist/chunk-EDXVE4YY-BHsZxHlc.js +25 -0
  24. package/dist/chunk-ENJZ2VHE-Dm2kuGCh.js +560 -0
  25. package/dist/chunk-FMBD7UC4-DwV8Wmed.js +5 -0
  26. package/dist/chunk-FOC6F5B3-CQtHQje_.js +23 -0
  27. package/dist/chunk-ICPOFSXX-B9lsZaK9.js +3363 -0
  28. package/dist/chunk-K5T4RW27-DI9nuGzI.js +16082 -0
  29. package/dist/chunk-KGLVRYIC-BMNH9LI-.js +23 -0
  30. package/dist/chunk-LIHQZDEY-Dc-yVZ_W.js +64 -0
  31. package/dist/chunk-ORNJ4GCN-DqZLt4_8.js +31 -0
  32. package/dist/chunk-OYMX7WX6-B8KpS9qK.js +2014 -0
  33. package/dist/chunk-QZHKN3VN-C4dmvHME.js +15 -0
  34. package/dist/chunk-U2HBQHQK-BME65g2a.js +1896 -0
  35. package/dist/chunk-X2U36JSP-CesuQ-Sm.js +67 -0
  36. package/dist/chunk-XPW4576I-Wv7jaLUC.js +1146 -0
  37. package/dist/chunk-YZCP3GAM-CJIt1xzm.js +60 -0
  38. package/dist/chunk-ZZ45TVLE-CMBGSmdv.js +32 -0
  39. package/dist/chunk-ha4E1CQs.js +20 -0
  40. package/dist/classDiagram-6PBFFD2Q-kvmQgIxu.js +29 -0
  41. package/dist/classDiagram-v2-HSJHXN6E-DLlYyLVf.js +29 -0
  42. package/dist/clone-B5XHQkPs.js +8 -0
  43. package/dist/cose-bilkent-S5V4N54A-xGhciOop.js +2250 -0
  44. package/dist/cytoscape.esm-BgCYa94Q.js +18103 -0
  45. package/dist/dagre-KV5264BT-DNe8h1eH.js +293 -0
  46. package/dist/dagre-SfibWTbo.js +1606 -0
  47. package/dist/defaultLocale-9iKoEQQi.js +201 -0
  48. package/dist/diagram-5BDNPKRD-D_R6IIhE.js +101 -0
  49. package/dist/diagram-G4DWMVQ6-CGlOggN-.js +524 -0
  50. package/dist/diagram-MMDJMWI5-GlxWkSbK.js +213 -0
  51. package/dist/diagram-TYMM5635-Empbfz-2.js +133 -0
  52. package/dist/dist-Dz2K8jVv.js +59 -0
  53. package/dist/erDiagram-SMLLAGMA-DSnlNLPr.js +1700 -0
  54. package/dist/{esm-Psdhd_27.js → esm-Binvve4F.js} +285 -303
  55. package/dist/flatten-BeeUCBYF.js +40 -0
  56. package/dist/flowDiagram-DWJPFMVM-YAh0NsG9.js +4145 -0
  57. package/dist/ganttDiagram-T4ZO3ILL-DkmkZTO5.js +3077 -0
  58. package/dist/gitGraph-7Q5UKJZL-DamMrPFa.js +3 -0
  59. package/dist/gitGraphDiagram-UUTBAWPF-IjLQtHgn.js +728 -0
  60. package/dist/graphlib-DSQqP-5Y.js +373 -0
  61. package/dist/index.css +2 -0
  62. package/dist/index.js +115 -38
  63. package/dist/index.umd.cjs +3218 -23
  64. package/dist/info-OMHHGYJF-BovemagY.js +3 -0
  65. package/dist/infoDiagram-42DDH7IO-izJQDQJs.js +19 -0
  66. package/dist/init-DkX7cl9c.js +15 -0
  67. package/dist/isEmpty-kLGD071T.js +35 -0
  68. package/dist/ishikawaDiagram-UXIWVN3A-SJb5qsLR.js +718 -0
  69. package/dist/journeyDiagram-VCZTEJTY-BDa8bFXG.js +883 -0
  70. package/dist/kanban-definition-6JOO6SKY-i73I3KFw.js +973 -0
  71. package/dist/katex-DI2iMRYj.js +22000 -0
  72. package/dist/line-BD0OIRsH.js +34 -0
  73. package/dist/linear-DV1pG6aV.js +289 -0
  74. package/dist/mermaid-parser.core-CZznKIov.js +69 -0
  75. package/dist/mermaid.core-a1TLqUAY.js +951 -0
  76. package/dist/mindmap-definition-QFDTVHPH-DPG-HkqU.js +1009 -0
  77. package/dist/ordinal-Zd5qpGcV.js +65 -0
  78. package/dist/packet-4T2RLAQJ-BEP9UcAl.js +3 -0
  79. package/dist/path-BSwIfggT.js +85 -0
  80. package/dist/pie-ZZUOXDRM-AZqQmg1p.js +3 -0
  81. package/dist/pieDiagram-DEJITSTG-Cj1YBlb1.js +165 -0
  82. package/dist/quadrantDiagram-34T5L4WZ-ypBI9wre.js +1974 -0
  83. package/dist/radar-PYXPWWZC-BpKM_Ghb.js +3 -0
  84. package/dist/{react-markdown-BXmDW998.js → react-markdown-CwHVAeQi.js} +82 -81
  85. package/dist/reduce-DQgHi9nw.js +532 -0
  86. package/dist/{rehype-raw-_yRr8ewB.js → rehype-raw-CbJS4QeP.js} +346 -346
  87. package/dist/{remark-gfm-Cfc5YeEq.js → remark-gfm-D_QtAzOA.js} +2 -2
  88. package/dist/requirementDiagram-MS252O5E-CkuWjAxJ.js +2221 -0
  89. package/dist/rough.esm-Dun2l6dn.js +1352 -0
  90. package/dist/sankeyDiagram-XADWPNL6-BzIHfJyL.js +920 -0
  91. package/dist/sequenceDiagram-FGHM5R23-NC0cKvy5.js +4157 -0
  92. package/dist/src-D7IEzgYM.js +2149 -0
  93. package/dist/stateDiagram-FHFEXIEX-vd0cNpSx.js +217 -0
  94. package/dist/stateDiagram-v2-QKLJ7IA2-BXsBMk9U.js +27 -0
  95. package/dist/timeline-definition-GMOUNBTQ-DeOvCyAs.js +1068 -0
  96. package/dist/treeView-SZITEDCU-D-ftaYOL.js +3 -0
  97. package/dist/treemap-W4RFUUIX-B2bp9KIg.js +3 -0
  98. package/dist/vennDiagram-DHZGUBPP-Hraq3pvR.js +1858 -0
  99. package/dist/wardley-RL74JXVD-BdjKuxh8.js +3 -0
  100. package/dist/wardleyDiagram-NUSXRM2D-C06eRanG.js +578 -0
  101. package/dist/xychartDiagram-5P7HB3ND-BiD79JlS.js +2044 -0
  102. package/package.json +2 -1
  103. /package/dist/{blank-line-ClJSvRAu.js → blank-line-DxLGQ569.js} +0 -0
  104. /package/dist/{lib-DWIu06lZ.js → lib-z8X9LcoZ.js} +0 -0
@@ -0,0 +1,951 @@
1
+ import { t as e } from "./isEmpty-kLGD071T.js";
2
+ import { _ as t, g as n, h as r, p as i } from "./src-D7IEzgYM.js";
3
+ import { F as a, G as o, H as s, J as c, M as l, N as u, S as d, T as f, X as p, Y as m, Z as h, c as g, f as _, g as v, h as y, l as b, n as x, p as S, r as C, t as w, w as ee, x as T, y as E, z as te } from "./chunk-ICPOFSXX-B9lsZaK9.js";
4
+ import { a as D, d as O, h as k, i as ne, m as A, r as re } from "./chunk-5PVQY5BW-Dgwc0dUk.js";
5
+ import { t as ie } from "./chunk-426QAEUC-B4JQ_vPF.js";
6
+ import { i as ae, o as oe } from "./chunk-U2HBQHQK-BME65g2a.js";
7
+ import "./chunk-BSJP7CBP-BrxQKL1l.js";
8
+ import "./chunk-ZZ45TVLE-CMBGSmdv.js";
9
+ import "./chunk-X2U36JSP-CesuQ-Sm.js";
10
+ import "./chunk-5FUZZQ4R-CdCLluck.js";
11
+ import "./chunk-ENJZ2VHE-Dm2kuGCh.js";
12
+ import { n as se } from "./chunk-336JU56O-DcVNMTsS.js";
13
+ import { n as ce, t as le } from "./chunk-XPW4576I-Wv7jaLUC.js";
14
+ //#region node_modules/stylis/src/Enum.js
15
+ var ue = "comm", de = "rule", fe = "decl", pe = "@import", me = "@namespace", he = "@keyframes", ge = "@layer", _e = Math.abs, j = String.fromCharCode;
16
+ function ve(e) {
17
+ return e.trim();
18
+ }
19
+ function ye(e, t, n) {
20
+ return e.replace(t, n);
21
+ }
22
+ function M(e, t) {
23
+ return e.charCodeAt(t) | 0;
24
+ }
25
+ function N(e, t, n) {
26
+ return e.slice(t, n);
27
+ }
28
+ function P(e) {
29
+ return e.length;
30
+ }
31
+ function be(e) {
32
+ return e.length;
33
+ }
34
+ function F(e, t) {
35
+ return t.push(e), e;
36
+ }
37
+ //#endregion
38
+ //#region node_modules/stylis/src/Tokenizer.js
39
+ var I = 1, L = 1, xe = 0, R = 0, z = 0, B = "";
40
+ function V(e, t, n, r, i, a, o, s) {
41
+ return {
42
+ value: e,
43
+ root: t,
44
+ parent: n,
45
+ type: r,
46
+ props: i,
47
+ children: a,
48
+ line: I,
49
+ column: L,
50
+ length: o,
51
+ return: "",
52
+ siblings: s
53
+ };
54
+ }
55
+ function Se() {
56
+ return z;
57
+ }
58
+ function Ce() {
59
+ return z = R > 0 ? M(B, --R) : 0, L--, z === 10 && (L = 1, I--), z;
60
+ }
61
+ function H() {
62
+ return z = R < xe ? M(B, R++) : 0, L++, z === 10 && (L = 1, I++), z;
63
+ }
64
+ function U() {
65
+ return M(B, R);
66
+ }
67
+ function W() {
68
+ return R;
69
+ }
70
+ function G(e, t) {
71
+ return N(B, e, t);
72
+ }
73
+ function K(e) {
74
+ switch (e) {
75
+ case 0:
76
+ case 9:
77
+ case 10:
78
+ case 13:
79
+ case 32: return 5;
80
+ case 33:
81
+ case 43:
82
+ case 44:
83
+ case 47:
84
+ case 62:
85
+ case 64:
86
+ case 126:
87
+ case 59:
88
+ case 123:
89
+ case 125: return 4;
90
+ case 58: return 3;
91
+ case 34:
92
+ case 39:
93
+ case 40:
94
+ case 91: return 2;
95
+ case 41:
96
+ case 93: return 1;
97
+ }
98
+ return 0;
99
+ }
100
+ function we(e) {
101
+ return I = L = 1, xe = P(B = e), R = 0, [];
102
+ }
103
+ function Te(e) {
104
+ return B = "", e;
105
+ }
106
+ function q(e) {
107
+ return ve(G(R - 1, J(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
108
+ }
109
+ function Ee(e) {
110
+ for (; (z = U()) && z < 33;) H();
111
+ return K(e) > 2 || K(z) > 3 ? "" : " ";
112
+ }
113
+ function De(e, t) {
114
+ for (; --t && H() && !(z < 48 || z > 102 || z > 57 && z < 65 || z > 70 && z < 97););
115
+ return G(e, W() + (t < 6 && U() == 32 && H() == 32));
116
+ }
117
+ function J(e) {
118
+ for (; H();) switch (z) {
119
+ case e: return R;
120
+ case 34:
121
+ case 39:
122
+ e !== 34 && e !== 39 && J(z);
123
+ break;
124
+ case 40:
125
+ e === 41 && J(e);
126
+ break;
127
+ case 92:
128
+ H();
129
+ break;
130
+ }
131
+ return R;
132
+ }
133
+ function Oe(e, t) {
134
+ for (; H() && e + z !== 57 && !(e + z === 84 && U() === 47););
135
+ return "/*" + G(t, R - 1) + "*" + j(e === 47 ? e : H());
136
+ }
137
+ function ke(e) {
138
+ for (; !K(U());) H();
139
+ return G(e, R);
140
+ }
141
+ //#endregion
142
+ //#region node_modules/stylis/src/Parser.js
143
+ function Ae(e) {
144
+ return Te(Y("", null, null, null, [""], e = we(e), 0, [0], e));
145
+ }
146
+ function Y(e, t, n, r, i, a, o, s, c) {
147
+ for (var l = 0, u = 0, d = o, f = 0, p = 0, m = 0, h = 1, g = 1, _ = 1, v = 0, y = 0, b = "", x = i, S = a, C = r, w = b; g;) switch (m = y, y = H()) {
148
+ case 40:
149
+ m != 108 && M(w, d - 1) == 58 ? (v++, w += "(") : w += q(y);
150
+ break;
151
+ case 41:
152
+ v--, w += ")";
153
+ break;
154
+ case 34:
155
+ case 39:
156
+ case 91:
157
+ w += q(y);
158
+ break;
159
+ case 9:
160
+ case 10:
161
+ case 13:
162
+ case 32:
163
+ if (v > 0) {
164
+ w += j(y);
165
+ break;
166
+ }
167
+ w += Ee(m);
168
+ break;
169
+ case 92:
170
+ w += De(W() - 1, 7);
171
+ continue;
172
+ case 47:
173
+ switch (U()) {
174
+ case 42:
175
+ case 47:
176
+ F(Me(Oe(H(), W()), t, n, c), c), (K(m || 1) == 5 || K(U() || 1) == 5) && P(w) && N(w, -1, void 0) !== " " && (w += " ");
177
+ break;
178
+ default: w += "/";
179
+ }
180
+ break;
181
+ case 123 * h: s[l++] = P(w) * _;
182
+ case 125 * h:
183
+ case 59:
184
+ case 0:
185
+ if (v > 0 && y) {
186
+ w += j(y);
187
+ break;
188
+ }
189
+ switch (y) {
190
+ case 0:
191
+ case 125: g = 0;
192
+ case 59 + u:
193
+ _ == -1 && (w = ye(w, /\f/g, "")), p > 0 && (P(w) - d || h === 0) && F(p > 32 ? Ne(w + ";", r, n, d - 1, c) : Ne(ye(w, " ", "") + ";", r, n, d - 2, c), c);
194
+ break;
195
+ case 59: w += ";";
196
+ default: if (F(C = je(w, t, n, l, u, i, s, b, x = [], S = [], d, a), a), y === 123) if (u === 0) Y(w, t, C, C, x, a, d, s, S);
197
+ else {
198
+ switch (f) {
199
+ case 99: if (M(w, 3) === 110) break;
200
+ case 108: if (M(w, 2) === 97) break;
201
+ default: u = 0;
202
+ case 100:
203
+ case 109:
204
+ case 115:
205
+ }
206
+ u ? Y(e, C, C, r && F(je(e, C, C, 0, 0, i, s, b, i, x = [], d, S), S), i, S, d, s, r ? x : S) : Y(w, C, C, C, [""], S, 0, s, S);
207
+ }
208
+ }
209
+ l = u = p = 0, h = _ = 1, b = w = "", d = o;
210
+ break;
211
+ case 58: d = 1 + P(w), p = m;
212
+ default:
213
+ if (h < 1) {
214
+ if (y == 123) --h;
215
+ else if (y == 125 && h++ == 0 && Ce() == 125) continue;
216
+ }
217
+ switch (w += j(y), y * h) {
218
+ case 38:
219
+ _ = u > 0 ? 1 : (w += "\f", -1);
220
+ break;
221
+ case 44:
222
+ if (v > 0) break;
223
+ s[l++] = (P(w) - 1) * _, _ = 1;
224
+ break;
225
+ case 64:
226
+ U() === 45 && (w += q(H())), f = U(), u = d = P(b = w += ke(W())), y++;
227
+ break;
228
+ case 45: m === 45 && P(w) == 2 && (h = 0);
229
+ }
230
+ }
231
+ return a;
232
+ }
233
+ function je(e, t, n, r, i, a, o, s, c, l, u, d) {
234
+ for (var f = i - 1, p = i === 0 ? a : [""], m = be(p), h = 0, g = 0, _ = 0; h < r; ++h) for (var v = 0, y = N(e, f + 1, f = _e(g = o[h])), b = e; v < m; ++v) (b = ve(g > 0 ? p[v] + " " + y : ye(y, /&\f/g, p[v]))) && (c[_++] = b);
235
+ return V(e, t, n, i === 0 ? de : s, c, l, u, d);
236
+ }
237
+ function Me(e, t, n, r) {
238
+ return V(e, t, n, ue, j(Se()), N(e, 2, -2), 0, r);
239
+ }
240
+ function Ne(e, t, n, r, i) {
241
+ return V(e, t, n, fe, N(e, 0, r), N(e, r + 1, -1), r, i);
242
+ }
243
+ //#endregion
244
+ //#region node_modules/stylis/src/Serializer.js
245
+ function Pe(e, t) {
246
+ for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
247
+ return n;
248
+ }
249
+ function Fe(e, t, n, r) {
250
+ switch (e.type) {
251
+ case ge: if (e.children.length) break;
252
+ case pe:
253
+ case me:
254
+ case fe: return e.return = e.return || e.value;
255
+ case ue: return "";
256
+ case he: return e.return = e.value + "{" + Pe(e.children, r) + "}";
257
+ case de: if (!P(e.value = e.props.join(","))) return "";
258
+ }
259
+ return P(n = Pe(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
260
+ }
261
+ //#endregion
262
+ //#region node_modules/mermaid/dist/mermaid.core.mjs
263
+ var Ie = "c4", Le = {
264
+ id: Ie,
265
+ detector: /* @__PURE__ */ r((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
266
+ loader: /* @__PURE__ */ r(async () => {
267
+ let { diagram: e } = await import("./c4Diagram-AHTNJAMY-BlTBDzAq.js");
268
+ return {
269
+ id: Ie,
270
+ diagram: e
271
+ };
272
+ }, "loader")
273
+ }, Re = "flowchart", ze = {
274
+ id: Re,
275
+ detector: /* @__PURE__ */ r((e, t) => t?.flowchart?.defaultRenderer === "dagre-wrapper" || t?.flowchart?.defaultRenderer === "elk" ? !1 : /^\s*graph/.test(e), "detector"),
276
+ loader: /* @__PURE__ */ r(async () => {
277
+ let { diagram: e } = await import("./flowDiagram-DWJPFMVM-YAh0NsG9.js");
278
+ return {
279
+ id: Re,
280
+ diagram: e
281
+ };
282
+ }, "loader")
283
+ }, Be = "flowchart-v2", Ve = {
284
+ id: Be,
285
+ detector: /* @__PURE__ */ r((e, t) => t?.flowchart?.defaultRenderer === "dagre-d3" ? !1 : (t?.flowchart?.defaultRenderer === "elk" && (t.layout = "elk"), /^\s*graph/.test(e) && t?.flowchart?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(e)), "detector"),
286
+ loader: /* @__PURE__ */ r(async () => {
287
+ let { diagram: e } = await import("./flowDiagram-DWJPFMVM-YAh0NsG9.js");
288
+ return {
289
+ id: Be,
290
+ diagram: e
291
+ };
292
+ }, "loader")
293
+ }, He = "er", Ue = {
294
+ id: He,
295
+ detector: /* @__PURE__ */ r((e) => /^\s*erDiagram/.test(e), "detector"),
296
+ loader: /* @__PURE__ */ r(async () => {
297
+ let { diagram: e } = await import("./erDiagram-SMLLAGMA-DSnlNLPr.js");
298
+ return {
299
+ id: He,
300
+ diagram: e
301
+ };
302
+ }, "loader")
303
+ }, We = "gitGraph", Ge = {
304
+ id: We,
305
+ detector: /* @__PURE__ */ r((e) => /^\s*gitGraph/.test(e), "detector"),
306
+ loader: /* @__PURE__ */ r(async () => {
307
+ let { diagram: e } = await import("./gitGraphDiagram-UUTBAWPF-IjLQtHgn.js");
308
+ return {
309
+ id: We,
310
+ diagram: e
311
+ };
312
+ }, "loader")
313
+ }, Ke = "gantt", qe = {
314
+ id: Ke,
315
+ detector: /* @__PURE__ */ r((e) => /^\s*gantt/.test(e), "detector"),
316
+ loader: /* @__PURE__ */ r(async () => {
317
+ let { diagram: e } = await import("./ganttDiagram-T4ZO3ILL-DkmkZTO5.js");
318
+ return {
319
+ id: Ke,
320
+ diagram: e
321
+ };
322
+ }, "loader")
323
+ }, Je = "info", Ye = {
324
+ id: Je,
325
+ detector: /* @__PURE__ */ r((e) => /^\s*info/.test(e), "detector"),
326
+ loader: /* @__PURE__ */ r(async () => {
327
+ let { diagram: e } = await import("./infoDiagram-42DDH7IO-izJQDQJs.js");
328
+ return {
329
+ id: Je,
330
+ diagram: e
331
+ };
332
+ }, "loader")
333
+ }, Xe = "pie", Ze = {
334
+ id: Xe,
335
+ detector: /* @__PURE__ */ r((e) => /^\s*pie/.test(e), "detector"),
336
+ loader: /* @__PURE__ */ r(async () => {
337
+ let { diagram: e } = await import("./pieDiagram-DEJITSTG-Cj1YBlb1.js");
338
+ return {
339
+ id: Xe,
340
+ diagram: e
341
+ };
342
+ }, "loader")
343
+ }, Qe = "quadrantChart", $e = {
344
+ id: Qe,
345
+ detector: /* @__PURE__ */ r((e) => /^\s*quadrantChart/.test(e), "detector"),
346
+ loader: /* @__PURE__ */ r(async () => {
347
+ let { diagram: e } = await import("./quadrantDiagram-34T5L4WZ-ypBI9wre.js");
348
+ return {
349
+ id: Qe,
350
+ diagram: e
351
+ };
352
+ }, "loader")
353
+ }, et = "xychart", tt = {
354
+ id: et,
355
+ detector: /* @__PURE__ */ r((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
356
+ loader: /* @__PURE__ */ r(async () => {
357
+ let { diagram: e } = await import("./xychartDiagram-5P7HB3ND-BiD79JlS.js");
358
+ return {
359
+ id: et,
360
+ diagram: e
361
+ };
362
+ }, "loader")
363
+ }, nt = "requirement", rt = {
364
+ id: nt,
365
+ detector: /* @__PURE__ */ r((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
366
+ loader: /* @__PURE__ */ r(async () => {
367
+ let { diagram: e } = await import("./requirementDiagram-MS252O5E-CkuWjAxJ.js");
368
+ return {
369
+ id: nt,
370
+ diagram: e
371
+ };
372
+ }, "loader")
373
+ }, it = "sequence", at = {
374
+ id: it,
375
+ detector: /* @__PURE__ */ r((e) => /^\s*sequenceDiagram/.test(e), "detector"),
376
+ loader: /* @__PURE__ */ r(async () => {
377
+ let { diagram: e } = await import("./sequenceDiagram-FGHM5R23-NC0cKvy5.js");
378
+ return {
379
+ id: it,
380
+ diagram: e
381
+ };
382
+ }, "loader")
383
+ }, ot = "class", st = {
384
+ id: ot,
385
+ detector: /* @__PURE__ */ r((e, t) => t?.class?.defaultRenderer === "dagre-wrapper" ? !1 : /^\s*classDiagram/.test(e), "detector"),
386
+ loader: /* @__PURE__ */ r(async () => {
387
+ let { diagram: e } = await import("./classDiagram-6PBFFD2Q-kvmQgIxu.js");
388
+ return {
389
+ id: ot,
390
+ diagram: e
391
+ };
392
+ }, "loader")
393
+ }, ct = "classDiagram", lt = {
394
+ id: ct,
395
+ detector: /* @__PURE__ */ r((e, t) => /^\s*classDiagram/.test(e) && t?.class?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(e), "detector"),
396
+ loader: /* @__PURE__ */ r(async () => {
397
+ let { diagram: e } = await import("./classDiagram-v2-HSJHXN6E-DLlYyLVf.js");
398
+ return {
399
+ id: ct,
400
+ diagram: e
401
+ };
402
+ }, "loader")
403
+ }, ut = "state", dt = {
404
+ id: ut,
405
+ detector: /* @__PURE__ */ r((e, t) => t?.state?.defaultRenderer === "dagre-wrapper" ? !1 : /^\s*stateDiagram/.test(e), "detector"),
406
+ loader: /* @__PURE__ */ r(async () => {
407
+ let { diagram: e } = await import("./stateDiagram-FHFEXIEX-vd0cNpSx.js");
408
+ return {
409
+ id: ut,
410
+ diagram: e
411
+ };
412
+ }, "loader")
413
+ }, ft = "stateDiagram", pt = {
414
+ id: ft,
415
+ detector: /* @__PURE__ */ r((e, t) => !!(/^\s*stateDiagram-v2/.test(e) || /^\s*stateDiagram/.test(e) && t?.state?.defaultRenderer === "dagre-wrapper"), "detector"),
416
+ loader: /* @__PURE__ */ r(async () => {
417
+ let { diagram: e } = await import("./stateDiagram-v2-QKLJ7IA2-BXsBMk9U.js");
418
+ return {
419
+ id: ft,
420
+ diagram: e
421
+ };
422
+ }, "loader")
423
+ }, mt = "journey", ht = {
424
+ id: mt,
425
+ detector: /* @__PURE__ */ r((e) => /^\s*journey/.test(e), "detector"),
426
+ loader: /* @__PURE__ */ r(async () => {
427
+ let { diagram: e } = await import("./journeyDiagram-VCZTEJTY-BDa8bFXG.js");
428
+ return {
429
+ id: mt,
430
+ diagram: e
431
+ };
432
+ }, "loader")
433
+ }, gt = { draw: /* @__PURE__ */ r((e, t, r) => {
434
+ n.debug("rendering svg for syntax error\n");
435
+ let i = ie(t), a = i.append("g");
436
+ i.attr("viewBox", "0 0 2412 512"), g(i, 100, 512, !0), a.append("path").attr("class", "error-icon").attr("d", "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"), a.append("path").attr("class", "error-icon").attr("d", "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"), a.append("path").attr("class", "error-icon").attr("d", "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"), a.append("path").attr("class", "error-icon").attr("d", "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"), a.append("path").attr("class", "error-icon").attr("d", "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"), a.append("path").attr("class", "error-icon").attr("d", "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"), a.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"), a.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${r}`);
437
+ }, "draw") }, _t = gt, vt = {
438
+ db: {},
439
+ renderer: gt,
440
+ parser: { parse: /* @__PURE__ */ r(() => {}, "parse") }
441
+ }, yt = "flowchart-elk", bt = {
442
+ id: yt,
443
+ detector: /* @__PURE__ */ r((e, t = {}) => /^\s*flowchart-elk/.test(e) || /^\s*(flowchart|graph)/.test(e) && t?.flowchart?.defaultRenderer === "elk" ? (t.layout = "elk", !0) : !1, "detector"),
444
+ loader: /* @__PURE__ */ r(async () => {
445
+ let { diagram: e } = await import("./flowDiagram-DWJPFMVM-YAh0NsG9.js");
446
+ return {
447
+ id: yt,
448
+ diagram: e
449
+ };
450
+ }, "loader")
451
+ }, xt = "timeline", St = {
452
+ id: xt,
453
+ detector: /* @__PURE__ */ r((e) => /^\s*timeline/.test(e), "detector"),
454
+ loader: /* @__PURE__ */ r(async () => {
455
+ let { diagram: e } = await import("./timeline-definition-GMOUNBTQ-DeOvCyAs.js");
456
+ return {
457
+ id: xt,
458
+ diagram: e
459
+ };
460
+ }, "loader")
461
+ }, Ct = "mindmap", wt = {
462
+ id: Ct,
463
+ detector: /* @__PURE__ */ r((e) => /^\s*mindmap/.test(e), "detector"),
464
+ loader: /* @__PURE__ */ r(async () => {
465
+ let { diagram: e } = await import("./mindmap-definition-QFDTVHPH-DPG-HkqU.js");
466
+ return {
467
+ id: Ct,
468
+ diagram: e
469
+ };
470
+ }, "loader")
471
+ }, Tt = "kanban", Et = {
472
+ id: Tt,
473
+ detector: /* @__PURE__ */ r((e) => /^\s*kanban/.test(e), "detector"),
474
+ loader: /* @__PURE__ */ r(async () => {
475
+ let { diagram: e } = await import("./kanban-definition-6JOO6SKY-i73I3KFw.js");
476
+ return {
477
+ id: Tt,
478
+ diagram: e
479
+ };
480
+ }, "loader")
481
+ }, Dt = "sankey", Ot = {
482
+ id: Dt,
483
+ detector: /* @__PURE__ */ r((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
484
+ loader: /* @__PURE__ */ r(async () => {
485
+ let { diagram: e } = await import("./sankeyDiagram-XADWPNL6-BzIHfJyL.js");
486
+ return {
487
+ id: Dt,
488
+ diagram: e
489
+ };
490
+ }, "loader")
491
+ }, kt = "packet", At = {
492
+ id: kt,
493
+ detector: /* @__PURE__ */ r((e) => /^\s*packet(-beta)?/.test(e), "detector"),
494
+ loader: /* @__PURE__ */ r(async () => {
495
+ let { diagram: e } = await import("./diagram-TYMM5635-Empbfz-2.js");
496
+ return {
497
+ id: kt,
498
+ diagram: e
499
+ };
500
+ }, "loader")
501
+ }, jt = "radar", Mt = {
502
+ id: jt,
503
+ detector: /* @__PURE__ */ r((e) => /^\s*radar-beta/.test(e), "detector"),
504
+ loader: /* @__PURE__ */ r(async () => {
505
+ let { diagram: e } = await import("./diagram-MMDJMWI5-GlxWkSbK.js");
506
+ return {
507
+ id: jt,
508
+ diagram: e
509
+ };
510
+ }, "loader")
511
+ }, Nt = "block", Pt = {
512
+ id: Nt,
513
+ detector: /* @__PURE__ */ r((e) => /^\s*block(-beta)?/.test(e), "detector"),
514
+ loader: /* @__PURE__ */ r(async () => {
515
+ let { diagram: e } = await import("./blockDiagram-DXYQGD6D-Bf0IzYoN.js");
516
+ return {
517
+ id: Nt,
518
+ diagram: e
519
+ };
520
+ }, "loader")
521
+ }, Ft = "treeView", It = {
522
+ id: Ft,
523
+ detector: /* @__PURE__ */ r((e) => /^\s*treeView-beta/.test(e), "detector"),
524
+ loader: /* @__PURE__ */ r(async () => {
525
+ let { diagram: e } = await import("./diagram-5BDNPKRD-D_R6IIhE.js");
526
+ return {
527
+ id: Ft,
528
+ diagram: e
529
+ };
530
+ }, "loader")
531
+ }, Lt = "architecture", Rt = {
532
+ id: Lt,
533
+ detector: /* @__PURE__ */ r((e) => /^\s*architecture/.test(e), "detector"),
534
+ loader: /* @__PURE__ */ r(async () => {
535
+ let { diagram: e } = await import("./architectureDiagram-Q4EWVU46-DPdA1a51.js");
536
+ return {
537
+ id: Lt,
538
+ diagram: e
539
+ };
540
+ }, "loader")
541
+ }, zt = "ishikawa", Bt = {
542
+ id: zt,
543
+ detector: /* @__PURE__ */ r((e) => /^\s*ishikawa(-beta)?\b/i.test(e), "detector"),
544
+ loader: /* @__PURE__ */ r(async () => {
545
+ let { diagram: e } = await import("./ishikawaDiagram-UXIWVN3A-SJb5qsLR.js");
546
+ return {
547
+ id: zt,
548
+ diagram: e
549
+ };
550
+ }, "loader")
551
+ }, Vt = "venn", Ht = {
552
+ id: Vt,
553
+ detector: /* @__PURE__ */ r((e) => /^\s*venn-beta/.test(e), "detector"),
554
+ loader: /* @__PURE__ */ r(async () => {
555
+ let { diagram: e } = await import("./vennDiagram-DHZGUBPP-Hraq3pvR.js");
556
+ return {
557
+ id: Vt,
558
+ diagram: e
559
+ };
560
+ }, "loader")
561
+ }, Ut = "treemap", Wt = {
562
+ id: Ut,
563
+ detector: /* @__PURE__ */ r((e) => /^\s*treemap/.test(e), "detector"),
564
+ loader: /* @__PURE__ */ r(async () => {
565
+ let { diagram: e } = await import("./diagram-G4DWMVQ6-CGlOggN-.js");
566
+ return {
567
+ id: Ut,
568
+ diagram: e
569
+ };
570
+ }, "loader")
571
+ }, Gt = "wardley-beta", Kt = {
572
+ id: Gt,
573
+ detector: /* @__PURE__ */ r((e) => /^\s*wardley-beta/i.test(e), "detector"),
574
+ loader: /* @__PURE__ */ r(async () => {
575
+ let { diagram: e } = await import("./wardleyDiagram-NUSXRM2D-C06eRanG.js");
576
+ return {
577
+ id: Gt,
578
+ diagram: e
579
+ };
580
+ }, "loader")
581
+ }, qt = !1, X = /* @__PURE__ */ r(() => {
582
+ qt || (qt = !0, l("error", vt, (e) => e.toLowerCase().trim() === "error"), l("---", {
583
+ db: { clear: /* @__PURE__ */ r(() => {}, "clear") },
584
+ styles: {},
585
+ renderer: { draw: /* @__PURE__ */ r(() => {}, "draw") },
586
+ parser: { parse: /* @__PURE__ */ r(() => {
587
+ 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");
588
+ }, "parse") },
589
+ init: /* @__PURE__ */ r(() => null, "init")
590
+ }, (e) => e.toLowerCase().trimStart().startsWith("---")), u(bt, wt, Rt), u(Le, Et, lt, st, Ue, qe, Ye, Ze, rt, at, Ve, ze, St, Ge, pt, dt, ht, $e, Ot, At, tt, Pt, It, Mt, Bt, Wt, Ht, Kt));
591
+ }, "addDiagrams"), Jt = /* @__PURE__ */ r(async () => {
592
+ n.debug("Loading registered diagrams");
593
+ let e = (await Promise.allSettled(Object.entries(S).map(async ([e, { detector: t, loader: r }]) => {
594
+ if (r) try {
595
+ T(e);
596
+ } catch {
597
+ try {
598
+ let { diagram: e, id: n } = await r();
599
+ l(n, e, t);
600
+ } catch (t) {
601
+ throw n.error(`Failed to load external diagram with key ${e}. Removing from detectors.`), delete S[e], t;
602
+ }
603
+ }
604
+ }))).filter((e) => e.status === "rejected");
605
+ if (e.length > 0) {
606
+ n.error(`Failed to load ${e.length} external diagrams`);
607
+ for (let t of e) n.error(t);
608
+ throw Error(`Failed to load ${e.length} external diagrams`);
609
+ }
610
+ }, "loadRegisteredDiagrams"), Yt = "graphics-document document";
611
+ function Xt(e, t) {
612
+ e.attr("role", Yt), t !== "" && e.attr("aria-roledescription", t);
613
+ }
614
+ r(Xt, "setA11yDiagramInfo");
615
+ function Zt(e, t, n, r) {
616
+ if (e.insert !== void 0) {
617
+ if (n) {
618
+ let t = `chart-desc-${r}`;
619
+ e.attr("aria-describedby", t), e.insert("desc", ":first-child").attr("id", t).text(n);
620
+ }
621
+ if (t) {
622
+ let n = `chart-title-${r}`;
623
+ e.attr("aria-labelledby", n), e.insert("title", ":first-child").attr("id", n).text(t);
624
+ }
625
+ }
626
+ }
627
+ r(Zt, "addSVGa11yTitleDescription");
628
+ var Qt = class e {
629
+ constructor(e, t, n, r, i) {
630
+ this.type = e, this.text = t, this.db = n, this.parser = r, this.renderer = i;
631
+ }
632
+ static {
633
+ r(this, "Diagram");
634
+ }
635
+ static async fromText(t, n = {}) {
636
+ let r = E(), i = _(t, r);
637
+ t = D(t) + "\n";
638
+ try {
639
+ T(i);
640
+ } catch {
641
+ let e = d(i);
642
+ if (!e) throw new w(`Diagram ${i} not found.`);
643
+ let { id: t, diagram: n } = await e();
644
+ l(t, n);
645
+ }
646
+ let { db: a, parser: o, renderer: s, init: c } = T(i);
647
+ return o.parser && (o.parser.yy = a), a.clear?.(), c?.(r), n.title && a.setDiagramTitle?.(n.title), await o.parse(t), new e(i, t, a, o, s);
648
+ }
649
+ async render(e, t) {
650
+ await this.renderer.draw(this.text, e, t, this);
651
+ }
652
+ getParser() {
653
+ return this.parser;
654
+ }
655
+ getType() {
656
+ return this.type;
657
+ }
658
+ }, $t = [], en = /* @__PURE__ */ r(() => {
659
+ $t.forEach((e) => {
660
+ e();
661
+ }), $t = [];
662
+ }, "attachFunctions"), tn = /* @__PURE__ */ r((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
663
+ function nn(e) {
664
+ let t = e.match(v);
665
+ if (!t) return {
666
+ text: e,
667
+ metadata: {}
668
+ };
669
+ let n = ce(t[1], { schema: le }) ?? {};
670
+ n = typeof n == "object" && !Array.isArray(n) ? n : {};
671
+ let r = {};
672
+ return n.displayMode && (r.displayMode = n.displayMode.toString()), n.title && (r.title = n.title.toString()), n.config && (r.config = n.config), {
673
+ text: e.slice(t[0].length),
674
+ metadata: r
675
+ };
676
+ }
677
+ r(nn, "extractFrontMatter");
678
+ var rn = /* @__PURE__ */ r((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e, t, n) => "<" + t + n.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), an = /* @__PURE__ */ r((e) => {
679
+ let { text: t, metadata: n } = nn(e), { displayMode: r, title: i, config: a = {} } = n;
680
+ return r && (a.gantt ||= {}, a.gantt.displayMode = r), {
681
+ title: i,
682
+ config: a,
683
+ text: t
684
+ };
685
+ }, "processFrontmatter"), on = /* @__PURE__ */ r((e) => {
686
+ let t = k.detectInit(e) ?? {}, n = k.detectDirective(e, "wrap");
687
+ return Array.isArray(n) ? t.wrap = n.some(({ type: e }) => e === "wrap") : n?.type === "wrap" && (t.wrap = !0), {
688
+ text: A(e),
689
+ directive: t
690
+ };
691
+ }, "processDirectives");
692
+ function sn(e) {
693
+ let t = an(rn(e)), n = on(t.text), r = re(t.config, n.directive);
694
+ return e = tn(n.text), {
695
+ code: e,
696
+ title: t.title,
697
+ config: r
698
+ };
699
+ }
700
+ r(sn, "preprocessDiagram");
701
+ function cn(e) {
702
+ let t = new TextEncoder().encode(e), n = Array.from(t, (e) => String.fromCodePoint(e)).join("");
703
+ return btoa(n);
704
+ }
705
+ r(cn, "toBase64");
706
+ var ln = 5e4, un = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", dn = "sandbox", fn = "loose", pn = "http://www.w3.org/2000/svg", mn = "http://www.w3.org/1999/xlink", hn = "http://www.w3.org/1999/xhtml", gn = "100%", _n = "100%", vn = "border:0;margin:0;", yn = "margin:0", bn = "allow-top-navigation-by-user-activation allow-popups", xn = "The \"iframe\" tag is not supported by your browser.", Sn = ["foreignobject"], Cn = ["dominant-baseline"];
707
+ function wn(e) {
708
+ let t = sn(e);
709
+ return a(), x(t.config ?? {}), t;
710
+ }
711
+ r(wn, "processAndSetConfigs");
712
+ async function Tn(e, t) {
713
+ X();
714
+ try {
715
+ let { code: t, config: n } = wn(e);
716
+ return {
717
+ diagramType: (await In(t)).type,
718
+ config: n
719
+ };
720
+ } catch (e) {
721
+ if (t?.suppressErrors) return !1;
722
+ throw e;
723
+ }
724
+ }
725
+ r(Tn, "parse");
726
+ var En = /* @__PURE__ */ r((e, t, n = []) => `
727
+ .${e} ${t} { ${n.join(" !important; ")} !important; }`, "cssImportantStyles"), Dn = /* @__PURE__ */ r((t, n = /* @__PURE__ */ new Map()) => {
728
+ let r = "";
729
+ if (t.themeCSS !== void 0 && (r += `
730
+ ${t.themeCSS}`), t.fontFamily !== void 0 && (r += `
731
+ :root { --mermaid-font-family: ${t.fontFamily}}`), t.altFontFamily !== void 0 && (r += `
732
+ :root { --mermaid-alt-font-family: ${t.altFontFamily}}`), n instanceof Map) {
733
+ let i = ee(t) ? ["> *", "span"] : [
734
+ "rect",
735
+ "polygon",
736
+ "ellipse",
737
+ "circle",
738
+ "path"
739
+ ];
740
+ n.forEach((t) => {
741
+ e(t.styles) || i.forEach((e) => {
742
+ r += En(t.id, e, t.styles);
743
+ }), e(t.textStyles) || (r += En(t.id, "tspan", (t?.textStyles || []).map((e) => e.replace("color", "fill"))));
744
+ });
745
+ }
746
+ return r;
747
+ }, "createCssStyles"), On = /* @__PURE__ */ r((e, t, n, r) => Pe(Ae(`${r}{${c(t, Dn(e, n), {
748
+ ...e.themeVariables,
749
+ theme: e.theme,
750
+ look: e.look
751
+ }, r)}}`), Fe), "createUserStyles"), kn = /* @__PURE__ */ r((e = "", t, n) => {
752
+ let r = e;
753
+ return !n && !t && (r = r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, "marker-end=\"url(#")), r = ne(r), r = r.replace(/<br>/g, "<br/>"), r;
754
+ }, "cleanUpSvgCode"), An = /* @__PURE__ */ r((e = "", t) => `<iframe style="width:${gn};height:${t?.viewBox?.baseVal?.height ? t.viewBox.baseVal.height + "px" : _n};${vn}" src="data:text/html;charset=UTF-8;base64,${cn(`<body style="${yn}">${e}</body>`)}" sandbox="${bn}">
755
+ ${xn}
756
+ </iframe>`, "putIntoIFrame"), jn = /* @__PURE__ */ r((e, t, n, r, i) => {
757
+ let a = e.append("div");
758
+ a.attr("id", n), r && a.attr("style", r);
759
+ let o = a.append("svg").attr("id", t).attr("width", "100%").attr("xmlns", pn);
760
+ return i && o.attr("xmlns:xlink", i), o.append("g"), e;
761
+ }, "appendDivSvgG");
762
+ function Mn(e, t) {
763
+ return e.append("iframe").attr("id", t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
764
+ }
765
+ r(Mn, "sandboxedIframe");
766
+ var Nn = /* @__PURE__ */ r((e, t, n, r) => {
767
+ e.getElementById(t)?.remove(), e.getElementById(n)?.remove(), e.getElementById(r)?.remove();
768
+ }, "removeExistingElements"), Pn = /* @__PURE__ */ r(async function(e, t, a) {
769
+ X();
770
+ let o = wn(t);
771
+ t = o.code;
772
+ let s = E();
773
+ n.debug(s), t.length > (s?.maxTextSize ?? ln) && (t = un);
774
+ let c = "#" + e, l = "i" + e, u = "#" + l, d = "d" + e, f = "#" + d, p = /* @__PURE__ */ r(() => {
775
+ let e = i(g ? u : f).node();
776
+ e && "remove" in e && e.remove();
777
+ }, "removeTempElements"), m = i("body"), g = s.securityLevel === dn, _ = s.securityLevel === fn, v = s.fontFamily;
778
+ a === void 0 ? (Nn(document, e, d, l), g ? (m = i(Mn(i("body"), l).nodes()[0].contentDocument.body), m.node().style.margin = 0) : m = i("body"), jn(m, e, d)) : (a && (a.innerHTML = ""), g ? (m = i(Mn(i(a), l).nodes()[0].contentDocument.body), m.node().style.margin = 0) : m = i(a), jn(m, e, d, `font-family: ${v}`, mn));
779
+ let b, x;
780
+ try {
781
+ b = await Qt.fromText(t, { title: o.title });
782
+ } catch (e) {
783
+ if (s.suppressErrorRendering) throw p(), e;
784
+ b = await Qt.fromText("error"), x = e;
785
+ }
786
+ let S = m.select(f).node(), C = b.type, w = S.firstChild, ee = w.firstChild, T = b.renderer.getClasses?.(t, b), te = On(s, C, T, c), D = document.createElement("style");
787
+ D.innerHTML = te, w.insertBefore(D, ee);
788
+ try {
789
+ await b.renderer.draw(t, e, "11.14.0", b);
790
+ } catch (n) {
791
+ throw s.suppressErrorRendering ? p() : _t.draw(t, e, "11.14.0"), n;
792
+ }
793
+ let O = m.select(`${f} svg`), k = b.db.getAccTitle?.(), ne = b.db.getAccDescription?.();
794
+ Ln(C, O, k, ne), m.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns", hn);
795
+ let A = m.select(f).node().innerHTML;
796
+ if (n.debug("config.arrowMarkerAbsolute", s.arrowMarkerAbsolute), A = kn(A, g, y(s.arrowMarkerAbsolute)), g) {
797
+ let e = m.select(f + " svg").node();
798
+ A = An(A, e);
799
+ } else _ || (A = h.sanitize(A, {
800
+ ADD_TAGS: Sn,
801
+ ADD_ATTR: Cn,
802
+ HTML_INTEGRATION_POINTS: { foreignobject: !0 }
803
+ }));
804
+ if (en(), x) throw x;
805
+ return p(), {
806
+ diagramType: C,
807
+ svg: A,
808
+ bindFunctions: b.db.bindFunctions
809
+ };
810
+ }, "render");
811
+ function Fn(e = {}) {
812
+ let n = C({}, e);
813
+ n?.fontFamily && !n.themeVariables?.fontFamily && (n.themeVariables ||= {}, n.themeVariables.fontFamily = n.fontFamily), te(n), n?.theme && n.theme in m ? n.themeVariables = m[n.theme].getThemeVariables(n.themeVariables) : n && (n.themeVariables = m.default.getThemeVariables(n.themeVariables)), t((typeof n == "object" ? o(n) : f()).logLevel), X();
814
+ }
815
+ r(Fn, "initialize");
816
+ var In = /* @__PURE__ */ r((e, t = {}) => {
817
+ let { code: n } = sn(e);
818
+ return Qt.fromText(n, t);
819
+ }, "getDiagramFromText");
820
+ function Ln(e, t, n, r) {
821
+ Xt(t, e), Zt(t, n, r, t.attr("id"));
822
+ }
823
+ r(Ln, "addA11yInfo");
824
+ var Z = Object.freeze({
825
+ render: Pn,
826
+ parse: Tn,
827
+ getDiagramFromText: In,
828
+ initialize: Fn,
829
+ getConfig: E,
830
+ setConfig: s,
831
+ getSiteConfig: f,
832
+ updateSiteConfig: p,
833
+ reset: /* @__PURE__ */ r(() => {
834
+ a();
835
+ }, "reset"),
836
+ globalReset: /* @__PURE__ */ r(() => {
837
+ a(b);
838
+ }, "globalReset"),
839
+ defaultConfig: b
840
+ });
841
+ t(E().logLevel), a(E());
842
+ var Rn = /* @__PURE__ */ r((e, t, r) => {
843
+ n.warn(e), O(e) ? (r && r(e.str, e.hash), t.push({
844
+ ...e,
845
+ message: e.str,
846
+ error: e
847
+ })) : (r && r(e), e instanceof Error && t.push({
848
+ str: e.message,
849
+ message: e.message,
850
+ hash: e.name,
851
+ error: e
852
+ }));
853
+ }, "handleError"), zn = /* @__PURE__ */ r(async function(e = { querySelector: ".mermaid" }) {
854
+ try {
855
+ await Bn(e);
856
+ } catch (t) {
857
+ if (O(t) && n.error(t.str), $.parseError && $.parseError(t), !e.suppressErrors) throw n.error("Use the suppressErrors option to suppress these errors"), t;
858
+ }
859
+ }, "run"), Bn = /* @__PURE__ */ r(async function({ postRenderCallback: e, querySelector: t, nodes: r } = { querySelector: ".mermaid" }) {
860
+ let i = Z.getConfig();
861
+ n.debug(`${e ? "" : "No "}Callback function found`);
862
+ let a;
863
+ if (r) a = r;
864
+ else if (t) a = document.querySelectorAll(t);
865
+ else throw Error("Nodes and querySelector are both undefined");
866
+ n.debug(`Found ${a.length} diagrams`), i?.startOnLoad !== void 0 && (n.debug("Start On Load: " + i?.startOnLoad), Z.updateSiteConfig({ startOnLoad: i?.startOnLoad }));
867
+ let o = new k.InitIDGenerator(i.deterministicIds, i.deterministicIDSeed), s, c = [];
868
+ for (let t of Array.from(a)) {
869
+ if (n.info("Rendering diagram: " + t.id), t.getAttribute("data-processed")) continue;
870
+ t.setAttribute("data-processed", "true");
871
+ let r = `mermaid-${o.next()}`;
872
+ s = t.innerHTML, s = oe(k.entityDecode(s)).trim().replace(/<br\s*\/?>/gi, "<br/>");
873
+ let i = k.detectInit(s);
874
+ i && n.debug("Detected early reinit: ", i);
875
+ try {
876
+ let { svg: n, bindFunctions: i } = await Yn(r, s, t);
877
+ t.innerHTML = n, e && await e(r), i && i(t);
878
+ } catch (e) {
879
+ Rn(e, c, $.parseError);
880
+ }
881
+ }
882
+ if (c.length > 0) throw c[0];
883
+ }, "runThrowsErrors"), Vn = /* @__PURE__ */ r(function(e) {
884
+ Z.initialize(e);
885
+ }, "initialize"), Hn = /* @__PURE__ */ r(async function(e, t, r) {
886
+ n.warn("mermaid.init is deprecated. Please use run instead."), e && Vn(e);
887
+ let i = {
888
+ postRenderCallback: r,
889
+ querySelector: ".mermaid"
890
+ };
891
+ typeof t == "string" ? i.querySelector = t : t && (t instanceof HTMLElement ? i.nodes = [t] : i.nodes = t), await zn(i);
892
+ }, "init"), Un = /* @__PURE__ */ r(async (e, { lazyLoad: t = !0 } = {}) => {
893
+ X(), u(...e), t === !1 && await Jt();
894
+ }, "registerExternalDiagrams"), Wn = /* @__PURE__ */ r(function() {
895
+ if ($.startOnLoad) {
896
+ let { startOnLoad: e } = Z.getConfig();
897
+ e && $.run().catch((e) => n.error("Mermaid failed to initialize", e));
898
+ }
899
+ }, "contentLoaded");
900
+ typeof document < "u" && window.addEventListener("load", Wn, !1);
901
+ var Gn = /* @__PURE__ */ r(function(e) {
902
+ $.parseError = e;
903
+ }, "setParseErrorHandler"), Q = [], Kn = !1, qn = /* @__PURE__ */ r(async () => {
904
+ if (!Kn) {
905
+ for (Kn = !0; Q.length > 0;) {
906
+ let e = Q.shift();
907
+ if (e) try {
908
+ await e();
909
+ } catch (e) {
910
+ n.error("Error executing queue", e);
911
+ }
912
+ }
913
+ Kn = !1;
914
+ }
915
+ }, "executeQueue"), Jn = /* @__PURE__ */ r(async (e, t) => new Promise((i, a) => {
916
+ let o = /* @__PURE__ */ r(() => new Promise((r, o) => {
917
+ Z.parse(e, t).then((e) => {
918
+ r(e), i(e);
919
+ }, (e) => {
920
+ n.error("Error parsing", e), $.parseError?.(e), o(e), a(e);
921
+ });
922
+ }), "performCall");
923
+ Q.push(o), qn().catch(a);
924
+ }), "parse"), Yn = /* @__PURE__ */ r((e, t, i) => new Promise((a, o) => {
925
+ let s = /* @__PURE__ */ r(() => new Promise((r, s) => {
926
+ Z.render(e, t, i).then((e) => {
927
+ r(e), a(e);
928
+ }, (e) => {
929
+ n.error("Error parsing", e), $.parseError?.(e), s(e), o(e);
930
+ });
931
+ }), "performCall");
932
+ Q.push(s), qn().catch(o);
933
+ }), "render"), $ = {
934
+ startOnLoad: !0,
935
+ mermaidAPI: Z,
936
+ parse: Jn,
937
+ render: Yn,
938
+ init: Hn,
939
+ run: zn,
940
+ registerExternalDiagrams: Un,
941
+ registerLayoutLoaders: se,
942
+ initialize: Vn,
943
+ parseError: void 0,
944
+ contentLoaded: Wn,
945
+ setParseErrorHandler: Gn,
946
+ detectType: _,
947
+ registerIconPacks: ae,
948
+ getRegisteredDiagramsMetadata: /* @__PURE__ */ r(() => Object.keys(S).map((e) => ({ id: e })), "getRegisteredDiagramsMetadata")
949
+ }, Xn = $;
950
+ //#endregion
951
+ export { Xn as default };