mgv-backoffice 1.35.0 → 1.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1794 -1686
- package/dist/components/BaseBarDistribution.vue.d.ts +24 -0
- package/dist/components/BasePageHeader.vue.d.ts +8 -2
- package/dist/index.d.ts +2 -0
- package/dist/types/distribution.d.ts +7 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +634 -574
- package/dist/ui-lib.umd.cjs +1 -1
- package/dist/utils/specForm.d.ts +1 -1
- package/package.json +54 -54
- package/src/components/BaseAlert.vue +104 -104
- package/src/components/BaseBarDistribution.test.ts +51 -0
- package/src/components/BaseBarDistribution.vue +73 -0
- package/src/components/BaseChipButton.vue +42 -42
- package/src/components/BaseCodeBlock.test.ts +70 -70
- package/src/components/BaseCodeBlock.vue +74 -74
- package/src/components/BaseCollapsibleSection.vue +113 -113
- package/src/components/BaseConfirmModal.vue +114 -114
- package/src/components/BaseCredentialsForm.test.ts +108 -108
- package/src/components/BaseCredentialsForm.vue +241 -241
- package/src/components/BaseDropdown.test.ts +87 -87
- package/src/components/BaseDropdown.vue +172 -172
- package/src/components/BaseEntityPickerModal.vue +330 -330
- package/src/components/BaseFileDropzone.vue +94 -94
- package/src/components/BaseFilterChip.test.ts +44 -44
- package/src/components/BaseFilterChip.vue +67 -67
- package/src/components/BaseModalShell.vue +209 -209
- package/src/components/BasePageHeader.vue +120 -103
- package/src/components/BasePillPickerModal.test.ts +95 -95
- package/src/components/BaseRemoveButton.vue +22 -22
- package/src/components/BaseSpecFields.test.ts +39 -0
- package/src/components/BaseSpecFields.vue +27 -3
- package/src/components/BaseStatBreakdown.test.ts +56 -56
- package/src/components/BaseStatBreakdown.vue +49 -49
- package/src/components/BaseStatusPill.vue +54 -54
- package/src/components/BaseTextInputModal.vue +140 -140
- package/src/components/BaseToolbarButton.test.ts +48 -48
- package/src/components/BaseToolbarButton.vue +94 -94
- package/src/composables/useFieldClasses.test.ts +55 -55
- package/src/composables/useFieldClasses.ts +56 -56
- package/src/composables/usePolling.test.ts +112 -112
- package/src/composables/usePolling.ts +102 -90
- package/src/composables/useQueryParamSync.test.ts +56 -56
- package/src/composables/useQueryParamSync.ts +42 -42
- package/src/composables/useThemeClasses.test.ts +34 -34
- package/src/composables/useThemeClasses.ts +137 -137
- package/src/index.ts +138 -136
- package/src/style.css +32 -32
- package/src/types/distribution.ts +7 -0
- package/src/types/pillPicker.ts +14 -14
- package/src/types/specField.ts +30 -30
- package/src/types/statBreakdown.ts +6 -6
- package/src/utils/format.test.ts +264 -264
- package/src/utils/format.ts +216 -216
- package/src/utils/httpColors.test.ts +100 -100
- package/src/utils/httpColors.ts +99 -99
- package/src/utils/kvRows.test.ts +47 -47
- package/src/utils/kvRows.ts +34 -34
- package/src/utils/specForm.test.ts +64 -53
- package/src/utils/specForm.ts +49 -48
- package/src/utils/validate.test.ts +82 -82
- package/src/utils/validate.ts +76 -76
package/dist/ui-lib.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createStaticVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, effectScope as p, nextTick as m, normalizeClass as h,
|
|
2
|
-
import { ArrowDownIcon as
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { useRoute as
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createStaticVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, effectScope as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, onScopeDispose as y, onUnmounted as b, openBlock as x, reactive as S, readonly as C, ref as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDynamicComponent as O, toDisplayString as k, unref as A, useSlots as ee, vModelCheckbox as j, vModelDynamic as M, vModelText as N, vShow as te, watch as P, withCtx as F, withDirectives as I, withKeys as ne, withModifiers as L } from "vue";
|
|
2
|
+
import { ArrowDownIcon as re, ArrowUpIcon as ie, Bars3Icon as ae, BellIcon as oe, CheckCircleIcon as se, ChevronDoubleLeftIcon as ce, ChevronDoubleRightIcon as le, ChevronDownIcon as ue, ChevronRightIcon as de, ClipboardDocumentCheckIcon as fe, ClipboardDocumentIcon as pe, DocumentDuplicateIcon as me, ExclamationCircleIcon as he, ExclamationTriangleIcon as ge, FolderIcon as _e, InformationCircleIcon as ve, MagnifyingGlassIcon as ye, MinusIcon as be, MoonIcon as xe, SunIcon as Se, XMarkIcon as Ce } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as we } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as Te, useRouter as Ee } from "vue-router";
|
|
5
5
|
//#region src/enums/AlertEnum.ts
|
|
6
6
|
var R = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
-
}({}), z =
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
8
|
+
}({}), z = w(!1), De = !1, B = "mgv-theme";
|
|
9
|
+
function Oe(e) {
|
|
10
|
+
if (De) {
|
|
11
11
|
e !== B && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${B}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
if (
|
|
14
|
+
if (De = !0, B = e, typeof window < "u") {
|
|
15
15
|
let e = window.localStorage?.getItem(B);
|
|
16
16
|
e ? z.value = e === "dark" : typeof window.matchMedia == "function" && (z.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
17
17
|
}
|
|
@@ -21,11 +21,11 @@ function De(e) {
|
|
|
21
21
|
}, { immediate: !0 });
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
24
|
+
function ke(e) {
|
|
25
|
+
Oe(e?.storageKey ?? B);
|
|
26
26
|
}
|
|
27
27
|
function V(e) {
|
|
28
|
-
|
|
28
|
+
Oe(e?.storageKey ?? B);
|
|
29
29
|
function t() {
|
|
30
30
|
z.value = !z.value;
|
|
31
31
|
}
|
|
@@ -36,10 +36,10 @@ function V(e) {
|
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
39
|
-
var
|
|
39
|
+
var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "font-medium"
|
|
42
|
-
},
|
|
42
|
+
}, Me = /* @__PURE__ */ f({
|
|
43
43
|
__name: "BaseAlert",
|
|
44
44
|
props: {
|
|
45
45
|
title: { default: "" },
|
|
@@ -69,10 +69,10 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
69
69
|
}
|
|
70
70
|
}, l = r(() => n.value ? c[t.color].dark : c[t.color].light), u = r(() => {
|
|
71
71
|
switch (t.color) {
|
|
72
|
-
case R.SUCCESS: return
|
|
73
|
-
case R.WARNING: return
|
|
74
|
-
case R.INFO: return
|
|
75
|
-
default: return
|
|
72
|
+
case R.SUCCESS: return se;
|
|
73
|
+
case R.WARNING: return ge;
|
|
74
|
+
case R.INFO: return ve;
|
|
75
|
+
default: return he;
|
|
76
76
|
}
|
|
77
77
|
}), d = r(() => {
|
|
78
78
|
switch (t.color) {
|
|
@@ -82,24 +82,24 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
82
82
|
default: return "text-red-500";
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
return (t, n) => (
|
|
85
|
+
return (t, n) => (x(), o("div", {
|
|
86
86
|
role: "alert",
|
|
87
87
|
class: h(["flex gap-3 mb-4 rounded-lg border text-sm transition-colors", [e.compact ? "items-start px-3 py-2 text-xs" : "items-start p-4", l.value]])
|
|
88
|
-
}, [(
|
|
88
|
+
}, [(x(), i(O(u.value), {
|
|
89
89
|
class: h(["shrink-0", [e.compact ? "w-4 h-4 mt-px" : "w-5 h-5 mt-0.5", d.value]]),
|
|
90
90
|
"aria-hidden": "true"
|
|
91
|
-
}, null, 8, ["class"])), s("div",
|
|
91
|
+
}, null, 8, ["class"])), s("div", Ae, [e.title ? (x(), o("p", je, k(e.title), 1)) : a("", !0), E(t.$slots, "default")])], 2));
|
|
92
92
|
}
|
|
93
93
|
}), H = /* @__PURE__ */ function(e) {
|
|
94
94
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
95
|
-
}({}),
|
|
95
|
+
}({}), Ne = "bg-red-100 text-red-700 border-red-200", Pe = /* @__PURE__ */ f({
|
|
96
96
|
__name: "BaseBadge",
|
|
97
97
|
props: { color: {
|
|
98
98
|
type: String,
|
|
99
99
|
required: !1
|
|
100
100
|
} },
|
|
101
101
|
setup(e) {
|
|
102
|
-
let t =
|
|
102
|
+
let t = ee(), n = r(() => !!t.default), i = e, s = {
|
|
103
103
|
[H.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
104
104
|
[H.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
105
105
|
[H.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
@@ -107,19 +107,19 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
107
107
|
[H.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
108
108
|
[H.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
109
109
|
[H.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
110
|
-
}, c = r(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${i.color && s[i.color] ||
|
|
111
|
-
return (e, t) => n.value ? (
|
|
110
|
+
}, c = r(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${i.color && s[i.color] || Ne}`);
|
|
111
|
+
return (e, t) => n.value ? (x(), o("span", {
|
|
112
112
|
key: 0,
|
|
113
113
|
class: h(c.value)
|
|
114
|
-
}, [
|
|
114
|
+
}, [E(e.$slots, "default")], 2)) : a("", !0);
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), Fe = {
|
|
117
117
|
class: "flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700",
|
|
118
118
|
"aria-label": "Breadcrumb"
|
|
119
|
-
},
|
|
119
|
+
}, Ie = { class: "inline-flex items-center space-x-1 md:space-x-3" }, Le = {
|
|
120
120
|
class: "inline-flex items-center",
|
|
121
121
|
style: { "margin-left": "0" }
|
|
122
|
-
},
|
|
122
|
+
}, Re = /* @__PURE__ */ f({
|
|
123
123
|
__name: "BaseBreadcrumb",
|
|
124
124
|
props: {
|
|
125
125
|
items: {
|
|
@@ -143,22 +143,22 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
143
143
|
}));
|
|
144
144
|
});
|
|
145
145
|
return (t, n) => {
|
|
146
|
-
let r =
|
|
147
|
-
return
|
|
146
|
+
let r = D("router-link");
|
|
147
|
+
return x(), o("nav", Fe, [s("ol", Ie, [s("li", Le, [d(r, {
|
|
148
148
|
to: "/",
|
|
149
149
|
class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
150
150
|
}, {
|
|
151
|
-
default: F(() => [d(
|
|
151
|
+
default: F(() => [d(A(we), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= u(" Home ", -1)]),
|
|
152
152
|
_: 1
|
|
153
|
-
})]), (
|
|
153
|
+
})]), (x(!0), o(e, null, T(i.value, (e, t) => (x(), o("li", {
|
|
154
154
|
key: t,
|
|
155
155
|
class: "inline-flex items-center",
|
|
156
156
|
style: { "margin-left": "0" }
|
|
157
|
-
}, [d(
|
|
157
|
+
}, [d(A(de), { class: "h-4 w-4 text-gray-500" }), d(r, {
|
|
158
158
|
to: e.url,
|
|
159
159
|
class: "ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
160
160
|
}, {
|
|
161
|
-
default: F(() => [u(
|
|
161
|
+
default: F(() => [u(k(e.name), 1)]),
|
|
162
162
|
_: 2
|
|
163
163
|
}, 1032, ["to"])]))), 128))])]);
|
|
164
164
|
};
|
|
@@ -167,17 +167,17 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
167
167
|
return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.EMERALD = "EMERALD", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e.SKY = "SKY", e.GRAY = "GRAY", e.AMBER = "AMBER", e;
|
|
168
168
|
}({}), W = /* @__PURE__ */ function(e) {
|
|
169
169
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
170
|
-
}({}),
|
|
170
|
+
}({}), ze = [
|
|
171
171
|
"type",
|
|
172
172
|
"disabled",
|
|
173
173
|
"onClick"
|
|
174
|
-
],
|
|
174
|
+
], Be = {
|
|
175
175
|
key: 0,
|
|
176
176
|
class: "inline-flex items-center"
|
|
177
|
-
},
|
|
177
|
+
}, Ve = { key: 1 }, He = { key: 2 }, Ue = ["type", "disabled"], We = {
|
|
178
178
|
key: 0,
|
|
179
179
|
class: "inline-flex items-center"
|
|
180
|
-
},
|
|
180
|
+
}, Ge = { key: 1 }, Ke = { key: 2 }, G = /* @__PURE__ */ f({
|
|
181
181
|
__name: "BaseButton",
|
|
182
182
|
props: {
|
|
183
183
|
description: {
|
|
@@ -395,8 +395,8 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
395
395
|
return n.isRounded && (o = "rounded-full"), t + " " + a + " " + i + " font-medium " + o;
|
|
396
396
|
}
|
|
397
397
|
return (t, r) => {
|
|
398
|
-
let c =
|
|
399
|
-
return e.to ? (
|
|
398
|
+
let c = D("router-link");
|
|
399
|
+
return e.to ? (x(), i(c, {
|
|
400
400
|
key: 0,
|
|
401
401
|
to: e.to,
|
|
402
402
|
custom: ""
|
|
@@ -407,7 +407,7 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
407
407
|
disabled: e.isDisable || e.isLoading,
|
|
408
408
|
onClick: i
|
|
409
409
|
}, [
|
|
410
|
-
e.isLoading ? (
|
|
410
|
+
e.isLoading ? (x(), o("div", Be, [...r[0] ||= [s("svg", {
|
|
411
411
|
"aria-hidden": "true",
|
|
412
412
|
role: "status",
|
|
413
413
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -421,18 +421,18 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
421
421
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
422
422
|
fill: "currentColor"
|
|
423
423
|
})], -1)]])) : a("", !0),
|
|
424
|
-
e.iconLeft ? a("", !0) : (
|
|
425
|
-
|
|
426
|
-
e.iconLeft ? (
|
|
427
|
-
], 10,
|
|
424
|
+
e.iconLeft ? a("", !0) : (x(), o("span", Ve, k(e.description), 1)),
|
|
425
|
+
E(t.$slots, "default"),
|
|
426
|
+
e.iconLeft ? (x(), o("span", He, k(e.description), 1)) : a("", !0)
|
|
427
|
+
], 10, ze)]),
|
|
428
428
|
_: 3
|
|
429
|
-
}, 8, ["to"])) : (
|
|
429
|
+
}, 8, ["to"])) : (x(), o("button", {
|
|
430
430
|
key: 1,
|
|
431
431
|
type: n.type,
|
|
432
432
|
class: h(l()),
|
|
433
433
|
disabled: e.isDisable || e.isLoading
|
|
434
434
|
}, [
|
|
435
|
-
e.isLoading ? (
|
|
435
|
+
e.isLoading ? (x(), o("div", We, [...r[1] ||= [s("svg", {
|
|
436
436
|
"aria-hidden": "true",
|
|
437
437
|
role: "status",
|
|
438
438
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -446,40 +446,40 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
446
446
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
447
447
|
fill: "currentColor"
|
|
448
448
|
})], -1)]])) : a("", !0),
|
|
449
|
-
e.iconLeft ? a("", !0) : (
|
|
450
|
-
|
|
451
|
-
e.iconLeft ? (
|
|
452
|
-
], 10,
|
|
449
|
+
e.iconLeft ? a("", !0) : (x(), o("span", Ge, k(e.description), 1)),
|
|
450
|
+
E(t.$slots, "default"),
|
|
451
|
+
e.iconLeft ? (x(), o("span", Ke, k(e.description), 1)) : a("", !0)
|
|
452
|
+
], 10, Ue));
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
}),
|
|
455
|
+
}), qe = /* @__PURE__ */ function(e) {
|
|
456
456
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
457
|
-
}({}),
|
|
457
|
+
}({}), Je = {
|
|
458
458
|
key: 0,
|
|
459
459
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
460
|
-
},
|
|
460
|
+
}, Ye = {
|
|
461
461
|
key: 1,
|
|
462
462
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
463
|
-
},
|
|
463
|
+
}, Xe = {
|
|
464
464
|
key: 2,
|
|
465
465
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
466
|
-
},
|
|
466
|
+
}, Ze = /* @__PURE__ */ f({
|
|
467
467
|
__name: "BaseLine",
|
|
468
468
|
props: { mode: {
|
|
469
469
|
type: String,
|
|
470
470
|
required: !1,
|
|
471
|
-
default:
|
|
471
|
+
default: qe.BASE
|
|
472
472
|
} },
|
|
473
473
|
setup(t) {
|
|
474
|
-
return (n, r) => (
|
|
475
|
-
t.mode ===
|
|
476
|
-
t.mode ===
|
|
477
|
-
t.mode ===
|
|
474
|
+
return (n, r) => (x(), o(e, null, [
|
|
475
|
+
t.mode === A(qe).BASE ? (x(), o("hr", Je)) : a("", !0),
|
|
476
|
+
t.mode === A(qe).BASE_SHORTER ? (x(), o("hr", Ye)) : a("", !0),
|
|
477
|
+
t.mode === A(qe).SQUARE ? (x(), o("hr", Xe)) : a("", !0)
|
|
478
478
|
], 64));
|
|
479
479
|
}
|
|
480
480
|
}), K = /* @__PURE__ */ function(e) {
|
|
481
481
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
482
|
-
}({}),
|
|
482
|
+
}({}), Qe = K, $e = ["height", "width"], et = /* @__PURE__ */ f({
|
|
483
483
|
__name: "BaseLogo",
|
|
484
484
|
props: { size: {
|
|
485
485
|
type: String,
|
|
@@ -504,12 +504,12 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
504
504
|
return e;
|
|
505
505
|
}
|
|
506
506
|
return (e, t) => {
|
|
507
|
-
let r =
|
|
508
|
-
return
|
|
507
|
+
let r = D("router-link");
|
|
508
|
+
return x(), i(r, {
|
|
509
509
|
to: "/",
|
|
510
510
|
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
511
511
|
}, {
|
|
512
|
-
default: F(() => [(
|
|
512
|
+
default: F(() => [(x(), o("svg", {
|
|
513
513
|
height: n(),
|
|
514
514
|
width: n(),
|
|
515
515
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
@@ -659,23 +659,23 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
659
659
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
660
660
|
fill: "url(#k)"
|
|
661
661
|
}, null, -1)
|
|
662
|
-
]], 8,
|
|
662
|
+
]], 8, $e))]),
|
|
663
663
|
_: 1
|
|
664
664
|
});
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
}),
|
|
667
|
+
}), tt = /* @__PURE__ */ function(e) {
|
|
668
668
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
669
|
-
}({}),
|
|
669
|
+
}({}), nt = {
|
|
670
670
|
key: 0,
|
|
671
671
|
class: "p-6 text-center"
|
|
672
|
-
},
|
|
672
|
+
}, rt = { class: "flex justify-center" }, it = {
|
|
673
673
|
key: 1,
|
|
674
674
|
class: "p-6 text-center"
|
|
675
|
-
},
|
|
675
|
+
}, at = {
|
|
676
676
|
key: 0,
|
|
677
677
|
class: "mb-5 text-sm text-gray-500"
|
|
678
|
-
},
|
|
678
|
+
}, ot = { class: "flex justify-center" }, st = /* @__PURE__ */ f({
|
|
679
679
|
__name: "BaseModal",
|
|
680
680
|
props: {
|
|
681
681
|
title: {
|
|
@@ -694,7 +694,7 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
694
694
|
mode: {
|
|
695
695
|
type: String,
|
|
696
696
|
required: !1,
|
|
697
|
-
default:
|
|
697
|
+
default: tt.SUCCESS
|
|
698
698
|
}
|
|
699
699
|
},
|
|
700
700
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -703,11 +703,11 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
703
703
|
function c(e) {
|
|
704
704
|
e.key === "Escape" && r("closeModal");
|
|
705
705
|
}
|
|
706
|
-
return
|
|
706
|
+
return v(() => {
|
|
707
707
|
document.addEventListener("keydown", c);
|
|
708
|
-
}),
|
|
708
|
+
}), b(() => {
|
|
709
709
|
document.removeEventListener("keydown", c);
|
|
710
|
-
}), (n, r) => (
|
|
710
|
+
}), (n, r) => (x(), o(e, null, [s("div", {
|
|
711
711
|
class: "fixed inset-0 w-full h-screen bg-black/75 z-40",
|
|
712
712
|
onClick: r[0] ||= (e) => n.$emit("closeModal")
|
|
713
713
|
}), s("div", {
|
|
@@ -715,37 +715,37 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
715
715
|
role: "dialog",
|
|
716
716
|
"aria-modal": "true",
|
|
717
717
|
"aria-labelledby": i
|
|
718
|
-
}, [t.mode ===
|
|
719
|
-
d(
|
|
718
|
+
}, [t.mode === A(tt).DELETE ? (x(), o("div", nt, [
|
|
719
|
+
d(A(he), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
720
720
|
s("h3", {
|
|
721
721
|
id: i,
|
|
722
722
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
723
|
-
}, " Are you sure you want to delete this " +
|
|
724
|
-
s("div",
|
|
725
|
-
color:
|
|
723
|
+
}, " Are you sure you want to delete this " + k(t.title) + "? ", 1),
|
|
724
|
+
s("div", rt, [d(G, {
|
|
725
|
+
color: A(U).RED,
|
|
726
726
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
727
727
|
description: "Yes, I'm sure"
|
|
728
728
|
}, null, 8, ["color"]), d(G, {
|
|
729
|
-
color:
|
|
729
|
+
color: A(U).WHITE,
|
|
730
730
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
731
731
|
description: "No, cancel"
|
|
732
732
|
}, null, 8, ["color"])])
|
|
733
|
-
])) : (
|
|
734
|
-
d(
|
|
733
|
+
])) : (x(), o("div", it, [
|
|
734
|
+
d(A(se), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
735
735
|
s("h3", {
|
|
736
736
|
id: i,
|
|
737
737
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
738
|
-
},
|
|
739
|
-
t.description ? (
|
|
740
|
-
|
|
741
|
-
s("div",
|
|
742
|
-
color:
|
|
738
|
+
}, k(t.title), 1),
|
|
739
|
+
t.description ? (x(), o("p", at, k(t.description), 1)) : a("", !0),
|
|
740
|
+
E(n.$slots, "default"),
|
|
741
|
+
s("div", ot, [d(G, {
|
|
742
|
+
color: A(U).BLUE,
|
|
743
743
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
744
744
|
description: "OK"
|
|
745
745
|
}, null, 8, ["color"])])
|
|
746
746
|
]))])], 64));
|
|
747
747
|
}
|
|
748
|
-
}),
|
|
748
|
+
}), ct = /* @__PURE__ */ f({
|
|
749
749
|
__name: "BaseRow",
|
|
750
750
|
props: { bgColor: {
|
|
751
751
|
type: String,
|
|
@@ -757,9 +757,9 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
757
757
|
function n() {
|
|
758
758
|
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
759
759
|
}
|
|
760
|
-
return (e, t) => (
|
|
760
|
+
return (e, t) => (x(), o("div", { class: h(n()) }, [E(e.$slots, "default")], 2));
|
|
761
761
|
}
|
|
762
|
-
}),
|
|
762
|
+
}), lt = /* @__PURE__ */ f({
|
|
763
763
|
__name: "BaseSpinner",
|
|
764
764
|
props: {
|
|
765
765
|
size: { default: "sm" },
|
|
@@ -781,7 +781,7 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
781
781
|
red: "border-t-red-500",
|
|
782
782
|
amber: "border-t-amber-500"
|
|
783
783
|
})[t.color]);
|
|
784
|
-
return (e, t) => (
|
|
784
|
+
return (e, t) => (x(), o("div", {
|
|
785
785
|
class: h(["border-gray-200 rounded-full animate-spin", [n.value, i.value]]),
|
|
786
786
|
role: "status",
|
|
787
787
|
"aria-label": "Loading"
|
|
@@ -791,7 +791,7 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
791
791
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
792
792
|
}({}), J = /* @__PURE__ */ function(e) {
|
|
793
793
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
794
|
-
}({}),
|
|
794
|
+
}({}), ut = { class: "flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800" }, dt = { class: "ml-3 text-sm font-normal" }, ft = /* @__PURE__ */ f({
|
|
795
795
|
__name: "BaseToast",
|
|
796
796
|
props: {
|
|
797
797
|
mode: {
|
|
@@ -819,13 +819,13 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
819
819
|
}
|
|
820
820
|
},
|
|
821
821
|
setup(e) {
|
|
822
|
-
let t = e, n =
|
|
822
|
+
let t = e, n = w(!0), r = null;
|
|
823
823
|
function i() {
|
|
824
824
|
n.value = !1, r &&= (clearTimeout(r), null);
|
|
825
825
|
}
|
|
826
|
-
|
|
826
|
+
v(() => {
|
|
827
827
|
r = setTimeout(() => n.value = !1, t.duration);
|
|
828
|
-
}),
|
|
828
|
+
}), b(() => {
|
|
829
829
|
r && clearTimeout(r);
|
|
830
830
|
});
|
|
831
831
|
function c() {
|
|
@@ -864,33 +864,33 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
864
864
|
}
|
|
865
865
|
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
|
|
866
866
|
}
|
|
867
|
-
return (t, r) => n.value ? (
|
|
867
|
+
return (t, r) => n.value ? (x(), o("div", {
|
|
868
868
|
key: 0,
|
|
869
869
|
id: "toast-top-right",
|
|
870
870
|
class: h(l()),
|
|
871
871
|
role: "alert"
|
|
872
|
-
}, [s("div",
|
|
873
|
-
e.mode ==
|
|
872
|
+
}, [s("div", ut, [
|
|
873
|
+
e.mode == A(q).ERROR ? (x(), o("div", {
|
|
874
874
|
key: 0,
|
|
875
875
|
class: h(c())
|
|
876
|
-
}, [d(
|
|
876
|
+
}, [d(A(he), { class: "h-6 w-6 text-red-500" }), r[0] ||= s("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == A(q).SUCCESS ? (x(), o("div", {
|
|
877
877
|
key: 1,
|
|
878
878
|
class: h(c())
|
|
879
|
-
}, [d(
|
|
879
|
+
}, [d(A(se), { class: "h-6 w-6 text-green-500" }), r[1] ||= s("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == A(q).WARNING ? (x(), o("div", {
|
|
880
880
|
key: 2,
|
|
881
881
|
class: h(c())
|
|
882
|
-
}, [d(
|
|
883
|
-
s("div",
|
|
884
|
-
e.hasCloseIcon ? (
|
|
882
|
+
}, [d(A(ge), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= s("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : a("", !0),
|
|
883
|
+
s("div", dt, k(e.description), 1),
|
|
884
|
+
e.hasCloseIcon ? (x(), o("button", {
|
|
885
885
|
key: 3,
|
|
886
886
|
type: "button",
|
|
887
887
|
class: "ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700 cursor-pointer",
|
|
888
888
|
"aria-label": "Close",
|
|
889
889
|
onClick: i
|
|
890
|
-
}, [r[3] ||= s("span", { class: "sr-only" }, "Close", -1), d(
|
|
890
|
+
}, [r[3] ||= s("span", { class: "sr-only" }, "Close", -1), d(A(Ce), { class: "h-6 w-6 text-gray-500" })])) : a("", !0)
|
|
891
891
|
])], 2)) : a("", !0);
|
|
892
892
|
}
|
|
893
|
-
}),
|
|
893
|
+
}), pt = { class: "w-13" }, mt = /* @__PURE__ */ f({
|
|
894
894
|
__name: "ColoredSquares",
|
|
895
895
|
props: { color: {
|
|
896
896
|
type: String,
|
|
@@ -907,7 +907,7 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
907
907
|
"bg-yellow-300",
|
|
908
908
|
"bg-purple-300",
|
|
909
909
|
"bg-pink-300"
|
|
910
|
-
], r =
|
|
910
|
+
], r = w(n[Math.floor(Math.random() * n.length)]);
|
|
911
911
|
function i() {
|
|
912
912
|
let e = "gray";
|
|
913
913
|
switch (t.color) {
|
|
@@ -927,9 +927,9 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
927
927
|
}
|
|
928
928
|
return "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full bg-" + e + "-100 text-" + e + "-800";
|
|
929
929
|
}
|
|
930
|
-
return (e, t) => (
|
|
930
|
+
return (e, t) => (x(), o("div", pt, [s("div", { class: h(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [E(e.$slots, "default"), s("div", { class: h(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
931
931
|
}
|
|
932
|
-
}),
|
|
932
|
+
}), ht = { class: "flex items-start justify-between" }, gt = { class: "min-w-0" }, _t = /* @__PURE__ */ f({
|
|
933
933
|
__name: "EarningsCard",
|
|
934
934
|
props: {
|
|
935
935
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -981,14 +981,14 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
981
981
|
minimumFractionDigits: n.decimals,
|
|
982
982
|
maximumFractionDigits: n.decimals
|
|
983
983
|
}));
|
|
984
|
-
return (n, r) => (
|
|
984
|
+
return (n, r) => (x(), o("div", { class: h(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (x(), o("div", {
|
|
985
985
|
key: 0,
|
|
986
986
|
class: h(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
987
|
-
},
|
|
988
|
-
s("p", { class: h(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) },
|
|
989
|
-
s("p", { class: h(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) },
|
|
990
|
-
s("p", { class: h(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) },
|
|
991
|
-
]), s("div", { class: h(["flex items-center justify-center", [d.value.iconBox, t.compact ? "absolute right-2 top-2 h-6 w-6 rounded-lg" : "mt-6 h-12 w-12 rounded-xl"]]) }, [(
|
|
987
|
+
}, k(t.badge), 3)) : a("", !0), s("div", ht, [s("div", gt, [
|
|
988
|
+
s("p", { class: h(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, k(t.title), 3),
|
|
989
|
+
s("p", { class: h(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, k(f.value), 3),
|
|
990
|
+
s("p", { class: h(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, k(t.subtitle), 3)
|
|
991
|
+
]), s("div", { class: h(["flex items-center justify-center", [d.value.iconBox, t.compact ? "absolute right-2 top-2 h-6 w-6 rounded-lg" : "mt-6 h-12 w-12 rounded-xl"]]) }, [(x(), o("svg", {
|
|
992
992
|
class: h([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
993
993
|
viewBox: "0 0 24 24",
|
|
994
994
|
fill: "none",
|
|
@@ -996,12 +996,12 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
996
996
|
"stroke-width": "2.5",
|
|
997
997
|
"stroke-linecap": "round",
|
|
998
998
|
"stroke-linejoin": "round"
|
|
999
|
-
}, [l.value ? (
|
|
999
|
+
}, [l.value ? (x(), o(e, { key: 0 }, [r[0] ||= s("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= s("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (x(), o(e, { key: 1 }, [r[2] ||= s("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= s("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
1000
1000
|
}
|
|
1001
|
-
}),
|
|
1001
|
+
}), vt = {
|
|
1002
1002
|
key: 0,
|
|
1003
1003
|
class: "font-bold text-green-800 dark:text-green-400"
|
|
1004
|
-
},
|
|
1004
|
+
}, yt = { key: 0 }, bt = { key: 0 }, xt = "font-bold", St = /* @__PURE__ */ f({
|
|
1005
1005
|
__name: "EuroAmount",
|
|
1006
1006
|
props: {
|
|
1007
1007
|
amount: {
|
|
@@ -1021,20 +1021,20 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
1021
1021
|
},
|
|
1022
1022
|
setup(t) {
|
|
1023
1023
|
let n = t, i = r(() => n.amount !== null && n.amount !== void 0), s = r(() => i.value && n.amount < 0), c = r(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), l = r(() => s.value || c.value), d = r(() => !s.value && !c.value && !(n.beforeAmount === null || n.beforeAmount === void 0));
|
|
1024
|
-
return (n, r) => (
|
|
1024
|
+
return (n, r) => (x(), o(e, null, [i.value && d.value ? (x(), o("span", vt, [u(k(t.amount) + " ", 1), t.showCurrency ? (x(), o("span", yt, "€")) : a("", !0)])) : a("", !0), i.value && !d.value ? (x(), o("span", {
|
|
1025
1025
|
key: 1,
|
|
1026
|
-
class: h([
|
|
1027
|
-
}, [u(
|
|
1026
|
+
class: h([xt, l.value ? "text-red-800 dark:text-red-400" : "text-gray-800 dark:text-gray-200"])
|
|
1027
|
+
}, [u(k(t.amount) + " ", 1), t.showCurrency ? (x(), o("span", bt, "€")) : a("", !0)], 2)) : a("", !0)], 64));
|
|
1028
1028
|
}
|
|
1029
|
-
}),
|
|
1029
|
+
}), Ct = { "aria-label": "Pagination" }, wt = { class: "flex list-none p-0 m-0" }, Tt = [
|
|
1030
1030
|
"aria-current",
|
|
1031
1031
|
"aria-label",
|
|
1032
1032
|
"onClick"
|
|
1033
|
-
],
|
|
1033
|
+
], Et = {
|
|
1034
1034
|
key: 1,
|
|
1035
1035
|
"aria-hidden": "true",
|
|
1036
1036
|
class: "inline-block border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-not-allowed"
|
|
1037
|
-
},
|
|
1037
|
+
}, Dt = /* @__PURE__ */ f({
|
|
1038
1038
|
__name: "Pagination",
|
|
1039
1039
|
props: {
|
|
1040
1040
|
totalItems: {
|
|
@@ -1048,7 +1048,7 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
1048
1048
|
},
|
|
1049
1049
|
emits: ["page-changed"],
|
|
1050
1050
|
setup(t, { emit: n }) {
|
|
1051
|
-
let r = t, i =
|
|
1051
|
+
let r = t, i = w(1), a = w(0), c = w([]), l = n;
|
|
1052
1052
|
function u(e) {
|
|
1053
1053
|
if (a.value <= 5) {
|
|
1054
1054
|
c.value = Array.from({ length: a.value }, (e, t) => t + 1);
|
|
@@ -1064,28 +1064,28 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
return P(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1066
1066
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1067
|
-
}, { immediate: !0 }), (t, n) => (
|
|
1067
|
+
}, { immediate: !0 }), (t, n) => (x(), o("nav", Ct, [s("ul", wt, [(x(!0), o(e, null, T(c.value, (e, t) => (x(), o("li", {
|
|
1068
1068
|
key: t,
|
|
1069
1069
|
class: "mr-1"
|
|
1070
|
-
}, [e === 0 ? (
|
|
1070
|
+
}, [e === 0 ? (x(), o("span", Et, "...")) : (x(), o("button", {
|
|
1071
1071
|
key: 0,
|
|
1072
1072
|
type: "button",
|
|
1073
1073
|
"aria-current": e === i.value ? "page" : void 0,
|
|
1074
1074
|
"aria-label": `Go to page ${e}`,
|
|
1075
1075
|
onClick: (t) => d(e),
|
|
1076
1076
|
class: h(["inline-block min-w-[44px] border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-pointer transition-colors hover:bg-gray-300 dark:hover:bg-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", { "active font-bold bg-gray-200 dark:bg-gray-700": e === i.value }])
|
|
1077
|
-
},
|
|
1077
|
+
}, k(e), 11, Tt))]))), 128))])]));
|
|
1078
1078
|
}
|
|
1079
|
-
}),
|
|
1079
|
+
}), Ot = { key: 0 }, kt = {
|
|
1080
1080
|
key: 0,
|
|
1081
1081
|
class: "flex items-center space-x-2"
|
|
1082
|
-
},
|
|
1082
|
+
}, At = {
|
|
1083
1083
|
key: 1,
|
|
1084
1084
|
class: "flex items-center space-x-2"
|
|
1085
|
-
},
|
|
1085
|
+
}, jt = {
|
|
1086
1086
|
key: 2,
|
|
1087
1087
|
class: "flex items-center space-x-2"
|
|
1088
|
-
},
|
|
1088
|
+
}, Mt = /* @__PURE__ */ f({
|
|
1089
1089
|
__name: "TrendArrow",
|
|
1090
1090
|
props: {
|
|
1091
1091
|
number: {
|
|
@@ -1099,23 +1099,23 @@ var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
|
1099
1099
|
},
|
|
1100
1100
|
setup(e) {
|
|
1101
1101
|
let t = e, n = r(() => t.number !== null && t.number !== void 0 && t.number < 0), i = r(() => t.number === 0);
|
|
1102
|
-
return (r, s) => e.number !== null && e.number !== void 0 ? (
|
|
1103
|
-
default: F(() => [u(
|
|
1102
|
+
return (r, s) => e.number !== null && e.number !== void 0 ? (x(), o("div", Ot, [n.value ? (x(), o("span", kt, [d(Pe, { color: A(H).RED }, {
|
|
1103
|
+
default: F(() => [u(k(e.number) + k(t.icon), 1)]),
|
|
1104
1104
|
_: 1
|
|
1105
|
-
}, 8, ["color"]), d(
|
|
1106
|
-
default: F(() => [u(
|
|
1105
|
+
}, 8, ["color"]), d(A(re), { class: "h-5 w-5 text-red-500" })])) : i.value ? (x(), o("span", At, [d(Pe, { color: A(H).GRAY }, {
|
|
1106
|
+
default: F(() => [u(k(e.number) + k(t.icon), 1)]),
|
|
1107
1107
|
_: 1
|
|
1108
|
-
}, 8, ["color"]), d(
|
|
1109
|
-
default: F(() => [u(
|
|
1108
|
+
}, 8, ["color"]), d(A(be), { class: "h-5 w-5 text-gray-400" })])) : (x(), o("span", jt, [d(Pe, { color: A(H).GREEN }, {
|
|
1109
|
+
default: F(() => [u(k(e.number) + k(t.icon), 1)]),
|
|
1110
1110
|
_: 1
|
|
1111
|
-
}, 8, ["color"]), d(
|
|
1111
|
+
}, 8, ["color"]), d(A(ie), { class: "h-5 w-5 text-green-500" })]))])) : a("", !0);
|
|
1112
1112
|
}
|
|
1113
1113
|
});
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/composables/useThemeClasses.ts
|
|
1116
1116
|
function Y() {
|
|
1117
1117
|
let { isDark: e } = V();
|
|
1118
|
-
return
|
|
1118
|
+
return S({
|
|
1119
1119
|
card: r(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1120
1120
|
cardAlt: r(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
1121
1121
|
pageBg: r(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
@@ -1141,15 +1141,15 @@ function Y() {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
//#endregion
|
|
1143
1143
|
//#region src/composables/useEscapeKey.ts
|
|
1144
|
-
function
|
|
1144
|
+
function Nt(e) {
|
|
1145
1145
|
function t(t) {
|
|
1146
1146
|
t.key === "Escape" && e();
|
|
1147
1147
|
}
|
|
1148
|
-
|
|
1148
|
+
v(() => document.addEventListener("keydown", t)), _(() => document.removeEventListener("keydown", t));
|
|
1149
1149
|
}
|
|
1150
1150
|
//#endregion
|
|
1151
1151
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1152
|
-
var
|
|
1152
|
+
var Pt = { class: "flex items-start gap-4 min-w-0" }, Ft = { class: "flex-1 min-w-0" }, It = { class: "p-6 overflow-y-auto flex-1" }, Lt = { class: "p-6" }, Rt = { class: "flex items-start gap-4" }, zt = { class: "flex-1" }, Bt = { class: "mt-4" }, Vt = { class: "mt-6 flex gap-3 justify-end" }, Ht = /* @__PURE__ */ f({
|
|
1153
1153
|
__name: "BaseModalShell",
|
|
1154
1154
|
props: {
|
|
1155
1155
|
title: {},
|
|
@@ -1173,51 +1173,51 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1173
1173
|
function g() {
|
|
1174
1174
|
l("backdrop"), c.manualClose || l("cancel");
|
|
1175
1175
|
}
|
|
1176
|
-
return
|
|
1176
|
+
return Nt(() => {
|
|
1177
1177
|
c.manualClose || l("cancel");
|
|
1178
|
-
}), (n, r) => (
|
|
1178
|
+
}), (n, r) => (x(), i(t, { to: "body" }, [s("div", {
|
|
1179
1179
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
1180
1180
|
role: "dialog",
|
|
1181
1181
|
"aria-modal": "true",
|
|
1182
1182
|
"aria-labelledby": f,
|
|
1183
1183
|
onClick: g
|
|
1184
|
-
}, [e.scrollable ? (
|
|
1184
|
+
}, [e.scrollable ? (x(), o("div", {
|
|
1185
1185
|
key: 0,
|
|
1186
1186
|
class: h(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1187
1187
|
onClick: r[0] ||= L(() => {}, ["stop"])
|
|
1188
1188
|
}, [
|
|
1189
|
-
s("div", { class: h(["flex items-start justify-between gap-4 p-6 border-b shrink-0",
|
|
1189
|
+
s("div", { class: h(["flex items-start justify-between gap-4 p-6 border-b shrink-0", A(d).border]) }, [s("div", Pt, [E(n.$slots, "icon", {}, () => [s("div", { class: h(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(x(), i(O(e.icon), {
|
|
1190
1190
|
class: h(["h-6 w-6", e.iconClass]),
|
|
1191
1191
|
"aria-hidden": "true"
|
|
1192
|
-
}, null, 8, ["class"]))], 2)]), s("div",
|
|
1192
|
+
}, null, 8, ["class"]))], 2)]), s("div", Ft, [s("h3", {
|
|
1193
1193
|
id: f,
|
|
1194
|
-
class: h(["text-lg font-medium",
|
|
1195
|
-
},
|
|
1194
|
+
class: h(["text-lg font-medium", A(d).primaryText])
|
|
1195
|
+
}, k(e.title), 3), e.subtitle ? (x(), o("p", {
|
|
1196
1196
|
key: 0,
|
|
1197
|
-
class: h(["text-sm mt-1 break-all",
|
|
1198
|
-
},
|
|
1199
|
-
s("div",
|
|
1200
|
-
n.$slots.footer ? (
|
|
1197
|
+
class: h(["text-sm mt-1 break-all", A(d).mutedText])
|
|
1198
|
+
}, k(e.subtitle), 3)) : a("", !0)])]), E(n.$slots, "header-actions")], 2),
|
|
1199
|
+
s("div", It, [E(n.$slots, "default")]),
|
|
1200
|
+
n.$slots.footer ? (x(), o("div", {
|
|
1201
1201
|
key: 0,
|
|
1202
|
-
class: h(["flex gap-3 justify-end p-6 border-t shrink-0",
|
|
1203
|
-
}, [
|
|
1204
|
-
], 2)) : (
|
|
1202
|
+
class: h(["flex gap-3 justify-end p-6 border-t shrink-0", A(d).border])
|
|
1203
|
+
}, [E(n.$slots, "footer")], 2)) : a("", !0)
|
|
1204
|
+
], 2)) : (x(), o("div", {
|
|
1205
1205
|
key: 1,
|
|
1206
1206
|
class: h(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1207
1207
|
onClick: r[1] ||= L(() => {}, ["stop"])
|
|
1208
|
-
}, [s("div",
|
|
1209
|
-
s("div",
|
|
1208
|
+
}, [s("div", Lt, [
|
|
1209
|
+
s("div", Rt, [E(n.$slots, "icon", {}, () => [s("div", { class: h(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(x(), i(O(e.icon), {
|
|
1210
1210
|
class: h(["h-6 w-6", e.iconClass]),
|
|
1211
1211
|
"aria-hidden": "true"
|
|
1212
|
-
}, null, 8, ["class"]))], 2)]), s("div",
|
|
1212
|
+
}, null, 8, ["class"]))], 2)]), s("div", zt, [s("h3", {
|
|
1213
1213
|
id: f,
|
|
1214
|
-
class: h(["text-lg font-medium",
|
|
1215
|
-
},
|
|
1216
|
-
s("div",
|
|
1217
|
-
s("div",
|
|
1214
|
+
class: h(["text-lg font-medium", A(d).primaryText])
|
|
1215
|
+
}, k(e.title), 3)])]),
|
|
1216
|
+
s("div", Bt, [E(n.$slots, "default")]),
|
|
1217
|
+
s("div", Vt, [E(n.$slots, "footer")])
|
|
1218
1218
|
])], 2))])]));
|
|
1219
1219
|
}
|
|
1220
|
-
}),
|
|
1220
|
+
}), Ut = ["aria-expanded"], Wt = { class: "flex items-center gap-3" }, Gt = /* @__PURE__ */ f({
|
|
1221
1221
|
__name: "BaseCollapsibleSection",
|
|
1222
1222
|
props: {
|
|
1223
1223
|
title: {},
|
|
@@ -1228,16 +1228,16 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1228
1228
|
emits: ["toggle"],
|
|
1229
1229
|
setup(e, { emit: t }) {
|
|
1230
1230
|
let n = e, i = t, { isDark: c } = V(), l = Y(), u = r(() => c.value ? "text-gray-100" : "text-gray-700"), d = r(() => c.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = r(() => c.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = r(() => n.bodyClass === void 0 ? c.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1231
|
-
return (t, n) => (
|
|
1231
|
+
return (t, n) => (x(), o("section", { class: h(["rounded-xl border transition-colors", A(l).cardAlt]) }, [s("button", {
|
|
1232
1232
|
type: "button",
|
|
1233
1233
|
class: h(["w-full flex items-center justify-between p-4 text-left transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [d.value, e.collapsed ? "rounded-xl" : "rounded-t-xl"]]),
|
|
1234
1234
|
"aria-expanded": !e.collapsed,
|
|
1235
1235
|
onClick: n[0] ||= (e) => i("toggle")
|
|
1236
|
-
}, [s("div",
|
|
1236
|
+
}, [s("div", Wt, [s("h2", { class: h(["text-base font-semibold", u.value]) }, k(e.title), 3), e.badge ? (x(), o("span", {
|
|
1237
1237
|
key: 0,
|
|
1238
1238
|
class: h(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1239
|
-
},
|
|
1240
|
-
class: h(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180",
|
|
1239
|
+
}, k(e.badge), 3)) : a("", !0)]), (x(), o("svg", {
|
|
1240
|
+
class: h(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", A(l).dimTextAlt]]),
|
|
1241
1241
|
fill: "none",
|
|
1242
1242
|
viewBox: "0 0 24 24",
|
|
1243
1243
|
stroke: "currentColor",
|
|
@@ -1247,15 +1247,15 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1247
1247
|
"stroke-linecap": "round",
|
|
1248
1248
|
"stroke-linejoin": "round",
|
|
1249
1249
|
d: "M19 9l-7 7-7-7"
|
|
1250
|
-
}, null, -1)]], 2))], 10,
|
|
1250
|
+
}, null, -1)]], 2))], 10, Ut), I(s("div", { class: h(["p-6 border-t rounded-b-xl", [A(l).border, p.value]]) }, [E(t.$slots, "default")], 2), [[te, !e.collapsed]])], 2));
|
|
1251
1251
|
}
|
|
1252
|
-
}),
|
|
1252
|
+
}), Kt = ["disabled"], qt = ["disabled"], Jt = {
|
|
1253
1253
|
key: 0,
|
|
1254
1254
|
class: "w-4 h-4 animate-spin",
|
|
1255
1255
|
fill: "none",
|
|
1256
1256
|
viewBox: "0 0 24 24",
|
|
1257
1257
|
"aria-hidden": "true"
|
|
1258
|
-
},
|
|
1258
|
+
}, Yt = /* @__PURE__ */ f({
|
|
1259
1259
|
__name: "BaseConfirmModal",
|
|
1260
1260
|
props: {
|
|
1261
1261
|
title: {},
|
|
@@ -1278,10 +1278,10 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1278
1278
|
function f() {
|
|
1279
1279
|
n.submitting || r("cancel");
|
|
1280
1280
|
}
|
|
1281
|
-
return (t, n) => (
|
|
1281
|
+
return (t, n) => (x(), i(Ht, {
|
|
1282
1282
|
title: e.title,
|
|
1283
|
-
icon:
|
|
1284
|
-
"icon-bg-class": e.variant === "danger" ?
|
|
1283
|
+
icon: A(ge),
|
|
1284
|
+
"icon-bg-class": e.variant === "danger" ? A(c) ? "bg-red-900/30" : "bg-red-50" : A(c) ? "bg-amber-900/30" : "bg-amber-50",
|
|
1285
1285
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1286
1286
|
"manual-close": e.submitting,
|
|
1287
1287
|
onCancel: f
|
|
@@ -1289,14 +1289,14 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1289
1289
|
footer: F(() => [s("button", {
|
|
1290
1290
|
type: "button",
|
|
1291
1291
|
disabled: e.submitting,
|
|
1292
|
-
class: h(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [
|
|
1292
|
+
class: h(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [A(l).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1293
1293
|
onClick: f
|
|
1294
|
-
},
|
|
1294
|
+
}, k(e.cancelText), 11, Kt), s("button", {
|
|
1295
1295
|
type: "button",
|
|
1296
1296
|
disabled: e.submitting,
|
|
1297
1297
|
class: h(["inline-flex items-center justify-center gap-2 px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", [e.variant === "danger" ? "focus-visible:ring-red-500" : "focus-visible:ring-emerald-500", e.variant === "danger" ? e.submitting ? "bg-red-400 cursor-not-allowed" : "bg-red-600 hover:bg-red-700 cursor-pointer" : e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1298
1298
|
onClick: d
|
|
1299
|
-
}, [e.submitting ? (
|
|
1299
|
+
}, [e.submitting ? (x(), o("svg", Jt, [...n[0] ||= [s("circle", {
|
|
1300
1300
|
class: "opacity-25",
|
|
1301
1301
|
cx: "12",
|
|
1302
1302
|
cy: "12",
|
|
@@ -1307,8 +1307,8 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1307
1307
|
class: "opacity-75",
|
|
1308
1308
|
fill: "currentColor",
|
|
1309
1309
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1310
|
-
}, null, -1)]])) : a("", !0), u(" " +
|
|
1311
|
-
default: F(() => [
|
|
1310
|
+
}, null, -1)]])) : a("", !0), u(" " + k(e.submitting ? e.submittingText : e.confirmText), 1)], 10, qt)]),
|
|
1311
|
+
default: F(() => [E(t.$slots, "message", {}, () => [s("p", { class: h(["text-sm", A(c) ? "text-gray-300" : "text-gray-600"]) }, k(e.message), 3)]), E(t.$slots, "default")]),
|
|
1312
1312
|
_: 3
|
|
1313
1313
|
}, 8, [
|
|
1314
1314
|
"title",
|
|
@@ -1318,7 +1318,7 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1318
1318
|
"manual-close"
|
|
1319
1319
|
]));
|
|
1320
1320
|
}
|
|
1321
|
-
}),
|
|
1321
|
+
}), Xt = { class: "mt-4" }, Zt = ["placeholder"], Qt = ["disabled"], $t = /* @__PURE__ */ f({
|
|
1322
1322
|
__name: "BaseTextInputModal",
|
|
1323
1323
|
props: {
|
|
1324
1324
|
title: {},
|
|
@@ -1336,8 +1336,8 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1336
1336
|
},
|
|
1337
1337
|
emits: ["confirm", "cancel"],
|
|
1338
1338
|
setup(e, { emit: t }) {
|
|
1339
|
-
let n = e, r = t, { isDark: a } = V(), o = Y(), l =
|
|
1340
|
-
|
|
1339
|
+
let n = e, r = t, { isDark: a } = V(), o = Y(), l = w(n.initialValue), u = w(null);
|
|
1340
|
+
v(async () => {
|
|
1341
1341
|
await m(), u.value?.focus();
|
|
1342
1342
|
});
|
|
1343
1343
|
function d() {
|
|
@@ -1349,39 +1349,39 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1349
1349
|
function p() {
|
|
1350
1350
|
l.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1351
1351
|
}
|
|
1352
|
-
return
|
|
1352
|
+
return Nt(f), (t, n) => (x(), i(Ht, {
|
|
1353
1353
|
title: e.title,
|
|
1354
|
-
icon:
|
|
1354
|
+
icon: A(me),
|
|
1355
1355
|
"manual-close": "",
|
|
1356
1356
|
onBackdrop: p
|
|
1357
1357
|
}, c({
|
|
1358
1358
|
footer: F(() => [s("button", {
|
|
1359
1359
|
type: "button",
|
|
1360
|
-
class: h(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1360
|
+
class: h(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", A(o).ghostButton]),
|
|
1361
1361
|
onClick: f
|
|
1362
|
-
},
|
|
1362
|
+
}, k(e.cancelText), 3), s("button", {
|
|
1363
1363
|
type: "button",
|
|
1364
1364
|
disabled: !l.value.trim() || e.submitting,
|
|
1365
1365
|
class: h(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", [!l.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1366
1366
|
onClick: d
|
|
1367
|
-
},
|
|
1368
|
-
default: F(() => [s("p", { class: h(["text-sm",
|
|
1367
|
+
}, k(e.submitting ? e.submittingText : e.confirmText), 11, Qt)]),
|
|
1368
|
+
default: F(() => [s("p", { class: h(["text-sm", A(a) ? "text-gray-300" : "text-gray-600"]) }, k(e.message), 3), s("div", Xt, [s("label", { class: h(["block text-sm font-medium mb-1", A(o).label]) }, k(e.inputLabel), 3), I(s("input", {
|
|
1369
1369
|
ref_key: "nameInput",
|
|
1370
1370
|
ref: u,
|
|
1371
1371
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
1372
1372
|
type: "text",
|
|
1373
1373
|
placeholder: e.placeholder,
|
|
1374
|
-
class: h(["w-full px-3 py-2 rounded-md border text-sm transition-colors",
|
|
1375
|
-
onKeyup:
|
|
1376
|
-
}, null, 42,
|
|
1374
|
+
class: h(["w-full px-3 py-2 rounded-md border text-sm transition-colors", A(a) ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:outline-none focus:border-emerald-500" : "bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-emerald-500"]),
|
|
1375
|
+
onKeyup: ne(d, ["enter"])
|
|
1376
|
+
}, null, 42, Zt), [[N, l.value]])])]),
|
|
1377
1377
|
_: 2
|
|
1378
1378
|
}, [t.$slots.icon ? {
|
|
1379
1379
|
name: "icon",
|
|
1380
|
-
fn: F(() => [
|
|
1380
|
+
fn: F(() => [E(t.$slots, "icon")]),
|
|
1381
1381
|
key: "0"
|
|
1382
1382
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1383
1383
|
}
|
|
1384
|
-
}),
|
|
1384
|
+
}), en = { class: "flex items-center justify-center min-h-[60vh]" }, tn = { class: "text-center px-6" }, nn = /* @__PURE__ */ f({
|
|
1385
1385
|
__name: "BaseNotFoundPage",
|
|
1386
1386
|
props: {
|
|
1387
1387
|
code: { default: "404" },
|
|
@@ -1390,33 +1390,33 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1390
1390
|
homeLabel: { default: "Go home" }
|
|
1391
1391
|
},
|
|
1392
1392
|
setup(e) {
|
|
1393
|
-
let t = e, n =
|
|
1393
|
+
let t = e, n = Ee(), { isDark: r } = V(), i = Y();
|
|
1394
1394
|
function a() {
|
|
1395
1395
|
n.push({ name: t.homeRouteName });
|
|
1396
1396
|
}
|
|
1397
|
-
return (t, n) => (
|
|
1398
|
-
d(
|
|
1399
|
-
s("h1", { class: h(["text-4xl font-bold mb-2",
|
|
1400
|
-
s("p", { class: h(["text-lg mb-6",
|
|
1397
|
+
return (t, n) => (x(), o("div", en, [s("div", tn, [
|
|
1398
|
+
d(A(ge), { class: h(["w-16 h-16 mx-auto mb-4", A(i).illustration]) }, null, 8, ["class"]),
|
|
1399
|
+
s("h1", { class: h(["text-4xl font-bold mb-2", A(r) ? "text-gray-200" : "text-gray-800"]) }, k(e.code), 3),
|
|
1400
|
+
s("p", { class: h(["text-lg mb-6", A(i).dimTextAlt]) }, k(e.message), 3),
|
|
1401
1401
|
s("button", {
|
|
1402
1402
|
onClick: a,
|
|
1403
|
-
class: h(["inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2",
|
|
1404
|
-
},
|
|
1403
|
+
class: h(["inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", A(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1404
|
+
}, k(e.homeLabel), 3)
|
|
1405
1405
|
])]));
|
|
1406
1406
|
}
|
|
1407
|
-
}),
|
|
1408
|
-
function
|
|
1407
|
+
}), rn = w(!1);
|
|
1408
|
+
function an() {
|
|
1409
1409
|
function e() {
|
|
1410
|
-
|
|
1410
|
+
rn.value = !0;
|
|
1411
1411
|
}
|
|
1412
1412
|
function t() {
|
|
1413
|
-
|
|
1413
|
+
rn.value = !1;
|
|
1414
1414
|
}
|
|
1415
1415
|
function n() {
|
|
1416
|
-
|
|
1416
|
+
rn.value = !rn.value;
|
|
1417
1417
|
}
|
|
1418
1418
|
return {
|
|
1419
|
-
mobileOpen:
|
|
1419
|
+
mobileOpen: rn,
|
|
1420
1420
|
open: e,
|
|
1421
1421
|
close: t,
|
|
1422
1422
|
toggle: n
|
|
@@ -1424,19 +1424,19 @@ function rn() {
|
|
|
1424
1424
|
}
|
|
1425
1425
|
//#endregion
|
|
1426
1426
|
//#region src/composables/useSidebarCollapse.ts
|
|
1427
|
-
var X =
|
|
1428
|
-
function
|
|
1429
|
-
if (!
|
|
1430
|
-
let e = window.localStorage?.getItem(
|
|
1427
|
+
var X = w(!1), on = !1, sn = "mgv-sidebar-collapsed";
|
|
1428
|
+
function cn(e) {
|
|
1429
|
+
if (!on && (on = !0, sn = e, typeof window < "u")) {
|
|
1430
|
+
let e = window.localStorage?.getItem(sn);
|
|
1431
1431
|
e && (X.value = e === "true"), p(!0).run(() => {
|
|
1432
1432
|
P(X, (e) => {
|
|
1433
|
-
window.localStorage?.setItem(
|
|
1433
|
+
window.localStorage?.setItem(sn, String(e));
|
|
1434
1434
|
});
|
|
1435
1435
|
});
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1438
|
+
function ln(e) {
|
|
1439
|
+
cn(e?.storageKey ?? sn);
|
|
1440
1440
|
function t() {
|
|
1441
1441
|
X.value = !0;
|
|
1442
1442
|
}
|
|
@@ -1455,16 +1455,16 @@ function cn(e) {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
//#endregion
|
|
1457
1457
|
//#region src/composables/useNotifications.ts
|
|
1458
|
-
var Z =
|
|
1459
|
-
function
|
|
1458
|
+
var Z = w([]), un = w(!1), dn = r(() => Z.value.filter((e) => !e.read).length);
|
|
1459
|
+
function fn() {
|
|
1460
1460
|
function e() {
|
|
1461
|
-
|
|
1461
|
+
un.value = !0;
|
|
1462
1462
|
}
|
|
1463
1463
|
function t() {
|
|
1464
|
-
|
|
1464
|
+
un.value = !1;
|
|
1465
1465
|
}
|
|
1466
1466
|
function n() {
|
|
1467
|
-
|
|
1467
|
+
un.value = !un.value;
|
|
1468
1468
|
}
|
|
1469
1469
|
function r(e) {
|
|
1470
1470
|
Z.value = e;
|
|
@@ -1492,8 +1492,8 @@ function dn() {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
return {
|
|
1494
1494
|
notifications: Z,
|
|
1495
|
-
unreadCount:
|
|
1496
|
-
open:
|
|
1495
|
+
unreadCount: dn,
|
|
1496
|
+
open: un,
|
|
1497
1497
|
openPanel: e,
|
|
1498
1498
|
closePanel: t,
|
|
1499
1499
|
togglePanel: n,
|
|
@@ -1507,22 +1507,22 @@ function dn() {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1510
|
-
var
|
|
1510
|
+
var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }, hn = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, gn = { class: "space-y-0.5" }, _n = [
|
|
1511
1511
|
"aria-current",
|
|
1512
1512
|
"title",
|
|
1513
1513
|
"onClick"
|
|
1514
|
-
],
|
|
1514
|
+
], vn = ["aria-label"], yn = { class: "relative shrink-0" }, bn = {
|
|
1515
1515
|
key: 0,
|
|
1516
1516
|
class: "absolute -top-1.5 -right-1.5 min-w-4 h-4 px-1 rounded-full bg-red-500 text-white text-[10px] font-semibold leading-4 text-center"
|
|
1517
|
-
},
|
|
1517
|
+
}, xn = [
|
|
1518
1518
|
"title",
|
|
1519
1519
|
"aria-label",
|
|
1520
1520
|
"aria-pressed"
|
|
1521
|
-
],
|
|
1521
|
+
], Sn = [
|
|
1522
1522
|
"title",
|
|
1523
1523
|
"aria-label",
|
|
1524
1524
|
"aria-pressed"
|
|
1525
|
-
],
|
|
1525
|
+
], Cn = /*#__PURE__*/ ((e, t) => {
|
|
1526
1526
|
let n = e.__vccOpts || e;
|
|
1527
1527
|
for (let [e, r] of t) n[e] = r;
|
|
1528
1528
|
return n;
|
|
@@ -1547,7 +1547,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1547
1547
|
}
|
|
1548
1548
|
},
|
|
1549
1549
|
setup(t) {
|
|
1550
|
-
let n = t, c =
|
|
1550
|
+
let n = t, c = Ee(), l = Te(), { isDark: f, toggleTheme: p } = V(), { mobileOpen: g, close: _, toggle: v } = an(), { collapsed: y, toggle: b } = ln(), { unreadCount: S, togglePanel: C } = fn(), D = r(() => n.collapsible && y.value), ee = w(null), j = null;
|
|
1551
1551
|
P(g, async (e) => {
|
|
1552
1552
|
e ? (j = document.activeElement instanceof HTMLElement ? document.activeElement : null, await m(), ee.value?.focus()) : (j?.focus(), j = null);
|
|
1553
1553
|
});
|
|
@@ -1557,141 +1557,141 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1557
1557
|
function N(e) {
|
|
1558
1558
|
return l.name === e;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function te(e) {
|
|
1561
1561
|
c.push({ name: e }), _();
|
|
1562
1562
|
}
|
|
1563
|
-
return (n, r) => (
|
|
1564
|
-
s("div", { class: h(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors",
|
|
1563
|
+
return (n, r) => (x(), o("div", null, [
|
|
1564
|
+
s("div", { class: h(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", A(f) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [s("button", {
|
|
1565
1565
|
type: "button",
|
|
1566
1566
|
onClick: M,
|
|
1567
1567
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1568
1568
|
"aria-label": "Go to home"
|
|
1569
|
-
}, [
|
|
1569
|
+
}, [E(n.$slots, "logo", { size: 28 }, void 0, !0)]), s("button", {
|
|
1570
1570
|
type: "button",
|
|
1571
|
-
onClick: r[0] ||= (...e) =>
|
|
1572
|
-
class: h(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1573
|
-
"aria-label":
|
|
1574
|
-
"aria-expanded":
|
|
1575
|
-
}, [
|
|
1571
|
+
onClick: r[0] ||= (...e) => A(v) && A(v)(...e),
|
|
1572
|
+
class: h(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", A(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1573
|
+
"aria-label": A(g) ? "Close navigation menu" : "Open navigation menu",
|
|
1574
|
+
"aria-expanded": A(g)
|
|
1575
|
+
}, [A(g) ? (x(), i(A(Ce), {
|
|
1576
1576
|
key: 1,
|
|
1577
1577
|
class: "w-6 h-6",
|
|
1578
1578
|
"aria-hidden": "true"
|
|
1579
|
-
})) : (
|
|
1579
|
+
})) : (x(), i(A(ae), {
|
|
1580
1580
|
key: 0,
|
|
1581
1581
|
class: "w-6 h-6",
|
|
1582
1582
|
"aria-hidden": "true"
|
|
1583
|
-
}))], 10,
|
|
1584
|
-
|
|
1583
|
+
}))], 10, pn)], 2),
|
|
1584
|
+
A(g) ? (x(), o("div", {
|
|
1585
1585
|
key: 0,
|
|
1586
1586
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1587
1587
|
"aria-hidden": "true",
|
|
1588
|
-
onClick: r[1] ||= (...e) =>
|
|
1588
|
+
onClick: r[1] ||= (...e) => A(_) && A(_)(...e)
|
|
1589
1589
|
})) : a("", !0),
|
|
1590
1590
|
s("aside", {
|
|
1591
1591
|
role: "navigation",
|
|
1592
1592
|
"aria-label": "Main navigation",
|
|
1593
1593
|
class: h(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-all duration-300 lg:pointer-events-auto", [
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
t.collapsible &&
|
|
1594
|
+
A(f) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200",
|
|
1595
|
+
A(g) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1596
|
+
t.collapsible && A(y) ? "lg:w-16" : "lg:w-60"
|
|
1597
1597
|
]])
|
|
1598
|
-
}, [s("div",
|
|
1599
|
-
s("div", { class: h(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2":
|
|
1598
|
+
}, [s("div", mn, [
|
|
1599
|
+
s("div", { class: h(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": D.value }]) }, [s("button", {
|
|
1600
1600
|
type: "button",
|
|
1601
1601
|
onClick: M,
|
|
1602
1602
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1603
1603
|
"aria-label": "Go to home"
|
|
1604
|
-
}, [
|
|
1604
|
+
}, [E(n.$slots, "logo", { size: D.value ? 36 : 52 }, void 0, !0)]), s("button", {
|
|
1605
1605
|
ref_key: "closeMobileButton",
|
|
1606
1606
|
ref: ee,
|
|
1607
1607
|
type: "button",
|
|
1608
|
-
onClick: r[2] ||= (...e) =>
|
|
1609
|
-
class: h(["lg:hidden p-1.5 rounded-lg cursor-pointer absolute right-3 top-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1608
|
+
onClick: r[2] ||= (...e) => A(_) && A(_)(...e),
|
|
1609
|
+
class: h(["lg:hidden p-1.5 rounded-lg cursor-pointer absolute right-3 top-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", A(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1610
1610
|
"aria-label": "Close navigation menu"
|
|
1611
|
-
}, [d(
|
|
1611
|
+
}, [d(A(Ce), {
|
|
1612
1612
|
class: "w-5 h-5",
|
|
1613
1613
|
"aria-hidden": "true"
|
|
1614
1614
|
})], 2)], 2),
|
|
1615
|
-
s("nav",
|
|
1615
|
+
s("nav", hn, [(x(!0), o(e, null, T(t.sections, (t) => (x(), o("div", { key: t.title }, [s("p", { class: h(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": D.value }]) }, k(t.title), 3), s("ul", gn, [(x(!0), o(e, null, T(t.items, (e) => (x(), o("li", { key: e.name }, [s("button", {
|
|
1616
1616
|
type: "button",
|
|
1617
1617
|
"aria-current": N(e.name) ? "page" : void 0,
|
|
1618
|
-
title:
|
|
1619
|
-
onClick: (t) =>
|
|
1620
|
-
class: h(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [N(e.name) ?
|
|
1621
|
-
}, [(
|
|
1622
|
-
s("div", { class: h(["px-4 py-4 border-t transition-colors space-y-3",
|
|
1623
|
-
t.showNotifications ? (
|
|
1618
|
+
title: D.value ? e.label : void 0,
|
|
1619
|
+
onClick: (t) => te(e.name),
|
|
1620
|
+
class: h(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [N(e.name) ? A(f) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : A(f) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": D.value }]])
|
|
1621
|
+
}, [(x(), i(O(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s("span", { class: h({ "lg:hidden": D.value }) }, k(e.label), 3)], 10, _n)]))), 128))])]))), 128))]),
|
|
1622
|
+
s("div", { class: h(["px-4 py-4 border-t transition-colors space-y-3", A(f) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1623
|
+
t.showNotifications ? (x(), o("button", {
|
|
1624
1624
|
key: 0,
|
|
1625
1625
|
type: "button",
|
|
1626
|
-
onClick: r[3] ||= (...e) =>
|
|
1626
|
+
onClick: r[3] ||= (...e) => A(C) && A(C)(...e),
|
|
1627
1627
|
title: "Notifications",
|
|
1628
|
-
"aria-label":
|
|
1629
|
-
class: h(["relative flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [
|
|
1630
|
-
}, [s("span",
|
|
1628
|
+
"aria-label": A(S) > 0 ? `Notifications, ${A(S)} unread` : "Notifications",
|
|
1629
|
+
class: h(["relative flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [A(f) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": D.value }]])
|
|
1630
|
+
}, [s("span", yn, [d(A(oe), {
|
|
1631
1631
|
class: "w-[18px] h-[18px]",
|
|
1632
1632
|
"aria-hidden": "true"
|
|
1633
|
-
}),
|
|
1634
|
-
t.showThemeToggle ? (
|
|
1633
|
+
}), A(S) > 0 ? (x(), o("span", bn, k(A(S) > 99 ? "99+" : A(S)), 1)) : a("", !0)]), s("span", { class: h({ "lg:hidden": D.value }) }, "Notifications", 2)], 10, vn)) : a("", !0),
|
|
1634
|
+
t.showThemeToggle ? (x(), o("button", {
|
|
1635
1635
|
key: 1,
|
|
1636
1636
|
type: "button",
|
|
1637
|
-
onClick: r[4] ||= (...e) =>
|
|
1638
|
-
title:
|
|
1639
|
-
"aria-label":
|
|
1640
|
-
"aria-pressed":
|
|
1641
|
-
class: h(["flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [
|
|
1637
|
+
onClick: r[4] ||= (...e) => A(p) && A(p)(...e),
|
|
1638
|
+
title: A(f) ? "Switch to light mode" : "Switch to dark mode",
|
|
1639
|
+
"aria-label": A(f) ? "Switch to light mode" : "Switch to dark mode",
|
|
1640
|
+
"aria-pressed": A(f),
|
|
1641
|
+
class: h(["flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [A(f) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": D.value }]])
|
|
1642
1642
|
}, [
|
|
1643
|
-
(
|
|
1644
|
-
class: h(["hidden w-[18px] h-[18px] shrink-0", { "lg:block":
|
|
1643
|
+
(x(), i(O(A(f) ? A(Se) : A(xe)), {
|
|
1644
|
+
class: h(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": D.value }]),
|
|
1645
1645
|
"aria-hidden": "true"
|
|
1646
1646
|
}, null, 8, ["class"])),
|
|
1647
|
-
s("span", { class: h({ "lg:hidden":
|
|
1648
|
-
s("span", { class: h(["ml-auto relative w-9 h-5 rounded-full transition-colors", [
|
|
1649
|
-
], 10,
|
|
1650
|
-
t.collapsible ? (
|
|
1647
|
+
s("span", { class: h({ "lg:hidden": D.value }) }, k(A(f) ? "Switch to light" : "Switch to dark"), 3),
|
|
1648
|
+
s("span", { class: h(["ml-auto relative w-9 h-5 rounded-full transition-colors", [A(f) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": D.value }]]) }, [s("span", { class: h(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", A(f) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1649
|
+
], 10, xn)) : a("", !0),
|
|
1650
|
+
t.collapsible ? (x(), o("button", {
|
|
1651
1651
|
key: 2,
|
|
1652
1652
|
type: "button",
|
|
1653
|
-
onClick: r[5] ||= (...e) =>
|
|
1654
|
-
title:
|
|
1655
|
-
"aria-label":
|
|
1656
|
-
"aria-pressed":
|
|
1657
|
-
class: h(["hidden lg:flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [
|
|
1658
|
-
}, [(
|
|
1653
|
+
onClick: r[5] ||= (...e) => A(b) && A(b)(...e),
|
|
1654
|
+
title: A(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1655
|
+
"aria-label": A(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1656
|
+
"aria-pressed": A(y),
|
|
1657
|
+
class: h(["hidden lg:flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [A(f) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": D.value }]])
|
|
1658
|
+
}, [(x(), i(O(A(y) ? A(le) : A(ce)), {
|
|
1659
1659
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1660
1660
|
"aria-hidden": "true"
|
|
1661
|
-
})), s("span", { class: h({ "lg:hidden":
|
|
1662
|
-
s("div", { class: h({ "lg:hidden":
|
|
1663
|
-
s("div", { class: h({ "lg:hidden":
|
|
1661
|
+
})), s("span", { class: h({ "lg:hidden": D.value }) }, "Collapse", 2)], 10, Sn)) : a("", !0),
|
|
1662
|
+
s("div", { class: h({ "lg:hidden": D.value }) }, [E(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1663
|
+
s("div", { class: h({ "lg:hidden": D.value }) }, [E(n.$slots, "footer", {}, () => [t.appName || t.version ? (x(), o("div", {
|
|
1664
1664
|
key: 0,
|
|
1665
|
-
class: h(["flex items-center justify-center gap-2 text-xs", (
|
|
1665
|
+
class: h(["flex items-center justify-center gap-2 text-xs", (A(f), "text-gray-500")])
|
|
1666
1666
|
}, [s("span", null, [
|
|
1667
|
-
u(
|
|
1668
|
-
t.appName && t.version ? (
|
|
1669
|
-
t.version ? (
|
|
1667
|
+
u(k(t.appName), 1),
|
|
1668
|
+
t.appName && t.version ? (x(), o(e, { key: 0 }, [], 64)) : a("", !0),
|
|
1669
|
+
t.version ? (x(), o(e, { key: 1 }, [u("v" + k(t.version), 1)], 64)) : a("", !0)
|
|
1670
1670
|
])], 2)) : a("", !0)], !0)], 2)
|
|
1671
1671
|
], 2)
|
|
1672
1672
|
])], 2)
|
|
1673
1673
|
]));
|
|
1674
1674
|
}
|
|
1675
|
-
}), [["__scopeId", "data-v-452beaf2"]]),
|
|
1675
|
+
}), [["__scopeId", "data-v-452beaf2"]]), wn = {
|
|
1676
1676
|
key: 1,
|
|
1677
1677
|
class: "mt-4 flex justify-center py-6"
|
|
1678
|
-
},
|
|
1678
|
+
}, Tn = {
|
|
1679
1679
|
key: 2,
|
|
1680
1680
|
class: "mt-4 text-sm text-red-500",
|
|
1681
1681
|
role: "alert"
|
|
1682
|
-
},
|
|
1682
|
+
}, En = {
|
|
1683
1683
|
key: 3,
|
|
1684
1684
|
class: "mt-4"
|
|
1685
|
-
},
|
|
1685
|
+
}, Dn = { class: "relative" }, On = ["placeholder"], kn = {
|
|
1686
1686
|
key: 4,
|
|
1687
1687
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1688
|
-
},
|
|
1688
|
+
}, An = ["aria-pressed", "onClick"], jn = { class: "flex-1 min-w-0" }, Mn = {
|
|
1689
1689
|
key: 0,
|
|
1690
1690
|
class: "text-center py-6"
|
|
1691
|
-
},
|
|
1691
|
+
}, Nn = {
|
|
1692
1692
|
key: 1,
|
|
1693
1693
|
class: "text-center py-6"
|
|
1694
|
-
},
|
|
1694
|
+
}, Pn = ["disabled"], Fn = ["disabled"], In = /* @__PURE__ */ f({
|
|
1695
1695
|
__name: "BaseEntityPickerModal",
|
|
1696
1696
|
props: {
|
|
1697
1697
|
title: {},
|
|
@@ -1713,10 +1713,10 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1713
1713
|
},
|
|
1714
1714
|
emits: ["confirm", "cancel"],
|
|
1715
1715
|
setup(t, { emit: n }) {
|
|
1716
|
-
let l = t, u = n, { isDark: f } = V(), p = Y(), g =
|
|
1716
|
+
let l = t, u = n, { isDark: f } = V(), p = Y(), g = w([]), _ = w(!1), y = w(""), b = w(null), S = w(""), C = w(null), D = r(() => {
|
|
1717
1717
|
let e = l.loader ? g.value : l.items;
|
|
1718
1718
|
return l.excludeId ? e.filter((e) => e.id !== l.excludeId) : e;
|
|
1719
|
-
}),
|
|
1719
|
+
}), O = r(() => D.value.filter((e) => e.label.toLowerCase().includes(S.value.toLowerCase()))), ee = {
|
|
1720
1720
|
emerald: {
|
|
1721
1721
|
iconBg: "bg-emerald-50",
|
|
1722
1722
|
iconText: "text-emerald-600",
|
|
@@ -1808,74 +1808,74 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1808
1808
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1809
1809
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1810
1810
|
}
|
|
1811
|
-
},
|
|
1812
|
-
|
|
1811
|
+
}, M = r(() => (f.value ? j : ee)[l.variant]);
|
|
1812
|
+
v(async () => {
|
|
1813
1813
|
if (l.loader) {
|
|
1814
|
-
|
|
1814
|
+
_.value = !0;
|
|
1815
1815
|
try {
|
|
1816
1816
|
g.value = await l.loader();
|
|
1817
1817
|
} catch {
|
|
1818
1818
|
y.value = "Failed to load items";
|
|
1819
1819
|
} finally {
|
|
1820
|
-
|
|
1820
|
+
_.value = !1;
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
|
-
await m(),
|
|
1823
|
+
await m(), C.value?.focus();
|
|
1824
1824
|
});
|
|
1825
|
-
function P() {
|
|
1826
|
-
!x.value || l.submitting || u("confirm", x.value);
|
|
1827
|
-
}
|
|
1828
1825
|
function te() {
|
|
1826
|
+
!b.value || l.submitting || u("confirm", b.value);
|
|
1827
|
+
}
|
|
1828
|
+
function P() {
|
|
1829
1829
|
l.submitting || u("cancel");
|
|
1830
1830
|
}
|
|
1831
|
-
return (n, r) => (
|
|
1831
|
+
return (n, r) => (x(), i(Ht, {
|
|
1832
1832
|
title: t.title,
|
|
1833
|
-
icon:
|
|
1834
|
-
"icon-bg-class":
|
|
1835
|
-
"icon-class":
|
|
1833
|
+
icon: A(_e),
|
|
1834
|
+
"icon-bg-class": M.value.iconBg,
|
|
1835
|
+
"icon-class": M.value.iconText,
|
|
1836
1836
|
"manual-close": t.submitting,
|
|
1837
|
-
onCancel:
|
|
1837
|
+
onCancel: P
|
|
1838
1838
|
}, c({
|
|
1839
1839
|
footer: F(() => [s("button", {
|
|
1840
1840
|
type: "button",
|
|
1841
1841
|
disabled: t.submitting,
|
|
1842
|
-
class: h(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1843
|
-
onClick: te
|
|
1844
|
-
}, O(t.cancelText), 11, Nn), s("button", {
|
|
1845
|
-
type: "button",
|
|
1846
|
-
disabled: !x.value || t.submitting,
|
|
1847
|
-
class: h(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", !x.value || t.submitting ? N.value.confirmDisabled : N.value.confirmActive]),
|
|
1842
|
+
class: h(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", A(p).ghostButton]),
|
|
1848
1843
|
onClick: P
|
|
1849
|
-
},
|
|
1844
|
+
}, k(t.cancelText), 11, Pn), s("button", {
|
|
1845
|
+
type: "button",
|
|
1846
|
+
disabled: !b.value || t.submitting,
|
|
1847
|
+
class: h(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", !b.value || t.submitting ? M.value.confirmDisabled : M.value.confirmActive]),
|
|
1848
|
+
onClick: te
|
|
1849
|
+
}, k(t.submitting ? t.submittingText : t.confirmText), 11, Fn)]),
|
|
1850
1850
|
default: F(() => [
|
|
1851
|
-
t.message ? (
|
|
1851
|
+
t.message ? (x(), o("p", {
|
|
1852
1852
|
key: 0,
|
|
1853
|
-
class: h(["text-sm",
|
|
1854
|
-
},
|
|
1855
|
-
|
|
1856
|
-
!
|
|
1857
|
-
class: h(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4",
|
|
1853
|
+
class: h(["text-sm", A(f) ? "text-gray-300" : "text-gray-600"])
|
|
1854
|
+
}, k(t.message), 3)) : a("", !0),
|
|
1855
|
+
_.value ? (x(), o("div", wn, [d(lt, { color: "emerald" })])) : y.value ? (x(), o("div", Tn, k(y.value), 1)) : a("", !0),
|
|
1856
|
+
!_.value && !y.value && D.value.length > 0 ? (x(), o("div", En, [s("div", Dn, [d(A(ye), {
|
|
1857
|
+
class: h(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", A(p).dimText]),
|
|
1858
1858
|
"aria-hidden": "true"
|
|
1859
1859
|
}, null, 8, ["class"]), I(s("input", {
|
|
1860
1860
|
ref_key: "searchInputRef",
|
|
1861
|
-
ref:
|
|
1861
|
+
ref: C,
|
|
1862
1862
|
"onUpdate:modelValue": r[0] ||= (e) => S.value = e,
|
|
1863
1863
|
type: "text",
|
|
1864
1864
|
placeholder: t.searchPlaceholder,
|
|
1865
|
-
class: h(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [
|
|
1866
|
-
}, null, 10,
|
|
1867
|
-
!
|
|
1865
|
+
class: h(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [A(f) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", M.value.inputFocus]])
|
|
1866
|
+
}, null, 10, On), [[N, S.value]])])])) : a("", !0),
|
|
1867
|
+
!_.value && !y.value ? (x(), o("div", kn, [(x(!0), o(e, null, T(O.value, (e) => (x(), o("button", {
|
|
1868
1868
|
key: e.id,
|
|
1869
1869
|
type: "button",
|
|
1870
|
-
"aria-pressed":
|
|
1871
|
-
class: h(["w-full text-left flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [
|
|
1872
|
-
onClick: (t) =>
|
|
1870
|
+
"aria-pressed": b.value === e.id,
|
|
1871
|
+
class: h(["w-full text-left flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [b.value === e.id ? M.value.selectedRow : A(f) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1872
|
+
onClick: (t) => b.value = e.id
|
|
1873
1873
|
}, [
|
|
1874
|
-
d(
|
|
1875
|
-
s("div",
|
|
1876
|
-
|
|
1874
|
+
d(A(_e), { class: h(["w-5 h-5 flex-shrink-0", A(p).dimText]) }, null, 8, ["class"]),
|
|
1875
|
+
s("div", jn, [s("p", { class: h(["text-sm font-medium truncate", A(p).bodyText]) }, k(e.label), 3)]),
|
|
1876
|
+
b.value === e.id ? (x(), o("div", {
|
|
1877
1877
|
key: 0,
|
|
1878
|
-
class: h(["w-5 h-5 rounded-full flex items-center justify-center",
|
|
1878
|
+
class: h(["w-5 h-5 rounded-full flex items-center justify-center", M.value.checkBg])
|
|
1879
1879
|
}, [...r[1] ||= [s("svg", {
|
|
1880
1880
|
class: "w-3 h-3 text-white",
|
|
1881
1881
|
fill: "none",
|
|
@@ -1888,12 +1888,12 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1888
1888
|
"stroke-linejoin": "round",
|
|
1889
1889
|
d: "M5 13l4 4L19 7"
|
|
1890
1890
|
})], -1)]], 2)) : a("", !0)
|
|
1891
|
-
], 10,
|
|
1891
|
+
], 10, An))), 128)), D.value.length === 0 ? (x(), o("div", Mn, [s("p", { class: h(["text-sm", A(p).dimText]) }, k(t.emptyMessage), 3)])) : O.value.length === 0 ? (x(), o("div", Nn, [s("p", { class: h(["text-sm", A(p).dimText]) }, k(t.noMatchMessage), 3)])) : a("", !0)])) : a("", !0)
|
|
1892
1892
|
]),
|
|
1893
1893
|
_: 2
|
|
1894
1894
|
}, [n.$slots.icon ? {
|
|
1895
1895
|
name: "icon",
|
|
1896
|
-
fn: F(() => [
|
|
1896
|
+
fn: F(() => [E(n.$slots, "icon")]),
|
|
1897
1897
|
key: "0"
|
|
1898
1898
|
} : void 0]), 1032, [
|
|
1899
1899
|
"title",
|
|
@@ -1903,10 +1903,10 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1903
1903
|
"manual-close"
|
|
1904
1904
|
]));
|
|
1905
1905
|
}
|
|
1906
|
-
}),
|
|
1906
|
+
}), Ln = {
|
|
1907
1907
|
href: "#main-content",
|
|
1908
1908
|
class: "sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:px-3 focus:py-2 focus:rounded-md focus:bg-emerald-600 focus:text-white focus:shadow-lg"
|
|
1909
|
-
},
|
|
1909
|
+
}, Rn = ["inert"], zn = /* @__PURE__ */ f({
|
|
1910
1910
|
__name: "BaseAppLayout",
|
|
1911
1911
|
props: {
|
|
1912
1912
|
showSidebar: {
|
|
@@ -1916,25 +1916,27 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1916
1916
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1917
1917
|
},
|
|
1918
1918
|
setup(e) {
|
|
1919
|
-
let t = e, { isDark: n } = V(), { mobileOpen: i } =
|
|
1920
|
-
return (t, r) => (
|
|
1921
|
-
s("a",
|
|
1922
|
-
l.value ?
|
|
1919
|
+
let t = e, { isDark: n } = V(), { mobileOpen: i } = an(), { collapsed: c } = ln(), l = r(() => t.showSidebar);
|
|
1920
|
+
return (t, r) => (x(), o("div", { class: h(["min-h-screen transition-colors duration-300", A(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1921
|
+
s("a", Ln, k(e.skipLinkLabel), 1),
|
|
1922
|
+
l.value ? E(t.$slots, "sidebar", { key: 0 }) : a("", !0),
|
|
1923
1923
|
s("main", {
|
|
1924
1924
|
id: "main-content",
|
|
1925
1925
|
tabindex: "-1",
|
|
1926
|
-
inert: l.value &&
|
|
1927
|
-
class: h(["transition-all duration-300", l.value ?
|
|
1928
|
-
}, [
|
|
1926
|
+
inert: l.value && A(i) ? !0 : void 0,
|
|
1927
|
+
class: h(["transition-all duration-300", l.value ? A(c) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1928
|
+
}, [E(t.$slots, "default")], 10, Rn)
|
|
1929
1929
|
], 2));
|
|
1930
1930
|
}
|
|
1931
|
-
}),
|
|
1931
|
+
}), Bn = { class: "flex items-center gap-3 min-w-0" }, Vn = { class: "flex items-center gap-2" }, Hn = /* @__PURE__ */ f({
|
|
1932
1932
|
__name: "BasePageHeader",
|
|
1933
1933
|
props: {
|
|
1934
1934
|
title: {},
|
|
1935
1935
|
subtitle: { default: "" },
|
|
1936
1936
|
iconColor: { default: "emerald" },
|
|
1937
|
-
maxWidthClass: { default: "max-w-4xl" }
|
|
1937
|
+
maxWidthClass: { default: "max-w-4xl" },
|
|
1938
|
+
align: { default: "center" },
|
|
1939
|
+
marginClass: { default: "mb-8" }
|
|
1938
1940
|
},
|
|
1939
1941
|
setup(e) {
|
|
1940
1942
|
let t = e, { isDark: n } = V(), i = Y(), c = r(() => {
|
|
@@ -1978,10 +1980,13 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
1978
1980
|
}[t.iconColor];
|
|
1979
1981
|
return n.value ? e.dark : e.light;
|
|
1980
1982
|
});
|
|
1981
|
-
return (t, n) => (
|
|
1983
|
+
return (t, n) => (x(), o("header", { class: h(e.maxWidthClass ? ["mx-auto px-4 sm:px-6", e.maxWidthClass] : void 0) }, [s("div", { class: h(["flex flex-wrap justify-between gap-3", [e.align === "end" ? "items-end" : "items-center", e.marginClass]]) }, [s("div", Bn, [t.$slots.icon ? (x(), o("div", {
|
|
1982
1984
|
key: 0,
|
|
1983
|
-
class: h(["
|
|
1984
|
-
},
|
|
1985
|
+
class: h(["w-10 h-10 rounded-lg flex items-center justify-center", c.value])
|
|
1986
|
+
}, [E(t.$slots, "icon", { iconClass: l.value })], 2)) : a("", !0), s("div", null, [s("h1", { class: h(["text-2xl font-bold", A(i).primaryTextSoft]) }, k(e.title), 3), e.subtitle || t.$slots.subtitle ? (x(), o("p", {
|
|
1987
|
+
key: 0,
|
|
1988
|
+
class: h(["text-sm", A(i).dimTextAlt])
|
|
1989
|
+
}, [E(t.$slots, "subtitle", {}, () => [u(k(e.subtitle), 1)])], 2)) : a("", !0)])]), s("div", Vn, [E(t.$slots, "actions")])], 2)], 2));
|
|
1985
1990
|
}
|
|
1986
1991
|
}), Un = [
|
|
1987
1992
|
"type",
|
|
@@ -2022,13 +2027,13 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2022
2027
|
}[t.variant];
|
|
2023
2028
|
return [i[t.variant], n.value ? e.dark : e.light];
|
|
2024
2029
|
});
|
|
2025
|
-
return (t, n) => (
|
|
2030
|
+
return (t, n) => (x(), o("button", {
|
|
2026
2031
|
type: e.type,
|
|
2027
2032
|
disabled: e.disabled,
|
|
2028
2033
|
title: e.title,
|
|
2029
2034
|
class: h(["inline-flex shrink-0 items-center gap-2 text-sm border transition-colors cursor-pointer disabled:cursor-not-allowed whitespace-nowrap focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", s.value]),
|
|
2030
2035
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2031
|
-
}, [
|
|
2036
|
+
}, [E(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (x(), o("span", Wn, k(e.label), 1)) : a("", !0)], 10, Un));
|
|
2032
2037
|
}
|
|
2033
2038
|
}), Kn = [
|
|
2034
2039
|
"type",
|
|
@@ -2127,14 +2132,14 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2127
2132
|
}[t.color];
|
|
2128
2133
|
return n.value ? e.dark : e.light;
|
|
2129
2134
|
}), c = r(() => t.disabled ? `${s.value} opacity-50 cursor-not-allowed` : `${i.value} cursor-pointer`);
|
|
2130
|
-
return (t, n) => (
|
|
2135
|
+
return (t, n) => (x(), o("button", {
|
|
2131
2136
|
type: e.type,
|
|
2132
2137
|
disabled: e.disabled,
|
|
2133
2138
|
title: e.title,
|
|
2134
2139
|
"aria-label": e.ariaLabel,
|
|
2135
2140
|
class: h(["inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current", [e.fullWidth ? "flex-1" : "", c.value]]),
|
|
2136
2141
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2137
|
-
}, [
|
|
2142
|
+
}, [E(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (x(), o("span", qn, k(e.label), 1)) : a("", !0)], 10, Kn));
|
|
2138
2143
|
}
|
|
2139
2144
|
}), Yn = ["title", "aria-label"], Xn = /* @__PURE__ */ f({
|
|
2140
2145
|
__name: "BaseCopyButton",
|
|
@@ -2147,7 +2152,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2147
2152
|
},
|
|
2148
2153
|
emits: ["copied", "error"],
|
|
2149
2154
|
setup(e, { emit: t }) {
|
|
2150
|
-
let n = e, a = t, { isDark: s } = V(), c =
|
|
2155
|
+
let n = e, a = t, { isDark: s } = V(), c = w(!1), l = null, u = r(() => c.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = r(() => n.label ? `Copy ${n.label}` : "Copy"), f = r(() => n.variant === "bordered" ? `inline-flex items-center justify-center w-9 h-9 rounded-lg border transition-colors cursor-pointer shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${c.value ? s.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : s.value ? "border-gray-600 text-gray-400 hover:text-gray-200 hover:bg-gray-800" : "border-gray-300 text-gray-400 hover:text-gray-600 hover:bg-gray-50"}` : `p-1 rounded transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${s.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2151
2156
|
async function p(e) {
|
|
2152
2157
|
try {
|
|
2153
2158
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2169,19 +2174,19 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2169
2174
|
a("error", e);
|
|
2170
2175
|
}
|
|
2171
2176
|
}
|
|
2172
|
-
return
|
|
2177
|
+
return b(() => {
|
|
2173
2178
|
l && clearTimeout(l);
|
|
2174
|
-
}), (t, n) => (
|
|
2179
|
+
}), (t, n) => (x(), o("button", {
|
|
2175
2180
|
type: "button",
|
|
2176
2181
|
title: u.value,
|
|
2177
2182
|
"aria-label": d.value,
|
|
2178
2183
|
class: h(f.value),
|
|
2179
2184
|
onClick: m
|
|
2180
|
-
}, [c.value ? (
|
|
2185
|
+
}, [c.value ? (x(), i(A(fe), {
|
|
2181
2186
|
key: 0,
|
|
2182
2187
|
class: h(e.iconClass),
|
|
2183
2188
|
"aria-hidden": "true"
|
|
2184
|
-
}, null, 8, ["class"])) : (
|
|
2189
|
+
}, null, 8, ["class"])) : (x(), i(A(pe), {
|
|
2185
2190
|
key: 1,
|
|
2186
2191
|
class: h(e.iconClass),
|
|
2187
2192
|
"aria-hidden": "true"
|
|
@@ -2221,13 +2226,13 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2221
2226
|
function u() {
|
|
2222
2227
|
c.value || i("click");
|
|
2223
2228
|
}
|
|
2224
|
-
return (t, n) => (
|
|
2229
|
+
return (t, n) => (x(), o("button", {
|
|
2225
2230
|
type: "button",
|
|
2226
2231
|
disabled: c.value,
|
|
2227
2232
|
"aria-busy": e.loading,
|
|
2228
2233
|
onClick: u,
|
|
2229
|
-
class: h(["inline-flex items-center justify-center gap-3 h-11 px-4 rounded-lg border text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "",
|
|
2230
|
-
}, [e.loading ? (
|
|
2234
|
+
class: h(["inline-flex items-center justify-center gap-3 h-11 px-4 rounded-lg border text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", A(a) ? "bg-gray-900 border-gray-700 text-gray-100 hover:bg-gray-800" : "bg-white border-gray-300 text-gray-700 hover:bg-gray-50"]])
|
|
2235
|
+
}, [e.loading ? (x(), o("svg", Qn, [...n[0] ||= [s("circle", {
|
|
2231
2236
|
class: "opacity-25",
|
|
2232
2237
|
cx: "12",
|
|
2233
2238
|
cy: "12",
|
|
@@ -2238,7 +2243,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2238
2243
|
class: "opacity-75",
|
|
2239
2244
|
fill: "currentColor",
|
|
2240
2245
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2241
|
-
}, null, -1)]])) : (
|
|
2246
|
+
}, null, -1)]])) : (x(), o("svg", $n, [...n[1] ||= [l("<path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path><path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path><path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path><path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path><path fill=\"none\" d=\"M0 0h48v48H0z\"></path>", 5)]])), s("span", null, k(e.label), 1)], 10, Zn));
|
|
2242
2247
|
}
|
|
2243
2248
|
}), tr = {
|
|
2244
2249
|
key: 0,
|
|
@@ -2275,7 +2280,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2275
2280
|
},
|
|
2276
2281
|
emits: ["submit", "google-sign-in"],
|
|
2277
2282
|
setup(t, { emit: n }) {
|
|
2278
|
-
let i = t, c = n, { isDark: l } = V(), f = Y(), p =
|
|
2283
|
+
let i = t, c = n, { isDark: l } = V(), f = Y(), p = w(""), m = w(""), g = w(!1), _ = w(!1), v = r(() => i.loading || i.googleLoading);
|
|
2279
2284
|
function y() {
|
|
2280
2285
|
v.value || c("submit", {
|
|
2281
2286
|
email: p.value,
|
|
@@ -2283,25 +2288,25 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2283
2288
|
...i.showRemember ? { remember: g.value } : {}
|
|
2284
2289
|
});
|
|
2285
2290
|
}
|
|
2286
|
-
return (n, r) => (
|
|
2287
|
-
n.$slots.logo ? (
|
|
2288
|
-
s("div", nr, [s("h1", { class: h(["text-xl font-semibold",
|
|
2291
|
+
return (n, r) => (x(), o("div", { class: h(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", A(f).card]) }, [
|
|
2292
|
+
n.$slots.logo ? (x(), o("div", tr, [E(n.$slots, "logo")])) : a("", !0),
|
|
2293
|
+
s("div", nr, [s("h1", { class: h(["text-xl font-semibold", A(f).primaryText]) }, k(t.title), 3), t.subtitle ? (x(), o("p", {
|
|
2289
2294
|
key: 0,
|
|
2290
|
-
class: h(["mt-1 text-sm",
|
|
2291
|
-
},
|
|
2292
|
-
t.error ? (
|
|
2295
|
+
class: h(["mt-1 text-sm", A(f).mutedText])
|
|
2296
|
+
}, k(t.subtitle), 3)) : a("", !0)]),
|
|
2297
|
+
t.error ? (x(), o("div", {
|
|
2293
2298
|
key: 1,
|
|
2294
2299
|
role: "alert",
|
|
2295
|
-
class: h(["mb-4 rounded-lg border px-3 py-2 text-sm",
|
|
2296
|
-
},
|
|
2297
|
-
t.showGoogle ? (
|
|
2300
|
+
class: h(["mb-4 rounded-lg border px-3 py-2 text-sm", A(l) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2301
|
+
}, k(t.error), 3)) : a("", !0),
|
|
2302
|
+
t.showGoogle ? (x(), o(e, { key: 2 }, [d(er, {
|
|
2298
2303
|
loading: t.googleLoading,
|
|
2299
2304
|
disabled: t.loading,
|
|
2300
2305
|
onClick: r[0] ||= (e) => c("google-sign-in")
|
|
2301
2306
|
}, null, 8, ["loading", "disabled"]), s("div", rr, [
|
|
2302
|
-
s("span", { class: h(["h-px flex-1",
|
|
2303
|
-
s("span", { class: h(["text-xs uppercase tracking-wider",
|
|
2304
|
-
s("span", { class: h(["h-px flex-1",
|
|
2307
|
+
s("span", { class: h(["h-px flex-1", A(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2308
|
+
s("span", { class: h(["text-xs uppercase tracking-wider", A(f).dimTextAlt]) }, "or", 2),
|
|
2309
|
+
s("span", { class: h(["h-px flex-1", A(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
2305
2310
|
])], 64)) : a("", !0),
|
|
2306
2311
|
s("form", {
|
|
2307
2312
|
class: "space-y-4",
|
|
@@ -2309,7 +2314,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2309
2314
|
}, [
|
|
2310
2315
|
s("div", null, [s("label", {
|
|
2311
2316
|
for: "login-email",
|
|
2312
|
-
class: h(["block mb-1.5 text-sm font-medium",
|
|
2317
|
+
class: h(["block mb-1.5 text-sm font-medium", A(f).label])
|
|
2313
2318
|
}, " Email ", 2), I(s("input", {
|
|
2314
2319
|
id: "login-email",
|
|
2315
2320
|
"onUpdate:modelValue": r[1] ||= (e) => p.value = e,
|
|
@@ -2319,12 +2324,12 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2319
2324
|
required: "",
|
|
2320
2325
|
disabled: v.value,
|
|
2321
2326
|
placeholder: "you@example.com",
|
|
2322
|
-
class: h(["w-full h-11 px-3 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60",
|
|
2323
|
-
}, null, 10, ir), [[
|
|
2327
|
+
class: h(["w-full h-11 px-3 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", A(f).inputWithPlaceholder])
|
|
2328
|
+
}, null, 10, ir), [[N, p.value]])]),
|
|
2324
2329
|
s("div", null, [s("div", ar, [s("label", {
|
|
2325
2330
|
for: "login-password",
|
|
2326
|
-
class: h(["block text-sm font-medium",
|
|
2327
|
-
}, " Password ", 2),
|
|
2331
|
+
class: h(["block text-sm font-medium", A(f).label])
|
|
2332
|
+
}, " Password ", 2), E(n.$slots, "forgot")]), s("div", or, [I(s("input", {
|
|
2328
2333
|
id: "login-password",
|
|
2329
2334
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2330
2335
|
type: _.value ? "text" : "password",
|
|
@@ -2333,29 +2338,29 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2333
2338
|
required: "",
|
|
2334
2339
|
disabled: v.value,
|
|
2335
2340
|
placeholder: "••••••••",
|
|
2336
|
-
class: h(["w-full h-11 pl-3 pr-16 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60",
|
|
2337
|
-
}, null, 10, sr), [[
|
|
2341
|
+
class: h(["w-full h-11 pl-3 pr-16 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", A(f).inputWithPlaceholder])
|
|
2342
|
+
}, null, 10, sr), [[M, m.value]]), s("button", {
|
|
2338
2343
|
type: "button",
|
|
2339
2344
|
onClick: r[3] ||= (e) => _.value = !_.value,
|
|
2340
2345
|
"aria-label": _.value ? "Hide password" : "Show password",
|
|
2341
2346
|
"aria-pressed": _.value,
|
|
2342
|
-
class: h(["absolute inset-y-0 right-0 px-3 text-xs font-medium cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 rounded-r-lg",
|
|
2343
|
-
},
|
|
2344
|
-
t.showRemember ? (
|
|
2347
|
+
class: h(["absolute inset-y-0 right-0 px-3 text-xs font-medium cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 rounded-r-lg", A(f).mutedText])
|
|
2348
|
+
}, k(_.value ? "Hide" : "Show"), 11, cr)])]),
|
|
2349
|
+
t.showRemember ? (x(), o("label", {
|
|
2345
2350
|
key: 0,
|
|
2346
|
-
class: h(["flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
2351
|
+
class: h(["flex items-center gap-2 text-sm cursor-pointer select-none", A(f).bodyText])
|
|
2347
2352
|
}, [I(s("input", {
|
|
2348
2353
|
"onUpdate:modelValue": r[4] ||= (e) => g.value = e,
|
|
2349
2354
|
type: "checkbox",
|
|
2350
2355
|
disabled: v.value,
|
|
2351
2356
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2352
|
-
}, null, 8, lr), [[
|
|
2357
|
+
}, null, 8, lr), [[j, g.value]]), r[5] ||= u(" Remember me ", -1)], 2)) : a("", !0),
|
|
2353
2358
|
s("button", {
|
|
2354
2359
|
type: "submit",
|
|
2355
2360
|
disabled: v.value,
|
|
2356
2361
|
"aria-busy": t.loading,
|
|
2357
2362
|
class: "inline-flex items-center justify-center gap-2 w-full h-11 px-4 rounded-lg text-sm font-semibold text-white bg-emerald-600 hover:bg-emerald-700 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed"
|
|
2358
|
-
}, [t.loading ? (
|
|
2363
|
+
}, [t.loading ? (x(), o("svg", dr, [...r[6] ||= [s("circle", {
|
|
2359
2364
|
class: "opacity-25",
|
|
2360
2365
|
cx: "12",
|
|
2361
2366
|
cy: "12",
|
|
@@ -2366,12 +2371,12 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2366
2371
|
class: "opacity-75",
|
|
2367
2372
|
fill: "currentColor",
|
|
2368
2373
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2369
|
-
}, null, -1)]])) : a("", !0), u(" " +
|
|
2374
|
+
}, null, -1)]])) : a("", !0), u(" " + k(t.submitLabel), 1)], 8, ur)
|
|
2370
2375
|
], 32),
|
|
2371
|
-
n.$slots.footer ? (
|
|
2376
|
+
n.$slots.footer ? (x(), o("div", {
|
|
2372
2377
|
key: 3,
|
|
2373
|
-
class: h(["mt-6 text-center text-sm",
|
|
2374
|
-
}, [
|
|
2378
|
+
class: h(["mt-6 text-center text-sm", A(f).mutedText])
|
|
2379
|
+
}, [E(n.$slots, "footer")], 2)) : a("", !0)
|
|
2375
2380
|
], 2));
|
|
2376
2381
|
}
|
|
2377
2382
|
}), pr = ["aria-label"], mr = { class: "flex-1 overflow-y-auto" }, hr = {
|
|
@@ -2389,28 +2394,28 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2389
2394
|
},
|
|
2390
2395
|
emits: ["select"],
|
|
2391
2396
|
setup(c, { emit: l }) {
|
|
2392
|
-
let f = l, { isDark: p } = V(), m = Y(), { notifications: g, unreadCount: _, open: v, closePanel: y, markAllRead:
|
|
2397
|
+
let f = l, { isDark: p } = V(), m = Y(), { notifications: g, unreadCount: _, open: v, closePanel: y, markAllRead: b, markRead: S } = fn(), C = {
|
|
2393
2398
|
info: "bg-sky-500",
|
|
2394
2399
|
success: "bg-emerald-500",
|
|
2395
2400
|
warning: "bg-amber-500",
|
|
2396
2401
|
error: "bg-red-500"
|
|
2397
|
-
},
|
|
2402
|
+
}, w = r(() => g.value.length);
|
|
2398
2403
|
function E(e) {
|
|
2399
2404
|
S(e), f("select", e);
|
|
2400
2405
|
}
|
|
2401
|
-
return
|
|
2406
|
+
return Nt(() => {
|
|
2402
2407
|
v.value && y();
|
|
2403
|
-
}), (r, l) => (
|
|
2408
|
+
}), (r, l) => (x(), i(t, { to: "body" }, [d(n, {
|
|
2404
2409
|
"enter-active-class": "transition-opacity duration-200",
|
|
2405
2410
|
"enter-from-class": "opacity-0",
|
|
2406
2411
|
"leave-active-class": "transition-opacity duration-200",
|
|
2407
2412
|
"leave-to-class": "opacity-0"
|
|
2408
2413
|
}, {
|
|
2409
|
-
default: F(() => [
|
|
2414
|
+
default: F(() => [A(v) ? (x(), o("div", {
|
|
2410
2415
|
key: 0,
|
|
2411
2416
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2412
2417
|
"aria-hidden": "true",
|
|
2413
|
-
onClick: l[0] ||= (...e) =>
|
|
2418
|
+
onClick: l[0] ||= (...e) => A(y) && A(y)(...e)
|
|
2414
2419
|
})) : a("", !0)]),
|
|
2415
2420
|
_: 1
|
|
2416
2421
|
}), d(n, {
|
|
@@ -2419,50 +2424,50 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2419
2424
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2420
2425
|
"leave-to-class": "-translate-x-full"
|
|
2421
2426
|
}, {
|
|
2422
|
-
default: F(() => [
|
|
2427
|
+
default: F(() => [A(v) ? (x(), o("aside", {
|
|
2423
2428
|
key: 0,
|
|
2424
2429
|
role: "dialog",
|
|
2425
2430
|
"aria-modal": "true",
|
|
2426
2431
|
"aria-label": c.title,
|
|
2427
|
-
class: h(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl",
|
|
2432
|
+
class: h(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl", A(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"])
|
|
2428
2433
|
}, [
|
|
2429
|
-
s("div", { class: h(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0",
|
|
2434
|
+
s("div", { class: h(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0", A(m).border]) }, [s("h2", { class: h(["text-lg font-semibold flex items-center gap-2", A(m).primaryText]) }, [u(k(c.title) + " ", 1), s("span", { class: h(["text-sm font-normal", A(m).dimTextAlt]) }, "— " + k(w.value), 3)], 2), s("button", {
|
|
2430
2435
|
type: "button",
|
|
2431
|
-
onClick: l[1] ||= (...e) =>
|
|
2436
|
+
onClick: l[1] ||= (...e) => A(y) && A(y)(...e),
|
|
2432
2437
|
"aria-label": "Close notifications",
|
|
2433
|
-
class: h(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
2434
|
-
}, [d(
|
|
2438
|
+
class: h(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", A(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2439
|
+
}, [d(A(Ce), {
|
|
2435
2440
|
class: "w-5 h-5",
|
|
2436
2441
|
"aria-hidden": "true"
|
|
2437
2442
|
})], 2)], 2),
|
|
2438
|
-
c.showMarkAllRead &&
|
|
2443
|
+
c.showMarkAllRead && A(_) > 0 ? (x(), o("div", {
|
|
2439
2444
|
key: 0,
|
|
2440
|
-
class: h(["px-5 py-2 border-b shrink-0 flex justify-end",
|
|
2445
|
+
class: h(["px-5 py-2 border-b shrink-0 flex justify-end", A(m).border])
|
|
2441
2446
|
}, [s("button", {
|
|
2442
2447
|
type: "button",
|
|
2443
|
-
onClick: l[2] ||= (...e) =>
|
|
2444
|
-
class: h(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline",
|
|
2448
|
+
onClick: l[2] ||= (...e) => A(b) && A(b)(...e),
|
|
2449
|
+
class: h(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", A(m).emeraldText])
|
|
2445
2450
|
}, " Mark all as read ", 2)], 2)) : a("", !0),
|
|
2446
|
-
s("div", mr, [
|
|
2447
|
-
class: h(["w-10 h-10",
|
|
2451
|
+
s("div", mr, [w.value === 0 ? (x(), o("div", hr, [d(A(oe), {
|
|
2452
|
+
class: h(["w-10 h-10", A(m).illustration]),
|
|
2448
2453
|
"aria-hidden": "true"
|
|
2449
|
-
}, null, 8, ["class"]), s("p", { class: h(["text-sm",
|
|
2454
|
+
}, null, 8, ["class"]), s("p", { class: h(["text-sm", A(m).mutedText]) }, k(c.emptyText), 3)])) : (x(), o("ul", {
|
|
2450
2455
|
key: 1,
|
|
2451
|
-
class: h(["divide-y",
|
|
2452
|
-
}, [(
|
|
2456
|
+
class: h(["divide-y", A(p) ? "divide-gray-800" : "divide-gray-100"])
|
|
2457
|
+
}, [(x(!0), o(e, null, T(A(g), (e) => (x(), o("li", { key: e.id }, [s("button", {
|
|
2453
2458
|
type: "button",
|
|
2454
2459
|
onClick: (t) => E(e.id),
|
|
2455
|
-
class: h(["w-full text-left px-5 py-4 flex gap-3 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [e.read ? "" :
|
|
2460
|
+
class: h(["w-full text-left px-5 py-4 flex gap-3 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [e.read ? "" : A(p) ? "bg-emerald-500/5" : "bg-emerald-50/60", A(p) ? "hover:bg-gray-800" : "hover:bg-gray-50"]])
|
|
2456
2461
|
}, [s("span", {
|
|
2457
|
-
class: h(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ?
|
|
2462
|
+
class: h(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? A(p) ? "bg-gray-700" : "bg-gray-300" : C[e.type ?? "info"]]),
|
|
2458
2463
|
"aria-hidden": "true"
|
|
2459
|
-
}, null, 2), s("span", _r, [s("span", vr, [s("span", { class: h(["text-sm truncate", [e.read ? "font-medium" : "font-semibold",
|
|
2464
|
+
}, null, 2), s("span", _r, [s("span", vr, [s("span", { class: h(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", A(m).primaryTextSoft]]) }, k(e.title), 3), e.time ? (x(), o("span", {
|
|
2460
2465
|
key: 0,
|
|
2461
|
-
class: h(["text-xs shrink-0",
|
|
2462
|
-
},
|
|
2466
|
+
class: h(["text-xs shrink-0", A(m).dimText])
|
|
2467
|
+
}, k(e.time), 3)) : a("", !0)]), e.message ? (x(), o("span", {
|
|
2463
2468
|
key: 0,
|
|
2464
|
-
class: h(["mt-0.5 block text-sm",
|
|
2465
|
-
},
|
|
2469
|
+
class: h(["mt-0.5 block text-sm", A(m).mutedText])
|
|
2470
|
+
}, k(e.message), 3)) : a("", !0)])], 10, gr)]))), 128))], 2))])
|
|
2466
2471
|
], 10, pr)) : a("", !0)]),
|
|
2467
2472
|
_: 1
|
|
2468
2473
|
})]));
|
|
@@ -2479,19 +2484,19 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2479
2484
|
emits: ["click"],
|
|
2480
2485
|
setup(e, { emit: t }) {
|
|
2481
2486
|
let n = t, { isDark: r } = V();
|
|
2482
|
-
return (t, i) => (
|
|
2487
|
+
return (t, i) => (x(), o("button", {
|
|
2483
2488
|
type: "button",
|
|
2484
2489
|
disabled: e.disabled,
|
|
2485
|
-
class: h(["inline-flex items-center gap-1 font-medium rounded-md border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [e.size === "xs" ? "text-xs px-2 py-0.5" : "text-xs px-2.5 py-1",
|
|
2490
|
+
class: h(["inline-flex items-center gap-1 font-medium rounded-md border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [e.size === "xs" ? "text-xs px-2 py-0.5" : "text-xs px-2.5 py-1", A(r) ? "text-emerald-300 border-emerald-700 bg-emerald-900/30 hover:bg-emerald-800/50" : "text-emerald-700 border-emerald-200 bg-emerald-50 hover:bg-emerald-100"]]),
|
|
2486
2491
|
onClick: i[0] ||= (e) => n("click")
|
|
2487
|
-
}, [
|
|
2492
|
+
}, [E(t.$slots, "default")], 10, br));
|
|
2488
2493
|
}
|
|
2489
2494
|
}), Sr = /* @__PURE__ */ f({
|
|
2490
2495
|
__name: "BaseRemoveButton",
|
|
2491
2496
|
emits: ["click"],
|
|
2492
2497
|
setup(e, { emit: t }) {
|
|
2493
2498
|
let n = t;
|
|
2494
|
-
return (e, t) => (
|
|
2499
|
+
return (e, t) => (x(), o("button", {
|
|
2495
2500
|
type: "button",
|
|
2496
2501
|
class: "px-2 text-lg leading-none text-red-400 hover:text-red-600 transition-colors cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400 disabled:cursor-not-allowed disabled:text-gray-400 disabled:hover:text-gray-400",
|
|
2497
2502
|
onClick: t[0] ||= (e) => n("click")
|
|
@@ -2521,7 +2526,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2521
2526
|
default: return "bg-gray-400";
|
|
2522
2527
|
}
|
|
2523
2528
|
});
|
|
2524
|
-
return (t, n) => (
|
|
2529
|
+
return (t, n) => (x(), o("div", { class: h(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", i.value]) }, [s("span", Cr, [e.status === "ok" ? (x(), o("span", wr)) : a("", !0), s("span", { class: h(["relative inline-flex rounded-full h-2 w-2", c.value]) }, null, 2)]), u(" " + k(e.label), 1)], 2));
|
|
2525
2530
|
}
|
|
2526
2531
|
}), Er = { class: "text-sm font-medium" }, Dr = [
|
|
2527
2532
|
"accept",
|
|
@@ -2544,7 +2549,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2544
2549
|
},
|
|
2545
2550
|
emits: ["files"],
|
|
2546
2551
|
setup(e, { emit: t }) {
|
|
2547
|
-
let n = e, r = t, { isDark: i } = V(), c =
|
|
2552
|
+
let n = e, r = t, { isDark: i } = V(), c = w(!1);
|
|
2548
2553
|
function l(e) {
|
|
2549
2554
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2550
2555
|
t.value = "", n.length && r("files", n);
|
|
@@ -2557,13 +2562,13 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2557
2562
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
2558
2563
|
t.length && r("files", n.multiple ? t : t.slice(0, 1));
|
|
2559
2564
|
}
|
|
2560
|
-
return (t, n) => (
|
|
2561
|
-
class: h(["flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-10 text-center transition-colors", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", c.value ?
|
|
2565
|
+
return (t, n) => (x(), o("label", {
|
|
2566
|
+
class: h(["flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-10 text-center transition-colors", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", c.value ? A(i) ? "border-emerald-500 text-emerald-400" : "border-emerald-500 text-emerald-600" : A(i) ? "border-gray-700 hover:border-emerald-500 text-gray-400 hover:text-emerald-400" : "border-gray-300 hover:border-emerald-500 text-gray-500 hover:text-emerald-600"]]),
|
|
2562
2567
|
onDragover: L(u, ["prevent"]),
|
|
2563
2568
|
onDragleave: n[0] ||= L((e) => c.value = !1, ["prevent"]),
|
|
2564
2569
|
onDrop: L(d, ["prevent"])
|
|
2565
2570
|
}, [
|
|
2566
|
-
|
|
2571
|
+
E(t.$slots, "icon", {}, () => [n[1] ||= s("svg", {
|
|
2567
2572
|
class: "w-10 h-10",
|
|
2568
2573
|
fill: "none",
|
|
2569
2574
|
viewBox: "0 0 24 24",
|
|
@@ -2575,11 +2580,11 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2575
2580
|
"stroke-linejoin": "round",
|
|
2576
2581
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
2577
2582
|
})], -1)]),
|
|
2578
|
-
s("p", Er,
|
|
2579
|
-
e.hint ? (
|
|
2583
|
+
s("p", Er, k(e.label), 1),
|
|
2584
|
+
e.hint ? (x(), o("p", {
|
|
2580
2585
|
key: 0,
|
|
2581
|
-
class: h(["text-xs",
|
|
2582
|
-
},
|
|
2586
|
+
class: h(["text-xs", A(i) ? "text-gray-500" : "text-gray-400"])
|
|
2587
|
+
}, k(e.hint), 3)) : a("", !0),
|
|
2583
2588
|
s("input", {
|
|
2584
2589
|
type: "file",
|
|
2585
2590
|
class: "hidden",
|
|
@@ -2615,11 +2620,11 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2615
2620
|
let e = i[t.variant];
|
|
2616
2621
|
return n.value ? e.dark : e.light;
|
|
2617
2622
|
}), c = r(() => a[t.size]);
|
|
2618
|
-
return (t, n) => (
|
|
2623
|
+
return (t, n) => (x(), o("pre", { class: h(["font-mono overflow-auto", [
|
|
2619
2624
|
c.value,
|
|
2620
2625
|
s.value,
|
|
2621
2626
|
e.maxHeightClass
|
|
2622
|
-
]]) },
|
|
2627
|
+
]]) }, k(e.code), 3));
|
|
2623
2628
|
}
|
|
2624
2629
|
}), Ar = ["value", "type"], Q = /* @__PURE__ */ f({
|
|
2625
2630
|
__name: "BaseInput",
|
|
@@ -2638,7 +2643,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2638
2643
|
function r(e) {
|
|
2639
2644
|
n("update:modelValue", e.target.value);
|
|
2640
2645
|
}
|
|
2641
|
-
return (t, n) => (
|
|
2646
|
+
return (t, n) => (x(), o("input", {
|
|
2642
2647
|
value: e.modelValue,
|
|
2643
2648
|
type: e.type,
|
|
2644
2649
|
class: h(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm placeholder:text-slate-400 dark:placeholder:text-slate-500 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", e.size === "sm" ? "px-2 py-1.5" : "px-3 py-2"]]),
|
|
@@ -2661,11 +2666,11 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2661
2666
|
function r(e) {
|
|
2662
2667
|
n("update:modelValue", e.target.value);
|
|
2663
2668
|
}
|
|
2664
|
-
return (t, n) => (
|
|
2669
|
+
return (t, n) => (x(), o("select", {
|
|
2665
2670
|
value: e.modelValue,
|
|
2666
2671
|
class: h(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", e.size === "md" ? "px-3 py-2" : "px-2 py-1.5"]]),
|
|
2667
2672
|
onChange: r
|
|
2668
|
-
}, [
|
|
2673
|
+
}, [E(t.$slots, "default")], 42, jr));
|
|
2669
2674
|
}
|
|
2670
2675
|
}), Nr = [
|
|
2671
2676
|
"disabled",
|
|
@@ -2692,23 +2697,23 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2692
2697
|
},
|
|
2693
2698
|
emits: ["update:modelValue"],
|
|
2694
2699
|
setup(t, { emit: n }) {
|
|
2695
|
-
let i = t, c = n, l =
|
|
2700
|
+
let i = t, c = n, l = w(!1), u = w(null), f = r(() => i.options.find((e) => e.value === i.modelValue) ?? null), p = r(() => i.triggerClass ? "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed " + i.triggerClass : "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed rounded-lg border text-sm border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-700 dark:text-slate-100 hover:bg-slate-50 dark:hover:bg-slate-800 " + (i.size === "sm" ? "px-3 py-2" : "px-4 py-2.5"));
|
|
2696
2701
|
function m(e) {
|
|
2697
2702
|
return `block w-full px-4 py-2 text-left text-sm transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500 disabled:opacity-50 disabled:cursor-not-allowed ${e.value === i.modelValue ? "bg-emerald-500 text-white" : "text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800"}`;
|
|
2698
2703
|
}
|
|
2699
|
-
function
|
|
2704
|
+
function g() {
|
|
2700
2705
|
i.disabled || (l.value = !l.value);
|
|
2701
2706
|
}
|
|
2702
2707
|
function y(e) {
|
|
2703
2708
|
e.disabled || (c("update:modelValue", e.value), l.value = !1);
|
|
2704
2709
|
}
|
|
2705
|
-
|
|
2710
|
+
Nt(() => {
|
|
2706
2711
|
l.value = !1;
|
|
2707
2712
|
});
|
|
2708
|
-
function
|
|
2713
|
+
function b(e) {
|
|
2709
2714
|
l.value && u.value && !u.value.contains(e.target) && (l.value = !1);
|
|
2710
2715
|
}
|
|
2711
|
-
return
|
|
2716
|
+
return v(() => document.addEventListener("click", b)), _(() => document.removeEventListener("click", b)), (n, r) => (x(), o("div", {
|
|
2712
2717
|
ref_key: "rootEl",
|
|
2713
2718
|
ref: u,
|
|
2714
2719
|
class: h(t.block ? "relative w-full" : "relative inline-block")
|
|
@@ -2719,16 +2724,16 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2719
2724
|
"aria-label": t.ariaLabel || void 0,
|
|
2720
2725
|
"aria-haspopup": "listbox",
|
|
2721
2726
|
"aria-expanded": l.value,
|
|
2722
|
-
onClick:
|
|
2723
|
-
}, [s("span", { class: h(["min-w-0 truncate", f.value ? "" : "text-slate-400 dark:text-slate-500"]) },
|
|
2727
|
+
onClick: g
|
|
2728
|
+
}, [s("span", { class: h(["min-w-0 truncate", f.value ? "" : "text-slate-400 dark:text-slate-500"]) }, k(f.value ? f.value.label : t.placeholder), 3), d(A(ue), {
|
|
2724
2729
|
class: h(["shrink-0 transition-transform", [t.chevronClass, l.value ? "rotate-180" : ""]]),
|
|
2725
2730
|
"aria-hidden": "true"
|
|
2726
|
-
}, null, 8, ["class"])], 10, Nr), l.value ? (
|
|
2731
|
+
}, null, 8, ["class"])], 10, Nr), l.value ? (x(), o("ul", {
|
|
2727
2732
|
key: 0,
|
|
2728
2733
|
role: "listbox",
|
|
2729
2734
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
2730
2735
|
class: "absolute z-20 mt-1 w-full min-w-max max-w-xs max-h-60 overflow-auto rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 py-1 shadow-lg focus:outline-none"
|
|
2731
|
-
}, [(
|
|
2736
|
+
}, [(x(!0), o(e, null, T(t.options, (e) => (x(), o("li", {
|
|
2732
2737
|
key: String(e.value),
|
|
2733
2738
|
role: "option",
|
|
2734
2739
|
"aria-selected": e.value === t.modelValue,
|
|
@@ -2738,7 +2743,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2738
2743
|
disabled: e.disabled,
|
|
2739
2744
|
class: h(m(e)),
|
|
2740
2745
|
onClick: (t) => y(e)
|
|
2741
|
-
},
|
|
2746
|
+
}, k(e.label), 11, Ir)], 8, Fr))), 128))], 8, Pr)) : a("", !0)], 2));
|
|
2742
2747
|
}
|
|
2743
2748
|
}), Rr = ["role", "aria-label"], zr = [
|
|
2744
2749
|
"aria-pressed",
|
|
@@ -2763,18 +2768,18 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2763
2768
|
let t = e.value === i.modelValue;
|
|
2764
2769
|
return i.optionClass ? i.optionClass(e, t) : t ? l.value : Br;
|
|
2765
2770
|
}
|
|
2766
|
-
return (n, r) => (
|
|
2771
|
+
return (n, r) => (x(), o("div", {
|
|
2767
2772
|
role: t.ariaLabel ? "group" : void 0,
|
|
2768
2773
|
"aria-label": t.ariaLabel || void 0,
|
|
2769
2774
|
class: h(s.value)
|
|
2770
|
-
}, [(
|
|
2775
|
+
}, [(x(!0), o(e, null, T(t.options, (e) => (x(), o("button", {
|
|
2771
2776
|
key: String(e.value),
|
|
2772
2777
|
type: "button",
|
|
2773
2778
|
class: h([c.value, u(e)]),
|
|
2774
2779
|
"aria-pressed": e.value === t.modelValue,
|
|
2775
2780
|
title: e.title,
|
|
2776
2781
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2777
|
-
},
|
|
2782
|
+
}, k(e.label), 11, zr))), 128))], 10, Rr));
|
|
2778
2783
|
}
|
|
2779
2784
|
}), Hr = { class: "w-full text-sm" }, Ur = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, Wr = { class: "text-left" }, Gr = { key: 0 }, Kr = ["colspan"], qr = /* @__PURE__ */ f({
|
|
2780
2785
|
__name: "BaseTable",
|
|
@@ -2787,13 +2792,13 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2787
2792
|
emptyText: { default: "No rows." }
|
|
2788
2793
|
},
|
|
2789
2794
|
setup(t) {
|
|
2790
|
-
return (n, r) => (
|
|
2795
|
+
return (n, r) => (x(), o("table", Hr, [s("thead", Ur, [s("tr", Wr, [(x(!0), o(e, null, T(t.columns, (e, t) => (x(), o("th", {
|
|
2791
2796
|
key: t,
|
|
2792
2797
|
class: h(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2793
|
-
},
|
|
2798
|
+
}, k(e.label), 3))), 128))])]), s("tbody", null, [t.empty ? (x(), o("tr", Gr, [s("td", {
|
|
2794
2799
|
colspan: t.columns.length,
|
|
2795
2800
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2796
|
-
}, [
|
|
2801
|
+
}, [E(n.$slots, "empty", {}, () => [u(k(t.emptyText), 1)])], 8, Kr)])) : a("", !0), E(n.$slots, "default")])]));
|
|
2797
2802
|
}
|
|
2798
2803
|
}), Jr = { class: "grid gap-3 md:grid-cols-2" }, Yr = {
|
|
2799
2804
|
key: 0,
|
|
@@ -2818,40 +2823,57 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2818
2823
|
}
|
|
2819
2824
|
function l(e, t) {
|
|
2820
2825
|
let n = parseFloat(t);
|
|
2821
|
-
|
|
2826
|
+
if (Number.isNaN(n)) {
|
|
2827
|
+
r("update", e.key, t);
|
|
2828
|
+
return;
|
|
2829
|
+
}
|
|
2830
|
+
r("update", e.key, e.type === "integer" ? Math.trunc(n) : n);
|
|
2822
2831
|
}
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2832
|
+
function u(e) {
|
|
2833
|
+
(e.key === "." || e.key === "," || e.key === "e" || e.key === "E") && e.preventDefault();
|
|
2834
|
+
}
|
|
2835
|
+
function d(e) {
|
|
2836
|
+
let t = e.clipboardData?.getData("text") ?? "";
|
|
2837
|
+
/^-?\d*$/.test(t.trim()) || e.preventDefault();
|
|
2838
|
+
}
|
|
2839
|
+
return (n, f) => (x(), o("div", Jr, [(x(!0), o(e, null, T(t.specs, (f) => (x(), o("div", { key: f.key }, [
|
|
2840
|
+
f.type === "boolean" ? a("", !0) : (x(), o("label", Yr, k(f.label), 1)),
|
|
2841
|
+
f.type === "select" ? (x(), i(Mr, {
|
|
2826
2842
|
key: 1,
|
|
2827
|
-
modelValue: String(t.params[
|
|
2828
|
-
"onUpdate:modelValue": (e) => r("update",
|
|
2843
|
+
modelValue: String(t.params[f.key] ?? ""),
|
|
2844
|
+
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
2829
2845
|
}, {
|
|
2830
|
-
default: F(() => [(
|
|
2846
|
+
default: F(() => [(x(!0), o(e, null, T(f.options ?? [], (e) => (x(), o("option", {
|
|
2831
2847
|
key: e,
|
|
2832
2848
|
value: e
|
|
2833
|
-
},
|
|
2849
|
+
}, k(e), 9, Xr))), 128))]),
|
|
2834
2850
|
_: 2
|
|
2835
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) :
|
|
2836
|
-
checked: !!t.params[
|
|
2851
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (x(), o("label", Zr, [s("input", {
|
|
2852
|
+
checked: !!t.params[f.key],
|
|
2837
2853
|
type: "checkbox",
|
|
2838
2854
|
class: "h-4 w-4",
|
|
2839
|
-
onChange: (e) => c(
|
|
2840
|
-
}, null, 40, Qr), s("span", $r,
|
|
2855
|
+
onChange: (e) => c(f.key, e)
|
|
2856
|
+
}, null, 40, Qr), s("span", $r, k(f.label), 1)])) : (x(), i(Q, {
|
|
2841
2857
|
key: 3,
|
|
2842
|
-
modelValue: t.params[
|
|
2858
|
+
modelValue: t.params[f.key],
|
|
2843
2859
|
type: "number",
|
|
2844
|
-
step:
|
|
2845
|
-
min:
|
|
2846
|
-
|
|
2860
|
+
step: f.step ?? (f.type === "integer" ? 1 : .01),
|
|
2861
|
+
min: f.min ?? void 0,
|
|
2862
|
+
inputmode: f.type === "integer" ? "numeric" : void 0,
|
|
2863
|
+
onKeydown: (e) => f.type === "integer" && u(e),
|
|
2864
|
+
onPaste: (e) => f.type === "integer" && d(e),
|
|
2865
|
+
"onUpdate:modelValue": (e) => l(f, e)
|
|
2847
2866
|
}, null, 8, [
|
|
2848
2867
|
"modelValue",
|
|
2849
2868
|
"step",
|
|
2850
2869
|
"min",
|
|
2870
|
+
"inputmode",
|
|
2871
|
+
"onKeydown",
|
|
2872
|
+
"onPaste",
|
|
2851
2873
|
"onUpdate:modelValue"
|
|
2852
2874
|
])),
|
|
2853
|
-
|
|
2854
|
-
|
|
2875
|
+
f.help ? (x(), o("p", ei, k(f.help), 1)) : a("", !0),
|
|
2876
|
+
E(n.$slots, "after", { spec: f })
|
|
2855
2877
|
]))), 128))]));
|
|
2856
2878
|
}
|
|
2857
2879
|
}), ni = { class: "mt-1.5 space-y-0.5 px-1" }, ri = { class: "text-slate-400 dark:text-slate-500" }, ii = /* @__PURE__ */ f({
|
|
@@ -2873,10 +2895,10 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2873
2895
|
function i(e) {
|
|
2874
2896
|
return !n.signed || e == null ? "text-slate-500 dark:text-slate-400" : e >= 0 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400";
|
|
2875
2897
|
}
|
|
2876
|
-
return (n, a) => (
|
|
2898
|
+
return (n, a) => (x(), o("div", ni, [(x(!0), o(e, null, T(t.items, (e) => (x(), o("div", {
|
|
2877
2899
|
key: e.label,
|
|
2878
2900
|
class: "flex items-center justify-between text-[11px]"
|
|
2879
|
-
}, [s("span", ri,
|
|
2901
|
+
}, [s("span", ri, k(e.label), 1), s("span", { class: h(["font-mono tabular-nums font-medium", i(e.value)]) }, k(r(e.value)), 3)]))), 128))]));
|
|
2880
2902
|
}
|
|
2881
2903
|
}), ai = [
|
|
2882
2904
|
"disabled",
|
|
@@ -2911,13 +2933,13 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2911
2933
|
red: "border-red-500 bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-500",
|
|
2912
2934
|
slate: "border-slate-600 bg-slate-600 text-white hover:bg-slate-700 focus-visible:ring-emerald-500"
|
|
2913
2935
|
};
|
|
2914
|
-
return (r, i) => (
|
|
2936
|
+
return (r, i) => (x(), o("button", {
|
|
2915
2937
|
type: "button",
|
|
2916
2938
|
disabled: e.disabled,
|
|
2917
2939
|
title: e.title,
|
|
2918
2940
|
"aria-pressed": e.active,
|
|
2919
2941
|
class: h(["whitespace-nowrap rounded-md border px-3 text-sm font-semibold text-center transition-colors focus:outline-none focus-visible:ring-2 disabled:opacity-50 disabled:cursor-not-allowed", e.active ? n[e.color] : t[e.color]])
|
|
2920
|
-
}, [
|
|
2942
|
+
}, [E(r.$slots, "default", {}, () => [u(k(e.label), 1)])], 10, ai));
|
|
2921
2943
|
}
|
|
2922
2944
|
}), si = { class: "flex items-center justify-between mb-4" }, ci = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, li = {
|
|
2923
2945
|
key: 0,
|
|
@@ -2951,7 +2973,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2951
2973
|
"load-error"
|
|
2952
2974
|
],
|
|
2953
2975
|
setup(t, { expose: n, emit: r }) {
|
|
2954
|
-
let c = t, l = r, f =
|
|
2976
|
+
let c = t, l = r, f = w(!1), p = w(!1), m = S({
|
|
2955
2977
|
keyId: "",
|
|
2956
2978
|
secretKey: "",
|
|
2957
2979
|
baseUrl: c.defaults.baseUrl,
|
|
@@ -2965,20 +2987,20 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2965
2987
|
l("load-error", e instanceof Error ? e.message : "");
|
|
2966
2988
|
}
|
|
2967
2989
|
}
|
|
2968
|
-
function
|
|
2990
|
+
function _(e) {
|
|
2969
2991
|
return !e || !e.trim();
|
|
2970
2992
|
}
|
|
2971
2993
|
async function y() {
|
|
2972
2994
|
if (!f.value) {
|
|
2973
|
-
if (
|
|
2995
|
+
if (_(m.keyId)) {
|
|
2974
2996
|
l("error", c.requiredKeyMessage);
|
|
2975
2997
|
return;
|
|
2976
2998
|
}
|
|
2977
|
-
if (!p.value &&
|
|
2999
|
+
if (!p.value && _(m.secretKey)) {
|
|
2978
3000
|
l("error", c.requiredSecretMessage);
|
|
2979
3001
|
return;
|
|
2980
3002
|
}
|
|
2981
|
-
if (
|
|
3003
|
+
if (_(m.baseUrl) || _(m.dataUrl)) {
|
|
2982
3004
|
l("error", "Base URL and Data URL are required.");
|
|
2983
3005
|
return;
|
|
2984
3006
|
}
|
|
@@ -2986,7 +3008,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2986
3008
|
try {
|
|
2987
3009
|
p.value = (await c.updateFn({
|
|
2988
3010
|
keyId: m.keyId.trim(),
|
|
2989
|
-
secretKey:
|
|
3011
|
+
secretKey: _(m.secretKey) ? void 0 : m.secretKey.trim(),
|
|
2990
3012
|
baseUrl: m.baseUrl.trim(),
|
|
2991
3013
|
dataUrl: m.dataUrl.trim()
|
|
2992
3014
|
})).hasSecret, m.secretKey = "", l("saved", c.savedMessage);
|
|
@@ -2997,14 +3019,14 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
2997
3019
|
}
|
|
2998
3020
|
}
|
|
2999
3021
|
}
|
|
3000
|
-
return
|
|
3022
|
+
return v(g), n({ load: g }), (n, r) => (x(), i(ct, { class: "!p-6" }, {
|
|
3001
3023
|
default: F(() => [
|
|
3002
|
-
s("div", si, [s("div", null, [s("h2", ci,
|
|
3024
|
+
s("div", si, [s("div", null, [s("h2", ci, k(t.title), 1), t.subtitle ? (x(), o("p", li, k(t.subtitle), 1)) : a("", !0)]), f.value ? (x(), o("span", ui, [d(lt, { class: "!h-4 !w-4" }), r[4] ||= u(" Saving… ", -1)])) : a("", !0)]),
|
|
3003
3025
|
s("div", di, [
|
|
3004
3026
|
s("div", fi, [s("label", {
|
|
3005
3027
|
for: `${t.idPrefix}-key-id`,
|
|
3006
3028
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3007
|
-
},
|
|
3029
|
+
}, k(t.keyLabel), 9, pi), d(Q, {
|
|
3008
3030
|
id: `${t.idPrefix}-key-id`,
|
|
3009
3031
|
modelValue: m.keyId,
|
|
3010
3032
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
@@ -3021,7 +3043,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3021
3043
|
s("label", {
|
|
3022
3044
|
for: `${t.idPrefix}-secret`,
|
|
3023
3045
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3024
|
-
},
|
|
3046
|
+
}, k(t.secretLabel), 9, hi),
|
|
3025
3047
|
d(Q, {
|
|
3026
3048
|
id: `${t.idPrefix}-secret`,
|
|
3027
3049
|
modelValue: m.secretKey,
|
|
@@ -3035,7 +3057,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3035
3057
|
"modelValue",
|
|
3036
3058
|
"placeholder"
|
|
3037
3059
|
]),
|
|
3038
|
-
s("p", gi, [p.value ? (
|
|
3060
|
+
s("p", gi, [p.value ? (x(), o(e, { key: 0 }, [u(k(t.secretSetHint), 1)], 64)) : E(n.$slots, "no-secret-hint", { key: 1 }, () => [u(k(t.permissionsHint), 1)])])
|
|
3039
3061
|
]),
|
|
3040
3062
|
s("div", _i, [
|
|
3041
3063
|
s("label", {
|
|
@@ -3049,7 +3071,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3049
3071
|
type: "text",
|
|
3050
3072
|
class: h(Si)
|
|
3051
3073
|
}, null, 8, ["id", "modelValue"]),
|
|
3052
|
-
|
|
3074
|
+
E(n.$slots, "base-url-extra", { form: m })
|
|
3053
3075
|
]),
|
|
3054
3076
|
s("div", yi, [s("label", {
|
|
3055
3077
|
for: `${t.idPrefix}-data-url`,
|
|
@@ -3062,7 +3084,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3062
3084
|
class: h(Si)
|
|
3063
3085
|
}, null, 8, ["id", "modelValue"])]),
|
|
3064
3086
|
s("div", xi, [d(G, {
|
|
3065
|
-
color:
|
|
3087
|
+
color: A(U).GREEN,
|
|
3066
3088
|
description: t.saveLabel,
|
|
3067
3089
|
isDisable: f.value,
|
|
3068
3090
|
isLoading: f.value,
|
|
@@ -3074,7 +3096,7 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3074
3096
|
"isLoading"
|
|
3075
3097
|
])])
|
|
3076
3098
|
]),
|
|
3077
|
-
|
|
3099
|
+
E(n.$slots, "footer")
|
|
3078
3100
|
]),
|
|
3079
3101
|
_: 3
|
|
3080
3102
|
}));
|
|
@@ -3110,11 +3132,11 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3110
3132
|
},
|
|
3111
3133
|
emits: ["pick", "close"],
|
|
3112
3134
|
setup(t, { emit: n }) {
|
|
3113
|
-
let c = t, l = n, u = r(() => c.icon ??
|
|
3135
|
+
let c = t, l = n, u = r(() => c.icon ?? ye), f = w(""), p = w(Mi), m = r(() => c.groups && c.groups.length > 0 ? [{
|
|
3114
3136
|
value: Mi,
|
|
3115
3137
|
label: c.allLabel
|
|
3116
3138
|
}, ...c.groups] : []), g = r(() => c.items.filter((e) => (p.value === Mi || e.group === p.value) && e.label.toLowerCase().includes(f.value.trim().toLowerCase())));
|
|
3117
|
-
return (n, r) => (
|
|
3139
|
+
return (n, r) => (x(), i(Ht, {
|
|
3118
3140
|
title: t.title,
|
|
3119
3141
|
icon: u.value,
|
|
3120
3142
|
subtitle: t.subtitle,
|
|
@@ -3127,8 +3149,8 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3127
3149
|
label: t.closeText,
|
|
3128
3150
|
onClick: r[3] ||= (e) => l("close")
|
|
3129
3151
|
}, null, 8, ["label"])]),
|
|
3130
|
-
default: F(() => [t.items.length === 0 ? (
|
|
3131
|
-
d(
|
|
3152
|
+
default: F(() => [t.items.length === 0 ? (x(), o("p", wi, k(t.emptyMessage), 1)) : (x(), o(e, { key: 1 }, [s("div", Ti, [s("div", Ei, [
|
|
3153
|
+
d(A(ye), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3132
3154
|
I(s("input", {
|
|
3133
3155
|
"onUpdate:modelValue": r[0] ||= (e) => f.value = e,
|
|
3134
3156
|
type: "text",
|
|
@@ -3139,15 +3161,15 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3139
3161
|
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3140
3162
|
t.mono ? "font-mono" : ""
|
|
3141
3163
|
])
|
|
3142
|
-
}, null, 10, Di), [[
|
|
3143
|
-
f.value ? (
|
|
3164
|
+
}, null, 10, Di), [[N, f.value]]),
|
|
3165
|
+
f.value ? (x(), o("button", {
|
|
3144
3166
|
key: 0,
|
|
3145
3167
|
type: "button",
|
|
3146
3168
|
"aria-label": "Clear the filter",
|
|
3147
3169
|
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3148
3170
|
onClick: r[1] ||= (e) => f.value = ""
|
|
3149
3171
|
}, " ✕ ")) : a("", !0)
|
|
3150
|
-
]), m.value.length > 0 ? (
|
|
3172
|
+
]), m.value.length > 0 ? (x(), i(Vr, {
|
|
3151
3173
|
key: 0,
|
|
3152
3174
|
modelValue: p.value,
|
|
3153
3175
|
"onUpdate:modelValue": r[2] ||= (e) => p.value = e,
|
|
@@ -3157,13 +3179,13 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3157
3179
|
"modelValue",
|
|
3158
3180
|
"options",
|
|
3159
3181
|
"aria-label"
|
|
3160
|
-
])) : a("", !0)]), g.value.length === 0 ? (
|
|
3182
|
+
])) : a("", !0)]), g.value.length === 0 ? (x(), o("p", Oi, k(t.noMatchMessage), 1)) : (x(), o("div", ki, [(x(!0), o(e, null, T(g.value, (e) => (x(), o("button", {
|
|
3161
3183
|
key: e.id,
|
|
3162
3184
|
type: "button",
|
|
3163
3185
|
title: e.title,
|
|
3164
3186
|
class: h(["h-8 shrink-0 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 px-3 text-sm text-slate-700 dark:text-slate-200 transition-colors hover:border-emerald-500 hover:bg-emerald-50 hover:text-emerald-700 dark:hover:bg-emerald-500/10 dark:hover:text-emerald-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", t.mono ? "font-mono" : ""]),
|
|
3165
3187
|
onClick: (t) => l("pick", e)
|
|
3166
|
-
},
|
|
3188
|
+
}, k(e.label), 11, Ai))), 128))]))], 64))]),
|
|
3167
3189
|
_: 1
|
|
3168
3190
|
}, 8, [
|
|
3169
3191
|
"title",
|
|
@@ -3172,23 +3194,55 @@ var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }
|
|
|
3172
3194
|
"max-width-class"
|
|
3173
3195
|
]));
|
|
3174
3196
|
}
|
|
3197
|
+
}), Pi = ["aria-label"], Fi = ["title"], Ii = { class: "text-[10px] tabular-nums text-slate-400 dark:text-slate-500" }, Li = ["title"], Ri = /* @__PURE__ */ f({
|
|
3198
|
+
__name: "BaseBarDistribution",
|
|
3199
|
+
props: {
|
|
3200
|
+
bars: {},
|
|
3201
|
+
ariaLabel: { default: "Value distribution" },
|
|
3202
|
+
countNoun: { default: "item" },
|
|
3203
|
+
titlePrefix: { default: "" },
|
|
3204
|
+
maxBarHeight: { default: 56 },
|
|
3205
|
+
barClass: { default: "bg-emerald-500/80 dark:bg-emerald-400/80" }
|
|
3206
|
+
},
|
|
3207
|
+
setup(t) {
|
|
3208
|
+
let n = t, i = r(() => Math.max(1, ...n.bars.map((e) => e.count))), a = (e) => Math.max(3, Math.round(e.count / i.value * n.maxBarHeight)), c = (e) => `${n.titlePrefix ? `${n.titlePrefix} ` : ""}${e.label}: ${e.count} ${n.countNoun}${e.count === 1 ? "" : "s"}`;
|
|
3209
|
+
return (n, r) => (x(), o("div", {
|
|
3210
|
+
class: "flex items-end gap-1.5 overflow-x-auto pb-1",
|
|
3211
|
+
role: "img",
|
|
3212
|
+
"aria-label": t.ariaLabel
|
|
3213
|
+
}, [(x(!0), o(e, null, T(t.bars, (e) => (x(), o("div", {
|
|
3214
|
+
key: e.label,
|
|
3215
|
+
class: "flex min-w-7 flex-1 flex-col items-center gap-0.5",
|
|
3216
|
+
title: c(e)
|
|
3217
|
+
}, [
|
|
3218
|
+
s("span", Ii, k(e.count), 1),
|
|
3219
|
+
s("div", {
|
|
3220
|
+
class: h(["w-full max-w-8 rounded-t", t.barClass]),
|
|
3221
|
+
style: g({ height: `${a(e)}px` })
|
|
3222
|
+
}, null, 6),
|
|
3223
|
+
s("span", {
|
|
3224
|
+
class: "max-w-full truncate font-mono text-[10px] text-slate-500 dark:text-slate-400",
|
|
3225
|
+
title: e.label
|
|
3226
|
+
}, k(e.label), 9, Li)
|
|
3227
|
+
], 8, Fi))), 128))], 8, Pi));
|
|
3228
|
+
}
|
|
3175
3229
|
});
|
|
3176
3230
|
//#endregion
|
|
3177
3231
|
//#region src/composables/useDebounce.ts
|
|
3178
|
-
function
|
|
3179
|
-
let n =
|
|
3232
|
+
function zi(e, t = 300) {
|
|
3233
|
+
let n = w(e.value), r = null;
|
|
3180
3234
|
return P(e, (e) => {
|
|
3181
3235
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
3182
3236
|
n.value = e, r = null;
|
|
3183
3237
|
}, t);
|
|
3184
|
-
}),
|
|
3238
|
+
}), y(() => {
|
|
3185
3239
|
r &&= (clearTimeout(r), null);
|
|
3186
3240
|
}), n;
|
|
3187
3241
|
}
|
|
3188
3242
|
//#endregion
|
|
3189
3243
|
//#region src/composables/useToast.ts
|
|
3190
|
-
function
|
|
3191
|
-
let t =
|
|
3244
|
+
function Bi(e = 3e3) {
|
|
3245
|
+
let t = w(!1), n = w(""), r = w(q.SUCCESS), i = null;
|
|
3192
3246
|
function a() {
|
|
3193
3247
|
i &&= (clearTimeout(i), null);
|
|
3194
3248
|
}
|
|
@@ -3197,7 +3251,7 @@ function Fi(e = 3e3) {
|
|
|
3197
3251
|
t.value = !1, i = null;
|
|
3198
3252
|
}, c);
|
|
3199
3253
|
}
|
|
3200
|
-
return
|
|
3254
|
+
return y(() => {
|
|
3201
3255
|
a();
|
|
3202
3256
|
}), {
|
|
3203
3257
|
showToast: t,
|
|
@@ -3208,8 +3262,8 @@ function Fi(e = 3e3) {
|
|
|
3208
3262
|
}
|
|
3209
3263
|
//#endregion
|
|
3210
3264
|
//#region src/composables/useQueryParamSync.ts
|
|
3211
|
-
function
|
|
3212
|
-
let e =
|
|
3265
|
+
function Vi() {
|
|
3266
|
+
let e = Te(), t = Ee();
|
|
3213
3267
|
function n(t) {
|
|
3214
3268
|
let n = e.query[t];
|
|
3215
3269
|
return typeof n == "string" ? n : "";
|
|
@@ -3230,7 +3284,7 @@ function Ii() {
|
|
|
3230
3284
|
}
|
|
3231
3285
|
//#endregion
|
|
3232
3286
|
//#region src/composables/useFieldClasses.ts
|
|
3233
|
-
function
|
|
3287
|
+
function Hi() {
|
|
3234
3288
|
let { isDark: e } = V(), t = r(() => e.value ? "text-gray-300" : "text-gray-600"), n = r(() => e.value ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:ring-emerald-500 focus:border-emerald-500" : "bg-white border-gray-300 text-gray-800 focus:ring-emerald-500 focus:border-emerald-500");
|
|
3235
3289
|
function i(t) {
|
|
3236
3290
|
return t == null || String(t).trim() === "" ? e.value ? "bg-gray-800 border-red-500 text-gray-100 placeholder-gray-500 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-500/30" : "bg-white border-red-400 text-gray-800 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-400/30" : n.value;
|
|
@@ -3243,41 +3297,47 @@ function Li() {
|
|
|
3243
3297
|
}
|
|
3244
3298
|
//#endregion
|
|
3245
3299
|
//#region src/composables/usePolling.ts
|
|
3246
|
-
function
|
|
3247
|
-
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o =
|
|
3248
|
-
function s() {
|
|
3249
|
-
a !== null || t === null || (a = setInterval(() => void e(), t));
|
|
3250
|
-
}
|
|
3300
|
+
function Ui(e, t, n = {}) {
|
|
3301
|
+
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = w(!1), s = !1;
|
|
3251
3302
|
function c() {
|
|
3252
|
-
a !== null
|
|
3303
|
+
a !== null || t === null || (a = setInterval(() => void e(), t));
|
|
3253
3304
|
}
|
|
3254
3305
|
function l() {
|
|
3255
|
-
|
|
3306
|
+
a !== null && (clearInterval(a), a = null);
|
|
3256
3307
|
}
|
|
3257
3308
|
function u() {
|
|
3258
|
-
o.value = !
|
|
3309
|
+
s = !1, !o.value && (o.value = !0, r && e(), c());
|
|
3259
3310
|
}
|
|
3260
3311
|
function d() {
|
|
3261
|
-
|
|
3312
|
+
s = !1, o.value = !1, l();
|
|
3262
3313
|
}
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3314
|
+
function f() {
|
|
3315
|
+
if (document.visibilityState === "visible") {
|
|
3316
|
+
if (!s) return;
|
|
3317
|
+
s = !1, o.value = !0, e(), c();
|
|
3318
|
+
} else {
|
|
3319
|
+
if (!o.value) return;
|
|
3320
|
+
o.value = !1, l(), s = !0;
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
return v(() => {
|
|
3324
|
+
u(), i && document.addEventListener("visibilitychange", f);
|
|
3325
|
+
}), b(() => {
|
|
3326
|
+
d(), i && document.removeEventListener("visibilitychange", f);
|
|
3267
3327
|
}), {
|
|
3268
|
-
start:
|
|
3269
|
-
stop:
|
|
3270
|
-
active:
|
|
3328
|
+
start: u,
|
|
3329
|
+
stop: d,
|
|
3330
|
+
active: C(o)
|
|
3271
3331
|
};
|
|
3272
3332
|
}
|
|
3273
3333
|
//#endregion
|
|
3274
3334
|
//#region src/enums/BaseBadgeEnum.ts
|
|
3275
|
-
var
|
|
3335
|
+
var Wi = /* @__PURE__ */ function(e) {
|
|
3276
3336
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
3277
3337
|
}({});
|
|
3278
3338
|
//#endregion
|
|
3279
3339
|
//#region src/utils/util.ts
|
|
3280
|
-
function
|
|
3340
|
+
function Gi(e) {
|
|
3281
3341
|
let t = "red";
|
|
3282
3342
|
switch (e) {
|
|
3283
3343
|
case R.ERROR:
|
|
@@ -3295,7 +3355,7 @@ function Bi(e) {
|
|
|
3295
3355
|
}
|
|
3296
3356
|
return t;
|
|
3297
3357
|
}
|
|
3298
|
-
function
|
|
3358
|
+
function Ki(e) {
|
|
3299
3359
|
let t = "red";
|
|
3300
3360
|
switch (e) {
|
|
3301
3361
|
case H.GREEN:
|
|
@@ -3324,14 +3384,14 @@ function Vi(e) {
|
|
|
3324
3384
|
}
|
|
3325
3385
|
//#endregion
|
|
3326
3386
|
//#region src/utils/httpColors.ts
|
|
3327
|
-
var
|
|
3387
|
+
var qi = {
|
|
3328
3388
|
GET: "bg-blue-600",
|
|
3329
3389
|
POST: "bg-emerald-600",
|
|
3330
3390
|
PUT: "bg-amber-600",
|
|
3331
3391
|
DELETE: "bg-red-600",
|
|
3332
3392
|
PATCH: "bg-purple-600",
|
|
3333
3393
|
HEAD: "bg-gray-600"
|
|
3334
|
-
},
|
|
3394
|
+
}, Ji = {
|
|
3335
3395
|
GET: "bg-blue-500",
|
|
3336
3396
|
POST: "bg-green-500",
|
|
3337
3397
|
PUT: "bg-yellow-500",
|
|
@@ -3339,39 +3399,39 @@ var Hi = {
|
|
|
3339
3399
|
PATCH: "bg-purple-500",
|
|
3340
3400
|
HEAD: "bg-gray-500"
|
|
3341
3401
|
};
|
|
3342
|
-
function
|
|
3343
|
-
return e ?
|
|
3402
|
+
function Yi(e) {
|
|
3403
|
+
return e ? qi[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
3344
3404
|
}
|
|
3345
|
-
function
|
|
3346
|
-
return e ?
|
|
3405
|
+
function Xi(e) {
|
|
3406
|
+
return e ? Ji[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
3347
3407
|
}
|
|
3348
|
-
function
|
|
3408
|
+
function Zi(e) {
|
|
3349
3409
|
let t = e ?? 0;
|
|
3350
3410
|
return t >= 200 && t < 300 ? "bg-emerald-600" : t >= 300 && t < 400 ? "bg-blue-600" : t >= 400 && t < 500 ? "bg-amber-600" : t >= 500 ? "bg-red-600" : "bg-gray-600";
|
|
3351
3411
|
}
|
|
3352
|
-
function
|
|
3412
|
+
function Qi(e, t) {
|
|
3353
3413
|
let n = (e || "ANY").toUpperCase();
|
|
3354
3414
|
return n === "GET" ? t ? "bg-blue-500/15 text-blue-400" : "bg-blue-100 text-blue-700" : n === "POST" ? t ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-100 text-emerald-700" : n === "PUT" ? t ? "bg-amber-500/15 text-amber-400" : "bg-amber-100 text-amber-700" : n === "DELETE" ? t ? "bg-red-500/15 text-red-400" : "bg-red-100 text-red-700" : n === "PATCH" ? t ? "bg-purple-500/15 text-purple-400" : "bg-purple-100 text-purple-700" : n === "HEAD" ? t ? "bg-sky-500/15 text-sky-400" : "bg-sky-100 text-sky-700" : t ? "bg-gray-500/15 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3355
3415
|
}
|
|
3356
|
-
function
|
|
3416
|
+
function $i(e, t) {
|
|
3357
3417
|
let n = e ?? 200;
|
|
3358
3418
|
return n >= 200 && n < 300 ? t ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-100 text-emerald-700" : n >= 300 && n < 400 ? t ? "bg-sky-500/15 text-sky-300" : "bg-sky-100 text-sky-700" : n >= 400 && n < 500 ? t ? "bg-amber-500/15 text-amber-300" : "bg-amber-100 text-amber-700" : n >= 500 && n < 600 ? t ? "bg-red-500/15 text-red-300" : "bg-red-100 text-red-700" : t ? "bg-gray-800 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3359
3419
|
}
|
|
3360
|
-
function
|
|
3420
|
+
function ea(e, t) {
|
|
3361
3421
|
let n = e ?? 200;
|
|
3362
3422
|
return t ? n >= 200 && n < 300 ? "bg-green-500/15 text-green-400" : n >= 300 && n < 400 ? "bg-blue-500/15 text-blue-400" : n >= 400 && n < 500 ? "bg-yellow-500/15 text-yellow-400" : "bg-red-500/15 text-red-400" : n >= 200 && n < 300 ? "bg-green-100 text-green-800" : n >= 300 && n < 400 ? "bg-blue-100 text-blue-800" : n >= 400 && n < 500 ? "bg-yellow-100 text-yellow-800" : "bg-red-100 text-red-800";
|
|
3363
3423
|
}
|
|
3364
3424
|
//#endregion
|
|
3365
3425
|
//#region src/utils/kvRows.ts
|
|
3366
|
-
function
|
|
3426
|
+
function ta(e) {
|
|
3367
3427
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
3368
3428
|
}
|
|
3369
|
-
function
|
|
3429
|
+
function na(e) {
|
|
3370
3430
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
3371
3431
|
}
|
|
3372
3432
|
//#endregion
|
|
3373
3433
|
//#region src/utils/sanitizeHtml.ts
|
|
3374
|
-
var
|
|
3434
|
+
var ra = /* @__PURE__ */ new Set([
|
|
3375
3435
|
"A",
|
|
3376
3436
|
"B",
|
|
3377
3437
|
"STRONG",
|
|
@@ -3386,7 +3446,7 @@ var Qi = /* @__PURE__ */ new Set([
|
|
|
3386
3446
|
"LI",
|
|
3387
3447
|
"SPAN",
|
|
3388
3448
|
"DIV"
|
|
3389
|
-
]),
|
|
3449
|
+
]), ia = /* @__PURE__ */ new Set([
|
|
3390
3450
|
"SCRIPT",
|
|
3391
3451
|
"STYLE",
|
|
3392
3452
|
"IFRAME",
|
|
@@ -3394,40 +3454,40 @@ var Qi = /* @__PURE__ */ new Set([
|
|
|
3394
3454
|
"EMBED",
|
|
3395
3455
|
"NOSCRIPT",
|
|
3396
3456
|
"TEMPLATE"
|
|
3397
|
-
]),
|
|
3398
|
-
function
|
|
3457
|
+
]), aa = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
3458
|
+
function oa(e) {
|
|
3399
3459
|
let t = e.trim().toLowerCase();
|
|
3400
3460
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
3401
3461
|
}
|
|
3402
|
-
function
|
|
3462
|
+
function sa(e) {
|
|
3403
3463
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
3404
3464
|
let t = e, n = t.tagName.toUpperCase();
|
|
3405
|
-
if (!
|
|
3406
|
-
|
|
3465
|
+
if (!ra.has(n)) {
|
|
3466
|
+
ia.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
3407
3467
|
return;
|
|
3408
3468
|
}
|
|
3409
|
-
let r =
|
|
3469
|
+
let r = aa[n] ?? /* @__PURE__ */ new Set();
|
|
3410
3470
|
for (let e of Array.from(t.attributes)) {
|
|
3411
3471
|
if (!r.has(e.name.toLowerCase())) {
|
|
3412
3472
|
t.removeAttribute(e.name);
|
|
3413
3473
|
continue;
|
|
3414
3474
|
}
|
|
3415
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
3475
|
+
n === "A" && e.name.toLowerCase() === "href" && !oa(e.value) && t.removeAttribute(e.name);
|
|
3416
3476
|
}
|
|
3417
3477
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
3418
|
-
for (let e of Array.from(t.childNodes))
|
|
3478
|
+
for (let e of Array.from(t.childNodes)) sa(e);
|
|
3419
3479
|
}
|
|
3420
|
-
function
|
|
3480
|
+
function ca(e) {
|
|
3421
3481
|
if (!e) return "";
|
|
3422
3482
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
3423
3483
|
if (!t) return "";
|
|
3424
|
-
for (let e of Array.from(t.childNodes))
|
|
3484
|
+
for (let e of Array.from(t.childNodes)) sa(e);
|
|
3425
3485
|
return t.innerHTML;
|
|
3426
3486
|
}
|
|
3427
3487
|
//#endregion
|
|
3428
3488
|
//#region src/utils/format.ts
|
|
3429
3489
|
var $ = "—";
|
|
3430
|
-
function
|
|
3490
|
+
function la(e, t = 4) {
|
|
3431
3491
|
if (e == null || typeof e == "string" && e.trim() === "") return $;
|
|
3432
3492
|
let n = typeof e == "string" ? Number(e) : e;
|
|
3433
3493
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
@@ -3435,12 +3495,12 @@ function ia(e, t = 4) {
|
|
|
3435
3495
|
maximumFractionDigits: t
|
|
3436
3496
|
}) : $;
|
|
3437
3497
|
}
|
|
3438
|
-
function
|
|
3498
|
+
function ua(e) {
|
|
3439
3499
|
if (e == null || e === "") return $;
|
|
3440
3500
|
let t = new Date(e);
|
|
3441
3501
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
3442
3502
|
}
|
|
3443
|
-
function
|
|
3503
|
+
function da(e) {
|
|
3444
3504
|
return new Date(e).toLocaleString(void 0, {
|
|
3445
3505
|
month: "short",
|
|
3446
3506
|
day: "numeric",
|
|
@@ -3448,13 +3508,13 @@ function oa(e) {
|
|
|
3448
3508
|
minute: "2-digit"
|
|
3449
3509
|
});
|
|
3450
3510
|
}
|
|
3451
|
-
function
|
|
3511
|
+
function fa(e) {
|
|
3452
3512
|
return new Date(e).toLocaleDateString(void 0, {
|
|
3453
3513
|
month: "short",
|
|
3454
3514
|
day: "numeric"
|
|
3455
3515
|
});
|
|
3456
3516
|
}
|
|
3457
|
-
function
|
|
3517
|
+
function pa(e) {
|
|
3458
3518
|
try {
|
|
3459
3519
|
return new Date(e).toLocaleString(void 0, {
|
|
3460
3520
|
year: "numeric",
|
|
@@ -3470,7 +3530,7 @@ function ca(e) {
|
|
|
3470
3530
|
return String(e);
|
|
3471
3531
|
}
|
|
3472
3532
|
}
|
|
3473
|
-
function
|
|
3533
|
+
function ma(e) {
|
|
3474
3534
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
3475
3535
|
let t = Math.abs(e), n = 2;
|
|
3476
3536
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -3478,13 +3538,13 @@ function la(e) {
|
|
|
3478
3538
|
maximumFractionDigits: n
|
|
3479
3539
|
});
|
|
3480
3540
|
}
|
|
3481
|
-
function
|
|
3541
|
+
function ha(e, t = 2) {
|
|
3482
3542
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
3483
3543
|
}
|
|
3484
|
-
function
|
|
3544
|
+
function ga(e) {
|
|
3485
3545
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
3486
3546
|
}
|
|
3487
|
-
function
|
|
3547
|
+
function _a(e) {
|
|
3488
3548
|
if (e == null || e === "") return $;
|
|
3489
3549
|
let t = new Date(e);
|
|
3490
3550
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3493,7 +3553,7 @@ function fa(e) {
|
|
|
3493
3553
|
day: "numeric"
|
|
3494
3554
|
});
|
|
3495
3555
|
}
|
|
3496
|
-
function
|
|
3556
|
+
function va(e) {
|
|
3497
3557
|
if (e == null || e === "") return $;
|
|
3498
3558
|
let t = new Date(e);
|
|
3499
3559
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3504,22 +3564,22 @@ function pa(e) {
|
|
|
3504
3564
|
minute: "2-digit"
|
|
3505
3565
|
});
|
|
3506
3566
|
}
|
|
3507
|
-
function
|
|
3567
|
+
function ya(e) {
|
|
3508
3568
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
3509
3569
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
3510
3570
|
return `= ${t.toFixed(n)} s`;
|
|
3511
3571
|
}
|
|
3512
|
-
function
|
|
3572
|
+
function ba(e) {
|
|
3513
3573
|
return e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB` : "";
|
|
3514
3574
|
}
|
|
3515
|
-
function
|
|
3575
|
+
function xa(e) {
|
|
3516
3576
|
try {
|
|
3517
3577
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
3518
3578
|
} catch {
|
|
3519
3579
|
return e;
|
|
3520
3580
|
}
|
|
3521
3581
|
}
|
|
3522
|
-
function
|
|
3582
|
+
function Sa(e) {
|
|
3523
3583
|
if (e == null) return "";
|
|
3524
3584
|
if (typeof e == "string") return e;
|
|
3525
3585
|
try {
|
|
@@ -3528,14 +3588,14 @@ function _a(e) {
|
|
|
3528
3588
|
return String(e);
|
|
3529
3589
|
}
|
|
3530
3590
|
}
|
|
3531
|
-
function
|
|
3591
|
+
function Ca(e, t = 2) {
|
|
3532
3592
|
if (e == null || !isFinite(e)) return $;
|
|
3533
3593
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
3534
3594
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
3535
3595
|
}
|
|
3536
3596
|
//#endregion
|
|
3537
3597
|
//#region src/utils/validate.ts
|
|
3538
|
-
function
|
|
3598
|
+
function wa(e) {
|
|
3539
3599
|
let t = (e ?? "").trim();
|
|
3540
3600
|
if (!t) return !1;
|
|
3541
3601
|
try {
|
|
@@ -3545,7 +3605,7 @@ function ya(e) {
|
|
|
3545
3605
|
return !1;
|
|
3546
3606
|
}
|
|
3547
3607
|
}
|
|
3548
|
-
function
|
|
3608
|
+
function Ta(e) {
|
|
3549
3609
|
if (!e.trim()) return !0;
|
|
3550
3610
|
try {
|
|
3551
3611
|
return JSON.parse(e), !0;
|
|
@@ -3553,7 +3613,7 @@ function ba(e) {
|
|
|
3553
3613
|
return !1;
|
|
3554
3614
|
}
|
|
3555
3615
|
}
|
|
3556
|
-
function
|
|
3616
|
+
function Ea(e) {
|
|
3557
3617
|
if (!e.trim()) return !0;
|
|
3558
3618
|
try {
|
|
3559
3619
|
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
@@ -3561,7 +3621,7 @@ function xa(e) {
|
|
|
3561
3621
|
return !1;
|
|
3562
3622
|
}
|
|
3563
3623
|
}
|
|
3564
|
-
function
|
|
3624
|
+
function Da(e) {
|
|
3565
3625
|
if (!e.trim()) return !0;
|
|
3566
3626
|
let t = e.replace(/\s+/g, "");
|
|
3567
3627
|
if (!t) return !0;
|
|
@@ -3574,7 +3634,7 @@ function Sa(e) {
|
|
|
3574
3634
|
}
|
|
3575
3635
|
//#endregion
|
|
3576
3636
|
//#region src/utils/specForm.ts
|
|
3577
|
-
function
|
|
3637
|
+
function Oa(e, t) {
|
|
3578
3638
|
let n = {};
|
|
3579
3639
|
if (!e) return n;
|
|
3580
3640
|
for (let r of e) {
|
|
@@ -3583,18 +3643,18 @@ function Ca(e, t) {
|
|
|
3583
3643
|
}
|
|
3584
3644
|
return n;
|
|
3585
3645
|
}
|
|
3586
|
-
function
|
|
3646
|
+
function ka(e, t) {
|
|
3587
3647
|
if (!e) return null;
|
|
3588
3648
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
3589
3649
|
let e = t[n.key], r = e === "" || e == null;
|
|
3590
3650
|
if (n.default === null && r) continue;
|
|
3591
|
-
if (typeof e != "number" || Number.isNaN(e)) return n.label;
|
|
3651
|
+
if (typeof e != "number" || Number.isNaN(e) || n.type === "integer" && !Number.isInteger(e)) return n.label;
|
|
3592
3652
|
}
|
|
3593
3653
|
return null;
|
|
3594
3654
|
}
|
|
3595
3655
|
//#endregion
|
|
3596
3656
|
//#region src/utils/pnl.ts
|
|
3597
|
-
function
|
|
3657
|
+
function Aa(e) {
|
|
3598
3658
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
3599
3659
|
pnlUsd: null,
|
|
3600
3660
|
pnlPct: null
|
|
@@ -3609,4 +3669,4 @@ function Ta(e) {
|
|
|
3609
3669
|
};
|
|
3610
3670
|
}
|
|
3611
3671
|
//#endregion
|
|
3612
|
-
export { R as AlertEnum, Jn as BaseActionButton,
|
|
3672
|
+
export { R as AlertEnum, Jn as BaseActionButton, Me as BaseAlert, zn as BaseAppLayout, Pe as BaseBadge, Wi as BaseBadgeEnum, Ri as BaseBarDistribution, Re as BaseBreadcrumb, G as BaseButton, U as BaseButtonEnum, W as BaseButtonSizeEnum, xr as BaseChipButton, kr as BaseCodeBlock, Gt as BaseCollapsibleSection, Yt as BaseConfirmModal, Xn as BaseCopyButton, Ci as BaseCredentialsForm, Lr as BaseDropdown, In as BaseEntityPickerModal, Or as BaseFileDropzone, oi as BaseFilterChip, er as BaseGoogleSignInButton, Q as BaseInput, Ze as BaseLine, Qe as BaseLoginEnum, fr as BaseLoginForm, et as BaseLogo, K as BaseLogoEnum, st as BaseModal, tt as BaseModalEnum, Ht as BaseModalShell, nn as BaseNotFoundPage, yr as BaseNotificationPanel, Hn as BasePageHeader, Ni as BasePillPickerModal, Sr as BaseRemoveButton, ct as BaseRow, Vr as BaseSegmentedControl, Mr as BaseSelect, Cn as BaseSidebar, ti as BaseSpecFields, lt as BaseSpinner, ii as BaseStatBreakdown, Tr as BaseStatusPill, qr as BaseTable, $t as BaseTextInputModal, ft as BaseToast, q as BaseToastEnum, Gn as BaseToolbarButton, mt as ColoredSquares, H as ColorsEnums, _t as EarningsCard, St as EuroAmount, qe as LineEnum, Dt as Pagination, J as PositioningEnum, Mt as TrendArrow, Oa as buildSpecParams, Aa as computePnL, ka as firstInvalidNumericSpec, ba as fmtBytes, _a as fmtCalendarDate, va as fmtCalendarDateTime, ua as fmtDate, fa as fmtDateShort, da as fmtDateTime, pa as fmtDateTimeMs, Ca as fmtDuration, ya as fmtMsAsSeconds, la as fmtNumber, ha as fmtPct, ma as fmtPrice, ga as fmtUsd, xa as formatJson, Gi as getBaseColor, Ki as getBaseColorOf, ke as initTheme, oa as isSafeHref, wa as isValidAbsoluteUrl, Da as isValidBase64, Ta as isValidJson, Ea as isValidXml, Xi as methodBadgeBright, Yi as methodBadgeSolid, Qi as methodBadgeTinted, na as rowKeyMissing, ta as rowValueMissing, ca as sanitizeHtml, $i as statusBadgeSoft, Zi as statusBadgeSolid, ea as statusBadgeTinted, Sa as stringifyValue, zi as useDebouncedRef, Nt as useEscapeKey, Hi as useFieldClasses, an as useMobileSidebar, fn as useNotifications, Ui as usePolling, Vi as useQueryParamSync, ln as useSidebarCollapse, V as useTheme, Y as useThemeClasses, Bi as useToast };
|