@schmitech/chatbot-widget 0.6.3 → 0.7.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.
- package/dist/ChatWidget.d.ts +11 -0
- package/dist/{_baseUniq-BPMphbq5-xiRWQlDn.js → _baseUniq-BRKsqoH--HqBVqMpT.js} +126 -126
- package/dist/arc-pab_su9s-DkImmxyv.js +84 -0
- package/dist/architecture-U656AL7Q-CRlU-eNB-vFayp_Gk.js +7 -0
- package/dist/{architectureDiagram-VXUJARFQ-BiqZtsDe-rYpYn0Hz.js → architectureDiagram-VXUJARFQ-DqQ8r_6g-DTzMoAeY.js} +5 -5
- package/dist/{blockDiagram-VD42YOAC-zcRIdFTD-B54KiQJD.js → blockDiagram-VD42YOAC-B-dKfcH3-DKPGmrNb.js} +50 -50
- package/dist/{c4Diagram-YG6GDRKO-DYXNcDX4-B9fXQAMg.js → c4Diagram-YG6GDRKO-DMUPaBEl-CXjiCiKq.js} +63 -63
- package/dist/channel-HKsfPa5q-B30_3C0d.js +6 -0
- package/dist/chatbot-widget.bundle.js +11596 -0
- package/dist/chatbot-widget.es.js +1 -1
- package/dist/chatbot-widget.umd.js +4342 -3550
- package/dist/{chunk-4BX2VUAB-DAh9ktmY-CF6YTNXg.js → chunk-4BX2VUAB-CX67kh_B-JdLaNmBY.js} +1 -1
- package/dist/chunk-55IACEB6-BocSyyvr--btUJ1po.js +9 -0
- package/dist/{chunk-B4BG7PRW-BTUSpeKy-CXaYsx4a.js → chunk-B4BG7PRW-CO8QAyfE-p5mLBzD4.js} +30 -30
- package/dist/{chunk-DI55MBZ5-DKt4WII7-CjsnNRFb.js → chunk-DI55MBZ5-Dw1L6Eos-zQC2oI_e.js} +149 -149
- package/dist/{chunk-FMBD7UC4-DdcCR8w3-BbYkKjQZ.js → chunk-FMBD7UC4-dPK7Boav-C-fxYlU9.js} +1 -1
- package/dist/{chunk-QN33PNHL-v6AkzOl1-DrzKpDUJ.js → chunk-QN33PNHL-vP2PqfVG-ByquTp49.js} +5 -5
- package/dist/{chunk-QZHKN3VN-DVJOrqBZ-BQORk0pj.js → chunk-QZHKN3VN-Bcidzu63-ukwvi4Mt.js} +1 -1
- package/dist/{chunk-TZMSLE5B-G2jJHqli-B_BRSOS0.js → chunk-TZMSLE5B-BtljMjlg-DP4v1MME.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CxmgTanh-ByLirDpd.js → classDiagram-2ON5EDUG-C7cYN9hv-CtX4c_16.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CxmgTanh-ByLirDpd.js → classDiagram-v2-WZHVMYZB-C7cYN9hv-CtX4c_16.js} +2 -2
- package/dist/{clone-CsNB4mMi-B2bGL_Hr.js → clone-DoPb9X13-BkFPVisk.js} +1 -1
- package/dist/config/index.d.ts +81 -0
- package/dist/{cose-bilkent-S5V4N54A-BRr2Y6dg-C4O3AMLV.js → cose-bilkent-S5V4N54A-BGzO4EsH-BNoSF82N.js} +1 -1
- package/dist/{dagre-6UL2VRFP-DX8gNHmJ-BSzSR8Xh.js → dagre-6UL2VRFP-TzNvXCds-Dnr2OGZv.js} +45 -45
- package/dist/{diagram-PSM6KHXK-DNX818To-D60Hp_rL.js → diagram-PSM6KHXK-BqY4RpUg-BAHxSfLA.js} +119 -119
- package/dist/{diagram-QEK2KX5R-BDO6hKtm-BHvRInjZ.js → diagram-QEK2KX5R-CTjgBsne-D-9APhrR.js} +74 -74
- package/dist/{diagram-S2PKOQOG-IEqaDwzi-CZZkmLuc.js → diagram-S2PKOQOG-BqrhTIpA-DvsAaFEx.js} +21 -21
- package/dist/{erDiagram-Q2GNP2WA-DbLpN8Jp-902zC-_U.js → erDiagram-Q2GNP2WA-B2hsi_Tl-CQQl2KTS.js} +24 -24
- package/dist/{flowDiagram-NV44I4VS-pJlHae8Y-hM8e9jah.js → flowDiagram-NV44I4VS-C03vtt_F-Ds5DxRz1.js} +37 -37
- package/dist/{ganttDiagram-JELNMOA3-J0Tkq5TR-C8n0Mtt1.js → ganttDiagram-JELNMOA3-B3hAg964-D9cHQTuZ.js} +110 -110
- package/dist/gitGraph-F6HP7TQM-B-XXB6PA-CXOJho2m.js +7 -0
- package/dist/{gitGraphDiagram-NY62KEGX-DgYonpsZ-CAVA4-Vo.js → gitGraphDiagram-NY62KEGX-ByhMH0yZ-DTWIR_Gp.js} +238 -238
- package/dist/{graph-BpcfrHXY-Dllj_YdG.js → graph-BmNkcFEM-CTJN7Ty_.js} +67 -67
- package/dist/hooks/useAnimationManagement.d.ts +16 -0
- package/dist/hooks/useInputManagement.d.ts +21 -0
- package/dist/hooks/useScrollManagement.d.ts +17 -0
- package/dist/index-BXexqYFc-Bn0M0HQB.js +13693 -0
- package/dist/{index-DlxA4QQ9.js → index-DU3Jqd59.js} +80142 -50172
- package/dist/index.d.ts +19 -0
- package/dist/info-NVLQJR56-BJV_yXNb-CH_hMh0K.js +7 -0
- package/dist/infoDiagram-WHAUD3N6-is6Ho4-T-E3qEjHYs.js +25 -0
- package/dist/{journeyDiagram-XKPGCS4Q-CfjB2Qdf-nD3bX36U.js → journeyDiagram-XKPGCS4Q-CRTOL26C-VvuJ7JPc.js} +71 -71
- package/dist/{kanban-definition-3W4ZIXB7-CrW8yVmd-C_Okjmcp.js → kanban-definition-3W4ZIXB7-CNnO_t6O-BsqhwZAY.js} +88 -88
- package/dist/{layout-bsfAhWjc-fb3F3QBs.js → layout-C0kZPebx-CrIgKtBd.js} +109 -109
- package/dist/{mermaid-parser.core-3GIbpcw--KxsyRnD0.js → mermaid-parser.core-C88_DDui-CHG6v5qB.js} +10 -10
- package/dist/min-7Gb0pNxh-Cd_K7Lpk.js +39 -0
- package/dist/{mindmap-definition-VGOIOE7T-Dj37RkY_-BXffQH_4.js → mindmap-definition-VGOIOE7T-CJZ2wTTa-D4yK-MK1.js} +40 -40
- package/dist/packet-BFZMPI3H-DPt2EftX-Bgsdgnv-.js +7 -0
- package/dist/pie-7BOR55EZ-aEOtXZZV-CT0TLfil.js +7 -0
- package/dist/{pieDiagram-ADFJNKIX-BiQvDx8I-DnApOdvY.js → pieDiagram-ADFJNKIX-C9OSknjr-DguaGmOm.js} +49 -49
- package/dist/{quadrantDiagram-AYHSOK5B-D4b-YFzI-DrTslixM.js → quadrantDiagram-AYHSOK5B-CW8yuAqv-Dp9c_xnT.js} +54 -54
- package/dist/radar-NHE76QYJ-Dv7iPziq-DzohugO5.js +7 -0
- package/dist/{requirementDiagram-UZGBJVZJ-km07nlVd-C-mMa1KG.js → requirementDiagram-UZGBJVZJ-nGPhruO1-DINXeP9u.js} +5 -5
- package/dist/{sankeyDiagram-TZEHDZUN-LfuSRRbf-4X6kl_ss.js → sankeyDiagram-TZEHDZUN-CmL90u-m-YTiy7xgb.js} +146 -146
- package/dist/{sequenceDiagram-WL72ISMW-CQ4J-0_7-CEQiE3WJ.js → sequenceDiagram-WL72ISMW-B02VRcnM-B0n6W8Zi.js} +3 -3
- package/dist/shared/styles.d.ts +76 -0
- package/dist/{stateDiagram-FKZM4ZOC-JtogJwt6-YmKguJGd.js → stateDiagram-FKZM4ZOC-DjoyLUdz-BEUNa8-U.js} +14 -14
- package/dist/{stateDiagram-v2-4FDKWEC3-DuQ7UaeU-D6r92VaJ.js → stateDiagram-v2-4FDKWEC3-Bq76BTB7-DJxNsvnB.js} +2 -2
- package/dist/store/chatStore.d.ts +19 -0
- package/dist/{timeline-definition-IT6M3QCI-Cs3NnF2M-BigQwSNM.js → timeline-definition-IT6M3QCI-CTn0Gm3T-sHrk-A3B.js} +78 -78
- package/dist/treemap-KMMF4GRG-BjgLKKyi-CXHyJ_sr.js +7 -0
- package/dist/ui/ChatInput.d.ts +17 -0
- package/dist/ui/Message.d.ts +22 -0
- package/dist/ui/MessagesList.d.ts +32 -0
- package/dist/utils/contentFiltering.d.ts +12 -0
- package/dist/utils/sessionManager.d.ts +2 -0
- package/dist/{xychartDiagram-PRI3JC2R-JzAaXa5z-k94imfkQ.js → xychartDiagram-PRI3JC2R-Cgg6Uija-BysdxdV7.js} +79 -79
- package/package.json +9 -9
- package/dist/arc-D9rhTKV0-3XdW6Lry.js +0 -84
- package/dist/architecture-U656AL7Q-BFNI3st4-ChEUjpe5.js +0 -6
- package/dist/channel-CUIutAfm-COC3Ib4R.js +0 -6
- package/dist/chunk-55IACEB6-Cza7pcpr-C1E53ZSc.js +0 -9
- package/dist/gitGraph-F6HP7TQM-CD3YuciB-WOZqeAgY.js +0 -6
- package/dist/index-DvNpGWs7-CTu7Fgm8.js +0 -13251
- package/dist/info-NVLQJR56-yPC6AWqF-CQWIUnLc.js +0 -6
- package/dist/infoDiagram-WHAUD3N6-C3JLOAnb-o3ipZ1gK.js +0 -25
- package/dist/min-C2aDz5ZK-NndI1eE7.js +0 -39
- package/dist/packet-BFZMPI3H-3ROFuof--C96yO55O.js +0 -6
- package/dist/pie-7BOR55EZ-BZ_QeD6P-Bs0c_r6N.js +0 -6
- package/dist/radar-NHE76QYJ-BkSncUeS-jHSdaVBc.js +0 -6
- package/dist/treemap-KMMF4GRG-CkW25-tn-CkfndsG5.js +0 -6
package/dist/{diagram-PSM6KHXK-DNX818To-D60Hp_rL.js → diagram-PSM6KHXK-BqY4RpUg-BAHxSfLA.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as Se } from "./chunk-QN33PNHL-
|
|
3
|
-
import { m as ve } from "./chunk-4BX2VUAB-
|
|
4
|
-
import { j as
|
|
1
|
+
import { M as w, K as ee, P as te, al as ie, i as ce, bE as R, a as Q, ao as Y, bF as B, d as K, h as de, g as he, s as pe, t as ue, f as fe, e as me, _ as ye, bG as ge, N as xe } from "./index-DU3Jqd59.js";
|
|
2
|
+
import { d as Se } from "./chunk-QN33PNHL-vP2PqfVG-ByquTp49.js";
|
|
3
|
+
import { m as ve } from "./chunk-4BX2VUAB-CX67kh_B-JdLaNmBY.js";
|
|
4
|
+
import { j as be } from "./mermaid-parser.core-C88_DDui-CHG6v5qB.js";
|
|
5
5
|
typeof window < "u" && (window.global = window);
|
|
6
|
-
function
|
|
6
|
+
function we(t) {
|
|
7
7
|
var a = 0, n = t.children, r = n && n.length;
|
|
8
8
|
if (!r) a = 1;
|
|
9
9
|
else for (; --r >= 0; ) a += n[r].value;
|
|
10
10
|
t.value = a;
|
|
11
11
|
}
|
|
12
12
|
function Ce() {
|
|
13
|
-
return this.eachAfter(
|
|
13
|
+
return this.eachAfter(we);
|
|
14
14
|
}
|
|
15
15
|
function $e(t, a) {
|
|
16
16
|
let n = -1;
|
|
@@ -25,7 +25,7 @@ function Le(t, a) {
|
|
|
25
25
|
r.push(o[s]);
|
|
26
26
|
return this;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function ke(t, a) {
|
|
29
29
|
for (var n = this, r = [n], o = [], s, d, h, f = -1; n = r.pop(); )
|
|
30
30
|
if (o.push(n), s = n.children)
|
|
31
31
|
for (d = 0, h = s.length; d < h; ++d)
|
|
@@ -34,13 +34,13 @@ function Te(t, a) {
|
|
|
34
34
|
t.call(a, n, ++f, this);
|
|
35
35
|
return this;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Me(t, a) {
|
|
38
38
|
let n = -1;
|
|
39
39
|
for (const r of this)
|
|
40
40
|
if (t.call(a, r, ++n, this))
|
|
41
41
|
return r;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Te(t) {
|
|
44
44
|
return this.eachAfter(function(a) {
|
|
45
45
|
for (var n = +t(a.data) || 0, r = a.children, o = r && r.length; --o >= 0; ) n += r[o].value;
|
|
46
46
|
a.value = n;
|
|
@@ -79,7 +79,7 @@ function Ne() {
|
|
|
79
79
|
a.children || t.push(a);
|
|
80
80
|
}), t;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function De() {
|
|
83
83
|
var t = this, a = [];
|
|
84
84
|
return t.each(function(n) {
|
|
85
85
|
n !== t && a.push({ source: n.parent, target: n });
|
|
@@ -94,16 +94,16 @@ function* We() {
|
|
|
94
94
|
n.push(r[o]);
|
|
95
95
|
while (n.length);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function X(t, a) {
|
|
98
98
|
t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Re)) : a === void 0 && (a = Ie);
|
|
99
|
-
for (var n = new
|
|
99
|
+
for (var n = new U(t), r, o = [n], s, d, h, f; r = o.pop(); )
|
|
100
100
|
if ((d = a(r.data)) && (f = (d = Array.from(d)).length))
|
|
101
101
|
for (r.children = d, h = f - 1; h >= 0; --h)
|
|
102
|
-
o.push(s = d[h] = new
|
|
103
|
-
return n.eachBefore(
|
|
102
|
+
o.push(s = d[h] = new U(d[h])), s.parent = r, s.depth = r.depth + 1;
|
|
103
|
+
return n.eachBefore(je);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
105
|
+
function Ee() {
|
|
106
|
+
return X(this).eachBefore(Ve);
|
|
107
107
|
}
|
|
108
108
|
function Ie(t) {
|
|
109
109
|
return t.children;
|
|
@@ -111,43 +111,43 @@ function Ie(t) {
|
|
|
111
111
|
function Re(t) {
|
|
112
112
|
return Array.isArray(t) ? t[1] : null;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Ve(t) {
|
|
115
115
|
t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function je(t) {
|
|
118
118
|
var a = 0;
|
|
119
119
|
do
|
|
120
120
|
t.height = a;
|
|
121
121
|
while ((t = t.parent) && t.height < ++a);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function U(t) {
|
|
124
124
|
this.data = t, this.depth = this.height = 0, this.parent = null;
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
constructor:
|
|
126
|
+
U.prototype = X.prototype = {
|
|
127
|
+
constructor: U,
|
|
128
128
|
count: Ce,
|
|
129
129
|
each: $e,
|
|
130
|
-
eachAfter:
|
|
130
|
+
eachAfter: ke,
|
|
131
131
|
eachBefore: Le,
|
|
132
|
-
find:
|
|
133
|
-
sum:
|
|
132
|
+
find: Me,
|
|
133
|
+
sum: Te,
|
|
134
134
|
sort: ze,
|
|
135
135
|
path: Fe,
|
|
136
136
|
ancestors: Pe,
|
|
137
137
|
descendants: Be,
|
|
138
138
|
leaves: Ne,
|
|
139
|
-
links:
|
|
140
|
-
copy:
|
|
139
|
+
links: De,
|
|
140
|
+
copy: Ee,
|
|
141
141
|
[Symbol.iterator]: We
|
|
142
142
|
};
|
|
143
|
-
function
|
|
143
|
+
function He(t) {
|
|
144
144
|
if (typeof t != "function") throw new Error();
|
|
145
145
|
return t;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function V() {
|
|
148
148
|
return 0;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function j(t) {
|
|
151
151
|
return function() {
|
|
152
152
|
return t;
|
|
153
153
|
};
|
|
@@ -155,46 +155,46 @@ function H(t) {
|
|
|
155
155
|
function Ge(t) {
|
|
156
156
|
t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Oe(t, a, n, r, o) {
|
|
159
159
|
for (var s = t.children, d, h = -1, f = s.length, i = t.value && (r - a) / t.value; ++h < f; )
|
|
160
160
|
d = s[h], d.y0 = n, d.y1 = o, d.x0 = a, d.x1 = a += d.value * i;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function _e(t, a, n, r, o) {
|
|
163
163
|
for (var s = t.children, d, h = -1, f = s.length, i = t.value && (o - n) / t.value; ++h < f; )
|
|
164
164
|
d = s[h], d.x0 = a, d.x1 = r, d.y0 = n, d.y1 = n += d.value * i;
|
|
165
165
|
}
|
|
166
|
-
var
|
|
167
|
-
function
|
|
168
|
-
for (var d = [], h = a.children, f, i, p = 0,
|
|
166
|
+
var qe = (1 + Math.sqrt(5)) / 2;
|
|
167
|
+
function Ke(t, a, n, r, o, s) {
|
|
168
|
+
for (var d = [], h = a.children, f, i, p = 0, b = 0, l = h.length, v, x, S = a.value, u, y, A, M, P, D, L; p < l; ) {
|
|
169
169
|
v = o - n, x = s - r;
|
|
170
170
|
do
|
|
171
|
-
u = h[
|
|
172
|
-
while (!u &&
|
|
173
|
-
for (y = A = u,
|
|
174
|
-
if (u += i = h[
|
|
171
|
+
u = h[b++].value;
|
|
172
|
+
while (!u && b < l);
|
|
173
|
+
for (y = A = u, D = Math.max(x / v, v / x) / (S * t), L = u * u * D, P = Math.max(A / L, L / y); b < l; ++b) {
|
|
174
|
+
if (u += i = h[b].value, i < y && (y = i), i > A && (A = i), L = u * u * D, M = Math.max(A / L, L / y), M > P) {
|
|
175
175
|
u -= i;
|
|
176
176
|
break;
|
|
177
177
|
}
|
|
178
|
-
P =
|
|
178
|
+
P = M;
|
|
179
179
|
}
|
|
180
|
-
d.push(f = { value: u, dice: v < x, children: h.slice(p,
|
|
180
|
+
d.push(f = { value: u, dice: v < x, children: h.slice(p, b) }), f.dice ? Oe(f, n, r, o, S ? r += x * u / S : s) : _e(f, n, r, S ? n += v * u / S : o, s), S -= u, p = b;
|
|
181
181
|
}
|
|
182
182
|
return d;
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Ue = function t(a) {
|
|
185
185
|
function n(r, o, s, d, h) {
|
|
186
|
-
|
|
186
|
+
Ke(a, r, o, s, d, h);
|
|
187
187
|
}
|
|
188
188
|
return n.ratio = function(r) {
|
|
189
189
|
return t((r = +r) > 1 ? r : 1);
|
|
190
190
|
}, n;
|
|
191
|
-
}(
|
|
192
|
-
function
|
|
193
|
-
var t =
|
|
191
|
+
}(qe);
|
|
192
|
+
function Ye() {
|
|
193
|
+
var t = Ue, a = !1, n = 1, r = 1, o = [0], s = V, d = V, h = V, f = V, i = V;
|
|
194
194
|
function p(l) {
|
|
195
|
-
return l.x0 = l.y0 = 0, l.x1 = n, l.y1 = r, l.eachBefore(
|
|
195
|
+
return l.x0 = l.y0 = 0, l.x1 = n, l.y1 = r, l.eachBefore(b), o = [0], a && l.eachBefore(Ge), l;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function b(l) {
|
|
198
198
|
var v = o[l.depth], x = l.x0 + v, S = l.y0 + v, u = l.x1 - v, y = l.y1 - v;
|
|
199
199
|
u < x && (x = u = (x + u) / 2), y < S && (S = y = (S + y) / 2), l.x0 = x, l.y0 = S, l.x1 = u, l.y1 = y, l.children && (v = o[l.depth + 1] = s(l) / 2, x += i(l) - v, S += d(l) - v, u -= h(l) - v, y -= f(l) - v, u < x && (x = u = (x + u) / 2), y < S && (S = y = (S + y) / 2), t(l, x, S, u, y));
|
|
200
200
|
}
|
|
@@ -203,24 +203,24 @@ function Oe() {
|
|
|
203
203
|
}, p.size = function(l) {
|
|
204
204
|
return arguments.length ? (n = +l[0], r = +l[1], p) : [n, r];
|
|
205
205
|
}, p.tile = function(l) {
|
|
206
|
-
return arguments.length ? (t =
|
|
206
|
+
return arguments.length ? (t = He(l), p) : t;
|
|
207
207
|
}, p.padding = function(l) {
|
|
208
208
|
return arguments.length ? p.paddingInner(l).paddingOuter(l) : p.paddingInner();
|
|
209
209
|
}, p.paddingInner = function(l) {
|
|
210
|
-
return arguments.length ? (s = typeof l == "function" ? l :
|
|
210
|
+
return arguments.length ? (s = typeof l == "function" ? l : j(+l), p) : s;
|
|
211
211
|
}, p.paddingOuter = function(l) {
|
|
212
212
|
return arguments.length ? p.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l) : p.paddingTop();
|
|
213
213
|
}, p.paddingTop = function(l) {
|
|
214
|
-
return arguments.length ? (d = typeof l == "function" ? l :
|
|
214
|
+
return arguments.length ? (d = typeof l == "function" ? l : j(+l), p) : d;
|
|
215
215
|
}, p.paddingRight = function(l) {
|
|
216
|
-
return arguments.length ? (h = typeof l == "function" ? l :
|
|
216
|
+
return arguments.length ? (h = typeof l == "function" ? l : j(+l), p) : h;
|
|
217
217
|
}, p.paddingBottom = function(l) {
|
|
218
|
-
return arguments.length ? (f = typeof l == "function" ? l :
|
|
218
|
+
return arguments.length ? (f = typeof l == "function" ? l : j(+l), p) : f;
|
|
219
219
|
}, p.paddingLeft = function(l) {
|
|
220
|
-
return arguments.length ? (i = typeof l == "function" ? l :
|
|
220
|
+
return arguments.length ? (i = typeof l == "function" ? l : j(+l), p) : i;
|
|
221
221
|
}, p;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var J, ae = (J = class {
|
|
224
224
|
constructor() {
|
|
225
225
|
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = de, this.getAccTitle = he, this.setDiagramTitle = pe, this.getDiagramTitle = ue, this.getAccDescription = fe, this.setAccDescription = me;
|
|
226
226
|
}
|
|
@@ -256,7 +256,7 @@ var Y, ae = (Y = class {
|
|
|
256
256
|
clear() {
|
|
257
257
|
xe(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
258
258
|
}
|
|
259
|
-
},
|
|
259
|
+
}, w(J, "TreeMapDB"), J);
|
|
260
260
|
function ne(t) {
|
|
261
261
|
if (!t.length)
|
|
262
262
|
return [];
|
|
@@ -277,8 +277,8 @@ function ne(t) {
|
|
|
277
277
|
r.type !== "Leaf" && n.push({ node: o, level: r.level });
|
|
278
278
|
}), a;
|
|
279
279
|
}
|
|
280
|
-
|
|
281
|
-
var
|
|
280
|
+
w(ne, "buildHierarchy");
|
|
281
|
+
var Je = /* @__PURE__ */ w((t, a) => {
|
|
282
282
|
ve(t, a);
|
|
283
283
|
const n = [];
|
|
284
284
|
for (const s of t.TreemapRows ?? [])
|
|
@@ -287,7 +287,7 @@ var Ye = /* @__PURE__ */ b((t, a) => {
|
|
|
287
287
|
const d = s.item;
|
|
288
288
|
if (!d)
|
|
289
289
|
continue;
|
|
290
|
-
const h = s.indent ? parseInt(s.indent) : 0, f =
|
|
290
|
+
const h = s.indent ? parseInt(s.indent) : 0, f = Qe(d), i = d.classSelector ? a.getStylesForClass(d.classSelector) : [], p = i.length > 0 ? i.join(";") : void 0, b = {
|
|
291
291
|
level: h,
|
|
292
292
|
name: f,
|
|
293
293
|
type: d.$type,
|
|
@@ -295,54 +295,54 @@ var Ye = /* @__PURE__ */ b((t, a) => {
|
|
|
295
295
|
classSelector: d.classSelector,
|
|
296
296
|
cssCompiledStyles: p
|
|
297
297
|
};
|
|
298
|
-
n.push(
|
|
298
|
+
n.push(b);
|
|
299
299
|
}
|
|
300
|
-
const r = ne(n), o = /* @__PURE__ */
|
|
300
|
+
const r = ne(n), o = /* @__PURE__ */ w((s, d) => {
|
|
301
301
|
for (const h of s)
|
|
302
302
|
a.addNode(h, d), h.children && h.children.length > 0 && o(h.children, d + 1);
|
|
303
303
|
}, "addNodesRecursively");
|
|
304
304
|
o(r, 0);
|
|
305
|
-
}, "populate"),
|
|
305
|
+
}, "populate"), Qe = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), re = {
|
|
306
306
|
// @ts-expect-error - TreeMapDB is not assignable to DiagramDB
|
|
307
307
|
parser: { yy: void 0 },
|
|
308
|
-
parse: /* @__PURE__ */
|
|
308
|
+
parse: /* @__PURE__ */ w(async (t) => {
|
|
309
309
|
var a;
|
|
310
310
|
try {
|
|
311
|
-
const n = await
|
|
312
|
-
|
|
311
|
+
const n = await be("treemap", t);
|
|
312
|
+
Q.debug("Treemap AST:", n);
|
|
313
313
|
const r = (a = re.parser) == null ? void 0 : a.yy;
|
|
314
314
|
if (!(r instanceof ae))
|
|
315
315
|
throw new Error(
|
|
316
316
|
"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."
|
|
317
317
|
);
|
|
318
|
-
|
|
318
|
+
Je(n, r);
|
|
319
319
|
} catch (n) {
|
|
320
|
-
throw
|
|
320
|
+
throw Q.error("Error parsing treemap:", n), n;
|
|
321
321
|
}
|
|
322
322
|
}, "parse")
|
|
323
|
-
},
|
|
324
|
-
const o = r.db, s = o.getConfig(), d = s.padding ??
|
|
323
|
+
}, Xe = 10, N = 10, H = 25, Ze = /* @__PURE__ */ w((t, a, n, r) => {
|
|
324
|
+
const o = r.db, s = o.getConfig(), d = s.padding ?? Xe, h = o.getDiagramTitle(), f = o.getRoot(), { themeVariables: i } = te();
|
|
325
325
|
if (!f)
|
|
326
326
|
return;
|
|
327
|
-
const p = h ? 30 : 0,
|
|
328
|
-
|
|
327
|
+
const p = h ? 30 : 0, b = ie(a), l = s.nodeWidth ? s.nodeWidth * N : 960, v = s.nodeHeight ? s.nodeHeight * N : 500, x = l, S = v + p;
|
|
328
|
+
b.attr("viewBox", `0 0 ${x} ${S}`), ce(b, S, x, s.useMaxWidth);
|
|
329
329
|
let u;
|
|
330
330
|
try {
|
|
331
331
|
const e = s.valueFormat || ",";
|
|
332
332
|
if (e === "$0,0")
|
|
333
|
-
u = /* @__PURE__ */
|
|
333
|
+
u = /* @__PURE__ */ w((c) => "$" + R(",")(c), "valueFormat");
|
|
334
334
|
else if (e.startsWith("$") && e.includes(",")) {
|
|
335
335
|
const c = /\.\d+/.exec(e), g = c ? c[0] : "";
|
|
336
|
-
u = /* @__PURE__ */
|
|
336
|
+
u = /* @__PURE__ */ w((C) => "$" + R("," + g)(C), "valueFormat");
|
|
337
337
|
} else if (e.startsWith("$")) {
|
|
338
338
|
const c = e.substring(1);
|
|
339
|
-
u = /* @__PURE__ */
|
|
339
|
+
u = /* @__PURE__ */ w((g) => "$" + R(c || "")(g), "valueFormat");
|
|
340
340
|
} else
|
|
341
341
|
u = R(e);
|
|
342
342
|
} catch (e) {
|
|
343
|
-
|
|
343
|
+
Q.error("Error creating format function:", e), u = R(",");
|
|
344
344
|
}
|
|
345
|
-
const y =
|
|
345
|
+
const y = Y().range([
|
|
346
346
|
"transparent",
|
|
347
347
|
i.cScale0,
|
|
348
348
|
i.cScale1,
|
|
@@ -356,7 +356,7 @@ var Ye = /* @__PURE__ */ b((t, a) => {
|
|
|
356
356
|
i.cScale9,
|
|
357
357
|
i.cScale10,
|
|
358
358
|
i.cScale11
|
|
359
|
-
]), A =
|
|
359
|
+
]), A = Y().range([
|
|
360
360
|
"transparent",
|
|
361
361
|
i.cScalePeer0,
|
|
362
362
|
i.cScalePeer1,
|
|
@@ -370,7 +370,7 @@ var Ye = /* @__PURE__ */ b((t, a) => {
|
|
|
370
370
|
i.cScalePeer9,
|
|
371
371
|
i.cScalePeer10,
|
|
372
372
|
i.cScalePeer11
|
|
373
|
-
]),
|
|
373
|
+
]), M = Y().range([
|
|
374
374
|
i.cScaleLabel0,
|
|
375
375
|
i.cScaleLabel1,
|
|
376
376
|
i.cScaleLabel2,
|
|
@@ -384,101 +384,101 @@ var Ye = /* @__PURE__ */ b((t, a) => {
|
|
|
384
384
|
i.cScaleLabel10,
|
|
385
385
|
i.cScaleLabel11
|
|
386
386
|
]);
|
|
387
|
-
h &&
|
|
388
|
-
const P =
|
|
389
|
-
(e) => e.children && e.children.length > 0 ?
|
|
390
|
-
).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? N : 0).paddingRight((e) => e.children && e.children.length > 0 ? N : 0).paddingBottom((e) => e.children && e.children.length > 0 ? N : 0).round(!0)(
|
|
391
|
-
W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height",
|
|
387
|
+
h && b.append("text").attr("x", x / 2).attr("y", p / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(h);
|
|
388
|
+
const P = b.append("g").attr("transform", `translate(0, ${p})`).attr("class", "treemapContainer"), D = X(f).sum((e) => e.value ?? 0).sort((e, c) => (c.value ?? 0) - (e.value ?? 0)), L = Ye().size([l, v]).paddingTop(
|
|
389
|
+
(e) => e.children && e.children.length > 0 ? H + N : 0
|
|
390
|
+
).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? N : 0).paddingRight((e) => e.children && e.children.length > 0 ? N : 0).paddingBottom((e) => e.children && e.children.length > 0 ? N : 0).round(!0)(D), le = L.descendants().filter((e) => e.children && e.children.length > 0), W = P.selectAll(".treemapSection").data(le).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
391
|
+
W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", H).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), W.append("clipPath").attr("id", (e, c) => `clip-section-${a}-${c}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", H), W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, c) => `treemapSection section${c}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => A(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
392
392
|
if (e.depth === 0)
|
|
393
393
|
return "display: none;";
|
|
394
394
|
const c = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
395
395
|
return c.nodeStyles + ";" + c.borderStyles.join(";");
|
|
396
|
-
}), W.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y",
|
|
396
|
+
}), W.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", H / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
|
|
397
397
|
if (e.depth === 0)
|
|
398
398
|
return "display: none;";
|
|
399
|
-
const c = "dominant-baseline: middle; font-size: 12px; fill:" +
|
|
399
|
+
const c = "dominant-baseline: middle; font-size: 12px; fill:" + M(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", g = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
400
400
|
return c + g.labelStyles.replace("color:", "fill:");
|
|
401
401
|
}).each(function(e) {
|
|
402
402
|
if (e.depth === 0)
|
|
403
403
|
return;
|
|
404
|
-
const c =
|
|
404
|
+
const c = K(this), g = e.data.name;
|
|
405
405
|
c.text(g);
|
|
406
|
-
const C = e.x1 - e.x0,
|
|
406
|
+
const C = e.x1 - e.x0, T = 6;
|
|
407
407
|
let z;
|
|
408
|
-
s.showValues !== !1 && e.value ? z = C - 10 - 30 - 10 -
|
|
409
|
-
const
|
|
410
|
-
if ($.getComputedTextLength() >
|
|
408
|
+
s.showValues !== !1 && e.value ? z = C - 10 - 30 - 10 - T : z = C - T - 6;
|
|
409
|
+
const k = Math.max(15, z), $ = c.node();
|
|
410
|
+
if ($.getComputedTextLength() > k) {
|
|
411
411
|
let m = g;
|
|
412
412
|
for (; m.length > 0; ) {
|
|
413
413
|
if (m = g.substring(0, m.length - 1), m.length === 0) {
|
|
414
|
-
c.text("..."), $.getComputedTextLength() >
|
|
414
|
+
c.text("..."), $.getComputedTextLength() > k && c.text("");
|
|
415
415
|
break;
|
|
416
416
|
}
|
|
417
|
-
if (c.text(m + "..."), $.getComputedTextLength() <=
|
|
417
|
+
if (c.text(m + "..."), $.getComputedTextLength() <= k)
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
}), s.showValues !== !1 && W.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y",
|
|
421
|
+
}), s.showValues !== !1 && W.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", H / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? u(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
|
|
422
422
|
if (e.depth === 0)
|
|
423
423
|
return "display: none;";
|
|
424
|
-
const c = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" +
|
|
424
|
+
const c = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + M(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", g = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
425
425
|
return c + g.labelStyles.replace("color:", "fill:");
|
|
426
426
|
});
|
|
427
427
|
const se = L.leaves(), G = P.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class", (e, c) => `treemapNode treemapLeafGroup leaf${c}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
428
428
|
G.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), G.append("clipPath").attr("id", (e, c) => `clip-${a}-${c}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), G.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
429
|
-
const c = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" +
|
|
429
|
+
const c = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + M(e.data.name) + ";", g = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
430
430
|
return c + g.labelStyles.replace("color:", "fill:");
|
|
431
431
|
}).attr("clip-path", (e, c) => `url(#clip-${a}-${c})`).text((e) => e.data.name).each(function(e) {
|
|
432
|
-
const c =
|
|
433
|
-
if (
|
|
432
|
+
const c = K(this), g = e.x1 - e.x0, C = e.y1 - e.y0, T = c.node(), z = 4, k = g - 2 * z, $ = C - 2 * z;
|
|
433
|
+
if (k < 10 || $ < 10) {
|
|
434
434
|
c.style("display", "none");
|
|
435
435
|
return;
|
|
436
436
|
}
|
|
437
437
|
let m = parseInt(c.style("font-size"), 10);
|
|
438
|
-
const F = 8,
|
|
439
|
-
for (;
|
|
438
|
+
const F = 8, E = 28, O = 0.6, I = 6, _ = 2;
|
|
439
|
+
for (; T.getComputedTextLength() > k && m > F; )
|
|
440
440
|
m--, c.style("font-size", `${m}px`);
|
|
441
|
-
let
|
|
441
|
+
let q = Math.max(
|
|
442
442
|
I,
|
|
443
|
-
Math.min(
|
|
444
|
-
),
|
|
445
|
-
for (;
|
|
443
|
+
Math.min(E, Math.round(m * O))
|
|
444
|
+
), Z = m + _ + q;
|
|
445
|
+
for (; Z > $ && m > F && (m--, q = Math.max(
|
|
446
446
|
I,
|
|
447
|
-
Math.min(
|
|
448
|
-
), !(
|
|
449
|
-
c.style("font-size", `${m}px`),
|
|
450
|
-
c.style("font-size", `${m}px`), (
|
|
447
|
+
Math.min(E, Math.round(m * O))
|
|
448
|
+
), !(q < I && m === F)); )
|
|
449
|
+
c.style("font-size", `${m}px`), Z = m + _ + q;
|
|
450
|
+
c.style("font-size", `${m}px`), (T.getComputedTextLength() > k || m < F || $ < m) && c.style("display", "none");
|
|
451
451
|
}), s.showValues !== !1 && G.append("text").attr("class", "treemapValue").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", function(e) {
|
|
452
452
|
return (e.y1 - e.y0) / 2;
|
|
453
453
|
}).attr("style", (e) => {
|
|
454
|
-
const c = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" +
|
|
454
|
+
const c = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + M(e.data.name) + ";", g = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
455
455
|
return c + g.labelStyles.replace("color:", "fill:");
|
|
456
456
|
}).attr("clip-path", (e, c) => `url(#clip-${a}-${c})`).text((e) => e.value ? u(e.value) : "").each(function(e) {
|
|
457
|
-
const c =
|
|
457
|
+
const c = K(this), g = this.parentNode;
|
|
458
458
|
if (!g) {
|
|
459
459
|
c.style("display", "none");
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
|
-
const C =
|
|
462
|
+
const C = K(g).select(".treemapLabel");
|
|
463
463
|
if (C.empty() || C.style("display") === "none") {
|
|
464
464
|
c.style("display", "none");
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
|
-
const
|
|
467
|
+
const T = parseFloat(C.style("font-size")), z = 28, k = 0.6, $ = 6, m = 2, F = Math.max(
|
|
468
468
|
$,
|
|
469
|
-
Math.min(z, Math.round(
|
|
469
|
+
Math.min(z, Math.round(T * k))
|
|
470
470
|
);
|
|
471
471
|
c.style("font-size", `${F}px`);
|
|
472
|
-
const
|
|
473
|
-
c.attr("y",
|
|
474
|
-
const
|
|
475
|
-
c.node().getComputedTextLength() >
|
|
472
|
+
const E = (e.y1 - e.y0) / 2 + T / 2 + m;
|
|
473
|
+
c.attr("y", E);
|
|
474
|
+
const O = e.x1 - e.x0, I = e.y1 - e.y0 - 4, _ = O - 8;
|
|
475
|
+
c.node().getComputedTextLength() > _ || E + F > I || F < $ ? c.style("display", "none") : c.style("display", null);
|
|
476
476
|
});
|
|
477
477
|
const oe = s.diagramPadding ?? 8;
|
|
478
|
-
Se(
|
|
479
|
-
}, "draw"), et = /* @__PURE__ */
|
|
478
|
+
Se(b, oe, "flowchart", (s == null ? void 0 : s.useMaxWidth) || !1);
|
|
479
|
+
}, "draw"), et = /* @__PURE__ */ w(function(t, a) {
|
|
480
480
|
return a.db.getClasses();
|
|
481
|
-
}, "getClasses"), tt = { draw:
|
|
481
|
+
}, "getClasses"), tt = { draw: Ze, getClasses: et }, at = {
|
|
482
482
|
sectionStrokeColor: "black",
|
|
483
483
|
sectionStrokeWidth: "1",
|
|
484
484
|
sectionFillColor: "#efefef",
|
|
@@ -491,7 +491,7 @@ var Ye = /* @__PURE__ */ b((t, a) => {
|
|
|
491
491
|
valueColor: "black",
|
|
492
492
|
titleColor: "black",
|
|
493
493
|
titleFontSize: "14px"
|
|
494
|
-
}, nt = /* @__PURE__ */
|
|
494
|
+
}, nt = /* @__PURE__ */ w(({
|
|
495
495
|
treemap: t
|
|
496
496
|
} = {}) => {
|
|
497
497
|
const a = ee(at, t);
|