@actioneer/ads 0.2.2 → 0.2.4
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/bin/ads-init.mjs +176 -28
- package/components/ai-elements/chain-of-thought.d.ts +26 -19
- package/components/ai-elements/chain-of-thought.js +140 -150
- package/components/ai-elements/index.d.ts +0 -1
- package/components/ai-elements/message.d.ts +9 -4
- package/components/ai-elements/message.js +102 -88
- package/components/ai-elements/task-progress.js +69 -66
- package/components/answer.d.ts +3 -0
- package/components/answer.js +251 -212
- package/components/assistant-ui/composer-harness.js +24 -25
- package/components/assistant-ui/message.js +49 -36
- package/components/assistant-ui/primitives.d.ts +1 -1
- package/components/assistant-ui/thread-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +33 -31
- package/components/chart.d.ts +64 -2
- package/components/chart.js +717 -456
- package/components/command-palette.d.ts +43 -0
- package/components/command-palette.js +146 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +383 -382
- package/components/sidebar.d.ts +4 -1
- package/components/sidebar.js +57 -55
- package/hooks/agents-ui/voice-visualizer-types.js +1 -0
- package/lib/icons.d.ts +12 -0
- package/lib/icons.js +97 -110
- package/lib/motion.js +47 -22
- package/lib/router.js +19 -0
- package/lib/utils.js +5 -0
- package/llms.txt +44 -34
- package/manifest.json +485 -186
- package/package.json +1 -1
- package/styles.css +10 -10
- package/theme.css +9 -9
- package/components/ai-elements/reasoning.d.ts +0 -26
- package/components/ai-elements/reasoning.js +0 -131
package/components/chart.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { ResponsiveContainer as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { floatVariants as
|
|
8
|
-
const
|
|
2
|
+
import { jsxs as y, jsx as e, Fragment as G } from "react/jsx-runtime";
|
|
3
|
+
import * as k from "react";
|
|
4
|
+
import { ResponsiveContainer as $, LineChart as re, Tooltip as F, Line as U, AreaChart as ae, Area as ne, CartesianGrid as Y, XAxis as H, YAxis as I, BarChart as ie, Bar as Z, Cell as X, ComposedChart as oe, ScatterChart as le, Scatter as se, PieChart as ce, Pie as de, RadarChart as me, PolarGrid as fe, PolarAngleAxis as q, PolarRadiusAxis as ue, Radar as he, RadialBarChart as xe, RadialBar as ve, Treemap as ge, FunnelChart as be, Funnel as pe, LabelList as ye, ReferenceArea as ke, ReferenceLine as Ne, ReferenceDot as we } from "recharts";
|
|
5
|
+
import { MotionConfig as Ae, AnimatePresence as Ce, motion as Re } from "motion/react";
|
|
6
|
+
import { cn as C } from "../lib/cn.js";
|
|
7
|
+
import { floatVariants as Fe } from "../lib/motion.js";
|
|
8
|
+
const J = (r) => `var(--color-chart-${r % 6 + 1})`, E = [
|
|
9
9
|
"var(--color-ink-950)",
|
|
10
10
|
"var(--color-ink-700)",
|
|
11
11
|
"var(--color-ink-500)",
|
|
@@ -13,86 +13,105 @@ const V = (t) => `var(--color-chart-${t % 6 + 1})`, j = [
|
|
|
13
13
|
"var(--color-ink-300)",
|
|
14
14
|
"var(--color-ink-200)",
|
|
15
15
|
"var(--color-ink-100)"
|
|
16
|
-
],
|
|
16
|
+
], B = (r) => E[r % E.length], _ = "var(--color-chart-3)", S = {
|
|
17
17
|
primary: { ref: "var(--brand)", pill: "bg-fill text-fill-foreground" },
|
|
18
18
|
success: { ref: "var(--color-success-600)", pill: "bg-success-50 text-success-700" },
|
|
19
19
|
warning: { ref: "var(--color-warning-500)", pill: "bg-warning-50 text-warning-700" },
|
|
20
20
|
danger: { ref: "var(--color-danger-500)", pill: "bg-danger-50 text-danger-700" },
|
|
21
21
|
info: { ref: "var(--color-info-500)", pill: "bg-info-50 text-info-700" }
|
|
22
|
-
},
|
|
22
|
+
}, L = (r) => new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 }).format(r), Q = (r, n) => {
|
|
23
23
|
const a = [];
|
|
24
|
-
for (const
|
|
25
|
-
for (const
|
|
26
|
-
|
|
24
|
+
for (const i of r)
|
|
25
|
+
for (const t of Object.keys(i))
|
|
26
|
+
t !== n && typeof i[t] == "number" && !a.includes(t) && a.push(t);
|
|
27
27
|
return a;
|
|
28
28
|
};
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */ e("text", { x:
|
|
29
|
+
function T({ x: r, y: n, payload: a, anchor: i, dy: t, format: s }) {
|
|
30
|
+
const c = (a == null ? void 0 : a.value) ?? "", m = s ? s(c) : c;
|
|
31
|
+
return /* @__PURE__ */ e("text", { x: r, y: n, dy: t, textAnchor: i, className: "fill-tertiary text-xs tabular-nums", children: m });
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
active:
|
|
35
|
-
payload:
|
|
33
|
+
function M({
|
|
34
|
+
active: r,
|
|
35
|
+
payload: n,
|
|
36
36
|
label: a,
|
|
37
|
-
format:
|
|
37
|
+
format: i,
|
|
38
|
+
labelKey: t,
|
|
39
|
+
renderer: s
|
|
38
40
|
}) {
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
var x, u;
|
|
42
|
+
const c = (n ?? []).map((d, p) => {
|
|
43
|
+
const h = d.payload && typeof d.payload == "object" ? d.payload : void 0;
|
|
44
|
+
return {
|
|
45
|
+
key: d.dataKey ?? p,
|
|
46
|
+
name: d.name ?? d.dataKey ?? p,
|
|
47
|
+
value: d.value,
|
|
48
|
+
color: d.color,
|
|
49
|
+
datum: h
|
|
50
|
+
};
|
|
51
|
+
}), m = t ? (u = (x = c[0]) == null ? void 0 : x.datum) == null ? void 0 : u[t] : void 0, f = {
|
|
52
|
+
active: !!r,
|
|
53
|
+
label: typeof m == "string" || typeof m == "number" ? m : a,
|
|
54
|
+
items: c,
|
|
55
|
+
formatValue: i
|
|
56
|
+
};
|
|
57
|
+
if (s) return /* @__PURE__ */ e(G, { children: s(f) });
|
|
58
|
+
if (!f.active || !c.length) return null;
|
|
59
|
+
const l = c.length === 1, g = f.label ?? (l ? c[0].name : void 0);
|
|
60
|
+
return /* @__PURE__ */ y("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background", children: [
|
|
61
|
+
/* @__PURE__ */ e("div", { className: C("text-xs font-medium tracking-wide uppercase text-background/60", !l && "mb-1"), children: g }),
|
|
62
|
+
c.map((d) => /* @__PURE__ */ y("div", { className: "flex items-center gap-1.5", children: [
|
|
63
|
+
!l && /* @__PURE__ */ y(G, { children: [
|
|
64
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-1.5 rounded-dot", style: { background: d.color } }),
|
|
65
|
+
/* @__PURE__ */ e("span", { className: "text-background/70", children: d.name })
|
|
47
66
|
] }),
|
|
48
|
-
/* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-medium tabular-nums", children: typeof
|
|
49
|
-
] },
|
|
67
|
+
/* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-medium tabular-nums", children: typeof d.value == "number" ? i(d.value) : String(d.value ?? "") })
|
|
68
|
+
] }, d.key))
|
|
50
69
|
] });
|
|
51
70
|
}
|
|
52
|
-
const
|
|
53
|
-
function
|
|
54
|
-
const
|
|
55
|
-
return
|
|
71
|
+
const V = "pointer-events-none inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap";
|
|
72
|
+
function Me({ viewBox: r, label: n, color: a, axis: i }) {
|
|
73
|
+
const t = r ?? {};
|
|
74
|
+
return i === "y" ? /* @__PURE__ */ e("foreignObject", { x: t.x ?? 0, y: (t.y ?? 0) - 10, width: t.width ?? 0, height: 20, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-end pr-1", children: /* @__PURE__ */ e("span", { className: C(V, S[a].pill), children: n }) }) }) : /* @__PURE__ */ e("foreignObject", { x: (t.x ?? 0) - 90, y: (t.y ?? 0) - 10, width: 180, height: 20, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("span", { className: C(V, S[a].pill), children: n }) }) });
|
|
56
75
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
return /* @__PURE__ */ e("foreignObject", { x:
|
|
76
|
+
function Le({ viewBox: r, label: n, color: a }) {
|
|
77
|
+
const i = r ?? {};
|
|
78
|
+
return /* @__PURE__ */ e("foreignObject", { x: i.x ?? 0, y: i.y ?? 0, width: i.width ?? 0, height: 28, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center pl-1.5", children: /* @__PURE__ */ e("span", { className: C(V, S[a].pill), children: n }) }) });
|
|
60
79
|
}
|
|
61
|
-
function
|
|
62
|
-
cx:
|
|
63
|
-
cy:
|
|
80
|
+
function Oe({
|
|
81
|
+
cx: r,
|
|
82
|
+
cy: n,
|
|
64
83
|
n: a,
|
|
65
|
-
ann:
|
|
66
|
-
onEnter:
|
|
67
|
-
onLeave:
|
|
84
|
+
ann: i,
|
|
85
|
+
onEnter: t,
|
|
86
|
+
onLeave: s
|
|
68
87
|
}) {
|
|
69
|
-
const [
|
|
70
|
-
if (
|
|
71
|
-
const f = () =>
|
|
72
|
-
return /* @__PURE__ */
|
|
88
|
+
const [c, m] = k.useState(!1);
|
|
89
|
+
if (r == null || n == null || !Number.isFinite(r) || !Number.isFinite(n)) return /* @__PURE__ */ e("g", {});
|
|
90
|
+
const f = () => t({ ann: i, n: a, cx: r, cy: n }), l = () => s();
|
|
91
|
+
return /* @__PURE__ */ y(
|
|
73
92
|
"g",
|
|
74
93
|
{
|
|
75
94
|
tabIndex: 0,
|
|
76
95
|
role: "img",
|
|
77
|
-
"aria-label": `Annotation ${a}: ${
|
|
96
|
+
"aria-label": `Annotation ${a}: ${i.label}`,
|
|
78
97
|
className: "cursor-default outline-none [transform-box:fill-box] origin-center transition-transform ease-out [transition-duration:var(--duration-fast)] hover:scale-110 focus-visible:scale-110",
|
|
79
98
|
onMouseEnter: f,
|
|
80
|
-
onMouseLeave:
|
|
99
|
+
onMouseLeave: l,
|
|
81
100
|
onFocus: () => {
|
|
82
|
-
|
|
101
|
+
m(!0), f();
|
|
83
102
|
},
|
|
84
103
|
onBlur: () => {
|
|
85
|
-
|
|
104
|
+
m(!1), l();
|
|
86
105
|
},
|
|
87
106
|
children: [
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */ e("circle", { cx:
|
|
90
|
-
/* @__PURE__ */ e("circle", { cx:
|
|
107
|
+
c && /* @__PURE__ */ e("circle", { cx: r, cy: n, r: 12, fill: "none", stroke: "var(--ring)", strokeWidth: 2 }),
|
|
108
|
+
/* @__PURE__ */ e("circle", { cx: r, cy: n, r: 10, fill: "var(--background)" }),
|
|
109
|
+
/* @__PURE__ */ e("circle", { cx: r, cy: n, r: 8, fill: S[i.color ?? "primary"].ref }),
|
|
91
110
|
/* @__PURE__ */ e(
|
|
92
111
|
"text",
|
|
93
112
|
{
|
|
94
|
-
x:
|
|
95
|
-
y:
|
|
113
|
+
x: r,
|
|
114
|
+
y: n,
|
|
96
115
|
dy: "0.35em",
|
|
97
116
|
textAnchor: "middle",
|
|
98
117
|
className: "pointer-events-none fill-brand-foreground text-xs font-bold select-none",
|
|
@@ -103,41 +122,41 @@ function we({
|
|
|
103
122
|
}
|
|
104
123
|
);
|
|
105
124
|
}
|
|
106
|
-
function
|
|
107
|
-
return /* @__PURE__ */ e(
|
|
125
|
+
function Se({ hovered: r, frameWidth: n, format: a }) {
|
|
126
|
+
return /* @__PURE__ */ e(Ae, { reducedMotion: "user", children: /* @__PURE__ */ e(Ce, { children: r && /* @__PURE__ */ e(
|
|
108
127
|
"div",
|
|
109
128
|
{
|
|
110
129
|
className: "pointer-events-none absolute z-10",
|
|
111
130
|
style: {
|
|
112
|
-
left: Math.max(96, Math.min(
|
|
113
|
-
top:
|
|
131
|
+
left: Math.max(96, Math.min(r.cx, Math.max(n - 96, 96))),
|
|
132
|
+
top: r.cy - 16
|
|
114
133
|
},
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
|
|
134
|
+
children: /* @__PURE__ */ y(
|
|
135
|
+
Re.div,
|
|
117
136
|
{
|
|
118
|
-
variants:
|
|
137
|
+
variants: Fe,
|
|
119
138
|
initial: "hidden",
|
|
120
139
|
animate: "visible",
|
|
121
140
|
exit: "hidden",
|
|
122
141
|
className: "w-max max-w-60 -translate-x-1/2 -translate-y-full origin-bottom rounded-lg bg-elevated p-3 shadow-elevation",
|
|
123
142
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
|
|
125
144
|
/* @__PURE__ */ e(
|
|
126
145
|
"span",
|
|
127
146
|
{
|
|
128
147
|
"aria-hidden": !0,
|
|
129
148
|
className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-xs font-bold text-brand-foreground",
|
|
130
|
-
style: { background:
|
|
131
|
-
children:
|
|
149
|
+
style: { background: S[r.ann.color ?? "primary"].ref },
|
|
150
|
+
children: r.n
|
|
132
151
|
}
|
|
133
152
|
),
|
|
134
|
-
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-foreground", children:
|
|
153
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-foreground", children: r.ann.label })
|
|
135
154
|
] }),
|
|
136
|
-
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
155
|
+
r.ann.description && /* @__PURE__ */ e("p", { className: "mt-1.5 text-xs leading-relaxed text-secondary", children: r.ann.description }),
|
|
156
|
+
/* @__PURE__ */ y("div", { className: "mt-1.5 text-xs font-medium tracking-wide uppercase text-tertiary tabular-nums", children: [
|
|
157
|
+
r.ann.x,
|
|
139
158
|
" · ",
|
|
140
|
-
a(
|
|
159
|
+
a(r.ann.y)
|
|
141
160
|
] })
|
|
142
161
|
]
|
|
143
162
|
}
|
|
@@ -145,244 +164,344 @@ function ye({ hovered: t, frameWidth: r, format: a }) {
|
|
|
145
164
|
}
|
|
146
165
|
) }) });
|
|
147
166
|
}
|
|
148
|
-
function
|
|
149
|
-
const [
|
|
150
|
-
const
|
|
167
|
+
function K(r) {
|
|
168
|
+
const [n, a] = k.useState(null), i = k.useCallback(() => a(null), []), { back: t, front: s } = k.useMemo(() => {
|
|
169
|
+
const c = [], m = [];
|
|
151
170
|
let f = 0;
|
|
152
|
-
return (
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
|
|
171
|
+
return (r ?? []).forEach((l, g) => {
|
|
172
|
+
const x = l.color ?? "primary";
|
|
173
|
+
if (l.kind === "band") {
|
|
174
|
+
const u = l.axis ?? "y";
|
|
175
|
+
c.push(
|
|
157
176
|
/* @__PURE__ */ e(
|
|
158
|
-
|
|
177
|
+
ke,
|
|
159
178
|
{
|
|
160
|
-
...
|
|
161
|
-
fill:
|
|
179
|
+
...u === "y" ? { y1: l.from, y2: l.to } : { x1: l.from, x2: l.to },
|
|
180
|
+
fill: S[x].ref,
|
|
162
181
|
fillOpacity: 0.06,
|
|
163
182
|
stroke: "none",
|
|
164
|
-
ifOverflow:
|
|
165
|
-
label:
|
|
183
|
+
ifOverflow: u === "y" ? "extendDomain" : "visible",
|
|
184
|
+
label: l.label ? /* @__PURE__ */ e(Le, { label: l.label, color: x }) : void 0
|
|
166
185
|
},
|
|
167
|
-
`ann-${
|
|
186
|
+
`ann-${g}`
|
|
168
187
|
)
|
|
169
188
|
);
|
|
170
|
-
} else if (
|
|
171
|
-
const
|
|
172
|
-
|
|
189
|
+
} else if (l.kind === "line") {
|
|
190
|
+
const u = l.axis ?? "y";
|
|
191
|
+
m.push(
|
|
173
192
|
/* @__PURE__ */ e(
|
|
174
|
-
|
|
193
|
+
Ne,
|
|
175
194
|
{
|
|
176
|
-
...
|
|
177
|
-
stroke:
|
|
195
|
+
...u === "y" ? { y: l.value } : { x: l.value },
|
|
196
|
+
stroke: S[x].ref,
|
|
178
197
|
strokeWidth: 1,
|
|
179
198
|
strokeDasharray: "4 4",
|
|
180
|
-
ifOverflow:
|
|
181
|
-
label:
|
|
199
|
+
ifOverflow: u === "y" ? "extendDomain" : "visible",
|
|
200
|
+
label: l.label ? /* @__PURE__ */ e(Me, { label: l.label, color: x, axis: u }) : void 0
|
|
182
201
|
},
|
|
183
|
-
`ann-${
|
|
202
|
+
`ann-${g}`
|
|
184
203
|
)
|
|
185
204
|
);
|
|
186
205
|
} else {
|
|
187
206
|
f += 1;
|
|
188
|
-
const
|
|
189
|
-
|
|
207
|
+
const u = f;
|
|
208
|
+
m.push(
|
|
190
209
|
/* @__PURE__ */ e(
|
|
191
|
-
|
|
210
|
+
we,
|
|
192
211
|
{
|
|
193
|
-
x:
|
|
194
|
-
y:
|
|
212
|
+
x: l.x,
|
|
213
|
+
y: l.y,
|
|
195
214
|
ifOverflow: "visible",
|
|
196
|
-
shape: (
|
|
215
|
+
shape: (d) => /* @__PURE__ */ e(Oe, { cx: d.cx, cy: d.cy, n: u, ann: l, onEnter: a, onLeave: i })
|
|
197
216
|
},
|
|
198
|
-
`ann-${
|
|
217
|
+
`ann-${g}`
|
|
199
218
|
)
|
|
200
219
|
);
|
|
201
220
|
}
|
|
202
|
-
}), { back:
|
|
203
|
-
}, [
|
|
204
|
-
return { back:
|
|
221
|
+
}), { back: c, front: m };
|
|
222
|
+
}, [r, i]);
|
|
223
|
+
return { back: t, front: s, hovered: n };
|
|
205
224
|
}
|
|
206
|
-
function
|
|
207
|
-
items:
|
|
208
|
-
align:
|
|
225
|
+
function W({
|
|
226
|
+
items: r,
|
|
227
|
+
align: n = "end",
|
|
209
228
|
className: a
|
|
210
229
|
}) {
|
|
211
|
-
const
|
|
230
|
+
const i = {
|
|
212
231
|
start: "justify-start",
|
|
213
232
|
center: "justify-center",
|
|
214
233
|
end: "justify-end"
|
|
215
|
-
}[
|
|
216
|
-
return /* @__PURE__ */ e("div", { className:
|
|
217
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-2 rounded-dot", style: { background:
|
|
218
|
-
|
|
219
|
-
] },
|
|
234
|
+
}[n];
|
|
235
|
+
return /* @__PURE__ */ e("div", { className: C("mb-3 flex flex-wrap items-center gap-x-4 gap-y-1", i, a), children: r.map((t) => /* @__PURE__ */ y("span", { className: "inline-flex items-center gap-1.5 text-xs text-secondary", children: [
|
|
236
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-2 rounded-dot", style: { background: t.color } }),
|
|
237
|
+
t.label
|
|
238
|
+
] }, t.label)) });
|
|
220
239
|
}
|
|
221
|
-
const
|
|
222
|
-
({ className:
|
|
223
|
-
var
|
|
224
|
-
const f =
|
|
225
|
-
return /* @__PURE__ */
|
|
226
|
-
f.current =
|
|
227
|
-
}, className:
|
|
228
|
-
a && /* @__PURE__ */ e(
|
|
229
|
-
/* @__PURE__ */ e(
|
|
230
|
-
/* @__PURE__ */ e(
|
|
240
|
+
const D = k.forwardRef(
|
|
241
|
+
({ className: r, height: n, legendItems: a, hovered: i, format: t, children: s, ...c }, m) => {
|
|
242
|
+
var g;
|
|
243
|
+
const f = k.useRef(null);
|
|
244
|
+
return /* @__PURE__ */ y("div", { ref: (x) => {
|
|
245
|
+
f.current = x, typeof m == "function" ? m(x) : m && (m.current = x);
|
|
246
|
+
}, className: C("relative w-full font-sans", r), ...c, children: [
|
|
247
|
+
a && /* @__PURE__ */ e(W, { items: a }),
|
|
248
|
+
/* @__PURE__ */ e($, { width: "100%", height: n, children: s }),
|
|
249
|
+
/* @__PURE__ */ e(Se, { hovered: i, frameWidth: ((g = f.current) == null ? void 0 : g.clientWidth) ?? 0, format: t })
|
|
231
250
|
] });
|
|
232
251
|
}
|
|
233
252
|
);
|
|
234
|
-
|
|
235
|
-
function
|
|
236
|
-
const {
|
|
237
|
-
|
|
238
|
-
|
|
253
|
+
D.displayName = "ChartFrame";
|
|
254
|
+
function z(r) {
|
|
255
|
+
const {
|
|
256
|
+
data: n,
|
|
257
|
+
categoryKey: a,
|
|
258
|
+
series: i,
|
|
259
|
+
seriesLabels: t,
|
|
260
|
+
highlight: s,
|
|
261
|
+
annotations: c,
|
|
262
|
+
grid: m = !0,
|
|
263
|
+
legend: f,
|
|
264
|
+
showYAxis: l = !0,
|
|
265
|
+
formatValue: g,
|
|
266
|
+
xScale: x = "category",
|
|
267
|
+
xDomain: u,
|
|
268
|
+
yDomain: d,
|
|
269
|
+
xTickFormatter: p,
|
|
270
|
+
yTickFormatter: h,
|
|
271
|
+
yAxisWidth: o = 44
|
|
272
|
+
} = r, v = k.useMemo(() => i ?? Q(n, a), [i, n, a]), b = g ?? L, N = h ?? ((R) => typeof R == "number" ? b(R) : R), O = K(c), w = (R, P) => s && v.includes(s) ? R === s ? "var(--color-chart-1)" : _ : J(P), A = (R) => (t == null ? void 0 : t[R]) ?? R, te = f ?? v.length > 1 ? v.map((R, P) => ({ label: A(R), color: w(R, P) })) : null;
|
|
273
|
+
return { names: v, format: b, layers: O, legendItems: te, furniture: [
|
|
274
|
+
m ? /* @__PURE__ */ e(Y, { vertical: !1, stroke: "var(--border)" }, "grid") : null,
|
|
239
275
|
/* @__PURE__ */ e(
|
|
240
|
-
|
|
276
|
+
H,
|
|
241
277
|
{
|
|
242
278
|
dataKey: a,
|
|
279
|
+
type: x === "time" ? "number" : "category",
|
|
280
|
+
scale: x === "time" ? "time" : "auto",
|
|
281
|
+
domain: x === "time" ? u ?? ["dataMin", "dataMax"] : u,
|
|
282
|
+
allowDataOverflow: !!u,
|
|
243
283
|
axisLine: !1,
|
|
244
284
|
tickLine: !1,
|
|
245
285
|
minTickGap: 28,
|
|
246
286
|
tickMargin: 10,
|
|
247
|
-
tick: /* @__PURE__ */ e(
|
|
287
|
+
tick: /* @__PURE__ */ e(T, { anchor: "middle", dy: 0, format: p })
|
|
248
288
|
},
|
|
249
289
|
"x"
|
|
250
290
|
),
|
|
251
|
-
|
|
252
|
-
|
|
291
|
+
l ? /* @__PURE__ */ e(
|
|
292
|
+
I,
|
|
253
293
|
{
|
|
254
|
-
width:
|
|
294
|
+
width: o,
|
|
295
|
+
domain: d,
|
|
296
|
+
allowDataOverflow: !!d,
|
|
255
297
|
axisLine: !1,
|
|
256
298
|
tickLine: !1,
|
|
257
299
|
tickMargin: 6,
|
|
258
|
-
tick: /* @__PURE__ */ e(
|
|
300
|
+
tick: /* @__PURE__ */ e(T, { anchor: "end", dy: "0.32em", format: N })
|
|
259
301
|
},
|
|
260
302
|
"y"
|
|
261
303
|
) : null
|
|
262
|
-
], colorFor:
|
|
304
|
+
], colorFor: w, labelFor: A };
|
|
263
305
|
}
|
|
264
|
-
const
|
|
265
|
-
({ height:
|
|
266
|
-
const { names:
|
|
267
|
-
return /* @__PURE__ */ e(
|
|
268
|
-
|
|
269
|
-
/* @__PURE__ */ e(
|
|
270
|
-
|
|
306
|
+
const j = { top: 20, right: 12, bottom: 4, left: 0 }, Te = k.forwardRef(
|
|
307
|
+
({ height: r = 280, curve: n = "natural", forecastKeys: a, className: i, ...t }, s) => {
|
|
308
|
+
const { names: c, format: m, layers: f, legendItems: l, furniture: g, colorFor: x, labelFor: u } = z(t);
|
|
309
|
+
return /* @__PURE__ */ e(D, { ref: s, className: i, height: r, legendItems: l, hovered: f.hovered, format: m, children: /* @__PURE__ */ y(re, { data: t.data, margin: j, children: [
|
|
310
|
+
g,
|
|
311
|
+
t.tooltip !== !1 && /* @__PURE__ */ e(
|
|
312
|
+
F,
|
|
271
313
|
{
|
|
272
|
-
content: /* @__PURE__ */ e(
|
|
314
|
+
content: /* @__PURE__ */ e(
|
|
315
|
+
M,
|
|
316
|
+
{
|
|
317
|
+
format: m,
|
|
318
|
+
renderer: t.tooltip
|
|
319
|
+
}
|
|
320
|
+
),
|
|
273
321
|
cursor: { stroke: "var(--border-strong)" },
|
|
274
322
|
isAnimationActive: !1
|
|
275
323
|
}
|
|
276
324
|
),
|
|
277
325
|
f.back,
|
|
278
|
-
|
|
279
|
-
|
|
326
|
+
c.map((d, p) => /* @__PURE__ */ e(
|
|
327
|
+
U,
|
|
280
328
|
{
|
|
281
|
-
dataKey:
|
|
282
|
-
name:
|
|
283
|
-
type:
|
|
284
|
-
stroke:
|
|
329
|
+
dataKey: d,
|
|
330
|
+
name: u(d),
|
|
331
|
+
type: n,
|
|
332
|
+
stroke: x(d, p),
|
|
285
333
|
strokeWidth: 2,
|
|
286
|
-
strokeDasharray: a != null && a.includes(
|
|
334
|
+
strokeDasharray: a != null && a.includes(d) ? "6 4" : void 0,
|
|
287
335
|
dot: !1,
|
|
288
336
|
activeDot: { r: 4, strokeWidth: 2, stroke: "var(--background)" },
|
|
289
337
|
isAnimationActive: !1
|
|
290
338
|
},
|
|
291
|
-
|
|
339
|
+
d
|
|
292
340
|
)),
|
|
293
341
|
f.front
|
|
294
342
|
] }) });
|
|
295
343
|
}
|
|
296
344
|
);
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
({ height:
|
|
300
|
-
const { names:
|
|
301
|
-
return /* @__PURE__ */ e(
|
|
302
|
-
/* @__PURE__ */ e("defs", { children:
|
|
303
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: h
|
|
304
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: h
|
|
305
|
-
] },
|
|
306
|
-
|
|
307
|
-
/* @__PURE__ */ e(
|
|
308
|
-
|
|
345
|
+
Te.displayName = "LineChart";
|
|
346
|
+
const Be = k.forwardRef(
|
|
347
|
+
({ height: r = 280, curve: n = "natural", stacked: a = !1, forecastKeys: i, className: t, ...s }, c) => {
|
|
348
|
+
const { names: m, format: f, layers: l, legendItems: g, furniture: x, colorFor: u, labelFor: d } = z(s), p = k.useId().replace(/[^a-zA-Z0-9]/g, "");
|
|
349
|
+
return /* @__PURE__ */ e(D, { ref: c, className: t, height: r, legendItems: g, hovered: l.hovered, format: f, children: /* @__PURE__ */ y(ae, { data: s.data, margin: j, children: [
|
|
350
|
+
/* @__PURE__ */ e("defs", { children: m.map((h, o) => /* @__PURE__ */ y("linearGradient", { id: `${p}-${o}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
351
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: u(h, o), stopOpacity: 0.18 }),
|
|
352
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: u(h, o), stopOpacity: 0.02 })
|
|
353
|
+
] }, h)) }),
|
|
354
|
+
x,
|
|
355
|
+
s.tooltip !== !1 && /* @__PURE__ */ e(
|
|
356
|
+
F,
|
|
309
357
|
{
|
|
310
|
-
content: /* @__PURE__ */ e(
|
|
358
|
+
content: /* @__PURE__ */ e(
|
|
359
|
+
M,
|
|
360
|
+
{
|
|
361
|
+
format: f,
|
|
362
|
+
renderer: s.tooltip
|
|
363
|
+
}
|
|
364
|
+
),
|
|
311
365
|
cursor: { stroke: "var(--border-strong)" },
|
|
312
366
|
isAnimationActive: !1
|
|
313
367
|
}
|
|
314
368
|
),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
369
|
+
l.back,
|
|
370
|
+
m.map((h, o) => /* @__PURE__ */ e(
|
|
371
|
+
ne,
|
|
318
372
|
{
|
|
319
|
-
dataKey:
|
|
320
|
-
name:
|
|
321
|
-
type:
|
|
373
|
+
dataKey: h,
|
|
374
|
+
name: d(h),
|
|
375
|
+
type: n,
|
|
322
376
|
stackId: a ? "stack" : void 0,
|
|
323
|
-
stroke: h
|
|
377
|
+
stroke: u(h, o),
|
|
324
378
|
strokeWidth: 2,
|
|
325
|
-
strokeDasharray:
|
|
326
|
-
fill: `url(#${p}-${
|
|
379
|
+
strokeDasharray: i != null && i.includes(h) ? "6 4" : void 0,
|
|
380
|
+
fill: `url(#${p}-${o})`,
|
|
327
381
|
activeDot: { r: 4, strokeWidth: 2, stroke: "var(--background)" },
|
|
328
382
|
isAnimationActive: !1
|
|
329
383
|
},
|
|
330
|
-
|
|
384
|
+
h
|
|
331
385
|
)),
|
|
332
|
-
|
|
386
|
+
l.front
|
|
333
387
|
] }) });
|
|
334
388
|
}
|
|
335
389
|
);
|
|
336
|
-
|
|
337
|
-
const
|
|
338
|
-
({
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
390
|
+
Be.displayName = "AreaChart";
|
|
391
|
+
const $e = k.forwardRef(
|
|
392
|
+
({
|
|
393
|
+
height: r = 280,
|
|
394
|
+
stacked: n = !1,
|
|
395
|
+
layout: a = "vertical",
|
|
396
|
+
className: i,
|
|
397
|
+
...t
|
|
398
|
+
}, s) => {
|
|
399
|
+
const { names: c, format: m, layers: f, legendItems: l, furniture: g, colorFor: x, labelFor: u } = z(t), d = a === "horizontal", p = t.xTickFormatter ?? ((v) => typeof v == "number" ? m(v) : v), h = [
|
|
400
|
+
t.grid !== !1 ? /* @__PURE__ */ e(
|
|
401
|
+
Y,
|
|
402
|
+
{
|
|
403
|
+
horizontal: !1,
|
|
404
|
+
vertical: !0,
|
|
405
|
+
stroke: "var(--border)"
|
|
406
|
+
},
|
|
407
|
+
"grid"
|
|
408
|
+
) : null,
|
|
342
409
|
/* @__PURE__ */ e(
|
|
343
|
-
|
|
410
|
+
H,
|
|
344
411
|
{
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
412
|
+
type: "number",
|
|
413
|
+
domain: t.xDomain,
|
|
414
|
+
allowDataOverflow: !!t.xDomain,
|
|
415
|
+
axisLine: !1,
|
|
416
|
+
tickLine: !1,
|
|
417
|
+
minTickGap: 28,
|
|
418
|
+
tickMargin: 10,
|
|
419
|
+
tick: /* @__PURE__ */ e(T, { anchor: "middle", dy: 0, format: p })
|
|
420
|
+
},
|
|
421
|
+
"x"
|
|
349
422
|
),
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
423
|
+
t.showYAxis !== !1 ? /* @__PURE__ */ e(
|
|
424
|
+
I,
|
|
425
|
+
{
|
|
426
|
+
type: "category",
|
|
427
|
+
dataKey: t.categoryKey,
|
|
428
|
+
width: t.yAxisWidth ?? 144,
|
|
429
|
+
axisLine: !1,
|
|
430
|
+
tickLine: !1,
|
|
431
|
+
tickMargin: 6,
|
|
432
|
+
tick: /* @__PURE__ */ e(
|
|
433
|
+
T,
|
|
434
|
+
{
|
|
435
|
+
anchor: "end",
|
|
436
|
+
dy: "0.32em",
|
|
437
|
+
format: t.yTickFormatter
|
|
438
|
+
}
|
|
439
|
+
)
|
|
440
|
+
},
|
|
441
|
+
"y"
|
|
442
|
+
) : null
|
|
443
|
+
], o = t.highlight && c.length === 1 && !c.includes(t.highlight) ? t.highlight : null;
|
|
444
|
+
return /* @__PURE__ */ e(D, { ref: s, className: i, height: r, legendItems: l, hovered: f.hovered, format: m, children: /* @__PURE__ */ y(
|
|
445
|
+
ie,
|
|
446
|
+
{
|
|
447
|
+
data: t.data,
|
|
448
|
+
layout: d ? "vertical" : "horizontal",
|
|
449
|
+
margin: j,
|
|
450
|
+
barCategoryGap: "24%",
|
|
451
|
+
children: [
|
|
452
|
+
d ? h : g,
|
|
453
|
+
t.tooltip !== !1 && /* @__PURE__ */ e(
|
|
454
|
+
F,
|
|
455
|
+
{
|
|
456
|
+
content: /* @__PURE__ */ e(
|
|
457
|
+
M,
|
|
458
|
+
{
|
|
459
|
+
format: m,
|
|
460
|
+
renderer: t.tooltip
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
cursor: { fill: "var(--muted)" },
|
|
464
|
+
isAnimationActive: !1
|
|
465
|
+
}
|
|
466
|
+
),
|
|
467
|
+
f.back,
|
|
468
|
+
c.map((v, b) => {
|
|
469
|
+
const N = n ? b === c.length - 1 : !0, O = d ? [0, 4, 4, 0] : [4, 4, 0, 0];
|
|
470
|
+
return /* @__PURE__ */ e(
|
|
471
|
+
Z,
|
|
365
472
|
{
|
|
366
|
-
|
|
473
|
+
dataKey: v,
|
|
474
|
+
name: u(v),
|
|
475
|
+
stackId: n ? "stack" : void 0,
|
|
476
|
+
fill: x(v, b),
|
|
477
|
+
radius: N ? O : 0,
|
|
478
|
+
maxBarSize: 48,
|
|
479
|
+
isAnimationActive: !1,
|
|
480
|
+
children: o && t.data.map((w) => /* @__PURE__ */ e(
|
|
481
|
+
X,
|
|
482
|
+
{
|
|
483
|
+
fill: w[t.categoryKey] === o ? "var(--color-chart-1)" : _
|
|
484
|
+
},
|
|
485
|
+
String(w[t.categoryKey])
|
|
486
|
+
))
|
|
367
487
|
},
|
|
368
|
-
|
|
369
|
-
)
|
|
370
|
-
},
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
] }) });
|
|
488
|
+
v
|
|
489
|
+
);
|
|
490
|
+
}),
|
|
491
|
+
f.front
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
) });
|
|
376
495
|
}
|
|
377
496
|
);
|
|
378
|
-
|
|
379
|
-
const
|
|
380
|
-
({ height:
|
|
381
|
-
const { names: f, format:
|
|
382
|
-
return /* @__PURE__ */ e(
|
|
383
|
-
|
|
497
|
+
$e.displayName = "BarChart";
|
|
498
|
+
const ee = k.forwardRef(
|
|
499
|
+
({ height: r = 280, lineKeys: n, dualAxis: a = !1, stacked: i = !1, forecastKeys: t, className: s, ...c }, m) => {
|
|
500
|
+
const { names: f, format: l, layers: g, legendItems: x, furniture: u, colorFor: d, labelFor: p } = z(c), h = f.filter((o) => !n.includes(o));
|
|
501
|
+
return /* @__PURE__ */ e(D, { ref: m, className: s, height: r, legendItems: x, hovered: g.hovered, format: l, children: /* @__PURE__ */ y(oe, { data: c.data, margin: j, barCategoryGap: "24%", children: [
|
|
502
|
+
u,
|
|
384
503
|
a && /* @__PURE__ */ e(
|
|
385
|
-
|
|
504
|
+
I,
|
|
386
505
|
{
|
|
387
506
|
yAxisId: "right",
|
|
388
507
|
orientation: "right",
|
|
@@ -390,232 +509,294 @@ const U = N.forwardRef(
|
|
|
390
509
|
axisLine: !1,
|
|
391
510
|
tickLine: !1,
|
|
392
511
|
tickMargin: 6,
|
|
393
|
-
tick: /* @__PURE__ */ e(
|
|
512
|
+
tick: /* @__PURE__ */ e(
|
|
513
|
+
T,
|
|
514
|
+
{
|
|
515
|
+
anchor: "start",
|
|
516
|
+
dy: "0.32em",
|
|
517
|
+
format: (o) => typeof o == "number" ? l(o) : o
|
|
518
|
+
}
|
|
519
|
+
)
|
|
394
520
|
}
|
|
395
521
|
),
|
|
396
|
-
/* @__PURE__ */ e(
|
|
397
|
-
|
|
522
|
+
c.tooltip !== !1 && /* @__PURE__ */ e(
|
|
523
|
+
F,
|
|
398
524
|
{
|
|
399
|
-
content: /* @__PURE__ */ e(
|
|
525
|
+
content: /* @__PURE__ */ e(
|
|
526
|
+
M,
|
|
527
|
+
{
|
|
528
|
+
format: l,
|
|
529
|
+
renderer: c.tooltip
|
|
530
|
+
}
|
|
531
|
+
),
|
|
400
532
|
cursor: { fill: "var(--muted)" },
|
|
401
533
|
isAnimationActive: !1
|
|
402
534
|
}
|
|
403
535
|
),
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
const
|
|
536
|
+
g.back,
|
|
537
|
+
h.map((o) => {
|
|
538
|
+
const v = f.indexOf(o), b = i ? o === h[h.length - 1] : !0;
|
|
407
539
|
return /* @__PURE__ */ e(
|
|
408
|
-
|
|
540
|
+
Z,
|
|
409
541
|
{
|
|
410
|
-
dataKey:
|
|
411
|
-
name: p(
|
|
412
|
-
stackId:
|
|
413
|
-
fill:
|
|
414
|
-
radius:
|
|
542
|
+
dataKey: o,
|
|
543
|
+
name: p(o),
|
|
544
|
+
stackId: i ? "stack" : void 0,
|
|
545
|
+
fill: d(o, v),
|
|
546
|
+
radius: b ? [4, 4, 0, 0] : 0,
|
|
415
547
|
maxBarSize: 48,
|
|
416
548
|
isAnimationActive: !1
|
|
417
549
|
},
|
|
418
|
-
|
|
550
|
+
o
|
|
419
551
|
);
|
|
420
552
|
}),
|
|
421
|
-
|
|
422
|
-
const
|
|
553
|
+
n.map((o) => {
|
|
554
|
+
const v = f.indexOf(o);
|
|
423
555
|
return /* @__PURE__ */ e(
|
|
424
|
-
|
|
556
|
+
U,
|
|
425
557
|
{
|
|
426
|
-
dataKey:
|
|
427
|
-
name: p(
|
|
558
|
+
dataKey: o,
|
|
559
|
+
name: p(o),
|
|
428
560
|
yAxisId: a ? "right" : void 0,
|
|
429
561
|
type: "natural",
|
|
430
|
-
stroke:
|
|
562
|
+
stroke: d(o, v),
|
|
431
563
|
strokeWidth: 2,
|
|
432
|
-
strokeDasharray:
|
|
564
|
+
strokeDasharray: t != null && t.includes(o) ? "6 4" : void 0,
|
|
433
565
|
dot: !1,
|
|
434
566
|
activeDot: { r: 4, strokeWidth: 2, stroke: "var(--background)" },
|
|
435
567
|
isAnimationActive: !1
|
|
436
568
|
},
|
|
437
|
-
|
|
569
|
+
o
|
|
438
570
|
);
|
|
439
571
|
}),
|
|
440
|
-
|
|
572
|
+
g.front
|
|
441
573
|
] }) });
|
|
442
574
|
}
|
|
443
575
|
);
|
|
444
|
-
|
|
445
|
-
const
|
|
446
|
-
(
|
|
576
|
+
ee.displayName = "ComboChart";
|
|
577
|
+
const De = k.forwardRef(
|
|
578
|
+
(r, n) => /* @__PURE__ */ e(ee, { ref: n, ...r })
|
|
447
579
|
);
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
580
|
+
De.displayName = "ComposedChart";
|
|
581
|
+
const je = k.forwardRef(
|
|
582
|
+
({
|
|
583
|
+
data: r,
|
|
584
|
+
xKey: n,
|
|
585
|
+
yKey: a,
|
|
586
|
+
labelKey: i,
|
|
587
|
+
annotations: t,
|
|
588
|
+
height: s = 280,
|
|
589
|
+
grid: c = !0,
|
|
590
|
+
showYAxis: m = !0,
|
|
591
|
+
formatValue: f,
|
|
592
|
+
xScale: l = "number",
|
|
593
|
+
xDomain: g,
|
|
594
|
+
yDomain: x,
|
|
595
|
+
xTickFormatter: u,
|
|
596
|
+
yTickFormatter: d,
|
|
597
|
+
yAxisWidth: p = 44,
|
|
598
|
+
tooltip: h,
|
|
599
|
+
className: o
|
|
600
|
+
}, v) => {
|
|
601
|
+
const b = f ?? L, N = u ?? ((A) => typeof A == "number" ? L(A) : A), O = d ?? ((A) => typeof A == "number" ? b(A) : A), w = K(t);
|
|
602
|
+
return /* @__PURE__ */ e(D, { ref: v, className: o, height: s, legendItems: null, hovered: w.hovered, format: b, children: /* @__PURE__ */ y(le, { margin: j, children: [
|
|
603
|
+
c && /* @__PURE__ */ e(Y, { vertical: !1, stroke: "var(--border)" }),
|
|
471
604
|
/* @__PURE__ */ e(
|
|
472
|
-
|
|
605
|
+
H,
|
|
473
606
|
{
|
|
474
607
|
type: "number",
|
|
475
|
-
dataKey:
|
|
476
|
-
|
|
608
|
+
dataKey: n,
|
|
609
|
+
scale: l === "time" ? "time" : "auto",
|
|
610
|
+
domain: g ?? (l === "time" ? ["dataMin", "dataMax"] : ["auto", "auto"]),
|
|
611
|
+
allowDataOverflow: !!g,
|
|
477
612
|
axisLine: !1,
|
|
478
613
|
tickLine: !1,
|
|
479
614
|
minTickGap: 28,
|
|
480
615
|
tickMargin: 10,
|
|
481
|
-
tick: /* @__PURE__ */ e(
|
|
616
|
+
tick: /* @__PURE__ */ e(T, { anchor: "middle", dy: 0, format: N })
|
|
482
617
|
}
|
|
483
618
|
),
|
|
484
|
-
|
|
485
|
-
|
|
619
|
+
m && /* @__PURE__ */ e(
|
|
620
|
+
I,
|
|
486
621
|
{
|
|
487
622
|
type: "number",
|
|
488
623
|
dataKey: a,
|
|
489
|
-
width:
|
|
624
|
+
width: p,
|
|
625
|
+
domain: x,
|
|
626
|
+
allowDataOverflow: !!x,
|
|
490
627
|
axisLine: !1,
|
|
491
628
|
tickLine: !1,
|
|
492
629
|
tickMargin: 6,
|
|
493
|
-
tick: /* @__PURE__ */ e(
|
|
630
|
+
tick: /* @__PURE__ */ e(T, { anchor: "end", dy: "0.32em", format: O })
|
|
494
631
|
}
|
|
495
632
|
),
|
|
496
|
-
/* @__PURE__ */ e(
|
|
497
|
-
|
|
633
|
+
h !== !1 && /* @__PURE__ */ e(
|
|
634
|
+
F,
|
|
498
635
|
{
|
|
499
|
-
content: /* @__PURE__ */ e(
|
|
636
|
+
content: /* @__PURE__ */ e(
|
|
637
|
+
M,
|
|
638
|
+
{
|
|
639
|
+
format: b,
|
|
640
|
+
labelKey: i,
|
|
641
|
+
renderer: h
|
|
642
|
+
}
|
|
643
|
+
),
|
|
500
644
|
cursor: { stroke: "var(--border-strong)", strokeDasharray: "4 4" },
|
|
501
645
|
isAnimationActive: !1
|
|
502
646
|
}
|
|
503
647
|
),
|
|
504
|
-
|
|
648
|
+
w.back,
|
|
505
649
|
/* @__PURE__ */ e(
|
|
506
|
-
|
|
650
|
+
se,
|
|
507
651
|
{
|
|
508
|
-
data:
|
|
652
|
+
data: r,
|
|
509
653
|
fill: "var(--color-chart-1)",
|
|
510
|
-
shape: (
|
|
654
|
+
shape: (A) => /* @__PURE__ */ e("circle", { cx: A.cx, cy: A.cy, r: 4.5, fill: "var(--color-chart-1)", fillOpacity: 0.75 }),
|
|
511
655
|
isAnimationActive: !1
|
|
512
656
|
}
|
|
513
657
|
),
|
|
514
|
-
|
|
658
|
+
w.front
|
|
515
659
|
] }) });
|
|
516
660
|
}
|
|
517
661
|
);
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
({
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
662
|
+
je.displayName = "ScatterChart";
|
|
663
|
+
const Ie = k.forwardRef(
|
|
664
|
+
({
|
|
665
|
+
data: r,
|
|
666
|
+
nameKey: n,
|
|
667
|
+
valueKey: a,
|
|
668
|
+
donut: i = !0,
|
|
669
|
+
centerLabel: t,
|
|
670
|
+
highlight: s,
|
|
671
|
+
height: c = 260,
|
|
672
|
+
legend: m = !0,
|
|
673
|
+
formatValue: f,
|
|
674
|
+
tooltip: l,
|
|
675
|
+
className: g
|
|
676
|
+
}, x) => {
|
|
677
|
+
const u = f ?? L, d = r.reduce((o, v) => o + (typeof v[a] == "number" ? v[a] : 0), 0), p = (o, v) => s ? o === s ? "var(--color-chart-1)" : B(Math.min(v + 3, E.length - 1)) : B(v), h = m ? r.map((o, v) => ({
|
|
678
|
+
label: `${o[n]} · ${d ? Math.round(Number(o[a]) / d * 100) : 0}%`,
|
|
679
|
+
color: p(String(o[n]), v)
|
|
524
680
|
})) : null;
|
|
525
|
-
return /* @__PURE__ */
|
|
526
|
-
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */ e(
|
|
529
|
-
|
|
681
|
+
return /* @__PURE__ */ y("div", { ref: x, className: C("relative w-full font-sans", g), children: [
|
|
682
|
+
h && /* @__PURE__ */ e(W, { items: h }),
|
|
683
|
+
/* @__PURE__ */ y("div", { className: "relative", children: [
|
|
684
|
+
/* @__PURE__ */ e($, { width: "100%", height: c, children: /* @__PURE__ */ y(ce, { margin: { top: 8, right: 8, bottom: 8, left: 8 }, children: [
|
|
685
|
+
l !== !1 && /* @__PURE__ */ e(
|
|
686
|
+
F,
|
|
687
|
+
{
|
|
688
|
+
content: /* @__PURE__ */ e(
|
|
689
|
+
M,
|
|
690
|
+
{
|
|
691
|
+
format: u,
|
|
692
|
+
renderer: l
|
|
693
|
+
}
|
|
694
|
+
),
|
|
695
|
+
isAnimationActive: !1
|
|
696
|
+
}
|
|
697
|
+
),
|
|
530
698
|
/* @__PURE__ */ e(
|
|
531
|
-
|
|
699
|
+
de,
|
|
532
700
|
{
|
|
533
|
-
data:
|
|
701
|
+
data: r,
|
|
534
702
|
dataKey: a,
|
|
535
|
-
nameKey:
|
|
536
|
-
innerRadius:
|
|
703
|
+
nameKey: n,
|
|
704
|
+
innerRadius: i ? "62%" : 0,
|
|
537
705
|
outerRadius: "88%",
|
|
538
|
-
paddingAngle:
|
|
539
|
-
cornerRadius:
|
|
706
|
+
paddingAngle: i ? 2 : 1,
|
|
707
|
+
cornerRadius: i ? 4 : 2,
|
|
540
708
|
stroke: "none",
|
|
541
709
|
isAnimationActive: !1,
|
|
542
|
-
children:
|
|
710
|
+
children: r.map((o, v) => /* @__PURE__ */ e(X, { fill: p(String(o[n]), v) }, String(o[n])))
|
|
543
711
|
}
|
|
544
712
|
)
|
|
545
713
|
] }) }),
|
|
546
|
-
|
|
547
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-bold text-foreground tabular-nums", children:
|
|
548
|
-
|
|
714
|
+
i && /* @__PURE__ */ y("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
715
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-bold text-foreground tabular-nums", children: u(d) }),
|
|
716
|
+
t && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-medium tracking-wide uppercase text-tertiary", children: t })
|
|
549
717
|
] })
|
|
550
718
|
] })
|
|
551
719
|
] });
|
|
552
720
|
}
|
|
553
721
|
);
|
|
554
|
-
|
|
555
|
-
const
|
|
722
|
+
Ie.displayName = "PieChart";
|
|
723
|
+
const We = k.forwardRef(
|
|
556
724
|
({
|
|
557
|
-
data:
|
|
558
|
-
categoryKey:
|
|
725
|
+
data: r,
|
|
726
|
+
categoryKey: n,
|
|
559
727
|
series: a,
|
|
560
|
-
seriesLabels:
|
|
561
|
-
highlight:
|
|
562
|
-
maxValue:
|
|
563
|
-
height:
|
|
564
|
-
legend:
|
|
728
|
+
seriesLabels: i,
|
|
729
|
+
highlight: t,
|
|
730
|
+
maxValue: s,
|
|
731
|
+
height: c = 300,
|
|
732
|
+
legend: m,
|
|
565
733
|
formatValue: f,
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
734
|
+
tooltip: l,
|
|
735
|
+
className: g
|
|
736
|
+
}, x) => {
|
|
737
|
+
const u = k.useMemo(
|
|
738
|
+
() => a ?? Q(r, n),
|
|
739
|
+
[n, r, a]
|
|
740
|
+
), d = f ?? L, p = s ?? Math.max(
|
|
572
741
|
1,
|
|
573
|
-
...
|
|
574
|
-
(b) =>
|
|
575
|
-
(
|
|
742
|
+
...r.flatMap(
|
|
743
|
+
(b) => u.map(
|
|
744
|
+
(N) => typeof b[N] == "number" ? b[N] : 0
|
|
576
745
|
)
|
|
577
746
|
)
|
|
578
|
-
),
|
|
579
|
-
return /* @__PURE__ */
|
|
580
|
-
|
|
581
|
-
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(
|
|
582
|
-
|
|
747
|
+
), h = (b) => (i == null ? void 0 : i[b]) ?? b, o = (b, N) => t && u.includes(t) ? b === t ? "var(--color-chart-1)" : _ : J(N), v = m ?? u.length > 1 ? u.map((b, N) => ({ label: h(b), color: o(b, N) })) : null;
|
|
748
|
+
return /* @__PURE__ */ y("div", { ref: x, className: C("relative w-full font-sans", g), children: [
|
|
749
|
+
v && /* @__PURE__ */ e(W, { items: v, align: "center" }),
|
|
750
|
+
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e($, { width: "100%", height: c, children: /* @__PURE__ */ y(
|
|
751
|
+
me,
|
|
583
752
|
{
|
|
584
|
-
data:
|
|
753
|
+
data: r,
|
|
585
754
|
cx: "50%",
|
|
586
755
|
cy: "52%",
|
|
587
756
|
outerRadius: "68%",
|
|
588
757
|
margin: { top: 10, right: 56, bottom: 16, left: 56 },
|
|
589
758
|
children: [
|
|
590
|
-
/* @__PURE__ */ e(
|
|
759
|
+
/* @__PURE__ */ e(fe, { stroke: "var(--border)", radialLines: !0 }),
|
|
591
760
|
/* @__PURE__ */ e(
|
|
592
|
-
|
|
761
|
+
q,
|
|
593
762
|
{
|
|
594
|
-
dataKey:
|
|
763
|
+
dataKey: n,
|
|
595
764
|
tick: { fill: "var(--text-secondary)", fontSize: 11, fontWeight: 500 }
|
|
596
765
|
}
|
|
597
766
|
),
|
|
598
767
|
/* @__PURE__ */ e(
|
|
599
|
-
|
|
768
|
+
ue,
|
|
600
769
|
{
|
|
601
770
|
angle: 90,
|
|
602
|
-
domain: [0,
|
|
771
|
+
domain: [0, p],
|
|
603
772
|
tick: !1,
|
|
604
773
|
axisLine: !1,
|
|
605
774
|
tickLine: !1
|
|
606
775
|
}
|
|
607
776
|
),
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
777
|
+
l !== !1 && /* @__PURE__ */ e(
|
|
778
|
+
F,
|
|
779
|
+
{
|
|
780
|
+
content: /* @__PURE__ */ e(
|
|
781
|
+
M,
|
|
782
|
+
{
|
|
783
|
+
format: d,
|
|
784
|
+
renderer: l
|
|
785
|
+
}
|
|
786
|
+
),
|
|
787
|
+
isAnimationActive: !1
|
|
788
|
+
}
|
|
789
|
+
),
|
|
790
|
+
u.map((b, N) => /* @__PURE__ */ e(
|
|
791
|
+
he,
|
|
611
792
|
{
|
|
612
793
|
dataKey: b,
|
|
613
|
-
name:
|
|
614
|
-
stroke:
|
|
615
|
-
fill:
|
|
616
|
-
fillOpacity:
|
|
794
|
+
name: h(b),
|
|
795
|
+
stroke: o(b, N),
|
|
796
|
+
fill: o(b, N),
|
|
797
|
+
fillOpacity: t ? b === t ? 0.16 : 0.05 : 0.1,
|
|
617
798
|
strokeWidth: 2,
|
|
618
|
-
dot: { r: 2.5, fill:
|
|
799
|
+
dot: { r: 2.5, fill: o(b, N), strokeWidth: 0 },
|
|
619
800
|
isAnimationActive: !1
|
|
620
801
|
},
|
|
621
802
|
b
|
|
@@ -626,46 +807,59 @@ const Ie = N.forwardRef(
|
|
|
626
807
|
] });
|
|
627
808
|
}
|
|
628
809
|
);
|
|
629
|
-
|
|
630
|
-
const
|
|
810
|
+
We.displayName = "RadarChart";
|
|
811
|
+
const ze = k.forwardRef(
|
|
631
812
|
({
|
|
632
|
-
data:
|
|
633
|
-
nameKey:
|
|
813
|
+
data: r,
|
|
814
|
+
nameKey: n,
|
|
634
815
|
valueKey: a,
|
|
635
|
-
maxValue:
|
|
636
|
-
centerLabel:
|
|
637
|
-
height:
|
|
638
|
-
legend:
|
|
639
|
-
formatValue:
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
816
|
+
maxValue: i = 100,
|
|
817
|
+
centerLabel: t,
|
|
818
|
+
height: s = 280,
|
|
819
|
+
legend: c = !0,
|
|
820
|
+
formatValue: m,
|
|
821
|
+
tooltip: f,
|
|
822
|
+
className: l
|
|
823
|
+
}, g) => {
|
|
824
|
+
const x = m ?? L, u = r.map((h, o) => ({
|
|
825
|
+
...h,
|
|
826
|
+
name: String(h[n]),
|
|
827
|
+
fill: B(o)
|
|
828
|
+
})), d = u.length ? u.reduce(
|
|
829
|
+
(h, o) => h + (typeof o[a] == "number" ? o[a] : 0),
|
|
648
830
|
0
|
|
649
|
-
) /
|
|
650
|
-
label: String(
|
|
651
|
-
color:
|
|
831
|
+
) / u.length : 0, p = c ? u.map((h, o) => ({
|
|
832
|
+
label: String(h[n]),
|
|
833
|
+
color: B(o)
|
|
652
834
|
})) : null;
|
|
653
|
-
return /* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */ e(
|
|
656
|
-
|
|
835
|
+
return /* @__PURE__ */ y("div", { ref: g, className: C("relative w-full font-sans", l), children: [
|
|
836
|
+
/* @__PURE__ */ y("div", { className: "relative mx-auto w-full max-w-[420px]", children: [
|
|
837
|
+
/* @__PURE__ */ e($, { width: "100%", height: s, children: /* @__PURE__ */ y(
|
|
838
|
+
xe,
|
|
657
839
|
{
|
|
658
|
-
data:
|
|
840
|
+
data: u,
|
|
659
841
|
innerRadius: "48%",
|
|
660
842
|
outerRadius: "82%",
|
|
661
843
|
startAngle: 90,
|
|
662
844
|
endAngle: -270,
|
|
663
845
|
margin: { top: 6, right: 6, bottom: 6, left: 6 },
|
|
664
846
|
children: [
|
|
665
|
-
/* @__PURE__ */ e(
|
|
666
|
-
|
|
847
|
+
/* @__PURE__ */ e(q, { type: "number", domain: [0, i], tick: !1 }),
|
|
848
|
+
f !== !1 && /* @__PURE__ */ e(
|
|
849
|
+
F,
|
|
850
|
+
{
|
|
851
|
+
content: /* @__PURE__ */ e(
|
|
852
|
+
M,
|
|
853
|
+
{
|
|
854
|
+
format: x,
|
|
855
|
+
renderer: f
|
|
856
|
+
}
|
|
857
|
+
),
|
|
858
|
+
isAnimationActive: !1
|
|
859
|
+
}
|
|
860
|
+
),
|
|
667
861
|
/* @__PURE__ */ e(
|
|
668
|
-
|
|
862
|
+
ve,
|
|
669
863
|
{
|
|
670
864
|
dataKey: a,
|
|
671
865
|
background: { fill: "var(--muted)" },
|
|
@@ -677,71 +871,71 @@ const Te = N.forwardRef(
|
|
|
677
871
|
]
|
|
678
872
|
}
|
|
679
873
|
) }),
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-bold text-foreground tabular-nums", children:
|
|
682
|
-
|
|
874
|
+
/* @__PURE__ */ y("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
875
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-bold text-foreground tabular-nums", children: x(Math.round(d)) }),
|
|
876
|
+
t && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-medium tracking-wide uppercase text-tertiary", children: t })
|
|
683
877
|
] })
|
|
684
878
|
] }),
|
|
685
|
-
|
|
879
|
+
p && /* @__PURE__ */ e(W, { items: p, align: "center", className: "mb-0 mt-3" })
|
|
686
880
|
] });
|
|
687
881
|
}
|
|
688
882
|
);
|
|
689
|
-
|
|
690
|
-
function
|
|
691
|
-
x:
|
|
692
|
-
y:
|
|
883
|
+
ze.displayName = "RadialBarChart";
|
|
884
|
+
function Pe({
|
|
885
|
+
x: r = 0,
|
|
886
|
+
y: n = 0,
|
|
693
887
|
width: a = 0,
|
|
694
|
-
height:
|
|
695
|
-
depth:
|
|
696
|
-
index:
|
|
697
|
-
name:
|
|
698
|
-
value:
|
|
699
|
-
format: f =
|
|
888
|
+
height: i = 0,
|
|
889
|
+
depth: t = 0,
|
|
890
|
+
index: s = 0,
|
|
891
|
+
name: c,
|
|
892
|
+
value: m,
|
|
893
|
+
format: f = L
|
|
700
894
|
}) {
|
|
701
|
-
if (
|
|
702
|
-
const
|
|
703
|
-
return /* @__PURE__ */
|
|
895
|
+
if (t === 0) return /* @__PURE__ */ e("g", {});
|
|
896
|
+
const l = t === 0 ? "transparent" : B(s), g = t > 0 && s < 4, x = a > 72 && i > 38;
|
|
897
|
+
return /* @__PURE__ */ y("g", { children: [
|
|
704
898
|
/* @__PURE__ */ e(
|
|
705
899
|
"rect",
|
|
706
900
|
{
|
|
707
|
-
x:
|
|
708
|
-
y:
|
|
901
|
+
x: r,
|
|
902
|
+
y: n,
|
|
709
903
|
width: a,
|
|
710
|
-
height:
|
|
904
|
+
height: i,
|
|
711
905
|
rx: 6,
|
|
712
906
|
ry: 6,
|
|
713
|
-
fill:
|
|
907
|
+
fill: l,
|
|
714
908
|
stroke: "var(--background)",
|
|
715
909
|
strokeWidth: 4
|
|
716
910
|
}
|
|
717
911
|
),
|
|
718
|
-
|
|
912
|
+
x && /* @__PURE__ */ e(
|
|
719
913
|
"foreignObject",
|
|
720
914
|
{
|
|
721
|
-
x:
|
|
722
|
-
y:
|
|
915
|
+
x: r + 8,
|
|
916
|
+
y: n + 8,
|
|
723
917
|
width: Math.max(0, a - 16),
|
|
724
|
-
height: Math.max(0,
|
|
918
|
+
height: Math.max(0, i - 16),
|
|
725
919
|
className: "pointer-events-none overflow-hidden",
|
|
726
|
-
children: /* @__PURE__ */
|
|
920
|
+
children: /* @__PURE__ */ y("div", { className: "flex h-full flex-col justify-between", children: [
|
|
727
921
|
/* @__PURE__ */ e(
|
|
728
922
|
"p",
|
|
729
923
|
{
|
|
730
|
-
className:
|
|
924
|
+
className: C(
|
|
731
925
|
"truncate text-xs font-semibold",
|
|
732
|
-
|
|
926
|
+
g ? "text-background" : "text-foreground"
|
|
733
927
|
),
|
|
734
|
-
children:
|
|
928
|
+
children: c
|
|
735
929
|
}
|
|
736
930
|
),
|
|
737
|
-
typeof
|
|
931
|
+
typeof m == "number" && i > 58 && /* @__PURE__ */ e(
|
|
738
932
|
"p",
|
|
739
933
|
{
|
|
740
|
-
className:
|
|
934
|
+
className: C(
|
|
741
935
|
"text-xs tabular-nums",
|
|
742
|
-
|
|
936
|
+
g ? "text-background/70" : "text-tertiary"
|
|
743
937
|
),
|
|
744
|
-
children: f(
|
|
938
|
+
children: f(m)
|
|
745
939
|
}
|
|
746
940
|
)
|
|
747
941
|
] })
|
|
@@ -749,93 +943,160 @@ function je({
|
|
|
749
943
|
)
|
|
750
944
|
] });
|
|
751
945
|
}
|
|
752
|
-
function
|
|
753
|
-
const
|
|
754
|
-
const
|
|
755
|
-
if (
|
|
756
|
-
|
|
946
|
+
function Ge(r, n, a) {
|
|
947
|
+
const i = [], t = (s) => {
|
|
948
|
+
const c = Array.isArray(s.children) ? s.children : void 0;
|
|
949
|
+
if (c != null && c.length) {
|
|
950
|
+
c.forEach(t);
|
|
757
951
|
return;
|
|
758
952
|
}
|
|
759
|
-
typeof
|
|
760
|
-
...
|
|
761
|
-
name: String(
|
|
762
|
-
value:
|
|
953
|
+
typeof s[a] == "number" && i.push({
|
|
954
|
+
...s,
|
|
955
|
+
name: String(s[n] ?? ""),
|
|
956
|
+
value: s[a]
|
|
763
957
|
});
|
|
764
958
|
};
|
|
765
|
-
return
|
|
959
|
+
return r.forEach(t), i.length ? i : r;
|
|
766
960
|
}
|
|
767
|
-
const
|
|
768
|
-
({
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
961
|
+
const Ee = k.forwardRef(
|
|
962
|
+
({
|
|
963
|
+
data: r,
|
|
964
|
+
nameKey: n,
|
|
965
|
+
valueKey: a,
|
|
966
|
+
height: i = 280,
|
|
967
|
+
formatValue: t,
|
|
968
|
+
tooltip: s,
|
|
969
|
+
className: c
|
|
970
|
+
}, m) => {
|
|
971
|
+
const f = t ?? L, l = k.useMemo(
|
|
972
|
+
() => Ge(r, n, a),
|
|
973
|
+
[r, n, a]
|
|
772
974
|
);
|
|
773
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
774
|
-
|
|
975
|
+
return /* @__PURE__ */ e("div", { ref: m, className: C("relative w-full font-sans", c), children: /* @__PURE__ */ e($, { width: "100%", height: i, children: /* @__PURE__ */ e(
|
|
976
|
+
ge,
|
|
775
977
|
{
|
|
776
|
-
data:
|
|
777
|
-
nameKey:
|
|
978
|
+
data: l,
|
|
979
|
+
nameKey: n,
|
|
778
980
|
dataKey: a,
|
|
779
981
|
type: "flat",
|
|
780
982
|
aspectRatio: 1.6,
|
|
781
|
-
content: /* @__PURE__ */ e(
|
|
983
|
+
content: /* @__PURE__ */ e(Pe, { format: f }),
|
|
782
984
|
isAnimationActive: !1,
|
|
783
|
-
children:
|
|
985
|
+
children: s !== !1 && /* @__PURE__ */ e(
|
|
986
|
+
F,
|
|
987
|
+
{
|
|
988
|
+
content: /* @__PURE__ */ e(
|
|
989
|
+
M,
|
|
990
|
+
{
|
|
991
|
+
format: f,
|
|
992
|
+
renderer: s
|
|
993
|
+
}
|
|
994
|
+
),
|
|
995
|
+
isAnimationActive: !1
|
|
996
|
+
}
|
|
997
|
+
)
|
|
784
998
|
}
|
|
785
999
|
) }) });
|
|
786
1000
|
}
|
|
787
1001
|
);
|
|
788
|
-
|
|
789
|
-
const
|
|
790
|
-
({
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
1002
|
+
Ee.displayName = "TreemapChart";
|
|
1003
|
+
const Ve = k.forwardRef(
|
|
1004
|
+
({
|
|
1005
|
+
data: r,
|
|
1006
|
+
nameKey: n,
|
|
1007
|
+
valueKey: a,
|
|
1008
|
+
height: i = 280,
|
|
1009
|
+
formatValue: t,
|
|
1010
|
+
label: s,
|
|
1011
|
+
labelWidth: c = 176,
|
|
1012
|
+
tooltip: m,
|
|
1013
|
+
className: f
|
|
1014
|
+
}, l) => {
|
|
1015
|
+
var d;
|
|
1016
|
+
const g = t ?? L, x = Number(((d = r[0]) == null ? void 0 : d[a]) ?? 0), u = (p) => {
|
|
1017
|
+
var A;
|
|
1018
|
+
const h = p.index ?? 0, o = r[h];
|
|
1019
|
+
if (!o) return /* @__PURE__ */ e("g", {});
|
|
1020
|
+
const v = Number(o[a]), b = Number(((A = r[h - 1]) == null ? void 0 : A[a]) ?? v), N = x ? v / x * 100 : 0, O = b ? v / b * 100 : 0, w = {
|
|
1021
|
+
datum: o,
|
|
1022
|
+
index: h,
|
|
1023
|
+
name: String(o[n]),
|
|
1024
|
+
value: v,
|
|
1025
|
+
conversionFromFirst: N,
|
|
1026
|
+
conversionFromPrevious: O,
|
|
1027
|
+
dropOffFromPrevious: h === 0 ? 0 : 100 - O,
|
|
1028
|
+
x: Number(p.x ?? 0),
|
|
1029
|
+
y: Number(p.y ?? 0),
|
|
1030
|
+
width: Number(p.width ?? 0),
|
|
1031
|
+
height: Number(p.height ?? 0),
|
|
1032
|
+
formatValue: g
|
|
1033
|
+
};
|
|
1034
|
+
return s === !1 ? /* @__PURE__ */ e("g", {}) : s ? /* @__PURE__ */ e(G, { children: s(w) }) : /* @__PURE__ */ y(
|
|
797
1035
|
"text",
|
|
798
1036
|
{
|
|
799
|
-
x:
|
|
800
|
-
y:
|
|
1037
|
+
x: w.x + w.width + 12,
|
|
1038
|
+
y: w.y + w.height / 2,
|
|
801
1039
|
dy: "0.32em",
|
|
802
1040
|
textAnchor: "start",
|
|
803
1041
|
className: "text-xs",
|
|
804
1042
|
children: [
|
|
805
|
-
/* @__PURE__ */ e("tspan", { className: "fill-primary font-medium", children:
|
|
806
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ e("tspan", { className: "fill-primary font-medium", children: w.name }),
|
|
1044
|
+
/* @__PURE__ */ y("tspan", { className: "fill-secondary", children: [
|
|
807
1045
|
" · ",
|
|
808
|
-
|
|
1046
|
+
g(v)
|
|
809
1047
|
] }),
|
|
810
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ y("tspan", { className: "fill-tertiary", children: [
|
|
811
1049
|
" · ",
|
|
812
|
-
|
|
1050
|
+
Math.round(N),
|
|
813
1051
|
"%"
|
|
814
1052
|
] })
|
|
815
1053
|
]
|
|
816
1054
|
}
|
|
817
1055
|
);
|
|
818
1056
|
};
|
|
819
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
1057
|
+
return /* @__PURE__ */ e("div", { ref: l, className: C("relative w-full font-sans", f), children: /* @__PURE__ */ e($, { width: "100%", height: i, children: /* @__PURE__ */ y(
|
|
1058
|
+
be,
|
|
1059
|
+
{
|
|
1060
|
+
margin: {
|
|
1061
|
+
top: 8,
|
|
1062
|
+
right: s === !1 ? 8 : c,
|
|
1063
|
+
bottom: 8,
|
|
1064
|
+
left: 8
|
|
1065
|
+
},
|
|
1066
|
+
children: [
|
|
1067
|
+
m !== !1 && /* @__PURE__ */ e(
|
|
1068
|
+
F,
|
|
1069
|
+
{
|
|
1070
|
+
content: /* @__PURE__ */ e(
|
|
1071
|
+
M,
|
|
1072
|
+
{
|
|
1073
|
+
format: g,
|
|
1074
|
+
renderer: m
|
|
1075
|
+
}
|
|
1076
|
+
),
|
|
1077
|
+
isAnimationActive: !1
|
|
1078
|
+
}
|
|
1079
|
+
),
|
|
1080
|
+
/* @__PURE__ */ y(pe, { data: r, dataKey: a, nameKey: n, isAnimationActive: !1, children: [
|
|
1081
|
+
r.map((p, h) => /* @__PURE__ */ e(X, { fill: B(h) }, String(p[n]))),
|
|
1082
|
+
/* @__PURE__ */ e(ye, { position: "right", content: u })
|
|
1083
|
+
] })
|
|
1084
|
+
]
|
|
1085
|
+
}
|
|
1086
|
+
) }) });
|
|
826
1087
|
}
|
|
827
1088
|
);
|
|
828
|
-
|
|
1089
|
+
Ve.displayName = "FunnelChart";
|
|
829
1090
|
export {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
1091
|
+
Be as AreaChart,
|
|
1092
|
+
$e as BarChart,
|
|
1093
|
+
ee as ComboChart,
|
|
1094
|
+
De as ComposedChart,
|
|
1095
|
+
Ve as FunnelChart,
|
|
1096
|
+
Te as LineChart,
|
|
1097
|
+
Ie as PieChart,
|
|
1098
|
+
We as RadarChart,
|
|
1099
|
+
ze as RadialBarChart,
|
|
1100
|
+
je as ScatterChart,
|
|
1101
|
+
Ee as TreemapChart
|
|
841
1102
|
};
|