@peasant-labs/fairtrade 0.0.0 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/components.css +1 -1
- package/dist/lib/icons.js +1 -0
- package/dist/lib/types/Intensity.d.ts +3 -3
- package/dist/lib/types/ProviderIcon.d.ts +5 -4
- package/dist/lib/types/StatTiles.d.ts +4 -1
- package/dist/lib/types/icons.d.ts +1 -0
- package/dist/lib/ui.js +832 -803
- package/package.json +11 -6
- package/dist/lib/README.md +0 -13
- package/dist/lib/types/Accordion.stories.d.ts +0 -91
- package/dist/lib/types/Avatar.stories.d.ts +0 -160
- package/dist/lib/types/BrandMark.stories.d.ts +0 -75
- package/dist/lib/types/Breadcrumb.stories.d.ts +0 -91
- package/dist/lib/types/Button.stories.d.ts +0 -129
- package/dist/lib/types/Card.stories.d.ts +0 -70
- package/dist/lib/types/Chart.stories.d.ts +0 -55
- package/dist/lib/types/Checkbox.stories.d.ts +0 -75
- package/dist/lib/types/Chip.stories.d.ts +0 -190
- package/dist/lib/types/CliOnboard.stories.d.ts +0 -24
- package/dist/lib/types/CommandPalette.stories.d.ts +0 -94
- package/dist/lib/types/CommitGraph.stories.d.ts +0 -17
- package/dist/lib/types/ConnectionState.stories.d.ts +0 -117
- package/dist/lib/types/ConsentDialog.stories.d.ts +0 -61
- package/dist/lib/types/DataTable.stories.d.ts +0 -240
- package/dist/lib/types/DateRange.stories.d.ts +0 -272
- package/dist/lib/types/Dialog.stories.d.ts +0 -121
- package/dist/lib/types/DiffView.stories.d.ts +0 -118
- package/dist/lib/types/EmptyState.stories.d.ts +0 -130
- package/dist/lib/types/EvidenceCaption.stories.d.ts +0 -43
- package/dist/lib/types/Explainer.stories.d.ts +0 -22
- package/dist/lib/types/FacetRail.stories.d.ts +0 -28
- package/dist/lib/types/Feedback.stories.d.ts +0 -81
- package/dist/lib/types/GroupedMultiSelect.stories.d.ts +0 -59
- package/dist/lib/types/Input.stories.d.ts +0 -181
- package/dist/lib/types/Intensity.stories.d.ts +0 -108
- package/dist/lib/types/MapCanvas.stories.d.ts +0 -174
- package/dist/lib/types/Menu.stories.d.ts +0 -173
- package/dist/lib/types/ModerationQueue.stories.d.ts +0 -34
- package/dist/lib/types/Pager.stories.d.ts +0 -100
- package/dist/lib/types/Pagination.stories.d.ts +0 -193
- package/dist/lib/types/PolicySelect.stories.d.ts +0 -130
- package/dist/lib/types/ProviderIcon.stories.d.ts +0 -44
- package/dist/lib/types/RailShell.stories.d.ts +0 -32
- package/dist/lib/types/Redaction.stories.d.ts +0 -120
- package/dist/lib/types/RoleRoster.stories.d.ts +0 -23
- package/dist/lib/types/SignIn.stories.d.ts +0 -57
- package/dist/lib/types/StatTiles.stories.d.ts +0 -31
- package/dist/lib/types/StepWizard.stories.d.ts +0 -18
- package/dist/lib/types/StepsWaterfall.stories.d.ts +0 -94
- package/dist/lib/types/Switch.stories.d.ts +0 -134
- package/dist/lib/types/Tabs.stories.d.ts +0 -75
- package/dist/lib/types/TimeStrip.stories.d.ts +0 -30
- package/dist/lib/types/Timeline.stories.d.ts +0 -974
- package/dist/lib/types/ToastHost.stories.d.ts +0 -115
- package/dist/lib/types/ToolRenderers.stories.d.ts +0 -138
- package/dist/lib/types/Tooltip.stories.d.ts +0 -116
- package/dist/lib/types/Tour.stories.d.ts +0 -39
- package/dist/lib/types/TranscriptMarkers.stories.d.ts +0 -48
- package/dist/lib/types/Treemap.stories.d.ts +0 -101
- package/dist/lib/types/VisibilityControl.stories.d.ts +0 -126
- package/dist/lib/types/story-frame.d.ts +0 -12
package/dist/lib/ui.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { cloneElement as e, createContext as t, isValidElement as n, useCallback as r, useContext as i, useEffect as a, useId as o, useLayoutEffect as s, useMemo as c, useReducer as l, useRef as u, useState as d } from "react";
|
|
2
2
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
3
|
-
import { AlertTriangle as h, ArrowDownWideNarrow as g, ArrowLeft as _, ArrowRight as v, ArrowUp as y, BookOpen as b, Bot as x, Brain as S, Calendar as C, Check as w, CheckCircle2 as T, ChevronDown as E, ChevronLeft as D, ChevronRight as O, ChevronUp as k, ChevronsUpDown as A, Circle as j, CircleAlert as M, CircleCheck as N, CircleSlash as P, CircleX as F, Clock as I, Coins as L, Copy as R, CornerDownLeft as z, CornerDownRight as B,
|
|
4
|
-
import { getCoreRowModel as
|
|
5
|
-
import { Area as
|
|
6
|
-
import { createPortal as
|
|
3
|
+
import { AlertTriangle as h, ArrowDownWideNarrow as g, ArrowLeft as _, ArrowRight as v, ArrowUp as y, BookOpen as b, Bot as x, Brain as S, Calendar as C, Check as w, CheckCircle2 as T, ChevronDown as E, ChevronLeft as D, ChevronRight as O, ChevronUp as k, ChevronsUpDown as A, Circle as j, CircleAlert as M, CircleCheck as N, CircleSlash as P, CircleX as F, Clock as I, Coins as L, Copy as R, CornerDownLeft as z, CornerDownRight as B, Cpu as ee, Eye as te, EyeOff as V, FileCode as ne, FilePlus2 as re, FileText as H, Focus as U, Folder as ie, GitCommit as W, GitCommitHorizontal as G, GitMerge as ae, Globe as oe, HardDrive as se, Hash as ce, HelpCircle as le, Inbox as ue, Layers as de, ListChecks as fe, ListTree as pe, Loader as K, LoaderCircle as me, Lock as q, Maximize as he, Minus as ge, Pencil as _e, Plug as ve, Plus as ye, RotateCw as be, Search as xe, SearchX as Se, Send as Ce, Settings2 as we, ShieldAlert as Te, ShieldCheck as Ee, ShieldHalf as De, Star as Oe, SunMoon as ke, Tags as Ae, Terminal as je, TriangleAlert as Me, User as Ne, UserPlus as Pe, Users as Fe, WifiOff as Ie, Wrench as Le, X as J } from "lucide-react";
|
|
4
|
+
import { getCoreRowModel as Re, getSortedRowModel as ze, useReactTable as Be } from "@tanstack/react-table";
|
|
5
|
+
import { Area as Ve, Bar as He, BarChart as Ue, CartesianGrid as We, ComposedChart as Ge, Line as Ke, LineChart as qe, ResponsiveContainer as Je, Tooltip as Ye, XAxis as Xe, YAxis as Ze } from "recharts";
|
|
6
|
+
import { createPortal as Qe } from "react-dom";
|
|
7
7
|
//#region src/ui/Button.jsx
|
|
8
|
-
var
|
|
8
|
+
var $e = {
|
|
9
9
|
primary: "btn-primary",
|
|
10
10
|
secondary: "btn-secondary",
|
|
11
11
|
ghost: "btn-ghost",
|
|
12
12
|
danger: "btn-danger"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function et({ variant: e = "secondary", size: t = "md", icon: n, iconRight: r, loading: i = !1, disabled: a = !1, pressed: o, as: s = "button", className: c, children: l, ...u }) {
|
|
15
15
|
let d = l != null && l !== !1 && l !== "", h = t === "sm" ? 14 : 16, g = o !== void 0, _ = [
|
|
16
16
|
"btn",
|
|
17
|
-
|
|
17
|
+
$e[e] || $e.secondary,
|
|
18
18
|
t === "sm" && "btn-sm",
|
|
19
19
|
!d && "btn-icon",
|
|
20
20
|
g && "bs-toggle",
|
|
@@ -57,7 +57,7 @@ function Qe({ variant: e = "secondary", size: t = "md", icon: n, iconRight: r, l
|
|
|
57
57
|
children: v
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function tt({ label: e, className: t, children: n, ...r }) {
|
|
61
61
|
return /* @__PURE__ */ p("div", {
|
|
62
62
|
className: ["bs-group", t].filter(Boolean).join(" "),
|
|
63
63
|
role: "group",
|
|
@@ -66,7 +66,7 @@ function $e({ label: e, className: t, children: n, ...r }) {
|
|
|
66
66
|
children: n
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function nt({ options: e = [], value: t, defaultValue: n, onChange: r, label: i, className: a, ...o }) {
|
|
70
70
|
let s = t !== void 0, [c, l] = d(n ?? e[0]?.value), u = s ? t : c, f = (e) => {
|
|
71
71
|
s || l(e), r?.(e);
|
|
72
72
|
};
|
|
@@ -89,7 +89,7 @@ function et({ options: e = [], value: t, defaultValue: n, onChange: r, label: i,
|
|
|
89
89
|
}
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region src/ui/Input.jsx
|
|
92
|
-
function
|
|
92
|
+
function rt({ label: e, lock: t, hint: n, error: r, id: i, children: a }) {
|
|
93
93
|
let s = o(), c = i || s, l = typeof r == "string" && r.length > 0, u = l ? `${c}-err` : n ? `${c}-hint` : void 0;
|
|
94
94
|
return /* @__PURE__ */ m("div", {
|
|
95
95
|
className: "is-field",
|
|
@@ -118,7 +118,7 @@ function tt({ label: e, lock: t, hint: n, error: r, id: i, children: a }) {
|
|
|
118
118
|
className: "is-error",
|
|
119
119
|
id: u,
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */ p(
|
|
121
|
+
/* @__PURE__ */ p(Me, {
|
|
122
122
|
className: "lucide",
|
|
123
123
|
"aria-hidden": "true"
|
|
124
124
|
}),
|
|
@@ -133,15 +133,15 @@ function tt({ label: e, lock: t, hint: n, error: r, id: i, children: a }) {
|
|
|
133
133
|
]
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function it(e, t, n) {
|
|
137
137
|
let r = e !== void 0, [i, a] = d(t ?? "");
|
|
138
138
|
return [r ? e : i, (e) => {
|
|
139
139
|
r || a(e.target.value), n?.(e);
|
|
140
140
|
}];
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
let [g, _] =
|
|
144
|
-
return /* @__PURE__ */ p(
|
|
142
|
+
function at({ label: e, lock: t, hint: n, error: r, invalid: i = !1, iconLeft: a, type: o = "text", readOnly: s = !1, disabled: c = !1, value: l, defaultValue: u, onChange: d, id: f, ...h }) {
|
|
143
|
+
let [g, _] = it(l, u, d);
|
|
144
|
+
return /* @__PURE__ */ p(rt, {
|
|
145
145
|
label: e,
|
|
146
146
|
lock: t,
|
|
147
147
|
hint: n,
|
|
@@ -170,9 +170,9 @@ function rt({ label: e, lock: t, hint: n, error: r, invalid: i = !1, iconLeft: a
|
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
let [m, h] =
|
|
175
|
-
return /* @__PURE__ */ p(
|
|
173
|
+
function ot({ label: e, lock: t, hint: n, error: r, invalid: i = !1, rows: a = 3, readOnly: o = !1, disabled: s = !1, value: c, defaultValue: l, onChange: u, id: d, ...f }) {
|
|
174
|
+
let [m, h] = it(c, l, u);
|
|
175
|
+
return /* @__PURE__ */ p(rt, {
|
|
176
176
|
label: e,
|
|
177
177
|
lock: t,
|
|
178
178
|
hint: n,
|
|
@@ -192,9 +192,9 @@ function it({ label: e, lock: t, hint: n, error: r, invalid: i = !1, rows: a = 3
|
|
|
192
192
|
})
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
let [h, g] =
|
|
197
|
-
return /* @__PURE__ */ p(
|
|
195
|
+
function st({ label: e, lock: t, hint: n, error: r, invalid: i = !1, options: a, children: o, disabled: s = !1, value: c, defaultValue: l, onChange: u, id: d, ...f }) {
|
|
196
|
+
let [h, g] = it(c, l, u);
|
|
197
|
+
return /* @__PURE__ */ p(rt, {
|
|
198
198
|
label: e,
|
|
199
199
|
lock: t,
|
|
200
200
|
hint: n,
|
|
@@ -224,7 +224,7 @@ function at({ label: e, lock: t, hint: n, error: r, invalid: i = !1, options: a,
|
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region src/ui/Checkbox.jsx
|
|
227
|
-
function
|
|
227
|
+
function ct({ checked: e, defaultChecked: t = !1, onChange: n, disabled: r = !1, children: i, ...a }) {
|
|
228
228
|
let o = e !== void 0, [s, c] = d(t);
|
|
229
229
|
return /* @__PURE__ */ m("label", {
|
|
230
230
|
className: "check",
|
|
@@ -240,7 +240,7 @@ function ot({ checked: e, defaultChecked: t = !1, onChange: n, disabled: r = !1,
|
|
|
240
240
|
}), i]
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function lt({ name: e, value: t, checked: n, defaultChecked: r, onChange: i, disabled: a = !1, children: o, ...s }) {
|
|
244
244
|
return /* @__PURE__ */ m("label", {
|
|
245
245
|
className: "is-radio",
|
|
246
246
|
children: [/* @__PURE__ */ p("input", {
|
|
@@ -256,7 +256,7 @@ function st({ name: e, value: t, checked: n, defaultChecked: r, onChange: i, dis
|
|
|
256
256
|
}), o]
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function ut({ name: e, value: t, defaultValue: n, onChange: r, options: i = [], ariaLabel: a, ...o }) {
|
|
260
260
|
let s = t !== void 0, [c, l] = d(n), u = s ? t : c, f = (e) => {
|
|
261
261
|
s || l(e.target.value), r?.(e.target.value, e);
|
|
262
262
|
};
|
|
@@ -265,7 +265,7 @@ function ct({ name: e, value: t, defaultValue: n, onChange: r, options: i = [],
|
|
|
265
265
|
role: "radiogroup",
|
|
266
266
|
"aria-label": a,
|
|
267
267
|
...o,
|
|
268
|
-
children: i.map((t) => /* @__PURE__ */ p(
|
|
268
|
+
children: i.map((t) => /* @__PURE__ */ p(lt, {
|
|
269
269
|
name: e,
|
|
270
270
|
value: t.value,
|
|
271
271
|
checked: u === t.value,
|
|
@@ -277,7 +277,7 @@ function ct({ name: e, value: t, defaultValue: n, onChange: r, options: i = [],
|
|
|
277
277
|
}
|
|
278
278
|
//#endregion
|
|
279
279
|
//#region src/ui/Switch.jsx
|
|
280
|
-
function
|
|
280
|
+
function dt({ checked: e, defaultChecked: t = !1, onChange: n, disabled: r = !1, busy: i = !1, label: a, onText: s = "on", offText: c = "off", stateIcon: l, id: u }) {
|
|
281
281
|
let [f, h] = d(t), g = e !== void 0, _ = g ? e : f, v = o(), y = u ?? v;
|
|
282
282
|
return /* @__PURE__ */ m("div", {
|
|
283
283
|
className: "sw-field",
|
|
@@ -305,7 +305,7 @@ function lt({ checked: e, defaultChecked: t = !1, onChange: n, disabled: r = !1,
|
|
|
305
305
|
className: "sw-state",
|
|
306
306
|
"aria-live": i ? "polite" : void 0,
|
|
307
307
|
children: [
|
|
308
|
-
/* @__PURE__ */ p(i ?
|
|
308
|
+
/* @__PURE__ */ p(i ? K : l ?? (_ ? N : j), {
|
|
309
309
|
className: i ? "sw-busy-spin" : void 0,
|
|
310
310
|
"aria-hidden": "true"
|
|
311
311
|
}),
|
|
@@ -318,13 +318,13 @@ function lt({ checked: e, defaultChecked: t = !1, onChange: n, disabled: r = !1,
|
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/ui/BrandMark.jsx
|
|
321
|
-
var
|
|
321
|
+
var ft = {
|
|
322
322
|
claude: "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",
|
|
323
323
|
gemini: "M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81",
|
|
324
324
|
openai: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",
|
|
325
325
|
opencode: "M22 24H2V0h20zM17 4.8H7v14.4h10z",
|
|
326
326
|
cursor: "M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"
|
|
327
|
-
},
|
|
327
|
+
}, pt = {
|
|
328
328
|
anthropic: "claude",
|
|
329
329
|
"claude-code": "claude",
|
|
330
330
|
google: "gemini",
|
|
@@ -334,20 +334,20 @@ var ut = {
|
|
|
334
334
|
"codex-cli": "openai",
|
|
335
335
|
chatgpt: "openai",
|
|
336
336
|
gpt: "openai"
|
|
337
|
-
},
|
|
337
|
+
}, mt = {
|
|
338
338
|
claude: "Claude",
|
|
339
339
|
gemini: "Gemini",
|
|
340
340
|
openai: "OpenAI",
|
|
341
341
|
cursor: "Cursor",
|
|
342
342
|
opencode: "opencode"
|
|
343
343
|
};
|
|
344
|
-
function
|
|
344
|
+
function ht(e) {
|
|
345
345
|
if (!e) return null;
|
|
346
|
-
let t = String(e).toLowerCase().trim(), n =
|
|
347
|
-
return
|
|
346
|
+
let t = String(e).toLowerCase().trim(), n = pt[t] || t;
|
|
347
|
+
return ft[n] ? n : null;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
let a =
|
|
349
|
+
function gt({ name: e, size: t, label: n, className: r = "", ...i }) {
|
|
350
|
+
let a = ht(e);
|
|
351
351
|
if (!a) return null;
|
|
352
352
|
let o = ["brand", r].filter(Boolean).join(" "), s = t == null ? {} : {
|
|
353
353
|
width: t,
|
|
@@ -358,7 +358,7 @@ function mt({ name: e, size: t, label: n, className: r = "", ...i }) {
|
|
|
358
358
|
}
|
|
359
359
|
}, c = n ? {
|
|
360
360
|
role: "img",
|
|
361
|
-
"aria-label": n === !0 ?
|
|
361
|
+
"aria-label": n === !0 ? mt[a] : n,
|
|
362
362
|
focusable: "false"
|
|
363
363
|
} : {
|
|
364
364
|
"aria-hidden": "true",
|
|
@@ -370,12 +370,12 @@ function mt({ name: e, size: t, label: n, className: r = "", ...i }) {
|
|
|
370
370
|
...s,
|
|
371
371
|
...c,
|
|
372
372
|
...i,
|
|
373
|
-
children: /* @__PURE__ */ p("path", { d:
|
|
373
|
+
children: /* @__PURE__ */ p("path", { d: ft[a] })
|
|
374
374
|
});
|
|
375
375
|
}
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/ui/Chip.jsx
|
|
378
|
-
function
|
|
378
|
+
function _t({ tone: e, size: t, brand: n, icon: r, chrome: i = !1, removable: a = !1, onRemove: o, removeLabel: s, className: c = "", children: l, ...u }) {
|
|
379
379
|
let d = [
|
|
380
380
|
"chip",
|
|
381
381
|
e && `chip-${e}`,
|
|
@@ -388,7 +388,7 @@ function ht({ tone: e, size: t, brand: n, icon: r, chrome: i = !1, removable: a
|
|
|
388
388
|
className: d,
|
|
389
389
|
...u,
|
|
390
390
|
children: [
|
|
391
|
-
n ? /* @__PURE__ */ p(
|
|
391
|
+
n ? /* @__PURE__ */ p(gt, { name: n }) : r && /* @__PURE__ */ p(r, { "aria-hidden": "true" }),
|
|
392
392
|
l,
|
|
393
393
|
a && /* @__PURE__ */ p("button", {
|
|
394
394
|
type: "button",
|
|
@@ -400,7 +400,7 @@ function ht({ tone: e, size: t, brand: n, icon: r, chrome: i = !1, removable: a
|
|
|
400
400
|
]
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function vt({ pressed: e, defaultPressed: t = !1, onChange: n, brand: r, icon: i, className: a = "", children: o, ...s }) {
|
|
404
404
|
let c = e !== void 0, [l, u] = d(t), f = c ? e : l;
|
|
405
405
|
return /* @__PURE__ */ m("button", {
|
|
406
406
|
type: "button",
|
|
@@ -420,12 +420,12 @@ function gt({ pressed: e, defaultPressed: t = !1, onChange: n, brand: r, icon: i
|
|
|
420
420
|
className: "chipx-tick",
|
|
421
421
|
"aria-hidden": "true"
|
|
422
422
|
}),
|
|
423
|
-
!f && (r ? /* @__PURE__ */ p(
|
|
423
|
+
!f && (r ? /* @__PURE__ */ p(gt, { name: r }) : i && /* @__PURE__ */ p(i, { "aria-hidden": "true" })),
|
|
424
424
|
o
|
|
425
425
|
]
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function yt({ label: e, color: t, bare: n = !1, className: r = "", ...i }) {
|
|
429
429
|
let a = /* @__PURE__ */ p("span", {
|
|
430
430
|
className: "chipx-dot",
|
|
431
431
|
style: t ? { "--c": t } : void 0
|
|
@@ -440,7 +440,7 @@ function _t({ label: e, color: t, bare: n = !1, className: r = "", ...i }) {
|
|
|
440
440
|
children: [a, e]
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function bt({ count: e, unread: t = !1, className: n = "", ...r }) {
|
|
444
444
|
return /* @__PURE__ */ p("span", {
|
|
445
445
|
className: [
|
|
446
446
|
"chipx-count",
|
|
@@ -454,14 +454,14 @@ function vt({ count: e, unread: t = !1, className: n = "", ...r }) {
|
|
|
454
454
|
}
|
|
455
455
|
//#endregion
|
|
456
456
|
//#region src/ui/Card.jsx
|
|
457
|
-
function
|
|
457
|
+
function xt({ children: e, link: t = !1, className: n, ...r }) {
|
|
458
458
|
return /* @__PURE__ */ p(t ? "a" : "div", {
|
|
459
459
|
className: ["card", n].filter(Boolean).join(" "),
|
|
460
460
|
...r,
|
|
461
461
|
children: e
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function St({ thumb: e, head: t, title: n, desc: r, bullets: i, foot: a, link: o = !0, className: s, children: c, ...l }) {
|
|
465
465
|
let u = o ? "a" : "div", d = o && l["aria-label"] == null && l["aria-labelledby"] == null && typeof n == "string" ? n : void 0;
|
|
466
466
|
return /* @__PURE__ */ m(u, {
|
|
467
467
|
className: [
|
|
@@ -499,14 +499,14 @@ function bt({ thumb: e, head: t, title: n, desc: r, bullets: i, foot: a, link: o
|
|
|
499
499
|
})]
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Ct({ children: e, link: t = !1, className: n, ...r }) {
|
|
503
503
|
return /* @__PURE__ */ p(t ? "a" : "div", {
|
|
504
504
|
className: ["row", n].filter(Boolean).join(" "),
|
|
505
505
|
...r,
|
|
506
506
|
children: e
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function wt({ icon: e, value: t, children: n, className: r, ...i }) {
|
|
510
510
|
return /* @__PURE__ */ m("span", {
|
|
511
511
|
className: ["metaitem", r].filter(Boolean).join(" "),
|
|
512
512
|
...i,
|
|
@@ -522,7 +522,7 @@ function St({ icon: e, value: t, children: n, className: r, ...i }) {
|
|
|
522
522
|
}
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region src/ui/Tabs.jsx
|
|
525
|
-
function
|
|
525
|
+
function Tt({ tabs: e, defaultTab: t, value: n, onChange: r, "aria-label": i = "tabs" }) {
|
|
526
526
|
let a = o(), s = u([]), c = n !== void 0, [l, h] = d(() => t ?? e[0]?.id), g = c ? n : l, _ = (e) => {
|
|
527
527
|
c || h(e), e !== g && r?.(e);
|
|
528
528
|
}, v = (t) => {
|
|
@@ -574,7 +574,7 @@ function Ct({ tabs: e, defaultTab: t, value: n, onChange: r, "aria-label": i = "
|
|
|
574
574
|
}
|
|
575
575
|
//#endregion
|
|
576
576
|
//#region src/ui/Breadcrumb.jsx
|
|
577
|
-
function
|
|
577
|
+
function Et({ items: e = [], label: t = "breadcrumb" }) {
|
|
578
578
|
return /* @__PURE__ */ p("nav", {
|
|
579
579
|
"aria-label": t,
|
|
580
580
|
children: /* @__PURE__ */ p("div", {
|
|
@@ -605,7 +605,7 @@ function wt({ items: e = [], label: t = "breadcrumb" }) {
|
|
|
605
605
|
})
|
|
606
606
|
});
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function Dt({ steps: e = [] }) {
|
|
609
609
|
return /* @__PURE__ */ p("div", {
|
|
610
610
|
className: "steps",
|
|
611
611
|
children: e.map((t, n) => {
|
|
@@ -632,7 +632,7 @@ function Tt({ steps: e = [] }) {
|
|
|
632
632
|
}
|
|
633
633
|
//#endregion
|
|
634
634
|
//#region src/ui/Pager.jsx
|
|
635
|
-
function
|
|
635
|
+
function Ot({ page: e = 1, total: t = 1, onPrev: n, onNext: r, onChange: i, label: a = "pagination" }) {
|
|
636
636
|
let o = e <= 1, s = e >= t;
|
|
637
637
|
return /* @__PURE__ */ m("nav", {
|
|
638
638
|
className: "pager",
|
|
@@ -676,7 +676,7 @@ function Et({ page: e = 1, total: t = 1, onPrev: n, onNext: r, onChange: i, labe
|
|
|
676
676
|
}
|
|
677
677
|
//#endregion
|
|
678
678
|
//#region src/ui/Pagination.jsx
|
|
679
|
-
function
|
|
679
|
+
function kt(e, t, n) {
|
|
680
680
|
let r = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n);
|
|
681
681
|
if (t <= 1) return [1];
|
|
682
682
|
if (t <= 7) return r(1, t);
|
|
@@ -697,11 +697,11 @@ function Dt(e, t, n) {
|
|
|
697
697
|
t
|
|
698
698
|
];
|
|
699
699
|
}
|
|
700
|
-
function
|
|
701
|
-
let c = e !== void 0, [l, u] = d(t), f = n ?? (r == null ? 1 : Math.max(1, Math.ceil(r / i))), h = Math.max(1, f), g =
|
|
702
|
-
let t =
|
|
700
|
+
function At({ page: e, defaultPage: t = 1, total: n, totalItems: r, pageSize: i = 10, onChange: a, siblingCount: o = 1, label: s = "pagination" }) {
|
|
701
|
+
let c = e !== void 0, [l, u] = d(t), f = n ?? (r == null ? 1 : Math.max(1, Math.ceil(r / i))), h = Math.max(1, f), g = jt(c ? e : l, 1, h), _ = (e) => {
|
|
702
|
+
let t = jt(e, 1, h);
|
|
703
703
|
t !== g && (c || u(t), a?.(t));
|
|
704
|
-
}, v = g <= 1, y = g >= h, b =
|
|
704
|
+
}, v = g <= 1, y = g >= h, b = kt(g, h, Math.max(0, o));
|
|
705
705
|
return /* @__PURE__ */ m("nav", {
|
|
706
706
|
className: "pgn",
|
|
707
707
|
"aria-label": s,
|
|
@@ -740,12 +740,12 @@ function Ot({ page: e, defaultPage: t = 1, total: n, totalItems: r, pageSize: i
|
|
|
740
740
|
]
|
|
741
741
|
});
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function jt(e, t, n) {
|
|
744
744
|
return Math.min(n, Math.max(t, e));
|
|
745
745
|
}
|
|
746
746
|
//#endregion
|
|
747
747
|
//#region src/ui/Menu.jsx
|
|
748
|
-
function
|
|
748
|
+
function Mt({ label: e, items: t = [], align: n = "start", caption: r, defaultOpen: i = !1 }) {
|
|
749
749
|
let [s, c] = d(i), l = u(null), f = u(null), h = o(), g = t.map((e, t) => e.disabled || e.separator ? -1 : t).filter((e) => e >= 0), _ = u([]), v = (e) => {
|
|
750
750
|
e == null || e < 0 || _.current[e]?.focus();
|
|
751
751
|
}, y = () => g[0], b = () => g[g.length - 1], x = (e) => {
|
|
@@ -827,7 +827,7 @@ function At({ label: e, items: t = [], align: n = "start", caption: r, defaultOp
|
|
|
827
827
|
},
|
|
828
828
|
onKeyDown: O(e),
|
|
829
829
|
children: [
|
|
830
|
-
e.brand ? /* @__PURE__ */ p(
|
|
830
|
+
e.brand ? /* @__PURE__ */ p(gt, { name: e.brand }) : n && /* @__PURE__ */ p(n, { "aria-hidden": "true" }),
|
|
831
831
|
/* @__PURE__ */ p("span", {
|
|
832
832
|
className: "menu-text",
|
|
833
833
|
children: e.label
|
|
@@ -852,7 +852,7 @@ function At({ label: e, items: t = [], align: n = "start", caption: r, defaultOp
|
|
|
852
852
|
}
|
|
853
853
|
//#endregion
|
|
854
854
|
//#region src/ui/Tooltip.jsx
|
|
855
|
-
function
|
|
855
|
+
function Nt({ content: e, children: t, id: n }) {
|
|
856
856
|
let r = o(), i = n || `tip-${r}`, [a, s] = d(!1), c = () => s(!0), l = () => s(!1);
|
|
857
857
|
return /* @__PURE__ */ m("span", {
|
|
858
858
|
className: "tip-anchor",
|
|
@@ -863,7 +863,7 @@ function jt({ content: e, children: t, id: n }) {
|
|
|
863
863
|
onKeyDown: (e) => {
|
|
864
864
|
e.key === "Escape" && a && s(!1);
|
|
865
865
|
},
|
|
866
|
-
children: [/* @__PURE__ */ p(
|
|
866
|
+
children: [/* @__PURE__ */ p(Pt, {
|
|
867
867
|
describedById: i,
|
|
868
868
|
children: t
|
|
869
869
|
}), a && /* @__PURE__ */ p("span", {
|
|
@@ -874,14 +874,14 @@ function jt({ content: e, children: t, id: n }) {
|
|
|
874
874
|
})]
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function Pt({ children: t, describedById: r }) {
|
|
878
878
|
if (n(t)) {
|
|
879
879
|
let n = t.props["aria-describedby"];
|
|
880
880
|
return e(t, { "aria-describedby": n ? `${n} ${r}` : r });
|
|
881
881
|
}
|
|
882
882
|
return t;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Ft({ children: e, label: t, title: n, icon: r, content: i, footer: s, triggerClassName: c = "btn btn-secondary btn-sm", id: l }) {
|
|
885
885
|
let f = o(), h = l || `pop-${f}`, [g, _] = d(!1), v = u(null), y = u(null);
|
|
886
886
|
return a(() => {
|
|
887
887
|
if (!g) return;
|
|
@@ -931,8 +931,8 @@ function Nt({ children: e, label: t, title: n, icon: r, content: i, footer: s, t
|
|
|
931
931
|
}
|
|
932
932
|
//#endregion
|
|
933
933
|
//#region src/ui/Avatar.jsx
|
|
934
|
-
function
|
|
935
|
-
let [s, c] = d(!1), l = t ??
|
|
934
|
+
function It({ name: e, initials: t, size: n, src: r, more: i = !1, className: a = "", ...o }) {
|
|
935
|
+
let [s, c] = d(!1), l = t ?? Vt(e), u = r && !s, f = [
|
|
936
936
|
"avatar",
|
|
937
937
|
n && `av-${n}`,
|
|
938
938
|
u && "av-img",
|
|
@@ -959,7 +959,7 @@ function Pt({ name: e, initials: t, size: n, src: r, more: i = !1, className: a
|
|
|
959
959
|
children: l
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Lt({ label: e, children: t, className: n = "", ...r }) {
|
|
963
963
|
return /* @__PURE__ */ p("div", {
|
|
964
964
|
className: ["av-group", n].filter(Boolean).join(" "),
|
|
965
965
|
role: "group",
|
|
@@ -968,7 +968,7 @@ function Ft({ label: e, children: t, className: n = "", ...r }) {
|
|
|
968
968
|
children: t
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function Rt({ icon: e, label: t, children: n, className: r = "", ...i }) {
|
|
972
972
|
let a = e && t ? { "aria-label": t } : {};
|
|
973
973
|
return /* @__PURE__ */ p("kbd", {
|
|
974
974
|
className: ["kbd-key", r].filter(Boolean).join(" "),
|
|
@@ -977,7 +977,7 @@ function It({ icon: e, label: t, children: n, className: r = "", ...i }) {
|
|
|
977
977
|
children: e ? /* @__PURE__ */ p(e, { "aria-hidden": "true" }) : n
|
|
978
978
|
});
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function zt({ label: e, children: t, className: n = "", ...r }) {
|
|
981
981
|
let i = Array.isArray(t) ? t.filter(Boolean) : [t];
|
|
982
982
|
return /* @__PURE__ */ p("span", {
|
|
983
983
|
className: ["kbd-chord", n].filter(Boolean).join(" "),
|
|
@@ -993,7 +993,7 @@ function Lt({ label: e, children: t, className: n = "", ...r }) {
|
|
|
993
993
|
}, t))
|
|
994
994
|
});
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Bt({ children: e, brand: t, icon: n, dot: r, selected: i = !1, onRemove: a, removeLabel: o, className: s = "", ...c }) {
|
|
997
997
|
return /* @__PURE__ */ m("span", {
|
|
998
998
|
className: [
|
|
999
999
|
"tag",
|
|
@@ -1006,7 +1006,7 @@ function Rt({ children: e, brand: t, icon: n, dot: r, selected: i = !1, onRemove
|
|
|
1006
1006
|
className: "tag-dot",
|
|
1007
1007
|
style: { "--tag-c": r }
|
|
1008
1008
|
}),
|
|
1009
|
-
t ? /* @__PURE__ */ p(
|
|
1009
|
+
t ? /* @__PURE__ */ p(gt, { name: t }) : n && /* @__PURE__ */ p(n, { "aria-hidden": "true" }),
|
|
1010
1010
|
e,
|
|
1011
1011
|
a && /* @__PURE__ */ p("button", {
|
|
1012
1012
|
type: "button",
|
|
@@ -1018,12 +1018,12 @@ function Rt({ children: e, brand: t, icon: n, dot: r, selected: i = !1, onRemove
|
|
|
1018
1018
|
]
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function Vt(e = "") {
|
|
1022
1022
|
return e.trim().split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join("");
|
|
1023
1023
|
}
|
|
1024
1024
|
//#endregion
|
|
1025
1025
|
//#region src/ui/EmptyState.jsx
|
|
1026
|
-
function
|
|
1026
|
+
function Ht({ icon: e, title: t, message: n, action: r, children: i, as: a = "h3" }) {
|
|
1027
1027
|
return /* @__PURE__ */ m("div", {
|
|
1028
1028
|
className: "empty",
|
|
1029
1029
|
children: [
|
|
@@ -1039,7 +1039,7 @@ function Bt({ icon: e, title: t, message: n, action: r, children: i, as: a = "h3
|
|
|
1039
1039
|
}
|
|
1040
1040
|
//#endregion
|
|
1041
1041
|
//#region src/ui/Feedback.jsx
|
|
1042
|
-
function
|
|
1042
|
+
function Ut({ label: e = "loading", avatar: t = !0, lines: n = 2, className: r }) {
|
|
1043
1043
|
let i = ["w-90", "w-70"];
|
|
1044
1044
|
return /* @__PURE__ */ m("div", {
|
|
1045
1045
|
className: r ? `fb-skel ${r}` : "fb-skel",
|
|
@@ -1058,7 +1058,7 @@ function Vt({ label: e = "loading", avatar: t = !0, lines: n = 2, className: r }
|
|
|
1058
1058
|
}), Array.from({ length: Math.max(0, n) }, (e, t) => /* @__PURE__ */ p("span", { className: `fb-skel-line ${i[t % i.length]}` }, t))]
|
|
1059
1059
|
});
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function Wt({ value: e = 0, min: t = 0, max: n = 100, label: r, ariaLabel: i, showPct: a = !0, className: o }) {
|
|
1062
1062
|
let s = Math.max(0, Math.min(100, e)), c = i ?? (typeof r == "string" ? r : void 0);
|
|
1063
1063
|
return /* @__PURE__ */ m("div", {
|
|
1064
1064
|
className: o ? `fb-prog ${o}` : "fb-prog",
|
|
@@ -1082,7 +1082,7 @@ function Ht({ value: e = 0, min: t = 0, max: n = 100, label: r, ariaLabel: i, sh
|
|
|
1082
1082
|
})]
|
|
1083
1083
|
});
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function Gt({ children: e, icon: t = me, className: n }) {
|
|
1086
1086
|
return /* @__PURE__ */ m("span", {
|
|
1087
1087
|
className: n ? `fb-spin ${n}` : "fb-spin",
|
|
1088
1088
|
role: "status",
|
|
@@ -1095,7 +1095,7 @@ function Ut({ children: e, icon: t = q, className: n }) {
|
|
|
1095
1095
|
]
|
|
1096
1096
|
});
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Kt({ variant: e = "ok", title: t, children: n, icon: r, onClose: i, closeLabel: a = "dismiss notification", className: o }) {
|
|
1099
1099
|
let s = e === "err", c = r ?? (s ? F : N);
|
|
1100
1100
|
return /* @__PURE__ */ m("div", {
|
|
1101
1101
|
className: [
|
|
@@ -1129,10 +1129,10 @@ function Wt({ variant: e = "ok", title: t, children: n, icon: r, onClose: i, clo
|
|
|
1129
1129
|
]
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function qt({ variant: e = "empty", title: t, children: n, icon: r, className: i }) {
|
|
1133
1133
|
let a = e === "error", o = e === "loading", s = {
|
|
1134
1134
|
loading: {
|
|
1135
|
-
icon:
|
|
1135
|
+
icon: me,
|
|
1136
1136
|
title: "loading"
|
|
1137
1137
|
},
|
|
1138
1138
|
error: {
|
|
@@ -1140,7 +1140,7 @@ function Gt({ variant: e = "empty", title: t, children: n, icon: r, className: i
|
|
|
1140
1140
|
title: "error"
|
|
1141
1141
|
},
|
|
1142
1142
|
empty: {
|
|
1143
|
-
icon:
|
|
1143
|
+
icon: Se,
|
|
1144
1144
|
title: "no results"
|
|
1145
1145
|
}
|
|
1146
1146
|
}, c = s[e] ?? s.empty, l = r ?? c.icon;
|
|
@@ -1171,7 +1171,7 @@ function Gt({ variant: e = "empty", title: t, children: n, icon: r, className: i
|
|
|
1171
1171
|
}
|
|
1172
1172
|
//#endregion
|
|
1173
1173
|
//#region src/ui/DataTable.jsx
|
|
1174
|
-
function
|
|
1174
|
+
function Jt({ columns: e, rows: t, selectable: n = !1, rowKey: i, defaultSort: a = null, sort: s, onSortChange: l, defaultSelectedKeys: u = [], selectedKeys: f, onSelectionChange: h, caption: g, className: _ = "" }) {
|
|
1175
1175
|
let v = o(), y = r((e, t) => i ? i(e, t) : e.id ?? t, [i]), b = r((e, t) => String(y(e, t)), [y]), [x, S] = d(a), C = s === void 0 ? x : s, w = (e) => {
|
|
1176
1176
|
s === void 0 && S(e), l?.(e);
|
|
1177
1177
|
}, [T, D] = d(() => new Set(u)), O = f === void 0 ? T : new Set(f), j = (e) => {
|
|
@@ -1180,7 +1180,7 @@ function Kt({ columns: e, rows: t, selectable: n = !1, rowKey: i, defaultSort: a
|
|
|
1180
1180
|
id: e.key,
|
|
1181
1181
|
accessorFn: (t) => t[e.key],
|
|
1182
1182
|
enableSorting: !!e.sortable,
|
|
1183
|
-
sortingFn:
|
|
1183
|
+
sortingFn: Qt,
|
|
1184
1184
|
sortDescFirst: !1
|
|
1185
1185
|
})), [e]), N = c(() => {
|
|
1186
1186
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -1196,8 +1196,8 @@ function Kt({ columns: e, rows: t, selectable: n = !1, rowKey: i, defaultSort: a
|
|
|
1196
1196
|
}, [
|
|
1197
1197
|
t,
|
|
1198
1198
|
y,
|
|
1199
|
-
|
|
1200
|
-
]), I =
|
|
1199
|
+
Yt(O)
|
|
1200
|
+
]), I = Be({
|
|
1201
1201
|
data: t,
|
|
1202
1202
|
columns: M,
|
|
1203
1203
|
state: {
|
|
@@ -1221,8 +1221,8 @@ function Kt({ columns: e, rows: t, selectable: n = !1, rowKey: i, defaultSort: a
|
|
|
1221
1221
|
for (let e of Object.keys(t)) t[e] && n.add(N.get(e) ?? e);
|
|
1222
1222
|
j(n);
|
|
1223
1223
|
},
|
|
1224
|
-
getCoreRowModel:
|
|
1225
|
-
getSortedRowModel:
|
|
1224
|
+
getCoreRowModel: Re(),
|
|
1225
|
+
getSortedRowModel: ze()
|
|
1226
1226
|
}), L = I.getSortedRowModel().rows, R = e.length + +!!n;
|
|
1227
1227
|
return /* @__PURE__ */ p("div", {
|
|
1228
1228
|
className: `tbl-wrap${_ ? " " + _ : ""}`,
|
|
@@ -1252,7 +1252,7 @@ function Kt({ columns: e, rows: t, selectable: n = !1, rowKey: i, defaultSort: a
|
|
|
1252
1252
|
let t = C?.key === e.key, n = t ? C.dir === "asc" ? "ascending" : "descending" : "none", r = t ? C.dir === "asc" ? k : E : A;
|
|
1253
1253
|
return /* @__PURE__ */ p("th", {
|
|
1254
1254
|
scope: "col",
|
|
1255
|
-
className:
|
|
1255
|
+
className: Xt("tbl-th", e.align),
|
|
1256
1256
|
"aria-sort": e.sortable ? n : void 0,
|
|
1257
1257
|
children: e.sortable ? /* @__PURE__ */ m("button", {
|
|
1258
1258
|
type: "button",
|
|
@@ -1293,7 +1293,7 @@ function Kt({ columns: e, rows: t, selectable: n = !1, rowKey: i, defaultSort: a
|
|
|
1293
1293
|
})
|
|
1294
1294
|
})
|
|
1295
1295
|
}), e.map((e) => /* @__PURE__ */ p("td", {
|
|
1296
|
-
className:
|
|
1296
|
+
className: Xt("tbl-td", e.align),
|
|
1297
1297
|
children: /* @__PURE__ */ p("span", {
|
|
1298
1298
|
className: e.align === "right" ? "tnum" : void 0,
|
|
1299
1299
|
children: e.render ? e.render(i[e.key], i) : i[e.key]
|
|
@@ -1305,24 +1305,24 @@ function Kt({ columns: e, rows: t, selectable: n = !1, rowKey: i, defaultSort: a
|
|
|
1305
1305
|
})
|
|
1306
1306
|
});
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Yt(e) {
|
|
1309
1309
|
return [...e].map(String).sort().join("\0");
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Xt(e, t) {
|
|
1312
1312
|
return t === "right" ? `${e} tbl-right` : t === "center" ? `${e} tbl-center` : e;
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Zt(e, t) {
|
|
1315
1315
|
return e == null && t == null ? 0 : e == null ? 1 : t == null ? -1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t), void 0, {
|
|
1316
1316
|
numeric: !0,
|
|
1317
1317
|
sensitivity: "base"
|
|
1318
1318
|
});
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
return
|
|
1320
|
+
function Qt(e, t, n) {
|
|
1321
|
+
return Zt(e.getValue(n), t.getValue(n));
|
|
1322
1322
|
}
|
|
1323
1323
|
//#endregion
|
|
1324
1324
|
//#region src/ui/chart-shared.jsx
|
|
1325
|
-
var
|
|
1325
|
+
var $t = {
|
|
1326
1326
|
teal: "chart-s1",
|
|
1327
1327
|
olive: "chart-s2",
|
|
1328
1328
|
clay: "chart-s3",
|
|
@@ -1336,7 +1336,7 @@ var Zt = {
|
|
|
1336
1336
|
2: "chart-s2",
|
|
1337
1337
|
3: "chart-s3",
|
|
1338
1338
|
4: "chart-s4"
|
|
1339
|
-
},
|
|
1339
|
+
}, en = {
|
|
1340
1340
|
teal: "var(--chart-1)",
|
|
1341
1341
|
olive: "var(--chart-2)",
|
|
1342
1342
|
clay: "var(--chart-3)",
|
|
@@ -1350,13 +1350,13 @@ var Zt = {
|
|
|
1350
1350
|
2: "var(--chart-2)",
|
|
1351
1351
|
3: "var(--chart-3)",
|
|
1352
1352
|
4: "var(--chart-4)"
|
|
1353
|
-
},
|
|
1353
|
+
}, tn = [
|
|
1354
1354
|
"teal",
|
|
1355
1355
|
"olive",
|
|
1356
1356
|
"clay",
|
|
1357
1357
|
"mauve",
|
|
1358
1358
|
"amber"
|
|
1359
|
-
],
|
|
1359
|
+
], nn = (e) => $t[e] || "chart-s1", rn = (e) => en[e] || "var(--chart-1)", an = () => ({
|
|
1360
1360
|
accessibilityLayer: !0,
|
|
1361
1361
|
margin: {
|
|
1362
1362
|
top: 8,
|
|
@@ -1364,8 +1364,8 @@ var Zt = {
|
|
|
1364
1364
|
bottom: 4,
|
|
1365
1365
|
left: 4
|
|
1366
1366
|
}
|
|
1367
|
-
}),
|
|
1368
|
-
function
|
|
1367
|
+
}), on = { isAnimationActive: !1 };
|
|
1368
|
+
function sn({ icon: e, title: t, aside: n, sub: r, legend: i, className: a = "", children: o }) {
|
|
1369
1369
|
return /* @__PURE__ */ m("figure", {
|
|
1370
1370
|
className: ["chart", a].filter(Boolean).join(" "),
|
|
1371
1371
|
children: [
|
|
@@ -1396,7 +1396,7 @@ function an({ icon: e, title: t, aside: n, sub: r, legend: i, className: a = "",
|
|
|
1396
1396
|
className: "chart-legend-item",
|
|
1397
1397
|
children: [/* @__PURE__ */ p("span", {
|
|
1398
1398
|
className: "chart-legend-sw",
|
|
1399
|
-
style: { background:
|
|
1399
|
+
style: { background: rn(e.color) },
|
|
1400
1400
|
"aria-hidden": "true"
|
|
1401
1401
|
}), e.name || e.key]
|
|
1402
1402
|
}, e.key))
|
|
@@ -1404,7 +1404,7 @@ function an({ icon: e, title: t, aside: n, sub: r, legend: i, className: a = "",
|
|
|
1404
1404
|
]
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function cn({ active: e, payload: t, label: n, labelFormatter: r, valueFormatter: i }) {
|
|
1408
1408
|
if (!e || !t || !t.length) return null;
|
|
1409
1409
|
let a = i || ((e) => e);
|
|
1410
1410
|
return /* @__PURE__ */ m("div", {
|
|
@@ -1418,7 +1418,7 @@ function on({ active: e, payload: t, label: n, labelFormatter: r, valueFormatter
|
|
|
1418
1418
|
children: [
|
|
1419
1419
|
/* @__PURE__ */ p("span", {
|
|
1420
1420
|
className: "chart-tip-sw",
|
|
1421
|
-
style: { background:
|
|
1421
|
+
style: { background: rn(e.payload?.__color?.[e.dataKey] || e.color) },
|
|
1422
1422
|
"aria-hidden": "true"
|
|
1423
1423
|
}),
|
|
1424
1424
|
e.name,
|
|
@@ -1431,33 +1431,33 @@ function on({ active: e, payload: t, label: n, labelFormatter: r, valueFormatter
|
|
|
1431
1431
|
}, t))]
|
|
1432
1432
|
});
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function ln(e) {
|
|
1435
1435
|
return e.map((e, t) => ({
|
|
1436
1436
|
...e,
|
|
1437
|
-
color: e.color ||
|
|
1437
|
+
color: e.color || tn[t % tn.length]
|
|
1438
1438
|
}));
|
|
1439
1439
|
}
|
|
1440
1440
|
//#endregion
|
|
1441
1441
|
//#region src/ui/ChartBar.jsx
|
|
1442
|
-
function
|
|
1443
|
-
let h =
|
|
1444
|
-
return /* @__PURE__ */ p(
|
|
1442
|
+
function un({ data: e, xKey: t, series: n, stacked: r = !1, icon: i, title: a, aside: o, sub: s, height: c = 200, yTicks: l, xFormatter: u, valueFormatter: d, className: f = "" }) {
|
|
1443
|
+
let h = ln(n);
|
|
1444
|
+
return /* @__PURE__ */ p(sn, {
|
|
1445
1445
|
icon: i,
|
|
1446
1446
|
title: a,
|
|
1447
1447
|
aside: o,
|
|
1448
1448
|
sub: s,
|
|
1449
1449
|
legend: h,
|
|
1450
1450
|
className: f,
|
|
1451
|
-
children: /* @__PURE__ */ p(
|
|
1451
|
+
children: /* @__PURE__ */ p(Je, {
|
|
1452
1452
|
width: "100%",
|
|
1453
1453
|
height: c,
|
|
1454
|
-
children: /* @__PURE__ */ m(
|
|
1454
|
+
children: /* @__PURE__ */ m(Ue, {
|
|
1455
1455
|
data: e,
|
|
1456
1456
|
barCategoryGap: "22%",
|
|
1457
|
-
...
|
|
1457
|
+
...an(),
|
|
1458
1458
|
children: [
|
|
1459
|
-
/* @__PURE__ */ p(
|
|
1460
|
-
/* @__PURE__ */ p(
|
|
1459
|
+
/* @__PURE__ */ p(We, { vertical: !1 }),
|
|
1460
|
+
/* @__PURE__ */ p(Xe, {
|
|
1461
1461
|
dataKey: t,
|
|
1462
1462
|
tickLine: !1,
|
|
1463
1463
|
interval: 0,
|
|
@@ -1465,7 +1465,7 @@ function cn({ data: e, xKey: t, series: n, stacked: r = !1, icon: i, title: a, a
|
|
|
1465
1465
|
tickMargin: 8,
|
|
1466
1466
|
minTickGap: 0
|
|
1467
1467
|
}),
|
|
1468
|
-
/* @__PURE__ */ p(
|
|
1468
|
+
/* @__PURE__ */ p(Ze, {
|
|
1469
1469
|
width: 28,
|
|
1470
1470
|
tickLine: !1,
|
|
1471
1471
|
axisLine: !1,
|
|
@@ -1473,22 +1473,22 @@ function cn({ data: e, xKey: t, series: n, stacked: r = !1, icon: i, title: a, a
|
|
|
1473
1473
|
allowDecimals: !1,
|
|
1474
1474
|
tickMargin: 4
|
|
1475
1475
|
}),
|
|
1476
|
-
/* @__PURE__ */ p(
|
|
1476
|
+
/* @__PURE__ */ p(Ye, {
|
|
1477
1477
|
cursor: { className: "chart-cursor" },
|
|
1478
|
-
content: /* @__PURE__ */ p(
|
|
1478
|
+
content: /* @__PURE__ */ p(cn, {
|
|
1479
1479
|
valueFormatter: d,
|
|
1480
1480
|
labelFormatter: u
|
|
1481
1481
|
})
|
|
1482
1482
|
}),
|
|
1483
|
-
h.map((e) => /* @__PURE__ */ p(
|
|
1483
|
+
h.map((e) => /* @__PURE__ */ p(He, {
|
|
1484
1484
|
dataKey: e.key,
|
|
1485
1485
|
name: e.name || e.key,
|
|
1486
|
-
className:
|
|
1486
|
+
className: nn(e.color),
|
|
1487
1487
|
fill: "currentColor",
|
|
1488
1488
|
stackId: r ? "stack" : void 0,
|
|
1489
1489
|
maxBarSize: 64,
|
|
1490
1490
|
radius: 0,
|
|
1491
|
-
...
|
|
1491
|
+
...on
|
|
1492
1492
|
}, e.key))
|
|
1493
1493
|
]
|
|
1494
1494
|
})
|
|
@@ -1497,24 +1497,24 @@ function cn({ data: e, xKey: t, series: n, stacked: r = !1, icon: i, title: a, a
|
|
|
1497
1497
|
}
|
|
1498
1498
|
//#endregion
|
|
1499
1499
|
//#region src/ui/ChartLine.jsx
|
|
1500
|
-
function
|
|
1501
|
-
let f =
|
|
1502
|
-
return /* @__PURE__ */ p(
|
|
1500
|
+
function dn({ data: e, xKey: t, series: n, icon: r, title: i, aside: a, sub: o, height: s = 200, yTicks: c, xFormatter: l, valueFormatter: u, className: d = "" }) {
|
|
1501
|
+
let f = ln(n);
|
|
1502
|
+
return /* @__PURE__ */ p(sn, {
|
|
1503
1503
|
icon: r,
|
|
1504
1504
|
title: i,
|
|
1505
1505
|
aside: a,
|
|
1506
1506
|
sub: o,
|
|
1507
1507
|
legend: f,
|
|
1508
1508
|
className: d,
|
|
1509
|
-
children: /* @__PURE__ */ p(
|
|
1509
|
+
children: /* @__PURE__ */ p(Je, {
|
|
1510
1510
|
width: "100%",
|
|
1511
1511
|
height: s,
|
|
1512
|
-
children: /* @__PURE__ */ m(
|
|
1512
|
+
children: /* @__PURE__ */ m(Ge, {
|
|
1513
1513
|
data: e,
|
|
1514
|
-
...
|
|
1514
|
+
...an(),
|
|
1515
1515
|
children: [
|
|
1516
|
-
/* @__PURE__ */ p(
|
|
1517
|
-
/* @__PURE__ */ p(
|
|
1516
|
+
/* @__PURE__ */ p(We, { vertical: !1 }),
|
|
1517
|
+
/* @__PURE__ */ p(Xe, {
|
|
1518
1518
|
dataKey: t,
|
|
1519
1519
|
tickLine: !1,
|
|
1520
1520
|
interval: 0,
|
|
@@ -1522,7 +1522,7 @@ function ln({ data: e, xKey: t, series: n, icon: r, title: i, aside: a, sub: o,
|
|
|
1522
1522
|
tickMargin: 8,
|
|
1523
1523
|
minTickGap: 0
|
|
1524
1524
|
}),
|
|
1525
|
-
/* @__PURE__ */ p(
|
|
1525
|
+
/* @__PURE__ */ p(Ze, {
|
|
1526
1526
|
width: 28,
|
|
1527
1527
|
tickLine: !1,
|
|
1528
1528
|
axisLine: !1,
|
|
@@ -1530,51 +1530,51 @@ function ln({ data: e, xKey: t, series: n, icon: r, title: i, aside: a, sub: o,
|
|
|
1530
1530
|
allowDecimals: !1,
|
|
1531
1531
|
tickMargin: 4
|
|
1532
1532
|
}),
|
|
1533
|
-
/* @__PURE__ */ p(
|
|
1533
|
+
/* @__PURE__ */ p(Ye, {
|
|
1534
1534
|
cursor: {
|
|
1535
1535
|
className: "chart-cursor",
|
|
1536
1536
|
strokeWidth: 0
|
|
1537
1537
|
},
|
|
1538
|
-
content: /* @__PURE__ */ p(
|
|
1538
|
+
content: /* @__PURE__ */ p(cn, {
|
|
1539
1539
|
valueFormatter: u,
|
|
1540
1540
|
labelFormatter: l
|
|
1541
1541
|
})
|
|
1542
1542
|
}),
|
|
1543
|
-
f.map((e) => e.area ? /* @__PURE__ */ p(
|
|
1543
|
+
f.map((e) => e.area ? /* @__PURE__ */ p(Ve, {
|
|
1544
1544
|
dataKey: e.key,
|
|
1545
1545
|
name: e.name || e.key,
|
|
1546
|
-
className: `${
|
|
1546
|
+
className: `${nn(e.color)} chart-area`,
|
|
1547
1547
|
fill: "currentColor",
|
|
1548
1548
|
stroke: "currentColor",
|
|
1549
1549
|
strokeWidth: 2,
|
|
1550
1550
|
dot: {
|
|
1551
|
-
className: `${
|
|
1551
|
+
className: `${nn(e.color)} chart-dot`,
|
|
1552
1552
|
r: 3,
|
|
1553
1553
|
fill: "currentColor"
|
|
1554
1554
|
},
|
|
1555
1555
|
activeDot: {
|
|
1556
|
-
className: `${
|
|
1556
|
+
className: `${nn(e.color)} chart-dot`,
|
|
1557
1557
|
r: 4,
|
|
1558
1558
|
fill: "currentColor"
|
|
1559
1559
|
},
|
|
1560
|
-
...
|
|
1561
|
-
}, e.key) : /* @__PURE__ */ p(
|
|
1560
|
+
...on
|
|
1561
|
+
}, e.key) : /* @__PURE__ */ p(Ke, {
|
|
1562
1562
|
dataKey: e.key,
|
|
1563
1563
|
name: e.name || e.key,
|
|
1564
|
-
className: `${
|
|
1564
|
+
className: `${nn(e.color)} chart-line`,
|
|
1565
1565
|
stroke: "currentColor",
|
|
1566
1566
|
strokeWidth: 2,
|
|
1567
1567
|
dot: {
|
|
1568
|
-
className: `${
|
|
1568
|
+
className: `${nn(e.color)} chart-dot`,
|
|
1569
1569
|
r: 3,
|
|
1570
1570
|
fill: "currentColor"
|
|
1571
1571
|
},
|
|
1572
1572
|
activeDot: {
|
|
1573
|
-
className: `${
|
|
1573
|
+
className: `${nn(e.color)} chart-dot`,
|
|
1574
1574
|
r: 4,
|
|
1575
1575
|
fill: "currentColor"
|
|
1576
1576
|
},
|
|
1577
|
-
...
|
|
1577
|
+
...on
|
|
1578
1578
|
}, e.key))
|
|
1579
1579
|
]
|
|
1580
1580
|
})
|
|
@@ -1583,14 +1583,14 @@ function ln({ data: e, xKey: t, series: n, icon: r, title: i, aside: a, sub: o,
|
|
|
1583
1583
|
}
|
|
1584
1584
|
//#endregion
|
|
1585
1585
|
//#region src/ui/Sparkline.jsx
|
|
1586
|
-
function
|
|
1586
|
+
function fn({ data: e, type: t = "line", color: n = "teal", width: r = 88, height: i = 24, label: a, className: o = "" }) {
|
|
1587
1587
|
let s = (e || []).map((e, t) => typeof e == "number" ? {
|
|
1588
1588
|
i: t,
|
|
1589
1589
|
value: e
|
|
1590
1590
|
} : {
|
|
1591
1591
|
i: t,
|
|
1592
1592
|
...e
|
|
1593
|
-
}), c =
|
|
1593
|
+
}), c = nn(n);
|
|
1594
1594
|
return /* @__PURE__ */ p("span", {
|
|
1595
1595
|
className: ["spark", o].filter(Boolean).join(" "),
|
|
1596
1596
|
style: {
|
|
@@ -1599,10 +1599,10 @@ function un({ data: e, type: t = "line", color: n = "teal", width: r = 88, heigh
|
|
|
1599
1599
|
},
|
|
1600
1600
|
role: "img",
|
|
1601
1601
|
"aria-label": a,
|
|
1602
|
-
children: /* @__PURE__ */ p(
|
|
1602
|
+
children: /* @__PURE__ */ p(Je, {
|
|
1603
1603
|
width: "100%",
|
|
1604
1604
|
height: "100%",
|
|
1605
|
-
children: t === "bar" ? /* @__PURE__ */ p(
|
|
1605
|
+
children: t === "bar" ? /* @__PURE__ */ p(Ue, {
|
|
1606
1606
|
data: s,
|
|
1607
1607
|
margin: {
|
|
1608
1608
|
top: 1,
|
|
@@ -1611,14 +1611,14 @@ function un({ data: e, type: t = "line", color: n = "teal", width: r = 88, heigh
|
|
|
1611
1611
|
left: 0
|
|
1612
1612
|
},
|
|
1613
1613
|
barCategoryGap: "18%",
|
|
1614
|
-
children: /* @__PURE__ */ p(
|
|
1614
|
+
children: /* @__PURE__ */ p(He, {
|
|
1615
1615
|
dataKey: "value",
|
|
1616
1616
|
className: c,
|
|
1617
1617
|
fill: "currentColor",
|
|
1618
1618
|
radius: 0,
|
|
1619
1619
|
isAnimationActive: !1
|
|
1620
1620
|
})
|
|
1621
|
-
}) : /* @__PURE__ */ p(
|
|
1621
|
+
}) : /* @__PURE__ */ p(qe, {
|
|
1622
1622
|
data: s,
|
|
1623
1623
|
margin: {
|
|
1624
1624
|
top: 2,
|
|
@@ -1626,7 +1626,7 @@ function un({ data: e, type: t = "line", color: n = "teal", width: r = 88, heigh
|
|
|
1626
1626
|
bottom: 2,
|
|
1627
1627
|
left: 1
|
|
1628
1628
|
},
|
|
1629
|
-
children: /* @__PURE__ */ p(
|
|
1629
|
+
children: /* @__PURE__ */ p(Ke, {
|
|
1630
1630
|
dataKey: "value",
|
|
1631
1631
|
className: `${c} chart-line`,
|
|
1632
1632
|
stroke: "currentColor",
|
|
@@ -1640,7 +1640,7 @@ function un({ data: e, type: t = "line", color: n = "teal", width: r = 88, heigh
|
|
|
1640
1640
|
}
|
|
1641
1641
|
//#endregion
|
|
1642
1642
|
//#region src/ui/Accordion.jsx
|
|
1643
|
-
function
|
|
1643
|
+
function pn({ items: e, defaultOpen: t, allowMultiple: n = !1, headingLevel: r = 3, "aria-label": i }) {
|
|
1644
1644
|
let a = o(), s = u([]), [c, l] = d(() => {
|
|
1645
1645
|
let r = (t == null ? [] : Array.isArray(t) ? t : [t]).filter((t) => e.some((e) => e.id === t));
|
|
1646
1646
|
return new Set(n ? r : r.slice(0, 1));
|
|
@@ -1721,27 +1721,27 @@ function dn({ items: e, defaultOpen: t, allowMultiple: n = !1, headingLevel: r =
|
|
|
1721
1721
|
}
|
|
1722
1722
|
//#endregion
|
|
1723
1723
|
//#region src/ui/Timeline.jsx
|
|
1724
|
-
function
|
|
1725
|
-
return /* @__PURE__ */ p(
|
|
1724
|
+
function mn() {
|
|
1725
|
+
return /* @__PURE__ */ p(gt, { name: "claude" });
|
|
1726
1726
|
}
|
|
1727
|
-
var
|
|
1727
|
+
var hn = {
|
|
1728
1728
|
read: b,
|
|
1729
|
-
grep:
|
|
1730
|
-
edit:
|
|
1731
|
-
write:
|
|
1732
|
-
bash:
|
|
1733
|
-
task:
|
|
1734
|
-
webfetch:
|
|
1735
|
-
default:
|
|
1736
|
-
},
|
|
1729
|
+
grep: xe,
|
|
1730
|
+
edit: _e,
|
|
1731
|
+
write: re,
|
|
1732
|
+
bash: je,
|
|
1733
|
+
task: fe,
|
|
1734
|
+
webfetch: oe,
|
|
1735
|
+
default: Le
|
|
1736
|
+
}, gn = (e) => e >= 1e3 ? (e / 1e3).toFixed(1).replace(/\.0$/, "") + "k" : String(e), _n = {
|
|
1737
1737
|
user: {
|
|
1738
1738
|
cls: "tl-item--user",
|
|
1739
|
-
glyph:
|
|
1739
|
+
glyph: Ne,
|
|
1740
1740
|
label: "user"
|
|
1741
1741
|
},
|
|
1742
1742
|
assistant: {
|
|
1743
1743
|
cls: "tl-item--assistant",
|
|
1744
|
-
glyph:
|
|
1744
|
+
glyph: mn,
|
|
1745
1745
|
label: "claude"
|
|
1746
1746
|
},
|
|
1747
1747
|
subagent: {
|
|
@@ -1751,16 +1751,16 @@ var pn = {
|
|
|
1751
1751
|
},
|
|
1752
1752
|
tool: {
|
|
1753
1753
|
cls: "tl-item--tool",
|
|
1754
|
-
glyph:
|
|
1754
|
+
glyph: Le,
|
|
1755
1755
|
label: "tool"
|
|
1756
1756
|
},
|
|
1757
1757
|
system: {
|
|
1758
1758
|
cls: "tl-item--system",
|
|
1759
|
-
glyph:
|
|
1759
|
+
glyph: we,
|
|
1760
1760
|
label: "system"
|
|
1761
1761
|
}
|
|
1762
1762
|
};
|
|
1763
|
-
function
|
|
1763
|
+
function vn({ block: e, open: t, onToggle: n }) {
|
|
1764
1764
|
let [r, i] = d(!1), a = t != null, o = a ? t : r;
|
|
1765
1765
|
return /* @__PURE__ */ m("div", {
|
|
1766
1766
|
className: "tl-thinking",
|
|
@@ -1790,7 +1790,7 @@ function gn({ block: e, open: t, onToggle: n }) {
|
|
|
1790
1790
|
})]
|
|
1791
1791
|
});
|
|
1792
1792
|
}
|
|
1793
|
-
function
|
|
1793
|
+
function yn({ tool: e }) {
|
|
1794
1794
|
if (e.kind === "read") return /* @__PURE__ */ m("div", {
|
|
1795
1795
|
className: "tl-tool-body",
|
|
1796
1796
|
children: [/* @__PURE__ */ m("dl", {
|
|
@@ -1901,7 +1901,7 @@ function _n({ tool: e }) {
|
|
|
1901
1901
|
/* @__PURE__ */ m("div", {
|
|
1902
1902
|
className: "tl-term",
|
|
1903
1903
|
children: [
|
|
1904
|
-
/* @__PURE__ */ p(
|
|
1904
|
+
/* @__PURE__ */ p(je, {
|
|
1905
1905
|
className: "lucide",
|
|
1906
1906
|
"aria-hidden": "true"
|
|
1907
1907
|
}),
|
|
@@ -1956,7 +1956,7 @@ function _n({ tool: e }) {
|
|
|
1956
1956
|
target: "_blank",
|
|
1957
1957
|
rel: "noreferrer",
|
|
1958
1958
|
children: [
|
|
1959
|
-
/* @__PURE__ */ p(
|
|
1959
|
+
/* @__PURE__ */ p(oe, {
|
|
1960
1960
|
className: "lucide",
|
|
1961
1961
|
"aria-hidden": "true"
|
|
1962
1962
|
}),
|
|
@@ -1973,7 +1973,7 @@ function _n({ tool: e }) {
|
|
|
1973
1973
|
children: e.result
|
|
1974
1974
|
})
|
|
1975
1975
|
]
|
|
1976
|
-
}) : e.kind === "task" ? /* @__PURE__ */ p(
|
|
1976
|
+
}) : e.kind === "task" ? /* @__PURE__ */ p(bn, { tool: e }) : /* @__PURE__ */ m("div", {
|
|
1977
1977
|
className: "tl-tool-body",
|
|
1978
1978
|
children: [
|
|
1979
1979
|
/* @__PURE__ */ p("div", {
|
|
@@ -1995,7 +1995,7 @@ function _n({ tool: e }) {
|
|
|
1995
1995
|
]
|
|
1996
1996
|
});
|
|
1997
1997
|
}
|
|
1998
|
-
function
|
|
1998
|
+
function bn({ tool: e }) {
|
|
1999
1999
|
let [t, n] = d(!1);
|
|
2000
2000
|
return /* @__PURE__ */ m("div", {
|
|
2001
2001
|
className: "tl-tool-body",
|
|
@@ -2038,8 +2038,8 @@ function vn({ tool: e }) {
|
|
|
2038
2038
|
]
|
|
2039
2039
|
});
|
|
2040
2040
|
}
|
|
2041
|
-
function
|
|
2042
|
-
let [a, o] = d(!1), s = n != null, c = s ? n : a, l = () => s ? r?.() : o((e) => !e), u =
|
|
2041
|
+
function xn({ tool: e, index: t = 0, open: n, onToggle: r, renderTool: i }) {
|
|
2042
|
+
let [a, o] = d(!1), s = n != null, c = s ? n : a, l = () => s ? r?.() : o((e) => !e), u = hn[e.kind] || hn.default, f = e.kind === "bash" && e.exit != null && e.exit !== 0;
|
|
2043
2043
|
return /* @__PURE__ */ m("div", {
|
|
2044
2044
|
className: "tl-tool",
|
|
2045
2045
|
children: [/* @__PURE__ */ m("button", {
|
|
@@ -2085,10 +2085,10 @@ function yn({ tool: e, index: t = 0, open: n, onToggle: r, renderTool: i }) {
|
|
|
2085
2085
|
})]
|
|
2086
2086
|
})
|
|
2087
2087
|
]
|
|
2088
|
-
}), c && (i ? i(e, t) : /* @__PURE__ */ p(
|
|
2088
|
+
}), c && (i ? i(e, t) : /* @__PURE__ */ p(yn, { tool: e }))]
|
|
2089
2089
|
});
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function Sn({ item: e, renderTool: t, renderBody: n }) {
|
|
2092
2092
|
if (e.kind === "phase") {
|
|
2093
2093
|
let t = e.icon;
|
|
2094
2094
|
return /* @__PURE__ */ m("li", {
|
|
@@ -2119,7 +2119,7 @@ function bn({ item: e, renderTool: t, renderBody: n }) {
|
|
|
2119
2119
|
}), /* @__PURE__ */ m("div", {
|
|
2120
2120
|
className: "tl-cp",
|
|
2121
2121
|
children: [
|
|
2122
|
-
/* @__PURE__ */ p(
|
|
2122
|
+
/* @__PURE__ */ p(G, {
|
|
2123
2123
|
className: "lucide",
|
|
2124
2124
|
"aria-hidden": "true"
|
|
2125
2125
|
}),
|
|
@@ -2144,7 +2144,7 @@ function bn({ item: e, renderTool: t, renderBody: n }) {
|
|
|
2144
2144
|
]
|
|
2145
2145
|
})]
|
|
2146
2146
|
});
|
|
2147
|
-
let r = e.depth != null && e.depth > 0, i =
|
|
2147
|
+
let r = e.depth != null && e.depth > 0, i = _n[r ? "subagent" : e.role || "assistant"] || _n.assistant, a = i.glyph, o = e.tokens;
|
|
2148
2148
|
return /* @__PURE__ */ m("li", {
|
|
2149
2149
|
className: "tl-item " + i.cls + (e.error ? " tl-item--error" : "") + (e.final ? " tl-item--final" : ""),
|
|
2150
2150
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -2189,14 +2189,14 @@ function bn({ item: e, renderTool: t, renderBody: n }) {
|
|
|
2189
2189
|
}),
|
|
2190
2190
|
o && /* @__PURE__ */ m("span", {
|
|
2191
2191
|
className: "tl-tokens tnum",
|
|
2192
|
-
title:
|
|
2192
|
+
title: gn(o.in) + " in, " + gn(o.out) + " out",
|
|
2193
2193
|
children: [
|
|
2194
2194
|
/* @__PURE__ */ p(L, {
|
|
2195
2195
|
className: "lucide",
|
|
2196
2196
|
"aria-hidden": "true"
|
|
2197
2197
|
}),
|
|
2198
2198
|
" ",
|
|
2199
|
-
|
|
2199
|
+
gn(o.in + o.out)
|
|
2200
2200
|
]
|
|
2201
2201
|
})
|
|
2202
2202
|
]
|
|
@@ -2205,8 +2205,8 @@ function bn({ item: e, renderTool: t, renderBody: n }) {
|
|
|
2205
2205
|
className: "tl-body",
|
|
2206
2206
|
children: e.body
|
|
2207
2207
|
}) : null,
|
|
2208
|
-
e.thinking && /* @__PURE__ */ p(
|
|
2209
|
-
e.tools && e.tools.map((e, n) => /* @__PURE__ */ p(
|
|
2208
|
+
e.thinking && /* @__PURE__ */ p(vn, { block: e.thinking }),
|
|
2209
|
+
e.tools && e.tools.map((e, n) => /* @__PURE__ */ p(xn, {
|
|
2210
2210
|
tool: e,
|
|
2211
2211
|
index: n,
|
|
2212
2212
|
renderTool: t
|
|
@@ -2215,11 +2215,11 @@ function bn({ item: e, renderTool: t, renderBody: n }) {
|
|
|
2215
2215
|
})]
|
|
2216
2216
|
});
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2218
|
+
function Cn({ items: e = [], renderTool: t, renderBody: n, dense: r = !1, ariaLabel: i = "conversation timeline" }) {
|
|
2219
2219
|
return e.length ? /* @__PURE__ */ p("ol", {
|
|
2220
2220
|
className: "tl" + (r ? " tl--dense" : ""),
|
|
2221
2221
|
"aria-label": i,
|
|
2222
|
-
children: e.map((e) => /* @__PURE__ */ p(
|
|
2222
|
+
children: e.map((e) => /* @__PURE__ */ p(Sn, {
|
|
2223
2223
|
item: e,
|
|
2224
2224
|
renderTool: t,
|
|
2225
2225
|
renderBody: n
|
|
@@ -2242,13 +2242,13 @@ function xn({ items: e = [], renderTool: t, renderBody: n, dense: r = !1, ariaLa
|
|
|
2242
2242
|
}
|
|
2243
2243
|
//#endregion
|
|
2244
2244
|
//#region src/ui/ToastHost.jsx
|
|
2245
|
-
var
|
|
2246
|
-
function
|
|
2245
|
+
var wn = t(null);
|
|
2246
|
+
function Tn() {
|
|
2247
2247
|
if (typeof window > "u" || typeof document > "u") return 160;
|
|
2248
2248
|
let e = getComputedStyle(document.documentElement).getPropertyValue("--dur-2");
|
|
2249
2249
|
return parseFloat(e) || 160;
|
|
2250
2250
|
}
|
|
2251
|
-
var
|
|
2251
|
+
var En = {
|
|
2252
2252
|
ok: {
|
|
2253
2253
|
icon: N,
|
|
2254
2254
|
title: "done"
|
|
@@ -2258,7 +2258,7 @@ var wn = {
|
|
|
2258
2258
|
title: "something went wrong"
|
|
2259
2259
|
}
|
|
2260
2260
|
};
|
|
2261
|
-
function
|
|
2261
|
+
function Dn(e, t) {
|
|
2262
2262
|
switch (t.type) {
|
|
2263
2263
|
case "add": {
|
|
2264
2264
|
let n = e, r = n.filter((e) => e.state !== "leave");
|
|
@@ -2284,11 +2284,11 @@ function Tn(e, t) {
|
|
|
2284
2284
|
default: return e;
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
2287
|
-
function
|
|
2287
|
+
function On() {
|
|
2288
2288
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2289
2289
|
}
|
|
2290
|
-
function
|
|
2291
|
-
let [d, f] = l(
|
|
2290
|
+
function kn({ children: e, placement: t = "bottom-right", max: n = 4, duration: i = 5e3, inline: s = !1 }) {
|
|
2291
|
+
let [d, f] = l(Dn, []), h = o(), g = u(0), _ = u(/* @__PURE__ */ new Map()), v = u([]), y = u(!1), b = r((e) => {
|
|
2292
2292
|
let t = _.current.get(e);
|
|
2293
2293
|
t?.timer && clearTimeout(t.timer), _.current.delete(e), f({
|
|
2294
2294
|
type: "remove",
|
|
@@ -2303,7 +2303,7 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2303
2303
|
type: "leave",
|
|
2304
2304
|
id: e
|
|
2305
2305
|
});
|
|
2306
|
-
let n =
|
|
2306
|
+
let n = On() ? 0 : Tn(), r = setTimeout(() => b(e), n);
|
|
2307
2307
|
_.current.set(e, {
|
|
2308
2308
|
..._.current.get(e),
|
|
2309
2309
|
exit: r
|
|
@@ -2317,7 +2317,7 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2317
2317
|
startedAt: Date.now()
|
|
2318
2318
|
});
|
|
2319
2319
|
}, [x]), C = r((e = {}) => {
|
|
2320
|
-
let t = e.variant === "err" ? "err" : "ok", r =
|
|
2320
|
+
let t = e.variant === "err" ? "err" : "ok", r = En[t], a = e.id ?? `${h}-${g.current += 1}`, o = e.duration ?? i, s = {
|
|
2321
2321
|
id: a,
|
|
2322
2322
|
variant: t,
|
|
2323
2323
|
title: e.title ?? r.title,
|
|
@@ -2343,7 +2343,7 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2343
2343
|
n
|
|
2344
2344
|
]), w = r((e, t = {}) => {
|
|
2345
2345
|
let n = {};
|
|
2346
|
-
if ("title" in t && (n.title = t.title), "message" in t && (n.message = t.message), "variant" in t && (n.variant = t.variant === "err" ? "err" : "ok", !("icon" in t) && !("title" in t) && (n.icon =
|
|
2346
|
+
if ("title" in t && (n.title = t.title), "message" in t && (n.message = t.message), "variant" in t && (n.variant = t.variant === "err" ? "err" : "ok", !("icon" in t) && !("title" in t) && (n.icon = En[n.variant].icon)), "icon" in t && (n.icon = t.icon), "closeLabel" in t && (n.closeLabel = t.closeLabel), f({
|
|
2347
2347
|
type: "patch",
|
|
2348
2348
|
id: e,
|
|
2349
2349
|
patch: n
|
|
@@ -2367,7 +2367,7 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2367
2367
|
dismissAll: () => {
|
|
2368
2368
|
for (let [e, t] of _.current) t?.timer && clearTimeout(t.timer);
|
|
2369
2369
|
v.current = [], f({ type: "clear" });
|
|
2370
|
-
let e =
|
|
2370
|
+
let e = On() ? 0 : Tn(), t = Array.from(_.current.keys());
|
|
2371
2371
|
setTimeout(() => {
|
|
2372
2372
|
for (let e of t) b(e);
|
|
2373
2373
|
}, e);
|
|
@@ -2377,7 +2377,7 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2377
2377
|
let n = C({
|
|
2378
2378
|
message: t.pending ?? "working",
|
|
2379
2379
|
title: t.pendingTitle ?? "in progress",
|
|
2380
|
-
icon:
|
|
2380
|
+
icon: me,
|
|
2381
2381
|
duration: Infinity
|
|
2382
2382
|
});
|
|
2383
2383
|
return Promise.resolve(e).then((e) => (w(n, {
|
|
@@ -2436,7 +2436,7 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2436
2436
|
`tsx-${t}`,
|
|
2437
2437
|
s && "tsx-host--inline"
|
|
2438
2438
|
].filter(Boolean).join(" ");
|
|
2439
|
-
return /* @__PURE__ */ m(
|
|
2439
|
+
return /* @__PURE__ */ m(wn.Provider, {
|
|
2440
2440
|
value: T,
|
|
2441
2441
|
children: [e, /* @__PURE__ */ p("div", {
|
|
2442
2442
|
className: O,
|
|
@@ -2451,7 +2451,7 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2451
2451
|
children: d.map((e) => /* @__PURE__ */ p("div", {
|
|
2452
2452
|
className: "tsx-item",
|
|
2453
2453
|
"data-state": e.state,
|
|
2454
|
-
children: /* @__PURE__ */ p(
|
|
2454
|
+
children: /* @__PURE__ */ p(Kt, {
|
|
2455
2455
|
variant: e.variant,
|
|
2456
2456
|
title: e.title,
|
|
2457
2457
|
icon: e.icon,
|
|
@@ -2463,14 +2463,14 @@ function Dn({ children: e, placement: t = "bottom-right", max: n = 4, duration:
|
|
|
2463
2463
|
})]
|
|
2464
2464
|
});
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2467
|
-
let e = i(
|
|
2466
|
+
function An() {
|
|
2467
|
+
let e = i(wn);
|
|
2468
2468
|
if (e == null) throw Error("usetoast must be used inside a toastprovider");
|
|
2469
2469
|
return e;
|
|
2470
2470
|
}
|
|
2471
2471
|
//#endregion
|
|
2472
2472
|
//#region src/ui/DateRange.jsx
|
|
2473
|
-
var
|
|
2473
|
+
var jn = [
|
|
2474
2474
|
"january",
|
|
2475
2475
|
"february",
|
|
2476
2476
|
"march",
|
|
@@ -2483,7 +2483,7 @@ var kn = [
|
|
|
2483
2483
|
"october",
|
|
2484
2484
|
"november",
|
|
2485
2485
|
"december"
|
|
2486
|
-
],
|
|
2486
|
+
], Mn = [
|
|
2487
2487
|
"jan",
|
|
2488
2488
|
"feb",
|
|
2489
2489
|
"mar",
|
|
@@ -2496,7 +2496,7 @@ var kn = [
|
|
|
2496
2496
|
"oct",
|
|
2497
2497
|
"nov",
|
|
2498
2498
|
"dec"
|
|
2499
|
-
],
|
|
2499
|
+
], Nn = [
|
|
2500
2500
|
"mon",
|
|
2501
2501
|
"tue",
|
|
2502
2502
|
"wed",
|
|
@@ -2504,9 +2504,9 @@ var kn = [
|
|
|
2504
2504
|
"fri",
|
|
2505
2505
|
"sat",
|
|
2506
2506
|
"sun"
|
|
2507
|
-
],
|
|
2507
|
+
], Pn = (e) => String(e).padStart(2, "0");
|
|
2508
2508
|
function Y(e, t, n) {
|
|
2509
|
-
return `${e}-${
|
|
2509
|
+
return `${e}-${Pn(t + 1)}-${Pn(n)}`;
|
|
2510
2510
|
}
|
|
2511
2511
|
function X(e) {
|
|
2512
2512
|
if (!e || typeof e != "string") return null;
|
|
@@ -2521,19 +2521,19 @@ function Z() {
|
|
|
2521
2521
|
let e = /* @__PURE__ */ new Date();
|
|
2522
2522
|
return Y(e.getFullYear(), e.getMonth(), e.getDate());
|
|
2523
2523
|
}
|
|
2524
|
-
function
|
|
2524
|
+
function Fn(e, t) {
|
|
2525
2525
|
return new Date(e, t + 1, 0).getDate();
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2527
|
+
function In(e, t, n) {
|
|
2528
2528
|
return (new Date(e, t, 1).getDay() - n + 7) % 7;
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2530
|
+
function Ln(e, t) {
|
|
2531
2531
|
let n = X(e);
|
|
2532
2532
|
if (!n) return e;
|
|
2533
2533
|
let r = new Date(n.y, n.m, n.d + t);
|
|
2534
2534
|
return Y(r.getFullYear(), r.getMonth(), r.getDate());
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2536
|
+
function Rn(e, t) {
|
|
2537
2537
|
let n = e.y * 12 + e.m + t;
|
|
2538
2538
|
return {
|
|
2539
2539
|
y: Math.floor(n / 12),
|
|
@@ -2543,33 +2543,33 @@ function In(e, t) {
|
|
|
2543
2543
|
function Q(e, t) {
|
|
2544
2544
|
return e < t ? -1 : +(e > t);
|
|
2545
2545
|
}
|
|
2546
|
-
function
|
|
2546
|
+
function zn(e, t, n) {
|
|
2547
2547
|
return Q(e, t) >= 0 && Q(e, n) <= 0;
|
|
2548
2548
|
}
|
|
2549
|
-
function
|
|
2549
|
+
function Bn(e, t, n) {
|
|
2550
2550
|
return !(t && Q(e, t) < 0 || n && Q(e, n) > 0);
|
|
2551
2551
|
}
|
|
2552
|
-
function
|
|
2553
|
-
let { from: n, to: r } = e || {}, i = t.long ?
|
|
2552
|
+
function Vn(e, t = {}) {
|
|
2553
|
+
let { from: n, to: r } = e || {}, i = t.long ? jn : Mn, a = X(n), o = X(r);
|
|
2554
2554
|
return !a && !o ? "" : a && !o ? `${i[a.m]} ${a.d}, ${a.y}` : !a && o ? `${i[o.m]} ${o.d}, ${o.y}` : a.y === o.y && a.m === o.m && a.d === o.d ? `${i[a.m]} ${a.d}, ${a.y}` : a.y === o.y && a.m === o.m ? `${i[a.m]} ${a.d} – ${o.d}, ${a.y}` : a.y === o.y ? `${i[a.m]} ${a.d} – ${i[o.m]} ${o.d}, ${a.y}` : `${i[a.m]} ${a.d}, ${a.y} – ${i[o.m]} ${o.d}, ${o.y}`;
|
|
2555
2555
|
}
|
|
2556
|
-
function
|
|
2556
|
+
function Hn(e) {
|
|
2557
2557
|
let t = X(e);
|
|
2558
|
-
return t ? `${t.d} ${
|
|
2558
|
+
return t ? `${t.d} ${jn[t.m]} ${t.y}` : "";
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function Un(e) {
|
|
2561
2561
|
let { from: t, to: n } = e || {};
|
|
2562
|
-
return !t && !n ? "no dates" : t && !n ? `from ${
|
|
2562
|
+
return !t && !n ? "no dates" : t && !n ? `from ${Hn(t)}` : t && n && t === n ? Hn(t) : `${Hn(t)} to ${Hn(n)}`;
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2564
|
+
function Wn(e) {
|
|
2565
2565
|
let t = X(e);
|
|
2566
2566
|
return Y(t.y, t.m, 1);
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2568
|
+
function Gn(e) {
|
|
2569
2569
|
let t = X(e);
|
|
2570
|
-
return Y(t.y, t.m,
|
|
2570
|
+
return Y(t.y, t.m, Fn(t.y, t.m));
|
|
2571
2571
|
}
|
|
2572
|
-
var
|
|
2572
|
+
var Kn = [
|
|
2573
2573
|
{
|
|
2574
2574
|
id: "today",
|
|
2575
2575
|
label: "today",
|
|
@@ -2585,7 +2585,7 @@ var Wn = [
|
|
|
2585
2585
|
id: "yesterday",
|
|
2586
2586
|
label: "yesterday",
|
|
2587
2587
|
range: () => {
|
|
2588
|
-
let e =
|
|
2588
|
+
let e = Ln(Z(), -1);
|
|
2589
2589
|
return {
|
|
2590
2590
|
from: e,
|
|
2591
2591
|
to: e
|
|
@@ -2598,7 +2598,7 @@ var Wn = [
|
|
|
2598
2598
|
range: () => {
|
|
2599
2599
|
let e = Z();
|
|
2600
2600
|
return {
|
|
2601
|
-
from:
|
|
2601
|
+
from: Ln(e, -6),
|
|
2602
2602
|
to: e
|
|
2603
2603
|
};
|
|
2604
2604
|
}
|
|
@@ -2609,7 +2609,7 @@ var Wn = [
|
|
|
2609
2609
|
range: () => {
|
|
2610
2610
|
let e = Z();
|
|
2611
2611
|
return {
|
|
2612
|
-
from:
|
|
2612
|
+
from: Ln(e, -29),
|
|
2613
2613
|
to: e
|
|
2614
2614
|
};
|
|
2615
2615
|
}
|
|
@@ -2620,8 +2620,8 @@ var Wn = [
|
|
|
2620
2620
|
range: () => {
|
|
2621
2621
|
let e = Z();
|
|
2622
2622
|
return {
|
|
2623
|
-
from:
|
|
2624
|
-
to:
|
|
2623
|
+
from: Wn(e),
|
|
2624
|
+
to: Gn(e)
|
|
2625
2625
|
};
|
|
2626
2626
|
}
|
|
2627
2627
|
},
|
|
@@ -2629,10 +2629,10 @@ var Wn = [
|
|
|
2629
2629
|
id: "last-month",
|
|
2630
2630
|
label: "last month",
|
|
2631
2631
|
range: () => {
|
|
2632
|
-
let e =
|
|
2632
|
+
let e = Rn(X(Z()), -1), t = Y(e.y, e.m, 1);
|
|
2633
2633
|
return {
|
|
2634
2634
|
from: t,
|
|
2635
|
-
to:
|
|
2635
|
+
to: Gn(t)
|
|
2636
2636
|
};
|
|
2637
2637
|
}
|
|
2638
2638
|
},
|
|
@@ -2642,7 +2642,7 @@ var Wn = [
|
|
|
2642
2642
|
range: () => {
|
|
2643
2643
|
let e = Z();
|
|
2644
2644
|
return {
|
|
2645
|
-
from:
|
|
2645
|
+
from: Ln(e, -89),
|
|
2646
2646
|
to: e
|
|
2647
2647
|
};
|
|
2648
2648
|
}
|
|
@@ -2656,13 +2656,13 @@ var Wn = [
|
|
|
2656
2656
|
})
|
|
2657
2657
|
}
|
|
2658
2658
|
];
|
|
2659
|
-
function
|
|
2659
|
+
function qn(e) {
|
|
2660
2660
|
let t = X(e?.from), n = X(e?.to);
|
|
2661
2661
|
if (!t || !n) return 0;
|
|
2662
2662
|
let r = new Date(n.y, n.m, n.d) - new Date(t.y, t.m, t.d);
|
|
2663
2663
|
return Math.round(r / 864e5) + 1;
|
|
2664
2664
|
}
|
|
2665
|
-
function
|
|
2665
|
+
function Jn({ value: e, defaultValue: t = {
|
|
2666
2666
|
from: null,
|
|
2667
2667
|
to: null
|
|
2668
2668
|
}, onChange: n, onDraftChange: i, min: o, max: s, numberOfMonths: l = 2, weekStartsOn: f = 1, className: h = "", autoFocus: g = !1, gridLabelId: _ }) {
|
|
@@ -2682,12 +2682,12 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2682
2682
|
}, [x?.from]);
|
|
2683
2683
|
let M = Z(), N = c(() => {
|
|
2684
2684
|
let e = [];
|
|
2685
|
-
for (let t = 0; t < l; t++) e.push(
|
|
2685
|
+
for (let t = 0; t < l; t++) e.push(Rn(S, t));
|
|
2686
2686
|
return e;
|
|
2687
2687
|
}, [S, l]), P = (e) => {
|
|
2688
2688
|
v || b(e), n?.(e);
|
|
2689
2689
|
}, F = (e) => {
|
|
2690
|
-
if (!
|
|
2690
|
+
if (!Bn(e, o, s)) return;
|
|
2691
2691
|
let t = !!x?.from, n = !!x?.to;
|
|
2692
2692
|
if (!t || n) {
|
|
2693
2693
|
let t = {
|
|
@@ -2711,18 +2711,18 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2711
2711
|
};
|
|
2712
2712
|
k(null), P(r);
|
|
2713
2713
|
}, I = (e) => {
|
|
2714
|
-
x?.from && !x?.to &&
|
|
2714
|
+
x?.from && !x?.to && Bn(e, o, s) && (k(e), i?.({
|
|
2715
2715
|
from: x.from,
|
|
2716
2716
|
to: Q(e, x.from) >= 0 ? e : x.from
|
|
2717
2717
|
}));
|
|
2718
2718
|
}, L = r((e) => {
|
|
2719
2719
|
let t = X(e);
|
|
2720
2720
|
t && (T(e), C((e) => {
|
|
2721
|
-
let n =
|
|
2721
|
+
let n = Rn(e, l - 1), r = t.y < e.y || t.y === e.y && t.m < e.m, i = t.y > n.y || t.y === n.y && t.m > n.m;
|
|
2722
2722
|
return r ? {
|
|
2723
2723
|
y: t.y,
|
|
2724
2724
|
m: t.m
|
|
2725
|
-
} : i ?
|
|
2725
|
+
} : i ? Rn({
|
|
2726
2726
|
y: t.y,
|
|
2727
2727
|
m: t.m
|
|
2728
2728
|
}, -(l - 1)) : e;
|
|
@@ -2742,7 +2742,7 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2742
2742
|
let R = (e, t) => {
|
|
2743
2743
|
let n = e;
|
|
2744
2744
|
for (let r = 0; r < 400; r++) {
|
|
2745
|
-
if (n =
|
|
2745
|
+
if (n = Ln(n, t), Bn(n, o, s)) return n;
|
|
2746
2746
|
if (t > 0 && s && Q(n, s) > 0 || t < 0 && o && Q(n, o) < 0) return e;
|
|
2747
2747
|
}
|
|
2748
2748
|
return e;
|
|
@@ -2762,23 +2762,23 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2762
2762
|
n = R(t, 7);
|
|
2763
2763
|
break;
|
|
2764
2764
|
case "Home": {
|
|
2765
|
-
let e = X(t), r =
|
|
2766
|
-
n =
|
|
2765
|
+
let e = X(t), r = Ln(t, -((new Date(e.y, e.m, e.d).getDay() - f + 7) % 7));
|
|
2766
|
+
n = Bn(r, o, s) ? r : R(r, 1);
|
|
2767
2767
|
break;
|
|
2768
2768
|
}
|
|
2769
2769
|
case "End": {
|
|
2770
|
-
let e = X(t), r =
|
|
2771
|
-
n =
|
|
2770
|
+
let e = X(t), r = Ln(t, 6 - (new Date(e.y, e.m, e.d).getDay() - f + 7) % 7);
|
|
2771
|
+
n = Bn(r, o, s) ? r : R(r, -1);
|
|
2772
2772
|
break;
|
|
2773
2773
|
}
|
|
2774
2774
|
case "PageUp": {
|
|
2775
|
-
let r = X(t), i =
|
|
2776
|
-
n = Y(i.y, i.m, a),
|
|
2775
|
+
let r = X(t), i = Rn(r, e.shiftKey ? -12 : -1), a = Math.min(r.d, Fn(i.y, i.m));
|
|
2776
|
+
n = Y(i.y, i.m, a), Bn(n, o, s) || (n = o || n);
|
|
2777
2777
|
break;
|
|
2778
2778
|
}
|
|
2779
2779
|
case "PageDown": {
|
|
2780
|
-
let r = X(t), i =
|
|
2781
|
-
n = Y(i.y, i.m, a),
|
|
2780
|
+
let r = X(t), i = Rn(r, e.shiftKey ? 12 : 1), a = Math.min(r.d, Fn(i.y, i.m));
|
|
2781
|
+
n = Y(i.y, i.m, a), Bn(n, o, s) || (n = s || n);
|
|
2782
2782
|
break;
|
|
2783
2783
|
}
|
|
2784
2784
|
case "Enter":
|
|
@@ -2790,7 +2790,7 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2790
2790
|
n && (e.preventDefault(), L(n));
|
|
2791
2791
|
}, B = x?.from && !x?.to && E && Q(E, x.from) >= 0 ? E : null, ee = c(() => {
|
|
2792
2792
|
let e = [];
|
|
2793
|
-
for (let t = 0; t < 7; t++) e.push(
|
|
2793
|
+
for (let t = 0; t < 7; t++) e.push(Nn[(f - 1 + t + 7) % 7]);
|
|
2794
2794
|
return e;
|
|
2795
2795
|
}, [f]);
|
|
2796
2796
|
return /* @__PURE__ */ p("div", {
|
|
@@ -2800,7 +2800,7 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2800
2800
|
onKeyDown: z,
|
|
2801
2801
|
onMouseLeave: () => k(null),
|
|
2802
2802
|
children: N.map((e, t) => {
|
|
2803
|
-
let { y: n, m: r } = e, i =
|
|
2803
|
+
let { y: n, m: r } = e, i = Fn(n, r), a = In(n, r, f), c = [];
|
|
2804
2804
|
for (let e = 0; e < a; e++) c.push(null);
|
|
2805
2805
|
for (let e = 1; e <= i; e++) c.push(e);
|
|
2806
2806
|
for (; c.length % 7 != 0;) c.push(null);
|
|
@@ -2815,9 +2815,9 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2815
2815
|
t === 0 ? /* @__PURE__ */ p("button", {
|
|
2816
2816
|
type: "button",
|
|
2817
2817
|
className: "dr-nav",
|
|
2818
|
-
onClick: () => C((e) =>
|
|
2818
|
+
onClick: () => C((e) => Rn(e, -1)),
|
|
2819
2819
|
"aria-label": "previous month",
|
|
2820
|
-
disabled: !!o && Q(Y(n, r, 1),
|
|
2820
|
+
disabled: !!o && Q(Y(n, r, 1), Wn(o)) <= 0,
|
|
2821
2821
|
children: /* @__PURE__ */ p(D, { "aria-hidden": "true" })
|
|
2822
2822
|
}) : /* @__PURE__ */ p("span", {
|
|
2823
2823
|
className: "dr-nav",
|
|
@@ -2828,7 +2828,7 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2828
2828
|
className: "dr-mtitle",
|
|
2829
2829
|
id: u,
|
|
2830
2830
|
children: [
|
|
2831
|
-
|
|
2831
|
+
jn[r],
|
|
2832
2832
|
" ",
|
|
2833
2833
|
n
|
|
2834
2834
|
]
|
|
@@ -2836,9 +2836,9 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2836
2836
|
t === N.length - 1 ? /* @__PURE__ */ p("button", {
|
|
2837
2837
|
type: "button",
|
|
2838
2838
|
className: "dr-nav",
|
|
2839
|
-
onClick: () => C((e) =>
|
|
2839
|
+
onClick: () => C((e) => Rn(e, 1)),
|
|
2840
2840
|
"aria-label": "next month",
|
|
2841
|
-
disabled: !!s && Q(Y(n, r, i),
|
|
2841
|
+
disabled: !!s && Q(Y(n, r, i), Gn(s)) >= 0,
|
|
2842
2842
|
children: /* @__PURE__ */ p(O, { "aria-hidden": "true" })
|
|
2843
2843
|
}) : /* @__PURE__ */ p("span", {
|
|
2844
2844
|
className: "dr-nav",
|
|
@@ -2868,7 +2868,7 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2868
2868
|
role: "gridcell",
|
|
2869
2869
|
"aria-hidden": "true"
|
|
2870
2870
|
}, t);
|
|
2871
|
-
let i = Y(n, r, e), a = !
|
|
2871
|
+
let i = Y(n, r, e), a = !Bn(i, o, s), c = x?.from === i, l = x?.to === i, u = c || l, d = x?.from && x?.to && zn(i, x.from, x.to), f = !d && B && zn(i, x.from, B), m = i === M, h = i === w, g = ["dr-day"];
|
|
2872
2872
|
return u ? g.push("dr-edge") : d ? g.push("dr-in-range") : f && g.push("dr-preview"), m && g.push("dr-today"), /* @__PURE__ */ p("div", {
|
|
2873
2873
|
className: "dr-cell",
|
|
2874
2874
|
role: "gridcell",
|
|
@@ -2880,7 +2880,7 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2880
2880
|
e ? A.current.set(i, e) : A.current.delete(i);
|
|
2881
2881
|
},
|
|
2882
2882
|
tabIndex: h ? 0 : -1,
|
|
2883
|
-
"aria-label":
|
|
2883
|
+
"aria-label": Hn(i),
|
|
2884
2884
|
"aria-disabled": a ? "true" : void 0,
|
|
2885
2885
|
"aria-current": m ? "date" : void 0,
|
|
2886
2886
|
onClick: () => !a && F(i),
|
|
@@ -2897,15 +2897,15 @@ function Kn({ value: e, defaultValue: t = {
|
|
|
2897
2897
|
})
|
|
2898
2898
|
});
|
|
2899
2899
|
}
|
|
2900
|
-
function
|
|
2900
|
+
function Yn(e, t) {
|
|
2901
2901
|
if (!e?.from || !e?.to) return !1;
|
|
2902
2902
|
let n = t.range();
|
|
2903
2903
|
return n.from === e.from && n.to === e.to;
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function Xn({ value: e, defaultValue: t = {
|
|
2906
2906
|
from: null,
|
|
2907
2907
|
to: null
|
|
2908
|
-
}, onChange: n, onDraftChange: r, presets: i =
|
|
2908
|
+
}, onChange: n, onDraftChange: r, presets: i = Kn, min: c, max: l, numberOfMonths: f = 2, weekStartsOn: h = 1, placeholder: g = "any dates", label: _, align: v = "start", size: y = "md", disabled: b = !1, clearable: x = !0, id: S }) {
|
|
2909
2909
|
let w = o(), T = S || `dr-${w}`, D = `${T}-pop`, O = `${T}-label`, k = e !== void 0, [A, j] = d(t), M = k ? e : A, [N, P] = d(!1), F = u(null), I = u(null), L = u(null), R = (e, t) => {
|
|
2910
2910
|
k || j(e), t ? n?.(e) : r?.(e);
|
|
2911
2911
|
}, z = () => {
|
|
@@ -2941,19 +2941,19 @@ function Jn({ value: e, defaultValue: t = {
|
|
|
2941
2941
|
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (N || (e.preventDefault(), z()));
|
|
2942
2942
|
}, te = (e) => {
|
|
2943
2943
|
R(e, !0);
|
|
2944
|
-
}, ne = (e) => {
|
|
2945
|
-
R(e, !1);
|
|
2946
2944
|
}, V = (e) => {
|
|
2945
|
+
R(e, !1);
|
|
2946
|
+
}, ne = (e) => {
|
|
2947
2947
|
R(e.range(), !0), B(!0);
|
|
2948
2948
|
}, re = () => {
|
|
2949
2949
|
R({
|
|
2950
2950
|
from: null,
|
|
2951
2951
|
to: null
|
|
2952
2952
|
}, !0);
|
|
2953
|
-
}, H = !M?.from && !M?.to,
|
|
2953
|
+
}, H = !M?.from && !M?.to, U = H ? g : Vn(M), ie = H ? g : `dates: ${Un(M)}`, W = qn(M), G = H ? "no range selected" : M.from && !M.to ? `from ${Vn({
|
|
2954
2954
|
from: M.from,
|
|
2955
2955
|
to: null
|
|
2956
|
-
})}` : `${
|
|
2956
|
+
})}` : `${Vn(M)} (${W} ${W === 1 ? "day" : "days"})`, ae = i && i.length > 0;
|
|
2957
2957
|
return /* @__PURE__ */ m("div", {
|
|
2958
2958
|
className: "dr-field",
|
|
2959
2959
|
children: [_ && /* @__PURE__ */ p("label", {
|
|
@@ -2977,7 +2977,7 @@ function Jn({ value: e, defaultValue: t = {
|
|
|
2977
2977
|
"aria-haspopup": "dialog",
|
|
2978
2978
|
"aria-expanded": N ? "true" : "false",
|
|
2979
2979
|
"aria-controls": D,
|
|
2980
|
-
"aria-label":
|
|
2980
|
+
"aria-label": ie,
|
|
2981
2981
|
"aria-labelledby": _ ? `${O} ${T}` : void 0,
|
|
2982
2982
|
disabled: b,
|
|
2983
2983
|
onClick: () => N ? B(!0) : z(),
|
|
@@ -2989,7 +2989,7 @@ function Jn({ value: e, defaultValue: t = {
|
|
|
2989
2989
|
}),
|
|
2990
2990
|
/* @__PURE__ */ p("span", {
|
|
2991
2991
|
className: H ? "dr-value dr-empty" : "dr-value",
|
|
2992
|
-
children:
|
|
2992
|
+
children: U
|
|
2993
2993
|
}),
|
|
2994
2994
|
/* @__PURE__ */ p(E, {
|
|
2995
2995
|
className: "dr-caret",
|
|
@@ -3004,24 +3004,24 @@ function Jn({ value: e, defaultValue: t = {
|
|
|
3004
3004
|
"aria-label": "choose a date range",
|
|
3005
3005
|
hidden: !N,
|
|
3006
3006
|
children: [
|
|
3007
|
-
|
|
3007
|
+
ae && /* @__PURE__ */ p("div", {
|
|
3008
3008
|
className: "dr-presets",
|
|
3009
3009
|
role: "group",
|
|
3010
3010
|
"aria-label": "quick ranges",
|
|
3011
3011
|
children: i.map((e) => /* @__PURE__ */ p("button", {
|
|
3012
3012
|
type: "button",
|
|
3013
3013
|
className: "dr-preset",
|
|
3014
|
-
"aria-pressed":
|
|
3015
|
-
onClick: () =>
|
|
3014
|
+
"aria-pressed": Yn(M, e) ? "true" : "false",
|
|
3015
|
+
onClick: () => ne(e),
|
|
3016
3016
|
children: e.label
|
|
3017
3017
|
}, e.id))
|
|
3018
3018
|
}),
|
|
3019
3019
|
/* @__PURE__ */ m("div", {
|
|
3020
3020
|
className: "dr-body",
|
|
3021
|
-
children: [N && /* @__PURE__ */ p(
|
|
3021
|
+
children: [N && /* @__PURE__ */ p(Jn, {
|
|
3022
3022
|
value: M,
|
|
3023
3023
|
onChange: te,
|
|
3024
|
-
onDraftChange:
|
|
3024
|
+
onDraftChange: V,
|
|
3025
3025
|
min: c,
|
|
3026
3026
|
max: l,
|
|
3027
3027
|
numberOfMonths: f,
|
|
@@ -3064,7 +3064,7 @@ function Jn({ value: e, defaultValue: t = {
|
|
|
3064
3064
|
}
|
|
3065
3065
|
//#endregion
|
|
3066
3066
|
//#region src/ui/Dialog.jsx
|
|
3067
|
-
function
|
|
3067
|
+
function Zn({ open: e, onClose: t, title: n, labelId: r = "dlg-title", children: i, footer: o, returnFocusRef: s }) {
|
|
3068
3068
|
let c = u(null), l = u(t);
|
|
3069
3069
|
l.current = t;
|
|
3070
3070
|
let d = u(s);
|
|
@@ -3132,8 +3132,8 @@ function Yn({ open: e, onClose: t, title: n, labelId: r = "dlg-title", children:
|
|
|
3132
3132
|
}
|
|
3133
3133
|
//#endregion
|
|
3134
3134
|
//#region src/ui/CommandPalette.jsx
|
|
3135
|
-
var
|
|
3136
|
-
function
|
|
3135
|
+
var Qn = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3136
|
+
function $n({ open: e, onClose: t, onTheme: n, sections: r }) {
|
|
3137
3137
|
let [i, o] = d(""), [s, l] = d(0), f = u(null), h = c(() => {
|
|
3138
3138
|
let e = i.trim().toLowerCase(), t = (t) => t.toLowerCase().includes(e), n = [{
|
|
3139
3139
|
id: "__top",
|
|
@@ -3144,11 +3144,11 @@ function Zn({ open: e, onClose: t, onTheme: n, sections: r }) {
|
|
|
3144
3144
|
id: "__theme",
|
|
3145
3145
|
label: "toggle theme",
|
|
3146
3146
|
kind: "action",
|
|
3147
|
-
Icon:
|
|
3147
|
+
Icon: ke
|
|
3148
3148
|
}].filter((e) => t(e.label)), a = r.filter((e) => t(e.label)).map((e) => ({
|
|
3149
3149
|
...e,
|
|
3150
3150
|
kind: "section",
|
|
3151
|
-
Icon:
|
|
3151
|
+
Icon: ce
|
|
3152
3152
|
}));
|
|
3153
3153
|
return [{
|
|
3154
3154
|
group: "actions",
|
|
@@ -3169,7 +3169,7 @@ function Zn({ open: e, onClose: t, onTheme: n, sections: r }) {
|
|
|
3169
3169
|
}, [g.length, s]), !e) return null;
|
|
3170
3170
|
let _ = (e) => {
|
|
3171
3171
|
t();
|
|
3172
|
-
let r =
|
|
3172
|
+
let r = Qn() ? "auto" : "smooth";
|
|
3173
3173
|
if (e.id === "__top") return window.scrollTo({
|
|
3174
3174
|
top: 0,
|
|
3175
3175
|
behavior: r
|
|
@@ -3200,7 +3200,7 @@ function Zn({ open: e, onClose: t, onTheme: n, sections: r }) {
|
|
|
3200
3200
|
/* @__PURE__ */ m("div", {
|
|
3201
3201
|
className: "cp-search",
|
|
3202
3202
|
children: [
|
|
3203
|
-
/* @__PURE__ */ p(
|
|
3203
|
+
/* @__PURE__ */ p(xe, {
|
|
3204
3204
|
size: 15,
|
|
3205
3205
|
"aria-hidden": "true"
|
|
3206
3206
|
}),
|
|
@@ -3233,7 +3233,7 @@ function Zn({ open: e, onClose: t, onTheme: n, sections: r }) {
|
|
|
3233
3233
|
children: g.length === 0 ? /* @__PURE__ */ m("div", {
|
|
3234
3234
|
className: "cp-empty",
|
|
3235
3235
|
children: [
|
|
3236
|
-
/* @__PURE__ */ p(
|
|
3236
|
+
/* @__PURE__ */ p(Se, {
|
|
3237
3237
|
size: 20,
|
|
3238
3238
|
"aria-hidden": "true"
|
|
3239
3239
|
}),
|
|
@@ -3325,48 +3325,48 @@ function Zn({ open: e, onClose: t, onTheme: n, sections: r }) {
|
|
|
3325
3325
|
}
|
|
3326
3326
|
//#endregion
|
|
3327
3327
|
//#region src/ui/Intensity.jsx
|
|
3328
|
-
function
|
|
3328
|
+
function er(e) {
|
|
3329
3329
|
let t = Math.round(Number(e) || 0);
|
|
3330
3330
|
return Math.max(0, Math.min(4, t));
|
|
3331
3331
|
}
|
|
3332
|
-
function
|
|
3332
|
+
function tr(e, t) {
|
|
3333
3333
|
if (!t || t <= 0 || e <= 0) return 0;
|
|
3334
3334
|
let n = Math.min(e / t, 1);
|
|
3335
3335
|
return n < .25 ? 1 : n < .5 ? 2 : n < .9 ? 3 : 4;
|
|
3336
3336
|
}
|
|
3337
|
-
function
|
|
3337
|
+
function nr(e) {
|
|
3338
3338
|
if (!e || e <= 0) return 0;
|
|
3339
3339
|
let t = Math.min(e, 1);
|
|
3340
3340
|
return t <= .25 ? 1 : t <= .5 ? 2 : t <= .75 ? 3 : 4;
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3342
|
+
function rr(e, t) {
|
|
3343
3343
|
if (e <= 0 || t <= 0) return 0;
|
|
3344
3344
|
let n = Math.min(e / t, 1);
|
|
3345
3345
|
return n <= .25 ? 1 : n <= .5 ? 2 : n <= .75 ? 3 : 4;
|
|
3346
3346
|
}
|
|
3347
|
-
function
|
|
3347
|
+
function ir(e) {
|
|
3348
3348
|
let t = Number(e) || 0;
|
|
3349
3349
|
return t < 60 ? "xs" : t < 200 ? "sm" : t < 600 ? "md" : t < 1500 ? "lg" : "xl";
|
|
3350
3350
|
}
|
|
3351
|
-
var
|
|
3351
|
+
var ar = [
|
|
3352
3352
|
"none",
|
|
3353
3353
|
"low",
|
|
3354
3354
|
"some",
|
|
3355
3355
|
"most",
|
|
3356
3356
|
"full"
|
|
3357
3357
|
];
|
|
3358
|
-
function
|
|
3359
|
-
let o =
|
|
3358
|
+
function or({ level: e = 0, accent: t, size: n, label: r, className: i = "", ...a }) {
|
|
3359
|
+
let o = er(e);
|
|
3360
3360
|
return /* @__PURE__ */ p("span", {
|
|
3361
3361
|
className: `ir-swatch${n === "lg" ? " ir-swatch--lg" : ""}${i ? ` ${i}` : ""}`,
|
|
3362
3362
|
"data-level": o,
|
|
3363
3363
|
"data-accent": t || void 0,
|
|
3364
3364
|
role: "img",
|
|
3365
|
-
"aria-label": r || `intensity ${o} of 4 (${
|
|
3365
|
+
"aria-label": r || `intensity ${o} of 4 (${ar[o]})`,
|
|
3366
3366
|
...a
|
|
3367
3367
|
});
|
|
3368
3368
|
}
|
|
3369
|
-
function
|
|
3369
|
+
function sr({ title: e = "coverage", words: t = ar, className: n = "" }) {
|
|
3370
3370
|
return /* @__PURE__ */ m("div", {
|
|
3371
3371
|
className: `ir-scope ir-legend${n ? ` ${n}` : ""}`,
|
|
3372
3372
|
children: [
|
|
@@ -3408,8 +3408,8 @@ function ar({ title: e = "coverage", words: t = rr, className: n = "" }) {
|
|
|
3408
3408
|
]
|
|
3409
3409
|
});
|
|
3410
3410
|
}
|
|
3411
|
-
function
|
|
3412
|
-
let o = t ? t.map(
|
|
3411
|
+
function cr({ values: e, levels: t, max: n, labels: r, ariaLabel: i = "intensity heatmap", className: a = "" }) {
|
|
3412
|
+
let o = t ? t.map(er) : (e || []).map((t) => rr(t, n ?? Math.max(1, ...e || [1])));
|
|
3413
3413
|
return /* @__PURE__ */ p("div", {
|
|
3414
3414
|
className: `ir-scope ir-heatmap${a ? ` ${a}` : ""}`,
|
|
3415
3415
|
role: "img",
|
|
@@ -3417,12 +3417,12 @@ function or({ values: e, levels: t, max: n, labels: r, ariaLabel: i = "intensity
|
|
|
3417
3417
|
children: o.map((e, t) => /* @__PURE__ */ p("span", {
|
|
3418
3418
|
className: "ir-heatmap__cell",
|
|
3419
3419
|
"data-level": e,
|
|
3420
|
-
title: `${r?.[t] ?? `cell ${t + 1}`}: ${
|
|
3420
|
+
title: `${r?.[t] ?? `cell ${t + 1}`}: ${ar[e]} (${e}/4)`
|
|
3421
3421
|
}, t))
|
|
3422
3422
|
});
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3425
|
-
let h = i == null ?
|
|
3424
|
+
function lr({ label: e, loc: t, coverage: n = 0, recorded: r, total: i, selected: a = !1, violation: o = 0, effortPct: s, size: c, as: l = "button", onClick: u, className: d = "", ...f }) {
|
|
3425
|
+
let h = i == null ? er(n) : tr(r ?? 0, i), g = c || ir(t), _ = Math.max(0, Math.round(Number(o) || 0)), v = s != null && s > 0, y = v ? nr(s > 1 ? s / 100 : s) : 0, b = [
|
|
3426
3426
|
e,
|
|
3427
3427
|
i == null ? `coverage ${h} of 4` : `${r ?? 0} of ${i} recorded`,
|
|
3428
3428
|
t == null ? null : `${t} loc`,
|
|
@@ -3447,7 +3447,7 @@ function sr({ label: e, loc: t, coverage: n = 0, recorded: r, total: i, selected
|
|
|
3447
3447
|
}), _ > 0 && /* @__PURE__ */ m("span", {
|
|
3448
3448
|
className: "ir-node__badge",
|
|
3449
3449
|
"aria-hidden": "true",
|
|
3450
|
-
children: [/* @__PURE__ */ p(
|
|
3450
|
+
children: [/* @__PURE__ */ p(Me, { "aria-hidden": "true" }), /* @__PURE__ */ p("span", {
|
|
3451
3451
|
className: "tnum",
|
|
3452
3452
|
children: _
|
|
3453
3453
|
})]
|
|
@@ -3470,7 +3470,7 @@ function sr({ label: e, loc: t, coverage: n = 0, recorded: r, total: i, selected
|
|
|
3470
3470
|
]
|
|
3471
3471
|
});
|
|
3472
3472
|
}
|
|
3473
|
-
function
|
|
3473
|
+
function ur({ children: e, className: t = "", ...n }) {
|
|
3474
3474
|
return /* @__PURE__ */ p("div", {
|
|
3475
3475
|
className: `ir-scope${t ? ` ${t}` : ""}`,
|
|
3476
3476
|
...n,
|
|
@@ -3479,7 +3479,7 @@ function cr({ children: e, className: t = "", ...n }) {
|
|
|
3479
3479
|
}
|
|
3480
3480
|
//#endregion
|
|
3481
3481
|
//#region src/ui/Treemap.jsx
|
|
3482
|
-
function
|
|
3482
|
+
function dr(e, t) {
|
|
3483
3483
|
if (e.length === 0) return Infinity;
|
|
3484
3484
|
let n = 0, r = -Infinity, i = Infinity;
|
|
3485
3485
|
for (let t of e) n += t, t > r && (r = t), t < i && (i = t);
|
|
@@ -3487,7 +3487,7 @@ function lr(e, t) {
|
|
|
3487
3487
|
let a = t * t, o = n * n;
|
|
3488
3488
|
return Math.max(a * r / o, o / (a * i));
|
|
3489
3489
|
}
|
|
3490
|
-
function
|
|
3490
|
+
function fr(e, t) {
|
|
3491
3491
|
let n = e.reduce((e, t) => e + t.area, 0), r = [];
|
|
3492
3492
|
if (t.w <= t.h) {
|
|
3493
3493
|
let i = n / t.w, a = t.x;
|
|
@@ -3518,7 +3518,7 @@ function ur(e, t) {
|
|
|
3518
3518
|
}
|
|
3519
3519
|
return r;
|
|
3520
3520
|
}
|
|
3521
|
-
function
|
|
3521
|
+
function pr(e, t, n) {
|
|
3522
3522
|
if (e.length === 0) return [];
|
|
3523
3523
|
let r = [...e].sort((e, t) => t.value - e.value || (e.id < t.id ? -1 : +(e.id > t.id)));
|
|
3524
3524
|
if (t <= 0 || n <= 0) return r.map((e) => ({
|
|
@@ -3539,9 +3539,9 @@ function dr(e, t, n) {
|
|
|
3539
3539
|
}, d = [], f = 0;
|
|
3540
3540
|
for (; f < s.length;) {
|
|
3541
3541
|
let e = s[f], t = Math.min(u.w, u.h), n = d.map((e) => e.area);
|
|
3542
|
-
d.length === 0 ||
|
|
3542
|
+
d.length === 0 || dr(n, t) >= dr([...n, e.area], t) ? (d.push(e), f += 1) : (l.push(...fr(d, u)), d = []);
|
|
3543
3543
|
}
|
|
3544
|
-
d.length > 0 && l.push(...
|
|
3544
|
+
d.length > 0 && l.push(...fr(d, u));
|
|
3545
3545
|
for (let e of c) l.push({
|
|
3546
3546
|
id: e.id,
|
|
3547
3547
|
x: 0,
|
|
@@ -3551,27 +3551,27 @@ function dr(e, t, n) {
|
|
|
3551
3551
|
});
|
|
3552
3552
|
return l;
|
|
3553
3553
|
}
|
|
3554
|
-
var
|
|
3555
|
-
function
|
|
3554
|
+
var mr = 3;
|
|
3555
|
+
function hr(e) {
|
|
3556
3556
|
let t = Math.round(Number(e) || 0);
|
|
3557
3557
|
return t < 0 ? 0 : t > 4 ? 4 : t;
|
|
3558
3558
|
}
|
|
3559
|
-
function
|
|
3559
|
+
function gr(e) {
|
|
3560
3560
|
let t = String(e ?? ""), n = t.lastIndexOf("/");
|
|
3561
3561
|
return n >= 0 ? t.slice(n + 1) : t;
|
|
3562
3562
|
}
|
|
3563
|
-
var
|
|
3564
|
-
function
|
|
3563
|
+
var _r = 400, vr = 300, yr = 9, br = 9;
|
|
3564
|
+
function xr({ data: e = [], onSelect: t, height: n = 320, ariaLabel: r, className: i = "" }) {
|
|
3565
3565
|
let { tiles: a, byId: o, total: s } = c(() => {
|
|
3566
3566
|
let t = /* @__PURE__ */ new Map(), n = 0;
|
|
3567
3567
|
return {
|
|
3568
|
-
tiles:
|
|
3568
|
+
tiles: pr(e.map((e) => {
|
|
3569
3569
|
let r = Math.max(0, Number(e.value) || 0);
|
|
3570
3570
|
return n += r, t.set(e.id, e), {
|
|
3571
3571
|
id: e.id,
|
|
3572
3572
|
value: r
|
|
3573
3573
|
};
|
|
3574
|
-
}),
|
|
3574
|
+
}), _r, vr),
|
|
3575
3575
|
byId: t,
|
|
3576
3576
|
total: n
|
|
3577
3577
|
};
|
|
@@ -3584,27 +3584,27 @@ function yr({ data: e = [], onSelect: t, height: n = 320, ariaLabel: r, classNam
|
|
|
3584
3584
|
role: "group",
|
|
3585
3585
|
"aria-label": l,
|
|
3586
3586
|
children: [a.map((e) => {
|
|
3587
|
-
let n = e.w /
|
|
3587
|
+
let n = e.w / _r * 100, r = e.h / vr * 100;
|
|
3588
3588
|
if (n <= 0 || r <= 0) return null;
|
|
3589
3589
|
let i = o.get(e.id);
|
|
3590
3590
|
if (!i) return null;
|
|
3591
|
-
let a =
|
|
3591
|
+
let a = hr(i.intensity), s = i.unit || "lines", c = Math.max(0, Number(i.value) || 0), l = n >= yr && r >= br;
|
|
3592
3592
|
return /* @__PURE__ */ p("button", {
|
|
3593
3593
|
type: "button",
|
|
3594
|
-
className: "tm-tile" + (a >=
|
|
3594
|
+
className: "tm-tile" + (a >= mr ? " tm-tile--ink-flip" : ""),
|
|
3595
3595
|
"data-level": a,
|
|
3596
|
-
"aria-label": `${i.label}
|
|
3596
|
+
"aria-label": `${i.label}: ${c} ${s}`,
|
|
3597
3597
|
title: `${i.label} · ${c} ${s}`,
|
|
3598
3598
|
onClick: () => t?.(e.id, i),
|
|
3599
3599
|
style: {
|
|
3600
|
-
left: `${e.x /
|
|
3601
|
-
top: `${e.y /
|
|
3600
|
+
left: `${e.x / _r * 100}%`,
|
|
3601
|
+
top: `${e.y / vr * 100}%`,
|
|
3602
3602
|
width: `${n}%`,
|
|
3603
3603
|
height: `${r}%`
|
|
3604
3604
|
},
|
|
3605
3605
|
children: l && /* @__PURE__ */ p("span", {
|
|
3606
3606
|
className: "tm-tile-label mono",
|
|
3607
|
-
children:
|
|
3607
|
+
children: gr(i.label)
|
|
3608
3608
|
})
|
|
3609
3609
|
}, e.id);
|
|
3610
3610
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -3621,8 +3621,8 @@ function yr({ data: e = [], onSelect: t, height: n = 320, ariaLabel: r, classNam
|
|
|
3621
3621
|
}
|
|
3622
3622
|
//#endregion
|
|
3623
3623
|
//#region src/ui/CommitGraph.jsx
|
|
3624
|
-
var
|
|
3625
|
-
function
|
|
3624
|
+
var Sr = 14, Cr = 9, wr = 7, Tr = 9, Er = "3 3", $ = (e) => Cr + e * Sr, Dr = (e) => $(Math.max(e - 1, 0)) + wr;
|
|
3625
|
+
function Or({ commits: e = [], selectedId: t, onSelect: n, hasMore: r = !1, onShowOlder: i, label: a = "commit history", className: o = "", ...s }) {
|
|
3626
3626
|
let l = c(() => e.reduce((e, t) => Math.max(e, (t.lane ?? 0) + 1), 1), [e]), u = c(() => {
|
|
3627
3627
|
let t = new Map(e.map((e) => [e.id, e.lane ?? 0])), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
3628
3628
|
return e.forEach((e, t) => {
|
|
@@ -3644,7 +3644,7 @@ function Er({ commits: e = [], selectedId: t, onSelect: n, hasMore: r = !1, onSh
|
|
|
3644
3644
|
laneDown: i < c
|
|
3645
3645
|
};
|
|
3646
3646
|
});
|
|
3647
|
-
}, [e]), d =
|
|
3647
|
+
}, [e]), d = Dr(l), f = ["cg", o].filter(Boolean).join(" ");
|
|
3648
3648
|
return e.length === 0 ? /* @__PURE__ */ p("div", {
|
|
3649
3649
|
className: f,
|
|
3650
3650
|
...s,
|
|
@@ -3657,7 +3657,7 @@ function Er({ commits: e = [], selectedId: t, onSelect: n, hasMore: r = !1, onSh
|
|
|
3657
3657
|
role: "list",
|
|
3658
3658
|
"aria-label": a,
|
|
3659
3659
|
...s,
|
|
3660
|
-
children: [u.map((e) => /* @__PURE__ */ p(
|
|
3660
|
+
children: [u.map((e) => /* @__PURE__ */ p(kr, {
|
|
3661
3661
|
row: e,
|
|
3662
3662
|
width: d,
|
|
3663
3663
|
selected: e.commit.id === t,
|
|
@@ -3679,7 +3679,7 @@ function Er({ commits: e = [], selectedId: t, onSelect: n, hasMore: r = !1, onSh
|
|
|
3679
3679
|
y1: "0",
|
|
3680
3680
|
x2: $(0),
|
|
3681
3681
|
y2: "60%",
|
|
3682
|
-
strokeDasharray:
|
|
3682
|
+
strokeDasharray: Er
|
|
3683
3683
|
})
|
|
3684
3684
|
})
|
|
3685
3685
|
}), /* @__PURE__ */ m("button", {
|
|
@@ -3694,7 +3694,7 @@ function Er({ commits: e = [], selectedId: t, onSelect: n, hasMore: r = !1, onSh
|
|
|
3694
3694
|
})]
|
|
3695
3695
|
});
|
|
3696
3696
|
}
|
|
3697
|
-
function
|
|
3697
|
+
function kr({ row: e, width: t, selected: n, onSelect: r }) {
|
|
3698
3698
|
let { commit: i, lane: a, joins: o, passLanes: s, laneUp: c, laneDown: l } = e, u = !!i.session, d = [
|
|
3699
3699
|
"cg-dot",
|
|
3700
3700
|
u ? "cg-dot-filled" : "cg-dot-hollow",
|
|
@@ -3757,12 +3757,12 @@ function Dr({ row: e, width: t, selected: n, onSelect: r }) {
|
|
|
3757
3757
|
className: d,
|
|
3758
3758
|
style: {
|
|
3759
3759
|
left: $(a),
|
|
3760
|
-
width:
|
|
3761
|
-
height:
|
|
3760
|
+
width: Tr,
|
|
3761
|
+
height: Tr
|
|
3762
3762
|
},
|
|
3763
3763
|
"data-has-session": u || void 0
|
|
3764
3764
|
}),
|
|
3765
|
-
u && /* @__PURE__ */ p(
|
|
3765
|
+
u && /* @__PURE__ */ p(Oe, {
|
|
3766
3766
|
className: "cg-spark",
|
|
3767
3767
|
style: { left: $(a) },
|
|
3768
3768
|
"aria-hidden": "true"
|
|
@@ -3781,7 +3781,7 @@ function Dr({ row: e, width: t, selected: n, onSelect: r }) {
|
|
|
3781
3781
|
children: [
|
|
3782
3782
|
i.merged && /* @__PURE__ */ m("span", {
|
|
3783
3783
|
className: "cg-merged",
|
|
3784
|
-
children: [/* @__PURE__ */ p(
|
|
3784
|
+
children: [/* @__PURE__ */ p(ae, {
|
|
3785
3785
|
className: "cg-merged-ic",
|
|
3786
3786
|
"aria-hidden": "true"
|
|
3787
3787
|
}), "merged"]
|
|
@@ -3809,7 +3809,7 @@ function Dr({ row: e, width: t, selected: n, onSelect: r }) {
|
|
|
3809
3809
|
}
|
|
3810
3810
|
//#endregion
|
|
3811
3811
|
//#region src/ui/DiffView.jsx
|
|
3812
|
-
function
|
|
3812
|
+
function Ar(e) {
|
|
3813
3813
|
let t = 0, n = 0;
|
|
3814
3814
|
for (let r of e) for (let e of r.lines) e.type === "add" ? t++ : e.type === "del" && n++;
|
|
3815
3815
|
return {
|
|
@@ -3817,8 +3817,8 @@ function Or(e) {
|
|
|
3817
3817
|
dels: n
|
|
3818
3818
|
};
|
|
3819
3819
|
}
|
|
3820
|
-
function
|
|
3821
|
-
let { type: t, oldNo: n, newNo: r, text: i } = e, a = t === "add" ?
|
|
3820
|
+
function jr({ line: e }) {
|
|
3821
|
+
let { type: t, oldNo: n, newNo: r, text: i } = e, a = t === "add" ? ye : t === "del" ? ge : null;
|
|
3822
3822
|
return /* @__PURE__ */ m("div", {
|
|
3823
3823
|
className: `dv-line dv-${t}`,
|
|
3824
3824
|
role: "row",
|
|
@@ -3854,7 +3854,7 @@ function kr({ line: e }) {
|
|
|
3854
3854
|
]
|
|
3855
3855
|
});
|
|
3856
3856
|
}
|
|
3857
|
-
function
|
|
3857
|
+
function Mr({ match: e }) {
|
|
3858
3858
|
let { category: t, confidence: n, original: r, replacement: i, oldNo: a, newNo: o } = e, [s, c] = d(!1), l = n < .7, u = n.toFixed(2);
|
|
3859
3859
|
return /* @__PURE__ */ m("div", {
|
|
3860
3860
|
className: `dv-match${s ? " dv-match-kept" : ""}`,
|
|
@@ -3881,14 +3881,14 @@ function Ar({ match: e }) {
|
|
|
3881
3881
|
}),
|
|
3882
3882
|
s && /* @__PURE__ */ m("span", {
|
|
3883
3883
|
className: "dv-kept-flag",
|
|
3884
|
-
children: [/* @__PURE__ */ p(
|
|
3884
|
+
children: [/* @__PURE__ */ p(V, { "aria-hidden": "true" }), "un-redacted"]
|
|
3885
3885
|
}),
|
|
3886
3886
|
/* @__PURE__ */ m("button", {
|
|
3887
3887
|
type: "button",
|
|
3888
3888
|
className: "dv-keep",
|
|
3889
3889
|
"aria-pressed": s,
|
|
3890
3890
|
onClick: () => c((e) => !e),
|
|
3891
|
-
children: [p(s ?
|
|
3891
|
+
children: [p(s ? te : V, { "aria-hidden": "true" }), s ? "revert" : "keep"]
|
|
3892
3892
|
})
|
|
3893
3893
|
]
|
|
3894
3894
|
}), /* @__PURE__ */ m("div", {
|
|
@@ -3915,7 +3915,7 @@ function Ar({ match: e }) {
|
|
|
3915
3915
|
className: "dv-sign",
|
|
3916
3916
|
role: "cell",
|
|
3917
3917
|
"aria-hidden": "true",
|
|
3918
|
-
children: /* @__PURE__ */ p(
|
|
3918
|
+
children: /* @__PURE__ */ p(ge, { "aria-hidden": "true" })
|
|
3919
3919
|
}),
|
|
3920
3920
|
/* @__PURE__ */ m("span", {
|
|
3921
3921
|
className: "dv-text",
|
|
@@ -3950,7 +3950,7 @@ function Ar({ match: e }) {
|
|
|
3950
3950
|
className: "dv-sign",
|
|
3951
3951
|
role: "cell",
|
|
3952
3952
|
"aria-hidden": "true",
|
|
3953
|
-
children: /* @__PURE__ */ p(
|
|
3953
|
+
children: /* @__PURE__ */ p(ye, { "aria-hidden": "true" })
|
|
3954
3954
|
}),
|
|
3955
3955
|
/* @__PURE__ */ m("span", {
|
|
3956
3956
|
className: "dv-text",
|
|
@@ -3965,8 +3965,8 @@ function Ar({ match: e }) {
|
|
|
3965
3965
|
})]
|
|
3966
3966
|
});
|
|
3967
3967
|
}
|
|
3968
|
-
function
|
|
3969
|
-
let o = r === "redaction", s = o ? null :
|
|
3968
|
+
function Nr({ file: e, hunks: t = [], matches: n = [], variant: r = "default", className: i = "", ...a }) {
|
|
3969
|
+
let o = r === "redaction", s = o ? null : Ar(t);
|
|
3970
3970
|
return /* @__PURE__ */ m("figure", {
|
|
3971
3971
|
className: [
|
|
3972
3972
|
"dv",
|
|
@@ -4000,10 +4000,12 @@ function jr({ file: e, hunks: t = [], matches: n = [], variant: r = "default", c
|
|
|
4000
4000
|
})]
|
|
4001
4001
|
}), o ? /* @__PURE__ */ p("div", {
|
|
4002
4002
|
className: "dv-body dv-matches",
|
|
4003
|
+
role: "table",
|
|
4004
|
+
"aria-label": `redactions in ${e}`,
|
|
4003
4005
|
children: n.length === 0 ? /* @__PURE__ */ p("p", {
|
|
4004
4006
|
className: "dv-empty",
|
|
4005
|
-
children: "no sensitive content detected
|
|
4006
|
-
}) : n.map((e, t) => /* @__PURE__ */ p(
|
|
4007
|
+
children: "no sensitive content detected. safe to share as-is."
|
|
4008
|
+
}) : n.map((e, t) => /* @__PURE__ */ p(Mr, { match: e }, e.id ?? t))
|
|
4007
4009
|
}) : /* @__PURE__ */ p("div", {
|
|
4008
4010
|
className: "dv-body",
|
|
4009
4011
|
role: "table",
|
|
@@ -4013,10 +4015,8 @@ function jr({ file: e, hunks: t = [], matches: n = [], variant: r = "default", c
|
|
|
4013
4015
|
children: "no line changes."
|
|
4014
4016
|
}) : t.map((e, t) => /* @__PURE__ */ m("div", {
|
|
4015
4017
|
className: "dv-hunk",
|
|
4016
|
-
role: "rowgroup",
|
|
4017
4018
|
children: [/* @__PURE__ */ m("div", {
|
|
4018
4019
|
className: "dv-hunk-head",
|
|
4019
|
-
role: "row",
|
|
4020
4020
|
children: [
|
|
4021
4021
|
/* @__PURE__ */ p("span", {
|
|
4022
4022
|
className: "dv-hunk-at",
|
|
@@ -4033,14 +4033,18 @@ function jr({ file: e, hunks: t = [], matches: n = [], variant: r = "default", c
|
|
|
4033
4033
|
children: "@@"
|
|
4034
4034
|
})
|
|
4035
4035
|
]
|
|
4036
|
-
}),
|
|
4036
|
+
}), /* @__PURE__ */ p("div", {
|
|
4037
|
+
className: "dv-hunk-pair",
|
|
4038
|
+
role: "rowgroup",
|
|
4039
|
+
children: e.lines.map((e, t) => /* @__PURE__ */ p(jr, { line: e }, t))
|
|
4040
|
+
})]
|
|
4037
4041
|
}, t))
|
|
4038
4042
|
})]
|
|
4039
4043
|
});
|
|
4040
4044
|
}
|
|
4041
4045
|
//#endregion
|
|
4042
4046
|
//#region src/ui/StepWizard.jsx
|
|
4043
|
-
function
|
|
4047
|
+
function Pr({ steps: e, current: t, completed: n = /* @__PURE__ */ new Set(), reachable: r = /* @__PURE__ */ new Set(), onJump: i, "aria-label": a = "progress" }) {
|
|
4044
4048
|
return /* @__PURE__ */ p("nav", {
|
|
4045
4049
|
className: "swz-rail",
|
|
4046
4050
|
"aria-label": a,
|
|
@@ -4077,7 +4081,7 @@ function Mr({ steps: e, current: t, completed: n = /* @__PURE__ */ new Set(), re
|
|
|
4077
4081
|
})
|
|
4078
4082
|
});
|
|
4079
4083
|
}
|
|
4080
|
-
function
|
|
4084
|
+
function Fr({ steps: e, onComplete: t, renderStep: n, children: r, continueLabel: i = "continue", submitLabel: a = "submit", backLabel: s = "back", "aria-label": l }) {
|
|
4081
4085
|
let u = o(), [f, h] = d(0), [g, _] = d(() => /* @__PURE__ */ new Set()), [v, y] = d(() => new Set(e.length ? [e[0].id] : [])), [b, x] = d(() => ({})), S = e[f], C = f === e.length - 1, w = b[S?.id] !== !1, T = c(() => Array.isArray(r) ? r : r == null ? null : [r], [r]), E = (e) => {
|
|
4082
4086
|
x((t) => t[S.id] === e ? t : {
|
|
4083
4087
|
...t,
|
|
@@ -4109,7 +4113,7 @@ function Nr({ steps: e, onComplete: t, renderStep: n, children: r, continueLabel
|
|
|
4109
4113
|
children: [
|
|
4110
4114
|
/* @__PURE__ */ p("div", {
|
|
4111
4115
|
className: "swz-head",
|
|
4112
|
-
children: /* @__PURE__ */ p(
|
|
4116
|
+
children: /* @__PURE__ */ p(Pr, {
|
|
4113
4117
|
steps: e,
|
|
4114
4118
|
current: S?.id,
|
|
4115
4119
|
completed: g,
|
|
@@ -4129,7 +4133,7 @@ function Nr({ steps: e, onComplete: t, renderStep: n, children: r, continueLabel
|
|
|
4129
4133
|
children: [
|
|
4130
4134
|
"step ",
|
|
4131
4135
|
f + 1,
|
|
4132
|
-
"
|
|
4136
|
+
": ",
|
|
4133
4137
|
S?.label
|
|
4134
4138
|
]
|
|
4135
4139
|
}), A]
|
|
@@ -4137,7 +4141,7 @@ function Nr({ steps: e, onComplete: t, renderStep: n, children: r, continueLabel
|
|
|
4137
4141
|
/* @__PURE__ */ m("div", {
|
|
4138
4142
|
className: "swz-foot",
|
|
4139
4143
|
children: [
|
|
4140
|
-
/* @__PURE__ */ p(
|
|
4144
|
+
/* @__PURE__ */ p(et, {
|
|
4141
4145
|
variant: "ghost",
|
|
4142
4146
|
onClick: O,
|
|
4143
4147
|
disabled: f === 0,
|
|
@@ -4147,12 +4151,19 @@ function Nr({ steps: e, onComplete: t, renderStep: n, children: r, continueLabel
|
|
|
4147
4151
|
className: "swz-count",
|
|
4148
4152
|
"aria-hidden": "true",
|
|
4149
4153
|
children: [
|
|
4150
|
-
|
|
4154
|
+
"step ",
|
|
4155
|
+
/* @__PURE__ */ p("span", {
|
|
4156
|
+
className: "tnum",
|
|
4157
|
+
children: f + 1
|
|
4158
|
+
}),
|
|
4151
4159
|
" / ",
|
|
4152
|
-
|
|
4160
|
+
/* @__PURE__ */ p("span", {
|
|
4161
|
+
className: "tnum",
|
|
4162
|
+
children: e.length
|
|
4163
|
+
})
|
|
4153
4164
|
]
|
|
4154
4165
|
}),
|
|
4155
|
-
/* @__PURE__ */ p(
|
|
4166
|
+
/* @__PURE__ */ p(et, {
|
|
4156
4167
|
variant: "primary",
|
|
4157
4168
|
onClick: k,
|
|
4158
4169
|
disabled: !w,
|
|
@@ -4166,27 +4177,27 @@ function Nr({ steps: e, onComplete: t, renderStep: n, children: r, continueLabel
|
|
|
4166
4177
|
}
|
|
4167
4178
|
//#endregion
|
|
4168
4179
|
//#region src/ui/TimeStrip.jsx
|
|
4169
|
-
function
|
|
4180
|
+
function Ir(e, t, n) {
|
|
4170
4181
|
return Math.max(t, Math.min(n, e));
|
|
4171
4182
|
}
|
|
4172
|
-
function
|
|
4183
|
+
function Lr(e) {
|
|
4173
4184
|
let t = Math.round(Number(e) || 0);
|
|
4174
4185
|
return Math.max(0, Math.min(4, t));
|
|
4175
4186
|
}
|
|
4176
|
-
function
|
|
4187
|
+
function Rr(e, t) {
|
|
4177
4188
|
if (e <= 0 || t <= 0) return 0;
|
|
4178
4189
|
let n = Math.min(e / t, 1);
|
|
4179
4190
|
return n <= .25 ? 1 : n <= .5 ? 2 : n <= .75 ? 3 : 4;
|
|
4180
4191
|
}
|
|
4181
|
-
function
|
|
4182
|
-
return t <= 1 ? 0 : Math.round(
|
|
4192
|
+
function zr(e, t) {
|
|
4193
|
+
return t <= 1 ? 0 : Math.round(Ir(e, 0, 1) * (t - 1));
|
|
4183
4194
|
}
|
|
4184
|
-
function
|
|
4185
|
-
return t <= 1 ? 0 :
|
|
4195
|
+
function Br(e, t) {
|
|
4196
|
+
return t <= 1 ? 0 : Ir(e, 0, t - 1) / (t - 1);
|
|
4186
4197
|
}
|
|
4187
|
-
function
|
|
4188
|
-
let g = e.length, _ = u(null), v = `${o()}-readout`, y = t != null && i != null, [b, x] = d(
|
|
4189
|
-
let t =
|
|
4198
|
+
function Vr({ buckets: e = [], value: t, defaultValue: n = 1, onScrub: i, branches: a = [], label: s = "activity timeline", maxBranchChips: l = 4, className: f = "", ...h }) {
|
|
4199
|
+
let g = e.length, _ = u(null), v = `${o()}-readout`, y = t != null && i != null, [b, x] = d(Ir(typeof n == "number" ? n : 1, 0, 1)), S = Ir(y ? t : b, 0, 1), C = c(() => e.reduce((e, t) => Math.max(e, Number(t.value) || 0), 0), [e]), w = c(() => e.reduce((e, t) => e + (Number(t.value) || 0), 0), [e]), T = zr(S, g), E = e[T], D = E ? `${E.label} · ${Number(E.value) || 0} ${(Number(E.value) || 0) === 1 ? "session" : "sessions"}` : "no activity", O = r((e) => {
|
|
4200
|
+
let t = Ir(Math.round(e), 0, Math.max(0, g - 1)), n = Br(t, g);
|
|
4190
4201
|
y || x(n), i?.(n, t);
|
|
4191
4202
|
}, [
|
|
4192
4203
|
g,
|
|
@@ -4196,7 +4207,7 @@ function zr({ buckets: e = [], value: t, defaultValue: n = 1, onScrub: i, branch
|
|
|
4196
4207
|
let t = _.current;
|
|
4197
4208
|
if (!t || g === 0) return;
|
|
4198
4209
|
let n = t.getBoundingClientRect();
|
|
4199
|
-
O(
|
|
4210
|
+
O(zr(n.width > 0 ? (e - n.left) / n.width : 0, g));
|
|
4200
4211
|
}, [O, g]), A = r((e) => {
|
|
4201
4212
|
g !== 0 && (e.currentTarget.setPointerCapture?.(e.pointerId), k(e.clientX));
|
|
4202
4213
|
}, [g, k]), j = r((e) => {
|
|
@@ -4275,7 +4286,7 @@ function zr({ buckets: e = [], value: t, defaultValue: n = 1, onScrub: i, branch
|
|
|
4275
4286
|
className: "ts2-bars",
|
|
4276
4287
|
"aria-hidden": "true",
|
|
4277
4288
|
children: e.map((e, t) => {
|
|
4278
|
-
let n = Number(e.value) || 0, r = e.intensity == null ?
|
|
4289
|
+
let n = Number(e.value) || 0, r = e.intensity == null ? Rr(n, C) : Lr(e.intensity), i = C > 0 ? Math.max(n / C * 100, n > 0 ? 8 : 2) : 2;
|
|
4279
4290
|
return /* @__PURE__ */ p("span", {
|
|
4280
4291
|
className: "ts2-bar",
|
|
4281
4292
|
"data-level": r,
|
|
@@ -4322,25 +4333,25 @@ function zr({ buckets: e = [], value: t, defaultValue: n = 1, onScrub: i, branch
|
|
|
4322
4333
|
}
|
|
4323
4334
|
//#endregion
|
|
4324
4335
|
//#region src/ui/Explainer.jsx
|
|
4325
|
-
var
|
|
4326
|
-
function
|
|
4336
|
+
var Hr = "fairtrade.explainer.";
|
|
4337
|
+
function Ur(e) {
|
|
4327
4338
|
if (!(!e || typeof window > "u")) try {
|
|
4328
|
-
let t = window.localStorage.getItem(
|
|
4339
|
+
let t = window.localStorage.getItem(Hr + e);
|
|
4329
4340
|
if (t === "open") return !0;
|
|
4330
4341
|
if (t === "hidden") return !1;
|
|
4331
4342
|
} catch {}
|
|
4332
4343
|
}
|
|
4333
|
-
function
|
|
4344
|
+
function Wr({ children: e, title: t = "what am i looking at?", defaultOpen: n = !1, storageKey: i, tone: s = "card", className: c = "" }) {
|
|
4334
4345
|
let l = `xpl-${o()}`, [u, f] = d(n);
|
|
4335
4346
|
a(() => {
|
|
4336
|
-
let e =
|
|
4347
|
+
let e = Ur(i);
|
|
4337
4348
|
e !== void 0 && f(e);
|
|
4338
4349
|
}, [i]);
|
|
4339
4350
|
let h = r(() => {
|
|
4340
4351
|
f((e) => {
|
|
4341
4352
|
let t = !e;
|
|
4342
4353
|
if (i && typeof window < "u") try {
|
|
4343
|
-
window.localStorage.setItem(
|
|
4354
|
+
window.localStorage.setItem(Hr + i, t ? "open" : "hidden");
|
|
4344
4355
|
} catch {}
|
|
4345
4356
|
return t;
|
|
4346
4357
|
});
|
|
@@ -4357,7 +4368,7 @@ function Hr({ children: e, title: t = "what am i looking at?", defaultOpen: n =
|
|
|
4357
4368
|
/* @__PURE__ */ p("span", {
|
|
4358
4369
|
className: "xpl-mark",
|
|
4359
4370
|
"aria-hidden": "true",
|
|
4360
|
-
children: /* @__PURE__ */ p(
|
|
4371
|
+
children: /* @__PURE__ */ p(le, { className: "lucide" })
|
|
4361
4372
|
}),
|
|
4362
4373
|
/* @__PURE__ */ p("span", {
|
|
4363
4374
|
className: "xpl-title",
|
|
@@ -4379,7 +4390,7 @@ function Hr({ children: e, title: t = "what am i looking at?", defaultOpen: n =
|
|
|
4379
4390
|
})]
|
|
4380
4391
|
});
|
|
4381
4392
|
}
|
|
4382
|
-
function
|
|
4393
|
+
function Gr({ def: e, children: t, className: n = "" }) {
|
|
4383
4394
|
let r = `term-${o()}`, [i, a] = d(!1);
|
|
4384
4395
|
return /* @__PURE__ */ m("span", {
|
|
4385
4396
|
className: `term-anchor${i ? " is-pinned" : ""}`,
|
|
@@ -4404,28 +4415,28 @@ function Ur({ def: e, children: t, className: n = "" }) {
|
|
|
4404
4415
|
}
|
|
4405
4416
|
//#endregion
|
|
4406
4417
|
//#region src/ui/Redaction.jsx
|
|
4407
|
-
var
|
|
4418
|
+
var Kr = [
|
|
4408
4419
|
{
|
|
4409
4420
|
value: "minimal",
|
|
4410
4421
|
label: "minimal",
|
|
4411
|
-
icon:
|
|
4422
|
+
icon: De,
|
|
4412
4423
|
desc: "secrets & api keys only"
|
|
4413
4424
|
},
|
|
4414
4425
|
{
|
|
4415
4426
|
value: "standard",
|
|
4416
4427
|
label: "standard",
|
|
4417
|
-
icon:
|
|
4428
|
+
icon: Ee,
|
|
4418
4429
|
desc: "secrets + pii + internal urls"
|
|
4419
4430
|
},
|
|
4420
4431
|
{
|
|
4421
4432
|
value: "maximum",
|
|
4422
4433
|
label: "maximum",
|
|
4423
|
-
icon:
|
|
4434
|
+
icon: Te,
|
|
4424
4435
|
desc: "every detected pattern, incl. paths"
|
|
4425
4436
|
}
|
|
4426
4437
|
];
|
|
4427
|
-
function
|
|
4428
|
-
let n =
|
|
4438
|
+
function qr({ level: e, onLevel: t }) {
|
|
4439
|
+
let n = Kr.find((t) => t.value === e) ?? Kr[1];
|
|
4429
4440
|
return /* @__PURE__ */ m("div", {
|
|
4430
4441
|
className: "rdx-level",
|
|
4431
4442
|
children: [
|
|
@@ -4438,7 +4449,7 @@ function Gr({ level: e, onLevel: t }) {
|
|
|
4438
4449
|
className: "rdx-seg",
|
|
4439
4450
|
role: "group",
|
|
4440
4451
|
"aria-labelledby": "rdx-level-label",
|
|
4441
|
-
children:
|
|
4452
|
+
children: Kr.map((n) => {
|
|
4442
4453
|
let r = n.icon;
|
|
4443
4454
|
return /* @__PURE__ */ m("button", {
|
|
4444
4455
|
type: "button",
|
|
@@ -4456,7 +4467,7 @@ function Gr({ level: e, onLevel: t }) {
|
|
|
4456
4467
|
]
|
|
4457
4468
|
});
|
|
4458
4469
|
}
|
|
4459
|
-
function
|
|
4470
|
+
function Jr({ scanned: e, total: t }) {
|
|
4460
4471
|
let n = Math.max(0, t), r = Math.max(0, Math.min(e, n)), i = n === 0 ? 100 : r / n * 100;
|
|
4461
4472
|
return /* @__PURE__ */ m("div", {
|
|
4462
4473
|
className: "rdx-scan",
|
|
@@ -4487,7 +4498,7 @@ function Kr({ scanned: e, total: t }) {
|
|
|
4487
4498
|
})]
|
|
4488
4499
|
});
|
|
4489
4500
|
}
|
|
4490
|
-
function
|
|
4501
|
+
function Yr({ match: e, onToggle: t }) {
|
|
4491
4502
|
let { id: n, category: r, confidence: i, before: a, secret: o, after: s, kept: c } = e, l = t !== void 0, [u, f] = d(!!c), g = l ? !!c : u, _ = () => {
|
|
4492
4503
|
l ? t?.(n, !g) : f((e) => !e);
|
|
4493
4504
|
}, v = typeof i == "number" ? i.toFixed(2) : i, y = typeof i == "number" && i < .7;
|
|
@@ -4524,17 +4535,17 @@ function qr({ match: e, onToggle: t }) {
|
|
|
4524
4535
|
}),
|
|
4525
4536
|
g ? /* @__PURE__ */ m("span", {
|
|
4526
4537
|
className: "rdx-state rdx-state-kept",
|
|
4527
|
-
children: [/* @__PURE__ */ p(
|
|
4538
|
+
children: [/* @__PURE__ */ p(Te, { "aria-hidden": "true" }), "will be sent"]
|
|
4528
4539
|
}) : /* @__PURE__ */ m("span", {
|
|
4529
4540
|
className: "rdx-state rdx-state-safe",
|
|
4530
|
-
children: [/* @__PURE__ */ p(
|
|
4541
|
+
children: [/* @__PURE__ */ p(Ee, { "aria-hidden": "true" }), "redacted"]
|
|
4531
4542
|
}),
|
|
4532
4543
|
/* @__PURE__ */ m("button", {
|
|
4533
4544
|
type: "button",
|
|
4534
4545
|
className: "rdx-toggle",
|
|
4535
4546
|
"aria-pressed": g,
|
|
4536
4547
|
onClick: _,
|
|
4537
|
-
children: [p(g ?
|
|
4548
|
+
children: [p(g ? V : te, { "aria-hidden": "true" }), g ? "revert" : "keep"]
|
|
4538
4549
|
})
|
|
4539
4550
|
]
|
|
4540
4551
|
}), /* @__PURE__ */ m("div", {
|
|
@@ -4551,7 +4562,7 @@ function qr({ match: e, onToggle: t }) {
|
|
|
4551
4562
|
/* @__PURE__ */ p("span", {
|
|
4552
4563
|
className: "rdx-glyph",
|
|
4553
4564
|
"aria-hidden": "true",
|
|
4554
|
-
children: /* @__PURE__ */ p(
|
|
4565
|
+
children: /* @__PURE__ */ p(ge, { "aria-hidden": "true" })
|
|
4555
4566
|
}),
|
|
4556
4567
|
/* @__PURE__ */ m("span", {
|
|
4557
4568
|
className: "rdx-code",
|
|
@@ -4574,7 +4585,7 @@ function qr({ match: e, onToggle: t }) {
|
|
|
4574
4585
|
/* @__PURE__ */ p("span", {
|
|
4575
4586
|
className: "rdx-glyph",
|
|
4576
4587
|
"aria-hidden": "true",
|
|
4577
|
-
children: /* @__PURE__ */ p(
|
|
4588
|
+
children: /* @__PURE__ */ p(ye, { "aria-hidden": "true" })
|
|
4578
4589
|
}),
|
|
4579
4590
|
/* @__PURE__ */ m("span", {
|
|
4580
4591
|
className: "rdx-code",
|
|
@@ -4588,7 +4599,7 @@ function qr({ match: e, onToggle: t }) {
|
|
|
4588
4599
|
})]
|
|
4589
4600
|
});
|
|
4590
4601
|
}
|
|
4591
|
-
function
|
|
4602
|
+
function Xr({ level: e = "standard", onLevel: t, matches: n = [], onToggle: r, scanned: i, total: a = 0, failure: o, className: s = "", ...c }) {
|
|
4592
4603
|
let l = i ?? a, u = n.filter((e) => e.kept).length;
|
|
4593
4604
|
return /* @__PURE__ */ m("section", {
|
|
4594
4605
|
className: [
|
|
@@ -4601,10 +4612,10 @@ function Jr({ level: e = "standard", onLevel: t, matches: n = [], onToggle: r, s
|
|
|
4601
4612
|
children: [
|
|
4602
4613
|
/* @__PURE__ */ m("div", {
|
|
4603
4614
|
className: "rdx-bar",
|
|
4604
|
-
children: [/* @__PURE__ */ p(
|
|
4615
|
+
children: [/* @__PURE__ */ p(qr, {
|
|
4605
4616
|
level: e,
|
|
4606
4617
|
onLevel: t
|
|
4607
|
-
}), /* @__PURE__ */ p(
|
|
4618
|
+
}), /* @__PURE__ */ p(Jr, {
|
|
4608
4619
|
scanned: l,
|
|
4609
4620
|
total: a
|
|
4610
4621
|
})]
|
|
@@ -4617,7 +4628,7 @@ function Jr({ level: e = "standard", onLevel: t, matches: n = [], onToggle: r, s
|
|
|
4617
4628
|
"aria-hidden": "true"
|
|
4618
4629
|
}), /* @__PURE__ */ p("p", {
|
|
4619
4630
|
className: "rdx-banner-text",
|
|
4620
|
-
children: typeof o == "string" ? o : "some files could not be fully scanned
|
|
4631
|
+
children: typeof o == "string" ? o : "some files could not be fully scanned. don’t treat an empty result as “all clear”."
|
|
4621
4632
|
})]
|
|
4622
4633
|
}),
|
|
4623
4634
|
/* @__PURE__ */ m("div", {
|
|
@@ -4632,7 +4643,7 @@ function Jr({ level: e = "standard", onLevel: t, matches: n = [], onToggle: r, s
|
|
|
4632
4643
|
}), u > 0 ? /* @__PURE__ */ m("span", {
|
|
4633
4644
|
className: "rdx-summary-kept",
|
|
4634
4645
|
children: [
|
|
4635
|
-
/* @__PURE__ */ p(
|
|
4646
|
+
/* @__PURE__ */ p(Te, { "aria-hidden": "true" }),
|
|
4636
4647
|
/* @__PURE__ */ p("span", {
|
|
4637
4648
|
className: "tnum",
|
|
4638
4649
|
children: u
|
|
@@ -4641,15 +4652,15 @@ function Jr({ level: e = "standard", onLevel: t, matches: n = [], onToggle: r, s
|
|
|
4641
4652
|
]
|
|
4642
4653
|
}) : /* @__PURE__ */ m("span", {
|
|
4643
4654
|
className: "rdx-summary-safe",
|
|
4644
|
-
children: [/* @__PURE__ */ p(
|
|
4655
|
+
children: [/* @__PURE__ */ p(Ee, { "aria-hidden": "true" }), "all redacted"]
|
|
4645
4656
|
})]
|
|
4646
4657
|
}),
|
|
4647
4658
|
n.length === 0 ? /* @__PURE__ */ p("p", {
|
|
4648
4659
|
className: "rdx-empty",
|
|
4649
|
-
children: "no sensitive content detected
|
|
4660
|
+
children: "no sensitive content detected. safe to share as-is."
|
|
4650
4661
|
}) : /* @__PURE__ */ p("ul", {
|
|
4651
4662
|
className: "rdx-list",
|
|
4652
|
-
children: n.map((e, t) => /* @__PURE__ */ p(
|
|
4663
|
+
children: n.map((e, t) => /* @__PURE__ */ p(Yr, {
|
|
4653
4664
|
match: e,
|
|
4654
4665
|
onToggle: r
|
|
4655
4666
|
}, e.id ?? t))
|
|
@@ -4657,7 +4668,7 @@ function Jr({ level: e = "standard", onLevel: t, matches: n = [], onToggle: r, s
|
|
|
4657
4668
|
]
|
|
4658
4669
|
});
|
|
4659
4670
|
}
|
|
4660
|
-
function
|
|
4671
|
+
function Zr({ icon: e, tone: t, children: n }) {
|
|
4661
4672
|
return /* @__PURE__ */ m("li", {
|
|
4662
4673
|
className: `rdx-trow rdx-trow-${t}`,
|
|
4663
4674
|
children: [/* @__PURE__ */ p(e, {
|
|
@@ -4669,7 +4680,7 @@ function Yr({ icon: e, tone: t, children: n }) {
|
|
|
4669
4680
|
})]
|
|
4670
4681
|
});
|
|
4671
4682
|
}
|
|
4672
|
-
function
|
|
4683
|
+
function Qr({ destination: e, sent: t = [], private: n = [], className: r = "", ...i }) {
|
|
4673
4684
|
return /* @__PURE__ */ m("section", {
|
|
4674
4685
|
className: [
|
|
4675
4686
|
"rdx",
|
|
@@ -4681,7 +4692,7 @@ function Xr({ destination: e, sent: t = [], private: n = [], className: r = "",
|
|
|
4681
4692
|
children: [
|
|
4682
4693
|
/* @__PURE__ */ m("header", {
|
|
4683
4694
|
className: "rdx-where-head",
|
|
4684
|
-
children: [/* @__PURE__ */ p(
|
|
4695
|
+
children: [/* @__PURE__ */ p(Ce, {
|
|
4685
4696
|
className: "rdx-where-head-icon",
|
|
4686
4697
|
"aria-hidden": "true"
|
|
4687
4698
|
}), /* @__PURE__ */ p("h2", {
|
|
@@ -4691,7 +4702,7 @@ function Xr({ destination: e, sent: t = [], private: n = [], className: r = "",
|
|
|
4691
4702
|
}),
|
|
4692
4703
|
/* @__PURE__ */ p("p", {
|
|
4693
4704
|
className: "rdx-where-note",
|
|
4694
|
-
children: "nothing leaves your machine until you choose to send it
|
|
4705
|
+
children: "nothing leaves your machine until you choose to send it. redacted by default."
|
|
4695
4706
|
}),
|
|
4696
4707
|
/* @__PURE__ */ m("div", {
|
|
4697
4708
|
className: "rdx-where-dest",
|
|
@@ -4712,7 +4723,7 @@ function Xr({ destination: e, sent: t = [], private: n = [], className: r = "",
|
|
|
4712
4723
|
className: "rdx-where-col",
|
|
4713
4724
|
children: [/* @__PURE__ */ m("div", {
|
|
4714
4725
|
className: "rdx-where-col-head",
|
|
4715
|
-
children: [/* @__PURE__ */ p(
|
|
4726
|
+
children: [/* @__PURE__ */ p(Ce, {
|
|
4716
4727
|
className: "rdx-where-col-icon rdx-where-col-icon-sent",
|
|
4717
4728
|
"aria-hidden": "true"
|
|
4718
4729
|
}), /* @__PURE__ */ p("span", {
|
|
@@ -4721,8 +4732,8 @@ function Xr({ destination: e, sent: t = [], private: n = [], className: r = "",
|
|
|
4721
4732
|
})]
|
|
4722
4733
|
}), /* @__PURE__ */ p("ul", {
|
|
4723
4734
|
className: "rdx-trows",
|
|
4724
|
-
children: t.map((e, t) => /* @__PURE__ */ p(
|
|
4725
|
-
icon:
|
|
4735
|
+
children: t.map((e, t) => /* @__PURE__ */ p(Zr, {
|
|
4736
|
+
icon: Ce,
|
|
4726
4737
|
tone: "sent",
|
|
4727
4738
|
children: e
|
|
4728
4739
|
}, t))
|
|
@@ -4731,7 +4742,7 @@ function Xr({ destination: e, sent: t = [], private: n = [], className: r = "",
|
|
|
4731
4742
|
className: "rdx-where-col",
|
|
4732
4743
|
children: [/* @__PURE__ */ m("div", {
|
|
4733
4744
|
className: "rdx-where-col-head",
|
|
4734
|
-
children: [/* @__PURE__ */ p(
|
|
4745
|
+
children: [/* @__PURE__ */ p(q, {
|
|
4735
4746
|
className: "rdx-where-col-icon rdx-where-col-icon-private",
|
|
4736
4747
|
"aria-hidden": "true"
|
|
4737
4748
|
}), /* @__PURE__ */ p("span", {
|
|
@@ -4740,8 +4751,8 @@ function Xr({ destination: e, sent: t = [], private: n = [], className: r = "",
|
|
|
4740
4751
|
})]
|
|
4741
4752
|
}), /* @__PURE__ */ p("ul", {
|
|
4742
4753
|
className: "rdx-trows",
|
|
4743
|
-
children: n.map((e, t) => /* @__PURE__ */ p(
|
|
4744
|
-
icon:
|
|
4754
|
+
children: n.map((e, t) => /* @__PURE__ */ p(Zr, {
|
|
4755
|
+
icon: q,
|
|
4745
4756
|
tone: "private",
|
|
4746
4757
|
children: e
|
|
4747
4758
|
}, t))
|
|
@@ -4753,7 +4764,7 @@ function Xr({ destination: e, sent: t = [], private: n = [], className: r = "",
|
|
|
4753
4764
|
}
|
|
4754
4765
|
//#endregion
|
|
4755
4766
|
//#region src/ui/ConsentDialog.jsx
|
|
4756
|
-
function
|
|
4767
|
+
function $r({ axes: e = [], caption: t, className: n, ...r }) {
|
|
4757
4768
|
return /* @__PURE__ */ m("div", {
|
|
4758
4769
|
className: ["cns-summary", n].filter(Boolean).join(" "),
|
|
4759
4770
|
...r,
|
|
@@ -4795,7 +4806,7 @@ function Zr({ axes: e = [], caption: t, className: n, ...r }) {
|
|
|
4795
4806
|
})]
|
|
4796
4807
|
});
|
|
4797
4808
|
}
|
|
4798
|
-
function
|
|
4809
|
+
function ei({ open: e, title: t, intro: n, axes: r, summaryCaption: i, children: o, confirmLabel: s = "confirm", confirmIcon: c = Ee, cancelLabel: l = "cancel", onCancel: f, onConfirm: h, requireConsent: g = !0, consentLabel: _ = "i understand and consent", tone: v = "primary", busy: y = !1, labelId: b = "cns-title", returnFocusRef: x }) {
|
|
4799
4810
|
let S = u(null), [C, w] = d(!1), T = u(f);
|
|
4800
4811
|
T.current = f;
|
|
4801
4812
|
let E = u(x);
|
|
@@ -4868,7 +4879,7 @@ function Qr({ open: e, title: t, intro: n, axes: r, summaryCaption: i, children:
|
|
|
4868
4879
|
className: "cns-intro",
|
|
4869
4880
|
children: n
|
|
4870
4881
|
}),
|
|
4871
|
-
r && r.length > 0 && /* @__PURE__ */ p(
|
|
4882
|
+
r && r.length > 0 && /* @__PURE__ */ p($r, {
|
|
4872
4883
|
axes: r,
|
|
4873
4884
|
caption: i
|
|
4874
4885
|
}),
|
|
@@ -4921,7 +4932,7 @@ function Qr({ open: e, title: t, intro: n, axes: r, summaryCaption: i, children:
|
|
|
4921
4932
|
}
|
|
4922
4933
|
//#endregion
|
|
4923
4934
|
//#region src/ui/PolicySelect.jsx
|
|
4924
|
-
function
|
|
4935
|
+
function ti({ label: e, name: t, value: n, defaultValue: r, onChange: i, options: a = [], variant: s = "radio", hint: c, id: l }) {
|
|
4925
4936
|
let u = n !== void 0, [f, h] = d(r), g = u ? n : f, _ = o(), v = l ?? _, y = `${v}-label`, b = c == null ? void 0 : `${v}-hint`, x = (e) => {
|
|
4926
4937
|
u || h(e), i?.(e);
|
|
4927
4938
|
};
|
|
@@ -4938,7 +4949,7 @@ function $r({ label: e, name: t, value: n, defaultValue: r, onChange: i, options
|
|
|
4938
4949
|
id: b,
|
|
4939
4950
|
children: c
|
|
4940
4951
|
}),
|
|
4941
|
-
s === "select" ? /* @__PURE__ */ p(
|
|
4952
|
+
s === "select" ? /* @__PURE__ */ p(ri, {
|
|
4942
4953
|
name: t,
|
|
4943
4954
|
fieldId: v,
|
|
4944
4955
|
labelId: y,
|
|
@@ -4946,7 +4957,7 @@ function $r({ label: e, name: t, value: n, defaultValue: r, onChange: i, options
|
|
|
4946
4957
|
options: a,
|
|
4947
4958
|
selected: g,
|
|
4948
4959
|
onSelect: x
|
|
4949
|
-
}) : /* @__PURE__ */ p(
|
|
4960
|
+
}) : /* @__PURE__ */ p(ni, {
|
|
4950
4961
|
name: t,
|
|
4951
4962
|
labelId: y,
|
|
4952
4963
|
hintId: b,
|
|
@@ -4957,7 +4968,7 @@ function $r({ label: e, name: t, value: n, defaultValue: r, onChange: i, options
|
|
|
4957
4968
|
]
|
|
4958
4969
|
});
|
|
4959
4970
|
}
|
|
4960
|
-
function
|
|
4971
|
+
function ni({ name: e, labelId: t, hintId: n, options: r, selected: i, onSelect: a }) {
|
|
4961
4972
|
let o = u([]), s = r.map((e, t) => e.disabled ? -1 : t).filter((e) => e !== -1), c = r.findIndex((e) => e.value === i && !e.disabled), l = c === -1 ? s[0] ?? -1 : c, d = (e) => {
|
|
4962
4973
|
let t = r[e];
|
|
4963
4974
|
!t || t.disabled || (a(t.value), o.current[e]?.focus());
|
|
@@ -5022,7 +5033,7 @@ function ei({ name: e, labelId: t, hintId: n, options: r, selected: i, onSelect:
|
|
|
5022
5033
|
})
|
|
5023
5034
|
});
|
|
5024
5035
|
}
|
|
5025
|
-
function
|
|
5036
|
+
function ri({ name: e, fieldId: t, labelId: n, hintId: r, options: i, selected: a, onSelect: o }) {
|
|
5026
5037
|
let s = i.find((e) => e.value === a), c = s?.rationale == null ? void 0 : `${t}-why`, l = [r, c].filter(Boolean).join(" ") || void 0;
|
|
5027
5038
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
|
|
5028
5039
|
className: "pol-select-wrap",
|
|
@@ -5051,11 +5062,11 @@ function ti({ name: e, fieldId: t, labelId: n, hintId: r, options: i, selected:
|
|
|
5051
5062
|
}
|
|
5052
5063
|
//#endregion
|
|
5053
5064
|
//#region src/ui/ModerationQueue.jsx
|
|
5054
|
-
var
|
|
5065
|
+
var ii = {
|
|
5055
5066
|
approved: "approved",
|
|
5056
5067
|
rejected: "rejected"
|
|
5057
5068
|
};
|
|
5058
|
-
function
|
|
5069
|
+
function ai({ subject: e, onApprove: t, onReject: n, approveLabel: r = "approve", rejectLabel: i = "reject", className: a }) {
|
|
5059
5070
|
let [o, s] = d(null);
|
|
5060
5071
|
function c(e, t) {
|
|
5061
5072
|
s(e), t?.();
|
|
@@ -5083,25 +5094,25 @@ function ri({ subject: e, onApprove: t, onReject: n, approveLabel: r = "approve"
|
|
|
5083
5094
|
className: `mod-resolved mod-resolved-${o}`,
|
|
5084
5095
|
role: "status",
|
|
5085
5096
|
"aria-live": "polite",
|
|
5086
|
-
children: [o ===
|
|
5097
|
+
children: [o === ii.approved ? /* @__PURE__ */ p(w, { "aria-hidden": "true" }) : /* @__PURE__ */ p(J, { "aria-hidden": "true" }), o]
|
|
5087
5098
|
}) : /* @__PURE__ */ m("span", {
|
|
5088
5099
|
className: "mod-bar-actions",
|
|
5089
5100
|
children: [/* @__PURE__ */ m("button", {
|
|
5090
5101
|
type: "button",
|
|
5091
5102
|
className: "mod-act mod-act-approve",
|
|
5092
|
-
onClick: () => c(
|
|
5103
|
+
onClick: () => c(ii.approved, t),
|
|
5093
5104
|
children: [/* @__PURE__ */ p(w, { "aria-hidden": "true" }), r]
|
|
5094
5105
|
}), /* @__PURE__ */ m("button", {
|
|
5095
5106
|
type: "button",
|
|
5096
5107
|
className: "mod-act mod-act-reject",
|
|
5097
|
-
onClick: () => c(
|
|
5108
|
+
onClick: () => c(ii.rejected, n),
|
|
5098
5109
|
children: [/* @__PURE__ */ p(J, { "aria-hidden": "true" }), i]
|
|
5099
5110
|
})]
|
|
5100
5111
|
})]
|
|
5101
5112
|
})
|
|
5102
5113
|
});
|
|
5103
5114
|
}
|
|
5104
|
-
function
|
|
5115
|
+
function oi({ title: e = "pending review", items: t = [], onApprove: n, onReject: r, emptyLabel: i = "nothing pending", className: a }) {
|
|
5105
5116
|
let [o, s] = d({});
|
|
5106
5117
|
function c(e, t, n) {
|
|
5107
5118
|
s((n) => ({
|
|
@@ -5116,7 +5127,7 @@ function ii({ title: e = "pending review", items: t = [], onApprove: n, onReject
|
|
|
5116
5127
|
children: [/* @__PURE__ */ m("header", {
|
|
5117
5128
|
className: "mod-queue-head",
|
|
5118
5129
|
children: [
|
|
5119
|
-
/* @__PURE__ */ p(
|
|
5130
|
+
/* @__PURE__ */ p(fe, {
|
|
5120
5131
|
className: "mod-queue-ico",
|
|
5121
5132
|
"aria-hidden": "true"
|
|
5122
5133
|
}),
|
|
@@ -5135,7 +5146,7 @@ function ii({ title: e = "pending review", items: t = [], onApprove: n, onReject
|
|
|
5135
5146
|
children: [/* @__PURE__ */ p("span", {
|
|
5136
5147
|
className: "mod-empty-ico",
|
|
5137
5148
|
"aria-hidden": "true",
|
|
5138
|
-
children: /* @__PURE__ */ p(
|
|
5149
|
+
children: /* @__PURE__ */ p(ue, {})
|
|
5139
5150
|
}), /* @__PURE__ */ p("p", {
|
|
5140
5151
|
className: "mod-empty-msg",
|
|
5141
5152
|
children: i
|
|
@@ -5143,7 +5154,7 @@ function ii({ title: e = "pending review", items: t = [], onApprove: n, onReject
|
|
|
5143
5154
|
}) : /* @__PURE__ */ p("ul", {
|
|
5144
5155
|
className: "mod-list",
|
|
5145
5156
|
children: t.map((e) => {
|
|
5146
|
-
let t = o[e.id], i = e.kind === "member" ?
|
|
5157
|
+
let t = o[e.id], i = e.kind === "member" ? Pe : ue;
|
|
5147
5158
|
return /* @__PURE__ */ m("li", {
|
|
5148
5159
|
className: [
|
|
5149
5160
|
"mod-row",
|
|
@@ -5174,18 +5185,18 @@ function ii({ title: e = "pending review", items: t = [], onApprove: n, onReject
|
|
|
5174
5185
|
className: `mod-resolved mod-resolved-${t}`,
|
|
5175
5186
|
role: "status",
|
|
5176
5187
|
"aria-live": "polite",
|
|
5177
|
-
children: [t ===
|
|
5188
|
+
children: [t === ii.approved ? /* @__PURE__ */ p(w, { "aria-hidden": "true" }) : /* @__PURE__ */ p(J, { "aria-hidden": "true" }), t]
|
|
5178
5189
|
}) : /* @__PURE__ */ m("span", {
|
|
5179
5190
|
className: "mod-row-actions",
|
|
5180
5191
|
children: [/* @__PURE__ */ m("button", {
|
|
5181
5192
|
type: "button",
|
|
5182
5193
|
className: "mod-act mod-act-approve",
|
|
5183
|
-
onClick: () => c(e,
|
|
5194
|
+
onClick: () => c(e, ii.approved, n),
|
|
5184
5195
|
children: [/* @__PURE__ */ p(w, { "aria-hidden": "true" }), "approve"]
|
|
5185
5196
|
}), /* @__PURE__ */ m("button", {
|
|
5186
5197
|
type: "button",
|
|
5187
5198
|
className: "mod-act mod-act-reject",
|
|
5188
|
-
onClick: () => c(e,
|
|
5199
|
+
onClick: () => c(e, ii.rejected, r),
|
|
5189
5200
|
children: [/* @__PURE__ */ p(J, { "aria-hidden": "true" }), "reject"]
|
|
5190
5201
|
})]
|
|
5191
5202
|
})
|
|
@@ -5197,7 +5208,7 @@ function ii({ title: e = "pending review", items: t = [], onApprove: n, onReject
|
|
|
5197
5208
|
}
|
|
5198
5209
|
//#endregion
|
|
5199
5210
|
//#region src/ui/RoleRoster.jsx
|
|
5200
|
-
function
|
|
5211
|
+
function si({ label: e = "remove", confirmLabel: t, icon: n, onConfirm: r, busy: i = !1, disabled: a = !1, "aria-label": o, className: s }) {
|
|
5201
5212
|
let [c, l] = d(!1), u = (t ?? (typeof e == "string" ? e : "remove")).toLowerCase(), f = `rr-confirm${s ? ` ${s}` : ""}`;
|
|
5202
5213
|
return c ? /* @__PURE__ */ m("span", {
|
|
5203
5214
|
className: `${f} rr-confirm--open`,
|
|
@@ -5241,7 +5252,7 @@ function ai({ label: e = "remove", confirmLabel: t, icon: n, onConfirm: r, busy:
|
|
|
5241
5252
|
})
|
|
5242
5253
|
});
|
|
5243
5254
|
}
|
|
5244
|
-
function
|
|
5255
|
+
function ci({ members: e = [], onRole: t, onRemove: n, title: r = "members", roles: i = [
|
|
5245
5256
|
"member",
|
|
5246
5257
|
"contributor",
|
|
5247
5258
|
"guest"
|
|
@@ -5304,7 +5315,7 @@ function oi({ members: e = [], onRole: t, onRemove: n, title: r = "members", rol
|
|
|
5304
5315
|
children: ["role for ", e.handle]
|
|
5305
5316
|
}), s ? /* @__PURE__ */ m("span", {
|
|
5306
5317
|
className: "rr-role-locked",
|
|
5307
|
-
children: [/* @__PURE__ */ p(
|
|
5318
|
+
children: [/* @__PURE__ */ p(q, {
|
|
5308
5319
|
className: "rr-lock",
|
|
5309
5320
|
"aria-hidden": "true"
|
|
5310
5321
|
}), "owner"]
|
|
@@ -5325,7 +5336,7 @@ function oi({ members: e = [], onRole: t, onRemove: n, title: r = "members", rol
|
|
|
5325
5336
|
children: s ? /* @__PURE__ */ p("span", {
|
|
5326
5337
|
className: "rr-act-locked",
|
|
5327
5338
|
"aria-hidden": "true"
|
|
5328
|
-
}) : /* @__PURE__ */ p(
|
|
5339
|
+
}) : /* @__PURE__ */ p(si, {
|
|
5329
5340
|
label: "remove",
|
|
5330
5341
|
confirmLabel: "remove",
|
|
5331
5342
|
"aria-label": `remove ${e.handle}`,
|
|
@@ -5338,7 +5349,7 @@ function oi({ members: e = [], onRole: t, onRemove: n, title: r = "members", rol
|
|
|
5338
5349
|
})]
|
|
5339
5350
|
});
|
|
5340
5351
|
}
|
|
5341
|
-
function
|
|
5352
|
+
function li({ title: e = "danger zone", children: t }) {
|
|
5342
5353
|
return /* @__PURE__ */ m("section", {
|
|
5343
5354
|
className: "rr-danger",
|
|
5344
5355
|
"aria-label": typeof e == "string" ? e : "danger zone",
|
|
@@ -5366,7 +5377,7 @@ function si({ title: e = "danger zone", children: t }) {
|
|
|
5366
5377
|
}
|
|
5367
5378
|
//#endregion
|
|
5368
5379
|
//#region src/ui/MapCanvas.jsx
|
|
5369
|
-
var
|
|
5380
|
+
var ui = 56, di = 104, fi = 248, pi = 132, mi = 28, hi = 48, gi = .35, _i = 2.4, vi = 1.25, yi = [
|
|
5370
5381
|
{
|
|
5371
5382
|
id: "overview",
|
|
5372
5383
|
label: "overview",
|
|
@@ -5382,23 +5393,23 @@ var ci = 56, li = 104, ui = 248, di = 132, fi = 28, pi = 48, mi = .35, hi = 2.4,
|
|
|
5382
5393
|
label: "files",
|
|
5383
5394
|
depth: Infinity
|
|
5384
5395
|
}
|
|
5385
|
-
],
|
|
5396
|
+
], bi = {
|
|
5386
5397
|
overview: 0,
|
|
5387
5398
|
folders: 1,
|
|
5388
5399
|
files: Infinity
|
|
5389
|
-
},
|
|
5390
|
-
function
|
|
5400
|
+
}, xi = 3;
|
|
5401
|
+
function Si(e) {
|
|
5391
5402
|
let t = Math.round(Number(e) || 0);
|
|
5392
5403
|
return t < 0 ? 0 : t > 4 ? 4 : t;
|
|
5393
5404
|
}
|
|
5394
|
-
function
|
|
5405
|
+
function Ci(e) {
|
|
5395
5406
|
let t = String(e ?? ""), n = t.lastIndexOf("/");
|
|
5396
5407
|
return n >= 0 ? t.slice(n + 1) : t;
|
|
5397
5408
|
}
|
|
5398
|
-
function
|
|
5409
|
+
function wi(e, t) {
|
|
5399
5410
|
return e._order === t._order ? e.id < t.id ? -1 : +(e.id > t.id) : e._order - t._order;
|
|
5400
5411
|
}
|
|
5401
|
-
function
|
|
5412
|
+
function Ti(e) {
|
|
5402
5413
|
let t = /* @__PURE__ */ new Map();
|
|
5403
5414
|
e.forEach((e, n) => t.set(e.id, {
|
|
5404
5415
|
...e,
|
|
@@ -5412,19 +5423,19 @@ function Ci(e) {
|
|
|
5412
5423
|
t ? t.push(e) : n.set(i, [e]);
|
|
5413
5424
|
} else r.push(e);
|
|
5414
5425
|
}
|
|
5415
|
-
for (let e of n.values()) e.sort(
|
|
5416
|
-
return r.sort(
|
|
5426
|
+
for (let e of n.values()) e.sort(wi);
|
|
5427
|
+
return r.sort(wi), {
|
|
5417
5428
|
byId: t,
|
|
5418
5429
|
children: n,
|
|
5419
5430
|
roots: r
|
|
5420
5431
|
};
|
|
5421
5432
|
}
|
|
5422
|
-
function
|
|
5433
|
+
function Ei(e, t) {
|
|
5423
5434
|
let n = 0, r = e;
|
|
5424
5435
|
for (; r && r.parent && t.has(r.parent);) r = t.get(r.parent), n += 1;
|
|
5425
5436
|
return n;
|
|
5426
5437
|
}
|
|
5427
|
-
function
|
|
5438
|
+
function Di(e, t, n) {
|
|
5428
5439
|
let { children: r, roots: i } = e, a = [], o = (e, i) => {
|
|
5429
5440
|
let s = r.get(e.id);
|
|
5430
5441
|
if (s && s.length > 0 && (i < t || n.has(e.id))) for (let e of s) o(e, i + 1);
|
|
@@ -5433,7 +5444,7 @@ function Ti(e, t, n) {
|
|
|
5433
5444
|
for (let e of i) o(e, 0);
|
|
5434
5445
|
return a;
|
|
5435
5446
|
}
|
|
5436
|
-
function
|
|
5447
|
+
function Oi(e, t) {
|
|
5437
5448
|
if (e.length === 0) return {
|
|
5438
5449
|
positioned: [],
|
|
5439
5450
|
width: 0,
|
|
@@ -5442,21 +5453,21 @@ function Ei(e, t) {
|
|
|
5442
5453
|
let n = 0;
|
|
5443
5454
|
for (let t of e) n = Math.max(n, Math.max(0, Number(t.loc) || 0));
|
|
5444
5455
|
let r = (e) => {
|
|
5445
|
-
if (n <= 0) return
|
|
5456
|
+
if (n <= 0) return di;
|
|
5446
5457
|
let t = Math.max(0, Number(e.loc) || 0) / n;
|
|
5447
|
-
return Math.round(
|
|
5458
|
+
return Math.round(di + t * (fi - di));
|
|
5448
5459
|
}, i = /* @__PURE__ */ new Map();
|
|
5449
5460
|
for (let n of e) {
|
|
5450
|
-
let e =
|
|
5461
|
+
let e = Ei(n, t), r = i.get(e);
|
|
5451
5462
|
r ? r.push(n) : i.set(e, [n]);
|
|
5452
5463
|
}
|
|
5453
5464
|
let a = Array.from(i.keys()).sort((e, t) => e - t);
|
|
5454
|
-
for (let e of a) i.get(e).sort(
|
|
5455
|
-
let o = (e) => e.reduce((e, t) => e + r(t), 0) +
|
|
5465
|
+
for (let e of a) i.get(e).sort(wi);
|
|
5466
|
+
let o = (e) => e.reduce((e, t) => e + r(t), 0) + mi * (e.length - 1), s = 0;
|
|
5456
5467
|
for (let e of a) s = Math.max(s, o(i.get(e)));
|
|
5457
5468
|
let c = [];
|
|
5458
5469
|
return a.forEach((e, t) => {
|
|
5459
|
-
let n = i.get(e), a =
|
|
5470
|
+
let n = i.get(e), a = hi + (s - o(n)) / 2, l = hi + t * pi;
|
|
5460
5471
|
for (let e of n) {
|
|
5461
5472
|
let t = r(e);
|
|
5462
5473
|
c.push({
|
|
@@ -5464,16 +5475,16 @@ function Ei(e, t) {
|
|
|
5464
5475
|
x: a,
|
|
5465
5476
|
y: l,
|
|
5466
5477
|
w: t,
|
|
5467
|
-
h:
|
|
5468
|
-
}), a += t +
|
|
5478
|
+
h: ui
|
|
5479
|
+
}), a += t + mi;
|
|
5469
5480
|
}
|
|
5470
5481
|
}), {
|
|
5471
5482
|
positioned: c,
|
|
5472
|
-
width: s +
|
|
5473
|
-
height: (a.length - 1) *
|
|
5483
|
+
width: s + hi * 2,
|
|
5484
|
+
height: (a.length - 1) * pi + ui + hi * 2
|
|
5474
5485
|
};
|
|
5475
5486
|
}
|
|
5476
|
-
function
|
|
5487
|
+
function ki(e, t) {
|
|
5477
5488
|
let n = /* @__PURE__ */ new Map();
|
|
5478
5489
|
return (r) => {
|
|
5479
5490
|
if (n.has(r)) return n.get(r);
|
|
@@ -5485,8 +5496,8 @@ function Di(e, t) {
|
|
|
5485
5496
|
return n.set(r, i ?? null), i ?? null;
|
|
5486
5497
|
};
|
|
5487
5498
|
}
|
|
5488
|
-
function
|
|
5489
|
-
let r =
|
|
5499
|
+
function Ai(e, t, n) {
|
|
5500
|
+
let r = ki(t, n), i = /* @__PURE__ */ new Map();
|
|
5490
5501
|
for (let t of e) {
|
|
5491
5502
|
let e = r(t.from), n = r(t.to);
|
|
5492
5503
|
if (!e || !n || e === n) continue;
|
|
@@ -5500,8 +5511,8 @@ function Oi(e, t, n) {
|
|
|
5500
5511
|
}
|
|
5501
5512
|
return Array.from(i.values()).sort((e, t) => e.from === t.from ? e.to < t.to ? -1 : +(e.to > t.to) : e.from < t.from ? -1 : 1);
|
|
5502
5513
|
}
|
|
5503
|
-
function
|
|
5504
|
-
let r =
|
|
5514
|
+
function ji(e, t, n) {
|
|
5515
|
+
let r = ki(t, n), i = /* @__PURE__ */ new Map();
|
|
5505
5516
|
for (let t of e) {
|
|
5506
5517
|
let e = Math.max(0, Number(t.violations) || 0);
|
|
5507
5518
|
if (e <= 0) continue;
|
|
@@ -5510,16 +5521,16 @@ function ki(e, t, n) {
|
|
|
5510
5521
|
}
|
|
5511
5522
|
return i;
|
|
5512
5523
|
}
|
|
5513
|
-
function
|
|
5524
|
+
function Mi(e) {
|
|
5514
5525
|
let t;
|
|
5515
5526
|
for (let n of e) (!t || n.y < t.y || n.y === t.y && n.x < t.x) && (t = n);
|
|
5516
5527
|
return t;
|
|
5517
5528
|
}
|
|
5518
|
-
function
|
|
5529
|
+
function Ni(e, t, n) {
|
|
5519
5530
|
let r = e.filter((e) => e.y === t.y).sort((e, t) => e.x - t.x), i = r.findIndex((e) => e.node.id === t.node.id);
|
|
5520
5531
|
if (i !== -1) return r[i + n];
|
|
5521
5532
|
}
|
|
5522
|
-
function
|
|
5533
|
+
function Pi(e, t, n) {
|
|
5523
5534
|
let r;
|
|
5524
5535
|
for (let i of e) (i.y - t.y) * n <= 0 || (r === void 0 || (i.y - r) * n < 0) && (r = i.y);
|
|
5525
5536
|
if (r === void 0) return;
|
|
@@ -5533,44 +5544,44 @@ function Mi(e, t, n) {
|
|
|
5533
5544
|
}
|
|
5534
5545
|
return a;
|
|
5535
5546
|
}
|
|
5536
|
-
function
|
|
5547
|
+
function Fi({ data: e = {
|
|
5537
5548
|
nodes: [],
|
|
5538
5549
|
edges: []
|
|
5539
5550
|
}, grain: t = "folders", selectedId: n = null, onSelect: i, height: s = 520, ariaLabel: l = "code map", className: h = "" }) {
|
|
5540
|
-
let g = e?.nodes ?? [], _ = e?.edges ?? [], v = o().replace(/[:]/g, ""), y = `${v}-live`, b = `${v}-list`, [x, S] = d(
|
|
5551
|
+
let g = e?.nodes ?? [], _ = e?.edges ?? [], v = o().replace(/[:]/g, ""), y = `${v}-live`, b = `${v}-list`, [x, S] = d(bi[t] === void 0 ? "folders" : t), [C, T] = d(() => /* @__PURE__ */ new Set()), [E, D] = d(n), [O, k] = d(null), [A, j] = d(1), [M, N] = d({
|
|
5541
5552
|
x: 0,
|
|
5542
5553
|
y: 0
|
|
5543
5554
|
}), [P, F] = d(""), [I, L] = d(!1), R = u(null), z = u(null), B = u(!1), ee = u(A), te = u(M);
|
|
5544
5555
|
ee.current = A, te.current = M;
|
|
5545
|
-
let V = c(() =>
|
|
5556
|
+
let V = c(() => Ti(g), [g]), re = c(() => Di(V, bi[x], C), [
|
|
5546
5557
|
V,
|
|
5547
5558
|
x,
|
|
5548
5559
|
C
|
|
5549
|
-
]), H = c(() => new Set(re.map((e) => e.id)), [re]), { positioned: U, width: W, height: G } = c(() =>
|
|
5560
|
+
]), H = c(() => new Set(re.map((e) => e.id)), [re]), { positioned: U, width: W, height: G } = c(() => Oi(re, V.byId), [re, V.byId]), ae = c(() => {
|
|
5550
5561
|
let e = /* @__PURE__ */ new Map();
|
|
5551
5562
|
for (let t of U) e.set(t.node.id, t);
|
|
5552
5563
|
return e;
|
|
5553
|
-
}, [U]),
|
|
5564
|
+
}, [U]), oe = c(() => {
|
|
5554
5565
|
let e = /* @__PURE__ */ new Map();
|
|
5555
5566
|
for (let [t, n] of V.children) e.set(t, n.length);
|
|
5556
5567
|
return e;
|
|
5557
|
-
}, [V]),
|
|
5568
|
+
}, [V]), se = c(() => Ai(_, V.byId, H), [
|
|
5558
5569
|
_,
|
|
5559
5570
|
V.byId,
|
|
5560
5571
|
H
|
|
5561
|
-
]),
|
|
5572
|
+
]), ce = c(() => se.reduce((e, t) => Math.max(e, t.weight), 1), [se]), le = c(() => ji(g, V.byId, H), [
|
|
5562
5573
|
g,
|
|
5563
5574
|
V.byId,
|
|
5564
5575
|
H
|
|
5565
|
-
]),
|
|
5576
|
+
]), ue = c(() => {
|
|
5566
5577
|
let e = P.trim().toLowerCase();
|
|
5567
5578
|
return e ? g.filter((t) => t.id.toLowerCase().includes(e) || (t.label || "").toLowerCase().includes(e)).slice(0, 8) : [];
|
|
5568
|
-
}, [g, P]),
|
|
5579
|
+
}, [g, P]), de = r(() => {
|
|
5569
5580
|
let e = R.current;
|
|
5570
5581
|
if (!e || W <= 0 || G <= 0) return;
|
|
5571
5582
|
let t = e.clientWidth, n = e.clientHeight;
|
|
5572
5583
|
if (t <= 0 || n <= 0) return;
|
|
5573
|
-
let r = Math.min(t / W, n / G), i = Math.max(
|
|
5584
|
+
let r = Math.min(t / W, n / G), i = Math.max(gi, Math.min(_i, r));
|
|
5574
5585
|
j(i), N({
|
|
5575
5586
|
x: (t - W * i) / 2,
|
|
5576
5587
|
y: (n - G * i) / 2
|
|
@@ -5578,87 +5589,87 @@ function Ni({ data: e = {
|
|
|
5578
5589
|
}, [W, G]);
|
|
5579
5590
|
a(() => {
|
|
5580
5591
|
if (!B.current) {
|
|
5581
|
-
B.current = !0,
|
|
5592
|
+
B.current = !0, de();
|
|
5582
5593
|
return;
|
|
5583
5594
|
}
|
|
5584
|
-
|
|
5595
|
+
de();
|
|
5585
5596
|
}, [c(() => U.map((e) => e.node.id).join("|"), [U])]);
|
|
5586
|
-
let
|
|
5587
|
-
let t = R.current, n = t ? t.clientWidth / 2 : 0, r = t ? t.clientHeight / 2 : 0, i = ee.current, a = Math.max(
|
|
5597
|
+
let fe = r((e) => {
|
|
5598
|
+
let t = R.current, n = t ? t.clientWidth / 2 : 0, r = t ? t.clientHeight / 2 : 0, i = ee.current, a = Math.max(gi, Math.min(_i, i * e));
|
|
5588
5599
|
if (a === i) return;
|
|
5589
5600
|
let o = te.current;
|
|
5590
5601
|
j(a), N({
|
|
5591
5602
|
x: n - (n - o.x) / i * a,
|
|
5592
5603
|
y: r - (r - o.y) / i * a
|
|
5593
5604
|
});
|
|
5594
|
-
}, []),
|
|
5595
|
-
let t =
|
|
5605
|
+
}, []), pe = r((e) => {
|
|
5606
|
+
let t = ae.get(e), n = R.current;
|
|
5596
5607
|
if (!t || !n) return;
|
|
5597
5608
|
let r = Math.max(A, 1);
|
|
5598
5609
|
j(r), N({
|
|
5599
5610
|
x: n.clientWidth / 2 - (t.x + t.w / 2) * r,
|
|
5600
5611
|
y: n.clientHeight / 2 - (t.y + t.h / 2) * r
|
|
5601
5612
|
});
|
|
5602
|
-
}, [
|
|
5613
|
+
}, [ae, A]), K = r((e) => {
|
|
5603
5614
|
D(e);
|
|
5604
5615
|
let t = e ? V.byId.get(e) : null;
|
|
5605
|
-
i?.(e, t ?
|
|
5606
|
-
}, [i, V.byId]),
|
|
5616
|
+
i?.(e, t ? Ii(t) : null);
|
|
5617
|
+
}, [i, V.byId]), me = r((e) => {
|
|
5607
5618
|
S(e), T(/* @__PURE__ */ new Set());
|
|
5608
|
-
}, []),
|
|
5609
|
-
(
|
|
5619
|
+
}, []), q = r((e) => {
|
|
5620
|
+
(oe.get(e) || 0) !== 0 && T((t) => {
|
|
5610
5621
|
let n = new Set(t);
|
|
5611
5622
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
5612
5623
|
});
|
|
5613
|
-
}, [
|
|
5624
|
+
}, [oe]), _e = r((e) => {
|
|
5614
5625
|
let t = e.key;
|
|
5615
5626
|
if (t === "+" || t === "=") {
|
|
5616
|
-
e.preventDefault(),
|
|
5627
|
+
e.preventDefault(), fe(vi);
|
|
5617
5628
|
return;
|
|
5618
5629
|
}
|
|
5619
5630
|
if (t === "-" || t === "_") {
|
|
5620
|
-
e.preventDefault(),
|
|
5631
|
+
e.preventDefault(), fe(1 / vi);
|
|
5621
5632
|
return;
|
|
5622
5633
|
}
|
|
5623
5634
|
if (t === "0") {
|
|
5624
|
-
e.preventDefault(),
|
|
5635
|
+
e.preventDefault(), de();
|
|
5625
5636
|
return;
|
|
5626
5637
|
}
|
|
5627
5638
|
if (t === "ArrowLeft" || t === "ArrowRight" || t === "ArrowUp" || t === "ArrowDown") {
|
|
5628
5639
|
e.preventDefault();
|
|
5629
|
-
let n = O ?
|
|
5640
|
+
let n = O ? ae.get(O) : void 0;
|
|
5630
5641
|
if (!n) {
|
|
5631
|
-
let e =
|
|
5642
|
+
let e = Mi(U);
|
|
5632
5643
|
e && k(e.node.id);
|
|
5633
5644
|
return;
|
|
5634
5645
|
}
|
|
5635
5646
|
let r;
|
|
5636
|
-
r = t === "ArrowLeft" ?
|
|
5647
|
+
r = t === "ArrowLeft" ? Ni(U, n, -1) : t === "ArrowRight" ? Ni(U, n, 1) : t === "ArrowUp" ? Pi(U, n, -1) : Pi(U, n, 1), r && (k(r.node.id), zi(r, R.current, A, M, N));
|
|
5637
5648
|
return;
|
|
5638
5649
|
}
|
|
5639
5650
|
if (t === "Enter") {
|
|
5640
5651
|
if (!O) return;
|
|
5641
|
-
e.preventDefault(), e.shiftKey ?
|
|
5652
|
+
e.preventDefault(), e.shiftKey ? q(O) : K(E === O ? null : O);
|
|
5642
5653
|
return;
|
|
5643
5654
|
}
|
|
5644
5655
|
if (t === "e" || t === "E") {
|
|
5645
5656
|
if (!O) return;
|
|
5646
|
-
e.preventDefault(),
|
|
5657
|
+
e.preventDefault(), q(O);
|
|
5647
5658
|
return;
|
|
5648
5659
|
}
|
|
5649
|
-
t === "Escape" && E && (e.preventDefault(),
|
|
5660
|
+
t === "Escape" && E && (e.preventDefault(), K(null));
|
|
5650
5661
|
}, [
|
|
5651
5662
|
O,
|
|
5652
5663
|
U,
|
|
5653
|
-
|
|
5664
|
+
ae,
|
|
5654
5665
|
E,
|
|
5655
5666
|
A,
|
|
5656
5667
|
M,
|
|
5668
|
+
fe,
|
|
5657
5669
|
de,
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
]), ye = r((e) => {
|
|
5670
|
+
q,
|
|
5671
|
+
K
|
|
5672
|
+
]), ve = r((e) => {
|
|
5662
5673
|
if (e.button !== 0) return;
|
|
5663
5674
|
let t = R.current;
|
|
5664
5675
|
t && t.setPointerCapture?.(e.pointerId), z.current = {
|
|
@@ -5668,7 +5679,7 @@ function Ni({ data: e = {
|
|
|
5668
5679
|
panY: M.y,
|
|
5669
5680
|
moved: !1
|
|
5670
5681
|
};
|
|
5671
|
-
}, [M]),
|
|
5682
|
+
}, [M]), be = r((e) => {
|
|
5672
5683
|
let t = z.current;
|
|
5673
5684
|
if (!t) return;
|
|
5674
5685
|
let n = e.clientX - t.startX, r = e.clientY - t.startY;
|
|
@@ -5680,21 +5691,21 @@ function Ni({ data: e = {
|
|
|
5680
5691
|
let t = z.current;
|
|
5681
5692
|
z.current = null;
|
|
5682
5693
|
let n = R.current;
|
|
5683
|
-
n && n.releasePointerCapture?.(e.pointerId), t && !t.moved && e.target === e.currentTarget &&
|
|
5684
|
-
}, [
|
|
5694
|
+
n && n.releasePointerCapture?.(e.pointerId), t && !t.moved && e.target === e.currentTarget && K(null);
|
|
5695
|
+
}, [K]), Ce = c(() => {
|
|
5685
5696
|
if (!O) return "";
|
|
5686
5697
|
let e = V.byId.get(O);
|
|
5687
|
-
return e ?
|
|
5698
|
+
return e ? Ri(e, {
|
|
5688
5699
|
selected: E === O,
|
|
5689
5700
|
expanded: C.has(O),
|
|
5690
|
-
violations:
|
|
5701
|
+
violations: le.get(O) || 0
|
|
5691
5702
|
}) : "";
|
|
5692
5703
|
}, [
|
|
5693
5704
|
O,
|
|
5694
5705
|
V.byId,
|
|
5695
5706
|
E,
|
|
5696
5707
|
C,
|
|
5697
|
-
|
|
5708
|
+
le
|
|
5698
5709
|
]), we = c(() => {
|
|
5699
5710
|
let e = R.current;
|
|
5700
5711
|
if (!e || W <= 0 || G <= 0) return null;
|
|
@@ -5733,14 +5744,14 @@ function Ni({ data: e = {
|
|
|
5733
5744
|
className: "mc-seg",
|
|
5734
5745
|
role: "radiogroup",
|
|
5735
5746
|
"aria-label": "detail grain",
|
|
5736
|
-
children:
|
|
5747
|
+
children: yi.map((e) => /* @__PURE__ */ m("button", {
|
|
5737
5748
|
id: Ee(e.id),
|
|
5738
5749
|
type: "button",
|
|
5739
5750
|
role: "radio",
|
|
5740
5751
|
"aria-checked": x === e.id,
|
|
5741
5752
|
className: "mc-seg-btn mono",
|
|
5742
5753
|
"data-active": x === e.id ? "true" : void 0,
|
|
5743
|
-
onClick: () =>
|
|
5754
|
+
onClick: () => me(e.id),
|
|
5744
5755
|
children: [x === e.id && /* @__PURE__ */ p(w, {
|
|
5745
5756
|
className: "lucide",
|
|
5746
5757
|
"aria-hidden": "true"
|
|
@@ -5749,11 +5760,11 @@ function Ni({ data: e = {
|
|
|
5749
5760
|
}), /* @__PURE__ */ m("div", {
|
|
5750
5761
|
className: "mc-search",
|
|
5751
5762
|
role: "combobox",
|
|
5752
|
-
"aria-expanded": I &&
|
|
5763
|
+
"aria-expanded": I && ue.length > 0,
|
|
5753
5764
|
"aria-haspopup": "listbox",
|
|
5754
5765
|
"aria-owns": b,
|
|
5755
5766
|
children: [
|
|
5756
|
-
/* @__PURE__ */ p(
|
|
5767
|
+
/* @__PURE__ */ p(xe, {
|
|
5757
5768
|
className: "lucide mc-search-ico",
|
|
5758
5769
|
"aria-hidden": "true"
|
|
5759
5770
|
}),
|
|
@@ -5773,15 +5784,15 @@ function Ni({ data: e = {
|
|
|
5773
5784
|
window.setTimeout(() => L(!1), 120);
|
|
5774
5785
|
},
|
|
5775
5786
|
onKeyDown: (e) => {
|
|
5776
|
-
e.key === "Enter" &&
|
|
5787
|
+
e.key === "Enter" && ue[0] ? (e.preventDefault(), De(ue[0])) : e.key === "Escape" && L(!1);
|
|
5777
5788
|
}
|
|
5778
5789
|
}),
|
|
5779
|
-
I &&
|
|
5790
|
+
I && ue.length > 0 && /* @__PURE__ */ p("ul", {
|
|
5780
5791
|
className: "mc-results",
|
|
5781
5792
|
id: b,
|
|
5782
5793
|
role: "listbox",
|
|
5783
5794
|
"aria-label": "search results",
|
|
5784
|
-
children:
|
|
5795
|
+
children: ue.map((e) => /* @__PURE__ */ m("li", {
|
|
5785
5796
|
role: "option",
|
|
5786
5797
|
"aria-selected": e.id === E,
|
|
5787
5798
|
className: "mc-result mono",
|
|
@@ -5808,11 +5819,11 @@ function Ni({ data: e = {
|
|
|
5808
5819
|
ref: R,
|
|
5809
5820
|
tabIndex: 0,
|
|
5810
5821
|
role: "group",
|
|
5811
|
-
"aria-label": "map canvas
|
|
5812
|
-
"aria-activedescendant": O && H.has(O) ? `${v}-node-${
|
|
5822
|
+
"aria-label": "map canvas: arrow keys move focus, enter selects, plus and minus zoom",
|
|
5823
|
+
"aria-activedescendant": O && H.has(O) ? `${v}-node-${Li(O)}` : void 0,
|
|
5813
5824
|
onKeyDown: _e,
|
|
5814
|
-
onPointerDown:
|
|
5815
|
-
onPointerMove:
|
|
5825
|
+
onPointerDown: ve,
|
|
5826
|
+
onPointerMove: be,
|
|
5816
5827
|
onPointerUp: Se,
|
|
5817
5828
|
onPointerCancel: Se,
|
|
5818
5829
|
children: Te ? /* @__PURE__ */ p("p", {
|
|
@@ -5832,28 +5843,28 @@ function Ni({ data: e = {
|
|
|
5832
5843
|
height: G,
|
|
5833
5844
|
viewBox: `0 0 ${W} ${G}`,
|
|
5834
5845
|
"aria-hidden": "true",
|
|
5835
|
-
children:
|
|
5836
|
-
let t =
|
|
5837
|
-
return !t || !n ? null : /* @__PURE__ */ p(
|
|
5846
|
+
children: se.map((e) => {
|
|
5847
|
+
let t = ae.get(e.from), n = ae.get(e.to);
|
|
5848
|
+
return !t || !n ? null : /* @__PURE__ */ p(Vi, {
|
|
5838
5849
|
a: t,
|
|
5839
5850
|
b: n,
|
|
5840
5851
|
kind: e.kind,
|
|
5841
5852
|
weight: e.weight,
|
|
5842
|
-
maxWeight:
|
|
5853
|
+
maxWeight: ce
|
|
5843
5854
|
}, `${e.kind}:${e.from}->${e.to}`);
|
|
5844
5855
|
})
|
|
5845
|
-
}), U.map((e) => /* @__PURE__ */ p(
|
|
5846
|
-
domId: `${v}-node-${
|
|
5856
|
+
}), U.map((e) => /* @__PURE__ */ p(Bi, {
|
|
5857
|
+
domId: `${v}-node-${Li(e.node.id)}`,
|
|
5847
5858
|
p: e,
|
|
5848
5859
|
selected: E === e.node.id,
|
|
5849
5860
|
focused: O === e.node.id,
|
|
5850
|
-
expandable: (
|
|
5861
|
+
expandable: (oe.get(e.node.id) || 0) > 0,
|
|
5851
5862
|
expanded: C.has(e.node.id),
|
|
5852
|
-
violations:
|
|
5863
|
+
violations: le.get(e.node.id) || 0,
|
|
5853
5864
|
onClick: () => {
|
|
5854
|
-
k(e.node.id),
|
|
5865
|
+
k(e.node.id), K(E === e.node.id ? null : e.node.id);
|
|
5855
5866
|
},
|
|
5856
|
-
onDoubleClick: () =>
|
|
5867
|
+
onDoubleClick: () => q(e.node.id)
|
|
5857
5868
|
}, e.node.id))]
|
|
5858
5869
|
}),
|
|
5859
5870
|
/* @__PURE__ */ m("div", {
|
|
@@ -5865,8 +5876,8 @@ function Ni({ data: e = {
|
|
|
5865
5876
|
type: "button",
|
|
5866
5877
|
className: "mc-zoom-btn",
|
|
5867
5878
|
"aria-label": "zoom in",
|
|
5868
|
-
onClick: () =>
|
|
5869
|
-
children: /* @__PURE__ */ p(
|
|
5879
|
+
onClick: () => fe(vi),
|
|
5880
|
+
children: /* @__PURE__ */ p(ye, {
|
|
5870
5881
|
className: "lucide",
|
|
5871
5882
|
"aria-hidden": "true"
|
|
5872
5883
|
})
|
|
@@ -5875,8 +5886,8 @@ function Ni({ data: e = {
|
|
|
5875
5886
|
type: "button",
|
|
5876
5887
|
className: "mc-zoom-btn",
|
|
5877
5888
|
"aria-label": "zoom out",
|
|
5878
|
-
onClick: () =>
|
|
5879
|
-
children: /* @__PURE__ */ p(
|
|
5889
|
+
onClick: () => fe(1 / vi),
|
|
5890
|
+
children: /* @__PURE__ */ p(ge, {
|
|
5880
5891
|
className: "lucide",
|
|
5881
5892
|
"aria-hidden": "true"
|
|
5882
5893
|
})
|
|
@@ -5885,8 +5896,8 @@ function Ni({ data: e = {
|
|
|
5885
5896
|
type: "button",
|
|
5886
5897
|
className: "mc-zoom-btn",
|
|
5887
5898
|
"aria-label": "fit map to view",
|
|
5888
|
-
onClick:
|
|
5889
|
-
children: /* @__PURE__ */ p(
|
|
5899
|
+
onClick: de,
|
|
5900
|
+
children: /* @__PURE__ */ p(he, {
|
|
5890
5901
|
className: "lucide",
|
|
5891
5902
|
"aria-hidden": "true"
|
|
5892
5903
|
})
|
|
@@ -5902,7 +5913,7 @@ function Ni({ data: e = {
|
|
|
5902
5913
|
preserveAspectRatio: "xMidYMid meet",
|
|
5903
5914
|
children: [U.map((e) => /* @__PURE__ */ p("rect", {
|
|
5904
5915
|
className: "mc-mini-node",
|
|
5905
|
-
"data-cov":
|
|
5916
|
+
"data-cov": Si(e.node.coverage),
|
|
5906
5917
|
x: e.x,
|
|
5907
5918
|
y: e.y,
|
|
5908
5919
|
width: e.w,
|
|
@@ -5956,7 +5967,7 @@ function Ni({ data: e = {
|
|
|
5956
5967
|
}),
|
|
5957
5968
|
/* @__PURE__ */ m("span", {
|
|
5958
5969
|
className: "mc-legend-item mc-legend-viol",
|
|
5959
|
-
children: [/* @__PURE__ */ p(
|
|
5970
|
+
children: [/* @__PURE__ */ p(Me, { className: "lucide" }), " violation"]
|
|
5960
5971
|
})
|
|
5961
5972
|
]
|
|
5962
5973
|
})
|
|
@@ -5965,27 +5976,27 @@ function Ni({ data: e = {
|
|
|
5965
5976
|
]
|
|
5966
5977
|
});
|
|
5967
5978
|
function De(e) {
|
|
5968
|
-
e.kind === "file" &&
|
|
5979
|
+
e.kind === "file" && bi[x] < Infinity && S("files"), T((t) => {
|
|
5969
5980
|
let n = new Set(t), r = e.parent;
|
|
5970
5981
|
for (; r && V.byId.has(r);) n.add(r), r = V.byId.get(r).parent;
|
|
5971
5982
|
return n;
|
|
5972
|
-
}), F(""), L(!1), k(e.id),
|
|
5973
|
-
window.requestAnimationFrame(() =>
|
|
5983
|
+
}), F(""), L(!1), k(e.id), K(e.id), window.requestAnimationFrame(() => {
|
|
5984
|
+
window.requestAnimationFrame(() => pe(e.id));
|
|
5974
5985
|
});
|
|
5975
5986
|
}
|
|
5976
5987
|
}
|
|
5977
|
-
function
|
|
5988
|
+
function Ii(e) {
|
|
5978
5989
|
let { _order: t, ...n } = e;
|
|
5979
5990
|
return n;
|
|
5980
5991
|
}
|
|
5981
|
-
function
|
|
5992
|
+
function Li(e) {
|
|
5982
5993
|
return String(e).replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
5983
5994
|
}
|
|
5984
|
-
function
|
|
5985
|
-
let { selected: n, expanded: r, violations: i = 0 } = t, a =
|
|
5995
|
+
function Ri(e, t = {}) {
|
|
5996
|
+
let { selected: n, expanded: r, violations: i = 0 } = t, a = Si(e.coverage), o = `${Ci(e.label || e.id)}: ${e.kind} · coverage ${a} of 4`;
|
|
5986
5997
|
return e.loc && (o += ` · ${e.loc} loc`), i > 0 && (o += ` · ${i} violation${i === 1 ? "" : "s"}`), n && (o += " · selected"), r && (o += " · expanded"), o;
|
|
5987
5998
|
}
|
|
5988
|
-
function
|
|
5999
|
+
function zi(e, t, n, r, i) {
|
|
5989
6000
|
if (!t) return;
|
|
5990
6001
|
let a = e.x * n + r.x, o = e.y * n + r.y, s = (e.x + e.w) * n + r.x, c = (e.y + e.h) * n + r.y, l = 0, u = 0;
|
|
5991
6002
|
a < 24 ? l = 24 - a : s > t.clientWidth - 24 && (l = t.clientWidth - 24 - s), o < 24 ? u = 24 - o : c > t.clientHeight - 24 && (u = t.clientHeight - 24 - c), (l !== 0 || u !== 0) && i({
|
|
@@ -5993,8 +6004,8 @@ function Li(e, t, n, r, i) {
|
|
|
5993
6004
|
y: r.y + u
|
|
5994
6005
|
});
|
|
5995
6006
|
}
|
|
5996
|
-
function
|
|
5997
|
-
let l = t.node, u =
|
|
6007
|
+
function Bi({ domId: e, p: t, selected: n, focused: r, expandable: i, expanded: a, violations: o, onClick: s, onDoubleClick: c }) {
|
|
6008
|
+
let l = t.node, u = Si(l.coverage);
|
|
5998
6009
|
return /* @__PURE__ */ m("button", {
|
|
5999
6010
|
id: e,
|
|
6000
6011
|
type: "button",
|
|
@@ -6002,8 +6013,8 @@ function Ri({ domId: e, p: t, selected: n, focused: r, expandable: i, expanded:
|
|
|
6002
6013
|
"data-cov": u,
|
|
6003
6014
|
"data-selected": n ? "true" : void 0,
|
|
6004
6015
|
"data-focused": r ? "true" : void 0,
|
|
6005
|
-
"data-ink-flip": u >=
|
|
6006
|
-
"aria-label":
|
|
6016
|
+
"data-ink-flip": u >= xi ? "true" : void 0,
|
|
6017
|
+
"aria-label": Ri(l, {
|
|
6007
6018
|
selected: n,
|
|
6008
6019
|
expanded: a,
|
|
6009
6020
|
violations: o
|
|
@@ -6040,12 +6051,12 @@ function Ri({ domId: e, p: t, selected: n, focused: r, expandable: i, expanded:
|
|
|
6040
6051
|
}),
|
|
6041
6052
|
/* @__PURE__ */ p("span", {
|
|
6042
6053
|
className: "mc-node-name mono",
|
|
6043
|
-
children:
|
|
6054
|
+
children: Ci(l.label || l.id)
|
|
6044
6055
|
}),
|
|
6045
6056
|
o > 0 && /* @__PURE__ */ m("span", {
|
|
6046
6057
|
className: "mc-node-viol mono tnum",
|
|
6047
6058
|
"aria-hidden": "true",
|
|
6048
|
-
children: [/* @__PURE__ */ p(
|
|
6059
|
+
children: [/* @__PURE__ */ p(Me, {
|
|
6049
6060
|
className: "lucide",
|
|
6050
6061
|
"aria-hidden": "true"
|
|
6051
6062
|
}), o]
|
|
@@ -6063,7 +6074,7 @@ function Ri({ domId: e, p: t, selected: n, focused: r, expandable: i, expanded:
|
|
|
6063
6074
|
]
|
|
6064
6075
|
});
|
|
6065
6076
|
}
|
|
6066
|
-
function
|
|
6077
|
+
function Vi({ a: e, b: t, kind: n, weight: r, maxWeight: i }) {
|
|
6067
6078
|
let a = e.x + e.w / 2, o = e.y + e.h, s = t.x + t.w / 2, c = t.y, l = (o + c) / 2;
|
|
6068
6079
|
return /* @__PURE__ */ m("g", {
|
|
6069
6080
|
className: "mc-edge",
|
|
@@ -6080,7 +6091,7 @@ function zi({ a: e, b: t, kind: n, weight: r, maxWeight: i }) {
|
|
|
6080
6091
|
}
|
|
6081
6092
|
//#endregion
|
|
6082
6093
|
//#region src/ui/RailShell.jsx
|
|
6083
|
-
function
|
|
6094
|
+
function Hi({ toolbar: e, children: t, rail: n, railSide: r = "right", sheetTitle: i = "details", sheetMeta: a, className: s = "" }) {
|
|
6084
6095
|
let [c, l] = d(!1), u = `rs-sheet-${o()}`;
|
|
6085
6096
|
return /* @__PURE__ */ m("div", {
|
|
6086
6097
|
className: `rs rs--${r}${s ? ` ${s}` : ""}`,
|
|
@@ -6143,7 +6154,7 @@ function Bi({ toolbar: e, children: t, rail: n, railSide: r = "right", sheetTitl
|
|
|
6143
6154
|
})]
|
|
6144
6155
|
});
|
|
6145
6156
|
}
|
|
6146
|
-
function
|
|
6157
|
+
function Ui({ title: e, icon: t, meta: n, children: r, collapsible: i = !1, defaultOpen: a = !0, className: s = "" }) {
|
|
6147
6158
|
let [c, l] = d(a), u = `rs-sec-${o()}`, h = /* @__PURE__ */ m(f, { children: [
|
|
6148
6159
|
t && /* @__PURE__ */ p(t, {
|
|
6149
6160
|
className: "rs-sec-icon lucide",
|
|
@@ -6184,7 +6195,7 @@ function Vi({ title: e, icon: t, meta: n, children: r, collapsible: i = !1, defa
|
|
|
6184
6195
|
})]
|
|
6185
6196
|
});
|
|
6186
6197
|
}
|
|
6187
|
-
function
|
|
6198
|
+
function Wi({ title: e, icon: t, meta: n, children: r, defaultOpen: i = !0 }) {
|
|
6188
6199
|
let [a, s] = d(i), c = `rs-split-${o()}`;
|
|
6189
6200
|
return /* @__PURE__ */ m("section", {
|
|
6190
6201
|
className: `rs-split-panel${a ? " is-open" : ""}`,
|
|
@@ -6222,15 +6233,15 @@ function Hi({ title: e, icon: t, meta: n, children: r, defaultOpen: i = !0 }) {
|
|
|
6222
6233
|
})]
|
|
6223
6234
|
});
|
|
6224
6235
|
}
|
|
6225
|
-
function
|
|
6236
|
+
function Gi({ left: e, right: t, leftTitle: n = "outline", rightTitle: r = "filters", leftIcon: i, rightIcon: a, leftMeta: o, rightMeta: s, className: c = "" }) {
|
|
6226
6237
|
return /* @__PURE__ */ m("div", {
|
|
6227
6238
|
className: `rs-split${c ? ` ${c}` : ""}`,
|
|
6228
|
-
children: [/* @__PURE__ */ p(
|
|
6239
|
+
children: [/* @__PURE__ */ p(Wi, {
|
|
6229
6240
|
title: n,
|
|
6230
6241
|
icon: i,
|
|
6231
6242
|
meta: o,
|
|
6232
6243
|
children: e
|
|
6233
|
-
}), /* @__PURE__ */ p(
|
|
6244
|
+
}), /* @__PURE__ */ p(Wi, {
|
|
6234
6245
|
title: r,
|
|
6235
6246
|
icon: a,
|
|
6236
6247
|
meta: s,
|
|
@@ -6240,55 +6251,55 @@ function Ui({ left: e, right: t, leftTitle: n = "outline", rightTitle: r = "filt
|
|
|
6240
6251
|
}
|
|
6241
6252
|
//#endregion
|
|
6242
6253
|
//#region src/ui/ProviderIcon.jsx
|
|
6243
|
-
var
|
|
6254
|
+
var Ki = [
|
|
6244
6255
|
"claude-code",
|
|
6245
6256
|
"gemini-cli",
|
|
6246
6257
|
"codex",
|
|
6247
6258
|
"opencode",
|
|
6248
6259
|
"cursor"
|
|
6249
|
-
],
|
|
6260
|
+
], qi = {
|
|
6250
6261
|
"claude-code": "claude",
|
|
6251
6262
|
"gemini-cli": "gemini",
|
|
6252
6263
|
codex: "openai",
|
|
6253
6264
|
opencode: "opencode",
|
|
6254
6265
|
cursor: "cursor"
|
|
6255
|
-
},
|
|
6266
|
+
}, Ji = {
|
|
6256
6267
|
"claude-code": "Claude Code",
|
|
6257
6268
|
"gemini-cli": "Gemini CLI",
|
|
6258
6269
|
codex: "Codex",
|
|
6259
6270
|
opencode: "opencode",
|
|
6260
6271
|
cursor: "Cursor"
|
|
6261
|
-
},
|
|
6272
|
+
}, Yi = {
|
|
6262
6273
|
"claude-code": "amber",
|
|
6263
6274
|
"gemini-cli": "teal",
|
|
6264
6275
|
codex: "olive",
|
|
6265
6276
|
opencode: "mauve",
|
|
6266
6277
|
cursor: "clay"
|
|
6267
6278
|
};
|
|
6268
|
-
function
|
|
6269
|
-
let t =
|
|
6279
|
+
function Xi(e) {
|
|
6280
|
+
let t = Yi[e];
|
|
6270
6281
|
return t ? `var(--${t})` : "var(--ink)";
|
|
6271
6282
|
}
|
|
6272
|
-
function
|
|
6273
|
-
let o =
|
|
6283
|
+
function Zi({ harness: e, size: t, accent: n = !1, label: r, className: i = "", ...a }) {
|
|
6284
|
+
let o = qi[e];
|
|
6274
6285
|
if (!o) return null;
|
|
6275
|
-
let s = ["pv-icon", i].filter(Boolean).join(" "), c = n ? { color:
|
|
6286
|
+
let s = ["pv-icon", i].filter(Boolean).join(" "), c = n ? { color: Xi(e) } : void 0, l = r === !0 ? Ji[e] : r;
|
|
6276
6287
|
return /* @__PURE__ */ p("span", {
|
|
6277
6288
|
className: s,
|
|
6278
6289
|
style: c,
|
|
6279
6290
|
...a,
|
|
6280
|
-
children: /* @__PURE__ */ p(
|
|
6291
|
+
children: /* @__PURE__ */ p(gt, {
|
|
6281
6292
|
name: o,
|
|
6282
6293
|
size: t,
|
|
6283
6294
|
label: l
|
|
6284
6295
|
})
|
|
6285
6296
|
});
|
|
6286
6297
|
}
|
|
6287
|
-
function
|
|
6288
|
-
return
|
|
6298
|
+
function Qi({ harness: e, accent: t = !1, className: n = "", ...r }) {
|
|
6299
|
+
return qi[e] ? /* @__PURE__ */ m("span", {
|
|
6289
6300
|
className: ["pv-tag", n].filter(Boolean).join(" "),
|
|
6290
6301
|
...r,
|
|
6291
|
-
children: [/* @__PURE__ */ p(
|
|
6302
|
+
children: [/* @__PURE__ */ p(Zi, {
|
|
6292
6303
|
harness: e,
|
|
6293
6304
|
accent: t
|
|
6294
6305
|
}), /* @__PURE__ */ p("span", {
|
|
@@ -6297,27 +6308,27 @@ function Xi({ harness: e, accent: t = !1, className: n = "", ...r }) {
|
|
|
6297
6308
|
})]
|
|
6298
6309
|
}) : null;
|
|
6299
6310
|
}
|
|
6300
|
-
function
|
|
6301
|
-
return
|
|
6311
|
+
function $i({ harness: e, accent: t = !1, className: n = "", ...r }) {
|
|
6312
|
+
return qi[e] ? /* @__PURE__ */ m("span", {
|
|
6302
6313
|
className: ["pv-name", n].filter(Boolean).join(" "),
|
|
6303
|
-
style: t ? { color:
|
|
6314
|
+
style: t ? { color: Xi(e) } : void 0,
|
|
6304
6315
|
...r,
|
|
6305
|
-
children: [/* @__PURE__ */ p(
|
|
6316
|
+
children: [/* @__PURE__ */ p(Zi, { harness: e }), /* @__PURE__ */ p("span", {
|
|
6306
6317
|
className: "pv-name-label",
|
|
6307
6318
|
children: e
|
|
6308
6319
|
})]
|
|
6309
6320
|
}) : null;
|
|
6310
6321
|
}
|
|
6311
|
-
function
|
|
6322
|
+
function ea({ className: e = "", ...t }) {
|
|
6312
6323
|
return /* @__PURE__ */ p("ul", {
|
|
6313
6324
|
className: ["pv-legend", e].filter(Boolean).join(" "),
|
|
6314
6325
|
...t,
|
|
6315
|
-
children:
|
|
6316
|
-
let t =
|
|
6326
|
+
children: Ki.map((e) => {
|
|
6327
|
+
let t = Yi[e];
|
|
6317
6328
|
return /* @__PURE__ */ m("li", {
|
|
6318
6329
|
className: "pv-legend-row",
|
|
6319
6330
|
children: [
|
|
6320
|
-
/* @__PURE__ */ p(
|
|
6331
|
+
/* @__PURE__ */ p(Zi, {
|
|
6321
6332
|
harness: e,
|
|
6322
6333
|
accent: !0,
|
|
6323
6334
|
className: "pv-legend-mark"
|
|
@@ -6326,16 +6337,14 @@ function Qi({ className: e = "", ...t }) {
|
|
|
6326
6337
|
className: "pv-legend-name",
|
|
6327
6338
|
children: e
|
|
6328
6339
|
}),
|
|
6329
|
-
/* @__PURE__ */
|
|
6330
|
-
className: "pv-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
children: t
|
|
6338
|
-
})]
|
|
6340
|
+
/* @__PURE__ */ p("span", {
|
|
6341
|
+
className: "pv-swatch",
|
|
6342
|
+
style: { background: `var(--${t})` },
|
|
6343
|
+
"aria-hidden": "true"
|
|
6344
|
+
}),
|
|
6345
|
+
/* @__PURE__ */ p("span", {
|
|
6346
|
+
className: "pv-legend-token",
|
|
6347
|
+
children: t
|
|
6339
6348
|
})
|
|
6340
6349
|
]
|
|
6341
6350
|
}, e);
|
|
@@ -6344,7 +6353,7 @@ function Qi({ className: e = "", ...t }) {
|
|
|
6344
6353
|
}
|
|
6345
6354
|
//#endregion
|
|
6346
6355
|
//#region src/ui/StepsWaterfall.jsx
|
|
6347
|
-
function
|
|
6356
|
+
function ta(e) {
|
|
6348
6357
|
if (!Number.isFinite(e) || e <= 0) return "0s";
|
|
6349
6358
|
let t = Math.round(e / 1e3);
|
|
6350
6359
|
if (t < 10) return `${(e / 1e3).toFixed(1)}s`;
|
|
@@ -6354,11 +6363,11 @@ function $i(e) {
|
|
|
6354
6363
|
let i = Math.floor(n / 60), a = n % 60;
|
|
6355
6364
|
return a ? `${i}h ${a}m` : `${i}h`;
|
|
6356
6365
|
}
|
|
6357
|
-
function
|
|
6366
|
+
function na(e, t) {
|
|
6358
6367
|
let n = String(e ?? "").replace(/\s+/g, " ").trim();
|
|
6359
6368
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
6360
6369
|
}
|
|
6361
|
-
function
|
|
6370
|
+
function ra({ tasks: e = [], onJump: t, totalMs: n, defaultCollapsed: r = !1, label: i = "steps by duration", className: a = "", ...o }) {
|
|
6362
6371
|
let [s, l] = d(r), { maxMs: u, sumMs: f, maxId: h } = c(() => {
|
|
6363
6372
|
let t = 0, n = 0, r = null;
|
|
6364
6373
|
for (let i of e) {
|
|
@@ -6388,7 +6397,7 @@ function ta({ tasks: e = [], onJump: t, totalMs: n, defaultCollapsed: r = !1, la
|
|
|
6388
6397
|
children: [
|
|
6389
6398
|
/* @__PURE__ */ p("span", {
|
|
6390
6399
|
className: "swf-head-total tnum",
|
|
6391
|
-
children:
|
|
6400
|
+
children: ta(g)
|
|
6392
6401
|
}),
|
|
6393
6402
|
/* @__PURE__ */ p("span", {
|
|
6394
6403
|
className: "swf-head-sep",
|
|
@@ -6412,7 +6421,7 @@ function ta({ tasks: e = [], onJump: t, totalMs: n, defaultCollapsed: r = !1, la
|
|
|
6412
6421
|
"aria-controls": "swf-list",
|
|
6413
6422
|
title: "show or hide the per-task duration rows",
|
|
6414
6423
|
children: [
|
|
6415
|
-
/* @__PURE__ */ p(
|
|
6424
|
+
/* @__PURE__ */ p(pe, {
|
|
6416
6425
|
className: "swf-toggle-ic",
|
|
6417
6426
|
"aria-hidden": "true"
|
|
6418
6427
|
}),
|
|
@@ -6427,7 +6436,7 @@ function ta({ tasks: e = [], onJump: t, totalMs: n, defaultCollapsed: r = !1, la
|
|
|
6427
6436
|
className: "swf-list",
|
|
6428
6437
|
id: "swf-list",
|
|
6429
6438
|
"aria-label": i,
|
|
6430
|
-
children: e.map((e, n) => /* @__PURE__ */ p(
|
|
6439
|
+
children: e.map((e, n) => /* @__PURE__ */ p(ia, {
|
|
6431
6440
|
task: e,
|
|
6432
6441
|
n: e.index ?? n + 1,
|
|
6433
6442
|
maxMs: u,
|
|
@@ -6437,7 +6446,7 @@ function ta({ tasks: e = [], onJump: t, totalMs: n, defaultCollapsed: r = !1, la
|
|
|
6437
6446
|
})]
|
|
6438
6447
|
});
|
|
6439
6448
|
}
|
|
6440
|
-
function
|
|
6449
|
+
function ia({ task: e, n: t, maxMs: n, longest: r, onJump: i }) {
|
|
6441
6450
|
let a = Math.max(0, e.durationMs || 0), o = e.outcome === "error" || !!e.error, s = n > 0 ? Math.max(2, a / n * 100) : 0, c = n > 0 ? a / n : 0, l = e.turns == null ? e.tools == null ? null : `${e.tools} ${e.tools === 1 ? "tool" : "tools"}` : `${e.turns} ${e.turns === 1 ? "turn" : "turns"}`, u = [
|
|
6442
6451
|
"swf-row",
|
|
6443
6452
|
r && "swf-row-longest",
|
|
@@ -6449,7 +6458,7 @@ function na({ task: e, n: t, maxMs: n, longest: r, onJump: i }) {
|
|
|
6449
6458
|
type: "button",
|
|
6450
6459
|
className: u,
|
|
6451
6460
|
onClick: () => i?.(e.id),
|
|
6452
|
-
"aria-label": `step ${t}: ${
|
|
6461
|
+
"aria-label": `step ${t}: ${na(e.prompt, 60)}, ${ta(a)}${o ? `, ${d}` : ""}`,
|
|
6453
6462
|
children: [
|
|
6454
6463
|
/* @__PURE__ */ m("span", {
|
|
6455
6464
|
className: "swf-index tnum",
|
|
@@ -6459,11 +6468,11 @@ function na({ task: e, n: t, maxMs: n, longest: r, onJump: i }) {
|
|
|
6459
6468
|
/* @__PURE__ */ p("span", {
|
|
6460
6469
|
className: "swf-prompt",
|
|
6461
6470
|
title: e.prompt,
|
|
6462
|
-
children:
|
|
6471
|
+
children: na(e.prompt, 120) || "(untitled step)"
|
|
6463
6472
|
}),
|
|
6464
6473
|
o && /* @__PURE__ */ m("span", {
|
|
6465
6474
|
className: "swf-error",
|
|
6466
|
-
children: [/* @__PURE__ */ p(
|
|
6475
|
+
children: [/* @__PURE__ */ p(Me, {
|
|
6467
6476
|
className: "swf-error-ic",
|
|
6468
6477
|
"aria-hidden": "true"
|
|
6469
6478
|
}), d]
|
|
@@ -6486,7 +6495,7 @@ function na({ task: e, n: t, maxMs: n, longest: r, onJump: i }) {
|
|
|
6486
6495
|
}),
|
|
6487
6496
|
/* @__PURE__ */ p("span", {
|
|
6488
6497
|
className: "swf-dur tnum",
|
|
6489
|
-
children:
|
|
6498
|
+
children: ta(a)
|
|
6490
6499
|
})
|
|
6491
6500
|
]
|
|
6492
6501
|
})
|
|
@@ -6494,10 +6503,10 @@ function na({ task: e, n: t, maxMs: n, longest: r, onJump: i }) {
|
|
|
6494
6503
|
}
|
|
6495
6504
|
//#endregion
|
|
6496
6505
|
//#region src/ui/GroupedMultiSelect.jsx
|
|
6497
|
-
function
|
|
6506
|
+
function aa(e) {
|
|
6498
6507
|
return e == null ? "0" : e >= 1e6 ? `${(e / 1e6).toFixed(1).replace(/\.0$/, "")}m` : e >= 1e3 ? `${(e / 1e3).toFixed(1).replace(/\.0$/, "")}k` : String(e);
|
|
6499
6508
|
}
|
|
6500
|
-
function
|
|
6509
|
+
function oa({ state: e }) {
|
|
6501
6510
|
return /* @__PURE__ */ m("span", {
|
|
6502
6511
|
className: "gms-box",
|
|
6503
6512
|
"data-state": e,
|
|
@@ -6505,13 +6514,13 @@ function ia({ state: e }) {
|
|
|
6505
6514
|
children: [e === "all" && /* @__PURE__ */ p(w, {
|
|
6506
6515
|
className: "gms-box-glyph",
|
|
6507
6516
|
strokeWidth: 3
|
|
6508
|
-
}), e === "some" && /* @__PURE__ */ p(
|
|
6517
|
+
}), e === "some" && /* @__PURE__ */ p(ge, {
|
|
6509
6518
|
className: "gms-box-glyph",
|
|
6510
6519
|
strokeWidth: 3
|
|
6511
6520
|
})]
|
|
6512
6521
|
});
|
|
6513
6522
|
}
|
|
6514
|
-
function
|
|
6523
|
+
function sa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel: a = "tokens", defaultOpen: o = [], ariaLabel: s = "grouped multi-select" }) {
|
|
6515
6524
|
let l = t !== void 0, [u, f] = d(() => new Set(n ?? [])), h = l ? t : u, [g, _] = d(() => new Set(o)), v = r((e) => {
|
|
6516
6525
|
l || f(e), i?.(e);
|
|
6517
6526
|
}, [l, i]), y = c(() => e.flatMap((e) => e.items.map((e) => e.id)), [e]), { selectedCount: b, selectedTokens: x } = c(() => {
|
|
@@ -6552,7 +6561,7 @@ function aa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel
|
|
|
6552
6561
|
onClick: E,
|
|
6553
6562
|
disabled: y.length === 0,
|
|
6554
6563
|
"aria-pressed": S,
|
|
6555
|
-
children: [/* @__PURE__ */ p(
|
|
6564
|
+
children: [/* @__PURE__ */ p(oa, { state: C }), /* @__PURE__ */ p("span", {
|
|
6556
6565
|
className: "gms-selectall-text",
|
|
6557
6566
|
children: "select all"
|
|
6558
6567
|
})]
|
|
@@ -6575,7 +6584,7 @@ function aa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel
|
|
|
6575
6584
|
}),
|
|
6576
6585
|
/* @__PURE__ */ p("span", {
|
|
6577
6586
|
className: "gms-tally-tokens gms-num",
|
|
6578
|
-
children:
|
|
6587
|
+
children: aa(x)
|
|
6579
6588
|
}),
|
|
6580
6589
|
/* @__PURE__ */ m("span", {
|
|
6581
6590
|
className: "gms-tally-unit",
|
|
@@ -6598,7 +6607,7 @@ function aa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel
|
|
|
6598
6607
|
onClick: () => T(e),
|
|
6599
6608
|
"aria-pressed": r === "all",
|
|
6600
6609
|
"aria-label": `select group, ${n} of ${t.length} selected`,
|
|
6601
|
-
children: /* @__PURE__ */ p(
|
|
6610
|
+
children: /* @__PURE__ */ p(oa, { state: r })
|
|
6602
6611
|
}), /* @__PURE__ */ m("button", {
|
|
6603
6612
|
type: "button",
|
|
6604
6613
|
className: "gms-group-disclosure",
|
|
@@ -6629,7 +6638,7 @@ function aa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel
|
|
|
6629
6638
|
}),
|
|
6630
6639
|
/* @__PURE__ */ p("span", {
|
|
6631
6640
|
className: "gms-group-tokens gms-num",
|
|
6632
|
-
children:
|
|
6641
|
+
children: aa(i)
|
|
6633
6642
|
}),
|
|
6634
6643
|
/* @__PURE__ */ m("span", {
|
|
6635
6644
|
className: "gms-group-unit",
|
|
@@ -6653,7 +6662,7 @@ function aa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel
|
|
|
6653
6662
|
onClick: () => w(e.id),
|
|
6654
6663
|
"aria-pressed": t,
|
|
6655
6664
|
children: [
|
|
6656
|
-
/* @__PURE__ */ p(
|
|
6665
|
+
/* @__PURE__ */ p(oa, { state: t ? "all" : "none" }),
|
|
6657
6666
|
/* @__PURE__ */ p("span", {
|
|
6658
6667
|
className: "gms-item-label",
|
|
6659
6668
|
children: e.label
|
|
@@ -6664,7 +6673,7 @@ function aa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel
|
|
|
6664
6673
|
}),
|
|
6665
6674
|
/* @__PURE__ */ p("span", {
|
|
6666
6675
|
className: "gms-item-tokens gms-num",
|
|
6667
|
-
children:
|
|
6676
|
+
children: aa(e.tokens ?? 0)
|
|
6668
6677
|
})
|
|
6669
6678
|
]
|
|
6670
6679
|
})
|
|
@@ -6678,7 +6687,7 @@ function aa({ groups: e = [], value: t, defaultValue: n, onChange: i, tokenLabel
|
|
|
6678
6687
|
}
|
|
6679
6688
|
//#endregion
|
|
6680
6689
|
//#region src/ui/EvidenceCaption.jsx
|
|
6681
|
-
function
|
|
6690
|
+
function ca(e) {
|
|
6682
6691
|
if (typeof document > "u") return;
|
|
6683
6692
|
let t = document.getElementById(e);
|
|
6684
6693
|
if (!t) return;
|
|
@@ -6688,7 +6697,7 @@ function oa(e) {
|
|
|
6688
6697
|
block: "center"
|
|
6689
6698
|
}), t.removeAttribute("data-ec-flash"), t.offsetWidth, t.setAttribute("data-ec-flash", "");
|
|
6690
6699
|
}
|
|
6691
|
-
function
|
|
6700
|
+
function la({ fragment: e, leadingSpace: t, onJump: n }) {
|
|
6692
6701
|
let { text: r, anchorId: i, label: a } = e;
|
|
6693
6702
|
if (!i) return /* @__PURE__ */ m("span", {
|
|
6694
6703
|
className: "ec-text",
|
|
@@ -6699,7 +6708,7 @@ function sa({ fragment: e, leadingSpace: t, onJump: n }) {
|
|
|
6699
6708
|
type: "button",
|
|
6700
6709
|
className: "ec-frag",
|
|
6701
6710
|
onClick: () => {
|
|
6702
|
-
n?.(i),
|
|
6711
|
+
n?.(i), ca(i);
|
|
6703
6712
|
},
|
|
6704
6713
|
"aria-describedby": `ec-jump-${i}`,
|
|
6705
6714
|
children: [r, /* @__PURE__ */ m("span", {
|
|
@@ -6713,19 +6722,19 @@ function sa({ fragment: e, leadingSpace: t, onJump: n }) {
|
|
|
6713
6722
|
})]
|
|
6714
6723
|
})] });
|
|
6715
6724
|
}
|
|
6716
|
-
function
|
|
6725
|
+
function ua({ fragments: e = [], onJump: t, "aria-label": n = "recap", className: r = "", ...i }) {
|
|
6717
6726
|
return /* @__PURE__ */ p("p", {
|
|
6718
6727
|
className: ["ec", r].filter(Boolean).join(" "),
|
|
6719
6728
|
"aria-label": n,
|
|
6720
6729
|
...i,
|
|
6721
|
-
children: e.map((e, n) => /* @__PURE__ */ p(
|
|
6730
|
+
children: e.map((e, n) => /* @__PURE__ */ p(la, {
|
|
6722
6731
|
fragment: e,
|
|
6723
6732
|
leadingSpace: n > 0,
|
|
6724
6733
|
onJump: t
|
|
6725
6734
|
}, n))
|
|
6726
6735
|
});
|
|
6727
6736
|
}
|
|
6728
|
-
function
|
|
6737
|
+
function da({ id: e, eyebrow: t, children: n, className: i = "", ...a }) {
|
|
6729
6738
|
let o = u(null), s = r(() => {
|
|
6730
6739
|
o.current?.removeAttribute("data-ec-flash");
|
|
6731
6740
|
}, []);
|
|
@@ -6747,10 +6756,10 @@ function la({ id: e, eyebrow: t, children: n, className: i = "", ...a }) {
|
|
|
6747
6756
|
}
|
|
6748
6757
|
//#endregion
|
|
6749
6758
|
//#region src/ui/TranscriptMarkers.jsx
|
|
6750
|
-
function
|
|
6759
|
+
function fa(e) {
|
|
6751
6760
|
return String(e ?? "").trim().replace(/\s+/g, " ");
|
|
6752
6761
|
}
|
|
6753
|
-
function
|
|
6762
|
+
function pa({ ins: e = 0, del: t = 0 }) {
|
|
6754
6763
|
let n = Number(e) || 0, r = Number(t) || 0;
|
|
6755
6764
|
return n <= 0 && r <= 0 ? null : /* @__PURE__ */ m("span", {
|
|
6756
6765
|
className: "tm2-churn tnum",
|
|
@@ -6771,7 +6780,7 @@ function da({ ins: e = 0, del: t = 0 }) {
|
|
|
6771
6780
|
]
|
|
6772
6781
|
});
|
|
6773
6782
|
}
|
|
6774
|
-
function
|
|
6783
|
+
function ma({ label: e, range: t, active: n = !1, stickyTop: r = "var(--nav-h)", onClick: i, className: a = "", ...o }) {
|
|
6775
6784
|
return /* @__PURE__ */ p("div", {
|
|
6776
6785
|
className: `tm2-phase${a ? ` ${a}` : ""}`,
|
|
6777
6786
|
style: { top: r },
|
|
@@ -6784,7 +6793,7 @@ function fa({ label: e, range: t, active: n = !1, stickyTop: r = "var(--nav-h)",
|
|
|
6784
6793
|
"data-active": n ? "true" : void 0,
|
|
6785
6794
|
"aria-current": n ? "true" : void 0,
|
|
6786
6795
|
children: [
|
|
6787
|
-
/* @__PURE__ */ p(
|
|
6796
|
+
/* @__PURE__ */ p(de, {
|
|
6788
6797
|
className: "lucide tm2-phase-icon",
|
|
6789
6798
|
size: 14,
|
|
6790
6799
|
strokeWidth: 1.75,
|
|
@@ -6802,12 +6811,12 @@ function fa({ label: e, range: t, active: n = !1, stickyTop: r = "var(--nav-h)",
|
|
|
6802
6811
|
})
|
|
6803
6812
|
});
|
|
6804
6813
|
}
|
|
6805
|
-
function
|
|
6814
|
+
function ha({ label: e, range: t, active: n = !1, stickyTop: r = "var(--nav-h)", onLabelClick: i, children: a, className: o = "", ...s }) {
|
|
6806
6815
|
return /* @__PURE__ */ m("section", {
|
|
6807
6816
|
className: `tm2-phase-section${o ? ` ${o}` : ""}`,
|
|
6808
6817
|
"aria-label": t ? `${e}, ${t}` : e,
|
|
6809
6818
|
...s,
|
|
6810
|
-
children: [/* @__PURE__ */ p(
|
|
6819
|
+
children: [/* @__PURE__ */ p(ma, {
|
|
6811
6820
|
label: e,
|
|
6812
6821
|
range: t,
|
|
6813
6822
|
active: n,
|
|
@@ -6819,7 +6828,7 @@ function pa({ label: e, range: t, active: n = !1, stickyTop: r = "var(--nav-h)",
|
|
|
6819
6828
|
})]
|
|
6820
6829
|
});
|
|
6821
6830
|
}
|
|
6822
|
-
function
|
|
6831
|
+
function ga({ turn: e, duration: t, tools: n, files: r, ins: i = 0, del: a = 0, className: o = "", ...s }) {
|
|
6823
6832
|
let c = Number(n) || 0, l = Number(r) || 0;
|
|
6824
6833
|
return /* @__PURE__ */ m("div", {
|
|
6825
6834
|
className: `tm2-marker tm2-marker--task${o ? ` ${o}` : ""}`,
|
|
@@ -6867,7 +6876,7 @@ function ma({ turn: e, duration: t, tools: n, files: r, ins: i = 0, del: a = 0,
|
|
|
6867
6876
|
l === 1 ? "file" : "files"
|
|
6868
6877
|
]
|
|
6869
6878
|
}),
|
|
6870
|
-
/* @__PURE__ */ p(
|
|
6879
|
+
/* @__PURE__ */ p(pa, {
|
|
6871
6880
|
ins: i,
|
|
6872
6881
|
del: a
|
|
6873
6882
|
})
|
|
@@ -6880,7 +6889,7 @@ function ma({ turn: e, duration: t, tools: n, files: r, ins: i = 0, del: a = 0,
|
|
|
6880
6889
|
]
|
|
6881
6890
|
});
|
|
6882
6891
|
}
|
|
6883
|
-
function
|
|
6892
|
+
function _a({ hash: e, message: t, time: n, files: r, ins: i = 0, del: a = 0, className: o = "", ...s }) {
|
|
6884
6893
|
let c = String(e ?? "").slice(0, 7), l = Number(r) || 0;
|
|
6885
6894
|
return /* @__PURE__ */ m("div", {
|
|
6886
6895
|
className: `tm2-marker tm2-marker--commit${o ? ` ${o}` : ""}`,
|
|
@@ -6895,7 +6904,7 @@ function ha({ hash: e, message: t, time: n, files: r, ins: i = 0, del: a = 0, cl
|
|
|
6895
6904
|
/* @__PURE__ */ m("div", {
|
|
6896
6905
|
className: "tm2-marker-chip",
|
|
6897
6906
|
children: [
|
|
6898
|
-
/* @__PURE__ */ p(
|
|
6907
|
+
/* @__PURE__ */ p(W, {
|
|
6899
6908
|
className: "lucide tm2-marker-icon",
|
|
6900
6909
|
size: 14,
|
|
6901
6910
|
strokeWidth: 1.75,
|
|
@@ -6922,7 +6931,7 @@ function ha({ hash: e, message: t, time: n, files: r, ins: i = 0, del: a = 0, cl
|
|
|
6922
6931
|
l === 1 ? "file" : "files"
|
|
6923
6932
|
]
|
|
6924
6933
|
}),
|
|
6925
|
-
/* @__PURE__ */ p(
|
|
6934
|
+
/* @__PURE__ */ p(pa, {
|
|
6926
6935
|
ins: i,
|
|
6927
6936
|
del: a
|
|
6928
6937
|
}),
|
|
@@ -6939,8 +6948,8 @@ function ha({ hash: e, message: t, time: n, files: r, ins: i = 0, del: a = 0, cl
|
|
|
6939
6948
|
]
|
|
6940
6949
|
});
|
|
6941
6950
|
}
|
|
6942
|
-
function
|
|
6943
|
-
let c =
|
|
6951
|
+
function va({ prompt: e, ordinal: t, onNext: n, nextLabel: r = "next", stickyTop: i = "var(--nav-h)", onJump: a, className: o = "", ...s }) {
|
|
6952
|
+
let c = fa(e);
|
|
6944
6953
|
return /* @__PURE__ */ p("div", {
|
|
6945
6954
|
className: `tm2-contextbar${o ? ` ${o}` : ""}`,
|
|
6946
6955
|
role: "region",
|
|
@@ -6985,24 +6994,24 @@ function ga({ prompt: e, ordinal: t, onNext: n, nextLabel: r = "next", stickyTop
|
|
|
6985
6994
|
}
|
|
6986
6995
|
//#endregion
|
|
6987
6996
|
//#region src/ui/ToolRenderers.jsx
|
|
6988
|
-
var
|
|
6989
|
-
read:
|
|
6990
|
-
edit:
|
|
6991
|
-
write:
|
|
6992
|
-
bash:
|
|
6993
|
-
grep:
|
|
6997
|
+
var ya = {
|
|
6998
|
+
read: H,
|
|
6999
|
+
edit: _e,
|
|
7000
|
+
write: re,
|
|
7001
|
+
bash: je,
|
|
7002
|
+
grep: xe,
|
|
6994
7003
|
task: x,
|
|
6995
|
-
webfetch:
|
|
7004
|
+
webfetch: oe
|
|
6996
7005
|
};
|
|
6997
|
-
function
|
|
7006
|
+
function ba(e, t = 64) {
|
|
6998
7007
|
if (!e) return "";
|
|
6999
7008
|
let n = String(e).replace(/\s+/g, " ").trim();
|
|
7000
7009
|
return n.length > t ? n.slice(0, t - 1) + "…" : n;
|
|
7001
7010
|
}
|
|
7002
|
-
function
|
|
7011
|
+
function xa(e) {
|
|
7003
7012
|
return e == null ? "" : e < 1e3 ? `${e}ms` : `${(e / 1e3).toFixed(1)}s`;
|
|
7004
7013
|
}
|
|
7005
|
-
function
|
|
7014
|
+
function Sa(e) {
|
|
7006
7015
|
let t = e.args ?? {};
|
|
7007
7016
|
switch (e.kind) {
|
|
7008
7017
|
case "read":
|
|
@@ -7012,10 +7021,10 @@ function ba(e) {
|
|
|
7012
7021
|
case "grep": return t.pattern ?? "";
|
|
7013
7022
|
case "task": return t.subagent ?? t.subagent_type ?? t.description ?? "";
|
|
7014
7023
|
case "webfetch": return t.url ?? "";
|
|
7015
|
-
default: return
|
|
7024
|
+
default: return ba(JSON.stringify(t));
|
|
7016
7025
|
}
|
|
7017
7026
|
}
|
|
7018
|
-
function
|
|
7027
|
+
function Ca({ status: e }) {
|
|
7019
7028
|
let t = e === "error";
|
|
7020
7029
|
return /* @__PURE__ */ m("span", {
|
|
7021
7030
|
className: `trx-status${t ? " trx-status-error" : " trx-status-ok"}`,
|
|
@@ -7025,11 +7034,11 @@ function xa({ status: e }) {
|
|
|
7025
7034
|
})]
|
|
7026
7035
|
});
|
|
7027
7036
|
}
|
|
7028
|
-
function
|
|
7037
|
+
function wa({ tool: e }) {
|
|
7029
7038
|
let t = e.args ?? {}, n = t.file ?? t.file_path ?? "(unknown)", r = /:(\d+)-(\d+)$/.exec(n), i = r ? n.slice(0, r.index) : n, a = r ? `lines ${r[1]}–${r[2]}` : t.offset != null || t.limit != null ? `lines ${t.offset ?? 1}–${(t.offset ?? 1) + (t.limit ?? 1) - 1}` : null, o = r ? Number(r[1]) : t.offset ?? 1, s = t.excerpt ? String(t.excerpt).split("\n") : [];
|
|
7030
7039
|
return /* @__PURE__ */ m("div", {
|
|
7031
7040
|
className: "trx-body",
|
|
7032
|
-
children: [/* @__PURE__ */ p(
|
|
7041
|
+
children: [/* @__PURE__ */ p(Na, {
|
|
7033
7042
|
path: i,
|
|
7034
7043
|
meta: a
|
|
7035
7044
|
}), s.length > 0 && /* @__PURE__ */ p("div", {
|
|
@@ -7048,11 +7057,11 @@ function Sa({ tool: e }) {
|
|
|
7048
7057
|
})]
|
|
7049
7058
|
});
|
|
7050
7059
|
}
|
|
7051
|
-
function
|
|
7060
|
+
function Ta({ tool: e }) {
|
|
7052
7061
|
let t = e.args ?? {}, n = t.file ?? t.file_path ?? "(unknown)", r = t.old == null ? [] : String(t.old).split("\n"), i = t.new == null ? [] : String(t.new).split("\n");
|
|
7053
7062
|
return /* @__PURE__ */ m("div", {
|
|
7054
7063
|
className: "trx-body",
|
|
7055
|
-
children: [/* @__PURE__ */ p(
|
|
7064
|
+
children: [/* @__PURE__ */ p(Na, {
|
|
7056
7065
|
path: n,
|
|
7057
7066
|
meta: `+${i.length} −${r.length}`
|
|
7058
7067
|
}), /* @__PURE__ */ m("div", {
|
|
@@ -7060,11 +7069,11 @@ function Ca({ tool: e }) {
|
|
|
7060
7069
|
role: "table",
|
|
7061
7070
|
"aria-label": `diff of ${n}`,
|
|
7062
7071
|
children: [
|
|
7063
|
-
r.map((e, t) => /* @__PURE__ */ p(
|
|
7072
|
+
r.map((e, t) => /* @__PURE__ */ p(Ea, {
|
|
7064
7073
|
type: "del",
|
|
7065
7074
|
text: e
|
|
7066
7075
|
}, `d${t}`)),
|
|
7067
|
-
i.map((e, t) => /* @__PURE__ */ p(
|
|
7076
|
+
i.map((e, t) => /* @__PURE__ */ p(Ea, {
|
|
7068
7077
|
type: "add",
|
|
7069
7078
|
text: e
|
|
7070
7079
|
}, `a${t}`)),
|
|
@@ -7076,8 +7085,8 @@ function Ca({ tool: e }) {
|
|
|
7076
7085
|
})]
|
|
7077
7086
|
});
|
|
7078
7087
|
}
|
|
7079
|
-
function
|
|
7080
|
-
let n = e === "add" ?
|
|
7088
|
+
function Ea({ type: e, text: t }) {
|
|
7089
|
+
let n = e === "add" ? ye : ge;
|
|
7081
7090
|
return /* @__PURE__ */ m("div", {
|
|
7082
7091
|
className: `trx-diffrow trx-diff-${e}`,
|
|
7083
7092
|
role: "row",
|
|
@@ -7103,11 +7112,11 @@ function wa({ type: e, text: t }) {
|
|
|
7103
7112
|
]
|
|
7104
7113
|
});
|
|
7105
7114
|
}
|
|
7106
|
-
function
|
|
7115
|
+
function Da({ tool: e }) {
|
|
7107
7116
|
let t = e.args ?? {}, n = t.file ?? t.file_path ?? "(unknown)", r = t.content ?? "", i = r ? r.split("\n").length : 0;
|
|
7108
7117
|
return /* @__PURE__ */ m("div", {
|
|
7109
7118
|
className: "trx-body",
|
|
7110
|
-
children: [/* @__PURE__ */ p(
|
|
7119
|
+
children: [/* @__PURE__ */ p(Na, {
|
|
7111
7120
|
path: n,
|
|
7112
7121
|
meta: r ? `${i} lines` : null
|
|
7113
7122
|
}), r && /* @__PURE__ */ p("pre", {
|
|
@@ -7116,14 +7125,14 @@ function Ta({ tool: e }) {
|
|
|
7116
7125
|
})]
|
|
7117
7126
|
});
|
|
7118
7127
|
}
|
|
7119
|
-
function
|
|
7128
|
+
function Oa({ tool: e }) {
|
|
7120
7129
|
let t = e.args ?? {}, n = t.command ?? "", r = t.output ?? "", i = t.exitCode ?? t.exit_code ?? +(e.status === "error"), a = e.status === "error" || i !== 0;
|
|
7121
7130
|
return /* @__PURE__ */ m("div", {
|
|
7122
7131
|
className: "trx-body",
|
|
7123
7132
|
children: [
|
|
7124
7133
|
/* @__PURE__ */ m("div", {
|
|
7125
7134
|
className: "trx-bash-cmd",
|
|
7126
|
-
children: [/* @__PURE__ */ p(
|
|
7135
|
+
children: [/* @__PURE__ */ p(je, {
|
|
7127
7136
|
"aria-hidden": "true",
|
|
7128
7137
|
className: "trx-bash-prompt"
|
|
7129
7138
|
}), /* @__PURE__ */ p("pre", {
|
|
@@ -7168,7 +7177,7 @@ function Ea({ tool: e }) {
|
|
|
7168
7177
|
]
|
|
7169
7178
|
});
|
|
7170
7179
|
}
|
|
7171
|
-
function
|
|
7180
|
+
function ka({ tool: e }) {
|
|
7172
7181
|
let t = e.args ?? {}, n = t.pattern ?? "", r = t.path ?? t.glob ?? ".", i = Array.isArray(t.matches) ? t.matches : [];
|
|
7173
7182
|
return /* @__PURE__ */ m("div", {
|
|
7174
7183
|
className: "trx-body",
|
|
@@ -7222,7 +7231,7 @@ function Da({ tool: e }) {
|
|
|
7222
7231
|
})]
|
|
7223
7232
|
});
|
|
7224
7233
|
}
|
|
7225
|
-
function
|
|
7234
|
+
function Aa({ tool: e }) {
|
|
7226
7235
|
let t = e.args ?? {}, n = t.subagent ?? t.subagent_type ?? "agent", r = t.taskStatus ?? t.status ?? (e.status === "error" ? "failed" : "done"), i = t.description ?? "", a = t.prompt ?? "";
|
|
7227
7236
|
return /* @__PURE__ */ m("div", {
|
|
7228
7237
|
className: "trx-body trx-task",
|
|
@@ -7251,24 +7260,24 @@ function Oa({ tool: e }) {
|
|
|
7251
7260
|
className: "trx-task-arrow"
|
|
7252
7261
|
}), /* @__PURE__ */ p("span", {
|
|
7253
7262
|
className: "trx-task-desc",
|
|
7254
|
-
children: i ||
|
|
7263
|
+
children: i || ba(a, 120)
|
|
7255
7264
|
})]
|
|
7256
7265
|
}),
|
|
7257
7266
|
a.trim() && i && /* @__PURE__ */ p("p", {
|
|
7258
7267
|
className: "trx-task-prompt",
|
|
7259
|
-
children:
|
|
7268
|
+
children: ba(a, 200)
|
|
7260
7269
|
})
|
|
7261
7270
|
]
|
|
7262
7271
|
});
|
|
7263
7272
|
}
|
|
7264
|
-
function
|
|
7273
|
+
function ja({ tool: e }) {
|
|
7265
7274
|
let t = e.args ?? {}, n = t.url ?? "", r = t.title ?? "", i = t.snippet ?? t.result ?? "";
|
|
7266
7275
|
return /* @__PURE__ */ m("div", {
|
|
7267
7276
|
className: "trx-body",
|
|
7268
7277
|
children: [
|
|
7269
7278
|
/* @__PURE__ */ m("div", {
|
|
7270
7279
|
className: "trx-webfetch-head",
|
|
7271
|
-
children: [/* @__PURE__ */ p(
|
|
7280
|
+
children: [/* @__PURE__ */ p(oe, {
|
|
7272
7281
|
"aria-hidden": "true",
|
|
7273
7282
|
className: "trx-webfetch-icon"
|
|
7274
7283
|
}), n ? /* @__PURE__ */ p("a", {
|
|
@@ -7293,7 +7302,7 @@ function ka({ tool: e }) {
|
|
|
7293
7302
|
]
|
|
7294
7303
|
});
|
|
7295
7304
|
}
|
|
7296
|
-
function
|
|
7305
|
+
function Ma({ tool: e }) {
|
|
7297
7306
|
let t = JSON.stringify(e.args ?? {}, null, 2);
|
|
7298
7307
|
return /* @__PURE__ */ m("div", {
|
|
7299
7308
|
className: "trx-body",
|
|
@@ -7309,7 +7318,7 @@ function Aa({ tool: e }) {
|
|
|
7309
7318
|
})]
|
|
7310
7319
|
});
|
|
7311
7320
|
}
|
|
7312
|
-
function
|
|
7321
|
+
function Na({ path: e, meta: t }) {
|
|
7313
7322
|
return /* @__PURE__ */ m("div", {
|
|
7314
7323
|
className: "trx-fileline",
|
|
7315
7324
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -7321,17 +7330,17 @@ function ja({ path: e, meta: t }) {
|
|
|
7321
7330
|
})]
|
|
7322
7331
|
});
|
|
7323
7332
|
}
|
|
7324
|
-
var
|
|
7325
|
-
read:
|
|
7326
|
-
edit:
|
|
7327
|
-
write:
|
|
7328
|
-
bash:
|
|
7329
|
-
grep:
|
|
7330
|
-
task:
|
|
7331
|
-
webfetch:
|
|
7333
|
+
var Pa = {
|
|
7334
|
+
read: wa,
|
|
7335
|
+
edit: Ta,
|
|
7336
|
+
write: Da,
|
|
7337
|
+
bash: Oa,
|
|
7338
|
+
grep: ka,
|
|
7339
|
+
task: Aa,
|
|
7340
|
+
webfetch: ja
|
|
7332
7341
|
};
|
|
7333
|
-
function
|
|
7334
|
-
let [i, a] = d(t), o =
|
|
7342
|
+
function Fa({ tool: e, defaultOpen: t = !1, className: n = "", ...r }) {
|
|
7343
|
+
let [i, a] = d(t), o = ya[e.kind] ?? Le, s = Pa[e.kind] ?? Ma, c = e.status ?? "ok", l = `trx-body-${e.name}-${e.kind}`, u = Sa(e);
|
|
7335
7344
|
return /* @__PURE__ */ m("div", {
|
|
7336
7345
|
className: [
|
|
7337
7346
|
"trx",
|
|
@@ -7361,13 +7370,13 @@ function Na({ tool: e, defaultOpen: t = !1, className: n = "", ...r }) {
|
|
|
7361
7370
|
}),
|
|
7362
7371
|
u && /* @__PURE__ */ p("span", {
|
|
7363
7372
|
className: "trx-tool-preview trx-code",
|
|
7364
|
-
children:
|
|
7373
|
+
children: ba(u)
|
|
7365
7374
|
}),
|
|
7366
7375
|
e.duration != null && /* @__PURE__ */ p("span", {
|
|
7367
7376
|
className: "trx-tool-dur tnum",
|
|
7368
|
-
children:
|
|
7377
|
+
children: xa(e.duration)
|
|
7369
7378
|
}),
|
|
7370
|
-
/* @__PURE__ */ p(
|
|
7379
|
+
/* @__PURE__ */ p(Ca, { status: c })
|
|
7371
7380
|
]
|
|
7372
7381
|
}), i && /* @__PURE__ */ p("div", {
|
|
7373
7382
|
className: "trx-panel",
|
|
@@ -7378,15 +7387,15 @@ function Na({ tool: e, defaultOpen: t = !1, className: n = "", ...r }) {
|
|
|
7378
7387
|
}
|
|
7379
7388
|
//#endregion
|
|
7380
7389
|
//#region src/ui/Tour.jsx
|
|
7381
|
-
var
|
|
7382
|
-
function
|
|
7390
|
+
var Ia = 8, La = 12, Ra = 340, za = 16;
|
|
7391
|
+
function Ba(e, t, n) {
|
|
7383
7392
|
return Math.min(n, Math.max(t, e));
|
|
7384
7393
|
}
|
|
7385
|
-
function
|
|
7394
|
+
function Va(e) {
|
|
7386
7395
|
return e ? document.getElementById(e) || document.querySelector(`[data-tour="${CSS.escape(e)}"]`) : null;
|
|
7387
7396
|
}
|
|
7388
|
-
function
|
|
7389
|
-
let [h, g] = d(0), [y, b] = d(null), [x, S] = d(!1), [, C] = l((e) => e + 1, 0), T = u(null), E = u(null), D = e.length, O = t && D > 0 ? e[
|
|
7397
|
+
function Ha({ steps: e = [], open: t, onClose: n, onFinish: i, onStepChange: o, labelId: c = "tour-title" }) {
|
|
7398
|
+
let [h, g] = d(0), [y, b] = d(null), [x, S] = d(!1), [, C] = l((e) => e + 1, 0), T = u(null), E = u(null), D = e.length, O = t && D > 0 ? e[Ba(h, 0, D - 1)] : null, k = h <= 0, A = h >= D - 1, j = u(n);
|
|
7390
7399
|
j.current = n;
|
|
7391
7400
|
let M = u(i);
|
|
7392
7401
|
M.current = i;
|
|
@@ -7419,14 +7428,14 @@ function Ba({ steps: e = [], open: t, onClose: n, onFinish: i, onStepChange: o,
|
|
|
7419
7428
|
b(null);
|
|
7420
7429
|
return;
|
|
7421
7430
|
}
|
|
7422
|
-
let e = 0, t = !1, n =
|
|
7431
|
+
let e = 0, t = !1, n = Va(O.anchorId);
|
|
7423
7432
|
n && n.scrollIntoView({
|
|
7424
7433
|
behavior: typeof window < "u" && window.matchMedia("(prefers-reduced-motion: no-preference)").matches ? "smooth" : "auto",
|
|
7425
7434
|
block: "nearest",
|
|
7426
7435
|
inline: "nearest"
|
|
7427
7436
|
});
|
|
7428
7437
|
let r = () => {
|
|
7429
|
-
let e =
|
|
7438
|
+
let e = Va(O.anchorId);
|
|
7430
7439
|
if (!e) {
|
|
7431
7440
|
b((e) => e === null ? e : null);
|
|
7432
7441
|
return;
|
|
@@ -7489,31 +7498,31 @@ function Ba({ steps: e = [], open: t, onClose: n, onFinish: i, onStepChange: o,
|
|
|
7489
7498
|
]);
|
|
7490
7499
|
if (!x || !O) return null;
|
|
7491
7500
|
let R = window.innerWidth, z = window.innerHeight, B = y ? {
|
|
7492
|
-
top: y.top -
|
|
7493
|
-
left: y.left -
|
|
7494
|
-
width: y.width +
|
|
7495
|
-
height: y.height +
|
|
7501
|
+
top: y.top - Ia,
|
|
7502
|
+
left: y.left - Ia,
|
|
7503
|
+
width: y.width + Ia * 2,
|
|
7504
|
+
height: y.height + Ia * 2
|
|
7496
7505
|
} : null, ee, te = "center";
|
|
7497
7506
|
if (B) {
|
|
7498
7507
|
let e = z - (B.top + B.height), t = e > 220 || e > B.top;
|
|
7499
7508
|
te = t ? "below" : "above";
|
|
7500
|
-
let n =
|
|
7509
|
+
let n = Ba(B.left + B.width / 2 - Ra / 2, za, Math.max(za, R - Ra - za));
|
|
7501
7510
|
ee = t ? {
|
|
7502
|
-
top: B.top + B.height +
|
|
7511
|
+
top: B.top + B.height + La,
|
|
7503
7512
|
left: n,
|
|
7504
|
-
width:
|
|
7513
|
+
width: Ra
|
|
7505
7514
|
} : {
|
|
7506
|
-
bottom: z - B.top +
|
|
7515
|
+
bottom: z - B.top + La,
|
|
7507
7516
|
left: n,
|
|
7508
|
-
width:
|
|
7517
|
+
width: Ra
|
|
7509
7518
|
};
|
|
7510
7519
|
} else ee = {
|
|
7511
7520
|
top: "50%",
|
|
7512
7521
|
left: "50%",
|
|
7513
7522
|
transform: "translate(-50%, -50%)",
|
|
7514
|
-
width:
|
|
7523
|
+
width: Ra
|
|
7515
7524
|
};
|
|
7516
|
-
return
|
|
7525
|
+
return Qe(/* @__PURE__ */ m("div", {
|
|
7517
7526
|
className: "tour-root",
|
|
7518
7527
|
role: "dialog",
|
|
7519
7528
|
"aria-modal": "true",
|
|
@@ -7655,27 +7664,27 @@ function Ba({ steps: e = [], open: t, onClose: n, onFinish: i, onStepChange: o,
|
|
|
7655
7664
|
}
|
|
7656
7665
|
//#endregion
|
|
7657
7666
|
//#region src/ui/ConnectionState.jsx
|
|
7658
|
-
var
|
|
7667
|
+
var Ua = {
|
|
7659
7668
|
live: {
|
|
7660
7669
|
tone: "live",
|
|
7661
|
-
icon:
|
|
7670
|
+
icon: se,
|
|
7662
7671
|
word: "live",
|
|
7663
7672
|
note: "on this computer · no internet"
|
|
7664
7673
|
},
|
|
7665
7674
|
connecting: {
|
|
7666
7675
|
tone: "connecting",
|
|
7667
|
-
icon:
|
|
7676
|
+
icon: K,
|
|
7668
7677
|
word: "connecting",
|
|
7669
7678
|
note: "reaching the local program…"
|
|
7670
7679
|
},
|
|
7671
7680
|
disconnected: {
|
|
7672
7681
|
tone: "disconnected",
|
|
7673
|
-
icon:
|
|
7682
|
+
icon: Ie,
|
|
7674
7683
|
word: "disconnected",
|
|
7675
7684
|
note: "local program not reachable"
|
|
7676
7685
|
}
|
|
7677
7686
|
};
|
|
7678
|
-
function
|
|
7687
|
+
function Wa({ value: e, label: t = "copy" }) {
|
|
7679
7688
|
let [n, r] = d(!1), i = typeof navigator < "u" && navigator.clipboard;
|
|
7680
7689
|
return i ? /* @__PURE__ */ m("button", {
|
|
7681
7690
|
type: "button",
|
|
@@ -7692,8 +7701,8 @@ function Ha({ value: e, label: t = "copy" }) {
|
|
|
7692
7701
|
})]
|
|
7693
7702
|
}) : null;
|
|
7694
7703
|
}
|
|
7695
|
-
function
|
|
7696
|
-
let i =
|
|
7704
|
+
function Ga({ status: e = "live", showNote: t = !0, className: n = "", ...r }) {
|
|
7705
|
+
let i = Ua[e] ?? Ua.live, a = i.icon;
|
|
7697
7706
|
return /* @__PURE__ */ m("span", {
|
|
7698
7707
|
className: [
|
|
7699
7708
|
"cx-pill",
|
|
@@ -7718,13 +7727,13 @@ function Ua({ status: e = "live", showNote: t = !0, className: n = "", ...r }) {
|
|
|
7718
7727
|
]
|
|
7719
7728
|
});
|
|
7720
7729
|
}
|
|
7721
|
-
function
|
|
7730
|
+
function Ka({ onRetry: e, title: t, body: n }) {
|
|
7722
7731
|
return /* @__PURE__ */ m("div", {
|
|
7723
7732
|
className: "cx-panel",
|
|
7724
7733
|
role: "status",
|
|
7725
7734
|
"aria-live": "polite",
|
|
7726
7735
|
children: [
|
|
7727
|
-
/* @__PURE__ */ p(
|
|
7736
|
+
/* @__PURE__ */ p(ve, {
|
|
7728
7737
|
className: "cx-panel-icon",
|
|
7729
7738
|
"aria-hidden": "true"
|
|
7730
7739
|
}),
|
|
@@ -7742,12 +7751,12 @@ function Wa({ onRetry: e, title: t, body: n }) {
|
|
|
7742
7751
|
type: "button",
|
|
7743
7752
|
className: "cx-retry",
|
|
7744
7753
|
onClick: e,
|
|
7745
|
-
children: [/* @__PURE__ */ p(
|
|
7754
|
+
children: [/* @__PURE__ */ p(be, { "aria-hidden": "true" }), /* @__PURE__ */ p("span", { children: "retry" })]
|
|
7746
7755
|
})
|
|
7747
7756
|
]
|
|
7748
7757
|
});
|
|
7749
7758
|
}
|
|
7750
|
-
function
|
|
7759
|
+
function qa({ rows: e = 3 }) {
|
|
7751
7760
|
return /* @__PURE__ */ m("div", {
|
|
7752
7761
|
className: "cx-skeleton",
|
|
7753
7762
|
role: "status",
|
|
@@ -7762,19 +7771,19 @@ function Ga({ rows: e = 3 }) {
|
|
|
7762
7771
|
}, t))]
|
|
7763
7772
|
});
|
|
7764
7773
|
}
|
|
7765
|
-
function
|
|
7774
|
+
function Ja({ status: e, loading: t = !1, error: n = !1, empty: r = !1, children: i, emptyState: a, onRetry: o, skeletonRows: s = 3, className: c = "", ...l }) {
|
|
7766
7775
|
let u = e === "disconnected" || !!n, d = ["cx-state", c].filter(Boolean).join(" "), f;
|
|
7767
|
-
return f = t ? /* @__PURE__ */ p(
|
|
7776
|
+
return f = t ? /* @__PURE__ */ p(qa, { rows: s }) : u ? /* @__PURE__ */ p(Ka, {
|
|
7768
7777
|
onRetry: o,
|
|
7769
7778
|
title: "lost connection to the local program",
|
|
7770
|
-
body: typeof n == "string" ? n : "the peasant program on this computer may have stopped. nothing has left your machine
|
|
7779
|
+
body: typeof n == "string" ? n : "the peasant program on this computer may have stopped. nothing has left your machine. this returns on its own, or retry."
|
|
7771
7780
|
}) : r ? a ?? null : i, /* @__PURE__ */ p("div", {
|
|
7772
7781
|
className: d,
|
|
7773
7782
|
...l,
|
|
7774
7783
|
children: f
|
|
7775
7784
|
});
|
|
7776
7785
|
}
|
|
7777
|
-
function
|
|
7786
|
+
function Ya({ icon: e = se, title: t, body: n, command: r, privacy: i = "nothing leaves your machine", as: a = "h3", className: o = "", ...s }) {
|
|
7778
7787
|
return /* @__PURE__ */ m("div", {
|
|
7779
7788
|
className: ["cx-teach", o].filter(Boolean).join(" "),
|
|
7780
7789
|
...s,
|
|
@@ -7803,11 +7812,11 @@ function qa({ icon: e = ae, title: t, body: n, command: r, privacy: i = "nothing
|
|
|
7803
7812
|
className: "cx-cmd-text",
|
|
7804
7813
|
children: r
|
|
7805
7814
|
})]
|
|
7806
|
-
}), /* @__PURE__ */ p(
|
|
7815
|
+
}), /* @__PURE__ */ p(Wa, { value: r })]
|
|
7807
7816
|
}),
|
|
7808
7817
|
i && /* @__PURE__ */ m("p", {
|
|
7809
7818
|
className: "cx-teach-privacy",
|
|
7810
|
-
children: [/* @__PURE__ */ p(
|
|
7819
|
+
children: [/* @__PURE__ */ p(q, {
|
|
7811
7820
|
className: "cx-teach-privacy-icon",
|
|
7812
7821
|
"aria-hidden": "true"
|
|
7813
7822
|
}), i]
|
|
@@ -7817,8 +7826,8 @@ function qa({ icon: e = ae, title: t, body: n, command: r, privacy: i = "nothing
|
|
|
7817
7826
|
}
|
|
7818
7827
|
//#endregion
|
|
7819
7828
|
//#region src/ui/SignIn.jsx
|
|
7820
|
-
function
|
|
7821
|
-
let n =
|
|
7829
|
+
function Xa({ provider: e, className: t = "" }) {
|
|
7830
|
+
let n = Za[e];
|
|
7822
7831
|
if (!n) return null;
|
|
7823
7832
|
let r = e === "huggingface" ? "0 0 95 88" : "0 0 24 24";
|
|
7824
7833
|
return /* @__PURE__ */ p("svg", {
|
|
@@ -7830,13 +7839,13 @@ function Ja({ provider: e, className: t = "" }) {
|
|
|
7830
7839
|
children: Array.isArray(n) ? n.map((e, t) => /* @__PURE__ */ p("path", { d: e }, t)) : /* @__PURE__ */ p("path", { d: n })
|
|
7831
7840
|
});
|
|
7832
7841
|
}
|
|
7833
|
-
var
|
|
7842
|
+
var Za = {
|
|
7834
7843
|
github: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.807 1.305 3.492.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.4 3-.405 1.02.005 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",
|
|
7835
7844
|
gitlab: "m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z",
|
|
7836
7845
|
huggingface: ["M47.21 76.07c14.85 0 26.9-12.21 26.9-27.27 0-15.05-12.05-27.26-26.9-27.26-14.85 0-26.9 12.21-26.9 27.26 0 15.06 12.05 27.27 26.9 27.27z", "M81.7 47.83c2.05-1.39 3.34-3.7 3.34-6.3 0-4.22-3.4-7.65-7.62-7.65-1.79 0-3.42.63-4.71 1.66a23.97 23.97 0 0 0-2.13-3.55c-4.7-6.83-12.5-11.3-21.37-11.3-8.87 0-16.66 4.47-21.36 11.3a23.97 23.97 0 0 0-2.13 3.55 7.6 7.6 0 0 0-4.71-1.66c-4.22 0-7.62 3.43-7.62 7.65 0 2.6 1.29 4.91 3.34 6.3a26.94 26.94 0 0 0-.42 4.74c0 14.85 12.05 26.9 26.9 26.9 14.85 0 26.9-12.05 26.9-26.9 0-1.62-.14-3.2-.42-4.74h.01z"],
|
|
7837
7846
|
codeberg: "M11.955.49A12 12 0 0 0 0 12.49a12 12 0 0 0 .076 1.343l11.4-15.158A12 12 0 0 0 11.955.49zm.09 0a12 12 0 0 0-.474.185L23.924 13.832A12 12 0 0 0 24 12.49 12 12 0 0 0 12.045.49zM.378 15.512A12 12 0 0 0 12 23.51a12 12 0 0 0 11.622-7.998L12 6.207z",
|
|
7838
7847
|
sourcehut: "M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm0 2.182a9.818 9.818 0 1 1 0 19.636 9.818 9.818 0 0 1 0-19.636z"
|
|
7839
|
-
},
|
|
7848
|
+
}, Qa = [
|
|
7840
7849
|
{
|
|
7841
7850
|
id: "github",
|
|
7842
7851
|
label: "GitHub"
|
|
@@ -7858,7 +7867,7 @@ var Ya = {
|
|
|
7858
7867
|
label: "SourceHut"
|
|
7859
7868
|
}
|
|
7860
7869
|
];
|
|
7861
|
-
function
|
|
7870
|
+
function $a({ providers: e = Qa, onSignIn: t, className: n = "", ...r }) {
|
|
7862
7871
|
let [i, s] = d(!1), c = u(null), l = u(null), f = u([]), h = o(), g = e[0], _ = e.slice(1);
|
|
7863
7872
|
a(() => {
|
|
7864
7873
|
if (!i) return;
|
|
@@ -7885,7 +7894,7 @@ function Za({ providers: e = Xa, onSignIn: t, className: n = "", ...r }) {
|
|
|
7885
7894
|
type: "button",
|
|
7886
7895
|
className: "si-split-primary",
|
|
7887
7896
|
onClick: () => t?.(g.id),
|
|
7888
|
-
children: [/* @__PURE__ */ p(
|
|
7897
|
+
children: [/* @__PURE__ */ p(Xa, { provider: g.id }), /* @__PURE__ */ m("span", {
|
|
7889
7898
|
className: "si-split-label",
|
|
7890
7899
|
children: ["continue with ", g.label]
|
|
7891
7900
|
})]
|
|
@@ -7918,7 +7927,7 @@ function Za({ providers: e = Xa, onSignIn: t, className: n = "", ...r }) {
|
|
|
7918
7927
|
className: "si-menu-item",
|
|
7919
7928
|
ref: (e) => f.current[t] = e,
|
|
7920
7929
|
onClick: () => v(e.id),
|
|
7921
|
-
children: [/* @__PURE__ */ p(
|
|
7930
|
+
children: [/* @__PURE__ */ p(Xa, {
|
|
7922
7931
|
provider: e.id,
|
|
7923
7932
|
className: "si-menu-mark"
|
|
7924
7933
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -7930,16 +7939,16 @@ function Za({ providers: e = Xa, onSignIn: t, className: n = "", ...r }) {
|
|
|
7930
7939
|
})]
|
|
7931
7940
|
}) : null;
|
|
7932
7941
|
}
|
|
7933
|
-
var
|
|
7942
|
+
var eo = /^[A-Za-z0-9][A-Za-z0-9-]{1,28}[A-Za-z0-9]$/, to = new Set([
|
|
7934
7943
|
"admin",
|
|
7935
7944
|
"root",
|
|
7936
7945
|
"support",
|
|
7937
7946
|
"village",
|
|
7938
7947
|
"fairtrade"
|
|
7939
|
-
]),
|
|
7948
|
+
]), no = {
|
|
7940
7949
|
idle: null,
|
|
7941
7950
|
checking: {
|
|
7942
|
-
Icon:
|
|
7951
|
+
Icon: me,
|
|
7943
7952
|
word: "checking…",
|
|
7944
7953
|
tone: "si-state-checking",
|
|
7945
7954
|
spin: !0
|
|
@@ -7960,31 +7969,31 @@ var Qa = /^[A-Za-z0-9][A-Za-z0-9-]{1,28}[A-Za-z0-9]$/, $a = new Set([
|
|
|
7960
7969
|
tone: "si-state-bad"
|
|
7961
7970
|
}
|
|
7962
7971
|
};
|
|
7963
|
-
function
|
|
7972
|
+
function ro(e) {
|
|
7964
7973
|
let t = e.trim();
|
|
7965
7974
|
if (!t) return { state: "idle" };
|
|
7966
7975
|
let n = t.toLowerCase();
|
|
7967
|
-
return
|
|
7976
|
+
return eo.test(n) ? to.has(n) ? {
|
|
7968
7977
|
state: "taken",
|
|
7969
|
-
hint: `@${t} is already claimed
|
|
7978
|
+
hint: `@${t} is already claimed. try another.`
|
|
7970
7979
|
} : { state: "available" } : {
|
|
7971
7980
|
state: "invalid",
|
|
7972
7981
|
hint: "3–30 characters: letters, numbers, and single hyphens, starting and ending alphanumeric."
|
|
7973
7982
|
};
|
|
7974
7983
|
}
|
|
7975
|
-
function
|
|
7984
|
+
function io(e) {
|
|
7976
7985
|
return e ? String(e).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 30).replace(/-+$/g, "") : "";
|
|
7977
7986
|
}
|
|
7978
|
-
function
|
|
7979
|
-
let [l, h] = d(n), [g, _] = d(!1), v = u(null), y = o(), b = t ||
|
|
7987
|
+
function ao({ onSubmit: e, validate: t, initialValue: n = "", suggestedFrom: r = "", suggestions: i, className: a = "", ...s }) {
|
|
7988
|
+
let [l, h] = d(n), [g, _] = d(!1), v = u(null), y = o(), b = t || ro, x = c(() => {
|
|
7980
7989
|
if (i?.length) return i.slice(0, 2);
|
|
7981
|
-
let e =
|
|
7990
|
+
let e = io(r);
|
|
7982
7991
|
return e && e !== l.toLowerCase() ? [e] : [];
|
|
7983
7992
|
}, [
|
|
7984
7993
|
i,
|
|
7985
7994
|
r,
|
|
7986
7995
|
l
|
|
7987
|
-
]), S = b(l), C = S.state, w =
|
|
7996
|
+
]), S = b(l), C = S.state, w = no[C], T = C === "available", E = g && C !== "idle", D = (e) => {
|
|
7988
7997
|
_(!0), h(e.target.value);
|
|
7989
7998
|
}, O = (e) => {
|
|
7990
7999
|
_(!0), h(e), v.current?.focus();
|
|
@@ -8011,7 +8020,7 @@ function ro({ onSubmit: e, validate: t, initialValue: n = "", suggestedFrom: r =
|
|
|
8011
8020
|
/* @__PURE__ */ m("p", {
|
|
8012
8021
|
className: "si-claim-note",
|
|
8013
8022
|
children: [
|
|
8014
|
-
"your public handle on fairtrade
|
|
8023
|
+
"your public handle on fairtrade, ",
|
|
8015
8024
|
/* @__PURE__ */ p("span", {
|
|
8016
8025
|
className: "si-mono",
|
|
8017
8026
|
children: "/@your-handle"
|
|
@@ -8059,37 +8068,39 @@ function ro({ onSubmit: e, validate: t, initialValue: n = "", suggestedFrom: r =
|
|
|
8059
8068
|
]
|
|
8060
8069
|
})]
|
|
8061
8070
|
}),
|
|
8062
|
-
/* @__PURE__ */
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8071
|
+
/* @__PURE__ */ m("div", {
|
|
8072
|
+
className: "si-help",
|
|
8073
|
+
children: [x.length > 0 && !E && /* @__PURE__ */ m("div", {
|
|
8074
|
+
className: "si-suggest",
|
|
8075
|
+
children: [/* @__PURE__ */ p("span", {
|
|
8076
|
+
className: "si-suggest-label",
|
|
8077
|
+
children: "try"
|
|
8078
|
+
}), x.map((e) => /* @__PURE__ */ m("button", {
|
|
8079
|
+
type: "button",
|
|
8080
|
+
className: "si-chip",
|
|
8081
|
+
onClick: () => O(e),
|
|
8082
|
+
children: ["@", e]
|
|
8083
|
+
}, e))]
|
|
8084
|
+
}), /* @__PURE__ */ p("p", {
|
|
8085
|
+
id: y,
|
|
8086
|
+
className: ["si-status", w ? w.tone : ""].filter(Boolean).join(" "),
|
|
8087
|
+
role: "status",
|
|
8088
|
+
"aria-live": "polite",
|
|
8089
|
+
children: E && w && /* @__PURE__ */ m(f, { children: [
|
|
8090
|
+
/* @__PURE__ */ p(w.Icon, {
|
|
8091
|
+
className: ["si-status-icon", w.spin ? "si-spin" : ""].filter(Boolean).join(" "),
|
|
8092
|
+
"aria-hidden": "true"
|
|
8093
|
+
}),
|
|
8094
|
+
/* @__PURE__ */ p("span", {
|
|
8095
|
+
className: "si-status-word",
|
|
8096
|
+
children: w.word
|
|
8097
|
+
}),
|
|
8098
|
+
S.hint && /* @__PURE__ */ p("span", {
|
|
8099
|
+
className: "si-status-hint",
|
|
8100
|
+
children: S.hint
|
|
8101
|
+
})
|
|
8102
|
+
] })
|
|
8103
|
+
})]
|
|
8093
8104
|
}),
|
|
8094
8105
|
/* @__PURE__ */ p("button", {
|
|
8095
8106
|
type: "submit",
|
|
@@ -8100,7 +8111,7 @@ function ro({ onSubmit: e, validate: t, initialValue: n = "", suggestedFrom: r =
|
|
|
8100
8111
|
]
|
|
8101
8112
|
});
|
|
8102
8113
|
}
|
|
8103
|
-
function
|
|
8114
|
+
function oo({ providers: e, onSignIn: t, onSubmit: n, suggestedFrom: r = "octocat", className: i = "", ...a }) {
|
|
8104
8115
|
return /* @__PURE__ */ m("div", {
|
|
8105
8116
|
className: ["si-onboard", i].filter(Boolean).join(" "),
|
|
8106
8117
|
...a,
|
|
@@ -8109,8 +8120,8 @@ function io({ providers: e, onSignIn: t, onSubmit: n, suggestedFrom: r = "octoca
|
|
|
8109
8120
|
className: "si-onboard-step",
|
|
8110
8121
|
children: [/* @__PURE__ */ p("span", {
|
|
8111
8122
|
className: "si-eyebrow",
|
|
8112
|
-
children: "step 1
|
|
8113
|
-
}), /* @__PURE__ */ p(
|
|
8123
|
+
children: "step 1: sign in"
|
|
8124
|
+
}), /* @__PURE__ */ p($a, {
|
|
8114
8125
|
providers: e,
|
|
8115
8126
|
onSignIn: t
|
|
8116
8127
|
})]
|
|
@@ -8119,7 +8130,7 @@ function io({ providers: e, onSignIn: t, onSubmit: n, suggestedFrom: r = "octoca
|
|
|
8119
8130
|
className: "si-onboard-divider",
|
|
8120
8131
|
"aria-hidden": "true"
|
|
8121
8132
|
}),
|
|
8122
|
-
/* @__PURE__ */ p(
|
|
8133
|
+
/* @__PURE__ */ p(ao, {
|
|
8123
8134
|
onSubmit: n,
|
|
8124
8135
|
suggestedFrom: r
|
|
8125
8136
|
})
|
|
@@ -8128,13 +8139,13 @@ function io({ providers: e, onSignIn: t, onSubmit: n, suggestedFrom: r = "octoca
|
|
|
8128
8139
|
}
|
|
8129
8140
|
//#endregion
|
|
8130
8141
|
//#region src/ui/CliOnboard.jsx
|
|
8131
|
-
async function
|
|
8142
|
+
async function so(e) {
|
|
8132
8143
|
try {
|
|
8133
8144
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
|
|
8134
8145
|
} catch {}
|
|
8135
8146
|
return !1;
|
|
8136
8147
|
}
|
|
8137
|
-
function
|
|
8148
|
+
function co({ command: e, label: t, className: n = "", ...i }) {
|
|
8138
8149
|
let [o, s] = d(!1);
|
|
8139
8150
|
a(() => {
|
|
8140
8151
|
if (!o) return;
|
|
@@ -8142,7 +8153,7 @@ function oo({ command: e, label: t, className: n = "", ...i }) {
|
|
|
8142
8153
|
return () => clearTimeout(e);
|
|
8143
8154
|
}, [o]);
|
|
8144
8155
|
let c = r(async () => {
|
|
8145
|
-
await
|
|
8156
|
+
await so(e) && s(!0);
|
|
8146
8157
|
}, [e]), l = ["cli-cmd", n].filter(Boolean).join(" "), u = t || e;
|
|
8147
8158
|
return /* @__PURE__ */ m("div", {
|
|
8148
8159
|
className: l,
|
|
@@ -8170,7 +8181,7 @@ function oo({ command: e, label: t, className: n = "", ...i }) {
|
|
|
8170
8181
|
})]
|
|
8171
8182
|
});
|
|
8172
8183
|
}
|
|
8173
|
-
function
|
|
8184
|
+
function lo({ steps: e = [], label: t = "getting started", className: n = "", ...r }) {
|
|
8174
8185
|
let i = ["cli-steps", n].filter(Boolean).join(" ");
|
|
8175
8186
|
return e.length === 0 ? /* @__PURE__ */ p("div", {
|
|
8176
8187
|
className: i,
|
|
@@ -8200,13 +8211,13 @@ function so({ steps: e = [], label: t = "getting started", className: n = "", ..
|
|
|
8200
8211
|
className: "cli-step-body",
|
|
8201
8212
|
children: e.body
|
|
8202
8213
|
}),
|
|
8203
|
-
e.command && /* @__PURE__ */ p(
|
|
8214
|
+
e.command && /* @__PURE__ */ p(co, { command: e.command })
|
|
8204
8215
|
]
|
|
8205
8216
|
})]
|
|
8206
8217
|
}, e.title ?? t))
|
|
8207
8218
|
});
|
|
8208
8219
|
}
|
|
8209
|
-
function
|
|
8220
|
+
function uo(e) {
|
|
8210
8221
|
if (typeof window > "u" || !e) return !1;
|
|
8211
8222
|
try {
|
|
8212
8223
|
return window.localStorage.getItem(e) === "true";
|
|
@@ -8214,18 +8225,18 @@ function co(e) {
|
|
|
8214
8225
|
return !1;
|
|
8215
8226
|
}
|
|
8216
8227
|
}
|
|
8217
|
-
function
|
|
8228
|
+
function fo(e) {
|
|
8218
8229
|
if (!(typeof window > "u" || !e)) try {
|
|
8219
8230
|
window.localStorage.setItem(e, "true");
|
|
8220
8231
|
} catch {}
|
|
8221
8232
|
}
|
|
8222
|
-
function
|
|
8233
|
+
function po({ title: e = "getting started", steps: t = [], storageKey: n, onDismiss: i, className: o = "", ...s }) {
|
|
8223
8234
|
let [c, l] = d(!1);
|
|
8224
8235
|
a(() => {
|
|
8225
|
-
|
|
8236
|
+
uo(n) && l(!0);
|
|
8226
8237
|
}, [n]);
|
|
8227
8238
|
let u = r(() => {
|
|
8228
|
-
|
|
8239
|
+
fo(n), l(!0), i?.();
|
|
8229
8240
|
}, [n, i]);
|
|
8230
8241
|
return c ? null : /* @__PURE__ */ m("section", {
|
|
8231
8242
|
className: ["cli-card", o].filter(Boolean).join(" "),
|
|
@@ -8249,7 +8260,7 @@ function uo({ title: e = "getting started", steps: t = [], storageKey: n, onDism
|
|
|
8249
8260
|
})]
|
|
8250
8261
|
}), /* @__PURE__ */ p("div", {
|
|
8251
8262
|
className: "cli-card-body",
|
|
8252
|
-
children: /* @__PURE__ */ p(
|
|
8263
|
+
children: /* @__PURE__ */ p(lo, {
|
|
8253
8264
|
steps: t,
|
|
8254
8265
|
label: e
|
|
8255
8266
|
})
|
|
@@ -8258,7 +8269,7 @@ function uo({ title: e = "getting started", steps: t = [], storageKey: n, onDism
|
|
|
8258
8269
|
}
|
|
8259
8270
|
//#endregion
|
|
8260
8271
|
//#region src/ui/FacetRail.jsx
|
|
8261
|
-
var
|
|
8272
|
+
var mo = [
|
|
8262
8273
|
{
|
|
8263
8274
|
value: "recent",
|
|
8264
8275
|
label: "recent"
|
|
@@ -8272,7 +8283,7 @@ var fo = [
|
|
|
8272
8283
|
label: "most tokens"
|
|
8273
8284
|
}
|
|
8274
8285
|
];
|
|
8275
|
-
function
|
|
8286
|
+
function ho(e) {
|
|
8276
8287
|
return typeof e == "string" ? {
|
|
8277
8288
|
slug: e,
|
|
8278
8289
|
count: void 0
|
|
@@ -8281,7 +8292,7 @@ function po(e) {
|
|
|
8281
8292
|
count: e.count
|
|
8282
8293
|
};
|
|
8283
8294
|
}
|
|
8284
|
-
function
|
|
8295
|
+
function go({ slug: e, count: t, active: n, onToggle: r }) {
|
|
8285
8296
|
return /* @__PURE__ */ m("button", {
|
|
8286
8297
|
type: "button",
|
|
8287
8298
|
className: "fr-provider",
|
|
@@ -8308,7 +8319,7 @@ function mo({ slug: e, count: t, active: n, onToggle: r }) {
|
|
|
8308
8319
|
]
|
|
8309
8320
|
});
|
|
8310
8321
|
}
|
|
8311
|
-
function
|
|
8322
|
+
function _o({ tag: e, count: t, active: n, onToggle: r }) {
|
|
8312
8323
|
return /* @__PURE__ */ m("button", {
|
|
8313
8324
|
type: "button",
|
|
8314
8325
|
className: "fr-topic",
|
|
@@ -8324,8 +8335,8 @@ function ho({ tag: e, count: t, active: n, onToggle: r }) {
|
|
|
8324
8335
|
})]
|
|
8325
8336
|
});
|
|
8326
8337
|
}
|
|
8327
|
-
function
|
|
8328
|
-
let f = o(), h = n.map(
|
|
8338
|
+
function vo({ order: e = "recent", onOrder: t, providers: n = [], activeProviders: r = /* @__PURE__ */ new Set(), onProvider: i, topics: a = [], activeTopics: s = /* @__PURE__ */ new Set(), onTopic: c, onClear: l, className: u = "", ...d }) {
|
|
8339
|
+
let f = o(), h = n.map(ho), _ = r.size + s.size, v = _ > 0;
|
|
8329
8340
|
return /* @__PURE__ */ m("aside", {
|
|
8330
8341
|
className: `fr-rail ${u}`.trim(),
|
|
8331
8342
|
"aria-label": "filters",
|
|
@@ -8340,10 +8351,13 @@ function go({ order: e = "recent", onOrder: t, providers: n = [], activeProvider
|
|
|
8340
8351
|
children: [/* @__PURE__ */ p(g, {
|
|
8341
8352
|
className: "lucide fr-heading-ico",
|
|
8342
8353
|
"aria-hidden": "true"
|
|
8343
|
-
}), "
|
|
8354
|
+
}), /* @__PURE__ */ p("span", {
|
|
8355
|
+
className: "fr-heading-text",
|
|
8356
|
+
children: "order"
|
|
8357
|
+
})]
|
|
8344
8358
|
}), /* @__PURE__ */ p("div", {
|
|
8345
8359
|
className: "fr-orders",
|
|
8346
|
-
children:
|
|
8360
|
+
children: mo.map((n) => {
|
|
8347
8361
|
let r = e === n.value;
|
|
8348
8362
|
return /* @__PURE__ */ m("label", {
|
|
8349
8363
|
className: "fr-order",
|
|
@@ -8372,14 +8386,20 @@ function go({ order: e = "recent", onOrder: t, providers: n = [], activeProvider
|
|
|
8372
8386
|
/* @__PURE__ */ m("section", {
|
|
8373
8387
|
className: "fr-section",
|
|
8374
8388
|
"aria-label": "provider",
|
|
8375
|
-
children: [/* @__PURE__ */
|
|
8389
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
8376
8390
|
className: "fr-heading",
|
|
8377
|
-
children:
|
|
8391
|
+
children: [/* @__PURE__ */ p(ee, {
|
|
8392
|
+
className: "lucide fr-heading-ico",
|
|
8393
|
+
"aria-hidden": "true"
|
|
8394
|
+
}), /* @__PURE__ */ p("span", {
|
|
8395
|
+
className: "fr-heading-text",
|
|
8396
|
+
children: "provider"
|
|
8397
|
+
})]
|
|
8378
8398
|
}), /* @__PURE__ */ p("div", {
|
|
8379
8399
|
className: "fr-providers",
|
|
8380
8400
|
role: "group",
|
|
8381
8401
|
"aria-label": "providers",
|
|
8382
|
-
children: h.map(({ slug: e, count: t }) => /* @__PURE__ */ p(
|
|
8402
|
+
children: h.map(({ slug: e, count: t }) => /* @__PURE__ */ p(go, {
|
|
8383
8403
|
slug: e,
|
|
8384
8404
|
count: t,
|
|
8385
8405
|
active: r.has(e),
|
|
@@ -8390,14 +8410,20 @@ function go({ order: e = "recent", onOrder: t, providers: n = [], activeProvider
|
|
|
8390
8410
|
a.length > 0 && /* @__PURE__ */ m("section", {
|
|
8391
8411
|
className: "fr-section",
|
|
8392
8412
|
"aria-label": "topics",
|
|
8393
|
-
children: [/* @__PURE__ */
|
|
8413
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
8394
8414
|
className: "fr-heading",
|
|
8395
|
-
children:
|
|
8415
|
+
children: [/* @__PURE__ */ p(Ae, {
|
|
8416
|
+
className: "lucide fr-heading-ico",
|
|
8417
|
+
"aria-hidden": "true"
|
|
8418
|
+
}), /* @__PURE__ */ p("span", {
|
|
8419
|
+
className: "fr-heading-text",
|
|
8420
|
+
children: "topics"
|
|
8421
|
+
})]
|
|
8396
8422
|
}), /* @__PURE__ */ p("div", {
|
|
8397
8423
|
className: "fr-topics",
|
|
8398
8424
|
role: "group",
|
|
8399
8425
|
"aria-label": "topics",
|
|
8400
|
-
children: a.map(({ tag: e, count: t }) => /* @__PURE__ */ p(
|
|
8426
|
+
children: a.map(({ tag: e, count: t }) => /* @__PURE__ */ p(_o, {
|
|
8401
8427
|
tag: e,
|
|
8402
8428
|
count: t,
|
|
8403
8429
|
active: s.has(e),
|
|
@@ -8434,14 +8460,14 @@ function go({ order: e = "recent", onOrder: t, providers: n = [], activeProvider
|
|
|
8434
8460
|
}
|
|
8435
8461
|
//#endregion
|
|
8436
8462
|
//#region src/ui/StatTiles.jsx
|
|
8437
|
-
var
|
|
8463
|
+
var yo = new Set([
|
|
8438
8464
|
"amber",
|
|
8439
8465
|
"teal",
|
|
8440
8466
|
"olive",
|
|
8441
8467
|
"clay",
|
|
8442
8468
|
"mauve"
|
|
8443
8469
|
]);
|
|
8444
|
-
function
|
|
8470
|
+
function bo({ label: e, value: t, sub: n, icon: r, className: i = "", ...a }) {
|
|
8445
8471
|
return /* @__PURE__ */ m("div", {
|
|
8446
8472
|
className: ["st-tile", i].filter(Boolean).join(" "),
|
|
8447
8473
|
...a,
|
|
@@ -8464,20 +8490,23 @@ function vo({ label: e, value: t, sub: n, icon: r, className: i = "", ...a }) {
|
|
|
8464
8490
|
]
|
|
8465
8491
|
});
|
|
8466
8492
|
}
|
|
8467
|
-
function
|
|
8493
|
+
function xo({ tiles: e = [], className: t = "", ...n }) {
|
|
8468
8494
|
return /* @__PURE__ */ p("div", {
|
|
8469
|
-
className:
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
value: n,
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8495
|
+
className: "st-grid-wrap",
|
|
8496
|
+
children: /* @__PURE__ */ p("div", {
|
|
8497
|
+
className: ["st-grid", t].filter(Boolean).join(" "),
|
|
8498
|
+
...n,
|
|
8499
|
+
children: e.map(({ key: e, label: t, value: n, sub: r, icon: i }) => /* @__PURE__ */ p(bo, {
|
|
8500
|
+
label: t,
|
|
8501
|
+
value: n,
|
|
8502
|
+
sub: r,
|
|
8503
|
+
icon: i
|
|
8504
|
+
}, e ?? t))
|
|
8505
|
+
})
|
|
8477
8506
|
});
|
|
8478
8507
|
}
|
|
8479
|
-
function
|
|
8480
|
-
let o = r &&
|
|
8508
|
+
function So({ label: e, value: t, icon: n, tone: r, className: i = "", ...a }) {
|
|
8509
|
+
let o = r && yo.has(r) ? r : null;
|
|
8481
8510
|
return /* @__PURE__ */ m("div", {
|
|
8482
8511
|
className: ["st-gov", i].filter(Boolean).join(" "),
|
|
8483
8512
|
...a,
|
|
@@ -8494,7 +8523,7 @@ function bo({ label: e, value: t, icon: n, tone: r, className: i = "", ...a }) {
|
|
|
8494
8523
|
})]
|
|
8495
8524
|
});
|
|
8496
8525
|
}
|
|
8497
|
-
function
|
|
8526
|
+
function Co({ data: e = [], total: t, label: n = "provider distribution", className: r = "", ...i }) {
|
|
8498
8527
|
let a = e.reduce((e, t) => e + (t.value || 0), 0), o = t ?? a, s = ["st-bars", r].filter(Boolean).join(" ");
|
|
8499
8528
|
return e.length === 0 ? /* @__PURE__ */ p("div", {
|
|
8500
8529
|
className: s,
|
|
@@ -8539,28 +8568,28 @@ function xo({ data: e = [], total: t, label: n = "provider distribution", classN
|
|
|
8539
8568
|
}
|
|
8540
8569
|
//#endregion
|
|
8541
8570
|
//#region src/ui/VisibilityControl.jsx
|
|
8542
|
-
var
|
|
8571
|
+
var wo = {
|
|
8543
8572
|
public: {
|
|
8544
|
-
Icon:
|
|
8573
|
+
Icon: te,
|
|
8545
8574
|
word: "public",
|
|
8546
8575
|
noun: "public"
|
|
8547
8576
|
},
|
|
8548
8577
|
private: {
|
|
8549
|
-
Icon:
|
|
8578
|
+
Icon: V,
|
|
8550
8579
|
word: "private",
|
|
8551
8580
|
noun: "private"
|
|
8552
8581
|
},
|
|
8553
8582
|
shared: {
|
|
8554
|
-
Icon:
|
|
8583
|
+
Icon: Fe,
|
|
8555
8584
|
word: "shared",
|
|
8556
8585
|
noun: "shared"
|
|
8557
8586
|
}
|
|
8558
8587
|
};
|
|
8559
|
-
function
|
|
8560
|
-
return e === "shared" ? t ? `shared with: ${t}` : "shared with a group" : e === "public" ? "public
|
|
8588
|
+
function To(e, t) {
|
|
8589
|
+
return e === "shared" ? t ? `shared with: ${t}` : "shared with a group" : e === "public" ? "public: anyone with the link can view" : "private: only you can view";
|
|
8561
8590
|
}
|
|
8562
|
-
function
|
|
8563
|
-
let r = o(), [i, a] = d(!1), s =
|
|
8591
|
+
function Eo({ visibility: e = "private", sharedWith: t, size: n = "md" }) {
|
|
8592
|
+
let r = o(), [i, a] = d(!1), s = wo[e] ?? wo.private, { Icon: c } = s, l = To(e, t), u = () => a(!0), f = () => a(!1);
|
|
8564
8593
|
return /* @__PURE__ */ m("span", {
|
|
8565
8594
|
className: `vc-eye vc-eye-${n}`,
|
|
8566
8595
|
onMouseEnter: u,
|
|
@@ -8590,18 +8619,18 @@ function wo({ visibility: e = "private", sharedWith: t, size: n = "md" }) {
|
|
|
8590
8619
|
]
|
|
8591
8620
|
});
|
|
8592
8621
|
}
|
|
8593
|
-
var
|
|
8622
|
+
var Do = [{
|
|
8594
8623
|
value: "private",
|
|
8595
|
-
Icon:
|
|
8624
|
+
Icon: q,
|
|
8596
8625
|
label: "private",
|
|
8597
8626
|
desc: "Only you can view this."
|
|
8598
8627
|
}, {
|
|
8599
8628
|
value: "public",
|
|
8600
|
-
Icon:
|
|
8629
|
+
Icon: oe,
|
|
8601
8630
|
label: "public",
|
|
8602
8631
|
desc: "Anyone with the link can view."
|
|
8603
8632
|
}];
|
|
8604
|
-
function
|
|
8633
|
+
function Oo({ value: e = "private", onChange: t, sharedNote: n, label: r = "visibility" }) {
|
|
8605
8634
|
let i = o(), a = e === "shared";
|
|
8606
8635
|
return /* @__PURE__ */ m("div", {
|
|
8607
8636
|
className: "vc-seg-wrap",
|
|
@@ -8615,7 +8644,7 @@ function Eo({ value: e = "private", onChange: t, sharedNote: n, label: r = "visi
|
|
|
8615
8644
|
}),
|
|
8616
8645
|
/* @__PURE__ */ p("div", {
|
|
8617
8646
|
className: "vc-seg",
|
|
8618
|
-
children:
|
|
8647
|
+
children: Do.map(({ value: n, Icon: r, label: i, desc: a }) => /* @__PURE__ */ m("button", {
|
|
8619
8648
|
type: "button",
|
|
8620
8649
|
className: "vc-seg-opt",
|
|
8621
8650
|
"aria-pressed": e === n,
|
|
@@ -8637,15 +8666,15 @@ function Eo({ value: e = "private", onChange: t, sharedNote: n, label: r = "visi
|
|
|
8637
8666
|
}),
|
|
8638
8667
|
a && /* @__PURE__ */ m("p", {
|
|
8639
8668
|
className: "vc-seg-note",
|
|
8640
|
-
children: [/* @__PURE__ */ p(
|
|
8669
|
+
children: [/* @__PURE__ */ p(Fe, {
|
|
8641
8670
|
className: "vc-seg-note-icon",
|
|
8642
8671
|
"aria-hidden": "true"
|
|
8643
|
-
}), /* @__PURE__ */ p("span", { children: n || "shared with one or more groups
|
|
8672
|
+
}), /* @__PURE__ */ p("span", { children: n || "shared with one or more groups: choose private or public to override." })]
|
|
8644
8673
|
})
|
|
8645
8674
|
]
|
|
8646
8675
|
});
|
|
8647
8676
|
}
|
|
8648
|
-
var
|
|
8677
|
+
var ko = [
|
|
8649
8678
|
{
|
|
8650
8679
|
value: "task",
|
|
8651
8680
|
label: "task"
|
|
@@ -8659,7 +8688,7 @@ var Do = [
|
|
|
8659
8688
|
label: "change"
|
|
8660
8689
|
}
|
|
8661
8690
|
];
|
|
8662
|
-
function
|
|
8691
|
+
function Ao({ scope: e = "task", onChange: t, options: n = ko, label: r = "scope" }) {
|
|
8663
8692
|
let i = o();
|
|
8664
8693
|
return /* @__PURE__ */ m("div", {
|
|
8665
8694
|
className: "vc-scope",
|
|
@@ -8681,14 +8710,14 @@ function Oo({ scope: e = "task", onChange: t, options: n = Do, label: r = "scope
|
|
|
8681
8710
|
})]
|
|
8682
8711
|
});
|
|
8683
8712
|
}
|
|
8684
|
-
function
|
|
8713
|
+
function jo({ on: e = !1, onToggle: t }) {
|
|
8685
8714
|
return /* @__PURE__ */ m("button", {
|
|
8686
8715
|
type: "button",
|
|
8687
8716
|
className: "vc-focus",
|
|
8688
8717
|
"aria-pressed": e,
|
|
8689
8718
|
onClick: () => t?.(!e),
|
|
8690
8719
|
children: [
|
|
8691
|
-
/* @__PURE__ */ p(
|
|
8720
|
+
/* @__PURE__ */ p(U, {
|
|
8692
8721
|
className: "vc-focus-icon",
|
|
8693
8722
|
"aria-hidden": "true"
|
|
8694
8723
|
}),
|
|
@@ -8704,4 +8733,4 @@ function ko({ on: e = !1, onToggle: t }) {
|
|
|
8704
8733
|
});
|
|
8705
8734
|
}
|
|
8706
8735
|
//#endregion
|
|
8707
|
-
export {
|
|
8736
|
+
export { ea as AccentLegend, pn as Accordion, ai as ApprovalBar, It as Avatar, Lt as AvatarGroup, gt as BrandMark, Et as Breadcrumb, et as Button, tt as ButtonGroup, xt as Card, St as CardImg, un as ChartBar, dn as ChartLine, ct as Checkbox, _a as CheckpointMarker, _t as Chip, lo as CliSteps, co as CommandBlock, $n as CommandPalette, Or as CommitGraph, si as ConfirmInline, Ga as ConnectionPill, ei as ConsentDialog, $r as ConsentSummary, bt as CountBadge, Kn as DATE_PRESETS, li as DangerZone, Ja as DataState, Jt as DataTable, Xn as DateRange, Jn as DateRangeCalendar, Zn as Dialog, Nr as DiffView, Ht as EmptyState, ua as EvidenceCaption, da as EvidenceTarget, Wr as Explainer, vo as FacetRail, qt as FeedbackPanel, rt as Field, vt as FilterChip, jo as FocusedModeToggle, po as GettingStarted, So as GovTile, sa as GroupedMultiSelect, ao as HandleClaim, cr as Heatmap, at as Input, ur as IntensityScope, or as IntensitySwatch, Rt as Kbd, zt as KbdChord, Fi as MapCanvas, lr as MapNode, Mt as Menu, wt as MetaItem, oi as ModerationQueue, oo as OnboardingCard, Yi as PROVIDER_ACCENT, Ot as Pager, At as Pagination, ha as Phase, ma as PhaseDivider, ti as PolicySelect, Ft as Popover, Wt as Progress, Co as ProviderBars, Zi as ProviderIcon, $i as ProviderName, Qi as ProviderTag, lt as Radio, ut as RadioGroup, Ui as RailSection, Hi as RailShell, sr as RampLegend, Xr as RedactionReview, ci as RoleRoster, Ct as Row, Ao as ScopeChip, nt as Segmented, st as Select, $a as SignInProviders, Ut as Skeleton, fn as Sparkline, Gt as Spinner, Gi as SplitRail, xo as StatGrid, bo as StatTile, yt as StatusDot, Pr as StepIndicator, Fr as StepWizard, Dt as Steps, ra as StepsWaterfall, dt as Switch, Tt as Tabs, Bt as Tag, ga as TaskBoundary, Ya as TeachingEmptyState, Gr as Term, ot as Textarea, vn as ThinkingBlock, Vr as TimeStrip, Cn as Timeline, Sn as TimelineItem, Kt as Toast, kn as ToastProvider, xn as ToolCall, Fa as ToolCallRenderer, Nt as Tooltip, Ha as Tour, xr as Treemap, va as TurnContextBar, Eo as VisibilityEye, Oo as VisibilitySegmented, Qr as WhereDoesThisGo, tr as coverageLevel, nr as effortLevel, Vn as formatRange, ir as locSize, ht as resolveBrand, pr as squarify, An as useToast };
|