drizzle-cube 0.1.44 → 0.1.45

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.
@@ -0,0 +1,2445 @@
1
+ import { jsx as s, jsxs as N, Fragment as Te } from "react/jsx-runtime";
2
+ import { useState as O, useMemo as pt } from "react";
3
+ import { ResponsiveContainer as He, Tooltip as vt, ComposedChart as at, CartesianGrid as ge, XAxis as pe, YAxis as ve, Legend as B, Bar as bt, Cell as je, Line as q, LineChart as Nt, Area as wt, PieChart as At, Pie as kt, ScatterChart as St, Scatter as Oe, RadarChart as Mt, PolarGrid as $t, PolarAngleAxis as Lt, PolarRadiusAxis as Tt, Radar as jt, RadialBarChart as Ft, RadialBar as zt, Treemap as Dt } from "recharts";
4
+ import { u as W } from "./providers-aaWIe5KD.js";
5
+ function G({ children: e, height: t = "100%" }) {
6
+ try {
7
+ if (t === "100%")
8
+ return /* @__PURE__ */ s("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ s(He, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
9
+ const n = {
10
+ height: typeof t == "number" ? `${t}px` : t,
11
+ width: "100%",
12
+ minHeight: "200px"
13
+ };
14
+ return /* @__PURE__ */ s("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ s(He, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
15
+ } catch (n) {
16
+ return /* @__PURE__ */ N(
17
+ "div",
18
+ {
19
+ className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border border-dashed rounded-lg",
20
+ style: { height: t, borderColor: "var(--dc-border)", backgroundColor: "var(--dc-surface)" },
21
+ children: [
22
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1 text-dc-text-muted", children: "Unable to display chart" }),
23
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: n instanceof Error ? n.message : "Failed to create responsive container" })
24
+ ]
25
+ }
26
+ );
27
+ }
28
+ }
29
+ function C({ formatter: e, labelFormatter: t }) {
30
+ return /* @__PURE__ */ s(
31
+ vt,
32
+ {
33
+ formatter: e,
34
+ labelFormatter: t,
35
+ contentStyle: {
36
+ backgroundColor: "white",
37
+ border: "1px solid #e5e7eb",
38
+ borderRadius: "0.5rem",
39
+ fontSize: "0.875rem",
40
+ color: "#1f2937",
41
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
42
+ padding: "8px 12px"
43
+ }
44
+ }
45
+ );
46
+ }
47
+ const j = [
48
+ "#3b82f6",
49
+ // blue
50
+ "#10b981",
51
+ // green
52
+ "#f59e0b",
53
+ // yellow
54
+ "#ef4444",
55
+ // red
56
+ "#8b5cf6",
57
+ // purple
58
+ "#f97316",
59
+ // orange
60
+ "#06b6d4",
61
+ // cyan
62
+ "#84cc16"
63
+ // lime
64
+ ], ae = [
65
+ "#440154",
66
+ // dark purple
67
+ "#414487",
68
+ // purple-blue
69
+ "#2a788e",
70
+ // teal
71
+ "#22a884",
72
+ // green-teal
73
+ "#7ad151",
74
+ // green
75
+ "#fde725"
76
+ // yellow
77
+ ], Ge = "#10b981", Et = "#ef4444", be = {
78
+ top: 5,
79
+ right: 30,
80
+ left: 20,
81
+ bottom: 5
82
+ };
83
+ function Ae(e) {
84
+ return e != null && !isNaN(Number(e));
85
+ }
86
+ function Z(e) {
87
+ if (e == null) return null;
88
+ const t = typeof e == "string" ? parseFloat(e) : Number(e);
89
+ return isNaN(t) ? null : t;
90
+ }
91
+ function ke(e, t) {
92
+ return t[e] || e;
93
+ }
94
+ function R(e, t) {
95
+ if (!e) return String(e || "Unknown");
96
+ const n = String(e);
97
+ if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
98
+ let r = n;
99
+ n.includes(" ") && (r = n.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !r.endsWith("Z") && !r.includes("+") && (r = r + "Z");
100
+ const i = new Date(r);
101
+ if (isNaN(i.getTime()))
102
+ return n;
103
+ const l = i.getUTCFullYear(), a = String(i.getUTCMonth() + 1).padStart(2, "0"), c = String(i.getUTCDate()).padStart(2, "0"), d = i.getUTCHours(), o = i.getUTCMinutes();
104
+ if (t)
105
+ switch (t.toLowerCase()) {
106
+ case "year":
107
+ return `${l}`;
108
+ case "quarter":
109
+ const m = Math.floor(i.getUTCMonth() / 3) + 1;
110
+ return `${l}-Q${m}`;
111
+ case "month":
112
+ return `${l}-${a}`;
113
+ case "week":
114
+ return `${l}-${a}-${c}`;
115
+ case "day":
116
+ return `${l}-${a}-${c}`;
117
+ case "hour":
118
+ return `${l}-${a}-${c} ${String(d).padStart(2, "0")}:00`;
119
+ case "minute":
120
+ return `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
121
+ }
122
+ const f = i.getUTCSeconds(), u = i.getUTCMilliseconds();
123
+ if (c === "01" && d === 0 && o === 0 && f === 0 && u === 0) {
124
+ if (a === "01" || a === "04" || a === "07" || a === "10") {
125
+ const m = Math.floor(i.getUTCMonth() / 3) + 1;
126
+ return `${l}-Q${m}`;
127
+ }
128
+ return `${l}-${a}`;
129
+ }
130
+ return d === 0 && o === 0 && f === 0 && u === 0 ? `${l}-${a}-${c}` : o === 0 && f === 0 && u === 0 ? `${l}-${a}-${c} ${String(d).padStart(2, "0")}:00` : `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
131
+ }
132
+ return n;
133
+ }
134
+ function H(e, t) {
135
+ try {
136
+ if (e?.timeDimensions) {
137
+ const r = e.timeDimensions.find((i) => t === i.dimension || t.startsWith(i.dimension.replace(".", "_")) || t === `${i.dimension}_${i.granularity}`);
138
+ if (r?.granularity)
139
+ return r.granularity;
140
+ }
141
+ const n = t.match(/_([a-z]+)$/);
142
+ if (n) {
143
+ const r = n[1];
144
+ if (["year", "quarter", "month", "week", "day", "hour", "minute", "second"].includes(r))
145
+ return r;
146
+ }
147
+ return;
148
+ } catch {
149
+ return;
150
+ }
151
+ }
152
+ function Rt(e, t, n, r, i = {}) {
153
+ if (!e || e.length === 0) return [];
154
+ const l = H(r, t);
155
+ return e.map((a) => {
156
+ const c = {
157
+ name: R(a[t], l) || a[t] || "Unknown"
158
+ };
159
+ return n.forEach((d) => {
160
+ const o = ke(d, i);
161
+ c[o] = Z(a[d]);
162
+ }), c;
163
+ });
164
+ }
165
+ function te(e, t, n, r, i, l = {}) {
166
+ if (!e || e.length === 0)
167
+ return { data: [], seriesKeys: [], hasDimensions: !1 };
168
+ const a = r || {}, c = [
169
+ ...a.dimensions || [],
170
+ ...a.timeDimensions?.map((p) => p.dimension) || []
171
+ ], d = a.measures || [], o = n.filter((p) => d.includes(p)), f = (i || []).filter((p) => c.includes(p));
172
+ if (f.length > 0) {
173
+ const p = {};
174
+ e.forEach((y) => {
175
+ const S = H(r, t), $ = R(y[t], S) || y[t] || "Unknown";
176
+ p[$] || (p[$] = { name: String($) }), o.forEach((g) => {
177
+ const b = ke(g, l), x = Z(y[g]);
178
+ if (x !== null) {
179
+ const h = p[$][b];
180
+ p[$][b] = h == null ? x : h + x;
181
+ } else b in p[$] || (p[$][b] = null);
182
+ }), f.forEach((g) => {
183
+ const b = y[g];
184
+ if (b != null) {
185
+ const x = String(b), h = o[0] || d.find(
186
+ (A) => A.includes("totalCost") || A.includes("count") || A.includes("sum")
187
+ ) || d[0];
188
+ if (h) {
189
+ const A = Z(y[h]);
190
+ if (A !== null) {
191
+ const T = p[$][x];
192
+ p[$][x] = T == null ? A : T + A;
193
+ } else x in p[$] || (p[$][x] = null);
194
+ }
195
+ }
196
+ });
197
+ });
198
+ const v = Object.values(p), w = Array.from(new Set(
199
+ e.flatMap(
200
+ (y) => f.map((S) => {
201
+ const $ = y[S];
202
+ return $ != null ? String($) : null;
203
+ }).filter((S) => S !== null)
204
+ )
205
+ ));
206
+ return {
207
+ data: v,
208
+ seriesKeys: w,
209
+ hasDimensions: !0
210
+ };
211
+ }
212
+ const u = Rt(e, t, n, r, l), m = n.map((p) => ke(p, l));
213
+ return {
214
+ data: u,
215
+ seriesKeys: m,
216
+ hasDimensions: !1
217
+ };
218
+ }
219
+ function Fe(e) {
220
+ if (!e || typeof e != "string")
221
+ return [];
222
+ const t = e.trim();
223
+ if (!t)
224
+ return [];
225
+ try {
226
+ const n = t.split(",").map((r) => r.trim()).filter((r) => r !== "").map((r) => {
227
+ const i = parseFloat(r);
228
+ if (isNaN(i))
229
+ throw new Error(`Invalid numeric value: ${r}`);
230
+ return i;
231
+ });
232
+ return n.length > 0 ? n : [];
233
+ } catch (n) {
234
+ return console.warn("Failed to parse target values:", n), [];
235
+ }
236
+ }
237
+ function ze(e, t) {
238
+ if (e.length === 0 || t <= 0)
239
+ return [];
240
+ if (e.length === 1)
241
+ return new Array(t).fill(e[0]);
242
+ const n = [], r = Math.floor(t / e.length), i = t % e.length;
243
+ let l = 0;
244
+ for (let a = 0; a < e.length; a++) {
245
+ const c = r + (a < i ? 1 : 0);
246
+ for (let d = 0; d < c; d++)
247
+ n[l++] = e[a];
248
+ }
249
+ return n;
250
+ }
251
+ function Bn(e, t) {
252
+ return t === 0 ? e === 0 ? 0 : e > 0 ? 100 : -100 : (e - t) / t * 100;
253
+ }
254
+ function Wn(e, t = 1) {
255
+ return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
256
+ }
257
+ function Yn({
258
+ data: e,
259
+ chartConfig: t,
260
+ displayConfig: n = {},
261
+ queryObject: r,
262
+ height: i = "100%",
263
+ colorPalette: l
264
+ }) {
265
+ const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
266
+ try {
267
+ const f = {
268
+ showLegend: n?.showLegend ?? !0,
269
+ showGrid: n?.showGrid ?? !0,
270
+ showTooltip: n?.showTooltip ?? !0,
271
+ stacked: n?.stacked ?? !1
272
+ };
273
+ if (!e || e.length === 0)
274
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
275
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
276
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in bar chart" })
277
+ ] }) });
278
+ let u, m, p = [];
279
+ if (t?.xAxis && t?.yAxis)
280
+ u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
281
+ else if (t?.x && t?.y)
282
+ u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
283
+ else
284
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
285
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
286
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
287
+ ] }) });
288
+ if (!u || !m || m.length === 0)
289
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
290
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
291
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
292
+ ] }) });
293
+ const { data: v, seriesKeys: w } = te(
294
+ e,
295
+ u,
296
+ m,
297
+ r,
298
+ p,
299
+ d
300
+ ), { chartData: y, skippedCount: S } = pt(() => {
301
+ const k = v.filter((M) => w.some((D) => Ae(M[D]))), L = v.length - k.length;
302
+ return { chartData: k, skippedCount: L };
303
+ }, [v, w]), $ = f.stacked === !0, g = w.length === 1 && y.some((k) => {
304
+ const L = k[w[0]];
305
+ return typeof L == "number" && L < 0;
306
+ }), b = f.showLegend, x = {
307
+ ...be,
308
+ left: 40
309
+ // Increased from 20 to 40 for Y-axis label space
310
+ }, h = Fe(n?.target || ""), A = ze(h, y.length);
311
+ let T = y;
312
+ return A.length > 0 && (T = y.map((k, L) => ({
313
+ ...k,
314
+ __target: A[L] || null
315
+ }))), !y || y.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
316
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
317
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for bar chart after transformation" })
318
+ ] }) }) : /* @__PURE__ */ N("div", { className: "relative w-full", style: { height: i }, children: [
319
+ /* @__PURE__ */ s(G, { height: S > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ N(at, { data: T, margin: x, children: [
320
+ f.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
321
+ /* @__PURE__ */ s(
322
+ pe,
323
+ {
324
+ dataKey: "name",
325
+ tick: { fontSize: 12 },
326
+ angle: -45,
327
+ textAnchor: "end",
328
+ height: 60
329
+ }
330
+ ),
331
+ /* @__PURE__ */ s(
332
+ ve,
333
+ {
334
+ tick: { fontSize: 12 },
335
+ label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
336
+ }
337
+ ),
338
+ f.showTooltip && /* @__PURE__ */ s(
339
+ C,
340
+ {
341
+ formatter: (k, L) => k == null ? ["No data", L] : L === "Target" ? [`${k}`, "Target Value"] : [k, L]
342
+ }
343
+ ),
344
+ b && /* @__PURE__ */ s(
345
+ B,
346
+ {
347
+ wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
348
+ iconType: "rect",
349
+ iconSize: 8,
350
+ layout: "horizontal",
351
+ align: "center",
352
+ verticalAlign: "bottom",
353
+ onMouseEnter: (k) => c(String(k.dataKey || "")),
354
+ onMouseLeave: () => c(null)
355
+ }
356
+ ),
357
+ w.map((k, L) => /* @__PURE__ */ s(
358
+ bt,
359
+ {
360
+ dataKey: k,
361
+ stackId: $ ? "stack" : void 0,
362
+ fill: g ? Ge : l?.colors && l.colors[L % l.colors.length] || j[L % j.length],
363
+ fillOpacity: a ? a === k ? 1 : 0.3 : 1,
364
+ children: g && y.map((M, D) => {
365
+ const F = M[k], _ = typeof F == "number" && F < 0 ? Et : Ge;
366
+ return /* @__PURE__ */ s(
367
+ je,
368
+ {
369
+ fill: _,
370
+ fillOpacity: a ? a === k ? 1 : 0.3 : 1
371
+ },
372
+ `cell-${D}`
373
+ );
374
+ })
375
+ },
376
+ k
377
+ )),
378
+ A.length > 0 && /* @__PURE__ */ N(Te, { children: [
379
+ /* @__PURE__ */ s(
380
+ q,
381
+ {
382
+ type: "monotone",
383
+ dataKey: "__target",
384
+ stroke: "#ffffff",
385
+ strokeWidth: 2,
386
+ dot: !1,
387
+ activeDot: !1,
388
+ connectNulls: !1
389
+ }
390
+ ),
391
+ /* @__PURE__ */ s(
392
+ q,
393
+ {
394
+ type: "monotone",
395
+ dataKey: "__target",
396
+ name: "Target",
397
+ stroke: "#8B5CF6",
398
+ strokeWidth: 2,
399
+ strokeDasharray: "2 3",
400
+ dot: !1,
401
+ activeDot: !1,
402
+ connectNulls: !1
403
+ }
404
+ )
405
+ ] })
406
+ ] }) }),
407
+ S > 0 && /* @__PURE__ */ N("div", { className: "text-xs text-dc-text-muted text-center mt-1", children: [
408
+ S,
409
+ " data point",
410
+ S !== 1 ? "s" : "",
411
+ " with no values hidden"
412
+ ] })
413
+ ] });
414
+ } catch (f) {
415
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
416
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Bar Chart Error" }),
417
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
418
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
419
+ ] }) });
420
+ }
421
+ }
422
+ function Xn({
423
+ data: e,
424
+ chartConfig: t,
425
+ displayConfig: n = {},
426
+ queryObject: r,
427
+ height: i = "100%",
428
+ colorPalette: l
429
+ }) {
430
+ const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
431
+ try {
432
+ const f = {
433
+ showLegend: n?.showLegend ?? !0,
434
+ showGrid: n?.showGrid ?? !0,
435
+ showTooltip: n?.showTooltip ?? !0
436
+ };
437
+ if (!e || e.length === 0)
438
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
439
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
440
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in line chart" })
441
+ ] }) });
442
+ let u, m, p = [];
443
+ if (t?.xAxis && t?.yAxis)
444
+ u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
445
+ else if (t?.x && t?.y)
446
+ u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
447
+ else
448
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
449
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
450
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
451
+ ] }) });
452
+ if (!u || !m || m.length === 0)
453
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
454
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
455
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
456
+ ] }) });
457
+ const { data: v, seriesKeys: w } = te(
458
+ e,
459
+ u,
460
+ m,
461
+ r,
462
+ p,
463
+ d
464
+ ), y = f.showLegend, S = {
465
+ ...be,
466
+ left: 40
467
+ // Increased from 20 to 40 for Y-axis label space
468
+ }, $ = Fe(n?.target || ""), g = ze($, v.length);
469
+ let b = v;
470
+ return g.length > 0 && (b = v.map((x, h) => ({
471
+ ...x,
472
+ __target: g[h] || null
473
+ }))), !v || v.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
474
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
475
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for line chart after transformation" })
476
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(Nt, { data: b, margin: S, children: [
477
+ f.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
478
+ /* @__PURE__ */ s(
479
+ pe,
480
+ {
481
+ dataKey: "name",
482
+ tick: { fontSize: 12 },
483
+ angle: -45,
484
+ textAnchor: "end",
485
+ height: 60
486
+ }
487
+ ),
488
+ /* @__PURE__ */ s(
489
+ ve,
490
+ {
491
+ tick: { fontSize: 12 },
492
+ label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
493
+ }
494
+ ),
495
+ f.showTooltip && /* @__PURE__ */ s(
496
+ C,
497
+ {
498
+ formatter: (x, h) => x == null ? ["No data", h] : h === "Target" ? [`${x}`, "Target Value"] : [x, h]
499
+ }
500
+ ),
501
+ y && /* @__PURE__ */ s(
502
+ B,
503
+ {
504
+ wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
505
+ iconType: "line",
506
+ iconSize: 8,
507
+ layout: "horizontal",
508
+ align: "center",
509
+ verticalAlign: "bottom",
510
+ onMouseEnter: (x) => c(String(x.dataKey || "")),
511
+ onMouseLeave: () => c(null)
512
+ }
513
+ ),
514
+ w.map((x, h) => /* @__PURE__ */ s(
515
+ q,
516
+ {
517
+ type: "monotone",
518
+ dataKey: x,
519
+ stroke: l?.colors && l.colors[h % l.colors.length] || j[h % j.length],
520
+ strokeWidth: 2,
521
+ dot: { r: 3 },
522
+ activeDot: { r: 5 },
523
+ strokeOpacity: a ? a === x ? 1 : 0.3 : 1,
524
+ connectNulls: !1
525
+ },
526
+ x
527
+ )),
528
+ g.length > 0 && /* @__PURE__ */ N(Te, { children: [
529
+ /* @__PURE__ */ s(
530
+ q,
531
+ {
532
+ type: "monotone",
533
+ dataKey: "__target",
534
+ stroke: "#ffffff",
535
+ strokeWidth: 2,
536
+ dot: !1,
537
+ activeDot: !1,
538
+ connectNulls: !1
539
+ }
540
+ ),
541
+ /* @__PURE__ */ s(
542
+ q,
543
+ {
544
+ type: "monotone",
545
+ dataKey: "__target",
546
+ name: "Target",
547
+ stroke: "#8B5CF6",
548
+ strokeWidth: 2,
549
+ strokeDasharray: "2 3",
550
+ dot: !1,
551
+ activeDot: !1,
552
+ connectNulls: !1
553
+ }
554
+ )
555
+ ] })
556
+ ] }) });
557
+ } catch (f) {
558
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
559
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Line Chart Error" }),
560
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
561
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
562
+ ] }) });
563
+ }
564
+ }
565
+ function Qn({
566
+ data: e,
567
+ chartConfig: t,
568
+ displayConfig: n = {},
569
+ queryObject: r,
570
+ height: i = "100%",
571
+ colorPalette: l
572
+ }) {
573
+ const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
574
+ try {
575
+ const f = {
576
+ showLegend: n?.showLegend ?? !0,
577
+ showGrid: n?.showGrid ?? !0,
578
+ showTooltip: n?.showTooltip ?? !0,
579
+ stacked: n?.stacked ?? !1
580
+ };
581
+ if (!e || e.length === 0)
582
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
583
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
584
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in area chart" })
585
+ ] }) });
586
+ let u, m, p = [];
587
+ if (t?.xAxis && t?.yAxis)
588
+ u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
589
+ else if (t?.x && t?.y)
590
+ u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
591
+ else
592
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
593
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
594
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
595
+ ] }) });
596
+ if (!u || !m || m.length === 0)
597
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
598
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
599
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
600
+ ] }) });
601
+ const { data: v, seriesKeys: w } = te(
602
+ e,
603
+ u,
604
+ m,
605
+ r,
606
+ p,
607
+ d
608
+ ), y = f.showLegend, S = {
609
+ ...be,
610
+ left: 40
611
+ // Increased from 20 to 40 for Y-axis label space
612
+ }, $ = Fe(n?.target || ""), g = ze($, v.length);
613
+ let b = v;
614
+ return g.length > 0 && (b = v.map((x, h) => ({
615
+ ...x,
616
+ __target: g[h] || null
617
+ }))), !v || v.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
618
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
619
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for area chart after transformation" })
620
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(at, { data: b, margin: S, children: [
621
+ f.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
622
+ /* @__PURE__ */ s(
623
+ pe,
624
+ {
625
+ dataKey: "name",
626
+ tick: { fontSize: 12 },
627
+ angle: -45,
628
+ textAnchor: "end",
629
+ height: 60
630
+ }
631
+ ),
632
+ /* @__PURE__ */ s(
633
+ ve,
634
+ {
635
+ tick: { fontSize: 12 },
636
+ label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
637
+ }
638
+ ),
639
+ f.showTooltip && /* @__PURE__ */ s(
640
+ C,
641
+ {
642
+ formatter: (x, h) => x == null ? ["No data", h] : h === "Target" ? [`${x}`, "Target Value"] : [x, h]
643
+ }
644
+ ),
645
+ y && /* @__PURE__ */ s(
646
+ B,
647
+ {
648
+ wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
649
+ iconType: "rect",
650
+ iconSize: 8,
651
+ layout: "horizontal",
652
+ align: "center",
653
+ verticalAlign: "bottom",
654
+ onMouseEnter: (x) => c(String(x.dataKey || "")),
655
+ onMouseLeave: () => c(null)
656
+ }
657
+ ),
658
+ w.map((x, h) => /* @__PURE__ */ s(
659
+ wt,
660
+ {
661
+ type: "monotone",
662
+ dataKey: x,
663
+ stackId: f.stacked ? "stack" : void 0,
664
+ stroke: l?.colors && l.colors[h % l.colors.length] || j[h % j.length],
665
+ fill: l?.colors && l.colors[h % l.colors.length] || j[h % j.length],
666
+ fillOpacity: a ? a === x ? 0.6 : 0.1 : 0.3,
667
+ strokeWidth: 2,
668
+ strokeOpacity: a ? a === x ? 1 : 0.3 : 1,
669
+ connectNulls: !1
670
+ },
671
+ x
672
+ )),
673
+ g.length > 0 && /* @__PURE__ */ N(Te, { children: [
674
+ /* @__PURE__ */ s(
675
+ q,
676
+ {
677
+ type: "monotone",
678
+ dataKey: "__target",
679
+ stroke: "#ffffff",
680
+ strokeWidth: 2,
681
+ dot: !1,
682
+ activeDot: !1,
683
+ connectNulls: !1
684
+ }
685
+ ),
686
+ /* @__PURE__ */ s(
687
+ q,
688
+ {
689
+ type: "monotone",
690
+ dataKey: "__target",
691
+ name: "Target",
692
+ stroke: "#8B5CF6",
693
+ strokeWidth: 2,
694
+ strokeDasharray: "2 3",
695
+ dot: !1,
696
+ activeDot: !1,
697
+ connectNulls: !1
698
+ }
699
+ )
700
+ ] })
701
+ ] }) });
702
+ } catch (f) {
703
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
704
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Area Chart Error" }),
705
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
706
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
707
+ ] }) });
708
+ }
709
+ }
710
+ function Zn({
711
+ data: e,
712
+ chartConfig: t,
713
+ displayConfig: n = {},
714
+ queryObject: r,
715
+ height: i = "100%",
716
+ colorPalette: l
717
+ }) {
718
+ const [a, c] = O(null), { labelMap: d } = W();
719
+ try {
720
+ const o = {
721
+ showLegend: n?.showLegend ?? !0,
722
+ showTooltip: n?.showTooltip ?? !0
723
+ };
724
+ if (!e || e.length === 0)
725
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
726
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
727
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in pie chart" })
728
+ ] }) });
729
+ let f, u, m, p = [];
730
+ if (t?.xAxis && t?.yAxis)
731
+ u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
732
+ else if (t?.x && t?.y)
733
+ u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
734
+ else
735
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
736
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
737
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "chartConfig.x/y or chartConfig.xAxis/yAxis required for pie chart" })
738
+ ] }) });
739
+ if (!u || !m || m.length === 0)
740
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
741
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
742
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
743
+ ] }) });
744
+ if (p.length > 0) {
745
+ const { data: w } = te(
746
+ e,
747
+ u,
748
+ m,
749
+ r,
750
+ p,
751
+ d
752
+ );
753
+ if (f = [], w.length > 0) {
754
+ const y = w[0];
755
+ Object.keys(y).forEach((S) => {
756
+ S !== "name" && typeof y[S] == "number" && f.push({
757
+ name: String(S),
758
+ value: y[S]
759
+ });
760
+ });
761
+ }
762
+ } else {
763
+ const w = H(r, u);
764
+ f = e.map((y) => {
765
+ let S = R(y[u], w) || String(y[u]) || "Unknown";
766
+ return typeof y[u] == "boolean" ? S = y[u] ? "Active" : "Inactive" : (S === "true" || S === "false") && (S = S === "true" ? "Active" : "Inactive"), {
767
+ name: S,
768
+ value: typeof y[m[0]] == "string" ? parseFloat(y[m[0]]) : y[m[0]] || 0
769
+ };
770
+ });
771
+ }
772
+ const v = f.length;
773
+ return f = f.filter(
774
+ (w) => w.value != null && !isNaN(w.value) && w.value !== 0 && w.value > 0
775
+ ), f.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
776
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
777
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: v > 0 ? `Filtered out ${v} data points (zero or invalid values)` : "No data points to display in pie chart" })
778
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(At, { children: [
779
+ /* @__PURE__ */ s(
780
+ kt,
781
+ {
782
+ data: f,
783
+ cx: "50%",
784
+ cy: "50%",
785
+ outerRadius: "70%",
786
+ dataKey: "value",
787
+ label: o.showLegend ? void 0 : ({ name: w, percent: y }) => `${w} ${((y || 0) * 100).toFixed(0)}%`,
788
+ children: f.map((w, y) => /* @__PURE__ */ s(
789
+ je,
790
+ {
791
+ fill: l?.colors && l.colors[y % l.colors.length] || j[y % j.length],
792
+ fillOpacity: a ? a === f[y].name ? 1 : 0.3 : 1
793
+ },
794
+ `cell-${y}`
795
+ ))
796
+ }
797
+ ),
798
+ o.showTooltip && /* @__PURE__ */ s(C, {}),
799
+ o.showLegend && /* @__PURE__ */ s(
800
+ B,
801
+ {
802
+ wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
803
+ iconType: "circle",
804
+ iconSize: 8,
805
+ layout: "horizontal",
806
+ align: "center",
807
+ verticalAlign: "bottom",
808
+ onMouseEnter: (w) => c(String(w.value || "")),
809
+ onMouseLeave: () => c(null)
810
+ }
811
+ )
812
+ ] }) });
813
+ } catch (o) {
814
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
815
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
816
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
817
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
818
+ ] }) });
819
+ }
820
+ }
821
+ function Jn({
822
+ data: e,
823
+ chartConfig: t,
824
+ displayConfig: n = {},
825
+ queryObject: r,
826
+ height: i = "100%",
827
+ colorPalette: l
828
+ }) {
829
+ const [a, c] = O(null), { getFieldLabel: d } = W();
830
+ try {
831
+ const o = {
832
+ showLegend: n?.showLegend ?? !0,
833
+ showGrid: n?.showGrid ?? !0,
834
+ showTooltip: n?.showTooltip ?? !0
835
+ };
836
+ if (!e || e.length === 0)
837
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
838
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
839
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in scatter chart" })
840
+ ] }) });
841
+ let f, u, m = [];
842
+ if (t?.xAxis && t?.yAxis)
843
+ f = t.xAxis[0], u = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = t.series || [];
844
+ else if (t?.x && t?.y)
845
+ f = t.x, u = Array.isArray(t.y) ? t.y[0] : t.y;
846
+ else
847
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
848
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
849
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
850
+ ] }) });
851
+ if (!f || !u)
852
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
853
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
854
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
855
+ ] }) });
856
+ let p, v = {};
857
+ if (m.length > 0) {
858
+ const g = m[0];
859
+ e.forEach((x) => {
860
+ const h = String(x[g] || "Default");
861
+ v[h] || (v[h] = []);
862
+ const A = H(r, f), T = R(x[f], A) || x[f], k = Z(x[u]), L = typeof T == "string" ? parseFloat(T) : T;
863
+ Ae(L) && k !== null && v[h].push({
864
+ x: L,
865
+ y: k,
866
+ name: `${h} (${T}, ${k})`
867
+ });
868
+ });
869
+ const b = Object.keys(v);
870
+ p = v[b[0]] || [];
871
+ } else {
872
+ const g = H(r, f);
873
+ p = e.map((b) => {
874
+ const x = R(b[f], g) || b[f], h = Z(b[u]), A = typeof x == "string" ? parseFloat(x) : x;
875
+ return {
876
+ x: A,
877
+ y: h,
878
+ name: `(${x}, ${h})`,
879
+ isValid: Ae(A) && h !== null
880
+ };
881
+ }).filter((b) => b.isValid);
882
+ }
883
+ if (!p || p.length === 0)
884
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
885
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
886
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for scatter chart after transformation" })
887
+ ] }) });
888
+ const w = Object.keys(v), y = w.length > 1, S = o.showLegend && y, $ = {
889
+ ...be,
890
+ left: 40
891
+ // Increased from 20 to 40 for Y-axis label space
892
+ };
893
+ return /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(St, { data: p, margin: $, children: [
894
+ o.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
895
+ /* @__PURE__ */ s(
896
+ pe,
897
+ {
898
+ type: "number",
899
+ dataKey: "x",
900
+ name: d(f),
901
+ tick: { fontSize: 12 }
902
+ }
903
+ ),
904
+ /* @__PURE__ */ s(
905
+ ve,
906
+ {
907
+ type: "number",
908
+ dataKey: "y",
909
+ name: d(u),
910
+ tick: { fontSize: 12 },
911
+ label: { value: d(u), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
912
+ }
913
+ ),
914
+ o.showTooltip && /* @__PURE__ */ s(C, {}),
915
+ S && /* @__PURE__ */ s(
916
+ B,
917
+ {
918
+ wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
919
+ iconType: "circle",
920
+ iconSize: 8,
921
+ layout: "horizontal",
922
+ align: "center",
923
+ verticalAlign: "bottom",
924
+ onMouseEnter: (g) => c(String(g.dataKey || "")),
925
+ onMouseLeave: () => c(null)
926
+ }
927
+ ),
928
+ y ? (
929
+ // Multiple series
930
+ w.map((g, b) => /* @__PURE__ */ s(
931
+ Oe,
932
+ {
933
+ name: g,
934
+ data: v[g],
935
+ fill: l?.colors && l.colors[b % l.colors.length] || j[b % j.length],
936
+ fillOpacity: a ? a === g ? 1 : 0.3 : 1
937
+ },
938
+ g
939
+ ))
940
+ ) : (
941
+ // Single series
942
+ /* @__PURE__ */ s(
943
+ Oe,
944
+ {
945
+ name: "Data",
946
+ data: p,
947
+ fill: l?.colors && l.colors[0] || j[0]
948
+ }
949
+ )
950
+ )
951
+ ] }) });
952
+ } catch (o) {
953
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
954
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
955
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
956
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
957
+ ] }) });
958
+ }
959
+ }
960
+ function Pn({
961
+ data: e,
962
+ chartConfig: t,
963
+ displayConfig: n = {},
964
+ queryObject: r,
965
+ height: i = "100%",
966
+ colorPalette: l
967
+ }) {
968
+ const [a, c] = O(null);
969
+ try {
970
+ const d = {
971
+ showLegend: n?.showLegend ?? !0,
972
+ showTooltip: n?.showTooltip ?? !0,
973
+ showGrid: n?.showGrid ?? !0
974
+ };
975
+ if (!e || e.length === 0)
976
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
977
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
978
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radar chart" })
979
+ ] }) });
980
+ let o, f = [];
981
+ if (t?.xAxis && t?.yAxis) {
982
+ const u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [], { data: v, seriesKeys: w } = te(
983
+ e,
984
+ u,
985
+ m,
986
+ r,
987
+ p
988
+ );
989
+ o = v, f = w;
990
+ } else {
991
+ const u = e[0], m = Object.keys(u), p = m.find(
992
+ (w) => typeof u[w] == "string" || w.toLowerCase().includes("subject") || w.toLowerCase().includes("name") || w.toLowerCase().includes("category")
993
+ ) || m[0], v = m.filter(
994
+ (w) => typeof u[w] == "number" && w !== p
995
+ );
996
+ if (v.length === 0)
997
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
998
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
999
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric fields found for radar chart values" })
1000
+ ] }) });
1001
+ if (p) {
1002
+ const w = H(r, p);
1003
+ o = e.map((y) => {
1004
+ const S = {
1005
+ name: R(y[p], w) || String(y[p]) || "Unknown"
1006
+ };
1007
+ return v.forEach(($) => {
1008
+ const g = $.split(".").pop() || $;
1009
+ S[g] = typeof y[$] == "string" ? parseFloat(y[$]) : y[$] || 0;
1010
+ }), S;
1011
+ }), f = v.map((y) => y.split(".").pop() || y);
1012
+ } else
1013
+ o = e.map((w) => ({
1014
+ name: String(w[m[0]] || "Unknown"),
1015
+ value: typeof w[v[0]] == "string" ? parseFloat(w[v[0]]) : w[v[0]] || 0
1016
+ })), f = ["value"];
1017
+ }
1018
+ return !o || o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1019
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1020
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radar chart after transformation" })
1021
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(Mt, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
1022
+ d.showGrid && /* @__PURE__ */ s($t, {}),
1023
+ /* @__PURE__ */ s(
1024
+ Lt,
1025
+ {
1026
+ dataKey: "name",
1027
+ tick: { fontSize: 12 },
1028
+ className: "text-dc-text-muted"
1029
+ }
1030
+ ),
1031
+ /* @__PURE__ */ s(
1032
+ Tt,
1033
+ {
1034
+ tick: { fontSize: 10 },
1035
+ className: "text-dc-text-muted"
1036
+ }
1037
+ ),
1038
+ d.showTooltip && /* @__PURE__ */ s(C, {}),
1039
+ d.showLegend && f.length > 1 && /* @__PURE__ */ s(
1040
+ B,
1041
+ {
1042
+ wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
1043
+ iconType: "rect",
1044
+ iconSize: 8,
1045
+ layout: "horizontal",
1046
+ align: "center",
1047
+ verticalAlign: "bottom",
1048
+ onMouseEnter: (u) => c(String(u.dataKey || "")),
1049
+ onMouseLeave: () => c(null)
1050
+ }
1051
+ ),
1052
+ f.map((u, m) => /* @__PURE__ */ s(
1053
+ jt,
1054
+ {
1055
+ name: u,
1056
+ dataKey: u,
1057
+ stroke: l?.colors && l.colors[m % l.colors.length] || j[m % j.length],
1058
+ fill: l?.colors && l.colors[m % l.colors.length] || j[m % j.length],
1059
+ fillOpacity: a ? a === u ? 0.6 : 0.1 : 0.3,
1060
+ strokeOpacity: a ? a === u ? 1 : 0.3 : 1,
1061
+ strokeWidth: 2
1062
+ },
1063
+ u
1064
+ ))
1065
+ ] }) });
1066
+ } catch (d) {
1067
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1068
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
1069
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1070
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1071
+ ] }) });
1072
+ }
1073
+ }
1074
+ function er({
1075
+ data: e,
1076
+ chartConfig: t,
1077
+ displayConfig: n = {},
1078
+ queryObject: r,
1079
+ height: i = "100%",
1080
+ colorPalette: l
1081
+ }) {
1082
+ const [a, c] = O(null);
1083
+ try {
1084
+ const d = {
1085
+ showLegend: n?.showLegend ?? !0,
1086
+ showTooltip: n?.showTooltip ?? !0
1087
+ };
1088
+ if (!e || e.length === 0)
1089
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1090
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
1091
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radial bar chart" })
1092
+ ] }) });
1093
+ let o;
1094
+ if (t?.xAxis && t?.yAxis) {
1095
+ const f = t.xAxis[0], u = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = H(r, f);
1096
+ o = e.map((p, v) => ({
1097
+ name: R(p[f], m) || String(p[f]) || "Unknown",
1098
+ value: typeof p[u] == "string" ? parseFloat(p[u]) : p[u] || 0,
1099
+ fill: l?.colors && l.colors[v % l.colors.length] || j[v % j.length]
1100
+ }));
1101
+ } else {
1102
+ const f = e[0], u = Object.keys(f), m = u.find(
1103
+ (v) => typeof f[v] == "string" || v.toLowerCase().includes("name") || v.toLowerCase().includes("label") || v.toLowerCase().includes("category")
1104
+ ) || u[0], p = u.find(
1105
+ (v) => typeof f[v] == "number" && v !== m
1106
+ ) || u[1];
1107
+ if (!p)
1108
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1109
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
1110
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
1111
+ ] }) });
1112
+ o = e.map((v, w) => {
1113
+ let y = v[m];
1114
+ return typeof y == "boolean" ? y = y ? "Active" : "Inactive" : y === "true" || y === "false" ? y = y === "true" ? "Active" : "Inactive" : y = String(y), {
1115
+ name: y,
1116
+ value: typeof v[p] == "string" ? parseFloat(v[p]) : v[p] || 0,
1117
+ fill: l?.colors && l.colors[w % l.colors.length] || j[w % j.length]
1118
+ };
1119
+ });
1120
+ }
1121
+ return o = o.filter((f) => f.value != null && f.value !== 0), o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1122
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1123
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radial bar chart after transformation" })
1124
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(
1125
+ Ft,
1126
+ {
1127
+ data: o,
1128
+ innerRadius: "10%",
1129
+ outerRadius: "80%",
1130
+ margin: { top: 20, right: 30, bottom: 20, left: 30 },
1131
+ children: [
1132
+ d.showTooltip && /* @__PURE__ */ s(C, {}),
1133
+ d.showLegend && /* @__PURE__ */ s(
1134
+ B,
1135
+ {
1136
+ wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
1137
+ iconType: "circle",
1138
+ iconSize: 8,
1139
+ layout: "horizontal",
1140
+ align: "center",
1141
+ verticalAlign: "bottom",
1142
+ onMouseEnter: (f) => c(String(f.value || "")),
1143
+ onMouseLeave: () => c(null)
1144
+ }
1145
+ ),
1146
+ /* @__PURE__ */ s(
1147
+ zt,
1148
+ {
1149
+ dataKey: "value",
1150
+ cornerRadius: 4,
1151
+ label: { position: "insideStart", fill: "#fff", fontSize: 12 },
1152
+ children: o.map((f, u) => /* @__PURE__ */ s(
1153
+ je,
1154
+ {
1155
+ fill: f.fill,
1156
+ fillOpacity: a ? a === f.name ? 1 : 0.3 : 1
1157
+ },
1158
+ `cell-${u}`
1159
+ ))
1160
+ }
1161
+ )
1162
+ ]
1163
+ }
1164
+ ) });
1165
+ } catch (d) {
1166
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
1167
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
1168
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1169
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1170
+ ] }) });
1171
+ }
1172
+ }
1173
+ function de(e, t) {
1174
+ return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
1175
+ }
1176
+ function Vt(e, t) {
1177
+ return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
1178
+ }
1179
+ function lt(e) {
1180
+ let t, n, r;
1181
+ e.length !== 2 ? (t = de, n = (c, d) => de(e(c), d), r = (c, d) => e(c) - d) : (t = e === de || e === Vt ? e : It, n = e, r = e);
1182
+ function i(c, d, o = 0, f = c.length) {
1183
+ if (o < f) {
1184
+ if (t(d, d) !== 0) return f;
1185
+ do {
1186
+ const u = o + f >>> 1;
1187
+ n(c[u], d) < 0 ? o = u + 1 : f = u;
1188
+ } while (o < f);
1189
+ }
1190
+ return o;
1191
+ }
1192
+ function l(c, d, o = 0, f = c.length) {
1193
+ if (o < f) {
1194
+ if (t(d, d) !== 0) return f;
1195
+ do {
1196
+ const u = o + f >>> 1;
1197
+ n(c[u], d) <= 0 ? o = u + 1 : f = u;
1198
+ } while (o < f);
1199
+ }
1200
+ return o;
1201
+ }
1202
+ function a(c, d, o = 0, f = c.length) {
1203
+ const u = i(c, d, o, f - 1);
1204
+ return u > o && r(c[u - 1], d) > -r(c[u], d) ? u - 1 : u;
1205
+ }
1206
+ return { left: i, center: a, right: l };
1207
+ }
1208
+ function It() {
1209
+ return 0;
1210
+ }
1211
+ function _t(e) {
1212
+ return e === null ? NaN : +e;
1213
+ }
1214
+ const Ht = lt(de), ot = Ht.right;
1215
+ lt(_t).center;
1216
+ class Ce extends Map {
1217
+ constructor(t, n = Ct) {
1218
+ if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, i] of t) this.set(r, i);
1219
+ }
1220
+ get(t) {
1221
+ return super.get(Ue(this, t));
1222
+ }
1223
+ has(t) {
1224
+ return super.has(Ue(this, t));
1225
+ }
1226
+ set(t, n) {
1227
+ return super.set(Ot(this, t), n);
1228
+ }
1229
+ delete(t) {
1230
+ return super.delete(Gt(this, t));
1231
+ }
1232
+ }
1233
+ function Ue({ _intern: e, _key: t }, n) {
1234
+ const r = t(n);
1235
+ return e.has(r) ? e.get(r) : n;
1236
+ }
1237
+ function Ot({ _intern: e, _key: t }, n) {
1238
+ const r = t(n);
1239
+ return e.has(r) ? e.get(r) : (e.set(r, n), n);
1240
+ }
1241
+ function Gt({ _intern: e, _key: t }, n) {
1242
+ const r = t(n);
1243
+ return e.has(r) && (n = e.get(r), e.delete(r)), n;
1244
+ }
1245
+ function Ct(e) {
1246
+ return e !== null && typeof e == "object" ? e.valueOf() : e;
1247
+ }
1248
+ const Ut = Math.sqrt(50), qt = Math.sqrt(10), Kt = Math.sqrt(2);
1249
+ function fe(e, t, n) {
1250
+ const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / Math.pow(10, i), a = l >= Ut ? 10 : l >= qt ? 5 : l >= Kt ? 2 : 1;
1251
+ let c, d, o;
1252
+ return i < 0 ? (o = Math.pow(10, -i) / a, c = Math.round(e * o), d = Math.round(t * o), c / o < e && ++c, d / o > t && --d, o = -o) : (o = Math.pow(10, i) * a, c = Math.round(e / o), d = Math.round(t / o), c * o < e && ++c, d * o > t && --d), d < c && 0.5 <= n && n < 2 ? fe(e, t, n * 2) : [c, d, o];
1253
+ }
1254
+ function Bt(e, t, n) {
1255
+ if (t = +t, e = +e, n = +n, !(n > 0)) return [];
1256
+ if (e === t) return [e];
1257
+ const r = t < e, [i, l, a] = r ? fe(t, e, n) : fe(e, t, n);
1258
+ if (!(l >= i)) return [];
1259
+ const c = l - i + 1, d = new Array(c);
1260
+ if (r)
1261
+ if (a < 0) for (let o = 0; o < c; ++o) d[o] = (l - o) / -a;
1262
+ else for (let o = 0; o < c; ++o) d[o] = (l - o) * a;
1263
+ else if (a < 0) for (let o = 0; o < c; ++o) d[o] = (i + o) / -a;
1264
+ else for (let o = 0; o < c; ++o) d[o] = (i + o) * a;
1265
+ return d;
1266
+ }
1267
+ function Se(e, t, n) {
1268
+ return t = +t, e = +e, n = +n, fe(e, t, n)[2];
1269
+ }
1270
+ function Wt(e, t, n) {
1271
+ t = +t, e = +e, n = +n;
1272
+ const r = t < e, i = r ? Se(t, e, n) : Se(e, t, n);
1273
+ return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
1274
+ }
1275
+ function De(e, t, n) {
1276
+ e.prototype = t.prototype = n, n.constructor = e;
1277
+ }
1278
+ function ct(e, t) {
1279
+ var n = Object.create(e.prototype);
1280
+ for (var r in t) n[r] = t[r];
1281
+ return n;
1282
+ }
1283
+ function ne() {
1284
+ }
1285
+ var J = 0.7, ue = 1 / J, X = "\\s*([+-]?\\d+)\\s*", P = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", V = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Yt = /^#([0-9a-f]{3,8})$/, Xt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Qt = new RegExp(`^rgb\\(${V},${V},${V}\\)$`), Zt = new RegExp(`^rgba\\(${X},${X},${X},${P}\\)$`), Jt = new RegExp(`^rgba\\(${V},${V},${V},${P}\\)$`), Pt = new RegExp(`^hsl\\(${P},${V},${V}\\)$`), en = new RegExp(`^hsla\\(${P},${V},${V},${P}\\)$`), qe = {
1286
+ aliceblue: 15792383,
1287
+ antiquewhite: 16444375,
1288
+ aqua: 65535,
1289
+ aquamarine: 8388564,
1290
+ azure: 15794175,
1291
+ beige: 16119260,
1292
+ bisque: 16770244,
1293
+ black: 0,
1294
+ blanchedalmond: 16772045,
1295
+ blue: 255,
1296
+ blueviolet: 9055202,
1297
+ brown: 10824234,
1298
+ burlywood: 14596231,
1299
+ cadetblue: 6266528,
1300
+ chartreuse: 8388352,
1301
+ chocolate: 13789470,
1302
+ coral: 16744272,
1303
+ cornflowerblue: 6591981,
1304
+ cornsilk: 16775388,
1305
+ crimson: 14423100,
1306
+ cyan: 65535,
1307
+ darkblue: 139,
1308
+ darkcyan: 35723,
1309
+ darkgoldenrod: 12092939,
1310
+ darkgray: 11119017,
1311
+ darkgreen: 25600,
1312
+ darkgrey: 11119017,
1313
+ darkkhaki: 12433259,
1314
+ darkmagenta: 9109643,
1315
+ darkolivegreen: 5597999,
1316
+ darkorange: 16747520,
1317
+ darkorchid: 10040012,
1318
+ darkred: 9109504,
1319
+ darksalmon: 15308410,
1320
+ darkseagreen: 9419919,
1321
+ darkslateblue: 4734347,
1322
+ darkslategray: 3100495,
1323
+ darkslategrey: 3100495,
1324
+ darkturquoise: 52945,
1325
+ darkviolet: 9699539,
1326
+ deeppink: 16716947,
1327
+ deepskyblue: 49151,
1328
+ dimgray: 6908265,
1329
+ dimgrey: 6908265,
1330
+ dodgerblue: 2003199,
1331
+ firebrick: 11674146,
1332
+ floralwhite: 16775920,
1333
+ forestgreen: 2263842,
1334
+ fuchsia: 16711935,
1335
+ gainsboro: 14474460,
1336
+ ghostwhite: 16316671,
1337
+ gold: 16766720,
1338
+ goldenrod: 14329120,
1339
+ gray: 8421504,
1340
+ green: 32768,
1341
+ greenyellow: 11403055,
1342
+ grey: 8421504,
1343
+ honeydew: 15794160,
1344
+ hotpink: 16738740,
1345
+ indianred: 13458524,
1346
+ indigo: 4915330,
1347
+ ivory: 16777200,
1348
+ khaki: 15787660,
1349
+ lavender: 15132410,
1350
+ lavenderblush: 16773365,
1351
+ lawngreen: 8190976,
1352
+ lemonchiffon: 16775885,
1353
+ lightblue: 11393254,
1354
+ lightcoral: 15761536,
1355
+ lightcyan: 14745599,
1356
+ lightgoldenrodyellow: 16448210,
1357
+ lightgray: 13882323,
1358
+ lightgreen: 9498256,
1359
+ lightgrey: 13882323,
1360
+ lightpink: 16758465,
1361
+ lightsalmon: 16752762,
1362
+ lightseagreen: 2142890,
1363
+ lightskyblue: 8900346,
1364
+ lightslategray: 7833753,
1365
+ lightslategrey: 7833753,
1366
+ lightsteelblue: 11584734,
1367
+ lightyellow: 16777184,
1368
+ lime: 65280,
1369
+ limegreen: 3329330,
1370
+ linen: 16445670,
1371
+ magenta: 16711935,
1372
+ maroon: 8388608,
1373
+ mediumaquamarine: 6737322,
1374
+ mediumblue: 205,
1375
+ mediumorchid: 12211667,
1376
+ mediumpurple: 9662683,
1377
+ mediumseagreen: 3978097,
1378
+ mediumslateblue: 8087790,
1379
+ mediumspringgreen: 64154,
1380
+ mediumturquoise: 4772300,
1381
+ mediumvioletred: 13047173,
1382
+ midnightblue: 1644912,
1383
+ mintcream: 16121850,
1384
+ mistyrose: 16770273,
1385
+ moccasin: 16770229,
1386
+ navajowhite: 16768685,
1387
+ navy: 128,
1388
+ oldlace: 16643558,
1389
+ olive: 8421376,
1390
+ olivedrab: 7048739,
1391
+ orange: 16753920,
1392
+ orangered: 16729344,
1393
+ orchid: 14315734,
1394
+ palegoldenrod: 15657130,
1395
+ palegreen: 10025880,
1396
+ paleturquoise: 11529966,
1397
+ palevioletred: 14381203,
1398
+ papayawhip: 16773077,
1399
+ peachpuff: 16767673,
1400
+ peru: 13468991,
1401
+ pink: 16761035,
1402
+ plum: 14524637,
1403
+ powderblue: 11591910,
1404
+ purple: 8388736,
1405
+ rebeccapurple: 6697881,
1406
+ red: 16711680,
1407
+ rosybrown: 12357519,
1408
+ royalblue: 4286945,
1409
+ saddlebrown: 9127187,
1410
+ salmon: 16416882,
1411
+ sandybrown: 16032864,
1412
+ seagreen: 3050327,
1413
+ seashell: 16774638,
1414
+ sienna: 10506797,
1415
+ silver: 12632256,
1416
+ skyblue: 8900331,
1417
+ slateblue: 6970061,
1418
+ slategray: 7372944,
1419
+ slategrey: 7372944,
1420
+ snow: 16775930,
1421
+ springgreen: 65407,
1422
+ steelblue: 4620980,
1423
+ tan: 13808780,
1424
+ teal: 32896,
1425
+ thistle: 14204888,
1426
+ tomato: 16737095,
1427
+ turquoise: 4251856,
1428
+ violet: 15631086,
1429
+ wheat: 16113331,
1430
+ white: 16777215,
1431
+ whitesmoke: 16119285,
1432
+ yellow: 16776960,
1433
+ yellowgreen: 10145074
1434
+ };
1435
+ De(ne, ee, {
1436
+ copy(e) {
1437
+ return Object.assign(new this.constructor(), this, e);
1438
+ },
1439
+ displayable() {
1440
+ return this.rgb().displayable();
1441
+ },
1442
+ hex: Ke,
1443
+ // Deprecated! Use color.formatHex.
1444
+ formatHex: Ke,
1445
+ formatHex8: tn,
1446
+ formatHsl: nn,
1447
+ formatRgb: Be,
1448
+ toString: Be
1449
+ });
1450
+ function Ke() {
1451
+ return this.rgb().formatHex();
1452
+ }
1453
+ function tn() {
1454
+ return this.rgb().formatHex8();
1455
+ }
1456
+ function nn() {
1457
+ return dt(this).formatHsl();
1458
+ }
1459
+ function Be() {
1460
+ return this.rgb().formatRgb();
1461
+ }
1462
+ function ee(e) {
1463
+ var t, n;
1464
+ return e = (e + "").trim().toLowerCase(), (t = Yt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? We(t) : n === 3 ? new z(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? le(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? le(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Xt.exec(e)) ? new z(t[1], t[2], t[3], 1) : (t = Qt.exec(e)) ? new z(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Zt.exec(e)) ? le(t[1], t[2], t[3], t[4]) : (t = Jt.exec(e)) ? le(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Pt.exec(e)) ? Qe(t[1], t[2] / 100, t[3] / 100, 1) : (t = en.exec(e)) ? Qe(t[1], t[2] / 100, t[3] / 100, t[4]) : qe.hasOwnProperty(e) ? We(qe[e]) : e === "transparent" ? new z(NaN, NaN, NaN, 0) : null;
1465
+ }
1466
+ function We(e) {
1467
+ return new z(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1468
+ }
1469
+ function le(e, t, n, r) {
1470
+ return r <= 0 && (e = t = n = NaN), new z(e, t, n, r);
1471
+ }
1472
+ function rn(e) {
1473
+ return e instanceof ne || (e = ee(e)), e ? (e = e.rgb(), new z(e.r, e.g, e.b, e.opacity)) : new z();
1474
+ }
1475
+ function Me(e, t, n, r) {
1476
+ return arguments.length === 1 ? rn(e) : new z(e, t, n, r ?? 1);
1477
+ }
1478
+ function z(e, t, n, r) {
1479
+ this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
1480
+ }
1481
+ De(z, Me, ct(ne, {
1482
+ brighter(e) {
1483
+ return e = e == null ? ue : Math.pow(ue, e), new z(this.r * e, this.g * e, this.b * e, this.opacity);
1484
+ },
1485
+ darker(e) {
1486
+ return e = e == null ? J : Math.pow(J, e), new z(this.r * e, this.g * e, this.b * e, this.opacity);
1487
+ },
1488
+ rgb() {
1489
+ return this;
1490
+ },
1491
+ clamp() {
1492
+ return new z(K(this.r), K(this.g), K(this.b), me(this.opacity));
1493
+ },
1494
+ displayable() {
1495
+ return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1496
+ },
1497
+ hex: Ye,
1498
+ // Deprecated! Use color.formatHex.
1499
+ formatHex: Ye,
1500
+ formatHex8: sn,
1501
+ formatRgb: Xe,
1502
+ toString: Xe
1503
+ }));
1504
+ function Ye() {
1505
+ return `#${U(this.r)}${U(this.g)}${U(this.b)}`;
1506
+ }
1507
+ function sn() {
1508
+ return `#${U(this.r)}${U(this.g)}${U(this.b)}${U((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1509
+ }
1510
+ function Xe() {
1511
+ const e = me(this.opacity);
1512
+ return `${e === 1 ? "rgb(" : "rgba("}${K(this.r)}, ${K(this.g)}, ${K(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1513
+ }
1514
+ function me(e) {
1515
+ return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
1516
+ }
1517
+ function K(e) {
1518
+ return Math.max(0, Math.min(255, Math.round(e) || 0));
1519
+ }
1520
+ function U(e) {
1521
+ return e = K(e), (e < 16 ? "0" : "") + e.toString(16);
1522
+ }
1523
+ function Qe(e, t, n, r) {
1524
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new E(e, t, n, r);
1525
+ }
1526
+ function dt(e) {
1527
+ if (e instanceof E) return new E(e.h, e.s, e.l, e.opacity);
1528
+ if (e instanceof ne || (e = ee(e)), !e) return new E();
1529
+ if (e instanceof E) return e;
1530
+ e = e.rgb();
1531
+ var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), l = Math.max(t, n, r), a = NaN, c = l - i, d = (l + i) / 2;
1532
+ return c ? (t === l ? a = (n - r) / c + (n < r) * 6 : n === l ? a = (r - t) / c + 2 : a = (t - n) / c + 4, c /= d < 0.5 ? l + i : 2 - l - i, a *= 60) : c = d > 0 && d < 1 ? 0 : a, new E(a, c, d, e.opacity);
1533
+ }
1534
+ function an(e, t, n, r) {
1535
+ return arguments.length === 1 ? dt(e) : new E(e, t, n, r ?? 1);
1536
+ }
1537
+ function E(e, t, n, r) {
1538
+ this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1539
+ }
1540
+ De(E, an, ct(ne, {
1541
+ brighter(e) {
1542
+ return e = e == null ? ue : Math.pow(ue, e), new E(this.h, this.s, this.l * e, this.opacity);
1543
+ },
1544
+ darker(e) {
1545
+ return e = e == null ? J : Math.pow(J, e), new E(this.h, this.s, this.l * e, this.opacity);
1546
+ },
1547
+ rgb() {
1548
+ var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - r;
1549
+ return new z(
1550
+ Ne(e >= 240 ? e - 240 : e + 120, i, r),
1551
+ Ne(e, i, r),
1552
+ Ne(e < 120 ? e + 240 : e - 120, i, r),
1553
+ this.opacity
1554
+ );
1555
+ },
1556
+ clamp() {
1557
+ return new E(Ze(this.h), oe(this.s), oe(this.l), me(this.opacity));
1558
+ },
1559
+ displayable() {
1560
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1561
+ },
1562
+ formatHsl() {
1563
+ const e = me(this.opacity);
1564
+ return `${e === 1 ? "hsl(" : "hsla("}${Ze(this.h)}, ${oe(this.s) * 100}%, ${oe(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1565
+ }
1566
+ }));
1567
+ function Ze(e) {
1568
+ return e = (e || 0) % 360, e < 0 ? e + 360 : e;
1569
+ }
1570
+ function oe(e) {
1571
+ return Math.max(0, Math.min(1, e || 0));
1572
+ }
1573
+ function Ne(e, t, n) {
1574
+ return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
1575
+ }
1576
+ const Ee = (e) => () => e;
1577
+ function ln(e, t) {
1578
+ return function(n) {
1579
+ return e + n * t;
1580
+ };
1581
+ }
1582
+ function on(e, t, n) {
1583
+ return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) {
1584
+ return Math.pow(e + r * t, n);
1585
+ };
1586
+ }
1587
+ function cn(e) {
1588
+ return (e = +e) == 1 ? ft : function(t, n) {
1589
+ return n - t ? on(t, n, e) : Ee(isNaN(t) ? n : t);
1590
+ };
1591
+ }
1592
+ function ft(e, t) {
1593
+ var n = t - e;
1594
+ return n ? ln(e, n) : Ee(isNaN(e) ? t : e);
1595
+ }
1596
+ const Je = (function e(t) {
1597
+ var n = cn(t);
1598
+ function r(i, l) {
1599
+ var a = n((i = Me(i)).r, (l = Me(l)).r), c = n(i.g, l.g), d = n(i.b, l.b), o = ft(i.opacity, l.opacity);
1600
+ return function(f) {
1601
+ return i.r = a(f), i.g = c(f), i.b = d(f), i.opacity = o(f), i + "";
1602
+ };
1603
+ }
1604
+ return r.gamma = e, r;
1605
+ })(1);
1606
+ function dn(e, t) {
1607
+ t || (t = []);
1608
+ var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
1609
+ return function(l) {
1610
+ for (i = 0; i < n; ++i) r[i] = e[i] * (1 - l) + t[i] * l;
1611
+ return r;
1612
+ };
1613
+ }
1614
+ function fn(e) {
1615
+ return ArrayBuffer.isView(e) && !(e instanceof DataView);
1616
+ }
1617
+ function un(e, t) {
1618
+ var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = new Array(r), l = new Array(n), a;
1619
+ for (a = 0; a < r; ++a) i[a] = Re(e[a], t[a]);
1620
+ for (; a < n; ++a) l[a] = t[a];
1621
+ return function(c) {
1622
+ for (a = 0; a < r; ++a) l[a] = i[a](c);
1623
+ return l;
1624
+ };
1625
+ }
1626
+ function mn(e, t) {
1627
+ var n = /* @__PURE__ */ new Date();
1628
+ return e = +e, t = +t, function(r) {
1629
+ return n.setTime(e * (1 - r) + t * r), n;
1630
+ };
1631
+ }
1632
+ function xe(e, t) {
1633
+ return e = +e, t = +t, function(n) {
1634
+ return e * (1 - n) + t * n;
1635
+ };
1636
+ }
1637
+ function xn(e, t) {
1638
+ var n = {}, r = {}, i;
1639
+ (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
1640
+ for (i in t)
1641
+ i in e ? n[i] = Re(e[i], t[i]) : r[i] = t[i];
1642
+ return function(l) {
1643
+ for (i in n) r[i] = n[i](l);
1644
+ return r;
1645
+ };
1646
+ }
1647
+ var $e = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, we = new RegExp($e.source, "g");
1648
+ function hn(e) {
1649
+ return function() {
1650
+ return e;
1651
+ };
1652
+ }
1653
+ function yn(e) {
1654
+ return function(t) {
1655
+ return e(t) + "";
1656
+ };
1657
+ }
1658
+ function gn(e, t) {
1659
+ var n = $e.lastIndex = we.lastIndex = 0, r, i, l, a = -1, c = [], d = [];
1660
+ for (e = e + "", t = t + ""; (r = $e.exec(e)) && (i = we.exec(t)); )
1661
+ (l = i.index) > n && (l = t.slice(n, l), c[a] ? c[a] += l : c[++a] = l), (r = r[0]) === (i = i[0]) ? c[a] ? c[a] += i : c[++a] = i : (c[++a] = null, d.push({ i: a, x: xe(r, i) })), n = we.lastIndex;
1662
+ return n < t.length && (l = t.slice(n), c[a] ? c[a] += l : c[++a] = l), c.length < 2 ? d[0] ? yn(d[0].x) : hn(t) : (t = d.length, function(o) {
1663
+ for (var f = 0, u; f < t; ++f) c[(u = d[f]).i] = u.x(o);
1664
+ return c.join("");
1665
+ });
1666
+ }
1667
+ function Re(e, t) {
1668
+ var n = typeof t, r;
1669
+ return t == null || n === "boolean" ? Ee(t) : (n === "number" ? xe : n === "string" ? (r = ee(t)) ? (t = r, Je) : gn : t instanceof ee ? Je : t instanceof Date ? mn : fn(t) ? dn : Array.isArray(t) ? un : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? xn : xe)(e, t);
1670
+ }
1671
+ function pn(e, t) {
1672
+ return e = +e, t = +t, function(n) {
1673
+ return Math.round(e * (1 - n) + t * n);
1674
+ };
1675
+ }
1676
+ function vn(e) {
1677
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
1678
+ }
1679
+ function he(e, t) {
1680
+ if ((n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
1681
+ var n, r = e.slice(0, n);
1682
+ return [
1683
+ r.length > 1 ? r[0] + r.slice(2) : r,
1684
+ +e.slice(n + 1)
1685
+ ];
1686
+ }
1687
+ function Q(e) {
1688
+ return e = he(Math.abs(e)), e ? e[1] : NaN;
1689
+ }
1690
+ function bn(e, t) {
1691
+ return function(n, r) {
1692
+ for (var i = n.length, l = [], a = 0, c = e[0], d = 0; i > 0 && c > 0 && (d + c + 1 > r && (c = Math.max(1, r - d)), l.push(n.substring(i -= c, i + c)), !((d += c + 1) > r)); )
1693
+ c = e[a = (a + 1) % e.length];
1694
+ return l.reverse().join(t);
1695
+ };
1696
+ }
1697
+ function Nn(e) {
1698
+ return function(t) {
1699
+ return t.replace(/[0-9]/g, function(n) {
1700
+ return e[+n];
1701
+ });
1702
+ };
1703
+ }
1704
+ var wn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1705
+ function ye(e) {
1706
+ if (!(t = wn.exec(e))) throw new Error("invalid format: " + e);
1707
+ var t;
1708
+ return new Ve({
1709
+ fill: t[1],
1710
+ align: t[2],
1711
+ sign: t[3],
1712
+ symbol: t[4],
1713
+ zero: t[5],
1714
+ width: t[6],
1715
+ comma: t[7],
1716
+ precision: t[8] && t[8].slice(1),
1717
+ trim: t[9],
1718
+ type: t[10]
1719
+ });
1720
+ }
1721
+ ye.prototype = Ve.prototype;
1722
+ function Ve(e) {
1723
+ this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
1724
+ }
1725
+ Ve.prototype.toString = function() {
1726
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
1727
+ };
1728
+ function An(e) {
1729
+ e: for (var t = e.length, n = 1, r = -1, i; n < t; ++n)
1730
+ switch (e[n]) {
1731
+ case ".":
1732
+ r = i = n;
1733
+ break;
1734
+ case "0":
1735
+ r === 0 && (r = n), i = n;
1736
+ break;
1737
+ default:
1738
+ if (!+e[n]) break e;
1739
+ r > 0 && (r = 0);
1740
+ break;
1741
+ }
1742
+ return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
1743
+ }
1744
+ var ut;
1745
+ function kn(e, t) {
1746
+ var n = he(e, t);
1747
+ if (!n) return e + "";
1748
+ var r = n[0], i = n[1], l = i - (ut = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = r.length;
1749
+ return l === a ? r : l > a ? r + new Array(l - a + 1).join("0") : l > 0 ? r.slice(0, l) + "." + r.slice(l) : "0." + new Array(1 - l).join("0") + he(e, Math.max(0, t + l - 1))[0];
1750
+ }
1751
+ function Pe(e, t) {
1752
+ var n = he(e, t);
1753
+ if (!n) return e + "";
1754
+ var r = n[0], i = n[1];
1755
+ return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
1756
+ }
1757
+ const et = {
1758
+ "%": (e, t) => (e * 100).toFixed(t),
1759
+ b: (e) => Math.round(e).toString(2),
1760
+ c: (e) => e + "",
1761
+ d: vn,
1762
+ e: (e, t) => e.toExponential(t),
1763
+ f: (e, t) => e.toFixed(t),
1764
+ g: (e, t) => e.toPrecision(t),
1765
+ o: (e) => Math.round(e).toString(8),
1766
+ p: (e, t) => Pe(e * 100, t),
1767
+ r: Pe,
1768
+ s: kn,
1769
+ X: (e) => Math.round(e).toString(16).toUpperCase(),
1770
+ x: (e) => Math.round(e).toString(16)
1771
+ };
1772
+ function tt(e) {
1773
+ return e;
1774
+ }
1775
+ var nt = Array.prototype.map, rt = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1776
+ function Sn(e) {
1777
+ var t = e.grouping === void 0 || e.thousands === void 0 ? tt : bn(nt.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", l = e.numerals === void 0 ? tt : Nn(nt.call(e.numerals, String)), a = e.percent === void 0 ? "%" : e.percent + "", c = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
1778
+ function o(u) {
1779
+ u = ye(u);
1780
+ var m = u.fill, p = u.align, v = u.sign, w = u.symbol, y = u.zero, S = u.width, $ = u.comma, g = u.precision, b = u.trim, x = u.type;
1781
+ x === "n" ? ($ = !0, x = "g") : et[x] || (g === void 0 && (g = 12), b = !0, x = "g"), (y || m === "0" && p === "=") && (y = !0, m = "0", p = "=");
1782
+ var h = w === "$" ? n : w === "#" && /[boxX]/.test(x) ? "0" + x.toLowerCase() : "", A = w === "$" ? r : /[%p]/.test(x) ? a : "", T = et[x], k = /[defgprs%]/.test(x);
1783
+ g = g === void 0 ? 6 : /[gprs]/.test(x) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
1784
+ function L(M) {
1785
+ var D = h, F = A, _, _e, re;
1786
+ if (x === "c")
1787
+ F = T(M) + F, M = "";
1788
+ else {
1789
+ M = +M;
1790
+ var ie = M < 0 || 1 / M < 0;
1791
+ if (M = isNaN(M) ? d : T(Math.abs(M), g), b && (M = An(M)), ie && +M == 0 && v !== "+" && (ie = !1), D = (ie ? v === "(" ? v : c : v === "-" || v === "(" ? "" : v) + D, F = (x === "s" ? rt[8 + ut / 3] : "") + F + (ie && v === "(" ? ")" : ""), k) {
1792
+ for (_ = -1, _e = M.length; ++_ < _e; )
1793
+ if (re = M.charCodeAt(_), 48 > re || re > 57) {
1794
+ F = (re === 46 ? i + M.slice(_ + 1) : M.slice(_)) + F, M = M.slice(0, _);
1795
+ break;
1796
+ }
1797
+ }
1798
+ }
1799
+ $ && !y && (M = t(M, 1 / 0));
1800
+ var se = D.length + M.length + F.length, I = se < S ? new Array(S - se + 1).join(m) : "";
1801
+ switch ($ && y && (M = t(I + M, I.length ? S - F.length : 1 / 0), I = ""), p) {
1802
+ case "<":
1803
+ M = D + M + F + I;
1804
+ break;
1805
+ case "=":
1806
+ M = D + I + M + F;
1807
+ break;
1808
+ case "^":
1809
+ M = I.slice(0, se = I.length >> 1) + D + M + F + I.slice(se);
1810
+ break;
1811
+ default:
1812
+ M = I + D + M + F;
1813
+ break;
1814
+ }
1815
+ return l(M);
1816
+ }
1817
+ return L.toString = function() {
1818
+ return u + "";
1819
+ }, L;
1820
+ }
1821
+ function f(u, m) {
1822
+ var p = o((u = ye(u), u.type = "f", u)), v = Math.max(-8, Math.min(8, Math.floor(Q(m) / 3))) * 3, w = Math.pow(10, -v), y = rt[8 + v / 3];
1823
+ return function(S) {
1824
+ return p(w * S) + y;
1825
+ };
1826
+ }
1827
+ return {
1828
+ format: o,
1829
+ formatPrefix: f
1830
+ };
1831
+ }
1832
+ var ce, mt, xt;
1833
+ Mn({
1834
+ thousands: ",",
1835
+ grouping: [3],
1836
+ currency: ["$", ""]
1837
+ });
1838
+ function Mn(e) {
1839
+ return ce = Sn(e), mt = ce.format, xt = ce.formatPrefix, ce;
1840
+ }
1841
+ function $n(e) {
1842
+ return Math.max(0, -Q(Math.abs(e)));
1843
+ }
1844
+ function Ln(e, t) {
1845
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Q(t) / 3))) * 3 - Q(Math.abs(e)));
1846
+ }
1847
+ function Tn(e, t) {
1848
+ return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Q(t) - Q(e)) + 1;
1849
+ }
1850
+ function Ie(e, t) {
1851
+ switch (arguments.length) {
1852
+ case 0:
1853
+ break;
1854
+ case 1:
1855
+ this.range(e);
1856
+ break;
1857
+ default:
1858
+ this.range(t).domain(e);
1859
+ break;
1860
+ }
1861
+ return this;
1862
+ }
1863
+ const it = Symbol("implicit");
1864
+ function ht() {
1865
+ var e = new Ce(), t = [], n = [], r = it;
1866
+ function i(l) {
1867
+ let a = e.get(l);
1868
+ if (a === void 0) {
1869
+ if (r !== it) return r;
1870
+ e.set(l, a = t.push(l) - 1);
1871
+ }
1872
+ return n[a % n.length];
1873
+ }
1874
+ return i.domain = function(l) {
1875
+ if (!arguments.length) return t.slice();
1876
+ t = [], e = new Ce();
1877
+ for (const a of l)
1878
+ e.has(a) || e.set(a, t.push(a) - 1);
1879
+ return i;
1880
+ }, i.range = function(l) {
1881
+ return arguments.length ? (n = Array.from(l), i) : n.slice();
1882
+ }, i.unknown = function(l) {
1883
+ return arguments.length ? (r = l, i) : r;
1884
+ }, i.copy = function() {
1885
+ return ht(t, n).unknown(r);
1886
+ }, Ie.apply(i, arguments), i;
1887
+ }
1888
+ function jn(e) {
1889
+ return function() {
1890
+ return e;
1891
+ };
1892
+ }
1893
+ function Fn(e) {
1894
+ return +e;
1895
+ }
1896
+ var st = [0, 1];
1897
+ function Y(e) {
1898
+ return e;
1899
+ }
1900
+ function Le(e, t) {
1901
+ return (t -= e = +e) ? function(n) {
1902
+ return (n - e) / t;
1903
+ } : jn(isNaN(t) ? NaN : 0.5);
1904
+ }
1905
+ function zn(e, t) {
1906
+ var n;
1907
+ return e > t && (n = e, e = t, t = n), function(r) {
1908
+ return Math.max(e, Math.min(t, r));
1909
+ };
1910
+ }
1911
+ function Dn(e, t, n) {
1912
+ var r = e[0], i = e[1], l = t[0], a = t[1];
1913
+ return i < r ? (r = Le(i, r), l = n(a, l)) : (r = Le(r, i), l = n(l, a)), function(c) {
1914
+ return l(r(c));
1915
+ };
1916
+ }
1917
+ function En(e, t, n) {
1918
+ var r = Math.min(e.length, t.length) - 1, i = new Array(r), l = new Array(r), a = -1;
1919
+ for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++a < r; )
1920
+ i[a] = Le(e[a], e[a + 1]), l[a] = n(t[a], t[a + 1]);
1921
+ return function(c) {
1922
+ var d = ot(e, c, 1, r) - 1;
1923
+ return l[d](i[d](c));
1924
+ };
1925
+ }
1926
+ function Rn(e, t) {
1927
+ return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
1928
+ }
1929
+ function Vn() {
1930
+ var e = st, t = st, n = Re, r, i, l, a = Y, c, d, o;
1931
+ function f() {
1932
+ var m = Math.min(e.length, t.length);
1933
+ return a !== Y && (a = zn(e[0], e[m - 1])), c = m > 2 ? En : Dn, d = o = null, u;
1934
+ }
1935
+ function u(m) {
1936
+ return m == null || isNaN(m = +m) ? l : (d || (d = c(e.map(r), t, n)))(r(a(m)));
1937
+ }
1938
+ return u.invert = function(m) {
1939
+ return a(i((o || (o = c(t, e.map(r), xe)))(m)));
1940
+ }, u.domain = function(m) {
1941
+ return arguments.length ? (e = Array.from(m, Fn), f()) : e.slice();
1942
+ }, u.range = function(m) {
1943
+ return arguments.length ? (t = Array.from(m), f()) : t.slice();
1944
+ }, u.rangeRound = function(m) {
1945
+ return t = Array.from(m), n = pn, f();
1946
+ }, u.clamp = function(m) {
1947
+ return arguments.length ? (a = m ? !0 : Y, f()) : a !== Y;
1948
+ }, u.interpolate = function(m) {
1949
+ return arguments.length ? (n = m, f()) : n;
1950
+ }, u.unknown = function(m) {
1951
+ return arguments.length ? (l = m, u) : l;
1952
+ }, function(m, p) {
1953
+ return r = m, i = p, f();
1954
+ };
1955
+ }
1956
+ function In() {
1957
+ return Vn()(Y, Y);
1958
+ }
1959
+ function _n(e, t, n, r) {
1960
+ var i = Wt(e, t, n), l;
1961
+ switch (r = ye(r ?? ",f"), r.type) {
1962
+ case "s": {
1963
+ var a = Math.max(Math.abs(e), Math.abs(t));
1964
+ return r.precision == null && !isNaN(l = Ln(i, a)) && (r.precision = l), xt(r, a);
1965
+ }
1966
+ case "":
1967
+ case "e":
1968
+ case "g":
1969
+ case "p":
1970
+ case "r": {
1971
+ r.precision == null && !isNaN(l = Tn(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = l - (r.type === "e"));
1972
+ break;
1973
+ }
1974
+ case "f":
1975
+ case "%": {
1976
+ r.precision == null && !isNaN(l = $n(i)) && (r.precision = l - (r.type === "%") * 2);
1977
+ break;
1978
+ }
1979
+ }
1980
+ return mt(r);
1981
+ }
1982
+ function yt(e) {
1983
+ var t = e.domain;
1984
+ return e.ticks = function(n) {
1985
+ var r = t();
1986
+ return Bt(r[0], r[r.length - 1], n ?? 10);
1987
+ }, e.tickFormat = function(n, r) {
1988
+ var i = t();
1989
+ return _n(i[0], i[i.length - 1], n ?? 10, r);
1990
+ }, e.nice = function(n) {
1991
+ n == null && (n = 10);
1992
+ var r = t(), i = 0, l = r.length - 1, a = r[i], c = r[l], d, o, f = 10;
1993
+ for (c < a && (o = a, a = c, c = o, o = i, i = l, l = o); f-- > 0; ) {
1994
+ if (o = Se(a, c, n), o === d)
1995
+ return r[i] = a, r[l] = c, t(r);
1996
+ if (o > 0)
1997
+ a = Math.floor(a / o) * o, c = Math.ceil(c / o) * o;
1998
+ else if (o < 0)
1999
+ a = Math.ceil(a * o) / o, c = Math.floor(c * o) / o;
2000
+ else
2001
+ break;
2002
+ d = o;
2003
+ }
2004
+ return e;
2005
+ }, e;
2006
+ }
2007
+ function Hn() {
2008
+ var e = In();
2009
+ return e.copy = function() {
2010
+ return Rn(e, Hn());
2011
+ }, Ie.apply(e, arguments), yt(e);
2012
+ }
2013
+ function gt() {
2014
+ var e = 0, t = 1, n = 1, r = [0.5], i = [0, 1], l;
2015
+ function a(d) {
2016
+ return d != null && d <= d ? i[ot(r, d, 0, n)] : l;
2017
+ }
2018
+ function c() {
2019
+ var d = -1;
2020
+ for (r = new Array(n); ++d < n; ) r[d] = ((d + 1) * t - (d - n) * e) / (n + 1);
2021
+ return a;
2022
+ }
2023
+ return a.domain = function(d) {
2024
+ return arguments.length ? ([e, t] = d, e = +e, t = +t, c()) : [e, t];
2025
+ }, a.range = function(d) {
2026
+ return arguments.length ? (n = (i = Array.from(d)).length - 1, c()) : i.slice();
2027
+ }, a.invertExtent = function(d) {
2028
+ var o = i.indexOf(d);
2029
+ return o < 0 ? [NaN, NaN] : o < 1 ? [e, r[0]] : o >= n ? [r[n - 1], t] : [r[o - 1], r[o]];
2030
+ }, a.unknown = function(d) {
2031
+ return arguments.length && (l = d), a;
2032
+ }, a.thresholds = function() {
2033
+ return r.slice();
2034
+ }, a.copy = function() {
2035
+ return gt().domain([e, t]).range(i).unknown(l);
2036
+ }, Ie.apply(yt(a), arguments);
2037
+ }
2038
+ function tr({
2039
+ data: e,
2040
+ chartConfig: t,
2041
+ displayConfig: n = {},
2042
+ queryObject: r,
2043
+ height: i = "100%",
2044
+ colorPalette: l
2045
+ }) {
2046
+ const [a, c] = O(null), { getFieldLabel: d } = W();
2047
+ try {
2048
+ const o = {
2049
+ showTooltip: n?.showTooltip ?? !0,
2050
+ showLegend: n?.showLegend ?? !0
2051
+ };
2052
+ if (!e || e.length === 0)
2053
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2054
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2055
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in treemap chart" })
2056
+ ] }) });
2057
+ let f, u = !1, m;
2058
+ if (t?.xAxis && t?.yAxis) {
2059
+ const g = t.xAxis[0], b = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
2060
+ m = Array.isArray(t.series) ? t.series[0] : t.series;
2061
+ const x = H(r, g);
2062
+ if (m) {
2063
+ const h = e.map((A) => {
2064
+ const T = A[m];
2065
+ return typeof T == "string" ? parseFloat(T) : T;
2066
+ }).filter((A) => !isNaN(A));
2067
+ if (u = h.length === e.length && h.every((A) => typeof A == "number"), u) {
2068
+ const A = Math.min(...h), T = Math.max(...h), k = gt().domain([A, T]).range(ae);
2069
+ f = e.map((L) => {
2070
+ const M = typeof L[m] == "string" ? parseFloat(L[m]) : L[m], D = k(M);
2071
+ return {
2072
+ name: R(L[g], x) || String(L[g]) || "Unknown",
2073
+ size: typeof L[b] == "string" ? parseFloat(L[b]) : L[b] || 0,
2074
+ fill: D,
2075
+ series: String(L[m])
2076
+ };
2077
+ });
2078
+ } else {
2079
+ const A = [...new Set(e.map((k) => String(k[m])))], T = ht().domain(A).range(l?.colors || j);
2080
+ f = e.map((k) => ({
2081
+ name: R(k[g], x) || String(k[g]) || "Unknown",
2082
+ size: typeof k[b] == "string" ? parseFloat(k[b]) : k[b] || 0,
2083
+ fill: T(String(k[m])),
2084
+ series: String(k[m])
2085
+ }));
2086
+ }
2087
+ } else
2088
+ f = e.map((h, A) => ({
2089
+ name: R(h[g], x) || String(h[g]) || "Unknown",
2090
+ size: typeof h[b] == "string" ? parseFloat(h[b]) : h[b] || 0,
2091
+ fill: l?.colors && l.colors[A % l.colors.length] || j[A % j.length]
2092
+ }));
2093
+ } else {
2094
+ const g = e[0], b = Object.keys(g), x = b.find(
2095
+ (A) => typeof g[A] == "string" || A.toLowerCase().includes("name") || A.toLowerCase().includes("label") || A.toLowerCase().includes("category")
2096
+ ) || b[0], h = b.find((A) => A.toLowerCase().includes("size")) || b.find(
2097
+ (A) => typeof g[A] == "number" && A !== x
2098
+ ) || b[1];
2099
+ if (!h)
2100
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2101
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
2102
+ /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
2103
+ ] }) });
2104
+ f = e.map((A, T) => {
2105
+ let k = A[x];
2106
+ return typeof k == "boolean" ? k = k ? "Active" : "Inactive" : k === "true" || k === "false" ? k = k === "true" ? "Active" : "Inactive" : k = String(k), {
2107
+ name: k,
2108
+ size: typeof A[h] == "string" ? parseFloat(A[h]) : A[h] || 0,
2109
+ fill: l?.colors && l.colors[T % l.colors.length] || j[T % j.length]
2110
+ };
2111
+ });
2112
+ }
2113
+ if (f = f.filter((g) => g.size != null && g.size > 0), f.length === 0)
2114
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2115
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
2116
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for treemap chart after transformation" })
2117
+ ] }) });
2118
+ const p = (g) => {
2119
+ const { x: b, y: x, width: h, height: A, index: T, name: k, size: L } = g;
2120
+ return h < 20 || A < 20 ? null : /* @__PURE__ */ N("g", { children: [
2121
+ /* @__PURE__ */ s(
2122
+ "rect",
2123
+ {
2124
+ x: b,
2125
+ y: x,
2126
+ width: h,
2127
+ height: A,
2128
+ style: {
2129
+ fill: f[T]?.fill || l?.colors && l.colors[T % l.colors.length] || j[T % j.length],
2130
+ fillOpacity: a !== null ? a === T ? 1 : 0.6 : 0.8,
2131
+ stroke: "#fff",
2132
+ strokeWidth: 2,
2133
+ cursor: "pointer"
2134
+ },
2135
+ onMouseEnter: () => c(T),
2136
+ onMouseLeave: () => c(null)
2137
+ }
2138
+ ),
2139
+ /* @__PURE__ */ s(
2140
+ "foreignObject",
2141
+ {
2142
+ x: b,
2143
+ y: x,
2144
+ width: h,
2145
+ height: A,
2146
+ style: { pointerEvents: "none", overflow: "visible" },
2147
+ children: /* @__PURE__ */ N(
2148
+ "div",
2149
+ {
2150
+ style: {
2151
+ width: "100%",
2152
+ height: "100%",
2153
+ display: "flex",
2154
+ flexDirection: "column",
2155
+ alignItems: "center",
2156
+ justifyContent: "center",
2157
+ padding: "4px",
2158
+ boxSizing: "border-box",
2159
+ color: "#ffffff",
2160
+ textShadow: "0 1px 2px rgba(0,0,0,0.8)",
2161
+ fontFamily: "system-ui, -apple-system, sans-serif",
2162
+ overflow: "hidden"
2163
+ },
2164
+ children: [
2165
+ h > 40 && A > 30 && /* @__PURE__ */ s(
2166
+ "div",
2167
+ {
2168
+ style: {
2169
+ fontSize: `${Math.max(10, Math.min(h / 8, A / 8, 16))}px`,
2170
+ fontWeight: "600",
2171
+ textAlign: "center",
2172
+ lineHeight: "1.2",
2173
+ marginBottom: h > 60 && A > 45 ? "4px" : "0",
2174
+ wordBreak: "break-word",
2175
+ hyphens: "auto"
2176
+ },
2177
+ children: k
2178
+ }
2179
+ ),
2180
+ h > 60 && A > 45 && /* @__PURE__ */ s(
2181
+ "div",
2182
+ {
2183
+ style: {
2184
+ fontSize: `${Math.max(8, Math.min(h / 10, A / 10, 14))}px`,
2185
+ textAlign: "center",
2186
+ opacity: 0.9
2187
+ },
2188
+ children: typeof L == "number" ? L.toLocaleString() : L
2189
+ }
2190
+ )
2191
+ ]
2192
+ }
2193
+ )
2194
+ }
2195
+ )
2196
+ ] });
2197
+ }, w = f.some((g) => "series" in g) ? [...new Set(f.map((g) => g.series).filter(Boolean))] : [];
2198
+ let y = [];
2199
+ if (o.showLegend && m)
2200
+ if (u) {
2201
+ const g = Math.min(...e.map((x) => {
2202
+ const h = x[m];
2203
+ return typeof h == "string" ? parseFloat(h) : h;
2204
+ })), b = Math.max(...e.map((x) => {
2205
+ const h = x[m];
2206
+ return typeof h == "string" ? parseFloat(h) : h;
2207
+ }));
2208
+ y = ae.map((x, h) => {
2209
+ const A = h / (ae.length - 1);
2210
+ return {
2211
+ value: (g + (b - g) * A).toFixed(2),
2212
+ type: "rect",
2213
+ color: x
2214
+ };
2215
+ });
2216
+ } else w.length > 1 && (y = w.map((g, b) => ({
2217
+ value: g,
2218
+ type: "rect",
2219
+ color: j[b % j.length]
2220
+ })));
2221
+ const S = o.showLegend && y.length > 0, $ = S ? typeof i == "string" && i.includes("%") ? i : typeof i == "number" ? i + 60 : `calc(${i} + 60px)` : i;
2222
+ return /* @__PURE__ */ N("div", { className: "w-full", style: { height: $ }, children: [
2223
+ /* @__PURE__ */ s(G, { height: S ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ s(
2224
+ Dt,
2225
+ {
2226
+ data: f,
2227
+ dataKey: "size",
2228
+ aspectRatio: 4 / 3,
2229
+ stroke: "#fff",
2230
+ content: /* @__PURE__ */ s(p, {}),
2231
+ children: o.showTooltip && /* @__PURE__ */ s(C, {})
2232
+ }
2233
+ ) }),
2234
+ S && /* @__PURE__ */ s("div", { className: "flex justify-center items-center mt-4 pb-2", children: u ? (
2235
+ // Gradient legend for numeric series
2236
+ /* @__PURE__ */ N("div", { className: "flex flex-col items-center", children: [
2237
+ /* @__PURE__ */ s("div", { className: "text-xs font-semibold text-dc-text-primary mb-2", children: m ? d(m) : "" }),
2238
+ /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
2239
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((g) => {
2240
+ const b = g[m];
2241
+ return typeof b == "string" ? parseFloat(b) : b;
2242
+ })).toFixed(2) }),
2243
+ /* @__PURE__ */ s(
2244
+ "div",
2245
+ {
2246
+ className: "h-4 rounded-sm",
2247
+ style: {
2248
+ width: "200px",
2249
+ background: `linear-gradient(to right, ${ae.join(", ")})`
2250
+ }
2251
+ }
2252
+ ),
2253
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.max(...e.map((g) => {
2254
+ const b = g[m];
2255
+ return typeof b == "string" ? parseFloat(b) : b;
2256
+ })).toFixed(2) })
2257
+ ] })
2258
+ ] })
2259
+ ) : (
2260
+ // Discrete legend for categorical series
2261
+ /* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-4", children: y.map((g, b) => /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
2262
+ /* @__PURE__ */ s(
2263
+ "div",
2264
+ {
2265
+ className: "w-3 h-3 rounded-xs",
2266
+ style: { backgroundColor: g.color }
2267
+ }
2268
+ ),
2269
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: g.value })
2270
+ ] }, b)) })
2271
+ ) })
2272
+ ] });
2273
+ } catch (o) {
2274
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2275
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
2276
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
2277
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
2278
+ ] }) });
2279
+ }
2280
+ }
2281
+ function nr({
2282
+ data: e,
2283
+ chartConfig: t,
2284
+ height: n = 300
2285
+ }) {
2286
+ const { getFieldLabel: r } = W();
2287
+ if (!e || e.length === 0)
2288
+ return /* @__PURE__ */ s(
2289
+ "div",
2290
+ {
2291
+ className: "flex items-center justify-center w-full",
2292
+ style: { height: n },
2293
+ children: /* @__PURE__ */ N("div", { className: "text-center text-dc-text-muted", children: [
2294
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2295
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data to display in table" })
2296
+ ] })
2297
+ }
2298
+ );
2299
+ const i = Object.keys(e[0] || {}), l = t?.xAxis && t.xAxis.length > 0 ? t.xAxis.filter((a) => i.includes(a)) : i;
2300
+ return l.length === 0 ? /* @__PURE__ */ s(
2301
+ "div",
2302
+ {
2303
+ className: "flex items-center justify-center w-full",
2304
+ style: { height: n },
2305
+ children: /* @__PURE__ */ N("div", { className: "text-center text-dc-text-muted", children: [
2306
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
2307
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "Data structure is invalid" })
2308
+ ] })
2309
+ }
2310
+ ) : /* @__PURE__ */ s("div", { className: "w-full overflow-auto", style: { height: n }, children: /* @__PURE__ */ N("table", { className: "min-w-full divide-y border-dc-border", children: [
2311
+ /* @__PURE__ */ s("thead", { className: "bg-dc-surface-secondary sticky top-0", children: /* @__PURE__ */ s("tr", { children: l.map((a) => /* @__PURE__ */ s(
2312
+ "th",
2313
+ {
2314
+ className: "px-3 py-2 text-left text-xs font-medium text-dc-text-muted uppercase tracking-wider",
2315
+ children: r(a)
2316
+ },
2317
+ a
2318
+ )) }) }),
2319
+ /* @__PURE__ */ s("tbody", { className: "bg-dc-surface divide-y border-dc-border", children: e.map((a, c) => /* @__PURE__ */ s("tr", { className: "hover:bg-dc-surface-secondary", children: l.map((d) => /* @__PURE__ */ s(
2320
+ "td",
2321
+ {
2322
+ className: "px-3 py-2 whitespace-nowrap text-sm text-dc-text",
2323
+ children: On(a[d])
2324
+ },
2325
+ d
2326
+ )) }, c)) })
2327
+ ] }) });
2328
+ }
2329
+ function On(e) {
2330
+ return e == null ? "" : typeof e == "number" ? e.toLocaleString() : typeof e == "boolean" ? e ? "Yes" : "No" : String(e);
2331
+ }
2332
+ function rr(e) {
2333
+ const t = Gn(e);
2334
+ return {
2335
+ portlets: e,
2336
+ layouts: t
2337
+ };
2338
+ }
2339
+ function Gn(e) {
2340
+ const t = e.map((n) => ({
2341
+ i: n.id,
2342
+ x: n.x,
2343
+ y: n.y,
2344
+ w: n.w,
2345
+ h: n.h,
2346
+ minW: 3,
2347
+ minH: 3
2348
+ }));
2349
+ return {
2350
+ lg: t,
2351
+ md: t.map((n) => ({ ...n, w: Math.min(n.w, 8) })),
2352
+ sm: t.map((n) => ({ ...n, w: Math.min(n.w, 6) })),
2353
+ xs: t.map((n) => ({ ...n, w: Math.min(n.w, 4) })),
2354
+ xxs: t.map((n) => ({ ...n, w: 2 }))
2355
+ };
2356
+ }
2357
+ function ir(e, t = {}) {
2358
+ const { formatNumbers: n = !0, precision: r = 2 } = t;
2359
+ return n ? e.map((i) => {
2360
+ const l = {};
2361
+ for (const [a, c] of Object.entries(i))
2362
+ typeof c == "number" ? l[a] = Number(c.toFixed(r)) : l[a] = c;
2363
+ return l;
2364
+ }) : e;
2365
+ }
2366
+ function sr() {
2367
+ return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2368
+ }
2369
+ function ar(e, t = 6, n = 4) {
2370
+ return e.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...e.map((i) => i.y + i.h)) };
2371
+ }
2372
+ function lr(e) {
2373
+ try {
2374
+ const t = JSON.parse(e);
2375
+ return typeof t != "object" || t === null ? { valid: !1, error: "Query must be a JSON object" } : !t.measures && !t.dimensions ? { valid: !1, error: "Query must have at least measures or dimensions" } : { valid: !0, query: t };
2376
+ } catch {
2377
+ return { valid: !1, error: "Invalid JSON format" };
2378
+ }
2379
+ }
2380
+ function or() {
2381
+ return {
2382
+ title: "Sample Chart",
2383
+ query: JSON.stringify({
2384
+ measures: ["count"],
2385
+ dimensions: ["category"]
2386
+ }, null, 2),
2387
+ chartType: "bar",
2388
+ chartConfig: {
2389
+ x: "category",
2390
+ y: ["count"]
2391
+ },
2392
+ displayConfig: {
2393
+ showLegend: !0,
2394
+ showGrid: !0,
2395
+ showTooltip: !0
2396
+ },
2397
+ w: 6,
2398
+ h: 4,
2399
+ x: 0,
2400
+ y: 0
2401
+ };
2402
+ }
2403
+ export {
2404
+ Qn as A,
2405
+ Yn as B,
2406
+ be as C,
2407
+ nr as D,
2408
+ ar as E,
2409
+ lr as F,
2410
+ or as G,
2411
+ Ge as H,
2412
+ Xn as L,
2413
+ Et as N,
2414
+ Zn as P,
2415
+ Pn as R,
2416
+ Jn as S,
2417
+ tr as T,
2418
+ er as a,
2419
+ Je as b,
2420
+ rr as c,
2421
+ gn as d,
2422
+ ee as e,
2423
+ ir as f,
2424
+ Rn as g,
2425
+ Ie as h,
2426
+ xe as i,
2427
+ Y as j,
2428
+ H as k,
2429
+ yt as l,
2430
+ R as m,
2431
+ Ae as n,
2432
+ Hn as o,
2433
+ Z as p,
2434
+ gt as q,
2435
+ ae as r,
2436
+ ht as s,
2437
+ Vn as t,
2438
+ j as u,
2439
+ Fe as v,
2440
+ Wn as w,
2441
+ Bn as x,
2442
+ Gn as y,
2443
+ sr as z
2444
+ };
2445
+ //# sourceMappingURL=charts-CC85023I.js.map