@blueking/ai-blueking 2.1.4-beta.7 → 2.1.4-beta.8

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 (105) hide show
  1. package/dist/standalone/_baseFor-DZ1vnh4H.js +393 -0
  2. package/dist/standalone/arc-WNacHY26.js +80 -0
  3. package/dist/standalone/architecture-YZFGNWBL-pIa_tKdA.js +3 -0
  4. package/dist/standalone/architectureDiagram-Q4EWVU46-Bfam8Fg3.js +4057 -0
  5. package/dist/standalone/array-CWNufkl9.js +6 -0
  6. package/dist/standalone/blockDiagram-DXYQGD6D-vAb9uyF5.js +3033 -0
  7. package/dist/standalone/c4Diagram-AHTNJAMY-BWACU0ER.js +2961 -0
  8. package/dist/standalone/channel-Br5ChI8U.js +5 -0
  9. package/dist/standalone/chunk-2KRD3SAO-Deh6AASy.js +23 -0
  10. package/dist/standalone/chunk-336JU56O-CFKWNcxR.js +49 -0
  11. package/dist/standalone/chunk-426QAEUC-D_wKNd3w.js +9 -0
  12. package/dist/standalone/chunk-4BX2VUAB-DKC_OBWg.js +8 -0
  13. package/dist/standalone/chunk-4TB4RGXK-HiVG7T1A.js +3254 -0
  14. package/dist/standalone/chunk-55IACEB6-DBivnNb2.js +8 -0
  15. package/dist/standalone/chunk-5FUZZQ4R-tiEjqlP4.js +3638 -0
  16. package/dist/standalone/chunk-5PVQY5BW-BCjrVrWB.js +1299 -0
  17. package/dist/standalone/chunk-67CJDMHE-BX09W6oy.js +23 -0
  18. package/dist/standalone/chunk-7N4EOEYR-G144j5Vc.js +35 -0
  19. package/dist/standalone/chunk-AA7GKIK3-Dx9YCoJ-.js +30 -0
  20. package/dist/standalone/chunk-BSJP7CBP-DE8WR0MI.js +82 -0
  21. package/dist/standalone/chunk-CIAEETIT-Bv86XVLB.js +23 -0
  22. package/dist/standalone/chunk-EDXVE4YY-DE9KzYM-.js +25 -0
  23. package/dist/standalone/chunk-ENJZ2VHE-DlxIC-A3.js +560 -0
  24. package/dist/standalone/chunk-FMBD7UC4-DCkBrKFO.js +5 -0
  25. package/dist/standalone/chunk-FOC6F5B3-C7hwrEZJ.js +23 -0
  26. package/dist/standalone/chunk-ICPOFSXX-B9JXAgJU.js +2772 -0
  27. package/dist/standalone/chunk-K5T4RW27-T6hJxJM0.js +16070 -0
  28. package/dist/standalone/chunk-KGLVRYIC-C0JPhrjn.js +23 -0
  29. package/dist/standalone/chunk-LIHQZDEY-CiavnvWh.js +64 -0
  30. package/dist/standalone/chunk-ORNJ4GCN-BtJ79bik.js +31 -0
  31. package/dist/standalone/chunk-OYMX7WX6-D2UHnmfD.js +2014 -0
  32. package/dist/standalone/chunk-QZHKN3VN-DhzThSvb.js +15 -0
  33. package/dist/standalone/chunk-U2HBQHQK-75Isf1R4.js +1896 -0
  34. package/dist/standalone/chunk-WQLz0Won.js +20 -0
  35. package/dist/standalone/chunk-X2U36JSP-DSzducJI.js +67 -0
  36. package/dist/standalone/chunk-XPW4576I-BFhmu0d4.js +1146 -0
  37. package/dist/standalone/chunk-YZCP3GAM-90EaSO-2.js +60 -0
  38. package/dist/standalone/chunk-ZZ45TVLE-DUagTZ9d.js +32 -0
  39. package/dist/standalone/classDiagram-6PBFFD2Q-Bwt78q4N.js +29 -0
  40. package/dist/standalone/classDiagram-v2-HSJHXN6E-B2qI9-xf.js +29 -0
  41. package/dist/standalone/clone-CBw-BHXl.js +8 -0
  42. package/dist/standalone/cose-bilkent-S5V4N54A-DFJ1nlog.js +2250 -0
  43. package/dist/standalone/cytoscape.esm-DdhenceR.js +18103 -0
  44. package/dist/standalone/dagre-KV5264BT-CXTBtAae.js +293 -0
  45. package/dist/standalone/dagre-kfvGmNUa.js +1606 -0
  46. package/dist/standalone/defaultLocale-bckJcYh1.js +201 -0
  47. package/dist/standalone/diagram-5BDNPKRD--gLHDKg-.js +101 -0
  48. package/dist/standalone/diagram-G4DWMVQ6-BwLE9Hsf.js +524 -0
  49. package/dist/standalone/diagram-MMDJMWI5-CoilYxa0.js +213 -0
  50. package/dist/standalone/diagram-TYMM5635-BupwRdr6.js +133 -0
  51. package/dist/standalone/dist-Dlj1jr8W.js +59 -0
  52. package/dist/standalone/erDiagram-SMLLAGMA-tIdn6ZCM.js +1700 -0
  53. package/dist/standalone/flatten-CXxC4cn2.js +40 -0
  54. package/dist/standalone/flowDiagram-DWJPFMVM-C86bLTAY.js +4146 -0
  55. package/dist/standalone/ganttDiagram-T4ZO3ILL-BT23lv_X.js +3077 -0
  56. package/dist/standalone/gitGraph-7Q5UKJZL-C-7nG8PF.js +3 -0
  57. package/dist/standalone/gitGraphDiagram-UUTBAWPF-DT1BGQsP.js +728 -0
  58. package/dist/standalone/graphlib-DrXiQBFg.js +373 -0
  59. package/dist/standalone/index.es.min.js +59705 -0
  60. package/dist/standalone/index.iife.min.js +3502 -0
  61. package/dist/standalone/index.umd.min.js +3502 -0
  62. package/dist/standalone/info-OMHHGYJF-BOS7mrON.js +3 -0
  63. package/dist/standalone/infoDiagram-42DDH7IO-Dx7LFK0B.js +19 -0
  64. package/dist/standalone/init-B75p2clj.js +15 -0
  65. package/dist/standalone/isEmpty-CVG4Bj-P.js +35 -0
  66. package/dist/standalone/ishikawaDiagram-UXIWVN3A-CX4cX3qb.js +718 -0
  67. package/dist/standalone/journeyDiagram-VCZTEJTY-BCvxmmFn.js +883 -0
  68. package/dist/standalone/kanban-definition-6JOO6SKY-SVINWaiM.js +973 -0
  69. package/dist/standalone/katex-CKrw0rbA.js +22016 -0
  70. package/dist/standalone/line-BF1XS-Ng.js +34 -0
  71. package/dist/standalone/linear-DGQDIL28.js +289 -0
  72. package/dist/standalone/mermaid-parser.core-Blz-Qy2h.js +69 -0
  73. package/dist/standalone/mermaid.core-CHTh1JGx.js +944 -0
  74. package/dist/standalone/mindmap-definition-QFDTVHPH-1Trzro3y.js +1009 -0
  75. package/dist/standalone/ordinal-F3U6aXtP.js +65 -0
  76. package/dist/standalone/packet-4T2RLAQJ-ai5Omp1h.js +3 -0
  77. package/dist/standalone/path-Dm3C8WEs.js +85 -0
  78. package/dist/standalone/pie-ZZUOXDRM-Df1rG6QC.js +3 -0
  79. package/dist/standalone/pieDiagram-DEJITSTG-D5Omb898.js +165 -0
  80. package/dist/standalone/purify.es-CZ_RvYUu.js +549 -0
  81. package/dist/standalone/quadrantDiagram-34T5L4WZ-Ct4g9T4o.js +1974 -0
  82. package/dist/standalone/radar-PYXPWWZC-B2t6k6Fg.js +3 -0
  83. package/dist/standalone/reduce-DbMsJ4nx.js +532 -0
  84. package/dist/standalone/requirementDiagram-MS252O5E-CP0BUgnz.js +2221 -0
  85. package/dist/standalone/rough.esm-UCEI3PYn.js +1352 -0
  86. package/dist/standalone/sankeyDiagram-XADWPNL6-D6C7yZ3k.js +920 -0
  87. package/dist/standalone/sequenceDiagram-FGHM5R23-KeodespT.js +4157 -0
  88. package/dist/standalone/src-CFVe5TPD.js +2146 -0
  89. package/dist/standalone/stateDiagram-FHFEXIEX-DAupoS9U.js +217 -0
  90. package/dist/standalone/stateDiagram-v2-QKLJ7IA2-C1Lw_i_z.js +27 -0
  91. package/dist/standalone/style.css +1 -0
  92. package/dist/standalone/timeline-definition-GMOUNBTQ-Cwhj84lX.js +1068 -0
  93. package/dist/standalone/treeView-SZITEDCU-BnoMeJSb.js +3 -0
  94. package/dist/standalone/treemap-W4RFUUIX-B38XFBZF.js +3 -0
  95. package/dist/standalone/vennDiagram-DHZGUBPP-_1PHloeO.js +1858 -0
  96. package/dist/standalone/wardley-RL74JXVD-bB8BBy_Y.js +3 -0
  97. package/dist/standalone/wardleyDiagram-NUSXRM2D-DRLCx-qh.js +578 -0
  98. package/dist/standalone/xychartDiagram-5P7HB3ND-Bz2-4Ufi.js +2044 -0
  99. package/dist/standalone-mount-core.d.ts +34 -0
  100. package/dist/standalone-mount-core.d.ts.map +1 -0
  101. package/dist/standalone-mount.d.ts +14 -0
  102. package/dist/standalone-mount.d.ts.map +1 -0
  103. package/dist/standalone.d.ts +8 -0
  104. package/dist/standalone.d.ts.map +1 -0
  105. package/package.json +12 -3
@@ -0,0 +1,524 @@
1
+ import { g as e, h as t, p as n } from "./src-CFVe5TPD.js";
2
+ import { B as r, C as i, E as a, V as o, W as s, _ as c, a as l, c as u, d, v as f, y as p } from "./chunk-ICPOFSXX-B9JXAgJU.js";
3
+ import { t as m } from "./ordinal-F3U6aXtP.js";
4
+ import { t as h } from "./defaultLocale-bckJcYh1.js";
5
+ import { r as g } from "./chunk-5PVQY5BW-BCjrVrWB.js";
6
+ import { t as _ } from "./chunk-426QAEUC-D_wKNd3w.js";
7
+ import { t as v } from "./chunk-4BX2VUAB-DKC_OBWg.js";
8
+ import { t as y } from "./mermaid-parser.core-Blz-Qy2h.js";
9
+ import { t as b } from "./chunk-EDXVE4YY-DE9KzYM-.js";
10
+ import { i as x, n as S } from "./chunk-X2U36JSP-DSzducJI.js";
11
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/count.js
12
+ function C(e) {
13
+ var t = 0, n = e.children, r = n && n.length;
14
+ if (!r) t = 1;
15
+ else for (; --r >= 0;) t += n[r].value;
16
+ e.value = t;
17
+ }
18
+ function w() {
19
+ return this.eachAfter(C);
20
+ }
21
+ //#endregion
22
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/each.js
23
+ function T(e, t) {
24
+ let n = -1;
25
+ for (let r of this) e.call(t, r, ++n, this);
26
+ return this;
27
+ }
28
+ //#endregion
29
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js
30
+ function E(e, t) {
31
+ for (var n = this, r = [n], i, a, o = -1; n = r.pop();) if (e.call(t, n, ++o, this), i = n.children) for (a = i.length - 1; a >= 0; --a) r.push(i[a]);
32
+ return this;
33
+ }
34
+ //#endregion
35
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js
36
+ function D(e, t) {
37
+ for (var n = this, r = [n], i = [], a, o, s, c = -1; n = r.pop();) if (i.push(n), a = n.children) for (o = 0, s = a.length; o < s; ++o) r.push(a[o]);
38
+ for (; n = i.pop();) e.call(t, n, ++c, this);
39
+ return this;
40
+ }
41
+ //#endregion
42
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/find.js
43
+ function O(e, t) {
44
+ let n = -1;
45
+ for (let r of this) if (e.call(t, r, ++n, this)) return r;
46
+ }
47
+ //#endregion
48
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/sum.js
49
+ function k(e) {
50
+ return this.eachAfter(function(t) {
51
+ for (var n = +e(t.data) || 0, r = t.children, i = r && r.length; --i >= 0;) n += r[i].value;
52
+ t.value = n;
53
+ });
54
+ }
55
+ //#endregion
56
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/sort.js
57
+ function A(e) {
58
+ return this.eachBefore(function(t) {
59
+ t.children && t.children.sort(e);
60
+ });
61
+ }
62
+ //#endregion
63
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/path.js
64
+ function j(e) {
65
+ for (var t = this, n = M(t, e), r = [t]; t !== n;) t = t.parent, r.push(t);
66
+ for (var i = r.length; e !== n;) r.splice(i, 0, e), e = e.parent;
67
+ return r;
68
+ }
69
+ function M(e, t) {
70
+ if (e === t) return e;
71
+ var n = e.ancestors(), r = t.ancestors(), i = null;
72
+ for (e = n.pop(), t = r.pop(); e === t;) i = e, e = n.pop(), t = r.pop();
73
+ return i;
74
+ }
75
+ //#endregion
76
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/ancestors.js
77
+ function N() {
78
+ for (var e = this, t = [e]; e = e.parent;) t.push(e);
79
+ return t;
80
+ }
81
+ //#endregion
82
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/descendants.js
83
+ function P() {
84
+ return Array.from(this);
85
+ }
86
+ //#endregion
87
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/leaves.js
88
+ function F() {
89
+ var e = [];
90
+ return this.eachBefore(function(t) {
91
+ t.children || e.push(t);
92
+ }), e;
93
+ }
94
+ //#endregion
95
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/links.js
96
+ function I() {
97
+ var e = this, t = [];
98
+ return e.each(function(n) {
99
+ n !== e && t.push({
100
+ source: n.parent,
101
+ target: n
102
+ });
103
+ }), t;
104
+ }
105
+ //#endregion
106
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/iterator.js
107
+ function* L() {
108
+ var e = this, t, n = [e], r, i, a;
109
+ do
110
+ for (t = n.reverse(), n = []; e = t.pop();) if (yield e, r = e.children) for (i = 0, a = r.length; i < a; ++i) n.push(r[i]);
111
+ while (n.length);
112
+ }
113
+ //#endregion
114
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/index.js
115
+ function R(e, t) {
116
+ e instanceof Map ? (e = [void 0, e], t === void 0 && (t = V)) : t === void 0 && (t = B);
117
+ for (var n = new W(e), r, i = [n], a, o, s, c; r = i.pop();) if ((o = t(r.data)) && (c = (o = Array.from(o)).length)) for (r.children = o, s = c - 1; s >= 0; --s) i.push(a = o[s] = new W(o[s])), a.parent = r, a.depth = r.depth + 1;
118
+ return n.eachBefore(U);
119
+ }
120
+ function z() {
121
+ return R(this).eachBefore(H);
122
+ }
123
+ function B(e) {
124
+ return e.children;
125
+ }
126
+ function V(e) {
127
+ return Array.isArray(e) ? e[1] : null;
128
+ }
129
+ function H(e) {
130
+ e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
131
+ }
132
+ function U(e) {
133
+ var t = 0;
134
+ do
135
+ e.height = t;
136
+ while ((e = e.parent) && e.height < ++t);
137
+ }
138
+ function W(e) {
139
+ this.data = e, this.depth = this.height = 0, this.parent = null;
140
+ }
141
+ W.prototype = R.prototype = {
142
+ constructor: W,
143
+ count: w,
144
+ each: T,
145
+ eachAfter: D,
146
+ eachBefore: E,
147
+ find: O,
148
+ sum: k,
149
+ sort: A,
150
+ path: j,
151
+ ancestors: N,
152
+ descendants: P,
153
+ leaves: F,
154
+ links: I,
155
+ copy: z,
156
+ [Symbol.iterator]: L
157
+ };
158
+ //#endregion
159
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/accessors.js
160
+ function G(e) {
161
+ if (typeof e != "function") throw Error();
162
+ return e;
163
+ }
164
+ //#endregion
165
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/constant.js
166
+ function K() {
167
+ return 0;
168
+ }
169
+ function q(e) {
170
+ return function() {
171
+ return e;
172
+ };
173
+ }
174
+ //#endregion
175
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/round.js
176
+ function J(e) {
177
+ e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
178
+ }
179
+ //#endregion
180
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/dice.js
181
+ function ee(e, t, n, r, i) {
182
+ for (var a = e.children, o, s = -1, c = a.length, l = e.value && (r - t) / e.value; ++s < c;) o = a[s], o.y0 = n, o.y1 = i, o.x0 = t, o.x1 = t += o.value * l;
183
+ }
184
+ //#endregion
185
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/slice.js
186
+ function te(e, t, n, r, i) {
187
+ for (var a = e.children, o, s = -1, c = a.length, l = e.value && (i - n) / e.value; ++s < c;) o = a[s], o.x0 = t, o.x1 = r, o.y0 = n, o.y1 = n += o.value * l;
188
+ }
189
+ //#endregion
190
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/squarify.js
191
+ var ne = (1 + Math.sqrt(5)) / 2;
192
+ function re(e, t, n, r, i, a) {
193
+ for (var o = [], s = t.children, c, l, u = 0, d = 0, f = s.length, p, m, h = t.value, g, _, v, y, b, x, S; u < f;) {
194
+ p = i - n, m = a - r;
195
+ do
196
+ g = s[d++].value;
197
+ while (!g && d < f);
198
+ for (_ = v = g, x = Math.max(m / p, p / m) / (h * e), S = g * g * x, b = Math.max(v / S, S / _); d < f; ++d) {
199
+ if (g += l = s[d].value, l < _ && (_ = l), l > v && (v = l), S = g * g * x, y = Math.max(v / S, S / _), y > b) {
200
+ g -= l;
201
+ break;
202
+ }
203
+ b = y;
204
+ }
205
+ o.push(c = {
206
+ value: g,
207
+ dice: p < m,
208
+ children: s.slice(u, d)
209
+ }), c.dice ? ee(c, n, r, i, h ? r += m * g / h : a) : te(c, n, r, h ? n += p * g / h : i, a), h -= g, u = d;
210
+ }
211
+ return o;
212
+ }
213
+ var ie = (function e(t) {
214
+ function n(e, n, r, i, a) {
215
+ re(t, e, n, r, i, a);
216
+ }
217
+ return n.ratio = function(t) {
218
+ return e((t = +t) > 1 ? t : 1);
219
+ }, n;
220
+ })(ne);
221
+ //#endregion
222
+ //#region ../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/index.js
223
+ function ae() {
224
+ var e = ie, t = !1, n = 1, r = 1, i = [0], a = K, o = K, s = K, c = K, l = K;
225
+ function u(e) {
226
+ return e.x0 = e.y0 = 0, e.x1 = n, e.y1 = r, e.eachBefore(d), i = [0], t && e.eachBefore(J), e;
227
+ }
228
+ function d(t) {
229
+ var n = i[t.depth], r = t.x0 + n, u = t.y0 + n, d = t.x1 - n, f = t.y1 - n;
230
+ d < r && (r = d = (r + d) / 2), f < u && (u = f = (u + f) / 2), t.x0 = r, t.y0 = u, t.x1 = d, t.y1 = f, t.children && (n = i[t.depth + 1] = a(t) / 2, r += l(t) - n, u += o(t) - n, d -= s(t) - n, f -= c(t) - n, d < r && (r = d = (r + d) / 2), f < u && (u = f = (u + f) / 2), e(t, r, u, d, f));
231
+ }
232
+ return u.round = function(e) {
233
+ return arguments.length ? (t = !!e, u) : t;
234
+ }, u.size = function(e) {
235
+ return arguments.length ? (n = +e[0], r = +e[1], u) : [n, r];
236
+ }, u.tile = function(t) {
237
+ return arguments.length ? (e = G(t), u) : e;
238
+ }, u.padding = function(e) {
239
+ return arguments.length ? u.paddingInner(e).paddingOuter(e) : u.paddingInner();
240
+ }, u.paddingInner = function(e) {
241
+ return arguments.length ? (a = typeof e == "function" ? e : q(+e), u) : a;
242
+ }, u.paddingOuter = function(e) {
243
+ return arguments.length ? u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : u.paddingTop();
244
+ }, u.paddingTop = function(e) {
245
+ return arguments.length ? (o = typeof e == "function" ? e : q(+e), u) : o;
246
+ }, u.paddingRight = function(e) {
247
+ return arguments.length ? (s = typeof e == "function" ? e : q(+e), u) : s;
248
+ }, u.paddingBottom = function(e) {
249
+ return arguments.length ? (c = typeof e == "function" ? e : q(+e), u) : c;
250
+ }, u.paddingLeft = function(e) {
251
+ return arguments.length ? (l = typeof e == "function" ? e : q(+e), u) : l;
252
+ }, u;
253
+ }
254
+ //#endregion
255
+ //#region ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-G4DWMVQ6.mjs
256
+ var Y = class {
257
+ constructor() {
258
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = o, this.getAccTitle = f, this.setDiagramTitle = s, this.getDiagramTitle = i, this.getAccDescription = c, this.setAccDescription = r;
259
+ }
260
+ static {
261
+ t(this, "TreeMapDB");
262
+ }
263
+ getNodes() {
264
+ return this.nodes;
265
+ }
266
+ getConfig() {
267
+ let e = d, t = p();
268
+ return g({
269
+ ...e.treemap,
270
+ ...t.treemap ?? {}
271
+ });
272
+ }
273
+ addNode(e, t) {
274
+ this.nodes.push(e), this.levels.set(e, t), t === 0 && (this.outerNodes.push(e), this.root ??= e);
275
+ }
276
+ getRoot() {
277
+ return {
278
+ name: "",
279
+ children: this.outerNodes
280
+ };
281
+ }
282
+ addClass(e, t) {
283
+ let n = this.classes.get(e) ?? {
284
+ id: e,
285
+ styles: [],
286
+ textStyles: []
287
+ }, r = t.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
288
+ r && r.forEach((e) => {
289
+ S(e) && (n?.textStyles ? n.textStyles.push(e) : n.textStyles = [e]), n?.styles ? n.styles.push(e) : n.styles = [e];
290
+ }), this.classes.set(e, n);
291
+ }
292
+ getClasses() {
293
+ return this.classes;
294
+ }
295
+ getStylesForClass(e) {
296
+ return this.classes.get(e)?.styles ?? [];
297
+ }
298
+ clear() {
299
+ l(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
300
+ }
301
+ };
302
+ function X(e) {
303
+ if (!e.length) return [];
304
+ let t = [], n = [];
305
+ return e.forEach((e) => {
306
+ let r = {
307
+ name: e.name,
308
+ children: e.type === "Leaf" ? void 0 : []
309
+ };
310
+ for (r.classSelector = e?.classSelector, e?.cssCompiledStyles && (r.cssCompiledStyles = e.cssCompiledStyles), e.type === "Leaf" && e.value !== void 0 && (r.value = e.value); n.length > 0 && n[n.length - 1].level >= e.level;) n.pop();
311
+ if (n.length === 0) t.push(r);
312
+ else {
313
+ let e = n[n.length - 1].node;
314
+ e.children ? e.children.push(r) : e.children = [r];
315
+ }
316
+ e.type !== "Leaf" && n.push({
317
+ node: r,
318
+ level: e.level
319
+ });
320
+ }), t;
321
+ }
322
+ t(X, "buildHierarchy");
323
+ var oe = /* @__PURE__ */ t((e, n) => {
324
+ v(e, n);
325
+ let r = [];
326
+ for (let t of e.TreemapRows ?? []) t.$type === "ClassDefStatement" && n.addClass(t.className ?? "", t.styleText ?? "");
327
+ for (let t of e.TreemapRows ?? []) {
328
+ let e = t.item;
329
+ if (!e) continue;
330
+ let i = t.indent ? parseInt(t.indent) : 0, a = se(e), o = e.classSelector ? n.getStylesForClass(e.classSelector) : [], s = o.length > 0 ? o : void 0, c = {
331
+ level: i,
332
+ name: a,
333
+ type: e.$type,
334
+ value: e.value,
335
+ classSelector: e.classSelector,
336
+ cssCompiledStyles: s
337
+ };
338
+ r.push(c);
339
+ }
340
+ let i = X(r), a = /* @__PURE__ */ t((e, t) => {
341
+ for (let r of e) n.addNode(r, t), r.children && r.children.length > 0 && a(r.children, t + 1);
342
+ }, "addNodesRecursively");
343
+ a(i, 0);
344
+ }, "populate"), se = /* @__PURE__ */ t((e) => e.name ? String(e.name) : "", "getItemName"), Z = {
345
+ parser: { yy: void 0 },
346
+ parse: /* @__PURE__ */ t(async (t) => {
347
+ try {
348
+ let n = await y("treemap", t);
349
+ e.debug("Treemap AST:", n);
350
+ let r = Z.parser?.yy;
351
+ if (!(r instanceof Y)) throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
352
+ oe(n, r);
353
+ } catch (t) {
354
+ throw e.error("Error parsing treemap:", t), t;
355
+ }
356
+ }, "parse")
357
+ }, ce = 10, Q = 10, $ = 25, le = {
358
+ draw: /* @__PURE__ */ t((r, i, a, o) => {
359
+ let s = o.db, c = s.getConfig(), l = c.padding ?? ce, d = s.getDiagramTitle(), f = s.getRoot(), { themeVariables: g } = p();
360
+ if (!f) return;
361
+ let v = d ? 30 : 0, y = _(i), S = c.nodeWidth ? c.nodeWidth * Q : 960, C = c.nodeHeight ? c.nodeHeight * Q : 500, w = S, T = C + v;
362
+ y.attr("viewBox", `0 0 ${w} ${T}`), u(y, T, w, c.useMaxWidth);
363
+ let E;
364
+ try {
365
+ let e = c.valueFormat || ",";
366
+ if (e === "$0,0") E = /* @__PURE__ */ t((e) => "$" + h(",")(e), "valueFormat");
367
+ else if (e.startsWith("$") && e.includes(",")) {
368
+ let n = /\.\d+/.exec(e), r = n ? n[0] : "";
369
+ E = /* @__PURE__ */ t((e) => "$" + h("," + r)(e), "valueFormat");
370
+ } else if (e.startsWith("$")) {
371
+ let n = e.substring(1);
372
+ E = /* @__PURE__ */ t((e) => "$" + h(n || "")(e), "valueFormat");
373
+ } else E = h(e);
374
+ } catch (t) {
375
+ e.error("Error creating format function:", t), E = h(",");
376
+ }
377
+ let D = m().range([
378
+ "transparent",
379
+ g.cScale0,
380
+ g.cScale1,
381
+ g.cScale2,
382
+ g.cScale3,
383
+ g.cScale4,
384
+ g.cScale5,
385
+ g.cScale6,
386
+ g.cScale7,
387
+ g.cScale8,
388
+ g.cScale9,
389
+ g.cScale10,
390
+ g.cScale11
391
+ ]), O = m().range([
392
+ "transparent",
393
+ g.cScalePeer0,
394
+ g.cScalePeer1,
395
+ g.cScalePeer2,
396
+ g.cScalePeer3,
397
+ g.cScalePeer4,
398
+ g.cScalePeer5,
399
+ g.cScalePeer6,
400
+ g.cScalePeer7,
401
+ g.cScalePeer8,
402
+ g.cScalePeer9,
403
+ g.cScalePeer10,
404
+ g.cScalePeer11
405
+ ]), k = m().range([
406
+ g.cScaleLabel0,
407
+ g.cScaleLabel1,
408
+ g.cScaleLabel2,
409
+ g.cScaleLabel3,
410
+ g.cScaleLabel4,
411
+ g.cScaleLabel5,
412
+ g.cScaleLabel6,
413
+ g.cScaleLabel7,
414
+ g.cScaleLabel8,
415
+ g.cScaleLabel9,
416
+ g.cScaleLabel10,
417
+ g.cScaleLabel11
418
+ ]);
419
+ d && y.append("text").attr("x", w / 2).attr("y", v / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
420
+ let A = y.append("g").attr("transform", `translate(0, ${v})`).attr("class", "treemapContainer"), j = R(f).sum((e) => e.value ?? 0).sort((e, t) => (t.value ?? 0) - (e.value ?? 0)), M = ae().size([S, C]).paddingTop((e) => e.children && e.children.length > 0 ? $ + Q : 0).paddingInner(l).paddingLeft((e) => e.children && e.children.length > 0 ? Q : 0).paddingRight((e) => e.children && e.children.length > 0 ? Q : 0).paddingBottom((e) => e.children && e.children.length > 0 ? Q : 0).round(!0)(j), N = M.descendants().filter((e) => e.children && e.children.length > 0), P = A.selectAll(".treemapSection").data(N).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
421
+ P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", $).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", .6).attr("stroke-width", .6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), P.append("clipPath").attr("id", (e, t) => `clip-section-${i}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", $), P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, t) => `treemapSection section${t}`).attr("fill", (e) => D(e.data.name)).attr("fill-opacity", .6).attr("stroke", (e) => O(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", .4).attr("style", (e) => {
422
+ if (e.depth === 0) return "display: none;";
423
+ let t = x({ cssCompiledStyles: e.data.cssCompiledStyles });
424
+ return t.nodeStyles + ";" + t.borderStyles.join(";");
425
+ }), P.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", $ / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => e.depth === 0 ? "display: none;" : "dominant-baseline: middle; font-size: 12px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + x({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).each(function(e) {
426
+ if (e.depth === 0) return;
427
+ let t = n(this), r = e.data.name;
428
+ t.text(r);
429
+ let i = e.x1 - e.x0, a;
430
+ a = c.showValues !== !1 && e.value ? i - 10 - 30 - 10 - 6 : i - 6 - 6;
431
+ let o = Math.max(15, a), s = t.node();
432
+ if (s.getComputedTextLength() > o) {
433
+ let e = r;
434
+ for (; e.length > 0;) {
435
+ if (e = r.substring(0, e.length - 1), e.length === 0) {
436
+ t.text("..."), s.getComputedTextLength() > o && t.text("");
437
+ break;
438
+ }
439
+ if (t.text(e + "..."), s.getComputedTextLength() <= o) break;
440
+ }
441
+ }
442
+ }), c.showValues !== !1 && P.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", $ / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? E(e.value) : "").attr("font-style", "italic").attr("style", (e) => e.depth === 0 ? "display: none;" : "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + x({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:"));
443
+ let F = M.leaves(), I = A.selectAll(".treemapLeafGroup").data(F).enter().append("g").attr("class", (e, t) => `treemapNode treemapLeafGroup leaf${t}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
444
+ I.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? D(e.parent.data.name) : D(e.data.name)).attr("style", (e) => x({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", .3).attr("stroke", (e) => e.parent ? D(e.parent.data.name) : D(e.data.name)).attr("stroke-width", 3), I.append("clipPath").attr("id", (e, t) => `clip-${i}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), I.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + k(e.data.name) + ";" + x({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, t) => `url(#clip-${i}-${t})`).text((e) => e.data.name).each(function(e) {
445
+ let t = n(this), r = e.x1 - e.x0, i = e.y1 - e.y0, a = t.node(), o = r - 8, s = i - 8;
446
+ if (o < 10 || s < 10) {
447
+ t.style("display", "none");
448
+ return;
449
+ }
450
+ let c = parseInt(t.style("font-size"), 10), l = .6;
451
+ for (; a.getComputedTextLength() > o && c > 8;) c--, t.style("font-size", `${c}px`);
452
+ let u = Math.max(6, Math.min(28, Math.round(c * l))), d = c + 2 + u;
453
+ for (; d > s && c > 8 && (c--, u = Math.max(6, Math.min(28, Math.round(c * l))), !(u < 6 && c === 8));) t.style("font-size", `${c}px`), d = c + 2 + u;
454
+ t.style("font-size", `${c}px`), (a.getComputedTextLength() > o || c < 8 || s < c) && t.style("display", "none");
455
+ }), c.showValues !== !1 && I.append("text").attr("class", "treemapValue").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", function(e) {
456
+ return (e.y1 - e.y0) / 2;
457
+ }).attr("style", (e) => "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + k(e.data.name) + ";" + x({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, t) => `url(#clip-${i}-${t})`).text((e) => e.value ? E(e.value) : "").each(function(e) {
458
+ let t = n(this), r = this.parentNode;
459
+ if (!r) {
460
+ t.style("display", "none");
461
+ return;
462
+ }
463
+ let i = n(r).select(".treemapLabel");
464
+ if (i.empty() || i.style("display") === "none") {
465
+ t.style("display", "none");
466
+ return;
467
+ }
468
+ let a = parseFloat(i.style("font-size")), o = Math.max(6, Math.min(28, Math.round(a * .6)));
469
+ t.style("font-size", `${o}px`);
470
+ let s = (e.y1 - e.y0) / 2 + a / 2 + 2;
471
+ t.attr("y", s);
472
+ let c = e.x1 - e.x0, l = e.y1 - e.y0 - 4, u = c - 8;
473
+ t.node().getComputedTextLength() > u || s + o > l || o < 6 ? t.style("display", "none") : t.style("display", null);
474
+ }), b(y, c.diagramPadding ?? 8, "flowchart", c?.useMaxWidth || !1);
475
+ }, "draw"),
476
+ getClasses: /* @__PURE__ */ t(function(e, t) {
477
+ return t.db.getClasses();
478
+ }, "getClasses")
479
+ }, ue = {
480
+ sectionStrokeColor: "black",
481
+ sectionStrokeWidth: "1",
482
+ sectionFillColor: "#efefef",
483
+ leafStrokeColor: "black",
484
+ leafStrokeWidth: "1",
485
+ leafFillColor: "#efefef",
486
+ labelFontSize: "12px",
487
+ valueFontSize: "10px",
488
+ titleFontSize: "14px"
489
+ }, de = {
490
+ parser: Z,
491
+ get db() {
492
+ return new Y();
493
+ },
494
+ renderer: le,
495
+ styles: /* @__PURE__ */ t(({ treemap: e } = {}) => {
496
+ let t = g(a(), p().themeVariables), n = g(ue, e), r = n.titleColor ?? t.titleColor, i = n.labelColor ?? t.textColor, o = n.valueColor ?? t.textColor;
497
+ return `
498
+ .treemapNode.section {
499
+ stroke: ${n.sectionStrokeColor};
500
+ stroke-width: ${n.sectionStrokeWidth};
501
+ fill: ${n.sectionFillColor};
502
+ }
503
+ .treemapNode.leaf {
504
+ stroke: ${n.leafStrokeColor};
505
+ stroke-width: ${n.leafStrokeWidth};
506
+ fill: ${n.leafFillColor};
507
+ }
508
+ .treemapLabel {
509
+ fill: ${i};
510
+ font-size: ${n.labelFontSize};
511
+ }
512
+ .treemapValue {
513
+ fill: ${o};
514
+ font-size: ${n.valueFontSize};
515
+ }
516
+ .treemapTitle {
517
+ fill: ${r};
518
+ font-size: ${n.titleFontSize};
519
+ }
520
+ `;
521
+ }, "getStyles")
522
+ };
523
+ //#endregion
524
+ export { de as diagram };