@n8n-zengchao/chat 0.62.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 +289 -0
  2. package/dist/App.vue.d.ts +2 -0
  3. package/dist/__stories__/App.stories.d.ts +18 -0
  4. package/dist/__tests__/Input.spec.d.ts +1 -0
  5. package/dist/__tests__/api/generic.spec.d.ts +1 -0
  6. package/dist/__tests__/api/message.spec.d.ts +1 -0
  7. package/dist/__tests__/index.spec.d.ts +1 -0
  8. package/dist/__tests__/plugins/chat.spec.d.ts +1 -0
  9. package/dist/__tests__/plugins/chat.test.d.ts +1 -0
  10. package/dist/__tests__/setup.d.ts +0 -0
  11. package/dist/__tests__/utils/create.d.ts +5 -0
  12. package/dist/__tests__/utils/fetch.d.ts +13 -0
  13. package/dist/__tests__/utils/index.d.ts +3 -0
  14. package/dist/__tests__/utils/selectors.d.ts +12 -0
  15. package/dist/__tests__/utils/streaming.spec.d.ts +1 -0
  16. package/dist/__tests__/utils/streamingHandlers.spec.d.ts +1 -0
  17. package/dist/_basePickBy-aQilsjEs.mjs +106 -0
  18. package/dist/_baseUniq-Agc10qFQ.mjs +232 -0
  19. package/dist/api/generic.d.ts +7 -0
  20. package/dist/api/index.d.ts +2 -0
  21. package/dist/api/message.d.ts +11 -0
  22. package/dist/arc-EhYU_DB1.mjs +79 -0
  23. package/dist/architecture-U656AL7Q-B1STlXpR.mjs +10 -0
  24. package/dist/architectureDiagram-VXUJARFQ-DOVAbXSw.mjs +4054 -0
  25. package/dist/array-B5w981Vk.mjs +5 -0
  26. package/dist/blockDiagram-VD42YOAC-BsX3Fkg3.mjs +3013 -0
  27. package/dist/c4Diagram-YG6GDRKO-B5JaLuX6.mjs +2957 -0
  28. package/dist/channel-CqrIo07y.mjs +4 -0
  29. package/dist/chat.bundle.es.js +37656 -0
  30. package/dist/chat.bundle.umd.js +2784 -0
  31. package/dist/chat.es.js +35738 -0
  32. package/dist/chat.umd.js +2776 -0
  33. package/dist/chunk-4BX2VUAB-dn0RXIrC.mjs +7 -0
  34. package/dist/chunk-55IACEB6-DrIttNoL.mjs +7 -0
  35. package/dist/chunk-76Q3JFCE-D7DMbWeQ.mjs +20 -0
  36. package/dist/chunk-ABZYJK2D-_NXv778f.mjs +2516 -0
  37. package/dist/chunk-ATLVNIR6-CBnG7Ev9.mjs +66 -0
  38. package/dist/chunk-B4BG7PRW-DElmmAse.mjs +3109 -0
  39. package/dist/chunk-CVBHYZKI-kPsSw5G9.mjs +11 -0
  40. package/dist/chunk-DI55MBZ5-Bw6uFFfD.mjs +1995 -0
  41. package/dist/chunk-DZXZ2BO8.mjs +19 -0
  42. package/dist/chunk-EXTU4WIE-DWzncOZf.mjs +8 -0
  43. package/dist/chunk-FMBD7UC4-CQf-nVrj.mjs +4 -0
  44. package/dist/chunk-FPAJGGOC-HRc6DGju.mjs +12254 -0
  45. package/dist/chunk-FWNWRKHM-CGiJVNMo.mjs +57 -0
  46. package/dist/chunk-HN2XXSSU-DMfVdeUE.mjs +75 -0
  47. package/dist/chunk-JA3XYJ7Z-b0Li4NN8.mjs +1834 -0
  48. package/dist/chunk-JZLCHNYA-C_4MLySW.mjs +4862 -0
  49. package/dist/chunk-KS23V3DP-BRKOfbU6.mjs +136 -0
  50. package/dist/chunk-LBM3YZW2-JIQK8wiH.mjs +20 -0
  51. package/dist/chunk-LHMN2FUI-PNCyIUgu.mjs +20 -0
  52. package/dist/chunk-MI3HLSF2-B9GTCmLp.mjs +1146 -0
  53. package/dist/chunk-N4CR4FBY-CjlmnCPD.mjs +40 -0
  54. package/dist/chunk-O7ZBX7Z2-DmJUfqJj.mjs +27 -0
  55. package/dist/chunk-QN33PNHL-nN1zLFSf.mjs +24 -0
  56. package/dist/chunk-QXUST7PY-CY78Btj9.mjs +487 -0
  57. package/dist/chunk-QZHKN3VN-BF5N1pfB.mjs +12 -0
  58. package/dist/chunk-S3R3BYOJ-BhFsv0Go.mjs +1076 -0
  59. package/dist/chunk-S6J4BHB3-BvrWTdbl.mjs +20 -0
  60. package/dist/chunk-T53DSG4Q-XzY06amw.mjs +25 -0
  61. package/dist/chunk-TZMSLE5B-DVmJQ8eg.mjs +57 -0
  62. package/dist/classDiagram-2ON5EDUG-CKxiEVX9.mjs +33 -0
  63. package/dist/classDiagram-v2-WZHVMYZB-sAa_2keq.mjs +33 -0
  64. package/dist/clone-nkGlb0Gn.mjs +8 -0
  65. package/dist/components/Button.vue.d.ts +17 -0
  66. package/dist/components/Chat.vue.d.ts +2 -0
  67. package/dist/components/ChatFile.vue.d.ts +11 -0
  68. package/dist/components/ChatWindow.vue.d.ts +2 -0
  69. package/dist/components/GetStarted.vue.d.ts +2 -0
  70. package/dist/components/GetStartedFooter.vue.d.ts +2 -0
  71. package/dist/components/Input.vue.d.ts +39 -0
  72. package/dist/components/Layout.vue.d.ts +23 -0
  73. package/dist/components/Message.vue.d.ts +39 -0
  74. package/dist/components/MessageTyping.vue.d.ts +76 -0
  75. package/dist/components/MessagesList.vue.d.ts +164 -0
  76. package/dist/components/PoweredBy.vue.d.ts +2 -0
  77. package/dist/components/index.d.ts +10 -0
  78. package/dist/composables/index.d.ts +3 -0
  79. package/dist/composables/useChat.d.ts +2 -0
  80. package/dist/composables/useI18n.d.ts +4 -0
  81. package/dist/composables/useOptions.d.ts +4 -0
  82. package/dist/constants/defaults.d.ts +3 -0
  83. package/dist/constants/index.d.ts +3 -0
  84. package/dist/constants/localStorage.d.ts +2 -0
  85. package/dist/constants/symbols.d.ts +4 -0
  86. package/dist/cose-bilkent-S5V4N54A-1lKG2PUg.mjs +2251 -0
  87. package/dist/cytoscape.esm-Dls1_mGy.mjs +18108 -0
  88. package/dist/dagre-6UL2VRFP-CbWFu9xQ.mjs +300 -0
  89. package/dist/dagre-DEdOheHq.mjs +1385 -0
  90. package/dist/defaultLocale-CyoQm63E.mjs +178 -0
  91. package/dist/diagram-PSM6KHXK-CJcHbrJH.mjs +499 -0
  92. package/dist/diagram-QEK2KX5R-XQ9XOVL4.mjs +228 -0
  93. package/dist/diagram-S2PKOQOG-CmRfaeSf.mjs +146 -0
  94. package/dist/dist-BT0fjU7K.mjs +50 -0
  95. package/dist/erDiagram-Q2GNP2WA-iuoUWHwm.mjs +1603 -0
  96. package/dist/event-buses/chatEventBus.d.ts +1 -0
  97. package/dist/event-buses/index.d.ts +1 -0
  98. package/dist/favicon.ico +0 -0
  99. package/dist/flowDiagram-NV44I4VS-D3GMS8-G.mjs +4132 -0
  100. package/dist/ganttDiagram-LVOFAZNH-DMTZVZDR.mjs +2832 -0
  101. package/dist/gitGraph-F6HP7TQM-CrdUzURw.mjs +10 -0
  102. package/dist/gitGraphDiagram-NY62KEGX-DipP5Fgt.mjs +636 -0
  103. package/dist/graphlib-D9eH5icd.mjs +224 -0
  104. package/dist/index.d.ts +2 -0
  105. package/dist/info-NVLQJR56-C-93Yf3U.mjs +10 -0
  106. package/dist/infoDiagram-F6ZHWCRC-jM50s26K.mjs +33 -0
  107. package/dist/init-CYeu4QfE.mjs +14 -0
  108. package/dist/isArrayLikeObject-BPcFdnyK.mjs +459 -0
  109. package/dist/isUndefined-BvarJ1wS.mjs +374 -0
  110. package/dist/journeyDiagram-XKPGCS4Q-BEEO_0Bh.mjs +885 -0
  111. package/dist/kanban-definition-3W4ZIXB7-B8u_HDmL.mjs +971 -0
  112. package/dist/katex-Dc1vXbUC.mjs +22094 -0
  113. package/dist/line-BJxACIPZ.mjs +31 -0
  114. package/dist/linear-DHHVI-cj.mjs +251 -0
  115. package/dist/math-Byg0NvhS.mjs +9 -0
  116. package/dist/mermaid-parser.core-YT4qvimq.mjs +49 -0
  117. package/dist/mindmap-definition-VGOIOE7T-ah41V88S.mjs +960 -0
  118. package/dist/now-DsJMgI1z.mjs +6 -0
  119. package/dist/ordinal-L0-EVPg8.mjs +62 -0
  120. package/dist/packet-BFZMPI3H-Cs4kRHct.mjs +10 -0
  121. package/dist/path-BcDHwjEr.mjs +80 -0
  122. package/dist/pie-7BOR55EZ-YZ5Xu4o6.mjs +10 -0
  123. package/dist/pieDiagram-ADFJNKIX-CqI33m1a.mjs +174 -0
  124. package/dist/plugins/chat.d.ts +3 -0
  125. package/dist/plugins/index.d.ts +1 -0
  126. package/dist/quadrantDiagram-AYHSOK5B-DDv2X9c1.mjs +1971 -0
  127. package/dist/radar-NHE76QYJ-TpirOFtv.mjs +10 -0
  128. package/dist/requirementDiagram-UZGBJVZJ-DXa77VzO.mjs +2194 -0
  129. package/dist/sankeyDiagram-TZEHDZUN--B9DInJC.mjs +885 -0
  130. package/dist/sequenceDiagram-WL72ISMW-Dqn9jJ3g.mjs +3562 -0
  131. package/dist/src-DdwtiGjk.mjs +1976 -0
  132. package/dist/stateDiagram-FKZM4ZOC-D3eEcVjS.mjs +226 -0
  133. package/dist/stateDiagram-v2-4FDKWEC3-dzwJ4caL.mjs +32 -0
  134. package/dist/style.css +3 -0
  135. package/dist/timeline-definition-IT6M3QCI-z93ry7RN.mjs +831 -0
  136. package/dist/toInteger-1S_4Byef.mjs +36 -0
  137. package/dist/treemap-KMMF4GRG-BlF0Ev1z.mjs +10 -0
  138. package/dist/types/chat.d.ts +13 -0
  139. package/dist/types/index.d.ts +5 -0
  140. package/dist/types/messages.d.ts +17 -0
  141. package/dist/types/options.d.ts +33 -0
  142. package/dist/types/streaming.d.ts +18 -0
  143. package/dist/types/webhook.d.ts +19 -0
  144. package/dist/utils/event-bus.d.ts +8 -0
  145. package/dist/utils/index.d.ts +3 -0
  146. package/dist/utils/mount.d.ts +1 -0
  147. package/dist/utils/streaming.d.ts +26 -0
  148. package/dist/utils/streamingHandlers.d.ts +6 -0
  149. package/dist/utils/utils.d.ts +1 -0
  150. package/dist/xychartDiagram-PRI3JC2R-C3aDcgBz.mjs +2022 -0
  151. package/package.json +78 -0
@@ -0,0 +1,2022 @@
1
+ /*! Package version @n8n/chat@0.62.0 */
2
+ import "./isArrayLikeObject-BPcFdnyK.mjs";
3
+ import { i as cleanAndMerge } from "./chunk-S3R3BYOJ-BhFsv0Go.mjs";
4
+ import { g as log, h as __name } from "./src-DdwtiGjk.mjs";
5
+ import { B as setAccTitle, C as getDiagramTitle, I as sanitizeText, T as getThemeVariables3, U as setDiagramTitle, _ as getAccDescription, a as clear, c as configureSvgSize, d as defaultConfig_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D-_NXv778f.mjs";
6
+ import { t as linear } from "./linear-DHHVI-cj.mjs";
7
+ import { t as ordinal } from "./ordinal-L0-EVPg8.mjs";
8
+ import "./path-BcDHwjEr.mjs";
9
+ import "./defaultLocale-CyoQm63E.mjs";
10
+ import { t as initRange } from "./init-CYeu4QfE.mjs";
11
+ import "./math-Byg0NvhS.mjs";
12
+ import "./array-B5w981Vk.mjs";
13
+ import { t as line_default } from "./line-BJxACIPZ.mjs";
14
+ import { t as selectSvgElement } from "./chunk-EXTU4WIE-DWzncOZf.mjs";
15
+ import "./dist-BT0fjU7K.mjs";
16
+ import { t as computeDimensionOfText } from "./chunk-JA3XYJ7Z-b0Li4NN8.mjs";
17
+ function range(e, S, C) {
18
+ e = +e, S = +S, C = (T = arguments.length) < 2 ? (S = e, e = 0, 1) : T < 3 ? 1 : +C;
19
+ for (var w = -1, T = Math.max(0, Math.ceil((S - e) / C)) | 0, E = Array(T); ++w < T;) E[w] = e + w * C;
20
+ return E;
21
+ }
22
+ function band() {
23
+ var e = ordinal().unknown(void 0), S = e.domain, C = e.range, w = 0, T = 1, E, D, O = !1, k = 0, A = 0, j = .5;
24
+ delete e.unknown;
25
+ function M() {
26
+ var e = S().length, M = T < w, N = M ? T : w, P = M ? w : T;
27
+ E = (P - N) / Math.max(1, e - k + A * 2), O && (E = Math.floor(E)), N += (P - N - E * (e - k)) * j, D = E * (1 - k), O && (N = Math.round(N), D = Math.round(D));
28
+ var F = range(e).map(function(e) {
29
+ return N + E * e;
30
+ });
31
+ return C(M ? F.reverse() : F);
32
+ }
33
+ return e.domain = function(e) {
34
+ return arguments.length ? (S(e), M()) : S();
35
+ }, e.range = function(e) {
36
+ return arguments.length ? ([w, T] = e, w = +w, T = +T, M()) : [w, T];
37
+ }, e.rangeRound = function(e) {
38
+ return [w, T] = e, w = +w, T = +T, O = !0, M();
39
+ }, e.bandwidth = function() {
40
+ return D;
41
+ }, e.step = function() {
42
+ return E;
43
+ }, e.round = function(e) {
44
+ return arguments.length ? (O = !!e, M()) : O;
45
+ }, e.padding = function(e) {
46
+ return arguments.length ? (k = Math.min(1, A = +e), M()) : k;
47
+ }, e.paddingInner = function(e) {
48
+ return arguments.length ? (k = Math.min(1, e), M()) : k;
49
+ }, e.paddingOuter = function(e) {
50
+ return arguments.length ? (A = +e, M()) : A;
51
+ }, e.align = function(e) {
52
+ return arguments.length ? (j = Math.max(0, Math.min(1, e)), M()) : j;
53
+ }, e.copy = function() {
54
+ return band(S(), [w, T]).round(O).paddingInner(k).paddingOuter(A).align(j);
55
+ }, initRange.apply(M(), arguments);
56
+ }
57
+ var parser = (function() {
58
+ var e = /* @__PURE__ */ __name(function(e, S, C, w) {
59
+ for (C ||= {}, w = e.length; w--; C[e[w]] = S);
60
+ return C;
61
+ }, "o"), S = [
62
+ 1,
63
+ 10,
64
+ 12,
65
+ 14,
66
+ 16,
67
+ 18,
68
+ 19,
69
+ 21,
70
+ 23
71
+ ], w = [2, 6], T = [1, 3], E = [1, 5], D = [1, 6], O = [1, 7], k = [
72
+ 1,
73
+ 5,
74
+ 10,
75
+ 12,
76
+ 14,
77
+ 16,
78
+ 18,
79
+ 19,
80
+ 21,
81
+ 23,
82
+ 34,
83
+ 35,
84
+ 36
85
+ ], A = [1, 25], j = [1, 26], M = [1, 28], N = [1, 29], P = [1, 30], F = [1, 31], I = [1, 32], L = [1, 33], R = [1, 34], z = [1, 35], B = [1, 36], V = [1, 37], H = [1, 43], U = [1, 42], W = [1, 47], G = [1, 50], K = [
86
+ 1,
87
+ 10,
88
+ 12,
89
+ 14,
90
+ 16,
91
+ 18,
92
+ 19,
93
+ 21,
94
+ 23,
95
+ 34,
96
+ 35,
97
+ 36
98
+ ], q = [
99
+ 1,
100
+ 10,
101
+ 12,
102
+ 14,
103
+ 16,
104
+ 18,
105
+ 19,
106
+ 21,
107
+ 23,
108
+ 24,
109
+ 26,
110
+ 27,
111
+ 28,
112
+ 34,
113
+ 35,
114
+ 36
115
+ ], J = [
116
+ 1,
117
+ 10,
118
+ 12,
119
+ 14,
120
+ 16,
121
+ 18,
122
+ 19,
123
+ 21,
124
+ 23,
125
+ 24,
126
+ 26,
127
+ 27,
128
+ 28,
129
+ 34,
130
+ 35,
131
+ 36,
132
+ 41,
133
+ 42,
134
+ 43,
135
+ 44,
136
+ 45,
137
+ 46,
138
+ 47,
139
+ 48,
140
+ 49,
141
+ 50
142
+ ], Y = [1, 64], X = {
143
+ trace: /* @__PURE__ */ __name(function() {}, "trace"),
144
+ yy: {},
145
+ symbols_: {
146
+ error: 2,
147
+ start: 3,
148
+ eol: 4,
149
+ XYCHART: 5,
150
+ chartConfig: 6,
151
+ document: 7,
152
+ CHART_ORIENTATION: 8,
153
+ statement: 9,
154
+ title: 10,
155
+ text: 11,
156
+ X_AXIS: 12,
157
+ parseXAxis: 13,
158
+ Y_AXIS: 14,
159
+ parseYAxis: 15,
160
+ LINE: 16,
161
+ plotData: 17,
162
+ BAR: 18,
163
+ acc_title: 19,
164
+ acc_title_value: 20,
165
+ acc_descr: 21,
166
+ acc_descr_value: 22,
167
+ acc_descr_multiline_value: 23,
168
+ SQUARE_BRACES_START: 24,
169
+ commaSeparatedNumbers: 25,
170
+ SQUARE_BRACES_END: 26,
171
+ NUMBER_WITH_DECIMAL: 27,
172
+ COMMA: 28,
173
+ xAxisData: 29,
174
+ bandData: 30,
175
+ ARROW_DELIMITER: 31,
176
+ commaSeparatedTexts: 32,
177
+ yAxisData: 33,
178
+ NEWLINE: 34,
179
+ SEMI: 35,
180
+ EOF: 36,
181
+ alphaNum: 37,
182
+ STR: 38,
183
+ MD_STR: 39,
184
+ alphaNumToken: 40,
185
+ AMP: 41,
186
+ NUM: 42,
187
+ ALPHA: 43,
188
+ PLUS: 44,
189
+ EQUALS: 45,
190
+ MULT: 46,
191
+ DOT: 47,
192
+ BRKT: 48,
193
+ MINUS: 49,
194
+ UNDERSCORE: 50,
195
+ $accept: 0,
196
+ $end: 1
197
+ },
198
+ terminals_: {
199
+ 2: "error",
200
+ 5: "XYCHART",
201
+ 8: "CHART_ORIENTATION",
202
+ 10: "title",
203
+ 12: "X_AXIS",
204
+ 14: "Y_AXIS",
205
+ 16: "LINE",
206
+ 18: "BAR",
207
+ 19: "acc_title",
208
+ 20: "acc_title_value",
209
+ 21: "acc_descr",
210
+ 22: "acc_descr_value",
211
+ 23: "acc_descr_multiline_value",
212
+ 24: "SQUARE_BRACES_START",
213
+ 26: "SQUARE_BRACES_END",
214
+ 27: "NUMBER_WITH_DECIMAL",
215
+ 28: "COMMA",
216
+ 31: "ARROW_DELIMITER",
217
+ 34: "NEWLINE",
218
+ 35: "SEMI",
219
+ 36: "EOF",
220
+ 38: "STR",
221
+ 39: "MD_STR",
222
+ 41: "AMP",
223
+ 42: "NUM",
224
+ 43: "ALPHA",
225
+ 44: "PLUS",
226
+ 45: "EQUALS",
227
+ 46: "MULT",
228
+ 47: "DOT",
229
+ 48: "BRKT",
230
+ 49: "MINUS",
231
+ 50: "UNDERSCORE"
232
+ },
233
+ productions_: [
234
+ 0,
235
+ [3, 2],
236
+ [3, 3],
237
+ [3, 2],
238
+ [3, 1],
239
+ [6, 1],
240
+ [7, 0],
241
+ [7, 2],
242
+ [9, 2],
243
+ [9, 2],
244
+ [9, 2],
245
+ [9, 2],
246
+ [9, 2],
247
+ [9, 3],
248
+ [9, 2],
249
+ [9, 3],
250
+ [9, 2],
251
+ [9, 2],
252
+ [9, 1],
253
+ [17, 3],
254
+ [25, 3],
255
+ [25, 1],
256
+ [13, 1],
257
+ [13, 2],
258
+ [13, 1],
259
+ [29, 1],
260
+ [29, 3],
261
+ [30, 3],
262
+ [32, 3],
263
+ [32, 1],
264
+ [15, 1],
265
+ [15, 2],
266
+ [15, 1],
267
+ [33, 3],
268
+ [4, 1],
269
+ [4, 1],
270
+ [4, 1],
271
+ [11, 1],
272
+ [11, 1],
273
+ [11, 1],
274
+ [37, 1],
275
+ [37, 2],
276
+ [40, 1],
277
+ [40, 1],
278
+ [40, 1],
279
+ [40, 1],
280
+ [40, 1],
281
+ [40, 1],
282
+ [40, 1],
283
+ [40, 1],
284
+ [40, 1],
285
+ [40, 1]
286
+ ],
287
+ performAction: /* @__PURE__ */ __name(function(e, S, C, w, T, E, D) {
288
+ var O = E.length - 1;
289
+ switch (T) {
290
+ case 5:
291
+ w.setOrientation(E[O]);
292
+ break;
293
+ case 9:
294
+ w.setDiagramTitle(E[O].text.trim());
295
+ break;
296
+ case 12:
297
+ w.setLineData({
298
+ text: "",
299
+ type: "text"
300
+ }, E[O]);
301
+ break;
302
+ case 13:
303
+ w.setLineData(E[O - 1], E[O]);
304
+ break;
305
+ case 14:
306
+ w.setBarData({
307
+ text: "",
308
+ type: "text"
309
+ }, E[O]);
310
+ break;
311
+ case 15:
312
+ w.setBarData(E[O - 1], E[O]);
313
+ break;
314
+ case 16:
315
+ this.$ = E[O].trim(), w.setAccTitle(this.$);
316
+ break;
317
+ case 17:
318
+ case 18:
319
+ this.$ = E[O].trim(), w.setAccDescription(this.$);
320
+ break;
321
+ case 19:
322
+ this.$ = E[O - 1];
323
+ break;
324
+ case 20:
325
+ this.$ = [Number(E[O - 2]), ...E[O]];
326
+ break;
327
+ case 21:
328
+ this.$ = [Number(E[O])];
329
+ break;
330
+ case 22:
331
+ w.setXAxisTitle(E[O]);
332
+ break;
333
+ case 23:
334
+ w.setXAxisTitle(E[O - 1]);
335
+ break;
336
+ case 24:
337
+ w.setXAxisTitle({
338
+ type: "text",
339
+ text: ""
340
+ });
341
+ break;
342
+ case 25:
343
+ w.setXAxisBand(E[O]);
344
+ break;
345
+ case 26:
346
+ w.setXAxisRangeData(Number(E[O - 2]), Number(E[O]));
347
+ break;
348
+ case 27:
349
+ this.$ = E[O - 1];
350
+ break;
351
+ case 28:
352
+ this.$ = [E[O - 2], ...E[O]];
353
+ break;
354
+ case 29:
355
+ this.$ = [E[O]];
356
+ break;
357
+ case 30:
358
+ w.setYAxisTitle(E[O]);
359
+ break;
360
+ case 31:
361
+ w.setYAxisTitle(E[O - 1]);
362
+ break;
363
+ case 32:
364
+ w.setYAxisTitle({
365
+ type: "text",
366
+ text: ""
367
+ });
368
+ break;
369
+ case 33:
370
+ w.setYAxisRangeData(Number(E[O - 2]), Number(E[O]));
371
+ break;
372
+ case 37:
373
+ this.$ = {
374
+ text: E[O],
375
+ type: "text"
376
+ };
377
+ break;
378
+ case 38:
379
+ this.$ = {
380
+ text: E[O],
381
+ type: "text"
382
+ };
383
+ break;
384
+ case 39:
385
+ this.$ = {
386
+ text: E[O],
387
+ type: "markdown"
388
+ };
389
+ break;
390
+ case 40:
391
+ this.$ = E[O];
392
+ break;
393
+ case 41:
394
+ this.$ = E[O - 1] + "" + E[O];
395
+ break;
396
+ }
397
+ }, "anonymous"),
398
+ table: [
399
+ e(S, w, {
400
+ 3: 1,
401
+ 4: 2,
402
+ 7: 4,
403
+ 5: T,
404
+ 34: E,
405
+ 35: D,
406
+ 36: O
407
+ }),
408
+ { 1: [3] },
409
+ e(S, w, {
410
+ 4: 2,
411
+ 7: 4,
412
+ 3: 8,
413
+ 5: T,
414
+ 34: E,
415
+ 35: D,
416
+ 36: O
417
+ }),
418
+ e(S, w, {
419
+ 4: 2,
420
+ 7: 4,
421
+ 6: 9,
422
+ 3: 10,
423
+ 5: T,
424
+ 8: [1, 11],
425
+ 34: E,
426
+ 35: D,
427
+ 36: O
428
+ }),
429
+ {
430
+ 1: [2, 4],
431
+ 9: 12,
432
+ 10: [1, 13],
433
+ 12: [1, 14],
434
+ 14: [1, 15],
435
+ 16: [1, 16],
436
+ 18: [1, 17],
437
+ 19: [1, 18],
438
+ 21: [1, 19],
439
+ 23: [1, 20]
440
+ },
441
+ e(k, [2, 34]),
442
+ e(k, [2, 35]),
443
+ e(k, [2, 36]),
444
+ { 1: [2, 1] },
445
+ e(S, w, {
446
+ 4: 2,
447
+ 7: 4,
448
+ 3: 21,
449
+ 5: T,
450
+ 34: E,
451
+ 35: D,
452
+ 36: O
453
+ }),
454
+ { 1: [2, 3] },
455
+ e(k, [2, 5]),
456
+ e(S, [2, 7], {
457
+ 4: 22,
458
+ 34: E,
459
+ 35: D,
460
+ 36: O
461
+ }),
462
+ {
463
+ 11: 23,
464
+ 37: 24,
465
+ 38: A,
466
+ 39: j,
467
+ 40: 27,
468
+ 41: M,
469
+ 42: N,
470
+ 43: P,
471
+ 44: F,
472
+ 45: I,
473
+ 46: L,
474
+ 47: R,
475
+ 48: z,
476
+ 49: B,
477
+ 50: V
478
+ },
479
+ {
480
+ 11: 39,
481
+ 13: 38,
482
+ 24: H,
483
+ 27: U,
484
+ 29: 40,
485
+ 30: 41,
486
+ 37: 24,
487
+ 38: A,
488
+ 39: j,
489
+ 40: 27,
490
+ 41: M,
491
+ 42: N,
492
+ 43: P,
493
+ 44: F,
494
+ 45: I,
495
+ 46: L,
496
+ 47: R,
497
+ 48: z,
498
+ 49: B,
499
+ 50: V
500
+ },
501
+ {
502
+ 11: 45,
503
+ 15: 44,
504
+ 27: W,
505
+ 33: 46,
506
+ 37: 24,
507
+ 38: A,
508
+ 39: j,
509
+ 40: 27,
510
+ 41: M,
511
+ 42: N,
512
+ 43: P,
513
+ 44: F,
514
+ 45: I,
515
+ 46: L,
516
+ 47: R,
517
+ 48: z,
518
+ 49: B,
519
+ 50: V
520
+ },
521
+ {
522
+ 11: 49,
523
+ 17: 48,
524
+ 24: G,
525
+ 37: 24,
526
+ 38: A,
527
+ 39: j,
528
+ 40: 27,
529
+ 41: M,
530
+ 42: N,
531
+ 43: P,
532
+ 44: F,
533
+ 45: I,
534
+ 46: L,
535
+ 47: R,
536
+ 48: z,
537
+ 49: B,
538
+ 50: V
539
+ },
540
+ {
541
+ 11: 52,
542
+ 17: 51,
543
+ 24: G,
544
+ 37: 24,
545
+ 38: A,
546
+ 39: j,
547
+ 40: 27,
548
+ 41: M,
549
+ 42: N,
550
+ 43: P,
551
+ 44: F,
552
+ 45: I,
553
+ 46: L,
554
+ 47: R,
555
+ 48: z,
556
+ 49: B,
557
+ 50: V
558
+ },
559
+ { 20: [1, 53] },
560
+ { 22: [1, 54] },
561
+ e(K, [2, 18]),
562
+ { 1: [2, 2] },
563
+ e(K, [2, 8]),
564
+ e(K, [2, 9]),
565
+ e(q, [2, 37], {
566
+ 40: 55,
567
+ 41: M,
568
+ 42: N,
569
+ 43: P,
570
+ 44: F,
571
+ 45: I,
572
+ 46: L,
573
+ 47: R,
574
+ 48: z,
575
+ 49: B,
576
+ 50: V
577
+ }),
578
+ e(q, [2, 38]),
579
+ e(q, [2, 39]),
580
+ e(J, [2, 40]),
581
+ e(J, [2, 42]),
582
+ e(J, [2, 43]),
583
+ e(J, [2, 44]),
584
+ e(J, [2, 45]),
585
+ e(J, [2, 46]),
586
+ e(J, [2, 47]),
587
+ e(J, [2, 48]),
588
+ e(J, [2, 49]),
589
+ e(J, [2, 50]),
590
+ e(J, [2, 51]),
591
+ e(K, [2, 10]),
592
+ e(K, [2, 22], {
593
+ 30: 41,
594
+ 29: 56,
595
+ 24: H,
596
+ 27: U
597
+ }),
598
+ e(K, [2, 24]),
599
+ e(K, [2, 25]),
600
+ { 31: [1, 57] },
601
+ {
602
+ 11: 59,
603
+ 32: 58,
604
+ 37: 24,
605
+ 38: A,
606
+ 39: j,
607
+ 40: 27,
608
+ 41: M,
609
+ 42: N,
610
+ 43: P,
611
+ 44: F,
612
+ 45: I,
613
+ 46: L,
614
+ 47: R,
615
+ 48: z,
616
+ 49: B,
617
+ 50: V
618
+ },
619
+ e(K, [2, 11]),
620
+ e(K, [2, 30], {
621
+ 33: 60,
622
+ 27: W
623
+ }),
624
+ e(K, [2, 32]),
625
+ { 31: [1, 61] },
626
+ e(K, [2, 12]),
627
+ {
628
+ 17: 62,
629
+ 24: G
630
+ },
631
+ {
632
+ 25: 63,
633
+ 27: Y
634
+ },
635
+ e(K, [2, 14]),
636
+ {
637
+ 17: 65,
638
+ 24: G
639
+ },
640
+ e(K, [2, 16]),
641
+ e(K, [2, 17]),
642
+ e(J, [2, 41]),
643
+ e(K, [2, 23]),
644
+ { 27: [1, 66] },
645
+ { 26: [1, 67] },
646
+ {
647
+ 26: [2, 29],
648
+ 28: [1, 68]
649
+ },
650
+ e(K, [2, 31]),
651
+ { 27: [1, 69] },
652
+ e(K, [2, 13]),
653
+ { 26: [1, 70] },
654
+ {
655
+ 26: [2, 21],
656
+ 28: [1, 71]
657
+ },
658
+ e(K, [2, 15]),
659
+ e(K, [2, 26]),
660
+ e(K, [2, 27]),
661
+ {
662
+ 11: 59,
663
+ 32: 72,
664
+ 37: 24,
665
+ 38: A,
666
+ 39: j,
667
+ 40: 27,
668
+ 41: M,
669
+ 42: N,
670
+ 43: P,
671
+ 44: F,
672
+ 45: I,
673
+ 46: L,
674
+ 47: R,
675
+ 48: z,
676
+ 49: B,
677
+ 50: V
678
+ },
679
+ e(K, [2, 33]),
680
+ e(K, [2, 19]),
681
+ {
682
+ 25: 73,
683
+ 27: Y
684
+ },
685
+ { 26: [2, 28] },
686
+ { 26: [2, 20] }
687
+ ],
688
+ defaultActions: {
689
+ 8: [2, 1],
690
+ 10: [2, 3],
691
+ 21: [2, 2],
692
+ 72: [2, 28],
693
+ 73: [2, 20]
694
+ },
695
+ parseError: /* @__PURE__ */ __name(function(e, S) {
696
+ if (S.recoverable) this.trace(e);
697
+ else {
698
+ var C = Error(e);
699
+ throw C.hash = S, C;
700
+ }
701
+ }, "parseError"),
702
+ parse: /* @__PURE__ */ __name(function(e) {
703
+ var S = this, w = [0], T = [], E = [null], D = [], O = this.table, k = "", A = 0, j = 0, M = 0, N = 2, P = 1, F = D.slice.call(arguments, 1), I = Object.create(this.lexer), L = { yy: {} };
704
+ for (var R in this.yy) Object.prototype.hasOwnProperty.call(this.yy, R) && (L.yy[R] = this.yy[R]);
705
+ I.setInput(e, L.yy), L.yy.lexer = I, L.yy.parser = this, I.yylloc === void 0 && (I.yylloc = {});
706
+ var z = I.yylloc;
707
+ D.push(z);
708
+ var B = I.options && I.options.ranges;
709
+ typeof L.yy.parseError == "function" ? this.parseError = L.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
710
+ function V(e) {
711
+ w.length -= 2 * e, E.length -= e, D.length -= e;
712
+ }
713
+ __name(V, "popStack");
714
+ function H() {
715
+ var e = T.pop() || I.lex() || P;
716
+ return typeof e != "number" && (e instanceof Array && (T = e, e = T.pop()), e = S.symbols_[e] || e), e;
717
+ }
718
+ __name(H, "lex");
719
+ for (var U, W, G, K, q, J = {}, Y, X, Z, Q;;) {
720
+ if (G = w[w.length - 1], this.defaultActions[G] ? K = this.defaultActions[G] : (U ??= H(), K = O[G] && O[G][U]), K === void 0 || !K.length || !K[0]) {
721
+ var $ = "";
722
+ for (Y in Q = [], O[G]) this.terminals_[Y] && Y > N && Q.push("'" + this.terminals_[Y] + "'");
723
+ $ = I.showPosition ? "Parse error on line " + (A + 1) + ":\n" + I.showPosition() + "\nExpecting " + Q.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : "Parse error on line " + (A + 1) + ": Unexpected " + (U == P ? "end of input" : "'" + (this.terminals_[U] || U) + "'"), this.parseError($, {
724
+ text: I.match,
725
+ token: this.terminals_[U] || U,
726
+ line: I.yylineno,
727
+ loc: z,
728
+ expected: Q
729
+ });
730
+ }
731
+ if (K[0] instanceof Array && K.length > 1) throw Error("Parse Error: multiple actions possible at state: " + G + ", token: " + U);
732
+ switch (K[0]) {
733
+ case 1:
734
+ w.push(U), E.push(I.yytext), D.push(I.yylloc), w.push(K[1]), U = null, W ? (U = W, W = null) : (j = I.yyleng, k = I.yytext, A = I.yylineno, z = I.yylloc, M > 0 && M--);
735
+ break;
736
+ case 2:
737
+ if (X = this.productions_[K[1]][1], J.$ = E[E.length - X], J._$ = {
738
+ first_line: D[D.length - (X || 1)].first_line,
739
+ last_line: D[D.length - 1].last_line,
740
+ first_column: D[D.length - (X || 1)].first_column,
741
+ last_column: D[D.length - 1].last_column
742
+ }, B && (J._$.range = [D[D.length - (X || 1)].range[0], D[D.length - 1].range[1]]), q = this.performAction.apply(J, [
743
+ k,
744
+ j,
745
+ A,
746
+ L.yy,
747
+ K[1],
748
+ E,
749
+ D
750
+ ].concat(F)), q !== void 0) return q;
751
+ X && (w = w.slice(0, -1 * X * 2), E = E.slice(0, -1 * X), D = D.slice(0, -1 * X)), w.push(this.productions_[K[1]][0]), E.push(J.$), D.push(J._$), Z = O[w[w.length - 2]][w[w.length - 1]], w.push(Z);
752
+ break;
753
+ case 3: return !0;
754
+ }
755
+ }
756
+ return !0;
757
+ }, "parse")
758
+ };
759
+ X.lexer = /* @__PURE__ */ (function() {
760
+ return {
761
+ EOF: 1,
762
+ parseError: /* @__PURE__ */ __name(function(e, S) {
763
+ if (this.yy.parser) this.yy.parser.parseError(e, S);
764
+ else throw Error(e);
765
+ }, "parseError"),
766
+ setInput: /* @__PURE__ */ __name(function(e, S) {
767
+ return this.yy = S || 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 = {
768
+ first_line: 1,
769
+ first_column: 0,
770
+ last_line: 1,
771
+ last_column: 0
772
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
773
+ }, "setInput"),
774
+ input: /* @__PURE__ */ __name(function() {
775
+ var e = this._input[0];
776
+ 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;
777
+ }, "input"),
778
+ unput: /* @__PURE__ */ __name(function(e) {
779
+ var S = e.length, C = e.split(/(?:\r\n?|\n)/g);
780
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - S), this.offset -= S;
781
+ var w = this.match.split(/(?:\r\n?|\n)/g);
782
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), C.length - 1 && (this.yylineno -= C.length - 1);
783
+ var T = this.yylloc.range;
784
+ return this.yylloc = {
785
+ first_line: this.yylloc.first_line,
786
+ last_line: this.yylineno + 1,
787
+ first_column: this.yylloc.first_column,
788
+ last_column: C ? (C.length === w.length ? this.yylloc.first_column : 0) + w[w.length - C.length].length - C[0].length : this.yylloc.first_column - S
789
+ }, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - S]), this.yyleng = this.yytext.length, this;
790
+ }, "unput"),
791
+ more: /* @__PURE__ */ __name(function() {
792
+ return this._more = !0, this;
793
+ }, "more"),
794
+ reject: /* @__PURE__ */ __name(function() {
795
+ if (this.options.backtrack_lexer) this._backtrack = !0;
796
+ 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(), {
797
+ text: "",
798
+ token: null,
799
+ line: this.yylineno
800
+ });
801
+ return this;
802
+ }, "reject"),
803
+ less: /* @__PURE__ */ __name(function(e) {
804
+ this.unput(this.match.slice(e));
805
+ }, "less"),
806
+ pastInput: /* @__PURE__ */ __name(function() {
807
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
808
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
809
+ }, "pastInput"),
810
+ upcomingInput: /* @__PURE__ */ __name(function() {
811
+ var e = this.match;
812
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
813
+ }, "upcomingInput"),
814
+ showPosition: /* @__PURE__ */ __name(function() {
815
+ var e = this.pastInput(), S = Array(e.length + 1).join("-");
816
+ return e + this.upcomingInput() + "\n" + S + "^";
817
+ }, "showPosition"),
818
+ test_match: /* @__PURE__ */ __name(function(e, S) {
819
+ var C, w, T;
820
+ if (this.options.backtrack_lexer && (T = {
821
+ yylineno: this.yylineno,
822
+ yylloc: {
823
+ first_line: this.yylloc.first_line,
824
+ last_line: this.last_line,
825
+ first_column: this.yylloc.first_column,
826
+ last_column: this.yylloc.last_column
827
+ },
828
+ yytext: this.yytext,
829
+ match: this.match,
830
+ matches: this.matches,
831
+ matched: this.matched,
832
+ yyleng: this.yyleng,
833
+ offset: this.offset,
834
+ _more: this._more,
835
+ _input: this._input,
836
+ yy: this.yy,
837
+ conditionStack: this.conditionStack.slice(0),
838
+ done: this.done
839
+ }, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), w = e[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
840
+ first_line: this.yylloc.last_line,
841
+ last_line: this.yylineno + 1,
842
+ first_column: this.yylloc.last_column,
843
+ last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
844
+ }, 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], C = this.performAction.call(this, this.yy, this, S, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), C) return C;
845
+ if (this._backtrack) {
846
+ for (var E in T) this[E] = T[E];
847
+ return !1;
848
+ }
849
+ return !1;
850
+ }, "test_match"),
851
+ next: /* @__PURE__ */ __name(function() {
852
+ if (this.done) return this.EOF;
853
+ this._input || (this.done = !0);
854
+ var e, S, C, w;
855
+ this._more || (this.yytext = "", this.match = "");
856
+ for (var T = this._currentRules(), E = 0; E < T.length; E++) if (C = this._input.match(this.rules[T[E]]), C && (!S || C[0].length > S[0].length)) {
857
+ if (S = C, w = E, this.options.backtrack_lexer) {
858
+ if (e = this.test_match(C, T[E]), e !== !1) return e;
859
+ if (this._backtrack) {
860
+ S = !1;
861
+ continue;
862
+ } else return !1;
863
+ } else if (!this.options.flex) break;
864
+ }
865
+ return S ? (e = this.test_match(S, T[w]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
866
+ text: "",
867
+ token: null,
868
+ line: this.yylineno
869
+ });
870
+ }, "next"),
871
+ lex: /* @__PURE__ */ __name(function() {
872
+ return this.next() || this.lex();
873
+ }, "lex"),
874
+ begin: /* @__PURE__ */ __name(function(e) {
875
+ this.conditionStack.push(e);
876
+ }, "begin"),
877
+ popState: /* @__PURE__ */ __name(function() {
878
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
879
+ }, "popState"),
880
+ _currentRules: /* @__PURE__ */ __name(function() {
881
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
882
+ }, "_currentRules"),
883
+ topState: /* @__PURE__ */ __name(function(e) {
884
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
885
+ }, "topState"),
886
+ pushState: /* @__PURE__ */ __name(function(e) {
887
+ this.begin(e);
888
+ }, "pushState"),
889
+ stateStackSize: /* @__PURE__ */ __name(function() {
890
+ return this.conditionStack.length;
891
+ }, "stateStackSize"),
892
+ options: { "case-insensitive": !0 },
893
+ performAction: /* @__PURE__ */ __name(function(e, S, C, w) {
894
+ switch (C) {
895
+ case 0: break;
896
+ case 1: break;
897
+ case 2: return this.popState(), 34;
898
+ case 3: return this.popState(), 34;
899
+ case 4: return 34;
900
+ case 5: break;
901
+ case 6: return 10;
902
+ case 7: return this.pushState("acc_title"), 19;
903
+ case 8: return this.popState(), "acc_title_value";
904
+ case 9: return this.pushState("acc_descr"), 21;
905
+ case 10: return this.popState(), "acc_descr_value";
906
+ case 11:
907
+ this.pushState("acc_descr_multiline");
908
+ break;
909
+ case 12:
910
+ this.popState();
911
+ break;
912
+ case 13: return "acc_descr_multiline_value";
913
+ case 14: return 5;
914
+ case 15: return 5;
915
+ case 16: return 8;
916
+ case 17: return this.pushState("axis_data"), "X_AXIS";
917
+ case 18: return this.pushState("axis_data"), "Y_AXIS";
918
+ case 19: return this.pushState("axis_band_data"), 24;
919
+ case 20: return 31;
920
+ case 21: return this.pushState("data"), 16;
921
+ case 22: return this.pushState("data"), 18;
922
+ case 23: return this.pushState("data_inner"), 24;
923
+ case 24: return 27;
924
+ case 25: return this.popState(), 26;
925
+ case 26:
926
+ this.popState();
927
+ break;
928
+ case 27:
929
+ this.pushState("string");
930
+ break;
931
+ case 28:
932
+ this.popState();
933
+ break;
934
+ case 29: return "STR";
935
+ case 30: return 24;
936
+ case 31: return 26;
937
+ case 32: return 43;
938
+ case 33: return "COLON";
939
+ case 34: return 44;
940
+ case 35: return 28;
941
+ case 36: return 45;
942
+ case 37: return 46;
943
+ case 38: return 48;
944
+ case 39: return 50;
945
+ case 40: return 47;
946
+ case 41: return 41;
947
+ case 42: return 49;
948
+ case 43: return 42;
949
+ case 44: break;
950
+ case 45: return 35;
951
+ case 46: return 36;
952
+ }
953
+ }, "anonymous"),
954
+ rules: [
955
+ /^(?:%%(?!\{)[^\n]*)/i,
956
+ /^(?:[^\}]%%[^\n]*)/i,
957
+ /^(?:(\r?\n))/i,
958
+ /^(?:(\r?\n))/i,
959
+ /^(?:[\n\r]+)/i,
960
+ /^(?:%%[^\n]*)/i,
961
+ /^(?:title\b)/i,
962
+ /^(?:accTitle\s*:\s*)/i,
963
+ /^(?:(?!\n||)*[^\n]*)/i,
964
+ /^(?:accDescr\s*:\s*)/i,
965
+ /^(?:(?!\n||)*[^\n]*)/i,
966
+ /^(?:accDescr\s*\{\s*)/i,
967
+ /^(?:\{)/i,
968
+ /^(?:[^\}]*)/i,
969
+ /^(?:xychart-beta\b)/i,
970
+ /^(?:xychart\b)/i,
971
+ /^(?:(?:vertical|horizontal))/i,
972
+ /^(?:x-axis\b)/i,
973
+ /^(?:y-axis\b)/i,
974
+ /^(?:\[)/i,
975
+ /^(?:-->)/i,
976
+ /^(?:line\b)/i,
977
+ /^(?:bar\b)/i,
978
+ /^(?:\[)/i,
979
+ /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,
980
+ /^(?:\])/i,
981
+ /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,
982
+ /^(?:["])/i,
983
+ /^(?:["])/i,
984
+ /^(?:[^"]*)/i,
985
+ /^(?:\[)/i,
986
+ /^(?:\])/i,
987
+ /^(?:[A-Za-z]+)/i,
988
+ /^(?::)/i,
989
+ /^(?:\+)/i,
990
+ /^(?:,)/i,
991
+ /^(?:=)/i,
992
+ /^(?:\*)/i,
993
+ /^(?:#)/i,
994
+ /^(?:[\_])/i,
995
+ /^(?:\.)/i,
996
+ /^(?:&)/i,
997
+ /^(?:-)/i,
998
+ /^(?:[0-9]+)/i,
999
+ /^(?:\s+)/i,
1000
+ /^(?:;)/i,
1001
+ /^(?:$)/i
1002
+ ],
1003
+ conditions: {
1004
+ data_inner: {
1005
+ rules: [
1006
+ 0,
1007
+ 1,
1008
+ 4,
1009
+ 5,
1010
+ 6,
1011
+ 7,
1012
+ 9,
1013
+ 11,
1014
+ 14,
1015
+ 15,
1016
+ 16,
1017
+ 17,
1018
+ 18,
1019
+ 21,
1020
+ 22,
1021
+ 24,
1022
+ 25,
1023
+ 26,
1024
+ 27,
1025
+ 30,
1026
+ 31,
1027
+ 32,
1028
+ 33,
1029
+ 34,
1030
+ 35,
1031
+ 36,
1032
+ 37,
1033
+ 38,
1034
+ 39,
1035
+ 40,
1036
+ 41,
1037
+ 42,
1038
+ 43,
1039
+ 44,
1040
+ 45,
1041
+ 46
1042
+ ],
1043
+ inclusive: !0
1044
+ },
1045
+ data: {
1046
+ rules: [
1047
+ 0,
1048
+ 1,
1049
+ 3,
1050
+ 4,
1051
+ 5,
1052
+ 6,
1053
+ 7,
1054
+ 9,
1055
+ 11,
1056
+ 14,
1057
+ 15,
1058
+ 16,
1059
+ 17,
1060
+ 18,
1061
+ 21,
1062
+ 22,
1063
+ 23,
1064
+ 26,
1065
+ 27,
1066
+ 30,
1067
+ 31,
1068
+ 32,
1069
+ 33,
1070
+ 34,
1071
+ 35,
1072
+ 36,
1073
+ 37,
1074
+ 38,
1075
+ 39,
1076
+ 40,
1077
+ 41,
1078
+ 42,
1079
+ 43,
1080
+ 44,
1081
+ 45,
1082
+ 46
1083
+ ],
1084
+ inclusive: !0
1085
+ },
1086
+ axis_band_data: {
1087
+ rules: [
1088
+ 0,
1089
+ 1,
1090
+ 4,
1091
+ 5,
1092
+ 6,
1093
+ 7,
1094
+ 9,
1095
+ 11,
1096
+ 14,
1097
+ 15,
1098
+ 16,
1099
+ 17,
1100
+ 18,
1101
+ 21,
1102
+ 22,
1103
+ 25,
1104
+ 26,
1105
+ 27,
1106
+ 30,
1107
+ 31,
1108
+ 32,
1109
+ 33,
1110
+ 34,
1111
+ 35,
1112
+ 36,
1113
+ 37,
1114
+ 38,
1115
+ 39,
1116
+ 40,
1117
+ 41,
1118
+ 42,
1119
+ 43,
1120
+ 44,
1121
+ 45,
1122
+ 46
1123
+ ],
1124
+ inclusive: !0
1125
+ },
1126
+ axis_data: {
1127
+ rules: [
1128
+ 0,
1129
+ 1,
1130
+ 2,
1131
+ 4,
1132
+ 5,
1133
+ 6,
1134
+ 7,
1135
+ 9,
1136
+ 11,
1137
+ 14,
1138
+ 15,
1139
+ 16,
1140
+ 17,
1141
+ 18,
1142
+ 19,
1143
+ 20,
1144
+ 21,
1145
+ 22,
1146
+ 24,
1147
+ 26,
1148
+ 27,
1149
+ 30,
1150
+ 31,
1151
+ 32,
1152
+ 33,
1153
+ 34,
1154
+ 35,
1155
+ 36,
1156
+ 37,
1157
+ 38,
1158
+ 39,
1159
+ 40,
1160
+ 41,
1161
+ 42,
1162
+ 43,
1163
+ 44,
1164
+ 45,
1165
+ 46
1166
+ ],
1167
+ inclusive: !0
1168
+ },
1169
+ acc_descr_multiline: {
1170
+ rules: [12, 13],
1171
+ inclusive: !1
1172
+ },
1173
+ acc_descr: {
1174
+ rules: [10],
1175
+ inclusive: !1
1176
+ },
1177
+ acc_title: {
1178
+ rules: [8],
1179
+ inclusive: !1
1180
+ },
1181
+ title: {
1182
+ rules: [],
1183
+ inclusive: !1
1184
+ },
1185
+ md_string: {
1186
+ rules: [],
1187
+ inclusive: !1
1188
+ },
1189
+ string: {
1190
+ rules: [28, 29],
1191
+ inclusive: !1
1192
+ },
1193
+ INITIAL: {
1194
+ rules: [
1195
+ 0,
1196
+ 1,
1197
+ 4,
1198
+ 5,
1199
+ 6,
1200
+ 7,
1201
+ 9,
1202
+ 11,
1203
+ 14,
1204
+ 15,
1205
+ 16,
1206
+ 17,
1207
+ 18,
1208
+ 21,
1209
+ 22,
1210
+ 26,
1211
+ 27,
1212
+ 30,
1213
+ 31,
1214
+ 32,
1215
+ 33,
1216
+ 34,
1217
+ 35,
1218
+ 36,
1219
+ 37,
1220
+ 38,
1221
+ 39,
1222
+ 40,
1223
+ 41,
1224
+ 42,
1225
+ 43,
1226
+ 44,
1227
+ 45,
1228
+ 46
1229
+ ],
1230
+ inclusive: !0
1231
+ }
1232
+ }
1233
+ };
1234
+ })();
1235
+ function Z() {
1236
+ this.yy = {};
1237
+ }
1238
+ return __name(Z, "Parser"), Z.prototype = X, X.Parser = Z, new Z();
1239
+ })();
1240
+ parser.parser = parser;
1241
+ var xychart_default = parser;
1242
+ function isBarPlot(e) {
1243
+ return e.type === "bar";
1244
+ }
1245
+ __name(isBarPlot, "isBarPlot");
1246
+ function isBandAxisData(e) {
1247
+ return e.type === "band";
1248
+ }
1249
+ __name(isBandAxisData, "isBandAxisData");
1250
+ function isLinearAxisData(e) {
1251
+ return e.type === "linear";
1252
+ }
1253
+ __name(isLinearAxisData, "isLinearAxisData");
1254
+ var TextDimensionCalculatorWithFont = class {
1255
+ constructor(e) {
1256
+ this.parentGroup = e;
1257
+ }
1258
+ static #_ = __name(this, "TextDimensionCalculatorWithFont");
1259
+ getMaxDimension(e, S) {
1260
+ if (!this.parentGroup) return {
1261
+ width: e.reduce((e, S) => Math.max(S.length, e), 0) * S,
1262
+ height: S
1263
+ };
1264
+ let C = {
1265
+ width: 0,
1266
+ height: 0
1267
+ }, w = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", S);
1268
+ for (let T of e) {
1269
+ let e = computeDimensionOfText(w, 1, T), E = e ? e.width : T.length * S, D = e ? e.height : S;
1270
+ C.width = Math.max(C.width, E), C.height = Math.max(C.height, D);
1271
+ }
1272
+ return w.remove(), C;
1273
+ }
1274
+ }, BAR_WIDTH_TO_TICK_WIDTH_RATIO = .7, MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL = .2, BaseAxis = class {
1275
+ constructor(e, S, C, w) {
1276
+ this.axisConfig = e, this.title = S, this.textDimensionCalculator = C, this.axisThemeConfig = w, this.boundingRect = {
1277
+ x: 0,
1278
+ y: 0,
1279
+ width: 0,
1280
+ height: 0
1281
+ }, 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.range = [0, 10], this.boundingRect = {
1282
+ x: 0,
1283
+ y: 0,
1284
+ width: 0,
1285
+ height: 0
1286
+ }, this.axisPosition = "left";
1287
+ }
1288
+ static #_ = __name(this, "BaseAxis");
1289
+ setRange(e) {
1290
+ 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();
1291
+ }
1292
+ getRange() {
1293
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
1294
+ }
1295
+ setAxisPosition(e) {
1296
+ this.axisPosition = e, this.setRange(this.range);
1297
+ }
1298
+ getTickDistance() {
1299
+ let e = this.getRange();
1300
+ return Math.abs(e[0] - e[1]) / this.getTickValues().length;
1301
+ }
1302
+ getAxisOuterPadding() {
1303
+ return this.outerPadding;
1304
+ }
1305
+ getLabelDimension() {
1306
+ return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e) => e.toString()), this.axisConfig.labelFontSize);
1307
+ }
1308
+ recalculateOuterPaddingToDrawBar() {
1309
+ BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() / 2)), this.recalculateScale();
1310
+ }
1311
+ calculateSpaceIfDrawnHorizontally(e) {
1312
+ let S = e.height;
1313
+ if (this.axisConfig.showAxisLine && S > this.axisConfig.axisLineWidth && (S -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1314
+ let C = this.getLabelDimension(), w = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * e.width;
1315
+ this.outerPadding = Math.min(C.width / 2, w);
1316
+ let T = C.height + this.axisConfig.labelPadding * 2;
1317
+ this.labelTextHeight = C.height, T <= S && (S -= T, this.showLabel = !0);
1318
+ }
1319
+ if (this.axisConfig.showTick && S >= this.axisConfig.tickLength && (this.showTick = !0, S -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1320
+ let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), C = e.height + this.axisConfig.titlePadding * 2;
1321
+ this.titleTextHeight = e.height, C <= S && (S -= C, this.showTitle = !0);
1322
+ }
1323
+ this.boundingRect.width = e.width, this.boundingRect.height = e.height - S;
1324
+ }
1325
+ calculateSpaceIfDrawnVertical(e) {
1326
+ let S = e.width;
1327
+ if (this.axisConfig.showAxisLine && S > this.axisConfig.axisLineWidth && (S -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1328
+ let C = this.getLabelDimension(), w = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * e.height;
1329
+ this.outerPadding = Math.min(C.height / 2, w);
1330
+ let T = C.width + this.axisConfig.labelPadding * 2;
1331
+ T <= S && (S -= T, this.showLabel = !0);
1332
+ }
1333
+ if (this.axisConfig.showTick && S >= this.axisConfig.tickLength && (this.showTick = !0, S -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1334
+ let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), C = e.height + this.axisConfig.titlePadding * 2;
1335
+ this.titleTextHeight = e.height, C <= S && (S -= C, this.showTitle = !0);
1336
+ }
1337
+ this.boundingRect.width = e.width - S, this.boundingRect.height = e.height;
1338
+ }
1339
+ calculateSpace(e) {
1340
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(e) : this.calculateSpaceIfDrawnHorizontally(e), this.recalculateScale(), {
1341
+ width: this.boundingRect.width,
1342
+ height: this.boundingRect.height
1343
+ };
1344
+ }
1345
+ setBoundingBoxXY(e) {
1346
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1347
+ }
1348
+ getDrawableElementsForLeftAxis() {
1349
+ let e = [];
1350
+ if (this.showAxisLine) {
1351
+ let S = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
1352
+ e.push({
1353
+ type: "path",
1354
+ groupTexts: ["left-axis", "axisl-line"],
1355
+ data: [{
1356
+ path: `M ${S},${this.boundingRect.y} L ${S},${this.boundingRect.y + this.boundingRect.height} `,
1357
+ strokeFill: this.axisThemeConfig.axisLineColor,
1358
+ strokeWidth: this.axisConfig.axisLineWidth
1359
+ }]
1360
+ });
1361
+ }
1362
+ if (this.showLabel && e.push({
1363
+ type: "text",
1364
+ groupTexts: ["left-axis", "label"],
1365
+ data: this.getTickValues().map((e) => ({
1366
+ text: e.toString(),
1367
+ 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),
1368
+ y: this.getScaleValue(e),
1369
+ fill: this.axisThemeConfig.labelColor,
1370
+ fontSize: this.axisConfig.labelFontSize,
1371
+ rotation: 0,
1372
+ verticalPos: "middle",
1373
+ horizontalPos: "right"
1374
+ }))
1375
+ }), this.showTick) {
1376
+ let S = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1377
+ e.push({
1378
+ type: "path",
1379
+ groupTexts: ["left-axis", "ticks"],
1380
+ data: this.getTickValues().map((e) => ({
1381
+ path: `M ${S},${this.getScaleValue(e)} L ${S - this.axisConfig.tickLength},${this.getScaleValue(e)}`,
1382
+ strokeFill: this.axisThemeConfig.tickColor,
1383
+ strokeWidth: this.axisConfig.tickWidth
1384
+ }))
1385
+ });
1386
+ }
1387
+ return this.showTitle && e.push({
1388
+ type: "text",
1389
+ groupTexts: ["left-axis", "title"],
1390
+ data: [{
1391
+ text: this.title,
1392
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
1393
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1394
+ fill: this.axisThemeConfig.titleColor,
1395
+ fontSize: this.axisConfig.titleFontSize,
1396
+ rotation: 270,
1397
+ verticalPos: "top",
1398
+ horizontalPos: "center"
1399
+ }]
1400
+ }), e;
1401
+ }
1402
+ getDrawableElementsForBottomAxis() {
1403
+ let e = [];
1404
+ if (this.showAxisLine) {
1405
+ let S = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
1406
+ e.push({
1407
+ type: "path",
1408
+ groupTexts: ["bottom-axis", "axis-line"],
1409
+ data: [{
1410
+ path: `M ${this.boundingRect.x},${S} L ${this.boundingRect.x + this.boundingRect.width},${S}`,
1411
+ strokeFill: this.axisThemeConfig.axisLineColor,
1412
+ strokeWidth: this.axisConfig.axisLineWidth
1413
+ }]
1414
+ });
1415
+ }
1416
+ if (this.showLabel && e.push({
1417
+ type: "text",
1418
+ groupTexts: ["bottom-axis", "label"],
1419
+ data: this.getTickValues().map((e) => ({
1420
+ text: e.toString(),
1421
+ x: this.getScaleValue(e),
1422
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
1423
+ fill: this.axisThemeConfig.labelColor,
1424
+ fontSize: this.axisConfig.labelFontSize,
1425
+ rotation: 0,
1426
+ verticalPos: "top",
1427
+ horizontalPos: "center"
1428
+ }))
1429
+ }), this.showTick) {
1430
+ let S = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1431
+ e.push({
1432
+ type: "path",
1433
+ groupTexts: ["bottom-axis", "ticks"],
1434
+ data: this.getTickValues().map((e) => ({
1435
+ path: `M ${this.getScaleValue(e)},${S} L ${this.getScaleValue(e)},${S + this.axisConfig.tickLength}`,
1436
+ strokeFill: this.axisThemeConfig.tickColor,
1437
+ strokeWidth: this.axisConfig.tickWidth
1438
+ }))
1439
+ });
1440
+ }
1441
+ return this.showTitle && e.push({
1442
+ type: "text",
1443
+ groupTexts: ["bottom-axis", "title"],
1444
+ data: [{
1445
+ text: this.title,
1446
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
1447
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
1448
+ fill: this.axisThemeConfig.titleColor,
1449
+ fontSize: this.axisConfig.titleFontSize,
1450
+ rotation: 0,
1451
+ verticalPos: "top",
1452
+ horizontalPos: "center"
1453
+ }]
1454
+ }), e;
1455
+ }
1456
+ getDrawableElementsForTopAxis() {
1457
+ let e = [];
1458
+ if (this.showAxisLine) {
1459
+ let S = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
1460
+ e.push({
1461
+ type: "path",
1462
+ groupTexts: ["top-axis", "axis-line"],
1463
+ data: [{
1464
+ path: `M ${this.boundingRect.x},${S} L ${this.boundingRect.x + this.boundingRect.width},${S}`,
1465
+ strokeFill: this.axisThemeConfig.axisLineColor,
1466
+ strokeWidth: this.axisConfig.axisLineWidth
1467
+ }]
1468
+ });
1469
+ }
1470
+ if (this.showLabel && e.push({
1471
+ type: "text",
1472
+ groupTexts: ["top-axis", "label"],
1473
+ data: this.getTickValues().map((e) => ({
1474
+ text: e.toString(),
1475
+ x: this.getScaleValue(e),
1476
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
1477
+ fill: this.axisThemeConfig.labelColor,
1478
+ fontSize: this.axisConfig.labelFontSize,
1479
+ rotation: 0,
1480
+ verticalPos: "top",
1481
+ horizontalPos: "center"
1482
+ }))
1483
+ }), this.showTick) {
1484
+ let S = this.boundingRect.y;
1485
+ e.push({
1486
+ type: "path",
1487
+ groupTexts: ["top-axis", "ticks"],
1488
+ data: this.getTickValues().map((e) => ({
1489
+ path: `M ${this.getScaleValue(e)},${S + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(e)},${S + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
1490
+ strokeFill: this.axisThemeConfig.tickColor,
1491
+ strokeWidth: this.axisConfig.tickWidth
1492
+ }))
1493
+ });
1494
+ }
1495
+ return this.showTitle && e.push({
1496
+ type: "text",
1497
+ groupTexts: ["top-axis", "title"],
1498
+ data: [{
1499
+ text: this.title,
1500
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1501
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
1502
+ fill: this.axisThemeConfig.titleColor,
1503
+ fontSize: this.axisConfig.titleFontSize,
1504
+ rotation: 0,
1505
+ verticalPos: "top",
1506
+ horizontalPos: "center"
1507
+ }]
1508
+ }), e;
1509
+ }
1510
+ getDrawableElements() {
1511
+ if (this.axisPosition === "left") return this.getDrawableElementsForLeftAxis();
1512
+ if (this.axisPosition === "right") throw Error("Drawing of right axis is not implemented");
1513
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
1514
+ }
1515
+ }, BandAxis = class extends BaseAxis {
1516
+ static #_ = __name(this, "BandAxis");
1517
+ constructor(e, S, C, w, T) {
1518
+ super(e, w, T, S), this.categories = C, this.scale = band().domain(this.categories).range(this.getRange());
1519
+ }
1520
+ setRange(e) {
1521
+ super.setRange(e);
1522
+ }
1523
+ recalculateScale() {
1524
+ this.scale = band().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5), log.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
1525
+ }
1526
+ getTickValues() {
1527
+ return this.categories;
1528
+ }
1529
+ getScaleValue(e) {
1530
+ return this.scale(e) ?? this.getRange()[0];
1531
+ }
1532
+ }, LinearAxis = class extends BaseAxis {
1533
+ static #_ = __name(this, "LinearAxis");
1534
+ constructor(e, S, C, w, T) {
1535
+ super(e, w, T, S), this.domain = C, this.scale = linear().domain(this.domain).range(this.getRange());
1536
+ }
1537
+ getTickValues() {
1538
+ return this.scale.ticks();
1539
+ }
1540
+ recalculateScale() {
1541
+ let e = [...this.domain];
1542
+ this.axisPosition === "left" && e.reverse(), this.scale = linear().domain(e).range(this.getRange());
1543
+ }
1544
+ getScaleValue(e) {
1545
+ return this.scale(e);
1546
+ }
1547
+ };
1548
+ function getAxis(e, S, C, w) {
1549
+ let T = new TextDimensionCalculatorWithFont(w);
1550
+ return isBandAxisData(e) ? new BandAxis(S, C, e.categories, e.title, T) : new LinearAxis(S, C, [e.min, e.max], e.title, T);
1551
+ }
1552
+ __name(getAxis, "getAxis");
1553
+ var ChartTitle = class {
1554
+ constructor(e, S, C, w) {
1555
+ this.textDimensionCalculator = e, this.chartConfig = S, this.chartData = C, this.chartThemeConfig = w, this.boundingRect = {
1556
+ x: 0,
1557
+ y: 0,
1558
+ width: 0,
1559
+ height: 0
1560
+ }, this.showChartTitle = !1;
1561
+ }
1562
+ static #_ = __name(this, "ChartTitle");
1563
+ setBoundingBoxXY(e) {
1564
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1565
+ }
1566
+ calculateSpace(e) {
1567
+ let S = this.textDimensionCalculator.getMaxDimension([this.chartData.title], this.chartConfig.titleFontSize), C = Math.max(S.width, e.width), w = S.height + 2 * this.chartConfig.titlePadding;
1568
+ return S.width <= C && S.height <= w && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = C, this.boundingRect.height = w, this.showChartTitle = !0), {
1569
+ width: this.boundingRect.width,
1570
+ height: this.boundingRect.height
1571
+ };
1572
+ }
1573
+ getDrawableElements() {
1574
+ let e = [];
1575
+ return this.showChartTitle && e.push({
1576
+ groupTexts: ["chart-title"],
1577
+ type: "text",
1578
+ data: [{
1579
+ fontSize: this.chartConfig.titleFontSize,
1580
+ text: this.chartData.title,
1581
+ verticalPos: "middle",
1582
+ horizontalPos: "center",
1583
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1584
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1585
+ fill: this.chartThemeConfig.titleColor,
1586
+ rotation: 0
1587
+ }]
1588
+ }), e;
1589
+ }
1590
+ };
1591
+ function getChartTitleComponent(e, S, C, w) {
1592
+ return new ChartTitle(new TextDimensionCalculatorWithFont(w), e, S, C);
1593
+ }
1594
+ __name(getChartTitleComponent, "getChartTitleComponent");
1595
+ var LinePlot = class {
1596
+ constructor(e, S, C, w, T) {
1597
+ this.plotData = e, this.xAxis = S, this.yAxis = C, this.orientation = w, this.plotIndex = T;
1598
+ }
1599
+ static #_ = __name(this, "LinePlot");
1600
+ getDrawableElement() {
1601
+ let e = this.plotData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), S;
1602
+ return S = this.orientation === "horizontal" ? line_default().y((e) => e[0]).x((e) => e[1])(e) : line_default().x((e) => e[0]).y((e) => e[1])(e), S ? [{
1603
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
1604
+ type: "path",
1605
+ data: [{
1606
+ path: S,
1607
+ strokeFill: this.plotData.strokeFill,
1608
+ strokeWidth: this.plotData.strokeWidth
1609
+ }]
1610
+ }] : [];
1611
+ }
1612
+ }, BarPlot = class {
1613
+ constructor(e, S, C, w, T, E) {
1614
+ this.barData = e, this.boundingRect = S, this.xAxis = C, this.yAxis = w, this.orientation = T, this.plotIndex = E;
1615
+ }
1616
+ static #_ = __name(this, "BarPlot");
1617
+ getDrawableElement() {
1618
+ let e = this.barData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), S = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * .95, C = S / 2;
1619
+ return this.orientation === "horizontal" ? [{
1620
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1621
+ type: "rect",
1622
+ data: e.map((e) => ({
1623
+ x: this.boundingRect.x,
1624
+ y: e[0] - C,
1625
+ height: S,
1626
+ width: e[1] - this.boundingRect.x,
1627
+ fill: this.barData.fill,
1628
+ strokeWidth: 0,
1629
+ strokeFill: this.barData.fill
1630
+ }))
1631
+ }] : [{
1632
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1633
+ type: "rect",
1634
+ data: e.map((e) => ({
1635
+ x: e[0] - C,
1636
+ y: e[1],
1637
+ width: S,
1638
+ height: this.boundingRect.y + this.boundingRect.height - e[1],
1639
+ fill: this.barData.fill,
1640
+ strokeWidth: 0,
1641
+ strokeFill: this.barData.fill
1642
+ }))
1643
+ }];
1644
+ }
1645
+ }, BasePlot = class {
1646
+ constructor(e, S, C) {
1647
+ this.chartConfig = e, this.chartData = S, this.chartThemeConfig = C, this.boundingRect = {
1648
+ x: 0,
1649
+ y: 0,
1650
+ width: 0,
1651
+ height: 0
1652
+ };
1653
+ }
1654
+ static #_ = __name(this, "BasePlot");
1655
+ setAxes(e, S) {
1656
+ this.xAxis = e, this.yAxis = S;
1657
+ }
1658
+ setBoundingBoxXY(e) {
1659
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1660
+ }
1661
+ calculateSpace(e) {
1662
+ return this.boundingRect.width = e.width, this.boundingRect.height = e.height, {
1663
+ width: this.boundingRect.width,
1664
+ height: this.boundingRect.height
1665
+ };
1666
+ }
1667
+ getDrawableElements() {
1668
+ if (!(this.xAxis && this.yAxis)) throw Error("Axes must be passed to render Plots");
1669
+ let e = [];
1670
+ for (let [S, C] of this.chartData.plots.entries()) switch (C.type) {
1671
+ case "line":
1672
+ {
1673
+ let w = new LinePlot(C, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, S);
1674
+ e.push(...w.getDrawableElement());
1675
+ }
1676
+ break;
1677
+ case "bar":
1678
+ {
1679
+ let w = new BarPlot(C, this.boundingRect, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, S);
1680
+ e.push(...w.getDrawableElement());
1681
+ }
1682
+ break;
1683
+ }
1684
+ return e;
1685
+ }
1686
+ };
1687
+ function getPlotComponent(e, S, C) {
1688
+ return new BasePlot(e, S, C);
1689
+ }
1690
+ __name(getPlotComponent, "getPlotComponent");
1691
+ var Orchestrator = class {
1692
+ constructor(e, S, C, w) {
1693
+ this.chartConfig = e, this.chartData = S, this.componentStore = {
1694
+ title: getChartTitleComponent(e, S, C, w),
1695
+ plot: getPlotComponent(e, S, C),
1696
+ xAxis: getAxis(S.xAxis, e.xAxis, {
1697
+ titleColor: C.xAxisTitleColor,
1698
+ labelColor: C.xAxisLabelColor,
1699
+ tickColor: C.xAxisTickColor,
1700
+ axisLineColor: C.xAxisLineColor
1701
+ }, w),
1702
+ yAxis: getAxis(S.yAxis, e.yAxis, {
1703
+ titleColor: C.yAxisTitleColor,
1704
+ labelColor: C.yAxisLabelColor,
1705
+ tickColor: C.yAxisTickColor,
1706
+ axisLineColor: C.yAxisLineColor
1707
+ }, w)
1708
+ };
1709
+ }
1710
+ static #_ = __name(this, "Orchestrator");
1711
+ calculateVerticalSpace() {
1712
+ let e = this.chartConfig.width, S = this.chartConfig.height, C = 0, w = 0, T = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), E = Math.floor(S * this.chartConfig.plotReservedSpacePercent / 100), D = this.componentStore.plot.calculateSpace({
1713
+ width: T,
1714
+ height: E
1715
+ });
1716
+ e -= D.width, S -= D.height, D = this.componentStore.title.calculateSpace({
1717
+ width: this.chartConfig.width,
1718
+ height: S
1719
+ }), w = D.height, S -= D.height, this.componentStore.xAxis.setAxisPosition("bottom"), D = this.componentStore.xAxis.calculateSpace({
1720
+ width: e,
1721
+ height: S
1722
+ }), S -= D.height, this.componentStore.yAxis.setAxisPosition("left"), D = this.componentStore.yAxis.calculateSpace({
1723
+ width: e,
1724
+ height: S
1725
+ }), C = D.width, e -= D.width, e > 0 && (T += e, e = 0), S > 0 && (E += S, S = 0), this.componentStore.plot.calculateSpace({
1726
+ width: T,
1727
+ height: E
1728
+ }), this.componentStore.plot.setBoundingBoxXY({
1729
+ x: C,
1730
+ y: w
1731
+ }), this.componentStore.xAxis.setRange([C, C + T]), this.componentStore.xAxis.setBoundingBoxXY({
1732
+ x: C,
1733
+ y: w + E
1734
+ }), this.componentStore.yAxis.setRange([w, w + E]), this.componentStore.yAxis.setBoundingBoxXY({
1735
+ x: 0,
1736
+ y: w
1737
+ }), this.chartData.plots.some((e) => isBarPlot(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1738
+ }
1739
+ calculateHorizontalSpace() {
1740
+ let e = this.chartConfig.width, S = this.chartConfig.height, C = 0, w = 0, T = 0, E = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), D = Math.floor(S * this.chartConfig.plotReservedSpacePercent / 100), O = this.componentStore.plot.calculateSpace({
1741
+ width: E,
1742
+ height: D
1743
+ });
1744
+ e -= O.width, S -= O.height, O = this.componentStore.title.calculateSpace({
1745
+ width: this.chartConfig.width,
1746
+ height: S
1747
+ }), C = O.height, S -= O.height, this.componentStore.xAxis.setAxisPosition("left"), O = this.componentStore.xAxis.calculateSpace({
1748
+ width: e,
1749
+ height: S
1750
+ }), e -= O.width, w = O.width, this.componentStore.yAxis.setAxisPosition("top"), O = this.componentStore.yAxis.calculateSpace({
1751
+ width: e,
1752
+ height: S
1753
+ }), S -= O.height, T = C + O.height, e > 0 && (E += e, e = 0), S > 0 && (D += S, S = 0), this.componentStore.plot.calculateSpace({
1754
+ width: E,
1755
+ height: D
1756
+ }), this.componentStore.plot.setBoundingBoxXY({
1757
+ x: w,
1758
+ y: T
1759
+ }), this.componentStore.yAxis.setRange([w, w + E]), this.componentStore.yAxis.setBoundingBoxXY({
1760
+ x: w,
1761
+ y: C
1762
+ }), this.componentStore.xAxis.setRange([T, T + D]), this.componentStore.xAxis.setBoundingBoxXY({
1763
+ x: 0,
1764
+ y: T
1765
+ }), this.chartData.plots.some((e) => isBarPlot(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1766
+ }
1767
+ calculateSpace() {
1768
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1769
+ }
1770
+ getDrawableElement() {
1771
+ this.calculateSpace();
1772
+ let e = [];
1773
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1774
+ for (let S of Object.values(this.componentStore)) e.push(...S.getDrawableElements());
1775
+ return e;
1776
+ }
1777
+ }, XYChartBuilder = class {
1778
+ static #_ = __name(this, "XYChartBuilder");
1779
+ static build(e, S, C, w) {
1780
+ return new Orchestrator(e, S, C, w).getDrawableElement();
1781
+ }
1782
+ }, plotIndex = 0, tmpSVGGroup, xyChartConfig = getChartDefaultConfig(), xyChartThemeConfig = getChartDefaultThemeConfig(), xyChartData = getChartDefaultData(), plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((e) => e.trim()), hasSetXAxis = !1, hasSetYAxis = !1;
1783
+ function getChartDefaultThemeConfig() {
1784
+ let S = getThemeVariables3(), C = getConfig();
1785
+ return cleanAndMerge(S.xyChart, C.themeVariables.xyChart);
1786
+ }
1787
+ __name(getChartDefaultThemeConfig, "getChartDefaultThemeConfig");
1788
+ function getChartDefaultConfig() {
1789
+ let S = getConfig();
1790
+ return cleanAndMerge(defaultConfig_default.xyChart, S.xyChart);
1791
+ }
1792
+ __name(getChartDefaultConfig, "getChartDefaultConfig");
1793
+ function getChartDefaultData() {
1794
+ return {
1795
+ yAxis: {
1796
+ type: "linear",
1797
+ title: "",
1798
+ min: Infinity,
1799
+ max: -Infinity
1800
+ },
1801
+ xAxis: {
1802
+ type: "band",
1803
+ title: "",
1804
+ categories: []
1805
+ },
1806
+ title: "",
1807
+ plots: []
1808
+ };
1809
+ }
1810
+ __name(getChartDefaultData, "getChartDefaultData");
1811
+ function textSanitizer(e) {
1812
+ let S = getConfig();
1813
+ return sanitizeText(e.trim(), S);
1814
+ }
1815
+ __name(textSanitizer, "textSanitizer");
1816
+ function setTmpSVGG(e) {
1817
+ tmpSVGGroup = e;
1818
+ }
1819
+ __name(setTmpSVGG, "setTmpSVGG");
1820
+ function setOrientation(e) {
1821
+ e === "horizontal" ? xyChartConfig.chartOrientation = "horizontal" : xyChartConfig.chartOrientation = "vertical";
1822
+ }
1823
+ __name(setOrientation, "setOrientation");
1824
+ function setXAxisTitle(e) {
1825
+ xyChartData.xAxis.title = textSanitizer(e.text);
1826
+ }
1827
+ __name(setXAxisTitle, "setXAxisTitle");
1828
+ function setXAxisRangeData(e, S) {
1829
+ xyChartData.xAxis = {
1830
+ type: "linear",
1831
+ title: xyChartData.xAxis.title,
1832
+ min: e,
1833
+ max: S
1834
+ }, hasSetXAxis = !0;
1835
+ }
1836
+ __name(setXAxisRangeData, "setXAxisRangeData");
1837
+ function setXAxisBand(e) {
1838
+ xyChartData.xAxis = {
1839
+ type: "band",
1840
+ title: xyChartData.xAxis.title,
1841
+ categories: e.map((e) => textSanitizer(e.text))
1842
+ }, hasSetXAxis = !0;
1843
+ }
1844
+ __name(setXAxisBand, "setXAxisBand");
1845
+ function setYAxisTitle(e) {
1846
+ xyChartData.yAxis.title = textSanitizer(e.text);
1847
+ }
1848
+ __name(setYAxisTitle, "setYAxisTitle");
1849
+ function setYAxisRangeData(e, S) {
1850
+ xyChartData.yAxis = {
1851
+ type: "linear",
1852
+ title: xyChartData.yAxis.title,
1853
+ min: e,
1854
+ max: S
1855
+ }, hasSetYAxis = !0;
1856
+ }
1857
+ __name(setYAxisRangeData, "setYAxisRangeData");
1858
+ function setYAxisRangeFromPlotData(e) {
1859
+ let S = Math.min(...e), C = Math.max(...e), w = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.min : Infinity, T = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.max : -Infinity;
1860
+ xyChartData.yAxis = {
1861
+ type: "linear",
1862
+ title: xyChartData.yAxis.title,
1863
+ min: Math.min(w, S),
1864
+ max: Math.max(T, C)
1865
+ };
1866
+ }
1867
+ __name(setYAxisRangeFromPlotData, "setYAxisRangeFromPlotData");
1868
+ function transformDataWithoutCategory(e) {
1869
+ let S = [];
1870
+ if (e.length === 0) return S;
1871
+ if (!hasSetXAxis) {
1872
+ let S = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.min : Infinity, C = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.max : -Infinity;
1873
+ setXAxisRangeData(Math.min(S, 1), Math.max(C, e.length));
1874
+ }
1875
+ if (hasSetYAxis || setYAxisRangeFromPlotData(e), isBandAxisData(xyChartData.xAxis) && (S = xyChartData.xAxis.categories.map((S, C) => [S, e[C]])), isLinearAxisData(xyChartData.xAxis)) {
1876
+ let C = xyChartData.xAxis.min, w = xyChartData.xAxis.max, T = (w - C) / (e.length - 1), E = [];
1877
+ for (let e = C; e <= w; e += T) E.push(`${e}`);
1878
+ S = E.map((S, C) => [S, e[C]]);
1879
+ }
1880
+ return S;
1881
+ }
1882
+ __name(transformDataWithoutCategory, "transformDataWithoutCategory");
1883
+ function getPlotColorFromPalette(e) {
1884
+ return plotColorPalette[e === 0 ? 0 : e % plotColorPalette.length];
1885
+ }
1886
+ __name(getPlotColorFromPalette, "getPlotColorFromPalette");
1887
+ function setLineData(e, S) {
1888
+ let C = transformDataWithoutCategory(S);
1889
+ xyChartData.plots.push({
1890
+ type: "line",
1891
+ strokeFill: getPlotColorFromPalette(plotIndex),
1892
+ strokeWidth: 2,
1893
+ data: C
1894
+ }), plotIndex++;
1895
+ }
1896
+ __name(setLineData, "setLineData");
1897
+ function setBarData(e, S) {
1898
+ let C = transformDataWithoutCategory(S);
1899
+ xyChartData.plots.push({
1900
+ type: "bar",
1901
+ fill: getPlotColorFromPalette(plotIndex),
1902
+ data: C
1903
+ }), plotIndex++;
1904
+ }
1905
+ __name(setBarData, "setBarData");
1906
+ function getDrawableElem() {
1907
+ if (xyChartData.plots.length === 0) throw Error("No Plot to render, please provide a plot with some data");
1908
+ return xyChartData.title = getDiagramTitle(), XYChartBuilder.build(xyChartConfig, xyChartData, xyChartThemeConfig, tmpSVGGroup);
1909
+ }
1910
+ __name(getDrawableElem, "getDrawableElem");
1911
+ function getChartThemeConfig() {
1912
+ return xyChartThemeConfig;
1913
+ }
1914
+ __name(getChartThemeConfig, "getChartThemeConfig");
1915
+ function getChartConfig() {
1916
+ return xyChartConfig;
1917
+ }
1918
+ __name(getChartConfig, "getChartConfig");
1919
+ function getXYChartData() {
1920
+ return xyChartData;
1921
+ }
1922
+ __name(getXYChartData, "getXYChartData");
1923
+ var diagram = {
1924
+ parser: xychart_default,
1925
+ db: {
1926
+ getDrawableElem,
1927
+ clear: /* @__PURE__ */ __name(function() {
1928
+ clear(), plotIndex = 0, xyChartConfig = getChartDefaultConfig(), xyChartData = getChartDefaultData(), xyChartThemeConfig = getChartDefaultThemeConfig(), plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((e) => e.trim()), hasSetXAxis = !1, hasSetYAxis = !1;
1929
+ }, "clear"),
1930
+ setAccTitle,
1931
+ getAccTitle,
1932
+ setDiagramTitle,
1933
+ getDiagramTitle,
1934
+ getAccDescription,
1935
+ setAccDescription,
1936
+ setOrientation,
1937
+ setXAxisTitle,
1938
+ setXAxisRangeData,
1939
+ setXAxisBand,
1940
+ setYAxisTitle,
1941
+ setYAxisRangeData,
1942
+ setLineData,
1943
+ setBarData,
1944
+ setTmpSVGG,
1945
+ getChartThemeConfig,
1946
+ getChartConfig,
1947
+ getXYChartData
1948
+ },
1949
+ renderer: { draw: /* @__PURE__ */ __name((e, w, T, E) => {
1950
+ let D = E.db, O = D.getChartThemeConfig(), k = D.getChartConfig(), A = D.getXYChartData().plots[0].data.map((e) => e[1]);
1951
+ function M(e) {
1952
+ return e === "top" ? "text-before-edge" : "middle";
1953
+ }
1954
+ __name(M, "getDominantBaseLine");
1955
+ function N(e) {
1956
+ return e === "left" ? "start" : e === "right" ? "end" : "middle";
1957
+ }
1958
+ __name(N, "getTextAnchor");
1959
+ function P(e) {
1960
+ return `translate(${e.x}, ${e.y}) rotate(${e.rotation || 0})`;
1961
+ }
1962
+ __name(P, "getTextTransformation"), log.debug("Rendering xychart chart\n" + e);
1963
+ let F = selectSvgElement(w), I = F.append("g").attr("class", "main"), L = I.append("rect").attr("width", k.width).attr("height", k.height).attr("class", "background");
1964
+ configureSvgSize(F, k.height, k.width, !0), F.attr("viewBox", `0 0 ${k.width} ${k.height}`), L.attr("fill", O.backgroundColor), D.setTmpSVGG(F.append("g").attr("class", "mermaid-tmp-group"));
1965
+ let R = D.getDrawableElem(), z = {};
1966
+ function V(e) {
1967
+ let S = I, C = "";
1968
+ for (let [w] of e.entries()) {
1969
+ let T = I;
1970
+ w > 0 && z[C] && (T = z[C]), C += e[w], S = z[C], S ||= z[C] = T.append("g").attr("class", e[w]);
1971
+ }
1972
+ return S;
1973
+ }
1974
+ __name(V, "getGroup");
1975
+ for (let e of R) {
1976
+ if (e.data.length === 0) continue;
1977
+ let S = V(e.groupTexts);
1978
+ switch (e.type) {
1979
+ case "rect":
1980
+ if (S.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), k.showDataLabel) if (k.chartOrientation === "horizontal") {
1981
+ let w = function(e, S) {
1982
+ let { data: C, label: w } = e;
1983
+ return S * w.length * T <= C.width - 10;
1984
+ };
1985
+ __name(w, "fitsHorizontally");
1986
+ let T = .7, E = e.data.map((e, S) => ({
1987
+ data: e,
1988
+ label: A[S].toString()
1989
+ })).filter((e) => e.data.width > 0 && e.data.height > 0), D = E.map((e) => {
1990
+ let { data: S } = e, C = S.height * .7;
1991
+ for (; !w(e, C) && C > 0;) --C;
1992
+ return C;
1993
+ }), O = Math.floor(Math.min(...D));
1994
+ S.selectAll("text").data(E).enter().append("text").attr("x", (e) => e.data.x + e.data.width - 10).attr("y", (e) => e.data.y + e.data.height / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").attr("fill", "black").attr("font-size", `${O}px`).text((e) => e.label);
1995
+ } else {
1996
+ let w = function(e, S, C) {
1997
+ let { data: w, label: T } = e, E = S * T.length * .7, D = w.x + w.width / 2, O = D - E / 2, k = D + E / 2, A = O >= w.x && k <= w.x + w.width, j = w.y + C + S <= w.y + w.height;
1998
+ return A && j;
1999
+ };
2000
+ __name(w, "fitsInBar");
2001
+ let T = e.data.map((e, S) => ({
2002
+ data: e,
2003
+ label: A[S].toString()
2004
+ })).filter((e) => e.data.width > 0 && e.data.height > 0), E = T.map((e) => {
2005
+ let { data: S, label: C } = e, T = S.width / (C.length * .7);
2006
+ for (; !w(e, T, 10) && T > 0;) --T;
2007
+ return T;
2008
+ }), D = Math.floor(Math.min(...E));
2009
+ S.selectAll("text").data(T).enter().append("text").attr("x", (e) => e.data.x + e.data.width / 2).attr("y", (e) => e.data.y + 10).attr("text-anchor", "middle").attr("dominant-baseline", "hanging").attr("fill", "black").attr("font-size", `${D}px`).text((e) => e.label);
2010
+ }
2011
+ break;
2012
+ case "text":
2013
+ S.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) => M(e.verticalPos)).attr("text-anchor", (e) => N(e.horizontalPos)).attr("transform", (e) => P(e)).text((e) => e.text);
2014
+ break;
2015
+ case "path":
2016
+ S.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);
2017
+ break;
2018
+ }
2019
+ }
2020
+ }, "draw") }
2021
+ };
2022
+ export { diagram };