@dpuse/dpuse-tool-d3-visualiser 1.0.118 → 1.0.122

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 (38) hide show
  1. package/README.md +205 -243
  2. package/dist/chordDiagram-Cm91Tmgo.js +1729 -0
  3. package/dist/d3-hierarchy-Dtx4jD78.js +269 -0
  4. package/dist/{linear-CNetDix0.js → d3-scale-BYykLEPO.js} +238 -177
  5. package/dist/{select-SZKizDc7.js → d3-selection-CL8c_tE2.js} +230 -232
  6. package/dist/d3-shape-gf8U18pS.js +1133 -0
  7. package/dist/dpuse-tool-d3-visualiser.es.js +6 -6
  8. package/dist/{erdDiagram-DKsqCN08.js → erdDiagram-DmYSx8Dh.js} +1 -1
  9. package/dist/{networkDiagram-BiCPMNf8.js → networkDiagram-UdFs1ySs.js} +385 -368
  10. package/dist/{sankeyDiagram-DcI-D1uh.js → sankeyDiagram-Dbl1-v5p.js} +31 -31
  11. package/dist/shipped-packages.json +11 -20
  12. package/dist/{src-DAMkWOaT.js → src-YHHReglY.js} +32 -32
  13. package/dist/{tanStackCharts-5HHGfe6p.js → tanStackCharts-DEINbmRi.js} +1041 -1096
  14. package/dist/treeDiagram-t0oFwi1c.js +49 -0
  15. package/dist/types/src/networkDiagram.d.ts +4 -0
  16. package/package.json +25 -23
  17. package/dist/array-CpxKKsZm.js +0 -12
  18. package/dist/array-CpxKKsZm.js.map +0 -1
  19. package/dist/chordDiagram-Dbu2uT_s.js +0 -3588
  20. package/dist/chordDiagram-Dbu2uT_s.js.map +0 -1
  21. package/dist/dpuse-tool-d3-visualiser.es.js.map +0 -1
  22. package/dist/erdDiagram-DKsqCN08.js.map +0 -1
  23. package/dist/hierarchy-DU9LihDu.js +0 -135
  24. package/dist/hierarchy-DU9LihDu.js.map +0 -1
  25. package/dist/linear-CNetDix0.js.map +0 -1
  26. package/dist/link-CAkrxHYd.js +0 -62
  27. package/dist/link-CAkrxHYd.js.map +0 -1
  28. package/dist/networkDiagram-BiCPMNf8.js.map +0 -1
  29. package/dist/palette-D5DTPmuA.js.map +0 -1
  30. package/dist/point-_U9MxSuk.js +0 -85
  31. package/dist/point-_U9MxSuk.js.map +0 -1
  32. package/dist/sankeyDiagram-DcI-D1uh.js.map +0 -1
  33. package/dist/select-SZKizDc7.js.map +0 -1
  34. package/dist/src-DAMkWOaT.js.map +0 -1
  35. package/dist/string-BzfQLSds.js.map +0 -1
  36. package/dist/tanStackCharts-5HHGfe6p.js.map +0 -1
  37. package/dist/treeDiagram-fmrYqvXl.js +0 -126
  38. package/dist/treeDiagram-fmrYqvXl.js.map +0 -1
@@ -1,3588 +0,0 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s } from "./linear-CNetDix0.js";
2
- import { i as c, r as l, t as u } from "./palette-D5DTPmuA.js";
3
- import { t as d } from "./src-DAMkWOaT.js";
4
- import { t as f } from "./select-SZKizDc7.js";
5
- import { a as p, o as m } from "./string-BzfQLSds.js";
6
- import { r as h, t as g } from "./array-CpxKKsZm.js";
7
- import { i as _, n as v, r as y, t as b } from "./point-_U9MxSuk.js";
8
- import { n as x } from "./hierarchy-DU9LihDu.js";
9
- // \0rolldown/runtime.js
10
- var S = Object.defineProperty, C = (e, t) => {
11
- let n = {};
12
- for (var r in e) S(n, r, {
13
- get: e[r],
14
- enumerable: !0
15
- });
16
- return t || S(n, Symbol.toStringTag, { value: "Module" }), n;
17
- };
18
- // node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
19
- function w(e) {
20
- if (e.sheet) return e.sheet;
21
- /* istanbul ignore next */
22
- for (var t = 0; t < document.styleSheets.length; t++) if (document.styleSheets[t].ownerNode === e) return document.styleSheets[t];
23
- }
24
- function T(e) {
25
- var t = document.createElement("style");
26
- return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
27
- }
28
- var E = /*#__PURE__*/ function() {
29
- function e(e) {
30
- var t = this;
31
- this._insertTag = function(e) {
32
- var n = t.tags.length === 0 ? t.insertionPoint ? t.insertionPoint.nextSibling : t.prepend ? t.container.firstChild : t.before : t.tags[t.tags.length - 1].nextSibling;
33
- t.container.insertBefore(e, n), t.tags.push(e);
34
- }, this.isSpeedy = e.speedy === void 0 || e.speedy, this.tags = [], this.ctr = 0, this.nonce = e.nonce, this.key = e.key, this.container = e.container, this.prepend = e.prepend, this.insertionPoint = e.insertionPoint, this.before = null;
35
- }
36
- var t = e.prototype;
37
- return t.hydrate = function(e) {
38
- e.forEach(this._insertTag);
39
- }, t.insert = function(e) {
40
- this.ctr % (this.isSpeedy ? 65e3 : 1) == 0 && this._insertTag(T(this));
41
- var t = this.tags[this.tags.length - 1];
42
- if (this.isSpeedy) {
43
- var n = w(t);
44
- try {
45
- n.insertRule(e, n.cssRules.length);
46
- } catch {}
47
- } else t.appendChild(document.createTextNode(e));
48
- this.ctr++;
49
- }, t.flush = function() {
50
- this.tags.forEach(function(e) {
51
- return e.parentNode?.removeChild(e);
52
- }), this.tags = [], this.ctr = 0;
53
- }, e;
54
- }(), D = "-ms-", O = "-moz-", k = "-webkit-", A = "comm", j = "rule", M = "decl", ee = "@import", te = "@keyframes", ne = "@layer", re = Math.abs, N = String.fromCharCode, ie = Object.assign;
55
- function ae(e, t) {
56
- return I(e, 0) ^ 45 ? (((t << 2 ^ I(e, 0)) << 2 ^ I(e, 1)) << 2 ^ I(e, 2)) << 2 ^ I(e, 3) : 0;
57
- }
58
- function P(e) {
59
- return e.trim();
60
- }
61
- function oe(e, t) {
62
- return (e = t.exec(e)) ? e[0] : e;
63
- }
64
- function F(e, t, n) {
65
- return e.replace(t, n);
66
- }
67
- function se(e, t) {
68
- return e.indexOf(t);
69
- }
70
- function I(e, t) {
71
- return e.charCodeAt(t) | 0;
72
- }
73
- function ce(e, t, n) {
74
- return e.slice(t, n);
75
- }
76
- function L(e) {
77
- return e.length;
78
- }
79
- function le(e) {
80
- return e.length;
81
- }
82
- function ue(e, t) {
83
- return t.push(e), e;
84
- }
85
- function de(e, t) {
86
- return e.map(t).join("");
87
- }
88
- // node_modules/stylis/src/Tokenizer.js
89
- var fe = 1, pe = 1, me = 0, R = 0, z = 0, he = "";
90
- function ge(e, t, n, r, i, a, o) {
91
- return {
92
- value: e,
93
- root: t,
94
- parent: n,
95
- type: r,
96
- props: i,
97
- children: a,
98
- line: fe,
99
- column: pe,
100
- length: o,
101
- return: ""
102
- };
103
- }
104
- function _e(e, t) {
105
- return ie(ge("", null, null, "", null, null, 0), e, { length: -e.length }, t);
106
- }
107
- function ve() {
108
- return z;
109
- }
110
- function ye() {
111
- return z = R > 0 ? I(he, --R) : 0, pe--, z === 10 && (pe = 1, fe--), z;
112
- }
113
- function B() {
114
- return z = R < me ? I(he, R++) : 0, pe++, z === 10 && (pe = 1, fe++), z;
115
- }
116
- function V() {
117
- return I(he, R);
118
- }
119
- function be() {
120
- return R;
121
- }
122
- function xe(e, t) {
123
- return ce(he, e, t);
124
- }
125
- function Se(e) {
126
- switch (e) {
127
- case 0:
128
- case 9:
129
- case 10:
130
- case 13:
131
- case 32: return 5;
132
- case 33:
133
- case 43:
134
- case 44:
135
- case 47:
136
- case 62:
137
- case 64:
138
- case 126:
139
- case 59:
140
- case 123:
141
- case 125: return 4;
142
- case 58: return 3;
143
- case 34:
144
- case 39:
145
- case 40:
146
- case 91: return 2;
147
- case 41:
148
- case 93: return 1;
149
- }
150
- return 0;
151
- }
152
- function Ce(e) {
153
- return fe = pe = 1, me = L(he = e), R = 0, [];
154
- }
155
- function we(e) {
156
- return he = "", e;
157
- }
158
- function Te(e) {
159
- return P(xe(R - 1, Oe(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
160
- }
161
- function Ee(e) {
162
- for (; (z = V()) && z < 33;) B();
163
- return Se(e) > 2 || Se(z) > 3 ? "" : " ";
164
- }
165
- function De(e, t) {
166
- for (; --t && B() && !(z < 48 || z > 102 || z > 57 && z < 65 || z > 70 && z < 97););
167
- return xe(e, be() + (t < 6 && V() == 32 && B() == 32));
168
- }
169
- function Oe(e) {
170
- for (; B();) switch (z) {
171
- case e: return R;
172
- case 34:
173
- case 39:
174
- e !== 34 && e !== 39 && Oe(z);
175
- break;
176
- case 40:
177
- e === 41 && Oe(e);
178
- break;
179
- case 92: B();
180
- }
181
- return R;
182
- }
183
- function ke(e, t) {
184
- for (; B() && e + z !== 57 && (e + z !== 84 || V() !== 47););
185
- return "/*" + xe(t, R - 1) + "*" + N(e === 47 ? e : B());
186
- }
187
- function Ae(e) {
188
- for (; !Se(V());) B();
189
- return xe(e, R);
190
- }
191
- // node_modules/stylis/src/Parser.js
192
- function je(e) {
193
- return we(Me("", null, null, null, [""], e = Ce(e), 0, [0], e));
194
- }
195
- function Me(e, t, n, r, i, a, o, s, c) {
196
- for (var l = 0, u = 0, d = o, f = 0, p = 0, m = 0, h = 1, g = 1, _ = 1, v = 0, y = "", b = i, x = a, S = r, C = y; g;) switch (m = v, v = B()) {
197
- case 40: if (m != 108 && I(C, d - 1) == 58) {
198
- se(C += F(Te(v), "&", "&\f"), "&\f") != -1 && (_ = -1);
199
- break;
200
- }
201
- case 34:
202
- case 39:
203
- case 91:
204
- C += Te(v);
205
- break;
206
- case 9:
207
- case 10:
208
- case 13:
209
- case 32:
210
- C += Ee(m);
211
- break;
212
- case 92:
213
- C += De(be() - 1, 7);
214
- continue;
215
- case 47:
216
- switch (V()) {
217
- case 42:
218
- case 47:
219
- ue(Pe(ke(B(), be()), t, n), c);
220
- break;
221
- default: C += "/";
222
- }
223
- break;
224
- case 123 * h: s[l++] = L(C) * _;
225
- case 125 * h:
226
- case 59:
227
- case 0:
228
- switch (v) {
229
- case 0:
230
- case 125: g = 0;
231
- case 59 + u:
232
- _ == -1 && (C = F(C, /\f/g, "")), p > 0 && L(C) - d && ue(p > 32 ? Fe(C + ";", r, n, d - 1) : Fe(F(C, " ", "") + ";", r, n, d - 2), c);
233
- break;
234
- case 59: C += ";";
235
- default: if (ue(S = Ne(C, t, n, l, u, i, s, y, b = [], x = [], d), a), v === 123) {
236
- if (u === 0) Me(C, t, S, S, b, a, d, s, x);
237
- else switch (f === 99 && I(C, 3) === 110 ? 100 : f) {
238
- case 100:
239
- case 108:
240
- case 109:
241
- case 115:
242
- Me(e, S, S, r && ue(Ne(e, S, S, 0, 0, i, s, y, i, b = [], d), x), i, x, d, s, r ? b : x);
243
- break;
244
- default: Me(C, S, S, S, [""], x, 0, s, x);
245
- }
246
- }
247
- }
248
- l = u = p = 0, h = _ = 1, y = C = "", d = o;
249
- break;
250
- case 58: d = 1 + L(C), p = m;
251
- default:
252
- if (h < 1) {
253
- if (v == 123) --h;
254
- else if (v == 125 && h++ == 0 && ye() == 125) continue;
255
- }
256
- switch (C += N(v), v * h) {
257
- case 38:
258
- _ = u > 0 ? 1 : (C += "\f", -1);
259
- break;
260
- case 44:
261
- s[l++] = (L(C) - 1) * _, _ = 1;
262
- break;
263
- case 64:
264
- V() === 45 && (C += Te(B())), f = V(), u = d = L(y = C += Ae(be())), v++;
265
- break;
266
- case 45: m === 45 && L(C) == 2 && (h = 0);
267
- }
268
- }
269
- return a;
270
- }
271
- function Ne(e, t, n, r, i, a, o, s, c, l, u) {
272
- for (var d = i - 1, f = i === 0 ? a : [""], p = le(f), m = 0, h = 0, g = 0; m < r; ++m) for (var _ = 0, v = ce(e, d + 1, d = re(h = o[m])), y = e; _ < p; ++_) (y = P(h > 0 ? f[_] + " " + v : F(v, /&\f/g, f[_]))) && (c[g++] = y);
273
- return ge(e, t, n, i === 0 ? j : s, c, l, u);
274
- }
275
- function Pe(e, t, n) {
276
- return ge(e, t, n, A, N(ve()), ce(e, 2, -2), 0);
277
- }
278
- function Fe(e, t, n, r) {
279
- return ge(e, t, n, M, ce(e, 0, r), ce(e, r + 1, -1), r);
280
- }
281
- // node_modules/stylis/src/Serializer.js
282
- function Ie(e, t) {
283
- for (var n = "", r = le(e), i = 0; i < r; i++) n += t(e[i], i, e, t) || "";
284
- return n;
285
- }
286
- function Le(e, t, n, r) {
287
- switch (e.type) {
288
- case ne: if (e.children.length) break;
289
- case ee:
290
- case M: return e.return = e.return || e.value;
291
- case A: return "";
292
- case te: return e.return = e.value + "{" + Ie(e.children, r) + "}";
293
- case j: e.value = e.props.join(",");
294
- }
295
- return L(n = Ie(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
296
- }
297
- // node_modules/stylis/src/Middleware.js
298
- function Re(e) {
299
- var t = le(e);
300
- return function(n, r, i, a) {
301
- for (var o = "", s = 0; s < t; s++) o += e[s](n, r, i, a) || "";
302
- return o;
303
- };
304
- }
305
- function ze(e) {
306
- return function(t) {
307
- t.root || (t = t.return) && e(t);
308
- };
309
- }
310
- // node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
311
- function Be(e) {
312
- var t = Object.create(null);
313
- return function(n) {
314
- return t[n] === void 0 && (t[n] = e(n)), t[n];
315
- };
316
- }
317
- // node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
318
- var Ve = function(e, t, n) {
319
- for (var r = 0, i = 0; r = i, i = V(), r === 38 && i === 12 && (t[n] = 1), !Se(i);) B();
320
- return xe(e, R);
321
- }, He = function(e, t) {
322
- var n = -1, r = 44;
323
- do
324
- switch (Se(r)) {
325
- case 0:
326
- r === 38 && V() === 12 && (t[n] = 1), e[n] += Ve(R - 1, t, n);
327
- break;
328
- case 2:
329
- e[n] += Te(r);
330
- break;
331
- case 4: if (r === 44) {
332
- e[++n] = V() === 58 ? "&\f" : "", t[n] = e[n].length;
333
- break;
334
- }
335
- default: e[n] += N(r);
336
- }
337
- while (r = B());
338
- return e;
339
- }, Ue = function(e, t) {
340
- return we(He(Ce(e), t));
341
- }, We = /* #__PURE__ */ new WeakMap(), Ge = function(e) {
342
- if (!(e.type !== "rule" || !e.parent || e.length < 1)) {
343
- for (var t = e.value, n = e.parent, r = e.column === n.column && e.line === n.line; n.type !== "rule";) if (n = n.parent, !n) return;
344
- if ((e.props.length !== 1 || t.charCodeAt(0) === 58 || We.get(n)) && !r) {
345
- We.set(e, !0);
346
- for (var i = [], a = Ue(t, i), o = n.props, s = 0, c = 0; s < a.length; s++) for (var l = 0; l < o.length; l++, c++) e.props[c] = i[s] ? a[s].replace(/&\f/g, o[l]) : o[l] + " " + a[s];
347
- }
348
- }
349
- }, Ke = function(e) {
350
- if (e.type === "decl") {
351
- var t = e.value;
352
- t.charCodeAt(0) === 108 && t.charCodeAt(2) === 98 && (e.return = "", e.value = "");
353
- }
354
- };
355
- function qe(e, t) {
356
- switch (ae(e, t)) {
357
- case 5103: return k + "print-" + e + e;
358
- case 5737:
359
- case 4201:
360
- case 3177:
361
- case 3433:
362
- case 1641:
363
- case 4457:
364
- case 2921:
365
- case 5572:
366
- case 6356:
367
- case 5844:
368
- case 3191:
369
- case 6645:
370
- case 3005:
371
- case 6391:
372
- case 5879:
373
- case 5623:
374
- case 6135:
375
- case 4599:
376
- case 4855:
377
- case 4215:
378
- case 6389:
379
- case 5109:
380
- case 5365:
381
- case 5621:
382
- case 3829: return k + e + e;
383
- case 5349:
384
- case 4246:
385
- case 4810:
386
- case 6968:
387
- case 2756: return k + e + O + e + D + e + e;
388
- case 6828:
389
- case 4268: return k + e + D + e + e;
390
- case 6165: return k + e + D + "flex-" + e + e;
391
- case 5187: return k + e + F(e, /(\w+).+(:[^]+)/, k + "box-$1$2" + D + "flex-$1$2") + e;
392
- case 5443: return k + e + D + "flex-item-" + F(e, /flex-|-self/, "") + e;
393
- case 4675: return k + e + D + "flex-line-pack" + F(e, /align-content|flex-|-self/, "") + e;
394
- case 5548: return k + e + D + F(e, "shrink", "negative") + e;
395
- case 5292: return k + e + D + F(e, "basis", "preferred-size") + e;
396
- case 6060: return k + "box-" + F(e, "-grow", "") + k + e + D + F(e, "grow", "positive") + e;
397
- case 4554: return k + F(e, /([^-])(transform)/g, "$1" + k + "$2") + e;
398
- case 6187: return F(F(F(e, /(zoom-|grab)/, k + "$1"), /(image-set)/, k + "$1"), e, "") + e;
399
- case 5495:
400
- case 3959: return F(e, /(image-set\([^]*)/, k + "$1$`$1");
401
- case 4968: return F(F(e, /(.+:)(flex-)?(.*)/, k + "box-pack:$3" + D + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + k + e + e;
402
- case 4095:
403
- case 3583:
404
- case 4068:
405
- case 2532: return F(e, /(.+)-inline(.+)/, k + "$1$2") + e;
406
- case 8116:
407
- case 7059:
408
- case 5753:
409
- case 5535:
410
- case 5445:
411
- case 5701:
412
- case 4933:
413
- case 4677:
414
- case 5533:
415
- case 5789:
416
- case 5021:
417
- case 4765:
418
- if (L(e) - 1 - t > 6) switch (I(e, t + 1)) {
419
- case 109: if (I(e, t + 4) !== 45) break;
420
- case 102: return F(e, /(.+:)(.+)-([^]+)/, "$1" + k + "$2-$3$1" + O + (I(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
421
- case 115: return ~se(e, "stretch") ? qe(F(e, "stretch", "fill-available"), t) + e : e;
422
- }
423
- break;
424
- case 4949: if (I(e, t + 1) !== 115) break;
425
- case 6444:
426
- switch (I(e, L(e) - 3 - (~se(e, "!important") && 10))) {
427
- case 107: return F(e, ":", ":" + k) + e;
428
- case 101: return F(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + k + (I(e, 14) === 45 ? "inline-" : "") + "box$3$1" + k + "$2$3$1" + D + "$2box$3") + e;
429
- }
430
- break;
431
- case 5936:
432
- switch (I(e, t + 11)) {
433
- case 114: return k + e + D + F(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
434
- case 108: return k + e + D + F(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
435
- case 45: return k + e + D + F(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
436
- }
437
- return k + e + D + e + e;
438
- }
439
- return e;
440
- }
441
- var Je = [function(e, t, n, r) {
442
- if (e.length > -1 && !e.return) switch (e.type) {
443
- case M:
444
- e.return = qe(e.value, e.length);
445
- break;
446
- case te: return Ie([_e(e, { value: F(e.value, "@", "@" + k) })], r);
447
- case j: if (e.length) return de(e.props, function(t) {
448
- switch (oe(t, /(::plac\w+|:read-\w+)/)) {
449
- case ":read-only":
450
- case ":read-write": return Ie([_e(e, { props: [F(t, /:(read-\w+)/, ":" + O + "$1")] })], r);
451
- case "::placeholder": return Ie([
452
- _e(e, { props: [F(t, /:(plac\w+)/, ":" + k + "input-$1")] }),
453
- _e(e, { props: [F(t, /:(plac\w+)/, ":" + O + "$1")] }),
454
- _e(e, { props: [F(t, /:(plac\w+)/, D + "input-$1")] })
455
- ], r);
456
- }
457
- return "";
458
- });
459
- }
460
- }], Ye = function(e) {
461
- var t = e.key;
462
- if (t === "css") {
463
- var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
464
- Array.prototype.forEach.call(n, function(e) {
465
- e.getAttribute("data-emotion").indexOf(" ") !== -1 && (document.head.appendChild(e), e.setAttribute("data-s", ""));
466
- });
467
- }
468
- var r = e.stylisPlugins || Je, i = {}, a, o = [];
469
- a = e.container || document.head, Array.prototype.forEach.call(document.querySelectorAll("style[data-emotion^=\"" + t + " \"]"), function(e) {
470
- for (var t = e.getAttribute("data-emotion").split(" "), n = 1; n < t.length; n++) i[t[n]] = !0;
471
- o.push(e);
472
- });
473
- var s, c = [Ge, Ke], l, u = [Le, ze(function(e) {
474
- l.insert(e);
475
- })], d = Re(c.concat(r, u)), f = function(e) {
476
- return Ie(je(e), d);
477
- };
478
- s = function(e, t, n, r) {
479
- l = n, f(e ? e + "{" + t.styles + "}" : t.styles), r && (p.inserted[t.name] = !0);
480
- };
481
- var p = {
482
- key: t,
483
- sheet: new E({
484
- key: t,
485
- container: a,
486
- nonce: e.nonce,
487
- speedy: e.speedy,
488
- prepend: e.prepend,
489
- insertionPoint: e.insertionPoint
490
- }),
491
- nonce: e.nonce,
492
- inserted: i,
493
- registered: {},
494
- insert: s
495
- };
496
- return p.sheet.hydrate(o), p;
497
- };
498
- // node_modules/@emotion/hash/dist/emotion-hash.esm.js
499
- function Xe(e) {
500
- for (var t = 0, n, r = 0, i = e.length; i >= 4; ++r, i -= 4) n = e.charCodeAt(r) & 255 | (e.charCodeAt(++r) & 255) << 8 | (e.charCodeAt(++r) & 255) << 16 | (e.charCodeAt(++r) & 255) << 24, n = (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= n >>> 24, t = (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
501
- switch (i) {
502
- case 3: t ^= (e.charCodeAt(r + 2) & 255) << 16;
503
- case 2: t ^= (e.charCodeAt(r + 1) & 255) << 8;
504
- case 1: t ^= e.charCodeAt(r) & 255, t = (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
505
- }
506
- return t ^= t >>> 13, t = (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
507
- }
508
- // node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
509
- var Ze = {
510
- animationIterationCount: 1,
511
- aspectRatio: 1,
512
- borderImageOutset: 1,
513
- borderImageSlice: 1,
514
- borderImageWidth: 1,
515
- boxFlex: 1,
516
- boxFlexGroup: 1,
517
- boxOrdinalGroup: 1,
518
- columnCount: 1,
519
- columns: 1,
520
- flex: 1,
521
- flexGrow: 1,
522
- flexPositive: 1,
523
- flexShrink: 1,
524
- flexNegative: 1,
525
- flexOrder: 1,
526
- gridRow: 1,
527
- gridRowEnd: 1,
528
- gridRowSpan: 1,
529
- gridRowStart: 1,
530
- gridColumn: 1,
531
- gridColumnEnd: 1,
532
- gridColumnSpan: 1,
533
- gridColumnStart: 1,
534
- msGridRow: 1,
535
- msGridRowSpan: 1,
536
- msGridColumn: 1,
537
- msGridColumnSpan: 1,
538
- fontWeight: 1,
539
- lineHeight: 1,
540
- opacity: 1,
541
- order: 1,
542
- orphans: 1,
543
- scale: 1,
544
- tabSize: 1,
545
- widows: 1,
546
- zIndex: 1,
547
- zoom: 1,
548
- WebkitLineClamp: 1,
549
- fillOpacity: 1,
550
- floodOpacity: 1,
551
- stopOpacity: 1,
552
- strokeDasharray: 1,
553
- strokeDashoffset: 1,
554
- strokeMiterlimit: 1,
555
- strokeOpacity: 1,
556
- strokeWidth: 1
557
- }, Qe = /[A-Z]|^ms/g, $e = /_EMO_([^_]+?)_([^]*?)_EMO_/g, et = function(e) {
558
- return e.charCodeAt(1) === 45;
559
- }, tt = function(e) {
560
- return e != null && typeof e != "boolean";
561
- }, nt = /* #__PURE__ */ Be(function(e) {
562
- return et(e) ? e : e.replace(Qe, "-$&").toLowerCase();
563
- }), rt = function(e, t) {
564
- switch (e) {
565
- case "animation":
566
- case "animationName": if (typeof t == "string") return t.replace($e, function(e, t, n) {
567
- return H = {
568
- name: t,
569
- styles: n,
570
- next: H
571
- }, t;
572
- });
573
- }
574
- return Ze[e] !== 1 && !et(e) && typeof t == "number" && t !== 0 ? t + "px" : t;
575
- };
576
- function it(e, t, n) {
577
- if (n == null) return "";
578
- var r = n;
579
- if (r.__emotion_styles !== void 0) return r;
580
- switch (typeof n) {
581
- case "boolean": return "";
582
- case "object":
583
- var i = n;
584
- if (i.anim === 1) return H = {
585
- name: i.name,
586
- styles: i.styles,
587
- next: H
588
- }, i.name;
589
- var a = n;
590
- if (a.styles !== void 0) {
591
- var o = a.next;
592
- if (o !== void 0) for (; o !== void 0;) H = {
593
- name: o.name,
594
- styles: o.styles,
595
- next: H
596
- }, o = o.next;
597
- return a.styles + ";";
598
- }
599
- return at(e, t, n);
600
- case "function": if (e !== void 0) {
601
- var s = H, c = n(e);
602
- return H = s, it(e, t, c);
603
- }
604
- }
605
- var l = n;
606
- if (t == null) return l;
607
- var u = t[l];
608
- return u === void 0 ? l : u;
609
- }
610
- function at(e, t, n) {
611
- var r = "";
612
- if (Array.isArray(n)) for (var i = 0; i < n.length; i++) r += it(e, t, n[i]) + ";";
613
- else for (var a in n) {
614
- var o = n[a];
615
- if (typeof o != "object") {
616
- var s = o;
617
- t != null && t[s] !== void 0 ? r += a + "{" + t[s] + "}" : tt(s) && (r += nt(a) + ":" + rt(a, s) + ";");
618
- } else if (Array.isArray(o) && typeof o[0] == "string" && (t == null || t[o[0]] === void 0)) for (var c = 0; c < o.length; c++) tt(o[c]) && (r += nt(a) + ":" + rt(a, o[c]) + ";");
619
- else {
620
- var l = it(e, t, o);
621
- switch (a) {
622
- case "animation":
623
- case "animationName":
624
- r += nt(a) + ":" + l + ";";
625
- break;
626
- default: r += a + "{" + l + "}";
627
- }
628
- }
629
- }
630
- return r;
631
- }
632
- var ot = /label:\s*([^\s;{]+)\s*(;|$)/g, H;
633
- function st(e, t, n) {
634
- if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0) return e[0];
635
- var r = !0, i = "";
636
- H = void 0;
637
- var a = e[0];
638
- a == null || a.raw === void 0 ? (r = !1, i += it(n, t, a)) : i += a[0];
639
- for (var o = 1; o < e.length; o++) i += it(n, t, e[o]), r && (i += a[o]);
640
- ot.lastIndex = 0;
641
- for (var s = "", c; (c = ot.exec(i)) !== null;) s += "-" + c[1];
642
- return {
643
- name: Xe(i) + s,
644
- styles: i,
645
- next: H
646
- };
647
- }
648
- // node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
649
- function ct(e, t, n) {
650
- var r = "";
651
- return n.split(" ").forEach(function(n) {
652
- e[n] === void 0 ? n && (r += n + " ") : t.push(e[n] + ";");
653
- }), r;
654
- }
655
- var lt = function(e, t, n) {
656
- var r = e.key + "-" + t.name;
657
- n === !1 && e.registered[r] === void 0 && (e.registered[r] = t.styles);
658
- }, ut = function(e, t, n) {
659
- lt(e, t, n);
660
- var r = e.key + "-" + t.name;
661
- if (e.inserted[t.name] === void 0) {
662
- var i = t;
663
- do
664
- e.insert(t === i ? "." + r : "", i, e.sheet, !0), i = i.next;
665
- while (i !== void 0);
666
- }
667
- };
668
- // node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
669
- function dt(e, t) {
670
- if (e.inserted[t.name] === void 0) return e.insert("", t, e.sheet, !0);
671
- }
672
- function ft(e, t, n) {
673
- var r = [], i = ct(e, r, n);
674
- return r.length < 2 ? n : i + t(r);
675
- }
676
- var pt = function(e) {
677
- var t = Ye(e);
678
- t.sheet.speedy = function(e) {
679
- this.isSpeedy = e;
680
- }, t.compat = !0;
681
- var n = function() {
682
- var e = st([...arguments], t.registered, void 0);
683
- return ut(t, e, !1), t.key + "-" + e.name;
684
- };
685
- return {
686
- css: n,
687
- cx: function() {
688
- var e = [...arguments];
689
- return ft(t.registered, n, mt(e));
690
- },
691
- injectGlobal: function() {
692
- dt(t, st([...arguments], t.registered));
693
- },
694
- keyframes: function() {
695
- var e = st([...arguments], t.registered), n = "animation-" + e.name;
696
- return dt(t, {
697
- name: e.name,
698
- styles: "@keyframes " + n + "{" + e.styles + "}"
699
- }), n;
700
- },
701
- hydrate: function(e) {
702
- e.forEach(function(e) {
703
- t.inserted[e] = !0;
704
- });
705
- },
706
- flush: function() {
707
- t.registered = {}, t.inserted = {}, t.sheet.flush();
708
- },
709
- sheet: t.sheet,
710
- cache: t,
711
- getRegisteredStyles: ct.bind(null, t.registered),
712
- merge: ft.bind(null, t.registered, n)
713
- };
714
- }, mt = function e(t) {
715
- for (var n = "", r = 0; r < t.length; r++) {
716
- var i = t[r];
717
- if (i != null) {
718
- var a = void 0;
719
- switch (typeof i) {
720
- case "boolean": break;
721
- case "object":
722
- if (Array.isArray(i)) a = e(i);
723
- else for (var o in a = "", i) i[o] && o && (a && (a += " "), a += o);
724
- break;
725
- default: a = i;
726
- }
727
- a && (n && (n += " "), n += a);
728
- }
729
- }
730
- return n;
731
- }, ht = /* @__PURE__ */ C({
732
- cache: () => Tt,
733
- css: () => Ct,
734
- cx: () => vt,
735
- flush: () => gt,
736
- getRegisteredStyles: () => bt,
737
- hydrate: () => _t,
738
- injectGlobal: () => xt,
739
- keyframes: () => St,
740
- merge: () => yt,
741
- sheet: () => wt
742
- }), U = pt({ key: "css" }), gt = U.flush, _t = U.hydrate, vt = U.cx, yt = U.merge, bt = U.getRegisteredStyles, xt = U.injectGlobal, St = U.keyframes, Ct = U.css, wt = U.sheet, Tt = U.cache, Et = globalThis?.UNOVIS_NONCE, { css: W, cx: Dt, injectGlobal: Ot, keyframes: kt, cache: At, sheet: jt } = Et ? pt({
743
- key: "unovis",
744
- nonce: Et
745
- }) : ht;
746
- // node_modules/d3-array/src/identity.js
747
- function Mt(e) {
748
- return e;
749
- }
750
- // node_modules/d3-array/src/group.js
751
- function Nt(e, ...t) {
752
- return It(e, Mt, Mt, t);
753
- }
754
- function Pt(e, ...t) {
755
- return It(e, Mt, Ft, t);
756
- }
757
- function Ft(e) {
758
- if (e.length !== 1) throw Error("duplicate key");
759
- return e[0];
760
- }
761
- function It(e, t, n, i) {
762
- return (function e(a, o) {
763
- if (o >= i.length) return n(a);
764
- let s = new r(), c = i[o++], l = -1;
765
- for (let e of a) {
766
- let t = c(e, ++l, a), n = s.get(t);
767
- n ? n.push(e) : s.set(t, [e]);
768
- }
769
- for (let [t, n] of s) s.set(t, e(n, o));
770
- return t(s);
771
- })(e, 0);
772
- }
773
- // node_modules/throttle-debounce/esm/index.js
774
- function Lt(e, t, n) {
775
- var r = n || {}, i = r.noTrailing, a = i !== void 0 && i, o = r.noLeading, s = o !== void 0 && o, c = r.debounceMode, l = c === void 0 ? void 0 : c, u, d = !1, f = 0;
776
- function p() {
777
- u && clearTimeout(u);
778
- }
779
- function m(e) {
780
- var t = (e || {}).upcomingOnly, n = t !== void 0 && t;
781
- p(), d = !n;
782
- }
783
- function h() {
784
- var n = [...arguments], r = this, i = Date.now() - f;
785
- if (d) return;
786
- function o() {
787
- f = Date.now(), t.apply(r, n);
788
- }
789
- function c() {
790
- u = void 0;
791
- }
792
- !s && l && !u && o(), p(), l === void 0 && i > e ? s ? (f = Date.now(), a || (u = setTimeout(l ? c : o, e))) : o() : a !== !0 && (u = setTimeout(l ? c : o, l === void 0 ? e - i : e));
793
- }
794
- return h.cancel = m, h;
795
- }
796
- // node_modules/@unovis/ts/utils/data.js
797
- var Rt = (e) => typeof e == "number", zt = (e) => typeof e == "function", Bt = (e) => e === void 0, Vt = (e) => typeof e == "string", Ht = (e) => Array.isArray(e), Ut = (e) => e instanceof Object, Wt = (e) => e.constructor.name !== "Function" && e.constructor.name !== "Object", Gt = (e) => Ut(e) && !Ht(e) && !zt(e) && !Wt(e), Kt = (e, t, n = [], r = /* @__PURE__ */ new Set()) => {
798
- if (e === t) return !0;
799
- if (Array.isArray(e)) {
800
- if (!Array.isArray(t) || e.length !== t.length) return !1;
801
- if (r.has(e)) return !0;
802
- r.add(e);
803
- for (let i = 0; i < e.length; i++) if (!Kt(e[i], t[i], n, r)) return !1;
804
- return r.delete(e), !0;
805
- }
806
- if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
807
- if (typeof e == "object" && e && t !== null) {
808
- if (typeof t != "object") return !1;
809
- let i = Object.keys(e).filter((e) => !n.includes(e)), a = Object.keys(t).filter((e) => !n.includes(e));
810
- if (i.length !== a.length) return !1;
811
- if (r.has(e)) return !0;
812
- r.add(e);
813
- for (let a of i) if (!Kt(e[a], t[a], n, r)) return !1;
814
- return r.delete(e), !0;
815
- }
816
- return e === t;
817
- }, qt = (e, t = /* @__PURE__ */ new Map()) => {
818
- if (typeof e != "object" || !e) return e;
819
- if (e instanceof Date) return new Date(e.getTime());
820
- if (e instanceof Array) {
821
- let n = [];
822
- t.set(e, n);
823
- for (let r of e) n.push(t.has(r) ? t.get(r) : qt(r, t));
824
- return n;
825
- }
826
- if (Wt(e)) return e;
827
- if (e instanceof Object) {
828
- let n = {};
829
- t.set(e, n);
830
- let r = e;
831
- return Object.keys(e).reduce((e, n) => (e[n] = t.has(r[n]) ? t.get(r[n]) : qt(r[n], t), e), n), n;
832
- }
833
- return e;
834
- }, Jt = (e, t, n = /* @__PURE__ */ new Map()) => {
835
- if (!e || !t) return e && qt(e);
836
- if (e === t) return e;
837
- let r = Wt(e) ? e : qt(e);
838
- return n.has(t) ? n.get(t) : (n.set(t, r), Object.keys(t).forEach((i) => {
839
- i !== "__proto__" && i !== "constructor" && (Gt(e[i]) && Gt(t[i]) ? r[i] = Jt(e[i], t[i], n) : r[i] = qt(t[i]));
840
- }), r);
841
- }, Yt = (e, t) => e.reduce((e, n, r, i, a = t(n, r)) => ((e[a] || (e[a] = [])).push(n), e), {}), Xt = (e, t, n) => Lt(t, e, n);
842
- function G(e, t, n) {
843
- return zt(t) ? t(e, n) : t;
844
- }
845
- function Zt(e, t, n) {
846
- return G(e, t, n);
847
- }
848
- function K(e, t, n) {
849
- return G(e, t, n);
850
- }
851
- function Qt(e, t, n) {
852
- return Math.min(Math.max(e, t), n);
853
- }
854
- // node_modules/@unovis/ts/types/component.js
855
- var $t = /* @__PURE__ */ ((e) => (e[e.SVG = 0] = "SVG", e[e.HTML = 1] = "HTML", e))($t || {}), q = /* @__PURE__ */ ((e) => (e.Fit = "fit", e.Extend = "extend", e.FitWidth = "fit_width", e))(q || {});
856
- // node_modules/@unovis/ts/utils/to-px.js
857
- function en(e) {
858
- return e = String(e), [parseFloat(e), e.match(/[\d.\-+]*\s*(.*)/)?.[1] || ""];
859
- }
860
- function tn() {
861
- return typeof window < "u" && typeof document < "u";
862
- }
863
- function nn(e, t) {
864
- let n = en(getComputedStyle(e).getPropertyValue(t));
865
- return n[0] * (sn(n[1], e) ?? 1);
866
- }
867
- function rn(e, t) {
868
- let n = document.createElement("div");
869
- n.style.height = `128${e}`, t.appendChild(n);
870
- let r = nn(n, "height") / 128;
871
- return t.removeChild(n), r;
872
- }
873
- var an = null;
874
- function on() {
875
- return tn() ? (an === null && (an = 96, an = rn("in", document.body)), an) : 96;
876
- }
877
- function sn(e, t) {
878
- if (!e && e !== 0) return null;
879
- if (!tn()) {
880
- let t = en(String(e));
881
- if (!isNaN(t[0])) {
882
- let e = t[1]?.toLowerCase() || "px";
883
- if (e === "px" || e === "") return t[0];
884
- if (e === "em" || e === "rem") return t[0] * 16;
885
- if (e === "in") return t[0] * 96;
886
- if (e === "cm") return t[0] * (96 / 2.54);
887
- if (e === "mm") return t[0] * (96 / 25.4);
888
- if (e === "pt") return t[0] * (96 / 72);
889
- if (e === "pc") return t[0] * 16;
890
- }
891
- return null;
892
- }
893
- let n = document.body;
894
- t && t !== window && t !== document && (n = t);
895
- let r = (String(e) || "px").trim().toLowerCase();
896
- switch (r) {
897
- case "%": return n.clientHeight / 100;
898
- case "ch":
899
- case "ex": return rn(r, n);
900
- case "em": return nn(n, "font-size");
901
- case "rem": return nn(document.body, "font-size");
902
- case "vw": return window.innerWidth / 100;
903
- case "vh": return window.innerHeight / 100;
904
- case "vmin": return Math.min(window.innerWidth, window.innerHeight) / 100;
905
- case "vmax": return Math.max(window.innerWidth, window.innerHeight) / 100;
906
- case "in": return on();
907
- case "cm": return on() / 2.54;
908
- case "mm": return on() / 25.4;
909
- case "pt": return on() / 72;
910
- case "pc": return on() / 6;
911
- case "px": return 1;
912
- }
913
- let i = en(r);
914
- if (!isNaN(i[0])) {
915
- if (i[1]) {
916
- let e = sn(i[1], n);
917
- return typeof e == "number" ? i[0] * e : null;
918
- }
919
- return i[0];
920
- }
921
- return null;
922
- }
923
- // node_modules/@unovis/ts/utils/misc.js
924
- function cn() {
925
- let e = () => Math.floor((1 + crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(1))[0]) * 65536).toString(16).substring(1);
926
- return `${e() + e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`;
927
- }
928
- var ln = /* @__PURE__ */ new WeakMap();
929
- function un(e, t) {
930
- if (!Vt(e)) return "";
931
- let n = e.substr(4, e.length - 5), r = ln.get(t);
932
- if (r || (r = /* @__PURE__ */ new Map(), ln.set(t, r)), r.has(n)) return r.get(n);
933
- let i = getComputedStyle(t).getPropertyValue(n);
934
- return r.set(n, i), i;
935
- }
936
- function dn(e, t) {
937
- return sn(un(e, t));
938
- }
939
- function fn(e) {
940
- return typeof e == "number" ? e : sn(e);
941
- }
942
- // node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js
943
- var pn = [], mn = function() {
944
- return pn.some(function(e) {
945
- return e.activeTargets.length > 0;
946
- });
947
- }, hn = function() {
948
- return pn.some(function(e) {
949
- return e.skippedTargets.length > 0;
950
- });
951
- }, gn = "ResizeObserver loop completed with undelivered notifications.", _n = function() {
952
- var e;
953
- typeof ErrorEvent == "function" ? e = new ErrorEvent("error", { message: gn }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = gn), window.dispatchEvent(e);
954
- }, vn;
955
- (function(e) {
956
- e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
957
- })(vn ||= {});
958
- // node_modules/@juggle/resize-observer/lib/utils/freeze.js
959
- var yn = function(e) {
960
- return Object.freeze(e);
961
- }, bn = function() {
962
- function e(e, t) {
963
- this.inlineSize = e, this.blockSize = t, yn(this);
964
- }
965
- return e;
966
- }(), xn = function() {
967
- function e(e, t, n, r) {
968
- return this.x = e, this.y = t, this.width = n, this.height = r, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, yn(this);
969
- }
970
- return e.prototype.toJSON = function() {
971
- var e = this;
972
- return {
973
- x: e.x,
974
- y: e.y,
975
- top: e.top,
976
- right: e.right,
977
- bottom: e.bottom,
978
- left: e.left,
979
- width: e.width,
980
- height: e.height
981
- };
982
- }, e.fromRect = function(t) {
983
- return new e(t.x, t.y, t.width, t.height);
984
- }, e;
985
- }(), Sn = function(e) {
986
- return e instanceof SVGElement && "getBBox" in e;
987
- }, Cn = function(e) {
988
- if (Sn(e)) {
989
- var t = e.getBBox(), n = t.width, r = t.height;
990
- return !n && !r;
991
- }
992
- var i = e, a = i.offsetWidth, o = i.offsetHeight;
993
- return !(a || o || e.getClientRects().length);
994
- }, wn = function(e) {
995
- if (e instanceof Element) return !0;
996
- var t = e?.ownerDocument?.defaultView;
997
- return !!(t && e instanceof t.Element);
998
- }, Tn = function(e) {
999
- switch (e.tagName) {
1000
- case "INPUT": if (e.type !== "image") break;
1001
- case "VIDEO":
1002
- case "AUDIO":
1003
- case "EMBED":
1004
- case "OBJECT":
1005
- case "CANVAS":
1006
- case "IFRAME":
1007
- case "IMG": return !0;
1008
- }
1009
- return !1;
1010
- }, En = typeof window < "u" ? window : {}, Dn = /* @__PURE__ */ new WeakMap(), On = /auto|scroll/, kn = /^tb|vertical/, An = /msie|trident/i.test(En.navigator && En.navigator.userAgent), J = function(e) {
1011
- return parseFloat(e || "0");
1012
- }, jn = function(e, t, n) {
1013
- return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new bn((n ? t : e) || 0, (n ? e : t) || 0);
1014
- }, Mn = yn({
1015
- devicePixelContentBoxSize: jn(),
1016
- borderBoxSize: jn(),
1017
- contentBoxSize: jn(),
1018
- contentRect: new xn(0, 0, 0, 0)
1019
- }), Nn = function(e, t) {
1020
- if (t === void 0 && (t = !1), Dn.has(e) && !t) return Dn.get(e);
1021
- if (Cn(e)) return Dn.set(e, Mn), Mn;
1022
- var n = getComputedStyle(e), r = Sn(e) && e.ownerSVGElement && e.getBBox(), i = !An && n.boxSizing === "border-box", a = kn.test(n.writingMode || ""), o = !r && On.test(n.overflowY || ""), s = !r && On.test(n.overflowX || ""), c = r ? 0 : J(n.paddingTop), l = r ? 0 : J(n.paddingRight), u = r ? 0 : J(n.paddingBottom), d = r ? 0 : J(n.paddingLeft), f = r ? 0 : J(n.borderTopWidth), p = r ? 0 : J(n.borderRightWidth), m = r ? 0 : J(n.borderBottomWidth), h = r ? 0 : J(n.borderLeftWidth), g = d + l, _ = c + u, v = h + p, y = f + m, b = s ? e.offsetHeight - y - e.clientHeight : 0, x = o ? e.offsetWidth - v - e.clientWidth : 0, S = i ? g + v : 0, C = i ? _ + y : 0, w = r ? r.width : J(n.width) - S - x, T = r ? r.height : J(n.height) - C - b, E = w + g + x + v, D = T + _ + b + y, O = yn({
1023
- devicePixelContentBoxSize: jn(Math.round(w * devicePixelRatio), Math.round(T * devicePixelRatio), a),
1024
- borderBoxSize: jn(E, D, a),
1025
- contentBoxSize: jn(w, T, a),
1026
- contentRect: new xn(d, c, w, T)
1027
- });
1028
- return Dn.set(e, O), O;
1029
- }, Pn = function(e, t, n) {
1030
- var r = Nn(e, n), i = r.borderBoxSize, a = r.contentBoxSize, o = r.devicePixelContentBoxSize;
1031
- switch (t) {
1032
- case vn.DEVICE_PIXEL_CONTENT_BOX: return o;
1033
- case vn.BORDER_BOX: return i;
1034
- default: return a;
1035
- }
1036
- }, Fn = function() {
1037
- function e(e) {
1038
- var t = Nn(e);
1039
- this.target = e, this.contentRect = t.contentRect, this.borderBoxSize = yn([t.borderBoxSize]), this.contentBoxSize = yn([t.contentBoxSize]), this.devicePixelContentBoxSize = yn([t.devicePixelContentBoxSize]);
1040
- }
1041
- return e;
1042
- }(), In = function(e) {
1043
- if (Cn(e)) return Infinity;
1044
- for (var t = 0, n = e.parentNode; n;) t += 1, n = n.parentNode;
1045
- return t;
1046
- }, Ln = function() {
1047
- var e = Infinity, t = [];
1048
- pn.forEach(function(n) {
1049
- if (n.activeTargets.length !== 0) {
1050
- var r = [];
1051
- n.activeTargets.forEach(function(t) {
1052
- var n = new Fn(t.target), i = In(t.target);
1053
- r.push(n), t.lastReportedSize = Pn(t.target, t.observedBox), i < e && (e = i);
1054
- }), t.push(function() {
1055
- n.callback.call(n.observer, r, n.observer);
1056
- }), n.activeTargets.splice(0, n.activeTargets.length);
1057
- }
1058
- });
1059
- for (var n = 0, r = t; n < r.length; n++) {
1060
- var i = r[n];
1061
- i();
1062
- }
1063
- return e;
1064
- }, Rn = function(e) {
1065
- pn.forEach(function(t) {
1066
- t.activeTargets.splice(0, t.activeTargets.length), t.skippedTargets.splice(0, t.skippedTargets.length), t.observationTargets.forEach(function(n) {
1067
- n.isActive() && (In(n.target) > e ? t.activeTargets.push(n) : t.skippedTargets.push(n));
1068
- });
1069
- });
1070
- }, zn = function() {
1071
- var e = 0;
1072
- for (Rn(e); mn();) e = Ln(), Rn(e);
1073
- return hn() && _n(), e > 0;
1074
- }, Bn, Vn = [], Hn = function() {
1075
- return Vn.splice(0).forEach(function(e) {
1076
- return e();
1077
- });
1078
- }, Un = function(e) {
1079
- if (!Bn) {
1080
- var t = 0, n = document.createTextNode("");
1081
- new MutationObserver(function() {
1082
- return Hn();
1083
- }).observe(n, { characterData: !0 }), Bn = function() {
1084
- n.textContent = `${t ? t-- : t++}`;
1085
- };
1086
- }
1087
- Vn.push(e), Bn();
1088
- }, Wn = function(e) {
1089
- Un(function() {
1090
- requestAnimationFrame(e);
1091
- });
1092
- }, Gn = 0, Kn = function() {
1093
- return !!Gn;
1094
- }, qn = 250, Jn = {
1095
- attributes: !0,
1096
- characterData: !0,
1097
- childList: !0,
1098
- subtree: !0
1099
- }, Yn = [
1100
- "resize",
1101
- "load",
1102
- "transitionend",
1103
- "animationend",
1104
- "animationstart",
1105
- "animationiteration",
1106
- "keyup",
1107
- "keydown",
1108
- "mouseup",
1109
- "mousedown",
1110
- "mouseover",
1111
- "mouseout",
1112
- "blur",
1113
- "focus"
1114
- ], Xn = function(e) {
1115
- return e === void 0 && (e = 0), Date.now() + e;
1116
- }, Zn = !1, Qn = new (function() {
1117
- function e() {
1118
- var e = this;
1119
- this.stopped = !0, this.listener = function() {
1120
- return e.schedule();
1121
- };
1122
- }
1123
- return e.prototype.run = function(e) {
1124
- var t = this;
1125
- if (e === void 0 && (e = qn), !Zn) {
1126
- Zn = !0;
1127
- var n = Xn(e);
1128
- Wn(function() {
1129
- var r = !1;
1130
- try {
1131
- r = zn();
1132
- } finally {
1133
- if (Zn = !1, e = n - Xn(), !Kn()) return;
1134
- r ? t.run(1e3) : e > 0 ? t.run(e) : t.start();
1135
- }
1136
- });
1137
- }
1138
- }, e.prototype.schedule = function() {
1139
- this.stop(), this.run();
1140
- }, e.prototype.observe = function() {
1141
- var e = this, t = function() {
1142
- return e.observer && e.observer.observe(document.body, Jn);
1143
- };
1144
- document.body ? t() : En.addEventListener("DOMContentLoaded", t);
1145
- }, e.prototype.start = function() {
1146
- var e = this;
1147
- this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), Yn.forEach(function(t) {
1148
- return En.addEventListener(t, e.listener, !0);
1149
- }));
1150
- }, e.prototype.stop = function() {
1151
- var e = this;
1152
- this.stopped ||= (this.observer && this.observer.disconnect(), Yn.forEach(function(t) {
1153
- return En.removeEventListener(t, e.listener, !0);
1154
- }), !0);
1155
- }, e;
1156
- }())(), $n = function(e) {
1157
- !Gn && e > 0 && Qn.start(), Gn += e, !Gn && Qn.stop();
1158
- }, er = function(e) {
1159
- return !Sn(e) && !Tn(e) && getComputedStyle(e).display === "inline";
1160
- }, tr = function() {
1161
- function e(e, t) {
1162
- this.target = e, this.observedBox = t || vn.CONTENT_BOX, this.lastReportedSize = {
1163
- inlineSize: 0,
1164
- blockSize: 0
1165
- };
1166
- }
1167
- return e.prototype.isActive = function() {
1168
- var e = Pn(this.target, this.observedBox, !0);
1169
- return er(this.target) && (this.lastReportedSize = e), this.lastReportedSize.inlineSize !== e.inlineSize || this.lastReportedSize.blockSize !== e.blockSize;
1170
- }, e;
1171
- }(), nr = function() {
1172
- function e(e, t) {
1173
- this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = e, this.callback = t;
1174
- }
1175
- return e;
1176
- }(), rr = /* @__PURE__ */ new WeakMap(), ir = function(e, t) {
1177
- for (var n = 0; n < e.length; n += 1) if (e[n].target === t) return n;
1178
- return -1;
1179
- }, ar = function() {
1180
- function e() {}
1181
- return e.connect = function(e, t) {
1182
- var n = new nr(e, t);
1183
- rr.set(e, n);
1184
- }, e.observe = function(e, t, n) {
1185
- var r = rr.get(e), i = r.observationTargets.length === 0;
1186
- ir(r.observationTargets, t) < 0 && (i && pn.push(r), r.observationTargets.push(new tr(t, n && n.box)), $n(1), Qn.schedule());
1187
- }, e.unobserve = function(e, t) {
1188
- var n = rr.get(e), r = ir(n.observationTargets, t), i = n.observationTargets.length === 1;
1189
- r >= 0 && (i && pn.splice(pn.indexOf(n), 1), n.observationTargets.splice(r, 1), $n(-1));
1190
- }, e.disconnect = function(e) {
1191
- var t = this, n = rr.get(e);
1192
- n.observationTargets.slice().forEach(function(n) {
1193
- return t.unobserve(e, n.target);
1194
- }), n.activeTargets.splice(0, n.activeTargets.length);
1195
- }, e;
1196
- }(), or = function() {
1197
- function e(e) {
1198
- if (arguments.length === 0) throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
1199
- if (typeof e != "function") throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
1200
- ar.connect(this, e);
1201
- }
1202
- return e.prototype.observe = function(e, t) {
1203
- if (arguments.length === 0) throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
1204
- if (!wn(e)) throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
1205
- ar.observe(this, e, t);
1206
- }, e.prototype.unobserve = function(e) {
1207
- if (arguments.length === 0) throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
1208
- if (!wn(e)) throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
1209
- ar.unobserve(this, e);
1210
- }, e.prototype.disconnect = function() {
1211
- ar.disconnect(this);
1212
- }, e.toString = function() {
1213
- return "function ResizeObserver () { [polyfill code] }";
1214
- }, e;
1215
- }(), sr = globalThis.ResizeObserver || or, cr = {
1216
- duration: void 0,
1217
- margin: {
1218
- top: 0,
1219
- bottom: 0,
1220
- left: 0,
1221
- right: 0
1222
- },
1223
- padding: {
1224
- top: 0,
1225
- bottom: 0,
1226
- left: 0,
1227
- right: 0
1228
- },
1229
- sizing: q.Fit,
1230
- width: void 0,
1231
- height: void 0,
1232
- svgDefs: void 0,
1233
- ariaLabel: void 0,
1234
- colorFunction: void 0
1235
- }, lr = class e {
1236
- constructor(t) {
1237
- this._defaultConfig = cr, this._isFirstRender = !0, this._renderAnimationFrameId = null, this._container = t;
1238
- let n = f(this._container);
1239
- n.attr("role", "figure"), this.svg = n.append("svg").style("display", "block").attr("xmlns", "http://www.w3.org/2000/svg").attr("height", e.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden", !0), this._svgDefs = this.svg.append("defs"), this._svgDefsExternal = this.svg.append("defs"), this.element = this.svg.node();
1240
- }
1241
- updateContainer(e) {
1242
- this.prevConfig = this.config, this.config = Jt(this._defaultConfig, e), e?.svgDefs !== this.prevConfig?.svgDefs && (this._svgDefsExternal.selectAll("*").remove(), this._svgDefsExternal.html(e.svgDefs));
1243
- }
1244
- _preRender() {}
1245
- _propagateSizeAndStyleToComponents(e, t) {
1246
- for (let n of e) n && (n.setSize(this.width, this.height, this.containerWidth, this.containerHeight), n.setContainerMargin(t), n.setColorFunction(this.config.colorFunction));
1247
- }
1248
- _render(e) {
1249
- let { config: t } = this;
1250
- f(this._container).attr("aria-label", t.ariaLabel), this._isFirstRender = !1;
1251
- }
1252
- render(e = this.config.duration) {
1253
- let t = this.config.width || this.containerWidth, n = this.config.height || this.containerHeight;
1254
- this.svg.attr("width", t).attr("height", n), this._resizeObserver || this._setUpResizeObserver(), cancelAnimationFrame(this._renderAnimationFrameId), this._renderAnimationFrameId = requestAnimationFrame(() => {
1255
- this._preRender(), this._render(e);
1256
- });
1257
- }
1258
- get containerWidth() {
1259
- return this.config.width ? this.element.clientWidth || fn(this.config.width) || 0 : this._container.clientWidth || this._container.getBoundingClientRect().width;
1260
- }
1261
- get containerHeight() {
1262
- return this.config.height ? this.element.clientHeight || fn(this.config.height) || 0 : this._container.clientHeight || this._container.getBoundingClientRect().height || e.DEFAULT_CONTAINER_HEIGHT;
1263
- }
1264
- get width() {
1265
- return Qt(this.containerWidth - this.config.margin.left - this.config.margin.right, 0, Infinity);
1266
- }
1267
- get height() {
1268
- return Qt(this.containerHeight - this.config.margin.top - this.config.margin.bottom, 0, Infinity);
1269
- }
1270
- _removeAllChildren() {
1271
- for (; this.element.firstChild;) this.element.removeChild(this.element.firstChild);
1272
- }
1273
- _reconcileChildren(e) {
1274
- let t = e.filter(Boolean), n = new Set(t), r = this.element.firstChild;
1275
- for (; r;) {
1276
- let e = r.nextSibling;
1277
- n.has(r) || this.element.removeChild(r), r = e;
1278
- }
1279
- let i = this.element.firstChild;
1280
- for (let e of t) e === i ? i = i.nextSibling : this.element.insertBefore(e, i);
1281
- }
1282
- _onResize() {
1283
- let { config: e } = this;
1284
- (e.sizing === q.Fit || e.sizing === q.FitWidth) && this.render(0);
1285
- }
1286
- _setUpResizeObserver() {
1287
- if (this._resizeObserver) return;
1288
- let e = this._container.getBoundingClientRect();
1289
- this._containerSize = {
1290
- width: e.width,
1291
- height: e.height
1292
- }, this._resizeObserver = new sr((e, t) => {
1293
- cancelAnimationFrame(this._resizeObserverAnimationFrameId), this._resizeObserverAnimationFrameId = requestAnimationFrame(() => {
1294
- let e = this._container.getBoundingClientRect(), t = {
1295
- width: e.width,
1296
- height: e.height
1297
- };
1298
- !Kt(this._containerSize, t) && t.width && t.height && (this._containerSize = t, this._onResize());
1299
- });
1300
- }), this._resizeObserver.observe(this._container);
1301
- }
1302
- destroy() {
1303
- cancelAnimationFrame(this._renderAnimationFrameId), cancelAnimationFrame(this._resizeObserverAnimationFrameId), this._resizeObserver?.disconnect(), this.svg.remove();
1304
- }
1305
- };
1306
- lr.DEFAULT_CONTAINER_HEIGHT = 300;
1307
- var ur = lr, dr = "html[data-theme=\"dark\"],html.dark-theme,body.dark-theme,html.theme-dark,body.theme-dark", Y = globalThis?.UNOVIS_COLORS || [
1308
- "#4D8CFD",
1309
- "#FF6B7E",
1310
- "#F4B83E",
1311
- "#A6CC74",
1312
- "#00C19A",
1313
- "#6859BE"
1314
- ], fr = globalThis?.UNOVIS_COLORS_DARK || [
1315
- "#4D8CFD",
1316
- "#FF6B7E",
1317
- "#FFC16D",
1318
- "#A6CC74",
1319
- "#00C19A",
1320
- "#7887E0"
1321
- ], pr = (e) => `--vis-${Rt(e) ? `color${e % Y.length}` : e}`;
1322
- function mr(e, t = .4) {
1323
- let n = m(e);
1324
- return n.l *= 1 + t, n.formatHex();
1325
- }
1326
- function hr(e, t = .4, n = .6) {
1327
- let r = m(e);
1328
- return r.s *= 1 - n, r.l *= 1 - t, r.formatHex();
1329
- }
1330
- var gr = [
1331
- {
1332
- id: "stripes-diagonal",
1333
- svg: "<path d=\"M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2\" stroke=\"#000\"/>"
1334
- },
1335
- {
1336
- id: "dots",
1337
- svg: "<path d=\"m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3\" fill\"#000\"/>"
1338
- },
1339
- {
1340
- id: "stripes-vertical",
1341
- svg: "<path d=\"M 5,-1 L5,11\" stroke=\"#000\"/>"
1342
- },
1343
- {
1344
- id: "crosshatch",
1345
- svg: "<path d=\"M0 0L10 10ZM10 0L0 10Z\" stroke=\"#000\"/>"
1346
- },
1347
- {
1348
- id: "waves",
1349
- svg: "<path d=\"M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z\" fill=\"#000\"/>"
1350
- },
1351
- {
1352
- id: "circles",
1353
- svg: "<circle cx=\"5\" cy=\"5\" r=\"3\" stroke=\"#000\" fill=\"#fff\"/>"
1354
- }
1355
- ], _r = [
1356
- {
1357
- id: "circle",
1358
- marker: "<circle cx=\"5\" cy=\"5\" r=\"5\"/>",
1359
- dashArray: []
1360
- },
1361
- {
1362
- id: "triangle",
1363
- marker: "<path d=\"M5,0 L10,9 L0,9Z\">",
1364
- dashArray: [9, 1]
1365
- },
1366
- {
1367
- id: "diamond",
1368
- marker: "<path d=\"M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z\">",
1369
- dashArray: [2]
1370
- },
1371
- {
1372
- id: "arrow",
1373
- marker: "<path d=\"M4 0 0 0 6 5 0 10 4 10 10 5Z\">",
1374
- dashArray: [
1375
- 2,
1376
- 3,
1377
- 8,
1378
- 3
1379
- ]
1380
- },
1381
- {
1382
- id: "square",
1383
- marker: "<rect x=\"1\" y=\"1\" width=\"8\" height=\"8\"/>",
1384
- dashArray: [6]
1385
- },
1386
- {
1387
- id: "star",
1388
- marker: "<path d=\"m2 9 3-9 3 9L0 3h10Z\"/>",
1389
- dashArray: [1, 6]
1390
- }
1391
- ], vr = new Map(gr.map((e) => [e.id, e])), yr = new Map(_r.map((e) => [e.id, e]));
1392
- function br(e) {
1393
- return `vis-${`pattern-${e.svg ? "fill" : "marker"}`}-${e.id}`;
1394
- }
1395
- function xr(e) {
1396
- return `vis-pattern-fill-${e}`;
1397
- }
1398
- function Sr(e) {
1399
- return `vis-pattern-marker-${e}`;
1400
- }
1401
- function Cr(e) {
1402
- return `vis-pattern-marker-ctx-${e}`;
1403
- }
1404
- function wr(e) {
1405
- return vr.get(e) ?? yr.get(e) ?? null;
1406
- }
1407
- var Tr = (e) => `<mask id="${xr(e.id)}">
1408
- <pattern id="vis-pattern-tile-${e.id}" viewBox="0 0 10 10" width="10" height="10" patternUnits="userSpaceOnUse">
1409
- <rect width="10" height="10" fill="#fff"/>
1410
- ${e.svg}
1411
- </pattern>
1412
- <rect x="-100000" y="-100000" width="200000" height="200000" fill="url(#vis-pattern-tile-${e.id})"/>
1413
- </mask>`, Er = (e, t) => `<marker id="${Sr(e.id)}"
1414
- fill="var(${pr(t)})"
1415
- markerUnits="userSpaceOnUse"
1416
- refX="5"
1417
- refY="5"
1418
- markerWidth="10"
1419
- markerHeight="10">
1420
- ${e.marker}
1421
- </marker>`, Dr = (e) => `<marker id="${Cr(e.id)}"
1422
- fill="context-stroke"
1423
- markerUnits="userSpaceOnUse"
1424
- refX="5"
1425
- refY="5"
1426
- markerWidth="10"
1427
- markerHeight="10">
1428
- ${e.marker}
1429
- </marker>`;
1430
- function Or() {
1431
- let e = _r.map((e, t) => Er(e, t)).concat(_r.map(Dr)), t = gr.map(Tr).concat(e).join(""), n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1432
- n.setAttribute("height", "0"), n.setAttribute("width", "0"), n.style.position = "fixed", n.style.zIndex = "-99999999", n.innerHTML = `<defs>${t}</defs>`, document.body.appendChild(n);
1433
- }
1434
- typeof window < "u" && Or();
1435
- // node_modules/d3-scale/src/pow.js
1436
- function kr(e) {
1437
- return function(t) {
1438
- return t < 0 ? -((-t) ** +e) : t ** +e;
1439
- };
1440
- }
1441
- function Ar(e) {
1442
- return e < 0 ? -Math.sqrt(-e) : Math.sqrt(e);
1443
- }
1444
- function jr(e) {
1445
- return e < 0 ? -e * e : e * e;
1446
- }
1447
- function Mr(e) {
1448
- var t = e(n, n), r = 1;
1449
- function a() {
1450
- return r === 1 ? e(n, n) : r === .5 ? e(Ar, jr) : e(kr(r), kr(1 / r));
1451
- }
1452
- return t.exponent = function(e) {
1453
- return arguments.length ? (r = +e, a()) : r;
1454
- }, i(t);
1455
- }
1456
- function Nr() {
1457
- var n = Mr(e());
1458
- return n.copy = function() {
1459
- return o(n, Nr()).exponent(n.exponent());
1460
- }, t.apply(n, arguments), n;
1461
- }
1462
- // node_modules/@unovis/ts/utils/color.js
1463
- var Pr = s().range(Array.from({ length: Y.length }, (e, t) => `var(${pr(t)})`)).domain(Array.from({ length: Y.length }, (e, t) => t));
1464
- function Fr(e, t, n, r, i) {
1465
- if (Array.isArray(t) && isFinite(n)) return t[n % t.length];
1466
- let a;
1467
- if (a = zt(t) ? t(e, n, r) : t, a) return a;
1468
- let o = i?.colorFn ?? Pr;
1469
- if (typeof r == "string" && r) return o(r);
1470
- let s = i?.dontFallbackToCssVar ?? r === !0;
1471
- return Rt(n) && !s ? o(n % Y.length) : null;
1472
- }
1473
- function Ir(e) {
1474
- let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
1475
- return t ? {
1476
- r: parseInt(t[1], 16),
1477
- g: parseInt(t[2], 16),
1478
- b: parseInt(t[3], 16)
1479
- } : {
1480
- r: 0,
1481
- g: 0,
1482
- b: 0
1483
- };
1484
- }
1485
- function Lr(e) {
1486
- return (.2126 * e.r + .7152 * e.g + .0722 * e.b) / 255;
1487
- }
1488
- function Rr(e) {
1489
- return Lr(Ir(e));
1490
- }
1491
- // node_modules/@unovis/ts/utils/pattern.js
1492
- var zr = "unovis-pattern-index";
1493
- function Br(e, t, n) {
1494
- let r = G(e, t, n);
1495
- return r ? wr(r) : null;
1496
- }
1497
- function Vr(e) {
1498
- return !e || !("svg" in e) ? null : `url(#${xr(e.id)})`;
1499
- }
1500
- globalThis?.UNOVIS_ICON_FONT_FAMILY;
1501
- var Hr = globalThis?.UNOVIS_FONT_W2H_RATIO_DEFAULT || .5;
1502
- globalThis?.UNOVIS_TEXT_SEPARATOR_DEFAULT, globalThis?.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT;
1503
- var Ur = globalThis?.UNOVIS_TEXT_DEFAULT_FONT_SIZE || 12, Wr = globalThis?.UNOVIS_TEXT_DEFAULT || {
1504
- text: "",
1505
- fontSize: Ur,
1506
- fontFamily: "var(--vis-font-family)",
1507
- lineHeight: 1.25,
1508
- marginTop: 0,
1509
- marginBottom: 0
1510
- };
1511
- Ot`
1512
- :root {
1513
- label: vis-root-styles;
1514
- --vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
1515
- --vis-font-wh-ratio: ${Hr};
1516
- --vis-color-main: var(${pr(0)});
1517
- --vis-color-main-light: ${mr(Y[0])};
1518
- --vis-color-main-dark: ${hr(Y[0])};
1519
- --vis-color-grey: #2a2a2a;
1520
- ${Y.map((e, t) => `${pr(t)}: ${e};`)}
1521
- ${fr.map((e, t) => `--vis-dark-color${t}: ${e};`)}
1522
- ${gr.map((e, t) => `
1523
- --${br(e)}: url(#${br(e)});
1524
- --vis-pattern-fill${t}: var(--${br(e)});
1525
- `)}
1526
- ${_r.map((e, t) => `
1527
- --${br(e)}: url(#${br(e)});
1528
- --vis-pattern-marker${t}: var(--${br(e)});
1529
- --vis-pattern-dasharray${t}: ${e.dashArray?.join(" ")};
1530
- `)}
1531
-
1532
- ${dr} {
1533
- ${Y.map((e, t) => `${pr(t)}: var(--vis-dark-color${t});`)}
1534
- }
1535
-
1536
- body.theme-patterns {
1537
- ${gr.map((e, t) => `path[${zr}="${t}"][style*="fill"]:not([style*="mask"]) {
1538
- mask: var(--vis-pattern-fill${t});
1539
- }`)}
1540
- ${_r.map((e, t) => `
1541
- path[${zr}="${t}"]:not([style*="fill"]):not([style*="marker"]) {
1542
- marker: var(--vis-pattern-marker${t});
1543
- stroke-dasharray: var(--vis-pattern-dasharray${t});
1544
- }
1545
- `)}
1546
- }
1547
- `;
1548
- function Gr(e = window?.document.body) {
1549
- return e ? +un("var(--vis-font-wh-ratio)", e) : Hr;
1550
- }
1551
- // node_modules/@unovis/ts/types/text.js
1552
- var Kr = /* @__PURE__ */ ((e) => (e.Start = "start", e.Middle = "middle", e.End = "end", e))(Kr || {}), qr = 5e3;
1553
- function Jr(e, t, n) {
1554
- if (e.size >= qr && !e.has(t)) {
1555
- let t = e.keys().next().value;
1556
- t !== void 0 && e.delete(t);
1557
- }
1558
- e.set(t, n);
1559
- }
1560
- // node_modules/@unovis/ts/utils/text-measure.js
1561
- var Yr = "", Xr = /* @__PURE__ */ new Map(), Zr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new Map(), $r = globalThis?.document?.createElement("canvas").getContext("2d") ?? null, ei = (e, t) => `${t}${Yr}${e}`;
1562
- function ti() {
1563
- Xr.clear(), Qr.clear();
1564
- }
1565
- globalThis?.document?.fonts?.ready?.then(ti);
1566
- function ni(e, t, n = Gr()) {
1567
- return e.length * t * n || 0;
1568
- }
1569
- function ri(e, t) {
1570
- if ($r) return $r.font !== t && ($r.font = t), $r.measureText(e).width;
1571
- let n = /(\d*\.?\d+)(px|pt|pc|rem|em|ex|ch|cm|mm|in|vmin|vmax|vw|vh|%)/.exec(t)?.[0];
1572
- return ni(e, sn(n) ?? Ur, Gr());
1573
- }
1574
- function ii(e) {
1575
- let t = "", n = e;
1576
- for (; n && (t += `${Yr}${n.getAttribute("class") || ""};${n.getAttribute("style") || ""}`, n.localName !== "svg");) n = n.parentElement;
1577
- return t;
1578
- }
1579
- function ai(e) {
1580
- let t = Zr.get(e);
1581
- if (t) return t;
1582
- let n = ii(e);
1583
- if (t = Qr.get(n), t) return Zr.set(e, t), t;
1584
- let r = window.getComputedStyle(e), i = r.fontSize || `${Ur}px`, a = r.fontFamily || "sans-serif";
1585
- return t = {
1586
- font: `${r.fontStyle || "normal"} ${r.fontWeight || "normal"} ${i} ${a}`,
1587
- fontFamily: a,
1588
- fontSizePx: sn(i)
1589
- }, Jr(Qr, n, t), Zr.set(e, t), t;
1590
- }
1591
- function oi(e) {
1592
- let t = e.textContent || "", { font: n } = ai(e), r = ei(t, n), i = Xr.get(r);
1593
- if (i !== void 0) return i;
1594
- let a = $r ? ri(t, n) : e.getComputedTextLength();
1595
- return Jr(Xr, r, a), a;
1596
- }
1597
- // node_modules/@unovis/ts/utils/text.js
1598
- function si(e, t = 15) {
1599
- return e ? e.length > t ? `…${e.substr(e.length - t, t)}` : e : "";
1600
- }
1601
- function ci(e, t = 15) {
1602
- if (!e) return "";
1603
- let n = Math.floor((t - 3) / 2);
1604
- return e.length > t ? `${e.substr(0, n)}…${e.substr(-n, n)}` : e;
1605
- }
1606
- function li(e, t = 15) {
1607
- return e ? e.length > t ? `${e.substr(0, t)}…` : e : "";
1608
- }
1609
- function ui(e, t = 15, n = Kr.Middle) {
1610
- if (!e) return "";
1611
- let r = li(e, t);
1612
- return n === Kr.Start ? r = si(e, t) : n === Kr.Middle && (r = ci(e, t)), r;
1613
- }
1614
- function di(e, t = 50, n = Kr.Middle, r = !1, i = sn(window.getComputedStyle(e.node())?.fontSize || Wr.fontSize), a = Gr()) {
1615
- let o = e.text() || "", s = o.length;
1616
- if (!s) return !1;
1617
- if (r) {
1618
- let r = ni(o, i, a), c = Math.ceil(s * t / (1.1 * r));
1619
- return c < s && (e.text(ui(o, c, n)), !0);
1620
- }
1621
- let c = e.node();
1622
- if (oi(c) <= t) return !1;
1623
- let l = 0, u = s, d = 0;
1624
- for (; l <= u;) {
1625
- let r = l + u >> 1;
1626
- e.text(ui(o, r, n)), oi(c) <= t ? (d = r, l = r + 1) : u = r - 1;
1627
- }
1628
- return e.text(ui(o, d, n)), !0;
1629
- }
1630
- // node_modules/@unovis/ts/utils/d3.js
1631
- function X(e, t, n) {
1632
- if (e.nodes().forEach((e) => d(e)), t) {
1633
- let r = e.transition().duration(t);
1634
- return n && r.ease(n), r;
1635
- }
1636
- return e;
1637
- }
1638
- // node_modules/@unovis/ts/containers/single-container/config.js
1639
- var fi = {
1640
- ...cr,
1641
- tooltip: void 0,
1642
- annotations: void 0
1643
- }, pi = class extends ur {
1644
- constructor(e, t, n) {
1645
- super(e), this._defaultConfig = fi, this.config = this._defaultConfig, t && (this.updateContainer(t, !0), this.component = t.component), n && this.setData(n, !0), this.component?.datamodel.data && this.render();
1646
- }
1647
- setData(e, t) {
1648
- let { config: n } = this, r = this.component?.datamodel.data !== e;
1649
- this.component && this.component.setData(e), t || this.render(), r && n.tooltip?.hide();
1650
- }
1651
- updateContainer(e, t) {
1652
- super.updateContainer(e), this.component = e.component, e.sizing && (this.component.sizing = e.sizing);
1653
- let n = e.tooltip;
1654
- n && (n.hasContainer() || n.setContainer(this._container), n.setComponents([this.component])), this._reconcileChildren([
1655
- this.component?.element,
1656
- e.annotations?.element,
1657
- this._svgDefs.node(),
1658
- this._svgDefsExternal.node()
1659
- ]), t || this.render();
1660
- }
1661
- updateComponent(e, t) {
1662
- this.component.setConfig(e), t || this.render();
1663
- }
1664
- update(e, t, n) {
1665
- e && this.updateContainer(e, !0), t && this.updateComponent(t, !0), n && this.setData(n, !0), this.render();
1666
- }
1667
- getFitWidthScale() {
1668
- let { config: e, component: t } = this, n = t;
1669
- if (!n.getWidth) return 1;
1670
- let r = n.getWidth() + e.margin.left + e.margin.right;
1671
- return this.width / r;
1672
- }
1673
- _preRender() {
1674
- let { config: e } = this;
1675
- super._preRender(), this._propagateSizeAndStyleToComponents([this.component, e.annotations], e.margin);
1676
- }
1677
- _render(e) {
1678
- let { config: t, component: n } = this;
1679
- super._render(e), n.g.attr("transform", `translate(${t.margin.left},${t.margin.top})`), n.render(e), t.annotations?.render(e), t.tooltip && t.tooltip.update(), t.onRenderComplete?.(this.svg.node(), t.margin, this.containerWidth, this.containerHeight, this.width, this.height);
1680
- }
1681
- render(e = this.config.duration) {
1682
- let { config: t, component: n } = this;
1683
- if (t.sizing === q.Extend || t.sizing === q.FitWidth) {
1684
- let r = t.sizing === q.FitWidth, i = n, a = i.getWidth() + t.margin.left + t.margin.right, o = i.getHeight() + t.margin.top + t.margin.bottom, s = r ? this.getFitWidthScale() : 1, c = this.svg.attr("width"), l = this.svg.attr("height"), u = a * s, d = o * s, f = c || l;
1685
- X(this.svg, f ? e : 0).attr("width", u).attr("height", d).attr("viewBox", `0 0 ${a} ${r ? d : o}`).attr("preserveAspectRatio", "xMinYMin");
1686
- } else this.svg.attr("width", this.config.width || this.containerWidth).attr("height", this.config.height || this.containerHeight);
1687
- this._resizeObserver || this._setUpResizeObserver(), cancelAnimationFrame(this._renderAnimationFrameId), this._renderAnimationFrameId = requestAnimationFrame(() => {
1688
- this._preRender(), this._render(e);
1689
- });
1690
- }
1691
- _onResize() {
1692
- let { config: e } = this;
1693
- super._onResize(), e.tooltip?.hide();
1694
- }
1695
- destroy() {
1696
- let { component: e, config: t } = this;
1697
- super.destroy(), e?.destroy(), t.tooltip?.destroy(), t.annotations?.destroy();
1698
- }
1699
- }, mi = class {
1700
- get data() {
1701
- return this._data;
1702
- }
1703
- set data(e) {
1704
- this._data = e;
1705
- }
1706
- constructor(e) {
1707
- this.data = e;
1708
- }
1709
- }, hi = {
1710
- duration: 600,
1711
- events: {},
1712
- attributes: {}
1713
- }, gi = class {
1714
- constructor(e = $t.SVG) {
1715
- this.type = $t.SVG, this.datamodel = new mi(), this.sizing = q.Fit, this.events = {}, this._defaultConfig = hi, this._width = 400, this._height = 200, this._containerWidth = void 0, this._containerHeight = void 0, this._containerMargin = {
1716
- top: 0,
1717
- bottom: 0,
1718
- left: 0,
1719
- right: 0
1720
- }, this._colorFunction = void 0, this._setUpComponentEventsThrottled = Xt(this._setUpComponentEvents, 500), this._setCustomAttributesThrottled = Xt(this._setCustomAttributes, 500), this.element = e === $t.SVG ? document.createElementNS("http://www.w3.org/2000/svg", "g") : document.createElement("div"), this.uid = cn(), this.g = f(this.element);
1721
- let t = this.constructor?.selectors?.root;
1722
- t && this.g.attr("class", t);
1723
- }
1724
- setContainerMargin(e) {
1725
- this._containerMargin = e;
1726
- }
1727
- setColorFunction(e) {
1728
- this._colorFunction = e;
1729
- }
1730
- setConfig(e) {
1731
- this.prevConfig = this.config, this.config = Jt(this._defaultConfig, e);
1732
- }
1733
- setData(e) {
1734
- this.datamodel.data = e;
1735
- }
1736
- setSize(e, t, n, r) {
1737
- isFinite(e) && (this._width = e), isFinite(t) && (this._height = t), isFinite(n) && (this._containerWidth = n), isFinite(r) && (this._containerHeight = r);
1738
- }
1739
- render(e = this.config.duration) {
1740
- this._render(e);
1741
- let t = "animating";
1742
- e && (this.g.attr(t, ""), this.g.transition(t).duration(e).on("end interrupt", () => {
1743
- this.g.attr(t, null);
1744
- })), this._setUpComponentEventsThrottled(), this._setCustomAttributesThrottled();
1745
- }
1746
- get bleed() {
1747
- return {
1748
- top: 0,
1749
- bottom: 0,
1750
- left: 0,
1751
- right: 0
1752
- };
1753
- }
1754
- _render(e = this.config.duration) {}
1755
- _setCustomAttributes() {
1756
- let e = this.config.attributes;
1757
- Object.keys(e).forEach((t) => {
1758
- Object.keys(e[t]).forEach((n) => {
1759
- this.g.selectAll(`.${t}`).attr(n, e[t][n]);
1760
- });
1761
- });
1762
- }
1763
- _setUpComponentEvents() {
1764
- this._bindEvents(() => this.events), this._bindEvents(() => this.config.events, ".user");
1765
- }
1766
- _mapEventDatum(e, t) {
1767
- return {
1768
- datum: e,
1769
- index: t
1770
- };
1771
- }
1772
- _bindEvents(e, t = "") {
1773
- let n = e() ?? {};
1774
- Object.keys(n).forEach((r) => {
1775
- Object.keys(n[r]).forEach((n) => {
1776
- let i = this.g.selectAll(`.${r}`), a = i.nodes();
1777
- i.on(n + t, (t, i) => {
1778
- let o = e()?.[r]?.[n];
1779
- if (!o) return;
1780
- let s = a.indexOf(t.currentTarget), { datum: c, index: l } = this._mapEventDatum(i, s);
1781
- return o(c, t, l, a);
1782
- });
1783
- });
1784
- });
1785
- }
1786
- _onDestroy() {}
1787
- destroy() {
1788
- this.isDestroyed() || (this._onDestroy(), this.g?.remove(), this.element = void 0);
1789
- }
1790
- isDestroyed() {
1791
- return !this.element;
1792
- }
1793
- }, _i = Math.abs, Z = Math.atan2, vi = Math.cos, yi = Math.max, bi = Math.min, Q = Math.sin, xi = Math.sqrt, Si = Math.PI, Ci = Si / 2, wi = 2 * Si;
1794
- function Ti(e) {
1795
- return e > 1 ? 0 : e < -1 ? Si : Math.acos(e);
1796
- }
1797
- function Ei(e) {
1798
- return e >= 1 ? Ci : e <= -1 ? -Ci : Math.asin(e);
1799
- }
1800
- // node_modules/d3-shape/src/arc.js
1801
- function Di(e) {
1802
- return e.innerRadius;
1803
- }
1804
- function Oi(e) {
1805
- return e.outerRadius;
1806
- }
1807
- function ki(e) {
1808
- return e.startAngle;
1809
- }
1810
- function Ai(e) {
1811
- return e.endAngle;
1812
- }
1813
- function ji(e) {
1814
- return e && e.padAngle;
1815
- }
1816
- function Mi(e, t, n, r, i, a, o, s) {
1817
- var c = n - e, l = r - t, u = o - i, d = s - a, f = d * c - u * l;
1818
- if (!(f * f < 1e-12)) return f = (u * (t - a) - d * (e - i)) / f, [e + f * c, t + f * l];
1819
- }
1820
- function Ni(e, t, n, r, i, a, o) {
1821
- var s = e - n, c = t - r, l = (o ? a : -a) / xi(s * s + c * c), u = l * c, d = -l * s, f = e + u, p = t + d, m = n + u, h = r + d, g = (f + m) / 2, _ = (p + h) / 2, v = m - f, y = h - p, b = v * v + y * y, x = i - a, S = f * h - m * p, C = (y < 0 ? -1 : 1) * xi(yi(0, x * x * b - S * S)), w = (S * y - v * C) / b, T = (-S * v - y * C) / b, E = (S * y + v * C) / b, D = (-S * v + y * C) / b, O = w - g, k = T - _, A = E - g, j = D - _;
1822
- return O * O + k * k > A * A + j * j && (w = E, T = D), {
1823
- cx: w,
1824
- cy: T,
1825
- x01: -u,
1826
- y01: -d,
1827
- x11: w * (i / x - 1),
1828
- y11: T * (i / x - 1)
1829
- };
1830
- }
1831
- function Pi() {
1832
- var e = Di, t = Oi, n = h(0), r = null, i = ki, a = Ai, o = ji, s = null, c = y(l);
1833
- function l() {
1834
- var l, u, d = +e.apply(this, arguments), f = +t.apply(this, arguments), p = i.apply(this, arguments) - Ci, m = a.apply(this, arguments) - Ci, h = _i(m - p), g = m > p;
1835
- if (s ||= l = c(), f < d && (u = f, f = d, d = u), !(f > 1e-12)) s.moveTo(0, 0);
1836
- else if (h > wi - 1e-12) s.moveTo(f * vi(p), f * Q(p)), s.arc(0, 0, f, p, m, !g), d > 1e-12 && (s.moveTo(d * vi(m), d * Q(m)), s.arc(0, 0, d, m, p, g));
1837
- else {
1838
- var _ = p, v = m, y = p, b = m, x = h, S = h, C = o.apply(this, arguments) / 2, w = C > 1e-12 && (r ? +r.apply(this, arguments) : xi(d * d + f * f)), T = bi(_i(f - d) / 2, +n.apply(this, arguments)), E = T, D = T, O, k;
1839
- if (w > 1e-12) {
1840
- var A = Ei(w / d * Q(C)), j = Ei(w / f * Q(C));
1841
- (x -= A * 2) > 1e-12 ? (A *= g ? 1 : -1, y += A, b -= A) : (x = 0, y = b = (p + m) / 2), (S -= j * 2) > 1e-12 ? (j *= g ? 1 : -1, _ += j, v -= j) : (S = 0, _ = v = (p + m) / 2);
1842
- }
1843
- var M = f * vi(_), ee = f * Q(_), te = d * vi(b), ne = d * Q(b);
1844
- if (T > 1e-12) {
1845
- var re = f * vi(v), N = f * Q(v), ie = d * vi(y), ae = d * Q(y), P;
1846
- if (h < Si) {
1847
- if (P = Mi(M, ee, ie, ae, re, N, te, ne)) {
1848
- var oe = M - P[0], F = ee - P[1], se = re - P[0], I = N - P[1], ce = 1 / Q(Ti((oe * se + F * I) / (xi(oe * oe + F * F) * xi(se * se + I * I))) / 2), L = xi(P[0] * P[0] + P[1] * P[1]);
1849
- E = bi(T, (d - L) / (ce - 1)), D = bi(T, (f - L) / (ce + 1));
1850
- } else E = D = 0;
1851
- }
1852
- }
1853
- S > 1e-12 ? D > 1e-12 ? (O = Ni(ie, ae, M, ee, f, D, g), k = Ni(re, N, te, ne, f, D, g), s.moveTo(O.cx + O.x01, O.cy + O.y01), D < T ? s.arc(O.cx, O.cy, D, Z(O.y01, O.x01), Z(k.y01, k.x01), !g) : (s.arc(O.cx, O.cy, D, Z(O.y01, O.x01), Z(O.y11, O.x11), !g), s.arc(0, 0, f, Z(O.cy + O.y11, O.cx + O.x11), Z(k.cy + k.y11, k.cx + k.x11), !g), s.arc(k.cx, k.cy, D, Z(k.y11, k.x11), Z(k.y01, k.x01), !g))) : (s.moveTo(M, ee), s.arc(0, 0, f, _, v, !g)) : s.moveTo(M, ee), !(d > 1e-12) || !(x > 1e-12) ? s.lineTo(te, ne) : E > 1e-12 ? (O = Ni(te, ne, re, N, d, -E, g), k = Ni(M, ee, ie, ae, d, -E, g), s.lineTo(O.cx + O.x01, O.cy + O.y01), E < T ? s.arc(O.cx, O.cy, E, Z(O.y01, O.x01), Z(k.y01, k.x01), !g) : (s.arc(O.cx, O.cy, E, Z(O.y01, O.x01), Z(O.y11, O.x11), !g), s.arc(0, 0, d, Z(O.cy + O.y11, O.cx + O.x11), Z(k.cy + k.y11, k.cx + k.x11), g), s.arc(k.cx, k.cy, E, Z(k.y11, k.x11), Z(k.y01, k.x01), !g))) : s.arc(0, 0, d, b, y, g);
1854
- }
1855
- if (s.closePath(), l) return s = null, l + "" || null;
1856
- }
1857
- return l.centroid = function() {
1858
- var n = (+e.apply(this, arguments) + +t.apply(this, arguments)) / 2, r = (+i.apply(this, arguments) + +a.apply(this, arguments)) / 2 - Si / 2;
1859
- return [vi(r) * n, Q(r) * n];
1860
- }, l.innerRadius = function(t) {
1861
- return arguments.length ? (e = typeof t == "function" ? t : h(+t), l) : e;
1862
- }, l.outerRadius = function(e) {
1863
- return arguments.length ? (t = typeof e == "function" ? e : h(+e), l) : t;
1864
- }, l.cornerRadius = function(e) {
1865
- return arguments.length ? (n = typeof e == "function" ? e : h(+e), l) : n;
1866
- }, l.padRadius = function(e) {
1867
- return arguments.length ? (r = e == null ? null : typeof e == "function" ? e : h(+e), l) : r;
1868
- }, l.startAngle = function(e) {
1869
- return arguments.length ? (i = typeof e == "function" ? e : h(+e), l) : i;
1870
- }, l.endAngle = function(e) {
1871
- return arguments.length ? (a = typeof e == "function" ? e : h(+e), l) : a;
1872
- }, l.padAngle = function(e) {
1873
- return arguments.length ? (o = typeof e == "function" ? e : h(+e), l) : o;
1874
- }, l.context = function(e) {
1875
- return arguments.length ? (s = e ?? null, l) : s;
1876
- }, l;
1877
- }
1878
- // node_modules/d3-shape/src/curve/linear.js
1879
- function Fi(e) {
1880
- this._context = e;
1881
- }
1882
- Fi.prototype = {
1883
- areaStart: function() {
1884
- this._line = 0;
1885
- },
1886
- areaEnd: function() {
1887
- this._line = NaN;
1888
- },
1889
- lineStart: function() {
1890
- this._point = 0;
1891
- },
1892
- lineEnd: function() {
1893
- (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
1894
- },
1895
- point: function(e, t) {
1896
- switch (e = +e, t = +t, this._point) {
1897
- case 0:
1898
- this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
1899
- break;
1900
- case 1: this._point = 2;
1901
- default: this._context.lineTo(e, t);
1902
- }
1903
- }
1904
- };
1905
- function Ii(e) {
1906
- return new Fi(e);
1907
- }
1908
- // node_modules/d3-shape/src/line.js
1909
- function Li(e, t) {
1910
- var n = h(!0), r = null, i = Ii, a = null, o = y(s);
1911
- e = typeof e == "function" ? e : e === void 0 ? b : h(e), t = typeof t == "function" ? t : t === void 0 ? v : h(t);
1912
- function s(s) {
1913
- var c, l = (s = g(s)).length, u, d = !1, f;
1914
- for (r ?? (a = i(f = o())), c = 0; c <= l; ++c) !(c < l && n(u = s[c], c, s)) === d && ((d = !d) ? a.lineStart() : a.lineEnd()), d && a.point(+e(u, c, s), +t(u, c, s));
1915
- if (f) return a = null, f + "" || null;
1916
- }
1917
- return s.x = function(t) {
1918
- return arguments.length ? (e = typeof t == "function" ? t : h(+t), s) : e;
1919
- }, s.y = function(e) {
1920
- return arguments.length ? (t = typeof e == "function" ? e : h(+e), s) : t;
1921
- }, s.defined = function(e) {
1922
- return arguments.length ? (n = typeof e == "function" ? e : h(!!e), s) : n;
1923
- }, s.curve = function(e) {
1924
- return arguments.length ? (i = e, r != null && (a = i(r)), s) : i;
1925
- }, s.context = function(e) {
1926
- return arguments.length ? (e == null ? r = a = null : a = i(r = e), s) : r;
1927
- }, s;
1928
- }
1929
- // node_modules/d3-shape/src/area.js
1930
- function Ri(e, t, n) {
1931
- var r = null, i = h(!0), a = null, o = Ii, s = null, c = y(l);
1932
- e = typeof e == "function" ? e : e === void 0 ? b : h(+e), t = typeof t == "function" ? t : h(t === void 0 ? 0 : +t), n = typeof n == "function" ? n : n === void 0 ? v : h(+n);
1933
- function l(l) {
1934
- var u, d, f, p = (l = g(l)).length, m, h = !1, _, v = Array(p), y = Array(p);
1935
- for (a ?? (s = o(_ = c())), u = 0; u <= p; ++u) {
1936
- if (!(u < p && i(m = l[u], u, l)) === h) {
1937
- if (h = !h) d = u, s.areaStart(), s.lineStart();
1938
- else {
1939
- for (s.lineEnd(), s.lineStart(), f = u - 1; f >= d; --f) s.point(v[f], y[f]);
1940
- s.lineEnd(), s.areaEnd();
1941
- }
1942
- }
1943
- h && (v[u] = +e(m, u, l), y[u] = +t(m, u, l), s.point(r ? +r(m, u, l) : v[u], n ? +n(m, u, l) : y[u]));
1944
- }
1945
- if (_) return s = null, _ + "" || null;
1946
- }
1947
- function u() {
1948
- return Li().defined(i).curve(o).context(a);
1949
- }
1950
- return l.x = function(t) {
1951
- return arguments.length ? (e = typeof t == "function" ? t : h(+t), r = null, l) : e;
1952
- }, l.x0 = function(t) {
1953
- return arguments.length ? (e = typeof t == "function" ? t : h(+t), l) : e;
1954
- }, l.x1 = function(e) {
1955
- return arguments.length ? (r = e == null ? null : typeof e == "function" ? e : h(+e), l) : r;
1956
- }, l.y = function(e) {
1957
- return arguments.length ? (t = typeof e == "function" ? e : h(+e), n = null, l) : t;
1958
- }, l.y0 = function(e) {
1959
- return arguments.length ? (t = typeof e == "function" ? e : h(+e), l) : t;
1960
- }, l.y1 = function(e) {
1961
- return arguments.length ? (n = e == null ? null : typeof e == "function" ? e : h(+e), l) : n;
1962
- }, l.lineX0 = l.lineY0 = function() {
1963
- return u().x(e).y(t);
1964
- }, l.lineY1 = function() {
1965
- return u().x(e).y(n);
1966
- }, l.lineX1 = function() {
1967
- return u().x(r).y(t);
1968
- }, l.defined = function(e) {
1969
- return arguments.length ? (i = typeof e == "function" ? e : h(!!e), l) : i;
1970
- }, l.curve = function(e) {
1971
- return arguments.length ? (o = e, a != null && (s = o(a)), l) : o;
1972
- }, l.context = function(e) {
1973
- return arguments.length ? (e == null ? a = s = null : s = o(a = e), l) : a;
1974
- }, l;
1975
- }
1976
- // node_modules/d3-shape/src/descending.js
1977
- function zi(e, t) {
1978
- return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
1979
- }
1980
- // node_modules/d3-shape/src/identity.js
1981
- function Bi(e) {
1982
- return e;
1983
- }
1984
- // node_modules/d3-shape/src/pie.js
1985
- function Vi() {
1986
- var e = Bi, t = zi, n = null, r = h(0), i = h(wi), a = h(0);
1987
- function o(o) {
1988
- var s, c = (o = g(o)).length, l, u, d = 0, f = Array(c), p = Array(c), m = +r.apply(this, arguments), h = Math.min(wi, Math.max(-wi, i.apply(this, arguments) - m)), _, v = Math.min(Math.abs(h) / c, a.apply(this, arguments)), y = v * (h < 0 ? -1 : 1), b;
1989
- for (s = 0; s < c; ++s) (b = p[f[s] = s] = +e(o[s], s, o)) > 0 && (d += b);
1990
- for (t == null ? n != null && f.sort(function(e, t) {
1991
- return n(o[e], o[t]);
1992
- }) : f.sort(function(e, n) {
1993
- return t(p[e], p[n]);
1994
- }), s = 0, u = d ? (h - c * y) / d : 0; s < c; ++s, m = _) l = f[s], b = p[l], _ = m + (b > 0 ? b * u : 0) + y, p[l] = {
1995
- data: o[l],
1996
- index: s,
1997
- value: b,
1998
- startAngle: m,
1999
- endAngle: _,
2000
- padAngle: v
2001
- };
2002
- return p;
2003
- }
2004
- return o.value = function(t) {
2005
- return arguments.length ? (e = typeof t == "function" ? t : h(+t), o) : e;
2006
- }, o.sortValues = function(e) {
2007
- return arguments.length ? (t = e, n = null, o) : t;
2008
- }, o.sort = function(e) {
2009
- return arguments.length ? (n = e, t = null, o) : n;
2010
- }, o.startAngle = function(e) {
2011
- return arguments.length ? (r = typeof e == "function" ? e : h(+e), o) : r;
2012
- }, o.endAngle = function(e) {
2013
- return arguments.length ? (i = typeof e == "function" ? e : h(+e), o) : i;
2014
- }, o.padAngle = function(e) {
2015
- return arguments.length ? (a = typeof e == "function" ? e : h(+e), o) : a;
2016
- }, o;
2017
- }
2018
- // node_modules/d3-shape/src/curve/radial.js
2019
- var Hi = Wi(Ii);
2020
- function Ui(e) {
2021
- this._curve = e;
2022
- }
2023
- Ui.prototype = {
2024
- areaStart: function() {
2025
- this._curve.areaStart();
2026
- },
2027
- areaEnd: function() {
2028
- this._curve.areaEnd();
2029
- },
2030
- lineStart: function() {
2031
- this._curve.lineStart();
2032
- },
2033
- lineEnd: function() {
2034
- this._curve.lineEnd();
2035
- },
2036
- point: function(e, t) {
2037
- this._curve.point(t * Math.sin(e), t * -Math.cos(e));
2038
- }
2039
- };
2040
- function Wi(e) {
2041
- function t(t) {
2042
- return new Ui(e(t));
2043
- }
2044
- return t._curve = e, t;
2045
- }
2046
- // node_modules/d3-shape/src/lineRadial.js
2047
- function Gi(e) {
2048
- var t = e.curve;
2049
- return e.angle = e.x, delete e.x, e.radius = e.y, delete e.y, e.curve = function(e) {
2050
- return arguments.length ? t(Wi(e)) : t()._curve;
2051
- }, e;
2052
- }
2053
- // node_modules/d3-shape/src/areaRadial.js
2054
- function Ki() {
2055
- var e = Ri().curve(Hi), t = e.curve, n = e.lineX0, r = e.lineX1, i = e.lineY0, a = e.lineY1;
2056
- return e.angle = e.x, delete e.x, e.startAngle = e.x0, delete e.x0, e.endAngle = e.x1, delete e.x1, e.radius = e.y, delete e.y, e.innerRadius = e.y0, delete e.y0, e.outerRadius = e.y1, delete e.y1, e.lineStartAngle = function() {
2057
- return Gi(n());
2058
- }, delete e.lineX0, e.lineEndAngle = function() {
2059
- return Gi(r());
2060
- }, delete e.lineX1, e.lineInnerRadius = function() {
2061
- return Gi(i());
2062
- }, delete e.lineY0, e.lineOuterRadius = function() {
2063
- return Gi(a());
2064
- }, delete e.lineY1, e.curve = function(e) {
2065
- return arguments.length ? t(Wi(e)) : t()._curve;
2066
- }, e;
2067
- }
2068
- // node_modules/d3-shape/src/noop.js
2069
- function qi() {}
2070
- // node_modules/d3-shape/src/curve/basis.js
2071
- function Ji(e, t, n) {
2072
- e._context.bezierCurveTo((2 * e._x0 + e._x1) / 3, (2 * e._y0 + e._y1) / 3, (e._x0 + 2 * e._x1) / 3, (e._y0 + 2 * e._y1) / 3, (e._x0 + 4 * e._x1 + t) / 6, (e._y0 + 4 * e._y1 + n) / 6);
2073
- }
2074
- function Yi(e) {
2075
- this._context = e;
2076
- }
2077
- Yi.prototype = {
2078
- areaStart: function() {
2079
- this._line = 0;
2080
- },
2081
- areaEnd: function() {
2082
- this._line = NaN;
2083
- },
2084
- lineStart: function() {
2085
- this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
2086
- },
2087
- lineEnd: function() {
2088
- switch (this._point) {
2089
- case 3: Ji(this, this._x1, this._y1);
2090
- case 2: this._context.lineTo(this._x1, this._y1);
2091
- }
2092
- (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
2093
- },
2094
- point: function(e, t) {
2095
- switch (e = +e, t = +t, this._point) {
2096
- case 0:
2097
- this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
2098
- break;
2099
- case 1:
2100
- this._point = 2;
2101
- break;
2102
- case 2: this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
2103
- default: Ji(this, e, t);
2104
- }
2105
- this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
2106
- }
2107
- };
2108
- function Xi(e) {
2109
- return new Yi(e);
2110
- }
2111
- // node_modules/d3-shape/src/curve/basisClosed.js
2112
- function Zi(e) {
2113
- this._context = e;
2114
- }
2115
- Zi.prototype = {
2116
- areaStart: qi,
2117
- areaEnd: qi,
2118
- lineStart: function() {
2119
- this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
2120
- },
2121
- lineEnd: function() {
2122
- switch (this._point) {
2123
- case 1:
2124
- this._context.moveTo(this._x2, this._y2), this._context.closePath();
2125
- break;
2126
- case 2:
2127
- this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
2128
- break;
2129
- case 3: this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
2130
- }
2131
- },
2132
- point: function(e, t) {
2133
- switch (e = +e, t = +t, this._point) {
2134
- case 0:
2135
- this._point = 1, this._x2 = e, this._y2 = t;
2136
- break;
2137
- case 1:
2138
- this._point = 2, this._x3 = e, this._y3 = t;
2139
- break;
2140
- case 2:
2141
- this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6);
2142
- break;
2143
- default: Ji(this, e, t);
2144
- }
2145
- this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
2146
- }
2147
- };
2148
- function Qi(e) {
2149
- return new Zi(e);
2150
- }
2151
- // node_modules/d3-shape/src/curve/basisOpen.js
2152
- function $i(e) {
2153
- this._context = e;
2154
- }
2155
- $i.prototype = {
2156
- areaStart: function() {
2157
- this._line = 0;
2158
- },
2159
- areaEnd: function() {
2160
- this._line = NaN;
2161
- },
2162
- lineStart: function() {
2163
- this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
2164
- },
2165
- lineEnd: function() {
2166
- (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
2167
- },
2168
- point: function(e, t) {
2169
- switch (e = +e, t = +t, this._point) {
2170
- case 0:
2171
- this._point = 1;
2172
- break;
2173
- case 1:
2174
- this._point = 2;
2175
- break;
2176
- case 2:
2177
- this._point = 3;
2178
- var n = (this._x0 + 4 * this._x1 + e) / 6, r = (this._y0 + 4 * this._y1 + t) / 6;
2179
- this._line ? this._context.lineTo(n, r) : this._context.moveTo(n, r);
2180
- break;
2181
- case 3: this._point = 4;
2182
- default: Ji(this, e, t);
2183
- }
2184
- this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
2185
- }
2186
- };
2187
- function ea(e) {
2188
- return new $i(e);
2189
- }
2190
- // node_modules/d3-shape/src/curve/bundle.js
2191
- function ta(e, t) {
2192
- this._basis = new Yi(e), this._beta = t;
2193
- }
2194
- ta.prototype = {
2195
- lineStart: function() {
2196
- this._x = [], this._y = [], this._basis.lineStart();
2197
- },
2198
- lineEnd: function() {
2199
- var e = this._x, t = this._y, n = e.length - 1;
2200
- if (n > 0) for (var r = e[0], i = t[0], a = e[n] - r, o = t[n] - i, s = -1, c; ++s <= n;) c = s / n, this._basis.point(this._beta * e[s] + (1 - this._beta) * (r + c * a), this._beta * t[s] + (1 - this._beta) * (i + c * o));
2201
- this._x = this._y = null, this._basis.lineEnd();
2202
- },
2203
- point: function(e, t) {
2204
- this._x.push(+e), this._y.push(+t);
2205
- }
2206
- };
2207
- var na = (function e(t) {
2208
- function n(e) {
2209
- return t === 1 ? new Yi(e) : new ta(e, t);
2210
- }
2211
- return n.beta = function(t) {
2212
- return e(+t);
2213
- }, n;
2214
- })(.85);
2215
- // node_modules/d3-shape/src/curve/cardinal.js
2216
- function ra(e, t, n) {
2217
- e._context.bezierCurveTo(e._x1 + e._k * (e._x2 - e._x0), e._y1 + e._k * (e._y2 - e._y0), e._x2 + e._k * (e._x1 - t), e._y2 + e._k * (e._y1 - n), e._x2, e._y2);
2218
- }
2219
- function ia(e, t) {
2220
- this._context = e, this._k = (1 - t) / 6;
2221
- }
2222
- ia.prototype = {
2223
- areaStart: function() {
2224
- this._line = 0;
2225
- },
2226
- areaEnd: function() {
2227
- this._line = NaN;
2228
- },
2229
- lineStart: function() {
2230
- this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
2231
- },
2232
- lineEnd: function() {
2233
- switch (this._point) {
2234
- case 2:
2235
- this._context.lineTo(this._x2, this._y2);
2236
- break;
2237
- case 3: ra(this, this._x1, this._y1);
2238
- }
2239
- (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
2240
- },
2241
- point: function(e, t) {
2242
- switch (e = +e, t = +t, this._point) {
2243
- case 0:
2244
- this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
2245
- break;
2246
- case 1:
2247
- this._point = 2, this._x1 = e, this._y1 = t;
2248
- break;
2249
- case 2: this._point = 3;
2250
- default: ra(this, e, t);
2251
- }
2252
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
2253
- }
2254
- };
2255
- var aa = (function e(t) {
2256
- function n(e) {
2257
- return new ia(e, t);
2258
- }
2259
- return n.tension = function(t) {
2260
- return e(+t);
2261
- }, n;
2262
- })(0);
2263
- // node_modules/d3-shape/src/curve/cardinalClosed.js
2264
- function oa(e, t) {
2265
- this._context = e, this._k = (1 - t) / 6;
2266
- }
2267
- oa.prototype = {
2268
- areaStart: qi,
2269
- areaEnd: qi,
2270
- lineStart: function() {
2271
- this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
2272
- },
2273
- lineEnd: function() {
2274
- switch (this._point) {
2275
- case 1:
2276
- this._context.moveTo(this._x3, this._y3), this._context.closePath();
2277
- break;
2278
- case 2:
2279
- this._context.lineTo(this._x3, this._y3), this._context.closePath();
2280
- break;
2281
- case 3: this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
2282
- }
2283
- },
2284
- point: function(e, t) {
2285
- switch (e = +e, t = +t, this._point) {
2286
- case 0:
2287
- this._point = 1, this._x3 = e, this._y3 = t;
2288
- break;
2289
- case 1:
2290
- this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
2291
- break;
2292
- case 2:
2293
- this._point = 3, this._x5 = e, this._y5 = t;
2294
- break;
2295
- default: ra(this, e, t);
2296
- }
2297
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
2298
- }
2299
- };
2300
- var sa = (function e(t) {
2301
- function n(e) {
2302
- return new oa(e, t);
2303
- }
2304
- return n.tension = function(t) {
2305
- return e(+t);
2306
- }, n;
2307
- })(0);
2308
- // node_modules/d3-shape/src/curve/cardinalOpen.js
2309
- function ca(e, t) {
2310
- this._context = e, this._k = (1 - t) / 6;
2311
- }
2312
- ca.prototype = {
2313
- areaStart: function() {
2314
- this._line = 0;
2315
- },
2316
- areaEnd: function() {
2317
- this._line = NaN;
2318
- },
2319
- lineStart: function() {
2320
- this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
2321
- },
2322
- lineEnd: function() {
2323
- (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
2324
- },
2325
- point: function(e, t) {
2326
- switch (e = +e, t = +t, this._point) {
2327
- case 0:
2328
- this._point = 1;
2329
- break;
2330
- case 1:
2331
- this._point = 2;
2332
- break;
2333
- case 2:
2334
- this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
2335
- break;
2336
- case 3: this._point = 4;
2337
- default: ra(this, e, t);
2338
- }
2339
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
2340
- }
2341
- };
2342
- var la = (function e(t) {
2343
- function n(e) {
2344
- return new ca(e, t);
2345
- }
2346
- return n.tension = function(t) {
2347
- return e(+t);
2348
- }, n;
2349
- })(0);
2350
- // node_modules/d3-shape/src/curve/catmullRom.js
2351
- function ua(e, t, n) {
2352
- var r = e._x1, i = e._y1, a = e._x2, o = e._y2;
2353
- if (e._l01_a > 1e-12) {
2354
- var s = 2 * e._l01_2a + 3 * e._l01_a * e._l12_a + e._l12_2a, c = 3 * e._l01_a * (e._l01_a + e._l12_a);
2355
- r = (r * s - e._x0 * e._l12_2a + e._x2 * e._l01_2a) / c, i = (i * s - e._y0 * e._l12_2a + e._y2 * e._l01_2a) / c;
2356
- }
2357
- if (e._l23_a > 1e-12) {
2358
- var l = 2 * e._l23_2a + 3 * e._l23_a * e._l12_a + e._l12_2a, u = 3 * e._l23_a * (e._l23_a + e._l12_a);
2359
- a = (a * l + e._x1 * e._l23_2a - t * e._l12_2a) / u, o = (o * l + e._y1 * e._l23_2a - n * e._l12_2a) / u;
2360
- }
2361
- e._context.bezierCurveTo(r, i, a, o, e._x2, e._y2);
2362
- }
2363
- function da(e, t) {
2364
- this._context = e, this._alpha = t;
2365
- }
2366
- da.prototype = {
2367
- areaStart: function() {
2368
- this._line = 0;
2369
- },
2370
- areaEnd: function() {
2371
- this._line = NaN;
2372
- },
2373
- lineStart: function() {
2374
- this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
2375
- },
2376
- lineEnd: function() {
2377
- switch (this._point) {
2378
- case 2:
2379
- this._context.lineTo(this._x2, this._y2);
2380
- break;
2381
- case 3: this.point(this._x2, this._y2);
2382
- }
2383
- (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
2384
- },
2385
- point: function(e, t) {
2386
- if (e = +e, t = +t, this._point) {
2387
- var n = this._x2 - e, r = this._y2 - t;
2388
- this._l23_a = Math.sqrt(this._l23_2a = (n * n + r * r) ** +this._alpha);
2389
- }
2390
- switch (this._point) {
2391
- case 0:
2392
- this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
2393
- break;
2394
- case 1:
2395
- this._point = 2;
2396
- break;
2397
- case 2: this._point = 3;
2398
- default: ua(this, e, t);
2399
- }
2400
- this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
2401
- }
2402
- };
2403
- var fa = (function e(t) {
2404
- function n(e) {
2405
- return t ? new da(e, t) : new ia(e, 0);
2406
- }
2407
- return n.alpha = function(t) {
2408
- return e(+t);
2409
- }, n;
2410
- })(.5);
2411
- // node_modules/d3-shape/src/curve/catmullRomClosed.js
2412
- function pa(e, t) {
2413
- this._context = e, this._alpha = t;
2414
- }
2415
- pa.prototype = {
2416
- areaStart: qi,
2417
- areaEnd: qi,
2418
- lineStart: function() {
2419
- this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
2420
- },
2421
- lineEnd: function() {
2422
- switch (this._point) {
2423
- case 1:
2424
- this._context.moveTo(this._x3, this._y3), this._context.closePath();
2425
- break;
2426
- case 2:
2427
- this._context.lineTo(this._x3, this._y3), this._context.closePath();
2428
- break;
2429
- case 3: this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
2430
- }
2431
- },
2432
- point: function(e, t) {
2433
- if (e = +e, t = +t, this._point) {
2434
- var n = this._x2 - e, r = this._y2 - t;
2435
- this._l23_a = Math.sqrt(this._l23_2a = (n * n + r * r) ** +this._alpha);
2436
- }
2437
- switch (this._point) {
2438
- case 0:
2439
- this._point = 1, this._x3 = e, this._y3 = t;
2440
- break;
2441
- case 1:
2442
- this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
2443
- break;
2444
- case 2:
2445
- this._point = 3, this._x5 = e, this._y5 = t;
2446
- break;
2447
- default: ua(this, e, t);
2448
- }
2449
- this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
2450
- }
2451
- };
2452
- var ma = (function e(t) {
2453
- function n(e) {
2454
- return t ? new pa(e, t) : new oa(e, 0);
2455
- }
2456
- return n.alpha = function(t) {
2457
- return e(+t);
2458
- }, n;
2459
- })(.5);
2460
- // node_modules/d3-shape/src/curve/catmullRomOpen.js
2461
- function ha(e, t) {
2462
- this._context = e, this._alpha = t;
2463
- }
2464
- ha.prototype = {
2465
- areaStart: function() {
2466
- this._line = 0;
2467
- },
2468
- areaEnd: function() {
2469
- this._line = NaN;
2470
- },
2471
- lineStart: function() {
2472
- this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
2473
- },
2474
- lineEnd: function() {
2475
- (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
2476
- },
2477
- point: function(e, t) {
2478
- if (e = +e, t = +t, this._point) {
2479
- var n = this._x2 - e, r = this._y2 - t;
2480
- this._l23_a = Math.sqrt(this._l23_2a = (n * n + r * r) ** +this._alpha);
2481
- }
2482
- switch (this._point) {
2483
- case 0:
2484
- this._point = 1;
2485
- break;
2486
- case 1:
2487
- this._point = 2;
2488
- break;
2489
- case 2:
2490
- this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
2491
- break;
2492
- case 3: this._point = 4;
2493
- default: ua(this, e, t);
2494
- }
2495
- this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
2496
- }
2497
- };
2498
- var ga = (function e(t) {
2499
- function n(e) {
2500
- return t ? new ha(e, t) : new ca(e, 0);
2501
- }
2502
- return n.alpha = function(t) {
2503
- return e(+t);
2504
- }, n;
2505
- })(.5);
2506
- // node_modules/d3-shape/src/curve/linearClosed.js
2507
- function _a(e) {
2508
- this._context = e;
2509
- }
2510
- _a.prototype = {
2511
- areaStart: qi,
2512
- areaEnd: qi,
2513
- lineStart: function() {
2514
- this._point = 0;
2515
- },
2516
- lineEnd: function() {
2517
- this._point && this._context.closePath();
2518
- },
2519
- point: function(e, t) {
2520
- e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
2521
- }
2522
- };
2523
- function va(e) {
2524
- return new _a(e);
2525
- }
2526
- // node_modules/d3-shape/src/curve/monotone.js
2527
- function ya(e) {
2528
- return e < 0 ? -1 : 1;
2529
- }
2530
- function ba(e, t, n) {
2531
- var r = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (r || i < 0 && -0), o = (n - e._y1) / (i || r < 0 && -0), s = (a * i + o * r) / (r + i);
2532
- return (ya(a) + ya(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
2533
- }
2534
- function xa(e, t) {
2535
- var n = e._x1 - e._x0;
2536
- return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
2537
- }
2538
- function Sa(e, t, n) {
2539
- var r = e._x0, i = e._y0, a = e._x1, o = e._y1, s = (a - r) / 3;
2540
- e._context.bezierCurveTo(r + s, i + s * t, a - s, o - s * n, a, o);
2541
- }
2542
- function Ca(e) {
2543
- this._context = e;
2544
- }
2545
- Ca.prototype = {
2546
- areaStart: function() {
2547
- this._line = 0;
2548
- },
2549
- areaEnd: function() {
2550
- this._line = NaN;
2551
- },
2552
- lineStart: function() {
2553
- this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
2554
- },
2555
- lineEnd: function() {
2556
- switch (this._point) {
2557
- case 2:
2558
- this._context.lineTo(this._x1, this._y1);
2559
- break;
2560
- case 3: Sa(this, this._t0, xa(this, this._t0));
2561
- }
2562
- (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
2563
- },
2564
- point: function(e, t) {
2565
- var n = NaN;
2566
- if (e = +e, t = +t, e !== this._x1 || t !== this._y1) {
2567
- switch (this._point) {
2568
- case 0:
2569
- this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
2570
- break;
2571
- case 1:
2572
- this._point = 2;
2573
- break;
2574
- case 2:
2575
- this._point = 3, Sa(this, xa(this, n = ba(this, e, t)), n);
2576
- break;
2577
- default: Sa(this, this._t0, n = ba(this, e, t));
2578
- }
2579
- this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
2580
- }
2581
- }
2582
- };
2583
- function wa(e) {
2584
- this._context = new Ta(e);
2585
- }
2586
- (wa.prototype = Object.create(Ca.prototype)).point = function(e, t) {
2587
- Ca.prototype.point.call(this, t, e);
2588
- };
2589
- function Ta(e) {
2590
- this._context = e;
2591
- }
2592
- Ta.prototype = {
2593
- moveTo: function(e, t) {
2594
- this._context.moveTo(t, e);
2595
- },
2596
- closePath: function() {
2597
- this._context.closePath();
2598
- },
2599
- lineTo: function(e, t) {
2600
- this._context.lineTo(t, e);
2601
- },
2602
- bezierCurveTo: function(e, t, n, r, i, a) {
2603
- this._context.bezierCurveTo(t, e, r, n, a, i);
2604
- }
2605
- };
2606
- function Ea(e) {
2607
- return new Ca(e);
2608
- }
2609
- function Da(e) {
2610
- return new wa(e);
2611
- }
2612
- // node_modules/d3-shape/src/curve/natural.js
2613
- function Oa(e) {
2614
- this._context = e;
2615
- }
2616
- Oa.prototype = {
2617
- areaStart: function() {
2618
- this._line = 0;
2619
- },
2620
- areaEnd: function() {
2621
- this._line = NaN;
2622
- },
2623
- lineStart: function() {
2624
- this._x = [], this._y = [];
2625
- },
2626
- lineEnd: function() {
2627
- var e = this._x, t = this._y, n = e.length;
2628
- if (n) {
2629
- if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), n === 2) this._context.lineTo(e[1], t[1]);
2630
- else for (var r = ka(e), i = ka(t), a = 0, o = 1; o < n; ++a, ++o) this._context.bezierCurveTo(r[0][a], i[0][a], r[1][a], i[1][a], e[o], t[o]);
2631
- }
2632
- (this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
2633
- },
2634
- point: function(e, t) {
2635
- this._x.push(+e), this._y.push(+t);
2636
- }
2637
- };
2638
- function ka(e) {
2639
- var t, n = e.length - 1, r, i = Array(n), a = Array(n), o = Array(n);
2640
- for (i[0] = 0, a[0] = 2, o[0] = e[0] + 2 * e[1], t = 1; t < n - 1; ++t) i[t] = 1, a[t] = 4, o[t] = 4 * e[t] + 2 * e[t + 1];
2641
- for (i[n - 1] = 2, a[n - 1] = 7, o[n - 1] = 8 * e[n - 1] + e[n], t = 1; t < n; ++t) r = i[t] / a[t - 1], a[t] -= r, o[t] -= r * o[t - 1];
2642
- for (i[n - 1] = o[n - 1] / a[n - 1], t = n - 2; t >= 0; --t) i[t] = (o[t] - i[t + 1]) / a[t];
2643
- for (a[n - 1] = (e[n] + i[n - 1]) / 2, t = 0; t < n - 1; ++t) a[t] = 2 * e[t + 1] - i[t + 1];
2644
- return [i, a];
2645
- }
2646
- function Aa(e) {
2647
- return new Oa(e);
2648
- }
2649
- // node_modules/d3-shape/src/curve/step.js
2650
- function ja(e, t) {
2651
- this._context = e, this._t = t;
2652
- }
2653
- ja.prototype = {
2654
- areaStart: function() {
2655
- this._line = 0;
2656
- },
2657
- areaEnd: function() {
2658
- this._line = NaN;
2659
- },
2660
- lineStart: function() {
2661
- this._x = this._y = NaN, this._point = 0;
2662
- },
2663
- lineEnd: function() {
2664
- 0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
2665
- },
2666
- point: function(e, t) {
2667
- switch (e = +e, t = +t, this._point) {
2668
- case 0:
2669
- this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
2670
- break;
2671
- case 1: this._point = 2;
2672
- default: if (this._t <= 0) this._context.lineTo(this._x, t), this._context.lineTo(e, t);
2673
- else {
2674
- var n = this._x * (1 - this._t) + e * this._t;
2675
- this._context.lineTo(n, this._y), this._context.lineTo(n, t);
2676
- }
2677
- }
2678
- this._x = e, this._y = t;
2679
- }
2680
- };
2681
- function Ma(e) {
2682
- return new ja(e, .5);
2683
- }
2684
- function Na(e) {
2685
- return new ja(e, 0);
2686
- }
2687
- function Pa(e) {
2688
- return new ja(e, 1);
2689
- }
2690
- // node_modules/d3-interpolate-path/build/d3-interpolate-path.mjs
2691
- function Fa(e, t) {
2692
- var n = Object.keys(e);
2693
- if (Object.getOwnPropertySymbols) {
2694
- var r = Object.getOwnPropertySymbols(e);
2695
- t && (r = r.filter(function(t) {
2696
- return Object.getOwnPropertyDescriptor(e, t).enumerable;
2697
- })), n.push.apply(n, r);
2698
- }
2699
- return n;
2700
- }
2701
- function Ia(e) {
2702
- for (var t = 1; t < arguments.length; t++) {
2703
- var n = arguments[t] == null ? {} : arguments[t];
2704
- t % 2 ? Fa(Object(n), !0).forEach(function(t) {
2705
- Ra(e, t, n[t]);
2706
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fa(Object(n)).forEach(function(t) {
2707
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
2708
- });
2709
- }
2710
- return e;
2711
- }
2712
- function La(e) {
2713
- "@babel/helpers - typeof";
2714
- return La = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2715
- return typeof e;
2716
- } : function(e) {
2717
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2718
- }, La(e);
2719
- }
2720
- function Ra(e, t, n) {
2721
- return t in e ? Object.defineProperty(e, t, {
2722
- value: n,
2723
- enumerable: !0,
2724
- configurable: !0,
2725
- writable: !0
2726
- }) : e[t] = n, e;
2727
- }
2728
- function za() {
2729
- return za = Object.assign || function(e) {
2730
- for (var t = 1; t < arguments.length; t++) {
2731
- var n = arguments[t];
2732
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2733
- }
2734
- return e;
2735
- }, za.apply(this, arguments);
2736
- }
2737
- function Ba(e, t) {
2738
- if (e) {
2739
- if (typeof e == "string") return Va(e, t);
2740
- var n = Object.prototype.toString.call(e).slice(8, -1);
2741
- if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
2742
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Va(e, t);
2743
- }
2744
- }
2745
- function Va(e, t) {
2746
- (t == null || t > e.length) && (t = e.length);
2747
- for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
2748
- return r;
2749
- }
2750
- function Ha(e, t) {
2751
- var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2752
- if (!n) {
2753
- if (Array.isArray(e) || (n = Ba(e)) || t && e && typeof e.length == "number") {
2754
- n && (e = n);
2755
- var r = 0, i = function() {};
2756
- return {
2757
- s: i,
2758
- n: function() {
2759
- return r >= e.length ? { done: !0 } : {
2760
- done: !1,
2761
- value: e[r++]
2762
- };
2763
- },
2764
- e: function(e) {
2765
- throw e;
2766
- },
2767
- f: i
2768
- };
2769
- }
2770
- throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2771
- }
2772
- var a = !0, o = !1, s;
2773
- return {
2774
- s: function() {
2775
- n = n.call(e);
2776
- },
2777
- n: function() {
2778
- var e = n.next();
2779
- return a = e.done, e;
2780
- },
2781
- e: function(e) {
2782
- o = !0, s = e;
2783
- },
2784
- f: function() {
2785
- try {
2786
- !a && n.return != null && n.return();
2787
- } finally {
2788
- if (o) throw s;
2789
- }
2790
- }
2791
- };
2792
- }
2793
- function Ua(e, t) {
2794
- var n = [], r = [];
2795
- function i(e, t) {
2796
- if (e.length === 1) n.push(e[0]), r.push(e[0]);
2797
- else {
2798
- for (var a = Array(e.length - 1), o = 0; o < a.length; o++) o === 0 && n.push(e[0]), o === a.length - 1 && r.push(e[o + 1]), a[o] = [(1 - t) * e[o][0] + t * e[o + 1][0], (1 - t) * e[o][1] + t * e[o + 1][1]];
2799
- i(a, t);
2800
- }
2801
- }
2802
- return e.length && i(e, t), {
2803
- left: n,
2804
- right: r.reverse()
2805
- };
2806
- }
2807
- function Wa(e) {
2808
- var t = {};
2809
- return e.length === 4 && (t.x2 = e[2][0], t.y2 = e[2][1]), e.length >= 3 && (t.x1 = e[1][0], t.y1 = e[1][1]), t.x = e[e.length - 1][0], t.y = e[e.length - 1][1], t.type = e.length === 4 ? "C" : e.length === 3 ? "Q" : "L", t;
2810
- }
2811
- function Ga(e, t) {
2812
- t ||= 2;
2813
- for (var n = [], r = e, i = 1 / t, a = 0; a < t - 1; a++) {
2814
- var o = i / (1 - i * a), s = Ua(r, o);
2815
- n.push(s.left), r = s.right;
2816
- }
2817
- return n.push(r), n;
2818
- }
2819
- function Ka(e, t, n) {
2820
- var r = [[e.x, e.y]];
2821
- return t.x1 != null && r.push([t.x1, t.y1]), t.x2 != null && r.push([t.x2, t.y2]), r.push([t.x, t.y]), Ga(r, n).map(Wa);
2822
- }
2823
- var qa = /[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g, Ja = {
2824
- M: ["x", "y"],
2825
- L: ["x", "y"],
2826
- H: ["x"],
2827
- V: ["y"],
2828
- C: [
2829
- "x1",
2830
- "y1",
2831
- "x2",
2832
- "y2",
2833
- "x",
2834
- "y"
2835
- ],
2836
- S: [
2837
- "x2",
2838
- "y2",
2839
- "x",
2840
- "y"
2841
- ],
2842
- Q: [
2843
- "x1",
2844
- "y1",
2845
- "x",
2846
- "y"
2847
- ],
2848
- T: ["x", "y"],
2849
- A: [
2850
- "rx",
2851
- "ry",
2852
- "xAxisRotation",
2853
- "largeArcFlag",
2854
- "sweepFlag",
2855
- "x",
2856
- "y"
2857
- ],
2858
- Z: []
2859
- };
2860
- Object.keys(Ja).forEach(function(e) {
2861
- Ja[e.toLowerCase()] = Ja[e];
2862
- });
2863
- function Ya(e, t) {
2864
- for (var n = Array(e), r = 0; r < e; r++) n[r] = t;
2865
- return n;
2866
- }
2867
- function Xa(e) {
2868
- return `${e.type}${Ja[e.type].map(function(t) {
2869
- return e[t];
2870
- }).join(",")}`;
2871
- }
2872
- function Za(e, t) {
2873
- var n = {
2874
- x1: "x",
2875
- y1: "y",
2876
- x2: "x",
2877
- y2: "y"
2878
- }, r = [
2879
- "xAxisRotation",
2880
- "largeArcFlag",
2881
- "sweepFlag"
2882
- ];
2883
- if (e.type !== t.type && t.type.toUpperCase() !== "M") {
2884
- var i = {};
2885
- Object.keys(t).forEach(function(a) {
2886
- var o = t[a], s = e[a];
2887
- s === void 0 && (r.includes(a) ? s = o : (s === void 0 && n[a] && (s = e[n[a]]), s === void 0 && (s = 0))), i[a] = s;
2888
- }), i.type = t.type, e = i;
2889
- }
2890
- return e;
2891
- }
2892
- function Qa(e, t, n) {
2893
- var r = [];
2894
- if (t.type === "L" || t.type === "Q" || t.type === "C") r = r.concat(Ka(e, t, n));
2895
- else {
2896
- var i = za({}, e);
2897
- i.type === "M" && (i.type = "L"), r = r.concat(Ya(n - 1).map(function() {
2898
- return i;
2899
- })), r.push(t);
2900
- }
2901
- return r;
2902
- }
2903
- function $a(e, t, n) {
2904
- var r = e.length - 1, i = t.length - 1, a = r / i, o = Ya(i).reduce(function(t, r, i) {
2905
- var o = Math.floor(a * i);
2906
- if (n && o < e.length - 1 && n(e[o], e[o + 1])) {
2907
- var s = a * i % 1 < .5;
2908
- t[o] && (s ? o > 0 ? --o : o < e.length - 1 && (o += 1) : o < e.length - 1 ? o += 1 : o > 0 && --o);
2909
- }
2910
- return t[o] = (t[o] || 0) + 1, t;
2911
- }, []).reduce(function(t, n, r) {
2912
- if (r === e.length - 1) {
2913
- var i = Ya(n, za({}, e[e.length - 1]));
2914
- return i[0].type === "M" && i.forEach(function(e) {
2915
- e.type = "L";
2916
- }), t.concat(i);
2917
- }
2918
- return t.concat(Qa(e[r], e[r + 1], n));
2919
- }, []);
2920
- return o.unshift(e[0]), o;
2921
- }
2922
- function eo(e) {
2923
- for (var t = (e || "").match(qa) || [], n = [], r, i, a = 0; a < t.length; ++a) if (r = Ja[t[a]], r) {
2924
- i = { type: t[a] };
2925
- for (var o = 0; o < r.length; ++o) i[r[o]] = +t[a + o + 1];
2926
- a += r.length, n.push(i);
2927
- }
2928
- return n;
2929
- }
2930
- function to(e, t, n) {
2931
- var r = e == null ? [] : e.slice(), i = t == null ? [] : t.slice(), a = La(n) === "object" ? n : {
2932
- excludeSegment: n,
2933
- snapEndsToInput: !0
2934
- }, o = a.excludeSegment, s = a.snapEndsToInput;
2935
- if (!r.length && !i.length) return function() {
2936
- return [];
2937
- };
2938
- var c = (r.length === 0 || r[r.length - 1].type === "Z") && (i.length === 0 || i[i.length - 1].type === "Z");
2939
- r.length > 0 && r[r.length - 1].type === "Z" && r.pop(), i.length > 0 && i[i.length - 1].type === "Z" && i.pop(), r.length ? i.length || i.push(r[0]) : r.push(i[0]), Math.abs(i.length - r.length) !== 0 && (i.length > r.length ? r = $a(r, i, o) : i.length < r.length && (i = $a(i, r, o))), r = r.map(function(e, t) {
2940
- return Za(e, i[t]);
2941
- });
2942
- var l = r.map(function(e) {
2943
- return Ia({}, e);
2944
- });
2945
- return c && (l.push({ type: "Z" }), r.push({ type: "Z" })), function(e) {
2946
- if (e === 1 && s) return t ?? [];
2947
- if (e === 0) return r;
2948
- for (var n = 0; n < l.length; ++n) {
2949
- var a = r[n], o = i[n], c = l[n], u = Ha(Ja[c.type]), d;
2950
- try {
2951
- for (u.s(); !(d = u.n()).done;) {
2952
- var f = d.value;
2953
- c[f] = (1 - e) * a[f] + e * o[f], (f === "largeArcFlag" || f === "sweepFlag") && (c[f] = Math.round(c[f]));
2954
- }
2955
- } catch (e) {
2956
- u.e(e);
2957
- } finally {
2958
- u.f();
2959
- }
2960
- }
2961
- return l;
2962
- };
2963
- }
2964
- function no(e, t, n) {
2965
- var r = eo(e), i = eo(t), a = La(n) === "object" ? n : {
2966
- excludeSegment: n,
2967
- snapEndsToInput: !0
2968
- }, o = a.excludeSegment, s = a.snapEndsToInput;
2969
- if (!r.length && !i.length) return function() {
2970
- return "";
2971
- };
2972
- var c = to(r, i, {
2973
- excludeSegment: o,
2974
- snapEndsToInput: s
2975
- });
2976
- return function(e) {
2977
- if (e === 1 && s) return t ?? "";
2978
- var n = c(e), r = "", i = Ha(n), a;
2979
- try {
2980
- for (i.s(); !(a = i.n()).done;) {
2981
- var o = a.value;
2982
- r += Xa(o);
2983
- }
2984
- } catch (e) {
2985
- i.e(e);
2986
- } finally {
2987
- i.f();
2988
- }
2989
- return r;
2990
- };
2991
- }
2992
- // node_modules/@unovis/ts/types/curve.js
2993
- var ro = {
2994
- basis: Xi,
2995
- basisClosed: Qi,
2996
- basisOpen: ea,
2997
- bundle: na,
2998
- cardinal: aa,
2999
- cardinalClosed: sa,
3000
- cardinalOpen: la,
3001
- catmullRom: fa,
3002
- catmullRomClosed: ma,
3003
- catmullRomOpen: ga,
3004
- linear: Ii,
3005
- linearClosed: va,
3006
- monotoneX: Ea,
3007
- monotoneY: Da,
3008
- natural: Aa,
3009
- step: Ma,
3010
- stepAfter: Pa,
3011
- stepBefore: Na
3012
- };
3013
- // node_modules/@unovis/ts/utils/path.js
3014
- function io(e, t) {
3015
- return e.toString().replace(/L(?<x>-?\d*\.?\d*),(?<y>-?\d+\.?\d*)/gm, (e, n, r) => `A ${t} ${t} 0 0 0 ${n} ${r}`);
3016
- }
3017
- // node_modules/@unovis/ts/components/chord-diagram/types.js
3018
- var $ = /* @__PURE__ */ ((e) => (e.Along = "along", e.Perpendicular = "perpendicular", e))($ || {}), ao = class extends mi {
3019
- constructor() {
3020
- super(...arguments), this._nodes = [], this._links = [], this._inputNodesMap = /* @__PURE__ */ new Map(), this._nodesMap = /* @__PURE__ */ new Map(), this._nodesByUserId = /* @__PURE__ */ new Map(), this._nodesByInputRef = /* @__PURE__ */ new Map(), this.nodeId = (e) => Vt(e.id) || isFinite(e.id) ? `${e.id}` : void 0, this.linkId = (e) => Vt(e.id) || isFinite(e.id) ? `${e.id}` : void 0;
3021
- }
3022
- getNodeById(e) {
3023
- return this._nodesMap.get(e);
3024
- }
3025
- get data() {
3026
- return this._data;
3027
- }
3028
- set data(e) {
3029
- if (!e) return;
3030
- this._data = e;
3031
- let t = this.nodes, n = this.links;
3032
- this._inputNodesMap.clear(), this._nodesMap.clear(), this._nodesByUserId.clear(), this._nodesByInputRef.clear();
3033
- let r = qt(e?.nodes ?? []), i = qt(e?.links ?? []);
3034
- this.transferState(r, t, this.nodeId), this.transferState(i, n, this.linkId), r.forEach((t, n) => {
3035
- t._index = n, t._id = this.nodeId(t) || `${n}`, this._inputNodesMap.set(t, e.nodes[n]), this._nodesMap.set(t._id, t), this._nodesByInputRef.set(e.nodes[n], t);
3036
- let r = this.nodeId(t);
3037
- r !== void 0 && !this._nodesByUserId.has(r) && this._nodesByUserId.set(r, t);
3038
- }), zt(this.nodeSort) && r.sort(this.nodeSort), i.forEach((e, t) => {
3039
- e._indexGlobal = t, e.source = this.findNode(r, e.source), e.target = this.findNode(r, e.target);
3040
- });
3041
- let a = /* @__PURE__ */ new Map();
3042
- for (let e of i) {
3043
- let t = e.source?._index ?? -1, n = e.target?._index ?? -1, r = t <= n ? `${t}|${n}` : `${n}|${t}`, i = a.get(r);
3044
- i ? i.push(e) : a.set(r, [e]);
3045
- }
3046
- a.forEach((e) => {
3047
- if (e.every((e) => !Bt(e._index) && !Bt(e._neighbours))) return;
3048
- let t = e[0];
3049
- e.forEach((n, r) => {
3050
- n._index = r, n._id = this.linkId(n) || `${n.source?._id}-${n.target?._id}-${r}`, n._neighbours = e.length, n._direction = t.source === n.source && t.target === n.target ? 1 : -1;
3051
- });
3052
- });
3053
- let o = /* @__PURE__ */ new Map();
3054
- r.forEach((e) => o.set(e, []));
3055
- for (let e of i) e.source && o.get(e.source)?.push(e), e.target && e.target !== e.source && o.get(e.target)?.push(e);
3056
- r.forEach((e) => {
3057
- e.links = o.get(e), e._isConnected = e.links.length !== 0;
3058
- }), this._nonConnectedNodes = r.filter((e) => !e._isConnected), this._connectedNodes = r.filter((e) => e._isConnected), this._nodes = r, this._links = i.filter((e) => e.source === e.target ? (console.warn(`Unovis | Graph Data Model: Skipping link ${e._id} because it has the same source and target`), !1) : e.source && e.target);
3059
- }
3060
- get nodes() {
3061
- return this._nodes;
3062
- }
3063
- get links() {
3064
- return this._links;
3065
- }
3066
- get connectedNodes() {
3067
- return this._connectedNodes;
3068
- }
3069
- get nonConnectedNodes() {
3070
- return this._nonConnectedNodes;
3071
- }
3072
- findNode(e, t) {
3073
- let n;
3074
- return Rt(t) ? n = e[t] : Vt(t) ? n = this._nodesByUserId.get(t) : Ut(t) && (n = this._nodesByInputRef.get(t) ?? e.find((e) => Kt(this._inputNodesMap.get(e), t))), n || console.warn(`Unovis | Graph Data Model: Node ${t} is missing from the nodes list`), n;
3075
- }
3076
- transferState(e, t, n) {
3077
- let r = /* @__PURE__ */ new Map();
3078
- for (let e of t) {
3079
- let t = n(e);
3080
- r.has(t) || r.set(t, e);
3081
- }
3082
- for (let t of e) {
3083
- let e = r.get(n(t));
3084
- t._state = e ? { ...e._state } : {};
3085
- }
3086
- }
3087
- setNodeStateById(e, t) {
3088
- let n = this.getNodeById(e);
3089
- n ? n._state = t : console.warn(`Unovis | Graph Data Model: Node ${e} not found`);
3090
- }
3091
- };
3092
- // node_modules/d3-hierarchy/src/treemap/round.js
3093
- function oo(e) {
3094
- e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
3095
- }
3096
- // node_modules/d3-hierarchy/src/treemap/dice.js
3097
- function so(e, t, n, r, i) {
3098
- 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;
3099
- }
3100
- // node_modules/d3-hierarchy/src/partition.js
3101
- function co() {
3102
- var e = 1, t = 1, n = 0, r = !1;
3103
- function i(i) {
3104
- var o = i.height + 1;
3105
- return i.x0 = i.y0 = n, i.x1 = e, i.y1 = t / o, i.eachBefore(a(t, o)), r && i.eachBefore(oo), i;
3106
- }
3107
- function a(e, t) {
3108
- return function(r) {
3109
- r.children && so(r, r.x0, e * (r.depth + 1) / t, r.x1, e * (r.depth + 2) / t);
3110
- var i = r.x0, a = r.y0, o = r.x1 - n, s = r.y1 - n;
3111
- o < i && (i = o = (i + o) / 2), s < a && (a = s = (a + s) / 2), r.x0 = i, r.y0 = a, r.x1 = o, r.y1 = s;
3112
- };
3113
- }
3114
- return i.round = function(e) {
3115
- return arguments.length ? (r = !!e, i) : r;
3116
- }, i.size = function(n) {
3117
- return arguments.length ? (e = +n[0], t = +n[1], i) : [e, t];
3118
- }, i.padding = function(e) {
3119
- return arguments.length ? (n = +e, i) : n;
3120
- }, i;
3121
- }
3122
- // node_modules/@unovis/ts/components/chord-diagram/config.js
3123
- var lo = {
3124
- ...hi,
3125
- duration: 800,
3126
- highlightedNodeId: void 0,
3127
- highlightedLinkIds: [],
3128
- linkColor: void 0,
3129
- linkPattern: void 0,
3130
- linkValue: (e) => e.value,
3131
- nodeLevels: [],
3132
- nodeWidth: 15,
3133
- nodeColor: (e) => e.color,
3134
- nodePattern: void 0,
3135
- nodeLabel: (e) => e.label ?? e.key,
3136
- nodeLabelColor: void 0,
3137
- nodeLabelAlignment: $.Along,
3138
- padAngle: .02,
3139
- cornerRadius: 2,
3140
- angleRange: [0, 2 * Math.PI],
3141
- radiusScaleExponent: 2
3142
- };
3143
- // node_modules/@unovis/ts/components/chord-diagram/modules/node.js
3144
- function uo(e) {
3145
- e.style("opacity", 0).each((e, t, n) => {
3146
- let r = n[t], i = (e.x0 + e.x1) / 2, a = (e.x1 - e.x0) / 2;
3147
- r._animState = {
3148
- x0: i - a * .8,
3149
- x1: i + a * .8,
3150
- y0: e.y0,
3151
- y1: e.y1
3152
- };
3153
- });
3154
- }
3155
- function fo(e, t, n, r) {
3156
- let i = (e) => Fr(e.data, t.nodeColor, e.height);
3157
- e.attr("id", (e) => e.uid).style("transition", `fill ${r}ms`).style("fill", i).style("stroke", i).style("mask", (e) => Vr(Br(e.data, t.nodePattern, e.height))), r ? X(e, r).style("opacity", 1).attrTween("d", (e, t, r) => {
3158
- let i = r[t], o = {
3159
- x0: e.x0,
3160
- x1: e.x1,
3161
- y0: e.y0,
3162
- y1: e.y1
3163
- }, s = a(i._animState, o);
3164
- return (e) => (i._animState = s(e), n(i._animState));
3165
- }) : e.attr("d", (e) => n(e)).style("opacity", 1);
3166
- }
3167
- function po(e, t) {
3168
- X(e, t).style("opacity", 0).remove();
3169
- }
3170
- // node_modules/@unovis/ts/components/chord-diagram/style.js
3171
- var mo = /* @__PURE__ */ C({
3172
- background: () => _o,
3173
- highlightedLink: () => Do,
3174
- highlightedNode: () => So,
3175
- label: () => Co,
3176
- labelExit: () => To,
3177
- labelText: () => wo,
3178
- labels: () => bo,
3179
- link: () => Eo,
3180
- links: () => yo,
3181
- node: () => xo,
3182
- nodes: () => vo,
3183
- root: () => ho,
3184
- transparent: () => Oo,
3185
- variables: () => go
3186
- }), ho = W`
3187
- label: chord-diagram-component;
3188
- `, go = Ot`
3189
- :root {
3190
- --vis-chord-diagram-link-fill-color: #cad5f6;
3191
- --vis-chord-diagram-link-stroke-color: #777777;
3192
- --vis-chord-diagram-link-opacity: 0.5;
3193
- --vis-chord-diagram-link-stroke-opacity: 0.15;
3194
- --vis-chord-diagram-link-highlighted-opacity: 0.9;
3195
- --vis-chord-diagram-link-dimmed-opacity: 0.25;
3196
-
3197
- --vis-chord-diagram-node-highlighted-opacity: 0.9;
3198
- --vis-chord-diagram-node-dimmed-opacity: 0.25;
3199
-
3200
- --vis-chord-diagram-label-text-fill-color-bright: #ffffff;
3201
- --vis-chord-diagram-label-text-fill-color-dark: #a5abb2;
3202
- --vis-chord-diagram-label-text-font-size: 1em;
3203
-
3204
- --vis-dark-chord-diagram-link-fill-color: #575c65;
3205
- }
3206
-
3207
- ${dr} ${`.${ho}`} {
3208
- --vis-chord-diagram-link-fill-color: var(--vis-dark-chord-diagram-link-fill-color);
3209
- }
3210
- `, _o = W`
3211
- label: background;
3212
- `, vo = W`
3213
- label: nodes;
3214
- `, yo = W`
3215
- label: links;
3216
- `, bo = W`
3217
- label: labels;
3218
- `, xo = W`
3219
- label: node;
3220
- stroke-width: 0;
3221
- fill: var(--vis-color-main);
3222
- stroke: var(--vis-color-main);
3223
- transition: .1s fill-opacity;
3224
- `, So = W`
3225
- label: highlighted;
3226
- fill-opacity: var(--vis-chord-diagram-node-highlighted-opacity);
3227
- stroke-width: 1.5;
3228
- `, Co = W`
3229
- label: label;
3230
- `, wo = W`
3231
- label: label-text;
3232
-
3233
- dominant-baseline: middle;
3234
- user-select: none;
3235
- font-size: var(--vis-chord-diagram-label-text-font-size);
3236
-
3237
- > textPath {
3238
- dominant-baseline: central;
3239
- }
3240
- `, To = W`
3241
- label: label-exit;
3242
- `, Eo = W`
3243
- label: link;
3244
-
3245
- fill: var(--vis-chord-diagram-link-fill-color);
3246
- fill-opacity: var(--vis-chord-diagram-link-opacity);
3247
- stroke: var(--vis-chord-diagram-link-stroke-color);
3248
- stroke-opacity: var(--vis-chord-diagram-link-stroke-opacity);
3249
- transition: .1s fill-opacity;
3250
- `, Do = W`
3251
- label: highlighted;
3252
- fill-opacity: var(--vis-chord-diagram-link-highlighted-opacity);
3253
- `, Oo = W`
3254
- label: transparent;
3255
-
3256
- ${`.${Eo}`}:not(${`.${Do}`}) {
3257
- fill-opacity: var(--vis-chord-diagram-link-dimmed-opacity);
3258
- }
3259
-
3260
- ${`.${xo}`}:not(${`.${So}`}) {
3261
- fill-opacity: var(--vis-chord-diagram-node-dimmed-opacity);
3262
- }
3263
- `;
3264
- function ko(e, t) {
3265
- switch (G(e.data, t.nodeLabelAlignment) ?? $.Along) {
3266
- case $.Perpendicular: return Fr(e.data, t.nodeColor, e.height);
3267
- case $.Along: {
3268
- let n = Fr(e.data, t.nodeColor, e.height), r = p(n);
3269
- return (r ? Rr(r.hex()) : 0) > .65 ? "var(--vis-chord-diagram-label-text-fill-color-dark)" : "var(--vis-chord-diagram-label-text-fill-color-bright)";
3270
- }
3271
- }
3272
- }
3273
- function Ao(e, t) {
3274
- switch (G(e.data, t.nodeLabelAlignment) ?? $.Along) {
3275
- case $.Perpendicular: return (e.x0 + e.x1) / 2 * 180 / Math.PI < 180 ? "start" : "end";
3276
- case $.Along: return null;
3277
- }
3278
- }
3279
- function jo(e, t, n) {
3280
- switch (G(e.data, t.nodeLabelAlignment) ?? $.Along) {
3281
- case $.Perpendicular: {
3282
- let t = n(e.y1) + 3, r = (e.x0 + e.x1) / 2 - Math.PI / 2;
3283
- return `translate(${t * Math.cos(r)}, ${t * Math.sin(r)})`;
3284
- }
3285
- case $.Along: return null;
3286
- }
3287
- }
3288
- function Mo(e, t, n) {
3289
- e.style("opacity", 0).attr("transform", (e) => jo(e, t, n)), e.append("text").attr("class", wo).style("fill", (e) => Fr(e.data, t.nodeColor, e.height));
3290
- }
3291
- function No(e, t, n, r, i) {
3292
- let { nodeLabel: a, nodeLabelColor: o, nodeWidth: s } = t;
3293
- X(e, i).attr("transform", (e) => jo(e, t, r)).style("opacity", 1);
3294
- let c = e.select(`.${wo}`);
3295
- c.selectAll("textPath").remove(), c.text((e) => Zt(e.data, a)).style("transition", `fill ${i}ms`).style("fill", (e) => Fr(e.data, o) ?? ko(e, t)).style("text-anchor", (e) => Ao(e, t)).each((e, i, a) => {
3296
- let o = G(e.data, t.nodeLabelAlignment) ?? $.Along, c = e.x1 - e.x0 - K(e.data, t.padAngle) * 2, l = (r(e.y1) - K(e, t.nodeWidth) / 2) * c, u = o === $.Along ? l : n - 6, d = f(a[i]).call(di, u).attr("dx", o === $.Along ? 3 : null).attr("dy", o === $.Along ? K(e.data, s) / 2 : null), p = oi(d.node()), m = d.text();
3297
- o === $.Along && (d.text(""), p <= u && d.append("textPath").attr("href", `#${e.uid}`).text(m));
3298
- }), X(c, i).attr("transform", (e) => {
3299
- if (G(e.data, t.nodeLabelAlignment) !== $.Perpendicular) return null;
3300
- let n = (e.x0 + e.x1) / 2 * 180 / Math.PI;
3301
- return `rotate(${n < 180 ? n - 90 : n + 90})`;
3302
- });
3303
- }
3304
- function Po(e, t) {
3305
- X(e, t).style("opacity", 0).remove();
3306
- }
3307
- // node_modules/@unovis/ts/components/chord-diagram/modules/layout.js
3308
- function Fo(e) {
3309
- let { height: t, depth: n } = e;
3310
- if (t > 0) {
3311
- let r = e.data, i = e;
3312
- i.data = {
3313
- key: r[0],
3314
- values: r[1],
3315
- depth: n,
3316
- height: t,
3317
- ancestors: i.ancestors().map((e) => e.data.key)
3318
- };
3319
- }
3320
- }
3321
- function Io(e, t, n = []) {
3322
- let r = n.map((e) => (t) => t[e]), i = n.length ? Nt(e, ...r) : {
3323
- key: "root",
3324
- children: e
3325
- };
3326
- return x(i).sum((e) => K(e, t)).each(Fo);
3327
- }
3328
- function Lo(e, t, n = .95) {
3329
- if (!e.children) return;
3330
- let r = e.value > 0, i = e.x1 - e.x0, a = i * (e.y0 === 0 ? 1 : n), o = i - a, s = r ? t : a / e.children.length, c = Vi().startAngle(e.x0 + o / 2).endAngle(e.x1 - o / 2).padAngle(s).value((e) => r ? e.value : 1).sort((t, n) => e.children.indexOf(t) - e.children.indexOf(n))(e.children);
3331
- e.children.forEach((e, i) => {
3332
- let a = c[i].startAngle, o = c[i].endAngle, s = (o - a) * (1 - n), l = (a + o) / 2;
3333
- e.x0 = r ? a + s / 2 : l - t / 2, e.x1 = r ? o - s / 2 : l + t / 2;
3334
- });
3335
- }
3336
- function Ro(e, t, n) {
3337
- let r = Yt(t, (e) => e.source._id), i = Yt(t, (e) => e.target._id), a = e.leaves(), o = Pt(a, (e) => e.data._id), s = (e, t, n, r = []) => (r[e.height] = e, r[n * 2 - t.height] = t, e.parent && t.parent && s(e.parent, t.parent, n, r), r), c = (e, t, r, i) => {
3338
- e.forEach((e) => {
3339
- e._state.points || (e._state.points = []);
3340
- let a = o.get(e.source._id), c = o.get(e.target._id), l = s(t === "out" ? a : c, t === "out" ? c : a, i)[r], u = l.x1 - l.x0 - n, d = l._prevX1 ?? l.x0 + n / 2, f = d + u * e._state.value / l.value;
3341
- l._prevX1 = f;
3342
- let p = t === "out" ? r : i * 2 - 1 - r;
3343
- e._state.points[p] = {
3344
- a0: d,
3345
- a1: f,
3346
- r: l.y1
3347
- };
3348
- });
3349
- };
3350
- return a.forEach((e) => {
3351
- let t = r[e.data._id] || [], n = i[e.data._id] || [];
3352
- for (let r = 0; r < e.depth; r += 1) c(t, "out", r, e.depth), c(n, "in", r, e.depth);
3353
- }), t.map((e) => ({
3354
- source: o.get(e.source._id),
3355
- target: o.get(e.target._id),
3356
- data: e,
3357
- points: e._state.points,
3358
- _state: {}
3359
- }));
3360
- }
3361
- // node_modules/d3-chord/src/math.js
3362
- var zo = Math.abs, Bo = Math.cos, Vo = Math.sin, Ho = Math.PI, Uo = Ho / 2;
3363
- Ho * 2;
3364
- // node_modules/d3-chord/src/array.js
3365
- var Wo = Array.prototype.slice;
3366
- // node_modules/d3-chord/src/constant.js
3367
- function Go(e) {
3368
- return function() {
3369
- return e;
3370
- };
3371
- }
3372
- // node_modules/d3-chord/src/ribbon.js
3373
- function Ko(e) {
3374
- return e.source;
3375
- }
3376
- function qo(e) {
3377
- return e.target;
3378
- }
3379
- function Jo(e) {
3380
- return e.radius;
3381
- }
3382
- function Yo(e) {
3383
- return e.startAngle;
3384
- }
3385
- function Xo(e) {
3386
- return e.endAngle;
3387
- }
3388
- function Zo() {
3389
- return 0;
3390
- }
3391
- function Qo(e) {
3392
- var t = Ko, n = qo, r = Jo, i = Jo, a = Yo, o = Xo, s = Zo, c = null;
3393
- function l() {
3394
- var l, u = t.apply(this, arguments), d = n.apply(this, arguments), f = s.apply(this, arguments) / 2, p = Wo.call(arguments), m = +r.apply(this, (p[0] = u, p)), h = a.apply(this, p) - Uo, g = o.apply(this, p) - Uo, v = +i.apply(this, (p[0] = d, p)), y = a.apply(this, p) - Uo, b = o.apply(this, p) - Uo;
3395
- if (c ||= l = _(), f > 1e-12 && (zo(g - h) > f * 2 + 1e-12 ? g > h ? (h += f, g -= f) : (h -= f, g += f) : h = g = (h + g) / 2, zo(b - y) > f * 2 + 1e-12 ? b > y ? (y += f, b -= f) : (y -= f, b += f) : y = b = (y + b) / 2), c.moveTo(m * Bo(h), m * Vo(h)), c.arc(0, 0, m, h, g), h !== y || g !== b) {
3396
- if (e) {
3397
- var x = v - +e.apply(this, arguments), S = (y + b) / 2;
3398
- c.quadraticCurveTo(0, 0, x * Bo(y), x * Vo(y)), c.lineTo(v * Bo(S), v * Vo(S)), c.lineTo(x * Bo(b), x * Vo(b));
3399
- } else c.quadraticCurveTo(0, 0, v * Bo(y), v * Vo(y)), c.arc(0, 0, v, y, b);
3400
- }
3401
- if (c.quadraticCurveTo(0, 0, m * Bo(h), m * Vo(h)), c.closePath(), l) return c = null, l + "" || null;
3402
- }
3403
- return e && (l.headRadius = function(t) {
3404
- return arguments.length ? (e = typeof t == "function" ? t : Go(+t), l) : e;
3405
- }), l.radius = function(e) {
3406
- return arguments.length ? (r = i = typeof e == "function" ? e : Go(+e), l) : r;
3407
- }, l.sourceRadius = function(e) {
3408
- return arguments.length ? (r = typeof e == "function" ? e : Go(+e), l) : r;
3409
- }, l.targetRadius = function(e) {
3410
- return arguments.length ? (i = typeof e == "function" ? e : Go(+e), l) : i;
3411
- }, l.startAngle = function(e) {
3412
- return arguments.length ? (a = typeof e == "function" ? e : Go(+e), l) : a;
3413
- }, l.endAngle = function(e) {
3414
- return arguments.length ? (o = typeof e == "function" ? e : Go(+e), l) : o;
3415
- }, l.padAngle = function(e) {
3416
- return arguments.length ? (s = typeof e == "function" ? e : Go(+e), l) : s;
3417
- }, l.source = function(e) {
3418
- return arguments.length ? (t = e, l) : t;
3419
- }, l.target = function(e) {
3420
- return arguments.length ? (n = e, l) : n;
3421
- }, l.context = function(e) {
3422
- return arguments.length ? (c = e ?? null, l) : c;
3423
- }, l;
3424
- }
3425
- function $o() {
3426
- return Qo();
3427
- }
3428
- // node_modules/@unovis/ts/components/chord-diagram/modules/link.js
3429
- function es() {
3430
- return "M0,0 L0,0";
3431
- }
3432
- var ts = $o().source((e) => e[0]).target((e) => e[e.length - 1]).startAngle((e) => e.a0).endAngle((e) => e.a1), ns = Ki().curve(ro.catmullRom.alpha(.5)).startAngle((e, t, n) => t < n.length / 2 ? e.a1 : e.a0).endAngle((e, t, n) => t < n.length / 2 ? e.a0 : e.a1);
3433
- function rs(e, t) {
3434
- let n = e.length === 2 ? ts : ns;
3435
- n.radius((e) => t(e.r));
3436
- let r = n(e);
3437
- if (e.length === 2) return r;
3438
- let i = r.slice(0, -1);
3439
- return io(i.concat(`L${i.match(/M-?\d*\.?\d*[,\s*]-?\d*\.?\d*/)?.[0].slice(1)}`), Math.max(t(e[0].r), 0));
3440
- }
3441
- function is(e, t) {
3442
- e.attr("d", (e) => rs(e.points, t) || es()).style("opacity", 0);
3443
- }
3444
- function as(e, t, n, r) {
3445
- e.style("transition", `fill ${r}ms`).style("fill", (e) => Fr(e.data, t.linkColor)).style("stroke", (e) => Fr(e.data, t.linkColor)).style("mask", (e) => Vr(Br(e.data, t.linkPattern)));
3446
- let i = X(e, r).style("opacity", 1);
3447
- r ? i.attrTween("d", (e, t, r) => no(f(r[t]).attr("d"), rs(e.points, n) || es())) : i.attr("d", (e) => rs(e.points, n) || es());
3448
- }
3449
- function os(e, t) {
3450
- X(e, t).style("opacity", 0).remove();
3451
- }
3452
- // node_modules/@unovis/ts/components/chord-diagram/index.js
3453
- var ss = class e extends gi {
3454
- constructor(t) {
3455
- super(), this._defaultConfig = lo, this.config = this._defaultConfig, this.datamodel = new ao(), this.arcGen = Pi(), this.radiusScale = Nr(), this.events = {
3456
- [e.selectors.node]: {
3457
- mouseover: this._onNodeMouseOver.bind(this),
3458
- mouseout: this._onNodeMouseOut.bind(this)
3459
- },
3460
- [e.selectors.link]: {
3461
- mouseover: this._onLinkMouseOver.bind(this),
3462
- mouseout: this._onLinkMouseOut.bind(this)
3463
- },
3464
- [e.selectors.label]: {
3465
- mouseover: this._onNodeMouseOver.bind(this),
3466
- mouseout: this._onNodeMouseOut.bind(this)
3467
- }
3468
- }, this._nodes = [], this._links = [], this.setConfig(t), this.background = this.g.append("rect").attr("class", _o), this.linkGroup = this.g.append("g").attr("class", yo), this.nodeGroup = this.g.append("g").attr("class", vo), this.labelGroup = this.g.append("g").attr("class", bo);
3469
- }
3470
- get _forceHighlight() {
3471
- return this.config.highlightedNodeId !== void 0 || this.config.highlightedLinkIds?.length > 0;
3472
- }
3473
- get bleed() {
3474
- let { config: e } = this, t = 0, n = 0, r = 0, i = 0;
3475
- return this._nodes.forEach((a) => {
3476
- let o = G(a.data, e.nodeLabelAlignment);
3477
- if (a.height === 0 && o === $.Perpendicular) {
3478
- let o = ni(Zt(a.data, e.nodeLabel) ?? "", dn("var(--vis-chord-diagram-label-text-font-size)", this.element)), [s, c] = this.arcGen.centroid(a);
3479
- s < 0 ? i = Math.max(i, o) : r = Math.max(r, o), c < 0 ? t = Math.max(t, o) : n = Math.max(n, o);
3480
- }
3481
- }), i += 6, r += 6, n += 6, t += 6, {
3482
- top: t,
3483
- bottom: n,
3484
- left: i,
3485
- right: r
3486
- };
3487
- }
3488
- setSize(e, t, n, r) {
3489
- super.setSize(e, t, n, r), this.radiusScale.exponent(this.config.radiusScaleExponent).range([0, Math.min(e, t) / 2]);
3490
- }
3491
- setData(e) {
3492
- super.setData(e), this._layoutData();
3493
- }
3494
- _layoutData() {
3495
- let { nodes: e } = this.datamodel, { links: t } = this.datamodel, { padAngle: n, linkValue: r, nodeLevels: i } = this.config;
3496
- e.forEach((e) => {
3497
- delete e._state.value;
3498
- }), t.forEach((e) => {
3499
- delete e._state.points, e._state.value = K(e, r), e.source._state.value = (e.source._state.value || 0) + K(e, r), e.target._state.value = (e.target._state.value || 0) + K(e, r);
3500
- }), t = t.filter((e) => e._state.value);
3501
- let a = Io(e, (e) => e._state?.value, i), o = co().size([this.config.angleRange[1], 1])(a);
3502
- o.each((e, t) => {
3503
- Lo(e, n), e.uid = `${this.uid.substr(0, 4)}-${t}`, e.x0 = Number.isNaN(e.x0) ? 0 : e.x0, e.x1 = Number.isNaN(e.x1) ? 0 : e.x1, e._state = {};
3504
- });
3505
- let s = o.descendants();
3506
- this._rootNode = s.find((e) => e.depth === 0), this._nodes = s.filter((e) => e.depth !== 0), this._links = Ro(o, t, n);
3507
- }
3508
- _render(e) {
3509
- super._render(e);
3510
- let { config: t, bleed: n } = this;
3511
- this._layoutData();
3512
- let r = Rt(e) ? e : t.duration, i = Math.min(this._width, this._height), a = i / 2 - c([
3513
- n.top,
3514
- n.bottom,
3515
- n.left,
3516
- n.right
3517
- ]), o = 1 + t.nodeLevels?.length, s = a > t.nodeWidth * o ? t.nodeWidth : Math.max(a / o, 0);
3518
- this.radiusScale.range([0, Math.max(a, 0)]), this.arcGen.startAngle((e) => e.x0 + t.padAngle / 2 - (e.value ? 0 : Math.PI / 360)).endAngle((e) => e.x1 - t.padAngle / 2 + (e.value ? 0 : Math.PI / 360)).cornerRadius((e) => K(e.data, t.cornerRadius)).innerRadius((e) => Math.max(this.radiusScale(e.y1) - s, 0)).outerRadius((e) => this.radiusScale(e.y1)), this.g.classed(Oo, this._forceHighlight), this.background.attr("width", this._width).attr("height", this._height).style("opacity", 0), this.nodeGroup.attr("transform", `translate(${this._width / 2},${this._height / 2})`), this.labelGroup.attr("transform", `translate(${this._width / 2},${this._height / 2})`), this.linkGroup.attr("transform", `translate(${this._width / 2},${this._height / 2})`);
3519
- let l = this.linkGroup.selectAll(`.${Eo}`).data(this._links, (e) => String(e.data._id)), u = l.enter().append("path").attr("class", Eo).call(is, this.radiusScale);
3520
- l.merge(u).classed(Do, (e) => {
3521
- let n = e.data.id ?? e.data._indexGlobal;
3522
- return t.highlightedLinkIds?.includes(n);
3523
- }).call(as, t, this.radiusScale, r), l.exit().call(os, r);
3524
- let d = this.nodeGroup.selectAll(`.${xo}`).data(this._nodes, (e) => String(e.uid)), f = d.enter().append("path").attr("class", xo).call(uo);
3525
- d.merge(f).classed(So, (e) => t.highlightedNodeId === e.data._id).call(fo, t, this.arcGen, r), d.exit().call(po, r);
3526
- let p = i - a, m = this.labelGroup.selectAll(`.${Co}`).data(this._nodes, (e) => String(e.uid)), h = m.enter().append("g").attr("class", Co).call(Mo, t, this.radiusScale);
3527
- m.merge(h).call(No, t, p, this.radiusScale, r), m.exit().attr("class", To).call(Po, r);
3528
- }
3529
- _onNodeMouseOver(e) {
3530
- let t;
3531
- if (e.children) {
3532
- let n = e.leaves();
3533
- t = this._links.filter((e) => n.find((t) => e.source.data.id === t.data.id || e.target.data.id === t.data.id));
3534
- } else {
3535
- let n = e;
3536
- t = this._links.filter((e) => e.source.data.id === n.data.id || e.target.data.id === n.data.id);
3537
- }
3538
- t.length || (e._state.hovered = !0), this._highlightOnHover(t);
3539
- }
3540
- _onNodeMouseOut() {
3541
- this._highlightOnHover();
3542
- }
3543
- _onLinkMouseOver(e) {
3544
- this._highlightOnHover([e]);
3545
- }
3546
- _onLinkMouseOut() {
3547
- this._highlightOnHover();
3548
- }
3549
- _highlightOnHover(e) {
3550
- this._forceHighlight || (e ? e.forEach((e) => {
3551
- e._state.hovered = !0;
3552
- let t = e.source.path(this._rootNode), n = e.target.path(this._rootNode);
3553
- t.forEach((e) => {
3554
- e.depth && (e._state.hovered = !0);
3555
- }), n.forEach((e) => {
3556
- e.depth && (e._state.hovered = !0);
3557
- });
3558
- }) : (this._nodes.forEach((e) => {
3559
- delete e._state.hovered;
3560
- }), this._links.forEach((e) => {
3561
- delete e._state.hovered;
3562
- })), this.nodeGroup.selectAll(`.${xo}`).classed(So, (e) => e._state.hovered), this.linkGroup.selectAll(`.${Eo}`).classed(Do, (e) => e._state.hovered), this.g.classed(Oo, !!e));
3563
- }
3564
- };
3565
- ss.selectors = mo;
3566
- var cs = ss, ls = 16, us = .02;
3567
- function ds(e, t, n = {}) {
3568
- let r = n.colorModeId ?? "light", i = u[r], a = new cs({
3569
- linkColor: (t) => l(e.nodes.findIndex((e) => e.id === t.source), r),
3570
- nodeColor: (e, t) => l(t, r),
3571
- nodeLabel: (e) => "label" in e ? e.label : e.key,
3572
- nodeLabelColor: i.primary,
3573
- nodeWidth: n.nodeWidth ?? ls,
3574
- padAngle: n.padAngle ?? us
3575
- }), o = {
3576
- links: e.links,
3577
- nodes: e.nodes
3578
- }, s = new pi(t, { component: a }, o);
3579
- return {
3580
- resize: () => {
3581
- s.render();
3582
- },
3583
- get svg() {
3584
- return s.element;
3585
- }
3586
- };
3587
- }
3588
- export { ds as renderChordDiagram };