@nxgt/material 1.12.3 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/README.md +5 -1
  2. package/dist/abnfDiagram-O67JEVCF-mm89LXw2.js +89 -0
  3. package/dist/architecture-7GRP2DOG-DDr0RGVC.js +3 -0
  4. package/dist/architectureDiagram-NJMV4G6O-CGoA5SIv.js +4146 -0
  5. package/dist/array-CApNbSU9.js +6 -0
  6. package/dist/blockDiagram-BEXU5L5S-Dq8gitB4.js +1946 -0
  7. package/dist/c4Diagram-YGBWAQC7-DO_alqIu.js +2990 -0
  8. package/dist/channel-1fT-W0NS.js +5 -0
  9. package/dist/chunk-2Q5K7J3B-kzxEEeTu.js +15 -0
  10. package/dist/chunk-3FUC2YCW-C3yD2fMw.js +364 -0
  11. package/dist/chunk-5DYCD2WN-Dn2jrYde.js +37 -0
  12. package/dist/chunk-5VM5RSS4-Cr17nBXp.js +5 -0
  13. package/dist/chunk-6AEJRKK7-JyfUnUEu.js +10 -0
  14. package/dist/chunk-742MDFTN-BbWkrtj2.js +275 -0
  15. package/dist/chunk-7INBJB4K-C3x7JNTG.js +4487 -0
  16. package/dist/chunk-7M6MHVWA-Cc7UTu4b.js +4256 -0
  17. package/dist/chunk-7PRAP22T-C8rsGRvH.js +67 -0
  18. package/dist/chunk-DUW6YSOI-BdOla2G8.js +10 -0
  19. package/dist/chunk-FOHPRMQF-Crq0JMf2.js +21388 -0
  20. package/dist/chunk-GNY47TPC-d-Bi8r0p.js +75 -0
  21. package/dist/chunk-GTNCS2PH-CTS015lZ.js +490 -0
  22. package/dist/chunk-GWA4HPMP-B4pgM-E1.js +61 -0
  23. package/dist/chunk-J5ZVWO5B-CYzz6Pq8.js +12 -0
  24. package/dist/chunk-JWPE2WC7-Ccb0QaC8.js +8 -0
  25. package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
  26. package/dist/chunk-MBY4JIJT-Dg6AeftH.js +1847 -0
  27. package/dist/chunk-NETBCI7D-TXZM0vKz.js +236 -0
  28. package/dist/chunk-O7XYJQB3-md6vjVm4.js +3922 -0
  29. package/dist/chunk-UA2S7LBM-DQTYPe9y.js +363 -0
  30. package/dist/chunk-WEXAMYUT-DmKWJz6y.js +26 -0
  31. package/dist/chunk-XXDRQBXY-C9XIYQdM.js +9 -0
  32. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  33. package/dist/chunk-Z7XXMR3K-BoDf6lxl.js +677 -0
  34. package/dist/chunk-ZIGJFQKS-CP5430fN.js +663 -0
  35. package/dist/classDiagram-v2-NBCMYWYE-6KoTmufe.js +3397 -0
  36. package/dist/components.js +3 -3
  37. package/dist/cose-bilkent-JH36ORCC-CejnZl_t.js +2251 -0
  38. package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +3 -0
  39. package/dist/cynefinDiagram-VND7K2PF-DZnc0dlm.js +349 -0
  40. package/dist/cytoscape.esm-_jXi1N4y.js +18151 -0
  41. package/dist/dagre-6A5THRUB-cuS57NO5.js +2192 -0
  42. package/dist/diagram-22UHCM2B-zQSFmH0t.js +5084 -0
  43. package/dist/diagram-3UASUU5V-D45Fgu1j.js +724 -0
  44. package/dist/diagram-ATOU4E4O-YMtQnlqd.js +432 -0
  45. package/dist/diagram-CDSNMT55-DP7UmEW1.js +301 -0
  46. package/dist/diagram-MLGK6HIB-WvSqrTRC.js +134 -0
  47. package/dist/diagram-MPIPVDR6-C2F3__mt.js +214 -0
  48. package/dist/dist-1DdJvBEt.js +50 -0
  49. package/dist/{dist-DGsPFADz.js → dist-DppLdkXt.js} +2 -2
  50. package/dist/dnd.js +2 -2
  51. package/dist/ebnfDiagram-ZINNZB2B-BZC6cSiy.js +100 -0
  52. package/dist/elk-276RUBZZ-7DJf1MEV.js +47598 -0
  53. package/dist/erDiagram-OPXOYQCR-YKlEVEF0.js +1970 -0
  54. package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +3 -0
  55. package/dist/flowDiagram-KWPJA3E3-DyLvzIlg.js +17 -0
  56. package/dist/ganttDiagram-FUAMR5RP-KIaOrYOF.js +2928 -0
  57. package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +3 -0
  58. package/dist/gitGraphDiagram-X574FWY7-DpFW-7JE.js +729 -0
  59. package/dist/graphlib-DFaO_iIU.js +372 -0
  60. package/dist/{hooks-BjSuqEof.js → hooks-C5xy0u03.js} +1 -1
  61. package/dist/hooks.js +1 -1
  62. package/dist/{i18n-DmVqVJXj.js → i18n-Cech9IAc.js} +328 -843
  63. package/dist/i18n.js +1 -1
  64. package/dist/info-A6RAGUB7-BvtuPd9C.js +3 -0
  65. package/dist/infoDiagram-VRGFBTTK-H3F-BCnu.js +20 -0
  66. package/dist/init-Buj1GKRa.js +27 -0
  67. package/dist/isArrayLikeObject-VG1KOJ3m.js +539 -0
  68. package/dist/ishikawaDiagram-OU5B5YK6-DgQDmcF3.js +719 -0
  69. package/dist/journeyDiagram-ZHPQQLJL-CanDOlfn.js +884 -0
  70. package/dist/kanban-definition-PNTS6WVX-DmnUgxgb.js +976 -0
  71. package/dist/katex-BMQ6LGsM.js +21962 -0
  72. package/dist/lib/components/index.d.ts +4 -0
  73. package/dist/lib/components/ui/action-card.d.ts +1 -1
  74. package/dist/lib/components/ui/chat/chat-composer-mentions.d.ts +8 -0
  75. package/dist/lib/components/ui/chat/chat-composer.d.ts +5 -1
  76. package/dist/lib/components/ui/chat/chat-markdown.d.ts +2 -2
  77. package/dist/lib/components/ui/emoji/emoji-list.d.ts +5 -0
  78. package/dist/lib/components/ui/emoji/emoji-picker.d.ts +7 -0
  79. package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
  80. package/dist/lib/components/ui/emoji/emoji.utils.test.d.ts +1 -0
  81. package/dist/lib/components/ui/emoji/index.d.ts +4 -0
  82. package/dist/lib/components/ui/emoji/types.d.ts +6 -0
  83. package/dist/lib/components/ui/entity-header.stories.d.ts +1 -0
  84. package/dist/lib/components/ui/kanban/kanban.stories.d.ts +1 -0
  85. package/dist/lib/components/ui/markdown/index.d.ts +3 -0
  86. package/dist/lib/components/ui/markdown/markdown.d.ts +7 -0
  87. package/dist/lib/components/ui/markdown/markdown.stories.d.ts +14 -0
  88. package/dist/lib/components/ui/markdown/markdown.test.d.ts +1 -0
  89. package/dist/lib/components/ui/markdown/markdown.utils.d.ts +1 -0
  90. package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
  91. package/dist/lib/components/ui/markdown/partials/markdown-code.d.ts +2 -0
  92. package/dist/lib/components/ui/markdown/partials/mermaid-diagram.d.ts +4 -0
  93. package/dist/lib/components/ui/mentions/index.d.ts +3 -0
  94. package/dist/lib/components/ui/mentions/mention-list.d.ts +8 -0
  95. package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
  96. package/dist/lib/components/ui/mentions/mentions.utils.test.d.ts +1 -0
  97. package/dist/lib/components/ui/mentions/types.d.ts +7 -0
  98. package/dist/lib/components/ui/rich-text-editor/extensions/mention/mention-list.d.ts +12 -1
  99. package/dist/lib/components/ui/terminal/index.d.ts +2 -0
  100. package/dist/lib/components/ui/terminal/terminal.d.ts +11 -0
  101. package/dist/lib/components/ui/terminal/terminal.stories.d.ts +14 -0
  102. package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
  103. package/dist/lib/components/ui/terminal/terminal.utils.test.d.ts +1 -0
  104. package/dist/lib/i18n/resources/en/index.d.ts +13 -0
  105. package/dist/lib/i18n/resources/en/material.json.d.ts +14 -1
  106. package/dist/lib/i18n/resources/fr/index.d.ts +13 -0
  107. package/dist/lib/i18n/resources/fr/material.json.d.ts +14 -1
  108. package/dist/lib/i18n/resources/index.d.ts +26 -0
  109. package/dist/lib/i18n/translator.d.ts +1 -1
  110. package/dist/{lib-B1KXma-r.js → lib-Bbw5QPoj.js} +472 -471
  111. package/dist/lib.js +2 -2
  112. package/dist/{main-Cw-Yaqo9.js → main-BjDU9FDM.js} +58614 -29566
  113. package/dist/main.js +6 -6
  114. package/dist/material.css +1 -1
  115. package/dist/math-C5EhTgJw.js +10 -0
  116. package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
  117. package/dist/mermaid.core-BI1sunfX.js +1096 -0
  118. package/dist/mindmap-definition-NLK3R4M7-DW0BIU_q.js +1008 -0
  119. package/dist/ordinal-DuP05kVQ.js +65 -0
  120. package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
  121. package/dist/path-Cjou0lUh.js +85 -0
  122. package/dist/pegDiagram-GJSIUBJH-CJIx0u4M.js +94 -0
  123. package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
  124. package/dist/pieDiagram-5QR66LMP-zAhv5fKz.js +157 -0
  125. package/dist/quadrantDiagram-O4NWA36T-CO4n_yQo.js +2001 -0
  126. package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
  127. package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
  128. package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
  129. package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
  130. package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
  131. package/dist/railroadDiagram-XR7U4H2S-B8iV7mfe.js +76 -0
  132. package/dist/requirementDiagram-PLB6GJNP-CGoX1NrW.js +2228 -0
  133. package/dist/rough.esm-rcMoXTJj.js +1352 -0
  134. package/dist/sankeyDiagram-IPEJSGJF-DdSM2wiI.js +962 -0
  135. package/dist/sequenceDiagram-PO4LG4MO-CCRqF5XO.js +4200 -0
  136. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  137. package/dist/src-B4npqWNl.js +1775 -0
  138. package/dist/stateDiagram-v2-GCMORJYK-CQTX5ks8.js +2143 -0
  139. package/dist/step-B6KjpKgN.js +706 -0
  140. package/dist/string-B-ZWXCs2.js +392 -0
  141. package/dist/swimlanes-2SLR337P-C2NNOb5n.js +4763 -0
  142. package/dist/swimlanesDiagram-TC7HE7FX-CPsqPrbP.js +28 -0
  143. package/dist/timeline-definition-EJHVYXUP-DuxGHv-N.js +1073 -0
  144. package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
  145. package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
  146. package/dist/usecaseDiagram-POWQR4AR-cuAeIBW3.js +9932 -0
  147. package/dist/vennDiagram-UO4OBE2U-DLwBSAnC.js +1880 -0
  148. package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
  149. package/dist/wardleyDiagram-VNRHLVJA-D7IZU6vu.js +645 -0
  150. package/dist/xychartDiagram-PMCCYNJV-BDOFv_xK.js +2167 -0
  151. package/package.json +7 -1
@@ -0,0 +1,2167 @@
1
+ import { Cl as e, Sl as t, Tl as n } from "./main-BjDU9FDM.js";
2
+ import { n as r } from "./src-B4npqWNl.js";
3
+ import { i } from "./chunk-ZIGJFQKS-CP5430fN.js";
4
+ import { n as a } from "./chunk-Y2CYZVJY-i11wjrBe.js";
5
+ import { D as o, H as s, U as c, a as l, b as u, c as d, f, q as p, v as m, w as h, y as g, z as _ } from "./chunk-O7XYJQB3-md6vjVm4.js";
6
+ import { t as v } from "./chunk-6AEJRKK7-JyfUnUEu.js";
7
+ import "./chunk-742MDFTN-BbWkrtj2.js";
8
+ import { t as y } from "./chunk-MBY4JIJT-Dg6AeftH.js";
9
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PMCCYNJV.mjs
10
+ var b = (function() {
11
+ var e = /* @__PURE__ */ a(function(e, t, n, r) {
12
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
13
+ return n;
14
+ }, "o"), t = [
15
+ 1,
16
+ 10,
17
+ 12,
18
+ 14,
19
+ 16,
20
+ 18,
21
+ 19,
22
+ 21,
23
+ 23
24
+ ], n = [2, 6], r = [1, 3], i = [1, 5], o = [1, 6], s = [1, 7], c = [
25
+ 1,
26
+ 5,
27
+ 10,
28
+ 12,
29
+ 14,
30
+ 16,
31
+ 18,
32
+ 19,
33
+ 21,
34
+ 23,
35
+ 36,
36
+ 37,
37
+ 38
38
+ ], l = [1, 25], u = [1, 26], d = [1, 28], f = [1, 29], p = [1, 30], m = [1, 31], h = [1, 32], g = [1, 33], _ = [1, 34], v = [1, 35], y = [1, 36], b = [1, 37], x = [1, 43], S = [1, 42], C = [1, 47], w = [1, 50], T = [
39
+ 1,
40
+ 10,
41
+ 12,
42
+ 14,
43
+ 16,
44
+ 18,
45
+ 19,
46
+ 21,
47
+ 23,
48
+ 36,
49
+ 37,
50
+ 38
51
+ ], E = [
52
+ 1,
53
+ 10,
54
+ 12,
55
+ 14,
56
+ 16,
57
+ 18,
58
+ 19,
59
+ 21,
60
+ 23,
61
+ 24,
62
+ 26,
63
+ 28,
64
+ 29,
65
+ 36,
66
+ 37,
67
+ 38
68
+ ], D = [
69
+ 1,
70
+ 10,
71
+ 12,
72
+ 14,
73
+ 16,
74
+ 18,
75
+ 19,
76
+ 21,
77
+ 23,
78
+ 24,
79
+ 26,
80
+ 28,
81
+ 29,
82
+ 36,
83
+ 37,
84
+ 38,
85
+ 42,
86
+ 43,
87
+ 44,
88
+ 45,
89
+ 46,
90
+ 47,
91
+ 48,
92
+ 49,
93
+ 50,
94
+ 51
95
+ ], O = [1, 65], k = [26, 28], A = {
96
+ trace: /* @__PURE__ */ a(function() {}, "trace"),
97
+ yy: {},
98
+ symbols_: {
99
+ error: 2,
100
+ start: 3,
101
+ eol: 4,
102
+ XYCHART: 5,
103
+ chartConfig: 6,
104
+ document: 7,
105
+ CHART_ORIENTATION: 8,
106
+ statement: 9,
107
+ title: 10,
108
+ text: 11,
109
+ X_AXIS: 12,
110
+ parseXAxis: 13,
111
+ Y_AXIS: 14,
112
+ parseYAxis: 15,
113
+ LINE: 16,
114
+ plotData: 17,
115
+ BAR: 18,
116
+ acc_title: 19,
117
+ acc_title_value: 20,
118
+ acc_descr: 21,
119
+ acc_descr_value: 22,
120
+ acc_descr_multiline_value: 23,
121
+ SQUARE_BRACES_START: 24,
122
+ dataPoints: 25,
123
+ SQUARE_BRACES_END: 26,
124
+ dataPoint: 27,
125
+ COMMA: 28,
126
+ NUMBER_WITH_DECIMAL: 29,
127
+ STR: 30,
128
+ xAxisData: 31,
129
+ bandData: 32,
130
+ ARROW_DELIMITER: 33,
131
+ commaSeparatedTexts: 34,
132
+ yAxisData: 35,
133
+ NEWLINE: 36,
134
+ SEMI: 37,
135
+ EOF: 38,
136
+ alphaNum: 39,
137
+ MD_STR: 40,
138
+ alphaNumToken: 41,
139
+ AMP: 42,
140
+ NUM: 43,
141
+ ALPHA: 44,
142
+ PLUS: 45,
143
+ EQUALS: 46,
144
+ MULT: 47,
145
+ DOT: 48,
146
+ BRKT: 49,
147
+ MINUS: 50,
148
+ UNDERSCORE: 51,
149
+ $accept: 0,
150
+ $end: 1
151
+ },
152
+ terminals_: {
153
+ 2: "error",
154
+ 5: "XYCHART",
155
+ 8: "CHART_ORIENTATION",
156
+ 10: "title",
157
+ 12: "X_AXIS",
158
+ 14: "Y_AXIS",
159
+ 16: "LINE",
160
+ 18: "BAR",
161
+ 19: "acc_title",
162
+ 20: "acc_title_value",
163
+ 21: "acc_descr",
164
+ 22: "acc_descr_value",
165
+ 23: "acc_descr_multiline_value",
166
+ 24: "SQUARE_BRACES_START",
167
+ 26: "SQUARE_BRACES_END",
168
+ 28: "COMMA",
169
+ 29: "NUMBER_WITH_DECIMAL",
170
+ 30: "STR",
171
+ 33: "ARROW_DELIMITER",
172
+ 36: "NEWLINE",
173
+ 37: "SEMI",
174
+ 38: "EOF",
175
+ 40: "MD_STR",
176
+ 42: "AMP",
177
+ 43: "NUM",
178
+ 44: "ALPHA",
179
+ 45: "PLUS",
180
+ 46: "EQUALS",
181
+ 47: "MULT",
182
+ 48: "DOT",
183
+ 49: "BRKT",
184
+ 50: "MINUS",
185
+ 51: "UNDERSCORE"
186
+ },
187
+ productions_: [
188
+ 0,
189
+ [3, 2],
190
+ [3, 3],
191
+ [3, 2],
192
+ [3, 1],
193
+ [6, 1],
194
+ [7, 0],
195
+ [7, 2],
196
+ [9, 2],
197
+ [9, 2],
198
+ [9, 2],
199
+ [9, 2],
200
+ [9, 2],
201
+ [9, 3],
202
+ [9, 2],
203
+ [9, 3],
204
+ [9, 2],
205
+ [9, 2],
206
+ [9, 1],
207
+ [17, 3],
208
+ [25, 3],
209
+ [25, 1],
210
+ [27, 2],
211
+ [27, 1],
212
+ [13, 1],
213
+ [13, 2],
214
+ [13, 1],
215
+ [31, 1],
216
+ [31, 3],
217
+ [32, 3],
218
+ [34, 3],
219
+ [34, 1],
220
+ [15, 1],
221
+ [15, 2],
222
+ [15, 1],
223
+ [35, 3],
224
+ [4, 1],
225
+ [4, 1],
226
+ [4, 1],
227
+ [11, 1],
228
+ [11, 1],
229
+ [11, 1],
230
+ [39, 1],
231
+ [39, 2],
232
+ [41, 1],
233
+ [41, 1],
234
+ [41, 1],
235
+ [41, 1],
236
+ [41, 1],
237
+ [41, 1],
238
+ [41, 1],
239
+ [41, 1],
240
+ [41, 1],
241
+ [41, 1]
242
+ ],
243
+ performAction: /* @__PURE__ */ a(function(e, t, n, r, i, a, o) {
244
+ var s = a.length - 1;
245
+ switch (i) {
246
+ case 5:
247
+ r.setOrientation(a[s]);
248
+ break;
249
+ case 9:
250
+ r.setDiagramTitle(a[s].text.trim());
251
+ break;
252
+ case 12:
253
+ r.setLineData({
254
+ text: "",
255
+ type: "text"
256
+ }, a[s]);
257
+ break;
258
+ case 13:
259
+ r.setLineData(a[s - 1], a[s]);
260
+ break;
261
+ case 14:
262
+ r.setBarData({
263
+ text: "",
264
+ type: "text"
265
+ }, a[s]);
266
+ break;
267
+ case 15:
268
+ r.setBarData(a[s - 1], a[s]);
269
+ break;
270
+ case 16:
271
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
272
+ break;
273
+ case 17:
274
+ case 18:
275
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
276
+ break;
277
+ case 19:
278
+ this.$ = a[s - 1];
279
+ break;
280
+ case 20:
281
+ case 30:
282
+ this.$ = [a[s - 2], ...a[s]];
283
+ break;
284
+ case 21:
285
+ case 31:
286
+ this.$ = [a[s]];
287
+ break;
288
+ case 22:
289
+ this.$ = {
290
+ value: Number(a[s - 1]),
291
+ label: a[s]
292
+ };
293
+ break;
294
+ case 23:
295
+ this.$ = {
296
+ value: Number(a[s]),
297
+ label: ""
298
+ };
299
+ break;
300
+ case 24:
301
+ r.setXAxisTitle(a[s]);
302
+ break;
303
+ case 25:
304
+ r.setXAxisTitle(a[s - 1]);
305
+ break;
306
+ case 26:
307
+ r.setXAxisTitle({
308
+ type: "text",
309
+ text: ""
310
+ });
311
+ break;
312
+ case 27:
313
+ r.setXAxisBand(a[s]);
314
+ break;
315
+ case 28:
316
+ r.setXAxisRangeData(Number(a[s - 2]), Number(a[s]));
317
+ break;
318
+ case 29:
319
+ this.$ = a[s - 1];
320
+ break;
321
+ case 32:
322
+ r.setYAxisTitle(a[s]);
323
+ break;
324
+ case 33:
325
+ r.setYAxisTitle(a[s - 1]);
326
+ break;
327
+ case 34:
328
+ r.setYAxisTitle({
329
+ type: "text",
330
+ text: ""
331
+ });
332
+ break;
333
+ case 35:
334
+ r.setYAxisRangeData(Number(a[s - 2]), Number(a[s]));
335
+ break;
336
+ case 39:
337
+ this.$ = {
338
+ text: a[s],
339
+ type: "text"
340
+ };
341
+ break;
342
+ case 40:
343
+ this.$ = {
344
+ text: a[s],
345
+ type: "text"
346
+ };
347
+ break;
348
+ case 41:
349
+ this.$ = {
350
+ text: a[s],
351
+ type: "markdown"
352
+ };
353
+ break;
354
+ case 42:
355
+ this.$ = a[s];
356
+ break;
357
+ case 43:
358
+ this.$ = a[s - 1] + "" + a[s];
359
+ break;
360
+ }
361
+ }, "anonymous"),
362
+ table: [
363
+ e(t, n, {
364
+ 3: 1,
365
+ 4: 2,
366
+ 7: 4,
367
+ 5: r,
368
+ 36: i,
369
+ 37: o,
370
+ 38: s
371
+ }),
372
+ { 1: [3] },
373
+ e(t, n, {
374
+ 4: 2,
375
+ 7: 4,
376
+ 3: 8,
377
+ 5: r,
378
+ 36: i,
379
+ 37: o,
380
+ 38: s
381
+ }),
382
+ e(t, n, {
383
+ 4: 2,
384
+ 7: 4,
385
+ 6: 9,
386
+ 3: 10,
387
+ 5: r,
388
+ 8: [1, 11],
389
+ 36: i,
390
+ 37: o,
391
+ 38: s
392
+ }),
393
+ {
394
+ 1: [2, 4],
395
+ 9: 12,
396
+ 10: [1, 13],
397
+ 12: [1, 14],
398
+ 14: [1, 15],
399
+ 16: [1, 16],
400
+ 18: [1, 17],
401
+ 19: [1, 18],
402
+ 21: [1, 19],
403
+ 23: [1, 20]
404
+ },
405
+ e(c, [2, 36]),
406
+ e(c, [2, 37]),
407
+ e(c, [2, 38]),
408
+ { 1: [2, 1] },
409
+ e(t, n, {
410
+ 4: 2,
411
+ 7: 4,
412
+ 3: 21,
413
+ 5: r,
414
+ 36: i,
415
+ 37: o,
416
+ 38: s
417
+ }),
418
+ { 1: [2, 3] },
419
+ e(c, [2, 5]),
420
+ e(t, [2, 7], {
421
+ 4: 22,
422
+ 36: i,
423
+ 37: o,
424
+ 38: s
425
+ }),
426
+ {
427
+ 11: 23,
428
+ 30: l,
429
+ 39: 24,
430
+ 40: u,
431
+ 41: 27,
432
+ 42: d,
433
+ 43: f,
434
+ 44: p,
435
+ 45: m,
436
+ 46: h,
437
+ 47: g,
438
+ 48: _,
439
+ 49: v,
440
+ 50: y,
441
+ 51: b
442
+ },
443
+ {
444
+ 11: 39,
445
+ 13: 38,
446
+ 24: x,
447
+ 29: S,
448
+ 30: l,
449
+ 31: 40,
450
+ 32: 41,
451
+ 39: 24,
452
+ 40: u,
453
+ 41: 27,
454
+ 42: d,
455
+ 43: f,
456
+ 44: p,
457
+ 45: m,
458
+ 46: h,
459
+ 47: g,
460
+ 48: _,
461
+ 49: v,
462
+ 50: y,
463
+ 51: b
464
+ },
465
+ {
466
+ 11: 45,
467
+ 15: 44,
468
+ 29: C,
469
+ 30: l,
470
+ 35: 46,
471
+ 39: 24,
472
+ 40: u,
473
+ 41: 27,
474
+ 42: d,
475
+ 43: f,
476
+ 44: p,
477
+ 45: m,
478
+ 46: h,
479
+ 47: g,
480
+ 48: _,
481
+ 49: v,
482
+ 50: y,
483
+ 51: b
484
+ },
485
+ {
486
+ 11: 49,
487
+ 17: 48,
488
+ 24: w,
489
+ 30: l,
490
+ 39: 24,
491
+ 40: u,
492
+ 41: 27,
493
+ 42: d,
494
+ 43: f,
495
+ 44: p,
496
+ 45: m,
497
+ 46: h,
498
+ 47: g,
499
+ 48: _,
500
+ 49: v,
501
+ 50: y,
502
+ 51: b
503
+ },
504
+ {
505
+ 11: 52,
506
+ 17: 51,
507
+ 24: w,
508
+ 30: l,
509
+ 39: 24,
510
+ 40: u,
511
+ 41: 27,
512
+ 42: d,
513
+ 43: f,
514
+ 44: p,
515
+ 45: m,
516
+ 46: h,
517
+ 47: g,
518
+ 48: _,
519
+ 49: v,
520
+ 50: y,
521
+ 51: b
522
+ },
523
+ { 20: [1, 53] },
524
+ { 22: [1, 54] },
525
+ e(T, [2, 18]),
526
+ { 1: [2, 2] },
527
+ e(T, [2, 8]),
528
+ e(T, [2, 9]),
529
+ e(E, [2, 39], {
530
+ 41: 55,
531
+ 42: d,
532
+ 43: f,
533
+ 44: p,
534
+ 45: m,
535
+ 46: h,
536
+ 47: g,
537
+ 48: _,
538
+ 49: v,
539
+ 50: y,
540
+ 51: b
541
+ }),
542
+ e(E, [2, 40]),
543
+ e(E, [2, 41]),
544
+ e(D, [2, 42]),
545
+ e(D, [2, 44]),
546
+ e(D, [2, 45]),
547
+ e(D, [2, 46]),
548
+ e(D, [2, 47]),
549
+ e(D, [2, 48]),
550
+ e(D, [2, 49]),
551
+ e(D, [2, 50]),
552
+ e(D, [2, 51]),
553
+ e(D, [2, 52]),
554
+ e(D, [2, 53]),
555
+ e(T, [2, 10]),
556
+ e(T, [2, 24], {
557
+ 32: 41,
558
+ 31: 56,
559
+ 24: x,
560
+ 29: S
561
+ }),
562
+ e(T, [2, 26]),
563
+ e(T, [2, 27]),
564
+ { 33: [1, 57] },
565
+ {
566
+ 11: 59,
567
+ 30: l,
568
+ 34: 58,
569
+ 39: 24,
570
+ 40: u,
571
+ 41: 27,
572
+ 42: d,
573
+ 43: f,
574
+ 44: p,
575
+ 45: m,
576
+ 46: h,
577
+ 47: g,
578
+ 48: _,
579
+ 49: v,
580
+ 50: y,
581
+ 51: b
582
+ },
583
+ e(T, [2, 11]),
584
+ e(T, [2, 32], {
585
+ 35: 60,
586
+ 29: C
587
+ }),
588
+ e(T, [2, 34]),
589
+ { 33: [1, 61] },
590
+ e(T, [2, 12]),
591
+ {
592
+ 17: 62,
593
+ 24: w
594
+ },
595
+ {
596
+ 25: 63,
597
+ 27: 64,
598
+ 29: O
599
+ },
600
+ e(T, [2, 14]),
601
+ {
602
+ 17: 66,
603
+ 24: w
604
+ },
605
+ e(T, [2, 16]),
606
+ e(T, [2, 17]),
607
+ e(D, [2, 43]),
608
+ e(T, [2, 25]),
609
+ { 29: [1, 67] },
610
+ { 26: [1, 68] },
611
+ {
612
+ 26: [2, 31],
613
+ 28: [1, 69]
614
+ },
615
+ e(T, [2, 33]),
616
+ { 29: [1, 70] },
617
+ e(T, [2, 13]),
618
+ { 26: [1, 71] },
619
+ {
620
+ 26: [2, 21],
621
+ 28: [1, 72]
622
+ },
623
+ e(k, [2, 23], { 30: [1, 73] }),
624
+ e(T, [2, 15]),
625
+ e(T, [2, 28]),
626
+ e(T, [2, 29]),
627
+ {
628
+ 11: 59,
629
+ 30: l,
630
+ 34: 74,
631
+ 39: 24,
632
+ 40: u,
633
+ 41: 27,
634
+ 42: d,
635
+ 43: f,
636
+ 44: p,
637
+ 45: m,
638
+ 46: h,
639
+ 47: g,
640
+ 48: _,
641
+ 49: v,
642
+ 50: y,
643
+ 51: b
644
+ },
645
+ e(T, [2, 35]),
646
+ e(T, [2, 19]),
647
+ {
648
+ 25: 75,
649
+ 27: 64,
650
+ 29: O
651
+ },
652
+ e(k, [2, 22]),
653
+ { 26: [2, 30] },
654
+ { 26: [2, 20] }
655
+ ],
656
+ defaultActions: {
657
+ 8: [2, 1],
658
+ 10: [2, 3],
659
+ 21: [2, 2],
660
+ 74: [2, 30],
661
+ 75: [2, 20]
662
+ },
663
+ parseError: /* @__PURE__ */ a(function(e, t) {
664
+ if (t.recoverable) this.trace(e);
665
+ else {
666
+ var n = Error(e);
667
+ throw n.hash = t, n;
668
+ }
669
+ }, "parseError"),
670
+ parse: /* @__PURE__ */ a(function(e) {
671
+ var t = this, n = [0], r = [], i = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
672
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
673
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
674
+ var v = h.yylloc;
675
+ o.push(v);
676
+ var y = h.options && h.options.ranges;
677
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
678
+ function b(e) {
679
+ n.length -= 2 * e, i.length -= e, o.length -= e;
680
+ }
681
+ a(b, "popStack");
682
+ function x() {
683
+ var e = r.pop() || h.lex() || p;
684
+ return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
685
+ }
686
+ a(x, "lex");
687
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
688
+ if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
689
+ var M = "";
690
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
691
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
692
+ text: h.match,
693
+ token: this.terminals_[S] || S,
694
+ line: h.yylineno,
695
+ loc: v,
696
+ expected: j
697
+ });
698
+ }
699
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
700
+ switch (T[0]) {
701
+ case 1:
702
+ n.push(S), i.push(h.yytext), o.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
703
+ break;
704
+ case 2:
705
+ if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
706
+ first_line: o[o.length - (k || 1)].first_line,
707
+ last_line: o[o.length - 1].last_line,
708
+ first_column: o[o.length - (k || 1)].first_column,
709
+ last_column: o[o.length - 1].last_column
710
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
711
+ c,
712
+ u,
713
+ l,
714
+ g.yy,
715
+ T[1],
716
+ i,
717
+ o
718
+ ].concat(m)), E !== void 0) return E;
719
+ k && (n = n.slice(0, -1 * k * 2), i = i.slice(0, -1 * k), o = o.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), i.push(D.$), o.push(D._$), A = s[n[n.length - 2]][n[n.length - 1]], n.push(A);
720
+ break;
721
+ case 3: return !0;
722
+ }
723
+ }
724
+ return !0;
725
+ }, "parse")
726
+ };
727
+ A.lexer = /* @__PURE__ */ (function() {
728
+ return {
729
+ EOF: 1,
730
+ parseError: /* @__PURE__ */ a(function(e, t) {
731
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
732
+ else throw Error(e);
733
+ }, "parseError"),
734
+ setInput: /* @__PURE__ */ a(function(e, t) {
735
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
736
+ first_line: 1,
737
+ first_column: 0,
738
+ last_line: 1,
739
+ last_column: 0
740
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
741
+ }, "setInput"),
742
+ input: /* @__PURE__ */ a(function() {
743
+ var e = this._input[0];
744
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
745
+ }, "input"),
746
+ unput: /* @__PURE__ */ a(function(e) {
747
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
748
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
749
+ var r = this.match.split(/(?:\r\n?|\n)/g);
750
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
751
+ var i = this.yylloc.range;
752
+ return this.yylloc = {
753
+ first_line: this.yylloc.first_line,
754
+ last_line: this.yylineno + 1,
755
+ first_column: this.yylloc.first_column,
756
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
757
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
758
+ }, "unput"),
759
+ more: /* @__PURE__ */ a(function() {
760
+ return this._more = !0, this;
761
+ }, "more"),
762
+ reject: /* @__PURE__ */ a(function() {
763
+ if (this.options.backtrack_lexer) this._backtrack = !0;
764
+ else 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).\n" + this.showPosition(), {
765
+ text: "",
766
+ token: null,
767
+ line: this.yylineno
768
+ });
769
+ return this;
770
+ }, "reject"),
771
+ less: /* @__PURE__ */ a(function(e) {
772
+ this.unput(this.match.slice(e));
773
+ }, "less"),
774
+ pastInput: /* @__PURE__ */ a(function() {
775
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
776
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
777
+ }, "pastInput"),
778
+ upcomingInput: /* @__PURE__ */ a(function() {
779
+ var e = this.match;
780
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
781
+ }, "upcomingInput"),
782
+ showPosition: /* @__PURE__ */ a(function() {
783
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
784
+ return e + this.upcomingInput() + "\n" + t + "^";
785
+ }, "showPosition"),
786
+ test_match: /* @__PURE__ */ a(function(e, t) {
787
+ var n, r, i;
788
+ if (this.options.backtrack_lexer && (i = {
789
+ yylineno: this.yylineno,
790
+ yylloc: {
791
+ first_line: this.yylloc.first_line,
792
+ last_line: this.last_line,
793
+ first_column: this.yylloc.first_column,
794
+ last_column: this.yylloc.last_column
795
+ },
796
+ yytext: this.yytext,
797
+ match: this.match,
798
+ matches: this.matches,
799
+ matched: this.matched,
800
+ yyleng: this.yyleng,
801
+ offset: this.offset,
802
+ _more: this._more,
803
+ _input: this._input,
804
+ yy: this.yy,
805
+ conditionStack: this.conditionStack.slice(0),
806
+ done: this.done
807
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
808
+ first_line: this.yylloc.last_line,
809
+ last_line: this.yylineno + 1,
810
+ first_column: this.yylloc.last_column,
811
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
812
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
813
+ if (this._backtrack) {
814
+ for (var a in i) this[a] = i[a];
815
+ return !1;
816
+ }
817
+ return !1;
818
+ }, "test_match"),
819
+ next: /* @__PURE__ */ a(function() {
820
+ if (this.done) return this.EOF;
821
+ this._input || (this.done = !0);
822
+ var e, t, n, r;
823
+ this._more || (this.yytext = "", this.match = "");
824
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
825
+ if (t = n, r = a, this.options.backtrack_lexer) {
826
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
827
+ if (this._backtrack) {
828
+ t = !1;
829
+ continue;
830
+ } else return !1;
831
+ } else if (!this.options.flex) break;
832
+ }
833
+ return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
834
+ text: "",
835
+ token: null,
836
+ line: this.yylineno
837
+ });
838
+ }, "next"),
839
+ lex: /* @__PURE__ */ a(function() {
840
+ return this.next() || this.lex();
841
+ }, "lex"),
842
+ begin: /* @__PURE__ */ a(function(e) {
843
+ this.conditionStack.push(e);
844
+ }, "begin"),
845
+ popState: /* @__PURE__ */ a(function() {
846
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
847
+ }, "popState"),
848
+ _currentRules: /* @__PURE__ */ a(function() {
849
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
850
+ }, "_currentRules"),
851
+ topState: /* @__PURE__ */ a(function(e) {
852
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
853
+ }, "topState"),
854
+ pushState: /* @__PURE__ */ a(function(e) {
855
+ this.begin(e);
856
+ }, "pushState"),
857
+ stateStackSize: /* @__PURE__ */ a(function() {
858
+ return this.conditionStack.length;
859
+ }, "stateStackSize"),
860
+ options: { "case-insensitive": !0 },
861
+ performAction: /* @__PURE__ */ a(function(e, t, n, r) {
862
+ switch (n) {
863
+ case 0: break;
864
+ case 1: break;
865
+ case 2: return this.popState(), 36;
866
+ case 3: return this.popState(), 36;
867
+ case 4: return 36;
868
+ case 5: break;
869
+ case 6: return 10;
870
+ case 7: return this.pushState("acc_title"), 19;
871
+ case 8: return this.popState(), "acc_title_value";
872
+ case 9: return this.pushState("acc_descr"), 21;
873
+ case 10: return this.popState(), "acc_descr_value";
874
+ case 11:
875
+ this.pushState("acc_descr_multiline");
876
+ break;
877
+ case 12:
878
+ this.popState();
879
+ break;
880
+ case 13: return "acc_descr_multiline_value";
881
+ case 14: return 5;
882
+ case 15: return 5;
883
+ case 16: return 8;
884
+ case 17: return this.pushState("axis_data"), "X_AXIS";
885
+ case 18: return this.pushState("axis_data"), "Y_AXIS";
886
+ case 19: return this.pushState("axis_band_data"), 24;
887
+ case 20: return 33;
888
+ case 21: return this.pushState("data"), 16;
889
+ case 22: return this.pushState("data"), 18;
890
+ case 23: return this.pushState("data_inner"), 24;
891
+ case 24: return 29;
892
+ case 25: return this.popState(), 26;
893
+ case 26:
894
+ this.popState();
895
+ break;
896
+ case 27:
897
+ this.pushState("string");
898
+ break;
899
+ case 28:
900
+ this.popState();
901
+ break;
902
+ case 29: return "STR";
903
+ case 30: return 24;
904
+ case 31: return 26;
905
+ case 32: return 44;
906
+ case 33: return "COLON";
907
+ case 34: return 45;
908
+ case 35: return 28;
909
+ case 36: return 46;
910
+ case 37: return 47;
911
+ case 38: return 49;
912
+ case 39: return 51;
913
+ case 40: return 48;
914
+ case 41: return 42;
915
+ case 42: return 50;
916
+ case 43: return 43;
917
+ case 44: break;
918
+ case 45: return 37;
919
+ case 46: return 38;
920
+ }
921
+ }, "anonymous"),
922
+ rules: [
923
+ /^(?:%%(?!\{)[^\n]*)/i,
924
+ /^(?:[^\}]%%[^\n]*)/i,
925
+ /^(?:(\r?\n))/i,
926
+ /^(?:(\r?\n))/i,
927
+ /^(?:[\n\r]+)/i,
928
+ /^(?:%%[^\n]*)/i,
929
+ /^(?:title\b)/i,
930
+ /^(?:accTitle\s*:\s*)/i,
931
+ /^(?:(?!\n||)*[^\n]*)/i,
932
+ /^(?:accDescr\s*:\s*)/i,
933
+ /^(?:(?!\n||)*[^\n]*)/i,
934
+ /^(?:accDescr\s*\{\s*)/i,
935
+ /^(?:\})/i,
936
+ /^(?:[^\}]*)/i,
937
+ /^(?:xychart-beta\b)/i,
938
+ /^(?:xychart\b)/i,
939
+ /^(?:(?:vertical|horizontal))/i,
940
+ /^(?:x-axis\b)/i,
941
+ /^(?:y-axis\b)/i,
942
+ /^(?:\[)/i,
943
+ /^(?:-->)/i,
944
+ /^(?:line\b)/i,
945
+ /^(?:bar\b)/i,
946
+ /^(?:\[)/i,
947
+ /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,
948
+ /^(?:\])/i,
949
+ /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,
950
+ /^(?:["])/i,
951
+ /^(?:["])/i,
952
+ /^(?:[^"]*)/i,
953
+ /^(?:\[)/i,
954
+ /^(?:\])/i,
955
+ /^(?:[A-Za-z]+)/i,
956
+ /^(?::)/i,
957
+ /^(?:\+)/i,
958
+ /^(?:,)/i,
959
+ /^(?:=)/i,
960
+ /^(?:\*)/i,
961
+ /^(?:#)/i,
962
+ /^(?:[\_])/i,
963
+ /^(?:\.)/i,
964
+ /^(?:&)/i,
965
+ /^(?:-)/i,
966
+ /^(?:[0-9]+)/i,
967
+ /^(?:\s+)/i,
968
+ /^(?:;)/i,
969
+ /^(?:$)/i
970
+ ],
971
+ conditions: {
972
+ data_inner: {
973
+ rules: [
974
+ 0,
975
+ 1,
976
+ 4,
977
+ 5,
978
+ 6,
979
+ 7,
980
+ 9,
981
+ 11,
982
+ 14,
983
+ 15,
984
+ 16,
985
+ 17,
986
+ 18,
987
+ 21,
988
+ 22,
989
+ 24,
990
+ 25,
991
+ 26,
992
+ 27,
993
+ 30,
994
+ 31,
995
+ 32,
996
+ 33,
997
+ 34,
998
+ 35,
999
+ 36,
1000
+ 37,
1001
+ 38,
1002
+ 39,
1003
+ 40,
1004
+ 41,
1005
+ 42,
1006
+ 43,
1007
+ 44,
1008
+ 45,
1009
+ 46
1010
+ ],
1011
+ inclusive: !0
1012
+ },
1013
+ data: {
1014
+ rules: [
1015
+ 0,
1016
+ 1,
1017
+ 3,
1018
+ 4,
1019
+ 5,
1020
+ 6,
1021
+ 7,
1022
+ 9,
1023
+ 11,
1024
+ 14,
1025
+ 15,
1026
+ 16,
1027
+ 17,
1028
+ 18,
1029
+ 21,
1030
+ 22,
1031
+ 23,
1032
+ 26,
1033
+ 27,
1034
+ 30,
1035
+ 31,
1036
+ 32,
1037
+ 33,
1038
+ 34,
1039
+ 35,
1040
+ 36,
1041
+ 37,
1042
+ 38,
1043
+ 39,
1044
+ 40,
1045
+ 41,
1046
+ 42,
1047
+ 43,
1048
+ 44,
1049
+ 45,
1050
+ 46
1051
+ ],
1052
+ inclusive: !0
1053
+ },
1054
+ axis_band_data: {
1055
+ rules: [
1056
+ 0,
1057
+ 1,
1058
+ 4,
1059
+ 5,
1060
+ 6,
1061
+ 7,
1062
+ 9,
1063
+ 11,
1064
+ 14,
1065
+ 15,
1066
+ 16,
1067
+ 17,
1068
+ 18,
1069
+ 21,
1070
+ 22,
1071
+ 25,
1072
+ 26,
1073
+ 27,
1074
+ 30,
1075
+ 31,
1076
+ 32,
1077
+ 33,
1078
+ 34,
1079
+ 35,
1080
+ 36,
1081
+ 37,
1082
+ 38,
1083
+ 39,
1084
+ 40,
1085
+ 41,
1086
+ 42,
1087
+ 43,
1088
+ 44,
1089
+ 45,
1090
+ 46
1091
+ ],
1092
+ inclusive: !0
1093
+ },
1094
+ axis_data: {
1095
+ rules: [
1096
+ 0,
1097
+ 1,
1098
+ 2,
1099
+ 4,
1100
+ 5,
1101
+ 6,
1102
+ 7,
1103
+ 9,
1104
+ 11,
1105
+ 14,
1106
+ 15,
1107
+ 16,
1108
+ 17,
1109
+ 18,
1110
+ 19,
1111
+ 20,
1112
+ 21,
1113
+ 22,
1114
+ 24,
1115
+ 26,
1116
+ 27,
1117
+ 30,
1118
+ 31,
1119
+ 32,
1120
+ 33,
1121
+ 34,
1122
+ 35,
1123
+ 36,
1124
+ 37,
1125
+ 38,
1126
+ 39,
1127
+ 40,
1128
+ 41,
1129
+ 42,
1130
+ 43,
1131
+ 44,
1132
+ 45,
1133
+ 46
1134
+ ],
1135
+ inclusive: !0
1136
+ },
1137
+ acc_descr_multiline: {
1138
+ rules: [12, 13],
1139
+ inclusive: !1
1140
+ },
1141
+ acc_descr: {
1142
+ rules: [10],
1143
+ inclusive: !1
1144
+ },
1145
+ acc_title: {
1146
+ rules: [8],
1147
+ inclusive: !1
1148
+ },
1149
+ title: {
1150
+ rules: [],
1151
+ inclusive: !1
1152
+ },
1153
+ md_string: {
1154
+ rules: [],
1155
+ inclusive: !1
1156
+ },
1157
+ string: {
1158
+ rules: [28, 29],
1159
+ inclusive: !1
1160
+ },
1161
+ INITIAL: {
1162
+ rules: [
1163
+ 0,
1164
+ 1,
1165
+ 4,
1166
+ 5,
1167
+ 6,
1168
+ 7,
1169
+ 9,
1170
+ 11,
1171
+ 14,
1172
+ 15,
1173
+ 16,
1174
+ 17,
1175
+ 18,
1176
+ 21,
1177
+ 22,
1178
+ 26,
1179
+ 27,
1180
+ 30,
1181
+ 31,
1182
+ 32,
1183
+ 33,
1184
+ 34,
1185
+ 35,
1186
+ 36,
1187
+ 37,
1188
+ 38,
1189
+ 39,
1190
+ 40,
1191
+ 41,
1192
+ 42,
1193
+ 43,
1194
+ 44,
1195
+ 45,
1196
+ 46
1197
+ ],
1198
+ inclusive: !0
1199
+ }
1200
+ }
1201
+ };
1202
+ })();
1203
+ function j() {
1204
+ this.yy = {};
1205
+ }
1206
+ return a(j, "Parser"), j.prototype = A, A.Parser = j, new j();
1207
+ })();
1208
+ b.parser = b;
1209
+ var x = b;
1210
+ function S(e) {
1211
+ return e.type === "bar";
1212
+ }
1213
+ a(S, "isBarPlot");
1214
+ function C(e) {
1215
+ return e.type === "band";
1216
+ }
1217
+ a(C, "isBandAxisData");
1218
+ function w(e) {
1219
+ return e.type === "linear";
1220
+ }
1221
+ a(w, "isLinearAxisData");
1222
+ var T = class {
1223
+ constructor(e) {
1224
+ this.parentGroup = e;
1225
+ }
1226
+ static {
1227
+ a(this, "TextDimensionCalculatorWithFont");
1228
+ }
1229
+ getMaxDimension(e, t) {
1230
+ if (!this.parentGroup) return {
1231
+ width: e.reduce((e, t) => Math.max(t.length, e), 0) * t,
1232
+ height: t
1233
+ };
1234
+ let n = {
1235
+ width: 0,
1236
+ height: 0
1237
+ }, r = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", t);
1238
+ for (let i of e) {
1239
+ let e = y(r, 1, i), a = e ? e.width : i.length * t, o = e ? e.height : t;
1240
+ n.width = Math.max(n.width, a), n.height = Math.max(n.height, o);
1241
+ }
1242
+ return r.remove(), n;
1243
+ }
1244
+ }, E = .7, D = .2, O = class {
1245
+ constructor(e, t, n, r) {
1246
+ this.axisConfig = e, this.title = t, this.textDimensionCalculator = n, this.axisThemeConfig = r, this.boundingRect = {
1247
+ x: 0,
1248
+ y: 0,
1249
+ width: 0,
1250
+ height: 0
1251
+ }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.normalizedLabelRotationInRad = 0, this.range = [0, 10], this.boundingRect = {
1252
+ x: 0,
1253
+ y: 0,
1254
+ width: 0,
1255
+ height: 0
1256
+ }, this.axisPosition = "left", this.normalizedLabelRotationInRad = this.axisConfig.labelRotation >= -90 && this.axisConfig.labelRotation <= 90 ? this.axisConfig.labelRotation * Math.PI / 180 : 0;
1257
+ }
1258
+ static {
1259
+ a(this, "BaseAxis");
1260
+ }
1261
+ setRange(e) {
1262
+ this.range = e, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = e[1] - e[0] : this.boundingRect.width = e[1] - e[0], this.recalculateScale();
1263
+ }
1264
+ getRange() {
1265
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
1266
+ }
1267
+ setAxisPosition(e) {
1268
+ this.axisPosition = e, this.setRange(this.range);
1269
+ }
1270
+ getTickDistance() {
1271
+ let e = this.getRange();
1272
+ return Math.abs(e[0] - e[1]) / this.getTickValues().length;
1273
+ }
1274
+ getAxisOuterPadding() {
1275
+ return this.outerPadding;
1276
+ }
1277
+ getLabelDimension() {
1278
+ return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e) => e.toString()), this.axisConfig.labelFontSize);
1279
+ }
1280
+ recalculateOuterPaddingToDrawBar() {
1281
+ E * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(E * this.getTickDistance() / 2)), this.recalculateScale();
1282
+ }
1283
+ calculateSpaceIfDrawnHorizontally(e) {
1284
+ let t = e.height;
1285
+ if (this.axisConfig.showAxisLine && t > this.axisConfig.axisLineWidth && (t -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1286
+ let n = this.getLabelDimension(), r = D * e.width;
1287
+ this.outerPadding = Math.min(n.width / 2, r);
1288
+ let i = n.height;
1289
+ this.axisPosition === "bottom" && this.normalizedLabelRotationInRad !== 0 && (i = Math.max(i, Math.abs(Math.sin(this.normalizedLabelRotationInRad) * n.width) + Math.abs(Math.cos(this.normalizedLabelRotationInRad) * n.height))), i += this.axisConfig.labelPadding * 2, this.labelTextHeight = n.height, i <= t && (t -= i, this.showLabel = !0);
1290
+ }
1291
+ if (this.axisConfig.showTick && t >= this.axisConfig.tickLength && (this.showTick = !0, t -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1292
+ let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), n = e.height + this.axisConfig.titlePadding * 2;
1293
+ this.titleTextHeight = e.height, n <= t && (t -= n, this.showTitle = !0);
1294
+ }
1295
+ this.boundingRect.width = e.width, this.boundingRect.height = e.height - t;
1296
+ }
1297
+ calculateSpaceIfDrawnVertical(e) {
1298
+ let t = e.width;
1299
+ if (this.axisConfig.showAxisLine && t > this.axisConfig.axisLineWidth && (t -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1300
+ let n = this.getLabelDimension(), r = D * e.height;
1301
+ this.outerPadding = Math.min(n.height / 2, r);
1302
+ let i = n.width + this.axisConfig.labelPadding * 2;
1303
+ i <= t && (t -= i, this.showLabel = !0);
1304
+ }
1305
+ if (this.axisConfig.showTick && t >= this.axisConfig.tickLength && (this.showTick = !0, t -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1306
+ let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), n = e.height + this.axisConfig.titlePadding * 2;
1307
+ this.titleTextHeight = e.height, n <= t && (t -= n, this.showTitle = !0);
1308
+ }
1309
+ this.boundingRect.width = e.width - t, this.boundingRect.height = e.height;
1310
+ }
1311
+ calculateSpace(e) {
1312
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(e) : this.calculateSpaceIfDrawnHorizontally(e), this.recalculateScale(), {
1313
+ width: this.boundingRect.width,
1314
+ height: this.boundingRect.height
1315
+ };
1316
+ }
1317
+ setBoundingBoxXY(e) {
1318
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1319
+ }
1320
+ calculateOffsetByRotation(e) {
1321
+ let t = this.normalizedLabelRotationInRad;
1322
+ return t === 0 ? 0 : Math.sin(t) * this.getLabelDimension()[e] / 2;
1323
+ }
1324
+ getDrawableElementsForLeftAxis() {
1325
+ let e = [];
1326
+ if (this.showAxisLine) {
1327
+ let t = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
1328
+ e.push({
1329
+ type: "path",
1330
+ groupTexts: ["left-axis", "axisl-line"],
1331
+ data: [{
1332
+ path: `M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y + this.boundingRect.height} `,
1333
+ strokeFill: this.axisThemeConfig.axisLineColor,
1334
+ strokeWidth: this.axisConfig.axisLineWidth
1335
+ }]
1336
+ });
1337
+ }
1338
+ if (this.showLabel && e.push({
1339
+ type: "text",
1340
+ groupTexts: ["left-axis", "label"],
1341
+ data: this.getTickValues().map((e) => ({
1342
+ text: e.toString(),
1343
+ x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
1344
+ y: this.getScaleValue(e),
1345
+ fill: this.axisThemeConfig.labelColor,
1346
+ fontSize: this.axisConfig.labelFontSize,
1347
+ rotation: 0,
1348
+ verticalPos: "middle",
1349
+ horizontalPos: "right"
1350
+ }))
1351
+ }), this.showTick) {
1352
+ let t = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1353
+ e.push({
1354
+ type: "path",
1355
+ groupTexts: ["left-axis", "ticks"],
1356
+ data: this.getTickValues().map((e) => ({
1357
+ path: `M ${t},${this.getScaleValue(e)} L ${t - this.axisConfig.tickLength},${this.getScaleValue(e)}`,
1358
+ strokeFill: this.axisThemeConfig.tickColor,
1359
+ strokeWidth: this.axisConfig.tickWidth
1360
+ }))
1361
+ });
1362
+ }
1363
+ return this.showTitle && e.push({
1364
+ type: "text",
1365
+ groupTexts: ["left-axis", "title"],
1366
+ data: [{
1367
+ text: this.title,
1368
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
1369
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1370
+ fill: this.axisThemeConfig.titleColor,
1371
+ fontSize: this.axisConfig.titleFontSize,
1372
+ rotation: 270,
1373
+ verticalPos: "top",
1374
+ horizontalPos: "center"
1375
+ }]
1376
+ }), e;
1377
+ }
1378
+ getDrawableElementsForBottomAxis() {
1379
+ let e = [];
1380
+ if (this.showAxisLine) {
1381
+ let t = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
1382
+ e.push({
1383
+ type: "path",
1384
+ groupTexts: ["bottom-axis", "axis-line"],
1385
+ data: [{
1386
+ path: `M ${this.boundingRect.x},${t} L ${this.boundingRect.x + this.boundingRect.width},${t}`,
1387
+ strokeFill: this.axisThemeConfig.axisLineColor,
1388
+ strokeWidth: this.axisConfig.axisLineWidth
1389
+ }]
1390
+ });
1391
+ }
1392
+ if (this.showLabel && e.push({
1393
+ type: "text",
1394
+ groupTexts: ["bottom-axis", "label"],
1395
+ data: this.getTickValues().map((e) => ({
1396
+ text: e.toString(),
1397
+ x: this.getScaleValue(e) + this.calculateOffsetByRotation("height"),
1398
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0) + Math.abs(this.calculateOffsetByRotation("width")),
1399
+ fill: this.axisThemeConfig.labelColor,
1400
+ fontSize: this.axisConfig.labelFontSize,
1401
+ rotation: this.normalizedLabelRotationInRad * 180 / Math.PI,
1402
+ verticalPos: "top",
1403
+ horizontalPos: "center"
1404
+ }))
1405
+ }), this.showTick) {
1406
+ let t = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1407
+ e.push({
1408
+ type: "path",
1409
+ groupTexts: ["bottom-axis", "ticks"],
1410
+ data: this.getTickValues().map((e) => ({
1411
+ path: `M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t + this.axisConfig.tickLength}`,
1412
+ strokeFill: this.axisThemeConfig.tickColor,
1413
+ strokeWidth: this.axisConfig.tickWidth
1414
+ }))
1415
+ });
1416
+ }
1417
+ return this.showTitle && e.push({
1418
+ type: "text",
1419
+ groupTexts: ["bottom-axis", "title"],
1420
+ data: [{
1421
+ text: this.title,
1422
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
1423
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
1424
+ fill: this.axisThemeConfig.titleColor,
1425
+ fontSize: this.axisConfig.titleFontSize,
1426
+ rotation: 0,
1427
+ verticalPos: "top",
1428
+ horizontalPos: "center"
1429
+ }]
1430
+ }), e;
1431
+ }
1432
+ getDrawableElementsForTopAxis() {
1433
+ let e = [];
1434
+ if (this.showAxisLine) {
1435
+ let t = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
1436
+ e.push({
1437
+ type: "path",
1438
+ groupTexts: ["top-axis", "axis-line"],
1439
+ data: [{
1440
+ path: `M ${this.boundingRect.x},${t} L ${this.boundingRect.x + this.boundingRect.width},${t}`,
1441
+ strokeFill: this.axisThemeConfig.axisLineColor,
1442
+ strokeWidth: this.axisConfig.axisLineWidth
1443
+ }]
1444
+ });
1445
+ }
1446
+ if (this.showLabel && e.push({
1447
+ type: "text",
1448
+ groupTexts: ["top-axis", "label"],
1449
+ data: this.getTickValues().map((e) => ({
1450
+ text: e.toString(),
1451
+ x: this.getScaleValue(e),
1452
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
1453
+ fill: this.axisThemeConfig.labelColor,
1454
+ fontSize: this.axisConfig.labelFontSize,
1455
+ rotation: 0,
1456
+ verticalPos: "top",
1457
+ horizontalPos: "center"
1458
+ }))
1459
+ }), this.showTick) {
1460
+ let t = this.boundingRect.y;
1461
+ e.push({
1462
+ type: "path",
1463
+ groupTexts: ["top-axis", "ticks"],
1464
+ data: this.getTickValues().map((e) => ({
1465
+ path: `M ${this.getScaleValue(e)},${t + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(e)},${t + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
1466
+ strokeFill: this.axisThemeConfig.tickColor,
1467
+ strokeWidth: this.axisConfig.tickWidth
1468
+ }))
1469
+ });
1470
+ }
1471
+ return this.showTitle && e.push({
1472
+ type: "text",
1473
+ groupTexts: ["top-axis", "title"],
1474
+ data: [{
1475
+ text: this.title,
1476
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1477
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
1478
+ fill: this.axisThemeConfig.titleColor,
1479
+ fontSize: this.axisConfig.titleFontSize,
1480
+ rotation: 0,
1481
+ verticalPos: "top",
1482
+ horizontalPos: "center"
1483
+ }]
1484
+ }), e;
1485
+ }
1486
+ getDrawableElements() {
1487
+ if (this.axisPosition === "left") return this.getDrawableElementsForLeftAxis();
1488
+ if (this.axisPosition === "right") throw Error("Drawing of right axis is not implemented");
1489
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
1490
+ }
1491
+ }, k = class extends O {
1492
+ static {
1493
+ a(this, "BandAxis");
1494
+ }
1495
+ constructor(t, n, r, i, a) {
1496
+ super(t, i, a, n), this.categories = r, this.scale = e().domain(this.categories).range(this.getRange());
1497
+ }
1498
+ setRange(e) {
1499
+ super.setRange(e);
1500
+ }
1501
+ recalculateScale() {
1502
+ this.scale = e().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5), r.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
1503
+ }
1504
+ getTickValues() {
1505
+ return this.categories;
1506
+ }
1507
+ getScaleValue(e) {
1508
+ return this.scale(e) ?? this.getRange()[0];
1509
+ }
1510
+ }, A = class extends O {
1511
+ static {
1512
+ a(this, "LinearAxis");
1513
+ }
1514
+ constructor(e, n, r, i, a) {
1515
+ super(e, i, a, n), this.domain = r, this.scale = t().domain(this.domain).range(this.getRange());
1516
+ }
1517
+ getTickValues() {
1518
+ return this.scale.ticks();
1519
+ }
1520
+ recalculateScale() {
1521
+ let e = [...this.domain];
1522
+ this.axisPosition === "left" && e.reverse(), this.scale = t().domain(e).range(this.getRange());
1523
+ }
1524
+ getScaleValue(e) {
1525
+ return this.scale(e);
1526
+ }
1527
+ };
1528
+ function j(e, t, n, r) {
1529
+ let i = new T(r);
1530
+ return C(e) ? new k(t, n, e.categories, e.title, i) : new A(t, n, [e.min, e.max], e.title, i);
1531
+ }
1532
+ a(j, "getAxis");
1533
+ var M = class {
1534
+ constructor(e, t, n, r) {
1535
+ this.textDimensionCalculator = e, this.chartConfig = t, this.chartData = n, this.chartThemeConfig = r, this.boundingRect = {
1536
+ x: 0,
1537
+ y: 0,
1538
+ width: 0,
1539
+ height: 0
1540
+ }, this.showChartTitle = !1;
1541
+ }
1542
+ static {
1543
+ a(this, "ChartTitle");
1544
+ }
1545
+ setBoundingBoxXY(e) {
1546
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1547
+ }
1548
+ calculateSpace(e) {
1549
+ let t = this.textDimensionCalculator.getMaxDimension([this.chartData.title], this.chartConfig.titleFontSize), n = Math.max(t.width, e.width), r = t.height + 2 * this.chartConfig.titlePadding;
1550
+ return t.width <= n && t.height <= r && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = n, this.boundingRect.height = r, this.showChartTitle = !0), {
1551
+ width: this.boundingRect.width,
1552
+ height: this.boundingRect.height
1553
+ };
1554
+ }
1555
+ getDrawableElements() {
1556
+ let e = [];
1557
+ return this.showChartTitle && e.push({
1558
+ groupTexts: ["chart-title"],
1559
+ type: "text",
1560
+ data: [{
1561
+ fontSize: this.chartConfig.titleFontSize,
1562
+ text: this.chartData.title,
1563
+ verticalPos: "middle",
1564
+ horizontalPos: "center",
1565
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1566
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1567
+ fill: this.chartThemeConfig.titleColor,
1568
+ rotation: 0
1569
+ }]
1570
+ }), e;
1571
+ }
1572
+ };
1573
+ function N(e, t, n, r) {
1574
+ return new M(new T(r), e, t, n);
1575
+ }
1576
+ a(N, "getChartTitleComponent");
1577
+ var ee = .75, te = .5, ne = .35;
1578
+ function P(e) {
1579
+ return {
1580
+ fontSize: e,
1581
+ markerSize: e * ee,
1582
+ markerSpacing: e * ne,
1583
+ itemSpacing: e * te
1584
+ };
1585
+ }
1586
+ a(P, "getLegendLayout");
1587
+ var re = class {
1588
+ constructor(e, t, n, r) {
1589
+ this.textDimensionCalculator = e, this.chartConfig = t, this.chartData = n, this.chartThemeConfig = r, this.boundingRect = {
1590
+ x: 0,
1591
+ y: 0,
1592
+ width: 0,
1593
+ height: 0
1594
+ }, this.visiblePlots = [];
1595
+ }
1596
+ static {
1597
+ a(this, "ChartLegend");
1598
+ }
1599
+ setBoundingBoxXY(e) {
1600
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1601
+ }
1602
+ calculateSpace(e) {
1603
+ if (this.visiblePlots = this.chartConfig.showLegend ? this.chartData.plots.filter((e) => e.title) : [], this.visiblePlots.length === 0) return this.boundingRect.width = 0, this.boundingRect.height = 0, {
1604
+ width: 0,
1605
+ height: 0
1606
+ };
1607
+ let { fontSize: t, markerSize: n, markerSpacing: r, itemSpacing: i } = P(this.chartConfig.legendFontSize), a = this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((e) => e.title), t), o = this.chartConfig.legendPadding * 2 + n + r + a.width, s = this.chartConfig.legendPadding * 2 + this.visiblePlots.length * t + (this.visiblePlots.length - 1) * i;
1608
+ return o <= e.width && s <= e.height ? (this.boundingRect.width = o, this.boundingRect.height = s) : (this.visiblePlots = [], this.boundingRect.width = 0, this.boundingRect.height = 0), {
1609
+ width: this.boundingRect.width,
1610
+ height: this.boundingRect.height
1611
+ };
1612
+ }
1613
+ getDrawableElements() {
1614
+ if (this.visiblePlots.length === 0) return [];
1615
+ let { fontSize: e, markerSize: t, markerSpacing: n, itemSpacing: r } = P(this.chartConfig.legendFontSize), i = e + r, a = this.boundingRect.x + this.chartConfig.legendPadding, o = this.boundingRect.y + this.chartConfig.legendPadding, s = [], c = [];
1616
+ for (let [e, n] of this.visiblePlots.entries()) if (S(n)) s.push({
1617
+ x: a,
1618
+ y: o + e * i,
1619
+ width: t,
1620
+ height: t,
1621
+ fill: n.fill,
1622
+ strokeFill: n.fill,
1623
+ strokeWidth: 0
1624
+ });
1625
+ else {
1626
+ let r = o + e * i + t / 2;
1627
+ c.push({
1628
+ path: `M ${a},${r} L ${a + t},${r}`,
1629
+ strokeFill: n.strokeFill,
1630
+ strokeWidth: n.strokeWidth
1631
+ });
1632
+ }
1633
+ return [
1634
+ {
1635
+ groupTexts: ["legend", "markers"],
1636
+ type: "rect",
1637
+ data: s
1638
+ },
1639
+ {
1640
+ groupTexts: ["legend", "markers"],
1641
+ type: "path",
1642
+ data: c
1643
+ },
1644
+ {
1645
+ groupTexts: ["legend", "label"],
1646
+ type: "text",
1647
+ data: this.visiblePlots.map((r, s) => ({
1648
+ text: r.title,
1649
+ x: a + t + n,
1650
+ y: o + s * i + t / 2,
1651
+ fill: this.chartThemeConfig.legendTextColor,
1652
+ fontSize: e,
1653
+ rotation: 0,
1654
+ verticalPos: "middle",
1655
+ horizontalPos: "left"
1656
+ }))
1657
+ }
1658
+ ];
1659
+ }
1660
+ };
1661
+ function F(e, t, n, r) {
1662
+ return new re(new T(r), e, t, n);
1663
+ }
1664
+ a(F, "getChartLegendComponent");
1665
+ var ie = class {
1666
+ constructor(e, t, n, r, i) {
1667
+ this.plotData = e, this.xAxis = t, this.yAxis = n, this.orientation = r, this.plotIndex = i;
1668
+ }
1669
+ static {
1670
+ a(this, "LinePlot");
1671
+ }
1672
+ getDrawableElement() {
1673
+ let e = this.plotData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), t;
1674
+ if (t = this.orientation === "horizontal" ? n().y((e) => e[0]).x((e) => e[1])(e) : n().x((e) => e[0]).y((e) => e[1])(e), !t) return [];
1675
+ let r = [{
1676
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
1677
+ type: "path",
1678
+ data: [{
1679
+ path: t,
1680
+ strokeFill: this.plotData.strokeFill,
1681
+ strokeWidth: this.plotData.strokeWidth
1682
+ }]
1683
+ }];
1684
+ if (this.plotData.pointLabels && this.plotData.pointLabels.length > 0) {
1685
+ let t = [];
1686
+ for (let [n, [r, i]] of e.entries()) {
1687
+ let e = this.plotData.pointLabels[n];
1688
+ e && (this.orientation === "horizontal" ? t.push({
1689
+ x: i + 10,
1690
+ y: r,
1691
+ text: e,
1692
+ fill: this.plotData.strokeFill,
1693
+ verticalPos: "middle",
1694
+ horizontalPos: "left",
1695
+ fontSize: 12,
1696
+ rotation: 0
1697
+ }) : t.push({
1698
+ x: r,
1699
+ y: i - 10,
1700
+ text: e,
1701
+ fill: this.plotData.strokeFill,
1702
+ verticalPos: "middle",
1703
+ horizontalPos: "center",
1704
+ fontSize: 12,
1705
+ rotation: 0
1706
+ }));
1707
+ }
1708
+ t.length > 0 && r.push({
1709
+ groupTexts: [
1710
+ "plot",
1711
+ `line-plot-${this.plotIndex}`,
1712
+ "labels"
1713
+ ],
1714
+ type: "text",
1715
+ data: t
1716
+ });
1717
+ }
1718
+ return r;
1719
+ }
1720
+ }, ae = class {
1721
+ constructor(e, t, n, r, i, a) {
1722
+ this.barData = e, this.boundingRect = t, this.xAxis = n, this.yAxis = r, this.orientation = i, this.plotIndex = a;
1723
+ }
1724
+ static {
1725
+ a(this, "BarPlot");
1726
+ }
1727
+ getDrawableElement() {
1728
+ let e = this.barData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), t = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * .95, n = t / 2;
1729
+ return this.orientation === "horizontal" ? [{
1730
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1731
+ type: "rect",
1732
+ data: e.map((e) => ({
1733
+ x: this.boundingRect.x,
1734
+ y: e[0] - n,
1735
+ height: t,
1736
+ width: e[1] - this.boundingRect.x,
1737
+ fill: this.barData.fill,
1738
+ strokeWidth: 0,
1739
+ strokeFill: this.barData.fill
1740
+ }))
1741
+ }] : [{
1742
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1743
+ type: "rect",
1744
+ data: e.map((e) => ({
1745
+ x: e[0] - n,
1746
+ y: e[1],
1747
+ width: t,
1748
+ height: this.boundingRect.y + this.boundingRect.height - e[1],
1749
+ fill: this.barData.fill,
1750
+ strokeWidth: 0,
1751
+ strokeFill: this.barData.fill
1752
+ }))
1753
+ }];
1754
+ }
1755
+ }, oe = class {
1756
+ constructor(e, t, n) {
1757
+ this.chartConfig = e, this.chartData = t, this.chartThemeConfig = n, this.boundingRect = {
1758
+ x: 0,
1759
+ y: 0,
1760
+ width: 0,
1761
+ height: 0
1762
+ };
1763
+ }
1764
+ static {
1765
+ a(this, "BasePlot");
1766
+ }
1767
+ setAxes(e, t) {
1768
+ this.xAxis = e, this.yAxis = t;
1769
+ }
1770
+ setBoundingBoxXY(e) {
1771
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1772
+ }
1773
+ calculateSpace(e) {
1774
+ return this.boundingRect.width = e.width, this.boundingRect.height = e.height, {
1775
+ width: this.boundingRect.width,
1776
+ height: this.boundingRect.height
1777
+ };
1778
+ }
1779
+ getDrawableElements() {
1780
+ if (!(this.xAxis && this.yAxis)) throw Error("Axes must be passed to render Plots");
1781
+ let e = [];
1782
+ for (let [t, n] of this.chartData.plots.entries()) switch (n.type) {
1783
+ case "line":
1784
+ {
1785
+ let r = new ie(n, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, t);
1786
+ e.push(...r.getDrawableElement());
1787
+ }
1788
+ break;
1789
+ case "bar":
1790
+ {
1791
+ let r = new ae(n, this.boundingRect, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, t);
1792
+ e.push(...r.getDrawableElement());
1793
+ }
1794
+ break;
1795
+ }
1796
+ return e;
1797
+ }
1798
+ };
1799
+ function I(e, t, n) {
1800
+ return new oe(e, t, n);
1801
+ }
1802
+ a(I, "getPlotComponent");
1803
+ var se = class {
1804
+ constructor(e, t, n, r) {
1805
+ this.chartConfig = e, this.chartData = t, this.componentStore = {
1806
+ title: N(e, t, n, r),
1807
+ plot: I(e, t, n),
1808
+ legend: F(e, t, n, r),
1809
+ xAxis: j(t.xAxis, e.xAxis, {
1810
+ titleColor: n.xAxisTitleColor,
1811
+ labelColor: n.xAxisLabelColor,
1812
+ tickColor: n.xAxisTickColor,
1813
+ axisLineColor: n.xAxisLineColor
1814
+ }, r),
1815
+ yAxis: j(t.yAxis, e.yAxis, {
1816
+ titleColor: n.yAxisTitleColor,
1817
+ labelColor: n.yAxisLabelColor,
1818
+ tickColor: n.yAxisTickColor,
1819
+ axisLineColor: n.yAxisLineColor
1820
+ }, r)
1821
+ };
1822
+ }
1823
+ static {
1824
+ a(this, "Orchestrator");
1825
+ }
1826
+ calculateVerticalSpace() {
1827
+ let e = this.chartConfig.width, t = this.chartConfig.height, n = 0, r = 0, i = {
1828
+ width: 0,
1829
+ height: 0
1830
+ }, a = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), s = this.componentStore.plot.calculateSpace({
1831
+ width: a,
1832
+ height: o
1833
+ });
1834
+ e -= s.width, t -= s.height, s = this.componentStore.title.calculateSpace({
1835
+ width: this.chartConfig.width,
1836
+ height: t
1837
+ }), r = s.height, t -= s.height, this.componentStore.xAxis.setAxisPosition("bottom"), s = this.componentStore.xAxis.calculateSpace({
1838
+ width: e,
1839
+ height: t
1840
+ }), t -= s.height, this.componentStore.yAxis.setAxisPosition("left"), s = this.componentStore.yAxis.calculateSpace({
1841
+ width: e,
1842
+ height: t
1843
+ }), n = s.width, e -= s.width, i = this.componentStore.legend.calculateSpace({
1844
+ width: e,
1845
+ height: o
1846
+ }), e -= i.width, e > 0 && (a += e, e = 0), t > 0 && (o += t, t = 0), this.componentStore.plot.calculateSpace({
1847
+ width: a,
1848
+ height: o
1849
+ }), this.componentStore.plot.setBoundingBoxXY({
1850
+ x: n,
1851
+ y: r
1852
+ }), this.componentStore.legend.setBoundingBoxXY({
1853
+ x: n + a,
1854
+ y: r + Math.max((o - i.height) / 2, 0)
1855
+ }), this.componentStore.xAxis.setRange([n, n + a]), this.componentStore.xAxis.setBoundingBoxXY({
1856
+ x: n,
1857
+ y: r + o
1858
+ }), this.componentStore.yAxis.setRange([r, r + o]), this.componentStore.yAxis.setBoundingBoxXY({
1859
+ x: 0,
1860
+ y: r
1861
+ }), this.chartData.plots.some((e) => S(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1862
+ }
1863
+ calculateHorizontalSpace() {
1864
+ let e = this.chartConfig.width, t = this.chartConfig.height, n = 0, r = 0, i = 0, a = {
1865
+ width: 0,
1866
+ height: 0
1867
+ }, o = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), s = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), c = this.componentStore.plot.calculateSpace({
1868
+ width: o,
1869
+ height: s
1870
+ });
1871
+ e -= c.width, t -= c.height, c = this.componentStore.title.calculateSpace({
1872
+ width: this.chartConfig.width,
1873
+ height: t
1874
+ }), n = c.height, t -= c.height, this.componentStore.xAxis.setAxisPosition("left"), c = this.componentStore.xAxis.calculateSpace({
1875
+ width: e,
1876
+ height: t
1877
+ }), e -= c.width, r = c.width, this.componentStore.yAxis.setAxisPosition("top"), c = this.componentStore.yAxis.calculateSpace({
1878
+ width: e,
1879
+ height: t
1880
+ }), t -= c.height, i = n + c.height, a = this.componentStore.legend.calculateSpace({
1881
+ width: e,
1882
+ height: s
1883
+ }), e -= a.width, e > 0 && (o += e, e = 0), t > 0 && (s += t, t = 0), this.componentStore.plot.calculateSpace({
1884
+ width: o,
1885
+ height: s
1886
+ }), this.componentStore.plot.setBoundingBoxXY({
1887
+ x: r,
1888
+ y: i
1889
+ }), this.componentStore.legend.setBoundingBoxXY({
1890
+ x: r + o,
1891
+ y: i + Math.max((s - a.height) / 2, 0)
1892
+ }), this.componentStore.yAxis.setRange([r, r + o]), this.componentStore.yAxis.setBoundingBoxXY({
1893
+ x: r,
1894
+ y: n
1895
+ }), this.componentStore.xAxis.setRange([i, i + s]), this.componentStore.xAxis.setBoundingBoxXY({
1896
+ x: 0,
1897
+ y: i
1898
+ }), this.chartData.plots.some((e) => S(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1899
+ }
1900
+ calculateSpace() {
1901
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1902
+ }
1903
+ getDrawableElement() {
1904
+ this.calculateSpace();
1905
+ let e = [];
1906
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1907
+ for (let t of Object.values(this.componentStore)) e.push(...t.getDrawableElements());
1908
+ return e;
1909
+ }
1910
+ }, ce = class {
1911
+ static {
1912
+ a(this, "XYChartBuilder");
1913
+ }
1914
+ static build(e, t, n, r) {
1915
+ return new se(e, t, n, r).getDrawableElement();
1916
+ }
1917
+ }, L = 0, le, R = G(), z = W(), B = K(), V = z.plotColorPalette.split(",").map((e) => e.trim()), H = !1, U = !1;
1918
+ function W() {
1919
+ let e = o(), t = u();
1920
+ return i(e.xyChart, t.themeVariables.xyChart);
1921
+ }
1922
+ a(W, "getChartDefaultThemeConfig");
1923
+ function G() {
1924
+ let e = u();
1925
+ return i(f.xyChart, e.xyChart);
1926
+ }
1927
+ a(G, "getChartDefaultConfig");
1928
+ function K() {
1929
+ return {
1930
+ yAxis: {
1931
+ type: "linear",
1932
+ title: "",
1933
+ min: Infinity,
1934
+ max: -Infinity
1935
+ },
1936
+ xAxis: {
1937
+ type: "band",
1938
+ title: "",
1939
+ categories: []
1940
+ },
1941
+ title: "",
1942
+ plots: []
1943
+ };
1944
+ }
1945
+ a(K, "getChartDefaultData");
1946
+ function q(e) {
1947
+ let t = u();
1948
+ return _(e.trim(), t);
1949
+ }
1950
+ a(q, "textSanitizer");
1951
+ function J(e) {
1952
+ le = e;
1953
+ }
1954
+ a(J, "setTmpSVGG");
1955
+ function Y(e) {
1956
+ e === "horizontal" ? R.chartOrientation = "horizontal" : R.chartOrientation = "vertical";
1957
+ }
1958
+ a(Y, "setOrientation");
1959
+ function ue(e) {
1960
+ B.xAxis.title = q(e.text);
1961
+ }
1962
+ a(ue, "setXAxisTitle");
1963
+ function X(e, t) {
1964
+ B.xAxis = {
1965
+ type: "linear",
1966
+ title: B.xAxis.title,
1967
+ min: e,
1968
+ max: t
1969
+ }, H = !0;
1970
+ }
1971
+ a(X, "setXAxisRangeData");
1972
+ function de(e) {
1973
+ B.xAxis = {
1974
+ type: "band",
1975
+ title: B.xAxis.title,
1976
+ categories: e.map((e) => q(e.text))
1977
+ }, H = !0;
1978
+ }
1979
+ a(de, "setXAxisBand");
1980
+ function fe(e) {
1981
+ B.yAxis.title = q(e.text);
1982
+ }
1983
+ a(fe, "setYAxisTitle");
1984
+ function pe(e, t) {
1985
+ B.yAxis = {
1986
+ type: "linear",
1987
+ title: B.yAxis.title,
1988
+ min: e,
1989
+ max: t
1990
+ }, U = !0;
1991
+ }
1992
+ a(pe, "setYAxisRangeData");
1993
+ function me(e) {
1994
+ let t = Math.min(...e), n = Math.max(...e), r = w(B.yAxis) ? B.yAxis.min : Infinity, i = w(B.yAxis) ? B.yAxis.max : -Infinity;
1995
+ B.yAxis = {
1996
+ type: "linear",
1997
+ title: B.yAxis.title,
1998
+ min: Math.min(r, t),
1999
+ max: Math.max(i, n)
2000
+ };
2001
+ }
2002
+ a(me, "setYAxisRangeFromPlotData");
2003
+ function Z(e) {
2004
+ let t = [];
2005
+ if (e.length === 0) return t;
2006
+ if (!H) {
2007
+ let t = w(B.xAxis) ? B.xAxis.min : Infinity, n = w(B.xAxis) ? B.xAxis.max : -Infinity;
2008
+ X(Math.min(t, 1), Math.max(n, e.length));
2009
+ }
2010
+ if (C(B.xAxis) && e.length > B.xAxis.categories.length && (e = e.slice(0, B.xAxis.categories.length)), U || me(e), C(B.xAxis) && (t = B.xAxis.categories.map((t, n) => [t, e[n]])), w(B.xAxis)) {
2011
+ let n = B.xAxis.min, r = B.xAxis.max;
2012
+ if (e.length === 1) t = [[`${n}`, e[0]]];
2013
+ else {
2014
+ let i = (r - n) / (e.length - 1);
2015
+ t = e.map((e, t) => [`${n + t * i}`, e]);
2016
+ }
2017
+ }
2018
+ return t;
2019
+ }
2020
+ a(Z, "transformDataWithoutCategory");
2021
+ function Q(e) {
2022
+ return V[e === 0 ? 0 : e % V.length];
2023
+ }
2024
+ a(Q, "getPlotColorFromPalette");
2025
+ function he(e, t) {
2026
+ let n = t.map((e) => e.value), r = t.map((e) => e.label ? q(e.label) : ""), i = Z(n), a = r.some((e) => e !== "");
2027
+ B.plots.push({
2028
+ type: "line",
2029
+ title: q(e.text),
2030
+ strokeFill: Q(L),
2031
+ strokeWidth: 2,
2032
+ data: i,
2033
+ ...a ? { pointLabels: r } : {}
2034
+ }), L++;
2035
+ }
2036
+ a(he, "setLineData");
2037
+ function ge(e, t) {
2038
+ let n = Z(t.map((e) => e.value));
2039
+ B.plots.push({
2040
+ type: "bar",
2041
+ title: q(e.text),
2042
+ fill: Q(L),
2043
+ data: n
2044
+ }), L++;
2045
+ }
2046
+ a(ge, "setBarData");
2047
+ function $() {
2048
+ if (B.plots.length === 0) throw Error("No Plot to render, please provide a plot with some data");
2049
+ return B.title = h(), ce.build(R, B, z, le);
2050
+ }
2051
+ a($, "getDrawableElem");
2052
+ function _e() {
2053
+ return z;
2054
+ }
2055
+ a(_e, "getChartThemeConfig");
2056
+ function ve() {
2057
+ return R;
2058
+ }
2059
+ a(ve, "getChartConfig");
2060
+ function ye() {
2061
+ return B;
2062
+ }
2063
+ a(ye, "getXYChartData");
2064
+ var be = {
2065
+ parser: x,
2066
+ db: {
2067
+ getDrawableElem: $,
2068
+ clear: /* @__PURE__ */ a(function() {
2069
+ l(), L = 0, R = G(), B = K(), z = W(), V = z.plotColorPalette.split(",").map((e) => e.trim()), H = !1, U = !1;
2070
+ }, "clear"),
2071
+ setAccTitle: c,
2072
+ getAccTitle: g,
2073
+ setDiagramTitle: p,
2074
+ getDiagramTitle: h,
2075
+ getAccDescription: m,
2076
+ setAccDescription: s,
2077
+ setOrientation: Y,
2078
+ setXAxisTitle: ue,
2079
+ setXAxisRangeData: X,
2080
+ setXAxisBand: de,
2081
+ setYAxisTitle: fe,
2082
+ setYAxisRangeData: pe,
2083
+ setLineData: he,
2084
+ setBarData: ge,
2085
+ setTmpSVGG: J,
2086
+ getChartThemeConfig: _e,
2087
+ getChartConfig: ve,
2088
+ getXYChartData: ye
2089
+ },
2090
+ renderer: { draw: /* @__PURE__ */ a((e, t, n, i) => {
2091
+ let o = i.db, s = o.getChartThemeConfig(), c = o.getChartConfig(), l = o.getXYChartData().plots[0].data.map((e) => e[1]);
2092
+ function u(e) {
2093
+ return e === "top" ? "text-before-edge" : "middle";
2094
+ }
2095
+ a(u, "getDominantBaseLine");
2096
+ function f(e) {
2097
+ return e === "left" ? "start" : e === "right" ? "end" : "middle";
2098
+ }
2099
+ a(f, "getTextAnchor");
2100
+ function p(e) {
2101
+ return `translate(${e.x}, ${e.y}) rotate(${e.rotation || 0})`;
2102
+ }
2103
+ a(p, "getTextTransformation"), r.debug("Rendering xychart chart\n" + e);
2104
+ let m = v(t), h = m.append("g").attr("class", "main"), g = h.append("rect").attr("width", c.width).attr("height", c.height).attr("class", "background");
2105
+ d(m, c.height, c.width, !0), m.attr("viewBox", `0 0 ${c.width} ${c.height}`), g.attr("fill", s.backgroundColor), o.setTmpSVGG(m.append("g").attr("class", "mermaid-tmp-group"));
2106
+ let _ = o.getDrawableElem(), y = {};
2107
+ function b(e) {
2108
+ let t = h, n = "";
2109
+ for (let [r] of e.entries()) {
2110
+ let i = h;
2111
+ r > 0 && y[n] && (i = y[n]), n += e[r], t = y[n], t ||= y[n] = i.append("g").attr("class", e[r]);
2112
+ }
2113
+ return t;
2114
+ }
2115
+ a(b, "getGroup");
2116
+ for (let e of _) {
2117
+ if (e.data.length === 0) continue;
2118
+ let t = b(e.groupTexts);
2119
+ switch (e.type) {
2120
+ case "rect":
2121
+ if (t.selectAll("rect").data(e.data).enter().append("rect").attr("x", (e) => e.x).attr("y", (e) => e.y).attr("width", (e) => e.width).attr("height", (e) => e.height).attr("fill", (e) => e.fill).attr("stroke", (e) => e.strokeFill).attr("stroke-width", (e) => e.strokeWidth), c.showDataLabel) {
2122
+ let n = c.showDataLabelOutsideBar;
2123
+ if (c.chartOrientation === "horizontal") {
2124
+ let r = function(e, t) {
2125
+ let { data: n, label: r } = e;
2126
+ return t * r.length * i <= n.width - o;
2127
+ };
2128
+ a(r, "fitsHorizontally");
2129
+ let i = .7, o = 10, c = e.data.map((e, t) => ({
2130
+ data: e,
2131
+ label: l[t].toString()
2132
+ })).filter((e) => e.data.width > 0 && e.data.height > 0), u = c.map((e) => {
2133
+ let { data: t } = e, n = t.height * .7;
2134
+ for (; !r(e, n) && n > 0;) --n;
2135
+ return n;
2136
+ }), d = Math.floor(Math.min(...u)), f = /* @__PURE__ */ a((e) => n ? e.data.x + e.data.width + 10 : e.data.x + e.data.width - 10, "determineLabelXPosition");
2137
+ t.selectAll("text").data(c).enter().append("text").attr("x", f).attr("y", (e) => e.data.y + e.data.height / 2).attr("text-anchor", n ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", s.dataLabelColor).attr("font-size", `${d}px`).text((e) => e.label);
2138
+ } else {
2139
+ let r = function(e, t, n) {
2140
+ let { data: r, label: i } = e, a = t * i.length * .7, o = r.x + r.width / 2, s = o - a / 2, c = o + a / 2, l = s >= r.x && c <= r.x + r.width, u = r.y + n + t <= r.y + r.height;
2141
+ return l && u;
2142
+ };
2143
+ a(r, "fitsInBar");
2144
+ let i = e.data.map((e, t) => ({
2145
+ data: e,
2146
+ label: l[t].toString()
2147
+ })).filter((e) => e.data.width > 0 && e.data.height > 0), o = i.map((e) => {
2148
+ let { data: t, label: n } = e, i = t.width / (n.length * .7);
2149
+ for (; !r(e, i, 10) && i > 0;) --i;
2150
+ return i;
2151
+ }), c = Math.floor(Math.min(...o)), u = /* @__PURE__ */ a((e) => n ? e.data.y - 10 : e.data.y + 10, "determineLabelYPosition");
2152
+ t.selectAll("text").data(i).enter().append("text").attr("x", (e) => e.data.x + e.data.width / 2).attr("y", u).attr("text-anchor", "middle").attr("dominant-baseline", n ? "auto" : "hanging").attr("fill", s.dataLabelColor).attr("font-size", `${c}px`).text((e) => e.label);
2153
+ }
2154
+ }
2155
+ break;
2156
+ case "text":
2157
+ t.selectAll("text").data(e.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (e) => e.fill).attr("font-size", (e) => e.fontSize).attr("dominant-baseline", (e) => u(e.verticalPos)).attr("text-anchor", (e) => f(e.horizontalPos)).attr("transform", (e) => p(e)).text((e) => e.text);
2158
+ break;
2159
+ case "path":
2160
+ t.selectAll("path").data(e.data).enter().append("path").attr("d", (e) => e.path).attr("fill", (e) => e.fill ? e.fill : "none").attr("stroke", (e) => e.strokeFill).attr("stroke-width", (e) => e.strokeWidth);
2161
+ break;
2162
+ }
2163
+ }
2164
+ }, "draw") }
2165
+ };
2166
+ //#endregion
2167
+ export { be as diagram };