@chainberry/ui-components 1.0.7 → 1.0.8
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/index.cjs +1 -1
- package/dist/index.d.ts +16 -28
- package/dist/index.mjs +727 -827
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9,27 +9,27 @@ import { HugeiconsIcon as x } from "@hugeicons/react";
|
|
|
9
9
|
import * as S from "@radix-ui/react-checkbox";
|
|
10
10
|
import * as C from "@radix-ui/react-dialog";
|
|
11
11
|
import * as w from "@radix-ui/react-dropdown-menu";
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import { addDays as
|
|
17
|
-
import
|
|
12
|
+
import * as T from "@radix-ui/react-label";
|
|
13
|
+
import * as E from "@radix-ui/react-popover";
|
|
14
|
+
import * as ee from "@radix-ui/react-radio-group";
|
|
15
|
+
import * as D from "@radix-ui/react-tooltip";
|
|
16
|
+
import { addDays as O, addMonths as te, differenceInCalendarDays as ne, eachDayOfInterval as re, endOfMonth as k, endOfWeek as A, format as j, max as M, min as N, parseISO as ie, startOfMonth as ae, startOfWeek as oe, subDays as P, subMonths as F, subWeeks as se } from "date-fns";
|
|
17
|
+
import ce from "qrcode";
|
|
18
18
|
//#region \0rolldown/runtime.js
|
|
19
|
-
var
|
|
19
|
+
var le = Object.defineProperty, I = (e, t) => {
|
|
20
20
|
let n = {};
|
|
21
|
-
for (var r in e)
|
|
21
|
+
for (var r in e) le(n, r, {
|
|
22
22
|
get: e[r],
|
|
23
23
|
enumerable: !0
|
|
24
24
|
});
|
|
25
|
-
return t ||
|
|
25
|
+
return t || le(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
26
26
|
};
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region ../../react-app/src/lib/utils.ts
|
|
29
|
-
function
|
|
29
|
+
function L(...n) {
|
|
30
30
|
return t(e(n));
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var R = "chainberry", z = f("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
33
33
|
variants: {
|
|
34
34
|
variant: {
|
|
35
35
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
@@ -55,12 +55,12 @@ var L = "chainberry", R = f("group/button inline-flex shrink-0 items-center just
|
|
|
55
55
|
size: "default"
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
function
|
|
58
|
+
function B({ className: e, variant: t = "default", size: n = "default", asChild: r = !1, ...i }) {
|
|
59
59
|
return /* @__PURE__ */ _(r ? m.Root : "button", {
|
|
60
60
|
"data-slot": "button",
|
|
61
61
|
"data-variant": t,
|
|
62
62
|
"data-size": n,
|
|
63
|
-
className:
|
|
63
|
+
className: L(z({
|
|
64
64
|
variant: t,
|
|
65
65
|
size: n,
|
|
66
66
|
className: e
|
|
@@ -70,18 +70,18 @@ function z({ className: e, variant: t = "default", size: n = "default", asChild:
|
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region ../../react-app/src/components/ui/action-footer.tsx
|
|
73
|
-
function
|
|
74
|
-
let i = e.filter((e) => e.align === "start"), a = e.filter((e) => (e.align ?? "end") === "end"), o = (e, t) => /* @__PURE__ */ _(
|
|
73
|
+
function ue({ actions: e, bleed: t, className: n, ...r }) {
|
|
74
|
+
let i = e.filter((e) => e.align === "start"), a = e.filter((e) => (e.align ?? "end") === "end"), o = (e, t) => /* @__PURE__ */ _(B, {
|
|
75
75
|
type: e.type ?? "button",
|
|
76
76
|
variant: e.variant ?? "default",
|
|
77
77
|
disabled: e.disabled,
|
|
78
78
|
onClick: e.onClick,
|
|
79
|
-
className:
|
|
79
|
+
className: L("cursor-pointer", e.className),
|
|
80
80
|
children: e.label
|
|
81
81
|
}, e.key ?? t);
|
|
82
82
|
return /* @__PURE__ */ v("div", {
|
|
83
83
|
"data-slot": "action-footer",
|
|
84
|
-
className:
|
|
84
|
+
className: L("flex shrink-0 items-center justify-between gap-2 border-t border-cb-line p-2.5", t === "dialog" && "-mx-6 -mb-6 mt-6 rounded-b-2xl", n),
|
|
85
85
|
...r,
|
|
86
86
|
children: [/* @__PURE__ */ _("div", {
|
|
87
87
|
className: "flex items-center gap-1",
|
|
@@ -94,7 +94,7 @@ function de({ actions: e, bleed: t, className: n, ...r }) {
|
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region ../../react-app/src/components/ui/badge.tsx
|
|
97
|
-
var
|
|
97
|
+
var de = f("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
98
98
|
variants: { variant: {
|
|
99
99
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
100
100
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
@@ -105,17 +105,17 @@ var fe = f("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-cent
|
|
|
105
105
|
} },
|
|
106
106
|
defaultVariants: { variant: "default" }
|
|
107
107
|
});
|
|
108
|
-
function
|
|
108
|
+
function fe({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
|
|
109
109
|
return /* @__PURE__ */ _(n ? m.Root : "span", {
|
|
110
110
|
"data-slot": "badge",
|
|
111
111
|
"data-variant": t,
|
|
112
|
-
className:
|
|
112
|
+
className: L(de({ variant: t }), e),
|
|
113
113
|
...r
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region ../../react-app/node_modules/@hugeicons/core-free-icons/dist/esm/Alert01Icon.js
|
|
118
|
-
var
|
|
118
|
+
var pe = [
|
|
119
119
|
["path", {
|
|
120
120
|
d: "M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z",
|
|
121
121
|
stroke: "currentColor",
|
|
@@ -140,7 +140,7 @@ var me = [
|
|
|
140
140
|
strokeWidth: "1.5",
|
|
141
141
|
key: "2"
|
|
142
142
|
}]
|
|
143
|
-
],
|
|
143
|
+
], me = [
|
|
144
144
|
["path", {
|
|
145
145
|
d: "M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z",
|
|
146
146
|
stroke: "currentColor",
|
|
@@ -165,7 +165,7 @@ var me = [
|
|
|
165
165
|
strokeWidth: "1.5",
|
|
166
166
|
key: "2"
|
|
167
167
|
}]
|
|
168
|
-
],
|
|
168
|
+
], he = [
|
|
169
169
|
["path", {
|
|
170
170
|
d: "M7 17L7 13",
|
|
171
171
|
stroke: "currentColor",
|
|
@@ -194,7 +194,7 @@ var me = [
|
|
|
194
194
|
strokeWidth: "1.5",
|
|
195
195
|
key: "3"
|
|
196
196
|
}]
|
|
197
|
-
],
|
|
197
|
+
], ge = [["path", {
|
|
198
198
|
d: "M19 9H6.65856C5.65277 9 5.14987 9 5.02472 8.69134C4.89957 8.38268 5.25517 8.01942 5.96637 7.29289L8.21091 5",
|
|
199
199
|
stroke: "currentColor",
|
|
200
200
|
strokeLinecap: "round",
|
|
@@ -208,7 +208,7 @@ var me = [
|
|
|
208
208
|
strokeLinejoin: "round",
|
|
209
209
|
strokeWidth: "1.5",
|
|
210
210
|
key: "1"
|
|
211
|
-
}]],
|
|
211
|
+
}]], _e = [["path", {
|
|
212
212
|
d: "M15 19L15 6.65856C15 5.65277 15 5.14987 15.3087 5.02472C15.6173 4.89956 15.9806 5.25517 16.7071 5.96637L19 8.21091",
|
|
213
213
|
stroke: "currentColor",
|
|
214
214
|
strokeLinecap: "round",
|
|
@@ -222,14 +222,14 @@ var me = [
|
|
|
222
222
|
strokeLinejoin: "round",
|
|
223
223
|
strokeWidth: "1.5",
|
|
224
224
|
key: "1"
|
|
225
|
-
}]],
|
|
225
|
+
}]], ve = [["path", {
|
|
226
226
|
d: "M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",
|
|
227
227
|
stroke: "currentColor",
|
|
228
228
|
strokeLinecap: "round",
|
|
229
229
|
strokeLinejoin: "round",
|
|
230
230
|
strokeWidth: "1.5",
|
|
231
231
|
key: "0"
|
|
232
|
-
}]],
|
|
232
|
+
}]], ye = [
|
|
233
233
|
["path", {
|
|
234
234
|
d: "M12 16V3",
|
|
235
235
|
stroke: "currentColor",
|
|
@@ -253,14 +253,14 @@ var me = [
|
|
|
253
253
|
strokeWidth: "1.5",
|
|
254
254
|
key: "2"
|
|
255
255
|
}]
|
|
256
|
-
],
|
|
256
|
+
], be = [["path", {
|
|
257
257
|
d: "M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",
|
|
258
258
|
stroke: "currentColor",
|
|
259
259
|
strokeLinecap: "round",
|
|
260
260
|
strokeLinejoin: "round",
|
|
261
261
|
strokeWidth: "1.5",
|
|
262
262
|
key: "0"
|
|
263
|
-
}]],
|
|
263
|
+
}]], xe = [
|
|
264
264
|
["path", {
|
|
265
265
|
d: "M19.9999 17L3.99994 17",
|
|
266
266
|
stroke: "currentColor",
|
|
@@ -1434,17 +1434,17 @@ function bt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
1434
1434
|
let i = b();
|
|
1435
1435
|
return /* @__PURE__ */ _(y, {
|
|
1436
1436
|
showOutsideDays: n,
|
|
1437
|
-
className:
|
|
1437
|
+
className: L("p-2", e),
|
|
1438
1438
|
classNames: {
|
|
1439
|
-
root:
|
|
1439
|
+
root: L("w-fit", i.root),
|
|
1440
1440
|
months: "relative flex flex-col gap-2",
|
|
1441
1441
|
month: "flex w-full flex-col gap-2",
|
|
1442
1442
|
nav: "absolute inset-x-0 top-0 flex items-center justify-between",
|
|
1443
|
-
button_previous:
|
|
1443
|
+
button_previous: L(z({
|
|
1444
1444
|
variant: "ghost",
|
|
1445
1445
|
size: "icon-xs"
|
|
1446
1446
|
}), "cursor-pointer text-muted-foreground"),
|
|
1447
|
-
button_next:
|
|
1447
|
+
button_next: L(z({
|
|
1448
1448
|
variant: "ghost",
|
|
1449
1449
|
size: "icon-xs"
|
|
1450
1450
|
}), "cursor-pointer text-muted-foreground"),
|
|
@@ -1455,7 +1455,7 @@ function bt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
1455
1455
|
weekday: "flex-1 text-[0.7rem] font-normal text-muted-foreground",
|
|
1456
1456
|
week: "mt-0.5 flex w-full",
|
|
1457
1457
|
day: "relative flex-1 p-0 text-center text-xs",
|
|
1458
|
-
day_button:
|
|
1458
|
+
day_button: L(z({
|
|
1459
1459
|
variant: "ghost",
|
|
1460
1460
|
size: "icon-xs"
|
|
1461
1461
|
}), "mx-auto size-7 cursor-pointer rounded-md text-xs font-normal"),
|
|
@@ -1470,7 +1470,7 @@ function bt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
1470
1470
|
...t
|
|
1471
1471
|
},
|
|
1472
1472
|
components: { Chevron: ({ orientation: e }) => /* @__PURE__ */ _(x, {
|
|
1473
|
-
icon: e === "left" ?
|
|
1473
|
+
icon: e === "left" ? be : Ce,
|
|
1474
1474
|
size: 16,
|
|
1475
1475
|
strokeWidth: 2
|
|
1476
1476
|
}) },
|
|
@@ -1482,7 +1482,7 @@ function bt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
1482
1482
|
function xt({ className: e, ...t }) {
|
|
1483
1483
|
return /* @__PURE__ */ _(S.Root, {
|
|
1484
1484
|
"data-slot": "checkbox",
|
|
1485
|
-
className:
|
|
1485
|
+
className: L("peer size-4 shrink-0 rounded-[5px] border border-slate-300 bg-background shadow-xs outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-primary/30", "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", "disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
1486
1486
|
...t,
|
|
1487
1487
|
children: /* @__PURE__ */ _(S.Indicator, {
|
|
1488
1488
|
className: "flex items-center justify-center text-current",
|
|
@@ -1517,16 +1517,16 @@ function wt(e) {
|
|
|
1517
1517
|
function Tt({ className: e, ...t }) {
|
|
1518
1518
|
return /* @__PURE__ */ _(C.Overlay, {
|
|
1519
1519
|
"data-slot": "dialog-overlay",
|
|
1520
|
-
className:
|
|
1520
|
+
className: L("fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
|
|
1521
1521
|
...t
|
|
1522
1522
|
});
|
|
1523
1523
|
}
|
|
1524
1524
|
function Et({ className: e, children: t, showClose: n = !0, ...r }) {
|
|
1525
1525
|
return /* @__PURE__ */ _(C.Portal, { children: /* @__PURE__ */ v("div", {
|
|
1526
|
-
className:
|
|
1526
|
+
className: R,
|
|
1527
1527
|
children: [/* @__PURE__ */ _(Tt, {}), /* @__PURE__ */ v(C.Content, {
|
|
1528
1528
|
"data-slot": "dialog-content",
|
|
1529
|
-
className:
|
|
1529
|
+
className: L("fixed top-1/2 left-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2", "rounded-2xl border border-cb-line bg-background p-6 shadow-xl", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", e),
|
|
1530
1530
|
...r,
|
|
1531
1531
|
children: [t, n && /* @__PURE__ */ v(C.Close, {
|
|
1532
1532
|
className: "absolute top-5 right-5 cursor-pointer rounded-md p-1 text-cb-muted opacity-80 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:outline-none",
|
|
@@ -1545,28 +1545,28 @@ function Et({ className: e, children: t, showClose: n = !0, ...r }) {
|
|
|
1545
1545
|
function Dt({ className: e, ...t }) {
|
|
1546
1546
|
return /* @__PURE__ */ _("div", {
|
|
1547
1547
|
"data-slot": "dialog-header",
|
|
1548
|
-
className:
|
|
1548
|
+
className: L("flex flex-col gap-1", e),
|
|
1549
1549
|
...t
|
|
1550
1550
|
});
|
|
1551
1551
|
}
|
|
1552
1552
|
function Ot({ className: e, ...t }) {
|
|
1553
1553
|
return /* @__PURE__ */ _("div", {
|
|
1554
1554
|
"data-slot": "dialog-footer",
|
|
1555
|
-
className:
|
|
1555
|
+
className: L("mt-6 flex items-center gap-2", e),
|
|
1556
1556
|
...t
|
|
1557
1557
|
});
|
|
1558
1558
|
}
|
|
1559
1559
|
function kt({ className: e, ...t }) {
|
|
1560
1560
|
return /* @__PURE__ */ _(C.Title, {
|
|
1561
1561
|
"data-slot": "dialog-title",
|
|
1562
|
-
className:
|
|
1562
|
+
className: L("text-xl font-semibold text-foreground", e),
|
|
1563
1563
|
...t
|
|
1564
1564
|
});
|
|
1565
1565
|
}
|
|
1566
1566
|
function At({ className: e, ...t }) {
|
|
1567
1567
|
return /* @__PURE__ */ _(C.Description, {
|
|
1568
1568
|
"data-slot": "dialog-description",
|
|
1569
|
-
className:
|
|
1569
|
+
className: L("text-sm text-muted-foreground", e),
|
|
1570
1570
|
...t
|
|
1571
1571
|
});
|
|
1572
1572
|
}
|
|
@@ -1578,7 +1578,7 @@ function jt({ open: e, onOpenChange: t, title: n, description: r, confirmLabel:
|
|
|
1578
1578
|
onOpenChange: t,
|
|
1579
1579
|
children: /* @__PURE__ */ v(Et, {
|
|
1580
1580
|
className: "max-w-sm",
|
|
1581
|
-
children: [/* @__PURE__ */ v(Dt, { children: [/* @__PURE__ */ _(kt, { children: n }), r && /* @__PURE__ */ _(At, { children: r })] }), /* @__PURE__ */ _(
|
|
1581
|
+
children: [/* @__PURE__ */ v(Dt, { children: [/* @__PURE__ */ _(kt, { children: n }), r && /* @__PURE__ */ _(At, { children: r })] }), /* @__PURE__ */ _(ue, {
|
|
1582
1582
|
bleed: "dialog",
|
|
1583
1583
|
actions: [{
|
|
1584
1584
|
key: "cancel",
|
|
@@ -1619,11 +1619,11 @@ function Pt(e) {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
function Ft({ className: e, sideOffset: t = 6, ...n }) {
|
|
1621
1621
|
return /* @__PURE__ */ _(w.Portal, { children: /* @__PURE__ */ _("div", {
|
|
1622
|
-
className:
|
|
1622
|
+
className: R,
|
|
1623
1623
|
children: /* @__PURE__ */ _(w.Content, {
|
|
1624
1624
|
"data-slot": "dropdown-menu-content",
|
|
1625
1625
|
sideOffset: t,
|
|
1626
|
-
className:
|
|
1626
|
+
className: L("z-50 min-w-[13rem] overflow-hidden rounded-xl border border-cb-line bg-popover p-1 text-popover-foreground shadow-lg", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2", e),
|
|
1627
1627
|
...n
|
|
1628
1628
|
})
|
|
1629
1629
|
}) });
|
|
@@ -1632,7 +1632,7 @@ function It({ className: e, inset: t, ...n }) {
|
|
|
1632
1632
|
return /* @__PURE__ */ _(w.Item, {
|
|
1633
1633
|
"data-slot": "dropdown-menu-item",
|
|
1634
1634
|
"data-inset": t,
|
|
1635
|
-
className:
|
|
1635
|
+
className: L("relative flex cursor-pointer select-none items-center gap-2 rounded-lg px-2 py-1.5 text-[13px] text-cb-text outline-none transition-colors", "focus:bg-cb-seg focus:text-cb-ink2 data-[inset]:pl-8", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0", e),
|
|
1636
1636
|
...n
|
|
1637
1637
|
});
|
|
1638
1638
|
}
|
|
@@ -1640,7 +1640,7 @@ function Lt({ className: e, children: t, checked: n, ...r }) {
|
|
|
1640
1640
|
return /* @__PURE__ */ v(w.CheckboxItem, {
|
|
1641
1641
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
1642
1642
|
checked: n,
|
|
1643
|
-
className:
|
|
1643
|
+
className: L("relative flex cursor-pointer select-none items-center rounded-lg py-1.5 pr-2 pl-8 text-[13px] text-cb-text outline-none transition-colors", "focus:bg-cb-seg focus:text-cb-ink2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", e),
|
|
1644
1644
|
...r,
|
|
1645
1645
|
children: [/* @__PURE__ */ _("span", {
|
|
1646
1646
|
className: "pointer-events-none absolute left-2.5 flex size-4 items-center justify-center",
|
|
@@ -1656,14 +1656,14 @@ function Lt({ className: e, children: t, checked: n, ...r }) {
|
|
|
1656
1656
|
function Rt({ className: e, ...t }) {
|
|
1657
1657
|
return /* @__PURE__ */ _(w.Separator, {
|
|
1658
1658
|
"data-slot": "dropdown-menu-separator",
|
|
1659
|
-
className:
|
|
1659
|
+
className: L("-mx-1 my-1 h-px bg-cb-line", e),
|
|
1660
1660
|
...t
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
1663
|
function zt({ className: e, ...t }) {
|
|
1664
1664
|
return /* @__PURE__ */ _(w.Label, {
|
|
1665
1665
|
"data-slot": "dropdown-menu-label",
|
|
1666
|
-
className:
|
|
1666
|
+
className: L("px-2.5 py-1.5 text-xs font-medium text-cb-muted", e),
|
|
1667
1667
|
...t
|
|
1668
1668
|
});
|
|
1669
1669
|
}
|
|
@@ -1676,7 +1676,7 @@ function Bt(e) {
|
|
|
1676
1676
|
function Vt({ className: e, children: t, ...n }) {
|
|
1677
1677
|
return /* @__PURE__ */ v(w.SubTrigger, {
|
|
1678
1678
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
1679
|
-
className:
|
|
1679
|
+
className: L("relative flex cursor-pointer select-none items-center gap-2 rounded-lg px-2 py-1.5 text-[13px] text-cb-text outline-none transition-colors", "focus:bg-cb-seg focus:text-cb-ink2 data-[state=open]:bg-cb-seg data-[state=open]:text-cb-ink2", "[&_svg]:pointer-events-none [&_svg]:shrink-0", e),
|
|
1680
1680
|
...n,
|
|
1681
1681
|
children: [t, /* @__PURE__ */ _(x, {
|
|
1682
1682
|
icon: Ce,
|
|
@@ -1688,10 +1688,10 @@ function Vt({ className: e, children: t, ...n }) {
|
|
|
1688
1688
|
}
|
|
1689
1689
|
function Ht({ className: e, ...t }) {
|
|
1690
1690
|
return /* @__PURE__ */ _(w.Portal, { children: /* @__PURE__ */ _("div", {
|
|
1691
|
-
className:
|
|
1691
|
+
className: R,
|
|
1692
1692
|
children: /* @__PURE__ */ _(w.SubContent, {
|
|
1693
1693
|
"data-slot": "dropdown-menu-sub-content",
|
|
1694
|
-
className:
|
|
1694
|
+
className: L("z-50 min-w-[10rem] overflow-hidden rounded-xl border border-cb-line bg-popover p-1 text-popover-foreground shadow-lg", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", e),
|
|
1695
1695
|
...t
|
|
1696
1696
|
})
|
|
1697
1697
|
}) });
|
|
@@ -1705,7 +1705,7 @@ function Ut(e) {
|
|
|
1705
1705
|
function V({ className: e, children: t, ...n }) {
|
|
1706
1706
|
return /* @__PURE__ */ v(w.RadioItem, {
|
|
1707
1707
|
"data-slot": "dropdown-menu-radio-item",
|
|
1708
|
-
className:
|
|
1708
|
+
className: L("relative flex cursor-pointer select-none items-center rounded-lg py-1.5 pr-2 pl-8 text-[13px] text-cb-text outline-none transition-colors", "focus:bg-cb-seg focus:text-cb-ink2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", e),
|
|
1709
1709
|
...n,
|
|
1710
1710
|
children: [/* @__PURE__ */ _("span", {
|
|
1711
1711
|
className: "pointer-events-none absolute left-2.5 flex size-4 items-center justify-center",
|
|
@@ -1724,16 +1724,16 @@ function Wt({ className: e, type: t, ...n }) {
|
|
|
1724
1724
|
return /* @__PURE__ */ _("input", {
|
|
1725
1725
|
type: t,
|
|
1726
1726
|
"data-slot": "input",
|
|
1727
|
-
className:
|
|
1727
|
+
className: L("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", e),
|
|
1728
1728
|
...n
|
|
1729
1729
|
});
|
|
1730
1730
|
}
|
|
1731
1731
|
//#endregion
|
|
1732
1732
|
//#region ../../react-app/src/components/ui/label.tsx
|
|
1733
1733
|
function Gt({ className: e, ...t }) {
|
|
1734
|
-
return /* @__PURE__ */ _(
|
|
1734
|
+
return /* @__PURE__ */ _(T.Root, {
|
|
1735
1735
|
"data-slot": "label",
|
|
1736
|
-
className:
|
|
1736
|
+
className: L("flex items-center gap-2 text-sm text-foreground select-none", "peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
1737
1737
|
...t
|
|
1738
1738
|
});
|
|
1739
1739
|
}
|
|
@@ -1744,14 +1744,14 @@ function Kt({ className: e, ...t }) {
|
|
|
1744
1744
|
role: "navigation",
|
|
1745
1745
|
"aria-label": "pagination",
|
|
1746
1746
|
"data-slot": "pagination",
|
|
1747
|
-
className:
|
|
1747
|
+
className: L("flex w-fit items-center", e),
|
|
1748
1748
|
...t
|
|
1749
1749
|
});
|
|
1750
1750
|
}
|
|
1751
1751
|
function qt({ className: e, ...t }) {
|
|
1752
1752
|
return /* @__PURE__ */ _("ul", {
|
|
1753
1753
|
"data-slot": "pagination-content",
|
|
1754
|
-
className:
|
|
1754
|
+
className: L("flex items-center gap-1", e),
|
|
1755
1755
|
...t
|
|
1756
1756
|
});
|
|
1757
1757
|
}
|
|
@@ -1767,7 +1767,7 @@ function Yt({ className: e, isActive: t, size: n = "icon", ...r }) {
|
|
|
1767
1767
|
"aria-current": t ? "page" : void 0,
|
|
1768
1768
|
"data-slot": "pagination-link",
|
|
1769
1769
|
"data-active": t,
|
|
1770
|
-
className:
|
|
1770
|
+
className: L(z({
|
|
1771
1771
|
variant: t ? "outline" : "ghost",
|
|
1772
1772
|
size: n
|
|
1773
1773
|
}), "cursor-pointer", e),
|
|
@@ -1778,10 +1778,10 @@ function Xt({ className: e, ...t }) {
|
|
|
1778
1778
|
return /* @__PURE__ */ v(Yt, {
|
|
1779
1779
|
"aria-label": "Go to previous page",
|
|
1780
1780
|
size: "default",
|
|
1781
|
-
className:
|
|
1781
|
+
className: L("gap-1 px-2.5", e),
|
|
1782
1782
|
...t,
|
|
1783
1783
|
children: [/* @__PURE__ */ _(x, {
|
|
1784
|
-
icon:
|
|
1784
|
+
icon: be,
|
|
1785
1785
|
size: 16,
|
|
1786
1786
|
strokeWidth: 2
|
|
1787
1787
|
}), /* @__PURE__ */ _("span", { children: "Previous" })]
|
|
@@ -1791,7 +1791,7 @@ function Zt({ className: e, ...t }) {
|
|
|
1791
1791
|
return /* @__PURE__ */ v(Yt, {
|
|
1792
1792
|
"aria-label": "Go to next page",
|
|
1793
1793
|
size: "default",
|
|
1794
|
-
className:
|
|
1794
|
+
className: L("gap-1 px-2.5", e),
|
|
1795
1795
|
...t,
|
|
1796
1796
|
children: [/* @__PURE__ */ _("span", { children: "Next" }), /* @__PURE__ */ _(x, {
|
|
1797
1797
|
icon: Ce,
|
|
@@ -1804,7 +1804,7 @@ function Qt({ className: e, ...t }) {
|
|
|
1804
1804
|
return /* @__PURE__ */ _("span", {
|
|
1805
1805
|
"aria-hidden": !0,
|
|
1806
1806
|
"data-slot": "pagination-ellipsis",
|
|
1807
|
-
className:
|
|
1807
|
+
className: L("flex size-8 items-center justify-center text-muted-foreground", e),
|
|
1808
1808
|
...t,
|
|
1809
1809
|
children: /* @__PURE__ */ _(x, {
|
|
1810
1810
|
icon: $e,
|
|
@@ -1816,31 +1816,31 @@ function Qt({ className: e, ...t }) {
|
|
|
1816
1816
|
//#endregion
|
|
1817
1817
|
//#region ../../react-app/src/components/ui/popover.tsx
|
|
1818
1818
|
function $t(e) {
|
|
1819
|
-
return /* @__PURE__ */ _(
|
|
1819
|
+
return /* @__PURE__ */ _(E.Root, {
|
|
1820
1820
|
"data-slot": "popover",
|
|
1821
1821
|
...e
|
|
1822
1822
|
});
|
|
1823
1823
|
}
|
|
1824
1824
|
function en(e) {
|
|
1825
|
-
return /* @__PURE__ */ _(
|
|
1825
|
+
return /* @__PURE__ */ _(E.Trigger, {
|
|
1826
1826
|
"data-slot": "popover-trigger",
|
|
1827
1827
|
...e
|
|
1828
1828
|
});
|
|
1829
1829
|
}
|
|
1830
1830
|
function tn(e) {
|
|
1831
|
-
return /* @__PURE__ */ _(
|
|
1831
|
+
return /* @__PURE__ */ _(E.Anchor, {
|
|
1832
1832
|
"data-slot": "popover-anchor",
|
|
1833
1833
|
...e
|
|
1834
1834
|
});
|
|
1835
1835
|
}
|
|
1836
1836
|
function nn({ className: e, align: t = "center", sideOffset: n = 8, ...r }) {
|
|
1837
|
-
return /* @__PURE__ */ _(
|
|
1838
|
-
className:
|
|
1839
|
-
children: /* @__PURE__ */ _(
|
|
1837
|
+
return /* @__PURE__ */ _(E.Portal, { children: /* @__PURE__ */ _("div", {
|
|
1838
|
+
className: R,
|
|
1839
|
+
children: /* @__PURE__ */ _(E.Content, {
|
|
1840
1840
|
"data-slot": "popover-content",
|
|
1841
1841
|
align: t,
|
|
1842
1842
|
sideOffset: n,
|
|
1843
|
-
className:
|
|
1843
|
+
className: L("z-50 overflow-hidden rounded-xl border border-cb-line bg-popover text-popover-foreground shadow-lg outline-none", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2", e),
|
|
1844
1844
|
...r
|
|
1845
1845
|
})
|
|
1846
1846
|
}) });
|
|
@@ -1848,18 +1848,18 @@ function nn({ className: e, align: t = "center", sideOffset: n = 8, ...r }) {
|
|
|
1848
1848
|
//#endregion
|
|
1849
1849
|
//#region ../../react-app/src/components/ui/radio-group.tsx
|
|
1850
1850
|
function rn({ className: e, ...t }) {
|
|
1851
|
-
return /* @__PURE__ */ _(
|
|
1851
|
+
return /* @__PURE__ */ _(ee.Root, {
|
|
1852
1852
|
"data-slot": "radio-group",
|
|
1853
|
-
className:
|
|
1853
|
+
className: L("grid gap-2", e),
|
|
1854
1854
|
...t
|
|
1855
1855
|
});
|
|
1856
1856
|
}
|
|
1857
1857
|
function an({ className: e, ...t }) {
|
|
1858
|
-
return /* @__PURE__ */ _(
|
|
1858
|
+
return /* @__PURE__ */ _(ee.Item, {
|
|
1859
1859
|
"data-slot": "radio-group-item",
|
|
1860
|
-
className:
|
|
1860
|
+
className: L("aspect-square size-4 shrink-0 rounded-full border border-slate-300 bg-background shadow-xs outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-primary/30 data-[state=checked]:border-primary", "disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
1861
1861
|
...t,
|
|
1862
|
-
children: /* @__PURE__ */ _(
|
|
1862
|
+
children: /* @__PURE__ */ _(ee.Indicator, {
|
|
1863
1863
|
className: "flex items-center justify-center",
|
|
1864
1864
|
children: /* @__PURE__ */ _("span", { className: "size-2 rounded-full bg-primary" })
|
|
1865
1865
|
})
|
|
@@ -1916,12 +1916,12 @@ function sn({ children: e, className: t, viewportClassName: n, ...r }) {
|
|
|
1916
1916
|
p.current = null, e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
1917
1917
|
};
|
|
1918
1918
|
return /* @__PURE__ */ v("div", {
|
|
1919
|
-
className:
|
|
1919
|
+
className: L("relative", t),
|
|
1920
1920
|
...r,
|
|
1921
1921
|
children: [/* @__PURE__ */ _("div", {
|
|
1922
1922
|
ref: a,
|
|
1923
1923
|
onScroll: f,
|
|
1924
|
-
className:
|
|
1924
|
+
className: L("h-full overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", n),
|
|
1925
1925
|
children: e
|
|
1926
1926
|
}), s.visible && /* @__PURE__ */ _("div", {
|
|
1927
1927
|
className: "pointer-events-none absolute inset-y-0 right-[3px] w-1",
|
|
@@ -1945,7 +1945,7 @@ function cn({ className: e, orientation: t = "horizontal", decorative: n = !0, .
|
|
|
1945
1945
|
"data-slot": "separator",
|
|
1946
1946
|
decorative: n,
|
|
1947
1947
|
orientation: t,
|
|
1948
|
-
className:
|
|
1948
|
+
className: L("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", e),
|
|
1949
1949
|
...r
|
|
1950
1950
|
});
|
|
1951
1951
|
}
|
|
@@ -1972,16 +1972,16 @@ function dn(e) {
|
|
|
1972
1972
|
function fn({ className: e, ...t }) {
|
|
1973
1973
|
return /* @__PURE__ */ _(C.Overlay, {
|
|
1974
1974
|
"data-slot": "side-panel-overlay",
|
|
1975
|
-
className:
|
|
1975
|
+
className: L("fixed inset-0 z-50 bg-black/30 backdrop-blur-[1px]", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
|
|
1976
1976
|
...t
|
|
1977
1977
|
});
|
|
1978
1978
|
}
|
|
1979
1979
|
function pn({ className: e, children: t, side: n = "right", showClose: r = !0, ...i }) {
|
|
1980
1980
|
return /* @__PURE__ */ _(C.Portal, { children: /* @__PURE__ */ v("div", {
|
|
1981
|
-
className:
|
|
1981
|
+
className: R,
|
|
1982
1982
|
children: [/* @__PURE__ */ _(fn, {}), /* @__PURE__ */ v(C.Content, {
|
|
1983
1983
|
"data-slot": "side-panel-content",
|
|
1984
|
-
className:
|
|
1984
|
+
className: L("fixed z-50 flex h-full w-full max-w-md flex-col overflow-hidden bg-background shadow-xl transition ease-in-out", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-300", n === "right" && "inset-y-0 right-0 rounded-l-2xl border-l border-cb-line data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right", n === "left" && "inset-y-0 left-0 rounded-r-2xl border-r border-cb-line data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left", e),
|
|
1985
1985
|
...i,
|
|
1986
1986
|
children: [t, r && /* @__PURE__ */ v(C.Close, {
|
|
1987
1987
|
className: "absolute top-5 right-5 cursor-pointer rounded-md p-1 text-cb-muted opacity-80 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:outline-none",
|
|
@@ -2000,7 +2000,7 @@ function pn({ className: e, children: t, side: n = "right", showClose: r = !0, .
|
|
|
2000
2000
|
function mn({ className: e, children: t, ...n }) {
|
|
2001
2001
|
return /* @__PURE__ */ v("div", {
|
|
2002
2002
|
"data-slot": "side-panel-header",
|
|
2003
|
-
className:
|
|
2003
|
+
className: L("relative shrink-0 px-6 py-5", e),
|
|
2004
2004
|
...n,
|
|
2005
2005
|
children: [t, /* @__PURE__ */ _("div", {
|
|
2006
2006
|
"aria-hidden": !0,
|
|
@@ -2011,41 +2011,41 @@ function mn({ className: e, children: t, ...n }) {
|
|
|
2011
2011
|
function hn({ className: e, ...t }) {
|
|
2012
2012
|
return /* @__PURE__ */ _("div", {
|
|
2013
2013
|
"data-slot": "side-panel-body",
|
|
2014
|
-
className:
|
|
2014
|
+
className: L("min-h-0 flex-1 overflow-y-auto px-6 py-5", e),
|
|
2015
2015
|
...t
|
|
2016
2016
|
});
|
|
2017
2017
|
}
|
|
2018
2018
|
function gn({ className: e, ...t }) {
|
|
2019
2019
|
return /* @__PURE__ */ _("div", {
|
|
2020
2020
|
"data-slot": "side-panel-footer",
|
|
2021
|
-
className:
|
|
2021
|
+
className: L("shrink-0 border-t border-cb-line px-6 py-4", e),
|
|
2022
2022
|
...t
|
|
2023
2023
|
});
|
|
2024
2024
|
}
|
|
2025
2025
|
function _n({ className: e, ...t }) {
|
|
2026
2026
|
return /* @__PURE__ */ _(C.Title, {
|
|
2027
2027
|
"data-slot": "side-panel-title",
|
|
2028
|
-
className:
|
|
2028
|
+
className: L("text-lg font-semibold text-foreground", e),
|
|
2029
2029
|
...t
|
|
2030
2030
|
});
|
|
2031
2031
|
}
|
|
2032
2032
|
function vn({ className: e, ...t }) {
|
|
2033
2033
|
return /* @__PURE__ */ _(C.Description, {
|
|
2034
2034
|
"data-slot": "side-panel-description",
|
|
2035
|
-
className:
|
|
2035
|
+
className: L("mt-0.5 text-sm text-muted-foreground", e),
|
|
2036
2036
|
...t
|
|
2037
2037
|
});
|
|
2038
2038
|
}
|
|
2039
2039
|
function yn({ className: e, ...t }) {
|
|
2040
2040
|
return /* @__PURE__ */ _(cn, {
|
|
2041
|
-
className:
|
|
2041
|
+
className: L("my-5 bg-cb-line", e),
|
|
2042
2042
|
...t
|
|
2043
2043
|
});
|
|
2044
2044
|
}
|
|
2045
2045
|
function bn({ className: e, ...t }) {
|
|
2046
2046
|
return /* @__PURE__ */ _("h3", {
|
|
2047
2047
|
"data-slot": "side-panel-section-title",
|
|
2048
|
-
className:
|
|
2048
|
+
className: L("mb-2.5 text-base font-semibold text-foreground", e),
|
|
2049
2049
|
...t
|
|
2050
2050
|
});
|
|
2051
2051
|
}
|
|
@@ -2054,7 +2054,7 @@ function bn({ className: e, ...t }) {
|
|
|
2054
2054
|
function H({ className: e, ...t }) {
|
|
2055
2055
|
return /* @__PURE__ */ _("div", {
|
|
2056
2056
|
"data-slot": "skeleton",
|
|
2057
|
-
className:
|
|
2057
|
+
className: L("animate-pulse rounded-md bg-slate-200/70 dark:bg-slate-700/40", e),
|
|
2058
2058
|
...t
|
|
2059
2059
|
});
|
|
2060
2060
|
}
|
|
@@ -2063,10 +2063,10 @@ function H({ className: e, ...t }) {
|
|
|
2063
2063
|
function xn({ className: e, containerClassName: t, ...n }) {
|
|
2064
2064
|
return /* @__PURE__ */ _("div", {
|
|
2065
2065
|
"data-slot": "table-container",
|
|
2066
|
-
className:
|
|
2066
|
+
className: L("relative w-full overflow-x-auto", t),
|
|
2067
2067
|
children: /* @__PURE__ */ _("table", {
|
|
2068
2068
|
"data-slot": "table",
|
|
2069
|
-
className:
|
|
2069
|
+
className: L("w-full caption-bottom text-sm", e),
|
|
2070
2070
|
...n
|
|
2071
2071
|
})
|
|
2072
2072
|
});
|
|
@@ -2074,49 +2074,49 @@ function xn({ className: e, containerClassName: t, ...n }) {
|
|
|
2074
2074
|
function Sn({ className: e, ...t }) {
|
|
2075
2075
|
return /* @__PURE__ */ _("thead", {
|
|
2076
2076
|
"data-slot": "table-header",
|
|
2077
|
-
className:
|
|
2077
|
+
className: L("[&_tr]:border-b", e),
|
|
2078
2078
|
...t
|
|
2079
2079
|
});
|
|
2080
2080
|
}
|
|
2081
2081
|
function Cn({ className: e, ...t }) {
|
|
2082
2082
|
return /* @__PURE__ */ _("tbody", {
|
|
2083
2083
|
"data-slot": "table-body",
|
|
2084
|
-
className:
|
|
2084
|
+
className: L("[&_tr:last-child]:border-0", e),
|
|
2085
2085
|
...t
|
|
2086
2086
|
});
|
|
2087
2087
|
}
|
|
2088
2088
|
function wn({ className: e, ...t }) {
|
|
2089
2089
|
return /* @__PURE__ */ _("tfoot", {
|
|
2090
2090
|
"data-slot": "table-footer",
|
|
2091
|
-
className:
|
|
2091
|
+
className: L("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", e),
|
|
2092
2092
|
...t
|
|
2093
2093
|
});
|
|
2094
2094
|
}
|
|
2095
2095
|
function Tn({ className: e, ...t }) {
|
|
2096
2096
|
return /* @__PURE__ */ _("tr", {
|
|
2097
2097
|
"data-slot": "table-row",
|
|
2098
|
-
className:
|
|
2098
|
+
className: L("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", e),
|
|
2099
2099
|
...t
|
|
2100
2100
|
});
|
|
2101
2101
|
}
|
|
2102
2102
|
function En({ className: e, ...t }) {
|
|
2103
2103
|
return /* @__PURE__ */ _("th", {
|
|
2104
2104
|
"data-slot": "table-head",
|
|
2105
|
-
className:
|
|
2105
|
+
className: L("h-10 px-2 text-left align-middle text-xs font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0", e),
|
|
2106
2106
|
...t
|
|
2107
2107
|
});
|
|
2108
2108
|
}
|
|
2109
2109
|
function U({ className: e, ...t }) {
|
|
2110
2110
|
return /* @__PURE__ */ _("td", {
|
|
2111
2111
|
"data-slot": "table-cell",
|
|
2112
|
-
className:
|
|
2112
|
+
className: L("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", e),
|
|
2113
2113
|
...t
|
|
2114
2114
|
});
|
|
2115
2115
|
}
|
|
2116
2116
|
function Dn({ className: e, ...t }) {
|
|
2117
2117
|
return /* @__PURE__ */ _("caption", {
|
|
2118
2118
|
"data-slot": "table-caption",
|
|
2119
|
-
className:
|
|
2119
|
+
className: L("mt-4 text-sm text-muted-foreground", e),
|
|
2120
2120
|
...t
|
|
2121
2121
|
});
|
|
2122
2122
|
}
|
|
@@ -2126,7 +2126,7 @@ function On({ className: e, orientation: t = "horizontal", ...n }) {
|
|
|
2126
2126
|
return /* @__PURE__ */ _(h.Root, {
|
|
2127
2127
|
"data-slot": "tabs",
|
|
2128
2128
|
"data-orientation": t,
|
|
2129
|
-
className:
|
|
2129
|
+
className: L("group/tabs flex gap-2 data-horizontal:flex-col", e),
|
|
2130
2130
|
...n
|
|
2131
2131
|
});
|
|
2132
2132
|
}
|
|
@@ -2141,54 +2141,54 @@ function An({ className: e, variant: t = "default", ...n }) {
|
|
|
2141
2141
|
return /* @__PURE__ */ _(h.List, {
|
|
2142
2142
|
"data-slot": "tabs-list",
|
|
2143
2143
|
"data-variant": t,
|
|
2144
|
-
className:
|
|
2144
|
+
className: L(kn({ variant: t }), e),
|
|
2145
2145
|
...n
|
|
2146
2146
|
});
|
|
2147
2147
|
}
|
|
2148
2148
|
function jn({ className: e, ...t }) {
|
|
2149
2149
|
return /* @__PURE__ */ _(h.Trigger, {
|
|
2150
2150
|
"data-slot": "tabs-trigger",
|
|
2151
|
-
className:
|
|
2151
|
+
className: L("relative inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", e),
|
|
2152
2152
|
...t
|
|
2153
2153
|
});
|
|
2154
2154
|
}
|
|
2155
2155
|
function Mn({ className: e, ...t }) {
|
|
2156
2156
|
return /* @__PURE__ */ _(h.Content, {
|
|
2157
2157
|
"data-slot": "tabs-content",
|
|
2158
|
-
className:
|
|
2158
|
+
className: L("flex-1 text-sm outline-none", e),
|
|
2159
2159
|
...t
|
|
2160
2160
|
});
|
|
2161
2161
|
}
|
|
2162
2162
|
//#endregion
|
|
2163
2163
|
//#region ../../react-app/src/components/ui/tooltip.tsx
|
|
2164
2164
|
function Nn({ delayDuration: e = 200, ...t }) {
|
|
2165
|
-
return /* @__PURE__ */ _(
|
|
2165
|
+
return /* @__PURE__ */ _(D.Provider, {
|
|
2166
2166
|
"data-slot": "tooltip-provider",
|
|
2167
2167
|
delayDuration: e,
|
|
2168
2168
|
...t
|
|
2169
2169
|
});
|
|
2170
2170
|
}
|
|
2171
2171
|
function Pn(e) {
|
|
2172
|
-
return /* @__PURE__ */ _(Nn, { children: /* @__PURE__ */ _(
|
|
2172
|
+
return /* @__PURE__ */ _(Nn, { children: /* @__PURE__ */ _(D.Root, {
|
|
2173
2173
|
"data-slot": "tooltip",
|
|
2174
2174
|
...e
|
|
2175
2175
|
}) });
|
|
2176
2176
|
}
|
|
2177
2177
|
function Fn(e) {
|
|
2178
|
-
return /* @__PURE__ */ _(
|
|
2178
|
+
return /* @__PURE__ */ _(D.Trigger, {
|
|
2179
2179
|
"data-slot": "tooltip-trigger",
|
|
2180
2180
|
...e
|
|
2181
2181
|
});
|
|
2182
2182
|
}
|
|
2183
2183
|
function In({ className: e, sideOffset: t = 6, children: n, ...r }) {
|
|
2184
|
-
return /* @__PURE__ */ _(
|
|
2185
|
-
className:
|
|
2186
|
-
children: /* @__PURE__ */ v(
|
|
2184
|
+
return /* @__PURE__ */ _(D.Portal, { children: /* @__PURE__ */ _("div", {
|
|
2185
|
+
className: R,
|
|
2186
|
+
children: /* @__PURE__ */ v(D.Content, {
|
|
2187
2187
|
"data-slot": "tooltip-content",
|
|
2188
2188
|
sideOffset: t,
|
|
2189
|
-
className:
|
|
2189
|
+
className: L("z-50 rounded-md bg-slate-900 px-2 py-1 text-xs font-medium text-white shadow-md dark:bg-slate-700", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95", e),
|
|
2190
2190
|
...r,
|
|
2191
|
-
children: [n, /* @__PURE__ */ _(
|
|
2191
|
+
children: [n, /* @__PURE__ */ _(D.Arrow, { className: "fill-slate-900 dark:fill-slate-700" })]
|
|
2192
2192
|
})
|
|
2193
2193
|
}) });
|
|
2194
2194
|
}
|
|
@@ -2199,7 +2199,7 @@ function Ln(e) {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
function Rn({ src: e, name: t = "", size: n = 32, className: r }) {
|
|
2201
2201
|
return /* @__PURE__ */ _("span", {
|
|
2202
|
-
className:
|
|
2202
|
+
className: L("inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full bg-cb-seg font-medium text-cb-text", r),
|
|
2203
2203
|
style: {
|
|
2204
2204
|
width: n,
|
|
2205
2205
|
height: n,
|
|
@@ -2224,7 +2224,7 @@ var zn = {
|
|
|
2224
2224
|
function Bn({ variant: e = "count", value: t }) {
|
|
2225
2225
|
let n = e === "soon" ? "SOON" : e === "ext" ? "↗" : String(t ?? "");
|
|
2226
2226
|
return /* @__PURE__ */ _("span", {
|
|
2227
|
-
className:
|
|
2227
|
+
className: L(zn[e]),
|
|
2228
2228
|
children: n
|
|
2229
2229
|
});
|
|
2230
2230
|
}
|
|
@@ -2241,13 +2241,13 @@ function Vn({ text: e = "Label" }) {
|
|
|
2241
2241
|
var Hn = {
|
|
2242
2242
|
grid: ze,
|
|
2243
2243
|
checkc: Me,
|
|
2244
|
-
swap:
|
|
2244
|
+
swap: xe,
|
|
2245
2245
|
shield: ct,
|
|
2246
2246
|
wallet: vt,
|
|
2247
|
-
down:
|
|
2247
|
+
down: ye,
|
|
2248
2248
|
up: we,
|
|
2249
2249
|
convert: Se,
|
|
2250
|
-
transfer:
|
|
2250
|
+
transfer: ge,
|
|
2251
2251
|
book: et,
|
|
2252
2252
|
invoice: Je,
|
|
2253
2253
|
payout: Ze,
|
|
@@ -2270,7 +2270,7 @@ var Hn = {
|
|
|
2270
2270
|
//#region ../../react-app/src/components/nav/NavIcon.tsx
|
|
2271
2271
|
function Gn({ name: e = "grid", active: t = !1, size: n = 18 }) {
|
|
2272
2272
|
return /* @__PURE__ */ _("span", {
|
|
2273
|
-
className:
|
|
2273
|
+
className: L("shrink-0", t ? "text-[var(--nav-link-active)]" : "opacity-[var(--nav-icon-opacity)]"),
|
|
2274
2274
|
children: /* @__PURE__ */ _(x, {
|
|
2275
2275
|
icon: Un[e],
|
|
2276
2276
|
size: n,
|
|
@@ -2288,10 +2288,10 @@ function qn({ src: e = Kn, alt: t = "Chainberry", href: n, collapsed: r = !1 })
|
|
|
2288
2288
|
src: e,
|
|
2289
2289
|
alt: t,
|
|
2290
2290
|
className: r ? "h-[22px] w-[22px] object-cover object-left" : "h-6 w-auto"
|
|
2291
|
-
}), a =
|
|
2291
|
+
}), a = L("flex items-center", r && "justify-center");
|
|
2292
2292
|
return n ? /* @__PURE__ */ _("a", {
|
|
2293
2293
|
href: n,
|
|
2294
|
-
className:
|
|
2294
|
+
className: L(a, "cursor-pointer"),
|
|
2295
2295
|
children: i
|
|
2296
2296
|
}) : /* @__PURE__ */ _("span", {
|
|
2297
2297
|
className: a,
|
|
@@ -2307,12 +2307,12 @@ function Yn({ label: e = "Section", collapsible: t = !1, expanded: n = !0, onTog
|
|
|
2307
2307
|
onClick: r,
|
|
2308
2308
|
"aria-expanded": n,
|
|
2309
2309
|
"aria-controls": i,
|
|
2310
|
-
className:
|
|
2310
|
+
className: L(Jn, "group flex w-[calc(100%-1.25rem)] cursor-pointer items-center justify-between rounded outline-none transition-colors", "hover:text-[var(--nav-link-hover)] focus-visible:ring-2 focus-visible:ring-ring/50"),
|
|
2311
2311
|
children: [/* @__PURE__ */ _("span", { children: e }), /* @__PURE__ */ _(x, {
|
|
2312
|
-
icon:
|
|
2312
|
+
icon: ve,
|
|
2313
2313
|
size: 13,
|
|
2314
2314
|
strokeWidth: 2.25,
|
|
2315
|
-
className:
|
|
2315
|
+
className: L("shrink-0 opacity-70 transition-transform duration-200 group-hover:opacity-100", n ? "" : "-rotate-90")
|
|
2316
2316
|
})]
|
|
2317
2317
|
}) : /* @__PURE__ */ _("h6", {
|
|
2318
2318
|
className: Jn,
|
|
@@ -2322,7 +2322,7 @@ function Yn({ label: e = "Section", collapsible: t = !1, expanded: n = !0, onTog
|
|
|
2322
2322
|
//#endregion
|
|
2323
2323
|
//#region ../../react-app/src/components/nav/NavItem.tsx
|
|
2324
2324
|
function Xn({ id: e, label: t, icon: n, active: r = !1, collapsed: i = !1, sub: a = !1, badge: o, soon: s = !1, ext: c, onNavigate: l }) {
|
|
2325
|
-
let u =
|
|
2325
|
+
let u = L("group flex w-full cursor-pointer items-center rounded-lg transition-colors", a ? "text-[14px]" : "text-[14.5px]", i ? "justify-center gap-0 px-0 py-2" : "gap-2.5 px-2.5 py-[5px] text-left mb-px", r ? L("bg-cb-seg text-[var(--nav-link-active)]", a ? "font-[450]" : "font-[550]") : "font-[450] text-[var(--nav-link)] hover:bg-cb-seg hover:text-[var(--nav-link-hover)]"), d = /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Gn, {
|
|
2326
2326
|
name: n,
|
|
2327
2327
|
active: r,
|
|
2328
2328
|
size: a && !i ? 16 : 18
|
|
@@ -2363,15 +2363,15 @@ function Zn({ label: e, icon: t, expanded: n = !0, onToggle: r, controls: i }) {
|
|
|
2363
2363
|
"aria-expanded": n,
|
|
2364
2364
|
"aria-controls": i,
|
|
2365
2365
|
title: e,
|
|
2366
|
-
className:
|
|
2366
|
+
className: L("group mb-px flex w-full cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-[5px] text-left text-[14.5px] font-[450] transition-colors", "text-[var(--nav-link)] hover:bg-cb-seg hover:text-[var(--nav-link-hover)]"),
|
|
2367
2367
|
children: [
|
|
2368
2368
|
/* @__PURE__ */ _(Gn, { name: t }),
|
|
2369
2369
|
/* @__PURE__ */ _(Vn, { text: e }),
|
|
2370
2370
|
/* @__PURE__ */ _(x, {
|
|
2371
|
-
icon:
|
|
2371
|
+
icon: ve,
|
|
2372
2372
|
size: 16,
|
|
2373
2373
|
strokeWidth: 2,
|
|
2374
|
-
className:
|
|
2374
|
+
className: L("shrink-0 opacity-60 transition-transform duration-200 group-hover:opacity-100", n ? "" : "-rotate-90")
|
|
2375
2375
|
})
|
|
2376
2376
|
]
|
|
2377
2377
|
});
|
|
@@ -2399,7 +2399,7 @@ function Qn({ label: e, icon: t, items: n, activeId: r, onNavigate: i }) {
|
|
|
2399
2399
|
onClick: l,
|
|
2400
2400
|
onFocus: l,
|
|
2401
2401
|
onBlur: f,
|
|
2402
|
-
className:
|
|
2402
|
+
className: L("group flex w-full cursor-pointer items-center justify-center rounded-lg py-2 transition-colors", c ? "bg-cb-seg text-[var(--nav-link-active)]" : "text-[var(--nav-link)] hover:bg-cb-seg hover:text-[var(--nav-link-hover)]"),
|
|
2403
2403
|
children: /* @__PURE__ */ _(Gn, {
|
|
2404
2404
|
name: t,
|
|
2405
2405
|
active: c
|
|
@@ -2437,7 +2437,7 @@ function $n({ label: e, icon: t, items: n = [], divider: r = !1, activeId: i, co
|
|
|
2437
2437
|
onNavigate: l
|
|
2438
2438
|
}, e.id));
|
|
2439
2439
|
return /* @__PURE__ */ v("div", {
|
|
2440
|
-
className:
|
|
2440
|
+
className: L(r && !a && "mt-2 border-t border-cb-line pt-[11px]", a && "mb-1"),
|
|
2441
2441
|
children: [
|
|
2442
2442
|
b && /* @__PURE__ */ _(Qn, {
|
|
2443
2443
|
label: e,
|
|
@@ -2461,9 +2461,9 @@ function $n({ label: e, icon: t, items: n = [], divider: r = !1, activeId: i, co
|
|
|
2461
2461
|
})),
|
|
2462
2462
|
y ? /* @__PURE__ */ _("div", {
|
|
2463
2463
|
id: g,
|
|
2464
|
-
className:
|
|
2464
|
+
className: L("grid transition-[grid-template-rows] duration-200 ease-out", m ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
2465
2465
|
children: /* @__PURE__ */ _("div", {
|
|
2466
|
-
className:
|
|
2466
|
+
className: L("overflow-hidden", t && "pl-[18px]"),
|
|
2467
2467
|
children: x
|
|
2468
2468
|
})
|
|
2469
2469
|
}) : b ? null : x
|
|
@@ -2479,10 +2479,10 @@ var er = {
|
|
|
2479
2479
|
};
|
|
2480
2480
|
function tr({ icon: e, tone: t, title: n, detail: r, time: i, unread: a = !1 }) {
|
|
2481
2481
|
return /* @__PURE__ */ v("div", {
|
|
2482
|
-
className:
|
|
2482
|
+
className: L("flex gap-3 px-4 py-3 transition-colors", a && "bg-slate-50"),
|
|
2483
2483
|
children: [
|
|
2484
2484
|
/* @__PURE__ */ _("span", {
|
|
2485
|
-
className:
|
|
2485
|
+
className: L("flex size-9 shrink-0 items-center justify-center rounded-lg", er[t]),
|
|
2486
2486
|
children: /* @__PURE__ */ _(x, {
|
|
2487
2487
|
icon: e,
|
|
2488
2488
|
size: 18,
|
|
@@ -2547,7 +2547,7 @@ var nr = [
|
|
|
2547
2547
|
function rr({ items: e, max: t = 3, onViewAll: n, className: r }) {
|
|
2548
2548
|
let i = e.slice(0, t), a = e.filter((e) => e.unread).length;
|
|
2549
2549
|
return /* @__PURE__ */ v("div", {
|
|
2550
|
-
className:
|
|
2550
|
+
className: L("flex flex-col", r),
|
|
2551
2551
|
children: [
|
|
2552
2552
|
/* @__PURE__ */ v("div", {
|
|
2553
2553
|
className: "flex items-center gap-2 border-b border-cb-line px-4 py-3",
|
|
@@ -2588,7 +2588,7 @@ function ir({ items: e = nr, onViewAll: t }) {
|
|
|
2588
2588
|
},
|
|
2589
2589
|
children: [/* @__PURE__ */ _(en, {
|
|
2590
2590
|
asChild: !0,
|
|
2591
|
-
children: /* @__PURE__ */ _(
|
|
2591
|
+
children: /* @__PURE__ */ _(B, {
|
|
2592
2592
|
type: "button",
|
|
2593
2593
|
variant: "ghost",
|
|
2594
2594
|
size: "icon",
|
|
@@ -2703,7 +2703,7 @@ function lr({ name: e = "Ivan Krstić", avatarSrc: t, navMode: n = "primary", on
|
|
|
2703
2703
|
children: e
|
|
2704
2704
|
}),
|
|
2705
2705
|
/* @__PURE__ */ _(x, {
|
|
2706
|
-
icon:
|
|
2706
|
+
icon: ve,
|
|
2707
2707
|
size: 16,
|
|
2708
2708
|
strokeWidth: 2,
|
|
2709
2709
|
className: "-ml-1 shrink-0 text-cb-muted opacity-75"
|
|
@@ -3112,9 +3112,9 @@ function gr({ config: e, preset: t = "primary", activeId: n = "dashboard", colla
|
|
|
3112
3112
|
}, [C]);
|
|
3113
3113
|
let w = u(null);
|
|
3114
3114
|
return /* @__PURE__ */ v("aside", {
|
|
3115
|
-
className:
|
|
3115
|
+
className: L("relative flex h-full shrink-0 flex-col border-r border-cb-line bg-cb-sidebar", l ? "w-[62px]" : "w-[240px]"),
|
|
3116
3116
|
children: [
|
|
3117
|
-
/* @__PURE__ */ _(
|
|
3117
|
+
/* @__PURE__ */ _(B, {
|
|
3118
3118
|
type: "button",
|
|
3119
3119
|
variant: "outline",
|
|
3120
3120
|
size: "icon",
|
|
@@ -3123,13 +3123,13 @@ function gr({ config: e, preset: t = "primary", activeId: n = "dashboard", colla
|
|
|
3123
3123
|
title: l ? "Expand" : "Collapse",
|
|
3124
3124
|
className: "absolute right-0 top-[19px] z-30 size-6 translate-x-1/2 cursor-pointer rounded-full border-cb-line bg-cb-card text-cb-muted shadow-sm hover:bg-[#F1F4F8] hover:text-cb-ink2",
|
|
3125
3125
|
children: /* @__PURE__ */ _(x, {
|
|
3126
|
-
icon: l ? Ce :
|
|
3126
|
+
icon: l ? Ce : be,
|
|
3127
3127
|
size: 15,
|
|
3128
3128
|
strokeWidth: 2
|
|
3129
3129
|
})
|
|
3130
3130
|
}),
|
|
3131
3131
|
/* @__PURE__ */ _("div", {
|
|
3132
|
-
className:
|
|
3132
|
+
className: L("flex shrink-0 items-center pt-[18px] pb-5", l ? "justify-center px-0" : "px-5"),
|
|
3133
3133
|
children: /* @__PURE__ */ _("button", {
|
|
3134
3134
|
type: "button",
|
|
3135
3135
|
"aria-label": "Dashboard",
|
|
@@ -3146,7 +3146,7 @@ function gr({ config: e, preset: t = "primary", activeId: n = "dashboard", colla
|
|
|
3146
3146
|
children: [/* @__PURE__ */ _("div", {
|
|
3147
3147
|
ref: y,
|
|
3148
3148
|
onScroll: C,
|
|
3149
|
-
className:
|
|
3149
|
+
className: L("h-full overflow-y-auto pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", l ? "px-[9px]" : "px-2.5"),
|
|
3150
3150
|
children: p.map((e, t) => /* @__PURE__ */ _($n, {
|
|
3151
3151
|
...e,
|
|
3152
3152
|
activeId: n,
|
|
@@ -3191,7 +3191,7 @@ function gr({ config: e, preset: t = "primary", activeId: n = "dashboard", colla
|
|
|
3191
3191
|
//#region ../../react-app/src/components/shell/PageContainer.tsx
|
|
3192
3192
|
function _r({ className: e, children: t }) {
|
|
3193
3193
|
return /* @__PURE__ */ _("div", {
|
|
3194
|
-
className:
|
|
3194
|
+
className: L("mx-auto w-full max-w-7xl px-8", e),
|
|
3195
3195
|
children: t
|
|
3196
3196
|
});
|
|
3197
3197
|
}
|
|
@@ -3446,7 +3446,7 @@ function Or({ children: e, defaultOpen: t = !1 }) {
|
|
|
3446
3446
|
}
|
|
3447
3447
|
function kr({ label: e = "What is this screen?", className: t }) {
|
|
3448
3448
|
let { open: n, toggle: r, panelId: i } = Dr();
|
|
3449
|
-
return /* @__PURE__ */ _(
|
|
3449
|
+
return /* @__PURE__ */ _(B, {
|
|
3450
3450
|
type: "button",
|
|
3451
3451
|
variant: "ghost",
|
|
3452
3452
|
size: "icon-xs",
|
|
@@ -3454,7 +3454,7 @@ function kr({ label: e = "What is this screen?", className: t }) {
|
|
|
3454
3454
|
"aria-expanded": n,
|
|
3455
3455
|
"aria-controls": i,
|
|
3456
3456
|
onClick: r,
|
|
3457
|
-
className:
|
|
3457
|
+
className: L("cursor-pointer text-muted-foreground/60 hover:text-sky-700 dark:hover:text-sky-400", n && "bg-sky-50 text-sky-700 hover:text-sky-700 dark:bg-sky-500/15 dark:text-sky-400 dark:hover:text-sky-400", t),
|
|
3458
3458
|
children: /* @__PURE__ */ _(x, {
|
|
3459
3459
|
icon: qe,
|
|
3460
3460
|
size: 16,
|
|
@@ -3469,7 +3469,7 @@ function Ar({ title: e, description: t, tips: n, tipsLabel: r = "What to try", c
|
|
|
3469
3469
|
id: c,
|
|
3470
3470
|
role: "region",
|
|
3471
3471
|
"aria-label": typeof e == "string" ? e : "About this screen",
|
|
3472
|
-
className:
|
|
3472
|
+
className: L("relative flex gap-3.5 rounded-xl border border-sky-100 bg-sky-50 p-4 pr-11 animate-in fade-in-0 slide-in-from-top-1 duration-200 dark:border-sky-500/25 dark:bg-sky-500/10", a),
|
|
3473
3473
|
children: [
|
|
3474
3474
|
/* @__PURE__ */ _("div", {
|
|
3475
3475
|
className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground",
|
|
@@ -3496,7 +3496,7 @@ function Ar({ title: e, description: t, tips: n, tipsLabel: r = "What to try", c
|
|
|
3496
3496
|
children: n.map((e, t) => /* @__PURE__ */ _("li", { children: e }, t))
|
|
3497
3497
|
})] })] })]
|
|
3498
3498
|
}),
|
|
3499
|
-
/* @__PURE__ */ _(
|
|
3499
|
+
/* @__PURE__ */ _(B, {
|
|
3500
3500
|
type: "button",
|
|
3501
3501
|
variant: "ghost",
|
|
3502
3502
|
size: "icon-xs",
|
|
@@ -3520,9 +3520,9 @@ function W({ src: e, code: t, className: n }) {
|
|
|
3520
3520
|
src: e,
|
|
3521
3521
|
alt: t,
|
|
3522
3522
|
loading: "lazy",
|
|
3523
|
-
className:
|
|
3523
|
+
className: L("rounded-full object-contain", n)
|
|
3524
3524
|
}) : /* @__PURE__ */ _("span", {
|
|
3525
|
-
className:
|
|
3525
|
+
className: L("inline-flex items-center justify-center rounded-full bg-muted text-[9px] font-semibold text-muted-foreground", n),
|
|
3526
3526
|
children: t.slice(0, 3)
|
|
3527
3527
|
});
|
|
3528
3528
|
}
|
|
@@ -3531,7 +3531,7 @@ function W({ src: e, code: t, className: n }) {
|
|
|
3531
3531
|
function jr({ columns: e, visible: t, onChange: n, label: r = "Columns" }) {
|
|
3532
3532
|
return /* @__PURE__ */ v(Mt, { children: [/* @__PURE__ */ _(Nt, {
|
|
3533
3533
|
asChild: !0,
|
|
3534
|
-
children: /* @__PURE__ */ v(
|
|
3534
|
+
children: /* @__PURE__ */ v(B, {
|
|
3535
3535
|
variant: "outline",
|
|
3536
3536
|
className: "cursor-pointer shadow-xs",
|
|
3537
3537
|
children: [/* @__PURE__ */ _(x, {
|
|
@@ -3562,7 +3562,7 @@ function Mr({ value: e, className: t }) {
|
|
|
3562
3562
|
let [n, r] = d(!1);
|
|
3563
3563
|
return /* @__PURE__ */ v(Pn, { children: [/* @__PURE__ */ _(Fn, {
|
|
3564
3564
|
asChild: !0,
|
|
3565
|
-
children: /* @__PURE__ */ _(
|
|
3565
|
+
children: /* @__PURE__ */ _(B, {
|
|
3566
3566
|
type: "button",
|
|
3567
3567
|
variant: "ghost",
|
|
3568
3568
|
size: "icon-xs",
|
|
@@ -3570,7 +3570,7 @@ function Mr({ value: e, className: t }) {
|
|
|
3570
3570
|
onClick: (t) => {
|
|
3571
3571
|
t.stopPropagation(), navigator.clipboard?.writeText(e), r(!0), window.setTimeout(() => r(!1), 1200);
|
|
3572
3572
|
},
|
|
3573
|
-
className:
|
|
3573
|
+
className: L("cursor-pointer transition-opacity hover:bg-transparent", n ? "text-emerald-500 hover:text-emerald-500" : "text-muted-foreground hover:text-primary", t),
|
|
3574
3574
|
children: /* @__PURE__ */ _(x, {
|
|
3575
3575
|
icon: n ? Me : Ie,
|
|
3576
3576
|
size: 14,
|
|
@@ -3587,7 +3587,7 @@ function Nr({ href: e = "#", className: t, children: n, ...r }) {
|
|
|
3587
3587
|
href: e,
|
|
3588
3588
|
target: "_blank",
|
|
3589
3589
|
rel: "noopener noreferrer",
|
|
3590
|
-
className:
|
|
3590
|
+
className: L("cursor-pointer text-foreground underline underline-offset-2 transition-colors hover:text-primary", t),
|
|
3591
3591
|
...r,
|
|
3592
3592
|
children: n
|
|
3593
3593
|
});
|
|
@@ -3597,7 +3597,7 @@ function Nr({ href: e = "#", className: t, children: n, ...r }) {
|
|
|
3597
3597
|
function G({ value: e, head: t = 8, tail: n = 6, revealOnHover: r = !1, asLink: i = !1, href: a, className: o }) {
|
|
3598
3598
|
let s = e.length > t + n ? `${e.slice(0, t)}...${e.slice(-n)}` : e;
|
|
3599
3599
|
return /* @__PURE__ */ v("div", {
|
|
3600
|
-
className:
|
|
3600
|
+
className: L("flex items-center gap-1.5", o),
|
|
3601
3601
|
children: [i ? /* @__PURE__ */ _(Nr, {
|
|
3602
3602
|
href: a,
|
|
3603
3603
|
className: "font-mono text-[13px]",
|
|
@@ -3607,7 +3607,7 @@ function G({ value: e, head: t = 8, tail: n = 6, revealOnHover: r = !1, asLink:
|
|
|
3607
3607
|
children: s
|
|
3608
3608
|
}), /* @__PURE__ */ _(Mr, {
|
|
3609
3609
|
value: e,
|
|
3610
|
-
className:
|
|
3610
|
+
className: L(r && "opacity-0 transition-opacity group-hover/row:opacity-100 aria-[label=Copied]:opacity-100")
|
|
3611
3611
|
})]
|
|
3612
3612
|
});
|
|
3613
3613
|
}
|
|
@@ -3636,13 +3636,13 @@ var Pr = {
|
|
|
3636
3636
|
function Fr({ code: e, network: t, codeSrc: n, networkSrc: r, size: i = "sm", className: a }) {
|
|
3637
3637
|
let o = Pr[i];
|
|
3638
3638
|
return /* @__PURE__ */ v("span", {
|
|
3639
|
-
className:
|
|
3639
|
+
className: L("relative inline-flex shrink-0", a),
|
|
3640
3640
|
children: [/* @__PURE__ */ _(W, {
|
|
3641
3641
|
src: n,
|
|
3642
3642
|
code: e,
|
|
3643
3643
|
className: o.logo
|
|
3644
3644
|
}), /* @__PURE__ */ _("span", {
|
|
3645
|
-
className:
|
|
3645
|
+
className: L("absolute inline-flex rounded-full border-white bg-white", o.ring, o.pos),
|
|
3646
3646
|
children: /* @__PURE__ */ _(W, {
|
|
3647
3647
|
src: r,
|
|
3648
3648
|
code: t,
|
|
@@ -3657,9 +3657,9 @@ function Ir({ label: e, sort: t = !1, onSort: n, align: r = "start" }) {
|
|
|
3657
3657
|
return /* @__PURE__ */ v("button", {
|
|
3658
3658
|
type: "button",
|
|
3659
3659
|
onClick: n,
|
|
3660
|
-
className:
|
|
3660
|
+
className: L("inline-flex cursor-pointer items-center gap-1 text-muted-foreground transition-colors select-none hover:text-foreground", r === "end" && "flex-row-reverse", t && "text-foreground"),
|
|
3661
3661
|
children: [e, /* @__PURE__ */ _("span", {
|
|
3662
|
-
className:
|
|
3662
|
+
className: L("text-xs", t ? "text-foreground" : "text-muted-foreground/40"),
|
|
3663
3663
|
children: t === "asc" ? "↑" : t === "desc" ? "↓" : "⇅"
|
|
3664
3664
|
})]
|
|
3665
3665
|
});
|
|
@@ -3678,178 +3678,80 @@ function Lr(e, t) {
|
|
|
3678
3678
|
for (let e of n) e - i > 1 && r.push("ellipsis"), r.push(e), i = e;
|
|
3679
3679
|
return r;
|
|
3680
3680
|
}
|
|
3681
|
-
function Rr({ columns: e, data: t, getRowId: n, layout: r = "auto", density: i = "comfortable", pageSize: a,
|
|
3682
|
-
let
|
|
3683
|
-
y === void 0 ? k(e) : b?.(e);
|
|
3684
|
-
}, [j, oe] = d(h ?? m?.[0]?.value ?? ""), se = m?.find((e) => e.value === j)?.label, ce = se ? `Search by ${se}` : f, M = (e) => {
|
|
3685
|
-
oe(e), g?.(e);
|
|
3686
|
-
}, N = l(() => {
|
|
3687
|
-
let e = A.trim().toLowerCase();
|
|
3688
|
-
return !e || !p ? t : t.filter((t) => p(t, e));
|
|
3689
|
-
}, [
|
|
3690
|
-
t,
|
|
3691
|
-
A,
|
|
3692
|
-
p
|
|
3693
|
-
]), [P, le] = d(null), ue = (e) => le((t) => !t || t.id !== e ? {
|
|
3694
|
-
id: e,
|
|
3695
|
-
dir: "asc"
|
|
3696
|
-
} : t.dir === "asc" ? {
|
|
3697
|
-
id: e,
|
|
3698
|
-
dir: "desc"
|
|
3699
|
-
} : null), F = (e) => P?.id === e && P.dir, L = l(() => {
|
|
3700
|
-
if (!P) return N;
|
|
3701
|
-
let t = e.find((e) => e.id === P.id);
|
|
3702
|
-
if (!t?.sortValue) return N;
|
|
3703
|
-
let n = P.dir === "asc" ? 1 : -1, r = t.sortValue;
|
|
3704
|
-
return [...N].sort((e, t) => {
|
|
3705
|
-
let i = r(e), a = r(t);
|
|
3706
|
-
return typeof i == "number" && typeof a == "number" ? (i - a) * n : String(i).localeCompare(String(a)) * n;
|
|
3707
|
-
});
|
|
3708
|
-
}, [
|
|
3709
|
-
N,
|
|
3710
|
-
P,
|
|
3711
|
-
e
|
|
3712
|
-
]), [R, z] = d(() => Object.fromEntries(e.map((e) => [e.id, !0]))), de = C ?? R, fe = (e, t) => {
|
|
3713
|
-
C === void 0 ? z((n) => ({
|
|
3714
|
-
...n,
|
|
3715
|
-
[e]: t
|
|
3716
|
-
})) : w?.(e, t);
|
|
3717
|
-
}, pe = (e) => de[e] ?? !0, me = e.filter((e) => pe(e.id)), he = e.map((e) => ({
|
|
3718
|
-
id: e.id,
|
|
3719
|
-
label: e.header,
|
|
3720
|
-
canHide: e.canHide
|
|
3721
|
-
})), ge = a != null, [_e, ve] = d(0);
|
|
3722
|
-
o(() => ve(0), [
|
|
3723
|
-
t,
|
|
3724
|
-
A,
|
|
3725
|
-
P
|
|
3726
|
-
]);
|
|
3727
|
-
let be = L.length, xe = ge ? Math.max(1, Math.ceil(be / a)) : 1, B = Math.min(_e, xe - 1), Se = ge ? L.slice(B * a, B * a + a) : L, Ce = me.length + +!!T, we = u || S || !!E || !!D;
|
|
3681
|
+
function Rr({ columns: e, data: t, getRowId: n, layout: r = "auto", density: i = "comfortable", pageSize: a, totalItems: o, currentPage: s, onPageChange: c, loading: l = !1, skeletonRows: u = 10, columnVisibility: d, onRowClick: f, rowLeading: p, emptyMessage: m = "No results.", toolbarBelow: h, sort: g, onSortChange: y }) {
|
|
3682
|
+
let b = r === "fill", x = i === "compact" ? "py-1.5" : "py-3", S = (e) => g?.id === e && g.dir, C = d ?? Object.fromEntries(e.map((e) => [e.id, !0])), w = (e) => C[e] ?? !0, T = e.filter((e) => w(e.id)), E = a ? Math.max(1, Math.ceil(o / a)) : 1, ee = T.length + +!!p;
|
|
3728
3683
|
return /* @__PURE__ */ v("div", {
|
|
3729
|
-
className:
|
|
3684
|
+
className: L("flex flex-col", b && "min-h-0 flex-1"),
|
|
3730
3685
|
children: [
|
|
3731
|
-
|
|
3732
|
-
className: "mb-2 flex shrink-0 flex-wrap items-center gap-2",
|
|
3733
|
-
children: [
|
|
3734
|
-
u ? /* @__PURE__ */ v("div", {
|
|
3735
|
-
className: "relative min-w-64 flex-1",
|
|
3736
|
-
children: [
|
|
3737
|
-
/* @__PURE__ */ _(x, {
|
|
3738
|
-
icon: ot,
|
|
3739
|
-
size: 16,
|
|
3740
|
-
strokeWidth: 2,
|
|
3741
|
-
className: "pointer-events-none absolute top-1/2 left-2.5 -translate-y-1/2 text-muted-foreground"
|
|
3742
|
-
}),
|
|
3743
|
-
/* @__PURE__ */ _(Wt, {
|
|
3744
|
-
value: A,
|
|
3745
|
-
onChange: (e) => ae(e.target.value),
|
|
3746
|
-
placeholder: ce,
|
|
3747
|
-
className: I("pl-8 hover:border-slate-300", m && "pr-28")
|
|
3748
|
-
}),
|
|
3749
|
-
m && m.length > 0 && /* @__PURE__ */ _("div", {
|
|
3750
|
-
className: "absolute top-1/2 right-1.5 -translate-y-1/2",
|
|
3751
|
-
children: /* @__PURE__ */ v(Mt, { children: [/* @__PURE__ */ _(Nt, {
|
|
3752
|
-
asChild: !0,
|
|
3753
|
-
children: /* @__PURE__ */ v("button", {
|
|
3754
|
-
type: "button",
|
|
3755
|
-
"aria-label": "Search field",
|
|
3756
|
-
className: "flex cursor-pointer items-center gap-1 rounded-md border-l border-cb-line py-0.5 pr-1 pl-2.5 text-[13px] font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none",
|
|
3757
|
-
children: [se, /* @__PURE__ */ _(x, {
|
|
3758
|
-
icon: ye,
|
|
3759
|
-
size: 14,
|
|
3760
|
-
strokeWidth: 2
|
|
3761
|
-
})]
|
|
3762
|
-
})
|
|
3763
|
-
}), /* @__PURE__ */ _(Ft, {
|
|
3764
|
-
align: "end",
|
|
3765
|
-
className: "min-w-[8rem]",
|
|
3766
|
-
children: /* @__PURE__ */ _(Ut, {
|
|
3767
|
-
value: j,
|
|
3768
|
-
onValueChange: M,
|
|
3769
|
-
children: m.map((e) => /* @__PURE__ */ _(V, {
|
|
3770
|
-
value: e.value,
|
|
3771
|
-
children: e.label
|
|
3772
|
-
}, e.value))
|
|
3773
|
-
})
|
|
3774
|
-
})] })
|
|
3775
|
-
})
|
|
3776
|
-
]
|
|
3777
|
-
}) : /* @__PURE__ */ _("div", { className: "flex-1" }),
|
|
3778
|
-
E,
|
|
3779
|
-
S && /* @__PURE__ */ _(jr, {
|
|
3780
|
-
columns: he,
|
|
3781
|
-
visible: de,
|
|
3782
|
-
onChange: fe
|
|
3783
|
-
}),
|
|
3784
|
-
D
|
|
3785
|
-
]
|
|
3786
|
-
}),
|
|
3787
|
-
ne && /* @__PURE__ */ _("div", {
|
|
3686
|
+
h && /* @__PURE__ */ _("div", {
|
|
3788
3687
|
className: "mb-4 shrink-0",
|
|
3789
|
-
children:
|
|
3688
|
+
children: h
|
|
3790
3689
|
}),
|
|
3791
3690
|
/* @__PURE__ */ v(xn, {
|
|
3792
|
-
containerClassName:
|
|
3691
|
+
containerClassName: L(b && "min-h-0 flex-1 overflow-y-auto"),
|
|
3793
3692
|
children: [/* @__PURE__ */ _(Sn, {
|
|
3794
|
-
className:
|
|
3693
|
+
className: L("bg-cb-card [&_th]:shadow-[inset_0_-2px_0_0_var(--border)] [&_tr]:border-0", b && "sticky top-0 z-10"),
|
|
3795
3694
|
children: /* @__PURE__ */ v(Tn, {
|
|
3796
3695
|
className: "hover:bg-transparent",
|
|
3797
|
-
children: [
|
|
3798
|
-
className:
|
|
3696
|
+
children: [p && /* @__PURE__ */ _(En, { className: "w-6 px-0" }), T.map((e) => /* @__PURE__ */ _(En, {
|
|
3697
|
+
className: L(e.align === "end" && "text-right", e.headClassName),
|
|
3799
3698
|
children: e.sortable ? /* @__PURE__ */ _(Ir, {
|
|
3800
3699
|
label: e.header,
|
|
3801
3700
|
align: e.align,
|
|
3802
|
-
sort:
|
|
3803
|
-
onSort: () =>
|
|
3701
|
+
sort: S(e.id),
|
|
3702
|
+
onSort: () => y?.({
|
|
3703
|
+
id: e.id,
|
|
3704
|
+
dir: S(e.id)
|
|
3705
|
+
})
|
|
3804
3706
|
}) : e.header
|
|
3805
3707
|
}, e.id))]
|
|
3806
3708
|
})
|
|
3807
|
-
}), /* @__PURE__ */ _(Cn, { children:
|
|
3709
|
+
}), /* @__PURE__ */ _(Cn, { children: l ? Array.from({ length: u }).map((e, t) => /* @__PURE__ */ v(Tn, {
|
|
3808
3710
|
className: "border-b border-slate-100 hover:bg-transparent",
|
|
3809
|
-
children: [
|
|
3810
|
-
className:
|
|
3711
|
+
children: [p && /* @__PURE__ */ _(U, { className: L("w-6 px-0", x) }), T.map((e) => /* @__PURE__ */ _(U, {
|
|
3712
|
+
className: L(x, e.cellClassName),
|
|
3811
3713
|
children: /* @__PURE__ */ _("div", {
|
|
3812
|
-
className:
|
|
3714
|
+
className: L("flex", e.align === "end" && "justify-end"),
|
|
3813
3715
|
children: e.skeleton ?? /* @__PURE__ */ _(H, { className: "h-4 w-24" })
|
|
3814
3716
|
})
|
|
3815
3717
|
}, e.id))]
|
|
3816
|
-
}, t)) :
|
|
3718
|
+
}, t)) : t.length === 0 ? /* @__PURE__ */ _(Tn, {
|
|
3817
3719
|
className: "border-0 hover:bg-transparent",
|
|
3818
3720
|
children: /* @__PURE__ */ _(U, {
|
|
3819
|
-
colSpan:
|
|
3721
|
+
colSpan: ee,
|
|
3820
3722
|
className: "py-12 text-center text-muted-foreground",
|
|
3821
|
-
children:
|
|
3723
|
+
children: m
|
|
3822
3724
|
})
|
|
3823
|
-
}) :
|
|
3824
|
-
className:
|
|
3825
|
-
onClick:
|
|
3826
|
-
children: [
|
|
3827
|
-
className:
|
|
3828
|
-
children:
|
|
3829
|
-
}),
|
|
3830
|
-
className:
|
|
3725
|
+
}) : t.map((e) => /* @__PURE__ */ v(Tn, {
|
|
3726
|
+
className: L("group/row border-b border-slate-100", f && "cursor-pointer"),
|
|
3727
|
+
onClick: f ? () => f(e) : void 0,
|
|
3728
|
+
children: [p && /* @__PURE__ */ _(U, {
|
|
3729
|
+
className: L("w-6 px-0", x),
|
|
3730
|
+
children: p(e)
|
|
3731
|
+
}), T.map((t) => /* @__PURE__ */ _(U, {
|
|
3732
|
+
className: L(x, t.align === "end" && "text-right", t.cellClassName),
|
|
3831
3733
|
children: t.cell(e)
|
|
3832
3734
|
}, t.id))]
|
|
3833
3735
|
}, n(e))) })]
|
|
3834
3736
|
}),
|
|
3835
|
-
|
|
3737
|
+
a && /* @__PURE__ */ v("div", {
|
|
3836
3738
|
className: "flex shrink-0 items-center justify-between border-t border-cb-line py-3",
|
|
3837
|
-
children: [
|
|
3739
|
+
children: [l ? /* @__PURE__ */ _(H, { className: "h-4 w-32" }) : /* @__PURE__ */ _("span", {
|
|
3838
3740
|
className: "text-sm text-muted-foreground",
|
|
3839
|
-
children:
|
|
3741
|
+
children: o === 0 ? "No results" : `Showing ${s * a + 1}–${Math.min(o, (s + 1) * a)} of ${o}`
|
|
3840
3742
|
}), /* @__PURE__ */ _(Kt, { children: /* @__PURE__ */ v(qt, { children: [
|
|
3841
3743
|
/* @__PURE__ */ _(Jt, { children: /* @__PURE__ */ _(Xt, {
|
|
3842
|
-
disabled:
|
|
3843
|
-
onClick: () =>
|
|
3744
|
+
disabled: s === 0,
|
|
3745
|
+
onClick: () => c?.(s - 1)
|
|
3844
3746
|
}) }),
|
|
3845
|
-
Lr(
|
|
3846
|
-
isActive: e ===
|
|
3847
|
-
onClick: () =>
|
|
3747
|
+
Lr(s, E).map((e, t) => e === "ellipsis" ? /* @__PURE__ */ _(Jt, { children: /* @__PURE__ */ _(Qt, {}) }, `ellipsis-${t}`) : /* @__PURE__ */ _(Jt, { children: /* @__PURE__ */ _(Yt, {
|
|
3748
|
+
isActive: e === s,
|
|
3749
|
+
onClick: () => c?.(e),
|
|
3848
3750
|
children: e + 1
|
|
3849
3751
|
}) }, e)),
|
|
3850
3752
|
/* @__PURE__ */ _(Jt, { children: /* @__PURE__ */ _(Zt, {
|
|
3851
|
-
disabled:
|
|
3852
|
-
onClick: () =>
|
|
3753
|
+
disabled: s >= E - 1,
|
|
3754
|
+
onClick: () => c?.(s + 1)
|
|
3853
3755
|
}) })
|
|
3854
3756
|
] }) })]
|
|
3855
3757
|
})
|
|
@@ -3870,8 +3772,8 @@ var zr = [{
|
|
|
3870
3772
|
function Br({ formats: e = zr, onDownload: t, label: n = "Download", align: r = "end", className: i }) {
|
|
3871
3773
|
return /* @__PURE__ */ v(Mt, { children: [/* @__PURE__ */ _(Nt, {
|
|
3872
3774
|
asChild: !0,
|
|
3873
|
-
children: /* @__PURE__ */ v(
|
|
3874
|
-
className:
|
|
3775
|
+
children: /* @__PURE__ */ v(B, {
|
|
3776
|
+
className: L("cursor-pointer border-primary shadow-xs", i),
|
|
3875
3777
|
children: [/* @__PURE__ */ _(x, {
|
|
3876
3778
|
icon: Ve,
|
|
3877
3779
|
size: 16,
|
|
@@ -3903,7 +3805,7 @@ function Vr({ type: e, label: t }) {
|
|
|
3903
3805
|
children: [/* @__PURE__ */ _("span", {
|
|
3904
3806
|
className: "inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",
|
|
3905
3807
|
children: /* @__PURE__ */ _(x, {
|
|
3906
|
-
icon: e === "deposit" ?
|
|
3808
|
+
icon: e === "deposit" ? ye : we,
|
|
3907
3809
|
size: 15,
|
|
3908
3810
|
strokeWidth: 2
|
|
3909
3811
|
})
|
|
@@ -3939,9 +3841,9 @@ var Ur = {
|
|
|
3939
3841
|
orange: "border-orange-100 bg-orange-50 text-orange-700 dark:border-orange-500/25 dark:bg-orange-500/15 dark:text-orange-400"
|
|
3940
3842
|
};
|
|
3941
3843
|
function Wr({ children: e, tone: t = "slate", className: n }) {
|
|
3942
|
-
return /* @__PURE__ */ _(
|
|
3844
|
+
return /* @__PURE__ */ _(fe, {
|
|
3943
3845
|
variant: "outline",
|
|
3944
|
-
className:
|
|
3846
|
+
className: L("rounded-md px-2 py-0.5", Ur[t], n),
|
|
3945
3847
|
children: e
|
|
3946
3848
|
});
|
|
3947
3849
|
}
|
|
@@ -3949,19 +3851,19 @@ function Wr({ children: e, tone: t = "slate", className: n }) {
|
|
|
3949
3851
|
//#region ../../react-app/src/components/table/TextStack.tsx
|
|
3950
3852
|
function K({ primary: e, secondary: t, align: n = "start", tabularNums: r = !1, primaryClassName: i, secondaryClassName: a, className: o }) {
|
|
3951
3853
|
return /* @__PURE__ */ v("div", {
|
|
3952
|
-
className:
|
|
3854
|
+
className: L("flex min-w-0 flex-col leading-tight", n === "end" ? "items-end text-right" : "items-start text-left", r && "tabular-nums", o),
|
|
3953
3855
|
children: [/* @__PURE__ */ _("span", {
|
|
3954
|
-
className:
|
|
3856
|
+
className: L("text-sm text-foreground", i),
|
|
3955
3857
|
children: e
|
|
3956
3858
|
}), t != null && t !== "" && /* @__PURE__ */ _("span", {
|
|
3957
|
-
className:
|
|
3859
|
+
className: L("text-xs text-muted-foreground", a),
|
|
3958
3860
|
children: t
|
|
3959
3861
|
})]
|
|
3960
3862
|
});
|
|
3961
3863
|
}
|
|
3962
3864
|
//#endregion
|
|
3963
3865
|
//#region ../../react-app/src/components/transactions/data.ts
|
|
3964
|
-
var Gr = /* @__PURE__ */
|
|
3866
|
+
var Gr = /* @__PURE__ */ I({
|
|
3965
3867
|
NETWORK_LABELS: () => ai,
|
|
3966
3868
|
SAVED_PRESETS: () => ri,
|
|
3967
3869
|
TRANSACTIONS: () => ni,
|
|
@@ -4443,7 +4345,7 @@ function pi(e) {
|
|
|
4443
4345
|
//#region ../../react-app/src/components/transactions/AssetValue.tsx
|
|
4444
4346
|
function mi({ value: e, code: t, icon: n = !0, className: r }) {
|
|
4445
4347
|
return /* @__PURE__ */ v("span", {
|
|
4446
|
-
className:
|
|
4348
|
+
className: L("flex items-center gap-2", r),
|
|
4447
4349
|
children: [n && /* @__PURE__ */ _(W, {
|
|
4448
4350
|
src: q(t),
|
|
4449
4351
|
code: t,
|
|
@@ -4455,7 +4357,7 @@ function mi({ value: e, code: t, icon: n = !0, className: r }) {
|
|
|
4455
4357
|
//#region ../../react-app/src/components/transactions/DetailField.tsx
|
|
4456
4358
|
function Y({ label: e, show: t = !0, className: n, children: r }) {
|
|
4457
4359
|
return t ? /* @__PURE__ */ v("div", {
|
|
4458
|
-
className:
|
|
4360
|
+
className: L("min-w-0", n),
|
|
4459
4361
|
children: [/* @__PURE__ */ _("div", {
|
|
4460
4362
|
className: "text-xs text-muted-foreground",
|
|
4461
4363
|
children: e
|
|
@@ -4594,7 +4496,7 @@ var _i = {
|
|
|
4594
4496
|
},
|
|
4595
4497
|
flagged: {
|
|
4596
4498
|
label: "Flagged",
|
|
4597
|
-
icon:
|
|
4499
|
+
icon: me,
|
|
4598
4500
|
className: "text-amber-600 dark:text-amber-400"
|
|
4599
4501
|
},
|
|
4600
4502
|
rejected: {
|
|
@@ -4621,7 +4523,7 @@ function yi({ label: e, children: t }) {
|
|
|
4621
4523
|
function bi({ assessment: e, actionRequired: t = !1, onApprove: n, onReject: r, className: i }) {
|
|
4622
4524
|
let { score: a, level: o, decision: s, provider: c, reason: l } = e, u = _i[s];
|
|
4623
4525
|
return /* @__PURE__ */ v("section", {
|
|
4624
|
-
className:
|
|
4526
|
+
className: L("space-y-3", i),
|
|
4625
4527
|
children: [
|
|
4626
4528
|
/* @__PURE__ */ v("div", {
|
|
4627
4529
|
className: "flex items-center justify-between gap-2",
|
|
@@ -4651,7 +4553,7 @@ function bi({ assessment: e, actionRequired: t = !1, onApprove: n, onReject: r,
|
|
|
4651
4553
|
children: [/* @__PURE__ */ _(Hr, { level: o }), /* @__PURE__ */ v("div", {
|
|
4652
4554
|
className: "flex items-baseline gap-1",
|
|
4653
4555
|
children: [/* @__PURE__ */ _("span", {
|
|
4654
|
-
className:
|
|
4556
|
+
className: L("text-3xl font-semibold tabular-nums", vi(a)),
|
|
4655
4557
|
children: a
|
|
4656
4558
|
}), /* @__PURE__ */ _("span", {
|
|
4657
4559
|
className: "text-sm text-muted-foreground",
|
|
@@ -4662,7 +4564,7 @@ function bi({ assessment: e, actionRequired: t = !1, onApprove: n, onReject: r,
|
|
|
4662
4564
|
t ? /* @__PURE__ */ v(g, { children: [
|
|
4663
4565
|
/* @__PURE__ */ v("div", {
|
|
4664
4566
|
className: "flex gap-3",
|
|
4665
|
-
children: [/* @__PURE__ */ v(
|
|
4567
|
+
children: [/* @__PURE__ */ v(B, {
|
|
4666
4568
|
type: "button",
|
|
4667
4569
|
onClick: n,
|
|
4668
4570
|
className: "h-9 flex-1 cursor-pointer bg-emerald-500 text-white hover:bg-emerald-600",
|
|
@@ -4671,7 +4573,7 @@ function bi({ assessment: e, actionRequired: t = !1, onApprove: n, onReject: r,
|
|
|
4671
4573
|
size: 16,
|
|
4672
4574
|
strokeWidth: 2.5
|
|
4673
4575
|
}), "Approve"]
|
|
4674
|
-
}), /* @__PURE__ */ v(
|
|
4576
|
+
}), /* @__PURE__ */ v(B, {
|
|
4675
4577
|
type: "button",
|
|
4676
4578
|
onClick: r,
|
|
4677
4579
|
className: "h-9 flex-1 cursor-pointer bg-red-500 text-white hover:bg-red-600",
|
|
@@ -4698,7 +4600,7 @@ function bi({ assessment: e, actionRequired: t = !1, onApprove: n, onReject: r,
|
|
|
4698
4600
|
children: [/* @__PURE__ */ _(yi, {
|
|
4699
4601
|
label: "Status",
|
|
4700
4602
|
children: /* @__PURE__ */ v("span", {
|
|
4701
|
-
className:
|
|
4603
|
+
className: L("inline-flex items-center gap-1.5 font-medium", u.className),
|
|
4702
4604
|
children: [/* @__PURE__ */ _(x, {
|
|
4703
4605
|
icon: u.icon,
|
|
4704
4606
|
size: 16,
|
|
@@ -4721,7 +4623,7 @@ function bi({ assessment: e, actionRequired: t = !1, onApprove: n, onReject: r,
|
|
|
4721
4623
|
}
|
|
4722
4624
|
//#endregion
|
|
4723
4625
|
//#region ../../react-app/src/components/transactions/statuses.ts
|
|
4724
|
-
var xi = /* @__PURE__ */
|
|
4626
|
+
var xi = /* @__PURE__ */ I({
|
|
4725
4627
|
STATUS_META: () => X,
|
|
4726
4628
|
STATUS_ORDER: () => Si,
|
|
4727
4629
|
TONE_DOT: () => Ci
|
|
@@ -4801,7 +4703,7 @@ var xi = /* @__PURE__ */ F({
|
|
|
4801
4703
|
slate: "bg-slate-400",
|
|
4802
4704
|
violet: "bg-violet-500",
|
|
4803
4705
|
orange: "bg-orange-500"
|
|
4804
|
-
}, wi = /* @__PURE__ */
|
|
4706
|
+
}, wi = /* @__PURE__ */ I({
|
|
4805
4707
|
ASSET_OPTIONS: () => Oi,
|
|
4806
4708
|
EMPTY_FILTER: () => Ti,
|
|
4807
4709
|
RISK_OPTIONS: () => Di,
|
|
@@ -4931,7 +4833,7 @@ function Pi({ open: e, onOpenChange: t, filter: n, onSave: r }) {
|
|
|
4931
4833
|
})]
|
|
4932
4834
|
})]
|
|
4933
4835
|
}),
|
|
4934
|
-
/* @__PURE__ */ _(
|
|
4836
|
+
/* @__PURE__ */ _(ue, {
|
|
4935
4837
|
bleed: "dialog",
|
|
4936
4838
|
actions: [{
|
|
4937
4839
|
key: "cancel",
|
|
@@ -4951,9 +4853,9 @@ function Pi({ open: e, onOpenChange: t, filter: n, onSave: r }) {
|
|
|
4951
4853
|
//#endregion
|
|
4952
4854
|
//#region ../../react-app/src/components/transactions/SavedPresetsBar.tsx
|
|
4953
4855
|
var Fi = {
|
|
4954
|
-
alert:
|
|
4856
|
+
alert: pe,
|
|
4955
4857
|
filter: Ue,
|
|
4956
|
-
deposit:
|
|
4858
|
+
deposit: ye
|
|
4957
4859
|
};
|
|
4958
4860
|
function Ii({ presets: e, activeId: t, getCount: n, onToggle: r, onDelete: i, onCreateView: a, onReset: o, resetDisabled: s = !1 }) {
|
|
4959
4861
|
let [c, l] = d(null);
|
|
@@ -4967,7 +4869,7 @@ function Ii({ presets: e, activeId: t, getCount: n, onToggle: r, onDelete: i, on
|
|
|
4967
4869
|
e.map((e) => /* @__PURE__ */ v("button", {
|
|
4968
4870
|
type: "button",
|
|
4969
4871
|
onClick: () => r(e.id),
|
|
4970
|
-
className:
|
|
4872
|
+
className: L("inline-flex cursor-pointer items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[13px] transition-colors", e.id === t ? "border-cb-blue/40 bg-cb-blue-soft text-cb-blue" : "border-border bg-background text-foreground hover:bg-muted"),
|
|
4971
4873
|
children: [
|
|
4972
4874
|
e.icon && /* @__PURE__ */ _(x, {
|
|
4973
4875
|
icon: Fi[e.icon],
|
|
@@ -5000,7 +4902,7 @@ function Ii({ presets: e, activeId: t, getCount: n, onToggle: r, onDelete: i, on
|
|
|
5000
4902
|
}), /* @__PURE__ */ _(In, { children: "Delete preset" })] })
|
|
5001
4903
|
]
|
|
5002
4904
|
}, e.id)),
|
|
5003
|
-
/* @__PURE__ */ v(
|
|
4905
|
+
/* @__PURE__ */ v(B, {
|
|
5004
4906
|
variant: "ghost",
|
|
5005
4907
|
size: "sm",
|
|
5006
4908
|
className: "cursor-pointer text-muted-foreground",
|
|
@@ -5012,7 +4914,7 @@ function Ii({ presets: e, activeId: t, getCount: n, onToggle: r, onDelete: i, on
|
|
|
5012
4914
|
strokeWidth: 2
|
|
5013
4915
|
}), "Create view"]
|
|
5014
4916
|
}),
|
|
5015
|
-
/* @__PURE__ */ v(
|
|
4917
|
+
/* @__PURE__ */ v(B, {
|
|
5016
4918
|
variant: "ghost",
|
|
5017
4919
|
size: "sm",
|
|
5018
4920
|
className: "cursor-pointer text-muted-foreground",
|
|
@@ -5046,7 +4948,7 @@ function Ii({ presets: e, activeId: t, getCount: n, onToggle: r, onDelete: i, on
|
|
|
5046
4948
|
function Li({ detail: e, show: t, className: n }) {
|
|
5047
4949
|
let r = X[e.status], i = e.amount.trim().startsWith("-"), a = (e) => t?.[e] !== !1;
|
|
5048
4950
|
return /* @__PURE__ */ v("div", {
|
|
5049
|
-
className:
|
|
4951
|
+
className: L("space-y-3", n),
|
|
5050
4952
|
children: [(a("type") || a("status")) && /* @__PURE__ */ v("div", {
|
|
5051
4953
|
className: "flex items-center justify-between gap-3",
|
|
5052
4954
|
children: [a("type") ? /* @__PURE__ */ _(Vr, { type: e.type }) : /* @__PURE__ */ _("span", {}), a("status") && /* @__PURE__ */ _(Wr, {
|
|
@@ -5063,7 +4965,7 @@ function Li({ detail: e, show: t, className: n }) {
|
|
|
5063
4965
|
children: e.currency
|
|
5064
4966
|
})]
|
|
5065
4967
|
}), a("amountFiat") && /* @__PURE__ */ _("div", {
|
|
5066
|
-
className:
|
|
4968
|
+
className: L("mt-0.5 text-sm font-medium tabular-nums", i ? "text-rose-600 dark:text-rose-400" : "text-emerald-600 dark:text-emerald-400"),
|
|
5067
4969
|
children: e.amountFiat
|
|
5068
4970
|
})] })]
|
|
5069
4971
|
});
|
|
@@ -5294,7 +5196,7 @@ function Gi({ open: e, onOpenChange: t, value: n, onApply: r, onSave: i }) {
|
|
|
5294
5196
|
}))
|
|
5295
5197
|
}),
|
|
5296
5198
|
/* @__PURE__ */ _(x, {
|
|
5297
|
-
icon: e.value === "deposit" ?
|
|
5199
|
+
icon: e.value === "deposit" ? ye : we,
|
|
5298
5200
|
size: 16,
|
|
5299
5201
|
strokeWidth: 2,
|
|
5300
5202
|
className: e.value === "deposit" ? "text-emerald-500" : "text-rose-500"
|
|
@@ -5405,19 +5307,19 @@ function Gi({ open: e, onOpenChange: t, value: n, onApply: r, onSave: i }) {
|
|
|
5405
5307
|
mode: "range",
|
|
5406
5308
|
className: "mt-3 rounded-xl border border-cb-line p-3",
|
|
5407
5309
|
selected: {
|
|
5408
|
-
from: a.from ?
|
|
5409
|
-
to: a.to ?
|
|
5310
|
+
from: a.from ? ie(a.from) : void 0,
|
|
5311
|
+
to: a.to ? ie(a.to) : void 0
|
|
5410
5312
|
},
|
|
5411
5313
|
onSelect: (e) => s((t) => ({
|
|
5412
5314
|
...t,
|
|
5413
|
-
from: e?.from ?
|
|
5414
|
-
to: e?.to ?
|
|
5315
|
+
from: e?.from ? j(e.from, "yyyy-MM-dd") : void 0,
|
|
5316
|
+
to: e?.to ? j(e.to, "yyyy-MM-dd") : void 0
|
|
5415
5317
|
}))
|
|
5416
5318
|
})]
|
|
5417
5319
|
})
|
|
5418
5320
|
]
|
|
5419
5321
|
}),
|
|
5420
|
-
/* @__PURE__ */ _(
|
|
5322
|
+
/* @__PURE__ */ _(ue, { actions: [
|
|
5421
5323
|
{
|
|
5422
5324
|
key: "reset",
|
|
5423
5325
|
label: "Reset",
|
|
@@ -5586,7 +5488,7 @@ var qi = [
|
|
|
5586
5488
|
}),
|
|
5587
5489
|
skeleton: /* @__PURE__ */ _(H, { className: "h-4 w-32" })
|
|
5588
5490
|
}
|
|
5589
|
-
], Ji =
|
|
5491
|
+
], Ji = [
|
|
5590
5492
|
{
|
|
5591
5493
|
value: "uid",
|
|
5592
5494
|
label: "UID"
|
|
@@ -5599,12 +5501,12 @@ var qi = [
|
|
|
5599
5501
|
value: "wallet",
|
|
5600
5502
|
label: "Wallet"
|
|
5601
5503
|
}
|
|
5602
|
-
],
|
|
5504
|
+
], Yi = qi.map((e) => ({
|
|
5603
5505
|
id: e.id,
|
|
5604
5506
|
label: e.header,
|
|
5605
5507
|
canHide: e.canHide
|
|
5606
5508
|
}));
|
|
5607
|
-
function
|
|
5509
|
+
function Xi({ data: e, loading: t, onRowClick: n, columnVisibility: r, presets: i }) {
|
|
5608
5510
|
return /* @__PURE__ */ _(Rr, {
|
|
5609
5511
|
columns: qi,
|
|
5610
5512
|
data: e,
|
|
@@ -5613,9 +5515,7 @@ function Zi({ data: e, loading: t, onRowClick: n, query: r, columnVisibility: i,
|
|
|
5613
5515
|
pageSize: 50,
|
|
5614
5516
|
loading: t,
|
|
5615
5517
|
skeletonRows: 12,
|
|
5616
|
-
|
|
5617
|
-
query: r,
|
|
5618
|
-
columnVisibility: i,
|
|
5518
|
+
columnVisibility: r,
|
|
5619
5519
|
onRowClick: n,
|
|
5620
5520
|
emptyMessage: "No transactions match your filters.",
|
|
5621
5521
|
rowLeading: (e) => ii(e) ? /* @__PURE__ */ v(Pn, { children: [/* @__PURE__ */ _(Fn, {
|
|
@@ -5628,22 +5528,22 @@ function Zi({ data: e, loading: t, onRowClick: n, query: r, columnVisibility: i,
|
|
|
5628
5528
|
side: "right",
|
|
5629
5529
|
children: "Action Required"
|
|
5630
5530
|
})] }) : null,
|
|
5631
|
-
toolbarBelow:
|
|
5531
|
+
toolbarBelow: i
|
|
5632
5532
|
});
|
|
5633
5533
|
}
|
|
5634
5534
|
//#endregion
|
|
5635
5535
|
//#region ../../react-app/src/components/transactions/TransactionsTableOptions.tsx
|
|
5636
|
-
var
|
|
5536
|
+
var Zi = [{
|
|
5637
5537
|
value: "all",
|
|
5638
5538
|
label: "All"
|
|
5639
5539
|
}, {
|
|
5640
5540
|
value: "action",
|
|
5641
5541
|
label: "Action Required"
|
|
5642
5542
|
}];
|
|
5643
|
-
function
|
|
5644
|
-
let C = (e) => b?.[e] !== !1, w = n?.find((e) => e.value === r)?.label,
|
|
5543
|
+
function Qi({ search: e, onSearchChange: t, searchScopes: n, searchScope: r, onSearchScopeChange: i, searchPlaceholder: a = "Search...", segment: o, onSegmentChange: s, tabs: c = Zi, tabCounts: l, onFilter: u, filterCount: d = 0, columns: f, columnVisibility: p, onColumnChange: m, onRefresh: h, refreshing: g = !1, onDownload: y, show: b, className: S }) {
|
|
5544
|
+
let C = (e) => b?.[e] !== !1, w = n?.find((e) => e.value === r)?.label, T = w ? `Search by ${w}` : a;
|
|
5645
5545
|
return /* @__PURE__ */ v("div", {
|
|
5646
|
-
className:
|
|
5546
|
+
className: L("mb-2 flex shrink-0 flex-wrap items-center gap-2", S),
|
|
5647
5547
|
children: [
|
|
5648
5548
|
C("search") && /* @__PURE__ */ v("div", {
|
|
5649
5549
|
className: "relative min-w-64 flex-1",
|
|
@@ -5657,8 +5557,8 @@ function $i({ search: e, onSearchChange: t, searchScopes: n, searchScope: r, onS
|
|
|
5657
5557
|
/* @__PURE__ */ _(Wt, {
|
|
5658
5558
|
value: e,
|
|
5659
5559
|
onChange: (e) => t(e.target.value),
|
|
5660
|
-
placeholder:
|
|
5661
|
-
className:
|
|
5560
|
+
placeholder: T,
|
|
5561
|
+
className: L("pl-8 hover:border-slate-300", n && "pr-28")
|
|
5662
5562
|
}),
|
|
5663
5563
|
n && n.length > 0 && /* @__PURE__ */ _("div", {
|
|
5664
5564
|
className: "absolute top-1/2 right-1.5 -translate-y-1/2",
|
|
@@ -5669,7 +5569,7 @@ function $i({ search: e, onSearchChange: t, searchScopes: n, searchScope: r, onS
|
|
|
5669
5569
|
"aria-label": "Search field",
|
|
5670
5570
|
className: "flex cursor-pointer items-center gap-1 rounded-md border-l border-cb-line py-0.5 pr-1 pl-2.5 text-[13px] font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none",
|
|
5671
5571
|
children: [w, /* @__PURE__ */ _(x, {
|
|
5672
|
-
icon:
|
|
5572
|
+
icon: ve,
|
|
5673
5573
|
size: 14,
|
|
5674
5574
|
strokeWidth: 2
|
|
5675
5575
|
})]
|
|
@@ -5697,13 +5597,13 @@ function $i({ search: e, onSearchChange: t, searchScopes: n, searchScope: r, onS
|
|
|
5697
5597
|
return /* @__PURE__ */ v(jn, {
|
|
5698
5598
|
value: e.value,
|
|
5699
5599
|
children: [e.label, t > 0 && /* @__PURE__ */ _("span", {
|
|
5700
|
-
className:
|
|
5600
|
+
className: L("ml-1 inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-cb-blue pt-px text-[11px] font-semibold text-white", r ? "px-1.5" : "px-1"),
|
|
5701
5601
|
children: n
|
|
5702
5602
|
})]
|
|
5703
5603
|
}, e.value);
|
|
5704
5604
|
}) })
|
|
5705
5605
|
}),
|
|
5706
|
-
C("filters") && /* @__PURE__ */ v(
|
|
5606
|
+
C("filters") && /* @__PURE__ */ v(B, {
|
|
5707
5607
|
variant: "outline",
|
|
5708
5608
|
className: "cursor-pointer shadow-xs",
|
|
5709
5609
|
onClick: u,
|
|
@@ -5726,7 +5626,7 @@ function $i({ search: e, onSearchChange: t, searchScopes: n, searchScope: r, onS
|
|
|
5726
5626
|
visible: p,
|
|
5727
5627
|
onChange: m
|
|
5728
5628
|
}),
|
|
5729
|
-
C("refresh") && /* @__PURE__ */ _(
|
|
5629
|
+
C("refresh") && /* @__PURE__ */ _(B, {
|
|
5730
5630
|
variant: "outline",
|
|
5731
5631
|
size: "icon",
|
|
5732
5632
|
"aria-label": "Refresh",
|
|
@@ -5748,14 +5648,14 @@ function $i({ search: e, onSearchChange: t, searchScopes: n, searchScope: r, onS
|
|
|
5748
5648
|
}
|
|
5749
5649
|
//#endregion
|
|
5750
5650
|
//#region ../../react-app/src/components/transactions/types.ts
|
|
5751
|
-
var
|
|
5752
|
-
function
|
|
5651
|
+
var $i = /* @__PURE__ */ I({}), ea = "–";
|
|
5652
|
+
function ta({ children: e }) {
|
|
5753
5653
|
return /* @__PURE__ */ _("span", {
|
|
5754
5654
|
className: "text-muted-foreground",
|
|
5755
5655
|
children: e
|
|
5756
5656
|
});
|
|
5757
5657
|
}
|
|
5758
|
-
var
|
|
5658
|
+
var na = [
|
|
5759
5659
|
{
|
|
5760
5660
|
id: "date",
|
|
5761
5661
|
header: "Date",
|
|
@@ -5767,21 +5667,21 @@ var ra = [
|
|
|
5767
5667
|
{
|
|
5768
5668
|
id: "opening",
|
|
5769
5669
|
header: "Opening Balance",
|
|
5770
|
-
cell: (e) => e.openingBalance ?? /* @__PURE__ */ _(
|
|
5670
|
+
cell: (e) => e.openingBalance ?? /* @__PURE__ */ _(ta, { children: ea })
|
|
5771
5671
|
},
|
|
5772
5672
|
{
|
|
5773
5673
|
id: "closing",
|
|
5774
5674
|
header: "Closing Balance",
|
|
5775
|
-
cell: (e) => e.closingBalance ?? /* @__PURE__ */ _(
|
|
5675
|
+
cell: (e) => e.closingBalance ?? /* @__PURE__ */ _(ta, { children: ea })
|
|
5776
5676
|
},
|
|
5777
5677
|
{
|
|
5778
5678
|
id: "diff",
|
|
5779
5679
|
header: "Diff",
|
|
5780
5680
|
cell: (e) => {
|
|
5781
|
-
if (!e.diff) return /* @__PURE__ */ _(
|
|
5681
|
+
if (!e.diff) return /* @__PURE__ */ _(ta, { children: ea });
|
|
5782
5682
|
let t = e.diff.startsWith("-");
|
|
5783
5683
|
return /* @__PURE__ */ _("span", {
|
|
5784
|
-
className:
|
|
5684
|
+
className: L("font-medium", e.diff === "$0.00" ? "text-muted-foreground" : t ? "text-rose-600 dark:text-rose-400" : "text-emerald-600 dark:text-emerald-400"),
|
|
5785
5685
|
children: e.diff
|
|
5786
5686
|
});
|
|
5787
5687
|
}
|
|
@@ -5807,9 +5707,9 @@ var ra = [
|
|
|
5807
5707
|
cell: (e) => e.otherWithdrawals
|
|
5808
5708
|
}
|
|
5809
5709
|
];
|
|
5810
|
-
function
|
|
5710
|
+
function ra({ data: e, pageSize: t }) {
|
|
5811
5711
|
return /* @__PURE__ */ _(Rr, {
|
|
5812
|
-
columns:
|
|
5712
|
+
columns: na,
|
|
5813
5713
|
data: e,
|
|
5814
5714
|
getRowId: (e) => e.date,
|
|
5815
5715
|
pageSize: t
|
|
@@ -5817,8 +5717,8 @@ function ia({ data: e, pageSize: t }) {
|
|
|
5817
5717
|
}
|
|
5818
5718
|
//#endregion
|
|
5819
5719
|
//#region ../../react-app/src/components/reports/DonutChart.tsx
|
|
5820
|
-
var
|
|
5821
|
-
function
|
|
5720
|
+
var ia = 900;
|
|
5721
|
+
function aa() {
|
|
5822
5722
|
let [e, t] = d(!1);
|
|
5823
5723
|
return o(() => {
|
|
5824
5724
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
@@ -5828,8 +5728,8 @@ function oa() {
|
|
|
5828
5728
|
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
5829
5729
|
}, []), e;
|
|
5830
5730
|
}
|
|
5831
|
-
function
|
|
5832
|
-
let s = e.reduce((e, t) => e + t.value, 0) || 1, c = 50 - n / 2, l = 2 * Math.PI * c, f =
|
|
5731
|
+
function oa({ segments: e, size: t = 148, thickness: n = 20, gap: r = 2, animate: i = !0, className: a }) {
|
|
5732
|
+
let s = e.reduce((e, t) => e + t.value, 0) || 1, c = 50 - n / 2, l = 2 * Math.PI * c, f = aa(), p = i && !f, [m, h] = d(!p);
|
|
5833
5733
|
o(() => {
|
|
5834
5734
|
if (!p) {
|
|
5835
5735
|
h(!0);
|
|
@@ -5858,7 +5758,7 @@ function sa({ segments: e, size: t = 148, thickness: n = 20, gap: r = 2, animate
|
|
|
5858
5758
|
width: t,
|
|
5859
5759
|
height: t,
|
|
5860
5760
|
role: "img",
|
|
5861
|
-
className:
|
|
5761
|
+
className: L("-rotate-90", a),
|
|
5862
5762
|
children: e.map((e) => {
|
|
5863
5763
|
let t = e.value / s * l, i = Math.max(0, t - r), a = S / l, o = t / l;
|
|
5864
5764
|
return S += t, /* @__PURE__ */ _("circle", {
|
|
@@ -5875,7 +5775,7 @@ function sa({ segments: e, size: t = 148, thickness: n = 20, gap: r = 2, animate
|
|
|
5875
5775
|
onMouseLeave: () => b(null),
|
|
5876
5776
|
style: {
|
|
5877
5777
|
strokeDasharray: m ? `${i} ${l - i}` : `0 ${l}`,
|
|
5878
|
-
transition: p ? `stroke-dasharray ${o *
|
|
5778
|
+
transition: p ? `stroke-dasharray ${o * ia}ms linear ${a * ia}ms` : void 0
|
|
5879
5779
|
}
|
|
5880
5780
|
}, e.label);
|
|
5881
5781
|
})
|
|
@@ -5905,12 +5805,12 @@ function sa({ segments: e, size: t = 148, thickness: n = 20, gap: r = 2, animate
|
|
|
5905
5805
|
}
|
|
5906
5806
|
//#endregion
|
|
5907
5807
|
//#region ../../react-app/src/components/reports/ExportHistoryList.tsx
|
|
5908
|
-
var
|
|
5909
|
-
function
|
|
5808
|
+
var sa = "grid grid-cols-[minmax(0,1fr)_140px_180px_auto] items-center gap-4";
|
|
5809
|
+
function ca({ entries: e, onDownload: t, className: n }) {
|
|
5910
5810
|
return /* @__PURE__ */ v("div", {
|
|
5911
|
-
className:
|
|
5811
|
+
className: L("flex flex-col", n),
|
|
5912
5812
|
children: [/* @__PURE__ */ v("div", {
|
|
5913
|
-
className:
|
|
5813
|
+
className: L(sa, "px-1 pb-3 text-sm font-medium text-muted-foreground"),
|
|
5914
5814
|
children: [
|
|
5915
5815
|
/* @__PURE__ */ _("span", { children: "File" }),
|
|
5916
5816
|
/* @__PURE__ */ _("span", { children: "Period" }),
|
|
@@ -5918,7 +5818,7 @@ function la({ entries: e, onDownload: t, className: n }) {
|
|
|
5918
5818
|
/* @__PURE__ */ _("span", { "aria-hidden": !0 })
|
|
5919
5819
|
]
|
|
5920
5820
|
}), e.map((e) => /* @__PURE__ */ v("div", {
|
|
5921
|
-
className:
|
|
5821
|
+
className: L(sa, "border-t border-cb-line px-1 py-3.5 text-sm"),
|
|
5922
5822
|
children: [
|
|
5923
5823
|
/* @__PURE__ */ v("span", {
|
|
5924
5824
|
className: "flex min-w-0 items-center gap-2.5",
|
|
@@ -5941,7 +5841,7 @@ function la({ entries: e, onDownload: t, className: n }) {
|
|
|
5941
5841
|
className: "text-foreground",
|
|
5942
5842
|
children: e.generatedBy
|
|
5943
5843
|
}),
|
|
5944
|
-
/* @__PURE__ */ v(
|
|
5844
|
+
/* @__PURE__ */ v(B, {
|
|
5945
5845
|
variant: "outline",
|
|
5946
5846
|
size: "sm",
|
|
5947
5847
|
className: "cursor-pointer shadow-xs",
|
|
@@ -5959,15 +5859,15 @@ function la({ entries: e, onDownload: t, className: n }) {
|
|
|
5959
5859
|
}
|
|
5960
5860
|
//#endregion
|
|
5961
5861
|
//#region ../../react-app/src/components/reports/presets.ts
|
|
5962
|
-
var
|
|
5963
|
-
ACCOUNT_START: () =>
|
|
5964
|
-
PRESETS: () =>
|
|
5965
|
-
REFERENCE_TODAY: () =>
|
|
5966
|
-
presetPeriod: () =>
|
|
5967
|
-
}),
|
|
5968
|
-
from:
|
|
5862
|
+
var la = /* @__PURE__ */ I({
|
|
5863
|
+
ACCOUNT_START: () => da,
|
|
5864
|
+
PRESETS: () => pa,
|
|
5865
|
+
REFERENCE_TODAY: () => ua,
|
|
5866
|
+
presetPeriod: () => ma
|
|
5867
|
+
}), ua = new Date(2026, 6, 15), da = new Date(2024, 0, 1), fa = (e) => (t) => ({
|
|
5868
|
+
from: P(t, e - 1),
|
|
5969
5869
|
to: t
|
|
5970
|
-
}),
|
|
5870
|
+
}), pa = [
|
|
5971
5871
|
{
|
|
5972
5872
|
id: "today",
|
|
5973
5873
|
label: "Today",
|
|
@@ -5980,43 +5880,43 @@ var ua = /* @__PURE__ */ F({
|
|
|
5980
5880
|
id: "yesterday",
|
|
5981
5881
|
label: "Yesterday",
|
|
5982
5882
|
range: (e) => ({
|
|
5983
|
-
from:
|
|
5984
|
-
to:
|
|
5883
|
+
from: P(e, 1),
|
|
5884
|
+
to: P(e, 1)
|
|
5985
5885
|
})
|
|
5986
5886
|
},
|
|
5987
5887
|
{
|
|
5988
5888
|
id: "today-yesterday",
|
|
5989
5889
|
label: "Today and yesterday",
|
|
5990
5890
|
range: (e) => ({
|
|
5991
|
-
from:
|
|
5891
|
+
from: P(e, 1),
|
|
5992
5892
|
to: e
|
|
5993
5893
|
})
|
|
5994
5894
|
},
|
|
5995
5895
|
{
|
|
5996
5896
|
id: "last-7",
|
|
5997
5897
|
label: "Last 7 days",
|
|
5998
|
-
range:
|
|
5898
|
+
range: fa(7)
|
|
5999
5899
|
},
|
|
6000
5900
|
{
|
|
6001
5901
|
id: "last-14",
|
|
6002
5902
|
label: "Last 14 days",
|
|
6003
|
-
range:
|
|
5903
|
+
range: fa(14)
|
|
6004
5904
|
},
|
|
6005
5905
|
{
|
|
6006
5906
|
id: "last-28",
|
|
6007
5907
|
label: "Last 28 days",
|
|
6008
|
-
range:
|
|
5908
|
+
range: fa(28)
|
|
6009
5909
|
},
|
|
6010
5910
|
{
|
|
6011
5911
|
id: "last-30",
|
|
6012
5912
|
label: "Last 30 days",
|
|
6013
|
-
range:
|
|
5913
|
+
range: fa(30)
|
|
6014
5914
|
},
|
|
6015
5915
|
{
|
|
6016
5916
|
id: "this-week",
|
|
6017
5917
|
label: "This week",
|
|
6018
5918
|
range: (e) => ({
|
|
6019
|
-
from:
|
|
5919
|
+
from: oe(e),
|
|
6020
5920
|
to: e
|
|
6021
5921
|
})
|
|
6022
5922
|
},
|
|
@@ -6024,10 +5924,10 @@ var ua = /* @__PURE__ */ F({
|
|
|
6024
5924
|
id: "last-week",
|
|
6025
5925
|
label: "Last week",
|
|
6026
5926
|
range: (e) => {
|
|
6027
|
-
let t =
|
|
5927
|
+
let t = se(e, 1);
|
|
6028
5928
|
return {
|
|
6029
|
-
from:
|
|
6030
|
-
to:
|
|
5929
|
+
from: oe(t),
|
|
5930
|
+
to: A(t)
|
|
6031
5931
|
};
|
|
6032
5932
|
}
|
|
6033
5933
|
},
|
|
@@ -6035,7 +5935,7 @@ var ua = /* @__PURE__ */ F({
|
|
|
6035
5935
|
id: "this-month",
|
|
6036
5936
|
label: "This month",
|
|
6037
5937
|
range: (e) => ({
|
|
6038
|
-
from:
|
|
5938
|
+
from: ae(e),
|
|
6039
5939
|
to: e
|
|
6040
5940
|
})
|
|
6041
5941
|
},
|
|
@@ -6043,10 +5943,10 @@ var ua = /* @__PURE__ */ F({
|
|
|
6043
5943
|
id: "last-month",
|
|
6044
5944
|
label: "Last month",
|
|
6045
5945
|
range: (e) => {
|
|
6046
|
-
let t =
|
|
5946
|
+
let t = F(e, 1);
|
|
6047
5947
|
return {
|
|
6048
|
-
from:
|
|
6049
|
-
to:
|
|
5948
|
+
from: ae(t),
|
|
5949
|
+
to: k(t)
|
|
6050
5950
|
};
|
|
6051
5951
|
}
|
|
6052
5952
|
},
|
|
@@ -6054,12 +5954,12 @@ var ua = /* @__PURE__ */ F({
|
|
|
6054
5954
|
id: "maximum",
|
|
6055
5955
|
label: "Maximum",
|
|
6056
5956
|
range: (e) => ({
|
|
6057
|
-
from:
|
|
5957
|
+
from: da,
|
|
6058
5958
|
to: e
|
|
6059
5959
|
})
|
|
6060
5960
|
}
|
|
6061
5961
|
];
|
|
6062
|
-
function
|
|
5962
|
+
function ma(e, t = ua) {
|
|
6063
5963
|
let { from: n, to: r } = e.range(t);
|
|
6064
5964
|
return {
|
|
6065
5965
|
mode: "range",
|
|
@@ -6070,7 +5970,7 @@ function ha(e, t = da) {
|
|
|
6070
5970
|
}
|
|
6071
5971
|
//#endregion
|
|
6072
5972
|
//#region ../../react-app/src/components/reports/PeriodPicker.tsx
|
|
6073
|
-
var
|
|
5973
|
+
var ha = [
|
|
6074
5974
|
"Jan",
|
|
6075
5975
|
"Feb",
|
|
6076
5976
|
"Mar",
|
|
@@ -6083,57 +5983,57 @@ var ga = [
|
|
|
6083
5983
|
"Oct",
|
|
6084
5984
|
"Nov",
|
|
6085
5985
|
"Dec"
|
|
6086
|
-
],
|
|
5986
|
+
], ga = {
|
|
6087
5987
|
root: "w-full",
|
|
6088
5988
|
nav: "absolute inset-x-0 top-0 flex items-center justify-between px-1",
|
|
6089
5989
|
caption_label: "text-sm font-semibold text-foreground",
|
|
6090
5990
|
week: "mt-1 flex w-full",
|
|
6091
5991
|
weekday: "flex-1 text-[0.75rem] font-normal text-muted-foreground",
|
|
6092
5992
|
day: "relative flex-1 p-0 text-center text-sm",
|
|
6093
|
-
day_button:
|
|
5993
|
+
day_button: L(z({
|
|
6094
5994
|
variant: "ghost",
|
|
6095
5995
|
size: "icon"
|
|
6096
5996
|
}), "mx-auto size-8 cursor-pointer rounded-md text-sm font-normal")
|
|
6097
5997
|
};
|
|
6098
|
-
function
|
|
5998
|
+
function _a(e) {
|
|
6099
5999
|
return e.mode === "month" ? e.month : e.from;
|
|
6100
6000
|
}
|
|
6101
|
-
function
|
|
6102
|
-
if (e.mode === "month") return
|
|
6001
|
+
function va(e) {
|
|
6002
|
+
if (e.mode === "month") return j(e.month, "MMMM yyyy");
|
|
6103
6003
|
if (e.label) return e.label;
|
|
6104
6004
|
let t = e.from.getFullYear() === e.to.getFullYear();
|
|
6105
|
-
return `${
|
|
6005
|
+
return `${j(e.from, t ? "MMM d" : "MMM d, yyyy")} – ${j(e.to, "MMM d, yyyy")}`;
|
|
6106
6006
|
}
|
|
6107
|
-
function
|
|
6007
|
+
function ya({ value: e, onPick: t, onPreview: n }) {
|
|
6108
6008
|
return /* @__PURE__ */ _(sn, {
|
|
6109
6009
|
className: "h-full w-44 shrink-0 border-r border-cb-line",
|
|
6110
6010
|
viewportClassName: "p-2",
|
|
6111
6011
|
onMouseLeave: () => n(null),
|
|
6112
6012
|
children: /* @__PURE__ */ _("div", {
|
|
6113
6013
|
className: "flex flex-col gap-0.5",
|
|
6114
|
-
children:
|
|
6014
|
+
children: pa.map((r) => /* @__PURE__ */ _("button", {
|
|
6115
6015
|
type: "button",
|
|
6116
6016
|
onClick: () => t(r),
|
|
6117
6017
|
onMouseEnter: () => n(r),
|
|
6118
|
-
className:
|
|
6018
|
+
className: L("shrink-0 cursor-pointer rounded-md px-2.5 py-1.5 text-left text-sm text-foreground transition-colors hover:bg-muted", e.mode === "range" && e.label === r.label && "bg-primary/10 font-medium text-primary hover:bg-primary/10"),
|
|
6119
6019
|
children: r.label
|
|
6120
6020
|
}, r.id))
|
|
6121
6021
|
})
|
|
6122
6022
|
});
|
|
6123
6023
|
}
|
|
6124
|
-
function
|
|
6024
|
+
function ba({ draftMonth: e, today: t, onSelect: n }) {
|
|
6125
6025
|
let [r, i] = d(() => (e ?? t).getFullYear());
|
|
6126
6026
|
return /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("div", {
|
|
6127
6027
|
className: "mb-3 flex items-center justify-between px-1",
|
|
6128
6028
|
children: [
|
|
6129
|
-
/* @__PURE__ */ _(
|
|
6029
|
+
/* @__PURE__ */ _(B, {
|
|
6130
6030
|
variant: "ghost",
|
|
6131
6031
|
size: "icon-xs",
|
|
6132
6032
|
"aria-label": "Previous year",
|
|
6133
6033
|
onClick: () => i((e) => e - 1),
|
|
6134
6034
|
className: "cursor-pointer text-muted-foreground",
|
|
6135
6035
|
children: /* @__PURE__ */ _(x, {
|
|
6136
|
-
icon:
|
|
6036
|
+
icon: be,
|
|
6137
6037
|
size: 16,
|
|
6138
6038
|
color: "currentColor",
|
|
6139
6039
|
strokeWidth: 2
|
|
@@ -6143,7 +6043,7 @@ function xa({ draftMonth: e, today: t, onSelect: n }) {
|
|
|
6143
6043
|
className: "text-sm font-semibold text-foreground",
|
|
6144
6044
|
children: r
|
|
6145
6045
|
}),
|
|
6146
|
-
/* @__PURE__ */ _(
|
|
6046
|
+
/* @__PURE__ */ _(B, {
|
|
6147
6047
|
variant: "ghost",
|
|
6148
6048
|
size: "icon-xs",
|
|
6149
6049
|
"aria-label": "Next year",
|
|
@@ -6159,16 +6059,16 @@ function xa({ draftMonth: e, today: t, onSelect: n }) {
|
|
|
6159
6059
|
]
|
|
6160
6060
|
}), /* @__PURE__ */ _("div", {
|
|
6161
6061
|
className: "grid grid-cols-4 gap-1.5",
|
|
6162
|
-
children:
|
|
6062
|
+
children: ha.map((t, i) => /* @__PURE__ */ _("button", {
|
|
6163
6063
|
type: "button",
|
|
6164
6064
|
onClick: () => n(new Date(r, i, 1)),
|
|
6165
|
-
className:
|
|
6065
|
+
className: L("h-11 cursor-pointer rounded-md text-sm font-medium text-foreground transition-colors hover:bg-muted", !!e && e.getFullYear() === r && e.getMonth() === i && "bg-primary text-primary-foreground hover:bg-primary"),
|
|
6166
6066
|
children: t
|
|
6167
6067
|
}, t))
|
|
6168
6068
|
})] });
|
|
6169
6069
|
}
|
|
6170
|
-
function
|
|
6171
|
-
let [i, a] = d(e.mode === "month" ? "month" : "range"), [o, s] = d(e.mode === "month" ? e.month :
|
|
6070
|
+
function xa({ value: e, today: t, onChange: n, onReset: r }) {
|
|
6071
|
+
let [i, a] = d(e.mode === "month" ? "month" : "range"), [o, s] = d(e.mode === "month" ? e.month : ae(_a(e))), [c, l] = d(e.mode === "range" ? {
|
|
6172
6072
|
from: e.from,
|
|
6173
6073
|
to: e.to
|
|
6174
6074
|
} : void 0), [u, f] = d(null), p = !!c?.from && !!c?.to, m = i === "month" || p;
|
|
@@ -6187,9 +6087,9 @@ function Sa({ value: e, today: t, onChange: n, onReset: r }) {
|
|
|
6187
6087
|
}
|
|
6188
6088
|
return /* @__PURE__ */ v("div", {
|
|
6189
6089
|
className: "flex h-[360px]",
|
|
6190
|
-
children: [/* @__PURE__ */ _(
|
|
6090
|
+
children: [/* @__PURE__ */ _(ya, {
|
|
6191
6091
|
value: e,
|
|
6192
|
-
onPick: (e) => n(
|
|
6092
|
+
onPick: (e) => n(ma(e, t)),
|
|
6193
6093
|
onPreview: h
|
|
6194
6094
|
}), /* @__PURE__ */ v("div", {
|
|
6195
6095
|
className: "flex h-full w-72 flex-col p-3",
|
|
@@ -6213,7 +6113,7 @@ function Sa({ value: e, today: t, onChange: n, onReset: r }) {
|
|
|
6213
6113
|
/* @__PURE__ */ _(Mn, {
|
|
6214
6114
|
value: "month",
|
|
6215
6115
|
className: "mt-1 flex-1",
|
|
6216
|
-
children: /* @__PURE__ */ _(
|
|
6116
|
+
children: /* @__PURE__ */ _(ba, {
|
|
6217
6117
|
draftMonth: o,
|
|
6218
6118
|
today: t,
|
|
6219
6119
|
onSelect: s
|
|
@@ -6228,20 +6128,20 @@ function Sa({ value: e, today: t, onChange: n, onReset: r }) {
|
|
|
6228
6128
|
onSelect: (e) => {
|
|
6229
6129
|
f(null), l(e);
|
|
6230
6130
|
},
|
|
6231
|
-
defaultMonth:
|
|
6131
|
+
defaultMonth: _a(e),
|
|
6232
6132
|
className: "w-full p-0",
|
|
6233
|
-
classNames:
|
|
6133
|
+
classNames: ga
|
|
6234
6134
|
})
|
|
6235
6135
|
})
|
|
6236
6136
|
]
|
|
6237
6137
|
}), /* @__PURE__ */ v("div", {
|
|
6238
6138
|
className: "flex items-center justify-end gap-2 pt-3",
|
|
6239
|
-
children: [/* @__PURE__ */ _(
|
|
6139
|
+
children: [/* @__PURE__ */ _(B, {
|
|
6240
6140
|
variant: "ghost",
|
|
6241
6141
|
onClick: r,
|
|
6242
6142
|
className: "cursor-pointer text-foreground hover:bg-muted",
|
|
6243
6143
|
children: "Reset"
|
|
6244
|
-
}), /* @__PURE__ */ _(
|
|
6144
|
+
}), /* @__PURE__ */ _(B, {
|
|
6245
6145
|
disabled: !m,
|
|
6246
6146
|
onClick: g,
|
|
6247
6147
|
className: "cursor-pointer",
|
|
@@ -6251,24 +6151,24 @@ function Sa({ value: e, today: t, onChange: n, onReset: r }) {
|
|
|
6251
6151
|
})]
|
|
6252
6152
|
});
|
|
6253
6153
|
}
|
|
6254
|
-
function
|
|
6154
|
+
function Sa({ value: e, onChange: t, today: n = ua, className: r }) {
|
|
6255
6155
|
let [i, a] = d(!1);
|
|
6256
6156
|
function o(n) {
|
|
6257
6157
|
if (e.mode === "month") t({
|
|
6258
6158
|
mode: "month",
|
|
6259
|
-
month: n === 1 ?
|
|
6159
|
+
month: n === 1 ? te(e.month, 1) : F(e.month, 1)
|
|
6260
6160
|
});
|
|
6261
6161
|
else {
|
|
6262
|
-
let r =
|
|
6162
|
+
let r = ne(e.to, e.from) + 1;
|
|
6263
6163
|
t({
|
|
6264
6164
|
mode: "range",
|
|
6265
|
-
from:
|
|
6266
|
-
to:
|
|
6165
|
+
from: O(e.from, n * r),
|
|
6166
|
+
to: O(e.to, n * r)
|
|
6267
6167
|
});
|
|
6268
6168
|
}
|
|
6269
6169
|
}
|
|
6270
6170
|
return /* @__PURE__ */ v("div", {
|
|
6271
|
-
className:
|
|
6171
|
+
className: L("inline-flex h-8 items-center rounded-lg border border-cb-line bg-cb-card shadow-xs", r),
|
|
6272
6172
|
children: [/* @__PURE__ */ v($t, {
|
|
6273
6173
|
open: i,
|
|
6274
6174
|
onOpenChange: a,
|
|
@@ -6283,12 +6183,12 @@ function Ca({ value: e, onChange: t, today: n = da, className: r }) {
|
|
|
6283
6183
|
color: "currentColor",
|
|
6284
6184
|
strokeWidth: 2,
|
|
6285
6185
|
className: "text-muted-foreground"
|
|
6286
|
-
}),
|
|
6186
|
+
}), va(e)]
|
|
6287
6187
|
})
|
|
6288
6188
|
}), /* @__PURE__ */ _(nn, {
|
|
6289
6189
|
align: "end",
|
|
6290
6190
|
className: "w-auto p-0",
|
|
6291
|
-
children: /* @__PURE__ */ _(
|
|
6191
|
+
children: /* @__PURE__ */ _(xa, {
|
|
6292
6192
|
value: e,
|
|
6293
6193
|
today: n,
|
|
6294
6194
|
onChange: (e) => {
|
|
@@ -6297,7 +6197,7 @@ function Ca({ value: e, onChange: t, today: n = da, className: r }) {
|
|
|
6297
6197
|
onReset: () => {
|
|
6298
6198
|
t({
|
|
6299
6199
|
mode: "month",
|
|
6300
|
-
month:
|
|
6200
|
+
month: ae(n)
|
|
6301
6201
|
}), a(!1);
|
|
6302
6202
|
}
|
|
6303
6203
|
})
|
|
@@ -6310,7 +6210,7 @@ function Ca({ value: e, onChange: t, today: n = da, className: r }) {
|
|
|
6310
6210
|
onClick: () => o(-1),
|
|
6311
6211
|
className: "flex h-full w-7 cursor-pointer items-center justify-center text-muted-foreground transition-colors hover:text-foreground",
|
|
6312
6212
|
children: /* @__PURE__ */ _(x, {
|
|
6313
|
-
icon:
|
|
6213
|
+
icon: be,
|
|
6314
6214
|
size: 16,
|
|
6315
6215
|
color: "currentColor",
|
|
6316
6216
|
strokeWidth: 2
|
|
@@ -6332,25 +6232,25 @@ function Ca({ value: e, onChange: t, today: n = da, className: r }) {
|
|
|
6332
6232
|
}
|
|
6333
6233
|
//#endregion
|
|
6334
6234
|
//#region ../../react-app/src/components/reports/data.ts
|
|
6335
|
-
var
|
|
6336
|
-
ASSET_COLORS: () =>
|
|
6337
|
-
ASSET_COLOR_FALLBACK: () =>
|
|
6338
|
-
DAILY_BALANCES: () =>
|
|
6339
|
-
EXPORT_HISTORY: () =>
|
|
6340
|
-
REPORT_SUMMARIES: () =>
|
|
6341
|
-
assetColor: () =>
|
|
6342
|
-
}),
|
|
6235
|
+
var Ca = /* @__PURE__ */ I({
|
|
6236
|
+
ASSET_COLORS: () => wa,
|
|
6237
|
+
ASSET_COLOR_FALLBACK: () => Ta,
|
|
6238
|
+
DAILY_BALANCES: () => Oa,
|
|
6239
|
+
EXPORT_HISTORY: () => ka,
|
|
6240
|
+
REPORT_SUMMARIES: () => Da,
|
|
6241
|
+
assetColor: () => Ea
|
|
6242
|
+
}), wa = {
|
|
6343
6243
|
USDT: "#2B7DE7",
|
|
6344
6244
|
USDC: "#38BDF8",
|
|
6345
6245
|
BTC: "#3730A3",
|
|
6346
6246
|
ETH: "#7C6BF5",
|
|
6347
6247
|
SOL: "#22D3EE",
|
|
6348
6248
|
XRP: "#C4B5FD"
|
|
6349
|
-
},
|
|
6350
|
-
function
|
|
6351
|
-
return
|
|
6249
|
+
}, Ta = "#94A3B8";
|
|
6250
|
+
function Ea(e) {
|
|
6251
|
+
return wa[e] ?? "#94A3B8";
|
|
6352
6252
|
}
|
|
6353
|
-
var
|
|
6253
|
+
var Da = [
|
|
6354
6254
|
{
|
|
6355
6255
|
label: "Total Volume",
|
|
6356
6256
|
total: "$1,284.60",
|
|
@@ -6437,7 +6337,7 @@ var Oa = [
|
|
|
6437
6337
|
}
|
|
6438
6338
|
]
|
|
6439
6339
|
}
|
|
6440
|
-
],
|
|
6340
|
+
], Oa = [
|
|
6441
6341
|
{
|
|
6442
6342
|
date: "2026-07-02",
|
|
6443
6343
|
openingBalance: null,
|
|
@@ -6468,7 +6368,7 @@ var Oa = [
|
|
|
6468
6368
|
otherDeposits: "$0.00",
|
|
6469
6369
|
otherWithdrawals: "$0.00"
|
|
6470
6370
|
}
|
|
6471
|
-
],
|
|
6371
|
+
], ka = [
|
|
6472
6372
|
{
|
|
6473
6373
|
id: "daily-balances-jun-2026",
|
|
6474
6374
|
file: "daily-balances-jun-2026.csv",
|
|
@@ -6490,7 +6390,7 @@ var Oa = [
|
|
|
6490
6390
|
];
|
|
6491
6391
|
//#endregion
|
|
6492
6392
|
//#region ../../react-app/src/components/reports/ReportSummaryCard.tsx
|
|
6493
|
-
function
|
|
6393
|
+
function Aa({ summary: e }) {
|
|
6494
6394
|
return /* @__PURE__ */ _("div", {
|
|
6495
6395
|
className: "flex flex-wrap justify-center gap-x-4 gap-y-1.5",
|
|
6496
6396
|
children: e.slices.map((e) => /* @__PURE__ */ v("span", {
|
|
@@ -6498,7 +6398,7 @@ function ja({ summary: e }) {
|
|
|
6498
6398
|
children: [
|
|
6499
6399
|
/* @__PURE__ */ _("span", {
|
|
6500
6400
|
className: "size-2 shrink-0 rounded-full",
|
|
6501
|
-
style: { backgroundColor:
|
|
6401
|
+
style: { backgroundColor: Ea(e.code) }
|
|
6502
6402
|
}),
|
|
6503
6403
|
/* @__PURE__ */ _("span", {
|
|
6504
6404
|
className: "text-muted-foreground",
|
|
@@ -6512,39 +6412,39 @@ function ja({ summary: e }) {
|
|
|
6512
6412
|
}, e.code))
|
|
6513
6413
|
});
|
|
6514
6414
|
}
|
|
6515
|
-
function
|
|
6415
|
+
function ja({ summary: e, emphasized: t = !0, className: n }) {
|
|
6516
6416
|
let r = e.slices.map((e) => ({
|
|
6517
6417
|
label: e.code,
|
|
6518
6418
|
value: e.percent,
|
|
6519
|
-
color:
|
|
6419
|
+
color: Ea(e.code),
|
|
6520
6420
|
detail: e.amount ? `${e.amount} · ${e.percent}%` : `${e.percent}%`
|
|
6521
6421
|
}));
|
|
6522
6422
|
return /* @__PURE__ */ v("div", {
|
|
6523
|
-
className:
|
|
6423
|
+
className: L("flex flex-col px-5 py-4", n),
|
|
6524
6424
|
children: [
|
|
6525
6425
|
/* @__PURE__ */ _("span", {
|
|
6526
6426
|
className: "text-sm font-medium text-muted-foreground",
|
|
6527
6427
|
children: e.label
|
|
6528
6428
|
}),
|
|
6529
6429
|
/* @__PURE__ */ _("span", {
|
|
6530
|
-
className:
|
|
6430
|
+
className: L("mt-1 text-[2rem] leading-tight text-foreground", t ? "font-semibold" : "font-normal"),
|
|
6531
6431
|
children: e.total
|
|
6532
6432
|
}),
|
|
6533
6433
|
/* @__PURE__ */ _("div", {
|
|
6534
6434
|
className: "mt-4 flex justify-center",
|
|
6535
|
-
children: /* @__PURE__ */ _(
|
|
6435
|
+
children: /* @__PURE__ */ _(oa, { segments: r })
|
|
6536
6436
|
}),
|
|
6537
6437
|
/* @__PURE__ */ _("div", {
|
|
6538
6438
|
className: "mt-5",
|
|
6539
|
-
children: /* @__PURE__ */ _(
|
|
6439
|
+
children: /* @__PURE__ */ _(Aa, { summary: e })
|
|
6540
6440
|
})
|
|
6541
6441
|
]
|
|
6542
6442
|
});
|
|
6543
6443
|
}
|
|
6544
|
-
function
|
|
6444
|
+
function Ma({ summaries: e, className: t }) {
|
|
6545
6445
|
return /* @__PURE__ */ _("div", {
|
|
6546
|
-
className:
|
|
6547
|
-
children: e.map((e, t) => /* @__PURE__ */ _(
|
|
6446
|
+
className: L("grid grid-cols-1 divide-y divide-cb-line rounded-2xl border border-cb-line bg-cb-card shadow-xs lg:grid-cols-3 lg:divide-x lg:divide-y-0", t),
|
|
6447
|
+
children: e.map((e, t) => /* @__PURE__ */ _(ja, {
|
|
6548
6448
|
summary: e,
|
|
6549
6449
|
emphasized: t === 0
|
|
6550
6450
|
}, e.label))
|
|
@@ -6552,13 +6452,13 @@ function Na({ summaries: e, className: t }) {
|
|
|
6552
6452
|
}
|
|
6553
6453
|
//#endregion
|
|
6554
6454
|
//#region ../../react-app/src/components/reports/ReportsSummaryEmpty.tsx
|
|
6555
|
-
function
|
|
6455
|
+
function Na({ className: e }) {
|
|
6556
6456
|
return /* @__PURE__ */ v("div", {
|
|
6557
|
-
className:
|
|
6457
|
+
className: L("flex flex-col items-center justify-center gap-3 rounded-2xl border border-cb-line bg-cb-card px-6 py-16 text-center shadow-xs", e),
|
|
6558
6458
|
children: [/* @__PURE__ */ _("div", {
|
|
6559
6459
|
className: "flex size-12 items-center justify-center rounded-full bg-muted text-muted-foreground",
|
|
6560
6460
|
children: /* @__PURE__ */ _(x, {
|
|
6561
|
-
icon:
|
|
6461
|
+
icon: he,
|
|
6562
6462
|
size: 24,
|
|
6563
6463
|
color: "currentColor",
|
|
6564
6464
|
strokeWidth: 2
|
|
@@ -6574,18 +6474,18 @@ function Pa({ className: e }) {
|
|
|
6574
6474
|
}
|
|
6575
6475
|
//#endregion
|
|
6576
6476
|
//#region ../../react-app/src/components/reports/types.ts
|
|
6577
|
-
var
|
|
6578
|
-
default: () =>
|
|
6579
|
-
getReportData: () =>
|
|
6580
|
-
}),
|
|
6477
|
+
var Pa = /* @__PURE__ */ I({}), Fa = /* @__PURE__ */ I({
|
|
6478
|
+
default: () => Xa,
|
|
6479
|
+
getReportData: () => Xa
|
|
6480
|
+
}), Ia = [
|
|
6581
6481
|
"USDT",
|
|
6582
6482
|
"USDC",
|
|
6583
6483
|
"BTC",
|
|
6584
6484
|
"ETH",
|
|
6585
6485
|
"SOL",
|
|
6586
6486
|
"XRP"
|
|
6587
|
-
],
|
|
6588
|
-
function
|
|
6487
|
+
], La = da, Ra = ua;
|
|
6488
|
+
function za(e) {
|
|
6589
6489
|
let t = e >>> 0;
|
|
6590
6490
|
return () => {
|
|
6591
6491
|
t |= 0, t = t + 1831565813 | 0;
|
|
@@ -6593,15 +6493,15 @@ function Ba(e) {
|
|
|
6593
6493
|
return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
6594
6494
|
};
|
|
6595
6495
|
}
|
|
6596
|
-
function
|
|
6496
|
+
function Ba(e) {
|
|
6597
6497
|
if (e.mode === "month") return e.month.getFullYear() * 100 + (e.month.getMonth() + 1);
|
|
6598
6498
|
let t = 864e5, n = Math.floor(e.from.getTime() / t), r = Math.floor(e.to.getTime() / t);
|
|
6599
6499
|
return n % 1e5 * 1e3 + r % 1e3;
|
|
6600
6500
|
}
|
|
6601
|
-
function
|
|
6501
|
+
function Va(e) {
|
|
6602
6502
|
return e.mode === "month" ? {
|
|
6603
|
-
start:
|
|
6604
|
-
end:
|
|
6503
|
+
start: ae(e.month),
|
|
6504
|
+
end: k(e.month)
|
|
6605
6505
|
} : {
|
|
6606
6506
|
start: e.from,
|
|
6607
6507
|
end: e.to
|
|
@@ -6616,16 +6516,16 @@ function Q(e) {
|
|
|
6616
6516
|
maximumFractionDigits: 2
|
|
6617
6517
|
})}`;
|
|
6618
6518
|
}
|
|
6619
|
-
function
|
|
6519
|
+
function Ha(e) {
|
|
6620
6520
|
return Math.round(e).toLocaleString("en-US");
|
|
6621
6521
|
}
|
|
6622
|
-
function
|
|
6522
|
+
function Ua(e, t) {
|
|
6623
6523
|
let n = t.reduce((e, t) => e + t, 0) || 1, r = t.map((t) => Math.round(e * t * 100 / n)), i = Math.round(e * 100) - r.reduce((e, t) => e + t, 0), a = 0;
|
|
6624
6524
|
return r.forEach((e, t) => {
|
|
6625
6525
|
e > r[a] && (a = t);
|
|
6626
6526
|
}), r[a] += i, r.map((e) => e / 100);
|
|
6627
6527
|
}
|
|
6628
|
-
function
|
|
6528
|
+
function Wa(e, t) {
|
|
6629
6529
|
let n = t.reduce((e, t) => e + t, 0) || 1, r = t.map((t) => e * t / n), i = r.map(Math.floor), a = e - i.reduce((e, t) => e + t, 0), o = r.map((e, t) => ({
|
|
6630
6530
|
i: t,
|
|
6631
6531
|
frac: e - Math.floor(e)
|
|
@@ -6633,7 +6533,7 @@ function Ga(e, t) {
|
|
|
6633
6533
|
for (let e = 0; e < a && e < o.length; e++) s[o[e].i]++;
|
|
6634
6534
|
return s;
|
|
6635
6535
|
}
|
|
6636
|
-
function
|
|
6536
|
+
function Ga(e, t) {
|
|
6637
6537
|
if (t <= 0) return e.map(() => 0);
|
|
6638
6538
|
let n = e.map((e) => e / t * 100), r = n.map(Math.floor), i = 100 - r.reduce((e, t) => e + t, 0), a = n.map((e, t) => ({
|
|
6639
6539
|
i: t,
|
|
@@ -6642,8 +6542,8 @@ function Ka(e, t) {
|
|
|
6642
6542
|
for (let e = 0; e < i && e < a.length; e++) o[a[e].i]++;
|
|
6643
6543
|
return o;
|
|
6644
6544
|
}
|
|
6645
|
-
function
|
|
6646
|
-
let i =
|
|
6545
|
+
function Ka(e, t, n, r) {
|
|
6546
|
+
let i = Ga(n, t), a = Ia.map((e, t) => ({
|
|
6647
6547
|
code: e,
|
|
6648
6548
|
percent: i[t],
|
|
6649
6549
|
amount: r(n[t])
|
|
@@ -6654,7 +6554,7 @@ function qa(e, t, n, r) {
|
|
|
6654
6554
|
slices: a
|
|
6655
6555
|
};
|
|
6656
6556
|
}
|
|
6657
|
-
function
|
|
6557
|
+
function qa(e) {
|
|
6658
6558
|
return e === "transactions" ? [
|
|
6659
6559
|
"Total Transactions",
|
|
6660
6560
|
"Total Deposits",
|
|
@@ -6665,22 +6565,22 @@ function Ja(e) {
|
|
|
6665
6565
|
"Total Withdrawals"
|
|
6666
6566
|
];
|
|
6667
6567
|
}
|
|
6668
|
-
function
|
|
6568
|
+
function Ja(e) {
|
|
6669
6569
|
let t = e === "transactions" ? "0" : "$0.00";
|
|
6670
|
-
return
|
|
6570
|
+
return qa(e).map((e) => ({
|
|
6671
6571
|
label: e,
|
|
6672
6572
|
total: t,
|
|
6673
6573
|
slices: []
|
|
6674
6574
|
}));
|
|
6675
6575
|
}
|
|
6676
|
-
function
|
|
6677
|
-
let r = (e) => n() < e, i =
|
|
6576
|
+
function Ya(e, t, n) {
|
|
6577
|
+
let r = (e) => n() < e, i = re({
|
|
6678
6578
|
start: e,
|
|
6679
6579
|
end: t
|
|
6680
6580
|
}), a = Z(600 + n() * 150);
|
|
6681
6581
|
return i.map((e) => {
|
|
6682
6582
|
let t = r(.65) ? Z(n() * 60) : 0, i = r(.5) ? Z(n() * 40) : 0, o = r(.15) ? Z(n() * 20) : 0, s = r(.15) ? Z(n() * 15) : 0, c = Z(t + o - i - s), l = Z(a + c), u = {
|
|
6683
|
-
date:
|
|
6583
|
+
date: j(e, "yyyy-MM-dd"),
|
|
6684
6584
|
openingBalance: Q(a),
|
|
6685
6585
|
closingBalance: Q(l),
|
|
6686
6586
|
diff: Q(c),
|
|
@@ -6692,40 +6592,40 @@ function Xa(e, t, n) {
|
|
|
6692
6592
|
return a = l, u;
|
|
6693
6593
|
}).reverse();
|
|
6694
6594
|
}
|
|
6695
|
-
function
|
|
6696
|
-
let { start: n, end: r } =
|
|
6595
|
+
function Xa(e, t = "volume") {
|
|
6596
|
+
let { start: n, end: r } = Va(e), i = M([n, La]), a = N([r, Ra]), o = a >= i ? ne(a, i) + 1 : 0;
|
|
6697
6597
|
if (o <= 0) return {
|
|
6698
6598
|
isEmpty: !0,
|
|
6699
|
-
summaries:
|
|
6599
|
+
summaries: Ja(t),
|
|
6700
6600
|
dailyBalances: []
|
|
6701
6601
|
};
|
|
6702
|
-
let s =
|
|
6602
|
+
let s = Ya(i, a, za(Ba(e))), c = za(Ba(e) + (t === "transactions" ? 4242 : 0)), l = Ia.map(() => c() + .1), u = Ia.map(() => c() + .1), [d, f, p] = qa(t);
|
|
6703
6603
|
if (t === "transactions") {
|
|
6704
|
-
let e = Math.max(1, Math.round(o * (6 + c() * 8))), t = Math.round(e * (.2 + c() * .3)), n =
|
|
6604
|
+
let e = Math.max(1, Math.round(o * (6 + c() * 8))), t = Math.round(e * (.2 + c() * .3)), n = Wa(e, l), r = Wa(t, u), i = n.map((e, t) => e + r[t]);
|
|
6705
6605
|
return {
|
|
6706
6606
|
isEmpty: !1,
|
|
6707
6607
|
summaries: [
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6608
|
+
Ka(d, e + t, i, Ha),
|
|
6609
|
+
Ka(f, e, n, Ha),
|
|
6610
|
+
Ka(p, t, r, Ha)
|
|
6711
6611
|
],
|
|
6712
6612
|
dailyBalances: s
|
|
6713
6613
|
};
|
|
6714
6614
|
}
|
|
6715
|
-
let m = Z(o * (8 + c() * 6)), h = Z(m * (.15 + c() * .22)), g =
|
|
6615
|
+
let m = Z(o * (8 + c() * 6)), h = Z(m * (.15 + c() * .22)), g = Ua(m, l), _ = Ua(h, u), v = g.map((e, t) => Z(e + _[t]));
|
|
6716
6616
|
return {
|
|
6717
6617
|
isEmpty: !1,
|
|
6718
6618
|
summaries: [
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6619
|
+
Ka(d, Z(m + h), v, Q),
|
|
6620
|
+
Ka(f, m, g, Q),
|
|
6621
|
+
Ka(p, h, _, Q)
|
|
6722
6622
|
],
|
|
6723
6623
|
dailyBalances: s
|
|
6724
6624
|
};
|
|
6725
6625
|
}
|
|
6726
6626
|
//#endregion
|
|
6727
6627
|
//#region ../../react-app/src/components/balances/WalletRowActions.tsx
|
|
6728
|
-
var
|
|
6628
|
+
var Za = [
|
|
6729
6629
|
{
|
|
6730
6630
|
id: "withdraw",
|
|
6731
6631
|
label: "Withdraw",
|
|
@@ -6734,7 +6634,7 @@ var Qa = [
|
|
|
6734
6634
|
{
|
|
6735
6635
|
id: "deposit",
|
|
6736
6636
|
label: "Deposit",
|
|
6737
|
-
icon:
|
|
6637
|
+
icon: ye
|
|
6738
6638
|
},
|
|
6739
6639
|
{
|
|
6740
6640
|
id: "convert",
|
|
@@ -6742,12 +6642,12 @@ var Qa = [
|
|
|
6742
6642
|
icon: Se
|
|
6743
6643
|
}
|
|
6744
6644
|
];
|
|
6745
|
-
function
|
|
6645
|
+
function Qa({ variant: e = "menu", label: t, onAction: n }) {
|
|
6746
6646
|
return e === "icons" ? /* @__PURE__ */ _("div", {
|
|
6747
6647
|
className: "flex items-center justify-end gap-0.5",
|
|
6748
|
-
children:
|
|
6648
|
+
children: Za.map(({ id: e, label: r, icon: i }) => /* @__PURE__ */ v(Pn, { children: [/* @__PURE__ */ _(Fn, {
|
|
6749
6649
|
asChild: !0,
|
|
6750
|
-
children: /* @__PURE__ */ _(
|
|
6650
|
+
children: /* @__PURE__ */ _(B, {
|
|
6751
6651
|
variant: "ghost",
|
|
6752
6652
|
size: "icon-sm",
|
|
6753
6653
|
"aria-label": t ? `${r} — ${t}` : r,
|
|
@@ -6765,7 +6665,7 @@ function $a({ variant: e = "menu", label: t, onAction: n }) {
|
|
|
6765
6665
|
className: "flex justify-end",
|
|
6766
6666
|
children: /* @__PURE__ */ v(Mt, { children: [/* @__PURE__ */ _(Nt, {
|
|
6767
6667
|
asChild: !0,
|
|
6768
|
-
children: /* @__PURE__ */ _(
|
|
6668
|
+
children: /* @__PURE__ */ _(B, {
|
|
6769
6669
|
variant: "ghost",
|
|
6770
6670
|
size: "icon-sm",
|
|
6771
6671
|
"aria-label": t ? `Actions — ${t}` : "Actions",
|
|
@@ -6780,7 +6680,7 @@ function $a({ variant: e = "menu", label: t, onAction: n }) {
|
|
|
6780
6680
|
}), /* @__PURE__ */ _(Ft, {
|
|
6781
6681
|
align: "end",
|
|
6782
6682
|
className: "min-w-[11rem] p-1.5",
|
|
6783
|
-
children:
|
|
6683
|
+
children: Za.map(({ id: e, label: t, icon: r }) => /* @__PURE__ */ v(It, {
|
|
6784
6684
|
onSelect: () => n?.(e),
|
|
6785
6685
|
className: "cursor-pointer gap-2.5 rounded-md px-2.5 py-2 text-sm",
|
|
6786
6686
|
children: [/* @__PURE__ */ _(x, {
|
|
@@ -6796,58 +6696,58 @@ function $a({ variant: e = "menu", label: t, onAction: n }) {
|
|
|
6796
6696
|
}
|
|
6797
6697
|
//#endregion
|
|
6798
6698
|
//#region ../../react-app/src/components/balances/WalletBalancesTable.tsx
|
|
6799
|
-
var
|
|
6699
|
+
var $a = (e) => e && parseFloat(e.replace(/[^0-9.-]/g, "")) || 0, eo = (e) => {
|
|
6800
6700
|
let t = e.indexOf(".");
|
|
6801
6701
|
return t < 0 ? 0 : e.length - t - 1;
|
|
6802
|
-
},
|
|
6702
|
+
}, to = (e, t) => e.toLocaleString("en-US", {
|
|
6803
6703
|
minimumFractionDigits: t,
|
|
6804
6704
|
maximumFractionDigits: t
|
|
6805
|
-
}),
|
|
6705
|
+
}), no = (e) => e.toLocaleString("en-US", {
|
|
6806
6706
|
style: "currency",
|
|
6807
6707
|
currency: "USD"
|
|
6808
|
-
}),
|
|
6809
|
-
function
|
|
6708
|
+
}), ro = (e) => e.name.toLowerCase().includes("payout");
|
|
6709
|
+
function io(e, t) {
|
|
6810
6710
|
let n = e.filter(Boolean);
|
|
6811
6711
|
if (n.length === 0) return;
|
|
6812
|
-
let r = n.reduce((e, t) => e +
|
|
6712
|
+
let r = n.reduce((e, t) => e + $a(t.pending), 0);
|
|
6813
6713
|
return {
|
|
6814
|
-
amount:
|
|
6815
|
-
fiat:
|
|
6816
|
-
pending: r > 0 ?
|
|
6817
|
-
pendingFiat: r > 0 ?
|
|
6714
|
+
amount: to(n.reduce((e, t) => e + $a(t.amount), 0), t),
|
|
6715
|
+
fiat: no(n.reduce((e, t) => e + $a(t.amountFiat), 0)),
|
|
6716
|
+
pending: r > 0 ? to(r, t) : void 0,
|
|
6717
|
+
pendingFiat: r > 0 ? no(n.reduce((e, t) => e + $a(t.pendingFiat), 0)) : void 0
|
|
6818
6718
|
};
|
|
6819
6719
|
}
|
|
6820
|
-
var
|
|
6821
|
-
let t = e?.note ?
|
|
6822
|
-
return t > 0 &&
|
|
6720
|
+
var ao = (e) => {
|
|
6721
|
+
let t = e?.note ? $a(e.note) : 0;
|
|
6722
|
+
return t > 0 && $a(e?.amountFiat) < t;
|
|
6823
6723
|
};
|
|
6824
|
-
function
|
|
6825
|
-
let t =
|
|
6826
|
-
for (let t of e.wallets) r[t.network] || (r[t.network] = { networkName: t.networkName }, n.push(t.network)),
|
|
6724
|
+
function oo(e) {
|
|
6725
|
+
let t = eo(e.wallets[0]?.amount ?? "0"), n = [], r = {};
|
|
6726
|
+
for (let t of e.wallets) r[t.network] || (r[t.network] = { networkName: t.networkName }, n.push(t.network)), ro(t) ? r[t.network].payout = t : r[t.network].main = t;
|
|
6827
6727
|
let i = n.map((e) => {
|
|
6828
6728
|
let n = r[e];
|
|
6829
6729
|
return {
|
|
6830
6730
|
network: e,
|
|
6831
6731
|
networkName: n.networkName,
|
|
6832
|
-
main:
|
|
6833
|
-
payout:
|
|
6834
|
-
total:
|
|
6835
|
-
belowMin:
|
|
6732
|
+
main: io([n.main], t),
|
|
6733
|
+
payout: io([n.payout], t),
|
|
6734
|
+
total: io([n.main, n.payout], t),
|
|
6735
|
+
belowMin: ao(n.main) || ao(n.payout)
|
|
6836
6736
|
};
|
|
6837
6737
|
}), a = {
|
|
6838
|
-
amount:
|
|
6839
|
-
fiat:
|
|
6738
|
+
amount: to(0, t),
|
|
6739
|
+
fiat: no(0)
|
|
6840
6740
|
};
|
|
6841
6741
|
return {
|
|
6842
6742
|
code: e.code,
|
|
6843
6743
|
networkCount: n.length,
|
|
6844
|
-
main:
|
|
6845
|
-
payout:
|
|
6846
|
-
total:
|
|
6744
|
+
main: io(e.wallets.filter((e) => !ro(e)), t) ?? a,
|
|
6745
|
+
payout: io(e.wallets.filter(ro), t) ?? a,
|
|
6746
|
+
total: io(e.wallets, t),
|
|
6847
6747
|
networks: i
|
|
6848
6748
|
};
|
|
6849
6749
|
}
|
|
6850
|
-
function
|
|
6750
|
+
function so({ money: e, code: t, strong: n = !1, large: r = !1, muted: i = !1, align: a = "end" }) {
|
|
6851
6751
|
return e ? /* @__PURE__ */ _(K, {
|
|
6852
6752
|
align: a,
|
|
6853
6753
|
tabularNums: !0,
|
|
@@ -6855,7 +6755,7 @@ function co({ money: e, code: t, strong: n = !1, large: r = !1, muted: i = !1, a
|
|
|
6855
6755
|
className: "ml-1",
|
|
6856
6756
|
children: t
|
|
6857
6757
|
})] }),
|
|
6858
|
-
primaryClassName:
|
|
6758
|
+
primaryClassName: L(i ? "font-normal text-muted-foreground" : n ? "font-bold" : "font-medium", r && "text-base"),
|
|
6859
6759
|
secondary: /* @__PURE__ */ v(g, { children: [e.fiat, e.pending && /* @__PURE__ */ v("span", {
|
|
6860
6760
|
className: "mt-0.5 block text-amber-600",
|
|
6861
6761
|
children: [
|
|
@@ -6868,12 +6768,12 @@ function co({ money: e, code: t, strong: n = !1, large: r = !1, muted: i = !1, a
|
|
|
6868
6768
|
}) : /* @__PURE__ */ _("div", {
|
|
6869
6769
|
className: a === "end" ? "text-right" : "text-left",
|
|
6870
6770
|
children: /* @__PURE__ */ _("span", {
|
|
6871
|
-
className:
|
|
6771
|
+
className: L("tabular-nums text-muted-foreground", r && "text-base"),
|
|
6872
6772
|
children: "—"
|
|
6873
6773
|
})
|
|
6874
6774
|
});
|
|
6875
6775
|
}
|
|
6876
|
-
function
|
|
6776
|
+
function co({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
6877
6777
|
let { setExtension: i, stickyTop: a } = Tr(), s = u(null), [c, l] = d(/* @__PURE__ */ new Set()), f = (e) => l((t) => {
|
|
6878
6778
|
let n = new Set(t);
|
|
6879
6779
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
@@ -6893,16 +6793,16 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
6893
6793
|
n.disconnect(), i(0);
|
|
6894
6794
|
};
|
|
6895
6795
|
}, [i, a]);
|
|
6896
|
-
let p = e.map(
|
|
6796
|
+
let p = e.map(oo);
|
|
6897
6797
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
|
|
6898
6798
|
ref: s,
|
|
6899
6799
|
"aria-hidden": !0,
|
|
6900
6800
|
className: "h-px"
|
|
6901
6801
|
}), /* @__PURE__ */ v(xn, {
|
|
6902
6802
|
containerClassName: "overflow-x-visible",
|
|
6903
|
-
className:
|
|
6803
|
+
className: L("mt-0.5 table-fixed border-separate border-spacing-0", r),
|
|
6904
6804
|
children: [/* @__PURE__ */ _(Sn, {
|
|
6905
|
-
className:
|
|
6805
|
+
className: L("sticky z-30", a === 0 && "bg-white/85 backdrop-blur-md"),
|
|
6906
6806
|
style: { top: a },
|
|
6907
6807
|
children: /* @__PURE__ */ v(Tn, {
|
|
6908
6808
|
className: "hover:bg-transparent",
|
|
@@ -6938,11 +6838,11 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
6938
6838
|
className: "flex items-center gap-3",
|
|
6939
6839
|
children: [
|
|
6940
6840
|
/* @__PURE__ */ _(x, {
|
|
6941
|
-
icon:
|
|
6841
|
+
icon: ve,
|
|
6942
6842
|
size: 16,
|
|
6943
6843
|
strokeWidth: 2,
|
|
6944
6844
|
"aria-hidden": !0,
|
|
6945
|
-
className:
|
|
6845
|
+
className: L("shrink-0 text-muted-foreground transition-transform", !r && "-rotate-90")
|
|
6946
6846
|
}),
|
|
6947
6847
|
/* @__PURE__ */ _(W, {
|
|
6948
6848
|
src: q(e.code),
|
|
@@ -6968,7 +6868,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
6968
6868
|
}),
|
|
6969
6869
|
/* @__PURE__ */ _(U, {
|
|
6970
6870
|
className: "border-b border-cb-line py-2.5 pl-4 align-top",
|
|
6971
|
-
children: /* @__PURE__ */ _(
|
|
6871
|
+
children: /* @__PURE__ */ _(so, {
|
|
6972
6872
|
money: e.main,
|
|
6973
6873
|
code: e.code,
|
|
6974
6874
|
large: !0,
|
|
@@ -6977,7 +6877,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
6977
6877
|
}),
|
|
6978
6878
|
/* @__PURE__ */ _(U, {
|
|
6979
6879
|
className: "border-b border-cb-line py-2.5 pl-4 align-top",
|
|
6980
|
-
children: /* @__PURE__ */ _(
|
|
6880
|
+
children: /* @__PURE__ */ _(so, {
|
|
6981
6881
|
money: e.payout,
|
|
6982
6882
|
code: e.code,
|
|
6983
6883
|
large: !0,
|
|
@@ -6986,7 +6886,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
6986
6886
|
}),
|
|
6987
6887
|
/* @__PURE__ */ _(U, {
|
|
6988
6888
|
className: "border-b border-cb-line py-2.5 pr-4 align-top",
|
|
6989
|
-
children: /* @__PURE__ */ _(
|
|
6889
|
+
children: /* @__PURE__ */ _(so, {
|
|
6990
6890
|
money: e.total,
|
|
6991
6891
|
code: e.code,
|
|
6992
6892
|
strong: !0,
|
|
@@ -6998,7 +6898,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
6998
6898
|
children: /* @__PURE__ */ _("div", {
|
|
6999
6899
|
className: "flex items-center justify-end",
|
|
7000
6900
|
onClick: (e) => e.stopPropagation(),
|
|
7001
|
-
children: /* @__PURE__ */ _(
|
|
6901
|
+
children: /* @__PURE__ */ _(Qa, {
|
|
7002
6902
|
variant: t,
|
|
7003
6903
|
label: `${e.code} actions`
|
|
7004
6904
|
})
|
|
@@ -7031,7 +6931,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
7031
6931
|
}),
|
|
7032
6932
|
/* @__PURE__ */ _(U, {
|
|
7033
6933
|
className: "border-b border-slate-100 py-2 pl-4 align-top",
|
|
7034
|
-
children: /* @__PURE__ */ _(
|
|
6934
|
+
children: /* @__PURE__ */ _(so, {
|
|
7035
6935
|
money: n.main,
|
|
7036
6936
|
code: e.code,
|
|
7037
6937
|
align: "start",
|
|
@@ -7040,7 +6940,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
7040
6940
|
}),
|
|
7041
6941
|
/* @__PURE__ */ _(U, {
|
|
7042
6942
|
className: "border-b border-slate-100 py-2 pl-4 align-top",
|
|
7043
|
-
children: /* @__PURE__ */ _(
|
|
6943
|
+
children: /* @__PURE__ */ _(so, {
|
|
7044
6944
|
money: n.payout,
|
|
7045
6945
|
code: e.code,
|
|
7046
6946
|
align: "start",
|
|
@@ -7049,7 +6949,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
7049
6949
|
}),
|
|
7050
6950
|
/* @__PURE__ */ _(U, {
|
|
7051
6951
|
className: "border-b border-slate-100 py-2 pr-4 align-top",
|
|
7052
|
-
children: /* @__PURE__ */ _(
|
|
6952
|
+
children: /* @__PURE__ */ _(so, {
|
|
7053
6953
|
money: n.total,
|
|
7054
6954
|
code: e.code,
|
|
7055
6955
|
muted: !0
|
|
@@ -7059,7 +6959,7 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
7059
6959
|
className: "border-b border-slate-100 py-2 pr-4 align-top",
|
|
7060
6960
|
children: /* @__PURE__ */ _("div", {
|
|
7061
6961
|
className: "flex items-center justify-end",
|
|
7062
|
-
children: /* @__PURE__ */ _(
|
|
6962
|
+
children: /* @__PURE__ */ _(Qa, {
|
|
7063
6963
|
variant: t,
|
|
7064
6964
|
label: `${e.code} ${n.networkName} actions`
|
|
7065
6965
|
})
|
|
@@ -7072,33 +6972,33 @@ function lo({ balances: e, actionsVariant: t = "menu", className: r }) {
|
|
|
7072
6972
|
}
|
|
7073
6973
|
//#endregion
|
|
7074
6974
|
//#region ../../react-app/src/components/balances/BalancesSummary.tsx
|
|
7075
|
-
function
|
|
6975
|
+
function lo({ label: e, value: t, valueClassName: n, children: r }) {
|
|
7076
6976
|
return /* @__PURE__ */ v("div", {
|
|
7077
6977
|
className: "flex flex-col gap-1.5 px-5 py-4",
|
|
7078
6978
|
children: [/* @__PURE__ */ _("span", {
|
|
7079
6979
|
className: "text-sm font-medium leading-tight text-muted-foreground",
|
|
7080
6980
|
children: e
|
|
7081
6981
|
}), /* @__PURE__ */ _("span", {
|
|
7082
|
-
className:
|
|
6982
|
+
className: L("text-2xl leading-none text-foreground", n),
|
|
7083
6983
|
children: r ?? t
|
|
7084
6984
|
})]
|
|
7085
6985
|
});
|
|
7086
6986
|
}
|
|
7087
|
-
function
|
|
6987
|
+
function uo({ totalAssets: e, totalPending: t, activeWallets: n, totalWallets: r, showTotalWallets: i = !0, pendingAmber: a = !1, className: o }) {
|
|
7088
6988
|
return /* @__PURE__ */ v("div", {
|
|
7089
|
-
className:
|
|
6989
|
+
className: L("grid grid-cols-1 divide-y divide-cb-line rounded-2xl border border-cb-line bg-cb-card shadow-xs sm:grid-cols-3 sm:divide-x sm:divide-y-0", o),
|
|
7090
6990
|
children: [
|
|
7091
|
-
/* @__PURE__ */ _(
|
|
6991
|
+
/* @__PURE__ */ _(lo, {
|
|
7092
6992
|
label: "Total assets under management",
|
|
7093
6993
|
value: e,
|
|
7094
6994
|
valueClassName: "font-semibold"
|
|
7095
6995
|
}),
|
|
7096
|
-
/* @__PURE__ */ _(
|
|
6996
|
+
/* @__PURE__ */ _(lo, {
|
|
7097
6997
|
label: "Total pending",
|
|
7098
6998
|
value: t,
|
|
7099
|
-
valueClassName:
|
|
6999
|
+
valueClassName: L("font-normal", a && "text-amber-600")
|
|
7100
7000
|
}),
|
|
7101
|
-
/* @__PURE__ */ v(
|
|
7001
|
+
/* @__PURE__ */ v(lo, {
|
|
7102
7002
|
label: "Active wallets",
|
|
7103
7003
|
children: [/* @__PURE__ */ _("span", {
|
|
7104
7004
|
className: "font-normal",
|
|
@@ -7113,10 +7013,10 @@ function fo({ totalAssets: e, totalPending: t, activeWallets: n, totalWallets: r
|
|
|
7113
7013
|
}
|
|
7114
7014
|
//#endregion
|
|
7115
7015
|
//#region ../../react-app/src/components/balances/data.ts
|
|
7116
|
-
var
|
|
7117
|
-
CURRENCY_BALANCES: () =>
|
|
7118
|
-
balancesTotals: () =>
|
|
7119
|
-
}),
|
|
7016
|
+
var fo = /* @__PURE__ */ I({
|
|
7017
|
+
CURRENCY_BALANCES: () => po,
|
|
7018
|
+
balancesTotals: () => mo
|
|
7019
|
+
}), po = [
|
|
7120
7020
|
{
|
|
7121
7021
|
code: "BTC",
|
|
7122
7022
|
name: "Bitcoin",
|
|
@@ -7344,7 +7244,7 @@ var po = /* @__PURE__ */ F({
|
|
|
7344
7244
|
}]
|
|
7345
7245
|
}
|
|
7346
7246
|
];
|
|
7347
|
-
function
|
|
7247
|
+
function mo(e) {
|
|
7348
7248
|
let t = (e) => parseFloat(e.replace(/[^0-9.-]/g, "")) || 0, n = (e) => e.toLocaleString("en-US", {
|
|
7349
7249
|
style: "currency",
|
|
7350
7250
|
currency: "USD"
|
|
@@ -7358,10 +7258,10 @@ function ho(e) {
|
|
|
7358
7258
|
}
|
|
7359
7259
|
//#endregion
|
|
7360
7260
|
//#region ../../react-app/src/components/balances/types.ts
|
|
7361
|
-
var
|
|
7362
|
-
RECENT_TRANSACTIONS: () =>
|
|
7363
|
-
default: () =>
|
|
7364
|
-
}),
|
|
7261
|
+
var ho = /* @__PURE__ */ I({}), go = /* @__PURE__ */ I({
|
|
7262
|
+
RECENT_TRANSACTIONS: () => _o,
|
|
7263
|
+
default: () => _o
|
|
7264
|
+
}), _o = [
|
|
7365
7265
|
{
|
|
7366
7266
|
id: "rtx-1",
|
|
7367
7267
|
label: "Manual Deposit",
|
|
@@ -7478,7 +7378,7 @@ var go = /* @__PURE__ */ F({}), _o = /* @__PURE__ */ F({
|
|
|
7478
7378
|
function $({ id: e, label: t, value: n, options: r, onChange: i, placeholder: a = "Select…", emptyMessage: o = "No options available.", disabled: s = !1, className: c }) {
|
|
7479
7379
|
let [l, u] = d(!1), f = r.find((e) => e.value === n) ?? null, p = s || r.length === 0;
|
|
7480
7380
|
return /* @__PURE__ */ v("div", {
|
|
7481
|
-
className:
|
|
7381
|
+
className: L("flex flex-col gap-1.5", c),
|
|
7482
7382
|
children: [t != null && /* @__PURE__ */ _(Gt, {
|
|
7483
7383
|
htmlFor: e,
|
|
7484
7384
|
className: "text-[13px] font-medium text-muted-foreground",
|
|
@@ -7493,7 +7393,7 @@ function $({ id: e, label: t, value: n, options: r, onChange: i, placeholder: a
|
|
|
7493
7393
|
type: "button",
|
|
7494
7394
|
disabled: p,
|
|
7495
7395
|
"aria-label": typeof t == "string" ? t : void 0,
|
|
7496
|
-
className:
|
|
7396
|
+
className: L("flex h-12 w-full items-center justify-between gap-2 rounded-lg border border-input bg-transparent px-2.5 text-left text-sm transition-colors", "hover:border-slate-300 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none aria-expanded:border-slate-300", "disabled:pointer-events-none disabled:opacity-50"),
|
|
7497
7397
|
children: [f ? /* @__PURE__ */ v("span", {
|
|
7498
7398
|
className: "flex min-w-0 flex-1 items-center gap-2.5",
|
|
7499
7399
|
children: [f.leading, /* @__PURE__ */ v("span", {
|
|
@@ -7512,7 +7412,7 @@ function $({ id: e, label: t, value: n, options: r, onChange: i, placeholder: a
|
|
|
7512
7412
|
}), /* @__PURE__ */ v("span", {
|
|
7513
7413
|
className: "flex shrink-0 items-center gap-2 text-muted-foreground",
|
|
7514
7414
|
children: [f?.meta, /* @__PURE__ */ _(x, {
|
|
7515
|
-
icon:
|
|
7415
|
+
icon: ve,
|
|
7516
7416
|
size: 16,
|
|
7517
7417
|
strokeWidth: 2
|
|
7518
7418
|
})]
|
|
@@ -7532,7 +7432,7 @@ function $({ id: e, label: t, value: n, options: r, onChange: i, placeholder: a
|
|
|
7532
7432
|
onClick: () => {
|
|
7533
7433
|
i(e.value), u(!1);
|
|
7534
7434
|
},
|
|
7535
|
-
className:
|
|
7435
|
+
className: L("flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-sm outline-none transition-colors", "hover:bg-cb-seg focus-visible:bg-cb-seg", "disabled:pointer-events-none disabled:opacity-50", t && "bg-cb-seg"),
|
|
7536
7436
|
children: [
|
|
7537
7437
|
e.leading,
|
|
7538
7438
|
/* @__PURE__ */ v("span", {
|
|
@@ -7566,9 +7466,9 @@ function $({ id: e, label: t, value: n, options: r, onChange: i, placeholder: a
|
|
|
7566
7466
|
}
|
|
7567
7467
|
//#endregion
|
|
7568
7468
|
//#region ../../react-app/src/components/fields/AmountField.tsx
|
|
7569
|
-
function
|
|
7469
|
+
function vo({ id: e, label: t = "Amount", value: n, onChange: r, suffix: i, hint: a, helper: o, onMax: s, maxDisabled: c = !1, disabled: l = !1, invalid: u = !1, placeholder: d = "0.00", className: f }) {
|
|
7570
7470
|
return /* @__PURE__ */ v("div", {
|
|
7571
|
-
className:
|
|
7471
|
+
className: L("flex flex-col gap-1.5", f),
|
|
7572
7472
|
children: [
|
|
7573
7473
|
/* @__PURE__ */ v("div", {
|
|
7574
7474
|
className: "flex items-center justify-between",
|
|
@@ -7601,7 +7501,7 @@ function yo({ id: e, label: t = "Amount", value: n, onChange: r, suffix: i, hint
|
|
|
7601
7501
|
}), s && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(cn, {
|
|
7602
7502
|
orientation: "vertical",
|
|
7603
7503
|
className: "h-4"
|
|
7604
|
-
}), /* @__PURE__ */ _(
|
|
7504
|
+
}), /* @__PURE__ */ _(B, {
|
|
7605
7505
|
type: "button",
|
|
7606
7506
|
size: "xs",
|
|
7607
7507
|
variant: "ghost",
|
|
@@ -7621,9 +7521,9 @@ function yo({ id: e, label: t = "Amount", value: n, onChange: r, suffix: i, hint
|
|
|
7621
7521
|
}
|
|
7622
7522
|
//#endregion
|
|
7623
7523
|
//#region ../../react-app/src/components/fields/TextField.tsx
|
|
7624
|
-
function
|
|
7524
|
+
function yo({ id: e, label: t, value: n, onChange: r, placeholder: i, hint: a, helper: o, disabled: s = !1, invalid: c = !1, inputMode: l, spellCheck: u, autoComplete: d, maxLength: f, inputClassName: p, className: m }) {
|
|
7625
7525
|
return /* @__PURE__ */ v("div", {
|
|
7626
|
-
className:
|
|
7526
|
+
className: L("flex flex-col gap-1.5", m),
|
|
7627
7527
|
children: [
|
|
7628
7528
|
(t != null || a != null) && /* @__PURE__ */ v("div", {
|
|
7629
7529
|
className: "flex items-center justify-between",
|
|
@@ -7647,7 +7547,7 @@ function bo({ id: e, label: t, value: n, onChange: r, placeholder: i, hint: a, h
|
|
|
7647
7547
|
spellCheck: u,
|
|
7648
7548
|
autoComplete: d,
|
|
7649
7549
|
maxLength: f,
|
|
7650
|
-
className:
|
|
7550
|
+
className: L("h-12", p)
|
|
7651
7551
|
}),
|
|
7652
7552
|
o != null && /* @__PURE__ */ _("div", {
|
|
7653
7553
|
className: "min-h-4 text-xs",
|
|
@@ -7658,10 +7558,10 @@ function bo({ id: e, label: t, value: n, onChange: r, placeholder: i, hint: a, h
|
|
|
7658
7558
|
}
|
|
7659
7559
|
//#endregion
|
|
7660
7560
|
//#region ../../react-app/src/components/fields/WalletField.tsx
|
|
7661
|
-
function
|
|
7561
|
+
function bo(e) {
|
|
7662
7562
|
return e.length > 18 ? `${e.slice(0, 10)}…${e.slice(-6)}` : e;
|
|
7663
7563
|
}
|
|
7664
|
-
function
|
|
7564
|
+
function xo({ id: e, label: t = "Wallet", placeholder: n = "Select a wallet", value: r, onChange: i, wallets: a, emptyMessage: o = "No wallets available.", variant: s = "simple", disabled: c = !1, className: l }) {
|
|
7665
7565
|
return /* @__PURE__ */ _($, {
|
|
7666
7566
|
id: e,
|
|
7667
7567
|
label: t,
|
|
@@ -7673,7 +7573,7 @@ function So({ id: e, label: t = "Wallet", placeholder: n = "Select a wallet", va
|
|
|
7673
7573
|
} : {
|
|
7674
7574
|
value: e.id,
|
|
7675
7575
|
label: e.name,
|
|
7676
|
-
sublabel: e.address ?
|
|
7576
|
+
sublabel: e.address ? bo(e.address) : void 0,
|
|
7677
7577
|
leading: e.coin && e.network ? /* @__PURE__ */ _(Fr, {
|
|
7678
7578
|
code: e.coin,
|
|
7679
7579
|
network: e.network,
|
|
@@ -7697,11 +7597,11 @@ function So({ id: e, label: t = "Wallet", placeholder: n = "Select a wallet", va
|
|
|
7697
7597
|
}
|
|
7698
7598
|
//#endregion
|
|
7699
7599
|
//#region ../../react-app/src/components/convert/ConvertHistoryTable.tsx
|
|
7700
|
-
function
|
|
7600
|
+
function So(e) {
|
|
7701
7601
|
let t = Date.parse(`${e.date} ${e.time}`);
|
|
7702
7602
|
return Number.isNaN(t) ? 0 : t;
|
|
7703
7603
|
}
|
|
7704
|
-
function
|
|
7604
|
+
function Co({ name: e }) {
|
|
7705
7605
|
return /* @__PURE__ */ v("span", {
|
|
7706
7606
|
className: "flex items-center gap-2",
|
|
7707
7607
|
children: [/* @__PURE__ */ _("span", {
|
|
@@ -7713,7 +7613,7 @@ function wo({ name: e }) {
|
|
|
7713
7613
|
})]
|
|
7714
7614
|
});
|
|
7715
7615
|
}
|
|
7716
|
-
function
|
|
7616
|
+
function wo({ amount: e, coin: t, tone: n }) {
|
|
7717
7617
|
return /* @__PURE__ */ v("span", {
|
|
7718
7618
|
className: "flex items-center gap-2.5",
|
|
7719
7619
|
children: [/* @__PURE__ */ _(W, {
|
|
@@ -7723,7 +7623,7 @@ function To({ amount: e, coin: t, tone: n }) {
|
|
|
7723
7623
|
}), /* @__PURE__ */ _(K, {
|
|
7724
7624
|
tabularNums: !0,
|
|
7725
7625
|
primary: /* @__PURE__ */ v("span", {
|
|
7726
|
-
className:
|
|
7626
|
+
className: L("font-medium", n === "out" ? "text-red-600 dark:text-red-400" : "text-emerald-600 dark:text-emerald-400"),
|
|
7727
7627
|
children: [
|
|
7728
7628
|
e,
|
|
7729
7629
|
" ",
|
|
@@ -7733,13 +7633,13 @@ function To({ amount: e, coin: t, tone: n }) {
|
|
|
7733
7633
|
})]
|
|
7734
7634
|
});
|
|
7735
7635
|
}
|
|
7736
|
-
function
|
|
7636
|
+
function To({ data: e, className: t }) {
|
|
7737
7637
|
let n = l(() => [
|
|
7738
7638
|
{
|
|
7739
7639
|
id: "date",
|
|
7740
7640
|
header: "Date",
|
|
7741
7641
|
sortable: !0,
|
|
7742
|
-
sortValue:
|
|
7642
|
+
sortValue: So,
|
|
7743
7643
|
cell: (e) => /* @__PURE__ */ _(K, {
|
|
7744
7644
|
primary: e.date,
|
|
7745
7645
|
secondary: e.time
|
|
@@ -7750,12 +7650,12 @@ function Eo({ data: e, className: t }) {
|
|
|
7750
7650
|
header: "Initiated by",
|
|
7751
7651
|
sortable: !0,
|
|
7752
7652
|
sortValue: (e) => e.initiator,
|
|
7753
|
-
cell: (e) => /* @__PURE__ */ _(
|
|
7653
|
+
cell: (e) => /* @__PURE__ */ _(Co, { name: e.initiator })
|
|
7754
7654
|
},
|
|
7755
7655
|
{
|
|
7756
7656
|
id: "from",
|
|
7757
7657
|
header: "From",
|
|
7758
|
-
cell: (e) => /* @__PURE__ */ _(
|
|
7658
|
+
cell: (e) => /* @__PURE__ */ _(wo, {
|
|
7759
7659
|
amount: e.fromAmount,
|
|
7760
7660
|
coin: e.fromCoin,
|
|
7761
7661
|
tone: "out"
|
|
@@ -7764,7 +7664,7 @@ function Eo({ data: e, className: t }) {
|
|
|
7764
7664
|
{
|
|
7765
7665
|
id: "to",
|
|
7766
7666
|
header: "To",
|
|
7767
|
-
cell: (e) => /* @__PURE__ */ _(
|
|
7667
|
+
cell: (e) => /* @__PURE__ */ _(wo, {
|
|
7768
7668
|
amount: e.toAmount,
|
|
7769
7669
|
coin: e.toCoin,
|
|
7770
7670
|
tone: "in"
|
|
@@ -7788,7 +7688,7 @@ function Eo({ data: e, className: t }) {
|
|
|
7788
7688
|
}
|
|
7789
7689
|
], []);
|
|
7790
7690
|
return /* @__PURE__ */ _("div", {
|
|
7791
|
-
className:
|
|
7691
|
+
className: L(t),
|
|
7792
7692
|
children: /* @__PURE__ */ _(Rr, {
|
|
7793
7693
|
columns: n,
|
|
7794
7694
|
data: e.slice(0, 5),
|
|
@@ -7800,7 +7700,7 @@ function Eo({ data: e, className: t }) {
|
|
|
7800
7700
|
}
|
|
7801
7701
|
//#endregion
|
|
7802
7702
|
//#region ../../react-app/src/components/convert/ConvertSummary.tsx
|
|
7803
|
-
function
|
|
7703
|
+
function Eo({ caption: e, coin: t, amount: n, fiat: r, amountClassName: i }) {
|
|
7804
7704
|
let a = n != null && n !== "";
|
|
7805
7705
|
return /* @__PURE__ */ v("div", {
|
|
7806
7706
|
className: "flex flex-col gap-1.5",
|
|
@@ -7816,7 +7716,7 @@ function Do({ caption: e, coin: t, amount: n, fiat: r, amountClassName: i }) {
|
|
|
7816
7716
|
}) : /* @__PURE__ */ _("span", { className: "size-9 shrink-0 rounded-full bg-muted" }), /* @__PURE__ */ v("div", {
|
|
7817
7717
|
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
7818
7718
|
children: [/* @__PURE__ */ _("span", {
|
|
7819
|
-
className:
|
|
7719
|
+
className: L("block truncate text-xl font-semibold tabular-nums text-foreground", i),
|
|
7820
7720
|
children: a ? /* @__PURE__ */ v(g, { children: [
|
|
7821
7721
|
n,
|
|
7822
7722
|
" ",
|
|
@@ -7836,9 +7736,9 @@ function Do({ caption: e, coin: t, amount: n, fiat: r, amountClassName: i }) {
|
|
|
7836
7736
|
})]
|
|
7837
7737
|
});
|
|
7838
7738
|
}
|
|
7839
|
-
function
|
|
7739
|
+
function Do({ fromCoin: e, toCoin: t, payAmount: n, payFiat: r, receiveAmount: i, receiveFiat: a, rateLabel: o, rateCountdown: s, rateTtl: c = 30, rateVersion: l = 0, feeLabel: u, fromWalletName: d, fromWalletAddress: f, toWalletName: p, toWalletAddress: m, footer: h, className: g }) {
|
|
7840
7740
|
return /* @__PURE__ */ v("div", {
|
|
7841
|
-
className:
|
|
7741
|
+
className: L("flex flex-col rounded-2xl border border-cb-line bg-slate-50 dark:bg-slate-900/40", g),
|
|
7842
7742
|
children: [
|
|
7843
7743
|
/* @__PURE__ */ v("div", {
|
|
7844
7744
|
className: "px-5 pb-3 pt-4",
|
|
@@ -7853,7 +7753,7 @@ function Oo({ fromCoin: e, toCoin: t, payAmount: n, payFiat: r, receiveAmount: i
|
|
|
7853
7753
|
/* @__PURE__ */ v("div", {
|
|
7854
7754
|
className: "px-5 pb-3",
|
|
7855
7755
|
children: [
|
|
7856
|
-
/* @__PURE__ */ _(
|
|
7756
|
+
/* @__PURE__ */ _(Eo, {
|
|
7857
7757
|
caption: "You pay",
|
|
7858
7758
|
coin: e,
|
|
7859
7759
|
amount: n,
|
|
@@ -7864,13 +7764,13 @@ function Oo({ fromCoin: e, toCoin: t, payAmount: n, payFiat: r, receiveAmount: i
|
|
|
7864
7764
|
children: [/* @__PURE__ */ _("div", { className: "border-t border-cb-line" }), /* @__PURE__ */ _("span", {
|
|
7865
7765
|
className: "absolute left-1/2 top-1/2 flex size-8 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-cb-line bg-slate-50 text-muted-foreground dark:bg-slate-900",
|
|
7866
7766
|
children: /* @__PURE__ */ _(x, {
|
|
7867
|
-
icon:
|
|
7767
|
+
icon: ve,
|
|
7868
7768
|
size: 16,
|
|
7869
7769
|
strokeWidth: 2
|
|
7870
7770
|
})
|
|
7871
7771
|
})]
|
|
7872
7772
|
}),
|
|
7873
|
-
/* @__PURE__ */ _(
|
|
7773
|
+
/* @__PURE__ */ _(Eo, {
|
|
7874
7774
|
caption: "You receive",
|
|
7875
7775
|
coin: t,
|
|
7876
7776
|
amount: i,
|
|
@@ -7887,9 +7787,9 @@ function Oo({ fromCoin: e, toCoin: t, payAmount: n, payFiat: r, receiveAmount: i
|
|
|
7887
7787
|
children: o ? /* @__PURE__ */ v("div", {
|
|
7888
7788
|
className: "flex flex-wrap items-center gap-2",
|
|
7889
7789
|
children: [/* @__PURE__ */ _("span", {
|
|
7890
|
-
className:
|
|
7790
|
+
className: L("inline-block rounded px-1.5 font-medium tabular-nums text-foreground", s != null && "animate-rate-flash"),
|
|
7891
7791
|
children: o
|
|
7892
|
-
}, l), s != null && /* @__PURE__ */ _(
|
|
7792
|
+
}, l), s != null && /* @__PURE__ */ _(Oo, {
|
|
7893
7793
|
seconds: s,
|
|
7894
7794
|
total: c
|
|
7895
7795
|
})]
|
|
@@ -7953,7 +7853,7 @@ function Oo({ fromCoin: e, toCoin: t, payAmount: n, payFiat: r, receiveAmount: i
|
|
|
7953
7853
|
]
|
|
7954
7854
|
});
|
|
7955
7855
|
}
|
|
7956
|
-
function
|
|
7856
|
+
function Oo({ seconds: e, total: t }) {
|
|
7957
7857
|
let n = 2 * Math.PI * 8, r = t > 0 ? Math.max(0, Math.min(1, e / t)) : 0;
|
|
7958
7858
|
return /* @__PURE__ */ v("div", {
|
|
7959
7859
|
className: "flex shrink-0 items-center gap-2 rounded-full border border-cb-line bg-cb-card px-2.5 py-1",
|
|
@@ -7992,17 +7892,17 @@ function ko({ seconds: e, total: t }) {
|
|
|
7992
7892
|
}
|
|
7993
7893
|
//#endregion
|
|
7994
7894
|
//#region ../../react-app/src/components/convert/data.ts
|
|
7995
|
-
var
|
|
7996
|
-
COINS: () =>
|
|
7997
|
-
CONVERSION_HISTORY: () =>
|
|
7998
|
-
CONVERT_FEE_RATE: () =>
|
|
7999
|
-
HOLDINGS: () =>
|
|
8000
|
-
NETWORK_NAMES: () =>
|
|
8001
|
-
WALLET_TIERS: () =>
|
|
8002
|
-
figureToNumber: () =>
|
|
8003
|
-
formatCrypto: () =>
|
|
8004
|
-
formatUsd: () =>
|
|
8005
|
-
}),
|
|
7895
|
+
var ko = /* @__PURE__ */ I({
|
|
7896
|
+
COINS: () => No,
|
|
7897
|
+
CONVERSION_HISTORY: () => Fo,
|
|
7898
|
+
CONVERT_FEE_RATE: () => Ao,
|
|
7899
|
+
HOLDINGS: () => Po,
|
|
7900
|
+
NETWORK_NAMES: () => Mo,
|
|
7901
|
+
WALLET_TIERS: () => jo,
|
|
7902
|
+
figureToNumber: () => Io,
|
|
7903
|
+
formatCrypto: () => Ro,
|
|
7904
|
+
formatUsd: () => Lo
|
|
7905
|
+
}), Ao = .002, jo = [
|
|
8006
7906
|
{
|
|
8007
7907
|
id: "low",
|
|
8008
7908
|
name: "Low Risk Wallet",
|
|
@@ -8023,14 +7923,14 @@ var Ao = /* @__PURE__ */ F({
|
|
|
8023
7923
|
name: "Payout Wallet",
|
|
8024
7924
|
purpose: "payout"
|
|
8025
7925
|
}
|
|
8026
|
-
],
|
|
7926
|
+
], Mo = {
|
|
8027
7927
|
ETH: "Ethereum",
|
|
8028
7928
|
TRON: "Tron (TRC-20)",
|
|
8029
7929
|
BTC: "Bitcoin",
|
|
8030
7930
|
SOL: "Solana",
|
|
8031
7931
|
POL: "Polygon",
|
|
8032
7932
|
BNB: "BNB Chain"
|
|
8033
|
-
},
|
|
7933
|
+
}, No = [
|
|
8034
7934
|
{
|
|
8035
7935
|
code: "USDT",
|
|
8036
7936
|
name: "Tether",
|
|
@@ -8082,7 +7982,7 @@ var Ao = /* @__PURE__ */ F({
|
|
|
8082
7982
|
price: 600,
|
|
8083
7983
|
networks: ["BNB"]
|
|
8084
7984
|
}
|
|
8085
|
-
],
|
|
7985
|
+
], Po = [
|
|
8086
7986
|
{
|
|
8087
7987
|
id: "h-usdt-low",
|
|
8088
7988
|
name: "Low Risk Wallet",
|
|
@@ -8183,7 +8083,7 @@ var Ao = /* @__PURE__ */ F({
|
|
|
8183
8083
|
amount: "12,500.00000000",
|
|
8184
8084
|
amountFiat: "$5,625.00"
|
|
8185
8085
|
}
|
|
8186
|
-
],
|
|
8086
|
+
], Fo = [
|
|
8187
8087
|
{
|
|
8188
8088
|
id: "cv-01",
|
|
8189
8089
|
date: "Jul 14, 2026",
|
|
@@ -8297,10 +8197,10 @@ var Ao = /* @__PURE__ */ F({
|
|
|
8297
8197
|
status: "pending-approval"
|
|
8298
8198
|
}
|
|
8299
8199
|
];
|
|
8300
|
-
function
|
|
8200
|
+
function Io(e) {
|
|
8301
8201
|
return parseFloat(e.replace(/[^0-9.]/g, "")) || 0;
|
|
8302
8202
|
}
|
|
8303
|
-
function
|
|
8203
|
+
function Lo(e) {
|
|
8304
8204
|
return e.toLocaleString("en-US", {
|
|
8305
8205
|
style: "currency",
|
|
8306
8206
|
currency: "USD",
|
|
@@ -8308,7 +8208,7 @@ function Ro(e) {
|
|
|
8308
8208
|
maximumFractionDigits: 2
|
|
8309
8209
|
});
|
|
8310
8210
|
}
|
|
8311
|
-
function
|
|
8211
|
+
function Ro(e) {
|
|
8312
8212
|
return e.toLocaleString("en-US", {
|
|
8313
8213
|
minimumFractionDigits: 2,
|
|
8314
8214
|
maximumFractionDigits: 8
|
|
@@ -8316,44 +8216,44 @@ function zo(e) {
|
|
|
8316
8216
|
}
|
|
8317
8217
|
//#endregion
|
|
8318
8218
|
//#region ../../react-app/src/components/convert/ConvertPanel.tsx
|
|
8319
|
-
var
|
|
8320
|
-
function
|
|
8321
|
-
let [r, i] = d(null), [a, s] = d(""), [c, l] = d(""), [u, f] = d(""), [p, m] = d(""), [h, y] = d(""), [b, S] = d(!1), [C, w] = d(""), [
|
|
8219
|
+
var zo = 30;
|
|
8220
|
+
function Bo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
8221
|
+
let [r, i] = d(null), [a, s] = d(""), [c, l] = d(""), [u, f] = d(""), [p, m] = d(""), [h, y] = d(""), [b, S] = d(!1), [C, w] = d(""), [T, E] = d(!1), [ee, D] = d(1), [O, te] = d(zo), [ne, re] = d(0), k = jo.find((e) => e.id === r) ?? null, A = k != null && a ? Po.find((e) => e.name === k.name && e.coin === a && e.network === c) ?? Po.find((e) => e.name === k.name && e.coin === a) ?? null : null, j = (u ? Po.find((e) => e.coin === u && e.network === p) ?? Po.find((e) => e.coin === u) : null) ?? null, M = a ? No.find((e) => e.code === a) ?? null : null, N = No.find((e) => e.code === u) ?? null, ie = Io(h), ae = A ? Io(A.amount) : Infinity, oe = A != null && ie > ae, P = h.trim() !== "" && ie > 0, F = a != null && N != null && u !== a, se = (M && N ? M.price / N.price : 0) * ee, ce = M ? ie * M.price : 0, le = ce * Ao, I = ie * se * (1 - Ao), R = k != null && F && c !== "" && p !== "" && P && !oe, z = P ? Ro(ie) : null, de = P && F ? Ro(I) : null, fe = a && N ? `1 ${a} = ${Ro(se)} ${u}` : null, pe = P ? `${Lo(le)} · ${(Ao * 100).toFixed(1)}%` : null;
|
|
8322
8222
|
o(() => {
|
|
8323
|
-
if (!
|
|
8324
|
-
|
|
8223
|
+
if (!R) {
|
|
8224
|
+
te(zo);
|
|
8325
8225
|
return;
|
|
8326
8226
|
}
|
|
8327
|
-
let e = Date.now() +
|
|
8328
|
-
|
|
8227
|
+
let e = Date.now() + zo * 1e3;
|
|
8228
|
+
te(zo), D(1 + (Math.random() - .5) * .012), re((e) => e + 1);
|
|
8329
8229
|
let t = setInterval(() => {
|
|
8330
8230
|
let t = Math.max(0, Math.ceil((e - Date.now()) / 1e3));
|
|
8331
|
-
|
|
8231
|
+
te(t), t === 0 && (D(1 + (Math.random() - .5) * .012), re((e) => e + 1), e = Date.now() + zo * 1e3);
|
|
8332
8232
|
}, 250);
|
|
8333
8233
|
return () => clearInterval(t);
|
|
8334
8234
|
}, [
|
|
8335
|
-
|
|
8235
|
+
R,
|
|
8336
8236
|
a,
|
|
8337
8237
|
u
|
|
8338
8238
|
]);
|
|
8339
|
-
let
|
|
8340
|
-
let t =
|
|
8239
|
+
let me = (e) => {
|
|
8240
|
+
let t = No.find((t) => t.code === e)?.networks ?? [];
|
|
8341
8241
|
return t.length === 1 ? t[0] : "";
|
|
8242
|
+
}, he = (e) => {
|
|
8243
|
+
i(e), E(!1);
|
|
8342
8244
|
}, ge = (e) => {
|
|
8343
|
-
|
|
8344
|
-
},
|
|
8345
|
-
|
|
8346
|
-
}, ye = (
|
|
8347
|
-
|
|
8245
|
+
s(e), l(me(e)), e === u && (f(""), m("")), E(!1);
|
|
8246
|
+
}, ve = (e) => {
|
|
8247
|
+
f(e), m(me(e)), e === a && (s(""), l("")), E(!1);
|
|
8248
|
+
}, ye = () => {
|
|
8249
|
+
s(u), f(a), l(p), m(c), E(!1);
|
|
8348
8250
|
}, be = () => {
|
|
8349
|
-
|
|
8350
|
-
}, xe = () => {
|
|
8351
|
-
k && y(k.amount);
|
|
8352
|
-
}, B = (e) => {
|
|
8251
|
+
A && y(A.amount);
|
|
8252
|
+
}, xe = (e) => {
|
|
8353
8253
|
let t = e.replace(/[^0-9.,]/g, ""), n = t.indexOf(".");
|
|
8354
8254
|
n !== -1 && (t = t.slice(0, n + 1) + t.slice(n + 1).replace(/\./g, "")), y(t);
|
|
8355
8255
|
}, Se = () => {
|
|
8356
|
-
if (!
|
|
8256
|
+
if (!k || !a || !N || !F) return;
|
|
8357
8257
|
let n = /* @__PURE__ */ new Date(), r = {
|
|
8358
8258
|
id: `cv-${n.getTime()}`,
|
|
8359
8259
|
date: n.toLocaleDateString("en-US", {
|
|
@@ -8366,26 +8266,26 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8366
8266
|
minute: "2-digit"
|
|
8367
8267
|
}),
|
|
8368
8268
|
initiator: e,
|
|
8369
|
-
wallet:
|
|
8269
|
+
wallet: k.name,
|
|
8370
8270
|
fromCoin: a,
|
|
8371
8271
|
toCoin: u,
|
|
8372
|
-
fromAmount: `-${
|
|
8373
|
-
toAmount: `+${
|
|
8374
|
-
rate: `1 ${a} = ${
|
|
8375
|
-
fiatValue:
|
|
8272
|
+
fromAmount: `-${Ro(ie)}`,
|
|
8273
|
+
toAmount: `+${Ro(I)}`,
|
|
8274
|
+
rate: `1 ${a} = ${Ro(se)} ${u}`,
|
|
8275
|
+
fiatValue: Lo(ce),
|
|
8376
8276
|
status: "processing"
|
|
8377
8277
|
};
|
|
8378
|
-
t?.(r),
|
|
8278
|
+
t?.(r), E(!0);
|
|
8379
8279
|
}, Ce = (e) => {
|
|
8380
8280
|
if (e) {
|
|
8381
8281
|
S(!0);
|
|
8382
8282
|
return;
|
|
8383
8283
|
}
|
|
8384
|
-
S(!1), w(""),
|
|
8284
|
+
S(!1), w(""), T && (E(!1), y(""));
|
|
8385
8285
|
}, we = (e) => ({
|
|
8386
8286
|
value: e,
|
|
8387
8287
|
label: e,
|
|
8388
|
-
sublabel:
|
|
8288
|
+
sublabel: No.find((t) => t.code === e)?.name ?? e,
|
|
8389
8289
|
leading: /* @__PURE__ */ _(W, {
|
|
8390
8290
|
code: e,
|
|
8391
8291
|
src: q(e),
|
|
@@ -8394,31 +8294,31 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8394
8294
|
}), Te = (e) => ({
|
|
8395
8295
|
value: e,
|
|
8396
8296
|
label: e,
|
|
8397
|
-
sublabel:
|
|
8297
|
+
sublabel: Mo[e] ?? e,
|
|
8398
8298
|
leading: /* @__PURE__ */ _(W, {
|
|
8399
8299
|
code: e,
|
|
8400
8300
|
src: q(e),
|
|
8401
8301
|
className: "size-6"
|
|
8402
8302
|
})
|
|
8403
|
-
}), Ee =
|
|
8303
|
+
}), Ee = No.filter((e) => e.code !== u).map((e) => we(e.code)), De = (M?.networks ?? []).map(Te), Oe = No.filter((e) => e.code !== a).map((e) => we(e.code)), ke = (N?.networks ?? []).map(Te), Ae = jo.map((e) => ({
|
|
8404
8304
|
id: e.id,
|
|
8405
8305
|
name: e.name
|
|
8406
8306
|
}));
|
|
8407
8307
|
return /* @__PURE__ */ v("div", {
|
|
8408
|
-
className:
|
|
8308
|
+
className: L("grid grid-cols-1 items-stretch gap-6 lg:grid-cols-[minmax(0,1fr)_360px]", n),
|
|
8409
8309
|
children: [
|
|
8410
8310
|
/* @__PURE__ */ _("div", {
|
|
8411
8311
|
className: "flex flex-col rounded-2xl border border-cb-line bg-cb-card p-5 shadow-xs",
|
|
8412
8312
|
children: /* @__PURE__ */ v("div", {
|
|
8413
8313
|
className: "flex flex-col gap-4",
|
|
8414
8314
|
children: [
|
|
8415
|
-
/* @__PURE__ */ _(
|
|
8315
|
+
/* @__PURE__ */ _(xo, {
|
|
8416
8316
|
id: "cv-wallet",
|
|
8417
8317
|
label: "From wallet",
|
|
8418
8318
|
placeholder: "Select a source wallet",
|
|
8419
8319
|
value: r,
|
|
8420
8320
|
wallets: Ae,
|
|
8421
|
-
onChange:
|
|
8321
|
+
onChange: he,
|
|
8422
8322
|
variant: "simple",
|
|
8423
8323
|
emptyMessage: "No wallets available."
|
|
8424
8324
|
}),
|
|
@@ -8430,8 +8330,8 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8430
8330
|
placeholder: "Select a currency",
|
|
8431
8331
|
value: a,
|
|
8432
8332
|
options: Ee,
|
|
8433
|
-
onChange:
|
|
8434
|
-
disabled: !
|
|
8333
|
+
onChange: ge,
|
|
8334
|
+
disabled: !k
|
|
8435
8335
|
}), /* @__PURE__ */ _($, {
|
|
8436
8336
|
id: "cv-from-network",
|
|
8437
8337
|
label: "From network",
|
|
@@ -8439,49 +8339,49 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8439
8339
|
value: c,
|
|
8440
8340
|
options: De,
|
|
8441
8341
|
onChange: l,
|
|
8442
|
-
disabled: !
|
|
8342
|
+
disabled: !k || !a
|
|
8443
8343
|
})]
|
|
8444
8344
|
}),
|
|
8445
|
-
/* @__PURE__ */ _(
|
|
8345
|
+
/* @__PURE__ */ _(vo, {
|
|
8446
8346
|
id: "cv-amount",
|
|
8447
8347
|
value: h,
|
|
8448
|
-
onChange:
|
|
8348
|
+
onChange: xe,
|
|
8449
8349
|
suffix: a,
|
|
8450
|
-
disabled: !
|
|
8451
|
-
invalid:
|
|
8452
|
-
onMax:
|
|
8453
|
-
maxDisabled: !
|
|
8454
|
-
hint:
|
|
8350
|
+
disabled: !k || !a,
|
|
8351
|
+
invalid: oe,
|
|
8352
|
+
onMax: be,
|
|
8353
|
+
maxDisabled: !A,
|
|
8354
|
+
hint: k ? a ? A ? /* @__PURE__ */ v(g, { children: [
|
|
8455
8355
|
"Available:",
|
|
8456
8356
|
" ",
|
|
8457
8357
|
/* @__PURE__ */ v("span", {
|
|
8458
8358
|
className: "font-medium text-foreground",
|
|
8459
8359
|
children: [
|
|
8460
|
-
|
|
8360
|
+
A.amount,
|
|
8461
8361
|
" ",
|
|
8462
8362
|
a
|
|
8463
8363
|
]
|
|
8464
8364
|
})
|
|
8465
8365
|
] }) : null : "Select a currency" : "Select a wallet first",
|
|
8466
|
-
helper:
|
|
8366
|
+
helper: oe ? /* @__PURE__ */ _("span", {
|
|
8467
8367
|
className: "text-destructive",
|
|
8468
8368
|
children: "Amount exceeds the available balance."
|
|
8469
|
-
}) :
|
|
8369
|
+
}) : P ? /* @__PURE__ */ v("span", {
|
|
8470
8370
|
className: "tabular-nums text-muted-foreground",
|
|
8471
|
-
children: ["≈ ",
|
|
8371
|
+
children: ["≈ ", Lo(ce)]
|
|
8472
8372
|
}) : null
|
|
8473
8373
|
}),
|
|
8474
8374
|
/* @__PURE__ */ v("div", {
|
|
8475
8375
|
className: "relative -mx-5 my-2",
|
|
8476
8376
|
children: [/* @__PURE__ */ _("div", { className: "border-t border-cb-line" }), /* @__PURE__ */ _("button", {
|
|
8477
8377
|
type: "button",
|
|
8478
|
-
onClick:
|
|
8479
|
-
disabled: !
|
|
8378
|
+
onClick: ye,
|
|
8379
|
+
disabled: !k,
|
|
8480
8380
|
"aria-label": "Swap the From and To currency and network",
|
|
8481
8381
|
title: "Swap currencies & networks",
|
|
8482
|
-
className:
|
|
8382
|
+
className: L("absolute left-1/2 top-1/2 flex size-8 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-cb-line bg-cb-card text-muted-foreground transition-colors", "hover:border-slate-300 hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none", "disabled:pointer-events-none"),
|
|
8483
8383
|
children: /* @__PURE__ */ _(x, {
|
|
8484
|
-
icon:
|
|
8384
|
+
icon: _e,
|
|
8485
8385
|
size: 16,
|
|
8486
8386
|
strokeWidth: 2
|
|
8487
8387
|
})
|
|
@@ -8495,8 +8395,8 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8495
8395
|
placeholder: "Select a currency",
|
|
8496
8396
|
value: u,
|
|
8497
8397
|
options: Oe,
|
|
8498
|
-
onChange:
|
|
8499
|
-
disabled: !
|
|
8398
|
+
onChange: ve,
|
|
8399
|
+
disabled: !k
|
|
8500
8400
|
}), /* @__PURE__ */ _($, {
|
|
8501
8401
|
id: "cv-to-network",
|
|
8502
8402
|
label: "To network",
|
|
@@ -8504,7 +8404,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8504
8404
|
value: p,
|
|
8505
8405
|
options: ke,
|
|
8506
8406
|
onChange: m,
|
|
8507
|
-
disabled: !
|
|
8407
|
+
disabled: !k || !u
|
|
8508
8408
|
})]
|
|
8509
8409
|
}),
|
|
8510
8410
|
/* @__PURE__ */ v("div", {
|
|
@@ -8516,7 +8416,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8516
8416
|
className: "flex h-12 items-center justify-between gap-2 rounded-lg border border-input bg-muted/40 px-2.5",
|
|
8517
8417
|
children: [/* @__PURE__ */ _("span", {
|
|
8518
8418
|
className: "min-w-0 flex-1 truncate text-lg font-medium tabular-nums text-foreground",
|
|
8519
|
-
children:
|
|
8419
|
+
children: de ?? /* @__PURE__ */ _("span", {
|
|
8520
8420
|
className: "font-normal text-muted-foreground",
|
|
8521
8421
|
children: "0.00"
|
|
8522
8422
|
})
|
|
@@ -8529,26 +8429,26 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8529
8429
|
]
|
|
8530
8430
|
})
|
|
8531
8431
|
}),
|
|
8532
|
-
/* @__PURE__ */ _(
|
|
8432
|
+
/* @__PURE__ */ _(Do, {
|
|
8533
8433
|
fromCoin: a,
|
|
8534
|
-
toCoin:
|
|
8535
|
-
payAmount:
|
|
8536
|
-
payFiat:
|
|
8537
|
-
receiveAmount:
|
|
8538
|
-
receiveFiat:
|
|
8539
|
-
rateLabel:
|
|
8540
|
-
rateCountdown:
|
|
8541
|
-
rateTtl:
|
|
8542
|
-
rateVersion:
|
|
8543
|
-
feeLabel:
|
|
8544
|
-
fromWalletName:
|
|
8545
|
-
fromWalletAddress:
|
|
8546
|
-
toWalletName:
|
|
8547
|
-
toWalletAddress:
|
|
8548
|
-
footer: /* @__PURE__ */ _(
|
|
8434
|
+
toCoin: F ? u : null,
|
|
8435
|
+
payAmount: z,
|
|
8436
|
+
payFiat: P ? Lo(ce) : null,
|
|
8437
|
+
receiveAmount: de,
|
|
8438
|
+
receiveFiat: P && F ? Lo(ce * (1 - Ao)) : null,
|
|
8439
|
+
rateLabel: fe,
|
|
8440
|
+
rateCountdown: R ? O : null,
|
|
8441
|
+
rateTtl: zo,
|
|
8442
|
+
rateVersion: ne,
|
|
8443
|
+
feeLabel: pe,
|
|
8444
|
+
fromWalletName: k?.name ?? null,
|
|
8445
|
+
fromWalletAddress: A?.address ?? null,
|
|
8446
|
+
toWalletName: F ? j?.name ?? null : null,
|
|
8447
|
+
toWalletAddress: F ? j?.address ?? null : null,
|
|
8448
|
+
footer: /* @__PURE__ */ _(B, {
|
|
8549
8449
|
type: "button",
|
|
8550
8450
|
size: "lg",
|
|
8551
|
-
disabled: !
|
|
8451
|
+
disabled: !R,
|
|
8552
8452
|
onClick: () => S(!0),
|
|
8553
8453
|
className: "w-full cursor-pointer",
|
|
8554
8454
|
children: "Convert"
|
|
@@ -8559,7 +8459,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8559
8459
|
onOpenChange: Ce,
|
|
8560
8460
|
children: /* @__PURE__ */ _(Et, {
|
|
8561
8461
|
className: "max-w-md p-6",
|
|
8562
|
-
children:
|
|
8462
|
+
children: T ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
|
|
8563
8463
|
className: "flex flex-col items-center py-2 text-center",
|
|
8564
8464
|
children: [
|
|
8565
8465
|
/* @__PURE__ */ _("div", {
|
|
@@ -8579,7 +8479,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8579
8479
|
children: "Your conversion is processing — track it in the history below."
|
|
8580
8480
|
})
|
|
8581
8481
|
]
|
|
8582
|
-
}), /* @__PURE__ */ _(
|
|
8482
|
+
}), /* @__PURE__ */ _(ue, {
|
|
8583
8483
|
bleed: "dialog",
|
|
8584
8484
|
actions: [{
|
|
8585
8485
|
key: "done",
|
|
@@ -8599,7 +8499,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8599
8499
|
/* @__PURE__ */ v("span", {
|
|
8600
8500
|
className: "font-medium tabular-nums text-foreground",
|
|
8601
8501
|
children: [
|
|
8602
|
-
|
|
8502
|
+
z,
|
|
8603
8503
|
" ",
|
|
8604
8504
|
a
|
|
8605
8505
|
]
|
|
@@ -8611,21 +8511,21 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8611
8511
|
className: "font-medium tabular-nums text-foreground",
|
|
8612
8512
|
children: [
|
|
8613
8513
|
"≈ ",
|
|
8614
|
-
|
|
8514
|
+
de,
|
|
8615
8515
|
" ",
|
|
8616
8516
|
u
|
|
8617
8517
|
]
|
|
8618
8518
|
})
|
|
8619
8519
|
]
|
|
8620
8520
|
}),
|
|
8621
|
-
|
|
8521
|
+
pe && /* @__PURE__ */ v("p", {
|
|
8622
8522
|
className: "text-sm text-muted-foreground",
|
|
8623
8523
|
children: [
|
|
8624
8524
|
"Estimated commission:",
|
|
8625
8525
|
" ",
|
|
8626
8526
|
/* @__PURE__ */ _("span", {
|
|
8627
8527
|
className: "font-medium tabular-nums text-foreground",
|
|
8628
|
-
children:
|
|
8528
|
+
children: pe
|
|
8629
8529
|
})
|
|
8630
8530
|
]
|
|
8631
8531
|
}),
|
|
@@ -8635,7 +8535,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8635
8535
|
htmlFor: "cv-code",
|
|
8636
8536
|
className: "text-[13px] font-medium text-muted-foreground",
|
|
8637
8537
|
children: "Authentication code"
|
|
8638
|
-
}), /* @__PURE__ */ _(
|
|
8538
|
+
}), /* @__PURE__ */ _(Vo, {
|
|
8639
8539
|
id: "cv-code",
|
|
8640
8540
|
value: C,
|
|
8641
8541
|
onChange: w
|
|
@@ -8643,7 +8543,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8643
8543
|
})
|
|
8644
8544
|
]
|
|
8645
8545
|
}),
|
|
8646
|
-
/* @__PURE__ */ _(
|
|
8546
|
+
/* @__PURE__ */ _(ue, {
|
|
8647
8547
|
bleed: "dialog",
|
|
8648
8548
|
actions: [{
|
|
8649
8549
|
key: "cancel",
|
|
@@ -8663,7 +8563,7 @@ function Vo({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
8663
8563
|
]
|
|
8664
8564
|
});
|
|
8665
8565
|
}
|
|
8666
|
-
function
|
|
8566
|
+
function Vo({ id: e, value: t, onChange: n, length: r = 6 }) {
|
|
8667
8567
|
let [i, a] = d(!1), o = Array.from({ length: r }, (e, n) => t[n] ?? ""), s = Math.min(t.length, r - 1);
|
|
8668
8568
|
return /* @__PURE__ */ v("div", {
|
|
8669
8569
|
className: "relative",
|
|
@@ -8680,11 +8580,11 @@ function Ho({ id: e, value: t, onChange: n, length: r = 6 }) {
|
|
|
8680
8580
|
autoFocus: !0,
|
|
8681
8581
|
className: "absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 outline-none"
|
|
8682
8582
|
}), /* @__PURE__ */ _("div", {
|
|
8683
|
-
className:
|
|
8583
|
+
className: L("flex h-16 w-full divide-x divide-input overflow-hidden rounded-xl border border-input transition-colors", i && "border-ring ring-3 ring-ring/50"),
|
|
8684
8584
|
children: o.map((e, t) => {
|
|
8685
8585
|
let n = i && t === s;
|
|
8686
8586
|
return /* @__PURE__ */ _("div", {
|
|
8687
|
-
className:
|
|
8587
|
+
className: L("flex flex-1 items-center justify-center text-3xl font-semibold tabular-nums text-foreground", n && "bg-primary/5"),
|
|
8688
8588
|
children: e || (n ? /* @__PURE__ */ _("span", { className: "h-8 w-px animate-pulse bg-foreground" }) : "")
|
|
8689
8589
|
}, t);
|
|
8690
8590
|
})
|
|
@@ -8693,14 +8593,14 @@ function Ho({ id: e, value: t, onChange: n, length: r = 6 }) {
|
|
|
8693
8593
|
}
|
|
8694
8594
|
//#endregion
|
|
8695
8595
|
//#region ../../react-app/src/components/convert/types.ts
|
|
8696
|
-
var
|
|
8697
|
-
COINS: () =>
|
|
8698
|
-
DEPOSIT_HISTORY: () =>
|
|
8699
|
-
DEPOSIT_WALLETS: () =>
|
|
8700
|
-
NETWORKS: () =>
|
|
8701
|
-
figureToNumber: () =>
|
|
8702
|
-
formatUsd: () =>
|
|
8703
|
-
}),
|
|
8596
|
+
var Ho = /* @__PURE__ */ I({}), Uo = /* @__PURE__ */ I({
|
|
8597
|
+
COINS: () => Go,
|
|
8598
|
+
DEPOSIT_HISTORY: () => qo,
|
|
8599
|
+
DEPOSIT_WALLETS: () => Ko,
|
|
8600
|
+
NETWORKS: () => Wo,
|
|
8601
|
+
figureToNumber: () => Jo,
|
|
8602
|
+
formatUsd: () => Yo
|
|
8603
|
+
}), Wo = {
|
|
8704
8604
|
ETH: {
|
|
8705
8605
|
code: "ETH",
|
|
8706
8606
|
name: "Ethereum"
|
|
@@ -8721,7 +8621,7 @@ var Uo = /* @__PURE__ */ F({}), Wo = /* @__PURE__ */ F({
|
|
|
8721
8621
|
code: "POL",
|
|
8722
8622
|
name: "Polygon"
|
|
8723
8623
|
}
|
|
8724
|
-
},
|
|
8624
|
+
}, Go = [
|
|
8725
8625
|
{
|
|
8726
8626
|
code: "USDT",
|
|
8727
8627
|
name: "Tether",
|
|
@@ -8756,7 +8656,7 @@ var Uo = /* @__PURE__ */ F({}), Wo = /* @__PURE__ */ F({
|
|
|
8756
8656
|
name: "Solana",
|
|
8757
8657
|
networks: ["SOL"]
|
|
8758
8658
|
}
|
|
8759
|
-
],
|
|
8659
|
+
], Ko = [
|
|
8760
8660
|
{
|
|
8761
8661
|
id: "w-usdt-eth-low",
|
|
8762
8662
|
name: "Low Risk Wallet",
|
|
@@ -8889,7 +8789,7 @@ var Uo = /* @__PURE__ */ F({}), Wo = /* @__PURE__ */ F({
|
|
|
8889
8789
|
amountFiat: "$41,440.00",
|
|
8890
8790
|
fiatRate: 148
|
|
8891
8791
|
}
|
|
8892
|
-
],
|
|
8792
|
+
], qo = [
|
|
8893
8793
|
{
|
|
8894
8794
|
id: "dp-01",
|
|
8895
8795
|
date: "Jul 14, 2026",
|
|
@@ -9002,10 +8902,10 @@ var Uo = /* @__PURE__ */ F({}), Wo = /* @__PURE__ */ F({
|
|
|
9002
8902
|
status: "confirmed"
|
|
9003
8903
|
}
|
|
9004
8904
|
];
|
|
9005
|
-
function
|
|
8905
|
+
function Jo(e) {
|
|
9006
8906
|
return parseFloat(e.replace(/[^0-9.]/g, "")) || 0;
|
|
9007
8907
|
}
|
|
9008
|
-
function
|
|
8908
|
+
function Yo(e) {
|
|
9009
8909
|
return e.toLocaleString("en-US", {
|
|
9010
8910
|
style: "currency",
|
|
9011
8911
|
currency: "USD",
|
|
@@ -9015,17 +8915,17 @@ function Xo(e) {
|
|
|
9015
8915
|
}
|
|
9016
8916
|
//#endregion
|
|
9017
8917
|
//#region ../../react-app/src/components/deposit/DepositHistoryTable.tsx
|
|
9018
|
-
function
|
|
8918
|
+
function Xo(e) {
|
|
9019
8919
|
let t = Date.parse(`${e.date} ${e.time}`);
|
|
9020
8920
|
return Number.isNaN(t) ? 0 : t;
|
|
9021
8921
|
}
|
|
9022
|
-
function
|
|
8922
|
+
function Zo({ data: e, className: t }) {
|
|
9023
8923
|
let n = l(() => [
|
|
9024
8924
|
{
|
|
9025
8925
|
id: "date",
|
|
9026
8926
|
header: "Date",
|
|
9027
8927
|
sortable: !0,
|
|
9028
|
-
sortValue:
|
|
8928
|
+
sortValue: Xo,
|
|
9029
8929
|
cell: (e) => /* @__PURE__ */ _(K, {
|
|
9030
8930
|
primary: e.date,
|
|
9031
8931
|
secondary: e.time
|
|
@@ -9070,7 +8970,7 @@ function Qo({ data: e, className: t }) {
|
|
|
9070
8970
|
size: "sm"
|
|
9071
8971
|
}), /* @__PURE__ */ _(K, {
|
|
9072
8972
|
primary: e.coin,
|
|
9073
|
-
secondary:
|
|
8973
|
+
secondary: Wo[e.network]?.name ?? e.network
|
|
9074
8974
|
})]
|
|
9075
8975
|
})
|
|
9076
8976
|
},
|
|
@@ -9104,7 +9004,7 @@ function Qo({ data: e, className: t }) {
|
|
|
9104
9004
|
}
|
|
9105
9005
|
], []);
|
|
9106
9006
|
return /* @__PURE__ */ _("div", {
|
|
9107
|
-
className:
|
|
9007
|
+
className: L(t),
|
|
9108
9008
|
children: /* @__PURE__ */ _(Rr, {
|
|
9109
9009
|
columns: n,
|
|
9110
9010
|
data: e.slice(0, 5),
|
|
@@ -9116,20 +9016,20 @@ function Qo({ data: e, className: t }) {
|
|
|
9116
9016
|
}
|
|
9117
9017
|
//#endregion
|
|
9118
9018
|
//#region ../../react-app/src/components/deposit/QrCode.tsx
|
|
9119
|
-
var
|
|
9120
|
-
function
|
|
9019
|
+
var Qo = 3;
|
|
9020
|
+
function $o({ value: e, className: t }) {
|
|
9121
9021
|
let { size: n, darks: r } = l(() => {
|
|
9122
|
-
let t =
|
|
9022
|
+
let t = ce.create(e || " ", { errorCorrectionLevel: "M" }), n = t.modules.size, r = t.modules.data, i = [];
|
|
9123
9023
|
for (let e = 0; e < n; e++) for (let t = 0; t < n; t++) r[e * n + t] && i.push([t, e]);
|
|
9124
9024
|
return {
|
|
9125
9025
|
size: n,
|
|
9126
9026
|
darks: i
|
|
9127
9027
|
};
|
|
9128
|
-
}, [e]), i = n +
|
|
9028
|
+
}, [e]), i = n + Qo * 2;
|
|
9129
9029
|
return /* @__PURE__ */ v("svg", {
|
|
9130
9030
|
viewBox: `0 0 ${i} ${i}`,
|
|
9131
9031
|
shapeRendering: "crispEdges",
|
|
9132
|
-
className:
|
|
9032
|
+
className: L("h-auto w-full", t),
|
|
9133
9033
|
role: "img",
|
|
9134
9034
|
"aria-label": "Deposit address QR code",
|
|
9135
9035
|
children: [/* @__PURE__ */ _("rect", {
|
|
@@ -9138,7 +9038,7 @@ function es({ value: e, className: t }) {
|
|
|
9138
9038
|
fill: "#ffffff"
|
|
9139
9039
|
}), /* @__PURE__ */ _("g", {
|
|
9140
9040
|
fill: "#0f172a",
|
|
9141
|
-
transform: `translate(${
|
|
9041
|
+
transform: `translate(${Qo} ${Qo})`,
|
|
9142
9042
|
children: r.map(([e, t]) => /* @__PURE__ */ _("rect", {
|
|
9143
9043
|
x: e,
|
|
9144
9044
|
y: t,
|
|
@@ -9150,10 +9050,10 @@ function es({ value: e, className: t }) {
|
|
|
9150
9050
|
}
|
|
9151
9051
|
//#endregion
|
|
9152
9052
|
//#region ../../react-app/src/components/deposit/DepositReceiveCard.tsx
|
|
9153
|
-
function
|
|
9053
|
+
function es({ wallet: e, coin: t, network: n, networkName: r, className: i }) {
|
|
9154
9054
|
let [a, o] = d(!1);
|
|
9155
9055
|
return /* @__PURE__ */ v("div", {
|
|
9156
|
-
className:
|
|
9056
|
+
className: L("flex flex-col rounded-2xl border border-cb-line bg-slate-50 dark:bg-slate-900/40", i),
|
|
9157
9057
|
children: [/* @__PURE__ */ v("div", {
|
|
9158
9058
|
className: "px-5 py-4",
|
|
9159
9059
|
children: [/* @__PURE__ */ _("h2", {
|
|
@@ -9201,7 +9101,7 @@ function ts({ wallet: e, coin: t, network: n, networkName: r, className: i }) {
|
|
|
9201
9101
|
})]
|
|
9202
9102
|
}), /* @__PURE__ */ _("div", {
|
|
9203
9103
|
className: "w-26 shrink-0 rounded-lg border border-cb-line bg-white p-1.5",
|
|
9204
|
-
children: /* @__PURE__ */ _(
|
|
9104
|
+
children: /* @__PURE__ */ _($o, { value: e.address })
|
|
9205
9105
|
})]
|
|
9206
9106
|
}),
|
|
9207
9107
|
/* @__PURE__ */ v("div", {
|
|
@@ -9230,7 +9130,7 @@ function ts({ wallet: e, coin: t, network: n, networkName: r, className: i }) {
|
|
|
9230
9130
|
}), /* @__PURE__ */ _(Mr, { value: e.tag })]
|
|
9231
9131
|
})]
|
|
9232
9132
|
}),
|
|
9233
|
-
/* @__PURE__ */ v(
|
|
9133
|
+
/* @__PURE__ */ v(B, {
|
|
9234
9134
|
type: "button",
|
|
9235
9135
|
onClick: () => {
|
|
9236
9136
|
e && (navigator.clipboard?.writeText(e.address), o(!0), window.setTimeout(() => o(!1), 1200));
|
|
@@ -9260,14 +9160,14 @@ function ts({ wallet: e, coin: t, network: n, networkName: r, className: i }) {
|
|
|
9260
9160
|
}
|
|
9261
9161
|
//#endregion
|
|
9262
9162
|
//#region ../../react-app/src/components/deposit/DepositPanel.tsx
|
|
9263
|
-
function
|
|
9264
|
-
let [t, n] = d("USDT"), [r, i] = d("ETH"), [a, o] = d(null), s = (
|
|
9163
|
+
function ts({ className: e }) {
|
|
9164
|
+
let [t, n] = d("USDT"), [r, i] = d("ETH"), [a, o] = d(null), s = (Go.find((e) => e.code === t) ?? Go[0]).networks, c = l(() => Ko.filter((e) => e.coin === t && e.network === r), [t, r]), u = c.find((e) => e.id === a) ?? null, f = (e) => {
|
|
9265
9165
|
n(e);
|
|
9266
|
-
let t =
|
|
9166
|
+
let t = Go.find((t) => t.code === e);
|
|
9267
9167
|
i(t?.networks[0] ?? ""), o(null);
|
|
9268
9168
|
}, p = (e) => {
|
|
9269
9169
|
i(e), o(null);
|
|
9270
|
-
}, m =
|
|
9170
|
+
}, m = Go.map((e) => ({
|
|
9271
9171
|
value: e.code,
|
|
9272
9172
|
label: e.code,
|
|
9273
9173
|
sublabel: e.name,
|
|
@@ -9279,7 +9179,7 @@ function ns({ className: e }) {
|
|
|
9279
9179
|
})), h = s.map((e) => ({
|
|
9280
9180
|
value: e,
|
|
9281
9181
|
label: e,
|
|
9282
|
-
sublabel:
|
|
9182
|
+
sublabel: Wo[e]?.name ?? e,
|
|
9283
9183
|
leading: /* @__PURE__ */ _(W, {
|
|
9284
9184
|
code: e,
|
|
9285
9185
|
src: q(e),
|
|
@@ -9295,7 +9195,7 @@ function ns({ className: e }) {
|
|
|
9295
9195
|
amountFiat: e.amountFiat
|
|
9296
9196
|
}));
|
|
9297
9197
|
return /* @__PURE__ */ v("div", {
|
|
9298
|
-
className:
|
|
9198
|
+
className: L("grid grid-cols-1 items-stretch gap-6 lg:grid-cols-[minmax(0,1fr)_360px]", e),
|
|
9299
9199
|
children: [/* @__PURE__ */ _("div", {
|
|
9300
9200
|
className: "flex flex-col rounded-2xl border border-cb-line bg-cb-card p-5 shadow-xs",
|
|
9301
9201
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -9315,7 +9215,7 @@ function ns({ className: e }) {
|
|
|
9315
9215
|
options: h,
|
|
9316
9216
|
onChange: p
|
|
9317
9217
|
}),
|
|
9318
|
-
/* @__PURE__ */ _(
|
|
9218
|
+
/* @__PURE__ */ _(xo, {
|
|
9319
9219
|
id: "dp-wallet",
|
|
9320
9220
|
label: "Deposit to wallet",
|
|
9321
9221
|
placeholder: "Select a receiving wallet",
|
|
@@ -9328,7 +9228,7 @@ function ns({ className: e }) {
|
|
|
9328
9228
|
u && /* @__PURE__ */ v("div", {
|
|
9329
9229
|
className: "flex gap-2.5 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2.5 text-[13px] text-amber-700 dark:border-amber-500/25 dark:bg-amber-500/10 dark:text-amber-400",
|
|
9330
9230
|
children: [/* @__PURE__ */ _(x, {
|
|
9331
|
-
icon:
|
|
9231
|
+
icon: pe,
|
|
9332
9232
|
size: 16,
|
|
9333
9233
|
strokeWidth: 2,
|
|
9334
9234
|
className: "mt-0.5 shrink-0"
|
|
@@ -9342,32 +9242,32 @@ function ns({ className: e }) {
|
|
|
9342
9242
|
" ",
|
|
9343
9243
|
/* @__PURE__ */ _("span", {
|
|
9344
9244
|
className: "font-semibold",
|
|
9345
|
-
children:
|
|
9245
|
+
children: Wo[r]?.name ?? r
|
|
9346
9246
|
}),
|
|
9347
9247
|
" network to this address. Other assets or networks may be lost permanently."
|
|
9348
9248
|
] })]
|
|
9349
9249
|
})
|
|
9350
9250
|
]
|
|
9351
9251
|
})
|
|
9352
|
-
}), /* @__PURE__ */ _(
|
|
9252
|
+
}), /* @__PURE__ */ _(es, {
|
|
9353
9253
|
wallet: u,
|
|
9354
9254
|
coin: t,
|
|
9355
9255
|
network: r,
|
|
9356
|
-
networkName:
|
|
9256
|
+
networkName: Wo[r]?.name
|
|
9357
9257
|
})]
|
|
9358
9258
|
});
|
|
9359
9259
|
}
|
|
9360
9260
|
//#endregion
|
|
9361
9261
|
//#region ../../react-app/src/components/deposit/types.ts
|
|
9362
|
-
var
|
|
9363
|
-
COINS: () =>
|
|
9364
|
-
NETWORKS: () =>
|
|
9365
|
-
SAVED_ADDRESSES: () =>
|
|
9366
|
-
SOURCE_WALLETS: () =>
|
|
9367
|
-
WITHDRAWAL_HISTORY: () =>
|
|
9368
|
-
figureToNumber: () =>
|
|
9369
|
-
formatUsd: () =>
|
|
9370
|
-
}),
|
|
9262
|
+
var ns = /* @__PURE__ */ I({}), rs = /* @__PURE__ */ I({
|
|
9263
|
+
COINS: () => as,
|
|
9264
|
+
NETWORKS: () => is,
|
|
9265
|
+
SAVED_ADDRESSES: () => ss,
|
|
9266
|
+
SOURCE_WALLETS: () => os,
|
|
9267
|
+
WITHDRAWAL_HISTORY: () => cs,
|
|
9268
|
+
figureToNumber: () => ls,
|
|
9269
|
+
formatUsd: () => us
|
|
9270
|
+
}), is = {
|
|
9371
9271
|
ETH: {
|
|
9372
9272
|
code: "ETH",
|
|
9373
9273
|
name: "Ethereum"
|
|
@@ -9392,7 +9292,7 @@ var rs = /* @__PURE__ */ F({}), is = /* @__PURE__ */ F({
|
|
|
9392
9292
|
code: "TON",
|
|
9393
9293
|
name: "TON"
|
|
9394
9294
|
}
|
|
9395
|
-
},
|
|
9295
|
+
}, as = [
|
|
9396
9296
|
{
|
|
9397
9297
|
code: "USDT",
|
|
9398
9298
|
name: "Tether",
|
|
@@ -9432,7 +9332,7 @@ var rs = /* @__PURE__ */ F({}), is = /* @__PURE__ */ F({
|
|
|
9432
9332
|
name: "Toncoin",
|
|
9433
9333
|
networks: ["TON"]
|
|
9434
9334
|
}
|
|
9435
|
-
],
|
|
9335
|
+
], os = [
|
|
9436
9336
|
{
|
|
9437
9337
|
id: "w-usdt-eth-low",
|
|
9438
9338
|
name: "Low Risk Wallet",
|
|
@@ -9587,7 +9487,7 @@ var rs = /* @__PURE__ */ F({}), is = /* @__PURE__ */ F({
|
|
|
9587
9487
|
amountFiat: "$6,600.00",
|
|
9588
9488
|
fiatRate: 5.5
|
|
9589
9489
|
}
|
|
9590
|
-
],
|
|
9490
|
+
], ss = [
|
|
9591
9491
|
{
|
|
9592
9492
|
id: "a-binance-usdt-eth",
|
|
9593
9493
|
label: "Binance Hot Wallet",
|
|
@@ -9658,7 +9558,7 @@ var rs = /* @__PURE__ */ F({}), is = /* @__PURE__ */ F({
|
|
|
9658
9558
|
network: "SOL",
|
|
9659
9559
|
address: "3n1DcS4Km3M8p5wV7oJ2rL9tQ6xY4bN8zA1cF5eH7gK"
|
|
9660
9560
|
}
|
|
9661
|
-
],
|
|
9561
|
+
], cs = [
|
|
9662
9562
|
{
|
|
9663
9563
|
id: "wd-01",
|
|
9664
9564
|
date: "Jul 14, 2026",
|
|
@@ -9780,10 +9680,10 @@ var rs = /* @__PURE__ */ F({}), is = /* @__PURE__ */ F({
|
|
|
9780
9680
|
status: "pending-approval"
|
|
9781
9681
|
}
|
|
9782
9682
|
];
|
|
9783
|
-
function
|
|
9683
|
+
function ls(e) {
|
|
9784
9684
|
return parseFloat(e.replace(/[^0-9.]/g, "")) || 0;
|
|
9785
9685
|
}
|
|
9786
|
-
function
|
|
9686
|
+
function us(e) {
|
|
9787
9687
|
return e.toLocaleString("en-US", {
|
|
9788
9688
|
style: "currency",
|
|
9789
9689
|
currency: "USD",
|
|
@@ -9793,11 +9693,11 @@ function ds(e) {
|
|
|
9793
9693
|
}
|
|
9794
9694
|
//#endregion
|
|
9795
9695
|
//#region ../../react-app/src/components/withdraw/WithdrawHistoryTable.tsx
|
|
9796
|
-
function
|
|
9696
|
+
function ds(e) {
|
|
9797
9697
|
let t = Date.parse(`${e.date} ${e.time}`);
|
|
9798
9698
|
return Number.isNaN(t) ? 0 : t;
|
|
9799
9699
|
}
|
|
9800
|
-
function
|
|
9700
|
+
function fs({ name: e }) {
|
|
9801
9701
|
return /* @__PURE__ */ v("span", {
|
|
9802
9702
|
className: "flex items-center gap-2",
|
|
9803
9703
|
children: [/* @__PURE__ */ _("span", {
|
|
@@ -9809,13 +9709,13 @@ function ps({ name: e }) {
|
|
|
9809
9709
|
})]
|
|
9810
9710
|
});
|
|
9811
9711
|
}
|
|
9812
|
-
function
|
|
9712
|
+
function ps({ data: e, className: t }) {
|
|
9813
9713
|
let n = l(() => [
|
|
9814
9714
|
{
|
|
9815
9715
|
id: "date",
|
|
9816
9716
|
header: "Date",
|
|
9817
9717
|
sortable: !0,
|
|
9818
|
-
sortValue:
|
|
9718
|
+
sortValue: ds,
|
|
9819
9719
|
cell: (e) => /* @__PURE__ */ _(K, {
|
|
9820
9720
|
primary: e.date,
|
|
9821
9721
|
secondary: e.time
|
|
@@ -9826,7 +9726,7 @@ function ms({ data: e, className: t }) {
|
|
|
9826
9726
|
header: "Initiated by",
|
|
9827
9727
|
sortable: !0,
|
|
9828
9728
|
sortValue: (e) => e.initiator,
|
|
9829
|
-
cell: (e) => /* @__PURE__ */ _(
|
|
9729
|
+
cell: (e) => /* @__PURE__ */ _(fs, { name: e.initiator })
|
|
9830
9730
|
},
|
|
9831
9731
|
{
|
|
9832
9732
|
id: "from",
|
|
@@ -9867,7 +9767,7 @@ function ms({ data: e, className: t }) {
|
|
|
9867
9767
|
size: "sm"
|
|
9868
9768
|
}), /* @__PURE__ */ _(K, {
|
|
9869
9769
|
primary: e.coin,
|
|
9870
|
-
secondary:
|
|
9770
|
+
secondary: is[e.network]?.name ?? e.network
|
|
9871
9771
|
})]
|
|
9872
9772
|
})
|
|
9873
9773
|
},
|
|
@@ -9901,7 +9801,7 @@ function ms({ data: e, className: t }) {
|
|
|
9901
9801
|
}
|
|
9902
9802
|
], []);
|
|
9903
9803
|
return /* @__PURE__ */ _("div", {
|
|
9904
|
-
className:
|
|
9804
|
+
className: L(t),
|
|
9905
9805
|
children: /* @__PURE__ */ _(Rr, {
|
|
9906
9806
|
columns: n,
|
|
9907
9807
|
data: e.slice(0, 5),
|
|
@@ -9913,10 +9813,10 @@ function ms({ data: e, className: t }) {
|
|
|
9913
9813
|
}
|
|
9914
9814
|
//#endregion
|
|
9915
9815
|
//#region ../../react-app/src/components/withdraw/WithdrawSummary.tsx
|
|
9916
|
-
function
|
|
9816
|
+
function ms({ coin: e, network: t, networkName: n, amount: r, amountFiat: i, from: a, to: o, footer: s, className: c }) {
|
|
9917
9817
|
let l = r != null && r !== "" && r !== "0";
|
|
9918
9818
|
return /* @__PURE__ */ v("div", {
|
|
9919
|
-
className:
|
|
9819
|
+
className: L("flex flex-col rounded-2xl border border-cb-line bg-slate-50 dark:bg-slate-900/40", c),
|
|
9920
9820
|
children: [
|
|
9921
9821
|
/* @__PURE__ */ v("div", {
|
|
9922
9822
|
className: "px-5 pt-4 pb-1",
|
|
@@ -9967,11 +9867,11 @@ function hs({ coin: e, network: t, networkName: n, amount: r, amountFiat: i, fro
|
|
|
9967
9867
|
children: "—"
|
|
9968
9868
|
})
|
|
9969
9869
|
}),
|
|
9970
|
-
/* @__PURE__ */ _(
|
|
9870
|
+
/* @__PURE__ */ _(hs, {
|
|
9971
9871
|
caption: "From",
|
|
9972
9872
|
endpoint: a
|
|
9973
9873
|
}),
|
|
9974
|
-
/* @__PURE__ */ _(
|
|
9874
|
+
/* @__PURE__ */ _(hs, {
|
|
9975
9875
|
caption: "To",
|
|
9976
9876
|
endpoint: o
|
|
9977
9877
|
})
|
|
@@ -9984,7 +9884,7 @@ function hs({ coin: e, network: t, networkName: n, amount: r, amountFiat: i, fro
|
|
|
9984
9884
|
]
|
|
9985
9885
|
});
|
|
9986
9886
|
}
|
|
9987
|
-
function
|
|
9887
|
+
function hs({ caption: e, endpoint: t }) {
|
|
9988
9888
|
return /* @__PURE__ */ _(Y, {
|
|
9989
9889
|
label: e,
|
|
9990
9890
|
children: t ? t.label ? /* @__PURE__ */ v("div", {
|
|
@@ -10011,26 +9911,26 @@ function gs({ caption: e, endpoint: t }) {
|
|
|
10011
9911
|
}
|
|
10012
9912
|
//#endregion
|
|
10013
9913
|
//#region ../../react-app/src/components/withdraw/WithdrawPanel.tsx
|
|
10014
|
-
function
|
|
9914
|
+
function gs(e) {
|
|
10015
9915
|
return e.length > 18 ? `${e.slice(0, 10)}…${e.slice(-6)}` : e;
|
|
10016
9916
|
}
|
|
10017
|
-
function
|
|
10018
|
-
let [r, i] = d("USDT"), [a, o] = d("ETH"), [s, c] = d(null), [u, f] = d(""), [p, m] = d(""), [h, y] = d(""), [b, S] = d(!1), [C, w] = d(""), [
|
|
9917
|
+
function _s({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
9918
|
+
let [r, i] = d("USDT"), [a, o] = d("ETH"), [s, c] = d(null), [u, f] = d(""), [p, m] = d(""), [h, y] = d(""), [b, S] = d(!1), [C, w] = d(""), [T, E] = d(!1), ee = (as.find((e) => e.code === r) ?? as[0]).networks, D = l(() => os.filter((e) => e.coin === r && e.network === a), [r, a]), O = D.find((e) => e.id === s) ?? null, te = p.trim() !== "", ne = r === "TON", re = !ne || u.trim() !== "", k = ls(h), A = O ? ls(O.amount) : 0, j = O != null && k > A, M = h.trim() !== "" && k > 0, N = O && M ? us(k * O.fiatRate) : null, ie = M ? k.toLocaleString("en-US", {
|
|
10019
9919
|
minimumFractionDigits: 2,
|
|
10020
9920
|
maximumFractionDigits: 8
|
|
10021
|
-
}) : null,
|
|
9921
|
+
}) : null, ae = O != null && te && M && !j && re, oe = (e) => {
|
|
10022
9922
|
i(e);
|
|
10023
|
-
let t =
|
|
9923
|
+
let t = as.find((t) => t.code === e);
|
|
10024
9924
|
o(t?.networks[0] ?? ""), c(null), f("");
|
|
10025
|
-
}, M = (e) => {
|
|
10026
|
-
o(e), c(null);
|
|
10027
|
-
}, N = () => {
|
|
10028
|
-
D && y(D.amount);
|
|
10029
9925
|
}, P = (e) => {
|
|
9926
|
+
o(e), c(null);
|
|
9927
|
+
}, F = () => {
|
|
9928
|
+
O && y(O.amount);
|
|
9929
|
+
}, se = (e) => {
|
|
10030
9930
|
let t = e.replace(/[^0-9.,]/g, ""), n = t.indexOf(".");
|
|
10031
9931
|
n !== -1 && (t = t.slice(0, n + 1) + t.slice(n + 1).replace(/\./g, "")), y(t);
|
|
10032
|
-
},
|
|
10033
|
-
if (!
|
|
9932
|
+
}, ce = () => {
|
|
9933
|
+
if (!O || !te) return;
|
|
10034
9934
|
let n = /* @__PURE__ */ new Date(), i = {
|
|
10035
9935
|
id: `wd-${n.getTime()}`,
|
|
10036
9936
|
date: n.toLocaleDateString("en-US", {
|
|
@@ -10043,24 +9943,24 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10043
9943
|
minute: "2-digit"
|
|
10044
9944
|
}),
|
|
10045
9945
|
initiator: e,
|
|
10046
|
-
fromWallet:
|
|
10047
|
-
fromAddress:
|
|
9946
|
+
fromWallet: O.name,
|
|
9947
|
+
fromAddress: O.address,
|
|
10048
9948
|
toLabel: "External address",
|
|
10049
9949
|
toAddress: p.trim(),
|
|
10050
9950
|
coin: r,
|
|
10051
9951
|
network: a,
|
|
10052
9952
|
amount: `-${h}`,
|
|
10053
|
-
amountFiat: `-${
|
|
9953
|
+
amountFiat: `-${us(k * O.fiatRate)}`,
|
|
10054
9954
|
status: "processing"
|
|
10055
9955
|
};
|
|
10056
|
-
t?.(i),
|
|
10057
|
-
},
|
|
9956
|
+
t?.(i), E(!0);
|
|
9957
|
+
}, le = (e) => {
|
|
10058
9958
|
if (e) {
|
|
10059
9959
|
S(!0);
|
|
10060
9960
|
return;
|
|
10061
9961
|
}
|
|
10062
|
-
S(!1), w(""),
|
|
10063
|
-
},
|
|
9962
|
+
S(!1), w(""), T && (E(!1), y(""), m(""), f(""));
|
|
9963
|
+
}, I = as.map((e) => ({
|
|
10064
9964
|
value: e.code,
|
|
10065
9965
|
label: e.code,
|
|
10066
9966
|
sublabel: e.name,
|
|
@@ -10069,16 +9969,16 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10069
9969
|
src: q(e.code),
|
|
10070
9970
|
className: "size-6"
|
|
10071
9971
|
})
|
|
10072
|
-
})),
|
|
9972
|
+
})), R = ee.map((e) => ({
|
|
10073
9973
|
value: e,
|
|
10074
9974
|
label: e,
|
|
10075
|
-
sublabel:
|
|
9975
|
+
sublabel: is[e]?.name ?? e,
|
|
10076
9976
|
leading: /* @__PURE__ */ _(W, {
|
|
10077
9977
|
code: e,
|
|
10078
9978
|
src: q(e),
|
|
10079
9979
|
className: "size-6"
|
|
10080
9980
|
})
|
|
10081
|
-
})),
|
|
9981
|
+
})), z = D.map((e) => ({
|
|
10082
9982
|
id: e.id,
|
|
10083
9983
|
name: e.name,
|
|
10084
9984
|
address: e.address,
|
|
@@ -10088,7 +9988,7 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10088
9988
|
amountFiat: e.amountFiat
|
|
10089
9989
|
}));
|
|
10090
9990
|
return /* @__PURE__ */ v("div", {
|
|
10091
|
-
className:
|
|
9991
|
+
className: L("grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_360px]", n),
|
|
10092
9992
|
children: [
|
|
10093
9993
|
/* @__PURE__ */ _("div", {
|
|
10094
9994
|
className: "flex flex-col rounded-2xl border border-cb-line bg-cb-card p-5 shadow-xs",
|
|
@@ -10101,28 +10001,28 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10101
10001
|
id: "wd-coin",
|
|
10102
10002
|
label: "Coin",
|
|
10103
10003
|
value: r,
|
|
10104
|
-
options:
|
|
10105
|
-
onChange:
|
|
10004
|
+
options: I,
|
|
10005
|
+
onChange: oe
|
|
10106
10006
|
}), /* @__PURE__ */ _($, {
|
|
10107
10007
|
id: "wd-network",
|
|
10108
10008
|
label: "Network",
|
|
10109
10009
|
value: a,
|
|
10110
|
-
options:
|
|
10111
|
-
onChange:
|
|
10010
|
+
options: R,
|
|
10011
|
+
onChange: P
|
|
10112
10012
|
})]
|
|
10113
10013
|
}),
|
|
10114
|
-
|
|
10014
|
+
ne ? /* @__PURE__ */ v("div", {
|
|
10115
10015
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
10116
|
-
children: [/* @__PURE__ */ _(
|
|
10016
|
+
children: [/* @__PURE__ */ _(xo, {
|
|
10117
10017
|
id: "wd-source",
|
|
10118
10018
|
label: "From wallet",
|
|
10119
10019
|
placeholder: "Select a source wallet",
|
|
10120
10020
|
value: s,
|
|
10121
|
-
wallets:
|
|
10021
|
+
wallets: z,
|
|
10122
10022
|
onChange: c,
|
|
10123
10023
|
variant: "detailed",
|
|
10124
10024
|
emptyMessage: "No wallets for this coin & network."
|
|
10125
|
-
}), /* @__PURE__ */ _(
|
|
10025
|
+
}), /* @__PURE__ */ _(yo, {
|
|
10126
10026
|
id: "wd-from-tag",
|
|
10127
10027
|
label: "From tag",
|
|
10128
10028
|
value: u,
|
|
@@ -10133,74 +10033,74 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10133
10033
|
autoComplete: "off",
|
|
10134
10034
|
inputClassName: "font-mono text-[13px]"
|
|
10135
10035
|
})]
|
|
10136
|
-
}) : /* @__PURE__ */ _(
|
|
10036
|
+
}) : /* @__PURE__ */ _(xo, {
|
|
10137
10037
|
id: "wd-source",
|
|
10138
10038
|
label: "From wallet",
|
|
10139
10039
|
placeholder: "Select a source wallet",
|
|
10140
10040
|
value: s,
|
|
10141
|
-
wallets:
|
|
10041
|
+
wallets: z,
|
|
10142
10042
|
onChange: c,
|
|
10143
10043
|
variant: "detailed",
|
|
10144
10044
|
emptyMessage: "No wallets for this coin & network."
|
|
10145
10045
|
}),
|
|
10146
|
-
/* @__PURE__ */ _(
|
|
10046
|
+
/* @__PURE__ */ _(yo, {
|
|
10147
10047
|
id: "wd-dest",
|
|
10148
10048
|
label: "To address",
|
|
10149
10049
|
value: p,
|
|
10150
10050
|
onChange: m,
|
|
10151
|
-
placeholder: `Paste a ${
|
|
10051
|
+
placeholder: `Paste a ${is[a]?.name ?? a} ${r} address`,
|
|
10152
10052
|
spellCheck: !1,
|
|
10153
10053
|
autoComplete: "off",
|
|
10154
10054
|
inputClassName: "h-10 font-mono text-[13px]"
|
|
10155
10055
|
}),
|
|
10156
|
-
/* @__PURE__ */ _(
|
|
10056
|
+
/* @__PURE__ */ _(vo, {
|
|
10157
10057
|
id: "wd-amount",
|
|
10158
10058
|
value: h,
|
|
10159
|
-
onChange:
|
|
10059
|
+
onChange: se,
|
|
10160
10060
|
suffix: r,
|
|
10161
|
-
disabled: !
|
|
10162
|
-
invalid:
|
|
10163
|
-
onMax:
|
|
10164
|
-
maxDisabled: !
|
|
10165
|
-
hint:
|
|
10061
|
+
disabled: !O,
|
|
10062
|
+
invalid: j,
|
|
10063
|
+
onMax: F,
|
|
10064
|
+
maxDisabled: !O,
|
|
10065
|
+
hint: O ? /* @__PURE__ */ v(g, { children: [
|
|
10166
10066
|
"Available:",
|
|
10167
10067
|
" ",
|
|
10168
10068
|
/* @__PURE__ */ v("span", {
|
|
10169
10069
|
className: "font-medium text-foreground",
|
|
10170
10070
|
children: [
|
|
10171
|
-
|
|
10071
|
+
O.amount,
|
|
10172
10072
|
" ",
|
|
10173
10073
|
r
|
|
10174
10074
|
]
|
|
10175
10075
|
})
|
|
10176
10076
|
] }) : "Select a wallet first",
|
|
10177
|
-
helper:
|
|
10077
|
+
helper: j ? /* @__PURE__ */ _("span", {
|
|
10178
10078
|
className: "text-destructive",
|
|
10179
10079
|
children: "Amount exceeds the available balance."
|
|
10180
|
-
}) :
|
|
10080
|
+
}) : N ? /* @__PURE__ */ v("span", {
|
|
10181
10081
|
className: "tabular-nums text-muted-foreground",
|
|
10182
|
-
children: ["≈ ",
|
|
10082
|
+
children: ["≈ ", N]
|
|
10183
10083
|
}) : null
|
|
10184
10084
|
})
|
|
10185
10085
|
]
|
|
10186
10086
|
})
|
|
10187
10087
|
}),
|
|
10188
|
-
/* @__PURE__ */ _(
|
|
10088
|
+
/* @__PURE__ */ _(ms, {
|
|
10189
10089
|
className: "h-full",
|
|
10190
10090
|
coin: r,
|
|
10191
10091
|
network: a,
|
|
10192
|
-
networkName:
|
|
10193
|
-
amount:
|
|
10194
|
-
amountFiat:
|
|
10195
|
-
from:
|
|
10196
|
-
label:
|
|
10197
|
-
address:
|
|
10092
|
+
networkName: is[a]?.name,
|
|
10093
|
+
amount: ie,
|
|
10094
|
+
amountFiat: N,
|
|
10095
|
+
from: O ? {
|
|
10096
|
+
label: O.name,
|
|
10097
|
+
address: O.address
|
|
10198
10098
|
} : null,
|
|
10199
|
-
to:
|
|
10200
|
-
footer: /* @__PURE__ */ _(
|
|
10099
|
+
to: te ? { address: p.trim() } : null,
|
|
10100
|
+
footer: /* @__PURE__ */ _(B, {
|
|
10201
10101
|
type: "button",
|
|
10202
10102
|
size: "lg",
|
|
10203
|
-
disabled: !
|
|
10103
|
+
disabled: !ae,
|
|
10204
10104
|
onClick: () => S(!0),
|
|
10205
10105
|
className: "w-full cursor-pointer",
|
|
10206
10106
|
children: "Withdraw"
|
|
@@ -10208,10 +10108,10 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10208
10108
|
}),
|
|
10209
10109
|
/* @__PURE__ */ _(St, {
|
|
10210
10110
|
open: b,
|
|
10211
|
-
onOpenChange:
|
|
10111
|
+
onOpenChange: le,
|
|
10212
10112
|
children: /* @__PURE__ */ _(Et, {
|
|
10213
10113
|
className: "max-w-md p-6",
|
|
10214
|
-
children:
|
|
10114
|
+
children: T ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
|
|
10215
10115
|
className: "flex flex-col items-center py-2 text-center",
|
|
10216
10116
|
children: [
|
|
10217
10117
|
/* @__PURE__ */ _("div", {
|
|
@@ -10231,12 +10131,12 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10231
10131
|
children: "Your withdrawal is processing — track it in the history below."
|
|
10232
10132
|
})
|
|
10233
10133
|
]
|
|
10234
|
-
}), /* @__PURE__ */ _(
|
|
10134
|
+
}), /* @__PURE__ */ _(ue, {
|
|
10235
10135
|
bleed: "dialog",
|
|
10236
10136
|
actions: [{
|
|
10237
10137
|
key: "done",
|
|
10238
10138
|
label: "Done",
|
|
10239
|
-
onClick: () =>
|
|
10139
|
+
onClick: () => le(!1)
|
|
10240
10140
|
}]
|
|
10241
10141
|
})] }) : /* @__PURE__ */ v(g, { children: [
|
|
10242
10142
|
/* @__PURE__ */ v(Dt, { children: [/* @__PURE__ */ _(kt, { children: "Confirm withdrawal" }), /* @__PURE__ */ _(At, { children: "Enter the 6-digit code from your authenticator app to continue." })] }),
|
|
@@ -10260,7 +10160,7 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10260
10160
|
" ",
|
|
10261
10161
|
/* @__PURE__ */ _("span", {
|
|
10262
10162
|
className: "font-mono text-foreground",
|
|
10263
|
-
children:
|
|
10163
|
+
children: te ? gs(p.trim()) : ""
|
|
10264
10164
|
})
|
|
10265
10165
|
]
|
|
10266
10166
|
}), /* @__PURE__ */ v("div", {
|
|
@@ -10269,24 +10169,24 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10269
10169
|
htmlFor: "wd-code",
|
|
10270
10170
|
className: "text-[13px] font-medium text-muted-foreground",
|
|
10271
10171
|
children: "Authentication code"
|
|
10272
|
-
}), /* @__PURE__ */ _(
|
|
10172
|
+
}), /* @__PURE__ */ _(vs, {
|
|
10273
10173
|
id: "wd-code",
|
|
10274
10174
|
value: C,
|
|
10275
10175
|
onChange: w
|
|
10276
10176
|
})]
|
|
10277
10177
|
})]
|
|
10278
10178
|
}),
|
|
10279
|
-
/* @__PURE__ */ _(
|
|
10179
|
+
/* @__PURE__ */ _(ue, {
|
|
10280
10180
|
bleed: "dialog",
|
|
10281
10181
|
actions: [{
|
|
10282
10182
|
key: "cancel",
|
|
10283
10183
|
label: "Cancel",
|
|
10284
10184
|
variant: "outline",
|
|
10285
|
-
onClick: () =>
|
|
10185
|
+
onClick: () => le(!1)
|
|
10286
10186
|
}, {
|
|
10287
10187
|
key: "confirm",
|
|
10288
10188
|
label: "Confirm withdrawal",
|
|
10289
|
-
onClick:
|
|
10189
|
+
onClick: ce,
|
|
10290
10190
|
disabled: C.length < 6
|
|
10291
10191
|
}]
|
|
10292
10192
|
})
|
|
@@ -10296,7 +10196,7 @@ function vs({ currentUser: e = "Maya Okafor", onSubmit: t, className: n }) {
|
|
|
10296
10196
|
]
|
|
10297
10197
|
});
|
|
10298
10198
|
}
|
|
10299
|
-
function
|
|
10199
|
+
function vs({ id: e, value: t, onChange: n, length: r = 6 }) {
|
|
10300
10200
|
let [i, a] = d(!1), o = Array.from({ length: r }, (e, n) => t[n] ?? ""), s = Math.min(t.length, r - 1);
|
|
10301
10201
|
return /* @__PURE__ */ v("div", {
|
|
10302
10202
|
className: "relative",
|
|
@@ -10313,11 +10213,11 @@ function ys({ id: e, value: t, onChange: n, length: r = 6 }) {
|
|
|
10313
10213
|
autoFocus: !0,
|
|
10314
10214
|
className: "absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 outline-none"
|
|
10315
10215
|
}), /* @__PURE__ */ _("div", {
|
|
10316
|
-
className:
|
|
10216
|
+
className: L("flex h-16 w-full divide-x divide-input overflow-hidden rounded-xl border border-input transition-colors", i && "border-ring ring-3 ring-ring/50"),
|
|
10317
10217
|
children: o.map((e, t) => {
|
|
10318
10218
|
let n = i && t === s;
|
|
10319
10219
|
return /* @__PURE__ */ _("div", {
|
|
10320
|
-
className:
|
|
10220
|
+
className: L("flex flex-1 items-center justify-center text-3xl font-semibold tabular-nums text-foreground", n && "bg-primary/5"),
|
|
10321
10221
|
children: e || (n ? /* @__PURE__ */ _("span", { className: "h-8 w-px animate-pulse bg-foreground" }) : "")
|
|
10322
10222
|
}, t);
|
|
10323
10223
|
})
|
|
@@ -10326,14 +10226,14 @@ function ys({ id: e, value: t, onChange: n, length: r = 6 }) {
|
|
|
10326
10226
|
}
|
|
10327
10227
|
//#endregion
|
|
10328
10228
|
//#region ../../react-app/src/components/withdraw/types.ts
|
|
10329
|
-
var
|
|
10330
|
-
function
|
|
10331
|
-
let [t, n] = d(() => localStorage.getItem(
|
|
10229
|
+
var ys = /* @__PURE__ */ I({}), bs = "Ipche", xs = "gateUnlocked";
|
|
10230
|
+
function Ss({ children: e }) {
|
|
10231
|
+
let [t, n] = d(() => localStorage.getItem(xs) === "true"), [r, i] = d(""), [a, o] = d(!1);
|
|
10332
10232
|
return t ? /* @__PURE__ */ _(g, { children: e }) : /* @__PURE__ */ _("div", {
|
|
10333
10233
|
className: "flex h-svh items-center justify-center bg-background p-4",
|
|
10334
10234
|
children: /* @__PURE__ */ v("form", {
|
|
10335
10235
|
onSubmit: (e) => {
|
|
10336
|
-
e.preventDefault(), r ===
|
|
10236
|
+
e.preventDefault(), r === bs ? (localStorage.setItem(xs, "true"), n(!0)) : o(!0);
|
|
10337
10237
|
},
|
|
10338
10238
|
className: "w-full max-w-xs space-y-4 rounded-xl border border-border bg-card p-6 shadow-sm",
|
|
10339
10239
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -10358,7 +10258,7 @@ function Cs({ children: e }) {
|
|
|
10358
10258
|
children: "Incorrect password."
|
|
10359
10259
|
})
|
|
10360
10260
|
]
|
|
10361
|
-
}), /* @__PURE__ */ _(
|
|
10261
|
+
}), /* @__PURE__ */ _(B, {
|
|
10362
10262
|
type: "submit",
|
|
10363
10263
|
className: "w-full",
|
|
10364
10264
|
children: "Unlock"
|
|
@@ -10367,4 +10267,4 @@ function Cs({ children: e }) {
|
|
|
10367
10267
|
});
|
|
10368
10268
|
}
|
|
10369
10269
|
//#endregion
|
|
10370
|
-
export {
|
|
10270
|
+
export { ue as ActionFooter, vo as AmountField, vr as AppHeaderV1, Cr as AppHeaderV2, mi as AssetValue, Rn as Avatar, Bn as Badge, Bn as NavBadge, uo as BalancesSummary, gi as BlockchainDetails, B as Button, bt as Calendar, xt as Checkbox, W as CoinLogo, jr as ColumnsMenu, jt as ConfirmDialog, To as ConvertHistoryTable, Bo as ConvertPanel, $ as ConvertPickerField, $ as DepositPickerField, $ as PickerField, $ as WithdrawPickerField, Do as ConvertSummary, Mr as CopyButton, G as CopyableId, Fr as CurrencyNetwork, ra as DailyBalancesTable, Rr as DataTable, Zo as DepositHistoryTable, ts as DepositPanel, es as DepositReceiveCard, Y as DetailField, St as Dialog, wt as DialogClose, Et as DialogContent, At as DialogDescription, Ot as DialogFooter, Dt as DialogHeader, kt as DialogTitle, Ct as DialogTrigger, oa as DonutChart, Br as DownloadMenu, Mt as DropdownMenu, Lt as DropdownMenuCheckboxItem, Ft as DropdownMenuContent, Pt as DropdownMenuGroup, It as DropdownMenuItem, zt as DropdownMenuLabel, Ut as DropdownMenuRadioGroup, V as DropdownMenuRadioItem, Rt as DropdownMenuSeparator, Bt as DropdownMenuSub, Ht as DropdownMenuSubContent, Vt as DropdownMenuSubTrigger, Nt as DropdownMenuTrigger, ca as ExportHistoryList, ur as FULL_NAV, Sr as HeaderSearch, wr as HeaderStickyContext, Un as ICONS, Wn as ICON_NAMES, Wt as Input, Gt as Label, qn as Logo, pr as NAV_ITEMS, fr as NAV_PRESETS, gr as NavDrawer, $n as NavGroup, Gn as NavIcon, Xn as NavItem, Vn as NavLabel, Qn as NavRailSection, Zn as NavSection, tr as NotificationItem, ir as NotificationsMenu, rr as NotificationsPanel, dr as PRIMARY_NAV, _r as PageContainer, Or as PageTitle, kr as PageTitleChip, Ar as PageTitlePanel, Kt as Pagination, qt as PaginationContent, Qt as PaginationEllipsis, Jt as PaginationItem, Yt as PaginationLink, Zt as PaginationNext, Xt as PaginationPrevious, Ss as PasswordGate, Vr as PaymentType, Sa as PeriodPicker, $t as Popover, tn as PopoverAnchor, nn as PopoverContent, en as PopoverTrigger, $o as QrCode, rn as RadioGroup, an as RadioGroupItem, ja as ReportSummaryCard, Ma as ReportSummaryGroup, Na as ReportsSummaryEmpty, bi as RiskAssessment, Hr as RiskSignal, nr as SAMPLE_NOTIFICATIONS, Pi as SavePresetDialog, Ii as SavedPresetsBar, sn as ScrollArea, Yn as SectionHeading, cn as Separator, ln as SidePanel, hn as SidePanelBody, dn as SidePanelClose, pn as SidePanelContent, vn as SidePanelDescription, gn as SidePanelFooter, mn as SidePanelHeader, bn as SidePanelSectionTitle, yn as SidePanelSeparator, _n as SidePanelTitle, un as SidePanelTrigger, H as Skeleton, Ir as SortHeader, Wr as StatusBadge, Ji as TRANSACTION_SEARCH_SCOPES, xn as Table, Cn as TableBody, Dn as TableCaption, U as TableCell, wn as TableFooter, En as TableHead, Sn as TableHeader, Tn as TableRow, On as Tabs, Mn as TabsContent, An as TabsList, jn as TabsTrigger, yo as TextField, Nr as TextLink, K as TextStack, Pn as Tooltip, In as TooltipContent, Nn as TooltipProvider, Fn as TooltipTrigger, Bi as TransactionDetailPanel, Ri as TransactionInfo, zi as TransactionReference, Li as TransactionSummary, Gi as TransactionsFilterPanel, Xi as TransactionsTable, Qi as TransactionsTableOptions, fe as UiBadge, lr as UserMenu, co as WalletBalancesTable, xo as WalletField, Qa as WalletRowActions, ps as WithdrawHistoryTable, _s as WithdrawPanel, ms as WithdrawSummary, de as badgeVariants, fo as balancesData, go as balancesRecentTransactions, ho as balancesTypes, z as buttonVariants, ko as convertData, Ho as convertTypes, Uo as depositData, ns as depositTypes, mr as findNavItem, Ca as reportsData, la as reportsPresets, Fa as reportsReportData, Pa as reportsTypes, kn as tabsListVariants, Yi as transactionColumnOptions, Gr as transactionsData, wi as transactionsFilters, xi as transactionsStatuses, $i as transactionsTypes, Tr as useHeaderExtension, rs as withdrawData, ys as withdrawTypes };
|