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