@actioneer/ads 0.5.9 → 0.7.0
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/components/ai-elements/agent-trace.d.ts +2 -2
- package/components/ai-elements/agent-trace.js +163 -104
- package/components/ai-elements/chain-of-thought.d.ts +2 -2
- package/components/ai-elements/chain-of-thought.js +1 -1
- package/components/ai-elements/index.d.ts +0 -5
- package/components/ai-elements/inline-citation.js +1 -1
- package/components/alert.d.ts +6 -6
- package/components/alert.js +89 -53
- package/components/answer-sources.d.ts +2 -6
- package/components/answer-sources.js +58 -60
- package/components/answer.d.ts +5 -0
- package/components/answer.js +311 -271
- package/components/assistant-ui/composer-harness.js +11 -14
- package/components/assistant-ui/composer.d.ts +3 -1
- package/components/assistant-ui/composer.js +148 -144
- package/components/assistant-ui/index.d.ts +0 -3
- package/components/assistant-ui/thread-context.d.ts +3 -1
- package/components/assistant-ui/thread.js +50 -42
- package/components/avatar.js +42 -42
- package/components/badge.d.ts +5 -6
- package/components/badge.js +13 -76
- package/components/body-page-header.d.ts +15 -0
- package/components/body-page-header.js +24 -0
- package/components/brand-loader.d.ts +0 -3
- package/components/brand-loader.js +10 -32
- package/components/breadcrumbs.d.ts +1 -8
- package/components/breadcrumbs.js +65 -78
- package/components/button.d.ts +1 -1
- package/components/button.js +55 -49
- package/components/card.js +19 -18
- package/components/chart.js +526 -503
- package/components/chip.d.ts +13 -1
- package/components/chip.js +93 -80
- package/components/collection-header.d.ts +17 -0
- package/components/collection-header.js +31 -0
- package/components/connector-card.d.ts +6 -6
- package/components/connector-card.js +31 -32
- package/components/date-range-picker.d.ts +26 -0
- package/components/date-range-picker.js +223 -0
- package/components/drawer.d.ts +19 -3
- package/components/drawer.js +143 -116
- package/components/dropdown.d.ts +1 -2
- package/components/dropdown.js +88 -89
- package/components/field.js +39 -34
- package/components/file-dropzone.js +1 -1
- package/components/index.d.ts +5 -4
- package/components/index.js +501 -546
- package/components/infinite-canvas.js +24 -24
- package/components/input-field.d.ts +18 -3
- package/components/input-field.js +88 -72
- package/components/input.js +16 -15
- package/components/modal.d.ts +31 -3
- package/components/modal.js +243 -169
- package/components/number-field.js +45 -42
- package/components/page-body.d.ts +12 -0
- package/components/page-body.js +18 -0
- package/components/pagination.js +36 -36
- package/components/panel.js +31 -28
- package/components/select.d.ts +21 -0
- package/components/select.js +189 -148
- package/components/setting-row.d.ts +6 -5
- package/components/setting-row.js +33 -32
- package/components/sidebar.d.ts +2 -0
- package/components/sidebar.js +165 -155
- package/components/skeleton.js +8 -7
- package/components/slider.js +1 -1
- package/components/surface-loader.d.ts +11 -0
- package/components/surface-loader.js +35 -0
- package/components/table.d.ts +16 -10
- package/components/table.js +426 -410
- package/components/tabs.d.ts +2 -0
- package/components/tabs.js +159 -294
- package/components/textarea.js +9 -9
- package/components/toast.d.ts +1 -1
- package/components/toast.js +181 -118
- package/components/tree.d.ts +5 -1
- package/components/tree.js +96 -63
- package/components/typography.d.ts +4 -4
- package/components/typography.js +13 -13
- package/components/ui/button.d.ts +1 -1
- package/components/ui/dialog.js +33 -33
- package/components/viz-charts.js +186 -183
- package/demo/components/add-to-artifact.js +8 -10
- package/fonts.css +2 -0
- package/lib/cn.js +11 -4
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +107 -106
- package/lib/interactive.d.ts +1 -1
- package/llms.txt +115 -152
- package/manifest.json +13730 -1084
- package/package.json +4 -2
- package/styles.css +365 -225
- package/theme.css +315 -176
- package/components/agent-icon.d.ts +0 -76
- package/components/agent-icon.js +0 -265
- package/components/ai-elements/queue.d.ts +0 -60
- package/components/ai-elements/queue.js +0 -193
- package/components/ai-elements/speech-input.d.ts +0 -16
- package/components/ai-elements/speech-input.js +0 -151
- package/components/ai-elements/task-progress.d.ts +0 -41
- package/components/ai-elements/task-progress.js +0 -224
- package/components/ai-elements/task.d.ts +0 -39
- package/components/ai-elements/task.js +0 -105
- package/components/ai-elements/voice.d.ts +0 -90
- package/components/ai-elements/voice.js +0 -496
- package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
- package/components/assistant-ui/follow-up-suggestions.js +0 -72
- package/components/assistant-ui/suggestions.d.ts +0 -7
- package/components/assistant-ui/suggestions.js +0 -19
- package/components/assistant-ui/voice.d.ts +0 -18
- package/components/link.d.ts +0 -14
- package/components/link.js +0 -72
- package/components/navbar.d.ts +0 -15
- package/components/navbar.js +0 -68
- package/components/pixel-icon.d.ts +0 -37
- package/components/pixel-icon.js +0 -859
package/components/chart.js
CHANGED
|
@@ -1,98 +1,112 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as A, jsx as e, Fragment as
|
|
3
|
-
import * as
|
|
4
|
-
import { ResponsiveContainer as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { cn as
|
|
2
|
+
import { jsxs as A, jsx as e, Fragment as K } from "react/jsx-runtime";
|
|
3
|
+
import * as R from "react";
|
|
4
|
+
import { ResponsiveContainer as _, LineChart as pe, Tooltip as O, Line as se, AreaChart as Ne, Area as we, CartesianGrid as te, XAxis as re, YAxis as V, BarChart as Ae, Bar as ce, Cell as de, ComposedChart as Ce, ScatterChart as ye, Scatter as Re, PieChart as ke, Pie as Me, RadarChart as $e, PolarGrid as Se, PolarAngleAxis as ue, PolarRadiusAxis as Le, Radar as Fe, RadialBarChart as Oe, RadialBar as Te, Treemap as Ie, ReferenceArea as Be, ReferenceLine as De, ReferenceDot as Ee } from "recharts";
|
|
5
|
+
import { MotionConfig as We, AnimatePresence as ze, motion as _e } from "motion/react";
|
|
6
|
+
import { cn as $ } from "../lib/cn.js";
|
|
7
7
|
import { floatVariants as je } from "../lib/motion.js";
|
|
8
|
-
const U = (t) => `var(--color-chart-${t % 6 + 1})`,
|
|
8
|
+
const U = (t) => `var(--color-chart-${t % 6 + 1})`, ee = (t) => U(t), ne = "var(--chart-context)", me = { fillOpacity: "var(--chart-active-bar-opacity)" }, Y = 2.5, He = 2.5, W = {
|
|
9
9
|
primary: { ref: "var(--brand)", pill: "bg-fill text-fill-foreground" },
|
|
10
10
|
success: { ref: "var(--color-success-600)", pill: "bg-success-50 text-success-700" },
|
|
11
11
|
warning: { ref: "var(--color-warning-500)", pill: "bg-warning-50 text-warning-700" },
|
|
12
12
|
danger: { ref: "var(--color-danger-500)", pill: "bg-danger-50 text-danger-700" },
|
|
13
13
|
info: { ref: "var(--color-info-500)", pill: "bg-info-50 text-info-700" }
|
|
14
|
-
}, F = (t) => new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 }).format(t),
|
|
14
|
+
}, F = (t) => new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 }).format(t), fe = (t, n) => {
|
|
15
15
|
const a = [];
|
|
16
16
|
for (const i of t)
|
|
17
|
-
for (const
|
|
18
|
-
|
|
17
|
+
for (const o of Object.keys(i))
|
|
18
|
+
o !== n && typeof i[o] == "number" && !a.includes(o) && a.push(o);
|
|
19
19
|
return a;
|
|
20
20
|
};
|
|
21
|
-
function D({ x: t, y:
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */ e("text", { x: t, y:
|
|
21
|
+
function D({ x: t, y: n, payload: a, anchor: i, dy: o, format: r }) {
|
|
22
|
+
const l = (a == null ? void 0 : a.value) ?? "", x = r ? r(l) : l;
|
|
23
|
+
return /* @__PURE__ */ e("text", { x: t, y: n, dy: o, textAnchor: i, className: "fill-tertiary text-xs tabular-nums", children: x });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function he({
|
|
26
26
|
x: t,
|
|
27
|
-
y:
|
|
27
|
+
y: n,
|
|
28
28
|
value: a,
|
|
29
29
|
hidden: i,
|
|
30
|
-
|
|
30
|
+
color: o,
|
|
31
|
+
format: r
|
|
31
32
|
}) {
|
|
32
|
-
if (i || t == null ||
|
|
33
|
-
const
|
|
34
|
-
return Number.isNaN(
|
|
33
|
+
if (i || t == null || n == null || a == null || a === "") return null;
|
|
34
|
+
const l = Number(a);
|
|
35
|
+
return Number.isNaN(l) ? null : /* @__PURE__ */ e(
|
|
35
36
|
"text",
|
|
36
37
|
{
|
|
37
38
|
x: Number(t),
|
|
38
|
-
y: Number(
|
|
39
|
+
y: Number(n) - 10,
|
|
39
40
|
textAnchor: "middle",
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
fill: o,
|
|
42
|
+
className: $(!o && "fill-secondary", "text-xs tabular-nums"),
|
|
43
|
+
children: r(l)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function E({
|
|
48
|
+
cx: t,
|
|
49
|
+
cy: n,
|
|
50
|
+
color: a,
|
|
51
|
+
active: i = !1
|
|
52
|
+
}) {
|
|
53
|
+
return t == null || n == null ? null : /* @__PURE__ */ e(
|
|
54
|
+
"circle",
|
|
55
|
+
{
|
|
56
|
+
"aria-hidden": !0,
|
|
57
|
+
cx: t,
|
|
58
|
+
cy: n,
|
|
59
|
+
r: i ? 5.5 : 4,
|
|
60
|
+
fill: "var(--background)",
|
|
61
|
+
stroke: a,
|
|
62
|
+
strokeWidth: i ? 3 : He
|
|
42
63
|
}
|
|
43
64
|
);
|
|
44
65
|
}
|
|
45
66
|
function Pe({
|
|
46
67
|
x: t,
|
|
47
|
-
y:
|
|
68
|
+
y: n,
|
|
48
69
|
width: a,
|
|
49
70
|
height: i,
|
|
50
|
-
value:
|
|
51
|
-
format:
|
|
52
|
-
horizontal:
|
|
71
|
+
value: o,
|
|
72
|
+
format: r,
|
|
73
|
+
horizontal: l
|
|
53
74
|
}) {
|
|
54
|
-
if (t == null ||
|
|
55
|
-
const x = Number(
|
|
75
|
+
if (t == null || n == null || o == null || o === "") return null;
|
|
76
|
+
const x = Number(o);
|
|
56
77
|
if (Number.isNaN(x)) return null;
|
|
57
|
-
const
|
|
58
|
-
return
|
|
78
|
+
const c = Number(t), m = Number(n), u = Number(a ?? 0), N = Number(i ?? 0);
|
|
79
|
+
return l ? /* @__PURE__ */ e(
|
|
59
80
|
"text",
|
|
60
81
|
{
|
|
61
|
-
x:
|
|
82
|
+
x: c + u + 8,
|
|
62
83
|
y: m + N / 2,
|
|
63
84
|
dy: "0.32em",
|
|
64
85
|
textAnchor: "start",
|
|
65
86
|
className: "fill-secondary text-xs tabular-nums",
|
|
66
|
-
children:
|
|
87
|
+
children: r(x)
|
|
67
88
|
}
|
|
68
89
|
) : /* @__PURE__ */ e(
|
|
69
90
|
"text",
|
|
70
91
|
{
|
|
71
|
-
x:
|
|
92
|
+
x: c + u / 2,
|
|
72
93
|
y: m - 8,
|
|
73
94
|
textAnchor: "middle",
|
|
74
95
|
className: "fill-secondary text-xs tabular-nums",
|
|
75
|
-
children:
|
|
96
|
+
children: r(x)
|
|
76
97
|
}
|
|
77
98
|
);
|
|
78
99
|
}
|
|
79
|
-
function ne({
|
|
80
|
-
cx: t,
|
|
81
|
-
cy: r,
|
|
82
|
-
fill: a
|
|
83
|
-
}) {
|
|
84
|
-
return t == null || r == null ? null : /* @__PURE__ */ e("circle", { cx: t, cy: r, r: 4.5, fill: a, stroke: "var(--background)", strokeWidth: 2 });
|
|
85
|
-
}
|
|
86
100
|
function T({
|
|
87
101
|
active: t,
|
|
88
|
-
payload:
|
|
102
|
+
payload: n,
|
|
89
103
|
label: a,
|
|
90
104
|
format: i,
|
|
91
|
-
labelKey:
|
|
92
|
-
renderer:
|
|
105
|
+
labelKey: o,
|
|
106
|
+
renderer: r
|
|
93
107
|
}) {
|
|
94
|
-
var N,
|
|
95
|
-
const
|
|
108
|
+
var N, b;
|
|
109
|
+
const l = (n ?? []).map((f, y) => {
|
|
96
110
|
const C = f.payload && typeof f.payload == "object" ? f.payload : void 0;
|
|
97
111
|
return {
|
|
98
112
|
key: f.dataKey ?? y,
|
|
@@ -101,19 +115,19 @@ function T({
|
|
|
101
115
|
color: f.color,
|
|
102
116
|
datum: C
|
|
103
117
|
};
|
|
104
|
-
}), x =
|
|
118
|
+
}), x = o ? (b = (N = l[0]) == null ? void 0 : N.datum) == null ? void 0 : b[o] : void 0, c = {
|
|
105
119
|
active: !!t,
|
|
106
120
|
label: typeof x == "string" || typeof x == "number" ? x : a,
|
|
107
|
-
items:
|
|
121
|
+
items: l,
|
|
108
122
|
formatValue: i
|
|
109
123
|
};
|
|
110
|
-
if (
|
|
111
|
-
if (!
|
|
112
|
-
const m =
|
|
124
|
+
if (r) return /* @__PURE__ */ e(K, { children: r(c) });
|
|
125
|
+
if (!c.active || !l.length) return null;
|
|
126
|
+
const m = l.length === 1, u = c.label ?? (m ? l[0].name : void 0);
|
|
113
127
|
return /* @__PURE__ */ A("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background", children: [
|
|
114
|
-
/* @__PURE__ */ e("div", { className:
|
|
115
|
-
|
|
116
|
-
!m && /* @__PURE__ */ A(
|
|
128
|
+
/* @__PURE__ */ e("div", { className: $("text-xs font-normal tracking-wide uppercase text-background/60", !m && "mb-1"), children: u }),
|
|
129
|
+
l.map((f) => /* @__PURE__ */ A("div", { className: "flex items-center gap-1.5", children: [
|
|
130
|
+
!m && /* @__PURE__ */ A(K, { children: [
|
|
117
131
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-1.5 rounded-dot", style: { background: f.color } }),
|
|
118
132
|
/* @__PURE__ */ e("span", { className: "text-background/70", children: f.name })
|
|
119
133
|
] }),
|
|
@@ -121,35 +135,35 @@ function T({
|
|
|
121
135
|
] }, f.key))
|
|
122
136
|
] });
|
|
123
137
|
}
|
|
124
|
-
const
|
|
125
|
-
function
|
|
138
|
+
const xe = "pointer-events-none inline-flex min-h-4 items-center rounded-full px-2 py-0.5 text-xs font-normal whitespace-nowrap";
|
|
139
|
+
function Ge({
|
|
126
140
|
viewBox: t,
|
|
127
|
-
label:
|
|
141
|
+
label: n,
|
|
128
142
|
value: a,
|
|
129
143
|
color: i,
|
|
130
|
-
axis:
|
|
144
|
+
axis: o
|
|
131
145
|
}) {
|
|
132
|
-
const
|
|
133
|
-
|
|
146
|
+
const r = t ?? {}, l = /* @__PURE__ */ A("span", { className: $(xe, W[i].pill), children: [
|
|
147
|
+
n,
|
|
134
148
|
a != null && /* @__PURE__ */ e("span", { className: "ml-1 tabular-nums", children: a })
|
|
135
149
|
] });
|
|
136
|
-
return
|
|
150
|
+
return o === "y" ? /* @__PURE__ */ e("foreignObject", { x: r.x ?? 0, y: (r.y ?? 0) - 12, width: r.width ?? 0, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-end pr-1", children: l }) }) : /* @__PURE__ */ e("foreignObject", { x: (r.x ?? 0) - 90, y: (r.y ?? 0) - 12, width: 180, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: l }) });
|
|
137
151
|
}
|
|
138
|
-
function
|
|
152
|
+
function Ve({ viewBox: t, label: n, color: a }) {
|
|
139
153
|
const i = t ?? {};
|
|
140
|
-
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:
|
|
154
|
+
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: $(xe, W[a].pill), children: n }) }) });
|
|
141
155
|
}
|
|
142
|
-
function
|
|
156
|
+
function Ue({
|
|
143
157
|
cx: t,
|
|
144
|
-
cy:
|
|
158
|
+
cy: n,
|
|
145
159
|
n: a,
|
|
146
160
|
ann: i,
|
|
147
|
-
onEnter:
|
|
148
|
-
onLeave:
|
|
161
|
+
onEnter: o,
|
|
162
|
+
onLeave: r
|
|
149
163
|
}) {
|
|
150
|
-
const [
|
|
151
|
-
if (t == null ||
|
|
152
|
-
const
|
|
164
|
+
const [l, x] = R.useState(!1);
|
|
165
|
+
if (t == null || n == null || !Number.isFinite(t) || !Number.isFinite(n)) return /* @__PURE__ */ e("g", {});
|
|
166
|
+
const c = () => o({ ann: i, n: a, cx: t, cy: n }), m = () => r();
|
|
153
167
|
return /* @__PURE__ */ A(
|
|
154
168
|
"g",
|
|
155
169
|
{
|
|
@@ -157,23 +171,23 @@ function _e({
|
|
|
157
171
|
role: "img",
|
|
158
172
|
"aria-label": `Annotation ${a}: ${i.label}`,
|
|
159
173
|
className: "cursor-default outline-none [transform-box:fill-box] origin-center transition-transform ease-out [transition-duration:150ms] hover:scale-110 focus-visible:scale-110 motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100",
|
|
160
|
-
onMouseEnter:
|
|
174
|
+
onMouseEnter: c,
|
|
161
175
|
onMouseLeave: m,
|
|
162
176
|
onFocus: () => {
|
|
163
|
-
x(!0),
|
|
177
|
+
x(!0), c();
|
|
164
178
|
},
|
|
165
179
|
onBlur: () => {
|
|
166
180
|
x(!1), m();
|
|
167
181
|
},
|
|
168
182
|
children: [
|
|
169
|
-
|
|
170
|
-
/* @__PURE__ */ e("circle", { cx: t, cy:
|
|
171
|
-
/* @__PURE__ */ e("circle", { cx: t, cy:
|
|
183
|
+
l && /* @__PURE__ */ e("circle", { cx: t, cy: n, r: 12, fill: "none", stroke: "var(--ring)", strokeWidth: 2 }),
|
|
184
|
+
/* @__PURE__ */ e("circle", { cx: t, cy: n, r: 10, fill: "var(--background)" }),
|
|
185
|
+
/* @__PURE__ */ e("circle", { cx: t, cy: n, r: 8, fill: W[i.color ?? "primary"].ref }),
|
|
172
186
|
/* @__PURE__ */ e(
|
|
173
187
|
"text",
|
|
174
188
|
{
|
|
175
189
|
x: t,
|
|
176
|
-
y:
|
|
190
|
+
y: n,
|
|
177
191
|
dy: "0.35em",
|
|
178
192
|
textAnchor: "middle",
|
|
179
193
|
className: "pointer-events-none fill-brand-foreground text-xs font-medium select-none",
|
|
@@ -184,17 +198,17 @@ function _e({
|
|
|
184
198
|
}
|
|
185
199
|
);
|
|
186
200
|
}
|
|
187
|
-
function
|
|
188
|
-
return /* @__PURE__ */ e(
|
|
201
|
+
function Ye({ hovered: t, frameWidth: n, format: a }) {
|
|
202
|
+
return /* @__PURE__ */ e(We, { reducedMotion: "user", children: /* @__PURE__ */ e(ze, { children: t && /* @__PURE__ */ e(
|
|
189
203
|
"div",
|
|
190
204
|
{
|
|
191
205
|
className: "pointer-events-none absolute z-10",
|
|
192
206
|
style: {
|
|
193
|
-
left: Math.max(96, Math.min(t.cx, Math.max(
|
|
207
|
+
left: Math.max(96, Math.min(t.cx, Math.max(n - 96, 96))),
|
|
194
208
|
top: t.cy - 16
|
|
195
209
|
},
|
|
196
210
|
children: /* @__PURE__ */ A(
|
|
197
|
-
|
|
211
|
+
_e.div,
|
|
198
212
|
{
|
|
199
213
|
variants: je,
|
|
200
214
|
initial: "hidden",
|
|
@@ -226,45 +240,45 @@ function Ge({ hovered: t, frameWidth: r, format: a }) {
|
|
|
226
240
|
}
|
|
227
241
|
) }) });
|
|
228
242
|
}
|
|
229
|
-
function
|
|
230
|
-
const [a, i] =
|
|
231
|
-
const x = [],
|
|
243
|
+
function ve(t, n) {
|
|
244
|
+
const [a, i] = R.useState(null), o = R.useCallback(() => i(null), []), { back: r, front: l } = R.useMemo(() => {
|
|
245
|
+
const x = [], c = [];
|
|
232
246
|
let m = 0;
|
|
233
247
|
return (t ?? []).forEach((u, N) => {
|
|
234
|
-
const
|
|
248
|
+
const b = u.color ?? "primary";
|
|
235
249
|
if (u.kind === "band") {
|
|
236
250
|
const f = u.axis ?? "y";
|
|
237
251
|
x.push(
|
|
238
252
|
/* @__PURE__ */ e(
|
|
239
|
-
|
|
253
|
+
Be,
|
|
240
254
|
{
|
|
241
255
|
...f === "y" ? { y1: u.from, y2: u.to } : { x1: u.from, x2: u.to },
|
|
242
|
-
fill: W[
|
|
256
|
+
fill: W[b].ref,
|
|
243
257
|
fillOpacity: 0.06,
|
|
244
258
|
stroke: "none",
|
|
245
259
|
ifOverflow: f === "y" ? "extendDomain" : "visible",
|
|
246
|
-
label: u.label ? /* @__PURE__ */ e(
|
|
260
|
+
label: u.label ? /* @__PURE__ */ e(Ve, { label: u.label, color: b }) : void 0
|
|
247
261
|
},
|
|
248
262
|
`ann-${N}`
|
|
249
263
|
)
|
|
250
264
|
);
|
|
251
265
|
} else if (u.kind === "line") {
|
|
252
266
|
const f = u.axis ?? "y";
|
|
253
|
-
|
|
267
|
+
c.push(
|
|
254
268
|
/* @__PURE__ */ e(
|
|
255
|
-
|
|
269
|
+
De,
|
|
256
270
|
{
|
|
257
271
|
...f === "y" ? { y: u.value } : { x: u.value },
|
|
258
|
-
stroke: W[
|
|
272
|
+
stroke: W[b].ref,
|
|
259
273
|
strokeWidth: 1,
|
|
260
274
|
strokeDasharray: "4 4",
|
|
261
275
|
ifOverflow: f === "y" ? "extendDomain" : "visible",
|
|
262
276
|
label: u.label ? /* @__PURE__ */ e(
|
|
263
|
-
|
|
277
|
+
Ge,
|
|
264
278
|
{
|
|
265
279
|
label: u.label,
|
|
266
|
-
value: typeof u.value == "number" ?
|
|
267
|
-
color:
|
|
280
|
+
value: typeof u.value == "number" ? n(u.value) : String(u.value),
|
|
281
|
+
color: b,
|
|
268
282
|
axis: f
|
|
269
283
|
}
|
|
270
284
|
) : void 0
|
|
@@ -275,131 +289,131 @@ function he(t, r) {
|
|
|
275
289
|
} else {
|
|
276
290
|
m += 1;
|
|
277
291
|
const f = m;
|
|
278
|
-
|
|
292
|
+
c.push(
|
|
279
293
|
/* @__PURE__ */ e(
|
|
280
|
-
|
|
294
|
+
Ee,
|
|
281
295
|
{
|
|
282
296
|
x: u.x,
|
|
283
297
|
y: u.y,
|
|
284
298
|
ifOverflow: "visible",
|
|
285
|
-
shape: (y) => /* @__PURE__ */ e(
|
|
299
|
+
shape: (y) => /* @__PURE__ */ e(Ue, { cx: y.cx, cy: y.cy, n: f, ann: u, onEnter: i, onLeave: o })
|
|
286
300
|
},
|
|
287
301
|
`ann-${N}`
|
|
288
302
|
)
|
|
289
303
|
);
|
|
290
304
|
}
|
|
291
|
-
}), { back: x, front:
|
|
292
|
-
}, [t,
|
|
293
|
-
return { back:
|
|
305
|
+
}), { back: x, front: c };
|
|
306
|
+
}, [t, n, o]);
|
|
307
|
+
return { back: r, front: l, hovered: a };
|
|
294
308
|
}
|
|
295
|
-
function
|
|
309
|
+
function X({
|
|
296
310
|
items: t,
|
|
297
|
-
align:
|
|
311
|
+
align: n = "end",
|
|
298
312
|
className: a,
|
|
299
313
|
onToggle: i
|
|
300
314
|
}) {
|
|
301
|
-
const
|
|
315
|
+
const o = {
|
|
302
316
|
start: "justify-start",
|
|
303
317
|
center: "justify-center",
|
|
304
318
|
end: "justify-end"
|
|
305
|
-
}[
|
|
306
|
-
return /* @__PURE__ */ e("div", { className:
|
|
307
|
-
(
|
|
319
|
+
}[n];
|
|
320
|
+
return /* @__PURE__ */ e("div", { className: $("mb-3 flex flex-wrap items-center gap-x-4 gap-y-1", o, a), children: t.map(
|
|
321
|
+
(r) => i && r.key !== void 0 ? /* @__PURE__ */ A(
|
|
308
322
|
"button",
|
|
309
323
|
{
|
|
310
324
|
type: "button",
|
|
311
|
-
"aria-pressed": !
|
|
312
|
-
"aria-label": `Toggle ${
|
|
313
|
-
onClick: () => i(
|
|
314
|
-
className:
|
|
325
|
+
"aria-pressed": !r.hidden,
|
|
326
|
+
"aria-label": `Toggle ${r.label} series`,
|
|
327
|
+
onClick: () => i(r.key),
|
|
328
|
+
className: $(
|
|
315
329
|
"inline-flex cursor-pointer items-center gap-1.5 rounded-sm text-xs outline-none",
|
|
316
330
|
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
317
331
|
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
318
|
-
|
|
332
|
+
r.hidden ? "text-tertiary" : "text-secondary hover:text-foreground"
|
|
319
333
|
),
|
|
320
334
|
children: [
|
|
321
335
|
/* @__PURE__ */ e(
|
|
322
336
|
"span",
|
|
323
337
|
{
|
|
324
338
|
"aria-hidden": !0,
|
|
325
|
-
className:
|
|
339
|
+
className: $(
|
|
326
340
|
"size-2 rounded-dot transition-opacity duration-150 ease-out motion-reduce:transition-none",
|
|
327
|
-
|
|
341
|
+
r.hidden && "opacity-25"
|
|
328
342
|
),
|
|
329
|
-
style: { background:
|
|
343
|
+
style: { background: r.color }
|
|
330
344
|
}
|
|
331
345
|
),
|
|
332
|
-
|
|
346
|
+
r.label
|
|
333
347
|
]
|
|
334
348
|
},
|
|
335
|
-
|
|
349
|
+
r.label
|
|
336
350
|
) : /* @__PURE__ */ A("span", { className: "inline-flex items-center gap-1.5 text-xs text-secondary", children: [
|
|
337
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-2 rounded-dot", style: { background:
|
|
338
|
-
|
|
339
|
-
] },
|
|
351
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-2 rounded-dot", style: { background: r.color } }),
|
|
352
|
+
r.label
|
|
353
|
+
] }, r.label)
|
|
340
354
|
) });
|
|
341
355
|
}
|
|
342
|
-
const z =
|
|
343
|
-
({ className: t, height:
|
|
356
|
+
const z = R.forwardRef(
|
|
357
|
+
({ className: t, height: n, legendItems: a, hovered: i, format: o, onLegendToggle: r, children: l, ...x }, c) => {
|
|
344
358
|
var N;
|
|
345
|
-
const m =
|
|
346
|
-
return /* @__PURE__ */ A("div", { ref: (
|
|
347
|
-
m.current =
|
|
348
|
-
}, className:
|
|
349
|
-
a && /* @__PURE__ */ e(
|
|
350
|
-
/* @__PURE__ */ e(
|
|
351
|
-
/* @__PURE__ */ e(
|
|
359
|
+
const m = R.useRef(null);
|
|
360
|
+
return /* @__PURE__ */ A("div", { ref: (b) => {
|
|
361
|
+
m.current = b, typeof c == "function" ? c(b) : c && (c.current = b);
|
|
362
|
+
}, className: $("relative w-full font-sans", t), ...x, children: [
|
|
363
|
+
a && /* @__PURE__ */ e(X, { items: a, onToggle: r }),
|
|
364
|
+
/* @__PURE__ */ e(_, { width: "100%", height: Math.max(n, I), children: l }),
|
|
365
|
+
/* @__PURE__ */ e(Ye, { hovered: i, frameWidth: ((N = m.current) == null ? void 0 : N.clientWidth) ?? 0, format: o })
|
|
352
366
|
] });
|
|
353
367
|
}
|
|
354
368
|
);
|
|
355
369
|
z.displayName = "ChartFrame";
|
|
356
|
-
function
|
|
370
|
+
function Z(t) {
|
|
357
371
|
const {
|
|
358
|
-
data:
|
|
372
|
+
data: n,
|
|
359
373
|
categoryKey: a,
|
|
360
374
|
series: i,
|
|
361
|
-
seriesLabels:
|
|
362
|
-
highlight:
|
|
363
|
-
annotations:
|
|
375
|
+
seriesLabels: o,
|
|
376
|
+
highlight: r,
|
|
377
|
+
annotations: l,
|
|
364
378
|
grid: x = !1,
|
|
365
|
-
legend:
|
|
379
|
+
legend: c,
|
|
366
380
|
showYAxis: m = !0,
|
|
367
381
|
formatValue: u,
|
|
368
382
|
xScale: N = "category",
|
|
369
|
-
xDomain:
|
|
383
|
+
xDomain: b,
|
|
370
384
|
yDomain: f,
|
|
371
385
|
xTickFormatter: y,
|
|
372
386
|
yTickFormatter: C,
|
|
373
387
|
yAxisWidth: w = 44
|
|
374
|
-
} = t, p =
|
|
388
|
+
} = t, p = R.useMemo(() => i ?? fe(n, a), [i, n, a]), h = u ?? F, k = C ?? ((M) => typeof M == "number" ? h(M) : M), d = ve(l, h), s = (M, B) => r && p.includes(r) ? M === r ? "var(--color-chart-1)" : ne : U(B), g = (M) => (o == null ? void 0 : o[M]) ?? M, [v, S] = R.useState(
|
|
375
389
|
() => /* @__PURE__ */ new Set()
|
|
376
|
-
),
|
|
377
|
-
|
|
378
|
-
const
|
|
379
|
-
return
|
|
390
|
+
), L = R.useCallback((M) => {
|
|
391
|
+
S((B) => {
|
|
392
|
+
const P = new Set(B);
|
|
393
|
+
return P.has(M) ? P.delete(M) : P.add(M), P;
|
|
380
394
|
});
|
|
381
|
-
}, []),
|
|
395
|
+
}, []), H = (M) => v.has(M), Q = c ?? p.length > 1 ? p.map((M, B) => ({
|
|
382
396
|
key: M,
|
|
383
|
-
label:
|
|
384
|
-
color:
|
|
385
|
-
hidden:
|
|
397
|
+
label: g(M),
|
|
398
|
+
color: s(M, B),
|
|
399
|
+
hidden: v.has(M)
|
|
386
400
|
})) : null;
|
|
387
401
|
return {
|
|
388
402
|
names: p,
|
|
389
403
|
format: h,
|
|
390
404
|
layers: d,
|
|
391
|
-
legendItems:
|
|
405
|
+
legendItems: Q,
|
|
392
406
|
furniture: [
|
|
393
407
|
/* Gridlines one step below the border token — guides, not content. */
|
|
394
|
-
x ? /* @__PURE__ */ e(
|
|
408
|
+
x ? /* @__PURE__ */ e(te, { vertical: !1, stroke: "var(--chart-grid)" }, "grid") : null,
|
|
395
409
|
/* @__PURE__ */ e(
|
|
396
|
-
|
|
410
|
+
re,
|
|
397
411
|
{
|
|
398
412
|
dataKey: a,
|
|
399
413
|
type: N === "time" ? "number" : "category",
|
|
400
414
|
scale: N === "time" ? "time" : "auto",
|
|
401
|
-
domain: N === "time" ?
|
|
402
|
-
allowDataOverflow: !!
|
|
415
|
+
domain: N === "time" ? b ?? ["dataMin", "dataMax"] : b,
|
|
416
|
+
allowDataOverflow: !!b,
|
|
403
417
|
axisLine: { stroke: "var(--chart-axis)" },
|
|
404
418
|
tickLine: !1,
|
|
405
419
|
minTickGap: 28,
|
|
@@ -411,7 +425,7 @@ function Y(t) {
|
|
|
411
425
|
"x"
|
|
412
426
|
),
|
|
413
427
|
m ? /* @__PURE__ */ e(
|
|
414
|
-
|
|
428
|
+
V,
|
|
415
429
|
{
|
|
416
430
|
width: w,
|
|
417
431
|
domain: f,
|
|
@@ -419,62 +433,62 @@ function Y(t) {
|
|
|
419
433
|
axisLine: { stroke: "var(--chart-axis)" },
|
|
420
434
|
tickLine: !1,
|
|
421
435
|
tickMargin: 12,
|
|
422
|
-
tick: /* @__PURE__ */ e(D, { anchor: "end", dy: "0.32em", format:
|
|
436
|
+
tick: /* @__PURE__ */ e(D, { anchor: "end", dy: "0.32em", format: k })
|
|
423
437
|
},
|
|
424
438
|
"y"
|
|
425
439
|
) : null
|
|
426
440
|
],
|
|
427
|
-
colorFor:
|
|
428
|
-
labelFor:
|
|
429
|
-
toggleSeries:
|
|
430
|
-
isHidden:
|
|
441
|
+
colorFor: s,
|
|
442
|
+
labelFor: g,
|
|
443
|
+
toggleSeries: L,
|
|
444
|
+
isHidden: H
|
|
431
445
|
};
|
|
432
446
|
}
|
|
433
|
-
const I = 300,
|
|
434
|
-
function
|
|
447
|
+
const I = 300, j = { top: 24, right: 12, bottom: 8, left: 0 };
|
|
448
|
+
function ae(t, n, a, i) {
|
|
435
449
|
if (i === !0) return new Set(t);
|
|
436
450
|
if (i === !1) return /* @__PURE__ */ new Set();
|
|
437
451
|
if (a && t.includes(a)) {
|
|
438
|
-
const
|
|
439
|
-
return /* @__PURE__ */ new Set([a, ...
|
|
452
|
+
const r = (n ?? []).filter((l) => l !== a);
|
|
453
|
+
return /* @__PURE__ */ new Set([a, ...r]);
|
|
440
454
|
}
|
|
441
|
-
return t.filter((
|
|
455
|
+
return t.filter((r) => !(n != null && n.includes(r))).length === 1 ? new Set(t) : /* @__PURE__ */ new Set();
|
|
442
456
|
}
|
|
443
|
-
function
|
|
444
|
-
return
|
|
445
|
-
(i,
|
|
446
|
-
if (!(
|
|
447
|
-
const
|
|
448
|
-
return
|
|
457
|
+
function ge(t, n, a) {
|
|
458
|
+
return R.useCallback(
|
|
459
|
+
(i, o) => {
|
|
460
|
+
if (!(n != null && n.includes(i))) return a(i, o);
|
|
461
|
+
const r = t.filter((x) => !n.includes(x)), l = r[n.indexOf(i)] ?? r[0];
|
|
462
|
+
return l ? a(l, t.indexOf(l)) : a(i, o);
|
|
449
463
|
},
|
|
450
|
-
[t,
|
|
464
|
+
[t, n, a]
|
|
451
465
|
);
|
|
452
466
|
}
|
|
453
|
-
const
|
|
467
|
+
const Xe = R.forwardRef(
|
|
454
468
|
// Straight segments by default: the house line is a solid stroke with a DOT
|
|
455
469
|
// at every observation — the data points are visible, the path connects them
|
|
456
470
|
// without inventing values between them.
|
|
457
471
|
// A smooth curve invents values between observations; opt back in with
|
|
458
472
|
// `curve="natural"` when the interpolation is the point.
|
|
459
|
-
({ height: t = I, curve:
|
|
460
|
-
const { names:
|
|
461
|
-
return /* @__PURE__ */ e(z, { ref: x, className:
|
|
462
|
-
|
|
473
|
+
({ height: t = I, curve: n = "linear", forecastKeys: a, animatedSeriesKeys: i, showValues: o, className: r, ...l }, x) => {
|
|
474
|
+
const { names: c, format: m, layers: u, legendItems: N, furniture: b, colorFor: f, labelFor: y, toggleSeries: C, isHidden: w } = Z(l), p = ge(c, a, f), h = ae(c, a, l.highlight, o), [k, d] = R.useState(null);
|
|
475
|
+
return /* @__PURE__ */ e(z, { ref: x, className: r, height: t, legendItems: N, hovered: u.hovered, format: m, onLegendToggle: C, children: /* @__PURE__ */ A(
|
|
476
|
+
pe,
|
|
463
477
|
{
|
|
464
|
-
data:
|
|
465
|
-
margin:
|
|
466
|
-
onMouseMove: (
|
|
478
|
+
data: l.data,
|
|
479
|
+
margin: j,
|
|
480
|
+
onMouseMove: (s) => d((s == null ? void 0 : s.activeTooltipIndex) ?? null),
|
|
467
481
|
onMouseLeave: () => d(null),
|
|
468
482
|
children: [
|
|
469
|
-
|
|
470
|
-
|
|
483
|
+
b,
|
|
484
|
+
l.tooltip !== !1 && /* @__PURE__ */ e(
|
|
471
485
|
O,
|
|
472
486
|
{
|
|
473
487
|
content: /* @__PURE__ */ e(
|
|
474
488
|
T,
|
|
475
489
|
{
|
|
476
490
|
format: m,
|
|
477
|
-
renderer:
|
|
491
|
+
renderer: l.tooltip
|
|
478
492
|
}
|
|
479
493
|
),
|
|
480
494
|
cursor: { stroke: "var(--border-strong)" },
|
|
@@ -482,22 +496,29 @@ const Ue = k.forwardRef(
|
|
|
482
496
|
}
|
|
483
497
|
),
|
|
484
498
|
u.back,
|
|
485
|
-
|
|
486
|
-
|
|
499
|
+
c.map((s, g) => /* @__PURE__ */ e(
|
|
500
|
+
se,
|
|
487
501
|
{
|
|
488
|
-
dataKey:
|
|
489
|
-
name: y(
|
|
490
|
-
type:
|
|
491
|
-
stroke: p(
|
|
492
|
-
strokeWidth:
|
|
493
|
-
strokeDasharray: a != null && a.includes(
|
|
494
|
-
dot:
|
|
495
|
-
activeDot: /* @__PURE__ */ e(
|
|
496
|
-
label: h.has(
|
|
497
|
-
|
|
498
|
-
|
|
502
|
+
dataKey: s,
|
|
503
|
+
name: y(s),
|
|
504
|
+
type: n,
|
|
505
|
+
stroke: p(s, g),
|
|
506
|
+
strokeWidth: Y,
|
|
507
|
+
strokeDasharray: a != null && a.includes(s) ? "6 4" : void 0,
|
|
508
|
+
dot: /* @__PURE__ */ e(E, { color: p(s, g) }),
|
|
509
|
+
activeDot: /* @__PURE__ */ e(E, { color: p(s, g), active: !0 }),
|
|
510
|
+
label: h.has(s) ? /* @__PURE__ */ e(
|
|
511
|
+
he,
|
|
512
|
+
{
|
|
513
|
+
color: p(s, g),
|
|
514
|
+
format: m,
|
|
515
|
+
hidden: k != null
|
|
516
|
+
}
|
|
517
|
+
) : void 0,
|
|
518
|
+
hide: w(s),
|
|
519
|
+
isAnimationActive: (i == null ? void 0 : i.includes(s)) ?? !1
|
|
499
520
|
},
|
|
500
|
-
|
|
521
|
+
s
|
|
501
522
|
)),
|
|
502
523
|
u.front
|
|
503
524
|
]
|
|
@@ -505,31 +526,31 @@ const Ue = k.forwardRef(
|
|
|
505
526
|
) });
|
|
506
527
|
}
|
|
507
528
|
);
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
({ height: t = I, curve:
|
|
511
|
-
const { names:
|
|
512
|
-
return /* @__PURE__ */ e(z, { ref: x, className:
|
|
513
|
-
|
|
529
|
+
Xe.displayName = "LineChart";
|
|
530
|
+
const Ze = R.forwardRef(
|
|
531
|
+
({ height: t = I, curve: n = "linear", stacked: a = !1, forecastKeys: i, showValues: o, className: r, ...l }, x) => {
|
|
532
|
+
const { names: c, format: m, layers: u, legendItems: N, furniture: b, colorFor: f, labelFor: y, toggleSeries: C, isHidden: w } = Z(l), p = ge(c, i, f), h = a ? /* @__PURE__ */ new Set() : ae(c, i, l.highlight, o), [k, d] = R.useState(null), s = R.useId().replace(/[^a-zA-Z0-9]/g, "");
|
|
533
|
+
return /* @__PURE__ */ e(z, { ref: x, className: r, height: t, legendItems: N, hovered: u.hovered, format: m, onLegendToggle: C, children: /* @__PURE__ */ A(
|
|
534
|
+
Ne,
|
|
514
535
|
{
|
|
515
|
-
data:
|
|
516
|
-
margin:
|
|
517
|
-
onMouseMove: (
|
|
536
|
+
data: l.data,
|
|
537
|
+
margin: j,
|
|
538
|
+
onMouseMove: (g) => d((g == null ? void 0 : g.activeTooltipIndex) ?? null),
|
|
518
539
|
onMouseLeave: () => d(null),
|
|
519
540
|
children: [
|
|
520
|
-
/* @__PURE__ */ e("defs", { children:
|
|
521
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: f(
|
|
522
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: f(
|
|
523
|
-
] },
|
|
524
|
-
|
|
525
|
-
|
|
541
|
+
/* @__PURE__ */ e("defs", { children: c.map((g, v) => /* @__PURE__ */ A("linearGradient", { id: `${s}-${v}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
542
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: f(g, v), stopOpacity: 0.18 }),
|
|
543
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: f(g, v), stopOpacity: 0.02 })
|
|
544
|
+
] }, g)) }),
|
|
545
|
+
b,
|
|
546
|
+
l.tooltip !== !1 && /* @__PURE__ */ e(
|
|
526
547
|
O,
|
|
527
548
|
{
|
|
528
549
|
content: /* @__PURE__ */ e(
|
|
529
550
|
T,
|
|
530
551
|
{
|
|
531
552
|
format: m,
|
|
532
|
-
renderer:
|
|
553
|
+
renderer: l.tooltip
|
|
533
554
|
}
|
|
534
555
|
),
|
|
535
556
|
cursor: { stroke: "var(--border-strong)" },
|
|
@@ -537,24 +558,24 @@ const Ve = k.forwardRef(
|
|
|
537
558
|
}
|
|
538
559
|
),
|
|
539
560
|
u.back,
|
|
540
|
-
|
|
541
|
-
|
|
561
|
+
c.map((g, v) => /* @__PURE__ */ e(
|
|
562
|
+
we,
|
|
542
563
|
{
|
|
543
|
-
dataKey:
|
|
544
|
-
name: y(
|
|
545
|
-
type:
|
|
564
|
+
dataKey: g,
|
|
565
|
+
name: y(g),
|
|
566
|
+
type: n,
|
|
546
567
|
stackId: a ? "stack" : void 0,
|
|
547
|
-
stroke: p(
|
|
548
|
-
strokeWidth:
|
|
549
|
-
strokeDasharray: i != null && i.includes(
|
|
550
|
-
fill: `url(#${
|
|
551
|
-
dot:
|
|
552
|
-
activeDot: /* @__PURE__ */ e(
|
|
553
|
-
label: h.has(
|
|
554
|
-
hide: w(
|
|
568
|
+
stroke: p(g, v),
|
|
569
|
+
strokeWidth: Y,
|
|
570
|
+
strokeDasharray: i != null && i.includes(g) ? "6 4" : void 0,
|
|
571
|
+
fill: `url(#${s}-${v})`,
|
|
572
|
+
dot: /* @__PURE__ */ e(E, { color: p(g, v) }),
|
|
573
|
+
activeDot: /* @__PURE__ */ e(E, { color: p(g, v), active: !0 }),
|
|
574
|
+
label: h.has(g) ? /* @__PURE__ */ e(he, { color: p(g, v), format: m, hidden: k != null }) : void 0,
|
|
575
|
+
hide: w(g),
|
|
555
576
|
isAnimationActive: !1
|
|
556
577
|
},
|
|
557
|
-
|
|
578
|
+
g
|
|
558
579
|
)),
|
|
559
580
|
u.front
|
|
560
581
|
]
|
|
@@ -562,19 +583,19 @@ const Ve = k.forwardRef(
|
|
|
562
583
|
) });
|
|
563
584
|
}
|
|
564
585
|
);
|
|
565
|
-
|
|
566
|
-
const
|
|
586
|
+
Ze.displayName = "AreaChart";
|
|
587
|
+
const Qe = R.forwardRef(
|
|
567
588
|
({
|
|
568
589
|
height: t = I,
|
|
569
|
-
stacked:
|
|
590
|
+
stacked: n = !1,
|
|
570
591
|
layout: a = "vertical",
|
|
571
592
|
showValues: i,
|
|
572
|
-
className:
|
|
573
|
-
...
|
|
574
|
-
},
|
|
575
|
-
const { names: x, format:
|
|
576
|
-
|
|
577
|
-
|
|
593
|
+
className: o,
|
|
594
|
+
...r
|
|
595
|
+
}, l) => {
|
|
596
|
+
const { names: x, format: c, layers: m, legendItems: u, furniture: N, colorFor: b, labelFor: f, toggleSeries: y, isHidden: C } = Z(r), w = a === "horizontal", p = n ? /* @__PURE__ */ new Set() : ae(x, void 0, r.highlight, i), h = r.xTickFormatter ?? ((s) => typeof s == "number" ? c(s) : s), k = [
|
|
597
|
+
r.grid !== !1 ? /* @__PURE__ */ e(
|
|
598
|
+
te,
|
|
578
599
|
{
|
|
579
600
|
horizontal: !1,
|
|
580
601
|
vertical: !0,
|
|
@@ -583,11 +604,11 @@ const Ye = k.forwardRef(
|
|
|
583
604
|
"grid"
|
|
584
605
|
) : null,
|
|
585
606
|
/* @__PURE__ */ e(
|
|
586
|
-
|
|
607
|
+
re,
|
|
587
608
|
{
|
|
588
609
|
type: "number",
|
|
589
|
-
domain:
|
|
590
|
-
allowDataOverflow: !!
|
|
610
|
+
domain: r.xDomain,
|
|
611
|
+
allowDataOverflow: !!r.xDomain,
|
|
591
612
|
axisLine: !1,
|
|
592
613
|
tickLine: !1,
|
|
593
614
|
minTickGap: 28,
|
|
@@ -596,12 +617,12 @@ const Ye = k.forwardRef(
|
|
|
596
617
|
},
|
|
597
618
|
"x"
|
|
598
619
|
),
|
|
599
|
-
|
|
600
|
-
|
|
620
|
+
r.showYAxis !== !1 ? /* @__PURE__ */ e(
|
|
621
|
+
V,
|
|
601
622
|
{
|
|
602
623
|
type: "category",
|
|
603
|
-
dataKey:
|
|
604
|
-
width:
|
|
624
|
+
dataKey: r.categoryKey,
|
|
625
|
+
width: r.yAxisWidth ?? 144,
|
|
605
626
|
axisLine: !1,
|
|
606
627
|
tickLine: !1,
|
|
607
628
|
tickMargin: 6,
|
|
@@ -610,30 +631,30 @@ const Ye = k.forwardRef(
|
|
|
610
631
|
{
|
|
611
632
|
anchor: "end",
|
|
612
633
|
dy: "0.32em",
|
|
613
|
-
format:
|
|
634
|
+
format: r.yTickFormatter
|
|
614
635
|
}
|
|
615
636
|
)
|
|
616
637
|
},
|
|
617
638
|
"y"
|
|
618
639
|
) : null
|
|
619
|
-
], d =
|
|
620
|
-
return /* @__PURE__ */ e(z, { ref:
|
|
621
|
-
|
|
640
|
+
], d = r.highlight && x.length === 1 && !x.includes(r.highlight) ? r.highlight : null;
|
|
641
|
+
return /* @__PURE__ */ e(z, { ref: l, className: o, height: t, legendItems: u, hovered: m.hovered, format: c, onLegendToggle: y, children: /* @__PURE__ */ A(
|
|
642
|
+
Ae,
|
|
622
643
|
{
|
|
623
|
-
data:
|
|
644
|
+
data: r.data,
|
|
624
645
|
layout: w ? "vertical" : "horizontal",
|
|
625
|
-
margin:
|
|
646
|
+
margin: j,
|
|
626
647
|
barCategoryGap: "24%",
|
|
627
648
|
children: [
|
|
628
|
-
w ?
|
|
629
|
-
|
|
649
|
+
w ? k : N,
|
|
650
|
+
r.tooltip !== !1 && /* @__PURE__ */ e(
|
|
630
651
|
O,
|
|
631
652
|
{
|
|
632
653
|
content: /* @__PURE__ */ e(
|
|
633
654
|
T,
|
|
634
655
|
{
|
|
635
|
-
format:
|
|
636
|
-
renderer:
|
|
656
|
+
format: c,
|
|
657
|
+
renderer: r.tooltip
|
|
637
658
|
}
|
|
638
659
|
),
|
|
639
660
|
cursor: { fill: "var(--muted)" },
|
|
@@ -641,29 +662,30 @@ const Ye = k.forwardRef(
|
|
|
641
662
|
}
|
|
642
663
|
),
|
|
643
664
|
m.back,
|
|
644
|
-
x.map((
|
|
645
|
-
const
|
|
665
|
+
x.map((s, g) => {
|
|
666
|
+
const v = n ? g === x.length - 1 : !0, S = w ? [0, 4, 4, 0] : [4, 4, 0, 0];
|
|
646
667
|
return /* @__PURE__ */ e(
|
|
647
|
-
|
|
668
|
+
ce,
|
|
648
669
|
{
|
|
649
|
-
dataKey:
|
|
650
|
-
name: f(
|
|
651
|
-
stackId:
|
|
652
|
-
fill:
|
|
653
|
-
|
|
670
|
+
dataKey: s,
|
|
671
|
+
name: f(s),
|
|
672
|
+
stackId: n ? "stack" : void 0,
|
|
673
|
+
fill: b(s, g),
|
|
674
|
+
activeBar: me,
|
|
675
|
+
radius: v ? S : 0,
|
|
654
676
|
maxBarSize: 48,
|
|
655
|
-
label: p.has(
|
|
656
|
-
hide: C(
|
|
677
|
+
label: p.has(s) ? /* @__PURE__ */ e(Pe, { format: c, horizontal: w }) : void 0,
|
|
678
|
+
hide: C(s),
|
|
657
679
|
isAnimationActive: !1,
|
|
658
|
-
children: d &&
|
|
659
|
-
|
|
680
|
+
children: d && r.data.map((L) => /* @__PURE__ */ e(
|
|
681
|
+
de,
|
|
660
682
|
{
|
|
661
|
-
fill:
|
|
683
|
+
fill: L[r.categoryKey] === d ? "var(--color-chart-1)" : ne
|
|
662
684
|
},
|
|
663
|
-
String(
|
|
685
|
+
String(L[r.categoryKey])
|
|
664
686
|
))
|
|
665
687
|
},
|
|
666
|
-
|
|
688
|
+
s
|
|
667
689
|
);
|
|
668
690
|
}),
|
|
669
691
|
m.front
|
|
@@ -672,27 +694,27 @@ const Ye = k.forwardRef(
|
|
|
672
694
|
) });
|
|
673
695
|
}
|
|
674
696
|
);
|
|
675
|
-
|
|
676
|
-
const
|
|
677
|
-
({ height: t = I, lineKeys:
|
|
678
|
-
const { names:
|
|
697
|
+
Qe.displayName = "BarChart";
|
|
698
|
+
const be = R.forwardRef(
|
|
699
|
+
({ height: t = I, lineKeys: n, dualAxis: a = !1, stacked: i = !1, forecastKeys: o, className: r, ...l }, x) => {
|
|
700
|
+
const { names: c, format: m, layers: u, furniture: N, colorFor: b, labelFor: f, toggleSeries: y, isHidden: C } = Z(l), w = c.filter((d) => !n.includes(d)), p = (d, s) => n.length ? "var(--chart-axis)" : b(d, s), h = (d, s) => n.length ? "var(--color-chart-1)" : b(d, s), k = c.length > 1 ? [
|
|
679
701
|
...w.map((d) => ({
|
|
680
702
|
key: d,
|
|
681
703
|
label: f(d),
|
|
682
|
-
color: p(d,
|
|
704
|
+
color: p(d, c.indexOf(d)),
|
|
683
705
|
hidden: C(d)
|
|
684
706
|
})),
|
|
685
|
-
...
|
|
707
|
+
...n.map((d) => ({
|
|
686
708
|
key: d,
|
|
687
709
|
label: f(d),
|
|
688
|
-
color: h(d,
|
|
710
|
+
color: h(d, c.indexOf(d)),
|
|
689
711
|
hidden: C(d)
|
|
690
712
|
}))
|
|
691
713
|
] : null;
|
|
692
|
-
return /* @__PURE__ */ e(z, { ref: x, className:
|
|
714
|
+
return /* @__PURE__ */ e(z, { ref: x, className: r, height: t, legendItems: k, hovered: u.hovered, format: m, onLegendToggle: y, children: /* @__PURE__ */ A(Ce, { data: l.data, margin: j, barCategoryGap: "24%", children: [
|
|
693
715
|
N,
|
|
694
716
|
a && /* @__PURE__ */ e(
|
|
695
|
-
|
|
717
|
+
V,
|
|
696
718
|
{
|
|
697
719
|
yAxisId: "right",
|
|
698
720
|
orientation: "right",
|
|
@@ -710,14 +732,14 @@ const ge = k.forwardRef(
|
|
|
710
732
|
)
|
|
711
733
|
}
|
|
712
734
|
),
|
|
713
|
-
|
|
735
|
+
l.tooltip !== !1 && /* @__PURE__ */ e(
|
|
714
736
|
O,
|
|
715
737
|
{
|
|
716
738
|
content: /* @__PURE__ */ e(
|
|
717
739
|
T,
|
|
718
740
|
{
|
|
719
741
|
format: m,
|
|
720
|
-
renderer:
|
|
742
|
+
renderer: l.tooltip
|
|
721
743
|
}
|
|
722
744
|
),
|
|
723
745
|
cursor: { fill: "var(--muted)" },
|
|
@@ -726,15 +748,16 @@ const ge = k.forwardRef(
|
|
|
726
748
|
),
|
|
727
749
|
u.back,
|
|
728
750
|
w.map((d) => {
|
|
729
|
-
const
|
|
751
|
+
const s = c.indexOf(d), g = i ? d === w[w.length - 1] : !0;
|
|
730
752
|
return /* @__PURE__ */ e(
|
|
731
|
-
|
|
753
|
+
ce,
|
|
732
754
|
{
|
|
733
755
|
dataKey: d,
|
|
734
756
|
name: f(d),
|
|
735
757
|
stackId: i ? "stack" : void 0,
|
|
736
|
-
fill: p(d,
|
|
737
|
-
|
|
758
|
+
fill: p(d, s),
|
|
759
|
+
activeBar: me,
|
|
760
|
+
radius: g ? [4, 4, 0, 0] : 0,
|
|
738
761
|
maxBarSize: 48,
|
|
739
762
|
hide: C(d),
|
|
740
763
|
isAnimationActive: !1
|
|
@@ -742,20 +765,20 @@ const ge = k.forwardRef(
|
|
|
742
765
|
d
|
|
743
766
|
);
|
|
744
767
|
}),
|
|
745
|
-
|
|
746
|
-
const
|
|
768
|
+
n.map((d) => {
|
|
769
|
+
const s = c.indexOf(d);
|
|
747
770
|
return /* @__PURE__ */ e(
|
|
748
|
-
|
|
771
|
+
se,
|
|
749
772
|
{
|
|
750
773
|
dataKey: d,
|
|
751
774
|
name: f(d),
|
|
752
775
|
yAxisId: a ? "right" : void 0,
|
|
753
776
|
type: "linear",
|
|
754
|
-
stroke: h(d,
|
|
755
|
-
strokeWidth:
|
|
756
|
-
strokeDasharray:
|
|
757
|
-
dot:
|
|
758
|
-
activeDot: /* @__PURE__ */ e(
|
|
777
|
+
stroke: h(d, s),
|
|
778
|
+
strokeWidth: Y,
|
|
779
|
+
strokeDasharray: o != null && o.includes(d) ? "6 4" : void 0,
|
|
780
|
+
dot: /* @__PURE__ */ e(E, { color: h(d, s) }),
|
|
781
|
+
activeDot: /* @__PURE__ */ e(E, { color: h(d, s), active: !0 }),
|
|
759
782
|
hide: C(d),
|
|
760
783
|
isAnimationActive: !1
|
|
761
784
|
},
|
|
@@ -766,39 +789,39 @@ const ge = k.forwardRef(
|
|
|
766
789
|
] }) });
|
|
767
790
|
}
|
|
768
791
|
);
|
|
769
|
-
|
|
770
|
-
const
|
|
771
|
-
(t,
|
|
792
|
+
be.displayName = "ComboChart";
|
|
793
|
+
const qe = R.forwardRef(
|
|
794
|
+
(t, n) => /* @__PURE__ */ e(be, { ref: n, ...t })
|
|
772
795
|
);
|
|
773
|
-
|
|
774
|
-
const
|
|
796
|
+
qe.displayName = "ComposedChart";
|
|
797
|
+
const Je = R.forwardRef(
|
|
775
798
|
({
|
|
776
799
|
data: t,
|
|
777
|
-
xKey:
|
|
800
|
+
xKey: n,
|
|
778
801
|
yKey: a,
|
|
779
802
|
labelKey: i,
|
|
780
|
-
annotations:
|
|
781
|
-
height:
|
|
782
|
-
grid:
|
|
803
|
+
annotations: o,
|
|
804
|
+
height: r = I,
|
|
805
|
+
grid: l = !1,
|
|
783
806
|
showYAxis: x = !0,
|
|
784
|
-
formatValue:
|
|
807
|
+
formatValue: c,
|
|
785
808
|
xScale: m = "number",
|
|
786
809
|
xDomain: u,
|
|
787
810
|
yDomain: N,
|
|
788
|
-
xTickFormatter:
|
|
811
|
+
xTickFormatter: b,
|
|
789
812
|
yTickFormatter: f,
|
|
790
813
|
yAxisWidth: y = 44,
|
|
791
814
|
tooltip: C,
|
|
792
815
|
className: w
|
|
793
816
|
}, p) => {
|
|
794
|
-
const h =
|
|
795
|
-
return /* @__PURE__ */ e(z, { ref: p, className: w, height:
|
|
796
|
-
|
|
817
|
+
const h = c ?? F, k = b ?? ((g) => typeof g == "number" ? F(g) : g), d = f ?? ((g) => typeof g == "number" ? h(g) : g), s = ve(o, h);
|
|
818
|
+
return /* @__PURE__ */ e(z, { ref: p, className: w, height: r, legendItems: null, hovered: s.hovered, format: h, children: /* @__PURE__ */ A(ye, { margin: j, children: [
|
|
819
|
+
l && /* @__PURE__ */ e(te, { vertical: !1, stroke: "var(--chart-grid)" }),
|
|
797
820
|
/* @__PURE__ */ e(
|
|
798
|
-
|
|
821
|
+
re,
|
|
799
822
|
{
|
|
800
823
|
type: "number",
|
|
801
|
-
dataKey:
|
|
824
|
+
dataKey: n,
|
|
802
825
|
scale: m === "time" ? "time" : "auto",
|
|
803
826
|
domain: u ?? (m === "time" ? ["dataMin", "dataMax"] : ["auto", "auto"]),
|
|
804
827
|
allowDataOverflow: !!u,
|
|
@@ -806,11 +829,11 @@ const Ze = k.forwardRef(
|
|
|
806
829
|
tickLine: !1,
|
|
807
830
|
minTickGap: 28,
|
|
808
831
|
tickMargin: 10,
|
|
809
|
-
tick: /* @__PURE__ */ e(D, { anchor: "middle", dy: 0, format:
|
|
832
|
+
tick: /* @__PURE__ */ e(D, { anchor: "middle", dy: 0, format: k })
|
|
810
833
|
}
|
|
811
834
|
),
|
|
812
835
|
x && /* @__PURE__ */ e(
|
|
813
|
-
|
|
836
|
+
V,
|
|
814
837
|
{
|
|
815
838
|
type: "number",
|
|
816
839
|
dataKey: a,
|
|
@@ -838,50 +861,50 @@ const Ze = k.forwardRef(
|
|
|
838
861
|
isAnimationActive: !1
|
|
839
862
|
}
|
|
840
863
|
),
|
|
841
|
-
|
|
864
|
+
s.back,
|
|
842
865
|
/* @__PURE__ */ e(
|
|
843
|
-
|
|
866
|
+
Re,
|
|
844
867
|
{
|
|
845
868
|
data: t,
|
|
846
869
|
fill: "var(--color-chart-1)",
|
|
847
|
-
shape: (
|
|
870
|
+
shape: (g) => /* @__PURE__ */ e("circle", { cx: g.cx, cy: g.cy, r: 4.5, fill: "var(--color-chart-1)", fillOpacity: 0.75 }),
|
|
848
871
|
isAnimationActive: !1
|
|
849
872
|
}
|
|
850
873
|
),
|
|
851
|
-
|
|
874
|
+
s.front
|
|
852
875
|
] }) });
|
|
853
876
|
}
|
|
854
877
|
);
|
|
855
|
-
|
|
856
|
-
const
|
|
878
|
+
Je.displayName = "ScatterChart";
|
|
879
|
+
const Ke = R.forwardRef(
|
|
857
880
|
({
|
|
858
881
|
data: t,
|
|
859
|
-
nameKey:
|
|
882
|
+
nameKey: n,
|
|
860
883
|
valueKey: a,
|
|
861
884
|
donut: i = !0,
|
|
862
|
-
centerLabel:
|
|
863
|
-
highlight:
|
|
864
|
-
height:
|
|
885
|
+
centerLabel: o,
|
|
886
|
+
highlight: r,
|
|
887
|
+
height: l = 260,
|
|
865
888
|
legend: x = !0,
|
|
866
|
-
formatValue:
|
|
889
|
+
formatValue: c,
|
|
867
890
|
tooltip: m,
|
|
868
891
|
className: u
|
|
869
892
|
}, N) => {
|
|
870
|
-
const
|
|
871
|
-
label: `${p[
|
|
872
|
-
color: y(String(p[
|
|
893
|
+
const b = c ?? F, f = t.reduce((p, h) => p + (typeof h[a] == "number" ? h[a] : 0), 0), y = (p, h) => U(h), C = (p) => r && p !== r ? 0.3 : 1, w = x ? t.map((p, h) => ({
|
|
894
|
+
label: `${p[n]} · ${f ? Math.round(Number(p[a]) / f * 100) : 0}%`,
|
|
895
|
+
color: y(String(p[n]), h)
|
|
873
896
|
})) : null;
|
|
874
|
-
return /* @__PURE__ */ A("div", { ref: N, className:
|
|
875
|
-
w && /* @__PURE__ */ e(
|
|
897
|
+
return /* @__PURE__ */ A("div", { ref: N, className: $("relative w-full font-sans", u), children: [
|
|
898
|
+
w && /* @__PURE__ */ e(X, { items: w }),
|
|
876
899
|
/* @__PURE__ */ A("div", { className: "relative", children: [
|
|
877
|
-
/* @__PURE__ */ e(
|
|
900
|
+
/* @__PURE__ */ e(_, { width: "100%", height: l, children: /* @__PURE__ */ A(ke, { margin: { top: 8, right: 8, bottom: 8, left: 8 }, children: [
|
|
878
901
|
m !== !1 && /* @__PURE__ */ e(
|
|
879
902
|
O,
|
|
880
903
|
{
|
|
881
904
|
content: /* @__PURE__ */ e(
|
|
882
905
|
T,
|
|
883
906
|
{
|
|
884
|
-
format:
|
|
907
|
+
format: b,
|
|
885
908
|
renderer: m
|
|
886
909
|
}
|
|
887
910
|
),
|
|
@@ -889,11 +912,11 @@ const Qe = k.forwardRef(
|
|
|
889
912
|
}
|
|
890
913
|
),
|
|
891
914
|
/* @__PURE__ */ e(
|
|
892
|
-
|
|
915
|
+
Me,
|
|
893
916
|
{
|
|
894
917
|
data: t,
|
|
895
918
|
dataKey: a,
|
|
896
|
-
nameKey:
|
|
919
|
+
nameKey: n,
|
|
897
920
|
innerRadius: i ? "62%" : 0,
|
|
898
921
|
outerRadius: "88%",
|
|
899
922
|
paddingAngle: i ? 2 : 1,
|
|
@@ -901,56 +924,56 @@ const Qe = k.forwardRef(
|
|
|
901
924
|
stroke: "none",
|
|
902
925
|
isAnimationActive: !1,
|
|
903
926
|
children: t.map((p, h) => /* @__PURE__ */ e(
|
|
904
|
-
|
|
927
|
+
de,
|
|
905
928
|
{
|
|
906
929
|
role: "presentation",
|
|
907
930
|
"aria-hidden": "true",
|
|
908
|
-
fill: y(String(p[
|
|
909
|
-
fillOpacity: C(String(p[
|
|
931
|
+
fill: y(String(p[n]), h),
|
|
932
|
+
fillOpacity: C(String(p[n]))
|
|
910
933
|
},
|
|
911
|
-
String(p[
|
|
934
|
+
String(p[n])
|
|
912
935
|
))
|
|
913
936
|
}
|
|
914
937
|
)
|
|
915
938
|
] }) }),
|
|
916
939
|
i && /* @__PURE__ */ A("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
917
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children:
|
|
918
|
-
|
|
940
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: b(f) }),
|
|
941
|
+
o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
|
|
919
942
|
] })
|
|
920
943
|
] })
|
|
921
944
|
] });
|
|
922
945
|
}
|
|
923
946
|
);
|
|
924
|
-
|
|
925
|
-
const
|
|
947
|
+
Ke.displayName = "PieChart";
|
|
948
|
+
const et = R.forwardRef(
|
|
926
949
|
({
|
|
927
950
|
data: t,
|
|
928
|
-
categoryKey:
|
|
951
|
+
categoryKey: n,
|
|
929
952
|
series: a,
|
|
930
953
|
seriesLabels: i,
|
|
931
|
-
highlight:
|
|
932
|
-
maxValue:
|
|
933
|
-
height:
|
|
954
|
+
highlight: o,
|
|
955
|
+
maxValue: r,
|
|
956
|
+
height: l = 300,
|
|
934
957
|
legend: x,
|
|
935
|
-
formatValue:
|
|
958
|
+
formatValue: c,
|
|
936
959
|
tooltip: m,
|
|
937
960
|
className: u
|
|
938
961
|
}, N) => {
|
|
939
|
-
const
|
|
940
|
-
() => a ??
|
|
941
|
-
[
|
|
942
|
-
), f =
|
|
962
|
+
const b = R.useMemo(
|
|
963
|
+
() => a ?? fe(t, n),
|
|
964
|
+
[n, t, a]
|
|
965
|
+
), f = c ?? F, y = r ?? Math.max(
|
|
943
966
|
1,
|
|
944
967
|
...t.flatMap(
|
|
945
|
-
(h) =>
|
|
946
|
-
(
|
|
968
|
+
(h) => b.map(
|
|
969
|
+
(k) => typeof h[k] == "number" ? h[k] : 0
|
|
947
970
|
)
|
|
948
971
|
)
|
|
949
|
-
), C = (h) => (i == null ? void 0 : i[h]) ?? h, w = (h,
|
|
950
|
-
return /* @__PURE__ */ A("div", { ref: N, className:
|
|
951
|
-
p && /* @__PURE__ */ e(
|
|
952
|
-
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(
|
|
953
|
-
|
|
972
|
+
), C = (h) => (i == null ? void 0 : i[h]) ?? h, w = (h, k) => o && b.includes(o) ? h === o ? "var(--color-chart-1)" : ne : U(k), p = x ?? b.length > 1 ? b.map((h, k) => ({ label: C(h), color: w(h, k) })) : null;
|
|
973
|
+
return /* @__PURE__ */ A("div", { ref: N, className: $("relative w-full font-sans", u), children: [
|
|
974
|
+
p && /* @__PURE__ */ e(X, { items: p, align: "center" }),
|
|
975
|
+
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(_, { width: "100%", height: l, children: /* @__PURE__ */ A(
|
|
976
|
+
$e,
|
|
954
977
|
{
|
|
955
978
|
data: t,
|
|
956
979
|
cx: "50%",
|
|
@@ -958,16 +981,16 @@ const qe = k.forwardRef(
|
|
|
958
981
|
outerRadius: "68%",
|
|
959
982
|
margin: { top: 10, right: 56, bottom: 16, left: 56 },
|
|
960
983
|
children: [
|
|
961
|
-
/* @__PURE__ */ e(
|
|
984
|
+
/* @__PURE__ */ e(Se, { stroke: "var(--border)", radialLines: !0 }),
|
|
962
985
|
/* @__PURE__ */ e(
|
|
963
|
-
|
|
986
|
+
ue,
|
|
964
987
|
{
|
|
965
|
-
dataKey:
|
|
988
|
+
dataKey: n,
|
|
966
989
|
tick: { fill: "var(--text-secondary)", fontSize: 11, fontWeight: 500 }
|
|
967
990
|
}
|
|
968
991
|
),
|
|
969
992
|
/* @__PURE__ */ e(
|
|
970
|
-
|
|
993
|
+
Le,
|
|
971
994
|
{
|
|
972
995
|
angle: 90,
|
|
973
996
|
domain: [0, y],
|
|
@@ -989,16 +1012,16 @@ const qe = k.forwardRef(
|
|
|
989
1012
|
isAnimationActive: !1
|
|
990
1013
|
}
|
|
991
1014
|
),
|
|
992
|
-
|
|
993
|
-
|
|
1015
|
+
b.map((h, k) => /* @__PURE__ */ e(
|
|
1016
|
+
Fe,
|
|
994
1017
|
{
|
|
995
1018
|
dataKey: h,
|
|
996
1019
|
name: C(h),
|
|
997
|
-
stroke: w(h,
|
|
998
|
-
fill: w(h,
|
|
999
|
-
fillOpacity:
|
|
1000
|
-
strokeWidth:
|
|
1001
|
-
dot:
|
|
1020
|
+
stroke: w(h, k),
|
|
1021
|
+
fill: w(h, k),
|
|
1022
|
+
fillOpacity: o ? h === o ? 0.16 : 0.05 : 0.1,
|
|
1023
|
+
strokeWidth: Y,
|
|
1024
|
+
dot: /* @__PURE__ */ e(E, { color: w(h, k) }),
|
|
1002
1025
|
isAnimationActive: !1
|
|
1003
1026
|
},
|
|
1004
1027
|
h
|
|
@@ -1009,59 +1032,59 @@ const qe = k.forwardRef(
|
|
|
1009
1032
|
] });
|
|
1010
1033
|
}
|
|
1011
1034
|
);
|
|
1012
|
-
|
|
1013
|
-
const
|
|
1035
|
+
et.displayName = "RadarChart";
|
|
1036
|
+
const tt = R.forwardRef(
|
|
1014
1037
|
({
|
|
1015
1038
|
data: t,
|
|
1016
|
-
nameKey:
|
|
1039
|
+
nameKey: n,
|
|
1017
1040
|
valueKey: a,
|
|
1018
1041
|
maxValue: i = 100,
|
|
1019
|
-
centerLabel:
|
|
1020
|
-
height:
|
|
1021
|
-
legend:
|
|
1042
|
+
centerLabel: o,
|
|
1043
|
+
height: r = I,
|
|
1044
|
+
legend: l = !0,
|
|
1022
1045
|
formatValue: x,
|
|
1023
|
-
tooltip:
|
|
1046
|
+
tooltip: c,
|
|
1024
1047
|
className: m
|
|
1025
1048
|
}, u) => {
|
|
1026
|
-
const N = x ?? F,
|
|
1049
|
+
const N = x ?? F, b = t.map((C, w) => ({
|
|
1027
1050
|
...C,
|
|
1028
|
-
name: String(C[
|
|
1029
|
-
fill:
|
|
1030
|
-
})), f =
|
|
1051
|
+
name: String(C[n]),
|
|
1052
|
+
fill: ee(w)
|
|
1053
|
+
})), f = b.length ? b.reduce(
|
|
1031
1054
|
(C, w) => C + (typeof w[a] == "number" ? w[a] : 0),
|
|
1032
1055
|
0
|
|
1033
|
-
) /
|
|
1034
|
-
label: String(C[
|
|
1035
|
-
color:
|
|
1056
|
+
) / b.length : 0, y = l ? b.map((C, w) => ({
|
|
1057
|
+
label: String(C[n]),
|
|
1058
|
+
color: ee(w)
|
|
1036
1059
|
})) : null;
|
|
1037
|
-
return /* @__PURE__ */ A("div", { ref: u, className:
|
|
1060
|
+
return /* @__PURE__ */ A("div", { ref: u, className: $("relative w-full font-sans", m), children: [
|
|
1038
1061
|
/* @__PURE__ */ A("div", { className: "relative mx-auto w-full max-w-[420px]", children: [
|
|
1039
|
-
/* @__PURE__ */ e(
|
|
1040
|
-
|
|
1062
|
+
/* @__PURE__ */ e(_, { width: "100%", height: r, children: /* @__PURE__ */ A(
|
|
1063
|
+
Oe,
|
|
1041
1064
|
{
|
|
1042
|
-
data:
|
|
1065
|
+
data: b,
|
|
1043
1066
|
innerRadius: "48%",
|
|
1044
1067
|
outerRadius: "82%",
|
|
1045
1068
|
startAngle: 90,
|
|
1046
1069
|
endAngle: -270,
|
|
1047
1070
|
margin: { top: 6, right: 6, bottom: 6, left: 6 },
|
|
1048
1071
|
children: [
|
|
1049
|
-
/* @__PURE__ */ e(
|
|
1050
|
-
|
|
1072
|
+
/* @__PURE__ */ e(ue, { type: "number", domain: [0, i], tick: !1 }),
|
|
1073
|
+
c !== !1 && /* @__PURE__ */ e(
|
|
1051
1074
|
O,
|
|
1052
1075
|
{
|
|
1053
1076
|
content: /* @__PURE__ */ e(
|
|
1054
1077
|
T,
|
|
1055
1078
|
{
|
|
1056
1079
|
format: N,
|
|
1057
|
-
renderer:
|
|
1080
|
+
renderer: c
|
|
1058
1081
|
}
|
|
1059
1082
|
),
|
|
1060
1083
|
isAnimationActive: !1
|
|
1061
1084
|
}
|
|
1062
1085
|
),
|
|
1063
1086
|
/* @__PURE__ */ e(
|
|
1064
|
-
|
|
1087
|
+
Te,
|
|
1065
1088
|
{
|
|
1066
1089
|
dataKey: a,
|
|
1067
1090
|
background: { fill: "var(--muted)" },
|
|
@@ -1075,33 +1098,33 @@ const Je = k.forwardRef(
|
|
|
1075
1098
|
) }),
|
|
1076
1099
|
/* @__PURE__ */ A("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
1077
1100
|
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: N(Math.round(f)) }),
|
|
1078
|
-
|
|
1101
|
+
o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
|
|
1079
1102
|
] })
|
|
1080
1103
|
] }),
|
|
1081
|
-
y && /* @__PURE__ */ e(
|
|
1104
|
+
y && /* @__PURE__ */ e(X, { items: y, align: "center", className: "mb-0 mt-3" })
|
|
1082
1105
|
] });
|
|
1083
1106
|
}
|
|
1084
1107
|
);
|
|
1085
|
-
|
|
1086
|
-
function
|
|
1108
|
+
tt.displayName = "RadialBarChart";
|
|
1109
|
+
function rt({
|
|
1087
1110
|
x: t = 0,
|
|
1088
|
-
y:
|
|
1111
|
+
y: n = 0,
|
|
1089
1112
|
width: a = 0,
|
|
1090
1113
|
height: i = 0,
|
|
1091
|
-
depth:
|
|
1092
|
-
index:
|
|
1093
|
-
name:
|
|
1114
|
+
depth: o = 0,
|
|
1115
|
+
index: r = 0,
|
|
1116
|
+
name: l,
|
|
1094
1117
|
value: x,
|
|
1095
|
-
format:
|
|
1118
|
+
format: c = F
|
|
1096
1119
|
}) {
|
|
1097
|
-
if (
|
|
1098
|
-
const m =
|
|
1120
|
+
if (o === 0) return /* @__PURE__ */ e("g", {});
|
|
1121
|
+
const m = o === 0 ? "transparent" : ee(r), u = o > 0 && r < 4, N = a > 72 && i > 38;
|
|
1099
1122
|
return /* @__PURE__ */ A("g", { children: [
|
|
1100
1123
|
/* @__PURE__ */ e(
|
|
1101
1124
|
"rect",
|
|
1102
1125
|
{
|
|
1103
1126
|
x: t,
|
|
1104
|
-
y:
|
|
1127
|
+
y: n,
|
|
1105
1128
|
width: a,
|
|
1106
1129
|
height: i,
|
|
1107
1130
|
rx: 6,
|
|
@@ -1115,7 +1138,7 @@ function Ke({
|
|
|
1115
1138
|
"foreignObject",
|
|
1116
1139
|
{
|
|
1117
1140
|
x: t + 8,
|
|
1118
|
-
y:
|
|
1141
|
+
y: n + 8,
|
|
1119
1142
|
width: Math.max(0, a - 16),
|
|
1120
1143
|
height: Math.max(0, i - 16),
|
|
1121
1144
|
className: "pointer-events-none overflow-hidden",
|
|
@@ -1123,21 +1146,21 @@ function Ke({
|
|
|
1123
1146
|
/* @__PURE__ */ e(
|
|
1124
1147
|
"p",
|
|
1125
1148
|
{
|
|
1126
|
-
className:
|
|
1149
|
+
className: $(
|
|
1127
1150
|
"truncate text-xs font-medium",
|
|
1128
1151
|
u ? "text-background" : "text-foreground"
|
|
1129
1152
|
),
|
|
1130
|
-
children:
|
|
1153
|
+
children: l
|
|
1131
1154
|
}
|
|
1132
1155
|
),
|
|
1133
1156
|
typeof x == "number" && i > 58 && /* @__PURE__ */ e(
|
|
1134
1157
|
"p",
|
|
1135
1158
|
{
|
|
1136
|
-
className:
|
|
1159
|
+
className: $(
|
|
1137
1160
|
"text-xs tabular-nums",
|
|
1138
1161
|
u ? "text-background/70" : "text-tertiary"
|
|
1139
1162
|
),
|
|
1140
|
-
children:
|
|
1163
|
+
children: c(x)
|
|
1141
1164
|
}
|
|
1142
1165
|
)
|
|
1143
1166
|
] })
|
|
@@ -1145,53 +1168,53 @@ function Ke({
|
|
|
1145
1168
|
)
|
|
1146
1169
|
] });
|
|
1147
1170
|
}
|
|
1148
|
-
function
|
|
1149
|
-
const i = [],
|
|
1150
|
-
const
|
|
1151
|
-
if (
|
|
1152
|
-
|
|
1171
|
+
function nt(t, n, a) {
|
|
1172
|
+
const i = [], o = (r) => {
|
|
1173
|
+
const l = Array.isArray(r.children) ? r.children : void 0;
|
|
1174
|
+
if (l != null && l.length) {
|
|
1175
|
+
l.forEach(o);
|
|
1153
1176
|
return;
|
|
1154
1177
|
}
|
|
1155
|
-
typeof
|
|
1156
|
-
...
|
|
1157
|
-
name: String(n
|
|
1158
|
-
value:
|
|
1178
|
+
typeof r[a] == "number" && i.push({
|
|
1179
|
+
...r,
|
|
1180
|
+
name: String(r[n] ?? ""),
|
|
1181
|
+
value: r[a]
|
|
1159
1182
|
});
|
|
1160
1183
|
};
|
|
1161
|
-
return t.forEach(
|
|
1184
|
+
return t.forEach(o), i.length ? i : t;
|
|
1162
1185
|
}
|
|
1163
|
-
const
|
|
1186
|
+
const at = R.forwardRef(
|
|
1164
1187
|
({
|
|
1165
1188
|
data: t,
|
|
1166
|
-
nameKey:
|
|
1189
|
+
nameKey: n,
|
|
1167
1190
|
valueKey: a,
|
|
1168
1191
|
height: i = I,
|
|
1169
|
-
formatValue:
|
|
1170
|
-
tooltip:
|
|
1171
|
-
className:
|
|
1192
|
+
formatValue: o,
|
|
1193
|
+
tooltip: r,
|
|
1194
|
+
className: l
|
|
1172
1195
|
}, x) => {
|
|
1173
|
-
const
|
|
1174
|
-
() =>
|
|
1175
|
-
[t,
|
|
1196
|
+
const c = o ?? F, m = R.useMemo(
|
|
1197
|
+
() => nt(t, n, a),
|
|
1198
|
+
[t, n, a]
|
|
1176
1199
|
);
|
|
1177
|
-
return /* @__PURE__ */ e("div", { ref: x, className:
|
|
1178
|
-
|
|
1200
|
+
return /* @__PURE__ */ e("div", { ref: x, className: $("relative w-full font-sans", l), children: /* @__PURE__ */ e(_, { width: "100%", height: i, children: /* @__PURE__ */ e(
|
|
1201
|
+
Ie,
|
|
1179
1202
|
{
|
|
1180
1203
|
data: m,
|
|
1181
|
-
nameKey:
|
|
1204
|
+
nameKey: n,
|
|
1182
1205
|
dataKey: a,
|
|
1183
1206
|
type: "flat",
|
|
1184
1207
|
aspectRatio: 1.6,
|
|
1185
|
-
content: /* @__PURE__ */ e(
|
|
1208
|
+
content: /* @__PURE__ */ e(rt, { format: c }),
|
|
1186
1209
|
isAnimationActive: !1,
|
|
1187
|
-
children:
|
|
1210
|
+
children: r !== !1 && /* @__PURE__ */ e(
|
|
1188
1211
|
O,
|
|
1189
1212
|
{
|
|
1190
1213
|
content: /* @__PURE__ */ e(
|
|
1191
1214
|
T,
|
|
1192
1215
|
{
|
|
1193
|
-
format:
|
|
1194
|
-
renderer:
|
|
1216
|
+
format: c,
|
|
1217
|
+
renderer: r
|
|
1195
1218
|
}
|
|
1196
1219
|
),
|
|
1197
1220
|
isAnimationActive: !1
|
|
@@ -1201,98 +1224,98 @@ const tt = k.forwardRef(
|
|
|
1201
1224
|
) }) });
|
|
1202
1225
|
}
|
|
1203
1226
|
);
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1206
|
-
const
|
|
1207
|
-
return `M ${t},${
|
|
1227
|
+
at.displayName = "TreemapChart";
|
|
1228
|
+
const J = "var(--color-chart-1)", it = "var(--chart-track)", G = 24, ot = 44, ie = 0.55, oe = 4, le = (t, n, a, i, o) => {
|
|
1229
|
+
const r = Math.min(o, a / 2, i);
|
|
1230
|
+
return `M ${t},${n + i} L ${t},${n + r} Q ${t},${n} ${t + r},${n} L ${t + a - r},${n} Q ${t + a},${n} ${t + a},${n + r} L ${t + a},${n + i} Z`;
|
|
1208
1231
|
};
|
|
1209
|
-
function
|
|
1210
|
-
const t =
|
|
1211
|
-
return
|
|
1232
|
+
function lt() {
|
|
1233
|
+
const t = R.useRef(null), [n, a] = R.useState(0);
|
|
1234
|
+
return R.useLayoutEffect(() => {
|
|
1212
1235
|
const i = t.current;
|
|
1213
1236
|
if (!i) return;
|
|
1214
1237
|
a(i.getBoundingClientRect().width);
|
|
1215
|
-
const
|
|
1238
|
+
const o = new ResizeObserver((r) => {
|
|
1216
1239
|
var x;
|
|
1217
|
-
const
|
|
1218
|
-
a((
|
|
1240
|
+
const l = ((x = r[0]) == null ? void 0 : x.contentRect.width) ?? 0;
|
|
1241
|
+
a((c) => Math.abs(c - l) > 0.5 ? l : c);
|
|
1219
1242
|
});
|
|
1220
|
-
return
|
|
1221
|
-
}, []), { ref: t, width:
|
|
1243
|
+
return o.observe(i), () => o.disconnect();
|
|
1244
|
+
}, []), { ref: t, width: n };
|
|
1222
1245
|
}
|
|
1223
|
-
const
|
|
1246
|
+
const st = R.forwardRef(
|
|
1224
1247
|
({
|
|
1225
1248
|
data: t,
|
|
1226
|
-
nameKey:
|
|
1249
|
+
nameKey: n,
|
|
1227
1250
|
valueKey: a,
|
|
1228
1251
|
height: i = I,
|
|
1229
|
-
formatValue:
|
|
1230
|
-
label:
|
|
1231
|
-
tooltip:
|
|
1252
|
+
formatValue: o,
|
|
1253
|
+
label: r,
|
|
1254
|
+
tooltip: l,
|
|
1232
1255
|
className: x
|
|
1233
|
-
},
|
|
1234
|
-
var
|
|
1235
|
-
const m =
|
|
1256
|
+
}, c) => {
|
|
1257
|
+
var g;
|
|
1258
|
+
const m = o ?? F, { ref: u, width: N } = lt(), [b, f] = R.useState(null), y = Number(((g = t[0]) == null ? void 0 : g[a]) ?? 0), C = t.length, w = Math.max(0, i - G - ot), p = G + w, h = C > 0 ? N / (C + (C - 1) * ie) : 0, k = h * ie, d = t.map((v, S) => {
|
|
1236
1259
|
var B;
|
|
1237
|
-
const
|
|
1260
|
+
const L = Number(v[a]), H = Number(((B = t[S - 1]) == null ? void 0 : B[a]) ?? L), Q = y ? L / y * 100 : 0, q = H ? L / H * 100 : 0, M = y && L > 0 ? Math.max(2, L / y * w) : 0;
|
|
1238
1261
|
return {
|
|
1239
|
-
datum:
|
|
1240
|
-
index:
|
|
1241
|
-
name: String(
|
|
1242
|
-
value:
|
|
1243
|
-
conversionFromFirst:
|
|
1244
|
-
conversionFromPrevious:
|
|
1245
|
-
dropOffFromPrevious:
|
|
1246
|
-
x:
|
|
1262
|
+
datum: v,
|
|
1263
|
+
index: S,
|
|
1264
|
+
name: String(v[n]),
|
|
1265
|
+
value: L,
|
|
1266
|
+
conversionFromFirst: Q,
|
|
1267
|
+
conversionFromPrevious: q,
|
|
1268
|
+
dropOffFromPrevious: S === 0 ? 0 : 100 - q,
|
|
1269
|
+
x: S * (h + k),
|
|
1247
1270
|
y: p - M,
|
|
1248
1271
|
width: h,
|
|
1249
1272
|
height: M,
|
|
1250
1273
|
formatValue: m
|
|
1251
1274
|
};
|
|
1252
|
-
}),
|
|
1253
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
1275
|
+
}), s = b != null ? d[b] : void 0;
|
|
1276
|
+
return /* @__PURE__ */ e("div", { ref: c, className: $("relative w-full font-sans", x), children: /* @__PURE__ */ A("div", { ref: u, className: "relative w-full", style: { height: i }, children: [
|
|
1254
1277
|
N > 0 && C > 0 && /* @__PURE__ */ A("svg", { width: N, height: i, className: "block", children: [
|
|
1255
|
-
d.slice(1).map((
|
|
1256
|
-
const
|
|
1278
|
+
d.slice(1).map((v) => {
|
|
1279
|
+
const S = d[v.index - 1];
|
|
1257
1280
|
return /* @__PURE__ */ e(
|
|
1258
1281
|
"path",
|
|
1259
1282
|
{
|
|
1260
|
-
d: `M ${
|
|
1261
|
-
fill:
|
|
1283
|
+
d: `M ${S.x + S.width},${S.y} L ${v.x},${v.y} L ${v.x},${p} L ${S.x + S.width},${p} Z`,
|
|
1284
|
+
fill: J,
|
|
1262
1285
|
opacity: 0.14
|
|
1263
1286
|
},
|
|
1264
|
-
`connector-${
|
|
1287
|
+
`connector-${v.index}`
|
|
1265
1288
|
);
|
|
1266
1289
|
}),
|
|
1267
|
-
d.map((
|
|
1290
|
+
d.map((v) => /* @__PURE__ */ A(
|
|
1268
1291
|
"g",
|
|
1269
1292
|
{
|
|
1270
1293
|
role: "img",
|
|
1271
|
-
"aria-label": `${
|
|
1294
|
+
"aria-label": `${v.name}: ${m(v.value)} (${Math.round(v.conversionFromFirst)}% of ${d[0].name})`,
|
|
1272
1295
|
children: [
|
|
1273
1296
|
/* @__PURE__ */ e(
|
|
1274
1297
|
"path",
|
|
1275
1298
|
{
|
|
1276
|
-
d: le(
|
|
1277
|
-
fill:
|
|
1299
|
+
d: le(v.x, G, v.width, w, oe),
|
|
1300
|
+
fill: it
|
|
1278
1301
|
}
|
|
1279
1302
|
),
|
|
1280
|
-
|
|
1303
|
+
v.height > 0 && /* @__PURE__ */ e(
|
|
1281
1304
|
"path",
|
|
1282
1305
|
{
|
|
1283
|
-
d: le(
|
|
1284
|
-
fill:
|
|
1306
|
+
d: le(v.x, v.y, v.width, v.height, oe),
|
|
1307
|
+
fill: J
|
|
1285
1308
|
}
|
|
1286
1309
|
),
|
|
1287
|
-
|
|
1310
|
+
r !== !1 && (r ? r(v) : /* @__PURE__ */ A(
|
|
1288
1311
|
"text",
|
|
1289
1312
|
{
|
|
1290
|
-
x:
|
|
1291
|
-
y:
|
|
1313
|
+
x: v.x,
|
|
1314
|
+
y: v.y - 8,
|
|
1292
1315
|
textAnchor: "start",
|
|
1293
1316
|
className: "fill-secondary text-xs font-normal tabular-nums",
|
|
1294
1317
|
children: [
|
|
1295
|
-
Math.round(
|
|
1318
|
+
Math.round(v.conversionFromFirst),
|
|
1296
1319
|
"%"
|
|
1297
1320
|
]
|
|
1298
1321
|
}
|
|
@@ -1300,68 +1323,68 @@ const it = k.forwardRef(
|
|
|
1300
1323
|
/* @__PURE__ */ e(
|
|
1301
1324
|
"text",
|
|
1302
1325
|
{
|
|
1303
|
-
x:
|
|
1326
|
+
x: v.x,
|
|
1304
1327
|
y: p + 18,
|
|
1305
1328
|
textAnchor: "start",
|
|
1306
1329
|
className: "fill-primary text-xs font-normal",
|
|
1307
|
-
children:
|
|
1330
|
+
children: v.name
|
|
1308
1331
|
}
|
|
1309
1332
|
),
|
|
1310
1333
|
/* @__PURE__ */ e(
|
|
1311
1334
|
"text",
|
|
1312
1335
|
{
|
|
1313
|
-
x:
|
|
1336
|
+
x: v.x,
|
|
1314
1337
|
y: p + 34,
|
|
1315
1338
|
textAnchor: "start",
|
|
1316
1339
|
className: "fill-tertiary text-xs tabular-nums",
|
|
1317
|
-
children: m(
|
|
1340
|
+
children: m(v.value)
|
|
1318
1341
|
}
|
|
1319
1342
|
),
|
|
1320
1343
|
/* @__PURE__ */ e(
|
|
1321
1344
|
"rect",
|
|
1322
1345
|
{
|
|
1323
|
-
x:
|
|
1324
|
-
y:
|
|
1325
|
-
width:
|
|
1346
|
+
x: v.x,
|
|
1347
|
+
y: G,
|
|
1348
|
+
width: v.index === C - 1 ? h : h + k,
|
|
1326
1349
|
height: w,
|
|
1327
1350
|
fill: "transparent",
|
|
1328
|
-
onMouseEnter: () => f(
|
|
1351
|
+
onMouseEnter: () => f(v.index),
|
|
1329
1352
|
onMouseLeave: () => f(null)
|
|
1330
1353
|
}
|
|
1331
1354
|
)
|
|
1332
1355
|
]
|
|
1333
1356
|
},
|
|
1334
|
-
`${
|
|
1357
|
+
`${v.name}-${v.index}`
|
|
1335
1358
|
))
|
|
1336
1359
|
] }),
|
|
1337
|
-
|
|
1360
|
+
l !== !1 && s && /* @__PURE__ */ e(
|
|
1338
1361
|
"div",
|
|
1339
1362
|
{
|
|
1340
1363
|
className: "pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-full",
|
|
1341
|
-
style: { left:
|
|
1342
|
-
children:
|
|
1364
|
+
style: { left: s.x + s.width / 2, top: s.y - 10 },
|
|
1365
|
+
children: l ? l({
|
|
1343
1366
|
active: !0,
|
|
1344
|
-
label:
|
|
1367
|
+
label: s.name,
|
|
1345
1368
|
items: [
|
|
1346
1369
|
{
|
|
1347
|
-
key:
|
|
1348
|
-
name:
|
|
1349
|
-
value:
|
|
1350
|
-
color:
|
|
1351
|
-
datum:
|
|
1370
|
+
key: s.name,
|
|
1371
|
+
name: s.name,
|
|
1372
|
+
value: s.value,
|
|
1373
|
+
color: J,
|
|
1374
|
+
datum: s.datum
|
|
1352
1375
|
}
|
|
1353
1376
|
],
|
|
1354
1377
|
formatValue: m
|
|
1355
1378
|
}) : /* @__PURE__ */ A("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs whitespace-nowrap text-background", children: [
|
|
1356
|
-
/* @__PURE__ */ e("div", { className: "text-xs font-normal tracking-wide uppercase text-background/60", children:
|
|
1357
|
-
/* @__PURE__ */ e("div", { className: "font-normal tabular-nums", children: m(
|
|
1379
|
+
/* @__PURE__ */ e("div", { className: "text-xs font-normal tracking-wide uppercase text-background/60", children: s.name }),
|
|
1380
|
+
/* @__PURE__ */ e("div", { className: "font-normal tabular-nums", children: m(s.value) }),
|
|
1358
1381
|
/* @__PURE__ */ A("div", { className: "text-background/70 tabular-nums", children: [
|
|
1359
|
-
Math.round(
|
|
1382
|
+
Math.round(s.conversionFromFirst),
|
|
1360
1383
|
"% of ",
|
|
1361
1384
|
d[0].name,
|
|
1362
|
-
|
|
1385
|
+
s.index > 0 && /* @__PURE__ */ A(K, { children: [
|
|
1363
1386
|
" · −",
|
|
1364
|
-
Math.round(
|
|
1387
|
+
Math.round(s.dropOffFromPrevious),
|
|
1365
1388
|
"% step"
|
|
1366
1389
|
] })
|
|
1367
1390
|
] })
|
|
@@ -1371,18 +1394,18 @@ const it = k.forwardRef(
|
|
|
1371
1394
|
] }) });
|
|
1372
1395
|
}
|
|
1373
1396
|
);
|
|
1374
|
-
|
|
1397
|
+
st.displayName = "FunnelChart";
|
|
1375
1398
|
export {
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1399
|
+
Ze as AreaChart,
|
|
1400
|
+
Qe as BarChart,
|
|
1401
|
+
be as ComboChart,
|
|
1402
|
+
qe as ComposedChart,
|
|
1403
|
+
st as FunnelChart,
|
|
1404
|
+
Xe as LineChart,
|
|
1382
1405
|
I as MIN_HEIGHT,
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1406
|
+
Ke as PieChart,
|
|
1407
|
+
et as RadarChart,
|
|
1408
|
+
tt as RadialBarChart,
|
|
1409
|
+
Je as ScatterChart,
|
|
1410
|
+
at as TreemapChart
|
|
1388
1411
|
};
|