drizzle-cube 0.1.46 → 0.1.47

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.
@@ -1,6 +1,6 @@
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";
1
+ import { jsx as s, jsxs as p, Fragment as Fe } from "react/jsx-runtime";
2
+ import { useState as O, useMemo as vt } from "react";
3
+ import { ResponsiveContainer as He, Tooltip as at, ComposedChart as lt, CartesianGrid as pe, XAxis as ve, YAxis as be, Legend as K, Bar as bt, Cell as De, Line as q, LineChart as Nt, Area as wt, PieChart as At, Pie as St, ScatterChart as kt, Scatter as Oe, RadarChart as Mt, PolarGrid as $t, PolarAngleAxis as Lt, PolarRadiusAxis as Tt, Radar as Ft, RadialBarChart as Dt, RadialBar as Et, Treemap as jt } from "recharts";
4
4
  import { u as W } from "./providers-aaWIe5KD.js";
5
5
  function G({ children: e, height: t = "100%" }) {
6
6
  try {
@@ -13,7 +13,7 @@ function G({ children: e, height: t = "100%" }) {
13
13
  };
14
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
15
  } catch (n) {
16
- return /* @__PURE__ */ N(
16
+ return /* @__PURE__ */ p(
17
17
  "div",
18
18
  {
19
19
  className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border border-dashed rounded-lg",
@@ -26,9 +26,9 @@ function G({ children: e, height: t = "100%" }) {
26
26
  );
27
27
  }
28
28
  }
29
- function C({ formatter: e, labelFormatter: t }) {
29
+ function Y({ formatter: e, labelFormatter: t }) {
30
30
  return /* @__PURE__ */ s(
31
- vt,
31
+ at,
32
32
  {
33
33
  formatter: e,
34
34
  labelFormatter: t,
@@ -44,7 +44,7 @@ function C({ formatter: e, labelFormatter: t }) {
44
44
  }
45
45
  );
46
46
  }
47
- const j = [
47
+ const F = [
48
48
  "#3b82f6",
49
49
  // blue
50
50
  "#10b981",
@@ -61,7 +61,7 @@ const j = [
61
61
  // cyan
62
62
  "#84cc16"
63
63
  // lime
64
- ], ae = [
64
+ ], le = [
65
65
  "#440154",
66
66
  // dark purple
67
67
  "#414487",
@@ -74,16 +74,16 @@ const j = [
74
74
  // green
75
75
  "#fde725"
76
76
  // yellow
77
- ], Ge = "#10b981", Et = "#ef4444", be = {
77
+ ], Ge = "#10b981", zt = "#ef4444", Ne = {
78
78
  top: 5,
79
79
  right: 30,
80
80
  left: 20,
81
81
  bottom: 5
82
82
  };
83
- function Ae(e) {
83
+ function Se(e) {
84
84
  return e != null && !isNaN(Number(e));
85
85
  }
86
- function Z(e) {
86
+ function P(e) {
87
87
  if (e == null) return null;
88
88
  const t = typeof e == "string" ? parseFloat(e) : Number(e);
89
89
  return isNaN(t) ? null : t;
@@ -91,7 +91,7 @@ function Z(e) {
91
91
  function ke(e, t) {
92
92
  return t[e] || e;
93
93
  }
94
- function R(e, t) {
94
+ function z(e, t) {
95
95
  if (!e) return String(e || "Unknown");
96
96
  const n = String(e);
97
97
  if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
@@ -119,19 +119,19 @@ function R(e, t) {
119
119
  case "minute":
120
120
  return `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
121
121
  }
122
- const f = i.getUTCSeconds(), u = i.getUTCMilliseconds();
123
- if (c === "01" && d === 0 && o === 0 && f === 0 && u === 0) {
122
+ const u = i.getUTCSeconds(), f = i.getUTCMilliseconds();
123
+ if (c === "01" && d === 0 && o === 0 && u === 0 && f === 0) {
124
124
  if (a === "01" || a === "04" || a === "07" || a === "10") {
125
125
  const m = Math.floor(i.getUTCMonth() / 3) + 1;
126
126
  return `${l}-Q${m}`;
127
127
  }
128
128
  return `${l}-${a}`;
129
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")}`;
130
+ return d === 0 && o === 0 && u === 0 && f === 0 ? `${l}-${a}-${c}` : o === 0 && u === 0 && f === 0 ? `${l}-${a}-${c} ${String(d).padStart(2, "0")}:00` : `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
131
131
  }
132
132
  return n;
133
133
  }
134
- function H(e, t) {
134
+ function I(e, t) {
135
135
  try {
136
136
  if (e?.timeDimensions) {
137
137
  const r = e.timeDimensions.find((i) => t === i.dimension || t.startsWith(i.dimension.replace(".", "_")) || t === `${i.dimension}_${i.granularity}`);
@@ -151,72 +151,72 @@ function H(e, t) {
151
151
  }
152
152
  function Rt(e, t, n, r, i = {}) {
153
153
  if (!e || e.length === 0) return [];
154
- const l = H(r, t);
154
+ const l = I(r, t);
155
155
  return e.map((a) => {
156
156
  const c = {
157
- name: R(a[t], l) || a[t] || "Unknown"
157
+ name: z(a[t], l) || a[t] || "Unknown"
158
158
  };
159
159
  return n.forEach((d) => {
160
160
  const o = ke(d, i);
161
- c[o] = Z(a[d]);
161
+ c[o] = P(a[d]);
162
162
  }), c;
163
163
  });
164
164
  }
165
- function te(e, t, n, r, i, l = {}) {
165
+ function re(e, t, n, r, i, l = {}) {
166
166
  if (!e || e.length === 0)
167
167
  return { data: [], seriesKeys: [], hasDimensions: !1 };
168
168
  const a = r || {}, c = [
169
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")
170
+ ...a.timeDimensions?.map((v) => v.dimension) || []
171
+ ], d = a.measures || [], o = n.filter((v) => d.includes(v)), u = (i || []).filter((v) => c.includes(v));
172
+ if (u.length > 0) {
173
+ const v = {};
174
+ e.forEach((h) => {
175
+ const $ = I(r, t), T = z(h[t], $) || h[t] || "Unknown";
176
+ v[T] || (v[T] = { name: String(T) }), o.forEach((N) => {
177
+ const S = ke(N, l), g = P(h[N]);
178
+ if (g !== null) {
179
+ const x = v[T][S];
180
+ v[T][S] = x == null ? g : x + g;
181
+ } else S in v[T] || (v[T][S] = null);
182
+ }), u.forEach((N) => {
183
+ const S = h[N];
184
+ if (S != null) {
185
+ const g = String(S), x = o[0] || d.find(
186
+ (y) => y.includes("totalCost") || y.includes("count") || y.includes("sum")
187
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);
188
+ if (x) {
189
+ const y = P(h[x]);
190
+ if (y !== null) {
191
+ const k = v[T][g];
192
+ v[T][g] = k == null ? y : k + y;
193
+ } else g in v[T] || (v[T][g] = null);
194
194
  }
195
195
  }
196
196
  });
197
197
  });
198
- const v = Object.values(p), w = Array.from(new Set(
198
+ const w = Object.values(v), b = Array.from(new Set(
199
199
  e.flatMap(
200
- (y) => f.map((S) => {
201
- const $ = y[S];
202
- return $ != null ? String($) : null;
203
- }).filter((S) => S !== null)
200
+ (h) => u.map(($) => {
201
+ const T = h[$];
202
+ return T != null ? String(T) : null;
203
+ }).filter(($) => $ !== null)
204
204
  )
205
205
  ));
206
206
  return {
207
- data: v,
208
- seriesKeys: w,
207
+ data: w,
208
+ seriesKeys: b,
209
209
  hasDimensions: !0
210
210
  };
211
211
  }
212
- const u = Rt(e, t, n, r, l), m = n.map((p) => ke(p, l));
212
+ const f = Rt(e, t, n, r, l), m = n.map((v) => ke(v, l));
213
213
  return {
214
- data: u,
214
+ data: f,
215
215
  seriesKeys: m,
216
216
  hasDimensions: !1
217
217
  };
218
218
  }
219
- function Fe(e) {
219
+ function Ee(e) {
220
220
  if (!e || typeof e != "string")
221
221
  return [];
222
222
  const t = e.trim();
@@ -234,7 +234,7 @@ function Fe(e) {
234
234
  return console.warn("Failed to parse target values:", n), [];
235
235
  }
236
236
  }
237
- function ze(e, t) {
237
+ function je(e, t) {
238
238
  if (e.length === 0 || t <= 0)
239
239
  return [];
240
240
  if (e.length === 1)
@@ -248,7 +248,7 @@ function ze(e, t) {
248
248
  }
249
249
  return n;
250
250
  }
251
- function Bn(e, t) {
251
+ function Kn(e, t) {
252
252
  return t === 0 ? e === 0 ? 0 : e > 0 ? 100 : -100 : (e - t) / t * 100;
253
253
  }
254
254
  function Wn(e, t = 1) {
@@ -264,62 +264,62 @@ function Yn({
264
264
  }) {
265
265
  const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
266
266
  try {
267
- const f = {
267
+ const u = {
268
268
  showLegend: n?.showLegend ?? !0,
269
269
  showGrid: n?.showGrid ?? !0,
270
270
  showTooltip: n?.showTooltip ?? !0,
271
271
  stacked: n?.stacked ?? !1
272
272
  };
273
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: [
274
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
275
275
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
276
276
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in bar chart" })
277
277
  ] }) });
278
- let u, m, p = [];
278
+ let f, m, v = [];
279
279
  if (t?.xAxis && t?.yAxis)
280
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
280
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
281
281
  else if (t?.x && t?.y)
282
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
282
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
283
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: [
284
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
285
285
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
286
286
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
287
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: [
288
+ if (!f || !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__ */ p("div", { className: "text-center", children: [
290
290
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
291
291
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
292
292
  ] }) });
293
- const { data: v, seriesKeys: w } = te(
293
+ const { data: w, seriesKeys: b } = re(
294
294
  e,
295
- u,
295
+ f,
296
296
  m,
297
297
  r,
298
- p,
298
+ v,
299
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]];
300
+ ), { chartData: h, skippedCount: $ } = vt(() => {
301
+ const A = w.filter((M) => b.some((D) => Se(M[D]))), L = w.length - A.length;
302
+ return { chartData: A, skippedCount: L };
303
+ }, [w, b]), T = u.stacked === !0, N = b.length === 1 && h.some((A) => {
304
+ const L = A[b[0]];
305
305
  return typeof L == "number" && L < 0;
306
- }), b = f.showLegend, x = {
307
- ...be,
306
+ }), S = u.showLegend, g = {
307
+ ...Ne,
308
308
  left: 40
309
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: [
310
+ }, x = Ee(n?.target || ""), y = je(x, h.length);
311
+ let k = h;
312
+ return y.length > 0 && (k = h.map((A, L) => ({
313
+ ...A,
314
+ __target: y[L] || null
315
+ }))), !h || h.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
316
316
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
317
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" }),
318
+ ] }) }) : /* @__PURE__ */ p("div", { className: "relative w-full", style: { height: i }, children: [
319
+ /* @__PURE__ */ s(G, { height: $ > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ p(lt, { data: k, margin: g, children: [
320
+ u.showGrid && /* @__PURE__ */ s(pe, { strokeDasharray: "3 3" }),
321
321
  /* @__PURE__ */ s(
322
- pe,
322
+ ve,
323
323
  {
324
324
  dataKey: "name",
325
325
  tick: { fontSize: 12 },
@@ -329,20 +329,20 @@ function Yn({
329
329
  }
330
330
  ),
331
331
  /* @__PURE__ */ s(
332
- ve,
332
+ be,
333
333
  {
334
334
  tick: { fontSize: 12 },
335
335
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
336
336
  }
337
337
  ),
338
- f.showTooltip && /* @__PURE__ */ s(
339
- C,
338
+ u.showTooltip && /* @__PURE__ */ s(
339
+ Y,
340
340
  {
341
- formatter: (k, L) => k == null ? ["No data", L] : L === "Target" ? [`${k}`, "Target Value"] : [k, L]
341
+ formatter: (A, L) => A == null ? ["No data", L] : L === "Target" ? [`${A}`, "Target Value"] : [A, L]
342
342
  }
343
343
  ),
344
- b && /* @__PURE__ */ s(
345
- B,
344
+ S && /* @__PURE__ */ s(
345
+ K,
346
346
  {
347
347
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
348
348
  iconType: "rect",
@@ -350,32 +350,32 @@ function Yn({
350
350
  layout: "horizontal",
351
351
  align: "center",
352
352
  verticalAlign: "bottom",
353
- onMouseEnter: (k) => c(String(k.dataKey || "")),
353
+ onMouseEnter: (A) => c(String(A.dataKey || "")),
354
354
  onMouseLeave: () => c(null)
355
355
  }
356
356
  ),
357
- w.map((k, L) => /* @__PURE__ */ s(
357
+ b.map((A, L) => /* @__PURE__ */ s(
358
358
  bt,
359
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;
360
+ dataKey: A,
361
+ stackId: T ? "stack" : void 0,
362
+ fill: N ? Ge : l?.colors && l.colors[L % l.colors.length] || F[L % F.length],
363
+ fillOpacity: a ? a === A ? 1 : 0.3 : 1,
364
+ children: N && h.map((M, D) => {
365
+ const E = M[A], R = typeof E == "number" && E < 0 ? zt : Ge;
366
366
  return /* @__PURE__ */ s(
367
- je,
367
+ De,
368
368
  {
369
- fill: _,
370
- fillOpacity: a ? a === k ? 1 : 0.3 : 1
369
+ fill: R,
370
+ fillOpacity: a ? a === A ? 1 : 0.3 : 1
371
371
  },
372
372
  `cell-${D}`
373
373
  );
374
374
  })
375
375
  },
376
- k
376
+ A
377
377
  )),
378
- A.length > 0 && /* @__PURE__ */ N(Te, { children: [
378
+ y.length > 0 && /* @__PURE__ */ p(Fe, { children: [
379
379
  /* @__PURE__ */ s(
380
380
  q,
381
381
  {
@@ -404,17 +404,17 @@ function Yn({
404
404
  )
405
405
  ] })
406
406
  ] }) }),
407
- S > 0 && /* @__PURE__ */ N("div", { className: "text-xs text-dc-text-muted text-center mt-1", children: [
408
- S,
407
+ $ > 0 && /* @__PURE__ */ p("div", { className: "text-xs text-dc-text-muted text-center mt-1", children: [
408
+ $,
409
409
  " data point",
410
- S !== 1 ? "s" : "",
410
+ $ !== 1 ? "s" : "",
411
411
  " with no values hidden"
412
412
  ] })
413
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: [
414
+ } catch (u) {
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__ */ p("div", { className: "text-center", children: [
416
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" }),
417
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
418
418
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
419
419
  ] }) });
420
420
  }
@@ -429,54 +429,54 @@ function Xn({
429
429
  }) {
430
430
  const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
431
431
  try {
432
- const f = {
432
+ const u = {
433
433
  showLegend: n?.showLegend ?? !0,
434
434
  showGrid: n?.showGrid ?? !0,
435
435
  showTooltip: n?.showTooltip ?? !0
436
436
  };
437
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: [
438
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
439
439
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
440
440
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in line chart" })
441
441
  ] }) });
442
- let u, m, p = [];
442
+ let f, m, v = [];
443
443
  if (t?.xAxis && t?.yAxis)
444
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
444
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
445
445
  else if (t?.x && t?.y)
446
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
446
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
447
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: [
448
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
449
449
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
450
450
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
451
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: [
452
+ if (!f || !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__ */ p("div", { className: "text-center", children: [
454
454
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
455
455
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
456
456
  ] }) });
457
- const { data: v, seriesKeys: w } = te(
457
+ const { data: w, seriesKeys: b } = re(
458
458
  e,
459
- u,
459
+ f,
460
460
  m,
461
461
  r,
462
- p,
462
+ v,
463
463
  d
464
- ), y = f.showLegend, S = {
465
- ...be,
464
+ ), h = u.showLegend, $ = {
465
+ ...Ne,
466
466
  left: 40
467
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: [
468
+ }, T = Ee(n?.target || ""), N = je(T, w.length);
469
+ let S = w;
470
+ return N.length > 0 && (S = w.map((g, x) => ({
471
+ ...g,
472
+ __target: N[x] || null
473
+ }))), !w || w.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
474
474
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
475
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" }),
476
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ p(Nt, { data: S, margin: $, children: [
477
+ u.showGrid && /* @__PURE__ */ s(pe, { strokeDasharray: "3 3" }),
478
478
  /* @__PURE__ */ s(
479
- pe,
479
+ ve,
480
480
  {
481
481
  dataKey: "name",
482
482
  tick: { fontSize: 12 },
@@ -486,20 +486,20 @@ function Xn({
486
486
  }
487
487
  ),
488
488
  /* @__PURE__ */ s(
489
- ve,
489
+ be,
490
490
  {
491
491
  tick: { fontSize: 12 },
492
492
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
493
493
  }
494
494
  ),
495
- f.showTooltip && /* @__PURE__ */ s(
496
- C,
495
+ u.showTooltip && /* @__PURE__ */ s(
496
+ Y,
497
497
  {
498
- formatter: (x, h) => x == null ? ["No data", h] : h === "Target" ? [`${x}`, "Target Value"] : [x, h]
498
+ formatter: (g, x) => g == null ? ["No data", x] : x === "Target" ? [`${g}`, "Target Value"] : [g, x]
499
499
  }
500
500
  ),
501
- y && /* @__PURE__ */ s(
502
- B,
501
+ h && /* @__PURE__ */ s(
502
+ K,
503
503
  {
504
504
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
505
505
  iconType: "line",
@@ -507,25 +507,25 @@ function Xn({
507
507
  layout: "horizontal",
508
508
  align: "center",
509
509
  verticalAlign: "bottom",
510
- onMouseEnter: (x) => c(String(x.dataKey || "")),
510
+ onMouseEnter: (g) => c(String(g.dataKey || "")),
511
511
  onMouseLeave: () => c(null)
512
512
  }
513
513
  ),
514
- w.map((x, h) => /* @__PURE__ */ s(
514
+ b.map((g, x) => /* @__PURE__ */ s(
515
515
  q,
516
516
  {
517
517
  type: "monotone",
518
- dataKey: x,
519
- stroke: l?.colors && l.colors[h % l.colors.length] || j[h % j.length],
518
+ dataKey: g,
519
+ stroke: l?.colors && l.colors[x % l.colors.length] || F[x % F.length],
520
520
  strokeWidth: 2,
521
521
  dot: { r: 3 },
522
522
  activeDot: { r: 5 },
523
- strokeOpacity: a ? a === x ? 1 : 0.3 : 1,
523
+ strokeOpacity: a ? a === g ? 1 : 0.3 : 1,
524
524
  connectNulls: !1
525
525
  },
526
- x
526
+ g
527
527
  )),
528
- g.length > 0 && /* @__PURE__ */ N(Te, { children: [
528
+ N.length > 0 && /* @__PURE__ */ p(Fe, { children: [
529
529
  /* @__PURE__ */ s(
530
530
  q,
531
531
  {
@@ -554,10 +554,10 @@ function Xn({
554
554
  )
555
555
  ] })
556
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: [
557
+ } catch (u) {
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__ */ p("div", { className: "text-center", children: [
559
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" }),
560
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
561
561
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
562
562
  ] }) });
563
563
  }
@@ -572,55 +572,55 @@ function Qn({
572
572
  }) {
573
573
  const [a, c] = O(null), { labelMap: d, getFieldLabel: o } = W();
574
574
  try {
575
- const f = {
575
+ const u = {
576
576
  showLegend: n?.showLegend ?? !0,
577
577
  showGrid: n?.showGrid ?? !0,
578
578
  showTooltip: n?.showTooltip ?? !0,
579
579
  stacked: n?.stacked ?? !1
580
580
  };
581
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: [
582
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
583
583
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
584
584
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in area chart" })
585
585
  ] }) });
586
- let u, m, p = [];
586
+ let f, m, v = [];
587
587
  if (t?.xAxis && t?.yAxis)
588
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
588
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
589
589
  else if (t?.x && t?.y)
590
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
590
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
591
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: [
592
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
593
593
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
594
594
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
595
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: [
596
+ if (!f || !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__ */ p("div", { className: "text-center", children: [
598
598
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
599
599
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
600
600
  ] }) });
601
- const { data: v, seriesKeys: w } = te(
601
+ const { data: w, seriesKeys: b } = re(
602
602
  e,
603
- u,
603
+ f,
604
604
  m,
605
605
  r,
606
- p,
606
+ v,
607
607
  d
608
- ), y = f.showLegend, S = {
609
- ...be,
608
+ ), h = u.showLegend, $ = {
609
+ ...Ne,
610
610
  left: 40
611
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: [
612
+ }, T = Ee(n?.target || ""), N = je(T, w.length);
613
+ let S = w;
614
+ return N.length > 0 && (S = w.map((g, x) => ({
615
+ ...g,
616
+ __target: N[x] || null
617
+ }))), !w || w.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
618
618
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
619
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" }),
620
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ p(lt, { data: S, margin: $, children: [
621
+ u.showGrid && /* @__PURE__ */ s(pe, { strokeDasharray: "3 3" }),
622
622
  /* @__PURE__ */ s(
623
- pe,
623
+ ve,
624
624
  {
625
625
  dataKey: "name",
626
626
  tick: { fontSize: 12 },
@@ -630,20 +630,20 @@ function Qn({
630
630
  }
631
631
  ),
632
632
  /* @__PURE__ */ s(
633
- ve,
633
+ be,
634
634
  {
635
635
  tick: { fontSize: 12 },
636
636
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
637
637
  }
638
638
  ),
639
- f.showTooltip && /* @__PURE__ */ s(
640
- C,
639
+ u.showTooltip && /* @__PURE__ */ s(
640
+ Y,
641
641
  {
642
- formatter: (x, h) => x == null ? ["No data", h] : h === "Target" ? [`${x}`, "Target Value"] : [x, h]
642
+ formatter: (g, x) => g == null ? ["No data", x] : x === "Target" ? [`${g}`, "Target Value"] : [g, x]
643
643
  }
644
644
  ),
645
- y && /* @__PURE__ */ s(
646
- B,
645
+ h && /* @__PURE__ */ s(
646
+ K,
647
647
  {
648
648
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
649
649
  iconType: "rect",
@@ -651,26 +651,26 @@ function Qn({
651
651
  layout: "horizontal",
652
652
  align: "center",
653
653
  verticalAlign: "bottom",
654
- onMouseEnter: (x) => c(String(x.dataKey || "")),
654
+ onMouseEnter: (g) => c(String(g.dataKey || "")),
655
655
  onMouseLeave: () => c(null)
656
656
  }
657
657
  ),
658
- w.map((x, h) => /* @__PURE__ */ s(
658
+ b.map((g, x) => /* @__PURE__ */ s(
659
659
  wt,
660
660
  {
661
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,
662
+ dataKey: g,
663
+ stackId: u.stacked ? "stack" : void 0,
664
+ stroke: l?.colors && l.colors[x % l.colors.length] || F[x % F.length],
665
+ fill: l?.colors && l.colors[x % l.colors.length] || F[x % F.length],
666
+ fillOpacity: a ? a === g ? 0.6 : 0.1 : 0.3,
667
667
  strokeWidth: 2,
668
- strokeOpacity: a ? a === x ? 1 : 0.3 : 1,
668
+ strokeOpacity: a ? a === g ? 1 : 0.3 : 1,
669
669
  connectNulls: !1
670
670
  },
671
- x
671
+ g
672
672
  )),
673
- g.length > 0 && /* @__PURE__ */ N(Te, { children: [
673
+ N.length > 0 && /* @__PURE__ */ p(Fe, { children: [
674
674
  /* @__PURE__ */ s(
675
675
  q,
676
676
  {
@@ -699,10 +699,10 @@ function Qn({
699
699
  )
700
700
  ] })
701
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: [
702
+ } catch (u) {
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__ */ p("div", { className: "text-center", children: [
704
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" }),
705
+ /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
706
706
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
707
707
  ] }) });
708
708
  }
@@ -722,82 +722,82 @@ function Zn({
722
722
  showTooltip: n?.showTooltip ?? !0
723
723
  };
724
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: [
725
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
726
726
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
727
727
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in pie chart" })
728
728
  ] }) });
729
- let f, u, m, p = [];
729
+ let u, f, m, v = [];
730
730
  if (t?.xAxis && t?.yAxis)
731
- u = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], p = t.series || [];
731
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [];
732
732
  else if (t?.x && t?.y)
733
- u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
733
+ f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
734
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: [
735
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
736
736
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
737
737
  /* @__PURE__ */ s("div", { className: "text-xs", children: "chartConfig.x/y or chartConfig.xAxis/yAxis required for pie chart" })
738
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: [
739
+ if (!f || !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__ */ p("div", { className: "text-center", children: [
741
741
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
742
742
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
743
743
  ] }) });
744
- if (p.length > 0) {
745
- const { data: w } = te(
744
+ if (v.length > 0) {
745
+ const { data: b } = re(
746
746
  e,
747
- u,
747
+ f,
748
748
  m,
749
749
  r,
750
- p,
750
+ v,
751
751
  d
752
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]
753
+ if (u = [], b.length > 0) {
754
+ const h = b[0];
755
+ Object.keys(h).forEach(($) => {
756
+ $ !== "name" && typeof h[$] == "number" && u.push({
757
+ name: String($),
758
+ value: h[$]
759
759
  });
760
760
  });
761
761
  }
762
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
763
+ const b = I(r, f);
764
+ u = e.map((h) => {
765
+ let $ = z(h[f], b) || String(h[f]) || "Unknown";
766
+ return typeof h[f] == "boolean" ? $ = h[f] ? "Active" : "Inactive" : ($ === "true" || $ === "false") && ($ = $ === "true" ? "Active" : "Inactive"), {
767
+ name: $,
768
+ value: typeof h[m[0]] == "string" ? parseFloat(h[m[0]]) : h[m[0]] || 0
769
769
  };
770
770
  });
771
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: [
772
+ const w = u.length;
773
+ return u = u.filter(
774
+ (b) => b.value != null && !isNaN(b.value) && b.value !== 0 && b.value > 0
775
+ ), u.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
776
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: [
777
+ /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: w > 0 ? `Filtered out ${w} data points (zero or invalid values)` : "No data points to display in pie chart" })
778
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ p(At, { children: [
779
779
  /* @__PURE__ */ s(
780
- kt,
780
+ St,
781
781
  {
782
- data: f,
782
+ data: u,
783
783
  cx: "50%",
784
784
  cy: "50%",
785
785
  outerRadius: "70%",
786
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,
787
+ label: o.showLegend ? void 0 : ({ name: b, percent: h }) => `${b} ${((h || 0) * 100).toFixed(0)}%`,
788
+ children: u.map((b, h) => /* @__PURE__ */ s(
789
+ De,
790
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
791
+ fill: l?.colors && l.colors[h % l.colors.length] || F[h % F.length],
792
+ fillOpacity: a ? a === u[h].name ? 1 : 0.3 : 1
793
793
  },
794
- `cell-${y}`
794
+ `cell-${h}`
795
795
  ))
796
796
  }
797
797
  ),
798
- o.showTooltip && /* @__PURE__ */ s(C, {}),
798
+ o.showTooltip && /* @__PURE__ */ s(Y, {}),
799
799
  o.showLegend && /* @__PURE__ */ s(
800
- B,
800
+ K,
801
801
  {
802
802
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
803
803
  iconType: "circle",
@@ -805,13 +805,13 @@ function Zn({
805
805
  layout: "horizontal",
806
806
  align: "center",
807
807
  verticalAlign: "bottom",
808
- onMouseEnter: (w) => c(String(w.value || "")),
808
+ onMouseEnter: (b) => c(String(b.value || "")),
809
809
  onMouseLeave: () => c(null)
810
810
  }
811
811
  )
812
812
  ] }) });
813
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: [
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__ */ p("div", { className: "text-center", children: [
815
815
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
816
816
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
817
817
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
@@ -834,86 +834,141 @@ function Jn({
834
834
  showTooltip: n?.showTooltip ?? !0
835
835
  };
836
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: [
837
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
838
838
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
839
839
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in scatter chart" })
840
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;
841
+ let u, f, m = [];
842
+ if (t?.xAxis && t?.yAxis) {
843
+ u = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
844
+ const x = t.series;
845
+ m = x ? Array.isArray(x) ? x : [x] : [];
846
+ } else if (t?.x && t?.y)
847
+ u = t.x, f = Array.isArray(t.y) ? t.y[0] : t.y;
846
848
  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: [
849
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
848
850
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
849
851
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
850
852
  ] }) });
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
+ if (!u || !f)
854
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
853
855
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
854
856
  /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
855
857
  ] }) });
856
- let p, v = {};
858
+ const w = (r?.timeDimensions || []).map((x) => x.dimension);
859
+ let b, h = {};
857
860
  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]] || [];
861
+ const x = m[0];
862
+ e.forEach((k) => {
863
+ const A = String(k[x] || "Default");
864
+ h[A] || (h[A] = []);
865
+ const L = I(r, u), M = z(k[u], L) || k[u], D = P(k[f]), E = typeof M == "string" ? parseFloat(M) : M;
866
+ if (Se(E) && D !== null) {
867
+ const R = {};
868
+ w.forEach((C) => {
869
+ if (k[C]) {
870
+ const X = I(r, C);
871
+ R[C] = z(k[C], X);
872
+ }
873
+ }), h[A].push({
874
+ x: E,
875
+ y: D,
876
+ name: A,
877
+ timeValues: R,
878
+ originalItem: k
879
+ });
880
+ }
881
+ }), b = Object.keys(h).flatMap((k) => h[k]);
871
882
  } 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
883
+ const x = I(r, u);
884
+ b = e.map((y) => {
885
+ const k = z(y[u], x) || y[u], A = P(y[f]), L = typeof k == "string" ? parseFloat(k) : k, M = {};
886
+ return w.forEach((D) => {
887
+ if (y[D]) {
888
+ const E = I(r, D);
889
+ M[D] = z(y[D], E);
890
+ }
891
+ }), {
892
+ x: L,
893
+ y: A,
894
+ name: "Point",
895
+ timeValues: M,
896
+ originalItem: y,
897
+ isValid: Se(L) && A !== null
880
898
  };
881
- }).filter((b) => b.isValid);
899
+ }).filter((y) => y.isValid);
882
900
  }
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: [
901
+ if (!b || b.length === 0)
902
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
885
903
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
886
904
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for scatter chart after transformation" })
887
905
  ] }) });
888
- const w = Object.keys(v), y = w.length > 1, S = o.showLegend && y, $ = {
889
- ...be,
906
+ const $ = Object.keys(h), N = $.length > 1 && $.length <= 20, S = o.showLegend && N, g = {
907
+ ...Ne,
890
908
  left: 40
891
909
  // Increased from 20 to 40 for Y-axis label space
892
910
  };
893
- return /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ N(St, { data: p, margin: $, children: [
894
- o.showGrid && /* @__PURE__ */ s(ge, { strokeDasharray: "3 3" }),
911
+ return /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ p(kt, { margin: g, children: [
912
+ o.showGrid && /* @__PURE__ */ s(pe, { strokeDasharray: "3 3" }),
895
913
  /* @__PURE__ */ s(
896
- pe,
914
+ ve,
897
915
  {
898
916
  type: "number",
899
917
  dataKey: "x",
900
- name: d(f),
918
+ name: d(u),
901
919
  tick: { fontSize: 12 }
902
920
  }
903
921
  ),
904
922
  /* @__PURE__ */ s(
905
- ve,
923
+ be,
906
924
  {
907
925
  type: "number",
908
926
  dataKey: "y",
909
- name: d(u),
927
+ name: d(f),
910
928
  tick: { fontSize: 12 },
911
- label: { value: d(u), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
929
+ label: { value: d(f), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
930
+ }
931
+ ),
932
+ o.showTooltip && /* @__PURE__ */ s(
933
+ at,
934
+ {
935
+ cursor: { strokeDasharray: "3 3" },
936
+ content: ({ active: x, payload: y }) => {
937
+ if (!x || !y || y.length === 0) return null;
938
+ const k = y[0]?.payload;
939
+ if (!k) return null;
940
+ const A = (L) => Number.isInteger(L) ? L.toString() : L.toFixed(2);
941
+ return /* @__PURE__ */ p("div", { style: {
942
+ backgroundColor: "white",
943
+ border: "1px solid #e5e7eb",
944
+ borderRadius: "0.5rem",
945
+ fontSize: "0.875rem",
946
+ color: "#1f2937",
947
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1)",
948
+ padding: "8px 12px"
949
+ }, children: [
950
+ /* @__PURE__ */ s("div", { style: { fontWeight: 600, marginBottom: "4px" }, children: k.name }),
951
+ k.timeValues && Object.keys(k.timeValues).length > 0 && /* @__PURE__ */ s("div", { style: { marginBottom: "4px", color: "#6b7280" }, children: Object.entries(k.timeValues).map(([L, M]) => /* @__PURE__ */ p("div", { children: [
952
+ d(L),
953
+ ": ",
954
+ M
955
+ ] }, L)) }),
956
+ /* @__PURE__ */ p("div", { children: [
957
+ d(u),
958
+ ": ",
959
+ A(k.x)
960
+ ] }),
961
+ /* @__PURE__ */ p("div", { children: [
962
+ d(f),
963
+ ": ",
964
+ A(k.y)
965
+ ] })
966
+ ] });
967
+ }
912
968
  }
913
969
  ),
914
- o.showTooltip && /* @__PURE__ */ s(C, {}),
915
970
  S && /* @__PURE__ */ s(
916
- B,
971
+ K,
917
972
  {
918
973
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
919
974
  iconType: "circle",
@@ -921,21 +976,21 @@ function Jn({
921
976
  layout: "horizontal",
922
977
  align: "center",
923
978
  verticalAlign: "bottom",
924
- onMouseEnter: (g) => c(String(g.dataKey || "")),
979
+ onMouseEnter: (x) => c(String(x.dataKey || "")),
925
980
  onMouseLeave: () => c(null)
926
981
  }
927
982
  ),
928
- y ? (
983
+ N ? (
929
984
  // Multiple series
930
- w.map((g, b) => /* @__PURE__ */ s(
985
+ $.map((x, y) => /* @__PURE__ */ s(
931
986
  Oe,
932
987
  {
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
988
+ name: x,
989
+ data: h[x],
990
+ fill: l?.colors && l.colors[y % l.colors.length] || F[y % F.length],
991
+ fillOpacity: a ? a === x ? 1 : 0.3 : 1
937
992
  },
938
- g
993
+ x
939
994
  ))
940
995
  ) : (
941
996
  // Single series
@@ -943,14 +998,14 @@ function Jn({
943
998
  Oe,
944
999
  {
945
1000
  name: "Data",
946
- data: p,
947
- fill: l?.colors && l.colors[0] || j[0]
1001
+ data: b,
1002
+ fill: l?.colors && l.colors[0] || F[0]
948
1003
  }
949
1004
  )
950
1005
  )
951
1006
  ] }) });
952
1007
  } 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: [
1008
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
954
1009
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
955
1010
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
956
1011
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
@@ -973,52 +1028,52 @@ function Pn({
973
1028
  showGrid: n?.showGrid ?? !0
974
1029
  };
975
1030
  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: [
1031
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
977
1032
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
978
1033
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radar chart" })
979
1034
  ] }) });
980
- let o, f = [];
1035
+ let o, u = [];
981
1036
  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(
1037
+ const f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], v = t.series || [], { data: w, seriesKeys: b } = re(
983
1038
  e,
984
- u,
1039
+ f,
985
1040
  m,
986
1041
  r,
987
- p
1042
+ v
988
1043
  );
989
- o = v, f = w;
1044
+ o = w, u = b;
990
1045
  } 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
1046
+ const f = e[0], m = Object.keys(f), v = m.find(
1047
+ (b) => typeof f[b] == "string" || b.toLowerCase().includes("subject") || b.toLowerCase().includes("name") || b.toLowerCase().includes("category")
1048
+ ) || m[0], w = m.filter(
1049
+ (b) => typeof f[b] == "number" && b !== v
995
1050
  );
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: [
1051
+ if (w.length === 0)
1052
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
998
1053
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
999
1054
  /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric fields found for radar chart values" })
1000
1055
  ] }) });
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"
1056
+ if (v) {
1057
+ const b = I(r, v);
1058
+ o = e.map((h) => {
1059
+ const $ = {
1060
+ name: z(h[v], b) || String(h[v]) || "Unknown"
1006
1061
  };
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);
1062
+ return w.forEach((T) => {
1063
+ const N = T.split(".").pop() || T;
1064
+ $[N] = typeof h[T] == "string" ? parseFloat(h[T]) : h[T] || 0;
1065
+ }), $;
1066
+ }), u = w.map((h) => h.split(".").pop() || h);
1012
1067
  } 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"];
1068
+ o = e.map((b) => ({
1069
+ name: String(b[m[0]] || "Unknown"),
1070
+ value: typeof b[w[0]] == "string" ? parseFloat(b[w[0]]) : b[w[0]] || 0
1071
+ })), u = ["value"];
1017
1072
  }
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: [
1073
+ 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__ */ p("div", { className: "text-center", children: [
1019
1074
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1020
1075
  /* @__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: [
1076
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ p(Mt, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
1022
1077
  d.showGrid && /* @__PURE__ */ s($t, {}),
1023
1078
  /* @__PURE__ */ s(
1024
1079
  Lt,
@@ -1035,9 +1090,9 @@ function Pn({
1035
1090
  className: "text-dc-text-muted"
1036
1091
  }
1037
1092
  ),
1038
- d.showTooltip && /* @__PURE__ */ s(C, {}),
1039
- d.showLegend && f.length > 1 && /* @__PURE__ */ s(
1040
- B,
1093
+ d.showTooltip && /* @__PURE__ */ s(Y, {}),
1094
+ d.showLegend && u.length > 1 && /* @__PURE__ */ s(
1095
+ K,
1041
1096
  {
1042
1097
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
1043
1098
  iconType: "rect",
@@ -1045,26 +1100,26 @@ function Pn({
1045
1100
  layout: "horizontal",
1046
1101
  align: "center",
1047
1102
  verticalAlign: "bottom",
1048
- onMouseEnter: (u) => c(String(u.dataKey || "")),
1103
+ onMouseEnter: (f) => c(String(f.dataKey || "")),
1049
1104
  onMouseLeave: () => c(null)
1050
1105
  }
1051
1106
  ),
1052
- f.map((u, m) => /* @__PURE__ */ s(
1053
- jt,
1107
+ u.map((f, m) => /* @__PURE__ */ s(
1108
+ Ft,
1054
1109
  {
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,
1110
+ name: f,
1111
+ dataKey: f,
1112
+ stroke: l?.colors && l.colors[m % l.colors.length] || F[m % F.length],
1113
+ fill: l?.colors && l.colors[m % l.colors.length] || F[m % F.length],
1114
+ fillOpacity: a ? a === f ? 0.6 : 0.1 : 0.3,
1115
+ strokeOpacity: a ? a === f ? 1 : 0.3 : 1,
1061
1116
  strokeWidth: 2
1062
1117
  },
1063
- u
1118
+ f
1064
1119
  ))
1065
1120
  ] }) });
1066
1121
  } 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: [
1122
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
1068
1123
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
1069
1124
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1070
1125
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
@@ -1086,52 +1141,52 @@ function er({
1086
1141
  showTooltip: n?.showTooltip ?? !0
1087
1142
  };
1088
1143
  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: [
1144
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
1090
1145
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
1091
1146
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radial bar chart" })
1092
1147
  ] }) });
1093
1148
  let o;
1094
1149
  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]
1150
+ const u = t.xAxis[0], f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = I(r, u);
1151
+ o = e.map((v, w) => ({
1152
+ name: z(v[u], m) || String(v[u]) || "Unknown",
1153
+ value: typeof v[f] == "string" ? parseFloat(v[f]) : v[f] || 0,
1154
+ fill: l?.colors && l.colors[w % l.colors.length] || F[w % F.length]
1100
1155
  }));
1101
1156
  } 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: [
1157
+ const u = e[0], f = Object.keys(u), m = f.find(
1158
+ (w) => typeof u[w] == "string" || w.toLowerCase().includes("name") || w.toLowerCase().includes("label") || w.toLowerCase().includes("category")
1159
+ ) || f[0], v = f.find(
1160
+ (w) => typeof u[w] == "number" && w !== m
1161
+ ) || f[1];
1162
+ if (!v)
1163
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
1109
1164
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
1110
1165
  /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
1111
1166
  ] }) });
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]
1167
+ o = e.map((w, b) => {
1168
+ let h = w[m];
1169
+ return typeof h == "boolean" ? h = h ? "Active" : "Inactive" : h === "true" || h === "false" ? h = h === "true" ? "Active" : "Inactive" : h = String(h), {
1170
+ name: h,
1171
+ value: typeof w[v] == "string" ? parseFloat(w[v]) : w[v] || 0,
1172
+ fill: l?.colors && l.colors[b % l.colors.length] || F[b % F.length]
1118
1173
  };
1119
1174
  });
1120
1175
  }
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: [
1176
+ return o = o.filter((u) => u.value != null && u.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__ */ p("div", { className: "text-center", children: [
1122
1177
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1123
1178
  /* @__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,
1179
+ ] }) }) : /* @__PURE__ */ s(G, { height: i, children: /* @__PURE__ */ p(
1180
+ Dt,
1126
1181
  {
1127
1182
  data: o,
1128
1183
  innerRadius: "10%",
1129
1184
  outerRadius: "80%",
1130
1185
  margin: { top: 20, right: 30, bottom: 20, left: 30 },
1131
1186
  children: [
1132
- d.showTooltip && /* @__PURE__ */ s(C, {}),
1187
+ d.showTooltip && /* @__PURE__ */ s(Y, {}),
1133
1188
  d.showLegend && /* @__PURE__ */ s(
1134
- B,
1189
+ K,
1135
1190
  {
1136
1191
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
1137
1192
  iconType: "circle",
@@ -1139,23 +1194,23 @@ function er({
1139
1194
  layout: "horizontal",
1140
1195
  align: "center",
1141
1196
  verticalAlign: "bottom",
1142
- onMouseEnter: (f) => c(String(f.value || "")),
1197
+ onMouseEnter: (u) => c(String(u.value || "")),
1143
1198
  onMouseLeave: () => c(null)
1144
1199
  }
1145
1200
  ),
1146
1201
  /* @__PURE__ */ s(
1147
- zt,
1202
+ Et,
1148
1203
  {
1149
1204
  dataKey: "value",
1150
1205
  cornerRadius: 4,
1151
1206
  label: { position: "insideStart", fill: "#fff", fontSize: 12 },
1152
- children: o.map((f, u) => /* @__PURE__ */ s(
1153
- je,
1207
+ children: o.map((u, f) => /* @__PURE__ */ s(
1208
+ De,
1154
1209
  {
1155
- fill: f.fill,
1156
- fillOpacity: a ? a === f.name ? 1 : 0.3 : 1
1210
+ fill: u.fill,
1211
+ fillOpacity: a ? a === u.name ? 1 : 0.3 : 1
1157
1212
  },
1158
- `cell-${u}`
1213
+ `cell-${f}`
1159
1214
  ))
1160
1215
  }
1161
1216
  )
@@ -1163,45 +1218,45 @@ function er({
1163
1218
  }
1164
1219
  ) });
1165
1220
  } 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: [
1221
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
1167
1222
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
1168
1223
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1169
1224
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1170
1225
  ] }) });
1171
1226
  }
1172
1227
  }
1173
- function de(e, t) {
1228
+ function ue(e, t) {
1174
1229
  return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
1175
1230
  }
1176
1231
  function Vt(e, t) {
1177
1232
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
1178
1233
  }
1179
- function lt(e) {
1234
+ function ot(e) {
1180
1235
  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;
1236
+ e.length !== 2 ? (t = ue, n = (c, d) => ue(e(c), d), r = (c, d) => e(c) - d) : (t = e === ue || e === Vt ? e : It, n = e, r = e);
1237
+ function i(c, d, o = 0, u = c.length) {
1238
+ if (o < u) {
1239
+ if (t(d, d) !== 0) return u;
1185
1240
  do {
1186
- const u = o + f >>> 1;
1187
- n(c[u], d) < 0 ? o = u + 1 : f = u;
1188
- } while (o < f);
1241
+ const f = o + u >>> 1;
1242
+ n(c[f], d) < 0 ? o = f + 1 : u = f;
1243
+ } while (o < u);
1189
1244
  }
1190
1245
  return o;
1191
1246
  }
1192
- function l(c, d, o = 0, f = c.length) {
1193
- if (o < f) {
1194
- if (t(d, d) !== 0) return f;
1247
+ function l(c, d, o = 0, u = c.length) {
1248
+ if (o < u) {
1249
+ if (t(d, d) !== 0) return u;
1195
1250
  do {
1196
- const u = o + f >>> 1;
1197
- n(c[u], d) <= 0 ? o = u + 1 : f = u;
1198
- } while (o < f);
1251
+ const f = o + u >>> 1;
1252
+ n(c[f], d) <= 0 ? o = f + 1 : u = f;
1253
+ } while (o < u);
1199
1254
  }
1200
1255
  return o;
1201
1256
  }
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;
1257
+ function a(c, d, o = 0, u = c.length) {
1258
+ const f = i(c, d, o, u - 1);
1259
+ return f > o && r(c[f - 1], d) > -r(c[f], d) ? f - 1 : f;
1205
1260
  }
1206
1261
  return { left: i, center: a, right: l };
1207
1262
  }
@@ -1211,8 +1266,8 @@ function It() {
1211
1266
  function _t(e) {
1212
1267
  return e === null ? NaN : +e;
1213
1268
  }
1214
- const Ht = lt(de), ot = Ht.right;
1215
- lt(_t).center;
1269
+ const Ht = ot(ue), ct = Ht.right;
1270
+ ot(_t).center;
1216
1271
  class Ce extends Map {
1217
1272
  constructor(t, n = Ct) {
1218
1273
  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);
@@ -1245,13 +1300,13 @@ function Gt({ _intern: e, _key: t }, n) {
1245
1300
  function Ct(e) {
1246
1301
  return e !== null && typeof e == "object" ? e.valueOf() : e;
1247
1302
  }
1248
- const Ut = Math.sqrt(50), qt = Math.sqrt(10), Kt = Math.sqrt(2);
1303
+ const Ut = Math.sqrt(50), qt = Math.sqrt(10), Bt = Math.sqrt(2);
1249
1304
  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;
1305
+ 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 >= Bt ? 2 : 1;
1251
1306
  let c, d, o;
1252
1307
  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
1308
  }
1254
- function Bt(e, t, n) {
1309
+ function Kt(e, t, n) {
1255
1310
  if (t = +t, e = +e, n = +n, !(n > 0)) return [];
1256
1311
  if (e === t) return [e];
1257
1312
  const r = t < e, [i, l, a] = r ? fe(t, e, n) : fe(e, t, n);
@@ -1264,25 +1319,25 @@ function Bt(e, t, n) {
1264
1319
  else for (let o = 0; o < c; ++o) d[o] = (i + o) * a;
1265
1320
  return d;
1266
1321
  }
1267
- function Se(e, t, n) {
1322
+ function Me(e, t, n) {
1268
1323
  return t = +t, e = +e, n = +n, fe(e, t, n)[2];
1269
1324
  }
1270
1325
  function Wt(e, t, n) {
1271
1326
  t = +t, e = +e, n = +n;
1272
- const r = t < e, i = r ? Se(t, e, n) : Se(e, t, n);
1327
+ const r = t < e, i = r ? Me(t, e, n) : Me(e, t, n);
1273
1328
  return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
1274
1329
  }
1275
- function De(e, t, n) {
1330
+ function ze(e, t, n) {
1276
1331
  e.prototype = t.prototype = n, n.constructor = e;
1277
1332
  }
1278
- function ct(e, t) {
1333
+ function dt(e, t) {
1279
1334
  var n = Object.create(e.prototype);
1280
1335
  for (var r in t) n[r] = t[r];
1281
1336
  return n;
1282
1337
  }
1283
- function ne() {
1338
+ function ie() {
1284
1339
  }
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 = {
1340
+ var ee = 0.7, me = 1 / ee, Z = "\\s*([+-]?\\d+)\\s*", te = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", _ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Yt = /^#([0-9a-f]{3,8})$/, Xt = new RegExp(`^rgb\\(${Z},${Z},${Z}\\)$`), Qt = new RegExp(`^rgb\\(${_},${_},${_}\\)$`), Zt = new RegExp(`^rgba\\(${Z},${Z},${Z},${te}\\)$`), Jt = new RegExp(`^rgba\\(${_},${_},${_},${te}\\)$`), Pt = new RegExp(`^hsl\\(${te},${_},${_}\\)$`), en = new RegExp(`^hsla\\(${te},${_},${_},${te}\\)$`), qe = {
1286
1341
  aliceblue: 15792383,
1287
1342
  antiquewhite: 16444375,
1288
1343
  aqua: 65535,
@@ -1432,64 +1487,64 @@ var J = 0.7, ue = 1 / J, X = "\\s*([+-]?\\d+)\\s*", P = "\\s*([+-]?(?:\\d*\\.)?\
1432
1487
  yellow: 16776960,
1433
1488
  yellowgreen: 10145074
1434
1489
  };
1435
- De(ne, ee, {
1490
+ ze(ie, ne, {
1436
1491
  copy(e) {
1437
1492
  return Object.assign(new this.constructor(), this, e);
1438
1493
  },
1439
1494
  displayable() {
1440
1495
  return this.rgb().displayable();
1441
1496
  },
1442
- hex: Ke,
1497
+ hex: Be,
1443
1498
  // Deprecated! Use color.formatHex.
1444
- formatHex: Ke,
1499
+ formatHex: Be,
1445
1500
  formatHex8: tn,
1446
1501
  formatHsl: nn,
1447
- formatRgb: Be,
1448
- toString: Be
1502
+ formatRgb: Ke,
1503
+ toString: Ke
1449
1504
  });
1450
- function Ke() {
1505
+ function Be() {
1451
1506
  return this.rgb().formatHex();
1452
1507
  }
1453
1508
  function tn() {
1454
1509
  return this.rgb().formatHex8();
1455
1510
  }
1456
1511
  function nn() {
1457
- return dt(this).formatHsl();
1512
+ return ut(this).formatHsl();
1458
1513
  }
1459
- function Be() {
1514
+ function Ke() {
1460
1515
  return this.rgb().formatRgb();
1461
1516
  }
1462
- function ee(e) {
1517
+ function ne(e) {
1463
1518
  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;
1519
+ 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 j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? oe(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? oe(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 j(t[1], t[2], t[3], 1) : (t = Qt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Zt.exec(e)) ? oe(t[1], t[2], t[3], t[4]) : (t = Jt.exec(e)) ? oe(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 j(NaN, NaN, NaN, 0) : null;
1465
1520
  }
1466
1521
  function We(e) {
1467
- return new z(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1522
+ return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1468
1523
  }
1469
- function le(e, t, n, r) {
1470
- return r <= 0 && (e = t = n = NaN), new z(e, t, n, r);
1524
+ function oe(e, t, n, r) {
1525
+ return r <= 0 && (e = t = n = NaN), new j(e, t, n, r);
1471
1526
  }
1472
1527
  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();
1528
+ return e instanceof ie || (e = ne(e)), e ? (e = e.rgb(), new j(e.r, e.g, e.b, e.opacity)) : new j();
1474
1529
  }
1475
- function Me(e, t, n, r) {
1476
- return arguments.length === 1 ? rn(e) : new z(e, t, n, r ?? 1);
1530
+ function $e(e, t, n, r) {
1531
+ return arguments.length === 1 ? rn(e) : new j(e, t, n, r ?? 1);
1477
1532
  }
1478
- function z(e, t, n, r) {
1533
+ function j(e, t, n, r) {
1479
1534
  this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
1480
1535
  }
1481
- De(z, Me, ct(ne, {
1536
+ ze(j, $e, dt(ie, {
1482
1537
  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);
1538
+ return e = e == null ? me : Math.pow(me, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
1484
1539
  },
1485
1540
  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);
1541
+ return e = e == null ? ee : Math.pow(ee, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
1487
1542
  },
1488
1543
  rgb() {
1489
1544
  return this;
1490
1545
  },
1491
1546
  clamp() {
1492
- return new z(K(this.r), K(this.g), K(this.b), me(this.opacity));
1547
+ return new j(B(this.r), B(this.g), B(this.b), xe(this.opacity));
1493
1548
  },
1494
1549
  displayable() {
1495
1550
  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;
@@ -1508,72 +1563,72 @@ function sn() {
1508
1563
  return `#${U(this.r)}${U(this.g)}${U(this.b)}${U((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1509
1564
  }
1510
1565
  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})`}`;
1566
+ const e = xe(this.opacity);
1567
+ return `${e === 1 ? "rgb(" : "rgba("}${B(this.r)}, ${B(this.g)}, ${B(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1513
1568
  }
1514
- function me(e) {
1569
+ function xe(e) {
1515
1570
  return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
1516
1571
  }
1517
- function K(e) {
1572
+ function B(e) {
1518
1573
  return Math.max(0, Math.min(255, Math.round(e) || 0));
1519
1574
  }
1520
1575
  function U(e) {
1521
- return e = K(e), (e < 16 ? "0" : "") + e.toString(16);
1576
+ return e = B(e), (e < 16 ? "0" : "") + e.toString(16);
1522
1577
  }
1523
1578
  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);
1579
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new V(e, t, n, r);
1525
1580
  }
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;
1581
+ function ut(e) {
1582
+ if (e instanceof V) return new V(e.h, e.s, e.l, e.opacity);
1583
+ if (e instanceof ie || (e = ne(e)), !e) return new V();
1584
+ if (e instanceof V) return e;
1530
1585
  e = e.rgb();
1531
1586
  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);
1587
+ 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 V(a, c, d, e.opacity);
1533
1588
  }
1534
1589
  function an(e, t, n, r) {
1535
- return arguments.length === 1 ? dt(e) : new E(e, t, n, r ?? 1);
1590
+ return arguments.length === 1 ? ut(e) : new V(e, t, n, r ?? 1);
1536
1591
  }
1537
- function E(e, t, n, r) {
1592
+ function V(e, t, n, r) {
1538
1593
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1539
1594
  }
1540
- De(E, an, ct(ne, {
1595
+ ze(V, an, dt(ie, {
1541
1596
  brighter(e) {
1542
- return e = e == null ? ue : Math.pow(ue, e), new E(this.h, this.s, this.l * e, this.opacity);
1597
+ return e = e == null ? me : Math.pow(me, e), new V(this.h, this.s, this.l * e, this.opacity);
1543
1598
  },
1544
1599
  darker(e) {
1545
- return e = e == null ? J : Math.pow(J, e), new E(this.h, this.s, this.l * e, this.opacity);
1600
+ return e = e == null ? ee : Math.pow(ee, e), new V(this.h, this.s, this.l * e, this.opacity);
1546
1601
  },
1547
1602
  rgb() {
1548
1603
  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),
1604
+ return new j(
1605
+ we(e >= 240 ? e - 240 : e + 120, i, r),
1606
+ we(e, i, r),
1607
+ we(e < 120 ? e + 240 : e - 120, i, r),
1553
1608
  this.opacity
1554
1609
  );
1555
1610
  },
1556
1611
  clamp() {
1557
- return new E(Ze(this.h), oe(this.s), oe(this.l), me(this.opacity));
1612
+ return new V(Ze(this.h), ce(this.s), ce(this.l), xe(this.opacity));
1558
1613
  },
1559
1614
  displayable() {
1560
1615
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1561
1616
  },
1562
1617
  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})`}`;
1618
+ const e = xe(this.opacity);
1619
+ return `${e === 1 ? "hsl(" : "hsla("}${Ze(this.h)}, ${ce(this.s) * 100}%, ${ce(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1565
1620
  }
1566
1621
  }));
1567
1622
  function Ze(e) {
1568
1623
  return e = (e || 0) % 360, e < 0 ? e + 360 : e;
1569
1624
  }
1570
- function oe(e) {
1625
+ function ce(e) {
1571
1626
  return Math.max(0, Math.min(1, e || 0));
1572
1627
  }
1573
- function Ne(e, t, n) {
1628
+ function we(e, t, n) {
1574
1629
  return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
1575
1630
  }
1576
- const Ee = (e) => () => e;
1631
+ const Re = (e) => () => e;
1577
1632
  function ln(e, t) {
1578
1633
  return function(n) {
1579
1634
  return e + n * t;
@@ -1586,19 +1641,19 @@ function on(e, t, n) {
1586
1641
  }
1587
1642
  function cn(e) {
1588
1643
  return (e = +e) == 1 ? ft : function(t, n) {
1589
- return n - t ? on(t, n, e) : Ee(isNaN(t) ? n : t);
1644
+ return n - t ? on(t, n, e) : Re(isNaN(t) ? n : t);
1590
1645
  };
1591
1646
  }
1592
1647
  function ft(e, t) {
1593
1648
  var n = t - e;
1594
- return n ? ln(e, n) : Ee(isNaN(e) ? t : e);
1649
+ return n ? ln(e, n) : Re(isNaN(e) ? t : e);
1595
1650
  }
1596
1651
  const Je = (function e(t) {
1597
1652
  var n = cn(t);
1598
1653
  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 + "";
1654
+ var a = n((i = $e(i)).r, (l = $e(l)).r), c = n(i.g, l.g), d = n(i.b, l.b), o = ft(i.opacity, l.opacity);
1655
+ return function(u) {
1656
+ return i.r = a(u), i.g = c(u), i.b = d(u), i.opacity = o(u), i + "";
1602
1657
  };
1603
1658
  }
1604
1659
  return r.gamma = e, r;
@@ -1611,12 +1666,12 @@ function dn(e, t) {
1611
1666
  return r;
1612
1667
  };
1613
1668
  }
1614
- function fn(e) {
1669
+ function un(e) {
1615
1670
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
1616
1671
  }
1617
- function un(e, t) {
1672
+ function fn(e, t) {
1618
1673
  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]);
1674
+ for (a = 0; a < r; ++a) i[a] = Ve(e[a], t[a]);
1620
1675
  for (; a < n; ++a) l[a] = t[a];
1621
1676
  return function(c) {
1622
1677
  for (a = 0; a < r; ++a) l[a] = i[a](c);
@@ -1629,7 +1684,7 @@ function mn(e, t) {
1629
1684
  return n.setTime(e * (1 - r) + t * r), n;
1630
1685
  };
1631
1686
  }
1632
- function xe(e, t) {
1687
+ function he(e, t) {
1633
1688
  return e = +e, t = +t, function(n) {
1634
1689
  return e * (1 - n) + t * n;
1635
1690
  };
@@ -1638,13 +1693,13 @@ function xn(e, t) {
1638
1693
  var n = {}, r = {}, i;
1639
1694
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
1640
1695
  for (i in t)
1641
- i in e ? n[i] = Re(e[i], t[i]) : r[i] = t[i];
1696
+ i in e ? n[i] = Ve(e[i], t[i]) : r[i] = t[i];
1642
1697
  return function(l) {
1643
1698
  for (i in n) r[i] = n[i](l);
1644
1699
  return r;
1645
1700
  };
1646
1701
  }
1647
- var $e = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, we = new RegExp($e.source, "g");
1702
+ var Le = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Ae = new RegExp(Le.source, "g");
1648
1703
  function hn(e) {
1649
1704
  return function() {
1650
1705
  return e;
@@ -1656,17 +1711,17 @@ function yn(e) {
1656
1711
  };
1657
1712
  }
1658
1713
  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;
1714
+ var n = Le.lastIndex = Ae.lastIndex = 0, r, i, l, a = -1, c = [], d = [];
1715
+ for (e = e + "", t = t + ""; (r = Le.exec(e)) && (i = Ae.exec(t)); )
1716
+ (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: he(r, i) })), n = Ae.lastIndex;
1662
1717
  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);
1718
+ for (var u = 0, f; u < t; ++u) c[(f = d[u]).i] = f.x(o);
1664
1719
  return c.join("");
1665
1720
  });
1666
1721
  }
1667
- function Re(e, t) {
1722
+ function Ve(e, t) {
1668
1723
  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);
1724
+ return t == null || n === "boolean" ? Re(t) : (n === "number" ? he : n === "string" ? (r = ne(t)) ? (t = r, Je) : gn : t instanceof ne ? Je : t instanceof Date ? mn : un(t) ? dn : Array.isArray(t) ? fn : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? xn : he)(e, t);
1670
1725
  }
1671
1726
  function pn(e, t) {
1672
1727
  return e = +e, t = +t, function(n) {
@@ -1676,7 +1731,7 @@ function pn(e, t) {
1676
1731
  function vn(e) {
1677
1732
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
1678
1733
  }
1679
- function he(e, t) {
1734
+ function ye(e, t) {
1680
1735
  if ((n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
1681
1736
  var n, r = e.slice(0, n);
1682
1737
  return [
@@ -1684,8 +1739,8 @@ function he(e, t) {
1684
1739
  +e.slice(n + 1)
1685
1740
  ];
1686
1741
  }
1687
- function Q(e) {
1688
- return e = he(Math.abs(e)), e ? e[1] : NaN;
1742
+ function J(e) {
1743
+ return e = ye(Math.abs(e)), e ? e[1] : NaN;
1689
1744
  }
1690
1745
  function bn(e, t) {
1691
1746
  return function(n, r) {
@@ -1702,10 +1757,10 @@ function Nn(e) {
1702
1757
  };
1703
1758
  }
1704
1759
  var wn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1705
- function ye(e) {
1760
+ function ge(e) {
1706
1761
  if (!(t = wn.exec(e))) throw new Error("invalid format: " + e);
1707
1762
  var t;
1708
- return new Ve({
1763
+ return new Ie({
1709
1764
  fill: t[1],
1710
1765
  align: t[2],
1711
1766
  sign: t[3],
@@ -1718,11 +1773,11 @@ function ye(e) {
1718
1773
  type: t[10]
1719
1774
  });
1720
1775
  }
1721
- ye.prototype = Ve.prototype;
1722
- function Ve(e) {
1776
+ ge.prototype = Ie.prototype;
1777
+ function Ie(e) {
1723
1778
  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
1779
  }
1725
- Ve.prototype.toString = function() {
1780
+ Ie.prototype.toString = function() {
1726
1781
  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
1782
  };
1728
1783
  function An(e) {
@@ -1741,15 +1796,15 @@ function An(e) {
1741
1796
  }
1742
1797
  return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
1743
1798
  }
1744
- var ut;
1745
- function kn(e, t) {
1746
- var n = he(e, t);
1799
+ var mt;
1800
+ function Sn(e, t) {
1801
+ var n = ye(e, t);
1747
1802
  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];
1803
+ var r = n[0], i = n[1], l = i - (mt = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = r.length;
1804
+ 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") + ye(e, Math.max(0, t + l - 1))[0];
1750
1805
  }
1751
1806
  function Pe(e, t) {
1752
- var n = he(e, t);
1807
+ var n = ye(e, t);
1753
1808
  if (!n) return e + "";
1754
1809
  var r = n[0], i = n[1];
1755
1810
  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");
@@ -1765,7 +1820,7 @@ const et = {
1765
1820
  o: (e) => Math.round(e).toString(8),
1766
1821
  p: (e, t) => Pe(e * 100, t),
1767
1822
  r: Pe,
1768
- s: kn,
1823
+ s: Sn,
1769
1824
  X: (e) => Math.round(e).toString(16).toUpperCase(),
1770
1825
  x: (e) => Math.round(e).toString(16)
1771
1826
  };
@@ -1773,81 +1828,81 @@ function tt(e) {
1773
1828
  return e;
1774
1829
  }
1775
1830
  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) {
1831
+ function kn(e) {
1777
1832
  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));
1833
+ function o(f) {
1834
+ f = ge(f);
1835
+ var m = f.fill, v = f.align, w = f.sign, b = f.symbol, h = f.zero, $ = f.width, T = f.comma, N = f.precision, S = f.trim, g = f.type;
1836
+ g === "n" ? (T = !0, g = "g") : et[g] || (N === void 0 && (N = 12), S = !0, g = "g"), (h || m === "0" && v === "=") && (h = !0, m = "0", v = "=");
1837
+ var x = b === "$" ? n : b === "#" && /[boxX]/.test(g) ? "0" + g.toLowerCase() : "", y = b === "$" ? r : /[%p]/.test(g) ? a : "", k = et[g], A = /[defgprs%]/.test(g);
1838
+ N = N === void 0 ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, N)) : Math.max(0, Math.min(20, N));
1784
1839
  function L(M) {
1785
- var D = h, F = A, _, _e, re;
1786
- if (x === "c")
1787
- F = T(M) + F, M = "";
1840
+ var D = x, E = y, R, C, X;
1841
+ if (g === "c")
1842
+ E = k(M) + E, M = "";
1788
1843
  else {
1789
1844
  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, _);
1845
+ var se = M < 0 || 1 / M < 0;
1846
+ if (M = isNaN(M) ? d : k(Math.abs(M), N), S && (M = An(M)), se && +M == 0 && w !== "+" && (se = !1), D = (se ? w === "(" ? w : c : w === "-" || w === "(" ? "" : w) + D, E = (g === "s" ? rt[8 + mt / 3] : "") + E + (se && w === "(" ? ")" : ""), A) {
1847
+ for (R = -1, C = M.length; ++R < C; )
1848
+ if (X = M.charCodeAt(R), 48 > X || X > 57) {
1849
+ E = (X === 46 ? i + M.slice(R + 1) : M.slice(R)) + E, M = M.slice(0, R);
1795
1850
  break;
1796
1851
  }
1797
1852
  }
1798
1853
  }
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) {
1854
+ T && !h && (M = t(M, 1 / 0));
1855
+ var ae = D.length + M.length + E.length, H = ae < $ ? new Array($ - ae + 1).join(m) : "";
1856
+ switch (T && h && (M = t(H + M, H.length ? $ - E.length : 1 / 0), H = ""), v) {
1802
1857
  case "<":
1803
- M = D + M + F + I;
1858
+ M = D + M + E + H;
1804
1859
  break;
1805
1860
  case "=":
1806
- M = D + I + M + F;
1861
+ M = D + H + M + E;
1807
1862
  break;
1808
1863
  case "^":
1809
- M = I.slice(0, se = I.length >> 1) + D + M + F + I.slice(se);
1864
+ M = H.slice(0, ae = H.length >> 1) + D + M + E + H.slice(ae);
1810
1865
  break;
1811
1866
  default:
1812
- M = I + D + M + F;
1867
+ M = H + D + M + E;
1813
1868
  break;
1814
1869
  }
1815
1870
  return l(M);
1816
1871
  }
1817
1872
  return L.toString = function() {
1818
- return u + "";
1873
+ return f + "";
1819
1874
  }, L;
1820
1875
  }
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;
1876
+ function u(f, m) {
1877
+ var v = o((f = ge(f), f.type = "f", f)), w = Math.max(-8, Math.min(8, Math.floor(J(m) / 3))) * 3, b = Math.pow(10, -w), h = rt[8 + w / 3];
1878
+ return function($) {
1879
+ return v(b * $) + h;
1825
1880
  };
1826
1881
  }
1827
1882
  return {
1828
1883
  format: o,
1829
- formatPrefix: f
1884
+ formatPrefix: u
1830
1885
  };
1831
1886
  }
1832
- var ce, mt, xt;
1887
+ var de, xt, ht;
1833
1888
  Mn({
1834
1889
  thousands: ",",
1835
1890
  grouping: [3],
1836
1891
  currency: ["$", ""]
1837
1892
  });
1838
1893
  function Mn(e) {
1839
- return ce = Sn(e), mt = ce.format, xt = ce.formatPrefix, ce;
1894
+ return de = kn(e), xt = de.format, ht = de.formatPrefix, de;
1840
1895
  }
1841
1896
  function $n(e) {
1842
- return Math.max(0, -Q(Math.abs(e)));
1897
+ return Math.max(0, -J(Math.abs(e)));
1843
1898
  }
1844
1899
  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)));
1900
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(J(t) / 3))) * 3 - J(Math.abs(e)));
1846
1901
  }
1847
1902
  function Tn(e, t) {
1848
- return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Q(t) - Q(e)) + 1;
1903
+ return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, J(t) - J(e)) + 1;
1849
1904
  }
1850
- function Ie(e, t) {
1905
+ function _e(e, t) {
1851
1906
  switch (arguments.length) {
1852
1907
  case 0:
1853
1908
  break;
@@ -1861,7 +1916,7 @@ function Ie(e, t) {
1861
1916
  return this;
1862
1917
  }
1863
1918
  const it = Symbol("implicit");
1864
- function ht() {
1919
+ function yt() {
1865
1920
  var e = new Ce(), t = [], n = [], r = it;
1866
1921
  function i(l) {
1867
1922
  let a = e.get(l);
@@ -1882,44 +1937,44 @@ function ht() {
1882
1937
  }, i.unknown = function(l) {
1883
1938
  return arguments.length ? (r = l, i) : r;
1884
1939
  }, i.copy = function() {
1885
- return ht(t, n).unknown(r);
1886
- }, Ie.apply(i, arguments), i;
1940
+ return yt(t, n).unknown(r);
1941
+ }, _e.apply(i, arguments), i;
1887
1942
  }
1888
- function jn(e) {
1943
+ function Fn(e) {
1889
1944
  return function() {
1890
1945
  return e;
1891
1946
  };
1892
1947
  }
1893
- function Fn(e) {
1948
+ function Dn(e) {
1894
1949
  return +e;
1895
1950
  }
1896
1951
  var st = [0, 1];
1897
- function Y(e) {
1952
+ function Q(e) {
1898
1953
  return e;
1899
1954
  }
1900
- function Le(e, t) {
1955
+ function Te(e, t) {
1901
1956
  return (t -= e = +e) ? function(n) {
1902
1957
  return (n - e) / t;
1903
- } : jn(isNaN(t) ? NaN : 0.5);
1958
+ } : Fn(isNaN(t) ? NaN : 0.5);
1904
1959
  }
1905
- function zn(e, t) {
1960
+ function En(e, t) {
1906
1961
  var n;
1907
1962
  return e > t && (n = e, e = t, t = n), function(r) {
1908
1963
  return Math.max(e, Math.min(t, r));
1909
1964
  };
1910
1965
  }
1911
- function Dn(e, t, n) {
1966
+ function jn(e, t, n) {
1912
1967
  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) {
1968
+ return i < r ? (r = Te(i, r), l = n(a, l)) : (r = Te(r, i), l = n(l, a)), function(c) {
1914
1969
  return l(r(c));
1915
1970
  };
1916
1971
  }
1917
- function En(e, t, n) {
1972
+ function zn(e, t, n) {
1918
1973
  var r = Math.min(e.length, t.length) - 1, i = new Array(r), l = new Array(r), a = -1;
1919
1974
  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]);
1975
+ i[a] = Te(e[a], e[a + 1]), l[a] = n(t[a], t[a + 1]);
1921
1976
  return function(c) {
1922
- var d = ot(e, c, 1, r) - 1;
1977
+ var d = ct(e, c, 1, r) - 1;
1923
1978
  return l[d](i[d](c));
1924
1979
  };
1925
1980
  }
@@ -1927,41 +1982,41 @@ function Rn(e, t) {
1927
1982
  return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
1928
1983
  }
1929
1984
  function Vn() {
1930
- var e = st, t = st, n = Re, r, i, l, a = Y, c, d, o;
1931
- function f() {
1985
+ var e = st, t = st, n = Ve, r, i, l, a = Q, c, d, o;
1986
+ function u() {
1932
1987
  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;
1988
+ return a !== Q && (a = En(e[0], e[m - 1])), c = m > 2 ? zn : jn, d = o = null, f;
1934
1989
  }
1935
- function u(m) {
1990
+ function f(m) {
1936
1991
  return m == null || isNaN(m = +m) ? l : (d || (d = c(e.map(r), t, n)))(r(a(m)));
1937
1992
  }
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();
1993
+ return f.invert = function(m) {
1994
+ return a(i((o || (o = c(t, e.map(r), he)))(m)));
1995
+ }, f.domain = function(m) {
1996
+ return arguments.length ? (e = Array.from(m, Dn), u()) : e.slice();
1997
+ }, f.range = function(m) {
1998
+ return arguments.length ? (t = Array.from(m), u()) : t.slice();
1999
+ }, f.rangeRound = function(m) {
2000
+ return t = Array.from(m), n = pn, u();
2001
+ }, f.clamp = function(m) {
2002
+ return arguments.length ? (a = m ? !0 : Q, u()) : a !== Q;
2003
+ }, f.interpolate = function(m) {
2004
+ return arguments.length ? (n = m, u()) : n;
2005
+ }, f.unknown = function(m) {
2006
+ return arguments.length ? (l = m, f) : l;
2007
+ }, function(m, v) {
2008
+ return r = m, i = v, u();
1954
2009
  };
1955
2010
  }
1956
2011
  function In() {
1957
- return Vn()(Y, Y);
2012
+ return Vn()(Q, Q);
1958
2013
  }
1959
2014
  function _n(e, t, n, r) {
1960
2015
  var i = Wt(e, t, n), l;
1961
- switch (r = ye(r ?? ",f"), r.type) {
2016
+ switch (r = ge(r ?? ",f"), r.type) {
1962
2017
  case "s": {
1963
2018
  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);
2019
+ return r.precision == null && !isNaN(l = Ln(i, a)) && (r.precision = l), ht(r, a);
1965
2020
  }
1966
2021
  case "":
1967
2022
  case "e":
@@ -1977,21 +2032,21 @@ function _n(e, t, n, r) {
1977
2032
  break;
1978
2033
  }
1979
2034
  }
1980
- return mt(r);
2035
+ return xt(r);
1981
2036
  }
1982
- function yt(e) {
2037
+ function gt(e) {
1983
2038
  var t = e.domain;
1984
2039
  return e.ticks = function(n) {
1985
2040
  var r = t();
1986
- return Bt(r[0], r[r.length - 1], n ?? 10);
2041
+ return Kt(r[0], r[r.length - 1], n ?? 10);
1987
2042
  }, e.tickFormat = function(n, r) {
1988
2043
  var i = t();
1989
2044
  return _n(i[0], i[i.length - 1], n ?? 10, r);
1990
2045
  }, e.nice = function(n) {
1991
2046
  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)
2047
+ var r = t(), i = 0, l = r.length - 1, a = r[i], c = r[l], d, o, u = 10;
2048
+ for (c < a && (o = a, a = c, c = o, o = i, i = l, l = o); u-- > 0; ) {
2049
+ if (o = Me(a, c, n), o === d)
1995
2050
  return r[i] = a, r[l] = c, t(r);
1996
2051
  if (o > 0)
1997
2052
  a = Math.floor(a / o) * o, c = Math.ceil(c / o) * o;
@@ -2008,12 +2063,12 @@ function Hn() {
2008
2063
  var e = In();
2009
2064
  return e.copy = function() {
2010
2065
  return Rn(e, Hn());
2011
- }, Ie.apply(e, arguments), yt(e);
2066
+ }, _e.apply(e, arguments), gt(e);
2012
2067
  }
2013
- function gt() {
2068
+ function pt() {
2014
2069
  var e = 0, t = 1, n = 1, r = [0.5], i = [0, 1], l;
2015
2070
  function a(d) {
2016
- return d != null && d <= d ? i[ot(r, d, 0, n)] : l;
2071
+ return d != null && d <= d ? i[ct(r, d, 0, n)] : l;
2017
2072
  }
2018
2073
  function c() {
2019
2074
  var d = -1;
@@ -2032,8 +2087,8 @@ function gt() {
2032
2087
  }, a.thresholds = function() {
2033
2088
  return r.slice();
2034
2089
  }, a.copy = function() {
2035
- return gt().domain([e, t]).range(i).unknown(l);
2036
- }, Ie.apply(yt(a), arguments);
2090
+ return pt().domain([e, t]).range(i).unknown(l);
2091
+ }, _e.apply(gt(a), arguments);
2037
2092
  }
2038
2093
  function tr({
2039
2094
  data: e,
@@ -2050,101 +2105,101 @@ function tr({
2050
2105
  showLegend: n?.showLegend ?? !0
2051
2106
  };
2052
2107
  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: [
2108
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
2054
2109
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2055
2110
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in treemap chart" })
2056
2111
  ] }) });
2057
- let f, u = !1, m;
2112
+ let u, f = !1, m;
2058
2113
  if (t?.xAxis && t?.yAxis) {
2059
- const g = t.xAxis[0], b = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
2114
+ const N = t.xAxis[0], S = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
2060
2115
  m = Array.isArray(t.series) ? t.series[0] : t.series;
2061
- const x = H(r, g);
2116
+ const g = I(r, N);
2062
2117
  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);
2118
+ const x = e.map((y) => {
2119
+ const k = y[m];
2120
+ return typeof k == "string" ? parseFloat(k) : k;
2121
+ }).filter((y) => !isNaN(y));
2122
+ if (f = x.length === e.length && x.every((y) => typeof y == "number"), f) {
2123
+ const y = Math.min(...x), k = Math.max(...x), A = pt().domain([y, k]).range(le);
2124
+ u = e.map((L) => {
2125
+ const M = typeof L[m] == "string" ? parseFloat(L[m]) : L[m], D = A(M);
2071
2126
  return {
2072
- name: R(L[g], x) || String(L[g]) || "Unknown",
2073
- size: typeof L[b] == "string" ? parseFloat(L[b]) : L[b] || 0,
2127
+ name: z(L[N], g) || String(L[N]) || "Unknown",
2128
+ size: typeof L[S] == "string" ? parseFloat(L[S]) : L[S] || 0,
2074
2129
  fill: D,
2075
2130
  series: String(L[m])
2076
2131
  };
2077
2132
  });
2078
2133
  } 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])
2134
+ const y = [...new Set(e.map((A) => String(A[m])))], k = yt().domain(y).range(l?.colors || F);
2135
+ u = e.map((A) => ({
2136
+ name: z(A[N], g) || String(A[N]) || "Unknown",
2137
+ size: typeof A[S] == "string" ? parseFloat(A[S]) : A[S] || 0,
2138
+ fill: k(String(A[m])),
2139
+ series: String(A[m])
2085
2140
  }));
2086
2141
  }
2087
2142
  } 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]
2143
+ u = e.map((x, y) => ({
2144
+ name: z(x[N], g) || String(x[N]) || "Unknown",
2145
+ size: typeof x[S] == "string" ? parseFloat(x[S]) : x[S] || 0,
2146
+ fill: l?.colors && l.colors[y % l.colors.length] || F[y % F.length]
2092
2147
  }));
2093
2148
  } 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: [
2149
+ const N = e[0], S = Object.keys(N), g = S.find(
2150
+ (y) => typeof N[y] == "string" || y.toLowerCase().includes("name") || y.toLowerCase().includes("label") || y.toLowerCase().includes("category")
2151
+ ) || S[0], x = S.find((y) => y.toLowerCase().includes("size")) || S.find(
2152
+ (y) => typeof N[y] == "number" && y !== g
2153
+ ) || S[1];
2154
+ if (!x)
2155
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
2101
2156
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
2102
2157
  /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
2103
2158
  ] }) });
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]
2159
+ u = e.map((y, k) => {
2160
+ let A = y[g];
2161
+ return typeof A == "boolean" ? A = A ? "Active" : "Inactive" : A === "true" || A === "false" ? A = A === "true" ? "Active" : "Inactive" : A = String(A), {
2162
+ name: A,
2163
+ size: typeof y[x] == "string" ? parseFloat(y[x]) : y[x] || 0,
2164
+ fill: l?.colors && l.colors[k % l.colors.length] || F[k % F.length]
2110
2165
  };
2111
2166
  });
2112
2167
  }
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: [
2168
+ if (u = u.filter((N) => N.size != null && N.size > 0), u.length === 0)
2169
+ return /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
2115
2170
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
2116
2171
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for treemap chart after transformation" })
2117
2172
  ] }) });
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: [
2173
+ const v = (N) => {
2174
+ const { x: S, y: g, width: x, height: y, index: k, name: A, size: L } = N;
2175
+ return x < 20 || y < 20 ? null : /* @__PURE__ */ p("g", { children: [
2121
2176
  /* @__PURE__ */ s(
2122
2177
  "rect",
2123
2178
  {
2124
- x: b,
2125
- y: x,
2126
- width: h,
2127
- height: A,
2179
+ x: S,
2180
+ y: g,
2181
+ width: x,
2182
+ height: y,
2128
2183
  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,
2184
+ fill: u[k]?.fill || l?.colors && l.colors[k % l.colors.length] || F[k % F.length],
2185
+ fillOpacity: a !== null ? a === k ? 1 : 0.6 : 0.8,
2131
2186
  stroke: "#fff",
2132
2187
  strokeWidth: 2,
2133
2188
  cursor: "pointer"
2134
2189
  },
2135
- onMouseEnter: () => c(T),
2190
+ onMouseEnter: () => c(k),
2136
2191
  onMouseLeave: () => c(null)
2137
2192
  }
2138
2193
  ),
2139
2194
  /* @__PURE__ */ s(
2140
2195
  "foreignObject",
2141
2196
  {
2142
- x: b,
2143
- y: x,
2144
- width: h,
2145
- height: A,
2197
+ x: S,
2198
+ y: g,
2199
+ width: x,
2200
+ height: y,
2146
2201
  style: { pointerEvents: "none", overflow: "visible" },
2147
- children: /* @__PURE__ */ N(
2202
+ children: /* @__PURE__ */ p(
2148
2203
  "div",
2149
2204
  {
2150
2205
  style: {
@@ -2162,26 +2217,26 @@ function tr({
2162
2217
  overflow: "hidden"
2163
2218
  },
2164
2219
  children: [
2165
- h > 40 && A > 30 && /* @__PURE__ */ s(
2220
+ x > 40 && y > 30 && /* @__PURE__ */ s(
2166
2221
  "div",
2167
2222
  {
2168
2223
  style: {
2169
- fontSize: `${Math.max(10, Math.min(h / 8, A / 8, 16))}px`,
2224
+ fontSize: `${Math.max(10, Math.min(x / 8, y / 8, 16))}px`,
2170
2225
  fontWeight: "600",
2171
2226
  textAlign: "center",
2172
2227
  lineHeight: "1.2",
2173
- marginBottom: h > 60 && A > 45 ? "4px" : "0",
2228
+ marginBottom: x > 60 && y > 45 ? "4px" : "0",
2174
2229
  wordBreak: "break-word",
2175
2230
  hyphens: "auto"
2176
2231
  },
2177
- children: k
2232
+ children: A
2178
2233
  }
2179
2234
  ),
2180
- h > 60 && A > 45 && /* @__PURE__ */ s(
2235
+ x > 60 && y > 45 && /* @__PURE__ */ s(
2181
2236
  "div",
2182
2237
  {
2183
2238
  style: {
2184
- fontSize: `${Math.max(8, Math.min(h / 10, A / 10, 14))}px`,
2239
+ fontSize: `${Math.max(8, Math.min(x / 10, y / 10, 14))}px`,
2185
2240
  textAlign: "center",
2186
2241
  opacity: 0.9
2187
2242
  },
@@ -2194,51 +2249,51 @@ function tr({
2194
2249
  }
2195
2250
  )
2196
2251
  ] });
2197
- }, w = f.some((g) => "series" in g) ? [...new Set(f.map((g) => g.series).filter(Boolean))] : [];
2198
- let y = [];
2252
+ }, b = u.some((N) => "series" in N) ? [...new Set(u.map((N) => N.series).filter(Boolean))] : [];
2253
+ let h = [];
2199
2254
  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;
2255
+ if (f) {
2256
+ const N = Math.min(...e.map((g) => {
2257
+ const x = g[m];
2258
+ return typeof x == "string" ? parseFloat(x) : x;
2259
+ })), S = Math.max(...e.map((g) => {
2260
+ const x = g[m];
2261
+ return typeof x == "string" ? parseFloat(x) : x;
2207
2262
  }));
2208
- y = ae.map((x, h) => {
2209
- const A = h / (ae.length - 1);
2263
+ h = le.map((g, x) => {
2264
+ const y = x / (le.length - 1);
2210
2265
  return {
2211
- value: (g + (b - g) * A).toFixed(2),
2266
+ value: (N + (S - N) * y).toFixed(2),
2212
2267
  type: "rect",
2213
- color: x
2268
+ color: g
2214
2269
  };
2215
2270
  });
2216
- } else w.length > 1 && (y = w.map((g, b) => ({
2217
- value: g,
2271
+ } else b.length > 1 && (h = b.map((N, S) => ({
2272
+ value: N,
2218
2273
  type: "rect",
2219
- color: j[b % j.length]
2274
+ color: F[S % F.length]
2220
2275
  })));
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,
2276
+ const $ = o.showLegend && h.length > 0, T = $ ? typeof i == "string" && i.includes("%") ? i : typeof i == "number" ? i + 60 : `calc(${i} + 60px)` : i;
2277
+ return /* @__PURE__ */ p("div", { className: "w-full", style: { height: T }, children: [
2278
+ /* @__PURE__ */ s(G, { height: $ ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ s(
2279
+ jt,
2225
2280
  {
2226
- data: f,
2281
+ data: u,
2227
2282
  dataKey: "size",
2228
2283
  aspectRatio: 4 / 3,
2229
2284
  stroke: "#fff",
2230
- content: /* @__PURE__ */ s(p, {}),
2231
- children: o.showTooltip && /* @__PURE__ */ s(C, {})
2285
+ content: /* @__PURE__ */ s(v, {}),
2286
+ children: o.showTooltip && /* @__PURE__ */ s(Y, {})
2232
2287
  }
2233
2288
  ) }),
2234
- S && /* @__PURE__ */ s("div", { className: "flex justify-center items-center mt-4 pb-2", children: u ? (
2289
+ $ && /* @__PURE__ */ s("div", { className: "flex justify-center items-center mt-4 pb-2", children: f ? (
2235
2290
  // Gradient legend for numeric series
2236
- /* @__PURE__ */ N("div", { className: "flex flex-col items-center", children: [
2291
+ /* @__PURE__ */ p("div", { className: "flex flex-col items-center", children: [
2237
2292
  /* @__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;
2293
+ /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
2294
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((N) => {
2295
+ const S = N[m];
2296
+ return typeof S == "string" ? parseFloat(S) : S;
2242
2297
  })).toFixed(2) }),
2243
2298
  /* @__PURE__ */ s(
2244
2299
  "div",
@@ -2246,32 +2301,32 @@ function tr({
2246
2301
  className: "h-4 rounded-sm",
2247
2302
  style: {
2248
2303
  width: "200px",
2249
- background: `linear-gradient(to right, ${ae.join(", ")})`
2304
+ background: `linear-gradient(to right, ${le.join(", ")})`
2250
2305
  }
2251
2306
  }
2252
2307
  ),
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;
2308
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.max(...e.map((N) => {
2309
+ const S = N[m];
2310
+ return typeof S == "string" ? parseFloat(S) : S;
2256
2311
  })).toFixed(2) })
2257
2312
  ] })
2258
2313
  ] })
2259
2314
  ) : (
2260
2315
  // 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: [
2316
+ /* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-4", children: h.map((N, S) => /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
2262
2317
  /* @__PURE__ */ s(
2263
2318
  "div",
2264
2319
  {
2265
2320
  className: "w-3 h-3 rounded-xs",
2266
- style: { backgroundColor: g.color }
2321
+ style: { backgroundColor: N.color }
2267
2322
  }
2268
2323
  ),
2269
- /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: g.value })
2270
- ] }, b)) })
2324
+ /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: N.value })
2325
+ ] }, S)) })
2271
2326
  ) })
2272
2327
  ] });
2273
2328
  } 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: [
2329
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: i }, children: /* @__PURE__ */ p("div", { className: "text-center", children: [
2275
2330
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
2276
2331
  /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
2277
2332
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
@@ -2290,7 +2345,7 @@ function nr({
2290
2345
  {
2291
2346
  className: "flex items-center justify-center w-full",
2292
2347
  style: { height: n },
2293
- children: /* @__PURE__ */ N("div", { className: "text-center text-dc-text-muted", children: [
2348
+ children: /* @__PURE__ */ p("div", { className: "text-center text-dc-text-muted", children: [
2294
2349
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2295
2350
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data to display in table" })
2296
2351
  ] })
@@ -2302,12 +2357,12 @@ function nr({
2302
2357
  {
2303
2358
  className: "flex items-center justify-center w-full",
2304
2359
  style: { height: n },
2305
- children: /* @__PURE__ */ N("div", { className: "text-center text-dc-text-muted", children: [
2360
+ children: /* @__PURE__ */ p("div", { className: "text-center text-dc-text-muted", children: [
2306
2361
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
2307
2362
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "Data structure is invalid" })
2308
2363
  ] })
2309
2364
  }
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: [
2365
+ ) : /* @__PURE__ */ s("div", { className: "w-full overflow-auto", style: { height: n }, children: /* @__PURE__ */ p("table", { className: "min-w-full divide-y border-dc-border", children: [
2311
2366
  /* @__PURE__ */ s("thead", { className: "bg-dc-surface-secondary sticky top-0", children: /* @__PURE__ */ s("tr", { children: l.map((a) => /* @__PURE__ */ s(
2312
2367
  "th",
2313
2368
  {
@@ -2403,14 +2458,14 @@ function or() {
2403
2458
  export {
2404
2459
  Qn as A,
2405
2460
  Yn as B,
2406
- be as C,
2461
+ Ne as C,
2407
2462
  nr as D,
2408
2463
  ar as E,
2409
2464
  lr as F,
2410
2465
  or as G,
2411
2466
  Ge as H,
2412
2467
  Xn as L,
2413
- Et as N,
2468
+ zt as N,
2414
2469
  Zn as P,
2415
2470
  Pn as R,
2416
2471
  Jn as S,
@@ -2419,27 +2474,27 @@ export {
2419
2474
  Je as b,
2420
2475
  rr as c,
2421
2476
  gn as d,
2422
- ee as e,
2477
+ ne as e,
2423
2478
  ir as f,
2424
2479
  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,
2480
+ _e as h,
2481
+ he as i,
2482
+ Q as j,
2483
+ I as k,
2484
+ gt as l,
2485
+ z as m,
2486
+ Se as n,
2432
2487
  Hn as o,
2433
- Z as p,
2434
- gt as q,
2435
- ae as r,
2436
- ht as s,
2488
+ P as p,
2489
+ pt as q,
2490
+ le as r,
2491
+ yt as s,
2437
2492
  Vn as t,
2438
- j as u,
2439
- Fe as v,
2493
+ F as u,
2494
+ Ee as v,
2440
2495
  Wn as w,
2441
- Bn as x,
2496
+ Kn as x,
2442
2497
  Gn as y,
2443
2498
  sr as z
2444
2499
  };
2445
- //# sourceMappingURL=charts-CC85023I.js.map
2500
+ //# sourceMappingURL=charts-Np_DXu2d.js.map