drizzle-cube 0.1.42 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/adapters/{compiler-B57cLx38.js → compiler-DdaSPwZs.js} +25 -8
  2. package/dist/adapters/express/index.js +84 -63
  3. package/dist/adapters/fastify/index.js +108 -73
  4. package/dist/adapters/hono/index.js +62 -44
  5. package/dist/adapters/nextjs/index.d.ts +6 -0
  6. package/dist/adapters/nextjs/index.js +145 -108
  7. package/dist/adapters/utils.d.ts +46 -0
  8. package/dist/client/charts.js +1 -1
  9. package/dist/client/chunks/{charts-VcPFhxyE.js → charts-CfbqkXfS.js} +415 -425
  10. package/dist/client/chunks/charts-CfbqkXfS.js.map +1 -0
  11. package/dist/client/chunks/{components-DzCsplX7.js → components-B0Wk5TCQ.js} +8814 -7851
  12. package/dist/client/chunks/components-B0Wk5TCQ.js.map +1 -0
  13. package/dist/client/chunks/{icons-MNJ50ahP.js → icons-oifcbJCc.js} +309 -255
  14. package/dist/client/chunks/icons-oifcbJCc.js.map +1 -0
  15. package/dist/client/chunks/providers-aaWIe5KD.js +304 -0
  16. package/dist/client/chunks/providers-aaWIe5KD.js.map +1 -0
  17. package/dist/client/client/BatchCoordinator.d.ts +35 -0
  18. package/dist/client/client/CubeClient.d.ts +5 -0
  19. package/dist/client/components/AnalyticsDashboard.d.ts +1 -1
  20. package/dist/client/components/DashboardFilterPanel.d.ts +15 -0
  21. package/dist/client/components/DashboardFilters/EditModeFilterList.d.ts +12 -0
  22. package/dist/client/components/DashboardFilters/FilterEditModal.d.ts +15 -0
  23. package/dist/client/components/DashboardFilters/ReadOnlyFilterList.d.ts +13 -0
  24. package/dist/client/components/DashboardGrid.d.ts +5 -2
  25. package/dist/client/components/PortletFilterConfigModal.d.ts +11 -0
  26. package/dist/client/components/QueryBuilder/DateRangeSelector.d.ts +2 -0
  27. package/dist/client/components/QueryBuilder/types.d.ts +3 -0
  28. package/dist/client/components.js +2 -2
  29. package/dist/client/hooks.js +61 -61
  30. package/dist/client/hooks.js.map +1 -1
  31. package/dist/client/index.js +3 -3
  32. package/dist/client/providers/CubeProvider.d.ts +5 -0
  33. package/dist/client/providers.js +1 -1
  34. package/dist/client/styles.css +1 -1
  35. package/dist/client/types.d.ts +14 -0
  36. package/dist/client/utils/filterUtils.d.ts +40 -0
  37. package/dist/client-bundle-stats.html +1 -1
  38. package/package.json +1 -1
  39. package/dist/client/chunks/charts-VcPFhxyE.js.map +0 -1
  40. package/dist/client/chunks/components-DzCsplX7.js.map +0 -1
  41. package/dist/client/chunks/icons-MNJ50ahP.js.map +0 -1
  42. package/dist/client/chunks/providers-DwDirAYo.js +0 -208
  43. package/dist/client/chunks/providers-DwDirAYo.js.map +0 -1
@@ -1,33 +1,33 @@
1
- import { jsx as s, jsxs as N, Fragment as $e } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as w, Fragment as $e } from "react/jsx-runtime";
2
2
  import { useState as H } from "react";
3
- import { ResponsiveContainer as _e, Tooltip as yt, ComposedChart as it, CartesianGrid as ye, XAxis as ge, YAxis as pe, Legend as K, Bar as gt, Cell as Le, Line as U, LineChart as pt, Area as vt, PieChart as bt, Pie as wt, ScatterChart as Nt, Scatter as Oe, RadarChart as At, PolarGrid as kt, PolarAngleAxis as St, PolarRadiusAxis as Mt, Radar as $t, RadialBarChart as Lt, RadialBar as Tt, Treemap as Ft } from "recharts";
4
- import { u as B } from "./providers-DwDirAYo.js";
5
- function C({ children: e, height: t = "100%" }) {
3
+ import { ResponsiveContainer as _e, Tooltip as yt, ComposedChart as st, CartesianGrid as ye, XAxis as ge, YAxis as pe, Legend as K, Bar as gt, Cell as Le, Line as C, LineChart as pt, Area as vt, PieChart as bt, Pie as Nt, ScatterChart as wt, Scatter as Oe, RadarChart as At, PolarGrid as kt, PolarAngleAxis as St, PolarRadiusAxis as Mt, Radar as $t, RadialBarChart as Lt, RadialBar as Tt, Treemap as Ft } from "recharts";
4
+ import { u as B } from "./providers-aaWIe5KD.js";
5
+ function V({ children: e, height: t = "100%" }) {
6
6
  try {
7
7
  if (t === "100%")
8
- return /* @__PURE__ */ s("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ s(_e, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
8
+ return /* @__PURE__ */ i("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ i(_e, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
9
9
  const n = {
10
10
  height: typeof t == "number" ? `${t}px` : t,
11
11
  width: "100%",
12
12
  minHeight: "200px"
13
13
  };
14
- return /* @__PURE__ */ s("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ s(_e, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
14
+ return /* @__PURE__ */ i("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ i(_e, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
15
15
  } catch (n) {
16
- return /* @__PURE__ */ N(
16
+ return /* @__PURE__ */ w(
17
17
  "div",
18
18
  {
19
- className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border-2 border-dashed rounded-lg",
20
- style: { height: t, borderColor: "var(--dc-warning-border)", backgroundColor: "var(--dc-warning-bg)" },
19
+ className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border border-dashed rounded-lg",
20
+ style: { height: t, borderColor: "var(--dc-border)", backgroundColor: "var(--dc-surface)" },
21
21
  children: [
22
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", style: { color: "var(--dc-warning)" }, children: "Chart Container Error" }),
23
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: n instanceof Error ? n.message : "Failed to create responsive container" })
22
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1 text-dc-text-muted", children: "Unable to display chart" }),
23
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: n instanceof Error ? n.message : "Failed to create responsive container" })
24
24
  ]
25
25
  }
26
26
  );
27
27
  }
28
28
  }
29
- function V({ formatter: e, labelFormatter: t }) {
30
- return /* @__PURE__ */ s(
29
+ function G({ formatter: e, labelFormatter: t }) {
30
+ return /* @__PURE__ */ i(
31
31
  yt,
32
32
  {
33
33
  formatter: e,
@@ -61,7 +61,7 @@ const T = [
61
61
  // cyan
62
62
  "#84cc16"
63
63
  // lime
64
- ], se = [
64
+ ], ie = [
65
65
  "#440154",
66
66
  // dark purple
67
67
  "#414487",
@@ -80,7 +80,7 @@ const T = [
80
80
  left: 20,
81
81
  bottom: 5
82
82
  };
83
- function Ne(e, t) {
83
+ function we(e, t) {
84
84
  return t[e] || e;
85
85
  }
86
86
  function R(e, t) {
@@ -89,16 +89,16 @@ function R(e, t) {
89
89
  if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
90
90
  let r = n;
91
91
  n.includes(" ") && (r = n.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !r.endsWith("Z") && !r.includes("+") && (r = r + "Z");
92
- const i = new Date(r);
93
- if (isNaN(i.getTime()))
92
+ const s = new Date(r);
93
+ if (isNaN(s.getTime()))
94
94
  return n;
95
- const l = i.getUTCFullYear(), a = String(i.getUTCMonth() + 1).padStart(2, "0"), c = String(i.getUTCDate()).padStart(2, "0"), d = i.getUTCHours(), o = i.getUTCMinutes();
95
+ const l = s.getUTCFullYear(), a = String(s.getUTCMonth() + 1).padStart(2, "0"), c = String(s.getUTCDate()).padStart(2, "0"), d = s.getUTCHours(), o = s.getUTCMinutes();
96
96
  if (t)
97
97
  switch (t.toLowerCase()) {
98
98
  case "year":
99
99
  return `${l}`;
100
100
  case "quarter":
101
- const m = Math.floor(i.getUTCMonth() / 3) + 1;
101
+ const m = Math.floor(s.getUTCMonth() / 3) + 1;
102
102
  return `${l}-Q${m}`;
103
103
  case "month":
104
104
  return `${l}-${a}`;
@@ -111,10 +111,10 @@ function R(e, t) {
111
111
  case "minute":
112
112
  return `${l}-${a}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
113
113
  }
114
- const f = i.getUTCSeconds(), u = i.getUTCMilliseconds();
114
+ const f = s.getUTCSeconds(), u = s.getUTCMilliseconds();
115
115
  if (c === "01" && d === 0 && o === 0 && f === 0 && u === 0) {
116
116
  if (a === "01" || a === "04" || a === "07" || a === "10") {
117
- const m = Math.floor(i.getUTCMonth() / 3) + 1;
117
+ const m = Math.floor(s.getUTCMonth() / 3) + 1;
118
118
  return `${l}-Q${m}`;
119
119
  }
120
120
  return `${l}-${a}`;
@@ -126,7 +126,7 @@ function R(e, t) {
126
126
  function O(e, t) {
127
127
  try {
128
128
  if (e?.timeDimensions) {
129
- const r = e.timeDimensions.find((i) => t === i.dimension || t.startsWith(i.dimension.replace(".", "_")) || t === `${i.dimension}_${i.granularity}`);
129
+ const r = e.timeDimensions.find((s) => t === s.dimension || t.startsWith(s.dimension.replace(".", "_")) || t === `${s.dimension}_${s.granularity}`);
130
130
  if (r?.granularity)
131
131
  return r.granularity;
132
132
  }
@@ -141,7 +141,7 @@ function O(e, t) {
141
141
  return;
142
142
  }
143
143
  }
144
- function zt(e, t, n, r, i = {}) {
144
+ function zt(e, t, n, r, s = {}) {
145
145
  if (!e || e.length === 0) return [];
146
146
  const l = O(r, t);
147
147
  return e.map((a) => {
@@ -149,29 +149,29 @@ function zt(e, t, n, r, i = {}) {
149
149
  name: R(a[t], l) || a[t] || "Unknown"
150
150
  };
151
151
  return n.forEach((d) => {
152
- const o = Ne(d, i);
152
+ const o = we(d, s);
153
153
  c[o] = typeof a[d] == "string" ? parseFloat(a[d]) : a[d] || 0;
154
154
  }), c;
155
155
  });
156
156
  }
157
- function ee(e, t, n, r, i, l = {}) {
157
+ function ee(e, t, n, r, s, l = {}) {
158
158
  if (!e || e.length === 0)
159
159
  return { data: [], seriesKeys: [], hasDimensions: !1 };
160
160
  const a = r || {}, c = [
161
161
  ...a.dimensions || [],
162
162
  ...a.timeDimensions?.map((v) => v.dimension) || []
163
- ], d = a.measures || [], o = n.filter((v) => d.includes(v)), f = (i || []).filter((v) => c.includes(v));
163
+ ], d = a.measures || [], o = n.filter((v) => d.includes(v)), f = (s || []).filter((v) => c.includes(v));
164
164
  if (f.length > 0) {
165
165
  const v = {};
166
166
  e.forEach((x) => {
167
167
  const k = O(r, t), $ = R(x[t], k) || x[t] || "Unknown";
168
168
  v[$] || (v[$] = { name: String($) }), o.forEach((h) => {
169
- const w = Ne(h, l);
170
- v[$][w] = (v[$][w] || 0) + (typeof x[h] == "string" ? parseFloat(x[h]) : x[h] || 0);
169
+ const N = we(h, l);
170
+ v[$][N] = (v[$][N] || 0) + (typeof x[h] == "string" ? parseFloat(x[h]) : x[h] || 0);
171
171
  }), f.forEach((h) => {
172
- const w = x[h];
173
- if (w != null) {
174
- const y = String(w), g = o[0] || d.find(
172
+ const N = x[h];
173
+ if (N != null) {
174
+ const y = String(N), g = o[0] || d.find(
175
175
  (b) => b.includes("totalCost") || b.includes("count") || b.includes("sum")
176
176
  ) || d[0];
177
177
  if (g) {
@@ -195,7 +195,7 @@ function ee(e, t, n, r, i, l = {}) {
195
195
  hasDimensions: !0
196
196
  };
197
197
  }
198
- const u = zt(e, t, n, r, l), m = n.map((v) => Ne(v, l));
198
+ const u = zt(e, t, n, r, l), m = n.map((v) => we(v, l));
199
199
  return {
200
200
  data: u,
201
201
  seriesKeys: m,
@@ -210,10 +210,10 @@ function Te(e) {
210
210
  return [];
211
211
  try {
212
212
  const n = t.split(",").map((r) => r.trim()).filter((r) => r !== "").map((r) => {
213
- const i = parseFloat(r);
214
- if (isNaN(i))
213
+ const s = parseFloat(r);
214
+ if (isNaN(s))
215
215
  throw new Error(`Invalid numeric value: ${r}`);
216
- return i;
216
+ return s;
217
217
  });
218
218
  return n.length > 0 ? n : [];
219
219
  } catch (n) {
@@ -225,16 +225,16 @@ function Fe(e, t) {
225
225
  return [];
226
226
  if (e.length === 1)
227
227
  return new Array(t).fill(e[0]);
228
- const n = [], r = Math.floor(t / e.length), i = t % e.length;
228
+ const n = [], r = Math.floor(t / e.length), s = t % e.length;
229
229
  let l = 0;
230
230
  for (let a = 0; a < e.length; a++) {
231
- const c = r + (a < i ? 1 : 0);
231
+ const c = r + (a < s ? 1 : 0);
232
232
  for (let d = 0; d < c; d++)
233
233
  n[l++] = e[a];
234
234
  }
235
235
  return n;
236
236
  }
237
- function Un(e, t) {
237
+ function Cn(e, t) {
238
238
  return t === 0 ? e === 0 ? 0 : e > 0 ? 100 : -100 : (e - t) / t * 100;
239
239
  }
240
240
  function qn(e, t = 1) {
@@ -245,7 +245,7 @@ function Kn({
245
245
  chartConfig: t,
246
246
  displayConfig: n = {},
247
247
  queryObject: r,
248
- height: i = "100%",
248
+ height: s = "100%",
249
249
  colorPalette: l
250
250
  }) {
251
251
  const [a, c] = H(null), { labelMap: d, getFieldLabel: o } = B();
@@ -257,9 +257,9 @@ function Kn({
257
257
  stacked: n?.stacked ?? !1
258
258
  };
259
259
  if (!e || e.length === 0)
260
- 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: [
261
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
262
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in bar chart" })
260
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
261
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
262
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in bar chart" })
263
263
  ] }) });
264
264
  let u, m, v = [];
265
265
  if (t?.xAxis && t?.yAxis)
@@ -267,14 +267,14 @@ function Kn({
267
267
  else if (t?.x && t?.y)
268
268
  u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
269
269
  else
270
- 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: [
271
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
272
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
270
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
271
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
272
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
273
273
  ] }) });
274
274
  if (!u || !m || m.length === 0)
275
- 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: [
276
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
277
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
275
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
276
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
277
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
278
278
  ] }) });
279
279
  const { data: p, seriesKeys: A } = ee(
280
280
  e,
@@ -290,17 +290,17 @@ function Kn({
290
290
  ...ve,
291
291
  left: 40
292
292
  // Increased from 20 to 40 for Y-axis label space
293
- }, w = Te(n?.target || ""), y = Fe(w, p.length);
293
+ }, N = Te(n?.target || ""), y = Fe(N, p.length);
294
294
  let g = p;
295
295
  return y.length > 0 && (g = p.map((b, M) => ({
296
296
  ...b,
297
297
  __target: y[M] || null
298
- }))), !p || p.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: [
299
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
300
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for bar chart after transformation" })
301
- ] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(it, { data: g, margin: h, children: [
302
- f.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
303
- /* @__PURE__ */ s(
298
+ }))), !p || p.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
299
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
300
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for bar chart after transformation" })
301
+ ] }) }) : /* @__PURE__ */ i(V, { height: s, children: /* @__PURE__ */ w(st, { data: g, margin: h, children: [
302
+ f.showGrid && /* @__PURE__ */ i(ye, { strokeDasharray: "3 3" }),
303
+ /* @__PURE__ */ i(
304
304
  ge,
305
305
  {
306
306
  dataKey: "name",
@@ -310,20 +310,20 @@ function Kn({
310
310
  height: 60
311
311
  }
312
312
  ),
313
- /* @__PURE__ */ s(
313
+ /* @__PURE__ */ i(
314
314
  pe,
315
315
  {
316
316
  tick: { fontSize: 12 },
317
317
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
318
318
  }
319
319
  ),
320
- f.showTooltip && /* @__PURE__ */ s(
321
- V,
320
+ f.showTooltip && /* @__PURE__ */ i(
321
+ G,
322
322
  {
323
323
  formatter: (b, M) => M === "Target" ? [`${b}`, "Target Value"] : [b, M]
324
324
  }
325
325
  ),
326
- $ && /* @__PURE__ */ s(
326
+ $ && /* @__PURE__ */ i(
327
327
  K,
328
328
  {
329
329
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
@@ -336,7 +336,7 @@ function Kn({
336
336
  onMouseLeave: () => c(null)
337
337
  }
338
338
  ),
339
- A.map((b, M) => /* @__PURE__ */ s(
339
+ A.map((b, M) => /* @__PURE__ */ i(
340
340
  gt,
341
341
  {
342
342
  dataKey: b,
@@ -345,7 +345,7 @@ function Kn({
345
345
  fillOpacity: a ? a === b ? 1 : 0.3 : 1,
346
346
  children: k && p.map((L, F) => {
347
347
  const S = L[b], E = typeof S == "number" && S < 0 ? jt : He;
348
- return /* @__PURE__ */ s(
348
+ return /* @__PURE__ */ i(
349
349
  Le,
350
350
  {
351
351
  fill: E,
@@ -357,9 +357,9 @@ function Kn({
357
357
  },
358
358
  b
359
359
  )),
360
- y.length > 0 && /* @__PURE__ */ N($e, { children: [
361
- /* @__PURE__ */ s(
362
- U,
360
+ y.length > 0 && /* @__PURE__ */ w($e, { children: [
361
+ /* @__PURE__ */ i(
362
+ C,
363
363
  {
364
364
  type: "monotone",
365
365
  dataKey: "__target",
@@ -370,8 +370,8 @@ function Kn({
370
370
  connectNulls: !1
371
371
  }
372
372
  ),
373
- /* @__PURE__ */ s(
374
- U,
373
+ /* @__PURE__ */ i(
374
+ C,
375
375
  {
376
376
  type: "monotone",
377
377
  dataKey: "__target",
@@ -387,10 +387,10 @@ function Kn({
387
387
  ] })
388
388
  ] }) });
389
389
  } catch (f) {
390
- 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: [
391
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Bar Chart Error" }),
392
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
393
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
390
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
391
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Bar Chart Error" }),
392
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
393
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
394
394
  ] }) });
395
395
  }
396
396
  }
@@ -399,7 +399,7 @@ function Bn({
399
399
  chartConfig: t,
400
400
  displayConfig: n = {},
401
401
  queryObject: r,
402
- height: i = "100%",
402
+ height: s = "100%",
403
403
  colorPalette: l
404
404
  }) {
405
405
  const [a, c] = H(null), { labelMap: d, getFieldLabel: o } = B();
@@ -410,9 +410,9 @@ function Bn({
410
410
  showTooltip: n?.showTooltip ?? !0
411
411
  };
412
412
  if (!e || e.length === 0)
413
- 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: [
414
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
415
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in line chart" })
413
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
414
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
415
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in line chart" })
416
416
  ] }) });
417
417
  let u, m, v = [];
418
418
  if (t?.xAxis && t?.yAxis)
@@ -420,14 +420,14 @@ function Bn({
420
420
  else if (t?.x && t?.y)
421
421
  u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
422
422
  else
423
- 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: [
424
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
425
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
423
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
424
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
425
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
426
426
  ] }) });
427
427
  if (!u || !m || m.length === 0)
428
- 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: [
429
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
430
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
428
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
429
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
430
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
431
431
  ] }) });
432
432
  const { data: p, seriesKeys: A } = ee(
433
433
  e,
@@ -441,16 +441,16 @@ function Bn({
441
441
  left: 40
442
442
  // Increased from 20 to 40 for Y-axis label space
443
443
  }, $ = Te(n?.target || ""), h = Fe($, p.length);
444
- let w = p;
445
- return h.length > 0 && (w = p.map((y, g) => ({
444
+ let N = p;
445
+ return h.length > 0 && (N = p.map((y, g) => ({
446
446
  ...y,
447
447
  __target: h[g] || null
448
- }))), !p || p.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: [
449
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
450
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for line chart after transformation" })
451
- ] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(pt, { data: w, margin: k, children: [
452
- f.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
453
- /* @__PURE__ */ s(
448
+ }))), !p || p.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
449
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
450
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for line chart after transformation" })
451
+ ] }) }) : /* @__PURE__ */ i(V, { height: s, children: /* @__PURE__ */ w(pt, { data: N, margin: k, children: [
452
+ f.showGrid && /* @__PURE__ */ i(ye, { strokeDasharray: "3 3" }),
453
+ /* @__PURE__ */ i(
454
454
  ge,
455
455
  {
456
456
  dataKey: "name",
@@ -460,20 +460,20 @@ function Bn({
460
460
  height: 60
461
461
  }
462
462
  ),
463
- /* @__PURE__ */ s(
463
+ /* @__PURE__ */ i(
464
464
  pe,
465
465
  {
466
466
  tick: { fontSize: 12 },
467
467
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
468
468
  }
469
469
  ),
470
- f.showTooltip && /* @__PURE__ */ s(
471
- V,
470
+ f.showTooltip && /* @__PURE__ */ i(
471
+ G,
472
472
  {
473
473
  formatter: (y, g) => g === "Target" ? [`${y}`, "Target Value"] : [y, g]
474
474
  }
475
475
  ),
476
- x && /* @__PURE__ */ s(
476
+ x && /* @__PURE__ */ i(
477
477
  K,
478
478
  {
479
479
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
@@ -486,8 +486,8 @@ function Bn({
486
486
  onMouseLeave: () => c(null)
487
487
  }
488
488
  ),
489
- A.map((y, g) => /* @__PURE__ */ s(
490
- U,
489
+ A.map((y, g) => /* @__PURE__ */ i(
490
+ C,
491
491
  {
492
492
  type: "monotone",
493
493
  dataKey: y,
@@ -499,9 +499,9 @@ function Bn({
499
499
  },
500
500
  y
501
501
  )),
502
- h.length > 0 && /* @__PURE__ */ N($e, { children: [
503
- /* @__PURE__ */ s(
504
- U,
502
+ h.length > 0 && /* @__PURE__ */ w($e, { children: [
503
+ /* @__PURE__ */ i(
504
+ C,
505
505
  {
506
506
  type: "monotone",
507
507
  dataKey: "__target",
@@ -512,8 +512,8 @@ function Bn({
512
512
  connectNulls: !1
513
513
  }
514
514
  ),
515
- /* @__PURE__ */ s(
516
- U,
515
+ /* @__PURE__ */ i(
516
+ C,
517
517
  {
518
518
  type: "monotone",
519
519
  dataKey: "__target",
@@ -529,10 +529,10 @@ function Bn({
529
529
  ] })
530
530
  ] }) });
531
531
  } catch (f) {
532
- 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: [
533
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Line Chart Error" }),
534
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
535
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
532
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
533
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Line Chart Error" }),
534
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
535
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
536
536
  ] }) });
537
537
  }
538
538
  }
@@ -541,7 +541,7 @@ function Wn({
541
541
  chartConfig: t,
542
542
  displayConfig: n = {},
543
543
  queryObject: r,
544
- height: i = "100%",
544
+ height: s = "100%",
545
545
  colorPalette: l
546
546
  }) {
547
547
  const [a, c] = H(null), { labelMap: d, getFieldLabel: o } = B();
@@ -553,9 +553,9 @@ function Wn({
553
553
  stacked: n?.stacked ?? !1
554
554
  };
555
555
  if (!e || e.length === 0)
556
- 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: [
557
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
558
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in area chart" })
556
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
557
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
558
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in area chart" })
559
559
  ] }) });
560
560
  let u, m, v = [];
561
561
  if (t?.xAxis && t?.yAxis)
@@ -563,14 +563,14 @@ function Wn({
563
563
  else if (t?.x && t?.y)
564
564
  u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
565
565
  else
566
- 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: [
567
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
568
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
566
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
567
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
568
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
569
569
  ] }) });
570
570
  if (!u || !m || m.length === 0)
571
- 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: [
572
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
573
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
571
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
572
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
573
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
574
574
  ] }) });
575
575
  const { data: p, seriesKeys: A } = ee(
576
576
  e,
@@ -584,16 +584,16 @@ function Wn({
584
584
  left: 40
585
585
  // Increased from 20 to 40 for Y-axis label space
586
586
  }, $ = Te(n?.target || ""), h = Fe($, p.length);
587
- let w = p;
588
- return h.length > 0 && (w = p.map((y, g) => ({
587
+ let N = p;
588
+ return h.length > 0 && (N = p.map((y, g) => ({
589
589
  ...y,
590
590
  __target: h[g] || null
591
- }))), !p || p.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: [
592
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
593
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for area chart after transformation" })
594
- ] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(it, { data: w, margin: k, children: [
595
- f.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
596
- /* @__PURE__ */ s(
591
+ }))), !p || p.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
592
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
593
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for area chart after transformation" })
594
+ ] }) }) : /* @__PURE__ */ i(V, { height: s, children: /* @__PURE__ */ w(st, { data: N, margin: k, children: [
595
+ f.showGrid && /* @__PURE__ */ i(ye, { strokeDasharray: "3 3" }),
596
+ /* @__PURE__ */ i(
597
597
  ge,
598
598
  {
599
599
  dataKey: "name",
@@ -603,20 +603,20 @@ function Wn({
603
603
  height: 60
604
604
  }
605
605
  ),
606
- /* @__PURE__ */ s(
606
+ /* @__PURE__ */ i(
607
607
  pe,
608
608
  {
609
609
  tick: { fontSize: 12 },
610
610
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
611
611
  }
612
612
  ),
613
- f.showTooltip && /* @__PURE__ */ s(
614
- V,
613
+ f.showTooltip && /* @__PURE__ */ i(
614
+ G,
615
615
  {
616
616
  formatter: (y, g) => g === "Target" ? [`${y}`, "Target Value"] : [y, g]
617
617
  }
618
618
  ),
619
- x && /* @__PURE__ */ s(
619
+ x && /* @__PURE__ */ i(
620
620
  K,
621
621
  {
622
622
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
@@ -629,7 +629,7 @@ function Wn({
629
629
  onMouseLeave: () => c(null)
630
630
  }
631
631
  ),
632
- A.map((y, g) => /* @__PURE__ */ s(
632
+ A.map((y, g) => /* @__PURE__ */ i(
633
633
  vt,
634
634
  {
635
635
  type: "monotone",
@@ -643,9 +643,9 @@ function Wn({
643
643
  },
644
644
  y
645
645
  )),
646
- h.length > 0 && /* @__PURE__ */ N($e, { children: [
647
- /* @__PURE__ */ s(
648
- U,
646
+ h.length > 0 && /* @__PURE__ */ w($e, { children: [
647
+ /* @__PURE__ */ i(
648
+ C,
649
649
  {
650
650
  type: "monotone",
651
651
  dataKey: "__target",
@@ -656,8 +656,8 @@ function Wn({
656
656
  connectNulls: !1
657
657
  }
658
658
  ),
659
- /* @__PURE__ */ s(
660
- U,
659
+ /* @__PURE__ */ i(
660
+ C,
661
661
  {
662
662
  type: "monotone",
663
663
  dataKey: "__target",
@@ -673,10 +673,10 @@ function Wn({
673
673
  ] })
674
674
  ] }) });
675
675
  } catch (f) {
676
- 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: [
677
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Area Chart Error" }),
678
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
679
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
676
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
677
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Area Chart Error" }),
678
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: f instanceof Error ? f.message : "Unknown rendering error" }),
679
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
680
680
  ] }) });
681
681
  }
682
682
  }
@@ -685,7 +685,7 @@ function Yn({
685
685
  chartConfig: t,
686
686
  displayConfig: n = {},
687
687
  queryObject: r,
688
- height: i = "100%",
688
+ height: s = "100%",
689
689
  colorPalette: l
690
690
  }) {
691
691
  const [a, c] = H(null), { labelMap: d } = B();
@@ -695,9 +695,9 @@ function Yn({
695
695
  showTooltip: n?.showTooltip ?? !0
696
696
  };
697
697
  if (!e || e.length === 0)
698
- 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: [
699
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
700
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in pie chart" })
698
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
699
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
700
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in pie chart" })
701
701
  ] }) });
702
702
  let f, u, m, v = [];
703
703
  if (t?.xAxis && t?.yAxis)
@@ -705,14 +705,14 @@ function Yn({
705
705
  else if (t?.x && t?.y)
706
706
  u = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
707
707
  else
708
- 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: [
709
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
710
- /* @__PURE__ */ s("div", { className: "text-xs", children: "chartConfig.x/y or chartConfig.xAxis/yAxis required for pie chart" })
708
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
709
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
710
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "chartConfig.x/y or chartConfig.xAxis/yAxis required for pie chart" })
711
711
  ] }) });
712
712
  if (!u || !m || m.length === 0)
713
- 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: [
714
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
715
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
713
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
714
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
715
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
716
716
  ] }) });
717
717
  if (v.length > 0) {
718
718
  const { data: A } = ee(
@@ -745,12 +745,12 @@ function Yn({
745
745
  const p = f.length;
746
746
  return f = f.filter(
747
747
  (A) => A.value != null && !isNaN(A.value) && A.value !== 0 && A.value > 0
748
- ), 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: [
749
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
750
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: p > 0 ? `Filtered out ${p} data points (zero or invalid values)` : "No data points to display in pie chart" })
751
- ] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(bt, { children: [
752
- /* @__PURE__ */ s(
753
- wt,
748
+ ), f.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
749
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
750
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: p > 0 ? `Filtered out ${p} data points (zero or invalid values)` : "No data points to display in pie chart" })
751
+ ] }) }) : /* @__PURE__ */ i(V, { height: s, children: /* @__PURE__ */ w(bt, { children: [
752
+ /* @__PURE__ */ i(
753
+ Nt,
754
754
  {
755
755
  data: f,
756
756
  cx: "50%",
@@ -758,7 +758,7 @@ function Yn({
758
758
  outerRadius: "70%",
759
759
  dataKey: "value",
760
760
  label: o.showLegend ? void 0 : ({ name: A, percent: x }) => `${A} ${((x || 0) * 100).toFixed(0)}%`,
761
- children: f.map((A, x) => /* @__PURE__ */ s(
761
+ children: f.map((A, x) => /* @__PURE__ */ i(
762
762
  Le,
763
763
  {
764
764
  fill: l?.colors && l.colors[x % l.colors.length] || T[x % T.length],
@@ -768,8 +768,8 @@ function Yn({
768
768
  ))
769
769
  }
770
770
  ),
771
- o.showTooltip && /* @__PURE__ */ s(V, {}),
772
- o.showLegend && /* @__PURE__ */ s(
771
+ o.showTooltip && /* @__PURE__ */ i(G, {}),
772
+ o.showLegend && /* @__PURE__ */ i(
773
773
  K,
774
774
  {
775
775
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
@@ -784,10 +784,10 @@ function Yn({
784
784
  )
785
785
  ] }) });
786
786
  } catch (o) {
787
- 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: [
788
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
789
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
790
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
787
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
788
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
789
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
790
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
791
791
  ] }) });
792
792
  }
793
793
  }
@@ -796,7 +796,7 @@ function Xn({
796
796
  chartConfig: t,
797
797
  displayConfig: n = {},
798
798
  queryObject: r,
799
- height: i = "100%",
799
+ height: s = "100%",
800
800
  colorPalette: l
801
801
  }) {
802
802
  const [a, c] = H(null), { getFieldLabel: d } = B();
@@ -807,9 +807,9 @@ function Xn({
807
807
  showTooltip: n?.showTooltip ?? !0
808
808
  };
809
809
  if (!e || e.length === 0)
810
- 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: [
811
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
812
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in scatter chart" })
810
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
811
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
812
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in scatter chart" })
813
813
  ] }) });
814
814
  let f, u, m = [];
815
815
  if (t?.xAxis && t?.yAxis)
@@ -817,14 +817,14 @@ function Xn({
817
817
  else if (t?.x && t?.y)
818
818
  f = t.x, u = Array.isArray(t.y) ? t.y[0] : t.y;
819
819
  else
820
- 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: [
821
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
822
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
820
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
821
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
822
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
823
823
  ] }) });
824
824
  if (!f || !u)
825
- 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: [
826
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
827
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
825
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
826
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
827
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
828
828
  ] }) });
829
829
  let v, p = {};
830
830
  if (m.length > 0) {
@@ -839,12 +839,12 @@ function Xn({
839
839
  name: `${g} (${M}, ${L})`
840
840
  });
841
841
  });
842
- const w = Object.keys(p);
843
- v = p[w[0]] || [];
842
+ const N = Object.keys(p);
843
+ v = p[N[0]] || [];
844
844
  } else {
845
845
  const h = O(r, f);
846
- v = e.map((w) => {
847
- const y = R(w[f], h) || w[f], g = typeof w[u] == "string" ? parseFloat(w[u]) : w[u] || 0;
846
+ v = e.map((N) => {
847
+ const y = R(N[f], h) || N[f], g = typeof N[u] == "string" ? parseFloat(N[u]) : N[u] || 0;
848
848
  return {
849
849
  x: typeof y == "string" ? parseFloat(y) || 0 : y,
850
850
  y: g,
@@ -853,18 +853,18 @@ function Xn({
853
853
  });
854
854
  }
855
855
  if (!v || v.length === 0)
856
- 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: [
857
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
858
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for scatter chart after transformation" })
856
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
857
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
858
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for scatter chart after transformation" })
859
859
  ] }) });
860
860
  const A = Object.keys(p), x = A.length > 1, k = o.showLegend && x, $ = {
861
861
  ...ve,
862
862
  left: 40
863
863
  // Increased from 20 to 40 for Y-axis label space
864
864
  };
865
- return /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(Nt, { data: v, margin: $, children: [
866
- o.showGrid && /* @__PURE__ */ s(ye, { strokeDasharray: "3 3" }),
867
- /* @__PURE__ */ s(
865
+ return /* @__PURE__ */ i(V, { height: s, children: /* @__PURE__ */ w(wt, { data: v, margin: $, children: [
866
+ o.showGrid && /* @__PURE__ */ i(ye, { strokeDasharray: "3 3" }),
867
+ /* @__PURE__ */ i(
868
868
  ge,
869
869
  {
870
870
  type: "number",
@@ -873,7 +873,7 @@ function Xn({
873
873
  tick: { fontSize: 12 }
874
874
  }
875
875
  ),
876
- /* @__PURE__ */ s(
876
+ /* @__PURE__ */ i(
877
877
  pe,
878
878
  {
879
879
  type: "number",
@@ -883,8 +883,8 @@ function Xn({
883
883
  label: { value: d(u), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
884
884
  }
885
885
  ),
886
- o.showTooltip && /* @__PURE__ */ s(V, {}),
887
- k && /* @__PURE__ */ s(
886
+ o.showTooltip && /* @__PURE__ */ i(G, {}),
887
+ k && /* @__PURE__ */ i(
888
888
  K,
889
889
  {
890
890
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
@@ -899,19 +899,19 @@ function Xn({
899
899
  ),
900
900
  x ? (
901
901
  // Multiple series
902
- A.map((h, w) => /* @__PURE__ */ s(
902
+ A.map((h, N) => /* @__PURE__ */ i(
903
903
  Oe,
904
904
  {
905
905
  name: h,
906
906
  data: p[h],
907
- fill: l?.colors && l.colors[w % l.colors.length] || T[w % T.length],
907
+ fill: l?.colors && l.colors[N % l.colors.length] || T[N % T.length],
908
908
  fillOpacity: a ? a === h ? 1 : 0.3 : 1
909
909
  },
910
910
  h
911
911
  ))
912
912
  ) : (
913
913
  // Single series
914
- /* @__PURE__ */ s(
914
+ /* @__PURE__ */ i(
915
915
  Oe,
916
916
  {
917
917
  name: "Data",
@@ -922,10 +922,10 @@ function Xn({
922
922
  )
923
923
  ] }) });
924
924
  } catch (o) {
925
- 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: [
926
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
927
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
928
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
925
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
926
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
927
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
928
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
929
929
  ] }) });
930
930
  }
931
931
  }
@@ -934,7 +934,7 @@ function Qn({
934
934
  chartConfig: t,
935
935
  displayConfig: n = {},
936
936
  queryObject: r,
937
- height: i = "100%",
937
+ height: s = "100%",
938
938
  colorPalette: l
939
939
  }) {
940
940
  const [a, c] = H(null);
@@ -945,9 +945,9 @@ function Qn({
945
945
  showGrid: n?.showGrid ?? !0
946
946
  };
947
947
  if (!e || e.length === 0)
948
- 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: [
949
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
950
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radar chart" })
948
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
949
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
950
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radar chart" })
951
951
  ] }) });
952
952
  let o, f = [];
953
953
  if (t?.xAxis && t?.yAxis) {
@@ -966,9 +966,9 @@ function Qn({
966
966
  (A) => typeof u[A] == "number" && A !== v
967
967
  );
968
968
  if (p.length === 0)
969
- 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: [
970
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
971
- /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric fields found for radar chart values" })
969
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
970
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
971
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric fields found for radar chart values" })
972
972
  ] }) });
973
973
  if (v) {
974
974
  const A = O(r, v);
@@ -987,12 +987,12 @@ function Qn({
987
987
  value: typeof A[p[0]] == "string" ? parseFloat(A[p[0]]) : A[p[0]] || 0
988
988
  })), f = ["value"];
989
989
  }
990
- 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: [
991
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
992
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radar chart after transformation" })
993
- ] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(At, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
994
- d.showGrid && /* @__PURE__ */ s(kt, {}),
995
- /* @__PURE__ */ s(
990
+ return !o || o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
991
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
992
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radar chart after transformation" })
993
+ ] }) }) : /* @__PURE__ */ i(V, { height: s, children: /* @__PURE__ */ w(At, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
994
+ d.showGrid && /* @__PURE__ */ i(kt, {}),
995
+ /* @__PURE__ */ i(
996
996
  St,
997
997
  {
998
998
  dataKey: "name",
@@ -1000,15 +1000,15 @@ function Qn({
1000
1000
  className: "text-dc-text-muted"
1001
1001
  }
1002
1002
  ),
1003
- /* @__PURE__ */ s(
1003
+ /* @__PURE__ */ i(
1004
1004
  Mt,
1005
1005
  {
1006
1006
  tick: { fontSize: 10 },
1007
1007
  className: "text-dc-text-muted"
1008
1008
  }
1009
1009
  ),
1010
- d.showTooltip && /* @__PURE__ */ s(V, {}),
1011
- d.showLegend && f.length > 1 && /* @__PURE__ */ s(
1010
+ d.showTooltip && /* @__PURE__ */ i(G, {}),
1011
+ d.showLegend && f.length > 1 && /* @__PURE__ */ i(
1012
1012
  K,
1013
1013
  {
1014
1014
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
@@ -1021,7 +1021,7 @@ function Qn({
1021
1021
  onMouseLeave: () => c(null)
1022
1022
  }
1023
1023
  ),
1024
- f.map((u, m) => /* @__PURE__ */ s(
1024
+ f.map((u, m) => /* @__PURE__ */ i(
1025
1025
  $t,
1026
1026
  {
1027
1027
  name: u,
@@ -1036,10 +1036,10 @@ function Qn({
1036
1036
  ))
1037
1037
  ] }) });
1038
1038
  } catch (d) {
1039
- 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: [
1040
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
1041
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1042
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1039
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
1040
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
1041
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1042
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1043
1043
  ] }) });
1044
1044
  }
1045
1045
  }
@@ -1048,7 +1048,7 @@ function Zn({
1048
1048
  chartConfig: t,
1049
1049
  displayConfig: n = {},
1050
1050
  queryObject: r,
1051
- height: i = "100%",
1051
+ height: s = "100%",
1052
1052
  colorPalette: l
1053
1053
  }) {
1054
1054
  const [a, c] = H(null);
@@ -1058,9 +1058,9 @@ function Zn({
1058
1058
  showTooltip: n?.showTooltip ?? !0
1059
1059
  };
1060
1060
  if (!e || e.length === 0)
1061
- 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: [
1062
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
1063
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radial bar chart" })
1061
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
1062
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
1063
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in radial bar chart" })
1064
1064
  ] }) });
1065
1065
  let o;
1066
1066
  if (t?.xAxis && t?.yAxis) {
@@ -1077,9 +1077,9 @@ function Zn({
1077
1077
  (p) => typeof f[p] == "number" && p !== m
1078
1078
  ) || u[1];
1079
1079
  if (!v)
1080
- 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: [
1081
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
1082
- /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
1080
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
1081
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
1082
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
1083
1083
  ] }) });
1084
1084
  o = e.map((p, A) => {
1085
1085
  let x = p[m];
@@ -1090,10 +1090,10 @@ function Zn({
1090
1090
  };
1091
1091
  });
1092
1092
  }
1093
- 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: [
1094
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1095
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radial bar chart after transformation" })
1096
- ] }) }) : /* @__PURE__ */ s(C, { height: i, children: /* @__PURE__ */ N(
1093
+ return o = o.filter((f) => f.value != null && f.value !== 0), o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
1094
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1095
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radial bar chart after transformation" })
1096
+ ] }) }) : /* @__PURE__ */ i(V, { height: s, children: /* @__PURE__ */ w(
1097
1097
  Lt,
1098
1098
  {
1099
1099
  data: o,
@@ -1101,8 +1101,8 @@ function Zn({
1101
1101
  outerRadius: "80%",
1102
1102
  margin: { top: 20, right: 30, bottom: 20, left: 30 },
1103
1103
  children: [
1104
- d.showTooltip && /* @__PURE__ */ s(V, {}),
1105
- d.showLegend && /* @__PURE__ */ s(
1104
+ d.showTooltip && /* @__PURE__ */ i(G, {}),
1105
+ d.showLegend && /* @__PURE__ */ i(
1106
1106
  K,
1107
1107
  {
1108
1108
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
@@ -1115,13 +1115,13 @@ function Zn({
1115
1115
  onMouseLeave: () => c(null)
1116
1116
  }
1117
1117
  ),
1118
- /* @__PURE__ */ s(
1118
+ /* @__PURE__ */ i(
1119
1119
  Tt,
1120
1120
  {
1121
1121
  dataKey: "value",
1122
1122
  cornerRadius: 4,
1123
1123
  label: { position: "insideStart", fill: "#fff", fontSize: 12 },
1124
- children: o.map((f, u) => /* @__PURE__ */ s(
1124
+ children: o.map((f, u) => /* @__PURE__ */ i(
1125
1125
  Le,
1126
1126
  {
1127
1127
  fill: f.fill,
@@ -1135,10 +1135,10 @@ function Zn({
1135
1135
  }
1136
1136
  ) });
1137
1137
  } catch (d) {
1138
- 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: [
1139
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
1140
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1141
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1138
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
1139
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
1140
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
1141
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
1142
1142
  ] }) });
1143
1143
  }
1144
1144
  }
@@ -1148,10 +1148,10 @@ function ce(e, t) {
1148
1148
  function Et(e, t) {
1149
1149
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
1150
1150
  }
1151
- function st(e) {
1151
+ function it(e) {
1152
1152
  let t, n, r;
1153
1153
  e.length !== 2 ? (t = ce, n = (c, d) => ce(e(c), d), r = (c, d) => e(c) - d) : (t = e === ce || e === Et ? e : Dt, n = e, r = e);
1154
- function i(c, d, o = 0, f = c.length) {
1154
+ function s(c, d, o = 0, f = c.length) {
1155
1155
  if (o < f) {
1156
1156
  if (t(d, d) !== 0) return f;
1157
1157
  do {
@@ -1172,10 +1172,10 @@ function st(e) {
1172
1172
  return o;
1173
1173
  }
1174
1174
  function a(c, d, o = 0, f = c.length) {
1175
- const u = i(c, d, o, f - 1);
1175
+ const u = s(c, d, o, f - 1);
1176
1176
  return u > o && r(c[u - 1], d) > -r(c[u], d) ? u - 1 : u;
1177
1177
  }
1178
- return { left: i, center: a, right: l };
1178
+ return { left: s, center: a, right: l };
1179
1179
  }
1180
1180
  function Dt() {
1181
1181
  return 0;
@@ -1183,17 +1183,17 @@ function Dt() {
1183
1183
  function Rt(e) {
1184
1184
  return e === null ? NaN : +e;
1185
1185
  }
1186
- const It = st(ce), at = It.right;
1187
- st(Rt).center;
1188
- class Ce extends Map {
1186
+ const It = it(ce), at = It.right;
1187
+ it(Rt).center;
1188
+ class Ve extends Map {
1189
1189
  constructor(t, n = Ht) {
1190
- 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);
1190
+ if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, s] of t) this.set(r, s);
1191
1191
  }
1192
1192
  get(t) {
1193
- return super.get(Ve(this, t));
1193
+ return super.get(Ge(this, t));
1194
1194
  }
1195
1195
  has(t) {
1196
- return super.has(Ve(this, t));
1196
+ return super.has(Ge(this, t));
1197
1197
  }
1198
1198
  set(t, n) {
1199
1199
  return super.set(_t(this, t), n);
@@ -1202,7 +1202,7 @@ class Ce extends Map {
1202
1202
  return super.delete(Ot(this, t));
1203
1203
  }
1204
1204
  }
1205
- function Ve({ _intern: e, _key: t }, n) {
1205
+ function Ge({ _intern: e, _key: t }, n) {
1206
1206
  const r = t(n);
1207
1207
  return e.has(r) ? e.get(r) : n;
1208
1208
  }
@@ -1217,23 +1217,23 @@ function Ot({ _intern: e, _key: t }, n) {
1217
1217
  function Ht(e) {
1218
1218
  return e !== null && typeof e == "object" ? e.valueOf() : e;
1219
1219
  }
1220
- const Ct = Math.sqrt(50), Vt = Math.sqrt(10), Gt = Math.sqrt(2);
1220
+ const Vt = Math.sqrt(50), Gt = Math.sqrt(10), Ut = Math.sqrt(2);
1221
1221
  function de(e, t, n) {
1222
- const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), l = r / Math.pow(10, i), a = l >= Ct ? 10 : l >= Vt ? 5 : l >= Gt ? 2 : 1;
1222
+ const r = (t - e) / Math.max(0, n), s = Math.floor(Math.log10(r)), l = r / Math.pow(10, s), a = l >= Vt ? 10 : l >= Gt ? 5 : l >= Ut ? 2 : 1;
1223
1223
  let c, d, o;
1224
- 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 ? de(e, t, n * 2) : [c, d, o];
1224
+ return s < 0 ? (o = Math.pow(10, -s) / 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, s) * 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 ? de(e, t, n * 2) : [c, d, o];
1225
1225
  }
1226
- function Ut(e, t, n) {
1226
+ function Ct(e, t, n) {
1227
1227
  if (t = +t, e = +e, n = +n, !(n > 0)) return [];
1228
1228
  if (e === t) return [e];
1229
- const r = t < e, [i, l, a] = r ? de(t, e, n) : de(e, t, n);
1230
- if (!(l >= i)) return [];
1231
- const c = l - i + 1, d = new Array(c);
1229
+ const r = t < e, [s, l, a] = r ? de(t, e, n) : de(e, t, n);
1230
+ if (!(l >= s)) return [];
1231
+ const c = l - s + 1, d = new Array(c);
1232
1232
  if (r)
1233
1233
  if (a < 0) for (let o = 0; o < c; ++o) d[o] = (l - o) / -a;
1234
1234
  else for (let o = 0; o < c; ++o) d[o] = (l - o) * a;
1235
- else if (a < 0) for (let o = 0; o < c; ++o) d[o] = (i + o) / -a;
1236
- else for (let o = 0; o < c; ++o) d[o] = (i + o) * a;
1235
+ else if (a < 0) for (let o = 0; o < c; ++o) d[o] = (s + o) / -a;
1236
+ else for (let o = 0; o < c; ++o) d[o] = (s + o) * a;
1237
1237
  return d;
1238
1238
  }
1239
1239
  function Ae(e, t, n) {
@@ -1241,8 +1241,8 @@ function Ae(e, t, n) {
1241
1241
  }
1242
1242
  function qt(e, t, n) {
1243
1243
  t = +t, e = +e, n = +n;
1244
- const r = t < e, i = r ? Ae(t, e, n) : Ae(e, t, n);
1245
- return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
1244
+ const r = t < e, s = r ? Ae(t, e, n) : Ae(e, t, n);
1245
+ return (r ? -1 : 1) * (s < 0 ? 1 / -s : s);
1246
1246
  }
1247
1247
  function je(e, t, n) {
1248
1248
  e.prototype = t.prototype = n, n.constructor = e;
@@ -1254,7 +1254,7 @@ function lt(e, t) {
1254
1254
  }
1255
1255
  function te() {
1256
1256
  }
1257
- var Z = 0.7, fe = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", I = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Kt = /^#([0-9a-f]{3,8})$/, Bt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Wt = new RegExp(`^rgb\\(${I},${I},${I}\\)$`), Yt = new RegExp(`^rgba\\(${X},${X},${X},${J}\\)$`), Xt = new RegExp(`^rgba\\(${I},${I},${I},${J}\\)$`), Qt = new RegExp(`^hsl\\(${J},${I},${I}\\)$`), Zt = new RegExp(`^hsla\\(${J},${I},${I},${J}\\)$`), Ge = {
1257
+ var Z = 0.7, fe = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", I = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Kt = /^#([0-9a-f]{3,8})$/, Bt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Wt = new RegExp(`^rgb\\(${I},${I},${I}\\)$`), Yt = new RegExp(`^rgba\\(${X},${X},${X},${J}\\)$`), Xt = new RegExp(`^rgba\\(${I},${I},${I},${J}\\)$`), Qt = new RegExp(`^hsl\\(${J},${I},${I}\\)$`), Zt = new RegExp(`^hsla\\(${J},${I},${I},${J}\\)$`), Ue = {
1258
1258
  aliceblue: 15792383,
1259
1259
  antiquewhite: 16444375,
1260
1260
  aqua: 65535,
@@ -1411,15 +1411,15 @@ je(te, P, {
1411
1411
  displayable() {
1412
1412
  return this.rgb().displayable();
1413
1413
  },
1414
- hex: Ue,
1414
+ hex: Ce,
1415
1415
  // Deprecated! Use color.formatHex.
1416
- formatHex: Ue,
1416
+ formatHex: Ce,
1417
1417
  formatHex8: Jt,
1418
1418
  formatHsl: Pt,
1419
1419
  formatRgb: qe,
1420
1420
  toString: qe
1421
1421
  });
1422
- function Ue() {
1422
+ function Ce() {
1423
1423
  return this.rgb().formatHex();
1424
1424
  }
1425
1425
  function Jt() {
@@ -1433,7 +1433,7 @@ function qe() {
1433
1433
  }
1434
1434
  function P(e) {
1435
1435
  var t, n;
1436
- return e = (e + "").trim().toLowerCase(), (t = Kt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Ke(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ae(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ae(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 = Bt.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Wt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Yt.exec(e)) ? ae(t[1], t[2], t[3], t[4]) : (t = Xt.exec(e)) ? ae(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Qt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, 1) : (t = Zt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, t[4]) : Ge.hasOwnProperty(e) ? Ke(Ge[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
1436
+ return e = (e + "").trim().toLowerCase(), (t = Kt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Ke(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ae(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ae(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 = Bt.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Wt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Yt.exec(e)) ? ae(t[1], t[2], t[3], t[4]) : (t = Xt.exec(e)) ? ae(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Qt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, 1) : (t = Zt.exec(e)) ? Ye(t[1], t[2] / 100, t[3] / 100, t[4]) : Ue.hasOwnProperty(e) ? Ke(Ue[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
1437
1437
  }
1438
1438
  function Ke(e) {
1439
1439
  return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
@@ -1474,10 +1474,10 @@ je(j, ke, lt(te, {
1474
1474
  toString: We
1475
1475
  }));
1476
1476
  function Be() {
1477
- return `#${G(this.r)}${G(this.g)}${G(this.b)}`;
1477
+ return `#${U(this.r)}${U(this.g)}${U(this.b)}`;
1478
1478
  }
1479
1479
  function tn() {
1480
- return `#${G(this.r)}${G(this.g)}${G(this.b)}${G((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1480
+ return `#${U(this.r)}${U(this.g)}${U(this.b)}${U((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1481
1481
  }
1482
1482
  function We() {
1483
1483
  const e = ue(this.opacity);
@@ -1489,7 +1489,7 @@ function ue(e) {
1489
1489
  function q(e) {
1490
1490
  return Math.max(0, Math.min(255, Math.round(e) || 0));
1491
1491
  }
1492
- function G(e) {
1492
+ function U(e) {
1493
1493
  return e = q(e), (e < 16 ? "0" : "") + e.toString(16);
1494
1494
  }
1495
1495
  function Ye(e, t, n, r) {
@@ -1500,8 +1500,8 @@ function ot(e) {
1500
1500
  if (e instanceof te || (e = P(e)), !e) return new D();
1501
1501
  if (e instanceof D) return e;
1502
1502
  e = e.rgb();
1503
- 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;
1504
- 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 D(a, c, d, e.opacity);
1503
+ var t = e.r / 255, n = e.g / 255, r = e.b / 255, s = Math.min(t, n, r), l = Math.max(t, n, r), a = NaN, c = l - s, d = (l + s) / 2;
1504
+ 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 + s : 2 - l - s, a *= 60) : c = d > 0 && d < 1 ? 0 : a, new D(a, c, d, e.opacity);
1505
1505
  }
1506
1506
  function nn(e, t, n, r) {
1507
1507
  return arguments.length === 1 ? ot(e) : new D(e, t, n, r ?? 1);
@@ -1517,11 +1517,11 @@ je(D, nn, lt(te, {
1517
1517
  return e = e == null ? Z : Math.pow(Z, e), new D(this.h, this.s, this.l * e, this.opacity);
1518
1518
  },
1519
1519
  rgb() {
1520
- 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;
1520
+ 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, s = 2 * n - r;
1521
1521
  return new j(
1522
- be(e >= 240 ? e - 240 : e + 120, i, r),
1523
- be(e, i, r),
1524
- be(e < 120 ? e + 240 : e - 120, i, r),
1522
+ be(e >= 240 ? e - 240 : e + 120, s, r),
1523
+ be(e, s, r),
1524
+ be(e < 120 ? e + 240 : e - 120, s, r),
1525
1525
  this.opacity
1526
1526
  );
1527
1527
  },
@@ -1567,19 +1567,19 @@ function ct(e, t) {
1567
1567
  }
1568
1568
  const Qe = (function e(t) {
1569
1569
  var n = an(t);
1570
- function r(i, l) {
1571
- var a = n((i = ke(i)).r, (l = ke(l)).r), c = n(i.g, l.g), d = n(i.b, l.b), o = ct(i.opacity, l.opacity);
1570
+ function r(s, l) {
1571
+ var a = n((s = ke(s)).r, (l = ke(l)).r), c = n(s.g, l.g), d = n(s.b, l.b), o = ct(s.opacity, l.opacity);
1572
1572
  return function(f) {
1573
- return i.r = a(f), i.g = c(f), i.b = d(f), i.opacity = o(f), i + "";
1573
+ return s.r = a(f), s.g = c(f), s.b = d(f), s.opacity = o(f), s + "";
1574
1574
  };
1575
1575
  }
1576
1576
  return r.gamma = e, r;
1577
1577
  })(1);
1578
1578
  function ln(e, t) {
1579
1579
  t || (t = []);
1580
- var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
1580
+ var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), s;
1581
1581
  return function(l) {
1582
- for (i = 0; i < n; ++i) r[i] = e[i] * (1 - l) + t[i] * l;
1582
+ for (s = 0; s < n; ++s) r[s] = e[s] * (1 - l) + t[s] * l;
1583
1583
  return r;
1584
1584
  };
1585
1585
  }
@@ -1587,11 +1587,11 @@ function on(e) {
1587
1587
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
1588
1588
  }
1589
1589
  function cn(e, t) {
1590
- var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = new Array(r), l = new Array(n), a;
1591
- for (a = 0; a < r; ++a) i[a] = Ee(e[a], t[a]);
1590
+ var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, s = new Array(r), l = new Array(n), a;
1591
+ for (a = 0; a < r; ++a) s[a] = Ee(e[a], t[a]);
1592
1592
  for (; a < n; ++a) l[a] = t[a];
1593
1593
  return function(c) {
1594
- for (a = 0; a < r; ++a) l[a] = i[a](c);
1594
+ for (a = 0; a < r; ++a) l[a] = s[a](c);
1595
1595
  return l;
1596
1596
  };
1597
1597
  }
@@ -1607,16 +1607,16 @@ function me(e, t) {
1607
1607
  };
1608
1608
  }
1609
1609
  function fn(e, t) {
1610
- var n = {}, r = {}, i;
1610
+ var n = {}, r = {}, s;
1611
1611
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
1612
- for (i in t)
1613
- i in e ? n[i] = Ee(e[i], t[i]) : r[i] = t[i];
1612
+ for (s in t)
1613
+ s in e ? n[s] = Ee(e[s], t[s]) : r[s] = t[s];
1614
1614
  return function(l) {
1615
- for (i in n) r[i] = n[i](l);
1615
+ for (s in n) r[s] = n[s](l);
1616
1616
  return r;
1617
1617
  };
1618
1618
  }
1619
- var Se = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, we = new RegExp(Se.source, "g");
1619
+ var Se = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Ne = new RegExp(Se.source, "g");
1620
1620
  function un(e) {
1621
1621
  return function() {
1622
1622
  return e;
@@ -1628,9 +1628,9 @@ function mn(e) {
1628
1628
  };
1629
1629
  }
1630
1630
  function xn(e, t) {
1631
- var n = Se.lastIndex = we.lastIndex = 0, r, i, l, a = -1, c = [], d = [];
1632
- for (e = e + "", t = t + ""; (r = Se.exec(e)) && (i = we.exec(t)); )
1633
- (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: me(r, i) })), n = we.lastIndex;
1631
+ var n = Se.lastIndex = Ne.lastIndex = 0, r, s, l, a = -1, c = [], d = [];
1632
+ for (e = e + "", t = t + ""; (r = Se.exec(e)) && (s = Ne.exec(t)); )
1633
+ (l = s.index) > n && (l = t.slice(n, l), c[a] ? c[a] += l : c[++a] = l), (r = r[0]) === (s = s[0]) ? c[a] ? c[a] += s : c[++a] = s : (c[++a] = null, d.push({ i: a, x: me(r, s) })), n = Ne.lastIndex;
1634
1634
  return n < t.length && (l = t.slice(n), c[a] ? c[a] += l : c[++a] = l), c.length < 2 ? d[0] ? mn(d[0].x) : un(t) : (t = d.length, function(o) {
1635
1635
  for (var f = 0, u; f < t; ++f) c[(u = d[f]).i] = u.x(o);
1636
1636
  return c.join("");
@@ -1661,7 +1661,7 @@ function Q(e) {
1661
1661
  }
1662
1662
  function gn(e, t) {
1663
1663
  return function(n, r) {
1664
- for (var i = n.length, l = [], a = 0, c = e[0], d = 0; i > 0 && c > 0 && (d + c + 1 > r && (c = Math.max(1, r - d)), l.push(n.substring(i -= c, i + c)), !((d += c + 1) > r)); )
1664
+ for (var s = n.length, l = [], a = 0, c = e[0], d = 0; s > 0 && c > 0 && (d + c + 1 > r && (c = Math.max(1, r - d)), l.push(n.substring(s -= c, s + c)), !((d += c + 1) > r)); )
1665
1665
  c = e[a = (a + 1) % e.length];
1666
1666
  return l.reverse().join(t);
1667
1667
  };
@@ -1698,33 +1698,33 @@ De.prototype.toString = function() {
1698
1698
  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;
1699
1699
  };
1700
1700
  function bn(e) {
1701
- e: for (var t = e.length, n = 1, r = -1, i; n < t; ++n)
1701
+ e: for (var t = e.length, n = 1, r = -1, s; n < t; ++n)
1702
1702
  switch (e[n]) {
1703
1703
  case ".":
1704
- r = i = n;
1704
+ r = s = n;
1705
1705
  break;
1706
1706
  case "0":
1707
- r === 0 && (r = n), i = n;
1707
+ r === 0 && (r = n), s = n;
1708
1708
  break;
1709
1709
  default:
1710
1710
  if (!+e[n]) break e;
1711
1711
  r > 0 && (r = 0);
1712
1712
  break;
1713
1713
  }
1714
- return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
1714
+ return r > 0 ? e.slice(0, r) + e.slice(s + 1) : e;
1715
1715
  }
1716
1716
  var dt;
1717
- function wn(e, t) {
1717
+ function Nn(e, t) {
1718
1718
  var n = xe(e, t);
1719
1719
  if (!n) return e + "";
1720
- var r = n[0], i = n[1], l = i - (dt = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = r.length;
1720
+ var r = n[0], s = n[1], l = s - (dt = Math.max(-8, Math.min(8, Math.floor(s / 3))) * 3) + 1, a = r.length;
1721
1721
  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") + xe(e, Math.max(0, t + l - 1))[0];
1722
1722
  }
1723
1723
  function Ze(e, t) {
1724
1724
  var n = xe(e, t);
1725
1725
  if (!n) return e + "";
1726
- var r = n[0], i = n[1];
1727
- 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");
1726
+ var r = n[0], s = n[1];
1727
+ return s < 0 ? "0." + new Array(-s).join("0") + r : r.length > s + 1 ? r.slice(0, s + 1) + "." + r.slice(s + 1) : r + new Array(s - r.length + 2).join("0");
1728
1728
  }
1729
1729
  const Je = {
1730
1730
  "%": (e, t) => (e * 100).toFixed(t),
@@ -1737,7 +1737,7 @@ const Je = {
1737
1737
  o: (e) => Math.round(e).toString(8),
1738
1738
  p: (e, t) => Ze(e * 100, t),
1739
1739
  r: Ze,
1740
- s: wn,
1740
+ s: Nn,
1741
1741
  X: (e) => Math.round(e).toString(16).toUpperCase(),
1742
1742
  x: (e) => Math.round(e).toString(16)
1743
1743
  };
@@ -1745,12 +1745,12 @@ function Pe(e) {
1745
1745
  return e;
1746
1746
  }
1747
1747
  var et = Array.prototype.map, tt = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1748
- function Nn(e) {
1749
- var t = e.grouping === void 0 || e.thousands === void 0 ? Pe : gn(et.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 ? Pe : pn(et.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 + "";
1748
+ function wn(e) {
1749
+ var t = e.grouping === void 0 || e.thousands === void 0 ? Pe : gn(et.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", s = e.decimal === void 0 ? "." : e.decimal + "", l = e.numerals === void 0 ? Pe : pn(et.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 + "";
1750
1750
  function o(u) {
1751
1751
  u = he(u);
1752
- var m = u.fill, v = u.align, p = u.sign, A = u.symbol, x = u.zero, k = u.width, $ = u.comma, h = u.precision, w = u.trim, y = u.type;
1753
- y === "n" ? ($ = !0, y = "g") : Je[y] || (h === void 0 && (h = 12), w = !0, y = "g"), (x || m === "0" && v === "=") && (x = !0, m = "0", v = "=");
1752
+ var m = u.fill, v = u.align, p = u.sign, A = u.symbol, x = u.zero, k = u.width, $ = u.comma, h = u.precision, N = u.trim, y = u.type;
1753
+ y === "n" ? ($ = !0, y = "g") : Je[y] || (h === void 0 && (h = 12), N = !0, y = "g"), (x || m === "0" && v === "=") && (x = !0, m = "0", v = "=");
1754
1754
  var g = A === "$" ? n : A === "#" && /[boxX]/.test(y) ? "0" + y.toLowerCase() : "", b = A === "$" ? r : /[%p]/.test(y) ? a : "", M = Je[y], L = /[defgprs%]/.test(y);
1755
1755
  h = h === void 0 ? 6 : /[gprs]/.test(y) ? Math.max(1, Math.min(21, h)) : Math.max(0, Math.min(20, h));
1756
1756
  function F(S) {
@@ -1760,16 +1760,16 @@ function Nn(e) {
1760
1760
  else {
1761
1761
  S = +S;
1762
1762
  var re = S < 0 || 1 / S < 0;
1763
- if (S = isNaN(S) ? d : M(Math.abs(S), h), w && (S = bn(S)), re && +S == 0 && p !== "+" && (re = !1), E = (re ? p === "(" ? p : c : p === "-" || p === "(" ? "" : p) + E, z = (y === "s" ? tt[8 + dt / 3] : "") + z + (re && p === "(" ? ")" : ""), L) {
1763
+ if (S = isNaN(S) ? d : M(Math.abs(S), h), N && (S = bn(S)), re && +S == 0 && p !== "+" && (re = !1), E = (re ? p === "(" ? p : c : p === "-" || p === "(" ? "" : p) + E, z = (y === "s" ? tt[8 + dt / 3] : "") + z + (re && p === "(" ? ")" : ""), L) {
1764
1764
  for (W = -1, Ie = S.length; ++W < Ie; )
1765
1765
  if (ne = S.charCodeAt(W), 48 > ne || ne > 57) {
1766
- z = (ne === 46 ? i + S.slice(W + 1) : S.slice(W)) + z, S = S.slice(0, W);
1766
+ z = (ne === 46 ? s + S.slice(W + 1) : S.slice(W)) + z, S = S.slice(0, W);
1767
1767
  break;
1768
1768
  }
1769
1769
  }
1770
1770
  }
1771
1771
  $ && !x && (S = t(S, 1 / 0));
1772
- var ie = E.length + S.length + z.length, _ = ie < k ? new Array(k - ie + 1).join(m) : "";
1772
+ var se = E.length + S.length + z.length, _ = se < k ? new Array(k - se + 1).join(m) : "";
1773
1773
  switch ($ && x && (S = t(_ + S, _.length ? k - z.length : 1 / 0), _ = ""), v) {
1774
1774
  case "<":
1775
1775
  S = E + S + z + _;
@@ -1778,7 +1778,7 @@ function Nn(e) {
1778
1778
  S = E + _ + S + z;
1779
1779
  break;
1780
1780
  case "^":
1781
- S = _.slice(0, ie = _.length >> 1) + E + S + z + _.slice(ie);
1781
+ S = _.slice(0, se = _.length >> 1) + E + S + z + _.slice(se);
1782
1782
  break;
1783
1783
  default:
1784
1784
  S = _ + E + S + z;
@@ -1808,7 +1808,7 @@ An({
1808
1808
  currency: ["$", ""]
1809
1809
  });
1810
1810
  function An(e) {
1811
- return oe = Nn(e), ft = oe.format, ut = oe.formatPrefix, oe;
1811
+ return oe = wn(e), ft = oe.format, ut = oe.formatPrefix, oe;
1812
1812
  }
1813
1813
  function kn(e) {
1814
1814
  return Math.max(0, -Q(Math.abs(e)));
@@ -1834,8 +1834,8 @@ function Re(e, t) {
1834
1834
  }
1835
1835
  const nt = Symbol("implicit");
1836
1836
  function mt() {
1837
- var e = new Ce(), t = [], n = [], r = nt;
1838
- function i(l) {
1837
+ var e = new Ve(), t = [], n = [], r = nt;
1838
+ function s(l) {
1839
1839
  let a = e.get(l);
1840
1840
  if (a === void 0) {
1841
1841
  if (r !== nt) return r;
@@ -1843,19 +1843,19 @@ function mt() {
1843
1843
  }
1844
1844
  return n[a % n.length];
1845
1845
  }
1846
- return i.domain = function(l) {
1846
+ return s.domain = function(l) {
1847
1847
  if (!arguments.length) return t.slice();
1848
- t = [], e = new Ce();
1848
+ t = [], e = new Ve();
1849
1849
  for (const a of l)
1850
1850
  e.has(a) || e.set(a, t.push(a) - 1);
1851
- return i;
1852
- }, i.range = function(l) {
1853
- return arguments.length ? (n = Array.from(l), i) : n.slice();
1854
- }, i.unknown = function(l) {
1855
- return arguments.length ? (r = l, i) : r;
1856
- }, i.copy = function() {
1851
+ return s;
1852
+ }, s.range = function(l) {
1853
+ return arguments.length ? (n = Array.from(l), s) : n.slice();
1854
+ }, s.unknown = function(l) {
1855
+ return arguments.length ? (r = l, s) : r;
1856
+ }, s.copy = function() {
1857
1857
  return mt(t, n).unknown(r);
1858
- }, Re.apply(i, arguments), i;
1858
+ }, Re.apply(s, arguments), s;
1859
1859
  }
1860
1860
  function $n(e) {
1861
1861
  return function() {
@@ -1881,25 +1881,25 @@ function Tn(e, t) {
1881
1881
  };
1882
1882
  }
1883
1883
  function Fn(e, t, n) {
1884
- var r = e[0], i = e[1], l = t[0], a = t[1];
1885
- return i < r ? (r = Me(i, r), l = n(a, l)) : (r = Me(r, i), l = n(l, a)), function(c) {
1884
+ var r = e[0], s = e[1], l = t[0], a = t[1];
1885
+ return s < r ? (r = Me(s, r), l = n(a, l)) : (r = Me(r, s), l = n(l, a)), function(c) {
1886
1886
  return l(r(c));
1887
1887
  };
1888
1888
  }
1889
1889
  function jn(e, t, n) {
1890
- var r = Math.min(e.length, t.length) - 1, i = new Array(r), l = new Array(r), a = -1;
1890
+ var r = Math.min(e.length, t.length) - 1, s = new Array(r), l = new Array(r), a = -1;
1891
1891
  for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++a < r; )
1892
- i[a] = Me(e[a], e[a + 1]), l[a] = n(t[a], t[a + 1]);
1892
+ s[a] = Me(e[a], e[a + 1]), l[a] = n(t[a], t[a + 1]);
1893
1893
  return function(c) {
1894
1894
  var d = at(e, c, 1, r) - 1;
1895
- return l[d](i[d](c));
1895
+ return l[d](s[d](c));
1896
1896
  };
1897
1897
  }
1898
1898
  function zn(e, t) {
1899
1899
  return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
1900
1900
  }
1901
1901
  function En() {
1902
- var e = rt, t = rt, n = Ee, r, i, l, a = Y, c, d, o;
1902
+ var e = rt, t = rt, n = Ee, r, s, l, a = Y, c, d, o;
1903
1903
  function f() {
1904
1904
  var m = Math.min(e.length, t.length);
1905
1905
  return a !== Y && (a = Tn(e[0], e[m - 1])), c = m > 2 ? jn : Fn, d = o = null, u;
@@ -1908,7 +1908,7 @@ function En() {
1908
1908
  return m == null || isNaN(m = +m) ? l : (d || (d = c(e.map(r), t, n)))(r(a(m)));
1909
1909
  }
1910
1910
  return u.invert = function(m) {
1911
- return a(i((o || (o = c(t, e.map(r), me)))(m)));
1911
+ return a(s((o || (o = c(t, e.map(r), me)))(m)));
1912
1912
  }, u.domain = function(m) {
1913
1913
  return arguments.length ? (e = Array.from(m, Ln), f()) : e.slice();
1914
1914
  }, u.range = function(m) {
@@ -1922,30 +1922,30 @@ function En() {
1922
1922
  }, u.unknown = function(m) {
1923
1923
  return arguments.length ? (l = m, u) : l;
1924
1924
  }, function(m, v) {
1925
- return r = m, i = v, f();
1925
+ return r = m, s = v, f();
1926
1926
  };
1927
1927
  }
1928
1928
  function Dn() {
1929
1929
  return En()(Y, Y);
1930
1930
  }
1931
1931
  function Rn(e, t, n, r) {
1932
- var i = qt(e, t, n), l;
1932
+ var s = qt(e, t, n), l;
1933
1933
  switch (r = he(r ?? ",f"), r.type) {
1934
1934
  case "s": {
1935
1935
  var a = Math.max(Math.abs(e), Math.abs(t));
1936
- return r.precision == null && !isNaN(l = Sn(i, a)) && (r.precision = l), ut(r, a);
1936
+ return r.precision == null && !isNaN(l = Sn(s, a)) && (r.precision = l), ut(r, a);
1937
1937
  }
1938
1938
  case "":
1939
1939
  case "e":
1940
1940
  case "g":
1941
1941
  case "p":
1942
1942
  case "r": {
1943
- r.precision == null && !isNaN(l = Mn(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = l - (r.type === "e"));
1943
+ r.precision == null && !isNaN(l = Mn(s, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = l - (r.type === "e"));
1944
1944
  break;
1945
1945
  }
1946
1946
  case "f":
1947
1947
  case "%": {
1948
- r.precision == null && !isNaN(l = kn(i)) && (r.precision = l - (r.type === "%") * 2);
1948
+ r.precision == null && !isNaN(l = kn(s)) && (r.precision = l - (r.type === "%") * 2);
1949
1949
  break;
1950
1950
  }
1951
1951
  }
@@ -1955,16 +1955,16 @@ function xt(e) {
1955
1955
  var t = e.domain;
1956
1956
  return e.ticks = function(n) {
1957
1957
  var r = t();
1958
- return Ut(r[0], r[r.length - 1], n ?? 10);
1958
+ return Ct(r[0], r[r.length - 1], n ?? 10);
1959
1959
  }, e.tickFormat = function(n, r) {
1960
- var i = t();
1961
- return Rn(i[0], i[i.length - 1], n ?? 10, r);
1960
+ var s = t();
1961
+ return Rn(s[0], s[s.length - 1], n ?? 10, r);
1962
1962
  }, e.nice = function(n) {
1963
1963
  n == null && (n = 10);
1964
- var r = t(), i = 0, l = r.length - 1, a = r[i], c = r[l], d, o, f = 10;
1965
- for (c < a && (o = a, a = c, c = o, o = i, i = l, l = o); f-- > 0; ) {
1964
+ var r = t(), s = 0, l = r.length - 1, a = r[s], c = r[l], d, o, f = 10;
1965
+ for (c < a && (o = a, a = c, c = o, o = s, s = l, l = o); f-- > 0; ) {
1966
1966
  if (o = Ae(a, c, n), o === d)
1967
- return r[i] = a, r[l] = c, t(r);
1967
+ return r[s] = a, r[l] = c, t(r);
1968
1968
  if (o > 0)
1969
1969
  a = Math.floor(a / o) * o, c = Math.ceil(c / o) * o;
1970
1970
  else if (o < 0)
@@ -1983,9 +1983,9 @@ function In() {
1983
1983
  }, Re.apply(e, arguments), xt(e);
1984
1984
  }
1985
1985
  function ht() {
1986
- var e = 0, t = 1, n = 1, r = [0.5], i = [0, 1], l;
1986
+ var e = 0, t = 1, n = 1, r = [0.5], s = [0, 1], l;
1987
1987
  function a(d) {
1988
- return d != null && d <= d ? i[at(r, d, 0, n)] : l;
1988
+ return d != null && d <= d ? s[at(r, d, 0, n)] : l;
1989
1989
  }
1990
1990
  function c() {
1991
1991
  var d = -1;
@@ -1995,16 +1995,16 @@ function ht() {
1995
1995
  return a.domain = function(d) {
1996
1996
  return arguments.length ? ([e, t] = d, e = +e, t = +t, c()) : [e, t];
1997
1997
  }, a.range = function(d) {
1998
- return arguments.length ? (n = (i = Array.from(d)).length - 1, c()) : i.slice();
1998
+ return arguments.length ? (n = (s = Array.from(d)).length - 1, c()) : s.slice();
1999
1999
  }, a.invertExtent = function(d) {
2000
- var o = i.indexOf(d);
2000
+ var o = s.indexOf(d);
2001
2001
  return o < 0 ? [NaN, NaN] : o < 1 ? [e, r[0]] : o >= n ? [r[n - 1], t] : [r[o - 1], r[o]];
2002
2002
  }, a.unknown = function(d) {
2003
2003
  return arguments.length && (l = d), a;
2004
2004
  }, a.thresholds = function() {
2005
2005
  return r.slice();
2006
2006
  }, a.copy = function() {
2007
- return ht().domain([e, t]).range(i).unknown(l);
2007
+ return ht().domain([e, t]).range(s).unknown(l);
2008
2008
  }, Re.apply(xt(a), arguments);
2009
2009
  }
2010
2010
  function Jn({
@@ -2012,7 +2012,7 @@ function Jn({
2012
2012
  chartConfig: t,
2013
2013
  displayConfig: n = {},
2014
2014
  queryObject: r,
2015
- height: i = "100%",
2015
+ height: s = "100%",
2016
2016
  colorPalette: l
2017
2017
  }) {
2018
2018
  const [a, c] = H(null), { getFieldLabel: d } = B();
@@ -2022,13 +2022,13 @@ function Jn({
2022
2022
  showLegend: n?.showLegend ?? !0
2023
2023
  };
2024
2024
  if (!e || e.length === 0)
2025
- 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: [
2026
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2027
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in treemap chart" })
2025
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
2026
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2027
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in treemap chart" })
2028
2028
  ] }) });
2029
2029
  let f, u = !1, m;
2030
2030
  if (t?.xAxis && t?.yAxis) {
2031
- const h = t.xAxis[0], w = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
2031
+ const h = t.xAxis[0], N = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
2032
2032
  m = Array.isArray(t.series) ? t.series[0] : t.series;
2033
2033
  const y = O(r, h);
2034
2034
  if (m) {
@@ -2037,12 +2037,12 @@ function Jn({
2037
2037
  return typeof M == "string" ? parseFloat(M) : M;
2038
2038
  }).filter((b) => !isNaN(b));
2039
2039
  if (u = g.length === e.length && g.every((b) => typeof b == "number"), u) {
2040
- const b = Math.min(...g), M = Math.max(...g), L = ht().domain([b, M]).range(se);
2040
+ const b = Math.min(...g), M = Math.max(...g), L = ht().domain([b, M]).range(ie);
2041
2041
  f = e.map((F) => {
2042
2042
  const S = typeof F[m] == "string" ? parseFloat(F[m]) : F[m], E = L(S);
2043
2043
  return {
2044
2044
  name: R(F[h], y) || String(F[h]) || "Unknown",
2045
- size: typeof F[w] == "string" ? parseFloat(F[w]) : F[w] || 0,
2045
+ size: typeof F[N] == "string" ? parseFloat(F[N]) : F[N] || 0,
2046
2046
  fill: E,
2047
2047
  series: String(F[m])
2048
2048
  };
@@ -2051,7 +2051,7 @@ function Jn({
2051
2051
  const b = [...new Set(e.map((L) => String(L[m])))], M = mt().domain(b).range(l?.colors || T);
2052
2052
  f = e.map((L) => ({
2053
2053
  name: R(L[h], y) || String(L[h]) || "Unknown",
2054
- size: typeof L[w] == "string" ? parseFloat(L[w]) : L[w] || 0,
2054
+ size: typeof L[N] == "string" ? parseFloat(L[N]) : L[N] || 0,
2055
2055
  fill: M(String(L[m])),
2056
2056
  series: String(L[m])
2057
2057
  }));
@@ -2059,19 +2059,19 @@ function Jn({
2059
2059
  } else
2060
2060
  f = e.map((g, b) => ({
2061
2061
  name: R(g[h], y) || String(g[h]) || "Unknown",
2062
- size: typeof g[w] == "string" ? parseFloat(g[w]) : g[w] || 0,
2062
+ size: typeof g[N] == "string" ? parseFloat(g[N]) : g[N] || 0,
2063
2063
  fill: l?.colors && l.colors[b % l.colors.length] || T[b % T.length]
2064
2064
  }));
2065
2065
  } else {
2066
- const h = e[0], w = Object.keys(h), y = w.find(
2066
+ const h = e[0], N = Object.keys(h), y = N.find(
2067
2067
  (b) => typeof h[b] == "string" || b.toLowerCase().includes("name") || b.toLowerCase().includes("label") || b.toLowerCase().includes("category")
2068
- ) || w[0], g = w.find((b) => b.toLowerCase().includes("size")) || w.find(
2068
+ ) || N[0], g = N.find((b) => b.toLowerCase().includes("size")) || N.find(
2069
2069
  (b) => typeof h[b] == "number" && b !== y
2070
- ) || w[1];
2070
+ ) || N[1];
2071
2071
  if (!g)
2072
- 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: [
2073
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
2074
- /* @__PURE__ */ s("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
2072
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
2073
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
2074
+ /* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
2075
2075
  ] }) });
2076
2076
  f = e.map((b, M) => {
2077
2077
  let L = b[y];
@@ -2083,17 +2083,17 @@ function Jn({
2083
2083
  });
2084
2084
  }
2085
2085
  if (f = f.filter((h) => h.size != null && h.size > 0), f.length === 0)
2086
- 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: [
2087
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
2088
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for treemap chart after transformation" })
2086
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
2087
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
2088
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for treemap chart after transformation" })
2089
2089
  ] }) });
2090
2090
  const v = (h) => {
2091
- const { x: w, y, width: g, height: b, index: M, name: L, size: F } = h;
2092
- return g < 20 || b < 20 ? null : /* @__PURE__ */ N("g", { children: [
2093
- /* @__PURE__ */ s(
2091
+ const { x: N, y, width: g, height: b, index: M, name: L, size: F } = h;
2092
+ return g < 20 || b < 20 ? null : /* @__PURE__ */ w("g", { children: [
2093
+ /* @__PURE__ */ i(
2094
2094
  "rect",
2095
2095
  {
2096
- x: w,
2096
+ x: N,
2097
2097
  y,
2098
2098
  width: g,
2099
2099
  height: b,
@@ -2108,15 +2108,15 @@ function Jn({
2108
2108
  onMouseLeave: () => c(null)
2109
2109
  }
2110
2110
  ),
2111
- /* @__PURE__ */ s(
2111
+ /* @__PURE__ */ i(
2112
2112
  "foreignObject",
2113
2113
  {
2114
- x: w,
2114
+ x: N,
2115
2115
  y,
2116
2116
  width: g,
2117
2117
  height: b,
2118
2118
  style: { pointerEvents: "none", overflow: "visible" },
2119
- children: /* @__PURE__ */ N(
2119
+ children: /* @__PURE__ */ w(
2120
2120
  "div",
2121
2121
  {
2122
2122
  style: {
@@ -2134,7 +2134,7 @@ function Jn({
2134
2134
  overflow: "hidden"
2135
2135
  },
2136
2136
  children: [
2137
- g > 40 && b > 30 && /* @__PURE__ */ s(
2137
+ g > 40 && b > 30 && /* @__PURE__ */ i(
2138
2138
  "div",
2139
2139
  {
2140
2140
  style: {
@@ -2149,7 +2149,7 @@ function Jn({
2149
2149
  children: L
2150
2150
  }
2151
2151
  ),
2152
- g > 60 && b > 45 && /* @__PURE__ */ s(
2152
+ g > 60 && b > 45 && /* @__PURE__ */ i(
2153
2153
  "div",
2154
2154
  {
2155
2155
  style: {
@@ -2173,80 +2173,80 @@ function Jn({
2173
2173
  const h = Math.min(...e.map((y) => {
2174
2174
  const g = y[m];
2175
2175
  return typeof g == "string" ? parseFloat(g) : g;
2176
- })), w = Math.max(...e.map((y) => {
2176
+ })), N = Math.max(...e.map((y) => {
2177
2177
  const g = y[m];
2178
2178
  return typeof g == "string" ? parseFloat(g) : g;
2179
2179
  }));
2180
- x = se.map((y, g) => {
2181
- const b = g / (se.length - 1);
2180
+ x = ie.map((y, g) => {
2181
+ const b = g / (ie.length - 1);
2182
2182
  return {
2183
- value: (h + (w - h) * b).toFixed(2),
2183
+ value: (h + (N - h) * b).toFixed(2),
2184
2184
  type: "rect",
2185
2185
  color: y
2186
2186
  };
2187
2187
  });
2188
- } else A.length > 1 && (x = A.map((h, w) => ({
2188
+ } else A.length > 1 && (x = A.map((h, N) => ({
2189
2189
  value: h,
2190
2190
  type: "rect",
2191
- color: T[w % T.length]
2191
+ color: T[N % T.length]
2192
2192
  })));
2193
- const k = o.showLegend && x.length > 0, $ = k ? typeof i == "string" && i.includes("%") ? i : typeof i == "number" ? i + 60 : `calc(${i} + 60px)` : i;
2194
- return /* @__PURE__ */ N("div", { className: "w-full", style: { height: $ }, children: [
2195
- /* @__PURE__ */ s(C, { height: k ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ s(
2193
+ const k = o.showLegend && x.length > 0, $ = k ? typeof s == "string" && s.includes("%") ? s : typeof s == "number" ? s + 60 : `calc(${s} + 60px)` : s;
2194
+ return /* @__PURE__ */ w("div", { className: "w-full", style: { height: $ }, children: [
2195
+ /* @__PURE__ */ i(V, { height: k ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ i(
2196
2196
  Ft,
2197
2197
  {
2198
2198
  data: f,
2199
2199
  dataKey: "size",
2200
2200
  aspectRatio: 4 / 3,
2201
2201
  stroke: "#fff",
2202
- content: /* @__PURE__ */ s(v, {}),
2203
- children: o.showTooltip && /* @__PURE__ */ s(V, {})
2202
+ content: /* @__PURE__ */ i(v, {}),
2203
+ children: o.showTooltip && /* @__PURE__ */ i(G, {})
2204
2204
  }
2205
2205
  ) }),
2206
- k && /* @__PURE__ */ s("div", { className: "flex justify-center items-center mt-4 pb-2", children: u ? (
2206
+ k && /* @__PURE__ */ i("div", { className: "flex justify-center items-center mt-4 pb-2", children: u ? (
2207
2207
  // Gradient legend for numeric series
2208
- /* @__PURE__ */ N("div", { className: "flex flex-col items-center", children: [
2209
- /* @__PURE__ */ s("div", { className: "text-xs font-semibold text-dc-text-primary mb-2", children: m ? d(m) : "" }),
2210
- /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
2211
- /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((h) => {
2212
- const w = h[m];
2213
- return typeof w == "string" ? parseFloat(w) : w;
2208
+ /* @__PURE__ */ w("div", { className: "flex flex-col items-center", children: [
2209
+ /* @__PURE__ */ i("div", { className: "text-xs font-semibold text-dc-text-primary mb-2", children: m ? d(m) : "" }),
2210
+ /* @__PURE__ */ w("div", { className: "flex items-center gap-2", children: [
2211
+ /* @__PURE__ */ i("span", { className: "text-xs text-dc-text-muted", children: Math.min(...e.map((h) => {
2212
+ const N = h[m];
2213
+ return typeof N == "string" ? parseFloat(N) : N;
2214
2214
  })).toFixed(2) }),
2215
- /* @__PURE__ */ s(
2215
+ /* @__PURE__ */ i(
2216
2216
  "div",
2217
2217
  {
2218
2218
  className: "h-4 rounded-sm",
2219
2219
  style: {
2220
2220
  width: "200px",
2221
- background: `linear-gradient(to right, ${se.join(", ")})`
2221
+ background: `linear-gradient(to right, ${ie.join(", ")})`
2222
2222
  }
2223
2223
  }
2224
2224
  ),
2225
- /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: Math.max(...e.map((h) => {
2226
- const w = h[m];
2227
- return typeof w == "string" ? parseFloat(w) : w;
2225
+ /* @__PURE__ */ i("span", { className: "text-xs text-dc-text-muted", children: Math.max(...e.map((h) => {
2226
+ const N = h[m];
2227
+ return typeof N == "string" ? parseFloat(N) : N;
2228
2228
  })).toFixed(2) })
2229
2229
  ] })
2230
2230
  ] })
2231
2231
  ) : (
2232
2232
  // Discrete legend for categorical series
2233
- /* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-4", children: x.map((h, w) => /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
2234
- /* @__PURE__ */ s(
2233
+ /* @__PURE__ */ i("div", { className: "flex flex-wrap justify-center gap-4", children: x.map((h, N) => /* @__PURE__ */ w("div", { className: "flex items-center gap-2", children: [
2234
+ /* @__PURE__ */ i(
2235
2235
  "div",
2236
2236
  {
2237
2237
  className: "w-3 h-3 rounded-xs",
2238
2238
  style: { backgroundColor: h.color }
2239
2239
  }
2240
2240
  ),
2241
- /* @__PURE__ */ s("span", { className: "text-xs text-dc-text-muted", children: h.value })
2242
- ] }, w)) })
2241
+ /* @__PURE__ */ i("span", { className: "text-xs text-dc-text-muted", children: h.value })
2242
+ ] }, N)) })
2243
2243
  ) })
2244
2244
  ] });
2245
2245
  } catch (o) {
2246
- 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: [
2247
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
2248
- /* @__PURE__ */ s("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
2249
- /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
2246
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ w("div", { className: "text-center", children: [
2247
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
2248
+ /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
2249
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
2250
2250
  ] }) });
2251
2251
  }
2252
2252
  }
@@ -2257,40 +2257,30 @@ function Pn({
2257
2257
  }) {
2258
2258
  const { getFieldLabel: r } = B();
2259
2259
  if (!e || e.length === 0)
2260
- return /* @__PURE__ */ s(
2260
+ return /* @__PURE__ */ i(
2261
2261
  "div",
2262
2262
  {
2263
2263
  className: "flex items-center justify-center w-full",
2264
- style: {
2265
- height: n,
2266
- backgroundColor: "var(--dc-warning-bg)",
2267
- color: "var(--dc-warning)",
2268
- borderColor: "var(--dc-warning-border)"
2269
- },
2270
- children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2271
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2272
- /* @__PURE__ */ s("div", { className: "text-xs", children: "No data to display in table" })
2264
+ style: { height: n },
2265
+ children: /* @__PURE__ */ w("div", { className: "text-center text-dc-text-muted", children: [
2266
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2267
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "No data to display in table" })
2273
2268
  ] })
2274
2269
  }
2275
2270
  );
2276
- const i = Object.keys(e[0] || {}), l = t?.xAxis && t.xAxis.length > 0 ? t.xAxis.filter((a) => i.includes(a)) : i;
2277
- return l.length === 0 ? /* @__PURE__ */ s(
2271
+ const s = Object.keys(e[0] || {}), l = t?.xAxis && t.xAxis.length > 0 ? t.xAxis.filter((a) => s.includes(a)) : s;
2272
+ return l.length === 0 ? /* @__PURE__ */ i(
2278
2273
  "div",
2279
2274
  {
2280
2275
  className: "flex items-center justify-center w-full",
2281
- style: {
2282
- height: n,
2283
- backgroundColor: "var(--dc-warning-bg)",
2284
- color: "var(--dc-warning)",
2285
- borderColor: "var(--dc-warning-border)"
2286
- },
2287
- children: /* @__PURE__ */ N("div", { className: "text-center", children: [
2288
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
2289
- /* @__PURE__ */ s("div", { className: "text-xs", children: "Data structure is invalid" })
2276
+ style: { height: n },
2277
+ children: /* @__PURE__ */ w("div", { className: "text-center text-dc-text-muted", children: [
2278
+ /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
2279
+ /* @__PURE__ */ i("div", { className: "text-xs text-dc-text-secondary", children: "Data structure is invalid" })
2290
2280
  ] })
2291
2281
  }
2292
- ) : /* @__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: [
2293
- /* @__PURE__ */ s("thead", { className: "bg-dc-surface-secondary sticky top-0", children: /* @__PURE__ */ s("tr", { children: l.map((a) => /* @__PURE__ */ s(
2282
+ ) : /* @__PURE__ */ i("div", { className: "w-full overflow-auto", style: { height: n }, children: /* @__PURE__ */ w("table", { className: "min-w-full divide-y border-dc-border", children: [
2283
+ /* @__PURE__ */ i("thead", { className: "bg-dc-surface-secondary sticky top-0", children: /* @__PURE__ */ i("tr", { children: l.map((a) => /* @__PURE__ */ i(
2294
2284
  "th",
2295
2285
  {
2296
2286
  className: "px-3 py-2 text-left text-xs font-medium text-dc-text-muted uppercase tracking-wider",
@@ -2298,7 +2288,7 @@ function Pn({
2298
2288
  },
2299
2289
  a
2300
2290
  )) }) }),
2301
- /* @__PURE__ */ s("tbody", { className: "bg-dc-surface divide-y border-dc-border", children: e.map((a, c) => /* @__PURE__ */ s("tr", { className: "hover:bg-dc-surface-secondary", children: l.map((d) => /* @__PURE__ */ s(
2291
+ /* @__PURE__ */ i("tbody", { className: "bg-dc-surface divide-y border-dc-border", children: e.map((a, c) => /* @__PURE__ */ i("tr", { className: "hover:bg-dc-surface-secondary", children: l.map((d) => /* @__PURE__ */ i(
2302
2292
  "td",
2303
2293
  {
2304
2294
  className: "px-3 py-2 whitespace-nowrap text-sm text-dc-text",
@@ -2338,9 +2328,9 @@ function On(e) {
2338
2328
  }
2339
2329
  function tr(e, t = {}) {
2340
2330
  const { formatNumbers: n = !0, precision: r = 2 } = t;
2341
- return n ? e.map((i) => {
2331
+ return n ? e.map((s) => {
2342
2332
  const l = {};
2343
- for (const [a, c] of Object.entries(i))
2333
+ for (const [a, c] of Object.entries(s))
2344
2334
  typeof c == "number" ? l[a] = Number(c.toFixed(r)) : l[a] = c;
2345
2335
  return l;
2346
2336
  }) : e;
@@ -2349,9 +2339,9 @@ function nr() {
2349
2339
  return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2350
2340
  }
2351
2341
  function rr(e, t = 6, n = 4) {
2352
- return e.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...e.map((i) => i.y + i.h)) };
2342
+ return e.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...e.map((s) => s.y + s.h)) };
2353
2343
  }
2354
- function ir(e) {
2344
+ function sr(e) {
2355
2345
  try {
2356
2346
  const t = JSON.parse(e);
2357
2347
  return typeof t != "object" || t === null ? { valid: !1, error: "Query must be a JSON object" } : !t.measures && !t.dimensions ? { valid: !1, error: "Query must have at least measures or dimensions" } : { valid: !0, query: t };
@@ -2359,7 +2349,7 @@ function ir(e) {
2359
2349
  return { valid: !1, error: "Invalid JSON format" };
2360
2350
  }
2361
2351
  }
2362
- function sr() {
2352
+ function ir() {
2363
2353
  return {
2364
2354
  title: "Sample Chart",
2365
2355
  query: JSON.stringify({
@@ -2387,7 +2377,7 @@ export {
2387
2377
  Kn as B,
2388
2378
  ve as C,
2389
2379
  Pn as D,
2390
- sr as E,
2380
+ ir as E,
2391
2381
  He as F,
2392
2382
  Bn as L,
2393
2383
  jt as N,
@@ -2409,17 +2399,17 @@ export {
2409
2399
  xt as l,
2410
2400
  R as m,
2411
2401
  In as n,
2412
- se as o,
2402
+ ie as o,
2413
2403
  mt as p,
2414
2404
  ht as q,
2415
2405
  T as r,
2416
2406
  Te as s,
2417
2407
  En as t,
2418
2408
  qn as u,
2419
- Un as v,
2409
+ Cn as v,
2420
2410
  On as w,
2421
2411
  nr as x,
2422
2412
  rr as y,
2423
- ir as z
2413
+ sr as z
2424
2414
  };
2425
- //# sourceMappingURL=charts-VcPFhxyE.js.map
2415
+ //# sourceMappingURL=charts-CfbqkXfS.js.map