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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/standalone/_baseFor-DZ1vnh4H.js +393 -0
  2. package/dist/standalone/arc-WNacHY26.js +80 -0
  3. package/dist/standalone/architecture-YZFGNWBL-pIa_tKdA.js +3 -0
  4. package/dist/standalone/architectureDiagram-Q4EWVU46-Bfam8Fg3.js +4057 -0
  5. package/dist/standalone/array-CWNufkl9.js +6 -0
  6. package/dist/standalone/blockDiagram-DXYQGD6D-vAb9uyF5.js +3033 -0
  7. package/dist/standalone/c4Diagram-AHTNJAMY-BWACU0ER.js +2961 -0
  8. package/dist/standalone/channel-Br5ChI8U.js +5 -0
  9. package/dist/standalone/chunk-2KRD3SAO-Deh6AASy.js +23 -0
  10. package/dist/standalone/chunk-336JU56O-CFKWNcxR.js +49 -0
  11. package/dist/standalone/chunk-426QAEUC-D_wKNd3w.js +9 -0
  12. package/dist/standalone/chunk-4BX2VUAB-DKC_OBWg.js +8 -0
  13. package/dist/standalone/chunk-4TB4RGXK-HiVG7T1A.js +3254 -0
  14. package/dist/standalone/chunk-55IACEB6-DBivnNb2.js +8 -0
  15. package/dist/standalone/chunk-5FUZZQ4R-tiEjqlP4.js +3638 -0
  16. package/dist/standalone/chunk-5PVQY5BW-BCjrVrWB.js +1299 -0
  17. package/dist/standalone/chunk-67CJDMHE-BX09W6oy.js +23 -0
  18. package/dist/standalone/chunk-7N4EOEYR-G144j5Vc.js +35 -0
  19. package/dist/standalone/chunk-AA7GKIK3-Dx9YCoJ-.js +30 -0
  20. package/dist/standalone/chunk-BSJP7CBP-DE8WR0MI.js +82 -0
  21. package/dist/standalone/chunk-CIAEETIT-Bv86XVLB.js +23 -0
  22. package/dist/standalone/chunk-EDXVE4YY-DE9KzYM-.js +25 -0
  23. package/dist/standalone/chunk-ENJZ2VHE-DlxIC-A3.js +560 -0
  24. package/dist/standalone/chunk-FMBD7UC4-DCkBrKFO.js +5 -0
  25. package/dist/standalone/chunk-FOC6F5B3-C7hwrEZJ.js +23 -0
  26. package/dist/standalone/chunk-ICPOFSXX-B9JXAgJU.js +2772 -0
  27. package/dist/standalone/chunk-K5T4RW27-T6hJxJM0.js +16070 -0
  28. package/dist/standalone/chunk-KGLVRYIC-C0JPhrjn.js +23 -0
  29. package/dist/standalone/chunk-LIHQZDEY-CiavnvWh.js +64 -0
  30. package/dist/standalone/chunk-ORNJ4GCN-BtJ79bik.js +31 -0
  31. package/dist/standalone/chunk-OYMX7WX6-D2UHnmfD.js +2014 -0
  32. package/dist/standalone/chunk-QZHKN3VN-DhzThSvb.js +15 -0
  33. package/dist/standalone/chunk-U2HBQHQK-75Isf1R4.js +1896 -0
  34. package/dist/standalone/chunk-WQLz0Won.js +20 -0
  35. package/dist/standalone/chunk-X2U36JSP-DSzducJI.js +67 -0
  36. package/dist/standalone/chunk-XPW4576I-BFhmu0d4.js +1146 -0
  37. package/dist/standalone/chunk-YZCP3GAM-90EaSO-2.js +60 -0
  38. package/dist/standalone/chunk-ZZ45TVLE-DUagTZ9d.js +32 -0
  39. package/dist/standalone/classDiagram-6PBFFD2Q-Bwt78q4N.js +29 -0
  40. package/dist/standalone/classDiagram-v2-HSJHXN6E-B2qI9-xf.js +29 -0
  41. package/dist/standalone/clone-CBw-BHXl.js +8 -0
  42. package/dist/standalone/cose-bilkent-S5V4N54A-DFJ1nlog.js +2250 -0
  43. package/dist/standalone/cytoscape.esm-DdhenceR.js +18103 -0
  44. package/dist/standalone/dagre-KV5264BT-CXTBtAae.js +293 -0
  45. package/dist/standalone/dagre-kfvGmNUa.js +1606 -0
  46. package/dist/standalone/defaultLocale-bckJcYh1.js +201 -0
  47. package/dist/standalone/diagram-5BDNPKRD--gLHDKg-.js +101 -0
  48. package/dist/standalone/diagram-G4DWMVQ6-BwLE9Hsf.js +524 -0
  49. package/dist/standalone/diagram-MMDJMWI5-CoilYxa0.js +213 -0
  50. package/dist/standalone/diagram-TYMM5635-BupwRdr6.js +133 -0
  51. package/dist/standalone/dist-Dlj1jr8W.js +59 -0
  52. package/dist/standalone/erDiagram-SMLLAGMA-tIdn6ZCM.js +1700 -0
  53. package/dist/standalone/flatten-CXxC4cn2.js +40 -0
  54. package/dist/standalone/flowDiagram-DWJPFMVM-C86bLTAY.js +4146 -0
  55. package/dist/standalone/ganttDiagram-T4ZO3ILL-BT23lv_X.js +3077 -0
  56. package/dist/standalone/gitGraph-7Q5UKJZL-C-7nG8PF.js +3 -0
  57. package/dist/standalone/gitGraphDiagram-UUTBAWPF-DT1BGQsP.js +728 -0
  58. package/dist/standalone/graphlib-DrXiQBFg.js +373 -0
  59. package/dist/standalone/index.es.min.js +59705 -0
  60. package/dist/standalone/index.iife.min.js +3502 -0
  61. package/dist/standalone/index.umd.min.js +3502 -0
  62. package/dist/standalone/info-OMHHGYJF-BOS7mrON.js +3 -0
  63. package/dist/standalone/infoDiagram-42DDH7IO-Dx7LFK0B.js +19 -0
  64. package/dist/standalone/init-B75p2clj.js +15 -0
  65. package/dist/standalone/isEmpty-CVG4Bj-P.js +35 -0
  66. package/dist/standalone/ishikawaDiagram-UXIWVN3A-CX4cX3qb.js +718 -0
  67. package/dist/standalone/journeyDiagram-VCZTEJTY-BCvxmmFn.js +883 -0
  68. package/dist/standalone/kanban-definition-6JOO6SKY-SVINWaiM.js +973 -0
  69. package/dist/standalone/katex-CKrw0rbA.js +22016 -0
  70. package/dist/standalone/line-BF1XS-Ng.js +34 -0
  71. package/dist/standalone/linear-DGQDIL28.js +289 -0
  72. package/dist/standalone/mermaid-parser.core-Blz-Qy2h.js +69 -0
  73. package/dist/standalone/mermaid.core-CHTh1JGx.js +944 -0
  74. package/dist/standalone/mindmap-definition-QFDTVHPH-1Trzro3y.js +1009 -0
  75. package/dist/standalone/ordinal-F3U6aXtP.js +65 -0
  76. package/dist/standalone/packet-4T2RLAQJ-ai5Omp1h.js +3 -0
  77. package/dist/standalone/path-Dm3C8WEs.js +85 -0
  78. package/dist/standalone/pie-ZZUOXDRM-Df1rG6QC.js +3 -0
  79. package/dist/standalone/pieDiagram-DEJITSTG-D5Omb898.js +165 -0
  80. package/dist/standalone/purify.es-CZ_RvYUu.js +549 -0
  81. package/dist/standalone/quadrantDiagram-34T5L4WZ-Ct4g9T4o.js +1974 -0
  82. package/dist/standalone/radar-PYXPWWZC-B2t6k6Fg.js +3 -0
  83. package/dist/standalone/reduce-DbMsJ4nx.js +532 -0
  84. package/dist/standalone/requirementDiagram-MS252O5E-CP0BUgnz.js +2221 -0
  85. package/dist/standalone/rough.esm-UCEI3PYn.js +1352 -0
  86. package/dist/standalone/sankeyDiagram-XADWPNL6-D6C7yZ3k.js +920 -0
  87. package/dist/standalone/sequenceDiagram-FGHM5R23-KeodespT.js +4157 -0
  88. package/dist/standalone/src-CFVe5TPD.js +2146 -0
  89. package/dist/standalone/stateDiagram-FHFEXIEX-DAupoS9U.js +217 -0
  90. package/dist/standalone/stateDiagram-v2-QKLJ7IA2-C1Lw_i_z.js +27 -0
  91. package/dist/standalone/style.css +1 -0
  92. package/dist/standalone/timeline-definition-GMOUNBTQ-Cwhj84lX.js +1068 -0
  93. package/dist/standalone/treeView-SZITEDCU-BnoMeJSb.js +3 -0
  94. package/dist/standalone/treemap-W4RFUUIX-B38XFBZF.js +3 -0
  95. package/dist/standalone/vennDiagram-DHZGUBPP-_1PHloeO.js +1858 -0
  96. package/dist/standalone/wardley-RL74JXVD-bB8BBy_Y.js +3 -0
  97. package/dist/standalone/wardleyDiagram-NUSXRM2D-DRLCx-qh.js +578 -0
  98. package/dist/standalone/xychartDiagram-5P7HB3ND-Bz2-4Ufi.js +2044 -0
  99. package/dist/standalone-mount-core.d.ts +34 -0
  100. package/dist/standalone-mount-core.d.ts.map +1 -0
  101. package/dist/standalone-mount.d.ts +14 -0
  102. package/dist/standalone-mount.d.ts.map +1 -0
  103. package/dist/standalone.d.ts +8 -0
  104. package/dist/standalone.d.ts.map +1 -0
  105. package/package.json +12 -3
@@ -0,0 +1,65 @@
1
+ import { t as e } from "./init-B75p2clj.js";
2
+ //#region ../../node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js
3
+ var t = class extends Map {
4
+ constructor(e, t = a) {
5
+ if (super(), Object.defineProperties(this, {
6
+ _intern: { value: /* @__PURE__ */ new Map() },
7
+ _key: { value: t }
8
+ }), e != null) for (let [t, n] of e) this.set(t, n);
9
+ }
10
+ get(e) {
11
+ return super.get(n(this, e));
12
+ }
13
+ has(e) {
14
+ return super.has(n(this, e));
15
+ }
16
+ set(e, t) {
17
+ return super.set(r(this, e), t);
18
+ }
19
+ delete(e) {
20
+ return super.delete(i(this, e));
21
+ }
22
+ };
23
+ function n({ _intern: e, _key: t }, n) {
24
+ let r = t(n);
25
+ return e.has(r) ? e.get(r) : n;
26
+ }
27
+ function r({ _intern: e, _key: t }, n) {
28
+ let r = t(n);
29
+ return e.has(r) ? e.get(r) : (e.set(r, n), n);
30
+ }
31
+ function i({ _intern: e, _key: t }, n) {
32
+ let r = t(n);
33
+ return e.has(r) && (n = e.get(r), e.delete(r)), n;
34
+ }
35
+ function a(e) {
36
+ return typeof e == "object" && e ? e.valueOf() : e;
37
+ }
38
+ //#endregion
39
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js
40
+ var o = Symbol("implicit");
41
+ function s() {
42
+ var n = new t(), r = [], i = [], a = o;
43
+ function c(e) {
44
+ let t = n.get(e);
45
+ if (t === void 0) {
46
+ if (a !== o) return a;
47
+ n.set(e, t = r.push(e) - 1);
48
+ }
49
+ return i[t % i.length];
50
+ }
51
+ return c.domain = function(e) {
52
+ if (!arguments.length) return r.slice();
53
+ r = [], n = new t();
54
+ for (let t of e) n.has(t) || n.set(t, r.push(t) - 1);
55
+ return c;
56
+ }, c.range = function(e) {
57
+ return arguments.length ? (i = Array.from(e), c) : i.slice();
58
+ }, c.unknown = function(e) {
59
+ return arguments.length ? (a = e, c) : a;
60
+ }, c.copy = function() {
61
+ return s(r, i).unknown(a);
62
+ }, e.apply(c, arguments), c;
63
+ }
64
+ //#endregion
65
+ export { s as t };
@@ -0,0 +1,3 @@
1
+ import "./chunk-K5T4RW27-T6hJxJM0.js";
2
+ import { n as e } from "./chunk-FOC6F5B3-C7hwrEZJ.js";
3
+ export { e as createPacketServices };
@@ -0,0 +1,85 @@
1
+ //#region ../../node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js
2
+ var e = Math.PI, t = 2 * e, n = 1e-6, r = t - n;
3
+ function i(e) {
4
+ this._ += e[0];
5
+ for (let t = 1, n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
6
+ }
7
+ function a(e) {
8
+ let t = Math.floor(e);
9
+ if (!(t >= 0)) throw Error(`invalid digits: ${e}`);
10
+ if (t > 15) return i;
11
+ let n = 10 ** t;
12
+ return function(e) {
13
+ this._ += e[0];
14
+ for (let t = 1, r = e.length; t < r; ++t) this._ += Math.round(arguments[t] * n) / n + e[t];
15
+ };
16
+ }
17
+ var o = class {
18
+ constructor(e) {
19
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? i : a(e);
20
+ }
21
+ moveTo(e, t) {
22
+ this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
23
+ }
24
+ closePath() {
25
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
26
+ }
27
+ lineTo(e, t) {
28
+ this._append`L${this._x1 = +e},${this._y1 = +t}`;
29
+ }
30
+ quadraticCurveTo(e, t, n, r) {
31
+ this._append`Q${+e},${+t},${this._x1 = +n},${this._y1 = +r}`;
32
+ }
33
+ bezierCurveTo(e, t, n, r, i, a) {
34
+ this._append`C${+e},${+t},${+n},${+r},${this._x1 = +i},${this._y1 = +a}`;
35
+ }
36
+ arcTo(t, r, i, a, o) {
37
+ if (t = +t, r = +r, i = +i, a = +a, o = +o, o < 0) throw Error(`negative radius: ${o}`);
38
+ let s = this._x1, c = this._y1, l = i - t, u = a - r, d = s - t, f = c - r, p = d * d + f * f;
39
+ if (this._x1 === null) this._append`M${this._x1 = t},${this._y1 = r}`;
40
+ else if (p > n) if (!(Math.abs(f * l - u * d) > n) || !o) this._append`L${this._x1 = t},${this._y1 = r}`;
41
+ else {
42
+ let m = i - s, h = a - c, g = l * l + u * u, _ = m * m + h * h, v = Math.sqrt(g), y = Math.sqrt(p), b = o * Math.tan((e - Math.acos((g + p - _) / (2 * v * y))) / 2), x = b / y, S = b / v;
43
+ Math.abs(x - 1) > n && this._append`L${t + x * d},${r + x * f}`, this._append`A${o},${o},0,0,${+(f * m > d * h)},${this._x1 = t + S * l},${this._y1 = r + S * u}`;
44
+ }
45
+ }
46
+ arc(i, a, o, s, c, l) {
47
+ if (i = +i, a = +a, o = +o, l = !!l, o < 0) throw Error(`negative radius: ${o}`);
48
+ let u = o * Math.cos(s), d = o * Math.sin(s), f = i + u, p = a + d, m = 1 ^ l, h = l ? s - c : c - s;
49
+ this._x1 === null ? this._append`M${f},${p}` : (Math.abs(this._x1 - f) > n || Math.abs(this._y1 - p) > n) && this._append`L${f},${p}`, o && (h < 0 && (h = h % t + t), h > r ? this._append`A${o},${o},0,1,${m},${i - u},${a - d}A${o},${o},0,1,${m},${this._x1 = f},${this._y1 = p}` : h > n && this._append`A${o},${o},0,${+(h >= e)},${m},${this._x1 = i + o * Math.cos(c)},${this._y1 = a + o * Math.sin(c)}`);
50
+ }
51
+ rect(e, t, n, r) {
52
+ this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${n = +n}v${+r}h${-n}Z`;
53
+ }
54
+ toString() {
55
+ return this._;
56
+ }
57
+ };
58
+ function s() {
59
+ return new o();
60
+ }
61
+ s.prototype = o.prototype;
62
+ //#endregion
63
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js
64
+ function c(e) {
65
+ return function() {
66
+ return e;
67
+ };
68
+ }
69
+ //#endregion
70
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js
71
+ function l(e) {
72
+ let t = 3;
73
+ return e.digits = function(n) {
74
+ if (!arguments.length) return t;
75
+ if (n == null) t = null;
76
+ else {
77
+ let e = Math.floor(n);
78
+ if (!(e >= 0)) throw RangeError(`invalid digits: ${n}`);
79
+ t = e;
80
+ }
81
+ return e;
82
+ }, () => new o(t);
83
+ }
84
+ //#endregion
85
+ export { c as n, l as t };
@@ -0,0 +1,3 @@
1
+ import "./chunk-K5T4RW27-T6hJxJM0.js";
2
+ import { n as e } from "./chunk-AA7GKIK3-Dx9YCoJ-.js";
3
+ export { e as createPieServices };
@@ -0,0 +1,165 @@
1
+ import { g as e, h as t } from "./src-CFVe5TPD.js";
2
+ import { B as n, C as r, V as i, W as a, _ as o, a as s, b as c, c as l, d as u, v as d } from "./chunk-ICPOFSXX-B9JXAgJU.js";
3
+ import { t as f } from "./ordinal-F3U6aXtP.js";
4
+ import { n as p } from "./path-Dm3C8WEs.js";
5
+ import { m } from "./dist-Dlj1jr8W.js";
6
+ import { t as h } from "./arc-WNacHY26.js";
7
+ import { t as g } from "./array-CWNufkl9.js";
8
+ import { f as _, r as v } from "./chunk-5PVQY5BW-BCjrVrWB.js";
9
+ import { t as y } from "./chunk-426QAEUC-D_wKNd3w.js";
10
+ import { t as b } from "./chunk-4BX2VUAB-DKC_OBWg.js";
11
+ import { t as x } from "./mermaid-parser.core-Blz-Qy2h.js";
12
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/descending.js
13
+ function S(e, t) {
14
+ return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
15
+ }
16
+ //#endregion
17
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/identity.js
18
+ function C(e) {
19
+ return e;
20
+ }
21
+ //#endregion
22
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/pie.js
23
+ function w() {
24
+ var e = C, t = S, n = null, r = p(0), i = p(m), a = p(0);
25
+ function o(o) {
26
+ var s, c = (o = g(o)).length, l, u, d = 0, f = Array(c), p = Array(c), h = +r.apply(this, arguments), _ = Math.min(m, Math.max(-m, i.apply(this, arguments) - h)), v, y = Math.min(Math.abs(_) / c, a.apply(this, arguments)), b = y * (_ < 0 ? -1 : 1), x;
27
+ for (s = 0; s < c; ++s) (x = p[f[s] = s] = +e(o[s], s, o)) > 0 && (d += x);
28
+ for (t == null ? n != null && f.sort(function(e, t) {
29
+ return n(o[e], o[t]);
30
+ }) : f.sort(function(e, n) {
31
+ return t(p[e], p[n]);
32
+ }), s = 0, u = d ? (_ - c * b) / d : 0; s < c; ++s, h = v) l = f[s], x = p[l], v = h + (x > 0 ? x * u : 0) + b, p[l] = {
33
+ data: o[l],
34
+ index: s,
35
+ value: x,
36
+ startAngle: h,
37
+ endAngle: v,
38
+ padAngle: y
39
+ };
40
+ return p;
41
+ }
42
+ return o.value = function(t) {
43
+ return arguments.length ? (e = typeof t == "function" ? t : p(+t), o) : e;
44
+ }, o.sortValues = function(e) {
45
+ return arguments.length ? (t = e, n = null, o) : t;
46
+ }, o.sort = function(e) {
47
+ return arguments.length ? (n = e, t = null, o) : n;
48
+ }, o.startAngle = function(e) {
49
+ return arguments.length ? (r = typeof e == "function" ? e : p(+e), o) : r;
50
+ }, o.endAngle = function(e) {
51
+ return arguments.length ? (i = typeof e == "function" ? e : p(+e), o) : i;
52
+ }, o.padAngle = function(e) {
53
+ return arguments.length ? (a = typeof e == "function" ? e : p(+e), o) : a;
54
+ }, o;
55
+ }
56
+ //#endregion
57
+ //#region ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.mjs
58
+ var T = u.pie, E = {
59
+ sections: /* @__PURE__ */ new Map(),
60
+ showData: !1,
61
+ config: T
62
+ }, D = E.sections, O = E.showData, k = structuredClone(T), A = {
63
+ getConfig: /* @__PURE__ */ t(() => structuredClone(k), "getConfig"),
64
+ clear: /* @__PURE__ */ t(() => {
65
+ D = /* @__PURE__ */ new Map(), O = E.showData, s();
66
+ }, "clear"),
67
+ setDiagramTitle: a,
68
+ getDiagramTitle: r,
69
+ setAccTitle: i,
70
+ getAccTitle: d,
71
+ setAccDescription: n,
72
+ getAccDescription: o,
73
+ addSection: /* @__PURE__ */ t(({ label: t, value: n }) => {
74
+ if (n < 0) throw Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);
75
+ D.has(t) || (D.set(t, n), e.debug(`added new section: ${t}, with value: ${n}`));
76
+ }, "addSection"),
77
+ getSections: /* @__PURE__ */ t(() => D, "getSections"),
78
+ setShowData: /* @__PURE__ */ t((e) => {
79
+ O = e;
80
+ }, "setShowData"),
81
+ getShowData: /* @__PURE__ */ t(() => O, "getShowData")
82
+ }, j = /* @__PURE__ */ t((e, t) => {
83
+ b(e, t), t.setShowData(e.showData), e.sections.map(t.addSection);
84
+ }, "populateDb"), M = { parse: /* @__PURE__ */ t(async (t) => {
85
+ let n = await x("pie", t);
86
+ e.debug(n), j(n, A);
87
+ }, "parse") }, N = /* @__PURE__ */ t((e) => `
88
+ .pieCircle{
89
+ stroke: ${e.pieStrokeColor};
90
+ stroke-width : ${e.pieStrokeWidth};
91
+ opacity : ${e.pieOpacity};
92
+ }
93
+ .pieOuterCircle{
94
+ stroke: ${e.pieOuterStrokeColor};
95
+ stroke-width: ${e.pieOuterStrokeWidth};
96
+ fill: none;
97
+ }
98
+ .pieTitleText {
99
+ text-anchor: middle;
100
+ font-size: ${e.pieTitleTextSize};
101
+ fill: ${e.pieTitleTextColor};
102
+ font-family: ${e.fontFamily};
103
+ }
104
+ .slice {
105
+ font-family: ${e.fontFamily};
106
+ fill: ${e.pieSectionTextColor};
107
+ font-size:${e.pieSectionTextSize};
108
+ // fill: white;
109
+ }
110
+ .legend text {
111
+ fill: ${e.pieLegendTextColor};
112
+ font-family: ${e.fontFamily};
113
+ font-size: ${e.pieLegendTextSize};
114
+ }
115
+ `, "getStyles"), P = /* @__PURE__ */ t((e) => {
116
+ let t = [...e.values()].reduce((e, t) => e + t, 0), n = [...e.entries()].map(([e, t]) => ({
117
+ label: e,
118
+ value: t
119
+ })).filter((e) => e.value / t * 100 >= 1);
120
+ return w().value((e) => e.value).sort(null)(n);
121
+ }, "createPieArcs"), F = {
122
+ parser: M,
123
+ db: A,
124
+ renderer: { draw: /* @__PURE__ */ t((t, n, r, i) => {
125
+ e.debug("rendering pie chart\n" + t);
126
+ let a = i.db, o = c(), s = v(a.getConfig(), o.pie), u = y(n), d = u.append("g");
127
+ d.attr("transform", "translate(225,225)");
128
+ let { themeVariables: p } = o, [m] = _(p.pieOuterStrokeWidth);
129
+ m ??= 2;
130
+ let g = s.textPosition, b = h().innerRadius(0).outerRadius(185), x = h().innerRadius(185 * g).outerRadius(185 * g);
131
+ d.append("circle").attr("cx", 0).attr("cy", 0).attr("r", 185 + m / 2).attr("class", "pieOuterCircle");
132
+ let S = a.getSections(), C = P(S), w = [
133
+ p.pie1,
134
+ p.pie2,
135
+ p.pie3,
136
+ p.pie4,
137
+ p.pie5,
138
+ p.pie6,
139
+ p.pie7,
140
+ p.pie8,
141
+ p.pie9,
142
+ p.pie10,
143
+ p.pie11,
144
+ p.pie12
145
+ ], T = 0;
146
+ S.forEach((e) => {
147
+ T += e;
148
+ });
149
+ let E = C.filter((e) => (e.data.value / T * 100).toFixed(0) !== "0"), D = f(w).domain([...S.keys()]);
150
+ d.selectAll("mySlices").data(E).enter().append("path").attr("d", b).attr("fill", (e) => D(e.data.label)).attr("class", "pieCircle"), d.selectAll("mySlices").data(E).enter().append("text").text((e) => (e.data.value / T * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + x.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
151
+ let O = d.append("text").text(a.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText"), k = [...S.entries()].map(([e, t]) => ({
152
+ label: e,
153
+ value: t
154
+ })), A = d.selectAll(".legend").data(k).enter().append("g").attr("class", "legend").attr("transform", (e, t) => {
155
+ let n = 22 * k.length / 2;
156
+ return "translate(216," + (t * 22 - n) + ")";
157
+ });
158
+ A.append("rect").attr("width", 18).attr("height", 18).style("fill", (e) => D(e.label)).style("stroke", (e) => D(e.label)), A.append("text").attr("x", 22).attr("y", 14).text((e) => a.getShowData() ? `${e.label} [${e.value}]` : e.label);
159
+ let j = 512 + Math.max(...A.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0)), M = O.node()?.getBoundingClientRect().width ?? 0, N = 450 / 2 - M / 2, F = 450 / 2 + M / 2, I = Math.min(0, N), L = Math.max(j, F) - I;
160
+ u.attr("viewBox", `${I} 0 ${L} 450`), l(u, 450, L, s.useMaxWidth);
161
+ }, "draw") },
162
+ styles: N
163
+ };
164
+ //#endregion
165
+ export { F as diagram };