@flesler/cursor-canvas-web 1.1.1 → 1.2.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/README.md +16 -17
- package/dist/cursor-canvas.cjs +1 -1
- package/dist/cursor-canvas.js +505 -457
- package/package.json +33 -20
- package/src/superset/chart-extra.d.ts +39 -0
- package/src/superset/index.d.ts +25 -0
package/dist/cursor-canvas.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { useComputedColorScheme as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { r as
|
|
6
|
-
import { c as
|
|
7
|
-
import { BarChart as
|
|
8
|
-
const
|
|
2
|
+
import { useComputedColorScheme as ge, Button as xe, Alert as ve, Card as be, Checkbox as Se, Divider as ke, Title as W, ActionIcon as we, Badge as Ce, Group as Le, Select as Te, Stack as Pe, Text as H, Table as L, Textarea as Ae, TextInput as Me, Switch as Be } from "@mantine/core";
|
|
3
|
+
import { useState as D, createContext as $e, useCallback as G, useContext as oe } from "react";
|
|
4
|
+
import { useEffect as Ut, useMemo as Qt, useRef as en, useState as tn } from "react";
|
|
5
|
+
import { r as De, u as te } from "./host-tokens-Dh2BFFjv.js";
|
|
6
|
+
import { c as rn, a as on, b as an, d as sn, e as ln, f as cn, g as dn, h as un, i as fn } from "./host-tokens-Dh2BFFjv.js";
|
|
7
|
+
import { BarChart as Fe, AreaChart as Ee, LineChart as Ne, DonutChart as Ie, PieChart as ze, ChartLegend as Re } from "@mantine/charts";
|
|
8
|
+
const w = {
|
|
9
9
|
success: "#1F8A65",
|
|
10
10
|
danger: "#CF2D56",
|
|
11
11
|
warning: "#E8A33D",
|
|
@@ -24,9 +24,9 @@ const k = {
|
|
|
24
24
|
deleted: "red",
|
|
25
25
|
renamed: "indigo"
|
|
26
26
|
};
|
|
27
|
-
function
|
|
28
|
-
const t =
|
|
29
|
-
return
|
|
27
|
+
function m() {
|
|
28
|
+
const t = ge("light") === "dark" ? "dark" : "light";
|
|
29
|
+
return De(t);
|
|
30
30
|
}
|
|
31
31
|
const ie = {
|
|
32
32
|
verticalAlign: "bottom",
|
|
@@ -34,60 +34,74 @@ const ie = {
|
|
|
34
34
|
}, se = {
|
|
35
35
|
legend: { justifyContent: "center" }
|
|
36
36
|
};
|
|
37
|
-
function
|
|
38
|
-
const t =
|
|
39
|
-
return (
|
|
37
|
+
function O() {
|
|
38
|
+
const t = m().chart.sequence;
|
|
39
|
+
return (n, r) => n ? w[n] : t[r % t.length];
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const t =
|
|
41
|
+
function le() {
|
|
42
|
+
const t = m().text.primary;
|
|
43
43
|
return { textColor: t, barLabelColor: t };
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return e.map((
|
|
47
|
-
const a = { category:
|
|
45
|
+
function ce(e, t) {
|
|
46
|
+
return e.map((n, r) => {
|
|
47
|
+
const a = { category: n };
|
|
48
48
|
for (const o of t)
|
|
49
|
-
a[o.name] = o.data[
|
|
49
|
+
a[o.name] = o.data[r] ?? 0;
|
|
50
50
|
return a;
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
function de(e, t) {
|
|
54
|
-
return e.map((
|
|
55
|
-
name:
|
|
56
|
-
color: t(
|
|
54
|
+
return e.map((n, r) => ({
|
|
55
|
+
name: n.name,
|
|
56
|
+
color: t(n.tone, r)
|
|
57
57
|
}));
|
|
58
58
|
}
|
|
59
59
|
function ue(e, t) {
|
|
60
|
-
return (
|
|
60
|
+
return (n) => `${t ?? ""}${n}${e ?? ""}`;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function _e(e, t) {
|
|
63
63
|
if (e != null && e.length)
|
|
64
|
-
return e.map((
|
|
65
|
-
...t ? { x:
|
|
66
|
-
label:
|
|
67
|
-
color:
|
|
64
|
+
return e.map((n) => ({
|
|
65
|
+
...t ? { x: n.value } : { y: n.value },
|
|
66
|
+
label: n.label,
|
|
67
|
+
color: n.tone ? w[n.tone] : w.neutral
|
|
68
68
|
}));
|
|
69
69
|
}
|
|
70
|
+
const He = /* @__PURE__ */ new Set(["log", "symlog", "pow", "sqrt"]);
|
|
71
|
+
function We(e) {
|
|
72
|
+
const { scale: t } = e;
|
|
73
|
+
return typeof t != "string" || !He.has(t) ? e : {
|
|
74
|
+
...e,
|
|
75
|
+
type: e.type ?? "number",
|
|
76
|
+
allowDataOverflow: e.allowDataOverflow ?? !0,
|
|
77
|
+
allowDecimals: e.allowDecimals ?? !0,
|
|
78
|
+
domain: e.domain ?? [1, "dataMax"]
|
|
79
|
+
};
|
|
80
|
+
}
|
|
70
81
|
function fe(e) {
|
|
71
|
-
const t =
|
|
72
|
-
|
|
82
|
+
const t = _e(e.referenceLines, !!e.horizontal);
|
|
83
|
+
let n;
|
|
84
|
+
if (!e.stacked && !e.normalized) {
|
|
85
|
+
const o = e.beginAtZero !== !1;
|
|
86
|
+
n = [e.yMin ?? (o ? 0 : "auto"), e.yMax ?? "auto"];
|
|
87
|
+
}
|
|
88
|
+
const r = e.valueAxis ? We(e.valueAxis) : void 0;
|
|
89
|
+
if (!n && !r)
|
|
73
90
|
return { referenceLines: t };
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
e.yMax ?? "auto"
|
|
77
|
-
];
|
|
78
|
-
return e.horizontal ? { xAxisProps: { domain: n }, referenceLines: t } : { yAxisProps: { domain: n }, referenceLines: t };
|
|
91
|
+
const a = { ...n && { domain: n }, ...r };
|
|
92
|
+
return e.horizontal ? { xAxisProps: a, referenceLines: t } : { yAxisProps: a, referenceLines: t };
|
|
79
93
|
}
|
|
80
|
-
function
|
|
81
|
-
return e !== void 0 ? e : t.length === 1 &&
|
|
94
|
+
function Ge(e, t, n) {
|
|
95
|
+
return e !== void 0 ? e : t.length === 1 && n.length <= 8;
|
|
82
96
|
}
|
|
83
|
-
const
|
|
84
|
-
function
|
|
85
|
-
return e.length <=
|
|
97
|
+
const ne = 14;
|
|
98
|
+
function Oe(e) {
|
|
99
|
+
return e.length <= ne ? e : `${e.slice(0, ne - 1)}…`;
|
|
86
100
|
}
|
|
87
|
-
function
|
|
101
|
+
function je(e) {
|
|
88
102
|
var o;
|
|
89
|
-
const t = typeof e.x == "number" ? e.x : Number(e.x) || 0,
|
|
90
|
-
return /* @__PURE__ */ i("g", { transform: `translate(${t},${
|
|
103
|
+
const t = typeof e.x == "number" ? e.x : Number(e.x) || 0, n = typeof e.y == "number" ? e.y : Number(e.y) || 0, r = String(((o = e.payload) == null ? void 0 : o.value) ?? ""), a = Oe(r);
|
|
104
|
+
return /* @__PURE__ */ i("g", { transform: `translate(${t},${n})`, children: /* @__PURE__ */ y(
|
|
91
105
|
"text",
|
|
92
106
|
{
|
|
93
107
|
x: -10,
|
|
@@ -97,22 +111,22 @@ function Ge(e) {
|
|
|
97
111
|
fill: "currentColor",
|
|
98
112
|
fontSize: 12,
|
|
99
113
|
children: [
|
|
100
|
-
/* @__PURE__ */ i("title", { children:
|
|
114
|
+
/* @__PURE__ */ i("title", { children: r }),
|
|
101
115
|
a
|
|
102
116
|
]
|
|
103
117
|
}
|
|
104
118
|
) });
|
|
105
119
|
}
|
|
106
|
-
function
|
|
120
|
+
function Ke(e) {
|
|
107
121
|
return {
|
|
108
122
|
fontWeight: 700,
|
|
109
123
|
fill: e
|
|
110
124
|
};
|
|
111
125
|
}
|
|
112
|
-
function
|
|
126
|
+
function Xe() {
|
|
113
127
|
return {
|
|
114
128
|
yAxisProps: {
|
|
115
|
-
tick:
|
|
129
|
+
tick: je,
|
|
116
130
|
width: 96
|
|
117
131
|
},
|
|
118
132
|
barChartProps: {
|
|
@@ -120,117 +134,122 @@ function Oe() {
|
|
|
120
134
|
}
|
|
121
135
|
};
|
|
122
136
|
}
|
|
123
|
-
function
|
|
137
|
+
function qe() {
|
|
124
138
|
return {
|
|
125
139
|
barChartProps: {
|
|
126
140
|
margin: { top: 22 }
|
|
127
141
|
}
|
|
128
142
|
};
|
|
129
143
|
}
|
|
130
|
-
function
|
|
144
|
+
function ft({
|
|
131
145
|
categories: e,
|
|
132
146
|
series: t,
|
|
133
|
-
height:
|
|
134
|
-
fill:
|
|
147
|
+
height: n = 240,
|
|
148
|
+
fill: r,
|
|
135
149
|
valueSuffix: a,
|
|
136
150
|
valuePrefix: o,
|
|
137
|
-
showValues:
|
|
151
|
+
showValues: c,
|
|
138
152
|
showHoverGuide: f = !0,
|
|
139
153
|
beginAtZero: d,
|
|
140
|
-
yMin:
|
|
154
|
+
yMin: l,
|
|
141
155
|
yMax: u,
|
|
142
|
-
referenceLines:
|
|
156
|
+
referenceLines: g,
|
|
143
157
|
style: v,
|
|
144
|
-
|
|
158
|
+
extra: h,
|
|
159
|
+
smooth: k
|
|
145
160
|
}) {
|
|
146
|
-
const
|
|
161
|
+
const T = (h == null ? void 0 : h.smooth) ?? k, C = O(), P = le(), M = ce(e, t), $ = de(t, C), b = !!(r && (h != null && h.stacked)), F = fe({
|
|
147
162
|
beginAtZero: d,
|
|
148
|
-
yMin:
|
|
163
|
+
yMin: l,
|
|
149
164
|
yMax: u,
|
|
150
|
-
referenceLines:
|
|
151
|
-
horizontal: !1
|
|
152
|
-
|
|
153
|
-
h:
|
|
154
|
-
|
|
165
|
+
referenceLines: g,
|
|
166
|
+
horizontal: !1,
|
|
167
|
+
stacked: b,
|
|
168
|
+
valueAxis: h == null ? void 0 : h.valueAxis
|
|
169
|
+
}), A = {
|
|
170
|
+
h: n,
|
|
171
|
+
data: M,
|
|
155
172
|
dataKey: "category",
|
|
156
|
-
series:
|
|
157
|
-
curveType:
|
|
173
|
+
series: $,
|
|
174
|
+
curveType: T ? "monotone" : "linear",
|
|
158
175
|
withLegend: t.length > 1,
|
|
159
176
|
legendProps: ie,
|
|
160
177
|
valueFormatter: ue(a, o),
|
|
161
|
-
withPointLabels:
|
|
178
|
+
withPointLabels: c ?? e.length <= 20,
|
|
162
179
|
tooltipProps: f ? void 0 : { cursor: !1 },
|
|
163
180
|
styles: {
|
|
164
181
|
...se,
|
|
165
|
-
legendItemName: { color:
|
|
182
|
+
legendItemName: { color: P.textColor }
|
|
166
183
|
},
|
|
167
|
-
...
|
|
168
|
-
...
|
|
184
|
+
...P,
|
|
185
|
+
...F,
|
|
169
186
|
style: v
|
|
170
187
|
};
|
|
171
|
-
return
|
|
188
|
+
return r ? /* @__PURE__ */ i(Ee, { ...A, type: b ? "stacked" : "default" }) : /* @__PURE__ */ i(Ne, { ...A });
|
|
172
189
|
}
|
|
173
|
-
function
|
|
190
|
+
function ht({
|
|
174
191
|
categories: e,
|
|
175
192
|
series: t,
|
|
176
|
-
height:
|
|
177
|
-
stacked:
|
|
193
|
+
height: n = 240,
|
|
194
|
+
stacked: r,
|
|
178
195
|
horizontal: a,
|
|
179
196
|
normalized: o,
|
|
180
|
-
valueSuffix:
|
|
197
|
+
valueSuffix: c,
|
|
181
198
|
valuePrefix: f,
|
|
182
199
|
showValues: d,
|
|
183
|
-
beginAtZero:
|
|
200
|
+
beginAtZero: l,
|
|
184
201
|
yMin: u,
|
|
185
|
-
yMax:
|
|
202
|
+
yMax: g,
|
|
186
203
|
referenceLines: v,
|
|
187
|
-
style: h
|
|
204
|
+
style: h,
|
|
205
|
+
extra: k
|
|
188
206
|
}) {
|
|
189
|
-
const
|
|
190
|
-
beginAtZero:
|
|
207
|
+
const T = O(), C = le(), P = ce(e, t), M = o ? "percent" : r ? "stacked" : "default", $ = fe({
|
|
208
|
+
beginAtZero: l,
|
|
191
209
|
yMin: u,
|
|
192
|
-
yMax:
|
|
210
|
+
yMax: g,
|
|
193
211
|
referenceLines: v,
|
|
194
212
|
horizontal: a,
|
|
195
|
-
stacked:
|
|
196
|
-
normalized: o
|
|
197
|
-
|
|
213
|
+
stacked: r,
|
|
214
|
+
normalized: o,
|
|
215
|
+
valueAxis: k == null ? void 0 : k.valueAxis
|
|
216
|
+
}), b = !r && !o && Ge(d, t, e);
|
|
198
217
|
return /* @__PURE__ */ i(
|
|
199
|
-
|
|
218
|
+
Fe,
|
|
200
219
|
{
|
|
201
|
-
h:
|
|
202
|
-
data:
|
|
220
|
+
h: n,
|
|
221
|
+
data: P,
|
|
203
222
|
dataKey: "category",
|
|
204
|
-
series: de(t,
|
|
205
|
-
type:
|
|
223
|
+
series: de(t, T),
|
|
224
|
+
type: M,
|
|
206
225
|
orientation: a ? "vertical" : "horizontal",
|
|
207
226
|
withLegend: t.length > 1,
|
|
208
227
|
legendProps: ie,
|
|
209
|
-
valueFormatter: ue(
|
|
210
|
-
withBarValueLabel:
|
|
211
|
-
...
|
|
212
|
-
...a ?
|
|
228
|
+
valueFormatter: ue(c, f),
|
|
229
|
+
withBarValueLabel: b,
|
|
230
|
+
...b ? { valueLabelProps: Ke(C.barLabelColor) } : {},
|
|
231
|
+
...a ? Xe() : b ? qe() : {},
|
|
213
232
|
styles: {
|
|
214
233
|
...se,
|
|
215
|
-
legendItemName: { color:
|
|
234
|
+
legendItemName: { color: C.textColor }
|
|
216
235
|
},
|
|
217
|
-
...
|
|
218
|
-
|
|
236
|
+
...C,
|
|
237
|
+
...$,
|
|
219
238
|
style: h
|
|
220
239
|
}
|
|
221
240
|
);
|
|
222
241
|
}
|
|
223
|
-
const
|
|
224
|
-
function
|
|
242
|
+
const Ve = 180, Ye = 540;
|
|
243
|
+
function Ze(e, t) {
|
|
225
244
|
if (t <= 0)
|
|
226
245
|
return "0%";
|
|
227
|
-
const
|
|
228
|
-
return
|
|
246
|
+
const n = e / t * 100;
|
|
247
|
+
return n < 10 && Math.abs(n - Math.round(n)) > 0.05 ? `${n.toFixed(1)}%` : `${Math.round(n)}%`;
|
|
229
248
|
}
|
|
230
|
-
function
|
|
249
|
+
function Je(e) {
|
|
231
250
|
return Math.max(28, Math.round(e * 0.22));
|
|
232
251
|
}
|
|
233
|
-
function
|
|
252
|
+
function Ue(e) {
|
|
234
253
|
return e.map((t) => ({
|
|
235
254
|
dataKey: t.name,
|
|
236
255
|
value: t.name,
|
|
@@ -238,33 +257,62 @@ function Ze(e) {
|
|
|
238
257
|
type: "circle"
|
|
239
258
|
}));
|
|
240
259
|
}
|
|
241
|
-
function
|
|
242
|
-
return e.map((
|
|
243
|
-
name:
|
|
244
|
-
color:
|
|
245
|
-
label: `${
|
|
260
|
+
function Qe(e, t) {
|
|
261
|
+
return e.map((n) => ({
|
|
262
|
+
name: n.name,
|
|
263
|
+
color: n.color,
|
|
264
|
+
label: `${n.name} ${Ze(n.value, t)}`
|
|
246
265
|
}));
|
|
247
266
|
}
|
|
248
|
-
function
|
|
249
|
-
|
|
267
|
+
function et({
|
|
268
|
+
total: e,
|
|
269
|
+
family: t,
|
|
270
|
+
primary: n,
|
|
271
|
+
subtitle: r
|
|
272
|
+
}) {
|
|
273
|
+
return /* @__PURE__ */ y(
|
|
274
|
+
"text",
|
|
275
|
+
{
|
|
276
|
+
x: "50%",
|
|
277
|
+
y: "50%",
|
|
278
|
+
textAnchor: "middle",
|
|
279
|
+
dominantBaseline: "central",
|
|
280
|
+
fontFamily: t,
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ i("tspan", { x: "50%", dy: "-0.4em", fontSize: 20, fontWeight: 600, fill: n, children: e }),
|
|
283
|
+
/* @__PURE__ */ i("tspan", { x: "50%", dy: "1.55em", fontSize: 16, fontWeight: 500, fill: r, children: "Total" })
|
|
284
|
+
]
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
function pt({ data: e, size: t = 200, donut: n, style: r }) {
|
|
289
|
+
const [a, o] = D(null), c = m(), f = O(), d = e.map((h, k) => ({
|
|
250
290
|
name: h.label,
|
|
251
291
|
value: h.value,
|
|
252
|
-
color: f(h.tone,
|
|
253
|
-
})),
|
|
254
|
-
startAngle:
|
|
292
|
+
color: f(h.tone, k)
|
|
293
|
+
})), l = d.reduce((h, k) => h + k.value, 0), u = {
|
|
294
|
+
startAngle: Ve,
|
|
255
295
|
endAngle: Ye
|
|
256
|
-
},
|
|
296
|
+
}, g = (h) => ({
|
|
257
297
|
opacity: a === null || a === h ? 1 : 0.35
|
|
258
|
-
}), v =
|
|
259
|
-
|
|
298
|
+
}), v = n ? /* @__PURE__ */ i(
|
|
299
|
+
Ie,
|
|
260
300
|
{
|
|
261
301
|
data: d,
|
|
262
302
|
size: t,
|
|
263
|
-
thickness:
|
|
303
|
+
thickness: Je(t),
|
|
264
304
|
withTooltip: !0,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
305
|
+
cellProps: (h) => g(h.name),
|
|
306
|
+
...u,
|
|
307
|
+
children: /* @__PURE__ */ i(
|
|
308
|
+
et,
|
|
309
|
+
{
|
|
310
|
+
total: l,
|
|
311
|
+
family: c.typography.fontFamily,
|
|
312
|
+
primary: c.text.primary,
|
|
313
|
+
subtitle: c.text.secondary
|
|
314
|
+
}
|
|
315
|
+
)
|
|
268
316
|
}
|
|
269
317
|
) : /* @__PURE__ */ i(
|
|
270
318
|
ze,
|
|
@@ -273,7 +321,7 @@ function ut({ data: e, size: t = 200, donut: r, style: n }) {
|
|
|
273
321
|
size: t,
|
|
274
322
|
withTooltip: !0,
|
|
275
323
|
withLabelsLine: !1,
|
|
276
|
-
cellProps: (h) =>
|
|
324
|
+
cellProps: (h) => g(h.name),
|
|
277
325
|
...u
|
|
278
326
|
}
|
|
279
327
|
);
|
|
@@ -285,7 +333,7 @@ function ut({ data: e, size: t = 200, donut: r, style: n }) {
|
|
|
285
333
|
display: "flex",
|
|
286
334
|
flexDirection: "column",
|
|
287
335
|
alignItems: "center",
|
|
288
|
-
...
|
|
336
|
+
...r
|
|
289
337
|
},
|
|
290
338
|
children: [
|
|
291
339
|
/* @__PURE__ */ i(
|
|
@@ -303,10 +351,10 @@ function ut({ data: e, size: t = 200, donut: r, style: n }) {
|
|
|
303
351
|
}
|
|
304
352
|
),
|
|
305
353
|
/* @__PURE__ */ i(
|
|
306
|
-
|
|
354
|
+
Re,
|
|
307
355
|
{
|
|
308
|
-
payload:
|
|
309
|
-
series:
|
|
356
|
+
payload: Ue(d),
|
|
357
|
+
series: Qe(d, l),
|
|
310
358
|
legendPosition: "bottom",
|
|
311
359
|
centered: !0,
|
|
312
360
|
onHighlight: o,
|
|
@@ -316,10 +364,10 @@ function ut({ data: e, size: t = 200, donut: r, style: n }) {
|
|
|
316
364
|
legend: {
|
|
317
365
|
justifyContent: "center",
|
|
318
366
|
gap: 12,
|
|
319
|
-
color:
|
|
367
|
+
color: c.text.primary
|
|
320
368
|
},
|
|
321
369
|
legendItemName: {
|
|
322
|
-
color:
|
|
370
|
+
color: c.text.primary
|
|
323
371
|
}
|
|
324
372
|
}
|
|
325
373
|
}
|
|
@@ -328,71 +376,71 @@ function ut({ data: e, size: t = 200, donut: r, style: n }) {
|
|
|
328
376
|
}
|
|
329
377
|
);
|
|
330
378
|
}
|
|
331
|
-
function
|
|
379
|
+
function yt(e) {
|
|
332
380
|
const {
|
|
333
381
|
nodes: t,
|
|
334
|
-
edges:
|
|
335
|
-
direction:
|
|
382
|
+
edges: n,
|
|
383
|
+
direction: r = "vertical",
|
|
336
384
|
nodeWidth: a = 160,
|
|
337
385
|
nodeHeight: o = 40,
|
|
338
|
-
rankGap:
|
|
386
|
+
rankGap: c = 64,
|
|
339
387
|
nodeGap: f = 48,
|
|
340
388
|
padding: d = 24
|
|
341
|
-
} = e,
|
|
342
|
-
for (const s of
|
|
343
|
-
for (const s of
|
|
344
|
-
u.has(s.from) && u.has(s.to) &&
|
|
345
|
-
const v = 0, h = 1,
|
|
346
|
-
|
|
347
|
-
for (const p of
|
|
348
|
-
const x =
|
|
349
|
-
x === h ?
|
|
389
|
+
} = e, l = t.map((s) => s.id), u = new Set(l), g = /* @__PURE__ */ new Map();
|
|
390
|
+
for (const s of l) g.set(s, []);
|
|
391
|
+
for (const s of n)
|
|
392
|
+
u.has(s.from) && u.has(s.to) && g.get(s.from).push(s.to);
|
|
393
|
+
const v = 0, h = 1, k = 2, T = new Map(l.map((s) => [s, v])), C = /* @__PURE__ */ new Set(), P = (s, p) => `${s}\0${p}`, M = (s) => {
|
|
394
|
+
T.set(s, h);
|
|
395
|
+
for (const p of g.get(s) ?? []) {
|
|
396
|
+
const x = T.get(p);
|
|
397
|
+
x === h ? C.add(P(s, p)) : x === v && M(p);
|
|
350
398
|
}
|
|
351
|
-
|
|
399
|
+
T.set(s, k);
|
|
352
400
|
};
|
|
353
|
-
for (const s of
|
|
354
|
-
const
|
|
355
|
-
(s) => u.has(s.from) && u.has(s.to) && !
|
|
356
|
-
),
|
|
357
|
-
for (const s of
|
|
358
|
-
|
|
359
|
-
const
|
|
360
|
-
for (;
|
|
361
|
-
const s =
|
|
362
|
-
for (const x of
|
|
363
|
-
|
|
401
|
+
for (const s of l) T.get(s) === v && M(s);
|
|
402
|
+
const $ = n.filter(
|
|
403
|
+
(s) => u.has(s.from) && u.has(s.to) && !C.has(P(s.from, s.to))
|
|
404
|
+
), b = new Map(l.map((s) => [s, 0])), F = new Map(l.map((s) => [s, []]));
|
|
405
|
+
for (const s of $)
|
|
406
|
+
F.get(s.from).push(s.to), b.set(s.to, (b.get(s.to) ?? 0) + 1);
|
|
407
|
+
const A = new Map(l.map((s) => [s, 0])), z = l.filter((s) => (b.get(s) ?? 0) === 0);
|
|
408
|
+
for (; z.length > 0; ) {
|
|
409
|
+
const s = z.shift(), p = A.get(s);
|
|
410
|
+
for (const x of F.get(s))
|
|
411
|
+
A.set(x, Math.max(A.get(x), p + 1)), b.set(x, b.get(x) - 1), b.get(x) === 0 && z.push(x);
|
|
364
412
|
}
|
|
365
|
-
const
|
|
366
|
-
for (const s of
|
|
367
|
-
const p =
|
|
368
|
-
|
|
413
|
+
const B = /* @__PURE__ */ new Map();
|
|
414
|
+
for (const s of l) {
|
|
415
|
+
const p = A.get(s);
|
|
416
|
+
B.has(p) || B.set(p, []), B.get(p).push(s);
|
|
369
417
|
}
|
|
370
|
-
const E = [
|
|
418
|
+
const E = [...B.keys()].sort((s, p) => s - p), S = r === "vertical", X = (s) => s * (S ? a : o) + Math.max(0, s - 1) * f, q = Math.max(
|
|
371
419
|
0,
|
|
372
|
-
...E.map((s) => X(
|
|
373
|
-
),
|
|
420
|
+
...E.map((s) => X(B.get(s).length))
|
|
421
|
+
), N = /* @__PURE__ */ new Map(), V = [];
|
|
374
422
|
E.forEach((s, p) => {
|
|
375
|
-
const x =
|
|
423
|
+
const x = B.get(s), R = X(x.length), _ = d + (q - R) / 2, I = d + p * ((S ? o : a) + c);
|
|
376
424
|
x.forEach((U, Q) => {
|
|
377
|
-
const ee =
|
|
378
|
-
|
|
379
|
-
}),
|
|
425
|
+
const ee = _ + Q * ((S ? a : o) + f), ye = S ? ee : I, me = S ? I : ee;
|
|
426
|
+
N.set(U, { id: U, x: ye, y: me, rank: s, order: Q });
|
|
427
|
+
}), V.push({
|
|
380
428
|
rank: s,
|
|
381
|
-
x:
|
|
382
|
-
y:
|
|
383
|
-
width:
|
|
384
|
-
height:
|
|
429
|
+
x: S ? _ : I,
|
|
430
|
+
y: S ? I : _,
|
|
431
|
+
width: S ? R : a,
|
|
432
|
+
height: S ? o : R,
|
|
385
433
|
nodeIds: x
|
|
386
434
|
});
|
|
387
435
|
});
|
|
388
|
-
const
|
|
436
|
+
const Y = (s, p) => s ? S ? {
|
|
389
437
|
x: s.x + a / 2,
|
|
390
438
|
y: p === "source" ? s.y + o : s.y
|
|
391
439
|
} : {
|
|
392
440
|
x: p === "source" ? s.x + a : s.x,
|
|
393
441
|
y: s.y + o / 2
|
|
394
|
-
} : { x: 0, y: 0 }, pe =
|
|
395
|
-
const p =
|
|
442
|
+
} : { x: 0, y: 0 }, pe = n.filter((s) => u.has(s.from) && u.has(s.to)).map((s) => {
|
|
443
|
+
const p = Y(N.get(s.from), "source"), x = Y(N.get(s.to), "target");
|
|
396
444
|
return {
|
|
397
445
|
from: s.from,
|
|
398
446
|
to: s.to,
|
|
@@ -400,22 +448,22 @@ function ft(e) {
|
|
|
400
448
|
sourceY: p.y,
|
|
401
449
|
targetX: x.x,
|
|
402
450
|
targetY: x.y,
|
|
403
|
-
isBackEdge:
|
|
451
|
+
isBackEdge: C.has(P(s.from, s.to))
|
|
404
452
|
};
|
|
405
|
-
}), Z = d * 2 + E.length * (
|
|
453
|
+
}), Z = d * 2 + E.length * (S ? o : a) + Math.max(0, E.length - 1) * c, J = d * 2 + q;
|
|
406
454
|
return {
|
|
407
|
-
nodes: [...
|
|
455
|
+
nodes: [...N.values()],
|
|
408
456
|
edges: pe,
|
|
409
|
-
ranks:
|
|
410
|
-
direction:
|
|
411
|
-
width:
|
|
412
|
-
height:
|
|
457
|
+
ranks: V,
|
|
458
|
+
direction: r,
|
|
459
|
+
width: S ? J : Z,
|
|
460
|
+
height: S ? Z : J
|
|
413
461
|
};
|
|
414
462
|
}
|
|
415
|
-
function
|
|
463
|
+
function mt({
|
|
416
464
|
additions: e = 0,
|
|
417
465
|
deletions: t = 0,
|
|
418
|
-
style:
|
|
466
|
+
style: n
|
|
419
467
|
}) {
|
|
420
468
|
return e === 0 && t === 0 ? null : /* @__PURE__ */ y(
|
|
421
469
|
"span",
|
|
@@ -426,14 +474,14 @@ function ht({
|
|
|
426
474
|
fontVariantNumeric: "tabular-nums",
|
|
427
475
|
fontSize: 12,
|
|
428
476
|
fontWeight: 600,
|
|
429
|
-
...
|
|
477
|
+
...n
|
|
430
478
|
},
|
|
431
479
|
children: [
|
|
432
|
-
e > 0 && /* @__PURE__ */ y("span", { style: { color:
|
|
480
|
+
e > 0 && /* @__PURE__ */ y("span", { style: { color: w.added }, children: [
|
|
433
481
|
"+",
|
|
434
482
|
e
|
|
435
483
|
] }),
|
|
436
|
-
t > 0 && /* @__PURE__ */ y("span", { style: { color:
|
|
484
|
+
t > 0 && /* @__PURE__ */ y("span", { style: { color: w.deleted }, children: [
|
|
437
485
|
"-",
|
|
438
486
|
t
|
|
439
487
|
] })
|
|
@@ -441,19 +489,19 @@ function ht({
|
|
|
441
489
|
}
|
|
442
490
|
);
|
|
443
491
|
}
|
|
444
|
-
const
|
|
492
|
+
const tt = {
|
|
445
493
|
added: "+",
|
|
446
494
|
removed: "-",
|
|
447
495
|
unchanged: " "
|
|
448
496
|
};
|
|
449
|
-
function
|
|
497
|
+
function gt({
|
|
450
498
|
lines: e,
|
|
451
499
|
showLineNumbers: t = !0,
|
|
452
|
-
coloredLineNumbers:
|
|
453
|
-
showAccentStrip:
|
|
500
|
+
coloredLineNumbers: n = !0,
|
|
501
|
+
showAccentStrip: r = !0,
|
|
454
502
|
style: a
|
|
455
503
|
}) {
|
|
456
|
-
const o =
|
|
504
|
+
const o = m(), c = (l) => l === "added" ? o.diff.insertedLine : l === "removed" ? o.diff.removedLine : "transparent", f = (l) => l === "added" ? o.diff.stripAdded : l === "removed" ? o.diff.stripRemoved : "transparent", d = (l) => n && l === "added" ? w.added : n && l === "removed" ? w.deleted : o.text.tertiary;
|
|
457
505
|
return /* @__PURE__ */ i(
|
|
458
506
|
"div",
|
|
459
507
|
{
|
|
@@ -465,14 +513,14 @@ function pt({
|
|
|
465
513
|
overflowX: "auto",
|
|
466
514
|
...a
|
|
467
515
|
},
|
|
468
|
-
children: e.map((
|
|
516
|
+
children: e.map((l, u) => /* @__PURE__ */ y(
|
|
469
517
|
"div",
|
|
470
518
|
{
|
|
471
519
|
style: {
|
|
472
520
|
display: "flex",
|
|
473
521
|
alignItems: "stretch",
|
|
474
|
-
background: l
|
|
475
|
-
borderLeft:
|
|
522
|
+
background: c(l.type),
|
|
523
|
+
borderLeft: r ? `3px solid ${f(l.type)}` : void 0
|
|
476
524
|
},
|
|
477
525
|
children: [
|
|
478
526
|
t && /* @__PURE__ */ i(
|
|
@@ -484,9 +532,9 @@ function pt({
|
|
|
484
532
|
textAlign: "right",
|
|
485
533
|
paddingRight: 10,
|
|
486
534
|
userSelect: "none",
|
|
487
|
-
color: d(
|
|
535
|
+
color: d(l.type)
|
|
488
536
|
},
|
|
489
|
-
children:
|
|
537
|
+
children: l.lineNumber ?? ""
|
|
490
538
|
}
|
|
491
539
|
),
|
|
492
540
|
/* @__PURE__ */ i(
|
|
@@ -497,9 +545,9 @@ function pt({
|
|
|
497
545
|
width: 14,
|
|
498
546
|
textAlign: "center",
|
|
499
547
|
userSelect: "none",
|
|
500
|
-
color: d(
|
|
548
|
+
color: d(l.type)
|
|
501
549
|
},
|
|
502
|
-
children:
|
|
550
|
+
children: tt[l.type]
|
|
503
551
|
}
|
|
504
552
|
),
|
|
505
553
|
/* @__PURE__ */ i(
|
|
@@ -511,7 +559,7 @@ function pt({
|
|
|
511
559
|
whiteSpace: "pre",
|
|
512
560
|
fontFamily: "inherit"
|
|
513
561
|
},
|
|
514
|
-
children:
|
|
562
|
+
children: l.content
|
|
515
563
|
}
|
|
516
564
|
)
|
|
517
565
|
]
|
|
@@ -521,8 +569,8 @@ function pt({
|
|
|
521
569
|
}
|
|
522
570
|
);
|
|
523
571
|
}
|
|
524
|
-
function
|
|
525
|
-
const t =
|
|
572
|
+
function nt({ status: e }) {
|
|
573
|
+
const t = m(), n = e === "completed" ? w.success : e === "in_progress" ? t.accent.primary : e === "cancelled" ? w.danger : t.text.tertiary;
|
|
526
574
|
return /* @__PURE__ */ y(
|
|
527
575
|
"svg",
|
|
528
576
|
{
|
|
@@ -533,23 +581,23 @@ function Qe({ status: e }) {
|
|
|
533
581
|
style: { flex: "0 0 auto", marginTop: 3 },
|
|
534
582
|
"aria-hidden": !0,
|
|
535
583
|
children: [
|
|
536
|
-
/* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 6, stroke:
|
|
584
|
+
/* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 6, stroke: n, strokeWidth: 1.4 }),
|
|
537
585
|
e === "completed" && /* @__PURE__ */ i(
|
|
538
586
|
"path",
|
|
539
587
|
{
|
|
540
588
|
d: "M4 7.2l2 2 4-4.4",
|
|
541
|
-
stroke:
|
|
589
|
+
stroke: n,
|
|
542
590
|
strokeWidth: 1.4,
|
|
543
591
|
strokeLinecap: "round",
|
|
544
592
|
strokeLinejoin: "round"
|
|
545
593
|
}
|
|
546
594
|
),
|
|
547
|
-
e === "in_progress" && /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 3, fill:
|
|
595
|
+
e === "in_progress" && /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 3, fill: n }),
|
|
548
596
|
e === "cancelled" && /* @__PURE__ */ i(
|
|
549
597
|
"path",
|
|
550
598
|
{
|
|
551
599
|
d: "M4.8 4.8l4.4 4.4M9.2 4.8l-4.4 4.4",
|
|
552
|
-
stroke:
|
|
600
|
+
stroke: n,
|
|
553
601
|
strokeWidth: 1.4,
|
|
554
602
|
strokeLinecap: "round"
|
|
555
603
|
}
|
|
@@ -558,20 +606,20 @@ function Qe({ status: e }) {
|
|
|
558
606
|
}
|
|
559
607
|
);
|
|
560
608
|
}
|
|
561
|
-
function
|
|
609
|
+
function rt({
|
|
562
610
|
todos: e,
|
|
563
611
|
dimmedTodoIds: t,
|
|
564
|
-
onTodoClick:
|
|
565
|
-
style:
|
|
612
|
+
onTodoClick: n,
|
|
613
|
+
style: r
|
|
566
614
|
}) {
|
|
567
|
-
const a =
|
|
568
|
-
return e.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...
|
|
569
|
-
const
|
|
615
|
+
const a = m();
|
|
616
|
+
return e.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...r }, children: e.map((o) => {
|
|
617
|
+
const c = t == null ? void 0 : t.has(o.id);
|
|
570
618
|
return /* @__PURE__ */ y(
|
|
571
619
|
"button",
|
|
572
620
|
{
|
|
573
621
|
type: "button",
|
|
574
|
-
onClick: () =>
|
|
622
|
+
onClick: () => n == null ? void 0 : n(o),
|
|
575
623
|
style: {
|
|
576
624
|
display: "flex",
|
|
577
625
|
gap: 8,
|
|
@@ -581,14 +629,14 @@ function et({
|
|
|
581
629
|
padding: "4px 6px",
|
|
582
630
|
background: "transparent",
|
|
583
631
|
border: "none",
|
|
584
|
-
cursor:
|
|
632
|
+
cursor: n ? "pointer" : "default",
|
|
585
633
|
color: a.text.primary,
|
|
586
634
|
fontSize: 14,
|
|
587
635
|
lineHeight: "20px",
|
|
588
|
-
opacity:
|
|
636
|
+
opacity: c ? 0.45 : 1
|
|
589
637
|
},
|
|
590
638
|
children: [
|
|
591
|
-
/* @__PURE__ */ i(
|
|
639
|
+
/* @__PURE__ */ i(nt, { status: o.status }),
|
|
592
640
|
/* @__PURE__ */ i(
|
|
593
641
|
"span",
|
|
594
642
|
{
|
|
@@ -605,16 +653,16 @@ function et({
|
|
|
605
653
|
);
|
|
606
654
|
}) });
|
|
607
655
|
}
|
|
608
|
-
function
|
|
656
|
+
function xt({
|
|
609
657
|
todos: e,
|
|
610
658
|
dimmedTodoIds: t,
|
|
611
|
-
defaultExpanded:
|
|
612
|
-
onTodoClick:
|
|
659
|
+
defaultExpanded: n = !1,
|
|
660
|
+
onTodoClick: r,
|
|
613
661
|
style: a
|
|
614
662
|
}) {
|
|
615
|
-
const o =
|
|
663
|
+
const o = m(), [c, f] = D(n);
|
|
616
664
|
if (e.length === 0) return null;
|
|
617
|
-
const d = e.filter((
|
|
665
|
+
const d = e.filter((l) => l.status === "completed").length;
|
|
618
666
|
return /* @__PURE__ */ y(
|
|
619
667
|
"div",
|
|
620
668
|
{
|
|
@@ -629,7 +677,7 @@ function yt({
|
|
|
629
677
|
"button",
|
|
630
678
|
{
|
|
631
679
|
type: "button",
|
|
632
|
-
onClick: () => f((
|
|
680
|
+
onClick: () => f((l) => !l),
|
|
633
681
|
style: {
|
|
634
682
|
display: "flex",
|
|
635
683
|
alignItems: "center",
|
|
@@ -652,7 +700,7 @@ function yt({
|
|
|
652
700
|
viewBox: "0 0 12 12",
|
|
653
701
|
fill: "none",
|
|
654
702
|
style: {
|
|
655
|
-
transform:
|
|
703
|
+
transform: c ? "rotate(90deg)" : "none",
|
|
656
704
|
transition: "transform 120ms"
|
|
657
705
|
},
|
|
658
706
|
"aria-hidden": !0,
|
|
@@ -679,98 +727,98 @@ function yt({
|
|
|
679
727
|
]
|
|
680
728
|
}
|
|
681
729
|
),
|
|
682
|
-
|
|
683
|
-
|
|
730
|
+
c && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
|
|
731
|
+
rt,
|
|
684
732
|
{
|
|
685
733
|
todos: e,
|
|
686
734
|
dimmedTodoIds: t,
|
|
687
|
-
onTodoClick:
|
|
735
|
+
onTodoClick: r
|
|
688
736
|
}
|
|
689
737
|
) })
|
|
690
738
|
]
|
|
691
739
|
}
|
|
692
740
|
);
|
|
693
741
|
}
|
|
694
|
-
function
|
|
695
|
-
const
|
|
742
|
+
function vt(e, t) {
|
|
743
|
+
const n = `canvas:${e}`, [r, a] = D(() => {
|
|
696
744
|
if (typeof localStorage > "u") return t;
|
|
697
745
|
try {
|
|
698
|
-
const
|
|
699
|
-
return
|
|
746
|
+
const c = localStorage.getItem(n);
|
|
747
|
+
return c === null ? t : JSON.parse(c);
|
|
700
748
|
} catch {
|
|
701
749
|
return t;
|
|
702
750
|
}
|
|
703
|
-
}), o =
|
|
704
|
-
(
|
|
751
|
+
}), o = G(
|
|
752
|
+
(c) => {
|
|
705
753
|
a((f) => {
|
|
706
|
-
const d = typeof
|
|
754
|
+
const d = typeof c == "function" ? c(f) : c;
|
|
707
755
|
try {
|
|
708
|
-
localStorage == null || localStorage.setItem(
|
|
756
|
+
localStorage == null || localStorage.setItem(n, JSON.stringify(d));
|
|
709
757
|
} catch {
|
|
710
758
|
}
|
|
711
759
|
return d;
|
|
712
760
|
});
|
|
713
761
|
},
|
|
714
|
-
[
|
|
762
|
+
[n]
|
|
715
763
|
);
|
|
716
|
-
return [
|
|
764
|
+
return [r, o];
|
|
717
765
|
}
|
|
718
|
-
function
|
|
719
|
-
return
|
|
766
|
+
function bt() {
|
|
767
|
+
return G((e) => {
|
|
720
768
|
}, []);
|
|
721
769
|
}
|
|
722
|
-
function
|
|
770
|
+
function St(e, t) {
|
|
723
771
|
return { ...e, ...t };
|
|
724
772
|
}
|
|
725
|
-
function j(e, t,
|
|
726
|
-
const
|
|
773
|
+
function j(e, t, n) {
|
|
774
|
+
const r = e.typography[t];
|
|
727
775
|
return {
|
|
728
776
|
fontFamily: e.typography.fontFamily,
|
|
729
|
-
fontSize:
|
|
730
|
-
lineHeight:
|
|
731
|
-
fontWeight:
|
|
777
|
+
fontSize: r.fontSize,
|
|
778
|
+
lineHeight: r.lineHeight,
|
|
779
|
+
fontWeight: r.fontWeight,
|
|
732
780
|
color: e.text.primary,
|
|
733
781
|
margin: 0,
|
|
734
|
-
...
|
|
782
|
+
...n
|
|
735
783
|
};
|
|
736
784
|
}
|
|
737
|
-
function
|
|
738
|
-
const
|
|
739
|
-
return /* @__PURE__ */ i(
|
|
785
|
+
function kt({ children: e, style: t }) {
|
|
786
|
+
const n = m();
|
|
787
|
+
return /* @__PURE__ */ i(W, { order: 1, style: j(n, "h1", t), children: e });
|
|
740
788
|
}
|
|
741
|
-
function
|
|
742
|
-
const
|
|
743
|
-
return /* @__PURE__ */ i(
|
|
789
|
+
function wt({ children: e, style: t }) {
|
|
790
|
+
const n = m();
|
|
791
|
+
return /* @__PURE__ */ i(W, { order: 2, style: j(n, "h2", t), children: e });
|
|
744
792
|
}
|
|
745
|
-
function
|
|
746
|
-
const
|
|
747
|
-
return /* @__PURE__ */ i(
|
|
793
|
+
function Ct({ children: e, style: t }) {
|
|
794
|
+
const n = m();
|
|
795
|
+
return /* @__PURE__ */ i(W, { order: 3, style: j(n, "h3", t), children: e });
|
|
748
796
|
}
|
|
749
|
-
const
|
|
797
|
+
const ot = {
|
|
750
798
|
normal: 400,
|
|
751
799
|
medium: 500,
|
|
752
800
|
semibold: 600,
|
|
753
801
|
bold: 700
|
|
754
802
|
};
|
|
755
|
-
function
|
|
803
|
+
function Lt({
|
|
756
804
|
children: e,
|
|
757
805
|
tone: t = "primary",
|
|
758
|
-
size:
|
|
759
|
-
as:
|
|
806
|
+
size: n = "body",
|
|
807
|
+
as: r = "p",
|
|
760
808
|
weight: a = "normal",
|
|
761
809
|
italic: o,
|
|
762
|
-
truncate:
|
|
810
|
+
truncate: c,
|
|
763
811
|
style: f
|
|
764
812
|
}) {
|
|
765
|
-
const d =
|
|
813
|
+
const d = m();
|
|
766
814
|
return /* @__PURE__ */ i(
|
|
767
815
|
H,
|
|
768
816
|
{
|
|
769
|
-
component:
|
|
770
|
-
size:
|
|
771
|
-
fw:
|
|
817
|
+
component: r,
|
|
818
|
+
size: n === "small" ? "xs" : "sm",
|
|
819
|
+
fw: ot[a],
|
|
772
820
|
c: t === "primary" ? void 0 : d.text[t],
|
|
773
|
-
truncate:
|
|
821
|
+
truncate: c,
|
|
774
822
|
style: {
|
|
775
823
|
fontStyle: o ? "italic" : void 0,
|
|
776
824
|
...t === "primary" ? { color: d.text.primary } : void 0,
|
|
@@ -781,17 +829,17 @@ function kt({
|
|
|
781
829
|
}
|
|
782
830
|
);
|
|
783
831
|
}
|
|
784
|
-
function
|
|
785
|
-
const
|
|
832
|
+
function Tt({ children: e, style: t }) {
|
|
833
|
+
const n = m();
|
|
786
834
|
return /* @__PURE__ */ i(
|
|
787
835
|
"code",
|
|
788
836
|
{
|
|
789
837
|
style: {
|
|
790
838
|
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", monospace',
|
|
791
839
|
fontSize: "0.92em",
|
|
792
|
-
color:
|
|
793
|
-
background:
|
|
794
|
-
borderRadius:
|
|
840
|
+
color: n.text.primary,
|
|
841
|
+
background: n.fill.secondary,
|
|
842
|
+
borderRadius: n.radius.sm,
|
|
795
843
|
padding: "1px 4px",
|
|
796
844
|
...t
|
|
797
845
|
},
|
|
@@ -799,34 +847,34 @@ function Ct({ children: e, style: t }) {
|
|
|
799
847
|
}
|
|
800
848
|
);
|
|
801
849
|
}
|
|
802
|
-
function
|
|
803
|
-
const
|
|
850
|
+
function Pt({ children: e, href: t, style: n }) {
|
|
851
|
+
const r = m();
|
|
804
852
|
return /* @__PURE__ */ i(
|
|
805
853
|
"a",
|
|
806
854
|
{
|
|
807
855
|
href: t,
|
|
808
856
|
target: "_blank",
|
|
809
857
|
rel: "noreferrer",
|
|
810
|
-
style: { color:
|
|
858
|
+
style: { color: r.text.link, ...n },
|
|
811
859
|
children: e
|
|
812
860
|
}
|
|
813
861
|
);
|
|
814
862
|
}
|
|
815
|
-
function
|
|
816
|
-
return /* @__PURE__ */ i(Pe, { gap: t, style:
|
|
863
|
+
function At({ children: e, gap: t, style: n }) {
|
|
864
|
+
return /* @__PURE__ */ i(Pe, { gap: t, style: n, children: e });
|
|
817
865
|
}
|
|
818
|
-
const
|
|
866
|
+
const re = {
|
|
819
867
|
start: "flex-start",
|
|
820
868
|
center: "center",
|
|
821
869
|
end: "flex-end",
|
|
822
870
|
stretch: "stretch",
|
|
823
871
|
"space-between": "space-between"
|
|
824
872
|
};
|
|
825
|
-
function
|
|
873
|
+
function Mt({
|
|
826
874
|
children: e,
|
|
827
875
|
gap: t,
|
|
828
|
-
align:
|
|
829
|
-
justify:
|
|
876
|
+
align: n = "center",
|
|
877
|
+
justify: r = "start",
|
|
830
878
|
wrap: a = !1,
|
|
831
879
|
style: o
|
|
832
880
|
}) {
|
|
@@ -834,18 +882,18 @@ function Tt({
|
|
|
834
882
|
Le,
|
|
835
883
|
{
|
|
836
884
|
gap: t,
|
|
837
|
-
align:
|
|
838
|
-
justify:
|
|
885
|
+
align: re[n],
|
|
886
|
+
justify: re[r],
|
|
839
887
|
wrap: a ? "wrap" : "nowrap",
|
|
840
888
|
style: o,
|
|
841
889
|
children: e
|
|
842
890
|
}
|
|
843
891
|
);
|
|
844
892
|
}
|
|
845
|
-
function
|
|
893
|
+
function Bt() {
|
|
846
894
|
return /* @__PURE__ */ i("div", { style: { flex: 1 } });
|
|
847
895
|
}
|
|
848
|
-
function
|
|
896
|
+
function $t({ children: e, columns: t, gap: n = 16, align: r, style: a }) {
|
|
849
897
|
const o = typeof t == "number" ? `repeat(${t}, minmax(0, 1fr))` : t;
|
|
850
898
|
return /* @__PURE__ */ i(
|
|
851
899
|
"div",
|
|
@@ -853,35 +901,35 @@ function Mt({ children: e, columns: t, gap: r = 16, align: n, style: a }) {
|
|
|
853
901
|
style: {
|
|
854
902
|
display: "grid",
|
|
855
903
|
gridTemplateColumns: o,
|
|
856
|
-
gap:
|
|
857
|
-
alignItems:
|
|
904
|
+
gap: n,
|
|
905
|
+
alignItems: r,
|
|
858
906
|
...a
|
|
859
907
|
},
|
|
860
908
|
children: e
|
|
861
909
|
}
|
|
862
910
|
);
|
|
863
911
|
}
|
|
864
|
-
function
|
|
912
|
+
function Dt({ style: e }) {
|
|
865
913
|
return /* @__PURE__ */ i(ke, { style: e });
|
|
866
914
|
}
|
|
867
|
-
const
|
|
915
|
+
const K = $e({
|
|
868
916
|
collapsible: !1,
|
|
869
917
|
open: !0,
|
|
870
918
|
toggle: () => {
|
|
871
919
|
}
|
|
872
920
|
});
|
|
873
|
-
function
|
|
921
|
+
function Ft({
|
|
874
922
|
children: e,
|
|
875
923
|
variant: t = "default",
|
|
876
|
-
collapsible:
|
|
877
|
-
defaultOpen:
|
|
924
|
+
collapsible: n = !1,
|
|
925
|
+
defaultOpen: r = !0,
|
|
878
926
|
open: a,
|
|
879
927
|
onOpenChange: o,
|
|
880
|
-
style:
|
|
928
|
+
style: c
|
|
881
929
|
}) {
|
|
882
|
-
const f =
|
|
930
|
+
const f = m(), [d, l] = D(r), u = a ?? d, g = G(() => {
|
|
883
931
|
const v = !u;
|
|
884
|
-
a === void 0 &&
|
|
932
|
+
a === void 0 && l(v), o == null || o(v);
|
|
885
933
|
}, [u, a, o]);
|
|
886
934
|
return /* @__PURE__ */ i(
|
|
887
935
|
be,
|
|
@@ -892,32 +940,32 @@ function $t({
|
|
|
892
940
|
style: {
|
|
893
941
|
background: f.bg.elevated,
|
|
894
942
|
borderColor: f.stroke.secondary,
|
|
895
|
-
...
|
|
943
|
+
...c
|
|
896
944
|
},
|
|
897
|
-
children: /* @__PURE__ */ i(
|
|
945
|
+
children: /* @__PURE__ */ i(K.Provider, { value: { collapsible: n, open: u, toggle: g }, children: e })
|
|
898
946
|
}
|
|
899
947
|
);
|
|
900
948
|
}
|
|
901
|
-
function
|
|
902
|
-
const
|
|
949
|
+
function Et({ children: e, trailing: t, style: n }) {
|
|
950
|
+
const r = m(), { collapsible: a, open: o, toggle: c } = oe(K);
|
|
903
951
|
return /* @__PURE__ */ y(
|
|
904
952
|
"div",
|
|
905
953
|
{
|
|
906
|
-
onClick: a ?
|
|
954
|
+
onClick: a ? c : void 0,
|
|
907
955
|
style: {
|
|
908
956
|
display: "flex",
|
|
909
957
|
alignItems: "center",
|
|
910
958
|
justifyContent: "space-between",
|
|
911
959
|
gap: 8,
|
|
912
960
|
padding: "8px 14px",
|
|
913
|
-
borderBottom: `1px solid ${
|
|
914
|
-
fontSize:
|
|
915
|
-
fontWeight:
|
|
916
|
-
color:
|
|
917
|
-
fontFamily:
|
|
961
|
+
borderBottom: `1px solid ${r.stroke.secondary}`,
|
|
962
|
+
fontSize: r.typography.small.fontSize,
|
|
963
|
+
fontWeight: r.typography.h3.fontWeight,
|
|
964
|
+
color: r.text.primary,
|
|
965
|
+
fontFamily: r.typography.fontFamily,
|
|
918
966
|
cursor: a ? "pointer" : void 0,
|
|
919
967
|
userSelect: a ? "none" : void 0,
|
|
920
|
-
...
|
|
968
|
+
...n
|
|
921
969
|
},
|
|
922
970
|
children: [
|
|
923
971
|
/* @__PURE__ */ y("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
|
|
@@ -929,9 +977,9 @@ function Bt({ children: e, trailing: t, style: r }) {
|
|
|
929
977
|
}
|
|
930
978
|
);
|
|
931
979
|
}
|
|
932
|
-
function
|
|
933
|
-
const { collapsible:
|
|
934
|
-
return
|
|
980
|
+
function Nt({ children: e, style: t }) {
|
|
981
|
+
const { collapsible: n, open: r } = oe(K);
|
|
982
|
+
return n && !r ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...t }, children: e });
|
|
935
983
|
}
|
|
936
984
|
function he({ expanded: e }) {
|
|
937
985
|
return /* @__PURE__ */ i(
|
|
@@ -959,9 +1007,9 @@ function he({ expanded: e }) {
|
|
|
959
1007
|
}
|
|
960
1008
|
);
|
|
961
1009
|
}
|
|
962
|
-
function
|
|
963
|
-
const a =
|
|
964
|
-
return /* @__PURE__ */ y("div", { style:
|
|
1010
|
+
function It({ value: e, label: t, tone: n, style: r }) {
|
|
1011
|
+
const a = m();
|
|
1012
|
+
return /* @__PURE__ */ y("div", { style: r, children: [
|
|
965
1013
|
/* @__PURE__ */ i(
|
|
966
1014
|
H,
|
|
967
1015
|
{
|
|
@@ -969,7 +1017,7 @@ function Et({ value: e, label: t, tone: r, style: n }) {
|
|
|
969
1017
|
fw: 700,
|
|
970
1018
|
lh: 1.2,
|
|
971
1019
|
style: {
|
|
972
|
-
color:
|
|
1020
|
+
color: n ? w[n] : a.text.primary,
|
|
973
1021
|
fontFamily: a.typography.fontFamily
|
|
974
1022
|
},
|
|
975
1023
|
children: e
|
|
@@ -988,26 +1036,26 @@ function Et({ value: e, label: t, tone: r, style: n }) {
|
|
|
988
1036
|
)
|
|
989
1037
|
] });
|
|
990
1038
|
}
|
|
991
|
-
function
|
|
1039
|
+
function zt({
|
|
992
1040
|
children: e,
|
|
993
1041
|
active: t,
|
|
994
|
-
tone:
|
|
995
|
-
size:
|
|
1042
|
+
tone: n = "neutral",
|
|
1043
|
+
size: r = "md",
|
|
996
1044
|
leadingContent: a,
|
|
997
1045
|
keyboardHint: o,
|
|
998
|
-
title:
|
|
1046
|
+
title: c,
|
|
999
1047
|
style: f,
|
|
1000
1048
|
onClick: d
|
|
1001
1049
|
}) {
|
|
1002
1050
|
return /* @__PURE__ */ i(
|
|
1003
|
-
|
|
1051
|
+
Ce,
|
|
1004
1052
|
{
|
|
1005
|
-
color: ae[
|
|
1053
|
+
color: ae[n],
|
|
1006
1054
|
variant: t ? "filled" : "light",
|
|
1007
|
-
size:
|
|
1055
|
+
size: r === "sm" ? "sm" : "md",
|
|
1008
1056
|
leftSection: a,
|
|
1009
1057
|
rightSection: o,
|
|
1010
|
-
title:
|
|
1058
|
+
title: c,
|
|
1011
1059
|
onClick: d,
|
|
1012
1060
|
style: {
|
|
1013
1061
|
cursor: d ? "pointer" : void 0,
|
|
@@ -1018,65 +1066,65 @@ function Dt({
|
|
|
1018
1066
|
}
|
|
1019
1067
|
);
|
|
1020
1068
|
}
|
|
1021
|
-
function
|
|
1069
|
+
function Rt({
|
|
1022
1070
|
children: e,
|
|
1023
1071
|
tone: t = "neutral",
|
|
1024
|
-
title:
|
|
1025
|
-
icon:
|
|
1072
|
+
title: n,
|
|
1073
|
+
icon: r,
|
|
1026
1074
|
style: a
|
|
1027
1075
|
}) {
|
|
1028
1076
|
return /* @__PURE__ */ i(
|
|
1029
1077
|
ve,
|
|
1030
1078
|
{
|
|
1031
1079
|
color: ae[t],
|
|
1032
|
-
title:
|
|
1033
|
-
icon:
|
|
1080
|
+
title: n,
|
|
1081
|
+
icon: r,
|
|
1034
1082
|
variant: "light",
|
|
1035
1083
|
style: a,
|
|
1036
1084
|
children: e
|
|
1037
1085
|
}
|
|
1038
1086
|
);
|
|
1039
1087
|
}
|
|
1040
|
-
const
|
|
1088
|
+
const at = {
|
|
1041
1089
|
success: "rgba(31,138,101,0.12)",
|
|
1042
1090
|
danger: "rgba(207,45,86,0.12)",
|
|
1043
1091
|
warning: "rgba(232,163,61,0.14)",
|
|
1044
1092
|
info: "rgba(46,121,181,0.12)",
|
|
1045
1093
|
neutral: "rgba(136,136,168,0.12)"
|
|
1046
1094
|
};
|
|
1047
|
-
function
|
|
1095
|
+
function _t({
|
|
1048
1096
|
headers: e,
|
|
1049
1097
|
rows: t,
|
|
1050
|
-
columnAlign:
|
|
1051
|
-
rowTone:
|
|
1098
|
+
columnAlign: n,
|
|
1099
|
+
rowTone: r,
|
|
1052
1100
|
framed: a = !0,
|
|
1053
1101
|
striped: o,
|
|
1054
|
-
stickyHeader:
|
|
1102
|
+
stickyHeader: c,
|
|
1055
1103
|
style: f,
|
|
1056
1104
|
emptyMessage: d
|
|
1057
1105
|
}) {
|
|
1058
1106
|
return /* @__PURE__ */ y(
|
|
1059
|
-
|
|
1107
|
+
L,
|
|
1060
1108
|
{
|
|
1061
1109
|
withTableBorder: a,
|
|
1062
1110
|
withColumnBorders: !1,
|
|
1063
1111
|
striped: o,
|
|
1064
|
-
stickyHeader:
|
|
1112
|
+
stickyHeader: c,
|
|
1065
1113
|
highlightOnHover: !0,
|
|
1066
1114
|
style: f,
|
|
1067
1115
|
children: [
|
|
1068
|
-
/* @__PURE__ */ i(
|
|
1069
|
-
/* @__PURE__ */ i(
|
|
1070
|
-
const
|
|
1116
|
+
/* @__PURE__ */ i(L.Thead, { children: /* @__PURE__ */ i(L.Tr, { children: e.map((l, u) => /* @__PURE__ */ i(L.Th, { ta: (n == null ? void 0 : n[u]) ?? "left", children: l }, u)) }) }),
|
|
1117
|
+
/* @__PURE__ */ i(L.Tbody, { children: t.length === 0 ? /* @__PURE__ */ i(L.Tr, { children: /* @__PURE__ */ i(L.Td, { colSpan: e.length, ta: "center", c: "dimmed", children: d ?? "No data" }) }) : t.map((l, u) => {
|
|
1118
|
+
const g = r == null ? void 0 : r[u];
|
|
1071
1119
|
return /* @__PURE__ */ i(
|
|
1072
|
-
|
|
1120
|
+
L.Tr,
|
|
1073
1121
|
{
|
|
1074
|
-
style:
|
|
1122
|
+
style: g ? { background: at[g] } : void 0,
|
|
1075
1123
|
children: e.map((v, h) => /* @__PURE__ */ i(
|
|
1076
|
-
|
|
1124
|
+
L.Td,
|
|
1077
1125
|
{
|
|
1078
|
-
ta: (
|
|
1079
|
-
children:
|
|
1126
|
+
ta: (n == null ? void 0 : n[h]) ?? "left",
|
|
1127
|
+
children: l[h]
|
|
1080
1128
|
},
|
|
1081
1129
|
h
|
|
1082
1130
|
))
|
|
@@ -1088,63 +1136,63 @@ function Nt({
|
|
|
1088
1136
|
}
|
|
1089
1137
|
);
|
|
1090
1138
|
}
|
|
1091
|
-
const
|
|
1139
|
+
const it = {
|
|
1092
1140
|
primary: "filled",
|
|
1093
1141
|
secondary: "default",
|
|
1094
1142
|
ghost: "subtle"
|
|
1095
1143
|
};
|
|
1096
|
-
function
|
|
1144
|
+
function Ht({
|
|
1097
1145
|
children: e,
|
|
1098
1146
|
variant: t = "secondary",
|
|
1099
|
-
disabled:
|
|
1100
|
-
type:
|
|
1147
|
+
disabled: n,
|
|
1148
|
+
type: r = "button",
|
|
1101
1149
|
style: a,
|
|
1102
1150
|
onClick: o
|
|
1103
1151
|
}) {
|
|
1104
1152
|
return /* @__PURE__ */ i(
|
|
1105
1153
|
xe,
|
|
1106
1154
|
{
|
|
1107
|
-
variant:
|
|
1155
|
+
variant: it[t],
|
|
1108
1156
|
color: t === "primary" ? "accent" : void 0,
|
|
1109
1157
|
size: "xs",
|
|
1110
|
-
disabled:
|
|
1111
|
-
type:
|
|
1158
|
+
disabled: n,
|
|
1159
|
+
type: r,
|
|
1112
1160
|
onClick: o,
|
|
1113
1161
|
style: a,
|
|
1114
1162
|
children: e
|
|
1115
1163
|
}
|
|
1116
1164
|
);
|
|
1117
1165
|
}
|
|
1118
|
-
function
|
|
1166
|
+
function Wt({
|
|
1119
1167
|
children: e,
|
|
1120
1168
|
onClick: t,
|
|
1121
|
-
disabled:
|
|
1122
|
-
title:
|
|
1169
|
+
disabled: n,
|
|
1170
|
+
title: r,
|
|
1123
1171
|
variant: a = "default",
|
|
1124
1172
|
size: o = "md",
|
|
1125
|
-
style:
|
|
1173
|
+
style: c
|
|
1126
1174
|
}) {
|
|
1127
1175
|
return /* @__PURE__ */ i(
|
|
1128
|
-
|
|
1176
|
+
we,
|
|
1129
1177
|
{
|
|
1130
1178
|
variant: a === "circle" ? "light" : "subtle",
|
|
1131
1179
|
radius: a === "circle" ? "xl" : "sm",
|
|
1132
1180
|
size: o === "sm" ? "sm" : "md",
|
|
1133
1181
|
color: "gray",
|
|
1134
|
-
disabled:
|
|
1135
|
-
title:
|
|
1136
|
-
"aria-label":
|
|
1182
|
+
disabled: n,
|
|
1183
|
+
title: r,
|
|
1184
|
+
"aria-label": r,
|
|
1137
1185
|
onClick: t,
|
|
1138
|
-
style:
|
|
1186
|
+
style: c,
|
|
1139
1187
|
children: e
|
|
1140
1188
|
}
|
|
1141
1189
|
);
|
|
1142
1190
|
}
|
|
1143
|
-
function
|
|
1191
|
+
function Gt({
|
|
1144
1192
|
value: e,
|
|
1145
1193
|
onChange: t,
|
|
1146
|
-
options:
|
|
1147
|
-
placeholder:
|
|
1194
|
+
options: n,
|
|
1195
|
+
placeholder: r,
|
|
1148
1196
|
disabled: a,
|
|
1149
1197
|
style: o
|
|
1150
1198
|
}) {
|
|
@@ -1152,96 +1200,96 @@ function Ht({
|
|
|
1152
1200
|
Te,
|
|
1153
1201
|
{
|
|
1154
1202
|
value: e,
|
|
1155
|
-
data:
|
|
1156
|
-
placeholder:
|
|
1203
|
+
data: n,
|
|
1204
|
+
placeholder: r,
|
|
1157
1205
|
disabled: a,
|
|
1158
1206
|
allowDeselect: !1,
|
|
1159
|
-
onChange: (
|
|
1160
|
-
|
|
1207
|
+
onChange: (c) => {
|
|
1208
|
+
c !== null && (t == null || t(c));
|
|
1161
1209
|
},
|
|
1162
1210
|
style: o
|
|
1163
1211
|
}
|
|
1164
1212
|
);
|
|
1165
1213
|
}
|
|
1166
|
-
function
|
|
1214
|
+
function Ot({
|
|
1167
1215
|
checked: e,
|
|
1168
1216
|
onChange: t,
|
|
1169
|
-
disabled:
|
|
1170
|
-
label:
|
|
1217
|
+
disabled: n,
|
|
1218
|
+
label: r,
|
|
1171
1219
|
style: a
|
|
1172
1220
|
}) {
|
|
1173
1221
|
return /* @__PURE__ */ i(
|
|
1174
1222
|
Se,
|
|
1175
1223
|
{
|
|
1176
1224
|
checked: e,
|
|
1177
|
-
disabled:
|
|
1178
|
-
label:
|
|
1225
|
+
disabled: n,
|
|
1226
|
+
label: r,
|
|
1179
1227
|
onChange: (o) => t == null ? void 0 : t(o.currentTarget.checked),
|
|
1180
1228
|
style: a
|
|
1181
1229
|
}
|
|
1182
1230
|
);
|
|
1183
1231
|
}
|
|
1184
|
-
function
|
|
1232
|
+
function jt({
|
|
1185
1233
|
checked: e,
|
|
1186
1234
|
onChange: t,
|
|
1187
|
-
disabled:
|
|
1188
|
-
size:
|
|
1235
|
+
disabled: n,
|
|
1236
|
+
size: r = "sm",
|
|
1189
1237
|
style: a
|
|
1190
1238
|
}) {
|
|
1191
1239
|
return /* @__PURE__ */ i(
|
|
1192
|
-
|
|
1240
|
+
Be,
|
|
1193
1241
|
{
|
|
1194
1242
|
checked: e,
|
|
1195
|
-
disabled:
|
|
1196
|
-
size:
|
|
1243
|
+
disabled: n,
|
|
1244
|
+
size: r === "sm" ? "sm" : "md",
|
|
1197
1245
|
onChange: (o) => t == null ? void 0 : t(o.currentTarget.checked),
|
|
1198
1246
|
style: a
|
|
1199
1247
|
}
|
|
1200
1248
|
);
|
|
1201
1249
|
}
|
|
1202
|
-
function
|
|
1250
|
+
function Kt({
|
|
1203
1251
|
value: e,
|
|
1204
1252
|
onChange: t,
|
|
1205
|
-
placeholder:
|
|
1206
|
-
disabled:
|
|
1253
|
+
placeholder: n,
|
|
1254
|
+
disabled: r,
|
|
1207
1255
|
type: a,
|
|
1208
1256
|
style: o
|
|
1209
1257
|
}) {
|
|
1210
1258
|
return /* @__PURE__ */ i(
|
|
1211
|
-
|
|
1259
|
+
Me,
|
|
1212
1260
|
{
|
|
1213
1261
|
value: e,
|
|
1214
|
-
placeholder:
|
|
1215
|
-
disabled:
|
|
1262
|
+
placeholder: n,
|
|
1263
|
+
disabled: r,
|
|
1216
1264
|
type: a,
|
|
1217
|
-
onChange: (
|
|
1265
|
+
onChange: (c) => t == null ? void 0 : t(c.currentTarget.value),
|
|
1218
1266
|
style: o
|
|
1219
1267
|
}
|
|
1220
1268
|
);
|
|
1221
1269
|
}
|
|
1222
|
-
function
|
|
1270
|
+
function Xt({
|
|
1223
1271
|
value: e,
|
|
1224
1272
|
onChange: t,
|
|
1225
|
-
placeholder:
|
|
1226
|
-
disabled:
|
|
1273
|
+
placeholder: n,
|
|
1274
|
+
disabled: r,
|
|
1227
1275
|
rows: a = 3,
|
|
1228
1276
|
style: o
|
|
1229
1277
|
}) {
|
|
1230
1278
|
return /* @__PURE__ */ i(
|
|
1231
|
-
|
|
1279
|
+
Ae,
|
|
1232
1280
|
{
|
|
1233
1281
|
value: e,
|
|
1234
|
-
placeholder:
|
|
1235
|
-
disabled:
|
|
1282
|
+
placeholder: n,
|
|
1283
|
+
disabled: r,
|
|
1236
1284
|
autosize: !0,
|
|
1237
1285
|
minRows: a,
|
|
1238
|
-
onChange: (
|
|
1286
|
+
onChange: (c) => t == null ? void 0 : t(c.currentTarget.value),
|
|
1239
1287
|
style: o
|
|
1240
1288
|
}
|
|
1241
1289
|
);
|
|
1242
1290
|
}
|
|
1243
|
-
function
|
|
1244
|
-
const
|
|
1291
|
+
function qt({ color: e, style: t }) {
|
|
1292
|
+
const n = m();
|
|
1245
1293
|
return /* @__PURE__ */ i(
|
|
1246
1294
|
"span",
|
|
1247
1295
|
{
|
|
@@ -1250,26 +1298,26 @@ function Ot({ color: e, style: t }) {
|
|
|
1250
1298
|
width: 14,
|
|
1251
1299
|
height: 14,
|
|
1252
1300
|
borderRadius: 4,
|
|
1253
|
-
background:
|
|
1301
|
+
background: n.category[e],
|
|
1254
1302
|
flex: "0 0 auto",
|
|
1255
1303
|
...t
|
|
1256
1304
|
}
|
|
1257
1305
|
}
|
|
1258
1306
|
);
|
|
1259
1307
|
}
|
|
1260
|
-
function
|
|
1308
|
+
function Vt({
|
|
1261
1309
|
segments: e,
|
|
1262
1310
|
total: t,
|
|
1263
|
-
topLeftLabel:
|
|
1264
|
-
topRightLabel:
|
|
1311
|
+
topLeftLabel: n,
|
|
1312
|
+
topRightLabel: r,
|
|
1265
1313
|
style: a
|
|
1266
1314
|
}) {
|
|
1267
|
-
const o =
|
|
1268
|
-
(
|
|
1315
|
+
const o = m(), c = t > 0 ? t : 1, f = e.reduce(
|
|
1316
|
+
(l, u) => l + (Number.isFinite(u.value) && u.value > 0 ? u.value : 0),
|
|
1269
1317
|
0
|
|
1270
|
-
), d = Math.max(0,
|
|
1318
|
+
), d = Math.max(0, c - f);
|
|
1271
1319
|
return /* @__PURE__ */ y("div", { style: a, children: [
|
|
1272
|
-
(
|
|
1320
|
+
(n != null || r != null) && /* @__PURE__ */ y(
|
|
1273
1321
|
"div",
|
|
1274
1322
|
{
|
|
1275
1323
|
style: {
|
|
@@ -1280,31 +1328,31 @@ function Kt({
|
|
|
1280
1328
|
marginBottom: 6
|
|
1281
1329
|
},
|
|
1282
1330
|
children: [
|
|
1283
|
-
/* @__PURE__ */ i("span", { children:
|
|
1284
|
-
/* @__PURE__ */ i("span", { children:
|
|
1331
|
+
/* @__PURE__ */ i("span", { children: n }),
|
|
1332
|
+
/* @__PURE__ */ i("span", { children: r })
|
|
1285
1333
|
]
|
|
1286
1334
|
}
|
|
1287
1335
|
),
|
|
1288
1336
|
/* @__PURE__ */ y("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
|
|
1289
|
-
e.map((
|
|
1290
|
-
const
|
|
1337
|
+
e.map((l, u) => {
|
|
1338
|
+
const g = Number.isFinite(l.value) && l.value > 0 ? l.value : 0, v = o.category[l.color ?? te[u % te.length]];
|
|
1291
1339
|
return /* @__PURE__ */ i(
|
|
1292
1340
|
"div",
|
|
1293
1341
|
{
|
|
1294
1342
|
style: {
|
|
1295
|
-
width: `${
|
|
1343
|
+
width: `${g / c * 100}%`,
|
|
1296
1344
|
background: v,
|
|
1297
1345
|
borderRadius: 3
|
|
1298
1346
|
}
|
|
1299
1347
|
},
|
|
1300
|
-
|
|
1348
|
+
l.id
|
|
1301
1349
|
);
|
|
1302
1350
|
}),
|
|
1303
1351
|
d > 0 && /* @__PURE__ */ i(
|
|
1304
1352
|
"div",
|
|
1305
1353
|
{
|
|
1306
1354
|
style: {
|
|
1307
|
-
width: `${d /
|
|
1355
|
+
width: `${d / c * 100}%`,
|
|
1308
1356
|
background: o.fill.tertiary,
|
|
1309
1357
|
borderRadius: 3
|
|
1310
1358
|
}
|
|
@@ -1313,21 +1361,21 @@ function Kt({
|
|
|
1313
1361
|
] })
|
|
1314
1362
|
] });
|
|
1315
1363
|
}
|
|
1316
|
-
function
|
|
1364
|
+
function Yt({
|
|
1317
1365
|
title: e,
|
|
1318
1366
|
leading: t,
|
|
1319
|
-
count:
|
|
1320
|
-
trailing:
|
|
1367
|
+
count: n,
|
|
1368
|
+
trailing: r,
|
|
1321
1369
|
children: a,
|
|
1322
1370
|
defaultOpen: o = !1,
|
|
1323
|
-
style:
|
|
1371
|
+
style: c
|
|
1324
1372
|
}) {
|
|
1325
|
-
const f =
|
|
1326
|
-
return /* @__PURE__ */ y("div", { style:
|
|
1373
|
+
const f = m(), [d, l] = D(o);
|
|
1374
|
+
return /* @__PURE__ */ y("div", { style: c, children: [
|
|
1327
1375
|
/* @__PURE__ */ y(
|
|
1328
1376
|
"div",
|
|
1329
1377
|
{
|
|
1330
|
-
onClick: () =>
|
|
1378
|
+
onClick: () => l((u) => !u),
|
|
1331
1379
|
style: {
|
|
1332
1380
|
display: "flex",
|
|
1333
1381
|
alignItems: "center",
|
|
@@ -1342,9 +1390,9 @@ function Xt({
|
|
|
1342
1390
|
/* @__PURE__ */ i(he, { expanded: d }),
|
|
1343
1391
|
t,
|
|
1344
1392
|
/* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: e }),
|
|
1345
|
-
|
|
1393
|
+
n != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary, fontSize: 12 }, children: n }),
|
|
1346
1394
|
/* @__PURE__ */ i("span", { style: { flex: 1 } }),
|
|
1347
|
-
|
|
1395
|
+
r != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary }, children: r })
|
|
1348
1396
|
]
|
|
1349
1397
|
}
|
|
1350
1398
|
),
|
|
@@ -1352,58 +1400,58 @@ function Xt({
|
|
|
1352
1400
|
] });
|
|
1353
1401
|
}
|
|
1354
1402
|
export {
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1403
|
+
ht as BarChart,
|
|
1404
|
+
Ht as Button,
|
|
1405
|
+
Rt as Callout,
|
|
1406
|
+
Ft as Card,
|
|
1407
|
+
Nt as CardBody,
|
|
1408
|
+
Et as CardHeader,
|
|
1409
|
+
Ot as Checkbox,
|
|
1410
|
+
Tt as Code,
|
|
1411
|
+
Yt as CollapsibleSection,
|
|
1412
|
+
mt as DiffStats,
|
|
1413
|
+
gt as DiffView,
|
|
1414
|
+
Dt as Divider,
|
|
1415
|
+
$t as Grid,
|
|
1416
|
+
kt as H1,
|
|
1417
|
+
wt as H2,
|
|
1418
|
+
Ct as H3,
|
|
1419
|
+
Wt as IconButton,
|
|
1420
|
+
ft as LineChart,
|
|
1421
|
+
Pt as Link,
|
|
1422
|
+
pt as PieChart,
|
|
1423
|
+
zt as Pill,
|
|
1424
|
+
Mt as Row,
|
|
1425
|
+
Gt as Select,
|
|
1426
|
+
Bt as Spacer,
|
|
1427
|
+
At as Stack,
|
|
1428
|
+
It as Stat,
|
|
1429
|
+
qt as Swatch,
|
|
1430
|
+
_t as Table,
|
|
1431
|
+
Lt as Text,
|
|
1432
|
+
Xt as TextArea,
|
|
1433
|
+
Kt as TextInput,
|
|
1434
|
+
rt as TodoList,
|
|
1435
|
+
xt as TodoListCard,
|
|
1436
|
+
jt as Toggle,
|
|
1437
|
+
Vt as UsageBar,
|
|
1438
|
+
rn as canvasPaletteDark,
|
|
1439
|
+
on as canvasPaletteGrokDark,
|
|
1440
|
+
an as canvasPaletteGrokLight,
|
|
1441
|
+
sn as canvasPaletteLight,
|
|
1442
|
+
ln as canvasTokens,
|
|
1443
|
+
cn as canvasTokensLight,
|
|
1444
|
+
dn as categoryPaletteDark,
|
|
1445
|
+
un as categoryPaletteLight,
|
|
1446
|
+
fn as colorPalette,
|
|
1447
|
+
yt as computeDAGLayout,
|
|
1448
|
+
St as mergeStyle,
|
|
1401
1449
|
te as usageColorSequence,
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1450
|
+
bt as useCanvasAction,
|
|
1451
|
+
vt as useCanvasState,
|
|
1452
|
+
Ut as useEffect,
|
|
1453
|
+
m as useHostTheme,
|
|
1454
|
+
Qt as useMemo,
|
|
1455
|
+
en as useRef,
|
|
1456
|
+
tn as useState
|
|
1409
1457
|
};
|