gradio-leaderboard 0.0.12rc0__py3-none-any.whl → 0.0.14__py3-none-any.whl

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 (59) hide show
  1. gradio_leaderboard/leaderboard.pyi +102 -72
  2. gradio_leaderboard/templates/component/Index-CzS_eGV6.js +34210 -0
  3. gradio_leaderboard/templates/component/_basePickBy-CPQEc5fh.js +151 -0
  4. gradio_leaderboard/templates/component/_baseUniq-DlEwemC3.js +615 -0
  5. gradio_leaderboard/templates/component/arc-4UNMf6Jv.js +83 -0
  6. gradio_leaderboard/templates/component/architectureDiagram-NQ2NVSRB-ClVp_eQQ.js +4629 -0
  7. gradio_leaderboard/templates/component/blockDiagram-PHRCVELO-CBZHEIQE.js +2255 -0
  8. gradio_leaderboard/templates/component/c4Diagram-6F6E4RAY-BcEP_NdH.js +1586 -0
  9. gradio_leaderboard/templates/component/channel-BK2Jce3b.js +5 -0
  10. gradio_leaderboard/templates/component/chunk-353BL4L5-D4dVjjbU.js +8 -0
  11. gradio_leaderboard/templates/component/chunk-67H74DCK-Dd9cOxfN.js +64 -0
  12. gradio_leaderboard/templates/component/chunk-6OLS64BW-CfumlcA2.js +1376 -0
  13. gradio_leaderboard/templates/component/chunk-AACKK3MU-4CpiDhxa.js +18 -0
  14. gradio_leaderboard/templates/component/chunk-BFAMUDN2-C6YyJRb4.js +8 -0
  15. gradio_leaderboard/templates/component/chunk-E2GYISFI-CbYUJnri.js +19 -0
  16. gradio_leaderboard/templates/component/chunk-QEP2MXWD-BYLoFCys.js +1380 -0
  17. gradio_leaderboard/templates/component/chunk-SKB7J2MH-DNiBnZKZ.js +19 -0
  18. gradio_leaderboard/templates/component/classDiagram-BGRH5UQR-BrG1RRX8.js +16 -0
  19. gradio_leaderboard/templates/component/classDiagram-v2-O24JOBDK-BrG1RRX8.js +16 -0
  20. gradio_leaderboard/templates/component/clone-BA6MvtJ3.js +8 -0
  21. gradio_leaderboard/templates/component/cytoscape.esm-Bdz5CrXX.js +18629 -0
  22. gradio_leaderboard/templates/component/dagre-FFZHY6LT-6RahWHGr.js +444 -0
  23. gradio_leaderboard/templates/component/defaultLocale-D7EN2tov.js +171 -0
  24. gradio_leaderboard/templates/component/diagram-3EMPZRKU-DtoOVTDy.js +526 -0
  25. gradio_leaderboard/templates/component/diagram-5UYTHUR4-MEp0H-U7.js +137 -0
  26. gradio_leaderboard/templates/component/diagram-ZTM2IBQH-22c5YuUh.js +217 -0
  27. gradio_leaderboard/templates/component/erDiagram-R3QVA2FD-DZp2MeDc.js +844 -0
  28. gradio_leaderboard/templates/component/flowDiagram-PKI6S5ZS-CfK9UZi3.js +1623 -0
  29. gradio_leaderboard/templates/component/ganttDiagram-EK5VF46D-waaD2Kup.js +2502 -0
  30. gradio_leaderboard/templates/component/gitGraphDiagram-GW3U2K7C-DJCAxNvz.js +699 -0
  31. gradio_leaderboard/templates/component/graph-CXm5uxKj.js +247 -0
  32. gradio_leaderboard/templates/component/index.js +2 -29469
  33. gradio_leaderboard/templates/component/infoDiagram-RLU2ROGC-_Rx9wF6U.js +24 -0
  34. gradio_leaderboard/templates/component/init-DjUOC4st.js +16 -0
  35. gradio_leaderboard/templates/component/journeyDiagram-EWQZEKCU-G-tt0noJ.js +836 -0
  36. gradio_leaderboard/templates/component/kanban-definition-ILFWEQ3N-2aHifLFR.js +718 -0
  37. gradio_leaderboard/templates/component/layout-DiZ88ySr.js +1324 -0
  38. gradio_leaderboard/templates/component/linear-D4M9Dm-w.js +259 -0
  39. gradio_leaderboard/templates/component/mermaid.core-D36e06XD.js +14941 -0
  40. gradio_leaderboard/templates/component/mindmap-definition-CZNETY7S-1Jow2c7r.js +3215 -0
  41. gradio_leaderboard/templates/component/ordinal-DfAQgscy.js +61 -0
  42. gradio_leaderboard/templates/component/pieDiagram-NIOCPIFQ-DU7jHSoi.js +162 -0
  43. gradio_leaderboard/templates/component/quadrantDiagram-2OG54O6I-GcojS_If.js +1028 -0
  44. gradio_leaderboard/templates/component/requirementDiagram-SO3GGRV7-CBRyajan.js +853 -0
  45. gradio_leaderboard/templates/component/sankeyDiagram-4UZDY2LN-CeZji6oR.js +820 -0
  46. gradio_leaderboard/templates/component/sequenceDiagram-ZIKVLSP4-DMygkr3Y.js +2284 -0
  47. gradio_leaderboard/templates/component/stateDiagram-XX37X6EN-DK2vsx2r.js +263 -0
  48. gradio_leaderboard/templates/component/stateDiagram-v2-GD6S3NHB-BoIkPrjk.js +16 -0
  49. gradio_leaderboard/templates/component/style.css +1 -1
  50. gradio_leaderboard/templates/component/timeline-definition-RI47OAVP-BQ_Jr8hZ.js +797 -0
  51. gradio_leaderboard/templates/component/treemap-FKARHQ26-2Ty0RcZX.js +12981 -0
  52. gradio_leaderboard/templates/component/xychartDiagram-H2YORKM3--C9dwTwV.js +1368 -0
  53. gradio_leaderboard/templates/example/index.js +201 -139
  54. {gradio_leaderboard-0.0.12rc0.dist-info → gradio_leaderboard-0.0.14.dist-info}/METADATA +3 -3
  55. gradio_leaderboard-0.0.14.dist-info/RECORD +59 -0
  56. {gradio_leaderboard-0.0.12rc0.dist-info → gradio_leaderboard-0.0.14.dist-info}/WHEEL +1 -1
  57. gradio_leaderboard/templates/component/__vite-browser-external-2447137e.js +0 -4
  58. gradio_leaderboard/templates/component/wrapper-6f348d45-19fa94bf.js +0 -2453
  59. gradio_leaderboard-0.0.12rc0.dist-info/RECORD +0 -12
@@ -0,0 +1,820 @@
1
+ import { _ as g, d as ot, g as mt, s as kt, b as _t, c as xt, o as vt, n as bt, t as wt, e as St, v as Lt, j as G, W as Et } from "./mermaid.core-D36e06XD.js";
2
+ import { o as At } from "./ordinal-DfAQgscy.js";
3
+ function Tt(t) {
4
+ for (var n = t.length / 6 | 0, i = new Array(n), a = 0; a < n; ) i[a] = "#" + t.slice(a * 6, ++a * 6);
5
+ return i;
6
+ }
7
+ const Mt = Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
8
+ function at(t, n) {
9
+ let i;
10
+ if (n === void 0)
11
+ for (const a of t)
12
+ a != null && (i < a || i === void 0 && a >= a) && (i = a);
13
+ else {
14
+ let a = -1;
15
+ for (let h of t)
16
+ (h = n(h, ++a, t)) != null && (i < h || i === void 0 && h >= h) && (i = h);
17
+ }
18
+ return i;
19
+ }
20
+ function dt(t, n) {
21
+ let i;
22
+ if (n === void 0)
23
+ for (const a of t)
24
+ a != null && (i > a || i === void 0 && a >= a) && (i = a);
25
+ else {
26
+ let a = -1;
27
+ for (let h of t)
28
+ (h = n(h, ++a, t)) != null && (i > h || i === void 0 && h >= h) && (i = h);
29
+ }
30
+ return i;
31
+ }
32
+ function J(t, n) {
33
+ let i = 0;
34
+ if (n === void 0)
35
+ for (let a of t)
36
+ (a = +a) && (i += a);
37
+ else {
38
+ let a = -1;
39
+ for (let h of t)
40
+ (h = +n(h, ++a, t)) && (i += h);
41
+ }
42
+ return i;
43
+ }
44
+ function Nt(t) {
45
+ return t.target.depth;
46
+ }
47
+ function It(t) {
48
+ return t.depth;
49
+ }
50
+ function Pt(t, n) {
51
+ return n - 1 - t.height;
52
+ }
53
+ function gt(t, n) {
54
+ return t.sourceLinks.length ? t.depth : n - 1;
55
+ }
56
+ function Ct(t) {
57
+ return t.targetLinks.length ? t.depth : t.sourceLinks.length ? dt(t.sourceLinks, Nt) - 1 : 0;
58
+ }
59
+ function Y(t) {
60
+ return function() {
61
+ return t;
62
+ };
63
+ }
64
+ function lt(t, n) {
65
+ return H(t.source, n.source) || t.index - n.index;
66
+ }
67
+ function ct(t, n) {
68
+ return H(t.target, n.target) || t.index - n.index;
69
+ }
70
+ function H(t, n) {
71
+ return t.y0 - n.y0;
72
+ }
73
+ function tt(t) {
74
+ return t.value;
75
+ }
76
+ function Ot(t) {
77
+ return t.index;
78
+ }
79
+ function Dt(t) {
80
+ return t.nodes;
81
+ }
82
+ function $t(t) {
83
+ return t.links;
84
+ }
85
+ function ut(t, n) {
86
+ const i = t.get(n);
87
+ if (!i) throw new Error("missing: " + n);
88
+ return i;
89
+ }
90
+ function ht({ nodes: t }) {
91
+ for (const n of t) {
92
+ let i = n.y0, a = i;
93
+ for (const h of n.sourceLinks)
94
+ h.y0 = i + h.width / 2, i += h.width;
95
+ for (const h of n.targetLinks)
96
+ h.y1 = a + h.width / 2, a += h.width;
97
+ }
98
+ }
99
+ function jt() {
100
+ let t = 0, n = 0, i = 1, a = 1, h = 24, b = 8, p, k = Ot, s = gt, o, l, _ = Dt, x = $t, y = 6;
101
+ function v() {
102
+ const e = { nodes: _.apply(null, arguments), links: x.apply(null, arguments) };
103
+ return M(e), T(e), N(e), C(e), S(e), ht(e), e;
104
+ }
105
+ v.update = function(e) {
106
+ return ht(e), e;
107
+ }, v.nodeId = function(e) {
108
+ return arguments.length ? (k = typeof e == "function" ? e : Y(e), v) : k;
109
+ }, v.nodeAlign = function(e) {
110
+ return arguments.length ? (s = typeof e == "function" ? e : Y(e), v) : s;
111
+ }, v.nodeSort = function(e) {
112
+ return arguments.length ? (o = e, v) : o;
113
+ }, v.nodeWidth = function(e) {
114
+ return arguments.length ? (h = +e, v) : h;
115
+ }, v.nodePadding = function(e) {
116
+ return arguments.length ? (b = p = +e, v) : b;
117
+ }, v.nodes = function(e) {
118
+ return arguments.length ? (_ = typeof e == "function" ? e : Y(e), v) : _;
119
+ }, v.links = function(e) {
120
+ return arguments.length ? (x = typeof e == "function" ? e : Y(e), v) : x;
121
+ }, v.linkSort = function(e) {
122
+ return arguments.length ? (l = e, v) : l;
123
+ }, v.size = function(e) {
124
+ return arguments.length ? (t = n = 0, i = +e[0], a = +e[1], v) : [i - t, a - n];
125
+ }, v.extent = function(e) {
126
+ return arguments.length ? (t = +e[0][0], i = +e[1][0], n = +e[0][1], a = +e[1][1], v) : [[t, n], [i, a]];
127
+ }, v.iterations = function(e) {
128
+ return arguments.length ? (y = +e, v) : y;
129
+ };
130
+ function M({ nodes: e, links: f }) {
131
+ for (const [c, r] of e.entries())
132
+ r.index = c, r.sourceLinks = [], r.targetLinks = [];
133
+ const u = new Map(e.map((c, r) => [k(c, r, e), c]));
134
+ for (const [c, r] of f.entries()) {
135
+ r.index = c;
136
+ let { source: m, target: w } = r;
137
+ typeof m != "object" && (m = r.source = ut(u, m)), typeof w != "object" && (w = r.target = ut(u, w)), m.sourceLinks.push(r), w.targetLinks.push(r);
138
+ }
139
+ if (l != null)
140
+ for (const { sourceLinks: c, targetLinks: r } of e)
141
+ c.sort(l), r.sort(l);
142
+ }
143
+ function T({ nodes: e }) {
144
+ for (const f of e)
145
+ f.value = f.fixedValue === void 0 ? Math.max(J(f.sourceLinks, tt), J(f.targetLinks, tt)) : f.fixedValue;
146
+ }
147
+ function N({ nodes: e }) {
148
+ const f = e.length;
149
+ let u = new Set(e), c = /* @__PURE__ */ new Set(), r = 0;
150
+ for (; u.size; ) {
151
+ for (const m of u) {
152
+ m.depth = r;
153
+ for (const { target: w } of m.sourceLinks)
154
+ c.add(w);
155
+ }
156
+ if (++r > f) throw new Error("circular link");
157
+ u = c, c = /* @__PURE__ */ new Set();
158
+ }
159
+ }
160
+ function C({ nodes: e }) {
161
+ const f = e.length;
162
+ let u = new Set(e), c = /* @__PURE__ */ new Set(), r = 0;
163
+ for (; u.size; ) {
164
+ for (const m of u) {
165
+ m.height = r;
166
+ for (const { source: w } of m.targetLinks)
167
+ c.add(w);
168
+ }
169
+ if (++r > f) throw new Error("circular link");
170
+ u = c, c = /* @__PURE__ */ new Set();
171
+ }
172
+ }
173
+ function $({ nodes: e }) {
174
+ const f = at(e, (r) => r.depth) + 1, u = (i - t - h) / (f - 1), c = new Array(f);
175
+ for (const r of e) {
176
+ const m = Math.max(0, Math.min(f - 1, Math.floor(s.call(null, r, f))));
177
+ r.layer = m, r.x0 = t + m * u, r.x1 = r.x0 + h, c[m] ? c[m].push(r) : c[m] = [r];
178
+ }
179
+ if (o) for (const r of c)
180
+ r.sort(o);
181
+ return c;
182
+ }
183
+ function B(e) {
184
+ const f = dt(e, (u) => (a - n - (u.length - 1) * p) / J(u, tt));
185
+ for (const u of e) {
186
+ let c = n;
187
+ for (const r of u) {
188
+ r.y0 = c, r.y1 = c + r.value * f, c = r.y1 + p;
189
+ for (const m of r.sourceLinks)
190
+ m.width = m.value * f;
191
+ }
192
+ c = (a - c + p) / (u.length + 1);
193
+ for (let r = 0; r < u.length; ++r) {
194
+ const m = u[r];
195
+ m.y0 += c * (r + 1), m.y1 += c * (r + 1);
196
+ }
197
+ A(u);
198
+ }
199
+ }
200
+ function S(e) {
201
+ const f = $(e);
202
+ p = Math.min(b, (a - n) / (at(f, (u) => u.length) - 1)), B(f);
203
+ for (let u = 0; u < y; ++u) {
204
+ const c = Math.pow(0.99, u), r = Math.max(1 - c, (u + 1) / y);
205
+ z(f, c, r), P(f, c, r);
206
+ }
207
+ }
208
+ function P(e, f, u) {
209
+ for (let c = 1, r = e.length; c < r; ++c) {
210
+ const m = e[c];
211
+ for (const w of m) {
212
+ let L = 0, R = 0;
213
+ for (const { source: W, value: Z } of w.targetLinks) {
214
+ let U = Z * (w.layer - W.layer);
215
+ L += j(W, w) * U, R += U;
216
+ }
217
+ if (!(R > 0)) continue;
218
+ let V = (L / R - w.y0) * f;
219
+ w.y0 += V, w.y1 += V, E(w);
220
+ }
221
+ o === void 0 && m.sort(H), O(m, u);
222
+ }
223
+ }
224
+ function z(e, f, u) {
225
+ for (let c = e.length, r = c - 2; r >= 0; --r) {
226
+ const m = e[r];
227
+ for (const w of m) {
228
+ let L = 0, R = 0;
229
+ for (const { target: W, value: Z } of w.sourceLinks) {
230
+ let U = Z * (W.layer - w.layer);
231
+ L += I(w, W) * U, R += U;
232
+ }
233
+ if (!(R > 0)) continue;
234
+ let V = (L / R - w.y0) * f;
235
+ w.y0 += V, w.y1 += V, E(w);
236
+ }
237
+ o === void 0 && m.sort(H), O(m, u);
238
+ }
239
+ }
240
+ function O(e, f) {
241
+ const u = e.length >> 1, c = e[u];
242
+ d(e, c.y0 - p, u - 1, f), D(e, c.y1 + p, u + 1, f), d(e, a, e.length - 1, f), D(e, n, 0, f);
243
+ }
244
+ function D(e, f, u, c) {
245
+ for (; u < e.length; ++u) {
246
+ const r = e[u], m = (f - r.y0) * c;
247
+ m > 1e-6 && (r.y0 += m, r.y1 += m), f = r.y1 + p;
248
+ }
249
+ }
250
+ function d(e, f, u, c) {
251
+ for (; u >= 0; --u) {
252
+ const r = e[u], m = (r.y1 - f) * c;
253
+ m > 1e-6 && (r.y0 -= m, r.y1 -= m), f = r.y0 - p;
254
+ }
255
+ }
256
+ function E({ sourceLinks: e, targetLinks: f }) {
257
+ if (l === void 0) {
258
+ for (const { source: { sourceLinks: u } } of f)
259
+ u.sort(ct);
260
+ for (const { target: { targetLinks: u } } of e)
261
+ u.sort(lt);
262
+ }
263
+ }
264
+ function A(e) {
265
+ if (l === void 0)
266
+ for (const { sourceLinks: f, targetLinks: u } of e)
267
+ f.sort(ct), u.sort(lt);
268
+ }
269
+ function j(e, f) {
270
+ let u = e.y0 - (e.sourceLinks.length - 1) * p / 2;
271
+ for (const { target: c, width: r } of e.sourceLinks) {
272
+ if (c === f) break;
273
+ u += r + p;
274
+ }
275
+ for (const { source: c, width: r } of f.targetLinks) {
276
+ if (c === e) break;
277
+ u -= r;
278
+ }
279
+ return u;
280
+ }
281
+ function I(e, f) {
282
+ let u = f.y0 - (f.targetLinks.length - 1) * p / 2;
283
+ for (const { source: c, width: r } of f.targetLinks) {
284
+ if (c === e) break;
285
+ u += r + p;
286
+ }
287
+ for (const { target: c, width: r } of e.sourceLinks) {
288
+ if (c === f) break;
289
+ u -= r;
290
+ }
291
+ return u;
292
+ }
293
+ return v;
294
+ }
295
+ var et = Math.PI, nt = 2 * et, F = 1e-6, zt = nt - F;
296
+ function it() {
297
+ this._x0 = this._y0 = // start of current subpath
298
+ this._x1 = this._y1 = null, this._ = "";
299
+ }
300
+ function pt() {
301
+ return new it();
302
+ }
303
+ it.prototype = pt.prototype = {
304
+ constructor: it,
305
+ moveTo: function(t, n) {
306
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n);
307
+ },
308
+ closePath: function() {
309
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
310
+ },
311
+ lineTo: function(t, n) {
312
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +n);
313
+ },
314
+ quadraticCurveTo: function(t, n, i, a) {
315
+ this._ += "Q" + +t + "," + +n + "," + (this._x1 = +i) + "," + (this._y1 = +a);
316
+ },
317
+ bezierCurveTo: function(t, n, i, a, h, b) {
318
+ this._ += "C" + +t + "," + +n + "," + +i + "," + +a + "," + (this._x1 = +h) + "," + (this._y1 = +b);
319
+ },
320
+ arcTo: function(t, n, i, a, h) {
321
+ t = +t, n = +n, i = +i, a = +a, h = +h;
322
+ var b = this._x1, p = this._y1, k = i - t, s = a - n, o = b - t, l = p - n, _ = o * o + l * l;
323
+ if (h < 0) throw new Error("negative radius: " + h);
324
+ if (this._x1 === null)
325
+ this._ += "M" + (this._x1 = t) + "," + (this._y1 = n);
326
+ else if (_ > F) if (!(Math.abs(l * k - s * o) > F) || !h)
327
+ this._ += "L" + (this._x1 = t) + "," + (this._y1 = n);
328
+ else {
329
+ var x = i - b, y = a - p, v = k * k + s * s, M = x * x + y * y, T = Math.sqrt(v), N = Math.sqrt(_), C = h * Math.tan((et - Math.acos((v + _ - M) / (2 * T * N))) / 2), $ = C / N, B = C / T;
330
+ Math.abs($ - 1) > F && (this._ += "L" + (t + $ * o) + "," + (n + $ * l)), this._ += "A" + h + "," + h + ",0,0," + +(l * x > o * y) + "," + (this._x1 = t + B * k) + "," + (this._y1 = n + B * s);
331
+ }
332
+ },
333
+ arc: function(t, n, i, a, h, b) {
334
+ t = +t, n = +n, i = +i, b = !!b;
335
+ var p = i * Math.cos(a), k = i * Math.sin(a), s = t + p, o = n + k, l = 1 ^ b, _ = b ? a - h : h - a;
336
+ if (i < 0) throw new Error("negative radius: " + i);
337
+ this._x1 === null ? this._ += "M" + s + "," + o : (Math.abs(this._x1 - s) > F || Math.abs(this._y1 - o) > F) && (this._ += "L" + s + "," + o), i && (_ < 0 && (_ = _ % nt + nt), _ > zt ? this._ += "A" + i + "," + i + ",0,1," + l + "," + (t - p) + "," + (n - k) + "A" + i + "," + i + ",0,1," + l + "," + (this._x1 = s) + "," + (this._y1 = o) : _ > F && (this._ += "A" + i + "," + i + ",0," + +(_ >= et) + "," + l + "," + (this._x1 = t + i * Math.cos(h)) + "," + (this._y1 = n + i * Math.sin(h))));
338
+ },
339
+ rect: function(t, n, i, a) {
340
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n) + "h" + +i + "v" + +a + "h" + -i + "Z";
341
+ },
342
+ toString: function() {
343
+ return this._;
344
+ }
345
+ };
346
+ function ft(t) {
347
+ return function() {
348
+ return t;
349
+ };
350
+ }
351
+ function Bt(t) {
352
+ return t[0];
353
+ }
354
+ function Rt(t) {
355
+ return t[1];
356
+ }
357
+ var Ft = Array.prototype.slice;
358
+ function Vt(t) {
359
+ return t.source;
360
+ }
361
+ function Wt(t) {
362
+ return t.target;
363
+ }
364
+ function Ut(t) {
365
+ var n = Vt, i = Wt, a = Bt, h = Rt, b = null;
366
+ function p() {
367
+ var k, s = Ft.call(arguments), o = n.apply(this, s), l = i.apply(this, s);
368
+ if (b || (b = k = pt()), t(b, +a.apply(this, (s[0] = o, s)), +h.apply(this, s), +a.apply(this, (s[0] = l, s)), +h.apply(this, s)), k) return b = null, k + "" || null;
369
+ }
370
+ return p.source = function(k) {
371
+ return arguments.length ? (n = k, p) : n;
372
+ }, p.target = function(k) {
373
+ return arguments.length ? (i = k, p) : i;
374
+ }, p.x = function(k) {
375
+ return arguments.length ? (a = typeof k == "function" ? k : ft(+k), p) : a;
376
+ }, p.y = function(k) {
377
+ return arguments.length ? (h = typeof k == "function" ? k : ft(+k), p) : h;
378
+ }, p.context = function(k) {
379
+ return arguments.length ? (b = k ?? null, p) : b;
380
+ }, p;
381
+ }
382
+ function Gt(t, n, i, a, h) {
383
+ t.moveTo(n, i), t.bezierCurveTo(n = (n + a) / 2, i, n, h, a, h);
384
+ }
385
+ function Yt() {
386
+ return Ut(Gt);
387
+ }
388
+ function Ht(t) {
389
+ return [t.source.x1, t.y0];
390
+ }
391
+ function Xt(t) {
392
+ return [t.target.x0, t.y1];
393
+ }
394
+ function qt() {
395
+ return Yt().source(Ht).target(Xt);
396
+ }
397
+ var st = function() {
398
+ var t = /* @__PURE__ */ g(function(k, s, o, l) {
399
+ for (o = o || {}, l = k.length; l--; o[k[l]] = s) ;
400
+ return o;
401
+ }, "o"), n = [1, 9], i = [1, 10], a = [1, 5, 10, 12], h = {
402
+ trace: /* @__PURE__ */ g(function() {
403
+ }, "trace"),
404
+ yy: {},
405
+ symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
406
+ terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
407
+ productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
408
+ performAction: /* @__PURE__ */ g(function(s, o, l, _, x, y, v) {
409
+ var M = y.length - 1;
410
+ switch (x) {
411
+ case 7:
412
+ const T = _.findOrCreateNode(y[M - 4].trim().replaceAll('""', '"')), N = _.findOrCreateNode(y[M - 2].trim().replaceAll('""', '"')), C = parseFloat(y[M].trim());
413
+ _.addLink(T, N, C);
414
+ break;
415
+ case 8:
416
+ case 9:
417
+ case 11:
418
+ this.$ = y[M];
419
+ break;
420
+ case 10:
421
+ this.$ = y[M - 1];
422
+ break;
423
+ }
424
+ }, "anonymous"),
425
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: n, 20: i }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(i, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(a, [2, 8]), t(a, [2, 9]), { 19: [1, 16] }, t(a, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(i, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: n, 20: i }, { 15: 18, 16: 7, 17: 8, 18: n, 20: i }, { 18: [1, 19] }, t(i, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: n, 20: i }, t([1, 5, 10], [2, 7])],
426
+ defaultActions: { 11: [2, 1], 12: [2, 5] },
427
+ parseError: /* @__PURE__ */ g(function(s, o) {
428
+ if (o.recoverable)
429
+ this.trace(s);
430
+ else {
431
+ var l = new Error(s);
432
+ throw l.hash = o, l;
433
+ }
434
+ }, "parseError"),
435
+ parse: /* @__PURE__ */ g(function(s) {
436
+ var o = this, l = [0], _ = [], x = [null], y = [], v = this.table, M = "", T = 0, N = 0, C = 2, $ = 1, B = y.slice.call(arguments, 1), S = Object.create(this.lexer), P = { yy: {} };
437
+ for (var z in this.yy)
438
+ Object.prototype.hasOwnProperty.call(this.yy, z) && (P.yy[z] = this.yy[z]);
439
+ S.setInput(s, P.yy), P.yy.lexer = S, P.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
440
+ var O = S.yylloc;
441
+ y.push(O);
442
+ var D = S.options && S.options.ranges;
443
+ typeof P.yy.parseError == "function" ? this.parseError = P.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
444
+ function d(L) {
445
+ l.length = l.length - 2 * L, x.length = x.length - L, y.length = y.length - L;
446
+ }
447
+ g(d, "popStack");
448
+ function E() {
449
+ var L;
450
+ return L = _.pop() || S.lex() || $, typeof L != "number" && (L instanceof Array && (_ = L, L = _.pop()), L = o.symbols_[L] || L), L;
451
+ }
452
+ g(E, "lex");
453
+ for (var A, j, I, e, f = {}, u, c, r, m; ; ) {
454
+ if (j = l[l.length - 1], this.defaultActions[j] ? I = this.defaultActions[j] : ((A === null || typeof A > "u") && (A = E()), I = v[j] && v[j][A]), typeof I > "u" || !I.length || !I[0]) {
455
+ var w = "";
456
+ m = [];
457
+ for (u in v[j])
458
+ this.terminals_[u] && u > C && m.push("'" + this.terminals_[u] + "'");
459
+ S.showPosition ? w = "Parse error on line " + (T + 1) + `:
460
+ ` + S.showPosition() + `
461
+ Expecting ` + m.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : w = "Parse error on line " + (T + 1) + ": Unexpected " + (A == $ ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(w, {
462
+ text: S.match,
463
+ token: this.terminals_[A] || A,
464
+ line: S.yylineno,
465
+ loc: O,
466
+ expected: m
467
+ });
468
+ }
469
+ if (I[0] instanceof Array && I.length > 1)
470
+ throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + A);
471
+ switch (I[0]) {
472
+ case 1:
473
+ l.push(A), x.push(S.yytext), y.push(S.yylloc), l.push(I[1]), A = null, N = S.yyleng, M = S.yytext, T = S.yylineno, O = S.yylloc;
474
+ break;
475
+ case 2:
476
+ if (c = this.productions_[I[1]][1], f.$ = x[x.length - c], f._$ = {
477
+ first_line: y[y.length - (c || 1)].first_line,
478
+ last_line: y[y.length - 1].last_line,
479
+ first_column: y[y.length - (c || 1)].first_column,
480
+ last_column: y[y.length - 1].last_column
481
+ }, D && (f._$.range = [
482
+ y[y.length - (c || 1)].range[0],
483
+ y[y.length - 1].range[1]
484
+ ]), e = this.performAction.apply(f, [
485
+ M,
486
+ N,
487
+ T,
488
+ P.yy,
489
+ I[1],
490
+ x,
491
+ y
492
+ ].concat(B)), typeof e < "u")
493
+ return e;
494
+ c && (l = l.slice(0, -1 * c * 2), x = x.slice(0, -1 * c), y = y.slice(0, -1 * c)), l.push(this.productions_[I[1]][0]), x.push(f.$), y.push(f._$), r = v[l[l.length - 2]][l[l.length - 1]], l.push(r);
495
+ break;
496
+ case 3:
497
+ return !0;
498
+ }
499
+ }
500
+ return !0;
501
+ }, "parse")
502
+ }, b = /* @__PURE__ */ function() {
503
+ var k = {
504
+ EOF: 1,
505
+ parseError: /* @__PURE__ */ g(function(o, l) {
506
+ if (this.yy.parser)
507
+ this.yy.parser.parseError(o, l);
508
+ else
509
+ throw new Error(o);
510
+ }, "parseError"),
511
+ // resets the lexer, sets new input
512
+ setInput: /* @__PURE__ */ g(function(s, o) {
513
+ return this.yy = o || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
514
+ first_line: 1,
515
+ first_column: 0,
516
+ last_line: 1,
517
+ last_column: 0
518
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
519
+ }, "setInput"),
520
+ // consumes and returns one char from the input
521
+ input: /* @__PURE__ */ g(function() {
522
+ var s = this._input[0];
523
+ this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
524
+ var o = s.match(/(?:\r\n?|\n).*/g);
525
+ return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
526
+ }, "input"),
527
+ // unshifts one char (or a string) into the input
528
+ unput: /* @__PURE__ */ g(function(s) {
529
+ var o = s.length, l = s.split(/(?:\r\n?|\n)/g);
530
+ this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
531
+ var _ = this.match.split(/(?:\r\n?|\n)/g);
532
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
533
+ var x = this.yylloc.range;
534
+ return this.yylloc = {
535
+ first_line: this.yylloc.first_line,
536
+ last_line: this.yylineno + 1,
537
+ first_column: this.yylloc.first_column,
538
+ last_column: l ? (l.length === _.length ? this.yylloc.first_column : 0) + _[_.length - l.length].length - l[0].length : this.yylloc.first_column - o
539
+ }, this.options.ranges && (this.yylloc.range = [x[0], x[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
540
+ }, "unput"),
541
+ // When called from action, caches matched text and appends it on next action
542
+ more: /* @__PURE__ */ g(function() {
543
+ return this._more = !0, this;
544
+ }, "more"),
545
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
546
+ reject: /* @__PURE__ */ g(function() {
547
+ if (this.options.backtrack_lexer)
548
+ this._backtrack = !0;
549
+ else
550
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
551
+ ` + this.showPosition(), {
552
+ text: "",
553
+ token: null,
554
+ line: this.yylineno
555
+ });
556
+ return this;
557
+ }, "reject"),
558
+ // retain first n characters of the match
559
+ less: /* @__PURE__ */ g(function(s) {
560
+ this.unput(this.match.slice(s));
561
+ }, "less"),
562
+ // displays already matched input, i.e. for error messages
563
+ pastInput: /* @__PURE__ */ g(function() {
564
+ var s = this.matched.substr(0, this.matched.length - this.match.length);
565
+ return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
566
+ }, "pastInput"),
567
+ // displays upcoming input, i.e. for error messages
568
+ upcomingInput: /* @__PURE__ */ g(function() {
569
+ var s = this.match;
570
+ return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
571
+ }, "upcomingInput"),
572
+ // displays the character position where the lexing error occurred, i.e. for error messages
573
+ showPosition: /* @__PURE__ */ g(function() {
574
+ var s = this.pastInput(), o = new Array(s.length + 1).join("-");
575
+ return s + this.upcomingInput() + `
576
+ ` + o + "^";
577
+ }, "showPosition"),
578
+ // test the lexed token: return FALSE when not a match, otherwise return token
579
+ test_match: /* @__PURE__ */ g(function(s, o) {
580
+ var l, _, x;
581
+ if (this.options.backtrack_lexer && (x = {
582
+ yylineno: this.yylineno,
583
+ yylloc: {
584
+ first_line: this.yylloc.first_line,
585
+ last_line: this.last_line,
586
+ first_column: this.yylloc.first_column,
587
+ last_column: this.yylloc.last_column
588
+ },
589
+ yytext: this.yytext,
590
+ match: this.match,
591
+ matches: this.matches,
592
+ matched: this.matched,
593
+ yyleng: this.yyleng,
594
+ offset: this.offset,
595
+ _more: this._more,
596
+ _input: this._input,
597
+ yy: this.yy,
598
+ conditionStack: this.conditionStack.slice(0),
599
+ done: this.done
600
+ }, this.options.ranges && (x.yylloc.range = this.yylloc.range.slice(0))), _ = s[0].match(/(?:\r\n?|\n).*/g), _ && (this.yylineno += _.length), this.yylloc = {
601
+ first_line: this.yylloc.last_line,
602
+ last_line: this.yylineno + 1,
603
+ first_column: this.yylloc.last_column,
604
+ last_column: _ ? _[_.length - 1].length - _[_.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
605
+ }, this.yytext += s[0], this.match += s[0], this.matches = s, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(s[0].length), this.matched += s[0], l = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
606
+ return l;
607
+ if (this._backtrack) {
608
+ for (var y in x)
609
+ this[y] = x[y];
610
+ return !1;
611
+ }
612
+ return !1;
613
+ }, "test_match"),
614
+ // return next match in input
615
+ next: /* @__PURE__ */ g(function() {
616
+ if (this.done)
617
+ return this.EOF;
618
+ this._input || (this.done = !0);
619
+ var s, o, l, _;
620
+ this._more || (this.yytext = "", this.match = "");
621
+ for (var x = this._currentRules(), y = 0; y < x.length; y++)
622
+ if (l = this._input.match(this.rules[x[y]]), l && (!o || l[0].length > o[0].length)) {
623
+ if (o = l, _ = y, this.options.backtrack_lexer) {
624
+ if (s = this.test_match(l, x[y]), s !== !1)
625
+ return s;
626
+ if (this._backtrack) {
627
+ o = !1;
628
+ continue;
629
+ } else
630
+ return !1;
631
+ } else if (!this.options.flex)
632
+ break;
633
+ }
634
+ return o ? (s = this.test_match(o, x[_]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
635
+ ` + this.showPosition(), {
636
+ text: "",
637
+ token: null,
638
+ line: this.yylineno
639
+ });
640
+ }, "next"),
641
+ // return next match that has a token
642
+ lex: /* @__PURE__ */ g(function() {
643
+ var o = this.next();
644
+ return o || this.lex();
645
+ }, "lex"),
646
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
647
+ begin: /* @__PURE__ */ g(function(o) {
648
+ this.conditionStack.push(o);
649
+ }, "begin"),
650
+ // pop the previously active lexer condition state off the condition stack
651
+ popState: /* @__PURE__ */ g(function() {
652
+ var o = this.conditionStack.length - 1;
653
+ return o > 0 ? this.conditionStack.pop() : this.conditionStack[0];
654
+ }, "popState"),
655
+ // produce the lexer rule set which is active for the currently active lexer condition state
656
+ _currentRules: /* @__PURE__ */ g(function() {
657
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
658
+ }, "_currentRules"),
659
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
660
+ topState: /* @__PURE__ */ g(function(o) {
661
+ return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
662
+ }, "topState"),
663
+ // alias for begin(condition)
664
+ pushState: /* @__PURE__ */ g(function(o) {
665
+ this.begin(o);
666
+ }, "pushState"),
667
+ // return the number of states currently on the stack
668
+ stateStackSize: /* @__PURE__ */ g(function() {
669
+ return this.conditionStack.length;
670
+ }, "stateStackSize"),
671
+ options: { "case-insensitive": !0 },
672
+ performAction: /* @__PURE__ */ g(function(o, l, _, x) {
673
+ switch (_) {
674
+ case 0:
675
+ return this.pushState("csv"), 4;
676
+ case 1:
677
+ return 10;
678
+ case 2:
679
+ return 5;
680
+ case 3:
681
+ return 12;
682
+ case 4:
683
+ return this.pushState("escaped_text"), 18;
684
+ case 5:
685
+ return 20;
686
+ case 6:
687
+ return this.popState("escaped_text"), 18;
688
+ case 7:
689
+ return 19;
690
+ }
691
+ }, "anonymous"),
692
+ rules: [/^(?:sankey-beta\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
693
+ conditions: { csv: { rules: [1, 2, 3, 4, 5, 6, 7], inclusive: !1 }, escaped_text: { rules: [6, 7], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7], inclusive: !0 } }
694
+ };
695
+ return k;
696
+ }();
697
+ h.lexer = b;
698
+ function p() {
699
+ this.yy = {};
700
+ }
701
+ return g(p, "Parser"), p.prototype = h, h.Parser = p, new p();
702
+ }();
703
+ st.parser = st;
704
+ var X = st, Q = [], K = [], q = /* @__PURE__ */ new Map(), Qt = /* @__PURE__ */ g(() => {
705
+ Q = [], K = [], q = /* @__PURE__ */ new Map(), wt();
706
+ }, "clear"), Kt = class {
707
+ constructor(t, n, i = 0) {
708
+ this.source = t, this.target = n, this.value = i;
709
+ }
710
+ static {
711
+ g(this, "SankeyLink");
712
+ }
713
+ }, Zt = /* @__PURE__ */ g((t, n, i) => {
714
+ Q.push(new Kt(t, n, i));
715
+ }, "addLink"), Jt = class {
716
+ constructor(t) {
717
+ this.ID = t;
718
+ }
719
+ static {
720
+ g(this, "SankeyNode");
721
+ }
722
+ }, te = /* @__PURE__ */ g((t) => {
723
+ t = St.sanitizeText(t, ot());
724
+ let n = q.get(t);
725
+ return n === void 0 && (n = new Jt(t), q.set(t, n), K.push(n)), n;
726
+ }, "findOrCreateNode"), ee = /* @__PURE__ */ g(() => K, "getNodes"), ne = /* @__PURE__ */ g(() => Q, "getLinks"), ie = /* @__PURE__ */ g(() => ({
727
+ nodes: K.map((t) => ({ id: t.ID })),
728
+ links: Q.map((t) => ({
729
+ source: t.source.ID,
730
+ target: t.target.ID,
731
+ value: t.value
732
+ }))
733
+ }), "getGraph"), se = {
734
+ nodesMap: q,
735
+ getConfig: /* @__PURE__ */ g(() => ot().sankey, "getConfig"),
736
+ getNodes: ee,
737
+ getLinks: ne,
738
+ getGraph: ie,
739
+ addLink: Zt,
740
+ findOrCreateNode: te,
741
+ getAccTitle: mt,
742
+ setAccTitle: kt,
743
+ getAccDescription: _t,
744
+ setAccDescription: xt,
745
+ getDiagramTitle: vt,
746
+ setDiagramTitle: bt,
747
+ clear: Qt
748
+ }, yt = class rt {
749
+ static {
750
+ g(this, "Uid");
751
+ }
752
+ static {
753
+ this.count = 0;
754
+ }
755
+ static next(n) {
756
+ return new rt(n + ++rt.count);
757
+ }
758
+ constructor(n) {
759
+ this.id = n, this.href = `#${n}`;
760
+ }
761
+ toString() {
762
+ return "url(" + this.href + ")";
763
+ }
764
+ }, re = {
765
+ left: It,
766
+ right: Pt,
767
+ center: Ct,
768
+ justify: gt
769
+ }, oe = /* @__PURE__ */ g(function(t, n, i, a) {
770
+ const { securityLevel: h, sankey: b } = ot(), p = Lt.sankey;
771
+ let k;
772
+ h === "sandbox" && (k = G("#i" + n));
773
+ const s = h === "sandbox" ? G(k.nodes()[0].contentDocument.body) : G("body"), o = h === "sandbox" ? s.select(`[id="${n}"]`) : G(`[id="${n}"]`), l = b?.width ?? p.width, _ = b?.height ?? p.width, x = b?.useMaxWidth ?? p.useMaxWidth, y = b?.nodeAlignment ?? p.nodeAlignment, v = b?.prefix ?? p.prefix, M = b?.suffix ?? p.suffix, T = b?.showValues ?? p.showValues, N = a.db.getGraph(), C = re[y];
774
+ jt().nodeId((d) => d.id).nodeWidth(10).nodePadding(10 + (T ? 15 : 0)).nodeAlign(C).extent([
775
+ [0, 0],
776
+ [l, _]
777
+ ])(N);
778
+ const S = At(Mt);
779
+ o.append("g").attr("class", "nodes").selectAll(".node").data(N.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = yt.next("node-")).id).attr("transform", function(d) {
780
+ return "translate(" + d.x0 + "," + d.y0 + ")";
781
+ }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => d.y1 - d.y0).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => S(d.id));
782
+ const P = /* @__PURE__ */ g(({ id: d, value: E }) => T ? `${d}
783
+ ${v}${Math.round(E * 100) / 100}${M}` : d, "getText");
784
+ o.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(N.nodes).join("text").attr("x", (d) => d.x0 < l / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${T ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < l / 2 ? "start" : "end").text(P);
785
+ const z = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(N.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), O = b?.linkColor ?? "gradient";
786
+ if (O === "gradient") {
787
+ const d = z.append("linearGradient").attr("id", (E) => (E.uid = yt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (E) => E.source.x1).attr("x2", (E) => E.target.x0);
788
+ d.append("stop").attr("offset", "0%").attr("stop-color", (E) => S(E.source.id)), d.append("stop").attr("offset", "100%").attr("stop-color", (E) => S(E.target.id));
789
+ }
790
+ let D;
791
+ switch (O) {
792
+ case "gradient":
793
+ D = /* @__PURE__ */ g((d) => d.uid, "coloring");
794
+ break;
795
+ case "source":
796
+ D = /* @__PURE__ */ g((d) => S(d.source.id), "coloring");
797
+ break;
798
+ case "target":
799
+ D = /* @__PURE__ */ g((d) => S(d.target.id), "coloring");
800
+ break;
801
+ default:
802
+ D = O;
803
+ }
804
+ z.append("path").attr("d", qt()).attr("stroke", D).attr("stroke-width", (d) => Math.max(1, d.width)), Et(void 0, o, 0, x);
805
+ }, "draw"), ae = {
806
+ draw: oe
807
+ }, le = /* @__PURE__ */ g((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
808
+ `).trim(), "prepareTextForParsing"), ce = /* @__PURE__ */ g((t) => `.label {
809
+ font-family: ${t.fontFamily};
810
+ }`, "getStyles"), ue = ce, he = X.parse.bind(X);
811
+ X.parse = (t) => he(le(t));
812
+ var de = {
813
+ styles: ue,
814
+ parser: X,
815
+ db: se,
816
+ renderer: ae
817
+ };
818
+ export {
819
+ de as diagram
820
+ };