mgv-backoffice 1.41.0 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BaseSelect.vue.d.ts +4 -11
- package/dist/index.d.ts +1 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +1137 -1108
- package/dist/ui-lib.umd.cjs +1 -1
- package/dist/utils/humanize.d.ts +10 -0
- package/package.json +1 -1
- package/src/components/BaseBadge.vue +3 -7
- package/src/components/BaseSelect.test.ts +20 -0
- package/src/components/BaseSelect.vue +16 -3
- package/src/index.ts +1 -0
- package/src/style.css +71 -0
- package/src/utils/humanize.test.ts +35 -0
- package/src/utils/humanize.ts +35 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Text as n, Transition as r,
|
|
2
|
-
import { ArrowDownIcon as se, ArrowRightStartOnRectangleIcon as ce, ArrowUpIcon as le, Bars3Icon as ue, BellIcon as de, CheckCircleIcon as fe, CheckIcon as pe, ChevronDoubleLeftIcon as me, ChevronDoubleRightIcon as he, ChevronDownIcon as ge, ChevronRightIcon as _e, ClipboardDocumentCheckIcon as ve, ClipboardDocumentIcon as ye, DocumentDuplicateIcon as be, ExclamationCircleIcon as xe, ExclamationTriangleIcon as Se, FolderIcon as Ce, InformationCircleIcon as we, MagnifyingGlassIcon as Te, MinusIcon as Ee, MoonIcon as De, SunIcon as Oe, XMarkIcon as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, Transition as r, cloneVNode as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createStaticVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, effectScope as h, guardReactiveProps as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeProps as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, onScopeDispose as w, onUnmounted as T, openBlock as E, reactive as D, readonly as O, ref as k, renderList as A, renderSlot as j, resolveComponent as M, resolveDynamicComponent as N, toDisplayString as P, unref as F, useId as ee, useSlots as te, vModelCheckbox as ne, vModelDynamic as re, vModelText as ie, vShow as ae, watch as I, withCtx as L, withDirectives as R, withKeys as oe, withModifiers as z } from "vue";
|
|
2
|
+
import { ArrowDownIcon as se, ArrowRightStartOnRectangleIcon as ce, ArrowUpIcon as le, Bars3Icon as ue, BellIcon as de, CheckCircleIcon as fe, CheckIcon as pe, ChevronDoubleLeftIcon as me, ChevronDoubleRightIcon as he, ChevronDownIcon as ge, ChevronRightIcon as _e, ClipboardDocumentCheckIcon as ve, ClipboardDocumentIcon as ye, DocumentDuplicateIcon as be, ExclamationCircleIcon as xe, ExclamationTriangleIcon as Se, FolderIcon as Ce, InformationCircleIcon as we, MagnifyingGlassIcon as Te, MinusIcon as Ee, MoonIcon as De, SunIcon as Oe, XMarkIcon as B } from "@heroicons/vue/24/outline";
|
|
3
3
|
import { HomeIcon as ke } from "@heroicons/vue/24/solid";
|
|
4
4
|
import { RouterLink as Ae, useRoute as je, useRouter as Me } from "vue-router";
|
|
5
5
|
import { VueDatePicker as Ne } from "@vuepic/vue-datepicker";
|
|
6
6
|
//#region src/enums/AlertEnum.ts
|
|
7
|
-
var
|
|
7
|
+
var V = /* @__PURE__ */ function(e) {
|
|
8
8
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
9
|
-
}({}),
|
|
9
|
+
}({}), H = k(!1), Pe = !1, U = "mgv-theme";
|
|
10
10
|
function Fe(e) {
|
|
11
11
|
if (Pe) {
|
|
12
|
-
e !==
|
|
12
|
+
e !== U && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${U}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
if (Pe = !0,
|
|
16
|
-
let e = window.localStorage?.getItem(
|
|
17
|
-
e ?
|
|
15
|
+
if (Pe = !0, U = e, typeof window < "u") {
|
|
16
|
+
let e = window.localStorage?.getItem(U);
|
|
17
|
+
e ? H.value = e === "dark" : typeof window.matchMedia == "function" && (H.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
18
18
|
}
|
|
19
|
-
typeof document < "u" &&
|
|
20
|
-
|
|
21
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(
|
|
19
|
+
typeof document < "u" && h(!0).run(() => {
|
|
20
|
+
I(H, (e) => {
|
|
21
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(U, e ? "dark" : "light");
|
|
22
22
|
}, { immediate: !0 });
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function Ie(e) {
|
|
26
|
-
Fe(e?.storageKey ??
|
|
26
|
+
Fe(e?.storageKey ?? U);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
Fe(e?.storageKey ??
|
|
28
|
+
function W(e) {
|
|
29
|
+
Fe(e?.storageKey ?? U);
|
|
30
30
|
function t() {
|
|
31
|
-
|
|
31
|
+
H.value = !H.value;
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
|
-
isDark:
|
|
34
|
+
isDark: H,
|
|
35
35
|
toggleTheme: t
|
|
36
36
|
};
|
|
37
37
|
}
|
|
@@ -40,87 +40,109 @@ function U(e) {
|
|
|
40
40
|
var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
41
41
|
key: 0,
|
|
42
42
|
class: "font-medium"
|
|
43
|
-
}, ze = /* @__PURE__ */
|
|
43
|
+
}, ze = /* @__PURE__ */ m({
|
|
44
44
|
__name: "BaseAlert",
|
|
45
45
|
props: {
|
|
46
46
|
title: { default: "" },
|
|
47
|
-
color: { default:
|
|
47
|
+
color: { default: V.ERROR },
|
|
48
48
|
compact: {
|
|
49
49
|
type: Boolean,
|
|
50
50
|
default: !1
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
setup(e) {
|
|
54
|
-
let t = e, { isDark: n } =
|
|
55
|
-
[
|
|
54
|
+
let t = e, { isDark: n } = W(), r = {
|
|
55
|
+
[V.ERROR]: {
|
|
56
56
|
light: "bg-red-50 border-red-200 text-red-700",
|
|
57
57
|
dark: "bg-red-500/10 border-red-500/30 text-red-300"
|
|
58
58
|
},
|
|
59
|
-
[
|
|
59
|
+
[V.WARNING]: {
|
|
60
60
|
light: "bg-amber-50 border-amber-200 text-amber-700",
|
|
61
61
|
dark: "bg-amber-500/10 border-amber-500/30 text-amber-300"
|
|
62
62
|
},
|
|
63
|
-
[
|
|
63
|
+
[V.SUCCESS]: {
|
|
64
64
|
light: "bg-emerald-50 border-emerald-200 text-emerald-700",
|
|
65
65
|
dark: "bg-emerald-500/10 border-emerald-500/30 text-emerald-300"
|
|
66
66
|
},
|
|
67
|
-
[
|
|
67
|
+
[V.INFO]: {
|
|
68
68
|
light: "bg-sky-50 border-sky-200 text-sky-700",
|
|
69
69
|
dark: "bg-sky-500/10 border-sky-500/30 text-sky-300"
|
|
70
70
|
}
|
|
71
|
-
},
|
|
71
|
+
}, i = a(() => n.value ? r[t.color].dark : r[t.color].light), u = a(() => {
|
|
72
72
|
switch (t.color) {
|
|
73
|
-
case
|
|
74
|
-
case
|
|
75
|
-
case
|
|
73
|
+
case V.SUCCESS: return fe;
|
|
74
|
+
case V.WARNING: return Se;
|
|
75
|
+
case V.INFO: return we;
|
|
76
76
|
default: return xe;
|
|
77
77
|
}
|
|
78
|
-
}), d =
|
|
78
|
+
}), d = a(() => {
|
|
79
79
|
switch (t.color) {
|
|
80
|
-
case
|
|
81
|
-
case
|
|
82
|
-
case
|
|
80
|
+
case V.SUCCESS: return "text-emerald-500";
|
|
81
|
+
case V.WARNING: return "text-amber-500";
|
|
82
|
+
case V.INFO: return "text-sky-500";
|
|
83
83
|
default: return "text-red-500";
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
return (t, n) => (
|
|
86
|
+
return (t, n) => (E(), c("div", {
|
|
87
87
|
role: "alert",
|
|
88
|
-
class:
|
|
89
|
-
}, [(
|
|
90
|
-
class:
|
|
88
|
+
class: y(["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", i.value]])
|
|
89
|
+
}, [(E(), o(N(u.value), {
|
|
90
|
+
class: y(["shrink-0", [e.compact ? "w-4 h-4 mt-px" : "w-5 h-5 mt-0.5", d.value]]),
|
|
91
91
|
"aria-hidden": "true"
|
|
92
|
-
}, null, 8, ["class"])),
|
|
92
|
+
}, null, 8, ["class"])), l("div", Le, [e.title ? (E(), c("p", Re, P(e.title), 1)) : s("", !0), j(t.$slots, "default")])], 2));
|
|
93
93
|
}
|
|
94
|
-
}),
|
|
94
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
95
95
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
96
|
-
}({})
|
|
96
|
+
}({});
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/utils/humanize.ts
|
|
99
|
+
function Be(e) {
|
|
100
|
+
return e == null ? "" : String(e).replace(/_/g, " ");
|
|
101
|
+
}
|
|
102
|
+
function Ve(t, r = []) {
|
|
103
|
+
return t.map((t) => {
|
|
104
|
+
if (t.type === n && typeof t.children == "string") return f(Be(t.children));
|
|
105
|
+
if (t.type === e && Array.isArray(t.children)) {
|
|
106
|
+
let e = i(t);
|
|
107
|
+
return e.children = Ve(t.children, r), e;
|
|
108
|
+
}
|
|
109
|
+
if (typeof t.type == "string" && r.includes(t.type)) {
|
|
110
|
+
let e = i(t);
|
|
111
|
+
return typeof t.children == "string" ? e.children = Be(t.children) : Array.isArray(t.children) && (e.children = Ve(t.children, r)), e;
|
|
112
|
+
}
|
|
113
|
+
return t;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/components/BaseBadge.vue?vue&type=script&setup=true&lang.ts
|
|
118
|
+
var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
97
119
|
__name: "BaseBadge",
|
|
98
120
|
props: { color: {
|
|
99
121
|
type: String,
|
|
100
122
|
required: !1
|
|
101
123
|
} },
|
|
102
124
|
setup(e) {
|
|
103
|
-
let t =
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
},
|
|
112
|
-
return (e, t) =>
|
|
125
|
+
let t = te(), n = a(() => !!t.default), r = () => Ve(t.default?.() ?? []), i = e, o = {
|
|
126
|
+
[G.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
127
|
+
[G.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
128
|
+
[G.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
129
|
+
[G.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
130
|
+
[G.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
131
|
+
[G.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
132
|
+
[G.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
133
|
+
}, l = a(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${i.color && o[i.color] || He}`);
|
|
134
|
+
return (e, t) => n.value ? (E(), c("span", {
|
|
113
135
|
key: 0,
|
|
114
|
-
class:
|
|
115
|
-
}, [
|
|
136
|
+
class: y(l.value)
|
|
137
|
+
}, [p(r)], 2)) : s("", !0);
|
|
116
138
|
}
|
|
117
|
-
}),
|
|
139
|
+
}), We = {
|
|
118
140
|
class: "flex overflow-x-auto px-5 py-3 text-gray-700 border border-slate-200 rounded-xl bg-white shadow-sm dark:bg-slate-900 dark:border-slate-700",
|
|
119
141
|
"aria-label": "Breadcrumb"
|
|
120
|
-
},
|
|
142
|
+
}, Ge = { class: "inline-flex items-center whitespace-nowrap space-x-1 md:space-x-3" }, Ke = {
|
|
121
143
|
class: "inline-flex items-center",
|
|
122
144
|
style: { "margin-left": "0" }
|
|
123
|
-
},
|
|
145
|
+
}, qe = /* @__PURE__ */ m({
|
|
124
146
|
__name: "BaseBreadcrumb",
|
|
125
147
|
props: {
|
|
126
148
|
items: {
|
|
@@ -135,7 +157,7 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
135
157
|
}
|
|
136
158
|
},
|
|
137
159
|
setup(t) {
|
|
138
|
-
let n = t, r =
|
|
160
|
+
let n = t, r = a(() => {
|
|
139
161
|
if (n.items && n.items.length > 0) return n.items;
|
|
140
162
|
let e = (n.path ?? (typeof window < "u" ? window.location.pathname : "/")).split("/").filter((e) => e !== ""), t = "";
|
|
141
163
|
return e.map((e) => (t += "/" + e, {
|
|
@@ -144,41 +166,41 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
144
166
|
}));
|
|
145
167
|
});
|
|
146
168
|
return (t, n) => {
|
|
147
|
-
let i =
|
|
148
|
-
return
|
|
169
|
+
let i = M("router-link");
|
|
170
|
+
return E(), c("nav", We, [l("ol", Ge, [l("li", Ke, [p(i, {
|
|
149
171
|
to: "/",
|
|
150
172
|
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"
|
|
151
173
|
}, {
|
|
152
|
-
default:
|
|
174
|
+
default: L(() => [p(F(ke), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= f(" Home ", -1)]),
|
|
153
175
|
_: 1
|
|
154
|
-
})]), (
|
|
176
|
+
})]), (E(!0), c(e, null, A(r.value, (e, t) => (E(), c("li", {
|
|
155
177
|
key: t,
|
|
156
178
|
class: "inline-flex items-center",
|
|
157
179
|
style: { "margin-left": "0" }
|
|
158
|
-
}, [
|
|
180
|
+
}, [p(F(_e), { class: "h-4 w-4 text-gray-500" }), p(i, {
|
|
159
181
|
to: e.url,
|
|
160
182
|
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"
|
|
161
183
|
}, {
|
|
162
|
-
default:
|
|
184
|
+
default: L(() => [f(P(e.name), 1)]),
|
|
163
185
|
_: 2
|
|
164
186
|
}, 1032, ["to"])]))), 128))])]);
|
|
165
187
|
};
|
|
166
188
|
}
|
|
167
|
-
}),
|
|
189
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
168
190
|
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;
|
|
169
|
-
}({}),
|
|
191
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
170
192
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
171
|
-
}({}),
|
|
193
|
+
}({}), Je = [
|
|
172
194
|
"type",
|
|
173
195
|
"disabled",
|
|
174
196
|
"onClick"
|
|
175
|
-
],
|
|
197
|
+
], Ye = {
|
|
176
198
|
key: 0,
|
|
177
199
|
class: "inline-flex items-center"
|
|
178
|
-
},
|
|
200
|
+
}, Xe = { key: 1 }, Ze = { key: 2 }, Qe = ["type", "disabled"], $e = {
|
|
179
201
|
key: 0,
|
|
180
202
|
class: "inline-flex items-center"
|
|
181
|
-
},
|
|
203
|
+
}, et = { key: 1 }, tt = { key: 2 }, nt = /* @__PURE__ */ m({
|
|
182
204
|
__name: "BaseButton",
|
|
183
205
|
props: {
|
|
184
206
|
description: {
|
|
@@ -188,7 +210,7 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
188
210
|
color: {
|
|
189
211
|
type: String,
|
|
190
212
|
required: !1,
|
|
191
|
-
default:
|
|
213
|
+
default: K.GREEN
|
|
192
214
|
},
|
|
193
215
|
to: {
|
|
194
216
|
type: String,
|
|
@@ -232,141 +254,141 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
232
254
|
}
|
|
233
255
|
},
|
|
234
256
|
setup(e) {
|
|
235
|
-
let { isDark: t } =
|
|
257
|
+
let { isDark: t } = W(), n = e;
|
|
236
258
|
function r() {
|
|
237
259
|
let e = {
|
|
238
|
-
[
|
|
260
|
+
[K.BLUE]: {
|
|
239
261
|
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
240
262
|
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
241
263
|
},
|
|
242
|
-
[
|
|
264
|
+
[K.GREEN]: {
|
|
243
265
|
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
244
266
|
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
245
267
|
},
|
|
246
|
-
[
|
|
268
|
+
[K.EMERALD]: {
|
|
247
269
|
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
248
270
|
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
249
271
|
},
|
|
250
|
-
[
|
|
272
|
+
[K.RED]: {
|
|
251
273
|
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
252
274
|
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
253
275
|
},
|
|
254
|
-
[
|
|
276
|
+
[K.YELLOW]: {
|
|
255
277
|
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
256
278
|
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
257
279
|
},
|
|
258
|
-
[
|
|
280
|
+
[K.PURPLE]: {
|
|
259
281
|
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
260
282
|
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
261
283
|
},
|
|
262
|
-
[
|
|
284
|
+
[K.SKY]: {
|
|
263
285
|
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
264
286
|
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
265
287
|
},
|
|
266
|
-
[
|
|
288
|
+
[K.AMBER]: {
|
|
267
289
|
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
268
290
|
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
269
291
|
},
|
|
270
|
-
[
|
|
292
|
+
[K.GRAY]: {
|
|
271
293
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
272
294
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
273
295
|
},
|
|
274
|
-
[
|
|
296
|
+
[K.DARK]: {
|
|
275
297
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
276
298
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
277
299
|
},
|
|
278
|
-
[
|
|
300
|
+
[K.WHITE]: {
|
|
279
301
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
280
302
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
281
303
|
}
|
|
282
|
-
}, r = e[n.color] ?? e[
|
|
304
|
+
}, r = e[n.color] ?? e[K.BLUE], i = t.value ? r.dark : r.light;
|
|
283
305
|
return n.isDisable || n.isLoading ? `border bg-transparent ${i} opacity-50 cursor-not-allowed` : `focus:outline-none focus-visible:ring-2 focus-visible:ring-current border bg-transparent ${i}`;
|
|
284
306
|
}
|
|
285
307
|
function i() {
|
|
286
308
|
let e = {
|
|
287
|
-
[
|
|
309
|
+
[K.BLUE]: {
|
|
288
310
|
light: "text-blue-600 hover:bg-blue-50",
|
|
289
311
|
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
290
312
|
},
|
|
291
|
-
[
|
|
313
|
+
[K.GREEN]: {
|
|
292
314
|
light: "text-green-600 hover:bg-green-50",
|
|
293
315
|
dark: "text-green-400 hover:bg-green-500/10"
|
|
294
316
|
},
|
|
295
|
-
[
|
|
317
|
+
[K.EMERALD]: {
|
|
296
318
|
light: "text-emerald-600 hover:bg-emerald-50",
|
|
297
319
|
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
298
320
|
},
|
|
299
|
-
[
|
|
321
|
+
[K.SKY]: {
|
|
300
322
|
light: "text-sky-600 hover:bg-sky-50",
|
|
301
323
|
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
302
324
|
},
|
|
303
|
-
[
|
|
325
|
+
[K.RED]: {
|
|
304
326
|
light: "text-red-500 hover:bg-red-50",
|
|
305
327
|
dark: "text-red-400 hover:bg-red-500/10"
|
|
306
328
|
},
|
|
307
|
-
[
|
|
329
|
+
[K.AMBER]: {
|
|
308
330
|
light: "text-amber-700 hover:bg-amber-50",
|
|
309
331
|
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
310
332
|
},
|
|
311
|
-
[
|
|
333
|
+
[K.YELLOW]: {
|
|
312
334
|
light: "text-yellow-600 hover:bg-yellow-50",
|
|
313
335
|
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
314
336
|
},
|
|
315
|
-
[
|
|
337
|
+
[K.PURPLE]: {
|
|
316
338
|
light: "text-purple-600 hover:bg-purple-50",
|
|
317
339
|
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
318
340
|
},
|
|
319
|
-
[
|
|
341
|
+
[K.GRAY]: {
|
|
320
342
|
light: "text-gray-500 hover:bg-gray-100",
|
|
321
343
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
322
344
|
},
|
|
323
|
-
[
|
|
345
|
+
[K.DARK]: {
|
|
324
346
|
light: "text-gray-500 hover:bg-gray-100",
|
|
325
347
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
326
348
|
},
|
|
327
|
-
[
|
|
349
|
+
[K.WHITE]: {
|
|
328
350
|
light: "text-gray-500 hover:bg-gray-100",
|
|
329
351
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
330
352
|
}
|
|
331
|
-
}, r = e[n.color] ?? e[
|
|
353
|
+
}, r = e[n.color] ?? e[K.GRAY], i = t.value ? r.dark : r.light;
|
|
332
354
|
return n.isDisable || n.isLoading ? `bg-transparent ${i} opacity-60 cursor-not-allowed` : `focus:outline-none focus-visible:ring-2 focus-visible:ring-current bg-transparent ${i} cursor-pointer`;
|
|
333
355
|
}
|
|
334
|
-
function
|
|
356
|
+
function a() {
|
|
335
357
|
let e = n.isDisable || n.isLoading, t = "inline-flex items-center transition-colors duration-150";
|
|
336
358
|
e || (t += " cursor-pointer");
|
|
337
359
|
let a;
|
|
338
360
|
switch (n.color) {
|
|
339
|
-
case
|
|
361
|
+
case K.BLUE:
|
|
340
362
|
a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
341
363
|
break;
|
|
342
|
-
case
|
|
364
|
+
case K.WHITE:
|
|
343
365
|
a = e ? "text-gray-900 bg-gray-200 border border-gray-200 cursor-not-allowed" : "focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200";
|
|
344
366
|
break;
|
|
345
|
-
case
|
|
367
|
+
case K.DARK:
|
|
346
368
|
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300";
|
|
347
369
|
break;
|
|
348
|
-
case
|
|
370
|
+
case K.GREEN:
|
|
349
371
|
a = e ? "text-white bg-green-400 cursor-not-allowed" : "focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300";
|
|
350
372
|
break;
|
|
351
|
-
case
|
|
373
|
+
case K.EMERALD:
|
|
352
374
|
a = e ? "text-white bg-emerald-400 cursor-not-allowed" : "focus:outline-none text-white bg-emerald-600 hover:bg-emerald-700 focus:ring-4 focus:ring-emerald-300";
|
|
353
375
|
break;
|
|
354
|
-
case
|
|
376
|
+
case K.RED:
|
|
355
377
|
a = e ? "text-white bg-red-400 cursor-not-allowed" : "focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300";
|
|
356
378
|
break;
|
|
357
|
-
case
|
|
379
|
+
case K.YELLOW:
|
|
358
380
|
a = e ? "text-white bg-yellow-300 cursor-not-allowed" : "focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300";
|
|
359
381
|
break;
|
|
360
|
-
case
|
|
382
|
+
case K.PURPLE:
|
|
361
383
|
a = e ? "text-white bg-purple-400 cursor-not-allowed" : "focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300";
|
|
362
384
|
break;
|
|
363
|
-
case
|
|
385
|
+
case K.SKY:
|
|
364
386
|
a = e ? "text-white bg-sky-400 cursor-not-allowed" : "focus:outline-none text-white bg-sky-600 hover:bg-sky-700 focus:ring-4 focus:ring-sky-300";
|
|
365
387
|
break;
|
|
366
|
-
case
|
|
388
|
+
case K.AMBER:
|
|
367
389
|
a = e ? "text-white bg-amber-300 cursor-not-allowed" : "focus:outline-none text-white bg-amber-500 hover:bg-amber-600 focus:ring-4 focus:ring-amber-300";
|
|
368
390
|
break;
|
|
369
|
-
case
|
|
391
|
+
case K.GRAY:
|
|
370
392
|
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-600 hover:bg-gray-700 focus:ring-4 focus:ring-gray-300";
|
|
371
393
|
break;
|
|
372
394
|
default: a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
@@ -374,109 +396,109 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
374
396
|
n.outline && (a = r()), n.ghost && (a = i());
|
|
375
397
|
let o = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
376
398
|
switch (n.size) {
|
|
377
|
-
case
|
|
399
|
+
case q.EXTRA_SMALL:
|
|
378
400
|
o = "px-3 py-2 text-xs";
|
|
379
401
|
break;
|
|
380
|
-
case
|
|
402
|
+
case q.SMALL:
|
|
381
403
|
o = "px-3 py-2 text-sm";
|
|
382
404
|
break;
|
|
383
|
-
case
|
|
405
|
+
case q.BASE:
|
|
384
406
|
o = "px-5 py-2.5 text-sm";
|
|
385
407
|
break;
|
|
386
|
-
case
|
|
408
|
+
case q.LARGE:
|
|
387
409
|
o = "px-5 py-3 text-base";
|
|
388
410
|
break;
|
|
389
|
-
case
|
|
411
|
+
case q.EXTRA_LARGE: o = "px-6 py-3.5 text-base";
|
|
390
412
|
}
|
|
391
413
|
let s = "rounded-lg";
|
|
392
414
|
return n.isRounded && (s = "rounded-full"), t + " " + o + " " + a + " font-medium " + s;
|
|
393
415
|
}
|
|
394
416
|
return (t, r) => {
|
|
395
|
-
let i =
|
|
396
|
-
return e.to ? (
|
|
417
|
+
let i = M("router-link");
|
|
418
|
+
return e.to ? (E(), o(i, {
|
|
397
419
|
key: 0,
|
|
398
420
|
to: e.to,
|
|
399
421
|
custom: ""
|
|
400
422
|
}, {
|
|
401
|
-
default:
|
|
423
|
+
default: L(({ navigate: i }) => [l("button", {
|
|
402
424
|
type: n.type,
|
|
403
|
-
class:
|
|
425
|
+
class: y(a()),
|
|
404
426
|
disabled: e.isDisable || e.isLoading,
|
|
405
427
|
onClick: i
|
|
406
428
|
}, [
|
|
407
|
-
e.isLoading ? (
|
|
429
|
+
e.isLoading ? (E(), c("div", Ye, [...r[0] ||= [l("svg", {
|
|
408
430
|
"aria-hidden": "true",
|
|
409
431
|
role: "status",
|
|
410
432
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
411
433
|
viewBox: "0 0 100 101",
|
|
412
434
|
fill: "none",
|
|
413
435
|
xmlns: "http://www.w3.org/2000/svg"
|
|
414
|
-
}, [
|
|
436
|
+
}, [l("path", {
|
|
415
437
|
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
416
438
|
fill: "#E5E7EB"
|
|
417
|
-
}),
|
|
439
|
+
}), l("path", {
|
|
418
440
|
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",
|
|
419
441
|
fill: "currentColor"
|
|
420
|
-
})], -1)]])) :
|
|
421
|
-
e.iconLeft ?
|
|
422
|
-
|
|
423
|
-
e.iconLeft ? (
|
|
424
|
-
], 10,
|
|
442
|
+
})], -1)]])) : s("", !0),
|
|
443
|
+
e.iconLeft ? s("", !0) : (E(), c("span", Xe, P(e.description), 1)),
|
|
444
|
+
j(t.$slots, "default"),
|
|
445
|
+
e.iconLeft ? (E(), c("span", Ze, P(e.description), 1)) : s("", !0)
|
|
446
|
+
], 10, Je)]),
|
|
425
447
|
_: 3
|
|
426
|
-
}, 8, ["to"])) : (
|
|
448
|
+
}, 8, ["to"])) : (E(), c("button", {
|
|
427
449
|
key: 1,
|
|
428
450
|
type: n.type,
|
|
429
|
-
class:
|
|
451
|
+
class: y(a()),
|
|
430
452
|
disabled: e.isDisable || e.isLoading
|
|
431
453
|
}, [
|
|
432
|
-
e.isLoading ? (
|
|
454
|
+
e.isLoading ? (E(), c("div", $e, [...r[1] ||= [l("svg", {
|
|
433
455
|
"aria-hidden": "true",
|
|
434
456
|
role: "status",
|
|
435
457
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
436
458
|
viewBox: "0 0 100 101",
|
|
437
459
|
fill: "none",
|
|
438
460
|
xmlns: "http://www.w3.org/2000/svg"
|
|
439
|
-
}, [
|
|
461
|
+
}, [l("path", {
|
|
440
462
|
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
441
463
|
fill: "#E5E7EB"
|
|
442
|
-
}),
|
|
464
|
+
}), l("path", {
|
|
443
465
|
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",
|
|
444
466
|
fill: "currentColor"
|
|
445
|
-
})], -1)]])) :
|
|
446
|
-
e.iconLeft ?
|
|
447
|
-
|
|
448
|
-
e.iconLeft ? (
|
|
449
|
-
], 10,
|
|
467
|
+
})], -1)]])) : s("", !0),
|
|
468
|
+
e.iconLeft ? s("", !0) : (E(), c("span", et, P(e.description), 1)),
|
|
469
|
+
j(t.$slots, "default"),
|
|
470
|
+
e.iconLeft ? (E(), c("span", tt, P(e.description), 1)) : s("", !0)
|
|
471
|
+
], 10, Qe));
|
|
450
472
|
};
|
|
451
473
|
}
|
|
452
|
-
}),
|
|
474
|
+
}), rt = /* @__PURE__ */ function(e) {
|
|
453
475
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
454
|
-
}({}),
|
|
476
|
+
}({}), it = {
|
|
455
477
|
key: 0,
|
|
456
478
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
457
|
-
},
|
|
479
|
+
}, at = {
|
|
458
480
|
key: 1,
|
|
459
481
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
460
|
-
},
|
|
482
|
+
}, ot = {
|
|
461
483
|
key: 2,
|
|
462
484
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
463
|
-
},
|
|
485
|
+
}, st = /* @__PURE__ */ m({
|
|
464
486
|
__name: "BaseLine",
|
|
465
487
|
props: { mode: {
|
|
466
488
|
type: String,
|
|
467
489
|
required: !1,
|
|
468
|
-
default:
|
|
490
|
+
default: rt.BASE
|
|
469
491
|
} },
|
|
470
492
|
setup(t) {
|
|
471
|
-
return (n, r) => (
|
|
472
|
-
t.mode ===
|
|
473
|
-
t.mode ===
|
|
474
|
-
t.mode ===
|
|
493
|
+
return (n, r) => (E(), c(e, null, [
|
|
494
|
+
t.mode === F(rt).BASE ? (E(), c("hr", it)) : s("", !0),
|
|
495
|
+
t.mode === F(rt).BASE_SHORTER ? (E(), c("hr", at)) : s("", !0),
|
|
496
|
+
t.mode === F(rt).SQUARE ? (E(), c("hr", ot)) : s("", !0)
|
|
475
497
|
], 64));
|
|
476
498
|
}
|
|
477
499
|
}), J = /* @__PURE__ */ function(e) {
|
|
478
500
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
479
|
-
}({}),
|
|
501
|
+
}({}), ct = J, lt = ["height", "width"], ut = ["id"], dt = ["id", "href"], ft = ["id", "href"], pt = ["id", "href"], mt = ["id", "href"], ht = ["id", "href"], gt = ["id", "href"], _t = ["id", "href"], vt = ["id", "href"], yt = ["id", "href"], bt = ["id"], xt = ["fill"], St = ["fill"], Ct = ["fill"], wt = ["fill"], Tt = ["fill"], Et = ["fill"], Dt = ["fill"], Ot = ["fill"], kt = ["fill"], At = ["fill"], jt = /* @__PURE__ */ m({
|
|
480
502
|
__name: "BaseLogo",
|
|
481
503
|
props: { size: {
|
|
482
504
|
type: String,
|
|
@@ -499,26 +521,26 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
499
521
|
return e;
|
|
500
522
|
}
|
|
501
523
|
return (e, n) => {
|
|
502
|
-
let i =
|
|
503
|
-
return
|
|
524
|
+
let i = M("router-link");
|
|
525
|
+
return E(), o(i, {
|
|
504
526
|
to: "/",
|
|
505
527
|
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
506
528
|
}, {
|
|
507
|
-
default:
|
|
529
|
+
default: L(() => [(E(), c("svg", {
|
|
508
530
|
height: r(),
|
|
509
531
|
width: r(),
|
|
510
532
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
511
533
|
xmlns: "http://www.w3.org/2000/svg",
|
|
512
534
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
513
535
|
}, [
|
|
514
|
-
|
|
536
|
+
l("linearGradient", { id: `${t}-a` }, [...n[0] ||= [l("stop", {
|
|
515
537
|
offset: ".085",
|
|
516
538
|
"stop-color": "#469e43"
|
|
517
|
-
}, null, -1),
|
|
539
|
+
}, null, -1), l("stop", {
|
|
518
540
|
offset: "1",
|
|
519
541
|
"stop-color": "#132d13"
|
|
520
|
-
}, null, -1)]], 8,
|
|
521
|
-
|
|
542
|
+
}, null, -1)]], 8, ut),
|
|
543
|
+
l("linearGradient", {
|
|
522
544
|
id: `${t}-b`,
|
|
523
545
|
gradientUnits: "userSpaceOnUse",
|
|
524
546
|
x1: "64.863",
|
|
@@ -526,8 +548,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
526
548
|
href: `#${t}-a`,
|
|
527
549
|
y1: "288.291",
|
|
528
550
|
y2: "369.4"
|
|
529
|
-
}, null, 8,
|
|
530
|
-
|
|
551
|
+
}, null, 8, dt),
|
|
552
|
+
l("linearGradient", {
|
|
531
553
|
id: `${t}-c`,
|
|
532
554
|
gradientUnits: "userSpaceOnUse",
|
|
533
555
|
x1: "138.367",
|
|
@@ -535,8 +557,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
535
557
|
href: `#${t}-a`,
|
|
536
558
|
y1: "308.454",
|
|
537
559
|
y2: "370.601"
|
|
538
|
-
}, null, 8,
|
|
539
|
-
|
|
560
|
+
}, null, 8, ft),
|
|
561
|
+
l("linearGradient", {
|
|
540
562
|
id: `${t}-d`,
|
|
541
563
|
gradientUnits: "userSpaceOnUse",
|
|
542
564
|
x1: "195.475",
|
|
@@ -544,8 +566,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
544
566
|
href: `#${t}-a`,
|
|
545
567
|
y1: "288.291",
|
|
546
568
|
y2: "369.85"
|
|
547
|
-
}, null, 8,
|
|
548
|
-
|
|
569
|
+
}, null, 8, pt),
|
|
570
|
+
l("linearGradient", {
|
|
549
571
|
id: `${t}-e`,
|
|
550
572
|
gradientUnits: "userSpaceOnUse",
|
|
551
573
|
x1: "249.634",
|
|
@@ -553,8 +575,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
553
575
|
href: `#${t}-a`,
|
|
554
576
|
y1: "307.312",
|
|
555
577
|
y2: "369.511"
|
|
556
|
-
}, null, 8,
|
|
557
|
-
|
|
578
|
+
}, null, 8, mt),
|
|
579
|
+
l("linearGradient", {
|
|
558
580
|
id: `${t}-f`,
|
|
559
581
|
gradientUnits: "userSpaceOnUse",
|
|
560
582
|
x1: "302.884",
|
|
@@ -562,8 +584,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
562
584
|
href: `#${t}-a`,
|
|
563
585
|
y1: "288.291",
|
|
564
586
|
y2: "367.857"
|
|
565
|
-
}, null, 8,
|
|
566
|
-
|
|
587
|
+
}, null, 8, ht),
|
|
588
|
+
l("linearGradient", {
|
|
567
589
|
id: `${t}-g`,
|
|
568
590
|
gradientUnits: "userSpaceOnUse",
|
|
569
591
|
x1: "354.118",
|
|
@@ -571,8 +593,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
571
593
|
href: `#${t}-a`,
|
|
572
594
|
y1: "307.312",
|
|
573
595
|
y2: "369.511"
|
|
574
|
-
}, null, 8,
|
|
575
|
-
|
|
596
|
+
}, null, 8, gt),
|
|
597
|
+
l("linearGradient", {
|
|
576
598
|
id: `${t}-h`,
|
|
577
599
|
gradientUnits: "userSpaceOnUse",
|
|
578
600
|
x1: "428.02",
|
|
@@ -580,8 +602,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
580
602
|
href: `#${t}-a`,
|
|
581
603
|
y1: "306.156",
|
|
582
604
|
y2: "367.742"
|
|
583
|
-
}, null, 8,
|
|
584
|
-
|
|
605
|
+
}, null, 8, _t),
|
|
606
|
+
l("linearGradient", {
|
|
585
607
|
id: `${t}-i`,
|
|
586
608
|
gradientUnits: "userSpaceOnUse",
|
|
587
609
|
x1: "502.066",
|
|
@@ -589,8 +611,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
589
611
|
href: `#${t}-a`,
|
|
590
612
|
y1: "288.291",
|
|
591
613
|
y2: "369.4"
|
|
592
|
-
}, null, 8,
|
|
593
|
-
|
|
614
|
+
}, null, 8, vt),
|
|
615
|
+
l("linearGradient", {
|
|
594
616
|
id: `${t}-j`,
|
|
595
617
|
gradientUnits: "userSpaceOnUse",
|
|
596
618
|
x1: "283.264",
|
|
@@ -598,79 +620,79 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
598
620
|
href: `#${t}-a`,
|
|
599
621
|
y1: "131.629",
|
|
600
622
|
y2: "232.559"
|
|
601
|
-
}, null, 8,
|
|
602
|
-
|
|
623
|
+
}, null, 8, yt),
|
|
624
|
+
l("linearGradient", {
|
|
603
625
|
id: `${t}-k`,
|
|
604
626
|
gradientUnits: "userSpaceOnUse",
|
|
605
627
|
x1: "283.46",
|
|
606
628
|
x2: "283.46",
|
|
607
629
|
y1: "202.275",
|
|
608
630
|
y2: "183.785"
|
|
609
|
-
}, [...n[1] ||= [
|
|
631
|
+
}, [...n[1] ||= [l("stop", {
|
|
610
632
|
offset: "0",
|
|
611
633
|
"stop-color": "#969799",
|
|
612
634
|
"stop-opacity": "0"
|
|
613
|
-
}, null, -1),
|
|
635
|
+
}, null, -1), l("stop", {
|
|
614
636
|
offset: "1",
|
|
615
637
|
"stop-color": "#808183"
|
|
616
|
-
}, null, -1)]], 8,
|
|
617
|
-
|
|
638
|
+
}, null, -1)]], 8, bt),
|
|
639
|
+
l("path", {
|
|
618
640
|
d: "m65 307.2c-6.8 0-13.1 2.2-18.2 5.9v-24.8h-13.2v81.1h31.4c17.2 0 31.1-13.9 31.1-31.1s-13.9-31.1-31.1-31.1zm0 49.3h-18.2v-18.2c0-10.1 8.2-18.2 18.2-18.2 10.1 0 18.2 8.2 18.2 18.2.1 10.1-8.1 18.2-18.2 18.2z",
|
|
619
641
|
fill: `url(#${t}-b)`
|
|
620
|
-
}, null, 8,
|
|
621
|
-
|
|
642
|
+
}, null, 8, xt),
|
|
643
|
+
l("path", {
|
|
622
644
|
d: "m168.8 343.9h-46.7c1.4 7.1 6.6 12 14.1 12.7 6.4.6 12.9.1 19.9.1v11.9c-15.2 4.9-33.3.5-42.1-10.4-3.8-4.7-17.3-34.7 11.5-47.4 39-11.4 45.3 22.4 43.3 33.1zm-14.2-12.7c-1.7-8.1-8.8-12.9-17.9-12.3-7.6.5-14 5.8-14.5 12.3z",
|
|
623
645
|
fill: `url(#${t}-c)`
|
|
624
|
-
}, null, 8,
|
|
625
|
-
|
|
646
|
+
}, null, 8, St),
|
|
647
|
+
l("path", {
|
|
626
648
|
d: "m195.5 320.2c0 10.5-.2 20 .1 29.6.2 5.8 4.4 8.4 13.2 8.6v10.5c-13.8 3.9-26.2-4.5-26.4-18-.2-18.7-.1-43.9-.1-62.6h14.1l-.3 18.5 12.7-.1v13.4h-13.3z",
|
|
627
649
|
fill: `url(#${t}-d)`
|
|
628
|
-
}, null, 8,
|
|
629
|
-
|
|
650
|
+
}, null, 8, Ct),
|
|
651
|
+
l("path", {
|
|
630
652
|
d: "m249.6 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
631
653
|
fill: `url(#${t}-e)`
|
|
632
|
-
}, null, 8,
|
|
633
|
-
|
|
654
|
+
}, null, 8, wt),
|
|
655
|
+
l("path", {
|
|
634
656
|
d: "m296.4 288.3h13v79.6h-13z",
|
|
635
657
|
fill: `url(#${t}-f)`
|
|
636
|
-
}, null, 8,
|
|
637
|
-
|
|
658
|
+
}, null, 8, Tt),
|
|
659
|
+
l("path", {
|
|
638
660
|
d: "m354.1 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
639
661
|
fill: `url(#${t}-g)`
|
|
640
|
-
}, null, 8,
|
|
641
|
-
|
|
662
|
+
}, null, 8, Et),
|
|
663
|
+
l("path", {
|
|
642
664
|
d: "m442.2 367.7c0-12.3.2-23.6 0-34.9-.2-3.4-3.6-13.8-14.1-13.4-10.3-.3-14.4 10-14.3 12.7.1 10.2.5 35.1.5 35.1l-13.6.1s-.3-25.7.2-36.2c.6-14.1 12.7-25 27.5-25 14.7 0 26.2 10.4 26.7 24.9.4 10.4.5 36.3.5 36.3z",
|
|
643
665
|
fill: `url(#${t}-h)`
|
|
644
|
-
}, null, 8,
|
|
645
|
-
|
|
666
|
+
}, null, 8, Dt),
|
|
667
|
+
l("path", {
|
|
646
668
|
d: "m501.9 307.2c6.8 0 13.1 2.2 18.2 5.9v-24.8h13.2v81.1h-31.4c-17.2 0-31.1-13.9-31.1-31.1s13.9-31.1 31.1-31.1zm0 49.3h18.2v-18.2c0-10.1-8.2-18.2-18.2-18.2-10.1 0-18.2 8.2-18.2 18.2 0 10.1 8.1 18.2 18.2 18.2z",
|
|
647
669
|
fill: `url(#${t}-i)`
|
|
648
|
-
}, null, 8,
|
|
649
|
-
|
|
670
|
+
}, null, 8, Ot),
|
|
671
|
+
l("path", {
|
|
650
672
|
d: "m309.2 180.6h-24v-24c0-12.6 10.2-24.1 22.8-25 14.8-1 27.1 11.3 26.1 26.1-.8 12.7-12.3 22.9-24.9 22.9zm-50.7-48.9c-14.8-1-27.1 11.3-26.1 26.1.8 12.6 12.4 22.8 25 22.8h23.9v-24c0-12.6-10.3-24.1-22.8-24.9zm50.7 51.9h-24v23.9c0 12.6 10.2 24.1 22.8 25 14.8 1 27.1-11.3 26.1-26.1-.8-12.6-12.3-22.8-24.9-22.8zm-52.4 0c-14 0-25.3 11.8-24.4 26 .8 12.2 10.7 22.1 22.9 22.9 14.2.9 26-10.4 26-24.4v-24.5z",
|
|
651
673
|
fill: `url(#${t}-j)`
|
|
652
|
-
}, null, 8,
|
|
653
|
-
|
|
674
|
+
}, null, 8, kt),
|
|
675
|
+
l("path", {
|
|
654
676
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
655
677
|
fill: `url(#${t}-k)`
|
|
656
|
-
}, null, 8,
|
|
657
|
-
], 8,
|
|
678
|
+
}, null, 8, At)
|
|
679
|
+
], 8, lt))]),
|
|
658
680
|
_: 1
|
|
659
681
|
});
|
|
660
682
|
};
|
|
661
683
|
}
|
|
662
|
-
}),
|
|
684
|
+
}), Mt = /* @__PURE__ */ function(e) {
|
|
663
685
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
664
|
-
}({}),
|
|
686
|
+
}({}), Nt = {
|
|
665
687
|
key: 0,
|
|
666
688
|
class: "p-6 text-center"
|
|
667
|
-
},
|
|
689
|
+
}, Pt = { class: "flex justify-center" }, Ft = {
|
|
668
690
|
key: 1,
|
|
669
691
|
class: "p-6 text-center"
|
|
670
|
-
},
|
|
692
|
+
}, It = {
|
|
671
693
|
key: 0,
|
|
672
694
|
class: "mb-5 text-sm text-gray-500"
|
|
673
|
-
},
|
|
695
|
+
}, Lt = { class: "flex justify-center" }, Rt = /* @__PURE__ */ m({
|
|
674
696
|
__name: "BaseModal",
|
|
675
697
|
props: {
|
|
676
698
|
title: {
|
|
@@ -689,7 +711,7 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
689
711
|
mode: {
|
|
690
712
|
type: String,
|
|
691
713
|
required: !1,
|
|
692
|
-
default:
|
|
714
|
+
default: Mt.SUCCESS
|
|
693
715
|
}
|
|
694
716
|
},
|
|
695
717
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -698,49 +720,49 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
698
720
|
function a(e) {
|
|
699
721
|
e.key === "Escape" && r("closeModal");
|
|
700
722
|
}
|
|
701
|
-
return
|
|
723
|
+
return C(() => {
|
|
702
724
|
document.addEventListener("keydown", a);
|
|
703
|
-
}),
|
|
725
|
+
}), T(() => {
|
|
704
726
|
document.removeEventListener("keydown", a);
|
|
705
|
-
}), (n, r) => (
|
|
727
|
+
}), (n, r) => (E(), c(e, null, [l("div", {
|
|
706
728
|
class: "fixed inset-0 w-full h-screen bg-black/75 z-40",
|
|
707
729
|
onClick: r[0] ||= (e) => n.$emit("closeModal")
|
|
708
|
-
}),
|
|
730
|
+
}), l("div", {
|
|
709
731
|
class: "fixed top-[20vh] left-1/2 -translate-x-1/2 w-96 z-50 rounded-xl shadow-lg bg-white overflow-hidden",
|
|
710
732
|
role: "dialog",
|
|
711
733
|
"aria-modal": "true",
|
|
712
734
|
"aria-labelledby": i
|
|
713
|
-
}, [t.mode ===
|
|
714
|
-
|
|
715
|
-
|
|
735
|
+
}, [t.mode === F(Mt).DELETE ? (E(), c("div", Nt, [
|
|
736
|
+
p(F(xe), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
737
|
+
l("h3", {
|
|
716
738
|
id: i,
|
|
717
739
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
718
|
-
}, " Are you sure you want to delete this " +
|
|
719
|
-
|
|
720
|
-
color:
|
|
740
|
+
}, " Are you sure you want to delete this " + P(t.title) + "? ", 1),
|
|
741
|
+
l("div", Pt, [p(nt, {
|
|
742
|
+
color: F(K).RED,
|
|
721
743
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
722
744
|
description: "Yes, I'm sure"
|
|
723
|
-
}, null, 8, ["color"]),
|
|
724
|
-
color:
|
|
745
|
+
}, null, 8, ["color"]), p(nt, {
|
|
746
|
+
color: F(K).WHITE,
|
|
725
747
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
726
748
|
description: "No, cancel"
|
|
727
749
|
}, null, 8, ["color"])])
|
|
728
|
-
])) : (
|
|
729
|
-
|
|
730
|
-
|
|
750
|
+
])) : (E(), c("div", Ft, [
|
|
751
|
+
p(F(fe), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
752
|
+
l("h3", {
|
|
731
753
|
id: i,
|
|
732
754
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
733
|
-
},
|
|
734
|
-
t.description ? (
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
color:
|
|
755
|
+
}, P(t.title), 1),
|
|
756
|
+
t.description ? (E(), c("p", It, P(t.description), 1)) : s("", !0),
|
|
757
|
+
j(n.$slots, "default"),
|
|
758
|
+
l("div", Lt, [p(nt, {
|
|
759
|
+
color: F(K).BLUE,
|
|
738
760
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
739
761
|
description: "OK"
|
|
740
762
|
}, null, 8, ["color"])])
|
|
741
763
|
]))])], 64));
|
|
742
764
|
}
|
|
743
|
-
}),
|
|
765
|
+
}), zt = /* @__PURE__ */ m({
|
|
744
766
|
__name: "BaseRow",
|
|
745
767
|
props: { bgColor: {
|
|
746
768
|
type: String,
|
|
@@ -752,21 +774,21 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
752
774
|
function n() {
|
|
753
775
|
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
754
776
|
}
|
|
755
|
-
return (e, t) => (
|
|
777
|
+
return (e, t) => (E(), c("div", { class: y(n()) }, [j(e.$slots, "default")], 2));
|
|
756
778
|
}
|
|
757
|
-
}),
|
|
779
|
+
}), Bt = /* @__PURE__ */ m({
|
|
758
780
|
__name: "BaseSpinner",
|
|
759
781
|
props: {
|
|
760
782
|
size: { default: "sm" },
|
|
761
783
|
color: { default: "emerald" }
|
|
762
784
|
},
|
|
763
785
|
setup(e) {
|
|
764
|
-
let t = e, n =
|
|
786
|
+
let t = e, n = a(() => ({
|
|
765
787
|
sm: "w-4 h-4 border-2",
|
|
766
788
|
md: "w-6 h-6 border-2",
|
|
767
789
|
lg: "w-8 h-8 border-4",
|
|
768
790
|
xl: "w-12 h-12 border-4"
|
|
769
|
-
})[t.size]), r =
|
|
791
|
+
})[t.size]), r = a(() => ({
|
|
770
792
|
blue: "border-t-blue-500",
|
|
771
793
|
emerald: "border-t-emerald-500",
|
|
772
794
|
sky: "border-t-sky-500",
|
|
@@ -776,8 +798,8 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
776
798
|
red: "border-t-red-500",
|
|
777
799
|
amber: "border-t-amber-500"
|
|
778
800
|
})[t.color]);
|
|
779
|
-
return (e, t) => (
|
|
780
|
-
class:
|
|
801
|
+
return (e, t) => (E(), c("div", {
|
|
802
|
+
class: y(["border-gray-200 dark:border-slate-700 rounded-full animate-spin", [n.value, r.value]]),
|
|
781
803
|
role: "status",
|
|
782
804
|
"aria-label": "Loading"
|
|
783
805
|
}, null, 2));
|
|
@@ -786,7 +808,7 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
786
808
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
787
809
|
}({}), X = /* @__PURE__ */ function(e) {
|
|
788
810
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
789
|
-
}({}),
|
|
811
|
+
}({}), Vt = { 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" }, Ht = { class: "ml-3 text-sm font-normal" }, Ut = /* @__PURE__ */ m({
|
|
790
812
|
__name: "BaseToast",
|
|
791
813
|
props: {
|
|
792
814
|
mode: {
|
|
@@ -814,13 +836,13 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
814
836
|
}
|
|
815
837
|
},
|
|
816
838
|
setup(e) {
|
|
817
|
-
let t = e, n =
|
|
839
|
+
let t = e, n = k(!0), r = null;
|
|
818
840
|
function i() {
|
|
819
841
|
n.value = !1, r &&= (clearTimeout(r), null);
|
|
820
842
|
}
|
|
821
|
-
|
|
843
|
+
C(() => {
|
|
822
844
|
r = setTimeout(() => n.value = !1, t.duration);
|
|
823
|
-
}),
|
|
845
|
+
}), T(() => {
|
|
824
846
|
r && clearTimeout(r);
|
|
825
847
|
});
|
|
826
848
|
function a() {
|
|
@@ -839,7 +861,7 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
839
861
|
}
|
|
840
862
|
return "inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg " + e;
|
|
841
863
|
}
|
|
842
|
-
function
|
|
864
|
+
function o() {
|
|
843
865
|
let e = "top-5 right-5";
|
|
844
866
|
switch (t.positioning) {
|
|
845
867
|
case X.BOTTOM_LEFT:
|
|
@@ -855,33 +877,33 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
855
877
|
}
|
|
856
878
|
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
|
|
857
879
|
}
|
|
858
|
-
return (t, r) => n.value ? (
|
|
880
|
+
return (t, r) => n.value ? (E(), c("div", {
|
|
859
881
|
key: 0,
|
|
860
882
|
id: "toast-top-right",
|
|
861
|
-
class:
|
|
883
|
+
class: y(o()),
|
|
862
884
|
role: "alert"
|
|
863
|
-
}, [
|
|
864
|
-
e.mode ==
|
|
885
|
+
}, [l("div", Vt, [
|
|
886
|
+
e.mode == F(Y).ERROR ? (E(), c("div", {
|
|
865
887
|
key: 0,
|
|
866
|
-
class:
|
|
867
|
-
}, [
|
|
888
|
+
class: y(a())
|
|
889
|
+
}, [p(F(xe), { class: "h-6 w-6 text-red-500" }), r[0] ||= l("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == F(Y).SUCCESS ? (E(), c("div", {
|
|
868
890
|
key: 1,
|
|
869
|
-
class:
|
|
870
|
-
}, [
|
|
891
|
+
class: y(a())
|
|
892
|
+
}, [p(F(fe), { class: "h-6 w-6 text-green-500" }), r[1] ||= l("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == F(Y).WARNING ? (E(), c("div", {
|
|
871
893
|
key: 2,
|
|
872
|
-
class:
|
|
873
|
-
}, [
|
|
874
|
-
|
|
875
|
-
e.hasCloseIcon ? (
|
|
894
|
+
class: y(a())
|
|
895
|
+
}, [p(F(Se), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= l("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : s("", !0),
|
|
896
|
+
l("div", Ht, P(e.description), 1),
|
|
897
|
+
e.hasCloseIcon ? (E(), c("button", {
|
|
876
898
|
key: 3,
|
|
877
899
|
type: "button",
|
|
878
900
|
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",
|
|
879
901
|
"aria-label": "Close",
|
|
880
902
|
onClick: i
|
|
881
|
-
}, [r[3] ||=
|
|
882
|
-
])], 2)) :
|
|
903
|
+
}, [r[3] ||= l("span", { class: "sr-only" }, "Close", -1), p(F(B), { class: "h-6 w-6 text-gray-500" })])) : s("", !0)
|
|
904
|
+
])], 2)) : s("", !0);
|
|
883
905
|
}
|
|
884
|
-
}),
|
|
906
|
+
}), Wt = { class: "w-13" }, Gt = /* @__PURE__ */ m({
|
|
885
907
|
__name: "ColoredSquares",
|
|
886
908
|
props: { color: {
|
|
887
909
|
type: String,
|
|
@@ -898,29 +920,29 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
898
920
|
"bg-yellow-300",
|
|
899
921
|
"bg-purple-300",
|
|
900
922
|
"bg-pink-300"
|
|
901
|
-
], r =
|
|
923
|
+
], r = k(n[Math.floor(Math.random() * n.length)]);
|
|
902
924
|
function i() {
|
|
903
925
|
let e = "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full", n = "gray";
|
|
904
926
|
switch (t.color) {
|
|
905
|
-
case
|
|
927
|
+
case G.GREEN:
|
|
906
928
|
n = "green";
|
|
907
929
|
break;
|
|
908
|
-
case
|
|
930
|
+
case G.RED:
|
|
909
931
|
n = "red";
|
|
910
932
|
break;
|
|
911
|
-
case
|
|
933
|
+
case G.BLUE:
|
|
912
934
|
n = "blue";
|
|
913
935
|
break;
|
|
914
|
-
case
|
|
936
|
+
case G.YELLOW:
|
|
915
937
|
n = "yellow";
|
|
916
938
|
break;
|
|
917
|
-
case
|
|
939
|
+
case G.NONE: return e;
|
|
918
940
|
}
|
|
919
941
|
return e + " bg-" + n + "-100 text-" + n + "-800";
|
|
920
942
|
}
|
|
921
|
-
return (e, t) => (
|
|
943
|
+
return (e, t) => (E(), c("div", Wt, [l("div", { class: y(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [j(e.$slots, "default"), l("div", { class: y(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
922
944
|
}
|
|
923
|
-
}),
|
|
945
|
+
}), Kt = { class: "flex items-start justify-between" }, qt = { class: "min-w-0" }, Jt = /* @__PURE__ */ m({
|
|
924
946
|
__name: "EarningsCard",
|
|
925
947
|
props: {
|
|
926
948
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -965,34 +987,34 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
965
987
|
iconBox: "bg-red-50 dark:bg-red-900/30",
|
|
966
988
|
icon: "text-red-500"
|
|
967
989
|
}
|
|
968
|
-
},
|
|
990
|
+
}, i = a(() => {
|
|
969
991
|
let e = Number(n.amount);
|
|
970
992
|
return Number.isFinite(e) ? e : 0;
|
|
971
|
-
}),
|
|
993
|
+
}), o = a(() => n.signed && i.value < 0), u = a(() => o.value ? "red" : n.accent), d = a(() => r[u.value]), f = a(() => n.currency + i.value.toLocaleString("en-US", {
|
|
972
994
|
minimumFractionDigits: n.decimals,
|
|
973
995
|
maximumFractionDigits: n.decimals
|
|
974
996
|
}));
|
|
975
|
-
return (n, r) => (
|
|
997
|
+
return (n, r) => (E(), c("div", { class: y(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (E(), c("div", {
|
|
976
998
|
key: 0,
|
|
977
|
-
class:
|
|
978
|
-
},
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
]),
|
|
983
|
-
class:
|
|
999
|
+
class: y(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
1000
|
+
}, P(t.badge), 3)) : s("", !0), l("div", Kt, [l("div", qt, [
|
|
1001
|
+
l("p", { class: y(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, P(t.title), 3),
|
|
1002
|
+
l("p", { class: y(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, P(f.value), 3),
|
|
1003
|
+
l("p", { class: y(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, P(t.subtitle), 3)
|
|
1004
|
+
]), l("div", { class: y(["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"]]) }, [(E(), c("svg", {
|
|
1005
|
+
class: y([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
984
1006
|
viewBox: "0 0 24 24",
|
|
985
1007
|
fill: "none",
|
|
986
1008
|
stroke: "currentColor",
|
|
987
1009
|
"stroke-width": "2.5",
|
|
988
1010
|
"stroke-linecap": "round",
|
|
989
1011
|
"stroke-linejoin": "round"
|
|
990
|
-
}, [
|
|
1012
|
+
}, [o.value ? (E(), c(e, { key: 0 }, [r[0] ||= l("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= l("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (E(), c(e, { key: 1 }, [r[2] ||= l("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= l("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
991
1013
|
}
|
|
992
|
-
}),
|
|
1014
|
+
}), Yt = {
|
|
993
1015
|
key: 0,
|
|
994
1016
|
class: "font-bold text-green-800 dark:text-green-400"
|
|
995
|
-
},
|
|
1017
|
+
}, Xt = { key: 0 }, Zt = { key: 0 }, Qt = "font-bold", $t = /* @__PURE__ */ m({
|
|
996
1018
|
__name: "EuroAmount",
|
|
997
1019
|
props: {
|
|
998
1020
|
amount: {
|
|
@@ -1011,21 +1033,21 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
1011
1033
|
}
|
|
1012
1034
|
},
|
|
1013
1035
|
setup(t) {
|
|
1014
|
-
let n = t, r =
|
|
1015
|
-
return (n, i) => (
|
|
1036
|
+
let n = t, r = a(() => n.amount !== null && n.amount !== void 0), i = a(() => r.value && n.amount < 0), o = a(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), l = a(() => i.value || o.value), u = a(() => !i.value && !o.value && n.beforeAmount !== null && n.beforeAmount !== void 0);
|
|
1037
|
+
return (n, i) => (E(), c(e, null, [r.value && u.value ? (E(), c("span", Yt, [f(P(t.amount) + " ", 1), t.showCurrency ? (E(), c("span", Xt, "€")) : s("", !0)])) : s("", !0), r.value && !u.value ? (E(), c("span", {
|
|
1016
1038
|
key: 1,
|
|
1017
|
-
class:
|
|
1018
|
-
}, [
|
|
1039
|
+
class: y([Qt, l.value ? "text-red-800 dark:text-red-400" : "text-gray-800 dark:text-gray-200"])
|
|
1040
|
+
}, [f(P(t.amount) + " ", 1), t.showCurrency ? (E(), c("span", Zt, "€")) : s("", !0)], 2)) : s("", !0)], 64));
|
|
1019
1041
|
}
|
|
1020
|
-
}),
|
|
1042
|
+
}), en = { "aria-label": "Pagination" }, tn = { class: "flex list-none p-0 m-0" }, nn = [
|
|
1021
1043
|
"aria-current",
|
|
1022
1044
|
"aria-label",
|
|
1023
1045
|
"onClick"
|
|
1024
|
-
],
|
|
1046
|
+
], rn = {
|
|
1025
1047
|
key: 1,
|
|
1026
1048
|
"aria-hidden": "true",
|
|
1027
1049
|
class: "inline-block border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-not-allowed"
|
|
1028
|
-
},
|
|
1050
|
+
}, an = /* @__PURE__ */ m({
|
|
1029
1051
|
__name: "Pagination",
|
|
1030
1052
|
props: {
|
|
1031
1053
|
totalItems: {
|
|
@@ -1039,7 +1061,7 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
1039
1061
|
},
|
|
1040
1062
|
emits: ["page-changed"],
|
|
1041
1063
|
setup(t, { emit: n }) {
|
|
1042
|
-
let r = t, i =
|
|
1064
|
+
let r = t, i = k(1), a = k(0), o = k([]), s = n;
|
|
1043
1065
|
function u(e) {
|
|
1044
1066
|
if (a.value <= 5) {
|
|
1045
1067
|
o.value = Array.from({ length: a.value }, (e, t) => t + 1);
|
|
@@ -1051,33 +1073,33 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
1051
1073
|
r < a.value && (r < a.value - 1 && t.push(0), t.push(a.value)), o.value = t;
|
|
1052
1074
|
}
|
|
1053
1075
|
function d(e) {
|
|
1054
|
-
e === i.value || e < 1 || e > a.value || (i.value = e, u(e),
|
|
1076
|
+
e === i.value || e < 1 || e > a.value || (i.value = e, u(e), s("page-changed", e));
|
|
1055
1077
|
}
|
|
1056
|
-
return
|
|
1078
|
+
return I(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1057
1079
|
let e = Number(r.itemsPerPage) > 0 ? Number(r.itemsPerPage) : 20, t = Number(r.totalItems) > 0 ? Number(r.totalItems) : 0;
|
|
1058
1080
|
a.value = Math.ceil(t / e), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1059
|
-
}, { immediate: !0 }), (t, n) => (
|
|
1081
|
+
}, { immediate: !0 }), (t, n) => (E(), c("nav", en, [l("ul", tn, [(E(!0), c(e, null, A(o.value, (e, t) => (E(), c("li", {
|
|
1060
1082
|
key: t,
|
|
1061
1083
|
class: "mr-1"
|
|
1062
|
-
}, [e === 0 ? (
|
|
1084
|
+
}, [e === 0 ? (E(), c("span", rn, "...")) : (E(), c("button", {
|
|
1063
1085
|
key: 0,
|
|
1064
1086
|
type: "button",
|
|
1065
1087
|
"aria-current": e === i.value ? "page" : void 0,
|
|
1066
1088
|
"aria-label": `Go to page ${e}`,
|
|
1067
1089
|
onClick: (t) => d(e),
|
|
1068
|
-
class:
|
|
1069
|
-
},
|
|
1090
|
+
class: y(["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 }])
|
|
1091
|
+
}, P(e), 11, nn))]))), 128))])]));
|
|
1070
1092
|
}
|
|
1071
|
-
}),
|
|
1093
|
+
}), on = { key: 0 }, sn = {
|
|
1072
1094
|
key: 0,
|
|
1073
1095
|
class: "flex items-center space-x-2"
|
|
1074
|
-
},
|
|
1096
|
+
}, cn = {
|
|
1075
1097
|
key: 1,
|
|
1076
1098
|
class: "flex items-center space-x-2"
|
|
1077
|
-
},
|
|
1099
|
+
}, ln = {
|
|
1078
1100
|
key: 2,
|
|
1079
1101
|
class: "flex items-center space-x-2"
|
|
1080
|
-
},
|
|
1102
|
+
}, un = /* @__PURE__ */ m({
|
|
1081
1103
|
__name: "TrendArrow",
|
|
1082
1104
|
props: {
|
|
1083
1105
|
number: {
|
|
@@ -1090,58 +1112,58 @@ var Le = { class: "min-w-0 flex-1" }, Re = {
|
|
|
1090
1112
|
}
|
|
1091
1113
|
},
|
|
1092
1114
|
setup(e) {
|
|
1093
|
-
let t = e, n =
|
|
1094
|
-
return (i, a) => e.number !== null && e.number !== void 0 ? (
|
|
1095
|
-
default:
|
|
1115
|
+
let t = e, n = a(() => t.number !== null && t.number !== void 0 && t.number < 0), r = a(() => t.number === 0);
|
|
1116
|
+
return (i, a) => e.number !== null && e.number !== void 0 ? (E(), c("div", on, [n.value ? (E(), c("span", sn, [p(Ue, { color: F(G).RED }, {
|
|
1117
|
+
default: L(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1096
1118
|
_: 1
|
|
1097
|
-
}, 8, ["color"]),
|
|
1098
|
-
default:
|
|
1119
|
+
}, 8, ["color"]), p(F(se), { class: "h-5 w-5 text-red-500" })])) : r.value ? (E(), c("span", cn, [p(Ue, { color: F(G).GRAY }, {
|
|
1120
|
+
default: L(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1099
1121
|
_: 1
|
|
1100
|
-
}, 8, ["color"]),
|
|
1101
|
-
default:
|
|
1122
|
+
}, 8, ["color"]), p(F(Ee), { class: "h-5 w-5 text-gray-400" })])) : (E(), c("span", ln, [p(Ue, { color: F(G).GREEN }, {
|
|
1123
|
+
default: L(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1102
1124
|
_: 1
|
|
1103
|
-
}, 8, ["color"]),
|
|
1125
|
+
}, 8, ["color"]), p(F(le), { class: "h-5 w-5 text-green-500" })]))])) : s("", !0);
|
|
1104
1126
|
}
|
|
1105
1127
|
});
|
|
1106
1128
|
//#endregion
|
|
1107
1129
|
//#region src/composables/useThemeClasses.ts
|
|
1108
1130
|
function Z() {
|
|
1109
|
-
let { isDark: e } =
|
|
1110
|
-
return
|
|
1111
|
-
card:
|
|
1112
|
-
cardAlt:
|
|
1113
|
-
pageBg:
|
|
1114
|
-
border:
|
|
1115
|
-
divider:
|
|
1116
|
-
primaryText:
|
|
1117
|
-
primaryTextSoft:
|
|
1118
|
-
bodyText:
|
|
1119
|
-
label:
|
|
1120
|
-
mutedText:
|
|
1121
|
-
subtleText:
|
|
1122
|
-
dimText:
|
|
1123
|
-
dimTextAlt:
|
|
1124
|
-
illustration:
|
|
1125
|
-
input:
|
|
1126
|
-
inputWithPlaceholder:
|
|
1127
|
-
ghostButton:
|
|
1128
|
-
emeraldText:
|
|
1129
|
-
amberText:
|
|
1130
|
-
amberTextStrong:
|
|
1131
|
-
redText:
|
|
1131
|
+
let { isDark: e } = W();
|
|
1132
|
+
return D({
|
|
1133
|
+
card: a(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1134
|
+
cardAlt: a(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
1135
|
+
pageBg: a(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
1136
|
+
border: a(() => e.value ? "border-gray-700" : "border-gray-200"),
|
|
1137
|
+
divider: a(() => e.value ? "border-gray-800" : "border-gray-100"),
|
|
1138
|
+
primaryText: a(() => e.value ? "text-white" : "text-gray-900"),
|
|
1139
|
+
primaryTextSoft: a(() => e.value ? "text-gray-100" : "text-gray-800"),
|
|
1140
|
+
bodyText: a(() => e.value ? "text-gray-200" : "text-gray-700"),
|
|
1141
|
+
label: a(() => e.value ? "text-gray-300" : "text-gray-700"),
|
|
1142
|
+
mutedText: a(() => e.value ? "text-gray-400" : "text-gray-600"),
|
|
1143
|
+
subtleText: a(() => e.value ? "text-gray-500" : "text-gray-600"),
|
|
1144
|
+
dimText: a(() => e.value ? "text-gray-500" : "text-gray-400"),
|
|
1145
|
+
dimTextAlt: a(() => e.value ? "text-gray-400" : "text-gray-500"),
|
|
1146
|
+
illustration: a(() => e.value ? "text-gray-600" : "text-gray-300"),
|
|
1147
|
+
input: a(() => e.value ? "bg-gray-700 border-gray-600 text-white" : "bg-gray-50 border-gray-300 text-gray-900"),
|
|
1148
|
+
inputWithPlaceholder: a(() => e.value ? "bg-gray-700 border-gray-600 text-white placeholder-gray-400" : "bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"),
|
|
1149
|
+
ghostButton: a(() => e.value ? "bg-gray-800 text-gray-200 border-gray-600 hover:bg-gray-700" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),
|
|
1150
|
+
emeraldText: a(() => e.value ? "text-emerald-400" : "text-emerald-600"),
|
|
1151
|
+
amberText: a(() => e.value ? "text-amber-400" : "text-amber-600"),
|
|
1152
|
+
amberTextStrong: a(() => e.value ? "text-amber-300" : "text-amber-700"),
|
|
1153
|
+
redText: a(() => e.value ? "text-red-400" : "text-red-500")
|
|
1132
1154
|
});
|
|
1133
1155
|
}
|
|
1134
1156
|
//#endregion
|
|
1135
1157
|
//#region src/composables/useEscapeKey.ts
|
|
1136
|
-
function
|
|
1158
|
+
function dn(e) {
|
|
1137
1159
|
function t(t) {
|
|
1138
1160
|
t.key === "Escape" && e();
|
|
1139
1161
|
}
|
|
1140
|
-
|
|
1162
|
+
C(() => document.addEventListener("keydown", t)), S(() => document.removeEventListener("keydown", t));
|
|
1141
1163
|
}
|
|
1142
1164
|
//#endregion
|
|
1143
1165
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1144
|
-
var
|
|
1166
|
+
var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-w-0" }, mn = { class: "p-6 overflow-y-auto flex-1" }, hn = { class: "p-6" }, gn = { class: "flex items-start gap-4" }, _n = { class: "flex-1" }, vn = { class: "mt-4" }, yn = { class: "mt-6 flex gap-3 justify-end" }, bn = /* @__PURE__ */ m({
|
|
1145
1167
|
__name: "BaseModalShell",
|
|
1146
1168
|
props: {
|
|
1147
1169
|
title: {},
|
|
@@ -1161,55 +1183,55 @@ var ln = { class: "flex items-start gap-4 min-w-0" }, un = { class: "flex-1 min-
|
|
|
1161
1183
|
},
|
|
1162
1184
|
emits: ["cancel", "backdrop"],
|
|
1163
1185
|
setup(e, { emit: n }) {
|
|
1164
|
-
let r = e,
|
|
1186
|
+
let r = e, i = n, { isDark: u } = W(), d = Z(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = a(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200"), m = a(() => r.iconBgClass || (u.value ? "bg-emerald-900/30" : "bg-emerald-50"));
|
|
1165
1187
|
function h() {
|
|
1166
|
-
|
|
1188
|
+
i("backdrop"), r.manualClose || i("cancel");
|
|
1167
1189
|
}
|
|
1168
|
-
return
|
|
1169
|
-
r.manualClose ||
|
|
1170
|
-
}), (n, r) => (
|
|
1190
|
+
return dn(() => {
|
|
1191
|
+
r.manualClose || i("cancel");
|
|
1192
|
+
}), (n, r) => (E(), o(t, { to: "body" }, [l("div", {
|
|
1171
1193
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
1172
1194
|
role: "dialog",
|
|
1173
1195
|
"aria-modal": "true",
|
|
1174
1196
|
"aria-labelledby": f,
|
|
1175
1197
|
onClick: h
|
|
1176
|
-
}, [e.scrollable ? (
|
|
1198
|
+
}, [e.scrollable ? (E(), c("div", {
|
|
1177
1199
|
key: 0,
|
|
1178
|
-
class:
|
|
1179
|
-
onClick: r[0] ||=
|
|
1200
|
+
class: y(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1201
|
+
onClick: r[0] ||= z(() => {}, ["stop"])
|
|
1180
1202
|
}, [
|
|
1181
|
-
|
|
1182
|
-
class:
|
|
1203
|
+
l("div", { class: y(["flex items-start justify-between gap-4 p-6 border-b shrink-0", F(d).border]) }, [l("div", fn, [j(n.$slots, "icon", {}, () => [l("div", { class: y(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(E(), o(N(e.icon), {
|
|
1204
|
+
class: y(["h-6 w-6", e.iconClass]),
|
|
1183
1205
|
"aria-hidden": "true"
|
|
1184
|
-
}, null, 8, ["class"]))], 2)]),
|
|
1206
|
+
}, null, 8, ["class"]))], 2)]), l("div", pn, [l("h3", {
|
|
1185
1207
|
id: f,
|
|
1186
|
-
class:
|
|
1187
|
-
},
|
|
1208
|
+
class: y(["text-lg font-medium", F(d).primaryText])
|
|
1209
|
+
}, P(e.title), 3), e.subtitle ? (E(), c("p", {
|
|
1188
1210
|
key: 0,
|
|
1189
|
-
class:
|
|
1190
|
-
},
|
|
1191
|
-
|
|
1192
|
-
n.$slots.footer ? (
|
|
1211
|
+
class: y(["text-sm mt-1 break-all", F(d).mutedText])
|
|
1212
|
+
}, P(e.subtitle), 3)) : s("", !0)])]), j(n.$slots, "header-actions")], 2),
|
|
1213
|
+
l("div", mn, [j(n.$slots, "default")]),
|
|
1214
|
+
n.$slots.footer ? (E(), c("div", {
|
|
1193
1215
|
key: 0,
|
|
1194
|
-
class:
|
|
1195
|
-
}, [
|
|
1196
|
-
], 2)) : (
|
|
1216
|
+
class: y(["flex gap-3 justify-end p-6 border-t shrink-0", F(d).border])
|
|
1217
|
+
}, [j(n.$slots, "footer")], 2)) : s("", !0)
|
|
1218
|
+
], 2)) : (E(), c("div", {
|
|
1197
1219
|
key: 1,
|
|
1198
|
-
class:
|
|
1199
|
-
onClick: r[1] ||=
|
|
1200
|
-
}, [
|
|
1201
|
-
|
|
1202
|
-
class:
|
|
1220
|
+
class: y(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1221
|
+
onClick: r[1] ||= z(() => {}, ["stop"])
|
|
1222
|
+
}, [l("div", hn, [
|
|
1223
|
+
l("div", gn, [j(n.$slots, "icon", {}, () => [l("div", { class: y(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(E(), o(N(e.icon), {
|
|
1224
|
+
class: y(["h-6 w-6", e.iconClass]),
|
|
1203
1225
|
"aria-hidden": "true"
|
|
1204
|
-
}, null, 8, ["class"]))], 2)]),
|
|
1226
|
+
}, null, 8, ["class"]))], 2)]), l("div", _n, [l("h3", {
|
|
1205
1227
|
id: f,
|
|
1206
|
-
class:
|
|
1207
|
-
},
|
|
1208
|
-
|
|
1209
|
-
|
|
1228
|
+
class: y(["text-lg font-medium", F(d).primaryText])
|
|
1229
|
+
}, P(e.title), 3)])]),
|
|
1230
|
+
l("div", vn, [j(n.$slots, "default")]),
|
|
1231
|
+
l("div", yn, [j(n.$slots, "footer")])
|
|
1210
1232
|
])], 2))])]));
|
|
1211
1233
|
}
|
|
1212
|
-
}),
|
|
1234
|
+
}), xn = ["aria-expanded"], Sn = { class: "flex items-center gap-3" }, Cn = /* @__PURE__ */ m({
|
|
1213
1235
|
__name: "BaseCollapsibleSection",
|
|
1214
1236
|
props: {
|
|
1215
1237
|
title: {},
|
|
@@ -1219,35 +1241,35 @@ var ln = { class: "flex items-start gap-4 min-w-0" }, un = { class: "flex-1 min-
|
|
|
1219
1241
|
},
|
|
1220
1242
|
emits: ["toggle"],
|
|
1221
1243
|
setup(e, { emit: t }) {
|
|
1222
|
-
let n = e, r = t, { isDark:
|
|
1223
|
-
return (t, n) => (
|
|
1244
|
+
let n = e, r = t, { isDark: i } = W(), o = Z(), u = a(() => i.value ? "text-gray-100" : "text-gray-700"), d = a(() => i.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = a(() => i.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = a(() => n.bodyClass === void 0 ? i.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1245
|
+
return (t, n) => (E(), c("section", { class: y(["rounded-xl border transition-colors", F(o).cardAlt]) }, [l("button", {
|
|
1224
1246
|
type: "button",
|
|
1225
|
-
class:
|
|
1247
|
+
class: y(["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"]]),
|
|
1226
1248
|
"aria-expanded": !e.collapsed,
|
|
1227
1249
|
onClick: n[0] ||= (e) => r("toggle")
|
|
1228
|
-
}, [
|
|
1250
|
+
}, [l("div", Sn, [l("h2", { class: y(["text-base font-semibold", u.value]) }, P(e.title), 3), e.badge ? (E(), c("span", {
|
|
1229
1251
|
key: 0,
|
|
1230
|
-
class:
|
|
1231
|
-
},
|
|
1232
|
-
class:
|
|
1252
|
+
class: y(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1253
|
+
}, P(e.badge), 3)) : s("", !0)]), (E(), c("svg", {
|
|
1254
|
+
class: y(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", F(o).dimTextAlt]]),
|
|
1233
1255
|
fill: "none",
|
|
1234
1256
|
viewBox: "0 0 24 24",
|
|
1235
1257
|
stroke: "currentColor",
|
|
1236
1258
|
"stroke-width": "2",
|
|
1237
1259
|
"aria-hidden": "true"
|
|
1238
|
-
}, [...n[1] ||= [
|
|
1260
|
+
}, [...n[1] ||= [l("path", {
|
|
1239
1261
|
"stroke-linecap": "round",
|
|
1240
1262
|
"stroke-linejoin": "round",
|
|
1241
1263
|
d: "M19 9l-7 7-7-7"
|
|
1242
|
-
}, null, -1)]], 2))], 10,
|
|
1264
|
+
}, null, -1)]], 2))], 10, xn), R(l("div", { class: y(["p-6 border-t rounded-b-xl", [F(o).border, p.value]]) }, [j(t.$slots, "default")], 2), [[ae, !e.collapsed]])], 2));
|
|
1243
1265
|
}
|
|
1244
|
-
}),
|
|
1266
|
+
}), wn = ["disabled"], Tn = ["disabled"], En = {
|
|
1245
1267
|
key: 0,
|
|
1246
1268
|
class: "w-4 h-4 animate-spin",
|
|
1247
1269
|
fill: "none",
|
|
1248
1270
|
viewBox: "0 0 24 24",
|
|
1249
1271
|
"aria-hidden": "true"
|
|
1250
|
-
},
|
|
1272
|
+
}, Dn = /* @__PURE__ */ m({
|
|
1251
1273
|
__name: "BaseConfirmModal",
|
|
1252
1274
|
props: {
|
|
1253
1275
|
title: {},
|
|
@@ -1263,44 +1285,44 @@ var ln = { class: "flex items-start gap-4 min-w-0" }, un = { class: "flex-1 min-
|
|
|
1263
1285
|
},
|
|
1264
1286
|
emits: ["confirm", "cancel"],
|
|
1265
1287
|
setup(e, { emit: t }) {
|
|
1266
|
-
let n = e, r = t, { isDark: i } =
|
|
1288
|
+
let n = e, r = t, { isDark: i } = W(), a = Z();
|
|
1267
1289
|
function u() {
|
|
1268
1290
|
n.submitting || r("confirm");
|
|
1269
1291
|
}
|
|
1270
|
-
function
|
|
1292
|
+
function d() {
|
|
1271
1293
|
n.submitting || r("cancel");
|
|
1272
1294
|
}
|
|
1273
|
-
return (t, n) => (
|
|
1295
|
+
return (t, n) => (E(), o(bn, {
|
|
1274
1296
|
title: e.title,
|
|
1275
|
-
icon:
|
|
1276
|
-
"icon-bg-class": e.variant === "danger" ?
|
|
1297
|
+
icon: F(Se),
|
|
1298
|
+
"icon-bg-class": e.variant === "danger" ? F(i) ? "bg-red-900/30" : "bg-red-50" : F(i) ? "bg-amber-900/30" : "bg-amber-50",
|
|
1277
1299
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1278
1300
|
"manual-close": e.submitting,
|
|
1279
|
-
onCancel:
|
|
1301
|
+
onCancel: d
|
|
1280
1302
|
}, {
|
|
1281
|
-
footer:
|
|
1303
|
+
footer: L(() => [l("button", {
|
|
1282
1304
|
type: "button",
|
|
1283
1305
|
disabled: e.submitting,
|
|
1284
|
-
class:
|
|
1285
|
-
onClick:
|
|
1286
|
-
},
|
|
1306
|
+
class: y(["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", [F(a).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1307
|
+
onClick: d
|
|
1308
|
+
}, P(e.cancelText), 11, wn), l("button", {
|
|
1287
1309
|
type: "button",
|
|
1288
1310
|
disabled: e.submitting,
|
|
1289
|
-
class:
|
|
1311
|
+
class: y(["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"]]),
|
|
1290
1312
|
onClick: u
|
|
1291
|
-
}, [e.submitting ? (
|
|
1313
|
+
}, [e.submitting ? (E(), c("svg", En, [...n[0] ||= [l("circle", {
|
|
1292
1314
|
class: "opacity-25",
|
|
1293
1315
|
cx: "12",
|
|
1294
1316
|
cy: "12",
|
|
1295
1317
|
r: "10",
|
|
1296
1318
|
stroke: "currentColor",
|
|
1297
1319
|
"stroke-width": "4"
|
|
1298
|
-
}, null, -1),
|
|
1320
|
+
}, null, -1), l("path", {
|
|
1299
1321
|
class: "opacity-75",
|
|
1300
1322
|
fill: "currentColor",
|
|
1301
1323
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1302
|
-
}, null, -1)]])) :
|
|
1303
|
-
default:
|
|
1324
|
+
}, null, -1)]])) : s("", !0), f(" " + P(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Tn)]),
|
|
1325
|
+
default: L(() => [j(t.$slots, "message", {}, () => [l("p", { class: y(["text-sm", F(i) ? "text-gray-300" : "text-gray-600"]) }, P(e.message), 3)]), j(t.$slots, "default")]),
|
|
1304
1326
|
_: 3
|
|
1305
1327
|
}, 8, [
|
|
1306
1328
|
"title",
|
|
@@ -1310,7 +1332,7 @@ var ln = { class: "flex items-start gap-4 min-w-0" }, un = { class: "flex-1 min-
|
|
|
1310
1332
|
"manual-close"
|
|
1311
1333
|
]));
|
|
1312
1334
|
}
|
|
1313
|
-
}),
|
|
1335
|
+
}), On = { class: "mt-4" }, kn = ["placeholder"], An = ["disabled"], jn = /* @__PURE__ */ m({
|
|
1314
1336
|
__name: "BaseTextInputModal",
|
|
1315
1337
|
props: {
|
|
1316
1338
|
title: {},
|
|
@@ -1328,9 +1350,9 @@ var ln = { class: "flex items-start gap-4 min-w-0" }, un = { class: "flex-1 min-
|
|
|
1328
1350
|
},
|
|
1329
1351
|
emits: ["confirm", "cancel"],
|
|
1330
1352
|
setup(e, { emit: t }) {
|
|
1331
|
-
let n = e, r = t, { isDark: i } =
|
|
1332
|
-
|
|
1333
|
-
await
|
|
1353
|
+
let n = e, r = t, { isDark: i } = W(), a = Z(), s = k(n.initialValue), c = k(null);
|
|
1354
|
+
C(async () => {
|
|
1355
|
+
await v(), c.value?.focus();
|
|
1334
1356
|
});
|
|
1335
1357
|
function d() {
|
|
1336
1358
|
s.value.trim() && !n.submitting && r("confirm", s.value.trim());
|
|
@@ -1341,39 +1363,39 @@ var ln = { class: "flex items-start gap-4 min-w-0" }, un = { class: "flex-1 min-
|
|
|
1341
1363
|
function p() {
|
|
1342
1364
|
s.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1343
1365
|
}
|
|
1344
|
-
return
|
|
1366
|
+
return dn(f), (t, n) => (E(), o(bn, {
|
|
1345
1367
|
title: e.title,
|
|
1346
|
-
icon:
|
|
1368
|
+
icon: F(be),
|
|
1347
1369
|
"manual-close": "",
|
|
1348
1370
|
onBackdrop: p
|
|
1349
|
-
},
|
|
1350
|
-
footer:
|
|
1371
|
+
}, u({
|
|
1372
|
+
footer: L(() => [l("button", {
|
|
1351
1373
|
type: "button",
|
|
1352
|
-
class:
|
|
1374
|
+
class: y(["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", F(a).ghostButton]),
|
|
1353
1375
|
onClick: f
|
|
1354
|
-
},
|
|
1376
|
+
}, P(e.cancelText), 3), l("button", {
|
|
1355
1377
|
type: "button",
|
|
1356
1378
|
disabled: !s.value.trim() || e.submitting,
|
|
1357
|
-
class:
|
|
1379
|
+
class: y(["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", [!s.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1358
1380
|
onClick: d
|
|
1359
|
-
},
|
|
1360
|
-
default:
|
|
1381
|
+
}, P(e.submitting ? e.submittingText : e.confirmText), 11, An)]),
|
|
1382
|
+
default: L(() => [l("p", { class: y(["text-sm", F(i) ? "text-gray-300" : "text-gray-600"]) }, P(e.message), 3), l("div", On, [l("label", { class: y(["block text-sm font-medium mb-1", F(a).label]) }, P(e.inputLabel), 3), R(l("input", {
|
|
1361
1383
|
ref_key: "nameInput",
|
|
1362
|
-
ref:
|
|
1384
|
+
ref: c,
|
|
1363
1385
|
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
1364
1386
|
type: "text",
|
|
1365
1387
|
placeholder: e.placeholder,
|
|
1366
|
-
class:
|
|
1388
|
+
class: y(["w-full px-3 py-2 rounded-md border text-sm transition-colors", F(i) ? "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"]),
|
|
1367
1389
|
onKeyup: oe(d, ["enter"])
|
|
1368
|
-
}, null, 42,
|
|
1390
|
+
}, null, 42, kn), [[ie, s.value]])])]),
|
|
1369
1391
|
_: 2
|
|
1370
1392
|
}, [t.$slots.icon ? {
|
|
1371
1393
|
name: "icon",
|
|
1372
|
-
fn:
|
|
1394
|
+
fn: L(() => [j(t.$slots, "icon")]),
|
|
1373
1395
|
key: "0"
|
|
1374
1396
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1375
1397
|
}
|
|
1376
|
-
}),
|
|
1398
|
+
}), Mn = { class: "flex items-center justify-center min-h-[60vh]" }, Nn = { class: "text-center px-6" }, Pn = /* @__PURE__ */ m({
|
|
1377
1399
|
__name: "BaseNotFoundPage",
|
|
1378
1400
|
props: {
|
|
1379
1401
|
code: { default: "404" },
|
|
@@ -1382,33 +1404,33 @@ var ln = { class: "flex items-start gap-4 min-w-0" }, un = { class: "flex-1 min-
|
|
|
1382
1404
|
homeLabel: { default: "Go home" }
|
|
1383
1405
|
},
|
|
1384
1406
|
setup(e) {
|
|
1385
|
-
let t = e, n = Me(), { isDark: r } =
|
|
1407
|
+
let t = e, n = Me(), { isDark: r } = W(), i = Z();
|
|
1386
1408
|
function a() {
|
|
1387
1409
|
n.push({ name: t.homeRouteName });
|
|
1388
1410
|
}
|
|
1389
|
-
return (t, n) => (
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1411
|
+
return (t, n) => (E(), c("div", Mn, [l("div", Nn, [
|
|
1412
|
+
p(F(Se), { class: y(["w-16 h-16 mx-auto mb-4", F(i).illustration]) }, null, 8, ["class"]),
|
|
1413
|
+
l("h1", { class: y(["text-4xl font-bold mb-2", F(r) ? "text-gray-200" : "text-gray-800"]) }, P(e.code), 3),
|
|
1414
|
+
l("p", { class: y(["text-lg mb-6", F(i).dimTextAlt]) }, P(e.message), 3),
|
|
1415
|
+
l("button", {
|
|
1394
1416
|
onClick: a,
|
|
1395
|
-
class:
|
|
1396
|
-
},
|
|
1417
|
+
class: y(["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", F(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1418
|
+
}, P(e.homeLabel), 3)
|
|
1397
1419
|
])]));
|
|
1398
1420
|
}
|
|
1399
|
-
}),
|
|
1400
|
-
function
|
|
1421
|
+
}), Fn = k(!1);
|
|
1422
|
+
function In() {
|
|
1401
1423
|
function e() {
|
|
1402
|
-
|
|
1424
|
+
Fn.value = !0;
|
|
1403
1425
|
}
|
|
1404
1426
|
function t() {
|
|
1405
|
-
|
|
1427
|
+
Fn.value = !1;
|
|
1406
1428
|
}
|
|
1407
1429
|
function n() {
|
|
1408
|
-
|
|
1430
|
+
Fn.value = !Fn.value;
|
|
1409
1431
|
}
|
|
1410
1432
|
return {
|
|
1411
|
-
mobileOpen:
|
|
1433
|
+
mobileOpen: Fn,
|
|
1412
1434
|
open: e,
|
|
1413
1435
|
close: t,
|
|
1414
1436
|
toggle: n
|
|
@@ -1416,19 +1438,19 @@ function Nn() {
|
|
|
1416
1438
|
}
|
|
1417
1439
|
//#endregion
|
|
1418
1440
|
//#region src/composables/useSidebarCollapse.ts
|
|
1419
|
-
var Q =
|
|
1420
|
-
function
|
|
1421
|
-
if (!
|
|
1422
|
-
let e = window.localStorage?.getItem(
|
|
1423
|
-
e && (Q.value = e === "true"),
|
|
1424
|
-
|
|
1425
|
-
window.localStorage?.setItem(
|
|
1441
|
+
var Q = k(!1), Ln = !1, Rn = "mgv-sidebar-collapsed";
|
|
1442
|
+
function zn(e) {
|
|
1443
|
+
if (!Ln && (Ln = !0, Rn = e, typeof window < "u")) {
|
|
1444
|
+
let e = window.localStorage?.getItem(Rn);
|
|
1445
|
+
e && (Q.value = e === "true"), h(!0).run(() => {
|
|
1446
|
+
I(Q, (e) => {
|
|
1447
|
+
window.localStorage?.setItem(Rn, String(e));
|
|
1426
1448
|
});
|
|
1427
1449
|
});
|
|
1428
1450
|
}
|
|
1429
1451
|
}
|
|
1430
|
-
function
|
|
1431
|
-
|
|
1452
|
+
function Bn(e) {
|
|
1453
|
+
zn(e?.storageKey ?? Rn);
|
|
1432
1454
|
function t() {
|
|
1433
1455
|
Q.value = !0;
|
|
1434
1456
|
}
|
|
@@ -1447,16 +1469,16 @@ function Ln(e) {
|
|
|
1447
1469
|
}
|
|
1448
1470
|
//#endregion
|
|
1449
1471
|
//#region src/composables/useNotifications.ts
|
|
1450
|
-
var $ =
|
|
1451
|
-
function
|
|
1472
|
+
var $ = k([]), Vn = k(!1), Hn = a(() => $.value.filter((e) => !e.read).length);
|
|
1473
|
+
function Un() {
|
|
1452
1474
|
function e() {
|
|
1453
|
-
|
|
1475
|
+
Vn.value = !0;
|
|
1454
1476
|
}
|
|
1455
1477
|
function t() {
|
|
1456
|
-
|
|
1478
|
+
Vn.value = !1;
|
|
1457
1479
|
}
|
|
1458
1480
|
function n() {
|
|
1459
|
-
|
|
1481
|
+
Vn.value = !Vn.value;
|
|
1460
1482
|
}
|
|
1461
1483
|
function r(e) {
|
|
1462
1484
|
$.value = e;
|
|
@@ -1484,8 +1506,8 @@ function Bn() {
|
|
|
1484
1506
|
}
|
|
1485
1507
|
return {
|
|
1486
1508
|
notifications: $,
|
|
1487
|
-
unreadCount:
|
|
1488
|
-
open:
|
|
1509
|
+
unreadCount: Hn,
|
|
1510
|
+
open: Vn,
|
|
1489
1511
|
openPanel: e,
|
|
1490
1512
|
closePanel: t,
|
|
1491
1513
|
togglePanel: n,
|
|
@@ -1499,26 +1521,26 @@ function Bn() {
|
|
|
1499
1521
|
}
|
|
1500
1522
|
//#endregion
|
|
1501
1523
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1502
|
-
var
|
|
1524
|
+
var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }, Kn = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, qn = { class: "space-y-0.5" }, Jn = [
|
|
1503
1525
|
"aria-current",
|
|
1504
1526
|
"title",
|
|
1505
1527
|
"onClick"
|
|
1506
|
-
],
|
|
1528
|
+
], Yn = ["aria-label"], Xn = { class: "relative shrink-0" }, Zn = {
|
|
1507
1529
|
key: 0,
|
|
1508
1530
|
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"
|
|
1509
|
-
},
|
|
1531
|
+
}, Qn = [
|
|
1510
1532
|
"title",
|
|
1511
1533
|
"aria-label",
|
|
1512
1534
|
"aria-pressed"
|
|
1513
|
-
],
|
|
1535
|
+
], $n = [
|
|
1514
1536
|
"title",
|
|
1515
1537
|
"aria-label",
|
|
1516
1538
|
"aria-pressed"
|
|
1517
|
-
],
|
|
1539
|
+
], er = /*#__PURE__*/ ((e, t) => {
|
|
1518
1540
|
let n = e.__vccOpts || e;
|
|
1519
1541
|
for (let [e, r] of t) n[e] = r;
|
|
1520
1542
|
return n;
|
|
1521
|
-
})(/* @__PURE__ */
|
|
1543
|
+
})(/* @__PURE__ */ m({
|
|
1522
1544
|
__name: "BaseSidebar",
|
|
1523
1545
|
props: {
|
|
1524
1546
|
sections: {},
|
|
@@ -1539,151 +1561,151 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1539
1561
|
}
|
|
1540
1562
|
},
|
|
1541
1563
|
setup(t) {
|
|
1542
|
-
let n = t, r = Me(),
|
|
1543
|
-
|
|
1544
|
-
e ? (
|
|
1564
|
+
let n = t, r = Me(), i = je(), { isDark: u, toggleTheme: d } = W(), { mobileOpen: m, close: h, toggle: g } = In(), { collapsed: _, toggle: b } = Bn(), { unreadCount: x, togglePanel: S } = Un(), C = a(() => n.collapsible && _.value), w = k(null), T = null;
|
|
1565
|
+
I(m, async (e) => {
|
|
1566
|
+
e ? (T = document.activeElement instanceof HTMLElement ? document.activeElement : null, await v(), w.value?.focus()) : (T?.focus(), T = null);
|
|
1545
1567
|
});
|
|
1546
1568
|
function D() {
|
|
1547
1569
|
r.push({ name: n.homeRouteName }), h();
|
|
1548
1570
|
}
|
|
1549
|
-
function
|
|
1550
|
-
return
|
|
1571
|
+
function O(e) {
|
|
1572
|
+
return i.name === e;
|
|
1551
1573
|
}
|
|
1552
|
-
function
|
|
1574
|
+
function M(e) {
|
|
1553
1575
|
r.push({ name: e }), h();
|
|
1554
1576
|
}
|
|
1555
|
-
return (n, r) => (
|
|
1556
|
-
|
|
1577
|
+
return (n, r) => (E(), c("div", null, [
|
|
1578
|
+
l("div", { class: y(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", F(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [l("button", {
|
|
1557
1579
|
type: "button",
|
|
1558
1580
|
onClick: D,
|
|
1559
1581
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1560
1582
|
"aria-label": "Go to home"
|
|
1561
|
-
}, [
|
|
1583
|
+
}, [j(n.$slots, "logo", { size: 28 }, void 0, !0)]), l("button", {
|
|
1562
1584
|
type: "button",
|
|
1563
|
-
onClick: r[0] ||= (...e) =>
|
|
1564
|
-
class:
|
|
1565
|
-
"aria-label":
|
|
1566
|
-
"aria-expanded":
|
|
1567
|
-
}, [
|
|
1585
|
+
onClick: r[0] ||= (...e) => F(g) && F(g)(...e),
|
|
1586
|
+
class: y(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", F(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1587
|
+
"aria-label": F(m) ? "Close navigation menu" : "Open navigation menu",
|
|
1588
|
+
"aria-expanded": F(m)
|
|
1589
|
+
}, [F(m) ? (E(), o(F(B), {
|
|
1568
1590
|
key: 1,
|
|
1569
1591
|
class: "w-6 h-6",
|
|
1570
1592
|
"aria-hidden": "true"
|
|
1571
|
-
})) : (
|
|
1593
|
+
})) : (E(), o(F(ue), {
|
|
1572
1594
|
key: 0,
|
|
1573
1595
|
class: "w-6 h-6",
|
|
1574
1596
|
"aria-hidden": "true"
|
|
1575
|
-
}))], 10,
|
|
1576
|
-
|
|
1597
|
+
}))], 10, Wn)], 2),
|
|
1598
|
+
F(m) ? (E(), c("div", {
|
|
1577
1599
|
key: 0,
|
|
1578
1600
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1579
1601
|
"aria-hidden": "true",
|
|
1580
|
-
onClick: r[1] ||= (...e) =>
|
|
1581
|
-
})) :
|
|
1582
|
-
|
|
1602
|
+
onClick: r[1] ||= (...e) => F(h) && F(h)(...e)
|
|
1603
|
+
})) : s("", !0),
|
|
1604
|
+
l("aside", {
|
|
1583
1605
|
role: "navigation",
|
|
1584
1606
|
"aria-label": "Main navigation",
|
|
1585
|
-
class:
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
t.collapsible &&
|
|
1607
|
+
class: y(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-all duration-300 lg:pointer-events-auto", [
|
|
1608
|
+
F(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200",
|
|
1609
|
+
F(m) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1610
|
+
t.collapsible && F(_) ? "lg:w-16" : "lg:w-60"
|
|
1589
1611
|
]])
|
|
1590
|
-
}, [
|
|
1591
|
-
|
|
1612
|
+
}, [l("div", Gn, [
|
|
1613
|
+
l("div", { class: y(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": C.value }]) }, [l("button", {
|
|
1592
1614
|
type: "button",
|
|
1593
1615
|
onClick: D,
|
|
1594
1616
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1595
1617
|
"aria-label": "Go to home"
|
|
1596
|
-
}, [
|
|
1618
|
+
}, [j(n.$slots, "logo", { size: C.value ? 36 : 52 }, void 0, !0)]), l("button", {
|
|
1597
1619
|
ref_key: "closeMobileButton",
|
|
1598
1620
|
ref: w,
|
|
1599
1621
|
type: "button",
|
|
1600
|
-
onClick: r[2] ||= (...e) =>
|
|
1601
|
-
class:
|
|
1622
|
+
onClick: r[2] ||= (...e) => F(h) && F(h)(...e),
|
|
1623
|
+
class: y(["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", F(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1602
1624
|
"aria-label": "Close navigation menu"
|
|
1603
|
-
}, [
|
|
1625
|
+
}, [p(F(B), {
|
|
1604
1626
|
class: "w-5 h-5",
|
|
1605
1627
|
"aria-hidden": "true"
|
|
1606
1628
|
})], 2)], 2),
|
|
1607
|
-
|
|
1629
|
+
l("nav", Kn, [(E(!0), c(e, null, A(t.sections, (t) => (E(), c("div", { key: t.title }, [l("p", { class: y(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": C.value }]) }, P(t.title), 3), l("ul", qn, [(E(!0), c(e, null, A(t.items, (e) => (E(), c("li", { key: e.name }, [l("button", {
|
|
1608
1630
|
type: "button",
|
|
1609
|
-
"aria-current":
|
|
1631
|
+
"aria-current": O(e.name) ? "page" : void 0,
|
|
1610
1632
|
title: C.value ? e.label : void 0,
|
|
1611
|
-
onClick: (t) =>
|
|
1612
|
-
class:
|
|
1613
|
-
}, [(
|
|
1614
|
-
|
|
1615
|
-
t.showNotifications ? (
|
|
1633
|
+
onClick: (t) => M(e.name),
|
|
1634
|
+
class: y(["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", [O(e.name) ? F(u) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : F(u) ? "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": C.value }]])
|
|
1635
|
+
}, [(E(), o(N(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), l("span", { class: y({ "lg:hidden": C.value }) }, P(e.label), 3)], 10, Jn)]))), 128))])]))), 128))]),
|
|
1636
|
+
l("div", { class: y(["px-4 py-4 border-t transition-colors space-y-3", F(u) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1637
|
+
t.showNotifications ? (E(), c("button", {
|
|
1616
1638
|
key: 0,
|
|
1617
1639
|
type: "button",
|
|
1618
|
-
onClick: r[3] ||= (...e) =>
|
|
1640
|
+
onClick: r[3] ||= (...e) => F(S) && F(S)(...e),
|
|
1619
1641
|
title: "Notifications",
|
|
1620
|
-
"aria-label":
|
|
1621
|
-
class:
|
|
1622
|
-
}, [
|
|
1642
|
+
"aria-label": F(x) > 0 ? `Notifications, ${F(x)} unread` : "Notifications",
|
|
1643
|
+
class: y(["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", [F(u) ? "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": C.value }]])
|
|
1644
|
+
}, [l("span", Xn, [p(F(de), {
|
|
1623
1645
|
class: "w-[18px] h-[18px]",
|
|
1624
1646
|
"aria-hidden": "true"
|
|
1625
|
-
}),
|
|
1626
|
-
t.showThemeToggle ? (
|
|
1647
|
+
}), F(x) > 0 ? (E(), c("span", Zn, P(F(x) > 99 ? "99+" : F(x)), 1)) : s("", !0)]), l("span", { class: y({ "lg:hidden": C.value }) }, "Notifications", 2)], 10, Yn)) : s("", !0),
|
|
1648
|
+
t.showThemeToggle ? (E(), c("button", {
|
|
1627
1649
|
key: 1,
|
|
1628
1650
|
type: "button",
|
|
1629
|
-
onClick: r[4] ||= (...e) =>
|
|
1630
|
-
title:
|
|
1631
|
-
"aria-label":
|
|
1632
|
-
"aria-pressed":
|
|
1633
|
-
class:
|
|
1651
|
+
onClick: r[4] ||= (...e) => F(d) && F(d)(...e),
|
|
1652
|
+
title: F(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1653
|
+
"aria-label": F(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1654
|
+
"aria-pressed": F(u),
|
|
1655
|
+
class: y(["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", [F(u) ? "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": C.value }]])
|
|
1634
1656
|
}, [
|
|
1635
|
-
(
|
|
1636
|
-
class:
|
|
1657
|
+
(E(), o(N(F(u) ? F(Oe) : F(De)), {
|
|
1658
|
+
class: y(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": C.value }]),
|
|
1637
1659
|
"aria-hidden": "true"
|
|
1638
1660
|
}, null, 8, ["class"])),
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
], 10,
|
|
1642
|
-
t.collapsible ? (
|
|
1661
|
+
l("span", { class: y({ "lg:hidden": C.value }) }, P(F(u) ? "Switch to light" : "Switch to dark"), 3),
|
|
1662
|
+
l("span", { class: y(["ml-auto relative w-9 h-5 rounded-full transition-colors", [F(u) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": C.value }]]) }, [l("span", { class: y(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", F(u) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1663
|
+
], 10, Qn)) : s("", !0),
|
|
1664
|
+
t.collapsible ? (E(), c("button", {
|
|
1643
1665
|
key: 2,
|
|
1644
1666
|
type: "button",
|
|
1645
|
-
onClick: r[5] ||= (...e) =>
|
|
1646
|
-
title:
|
|
1647
|
-
"aria-label":
|
|
1648
|
-
"aria-pressed":
|
|
1649
|
-
class:
|
|
1650
|
-
}, [(
|
|
1667
|
+
onClick: r[5] ||= (...e) => F(b) && F(b)(...e),
|
|
1668
|
+
title: F(_) ? "Expand sidebar" : "Collapse sidebar",
|
|
1669
|
+
"aria-label": F(_) ? "Expand sidebar" : "Collapse sidebar",
|
|
1670
|
+
"aria-pressed": F(_),
|
|
1671
|
+
class: y(["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", [F(u) ? "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": C.value }]])
|
|
1672
|
+
}, [(E(), o(N(F(_) ? F(he) : F(me)), {
|
|
1651
1673
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1652
1674
|
"aria-hidden": "true"
|
|
1653
|
-
})),
|
|
1654
|
-
|
|
1655
|
-
|
|
1675
|
+
})), l("span", { class: y({ "lg:hidden": C.value }) }, "Collapse", 2)], 10, $n)) : s("", !0),
|
|
1676
|
+
l("div", { class: y({ "lg:hidden": C.value }) }, [j(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1677
|
+
l("div", { class: y({ "lg:hidden": C.value }) }, [j(n.$slots, "footer", {}, () => [t.appName || t.version ? (E(), c("div", {
|
|
1656
1678
|
key: 0,
|
|
1657
|
-
class:
|
|
1658
|
-
}, [
|
|
1659
|
-
|
|
1660
|
-
t.appName && t.version ? (
|
|
1661
|
-
t.version ? (
|
|
1662
|
-
])], 2)) :
|
|
1679
|
+
class: y(["flex items-center justify-center gap-2 text-xs", (F(u), "text-gray-500")])
|
|
1680
|
+
}, [l("span", null, [
|
|
1681
|
+
f(P(t.appName), 1),
|
|
1682
|
+
t.appName && t.version ? (E(), c(e, { key: 0 }, [f(P(" "))], 64)) : s("", !0),
|
|
1683
|
+
t.version ? (E(), c(e, { key: 1 }, [f("v" + P(t.version), 1)], 64)) : s("", !0)
|
|
1684
|
+
])], 2)) : s("", !0)], !0)], 2)
|
|
1663
1685
|
], 2)
|
|
1664
1686
|
])], 2)
|
|
1665
1687
|
]));
|
|
1666
1688
|
}
|
|
1667
|
-
}), [["__scopeId", "data-v-bfce9dd7"]]),
|
|
1689
|
+
}), [["__scopeId", "data-v-bfce9dd7"]]), tr = {
|
|
1668
1690
|
key: 1,
|
|
1669
1691
|
class: "mt-4 flex justify-center py-6"
|
|
1670
|
-
},
|
|
1692
|
+
}, nr = {
|
|
1671
1693
|
key: 2,
|
|
1672
1694
|
class: "mt-4 text-sm text-red-500",
|
|
1673
1695
|
role: "alert"
|
|
1674
|
-
},
|
|
1696
|
+
}, rr = {
|
|
1675
1697
|
key: 3,
|
|
1676
1698
|
class: "mt-4"
|
|
1677
|
-
},
|
|
1699
|
+
}, ir = { class: "relative" }, ar = ["placeholder"], or = {
|
|
1678
1700
|
key: 4,
|
|
1679
1701
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1680
|
-
},
|
|
1702
|
+
}, sr = ["aria-pressed", "onClick"], cr = { class: "flex-1 min-w-0" }, lr = {
|
|
1681
1703
|
key: 0,
|
|
1682
1704
|
class: "text-center py-6"
|
|
1683
|
-
},
|
|
1705
|
+
}, ur = {
|
|
1684
1706
|
key: 1,
|
|
1685
1707
|
class: "text-center py-6"
|
|
1686
|
-
},
|
|
1708
|
+
}, dr = ["disabled"], fr = ["disabled"], pr = /* @__PURE__ */ m({
|
|
1687
1709
|
__name: "BaseEntityPickerModal",
|
|
1688
1710
|
props: {
|
|
1689
1711
|
title: {},
|
|
@@ -1705,10 +1727,10 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1705
1727
|
},
|
|
1706
1728
|
emits: ["confirm", "cancel"],
|
|
1707
1729
|
setup(t, { emit: n }) {
|
|
1708
|
-
let r = t,
|
|
1730
|
+
let r = t, i = n, { isDark: d } = W(), f = Z(), m = k([]), h = k(!1), g = k(""), _ = k(null), b = k(""), x = k(null), S = a(() => {
|
|
1709
1731
|
let e = r.loader ? m.value : r.items;
|
|
1710
1732
|
return r.excludeId ? e.filter((e) => e.id !== r.excludeId) : e;
|
|
1711
|
-
}), w =
|
|
1733
|
+
}), w = a(() => S.value.filter((e) => e.label.toLowerCase().includes(b.value.toLowerCase()))), T = {
|
|
1712
1734
|
emerald: {
|
|
1713
1735
|
iconBg: "bg-emerald-50",
|
|
1714
1736
|
iconText: "text-emerald-600",
|
|
@@ -1800,8 +1822,8 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1800
1822
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1801
1823
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1802
1824
|
}
|
|
1803
|
-
},
|
|
1804
|
-
|
|
1825
|
+
}, O = a(() => (d.value ? D : T)[r.variant]);
|
|
1826
|
+
C(async () => {
|
|
1805
1827
|
if (r.loader) {
|
|
1806
1828
|
h.value = !0;
|
|
1807
1829
|
try {
|
|
@@ -1812,80 +1834,80 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1812
1834
|
h.value = !1;
|
|
1813
1835
|
}
|
|
1814
1836
|
}
|
|
1815
|
-
await
|
|
1837
|
+
await v(), x.value?.focus();
|
|
1816
1838
|
});
|
|
1817
1839
|
function M() {
|
|
1818
|
-
|
|
1840
|
+
_.value && !r.submitting && i("confirm", _.value);
|
|
1819
1841
|
}
|
|
1820
|
-
function
|
|
1821
|
-
r.submitting ||
|
|
1842
|
+
function N() {
|
|
1843
|
+
r.submitting || i("cancel");
|
|
1822
1844
|
}
|
|
1823
|
-
return (n, r) => (
|
|
1845
|
+
return (n, r) => (E(), o(bn, {
|
|
1824
1846
|
title: t.title,
|
|
1825
|
-
icon:
|
|
1826
|
-
"icon-bg-class":
|
|
1827
|
-
"icon-class":
|
|
1847
|
+
icon: F(Ce),
|
|
1848
|
+
"icon-bg-class": O.value.iconBg,
|
|
1849
|
+
"icon-class": O.value.iconText,
|
|
1828
1850
|
"manual-close": t.submitting,
|
|
1829
|
-
onCancel:
|
|
1830
|
-
},
|
|
1831
|
-
footer:
|
|
1851
|
+
onCancel: N
|
|
1852
|
+
}, u({
|
|
1853
|
+
footer: L(() => [l("button", {
|
|
1832
1854
|
type: "button",
|
|
1833
1855
|
disabled: t.submitting,
|
|
1834
|
-
class:
|
|
1835
|
-
onClick:
|
|
1836
|
-
},
|
|
1856
|
+
class: y(["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", F(f).ghostButton]),
|
|
1857
|
+
onClick: N
|
|
1858
|
+
}, P(t.cancelText), 11, dr), l("button", {
|
|
1837
1859
|
type: "button",
|
|
1838
|
-
disabled: !
|
|
1839
|
-
class:
|
|
1860
|
+
disabled: !_.value || t.submitting,
|
|
1861
|
+
class: y(["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", !_.value || t.submitting ? O.value.confirmDisabled : O.value.confirmActive]),
|
|
1840
1862
|
onClick: M
|
|
1841
|
-
},
|
|
1842
|
-
default:
|
|
1843
|
-
t.message ? (
|
|
1863
|
+
}, P(t.submitting ? t.submittingText : t.confirmText), 11, fr)]),
|
|
1864
|
+
default: L(() => [
|
|
1865
|
+
t.message ? (E(), c("p", {
|
|
1844
1866
|
key: 0,
|
|
1845
|
-
class:
|
|
1846
|
-
},
|
|
1847
|
-
h.value ? (
|
|
1848
|
-
!h.value && !g.value &&
|
|
1849
|
-
class:
|
|
1867
|
+
class: y(["text-sm", F(d) ? "text-gray-300" : "text-gray-600"])
|
|
1868
|
+
}, P(t.message), 3)) : s("", !0),
|
|
1869
|
+
h.value ? (E(), c("div", tr, [p(Bt, { color: "emerald" })])) : g.value ? (E(), c("div", nr, P(g.value), 1)) : s("", !0),
|
|
1870
|
+
!h.value && !g.value && S.value.length > 0 ? (E(), c("div", rr, [l("div", ir, [p(F(Te), {
|
|
1871
|
+
class: y(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", F(f).dimText]),
|
|
1850
1872
|
"aria-hidden": "true"
|
|
1851
|
-
}, null, 8, ["class"]),
|
|
1873
|
+
}, null, 8, ["class"]), R(l("input", {
|
|
1852
1874
|
ref_key: "searchInputRef",
|
|
1853
1875
|
ref: x,
|
|
1854
1876
|
"onUpdate:modelValue": r[0] ||= (e) => b.value = e,
|
|
1855
1877
|
type: "text",
|
|
1856
1878
|
placeholder: t.searchPlaceholder,
|
|
1857
|
-
class:
|
|
1858
|
-
}, null, 10,
|
|
1859
|
-
!h.value && !g.value ? (
|
|
1879
|
+
class: y(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [F(d) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", O.value.inputFocus]])
|
|
1880
|
+
}, null, 10, ar), [[ie, b.value]])])])) : s("", !0),
|
|
1881
|
+
!h.value && !g.value ? (E(), c("div", or, [(E(!0), c(e, null, A(w.value, (e) => (E(), c("button", {
|
|
1860
1882
|
key: e.id,
|
|
1861
1883
|
type: "button",
|
|
1862
|
-
"aria-pressed":
|
|
1863
|
-
class:
|
|
1864
|
-
onClick: (t) =>
|
|
1884
|
+
"aria-pressed": _.value === e.id,
|
|
1885
|
+
class: y(["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", [_.value === e.id ? O.value.selectedRow : F(d) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1886
|
+
onClick: (t) => _.value = e.id
|
|
1865
1887
|
}, [
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1888
|
+
p(F(Ce), { class: y(["w-5 h-5 flex-shrink-0", F(f).dimText]) }, null, 8, ["class"]),
|
|
1889
|
+
l("div", cr, [l("p", { class: y(["text-sm font-medium truncate", F(f).bodyText]) }, P(e.label), 3)]),
|
|
1890
|
+
_.value === e.id ? (E(), c("div", {
|
|
1869
1891
|
key: 0,
|
|
1870
|
-
class:
|
|
1871
|
-
}, [...r[1] ||= [
|
|
1892
|
+
class: y(["w-5 h-5 rounded-full flex items-center justify-center", O.value.checkBg])
|
|
1893
|
+
}, [...r[1] ||= [l("svg", {
|
|
1872
1894
|
class: "w-3 h-3 text-white",
|
|
1873
1895
|
fill: "none",
|
|
1874
1896
|
viewBox: "0 0 24 24",
|
|
1875
1897
|
stroke: "currentColor",
|
|
1876
1898
|
"stroke-width": "3",
|
|
1877
1899
|
"aria-hidden": "true"
|
|
1878
|
-
}, [
|
|
1900
|
+
}, [l("path", {
|
|
1879
1901
|
"stroke-linecap": "round",
|
|
1880
1902
|
"stroke-linejoin": "round",
|
|
1881
1903
|
d: "M5 13l4 4L19 7"
|
|
1882
|
-
})], -1)]], 2)) :
|
|
1883
|
-
], 10,
|
|
1904
|
+
})], -1)]], 2)) : s("", !0)
|
|
1905
|
+
], 10, sr))), 128)), S.value.length === 0 ? (E(), c("div", lr, [l("p", { class: y(["text-sm", F(f).dimText]) }, P(t.emptyMessage), 3)])) : w.value.length === 0 ? (E(), c("div", ur, [l("p", { class: y(["text-sm", F(f).dimText]) }, P(t.noMatchMessage), 3)])) : s("", !0)])) : s("", !0)
|
|
1884
1906
|
]),
|
|
1885
1907
|
_: 2
|
|
1886
1908
|
}, [n.$slots.icon ? {
|
|
1887
1909
|
name: "icon",
|
|
1888
|
-
fn:
|
|
1910
|
+
fn: L(() => [j(n.$slots, "icon")]),
|
|
1889
1911
|
key: "0"
|
|
1890
1912
|
} : void 0]), 1032, [
|
|
1891
1913
|
"title",
|
|
@@ -1895,10 +1917,10 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1895
1917
|
"manual-close"
|
|
1896
1918
|
]));
|
|
1897
1919
|
}
|
|
1898
|
-
}),
|
|
1920
|
+
}), mr = {
|
|
1899
1921
|
href: "#main-content",
|
|
1900
1922
|
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"
|
|
1901
|
-
},
|
|
1923
|
+
}, hr = ["inert"], gr = /* @__PURE__ */ m({
|
|
1902
1924
|
__name: "BaseAppLayout",
|
|
1903
1925
|
props: {
|
|
1904
1926
|
showSidebar: {
|
|
@@ -1908,23 +1930,23 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1908
1930
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1909
1931
|
},
|
|
1910
1932
|
setup(e) {
|
|
1911
|
-
let t = e, { isDark: n } =
|
|
1912
|
-
return (t,
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1933
|
+
let t = e, { isDark: n } = W(), { mobileOpen: r } = In(), { collapsed: i } = Bn(), o = a(() => t.showSidebar);
|
|
1934
|
+
return (t, a) => (E(), c("div", { class: y(["min-h-screen transition-colors duration-300", F(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1935
|
+
l("a", mr, P(e.skipLinkLabel), 1),
|
|
1936
|
+
o.value ? j(t.$slots, "sidebar", {}, void 0, void 0, 0) : s("", !0),
|
|
1937
|
+
l("main", {
|
|
1916
1938
|
id: "main-content",
|
|
1917
1939
|
tabindex: "-1",
|
|
1918
|
-
inert:
|
|
1919
|
-
class:
|
|
1920
|
-
}, [
|
|
1940
|
+
inert: o.value && F(r) ? !0 : void 0,
|
|
1941
|
+
class: y(["transition-all duration-300", o.value ? F(i) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1942
|
+
}, [j(t.$slots, "default")], 10, hr)
|
|
1921
1943
|
], 2));
|
|
1922
1944
|
}
|
|
1923
|
-
}),
|
|
1945
|
+
}), _r = { class: "flex items-center gap-3 min-w-0" }, vr = {
|
|
1924
1946
|
key: 0,
|
|
1925
1947
|
class: "absolute left-0 top-[0.14em] h-[1.1em] w-1 rounded-full bg-gradient-to-b from-emerald-400 to-emerald-600",
|
|
1926
1948
|
"aria-hidden": "true"
|
|
1927
|
-
},
|
|
1949
|
+
}, yr = { class: "flex items-center gap-2" }, br = /* @__PURE__ */ m({
|
|
1928
1950
|
__name: "BasePageHeader",
|
|
1929
1951
|
props: {
|
|
1930
1952
|
title: {},
|
|
@@ -1939,7 +1961,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1939
1961
|
}
|
|
1940
1962
|
},
|
|
1941
1963
|
setup(e) {
|
|
1942
|
-
let t = e, { isDark: n } =
|
|
1964
|
+
let t = e, { isDark: n } = W(), r = Z(), i = a(() => {
|
|
1943
1965
|
let e = {
|
|
1944
1966
|
emerald: {
|
|
1945
1967
|
dark: "bg-emerald-500/10",
|
|
@@ -1959,7 +1981,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1959
1981
|
}
|
|
1960
1982
|
}[t.iconColor];
|
|
1961
1983
|
return n.value ? e.dark : e.light;
|
|
1962
|
-
}),
|
|
1984
|
+
}), o = a(() => {
|
|
1963
1985
|
let e = {
|
|
1964
1986
|
emerald: {
|
|
1965
1987
|
dark: "text-emerald-400",
|
|
@@ -1980,19 +2002,19 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
1980
2002
|
}[t.iconColor];
|
|
1981
2003
|
return n.value ? e.dark : e.light;
|
|
1982
2004
|
});
|
|
1983
|
-
return (t, n) => (
|
|
2005
|
+
return (t, n) => (E(), c("header", { class: y(e.maxWidthClass ? ["mx-auto px-4 sm:px-6", e.maxWidthClass] : void 0) }, [l("div", { class: y(["flex flex-wrap justify-between gap-3", [e.align === "end" ? "items-end" : "items-center", e.marginClass]]) }, [l("div", _r, [t.$slots.icon ? (E(), c("div", {
|
|
1984
2006
|
key: 0,
|
|
1985
|
-
class:
|
|
1986
|
-
}, [
|
|
2007
|
+
class: y(["w-10 h-10 rounded-lg flex items-center justify-center", i.value])
|
|
2008
|
+
}, [j(t.$slots, "icon", { iconClass: o.value })], 2)) : s("", !0), l("div", null, [l("h1", { class: y(["text-2xl font-bold", [F(r).primaryTextSoft, e.accent ? "relative pl-3.5 tracking-tight" : ""]]) }, [e.accent ? (E(), c("span", vr)) : s("", !0), f(" " + P(e.title), 1)], 2), e.subtitle || t.$slots.subtitle ? (E(), c("p", {
|
|
1987
2009
|
key: 0,
|
|
1988
|
-
class:
|
|
1989
|
-
}, [
|
|
2010
|
+
class: y(["max-w-[72ch] text-sm", F(r).dimTextAlt])
|
|
2011
|
+
}, [j(t.$slots, "subtitle", {}, () => [f(P(e.subtitle), 1)])], 2)) : s("", !0)])]), l("div", yr, [j(t.$slots, "actions")])], 2)], 2));
|
|
1990
2012
|
}
|
|
1991
|
-
}),
|
|
2013
|
+
}), xr = [
|
|
1992
2014
|
"type",
|
|
1993
2015
|
"disabled",
|
|
1994
2016
|
"title"
|
|
1995
|
-
],
|
|
2017
|
+
], Sr = { key: 0 }, Cr = /* @__PURE__ */ m({
|
|
1996
2018
|
__name: "BaseToolbarButton",
|
|
1997
2019
|
props: {
|
|
1998
2020
|
label: { default: "" },
|
|
@@ -2006,11 +2028,11 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2006
2028
|
},
|
|
2007
2029
|
emits: ["click"],
|
|
2008
2030
|
setup(e) {
|
|
2009
|
-
let t = e, { isDark: n } =
|
|
2031
|
+
let t = e, { isDark: n } = W(), r = {
|
|
2010
2032
|
neutral: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2011
2033
|
danger: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2012
2034
|
ghost: "h-9 px-4 rounded-md font-semibold disabled:opacity-40 disabled:hover:bg-slate-50 dark:disabled:hover:bg-slate-900"
|
|
2013
|
-
},
|
|
2035
|
+
}, i = a(() => {
|
|
2014
2036
|
let e = {
|
|
2015
2037
|
neutral: {
|
|
2016
2038
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -2027,20 +2049,20 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2027
2049
|
}[t.variant];
|
|
2028
2050
|
return [r[t.variant], n.value ? e.dark : e.light];
|
|
2029
2051
|
});
|
|
2030
|
-
return (t, n) => (
|
|
2052
|
+
return (t, n) => (E(), c("button", {
|
|
2031
2053
|
type: e.type,
|
|
2032
2054
|
disabled: e.disabled,
|
|
2033
2055
|
title: e.title,
|
|
2034
|
-
class:
|
|
2056
|
+
class: y(["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", i.value]),
|
|
2035
2057
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2036
|
-
}, [
|
|
2058
|
+
}, [j(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (E(), c("span", Sr, P(e.label), 1)) : s("", !0)], 10, xr));
|
|
2037
2059
|
}
|
|
2038
|
-
}),
|
|
2060
|
+
}), wr = [
|
|
2039
2061
|
"type",
|
|
2040
2062
|
"disabled",
|
|
2041
2063
|
"title",
|
|
2042
2064
|
"aria-label"
|
|
2043
|
-
],
|
|
2065
|
+
], Tr = { key: 0 }, Er = /* @__PURE__ */ m({
|
|
2044
2066
|
__name: "BaseActionButton",
|
|
2045
2067
|
props: {
|
|
2046
2068
|
label: { default: "" },
|
|
@@ -2059,7 +2081,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2059
2081
|
},
|
|
2060
2082
|
emits: ["click"],
|
|
2061
2083
|
setup(e) {
|
|
2062
|
-
let t = e, { isDark: n } =
|
|
2084
|
+
let t = e, { isDark: n } = W(), r = a(() => {
|
|
2063
2085
|
let e = {
|
|
2064
2086
|
emerald: {
|
|
2065
2087
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2095,7 +2117,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2095
2117
|
}
|
|
2096
2118
|
}[t.color];
|
|
2097
2119
|
return n.value ? e.dark : e.light;
|
|
2098
|
-
}),
|
|
2120
|
+
}), i = a(() => {
|
|
2099
2121
|
let e = {
|
|
2100
2122
|
emerald: {
|
|
2101
2123
|
dark: "text-emerald-400",
|
|
@@ -2131,17 +2153,17 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2131
2153
|
}
|
|
2132
2154
|
}[t.color];
|
|
2133
2155
|
return n.value ? e.dark : e.light;
|
|
2134
|
-
}),
|
|
2135
|
-
return (t, n) => (
|
|
2156
|
+
}), o = a(() => t.disabled ? `${i.value} opacity-50 cursor-not-allowed` : `${r.value} cursor-pointer`);
|
|
2157
|
+
return (t, n) => (E(), c("button", {
|
|
2136
2158
|
type: e.type,
|
|
2137
2159
|
disabled: e.disabled,
|
|
2138
2160
|
title: e.title,
|
|
2139
2161
|
"aria-label": e.ariaLabel,
|
|
2140
|
-
class:
|
|
2162
|
+
class: y(["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" : "", o.value]]),
|
|
2141
2163
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2142
|
-
}, [
|
|
2164
|
+
}, [j(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (E(), c("span", Tr, P(e.label), 1)) : s("", !0)], 10, wr));
|
|
2143
2165
|
}
|
|
2144
|
-
}),
|
|
2166
|
+
}), Dr = ["title", "aria-label"], Or = /* @__PURE__ */ m({
|
|
2145
2167
|
__name: "BaseCopyButton",
|
|
2146
2168
|
props: {
|
|
2147
2169
|
text: {},
|
|
@@ -2152,7 +2174,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2152
2174
|
},
|
|
2153
2175
|
emits: ["copied", "error"],
|
|
2154
2176
|
setup(e, { emit: t }) {
|
|
2155
|
-
let n = e, r = t, { isDark:
|
|
2177
|
+
let n = e, r = t, { isDark: i } = W(), s = k(!1), l = null, u = a(() => s.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = a(() => n.label ? `Copy ${n.label}` : "Copy"), f = a(() => 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 ${s.value ? i.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : i.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 ${i.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2156
2178
|
async function p(e) {
|
|
2157
2179
|
try {
|
|
2158
2180
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2167,43 +2189,43 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2167
2189
|
}
|
|
2168
2190
|
async function m() {
|
|
2169
2191
|
try {
|
|
2170
|
-
await p(n.text),
|
|
2171
|
-
|
|
2192
|
+
await p(n.text), s.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
2193
|
+
s.value = !1;
|
|
2172
2194
|
}, n.resetMs), r("copied");
|
|
2173
2195
|
} catch (e) {
|
|
2174
2196
|
r("error", e);
|
|
2175
2197
|
}
|
|
2176
2198
|
}
|
|
2177
|
-
return
|
|
2199
|
+
return T(() => {
|
|
2178
2200
|
l && clearTimeout(l);
|
|
2179
|
-
}), (t, n) => (
|
|
2201
|
+
}), (t, n) => (E(), c("button", {
|
|
2180
2202
|
type: "button",
|
|
2181
2203
|
title: u.value,
|
|
2182
2204
|
"aria-label": d.value,
|
|
2183
|
-
class:
|
|
2205
|
+
class: y(f.value),
|
|
2184
2206
|
onClick: m
|
|
2185
|
-
}, [
|
|
2207
|
+
}, [s.value ? (E(), o(F(ve), {
|
|
2186
2208
|
key: 0,
|
|
2187
|
-
class:
|
|
2209
|
+
class: y(e.iconClass),
|
|
2188
2210
|
"aria-hidden": "true"
|
|
2189
|
-
}, null, 8, ["class"])) : (
|
|
2211
|
+
}, null, 8, ["class"])) : (E(), o(F(ye), {
|
|
2190
2212
|
key: 1,
|
|
2191
|
-
class:
|
|
2213
|
+
class: y(e.iconClass),
|
|
2192
2214
|
"aria-hidden": "true"
|
|
2193
|
-
}, null, 8, ["class"]))], 10,
|
|
2215
|
+
}, null, 8, ["class"]))], 10, Dr));
|
|
2194
2216
|
}
|
|
2195
|
-
}),
|
|
2217
|
+
}), kr = ["disabled", "aria-busy"], Ar = {
|
|
2196
2218
|
key: 0,
|
|
2197
2219
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2198
2220
|
viewBox: "0 0 24 24",
|
|
2199
2221
|
fill: "none",
|
|
2200
2222
|
"aria-hidden": "true"
|
|
2201
|
-
},
|
|
2223
|
+
}, jr = {
|
|
2202
2224
|
key: 1,
|
|
2203
2225
|
class: "w-5 h-5 shrink-0",
|
|
2204
2226
|
viewBox: "0 0 48 48",
|
|
2205
2227
|
"aria-hidden": "true"
|
|
2206
|
-
},
|
|
2228
|
+
}, Mr = /* @__PURE__ */ m({
|
|
2207
2229
|
__name: "BaseGoogleSignInButton",
|
|
2208
2230
|
props: {
|
|
2209
2231
|
label: { default: "Sign in with Google" },
|
|
@@ -2222,39 +2244,39 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2222
2244
|
},
|
|
2223
2245
|
emits: ["click"],
|
|
2224
2246
|
setup(e, { emit: t }) {
|
|
2225
|
-
let n = e, r = t, { isDark:
|
|
2226
|
-
function
|
|
2247
|
+
let n = e, r = t, { isDark: i } = W(), o = a(() => n.disabled || n.loading);
|
|
2248
|
+
function s() {
|
|
2227
2249
|
o.value || r("click");
|
|
2228
2250
|
}
|
|
2229
|
-
return (t, n) => (
|
|
2251
|
+
return (t, n) => (E(), c("button", {
|
|
2230
2252
|
type: "button",
|
|
2231
2253
|
disabled: o.value,
|
|
2232
2254
|
"aria-busy": e.loading,
|
|
2233
|
-
onClick:
|
|
2234
|
-
class:
|
|
2235
|
-
}, [e.loading ? (
|
|
2255
|
+
onClick: s,
|
|
2256
|
+
class: y(["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" : "", F(i) ? "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"]])
|
|
2257
|
+
}, [e.loading ? (E(), c("svg", Ar, [...n[0] ||= [l("circle", {
|
|
2236
2258
|
class: "opacity-25",
|
|
2237
2259
|
cx: "12",
|
|
2238
2260
|
cy: "12",
|
|
2239
2261
|
r: "10",
|
|
2240
2262
|
stroke: "currentColor",
|
|
2241
2263
|
"stroke-width": "4"
|
|
2242
|
-
}, null, -1),
|
|
2264
|
+
}, null, -1), l("path", {
|
|
2243
2265
|
class: "opacity-75",
|
|
2244
2266
|
fill: "currentColor",
|
|
2245
2267
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2246
|
-
}, null, -1)]])) : (
|
|
2268
|
+
}, null, -1)]])) : (E(), c("svg", jr, [...n[1] ||= [d("<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)]])), l("span", null, P(e.label), 1)], 10, kr));
|
|
2247
2269
|
}
|
|
2248
|
-
}),
|
|
2270
|
+
}), Nr = {
|
|
2249
2271
|
key: 0,
|
|
2250
2272
|
class: "flex justify-center mb-6"
|
|
2251
|
-
},
|
|
2273
|
+
}, Pr = { class: "mb-6 text-center" }, Fr = { class: "flex items-center gap-3 my-5" }, Ir = ["disabled"], Lr = { class: "flex items-center justify-between mb-1.5" }, Rr = { class: "relative" }, zr = ["type", "disabled"], Br = ["aria-label", "aria-pressed"], Vr = ["disabled"], Hr = ["disabled", "aria-busy"], Ur = {
|
|
2252
2274
|
key: 0,
|
|
2253
2275
|
class: "w-4 h-4 animate-spin",
|
|
2254
2276
|
viewBox: "0 0 24 24",
|
|
2255
2277
|
fill: "none",
|
|
2256
2278
|
"aria-hidden": "true"
|
|
2257
|
-
},
|
|
2279
|
+
}, Wr = /* @__PURE__ */ m({
|
|
2258
2280
|
__name: "BaseLoginForm",
|
|
2259
2281
|
props: {
|
|
2260
2282
|
title: { default: "Sign in" },
|
|
@@ -2280,56 +2302,56 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2280
2302
|
},
|
|
2281
2303
|
emits: ["submit", "google-sign-in"],
|
|
2282
2304
|
setup(t, { emit: n }) {
|
|
2283
|
-
let r = t,
|
|
2284
|
-
function
|
|
2285
|
-
_.value ||
|
|
2286
|
-
email:
|
|
2305
|
+
let r = t, i = n, { isDark: o } = W(), u = Z(), d = k(""), m = k(""), h = k(!1), g = k(!1), _ = a(() => r.loading || r.googleLoading);
|
|
2306
|
+
function v() {
|
|
2307
|
+
_.value || i("submit", {
|
|
2308
|
+
email: d.value,
|
|
2287
2309
|
password: m.value,
|
|
2288
2310
|
...r.showRemember ? { remember: h.value } : {}
|
|
2289
2311
|
});
|
|
2290
2312
|
}
|
|
2291
|
-
return (n, r) => (
|
|
2292
|
-
n.$slots.logo ? (
|
|
2293
|
-
|
|
2313
|
+
return (n, r) => (E(), c("div", { class: y(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", F(u).card]) }, [
|
|
2314
|
+
n.$slots.logo ? (E(), c("div", Nr, [j(n.$slots, "logo")])) : s("", !0),
|
|
2315
|
+
l("div", Pr, [l("h1", { class: y(["text-xl font-semibold", F(u).primaryText]) }, P(t.title), 3), t.subtitle ? (E(), c("p", {
|
|
2294
2316
|
key: 0,
|
|
2295
|
-
class:
|
|
2296
|
-
},
|
|
2297
|
-
t.error ? (
|
|
2317
|
+
class: y(["mt-1 text-sm", F(u).mutedText])
|
|
2318
|
+
}, P(t.subtitle), 3)) : s("", !0)]),
|
|
2319
|
+
t.error ? (E(), c("div", {
|
|
2298
2320
|
key: 1,
|
|
2299
2321
|
role: "alert",
|
|
2300
|
-
class:
|
|
2301
|
-
},
|
|
2302
|
-
t.showGoogle ? (
|
|
2322
|
+
class: y(["mb-4 rounded-lg border px-3 py-2 text-sm", F(o) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2323
|
+
}, P(t.error), 3)) : s("", !0),
|
|
2324
|
+
t.showGoogle ? (E(), c(e, { key: 2 }, [p(Mr, {
|
|
2303
2325
|
loading: t.googleLoading,
|
|
2304
2326
|
disabled: t.loading,
|
|
2305
|
-
onClick: r[0] ||= (e) =>
|
|
2306
|
-
}, null, 8, ["loading", "disabled"]),
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
])], 64)) :
|
|
2311
|
-
|
|
2327
|
+
onClick: r[0] ||= (e) => i("google-sign-in")
|
|
2328
|
+
}, null, 8, ["loading", "disabled"]), l("div", Fr, [
|
|
2329
|
+
l("span", { class: y(["h-px flex-1", F(o) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2330
|
+
l("span", { class: y(["text-xs uppercase tracking-wider", F(u).dimTextAlt]) }, "or", 2),
|
|
2331
|
+
l("span", { class: y(["h-px flex-1", F(o) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
2332
|
+
])], 64)) : s("", !0),
|
|
2333
|
+
l("form", {
|
|
2312
2334
|
class: "space-y-4",
|
|
2313
|
-
onSubmit:
|
|
2335
|
+
onSubmit: z(v, ["prevent"])
|
|
2314
2336
|
}, [
|
|
2315
|
-
|
|
2337
|
+
l("div", null, [l("label", {
|
|
2316
2338
|
for: "login-email",
|
|
2317
|
-
class:
|
|
2318
|
-
}, " Email ", 2),
|
|
2339
|
+
class: y(["block mb-1.5 text-sm font-medium", F(u).label])
|
|
2340
|
+
}, " Email ", 2), R(l("input", {
|
|
2319
2341
|
id: "login-email",
|
|
2320
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
2342
|
+
"onUpdate:modelValue": r[1] ||= (e) => d.value = e,
|
|
2321
2343
|
type: "email",
|
|
2322
2344
|
name: "email",
|
|
2323
2345
|
autocomplete: "email",
|
|
2324
2346
|
required: "",
|
|
2325
2347
|
disabled: _.value,
|
|
2326
2348
|
placeholder: "you@example.com",
|
|
2327
|
-
class:
|
|
2328
|
-
}, null, 10,
|
|
2329
|
-
|
|
2349
|
+
class: y(["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", F(u).inputWithPlaceholder])
|
|
2350
|
+
}, null, 10, Ir), [[ie, d.value]])]),
|
|
2351
|
+
l("div", null, [l("div", Lr, [l("label", {
|
|
2330
2352
|
for: "login-password",
|
|
2331
|
-
class:
|
|
2332
|
-
}, " Password ", 2),
|
|
2353
|
+
class: y(["block text-sm font-medium", F(u).label])
|
|
2354
|
+
}, " Password ", 2), j(n.$slots, "forgot")]), l("div", Rr, [R(l("input", {
|
|
2333
2355
|
id: "login-password",
|
|
2334
2356
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2335
2357
|
type: g.value ? "text" : "password",
|
|
@@ -2338,51 +2360,51 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2338
2360
|
required: "",
|
|
2339
2361
|
disabled: _.value,
|
|
2340
2362
|
placeholder: "••••••••",
|
|
2341
|
-
class:
|
|
2342
|
-
}, null, 10,
|
|
2363
|
+
class: y(["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", F(u).inputWithPlaceholder])
|
|
2364
|
+
}, null, 10, zr), [[re, m.value]]), l("button", {
|
|
2343
2365
|
type: "button",
|
|
2344
2366
|
onClick: r[3] ||= (e) => g.value = !g.value,
|
|
2345
2367
|
"aria-label": g.value ? "Hide password" : "Show password",
|
|
2346
2368
|
"aria-pressed": g.value,
|
|
2347
|
-
class:
|
|
2348
|
-
},
|
|
2349
|
-
t.showRemember ? (
|
|
2369
|
+
class: y(["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", F(u).mutedText])
|
|
2370
|
+
}, P(g.value ? "Hide" : "Show"), 11, Br)])]),
|
|
2371
|
+
t.showRemember ? (E(), c("label", {
|
|
2350
2372
|
key: 0,
|
|
2351
|
-
class:
|
|
2352
|
-
}, [
|
|
2373
|
+
class: y(["flex items-center gap-2 text-sm cursor-pointer select-none", F(u).bodyText])
|
|
2374
|
+
}, [R(l("input", {
|
|
2353
2375
|
"onUpdate:modelValue": r[4] ||= (e) => h.value = e,
|
|
2354
2376
|
type: "checkbox",
|
|
2355
2377
|
disabled: _.value,
|
|
2356
2378
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2357
|
-
}, null, 8,
|
|
2358
|
-
|
|
2379
|
+
}, null, 8, Vr), [[ne, h.value]]), r[5] ||= f(" Remember me ", -1)], 2)) : s("", !0),
|
|
2380
|
+
l("button", {
|
|
2359
2381
|
type: "submit",
|
|
2360
2382
|
disabled: _.value,
|
|
2361
2383
|
"aria-busy": t.loading,
|
|
2362
2384
|
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"
|
|
2363
|
-
}, [t.loading ? (
|
|
2385
|
+
}, [t.loading ? (E(), c("svg", Ur, [...r[6] ||= [l("circle", {
|
|
2364
2386
|
class: "opacity-25",
|
|
2365
2387
|
cx: "12",
|
|
2366
2388
|
cy: "12",
|
|
2367
2389
|
r: "10",
|
|
2368
2390
|
stroke: "currentColor",
|
|
2369
2391
|
"stroke-width": "4"
|
|
2370
|
-
}, null, -1),
|
|
2392
|
+
}, null, -1), l("path", {
|
|
2371
2393
|
class: "opacity-75",
|
|
2372
2394
|
fill: "currentColor",
|
|
2373
2395
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2374
|
-
}, null, -1)]])) :
|
|
2396
|
+
}, null, -1)]])) : s("", !0), f(" " + P(t.submitLabel), 1)], 8, Hr)
|
|
2375
2397
|
], 32),
|
|
2376
|
-
n.$slots.footer ? (
|
|
2398
|
+
n.$slots.footer ? (E(), c("div", {
|
|
2377
2399
|
key: 3,
|
|
2378
|
-
class:
|
|
2379
|
-
}, [
|
|
2400
|
+
class: y(["mt-6 text-center text-sm", F(u).mutedText])
|
|
2401
|
+
}, [j(n.$slots, "footer")], 2)) : s("", !0)
|
|
2380
2402
|
], 2));
|
|
2381
2403
|
}
|
|
2382
|
-
}),
|
|
2404
|
+
}), Gr = ["aria-label"], Kr = { class: "flex-1 overflow-y-auto" }, qr = {
|
|
2383
2405
|
key: 0,
|
|
2384
2406
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2385
|
-
},
|
|
2407
|
+
}, Jr = ["onClick"], Yr = { class: "min-w-0 flex-1" }, Xr = { class: "flex items-baseline justify-between gap-2" }, Zr = /* @__PURE__ */ m({
|
|
2386
2408
|
__name: "BaseNotificationPanel",
|
|
2387
2409
|
props: {
|
|
2388
2410
|
title: { default: "Notifications" },
|
|
@@ -2393,86 +2415,86 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2393
2415
|
}
|
|
2394
2416
|
},
|
|
2395
2417
|
emits: ["select"],
|
|
2396
|
-
setup(n, { emit:
|
|
2397
|
-
let u =
|
|
2418
|
+
setup(n, { emit: i }) {
|
|
2419
|
+
let u = i, { isDark: d } = W(), m = Z(), { notifications: h, unreadCount: g, open: _, closePanel: v, markAllRead: b, markRead: x } = Un(), S = {
|
|
2398
2420
|
info: "bg-sky-500",
|
|
2399
2421
|
success: "bg-emerald-500",
|
|
2400
2422
|
warning: "bg-amber-500",
|
|
2401
2423
|
error: "bg-red-500"
|
|
2402
|
-
}, C =
|
|
2424
|
+
}, C = a(() => h.value.length);
|
|
2403
2425
|
function w(e) {
|
|
2404
2426
|
x(e), u("select", e);
|
|
2405
2427
|
}
|
|
2406
|
-
return
|
|
2407
|
-
_.value &&
|
|
2408
|
-
}), (i,
|
|
2428
|
+
return dn(() => {
|
|
2429
|
+
_.value && v();
|
|
2430
|
+
}), (i, a) => (E(), o(t, { to: "body" }, [p(r, {
|
|
2409
2431
|
"enter-active-class": "transition-opacity duration-200",
|
|
2410
2432
|
"enter-from-class": "opacity-0",
|
|
2411
2433
|
"leave-active-class": "transition-opacity duration-200",
|
|
2412
2434
|
"leave-to-class": "opacity-0"
|
|
2413
2435
|
}, {
|
|
2414
|
-
default:
|
|
2436
|
+
default: L(() => [F(_) ? (E(), c("div", {
|
|
2415
2437
|
key: 0,
|
|
2416
2438
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2417
2439
|
"aria-hidden": "true",
|
|
2418
|
-
onClick:
|
|
2419
|
-
})) :
|
|
2440
|
+
onClick: a[0] ||= (...e) => F(v) && F(v)(...e)
|
|
2441
|
+
})) : s("", !0)]),
|
|
2420
2442
|
_: 1
|
|
2421
|
-
}),
|
|
2443
|
+
}), p(r, {
|
|
2422
2444
|
"enter-active-class": "transition-transform duration-300 ease-out",
|
|
2423
2445
|
"enter-from-class": "-translate-x-full",
|
|
2424
2446
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2425
2447
|
"leave-to-class": "-translate-x-full"
|
|
2426
2448
|
}, {
|
|
2427
|
-
default:
|
|
2449
|
+
default: L(() => [F(_) ? (E(), c("aside", {
|
|
2428
2450
|
key: 0,
|
|
2429
2451
|
role: "dialog",
|
|
2430
2452
|
"aria-modal": "true",
|
|
2431
2453
|
"aria-label": n.title,
|
|
2432
|
-
class:
|
|
2454
|
+
class: y(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl", F(d) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"])
|
|
2433
2455
|
}, [
|
|
2434
|
-
|
|
2456
|
+
l("div", { class: y(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0", F(m).border]) }, [l("h2", { class: y(["text-lg font-semibold flex items-center gap-2", F(m).primaryText]) }, [f(P(n.title) + " ", 1), l("span", { class: y(["text-sm font-normal", F(m).dimTextAlt]) }, "— " + P(C.value), 3)], 2), l("button", {
|
|
2435
2457
|
type: "button",
|
|
2436
|
-
onClick:
|
|
2458
|
+
onClick: a[1] ||= (...e) => F(v) && F(v)(...e),
|
|
2437
2459
|
"aria-label": "Close notifications",
|
|
2438
|
-
class:
|
|
2439
|
-
}, [
|
|
2460
|
+
class: y(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", F(d) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2461
|
+
}, [p(F(B), {
|
|
2440
2462
|
class: "w-5 h-5",
|
|
2441
2463
|
"aria-hidden": "true"
|
|
2442
2464
|
})], 2)], 2),
|
|
2443
|
-
n.showMarkAllRead &&
|
|
2465
|
+
n.showMarkAllRead && F(g) > 0 ? (E(), c("div", {
|
|
2444
2466
|
key: 0,
|
|
2445
|
-
class:
|
|
2446
|
-
}, [
|
|
2467
|
+
class: y(["px-5 py-2 border-b shrink-0 flex justify-end", F(m).border])
|
|
2468
|
+
}, [l("button", {
|
|
2447
2469
|
type: "button",
|
|
2448
|
-
onClick:
|
|
2449
|
-
class:
|
|
2450
|
-
}, " Mark all as read ", 2)], 2)) :
|
|
2451
|
-
|
|
2452
|
-
class:
|
|
2470
|
+
onClick: a[2] ||= (...e) => F(b) && F(b)(...e),
|
|
2471
|
+
class: y(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", F(m).emeraldText])
|
|
2472
|
+
}, " Mark all as read ", 2)], 2)) : s("", !0),
|
|
2473
|
+
l("div", Kr, [C.value === 0 ? (E(), c("div", qr, [p(F(de), {
|
|
2474
|
+
class: y(["w-10 h-10", F(m).illustration]),
|
|
2453
2475
|
"aria-hidden": "true"
|
|
2454
|
-
}, null, 8, ["class"]),
|
|
2476
|
+
}, null, 8, ["class"]), l("p", { class: y(["text-sm", F(m).mutedText]) }, P(n.emptyText), 3)])) : (E(), c("ul", {
|
|
2455
2477
|
key: 1,
|
|
2456
|
-
class:
|
|
2457
|
-
}, [(
|
|
2478
|
+
class: y(["divide-y", F(d) ? "divide-gray-800" : "divide-gray-100"])
|
|
2479
|
+
}, [(E(!0), c(e, null, A(F(h), (e) => (E(), c("li", { key: e.id }, [l("button", {
|
|
2458
2480
|
type: "button",
|
|
2459
2481
|
onClick: (t) => w(e.id),
|
|
2460
|
-
class:
|
|
2461
|
-
}, [
|
|
2462
|
-
class:
|
|
2482
|
+
class: y(["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 ? "" : F(d) ? "bg-emerald-500/5" : "bg-emerald-50/60", F(d) ? "hover:bg-gray-800" : "hover:bg-gray-50"]])
|
|
2483
|
+
}, [l("span", {
|
|
2484
|
+
class: y(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? F(d) ? "bg-gray-700" : "bg-gray-300" : S[e.type ?? "info"]]),
|
|
2463
2485
|
"aria-hidden": "true"
|
|
2464
|
-
}, null, 2),
|
|
2486
|
+
}, null, 2), l("span", Yr, [l("span", Xr, [l("span", { class: y(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", F(m).primaryTextSoft]]) }, P(e.title), 3), e.time ? (E(), c("span", {
|
|
2465
2487
|
key: 0,
|
|
2466
|
-
class:
|
|
2467
|
-
},
|
|
2488
|
+
class: y(["text-xs shrink-0", F(m).dimText])
|
|
2489
|
+
}, P(e.time), 3)) : s("", !0)]), e.message ? (E(), c("span", {
|
|
2468
2490
|
key: 0,
|
|
2469
|
-
class:
|
|
2470
|
-
},
|
|
2471
|
-
], 10,
|
|
2491
|
+
class: y(["mt-0.5 block text-sm", F(m).mutedText])
|
|
2492
|
+
}, P(e.message), 3)) : s("", !0)])], 10, Jr)]))), 128))], 2))])
|
|
2493
|
+
], 10, Gr)) : s("", !0)]),
|
|
2472
2494
|
_: 1
|
|
2473
2495
|
})]));
|
|
2474
2496
|
}
|
|
2475
|
-
}),
|
|
2497
|
+
}), Qr = ["disabled"], $r = /* @__PURE__ */ m({
|
|
2476
2498
|
__name: "BaseChipButton",
|
|
2477
2499
|
props: {
|
|
2478
2500
|
size: { default: "sm" },
|
|
@@ -2483,56 +2505,56 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2483
2505
|
},
|
|
2484
2506
|
emits: ["click"],
|
|
2485
2507
|
setup(e, { emit: t }) {
|
|
2486
|
-
let n = t, { isDark: r } =
|
|
2487
|
-
return (t, i) => (
|
|
2508
|
+
let n = t, { isDark: r } = W();
|
|
2509
|
+
return (t, i) => (E(), c("button", {
|
|
2488
2510
|
type: "button",
|
|
2489
2511
|
disabled: e.disabled,
|
|
2490
|
-
class:
|
|
2512
|
+
class: y(["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", F(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"]]),
|
|
2491
2513
|
onClick: i[0] ||= (e) => n("click")
|
|
2492
|
-
}, [
|
|
2514
|
+
}, [j(t.$slots, "default")], 10, Qr));
|
|
2493
2515
|
}
|
|
2494
|
-
}),
|
|
2516
|
+
}), ei = /* @__PURE__ */ m({
|
|
2495
2517
|
__name: "BaseRemoveButton",
|
|
2496
2518
|
emits: ["click"],
|
|
2497
2519
|
setup(e, { emit: t }) {
|
|
2498
2520
|
let n = t;
|
|
2499
|
-
return (e, t) => (
|
|
2521
|
+
return (e, t) => (E(), c("button", {
|
|
2500
2522
|
type: "button",
|
|
2501
2523
|
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",
|
|
2502
2524
|
onClick: t[0] ||= (e) => n("click")
|
|
2503
2525
|
}, " × "));
|
|
2504
2526
|
}
|
|
2505
|
-
}),
|
|
2527
|
+
}), ti = { class: "relative flex h-2 w-2" }, ni = {
|
|
2506
2528
|
key: 0,
|
|
2507
2529
|
class: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75",
|
|
2508
2530
|
"aria-hidden": "true"
|
|
2509
|
-
},
|
|
2531
|
+
}, ri = /* @__PURE__ */ m({
|
|
2510
2532
|
__name: "BaseStatusPill",
|
|
2511
2533
|
props: {
|
|
2512
2534
|
status: {},
|
|
2513
2535
|
label: {}
|
|
2514
2536
|
},
|
|
2515
2537
|
setup(e) {
|
|
2516
|
-
let t = e, { isDark: n } =
|
|
2538
|
+
let t = e, { isDark: n } = W(), r = a(() => {
|
|
2517
2539
|
switch (t.status) {
|
|
2518
2540
|
case "ok": return n.value ? "bg-emerald-500/10 text-emerald-400" : "bg-emerald-50 text-emerald-700";
|
|
2519
2541
|
case "error": return n.value ? "bg-red-500/10 text-red-400" : "bg-red-50 text-red-700";
|
|
2520
2542
|
default: return n.value ? "bg-gray-700 text-gray-400" : "bg-gray-100 text-gray-500";
|
|
2521
2543
|
}
|
|
2522
|
-
}),
|
|
2544
|
+
}), i = a(() => {
|
|
2523
2545
|
switch (t.status) {
|
|
2524
2546
|
case "ok": return "bg-emerald-500";
|
|
2525
2547
|
case "error": return "bg-red-500";
|
|
2526
2548
|
default: return "bg-gray-400";
|
|
2527
2549
|
}
|
|
2528
2550
|
});
|
|
2529
|
-
return (t, n) => (
|
|
2551
|
+
return (t, n) => (E(), c("div", { class: y(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", r.value]) }, [l("span", ti, [e.status === "ok" ? (E(), c("span", ni)) : s("", !0), l("span", { class: y(["relative inline-flex rounded-full h-2 w-2", i.value]) }, null, 2)]), f(" " + P(e.label), 1)], 2));
|
|
2530
2552
|
}
|
|
2531
|
-
}),
|
|
2553
|
+
}), ii = { class: "text-sm font-medium" }, ai = [
|
|
2532
2554
|
"accept",
|
|
2533
2555
|
"multiple",
|
|
2534
2556
|
"disabled"
|
|
2535
|
-
],
|
|
2557
|
+
], oi = /* @__PURE__ */ m({
|
|
2536
2558
|
__name: "BaseFileDropzone",
|
|
2537
2559
|
props: {
|
|
2538
2560
|
label: {},
|
|
@@ -2549,8 +2571,8 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2549
2571
|
},
|
|
2550
2572
|
emits: ["files"],
|
|
2551
2573
|
setup(e, { emit: t }) {
|
|
2552
|
-
let n = e, r = t, { isDark: i } =
|
|
2553
|
-
function
|
|
2574
|
+
let n = e, r = t, { isDark: i } = W(), a = k(!1);
|
|
2575
|
+
function o(e) {
|
|
2554
2576
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2555
2577
|
t.value = "", n.length && r("files", n);
|
|
2556
2578
|
}
|
|
@@ -2562,40 +2584,40 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2562
2584
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
2563
2585
|
t.length && r("files", n.multiple ? t : t.slice(0, 1));
|
|
2564
2586
|
}
|
|
2565
|
-
return (t, n) => (
|
|
2566
|
-
class:
|
|
2567
|
-
onDragover:
|
|
2568
|
-
onDragleave: n[0] ||=
|
|
2569
|
-
onDrop:
|
|
2587
|
+
return (t, n) => (E(), c("label", {
|
|
2588
|
+
class: y(["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", a.value ? F(i) ? "border-emerald-500 text-emerald-400" : "border-emerald-500 text-emerald-600" : F(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"]]),
|
|
2589
|
+
onDragover: z(u, ["prevent"]),
|
|
2590
|
+
onDragleave: n[0] ||= z((e) => a.value = !1, ["prevent"]),
|
|
2591
|
+
onDrop: z(d, ["prevent"])
|
|
2570
2592
|
}, [
|
|
2571
|
-
|
|
2593
|
+
j(t.$slots, "icon", {}, () => [n[1] ||= l("svg", {
|
|
2572
2594
|
class: "w-10 h-10",
|
|
2573
2595
|
fill: "none",
|
|
2574
2596
|
viewBox: "0 0 24 24",
|
|
2575
2597
|
stroke: "currentColor",
|
|
2576
2598
|
"stroke-width": "1.5",
|
|
2577
2599
|
"aria-hidden": "true"
|
|
2578
|
-
}, [
|
|
2600
|
+
}, [l("path", {
|
|
2579
2601
|
"stroke-linecap": "round",
|
|
2580
2602
|
"stroke-linejoin": "round",
|
|
2581
2603
|
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"
|
|
2582
2604
|
})], -1)]),
|
|
2583
|
-
|
|
2584
|
-
e.hint ? (
|
|
2605
|
+
l("p", ii, P(e.label), 1),
|
|
2606
|
+
e.hint ? (E(), c("p", {
|
|
2585
2607
|
key: 0,
|
|
2586
|
-
class:
|
|
2587
|
-
},
|
|
2588
|
-
|
|
2608
|
+
class: y(["text-xs", F(i) ? "text-gray-500" : "text-gray-400"])
|
|
2609
|
+
}, P(e.hint), 3)) : s("", !0),
|
|
2610
|
+
l("input", {
|
|
2589
2611
|
type: "file",
|
|
2590
2612
|
class: "hidden",
|
|
2591
2613
|
accept: e.accept,
|
|
2592
2614
|
multiple: e.multiple,
|
|
2593
2615
|
disabled: e.disabled,
|
|
2594
|
-
onChange:
|
|
2595
|
-
}, null, 40,
|
|
2616
|
+
onChange: o
|
|
2617
|
+
}, null, 40, ai)
|
|
2596
2618
|
], 34));
|
|
2597
2619
|
}
|
|
2598
|
-
}),
|
|
2620
|
+
}), si = /* @__PURE__ */ m({
|
|
2599
2621
|
__name: "BaseCodeBlock",
|
|
2600
2622
|
props: {
|
|
2601
2623
|
code: {},
|
|
@@ -2604,7 +2626,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2604
2626
|
maxHeightClass: { default: "" }
|
|
2605
2627
|
},
|
|
2606
2628
|
setup(e) {
|
|
2607
|
-
let t = e, { isDark: n } =
|
|
2629
|
+
let t = e, { isDark: n } = W(), r = {
|
|
2608
2630
|
soft: {
|
|
2609
2631
|
dark: "bg-gray-800/70 text-gray-300",
|
|
2610
2632
|
light: "bg-gray-100 text-gray-700"
|
|
@@ -2613,20 +2635,20 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2613
2635
|
dark: "border bg-gray-900 border-gray-700 text-gray-300",
|
|
2614
2636
|
light: "border bg-white border-gray-200 text-gray-700"
|
|
2615
2637
|
}
|
|
2616
|
-
},
|
|
2638
|
+
}, i = {
|
|
2617
2639
|
sm: "text-sm px-5 py-4 rounded-lg",
|
|
2618
2640
|
xs: "text-xs p-3 rounded-lg"
|
|
2619
|
-
}, o =
|
|
2641
|
+
}, o = a(() => {
|
|
2620
2642
|
let e = r[t.variant];
|
|
2621
2643
|
return n.value ? e.dark : e.light;
|
|
2622
|
-
}),
|
|
2623
|
-
return (t, n) => (
|
|
2624
|
-
|
|
2644
|
+
}), s = a(() => i[t.size]);
|
|
2645
|
+
return (t, n) => (E(), c("pre", { class: y(["font-mono overflow-auto", [
|
|
2646
|
+
s.value,
|
|
2625
2647
|
o.value,
|
|
2626
2648
|
e.maxHeightClass
|
|
2627
|
-
]]) },
|
|
2649
|
+
]]) }, P(e.code), 3));
|
|
2628
2650
|
}
|
|
2629
|
-
}),
|
|
2651
|
+
}), ci = ["value", "type"], li = /* @__PURE__ */ m({
|
|
2630
2652
|
__name: "BaseInput",
|
|
2631
2653
|
props: {
|
|
2632
2654
|
modelValue: { default: "" },
|
|
@@ -2643,14 +2665,14 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2643
2665
|
function r(e) {
|
|
2644
2666
|
n("update:modelValue", e.target.value);
|
|
2645
2667
|
}
|
|
2646
|
-
return (t, n) => (
|
|
2668
|
+
return (t, n) => (E(), c("input", {
|
|
2647
2669
|
value: e.modelValue,
|
|
2648
2670
|
type: e.type,
|
|
2649
|
-
class:
|
|
2671
|
+
class: y(["rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm placeholder:text-slate-400 dark:placeholder:text-slate-500 transition-colors hover:border-slate-400 dark:hover:border-slate-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/40 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"]]),
|
|
2650
2672
|
onInput: r
|
|
2651
|
-
}, null, 42,
|
|
2673
|
+
}, null, 42, ci));
|
|
2652
2674
|
}
|
|
2653
|
-
}),
|
|
2675
|
+
}), ui = ["value"], di = /* @__PURE__ */ m({
|
|
2654
2676
|
inheritAttrs: !1,
|
|
2655
2677
|
__name: "BaseSelect",
|
|
2656
2678
|
props: {
|
|
@@ -2659,28 +2681,35 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2659
2681
|
block: {
|
|
2660
2682
|
type: Boolean,
|
|
2661
2683
|
default: !0
|
|
2684
|
+
},
|
|
2685
|
+
humanize: {
|
|
2686
|
+
type: Boolean,
|
|
2687
|
+
default: !0
|
|
2662
2688
|
}
|
|
2663
2689
|
},
|
|
2664
2690
|
emits: ["update:modelValue"],
|
|
2665
2691
|
setup(e, { emit: t }) {
|
|
2666
|
-
let n =
|
|
2667
|
-
|
|
2668
|
-
n("
|
|
2692
|
+
let n = e, r = te(), i = () => {
|
|
2693
|
+
let e = r.default?.() ?? [];
|
|
2694
|
+
return n.humanize ? Ve(e, ["option", "optgroup"]) : e;
|
|
2695
|
+
}, a = t;
|
|
2696
|
+
function o(e) {
|
|
2697
|
+
a("update:modelValue", e.target.value);
|
|
2669
2698
|
}
|
|
2670
|
-
return (t, n) => (
|
|
2699
|
+
return (t, n) => (E(), c("div", { class: y(["relative", e.block ? "w-full" : "inline-block"]) }, [l("select", _(t.$attrs, {
|
|
2671
2700
|
value: e.modelValue,
|
|
2672
|
-
class: ["w-full appearance-none bg-none rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors hover:border-slate-400 dark:hover:border-slate-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/40 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", e.size === "md" ? "py-2 pl-3 pr-9" : "py-1.5 pl-2.5 pr-8"],
|
|
2673
|
-
onChange:
|
|
2674
|
-
}), [
|
|
2675
|
-
class:
|
|
2701
|
+
class: ["base-select w-full appearance-none bg-none rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors hover:border-slate-400 dark:hover:border-slate-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/40 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", e.size === "md" ? "py-2 pl-3 pr-9" : "py-1.5 pl-2.5 pr-8"],
|
|
2702
|
+
onChange: o
|
|
2703
|
+
}), [p(i)], 16, ui), p(F(ge), {
|
|
2704
|
+
class: y(["pointer-events-none absolute top-1/2 h-4 w-4 -translate-y-1/2 text-slate-500 dark:text-slate-400", e.size === "md" ? "right-3" : "right-2.5"]),
|
|
2676
2705
|
"aria-hidden": "true"
|
|
2677
2706
|
}, null, 8, ["class"])], 2));
|
|
2678
2707
|
}
|
|
2679
|
-
}),
|
|
2708
|
+
}), fi = [
|
|
2680
2709
|
"disabled",
|
|
2681
2710
|
"aria-label",
|
|
2682
2711
|
"aria-expanded"
|
|
2683
|
-
],
|
|
2712
|
+
], pi = ["aria-label"], mi = ["aria-selected", "title"], hi = ["disabled", "onClick"], gi = /* @__PURE__ */ m({
|
|
2684
2713
|
__name: "BaseDropdown",
|
|
2685
2714
|
props: {
|
|
2686
2715
|
options: {},
|
|
@@ -2701,7 +2730,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2701
2730
|
},
|
|
2702
2731
|
emits: ["update:modelValue"],
|
|
2703
2732
|
setup(t, { emit: n }) {
|
|
2704
|
-
let r = t,
|
|
2733
|
+
let r = t, i = n, o = k(!1), u = k(null), d = a(() => r.options.find((e) => e.value === r.modelValue) ?? null), f = a(() => {
|
|
2705
2734
|
let e = "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 ";
|
|
2706
2735
|
if (r.triggerClass) return e + r.triggerClass;
|
|
2707
2736
|
let t = r.size === "sm" ? "px-3 py-2" : "px-4 py-2.5";
|
|
@@ -2711,54 +2740,54 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2711
2740
|
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 === r.modelValue ? "bg-emerald-500 text-white" : "text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800"}`;
|
|
2712
2741
|
}
|
|
2713
2742
|
function h() {
|
|
2714
|
-
r.disabled || (
|
|
2743
|
+
r.disabled || (o.value = !o.value);
|
|
2715
2744
|
}
|
|
2716
2745
|
function g(e) {
|
|
2717
|
-
e.disabled || (
|
|
2746
|
+
e.disabled || (i("update:modelValue", e.value), o.value = !1);
|
|
2718
2747
|
}
|
|
2719
|
-
|
|
2720
|
-
|
|
2748
|
+
dn(() => {
|
|
2749
|
+
o.value = !1;
|
|
2721
2750
|
});
|
|
2722
2751
|
function _(e) {
|
|
2723
|
-
|
|
2752
|
+
o.value && u.value && !u.value.contains(e.target) && (o.value = !1);
|
|
2724
2753
|
}
|
|
2725
|
-
return
|
|
2754
|
+
return C(() => document.addEventListener("click", _)), S(() => document.removeEventListener("click", _)), (n, r) => (E(), c("div", {
|
|
2726
2755
|
ref_key: "rootEl",
|
|
2727
2756
|
ref: u,
|
|
2728
|
-
class:
|
|
2729
|
-
}, [
|
|
2757
|
+
class: y(t.block ? "relative w-full" : "relative inline-block")
|
|
2758
|
+
}, [l("button", {
|
|
2730
2759
|
type: "button",
|
|
2731
|
-
class:
|
|
2760
|
+
class: y([f.value, t.block ? "w-full" : ""]),
|
|
2732
2761
|
disabled: t.disabled,
|
|
2733
2762
|
"aria-label": t.ariaLabel || void 0,
|
|
2734
2763
|
"aria-haspopup": "listbox",
|
|
2735
|
-
"aria-expanded":
|
|
2764
|
+
"aria-expanded": o.value,
|
|
2736
2765
|
onClick: h
|
|
2737
|
-
}, [
|
|
2738
|
-
class:
|
|
2766
|
+
}, [l("span", { class: y(["min-w-0 truncate", d.value ? "" : "text-slate-400 dark:text-slate-500"]) }, P(d.value ? d.value.label : t.placeholder), 3), p(F(ge), {
|
|
2767
|
+
class: y(["shrink-0 transition-transform", [t.chevronClass, o.value ? "rotate-180" : ""]]),
|
|
2739
2768
|
"aria-hidden": "true"
|
|
2740
|
-
}, null, 8, ["class"])], 10,
|
|
2769
|
+
}, null, 8, ["class"])], 10, fi), o.value ? (E(), c("ul", {
|
|
2741
2770
|
key: 0,
|
|
2742
2771
|
role: "listbox",
|
|
2743
2772
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
2744
2773
|
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"
|
|
2745
|
-
}, [(
|
|
2774
|
+
}, [(E(!0), c(e, null, A(t.options, (e) => (E(), c("li", {
|
|
2746
2775
|
key: String(e.value),
|
|
2747
2776
|
role: "option",
|
|
2748
2777
|
"aria-selected": e.value === t.modelValue,
|
|
2749
2778
|
title: e.title
|
|
2750
|
-
}, [
|
|
2779
|
+
}, [l("button", {
|
|
2751
2780
|
type: "button",
|
|
2752
2781
|
disabled: e.disabled,
|
|
2753
|
-
class:
|
|
2782
|
+
class: y(m(e)),
|
|
2754
2783
|
onClick: (t) => g(e)
|
|
2755
|
-
},
|
|
2784
|
+
}, P(e.label), 11, hi)], 8, mi))), 128))], 8, pi)) : s("", !0)], 2));
|
|
2756
2785
|
}
|
|
2757
|
-
}),
|
|
2786
|
+
}), _i = ["role", "aria-label"], vi = [
|
|
2758
2787
|
"aria-pressed",
|
|
2759
2788
|
"title",
|
|
2760
2789
|
"onClick"
|
|
2761
|
-
],
|
|
2790
|
+
], yi = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", bi = /* @__PURE__ */ m({
|
|
2762
2791
|
__name: "BaseSegmentedControl",
|
|
2763
2792
|
props: {
|
|
2764
2793
|
options: {},
|
|
@@ -2772,25 +2801,25 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2772
2801
|
},
|
|
2773
2802
|
emits: ["update:modelValue"],
|
|
2774
2803
|
setup(t, { emit: n }) {
|
|
2775
|
-
let r = t,
|
|
2804
|
+
let r = t, i = n, o = a(() => r.variant === "toolbar" ? "inline-flex h-9 divide-x divide-slate-300 dark:divide-slate-600 rounded-md border border-slate-300 dark:border-slate-600 overflow-hidden" : "inline-flex rounded border border-slate-300 dark:border-slate-600 overflow-hidden"), s = a(() => r.variant === "toolbar" ? "flex items-center px-3.5 text-xs font-semibold uppercase tracking-wide transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500" : `${r.variant === "wide" ? "px-4 py-2" : "px-3 py-2"} text-sm font-medium transition-colors cursor-pointer border-l first:border-l-0 border-slate-300 dark:border-slate-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500`), l = a(() => r.variant === "wide" ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white");
|
|
2776
2805
|
function u(e) {
|
|
2777
2806
|
let t = e.value === r.modelValue;
|
|
2778
|
-
return r.optionClass ? r.optionClass(e, t) : t ? l.value :
|
|
2807
|
+
return r.optionClass ? r.optionClass(e, t) : t ? l.value : yi;
|
|
2779
2808
|
}
|
|
2780
|
-
return (n, r) => (
|
|
2809
|
+
return (n, r) => (E(), c("div", {
|
|
2781
2810
|
role: t.ariaLabel ? "group" : void 0,
|
|
2782
2811
|
"aria-label": t.ariaLabel || void 0,
|
|
2783
|
-
class:
|
|
2784
|
-
}, [(
|
|
2812
|
+
class: y(o.value)
|
|
2813
|
+
}, [(E(!0), c(e, null, A(t.options, (e) => (E(), c("button", {
|
|
2785
2814
|
key: String(e.value),
|
|
2786
2815
|
type: "button",
|
|
2787
|
-
class:
|
|
2816
|
+
class: y([s.value, u(e)]),
|
|
2788
2817
|
"aria-pressed": e.value === t.modelValue,
|
|
2789
2818
|
title: e.title,
|
|
2790
|
-
onClick: (t) =>
|
|
2791
|
-
},
|
|
2819
|
+
onClick: (t) => i("update:modelValue", e.value)
|
|
2820
|
+
}, P(e.label), 11, vi))), 128))], 10, _i));
|
|
2792
2821
|
}
|
|
2793
|
-
}),
|
|
2822
|
+
}), xi = { class: "w-full text-sm" }, Si = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, Ci = { class: "text-left border-b border-slate-200 dark:border-slate-700" }, wi = { class: "divide-y divide-slate-200 dark:divide-slate-700 [&>tr]:transition-colors [&>tr:hover]:bg-slate-50 dark:[&>tr:hover]:bg-slate-800/40" }, Ti = { key: 0 }, Ei = ["colspan"], Di = "overflow-x-auto rounded-xl border border-slate-200 bg-white shadow-sm dark:border-slate-700 dark:bg-slate-900", Oi = /* @__PURE__ */ m({
|
|
2794
2823
|
__name: "BaseTable",
|
|
2795
2824
|
props: {
|
|
2796
2825
|
columns: {},
|
|
@@ -2805,24 +2834,24 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2805
2834
|
}
|
|
2806
2835
|
},
|
|
2807
2836
|
setup(t) {
|
|
2808
|
-
return (n, r) => (
|
|
2837
|
+
return (n, r) => (E(), c("div", { class: y(t.card ? Di : void 0) }, [l("table", xi, [l("thead", Si, [l("tr", Ci, [(E(!0), c(e, null, A(t.columns, (e, t) => (E(), c("th", {
|
|
2809
2838
|
key: t,
|
|
2810
|
-
class:
|
|
2811
|
-
},
|
|
2839
|
+
class: y(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2840
|
+
}, P(e.label), 3))), 128))])]), l("tbody", wi, [t.empty ? (E(), c("tr", Ti, [l("td", {
|
|
2812
2841
|
colspan: t.columns.length,
|
|
2813
2842
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2814
|
-
}, [
|
|
2843
|
+
}, [j(n.$slots, "empty", {}, () => [f(P(t.emptyText), 1)])], 8, Ei)])) : s("", !0), j(n.$slots, "default")])])], 2));
|
|
2815
2844
|
}
|
|
2816
|
-
}),
|
|
2845
|
+
}), ki = { class: "grid gap-3 md:grid-cols-2" }, Ai = {
|
|
2817
2846
|
key: 0,
|
|
2818
2847
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2819
|
-
},
|
|
2848
|
+
}, ji = ["value"], Mi = {
|
|
2820
2849
|
key: 2,
|
|
2821
2850
|
class: "flex items-center gap-2 mt-4"
|
|
2822
|
-
},
|
|
2851
|
+
}, Ni = ["checked", "onChange"], Pi = { class: "text-sm text-slate-900 dark:text-slate-100" }, Fi = {
|
|
2823
2852
|
key: 4,
|
|
2824
2853
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2825
|
-
},
|
|
2854
|
+
}, Ii = /* @__PURE__ */ m({
|
|
2826
2855
|
__name: "BaseSpecFields",
|
|
2827
2856
|
props: {
|
|
2828
2857
|
specs: {},
|
|
@@ -2834,7 +2863,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2834
2863
|
function i(e, t) {
|
|
2835
2864
|
r("update", e, t.target.checked);
|
|
2836
2865
|
}
|
|
2837
|
-
function
|
|
2866
|
+
function a(e, t) {
|
|
2838
2867
|
let n = parseFloat(t);
|
|
2839
2868
|
if (Number.isNaN(n)) {
|
|
2840
2869
|
r("update", e.key, t);
|
|
@@ -2849,24 +2878,24 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2849
2878
|
let t = e.clipboardData?.getData("text") ?? "";
|
|
2850
2879
|
/^-?\d*$/.test(t.trim()) || e.preventDefault();
|
|
2851
2880
|
}
|
|
2852
|
-
return (n, f) => (
|
|
2853
|
-
f.type === "boolean" ?
|
|
2854
|
-
f.type === "select" ? (
|
|
2881
|
+
return (n, f) => (E(), c("div", ki, [(E(!0), c(e, null, A(t.specs, (f) => (E(), c("div", { key: f.key }, [
|
|
2882
|
+
f.type === "boolean" ? s("", !0) : (E(), c("label", Ai, P(f.label), 1)),
|
|
2883
|
+
f.type === "select" ? (E(), o(di, {
|
|
2855
2884
|
key: 1,
|
|
2856
2885
|
modelValue: String(t.params[f.key] ?? ""),
|
|
2857
2886
|
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
2858
2887
|
}, {
|
|
2859
|
-
default:
|
|
2888
|
+
default: L(() => [(E(!0), c(e, null, A(f.options ?? [], (e) => (E(), c("option", {
|
|
2860
2889
|
key: e,
|
|
2861
2890
|
value: e
|
|
2862
|
-
},
|
|
2891
|
+
}, P(e), 9, ji))), 128))]),
|
|
2863
2892
|
_: 2
|
|
2864
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (
|
|
2893
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (E(), c("label", Mi, [l("input", {
|
|
2865
2894
|
checked: !!t.params[f.key],
|
|
2866
2895
|
type: "checkbox",
|
|
2867
2896
|
class: "h-4 w-4",
|
|
2868
2897
|
onChange: (e) => i(f.key, e)
|
|
2869
|
-
}, null, 40,
|
|
2898
|
+
}, null, 40, Ni), l("span", Pi, P(f.label), 1)])) : (E(), o(li, {
|
|
2870
2899
|
key: 3,
|
|
2871
2900
|
modelValue: t.params[f.key],
|
|
2872
2901
|
type: "number",
|
|
@@ -2875,7 +2904,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2875
2904
|
inputmode: f.type === "integer" ? "numeric" : void 0,
|
|
2876
2905
|
onKeydown: (e) => f.type === "integer" && u(e),
|
|
2877
2906
|
onPaste: (e) => f.type === "integer" && d(e),
|
|
2878
|
-
"onUpdate:modelValue": (e) =>
|
|
2907
|
+
"onUpdate:modelValue": (e) => a(f, e)
|
|
2879
2908
|
}, null, 8, [
|
|
2880
2909
|
"modelValue",
|
|
2881
2910
|
"step",
|
|
@@ -2885,11 +2914,11 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2885
2914
|
"onPaste",
|
|
2886
2915
|
"onUpdate:modelValue"
|
|
2887
2916
|
])),
|
|
2888
|
-
f.help ? (
|
|
2889
|
-
|
|
2917
|
+
f.help ? (E(), c("p", Fi, P(f.help), 1)) : s("", !0),
|
|
2918
|
+
j(n.$slots, "after", { spec: f })
|
|
2890
2919
|
]))), 128))]));
|
|
2891
2920
|
}
|
|
2892
|
-
}),
|
|
2921
|
+
}), Li = { class: "mt-1.5 space-y-0.5 px-1" }, Ri = { class: "text-slate-400 dark:text-slate-500" }, zi = /* @__PURE__ */ m({
|
|
2893
2922
|
__name: "BaseStatBreakdown",
|
|
2894
2923
|
props: {
|
|
2895
2924
|
items: {},
|
|
@@ -2908,16 +2937,16 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2908
2937
|
function i(e) {
|
|
2909
2938
|
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";
|
|
2910
2939
|
}
|
|
2911
|
-
return (n, a) => (
|
|
2940
|
+
return (n, a) => (E(), c("div", Li, [(E(!0), c(e, null, A(t.items, (e) => (E(), c("div", {
|
|
2912
2941
|
key: e.label,
|
|
2913
2942
|
class: "flex items-center justify-between text-[11px]"
|
|
2914
|
-
}, [
|
|
2943
|
+
}, [l("span", Ri, P(e.label), 1), l("span", { class: y(["font-mono tabular-nums font-medium", i(e.value)]) }, P(r(e.value)), 3)]))), 128))]));
|
|
2915
2944
|
}
|
|
2916
|
-
}),
|
|
2945
|
+
}), Bi = [
|
|
2917
2946
|
"disabled",
|
|
2918
2947
|
"title",
|
|
2919
2948
|
"aria-pressed"
|
|
2920
|
-
],
|
|
2949
|
+
], Vi = /* @__PURE__ */ m({
|
|
2921
2950
|
__name: "BaseFilterChip",
|
|
2922
2951
|
props: {
|
|
2923
2952
|
label: { default: "" },
|
|
@@ -2946,21 +2975,21 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2946
2975
|
red: "border-red-500 bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-500",
|
|
2947
2976
|
slate: "border-slate-600 bg-slate-600 text-white hover:bg-slate-700 focus-visible:ring-emerald-500"
|
|
2948
2977
|
};
|
|
2949
|
-
return (r, i) => (
|
|
2978
|
+
return (r, i) => (E(), c("button", {
|
|
2950
2979
|
type: "button",
|
|
2951
2980
|
disabled: e.disabled,
|
|
2952
2981
|
title: e.title,
|
|
2953
2982
|
"aria-pressed": e.active,
|
|
2954
|
-
class:
|
|
2955
|
-
}, [
|
|
2983
|
+
class: y(["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]])
|
|
2984
|
+
}, [j(r.$slots, "default", {}, () => [f(P(e.label), 1)])], 10, Bi));
|
|
2956
2985
|
}
|
|
2957
|
-
}),
|
|
2986
|
+
}), Hi = { class: "flex items-center justify-between mb-4" }, Ui = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, Wi = {
|
|
2958
2987
|
key: 0,
|
|
2959
2988
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
2960
|
-
},
|
|
2989
|
+
}, Gi = {
|
|
2961
2990
|
key: 0,
|
|
2962
2991
|
class: "inline-flex items-center gap-2 text-xs text-slate-500"
|
|
2963
|
-
},
|
|
2992
|
+
}, Ki = { class: "grid gap-4 md:grid-cols-2" }, qi = { class: "md:col-span-2" }, Ji = ["for"], Yi = { class: "md:col-span-2" }, Xi = ["for"], Zi = { class: "text-[11px] text-slate-500 mt-1" }, Qi = { class: "md:col-span-2" }, $i = ["for"], ea = { class: "md:col-span-2" }, ta = ["for"], na = { class: "md:col-span-2" }, ra = "placeholder:text-slate-400 dark:placeholder:text-slate-500 font-mono", ia = /* @__PURE__ */ m({
|
|
2964
2993
|
__name: "BaseCredentialsForm",
|
|
2965
2994
|
props: {
|
|
2966
2995
|
title: {},
|
|
@@ -2986,7 +3015,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2986
3015
|
"load-error"
|
|
2987
3016
|
],
|
|
2988
3017
|
setup(t, { expose: n, emit: r }) {
|
|
2989
|
-
let i = t,
|
|
3018
|
+
let i = t, a = r, u = k(!1), d = k(!1), m = D({
|
|
2990
3019
|
keyId: "",
|
|
2991
3020
|
secretKey: "",
|
|
2992
3021
|
baseUrl: i.defaults.baseUrl,
|
|
@@ -2995,9 +3024,9 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
2995
3024
|
async function h() {
|
|
2996
3025
|
try {
|
|
2997
3026
|
let e = await i.fetchFn();
|
|
2998
|
-
m.keyId = e.keyId ?? "", m.baseUrl = e.baseUrl || i.defaults.baseUrl, m.dataUrl = e.dataUrl || i.defaults.dataUrl, m.secretKey = "",
|
|
3027
|
+
m.keyId = e.keyId ?? "", m.baseUrl = e.baseUrl || i.defaults.baseUrl, m.dataUrl = e.dataUrl || i.defaults.dataUrl, m.secretKey = "", d.value = e.hasSecret;
|
|
2999
3028
|
} catch (e) {
|
|
3000
|
-
|
|
3029
|
+
a("load-error", e instanceof Error ? e.message : "");
|
|
3001
3030
|
}
|
|
3002
3031
|
}
|
|
3003
3032
|
function g(e) {
|
|
@@ -3006,15 +3035,15 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3006
3035
|
async function _() {
|
|
3007
3036
|
if (!u.value) {
|
|
3008
3037
|
if (g(m.keyId)) {
|
|
3009
|
-
|
|
3038
|
+
a("error", i.requiredKeyMessage);
|
|
3010
3039
|
return;
|
|
3011
3040
|
}
|
|
3012
|
-
if (!
|
|
3013
|
-
|
|
3041
|
+
if (!d.value && g(m.secretKey)) {
|
|
3042
|
+
a("error", i.requiredSecretMessage);
|
|
3014
3043
|
return;
|
|
3015
3044
|
}
|
|
3016
3045
|
if (g(m.baseUrl) || g(m.dataUrl)) {
|
|
3017
|
-
|
|
3046
|
+
a("error", "Base URL and Data URL are required.");
|
|
3018
3047
|
return;
|
|
3019
3048
|
}
|
|
3020
3049
|
u.value = !0;
|
|
@@ -3025,80 +3054,80 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3025
3054
|
baseUrl: m.baseUrl.trim(),
|
|
3026
3055
|
dataUrl: m.dataUrl.trim()
|
|
3027
3056
|
});
|
|
3028
|
-
|
|
3057
|
+
d.value = e.hasSecret, m.secretKey = "", a("saved", i.savedMessage);
|
|
3029
3058
|
} catch (e) {
|
|
3030
|
-
|
|
3059
|
+
a("error", e instanceof Error ? e.message : "Failed to save");
|
|
3031
3060
|
} finally {
|
|
3032
3061
|
u.value = !1;
|
|
3033
3062
|
}
|
|
3034
3063
|
}
|
|
3035
3064
|
}
|
|
3036
|
-
return
|
|
3037
|
-
default:
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3065
|
+
return C(h), n({ load: h }), (n, r) => (E(), o(zt, { class: "!p-6" }, {
|
|
3066
|
+
default: L(() => [
|
|
3067
|
+
l("div", Hi, [l("div", null, [l("h2", Ui, P(t.title), 1), t.subtitle ? (E(), c("p", Wi, P(t.subtitle), 1)) : s("", !0)]), u.value ? (E(), c("span", Gi, [p(Bt, { class: "!h-4 !w-4" }), r[4] ||= f(" Saving… ", -1)])) : s("", !0)]),
|
|
3068
|
+
l("div", Ki, [
|
|
3069
|
+
l("div", qi, [l("label", {
|
|
3041
3070
|
for: `${t.idPrefix}-key-id`,
|
|
3042
3071
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3043
|
-
},
|
|
3072
|
+
}, P(t.keyLabel), 9, Ji), p(li, {
|
|
3044
3073
|
id: `${t.idPrefix}-key-id`,
|
|
3045
3074
|
modelValue: m.keyId,
|
|
3046
3075
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
3047
3076
|
type: "text",
|
|
3048
3077
|
autocomplete: "off",
|
|
3049
3078
|
placeholder: t.keyPlaceholder,
|
|
3050
|
-
class:
|
|
3079
|
+
class: y(ra)
|
|
3051
3080
|
}, null, 8, [
|
|
3052
3081
|
"id",
|
|
3053
3082
|
"modelValue",
|
|
3054
3083
|
"placeholder"
|
|
3055
3084
|
])]),
|
|
3056
|
-
|
|
3057
|
-
|
|
3085
|
+
l("div", Yi, [
|
|
3086
|
+
l("label", {
|
|
3058
3087
|
for: `${t.idPrefix}-secret`,
|
|
3059
3088
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3060
|
-
},
|
|
3061
|
-
|
|
3089
|
+
}, P(t.secretLabel), 9, Xi),
|
|
3090
|
+
p(li, {
|
|
3062
3091
|
id: `${t.idPrefix}-secret`,
|
|
3063
3092
|
modelValue: m.secretKey,
|
|
3064
3093
|
"onUpdate:modelValue": r[1] ||= (e) => m.secretKey = e,
|
|
3065
3094
|
type: "password",
|
|
3066
3095
|
autocomplete: "new-password",
|
|
3067
|
-
placeholder:
|
|
3068
|
-
class:
|
|
3096
|
+
placeholder: d.value ? "•••••••• (unchanged — type to replace)" : t.secretPlaceholder,
|
|
3097
|
+
class: y(ra)
|
|
3069
3098
|
}, null, 8, [
|
|
3070
3099
|
"id",
|
|
3071
3100
|
"modelValue",
|
|
3072
3101
|
"placeholder"
|
|
3073
3102
|
]),
|
|
3074
|
-
|
|
3103
|
+
l("p", Zi, [d.value ? (E(), c(e, { key: 0 }, [f(P(t.secretSetHint), 1)], 64)) : j(n.$slots, "no-secret-hint", {}, () => [f(P(t.permissionsHint), 1)], void 0, 1)])
|
|
3075
3104
|
]),
|
|
3076
|
-
|
|
3077
|
-
|
|
3105
|
+
l("div", Qi, [
|
|
3106
|
+
l("label", {
|
|
3078
3107
|
for: `${t.idPrefix}-base-url`,
|
|
3079
3108
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3080
|
-
}, "Base URL (trading)", 8,
|
|
3081
|
-
|
|
3109
|
+
}, "Base URL (trading)", 8, $i),
|
|
3110
|
+
p(li, {
|
|
3082
3111
|
id: `${t.idPrefix}-base-url`,
|
|
3083
3112
|
modelValue: m.baseUrl,
|
|
3084
3113
|
"onUpdate:modelValue": r[2] ||= (e) => m.baseUrl = e,
|
|
3085
3114
|
type: "text",
|
|
3086
|
-
class:
|
|
3115
|
+
class: y(ra)
|
|
3087
3116
|
}, null, 8, ["id", "modelValue"]),
|
|
3088
|
-
|
|
3117
|
+
j(n.$slots, "base-url-extra", { form: m })
|
|
3089
3118
|
]),
|
|
3090
|
-
|
|
3119
|
+
l("div", ea, [l("label", {
|
|
3091
3120
|
for: `${t.idPrefix}-data-url`,
|
|
3092
3121
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3093
|
-
}, "Data URL (market data)", 8,
|
|
3122
|
+
}, "Data URL (market data)", 8, ta), p(li, {
|
|
3094
3123
|
id: `${t.idPrefix}-data-url`,
|
|
3095
3124
|
modelValue: m.dataUrl,
|
|
3096
3125
|
"onUpdate:modelValue": r[3] ||= (e) => m.dataUrl = e,
|
|
3097
3126
|
type: "text",
|
|
3098
|
-
class:
|
|
3127
|
+
class: y(ra)
|
|
3099
3128
|
}, null, 8, ["id", "modelValue"])]),
|
|
3100
|
-
|
|
3101
|
-
color:
|
|
3129
|
+
l("div", na, [p(nt, {
|
|
3130
|
+
color: F(K).GREEN,
|
|
3102
3131
|
description: t.saveLabel,
|
|
3103
3132
|
isDisable: u.value,
|
|
3104
3133
|
isLoading: u.value,
|
|
@@ -3110,21 +3139,21 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3110
3139
|
"isLoading"
|
|
3111
3140
|
])])
|
|
3112
3141
|
]),
|
|
3113
|
-
|
|
3142
|
+
j(n.$slots, "footer")
|
|
3114
3143
|
]),
|
|
3115
3144
|
_: 3
|
|
3116
3145
|
}));
|
|
3117
3146
|
}
|
|
3118
|
-
}),
|
|
3147
|
+
}), aa = {
|
|
3119
3148
|
key: 0,
|
|
3120
3149
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3121
|
-
},
|
|
3150
|
+
}, oa = { class: "mb-3 flex flex-wrap items-center gap-2" }, sa = { class: "relative min-w-[200px] flex-1" }, ca = ["placeholder"], la = {
|
|
3122
3151
|
key: 0,
|
|
3123
3152
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3124
|
-
},
|
|
3153
|
+
}, ua = {
|
|
3125
3154
|
key: 1,
|
|
3126
3155
|
class: "flex flex-wrap gap-2"
|
|
3127
|
-
},
|
|
3156
|
+
}, da = ["title", "onClick"], fa = "h-9 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", pa = "\0all", ma = /* @__PURE__ */ m({
|
|
3128
3157
|
__name: "BasePillPickerModal",
|
|
3129
3158
|
props: {
|
|
3130
3159
|
title: {},
|
|
@@ -3146,60 +3175,60 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3146
3175
|
},
|
|
3147
3176
|
emits: ["pick", "close"],
|
|
3148
3177
|
setup(t, { emit: n }) {
|
|
3149
|
-
let r = t,
|
|
3150
|
-
value:
|
|
3178
|
+
let r = t, i = n, u = a(() => r.icon ?? Te), d = k(""), f = k(pa), m = a(() => r.groups && r.groups.length > 0 ? [{
|
|
3179
|
+
value: pa,
|
|
3151
3180
|
label: r.allLabel
|
|
3152
|
-
}, ...r.groups] : []), h =
|
|
3153
|
-
return (n, r) => (
|
|
3181
|
+
}, ...r.groups] : []), h = a(() => r.items.filter((e) => (f.value === pa || e.group === f.value) && e.label.toLowerCase().includes(d.value.trim().toLowerCase())));
|
|
3182
|
+
return (n, r) => (E(), o(bn, {
|
|
3154
3183
|
title: t.title,
|
|
3155
3184
|
icon: u.value,
|
|
3156
3185
|
subtitle: t.subtitle,
|
|
3157
3186
|
scrollable: "",
|
|
3158
3187
|
"max-width-class": t.maxWidthClass,
|
|
3159
|
-
onCancel: r[4] ||= (e) =>
|
|
3188
|
+
onCancel: r[4] ||= (e) => i("close")
|
|
3160
3189
|
}, {
|
|
3161
|
-
footer:
|
|
3190
|
+
footer: L(() => [p(Cr, {
|
|
3162
3191
|
variant: "ghost",
|
|
3163
3192
|
label: t.closeText,
|
|
3164
|
-
onClick: r[3] ||= (e) =>
|
|
3193
|
+
onClick: r[3] ||= (e) => i("close")
|
|
3165
3194
|
}, null, 8, ["label"])]),
|
|
3166
|
-
default:
|
|
3167
|
-
|
|
3168
|
-
|
|
3195
|
+
default: L(() => [t.items.length === 0 ? (E(), c("p", aa, P(t.emptyMessage), 1)) : (E(), c(e, { key: 1 }, [l("div", oa, [l("div", sa, [
|
|
3196
|
+
p(F(Te), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3197
|
+
R(l("input", {
|
|
3169
3198
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
3170
3199
|
type: "text",
|
|
3171
3200
|
placeholder: t.searchPlaceholder,
|
|
3172
3201
|
autocomplete: "off",
|
|
3173
|
-
class:
|
|
3174
|
-
|
|
3202
|
+
class: y([
|
|
3203
|
+
fa,
|
|
3175
3204
|
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3176
3205
|
t.mono ? "font-mono" : ""
|
|
3177
3206
|
])
|
|
3178
|
-
}, null, 10,
|
|
3179
|
-
d.value ? (
|
|
3207
|
+
}, null, 10, ca), [[ie, d.value]]),
|
|
3208
|
+
d.value ? (E(), c("button", {
|
|
3180
3209
|
key: 0,
|
|
3181
3210
|
type: "button",
|
|
3182
3211
|
"aria-label": "Clear the filter",
|
|
3183
3212
|
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3184
3213
|
onClick: r[1] ||= (e) => d.value = ""
|
|
3185
|
-
}, " ✕ ")) :
|
|
3186
|
-
]), m.value.length > 0 ? (
|
|
3214
|
+
}, " ✕ ")) : s("", !0)
|
|
3215
|
+
]), m.value.length > 0 ? (E(), o(bi, {
|
|
3187
3216
|
key: 0,
|
|
3188
|
-
modelValue:
|
|
3189
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
3217
|
+
modelValue: f.value,
|
|
3218
|
+
"onUpdate:modelValue": r[2] ||= (e) => f.value = e,
|
|
3190
3219
|
options: m.value,
|
|
3191
3220
|
"aria-label": t.groupAriaLabel
|
|
3192
3221
|
}, null, 8, [
|
|
3193
3222
|
"modelValue",
|
|
3194
3223
|
"options",
|
|
3195
3224
|
"aria-label"
|
|
3196
|
-
])) :
|
|
3225
|
+
])) : s("", !0)]), h.value.length === 0 ? (E(), c("p", la, P(t.noMatchMessage), 1)) : (E(), c("div", ua, [(E(!0), c(e, null, A(h.value, (e) => (E(), c("button", {
|
|
3197
3226
|
key: e.id,
|
|
3198
3227
|
type: "button",
|
|
3199
3228
|
title: e.title,
|
|
3200
|
-
class:
|
|
3201
|
-
onClick: (t) =>
|
|
3202
|
-
},
|
|
3229
|
+
class: y(["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" : ""]),
|
|
3230
|
+
onClick: (t) => i("pick", e)
|
|
3231
|
+
}, P(e.label), 11, da))), 128))]))], 64))]),
|
|
3203
3232
|
_: 1
|
|
3204
3233
|
}, 8, [
|
|
3205
3234
|
"title",
|
|
@@ -3208,7 +3237,7 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3208
3237
|
"max-width-class"
|
|
3209
3238
|
]));
|
|
3210
3239
|
}
|
|
3211
|
-
}),
|
|
3240
|
+
}), ha = ["aria-label"], ga = ["title"], _a = { class: "text-[10px] tabular-nums text-slate-400 dark:text-slate-500" }, va = ["title"], ya = /* @__PURE__ */ m({
|
|
3212
3241
|
__name: "BaseBarDistribution",
|
|
3213
3242
|
props: {
|
|
3214
3243
|
bars: {},
|
|
@@ -3219,28 +3248,28 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3219
3248
|
barClass: { default: "bg-emerald-500/80 dark:bg-emerald-400/80" }
|
|
3220
3249
|
},
|
|
3221
3250
|
setup(t) {
|
|
3222
|
-
let n = t, r =
|
|
3223
|
-
return (n, r) => (
|
|
3251
|
+
let n = t, r = a(() => Math.max(1, ...n.bars.map((e) => e.count))), i = (e) => Math.max(3, Math.round(e.count / r.value * n.maxBarHeight)), o = (e) => `${n.titlePrefix ? `${n.titlePrefix} ` : ""}${e.label}: ${e.count} ${n.countNoun}${e.count === 1 ? "" : "s"}`;
|
|
3252
|
+
return (n, r) => (E(), c("div", {
|
|
3224
3253
|
class: "flex items-end gap-1.5 overflow-x-auto pb-1",
|
|
3225
3254
|
role: "img",
|
|
3226
3255
|
"aria-label": t.ariaLabel
|
|
3227
|
-
}, [(
|
|
3256
|
+
}, [(E(!0), c(e, null, A(t.bars, (e) => (E(), c("div", {
|
|
3228
3257
|
key: e.label,
|
|
3229
3258
|
class: "flex min-w-7 flex-1 flex-col items-center gap-0.5",
|
|
3230
3259
|
title: o(e)
|
|
3231
3260
|
}, [
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
class:
|
|
3235
|
-
style:
|
|
3261
|
+
l("span", _a, P(e.count), 1),
|
|
3262
|
+
l("div", {
|
|
3263
|
+
class: y(["w-full max-w-8 rounded-t", t.barClass]),
|
|
3264
|
+
style: x({ height: `${i(e)}px` })
|
|
3236
3265
|
}, null, 6),
|
|
3237
|
-
|
|
3266
|
+
l("span", {
|
|
3238
3267
|
class: "max-w-full truncate font-mono text-[10px] text-slate-500 dark:text-slate-400",
|
|
3239
3268
|
title: e.label
|
|
3240
|
-
},
|
|
3241
|
-
], 8,
|
|
3269
|
+
}, P(e.label), 9, va)
|
|
3270
|
+
], 8, ga))), 128))], 8, ha));
|
|
3242
3271
|
}
|
|
3243
|
-
}),
|
|
3272
|
+
}), ba = /* @__PURE__ */ m({
|
|
3244
3273
|
__name: "BaseDateTimePicker",
|
|
3245
3274
|
props: {
|
|
3246
3275
|
modelValue: { default: null },
|
|
@@ -3262,27 +3291,27 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3262
3291
|
},
|
|
3263
3292
|
emits: ["update:modelValue"],
|
|
3264
3293
|
setup(e, { emit: t }) {
|
|
3265
|
-
let n = e, r = t, { isDark:
|
|
3294
|
+
let n = e, r = t, { isDark: i } = W(), s = a(() => ({
|
|
3266
3295
|
enableTimePicker: n.mode !== "date",
|
|
3267
3296
|
is24: n.is24,
|
|
3268
3297
|
...n.timeConfig
|
|
3269
|
-
})), c =
|
|
3298
|
+
})), c = a(() => {
|
|
3270
3299
|
if (n.format) return { input: n.format };
|
|
3271
3300
|
let e = n.is24 ? "HH:mm" : "hh:mm a";
|
|
3272
3301
|
return n.mode === "date" ? { input: "dd/MM/yyyy" } : n.mode === "time" ? { input: e } : { input: `dd/MM/yyyy ${e}` };
|
|
3273
3302
|
});
|
|
3274
|
-
return (t, n) => (
|
|
3303
|
+
return (t, n) => (E(), o(F(Ne), {
|
|
3275
3304
|
"model-value": e.modelValue,
|
|
3276
|
-
dark:
|
|
3305
|
+
dark: F(i),
|
|
3277
3306
|
"time-picker": e.mode === "time",
|
|
3278
3307
|
"time-config": s.value,
|
|
3279
3308
|
formats: c.value,
|
|
3280
3309
|
"auto-apply": e.autoApply,
|
|
3281
3310
|
teleport: e.teleport,
|
|
3282
3311
|
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
3283
|
-
},
|
|
3312
|
+
}, u({ _: 2 }, [A(t.$slots, (e, n) => ({
|
|
3284
3313
|
name: n,
|
|
3285
|
-
fn:
|
|
3314
|
+
fn: L((e) => [j(t.$slots, n, b(g(e ?? {})))])
|
|
3286
3315
|
}))]), 1032, [
|
|
3287
3316
|
"model-value",
|
|
3288
3317
|
"dark",
|
|
@@ -3293,28 +3322,28 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3293
3322
|
"teleport"
|
|
3294
3323
|
]));
|
|
3295
3324
|
}
|
|
3296
|
-
}),
|
|
3325
|
+
}), xa = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1" }, Sa = { class: "truncate" }, Ca = [
|
|
3297
3326
|
"aria-label",
|
|
3298
3327
|
"disabled",
|
|
3299
3328
|
"onClick"
|
|
3300
|
-
],
|
|
3329
|
+
], wa = [
|
|
3301
3330
|
"disabled",
|
|
3302
3331
|
"readonly",
|
|
3303
3332
|
"aria-label",
|
|
3304
3333
|
"aria-expanded",
|
|
3305
3334
|
"aria-activedescendant",
|
|
3306
3335
|
"placeholder"
|
|
3307
|
-
],
|
|
3336
|
+
], Ta = ["aria-multiselectable"], Ea = [
|
|
3308
3337
|
"id",
|
|
3309
3338
|
"aria-selected",
|
|
3310
3339
|
"aria-disabled",
|
|
3311
3340
|
"title",
|
|
3312
3341
|
"onMouseenter",
|
|
3313
3342
|
"onClick"
|
|
3314
|
-
],
|
|
3343
|
+
], Da = { class: "truncate" }, Oa = {
|
|
3315
3344
|
key: 0,
|
|
3316
3345
|
class: "px-3 py-2 text-sm text-slate-500 dark:text-slate-400"
|
|
3317
|
-
},
|
|
3346
|
+
}, ka = /* @__PURE__ */ m({
|
|
3318
3347
|
__name: "BaseSearchSelect",
|
|
3319
3348
|
props: {
|
|
3320
3349
|
options: {},
|
|
@@ -3346,97 +3375,97 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3346
3375
|
},
|
|
3347
3376
|
emits: ["update:modelValue"],
|
|
3348
3377
|
setup(t, { emit: n }) {
|
|
3349
|
-
let r = t,
|
|
3378
|
+
let r = t, i = n, u = k(null), d = k(null), f = k(!1), m = k(""), h = k(-1), g = `search-select-${ee()}`, _ = a(() => {
|
|
3350
3379
|
let e = r.modelValue;
|
|
3351
3380
|
return Array.isArray(e) ? [...e] : e == null || e === "" ? [] : [e];
|
|
3352
|
-
}), b =
|
|
3381
|
+
}), b = a(() => _.value.map((e) => r.options.find((t) => t.value === e)).filter((e) => !!e)), x = a(() => _.value.length > 0), w = a(() => !r.multiple && b.value.length > 0), T = a(() => w.value ? b.value[0].label : r.multiple && x.value ? "" : r.placeholder), D = a(() => {
|
|
3353
3382
|
let e = m.value.trim().toLowerCase();
|
|
3354
3383
|
return e ? r.options.filter((t) => t.label.toLowerCase().includes(e)) : [...r.options];
|
|
3355
3384
|
});
|
|
3356
|
-
|
|
3385
|
+
I(D, (e) => {
|
|
3357
3386
|
h.value = e.findIndex((e) => !e.disabled);
|
|
3358
3387
|
});
|
|
3359
|
-
function
|
|
3360
|
-
return
|
|
3388
|
+
function O(e) {
|
|
3389
|
+
return _.value.includes(e.value);
|
|
3361
3390
|
}
|
|
3362
3391
|
function j(e, t) {
|
|
3363
|
-
return e.disabled ? "cursor-not-allowed text-slate-400 dark:text-slate-600" :
|
|
3392
|
+
return e.disabled ? "cursor-not-allowed text-slate-400 dark:text-slate-600" : O(e) ? t === h.value ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white" : t === h.value ? "bg-slate-100 text-slate-900 dark:bg-slate-800 dark:text-slate-100" : "text-slate-700 dark:text-slate-200";
|
|
3364
3393
|
}
|
|
3365
3394
|
function M() {
|
|
3366
|
-
r.disabled ||
|
|
3395
|
+
r.disabled || f.value || (f.value = !0, h.value = D.value.findIndex((e) => !e.disabled));
|
|
3367
3396
|
}
|
|
3368
|
-
function
|
|
3369
|
-
|
|
3397
|
+
function N() {
|
|
3398
|
+
f.value = !1, m.value = "";
|
|
3370
3399
|
}
|
|
3371
3400
|
function te(e) {
|
|
3372
|
-
r.disabled || (e.target !== d.value && e.preventDefault(),
|
|
3401
|
+
r.disabled || (e.target !== d.value && e.preventDefault(), f.value && e.target !== d.value ? N() : (d.value?.focus(), M()));
|
|
3373
3402
|
}
|
|
3374
3403
|
function ne(e) {
|
|
3375
3404
|
if (!e.disabled) {
|
|
3376
3405
|
if (r.multiple) {
|
|
3377
|
-
let t =
|
|
3378
|
-
|
|
3379
|
-
} else
|
|
3406
|
+
let t = O(e) ? _.value.filter((t) => t !== e.value) : [..._.value, e.value];
|
|
3407
|
+
i("update:modelValue", t), m.value = "", v(() => d.value?.focus());
|
|
3408
|
+
} else i("update:modelValue", e.value), N(), d.value?.blur();
|
|
3380
3409
|
}
|
|
3381
3410
|
}
|
|
3382
|
-
function
|
|
3383
|
-
|
|
3411
|
+
function re(e) {
|
|
3412
|
+
i("update:modelValue", _.value.filter((t) => t !== e.value));
|
|
3384
3413
|
}
|
|
3385
|
-
function
|
|
3386
|
-
|
|
3414
|
+
function L() {
|
|
3415
|
+
i("update:modelValue", r.multiple ? [] : null), m.value = "";
|
|
3387
3416
|
}
|
|
3388
|
-
function
|
|
3417
|
+
function oe(e) {
|
|
3389
3418
|
let t = D.value;
|
|
3390
3419
|
if (t.length === 0) return;
|
|
3391
3420
|
let n = h.value;
|
|
3392
3421
|
for (let r = 0; r < t.length && (n = (n + e + t.length) % t.length, t[n].disabled); r++);
|
|
3393
|
-
h.value = n,
|
|
3422
|
+
h.value = n, v(() => document.getElementById(`${g}-${n}`)?.scrollIntoView?.({ block: "nearest" }));
|
|
3394
3423
|
}
|
|
3395
|
-
function
|
|
3424
|
+
function se(e) {
|
|
3396
3425
|
switch (e.key) {
|
|
3397
3426
|
case "ArrowDown":
|
|
3398
|
-
e.preventDefault(),
|
|
3427
|
+
e.preventDefault(), f.value ? oe(1) : M();
|
|
3399
3428
|
break;
|
|
3400
3429
|
case "ArrowUp":
|
|
3401
|
-
e.preventDefault(),
|
|
3430
|
+
e.preventDefault(), f.value ? oe(-1) : M();
|
|
3402
3431
|
break;
|
|
3403
3432
|
case "Enter":
|
|
3404
|
-
|
|
3433
|
+
f.value && h.value >= 0 && (e.preventDefault(), ne(D.value[h.value]));
|
|
3405
3434
|
break;
|
|
3406
3435
|
case "Escape":
|
|
3407
|
-
|
|
3436
|
+
f.value && (e.preventDefault(), N());
|
|
3408
3437
|
break;
|
|
3409
3438
|
case "Tab":
|
|
3410
|
-
|
|
3439
|
+
N();
|
|
3411
3440
|
break;
|
|
3412
|
-
case "Backspace": r.multiple && m.value === "" && b.value.length &&
|
|
3441
|
+
case "Backspace": r.multiple && m.value === "" && b.value.length && re(b.value[b.value.length - 1]);
|
|
3413
3442
|
}
|
|
3414
3443
|
}
|
|
3415
|
-
function
|
|
3416
|
-
|
|
3444
|
+
function ce(e) {
|
|
3445
|
+
f.value && u.value && !u.value.contains(e.target) && N();
|
|
3417
3446
|
}
|
|
3418
|
-
return
|
|
3447
|
+
return C(() => document.addEventListener("mousedown", ce)), S(() => document.removeEventListener("mousedown", ce)), (n, r) => (E(), c("div", {
|
|
3419
3448
|
ref_key: "rootEl",
|
|
3420
3449
|
ref: u,
|
|
3421
|
-
class:
|
|
3422
|
-
}, [
|
|
3423
|
-
class:
|
|
3450
|
+
class: y(t.block ? "relative w-full" : "relative inline-block min-w-48")
|
|
3451
|
+
}, [l("div", {
|
|
3452
|
+
class: y(["flex min-h-[38px] items-center gap-1.5 rounded-lg border bg-white px-3 py-1.5 text-sm transition-colors dark:bg-slate-900", [f.value ? "border-emerald-500 ring-2 ring-emerald-500/30" : "border-slate-300 hover:border-slate-400 dark:border-slate-600 dark:hover:border-slate-500", t.disabled ? "cursor-not-allowed opacity-60" : "cursor-text"]]),
|
|
3424
3453
|
onMousedown: te
|
|
3425
3454
|
}, [
|
|
3426
|
-
|
|
3455
|
+
l("div", xa, [(E(!0), c(e, null, A(b.value, (e) => R((E(), c("span", {
|
|
3427
3456
|
key: String(e.value),
|
|
3428
3457
|
class: "inline-flex max-w-full items-center gap-1 rounded-md bg-emerald-50 py-0.5 pl-2 pr-1 text-xs font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300"
|
|
3429
|
-
}, [
|
|
3458
|
+
}, [l("span", Sa, P(e.label), 1), l("button", {
|
|
3430
3459
|
type: "button",
|
|
3431
3460
|
class: "rounded p-0.5 hover:bg-emerald-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 dark:hover:bg-emerald-500/25",
|
|
3432
3461
|
"aria-label": `Remove ${e.label}`,
|
|
3433
3462
|
disabled: t.disabled,
|
|
3434
|
-
onMousedown: r[0] ||=
|
|
3435
|
-
onClick:
|
|
3436
|
-
}, [
|
|
3463
|
+
onMousedown: r[0] ||= z(() => {}, ["stop", "prevent"]),
|
|
3464
|
+
onClick: z((t) => re(e), ["stop"])
|
|
3465
|
+
}, [p(F(B), {
|
|
3437
3466
|
class: "h-3 w-3",
|
|
3438
3467
|
"aria-hidden": "true"
|
|
3439
|
-
})], 40,
|
|
3468
|
+
})], 40, Ca)])), [[ae, t.multiple]])), 128)), R(l("input", {
|
|
3440
3469
|
ref_key: "inputEl",
|
|
3441
3470
|
ref: d,
|
|
3442
3471
|
"onUpdate:modelValue": r[1] ||= (e) => m.value = e,
|
|
@@ -3447,69 +3476,69 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3447
3476
|
readonly: !t.searchable,
|
|
3448
3477
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
3449
3478
|
"aria-autocomplete": "list",
|
|
3450
|
-
"aria-expanded":
|
|
3479
|
+
"aria-expanded": f.value,
|
|
3451
3480
|
"aria-controls": g,
|
|
3452
|
-
"aria-activedescendant":
|
|
3453
|
-
placeholder:
|
|
3454
|
-
class:
|
|
3481
|
+
"aria-activedescendant": f.value && h.value >= 0 ? `${g}-${h.value}` : void 0,
|
|
3482
|
+
placeholder: T.value,
|
|
3483
|
+
class: y(["min-w-16 flex-1 border-0 bg-transparent p-0 py-0.5 text-sm text-slate-900 outline-none focus:ring-0 dark:text-slate-100 disabled:cursor-not-allowed", w.value ? "placeholder:text-slate-900 dark:placeholder:text-slate-100" : "placeholder:text-slate-400 dark:placeholder:text-slate-500"]),
|
|
3455
3484
|
onFocus: M,
|
|
3456
3485
|
onInput: M,
|
|
3457
|
-
onKeydown:
|
|
3458
|
-
}, null, 42,
|
|
3459
|
-
t.clearable &&
|
|
3486
|
+
onKeydown: se
|
|
3487
|
+
}, null, 42, wa), [[ie, m.value]])]),
|
|
3488
|
+
t.clearable && x.value && !t.disabled ? (E(), c("button", {
|
|
3460
3489
|
key: 0,
|
|
3461
3490
|
type: "button",
|
|
3462
3491
|
class: "shrink-0 rounded p-0.5 text-slate-400 hover:text-slate-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 dark:hover:text-slate-200",
|
|
3463
3492
|
"aria-label": "Clear selection",
|
|
3464
|
-
onMousedown: r[2] ||=
|
|
3465
|
-
onClick:
|
|
3466
|
-
}, [
|
|
3493
|
+
onMousedown: r[2] ||= z(() => {}, ["stop", "prevent"]),
|
|
3494
|
+
onClick: z(L, ["stop"])
|
|
3495
|
+
}, [p(F(B), {
|
|
3467
3496
|
class: "h-4 w-4",
|
|
3468
3497
|
"aria-hidden": "true"
|
|
3469
|
-
})], 32)) :
|
|
3470
|
-
|
|
3471
|
-
class:
|
|
3498
|
+
})], 32)) : s("", !0),
|
|
3499
|
+
p(F(ge), {
|
|
3500
|
+
class: y(["h-4 w-4 shrink-0 text-slate-500 transition-transform dark:text-slate-400", f.value ? "rotate-180" : ""]),
|
|
3472
3501
|
"aria-hidden": "true"
|
|
3473
3502
|
}, null, 8, ["class"])
|
|
3474
|
-
], 34),
|
|
3503
|
+
], 34), f.value ? (E(), c("ul", {
|
|
3475
3504
|
key: 0,
|
|
3476
3505
|
id: g,
|
|
3477
3506
|
role: "listbox",
|
|
3478
3507
|
"aria-multiselectable": t.multiple || void 0,
|
|
3479
3508
|
class: "absolute z-30 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-slate-200 bg-white py-1 shadow-lg dark:border-slate-700 dark:bg-slate-900"
|
|
3480
|
-
}, [(
|
|
3509
|
+
}, [(E(!0), c(e, null, A(D.value, (e, t) => (E(), c("li", {
|
|
3481
3510
|
id: `${g}-${t}`,
|
|
3482
3511
|
key: String(e.value),
|
|
3483
3512
|
role: "option",
|
|
3484
|
-
"aria-selected":
|
|
3513
|
+
"aria-selected": O(e),
|
|
3485
3514
|
"aria-disabled": e.disabled || void 0,
|
|
3486
3515
|
title: e.title,
|
|
3487
|
-
class:
|
|
3488
|
-
onMousedown: r[3] ||=
|
|
3516
|
+
class: y(["flex cursor-pointer items-center justify-between gap-2 px-3 py-2 text-left text-sm", j(e, t)]),
|
|
3517
|
+
onMousedown: r[3] ||= z(() => {}, ["prevent"]),
|
|
3489
3518
|
onMouseenter: (e) => h.value = t,
|
|
3490
3519
|
onClick: (t) => ne(e)
|
|
3491
|
-
}, [
|
|
3520
|
+
}, [l("span", Da, P(e.label), 1), O(e) ? (E(), o(F(pe), {
|
|
3492
3521
|
key: 0,
|
|
3493
3522
|
class: "h-4 w-4 shrink-0",
|
|
3494
3523
|
"aria-hidden": "true"
|
|
3495
|
-
})) :
|
|
3524
|
+
})) : s("", !0)], 42, Ea))), 128)), D.value.length === 0 ? (E(), c("li", Oa, P(t.options.length === 0 ? t.emptyText : t.noResultsText), 1)) : s("", !0)], 8, Ta)) : s("", !0)], 2));
|
|
3496
3525
|
}
|
|
3497
|
-
}),
|
|
3526
|
+
}), Aa = { class: "rounded-xl border border-slate-200 bg-white text-left shadow-sm dark:border-slate-700 dark:bg-slate-900" }, ja = {
|
|
3498
3527
|
key: 0,
|
|
3499
3528
|
class: "flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3500
|
-
},
|
|
3529
|
+
}, Ma = { class: "min-w-0" }, Na = {
|
|
3501
3530
|
key: 0,
|
|
3502
3531
|
class: "text-base font-semibold text-slate-900 dark:text-slate-100"
|
|
3503
|
-
},
|
|
3532
|
+
}, Pa = {
|
|
3504
3533
|
key: 1,
|
|
3505
3534
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3506
|
-
},
|
|
3535
|
+
}, Fa = {
|
|
3507
3536
|
key: 0,
|
|
3508
3537
|
class: "flex items-center gap-2"
|
|
3509
|
-
},
|
|
3538
|
+
}, Ia = {
|
|
3510
3539
|
key: 1,
|
|
3511
3540
|
class: "flex flex-wrap items-center justify-end gap-2 border-t border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3512
|
-
},
|
|
3541
|
+
}, La = /* @__PURE__ */ m({
|
|
3513
3542
|
__name: "BaseCard",
|
|
3514
3543
|
props: {
|
|
3515
3544
|
title: { default: "" },
|
|
@@ -3517,24 +3546,24 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3517
3546
|
padding: { default: "md" }
|
|
3518
3547
|
},
|
|
3519
3548
|
setup(e) {
|
|
3520
|
-
return (t, n) => (
|
|
3521
|
-
e.title || e.subtitle || t.$slots.actions ? (
|
|
3522
|
-
|
|
3523
|
-
t.$slots.footer ? (
|
|
3549
|
+
return (t, n) => (E(), c("section", Aa, [
|
|
3550
|
+
e.title || e.subtitle || t.$slots.actions ? (E(), c("header", ja, [l("div", Ma, [e.title ? (E(), c("h2", Na, P(e.title), 1)) : s("", !0), e.subtitle ? (E(), c("p", Pa, P(e.subtitle), 1)) : s("", !0)]), t.$slots.actions ? (E(), c("div", Fa, [j(t.$slots, "actions")])) : s("", !0)])) : s("", !0),
|
|
3551
|
+
l("div", { class: y(e.padding === "sm" ? "p-4" : e.padding === "none" ? "" : "p-5") }, [j(t.$slots, "default")], 2),
|
|
3552
|
+
t.$slots.footer ? (E(), c("footer", Ia, [j(t.$slots, "footer")])) : s("", !0)
|
|
3524
3553
|
]));
|
|
3525
3554
|
}
|
|
3526
|
-
}),
|
|
3555
|
+
}), Ra = ["for"], za = {
|
|
3527
3556
|
key: 0,
|
|
3528
3557
|
class: "ml-0.5 text-red-500",
|
|
3529
3558
|
"aria-hidden": "true"
|
|
3530
|
-
},
|
|
3559
|
+
}, Ba = {
|
|
3531
3560
|
key: 1,
|
|
3532
3561
|
class: "mt-1 text-xs font-medium text-red-600 dark:text-red-400",
|
|
3533
3562
|
role: "alert"
|
|
3534
|
-
},
|
|
3563
|
+
}, Va = {
|
|
3535
3564
|
key: 2,
|
|
3536
3565
|
class: "mt-1 text-xs text-slate-500 dark:text-slate-400"
|
|
3537
|
-
},
|
|
3566
|
+
}, Ha = /* @__PURE__ */ m({
|
|
3538
3567
|
__name: "BaseField",
|
|
3539
3568
|
props: {
|
|
3540
3569
|
label: { default: "" },
|
|
@@ -3555,17 +3584,17 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3555
3584
|
}
|
|
3556
3585
|
},
|
|
3557
3586
|
setup(e) {
|
|
3558
|
-
return (t, n) => (
|
|
3559
|
-
e.label ? (
|
|
3587
|
+
return (t, n) => (E(), c("div", { class: y([e.grow ? "min-w-48 flex-1" : "", "text-left"]) }, [
|
|
3588
|
+
e.label ? (E(), c("label", {
|
|
3560
3589
|
key: 0,
|
|
3561
3590
|
for: e.labelFor || void 0,
|
|
3562
|
-
class:
|
|
3563
|
-
}, [
|
|
3564
|
-
|
|
3565
|
-
e.error ? (
|
|
3591
|
+
class: y(["mb-1 block", e.compact ? "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" : "text-sm font-medium text-slate-700 dark:text-slate-200"])
|
|
3592
|
+
}, [f(P(e.label), 1), e.required ? (E(), c("span", za, "*")) : s("", !0)], 10, Ra)) : s("", !0),
|
|
3593
|
+
j(t.$slots, "default"),
|
|
3594
|
+
e.error ? (E(), c("p", Ba, P(e.error), 1)) : e.hint ? (E(), c("p", Va, P(e.hint), 1)) : s("", !0)
|
|
3566
3595
|
], 2));
|
|
3567
3596
|
}
|
|
3568
|
-
}),
|
|
3597
|
+
}), Ua = { class: "flex items-start justify-between gap-3" }, Wa = { class: "min-w-0 text-left" }, Ga = { class: "truncate text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, Ka = /* @__PURE__ */ m({
|
|
3569
3598
|
__name: "BaseStatCard",
|
|
3570
3599
|
props: {
|
|
3571
3600
|
title: {},
|
|
@@ -3611,31 +3640,31 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3611
3640
|
iconBox: "bg-slate-100 dark:bg-slate-700/50",
|
|
3612
3641
|
icon: "text-slate-500 dark:text-slate-300"
|
|
3613
3642
|
}
|
|
3614
|
-
}, r =
|
|
3615
|
-
return (t, n) => (
|
|
3616
|
-
default:
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
e.subtitle ? (
|
|
3643
|
+
}, r = a(() => n[t.accent]);
|
|
3644
|
+
return (t, n) => (E(), o(N(e.to ? F(Ae) : "div"), _(e.to ? { to: e.to } : {}, { class: ["relative block rounded-xl border-2 border-dashed bg-white p-5 transition-colors dark:bg-slate-800", [r.value.border, e.to ? "hover:bg-slate-50 dark:hover:bg-slate-700/60 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" : ""]] }), {
|
|
3645
|
+
default: L(() => [l("div", Ua, [l("div", Wa, [
|
|
3646
|
+
l("p", Ga, P(e.title), 1),
|
|
3647
|
+
l("p", { class: y(["mt-1 truncate text-3xl font-bold", r.value.value]) }, P(e.value), 3),
|
|
3648
|
+
e.subtitle ? (E(), c("p", {
|
|
3620
3649
|
key: 0,
|
|
3621
|
-
class:
|
|
3622
|
-
},
|
|
3623
|
-
|
|
3624
|
-
]), t.$slots.icon ? (
|
|
3650
|
+
class: y(["mt-1 text-sm font-medium", r.value.subtitle])
|
|
3651
|
+
}, P(e.subtitle), 3)) : s("", !0),
|
|
3652
|
+
j(t.$slots, "default")
|
|
3653
|
+
]), t.$slots.icon ? (E(), c("div", {
|
|
3625
3654
|
key: 0,
|
|
3626
|
-
class:
|
|
3627
|
-
}, [
|
|
3655
|
+
class: y(["flex h-12 w-12 shrink-0 items-center justify-center rounded-xl", r.value.iconBox])
|
|
3656
|
+
}, [j(t.$slots, "icon", { iconClass: `h-6 w-6 ${r.value.icon}` })], 2)) : s("", !0)])]),
|
|
3628
3657
|
_: 3
|
|
3629
3658
|
}, 16, ["class"]));
|
|
3630
3659
|
}
|
|
3631
|
-
}),
|
|
3660
|
+
}), qa = [
|
|
3632
3661
|
"aria-checked",
|
|
3633
3662
|
"aria-label",
|
|
3634
3663
|
"disabled"
|
|
3635
|
-
],
|
|
3664
|
+
], Ja = {
|
|
3636
3665
|
key: 0,
|
|
3637
3666
|
class: "text-sm font-medium text-slate-700 dark:text-slate-200"
|
|
3638
|
-
},
|
|
3667
|
+
}, Ya = /* @__PURE__ */ m({
|
|
3639
3668
|
__name: "BaseToggle",
|
|
3640
3669
|
props: {
|
|
3641
3670
|
modelValue: {
|
|
@@ -3664,23 +3693,23 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3664
3693
|
let e = !n.modelValue;
|
|
3665
3694
|
r("update:modelValue", e), r("change", e);
|
|
3666
3695
|
}
|
|
3667
|
-
return (t, n) => (
|
|
3696
|
+
return (t, n) => (E(), c("label", { class: y(["inline-flex items-center gap-3 select-none", e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]) }, [l("button", {
|
|
3668
3697
|
type: "button",
|
|
3669
3698
|
role: "switch",
|
|
3670
3699
|
"aria-checked": e.modelValue,
|
|
3671
3700
|
"aria-label": e.label ? void 0 : e.ariaLabel || void 0,
|
|
3672
3701
|
disabled: e.disabled,
|
|
3673
|
-
class:
|
|
3702
|
+
class: y(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-slate-900 disabled:cursor-not-allowed", e.modelValue ? i[e.color] : e.offTone === "red" ? "bg-red-200 dark:bg-red-900/50" : "bg-slate-200 dark:bg-slate-700"]),
|
|
3674
3703
|
onClick: a
|
|
3675
|
-
}, [
|
|
3676
|
-
class:
|
|
3704
|
+
}, [l("span", {
|
|
3705
|
+
class: y(["inline-block h-5 w-5 rounded-full bg-white shadow ring-1 ring-black/5 transition-transform", e.modelValue ? "translate-x-[22px]" : "translate-x-0.5"]),
|
|
3677
3706
|
"aria-hidden": "true"
|
|
3678
|
-
}, null, 2)], 10,
|
|
3707
|
+
}, null, 2)], 10, qa), e.label ? (E(), c("span", Ja, P(e.label), 1)) : s("", !0)], 2));
|
|
3679
3708
|
}
|
|
3680
|
-
}),
|
|
3709
|
+
}), Xa = ["checked", "disabled"], Za = {
|
|
3681
3710
|
key: 0,
|
|
3682
3711
|
class: "text-sm text-slate-700 dark:text-slate-200"
|
|
3683
|
-
},
|
|
3712
|
+
}, Qa = /* @__PURE__ */ m({
|
|
3684
3713
|
inheritAttrs: !1,
|
|
3685
3714
|
__name: "BaseCheckbox",
|
|
3686
3715
|
props: {
|
|
@@ -3701,21 +3730,21 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3701
3730
|
let t = e.target.checked;
|
|
3702
3731
|
n("update:modelValue", t), n("change", t);
|
|
3703
3732
|
}
|
|
3704
|
-
return (t, n) => (
|
|
3733
|
+
return (t, n) => (E(), c("label", { class: y(["inline-flex items-center gap-2 select-none", e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]) }, [l("input", _(t.$attrs, {
|
|
3705
3734
|
type: "checkbox",
|
|
3706
3735
|
checked: e.modelValue,
|
|
3707
3736
|
disabled: e.disabled,
|
|
3708
3737
|
class: "h-5 w-5 shrink-0 cursor-[inherit] rounded-md border-slate-300 bg-white text-emerald-600 accent-emerald-600 transition-colors focus:ring-2 focus:ring-emerald-500/40 focus:ring-offset-0 dark:border-slate-600 dark:bg-slate-900 dark:checked:bg-emerald-600",
|
|
3709
3738
|
onChange: r
|
|
3710
|
-
}), null, 16,
|
|
3739
|
+
}), null, 16, Xa), e.label || t.$slots.default ? (E(), c("span", Za, [j(t.$slots, "default", {}, () => [f(P(e.label), 1)])])) : s("", !0)], 2));
|
|
3711
3740
|
}
|
|
3712
|
-
}),
|
|
3741
|
+
}), $a = { class: "flex flex-col gap-2 text-left" }, eo = {
|
|
3713
3742
|
class: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-sm font-semibold text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",
|
|
3714
3743
|
"aria-hidden": "true"
|
|
3715
|
-
},
|
|
3744
|
+
}, to = { class: "min-w-0" }, no = { class: "block truncate text-sm font-medium text-slate-900 dark:text-slate-100" }, ro = {
|
|
3716
3745
|
key: 0,
|
|
3717
3746
|
class: "block truncate text-xs text-slate-500 dark:text-slate-400"
|
|
3718
|
-
},
|
|
3747
|
+
}, io = /* @__PURE__ */ m({
|
|
3719
3748
|
__name: "BaseSidebarUser",
|
|
3720
3749
|
props: {
|
|
3721
3750
|
name: {},
|
|
@@ -3730,24 +3759,24 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3730
3759
|
},
|
|
3731
3760
|
emits: ["logout"],
|
|
3732
3761
|
setup(e, { emit: t }) {
|
|
3733
|
-
let n = e, r = t,
|
|
3734
|
-
return (t, n) => (
|
|
3762
|
+
let n = e, r = t, i = a(() => (n.name || "?").split(/[\s._-]+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join(""));
|
|
3763
|
+
return (t, n) => (E(), c("div", $a, [(E(), o(N(e.to ? F(Ae) : "div"), _(e.to ? { to: e.to } : {}, {
|
|
3735
3764
|
class: ["flex items-center gap-3 rounded-lg p-2 transition-colors", e.to ? "hover:bg-slate-100 dark:hover:bg-slate-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" : ""],
|
|
3736
3765
|
title: e.to ? e.profileLabel : void 0
|
|
3737
3766
|
}), {
|
|
3738
|
-
default:
|
|
3767
|
+
default: L(() => [l("span", eo, P(i.value), 1), l("span", to, [l("span", no, P(e.name), 1), e.email ? (E(), c("span", ro, P(e.email), 1)) : s("", !0)])]),
|
|
3739
3768
|
_: 1
|
|
3740
|
-
}, 16, ["class", "title"])), e.showLogout ? (
|
|
3769
|
+
}, 16, ["class", "title"])), e.showLogout ? (E(), o(nt, {
|
|
3741
3770
|
key: 0,
|
|
3742
3771
|
class: "w-full justify-center",
|
|
3743
3772
|
description: e.logoutLabel,
|
|
3744
|
-
color:
|
|
3745
|
-
size:
|
|
3773
|
+
color: F(K).RED,
|
|
3774
|
+
size: F(q).SMALL,
|
|
3746
3775
|
outline: "",
|
|
3747
3776
|
"icon-left": "",
|
|
3748
3777
|
onClick: n[0] ||= (e) => r("logout")
|
|
3749
3778
|
}, {
|
|
3750
|
-
default:
|
|
3779
|
+
default: L(() => [p(F(ce), {
|
|
3751
3780
|
class: "mr-1.5 h-4 w-4",
|
|
3752
3781
|
"aria-hidden": "true"
|
|
3753
3782
|
})]),
|
|
@@ -3756,18 +3785,18 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3756
3785
|
"description",
|
|
3757
3786
|
"color",
|
|
3758
3787
|
"size"
|
|
3759
|
-
])) :
|
|
3788
|
+
])) : s("", !0)]));
|
|
3760
3789
|
}
|
|
3761
|
-
}),
|
|
3790
|
+
}), ao = { class: "flex min-h-screen w-full flex-col items-center justify-center bg-slate-50 px-4 py-10 dark:bg-slate-950" }, oo = { class: "mb-6 flex justify-center" }, so = {
|
|
3762
3791
|
key: 0,
|
|
3763
3792
|
class: "mb-1 text-2xl font-bold tracking-tight text-slate-900 dark:text-slate-100"
|
|
3764
|
-
},
|
|
3793
|
+
}, co = {
|
|
3765
3794
|
key: 1,
|
|
3766
3795
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3767
|
-
},
|
|
3796
|
+
}, lo = {
|
|
3768
3797
|
key: 2,
|
|
3769
3798
|
class: "mt-6 border-t border-slate-200 pt-4 text-center text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400"
|
|
3770
|
-
},
|
|
3799
|
+
}, uo = /* @__PURE__ */ m({
|
|
3771
3800
|
__name: "BaseAuthLayout",
|
|
3772
3801
|
props: {
|
|
3773
3802
|
title: { default: "" },
|
|
@@ -3778,24 +3807,24 @@ var Vn = ["aria-label", "aria-expanded"], Hn = { class: "flex flex-col h-full" }
|
|
|
3778
3807
|
}
|
|
3779
3808
|
},
|
|
3780
3809
|
setup(e) {
|
|
3781
|
-
return (t, n) => (
|
|
3782
|
-
e.title ? (
|
|
3783
|
-
e.subtitle ? (
|
|
3784
|
-
|
|
3785
|
-
t.$slots.footer ? (
|
|
3810
|
+
return (t, n) => (E(), c("div", ao, [l("div", oo, [j(t.$slots, "logo", {}, () => [p(jt, { size: F(J).MEDIUM }, null, 8, ["size"])])]), l("div", { class: y(["w-full rounded-xl border border-slate-200 bg-white p-6 text-left shadow-sm sm:p-8 dark:border-slate-700 dark:bg-slate-900", e.wide ? "max-w-3xl" : "max-w-md"]) }, [
|
|
3811
|
+
e.title ? (E(), c("h1", so, P(e.title), 1)) : s("", !0),
|
|
3812
|
+
e.subtitle ? (E(), c("p", co, P(e.subtitle), 1)) : s("", !0),
|
|
3813
|
+
l("div", { class: y(e.title || e.subtitle ? "mt-6" : "") }, [j(t.$slots, "default")], 2),
|
|
3814
|
+
t.$slots.footer ? (E(), c("div", lo, [j(t.$slots, "footer")])) : s("", !0)
|
|
3786
3815
|
], 2)]));
|
|
3787
3816
|
}
|
|
3788
3817
|
});
|
|
3789
3818
|
//#endregion
|
|
3790
3819
|
//#region node_modules/@heroicons/vue/20/solid/esm/CheckCircleIcon.js
|
|
3791
|
-
function
|
|
3792
|
-
return
|
|
3820
|
+
function fo(e, t) {
|
|
3821
|
+
return E(), c("svg", {
|
|
3793
3822
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3794
3823
|
viewBox: "0 0 20 20",
|
|
3795
3824
|
fill: "currentColor",
|
|
3796
3825
|
"aria-hidden": "true",
|
|
3797
3826
|
"data-slot": "icon"
|
|
3798
|
-
}, [
|
|
3827
|
+
}, [l("path", {
|
|
3799
3828
|
"fill-rule": "evenodd",
|
|
3800
3829
|
d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",
|
|
3801
3830
|
"clip-rule": "evenodd"
|
|
@@ -3803,14 +3832,14 @@ function co(e, t) {
|
|
|
3803
3832
|
}
|
|
3804
3833
|
//#endregion
|
|
3805
3834
|
//#region node_modules/@heroicons/vue/20/solid/esm/XCircleIcon.js
|
|
3806
|
-
function
|
|
3807
|
-
return
|
|
3835
|
+
function po(e, t) {
|
|
3836
|
+
return E(), c("svg", {
|
|
3808
3837
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3809
3838
|
viewBox: "0 0 20 20",
|
|
3810
3839
|
fill: "currentColor",
|
|
3811
3840
|
"aria-hidden": "true",
|
|
3812
3841
|
"data-slot": "icon"
|
|
3813
|
-
}, [
|
|
3842
|
+
}, [l("path", {
|
|
3814
3843
|
"fill-rule": "evenodd",
|
|
3815
3844
|
d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",
|
|
3816
3845
|
"clip-rule": "evenodd"
|
|
@@ -3818,7 +3847,7 @@ function lo(e, t) {
|
|
|
3818
3847
|
}
|
|
3819
3848
|
//#endregion
|
|
3820
3849
|
//#region src/components/BaseBooleanBadge.vue
|
|
3821
|
-
var
|
|
3850
|
+
var mo = /* @__PURE__ */ m({
|
|
3822
3851
|
__name: "BaseBooleanBadge",
|
|
3823
3852
|
props: {
|
|
3824
3853
|
value: {
|
|
@@ -3829,20 +3858,20 @@ var uo = /* @__PURE__ */ p({
|
|
|
3829
3858
|
falseLabel: { default: "No" }
|
|
3830
3859
|
},
|
|
3831
3860
|
setup(e) {
|
|
3832
|
-
return (t, n) => (
|
|
3861
|
+
return (t, n) => (E(), c("span", { class: y(["inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium ring-1 ring-inset", e.value ? "bg-emerald-50 text-emerald-700 ring-emerald-600/20 dark:bg-emerald-500/10 dark:text-emerald-300 dark:ring-emerald-400/30" : "bg-red-50 text-red-700 ring-red-600/20 dark:bg-red-500/10 dark:text-red-300 dark:ring-red-400/30"]) }, [e.value ? (E(), o(F(fo), {
|
|
3833
3862
|
key: 0,
|
|
3834
3863
|
class: "h-3.5 w-3.5",
|
|
3835
3864
|
"aria-hidden": "true"
|
|
3836
|
-
})) : (
|
|
3865
|
+
})) : (E(), o(F(po), {
|
|
3837
3866
|
key: 1,
|
|
3838
3867
|
class: "h-3.5 w-3.5",
|
|
3839
3868
|
"aria-hidden": "true"
|
|
3840
|
-
})),
|
|
3869
|
+
})), f(" " + P(e.value ? e.trueLabel : e.falseLabel), 1)], 2));
|
|
3841
3870
|
}
|
|
3842
|
-
}),
|
|
3871
|
+
}), ho = { class: "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" }, go = ["href"], _o = {
|
|
3843
3872
|
key: 1,
|
|
3844
3873
|
class: "text-slate-400 dark:text-slate-500"
|
|
3845
|
-
},
|
|
3874
|
+
}, vo = /* @__PURE__ */ m({
|
|
3846
3875
|
__name: "BaseDetailList",
|
|
3847
3876
|
props: {
|
|
3848
3877
|
items: {},
|
|
@@ -3853,34 +3882,34 @@ var uo = /* @__PURE__ */ p({
|
|
|
3853
3882
|
function n(e) {
|
|
3854
3883
|
return e == null || e === "";
|
|
3855
3884
|
}
|
|
3856
|
-
return (r, i) => (
|
|
3885
|
+
return (r, i) => (E(), c("dl", { class: y(["grid grid-cols-1 gap-x-6 gap-y-4 text-left", t.columns === 2 ? "sm:grid-cols-2" : t.columns === 3 ? "sm:grid-cols-2 lg:grid-cols-3" : ""]) }, [(E(!0), c(e, null, A(t.items, (r) => (E(), c("div", {
|
|
3857
3886
|
key: r.label,
|
|
3858
3887
|
class: "min-w-0"
|
|
3859
|
-
}, [
|
|
3888
|
+
}, [l("dt", ho, P(r.label), 1), l("dd", { class: y(["mt-1 break-words text-sm text-slate-900 dark:text-slate-100", r.mono ? "font-mono" : ""]) }, [r.href && !n(r.value) ? (E(), c("a", {
|
|
3860
3889
|
key: 0,
|
|
3861
3890
|
href: r.href,
|
|
3862
3891
|
target: "_blank",
|
|
3863
3892
|
rel: "noopener noreferrer",
|
|
3864
3893
|
class: "text-emerald-600 hover:underline dark:text-emerald-400"
|
|
3865
|
-
},
|
|
3894
|
+
}, P(r.value), 9, go)) : n(r.value) ? (E(), c("span", _o, P(t.emptyText), 1)) : (E(), c(e, { key: 2 }, [f(P(r.value), 1)], 64))], 2)]))), 128))], 2));
|
|
3866
3895
|
}
|
|
3867
3896
|
});
|
|
3868
3897
|
//#endregion
|
|
3869
3898
|
//#region src/composables/useDebounce.ts
|
|
3870
|
-
function
|
|
3871
|
-
let n =
|
|
3872
|
-
return
|
|
3899
|
+
function yo(e, t = 300) {
|
|
3900
|
+
let n = k(e.value), r = null;
|
|
3901
|
+
return I(e, (e) => {
|
|
3873
3902
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
3874
3903
|
n.value = e, r = null;
|
|
3875
3904
|
}, t);
|
|
3876
|
-
}),
|
|
3905
|
+
}), w(() => {
|
|
3877
3906
|
r &&= (clearTimeout(r), null);
|
|
3878
3907
|
}), n;
|
|
3879
3908
|
}
|
|
3880
3909
|
//#endregion
|
|
3881
3910
|
//#region src/composables/useToast.ts
|
|
3882
|
-
function
|
|
3883
|
-
let t =
|
|
3911
|
+
function bo(e = 3e3) {
|
|
3912
|
+
let t = k(!1), n = k(""), r = k(Y.SUCCESS), i = null;
|
|
3884
3913
|
function a() {
|
|
3885
3914
|
i &&= (clearTimeout(i), null);
|
|
3886
3915
|
}
|
|
@@ -3889,7 +3918,7 @@ function _o(e = 3e3) {
|
|
|
3889
3918
|
t.value = !1, i = null;
|
|
3890
3919
|
}, c);
|
|
3891
3920
|
}
|
|
3892
|
-
return
|
|
3921
|
+
return w(() => {
|
|
3893
3922
|
a();
|
|
3894
3923
|
}), {
|
|
3895
3924
|
showToast: t,
|
|
@@ -3900,7 +3929,7 @@ function _o(e = 3e3) {
|
|
|
3900
3929
|
}
|
|
3901
3930
|
//#endregion
|
|
3902
3931
|
//#region src/composables/useQueryParamSync.ts
|
|
3903
|
-
function
|
|
3932
|
+
function xo() {
|
|
3904
3933
|
let e = je(), t = Me();
|
|
3905
3934
|
function n(t) {
|
|
3906
3935
|
let n = e.query[t];
|
|
@@ -3922,8 +3951,8 @@ function vo() {
|
|
|
3922
3951
|
}
|
|
3923
3952
|
//#endregion
|
|
3924
3953
|
//#region src/composables/useFieldClasses.ts
|
|
3925
|
-
function
|
|
3926
|
-
let { isDark: e } =
|
|
3954
|
+
function So() {
|
|
3955
|
+
let { isDark: e } = W(), t = a(() => e.value ? "text-gray-300" : "text-gray-600"), n = a(() => 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");
|
|
3927
3956
|
function r(t) {
|
|
3928
3957
|
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;
|
|
3929
3958
|
}
|
|
@@ -3935,8 +3964,8 @@ function yo() {
|
|
|
3935
3964
|
}
|
|
3936
3965
|
//#endregion
|
|
3937
3966
|
//#region src/composables/usePolling.ts
|
|
3938
|
-
function
|
|
3939
|
-
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o =
|
|
3967
|
+
function Co(e, t, n = {}) {
|
|
3968
|
+
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = k(!1), s = !1;
|
|
3940
3969
|
function c() {
|
|
3941
3970
|
a === null && t !== null && (a = setInterval(() => void e(), t));
|
|
3942
3971
|
}
|
|
@@ -3958,74 +3987,74 @@ function bo(e, t, n = {}) {
|
|
|
3958
3987
|
o.value = !1, l(), s = !0;
|
|
3959
3988
|
}
|
|
3960
3989
|
}
|
|
3961
|
-
return
|
|
3990
|
+
return C(() => {
|
|
3962
3991
|
u(), i && document.addEventListener("visibilitychange", f);
|
|
3963
|
-
}),
|
|
3992
|
+
}), T(() => {
|
|
3964
3993
|
d(), i && document.removeEventListener("visibilitychange", f);
|
|
3965
3994
|
}), {
|
|
3966
3995
|
start: u,
|
|
3967
3996
|
stop: d,
|
|
3968
|
-
active:
|
|
3997
|
+
active: O(o)
|
|
3969
3998
|
};
|
|
3970
3999
|
}
|
|
3971
4000
|
//#endregion
|
|
3972
4001
|
//#region src/enums/BaseBadgeEnum.ts
|
|
3973
|
-
var
|
|
4002
|
+
var wo = /* @__PURE__ */ function(e) {
|
|
3974
4003
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
3975
4004
|
}({});
|
|
3976
4005
|
//#endregion
|
|
3977
4006
|
//#region src/utils/util.ts
|
|
3978
|
-
function
|
|
4007
|
+
function To(e) {
|
|
3979
4008
|
let t = "red";
|
|
3980
4009
|
switch (e) {
|
|
3981
|
-
case
|
|
4010
|
+
case V.ERROR:
|
|
3982
4011
|
t = "red";
|
|
3983
4012
|
break;
|
|
3984
|
-
case
|
|
4013
|
+
case V.SUCCESS:
|
|
3985
4014
|
t = "green";
|
|
3986
4015
|
break;
|
|
3987
|
-
case
|
|
4016
|
+
case V.INFO:
|
|
3988
4017
|
t = "gray";
|
|
3989
4018
|
break;
|
|
3990
|
-
case
|
|
4019
|
+
case V.WARNING: t = "yellow";
|
|
3991
4020
|
}
|
|
3992
4021
|
return t;
|
|
3993
4022
|
}
|
|
3994
|
-
function
|
|
4023
|
+
function Eo(e) {
|
|
3995
4024
|
let t = "red";
|
|
3996
4025
|
switch (e) {
|
|
3997
|
-
case
|
|
4026
|
+
case G.GREEN:
|
|
3998
4027
|
t = "green";
|
|
3999
4028
|
break;
|
|
4000
|
-
case
|
|
4029
|
+
case G.RED:
|
|
4001
4030
|
t = "red";
|
|
4002
4031
|
break;
|
|
4003
|
-
case
|
|
4032
|
+
case G.BLUE:
|
|
4004
4033
|
t = "blue";
|
|
4005
4034
|
break;
|
|
4006
|
-
case
|
|
4035
|
+
case G.YELLOW:
|
|
4007
4036
|
t = "yellow";
|
|
4008
4037
|
break;
|
|
4009
|
-
case
|
|
4038
|
+
case G.BLACK:
|
|
4010
4039
|
t = "black";
|
|
4011
4040
|
break;
|
|
4012
|
-
case
|
|
4041
|
+
case G.GRAY:
|
|
4013
4042
|
t = "gray";
|
|
4014
4043
|
break;
|
|
4015
|
-
case
|
|
4044
|
+
case G.NONE: t = "";
|
|
4016
4045
|
}
|
|
4017
4046
|
return t;
|
|
4018
4047
|
}
|
|
4019
4048
|
//#endregion
|
|
4020
4049
|
//#region src/utils/httpColors.ts
|
|
4021
|
-
var
|
|
4050
|
+
var Do = {
|
|
4022
4051
|
GET: "bg-blue-600",
|
|
4023
4052
|
POST: "bg-emerald-600",
|
|
4024
4053
|
PUT: "bg-amber-600",
|
|
4025
4054
|
DELETE: "bg-red-600",
|
|
4026
4055
|
PATCH: "bg-purple-600",
|
|
4027
4056
|
HEAD: "bg-gray-600"
|
|
4028
|
-
},
|
|
4057
|
+
}, Oo = {
|
|
4029
4058
|
GET: "bg-blue-500",
|
|
4030
4059
|
POST: "bg-green-500",
|
|
4031
4060
|
PUT: "bg-yellow-500",
|
|
@@ -4033,39 +4062,39 @@ var wo = {
|
|
|
4033
4062
|
PATCH: "bg-purple-500",
|
|
4034
4063
|
HEAD: "bg-gray-500"
|
|
4035
4064
|
};
|
|
4036
|
-
function
|
|
4037
|
-
return e ?
|
|
4065
|
+
function ko(e) {
|
|
4066
|
+
return e ? Do[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
4038
4067
|
}
|
|
4039
|
-
function
|
|
4040
|
-
return e ?
|
|
4068
|
+
function Ao(e) {
|
|
4069
|
+
return e ? Oo[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
4041
4070
|
}
|
|
4042
|
-
function
|
|
4071
|
+
function jo(e) {
|
|
4043
4072
|
let t = e ?? 0;
|
|
4044
4073
|
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";
|
|
4045
4074
|
}
|
|
4046
|
-
function
|
|
4075
|
+
function Mo(e, t) {
|
|
4047
4076
|
let n = (e || "ANY").toUpperCase();
|
|
4048
4077
|
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";
|
|
4049
4078
|
}
|
|
4050
|
-
function
|
|
4079
|
+
function No(e, t) {
|
|
4051
4080
|
let n = e ?? 200;
|
|
4052
4081
|
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";
|
|
4053
4082
|
}
|
|
4054
|
-
function
|
|
4083
|
+
function Po(e, t) {
|
|
4055
4084
|
let n = e ?? 200;
|
|
4056
4085
|
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";
|
|
4057
4086
|
}
|
|
4058
4087
|
//#endregion
|
|
4059
4088
|
//#region src/utils/kvRows.ts
|
|
4060
|
-
function
|
|
4089
|
+
function Fo(e) {
|
|
4061
4090
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
4062
4091
|
}
|
|
4063
|
-
function
|
|
4092
|
+
function Io(e) {
|
|
4064
4093
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
4065
4094
|
}
|
|
4066
4095
|
//#endregion
|
|
4067
4096
|
//#region src/utils/sanitizeHtml.ts
|
|
4068
|
-
var
|
|
4097
|
+
var Lo = /* @__PURE__ */ new Set([
|
|
4069
4098
|
"A",
|
|
4070
4099
|
"B",
|
|
4071
4100
|
"STRONG",
|
|
@@ -4080,7 +4109,7 @@ var Po = /* @__PURE__ */ new Set([
|
|
|
4080
4109
|
"LI",
|
|
4081
4110
|
"SPAN",
|
|
4082
4111
|
"DIV"
|
|
4083
|
-
]),
|
|
4112
|
+
]), Ro = /* @__PURE__ */ new Set([
|
|
4084
4113
|
"SCRIPT",
|
|
4085
4114
|
"STYLE",
|
|
4086
4115
|
"IFRAME",
|
|
@@ -4088,53 +4117,53 @@ var Po = /* @__PURE__ */ new Set([
|
|
|
4088
4117
|
"EMBED",
|
|
4089
4118
|
"NOSCRIPT",
|
|
4090
4119
|
"TEMPLATE"
|
|
4091
|
-
]),
|
|
4092
|
-
function
|
|
4120
|
+
]), zo = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
4121
|
+
function Bo(e) {
|
|
4093
4122
|
let t = e.trim().toLowerCase();
|
|
4094
4123
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
4095
4124
|
}
|
|
4096
|
-
function
|
|
4125
|
+
function Vo(e) {
|
|
4097
4126
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
4098
4127
|
let t = e, n = t.tagName.toUpperCase();
|
|
4099
|
-
if (!
|
|
4100
|
-
|
|
4128
|
+
if (!Lo.has(n)) {
|
|
4129
|
+
Ro.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
4101
4130
|
return;
|
|
4102
4131
|
}
|
|
4103
|
-
let r =
|
|
4132
|
+
let r = zo[n] ?? /* @__PURE__ */ new Set();
|
|
4104
4133
|
for (let e of Array.from(t.attributes)) {
|
|
4105
4134
|
if (!r.has(e.name.toLowerCase())) {
|
|
4106
4135
|
t.removeAttribute(e.name);
|
|
4107
4136
|
continue;
|
|
4108
4137
|
}
|
|
4109
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
4138
|
+
n === "A" && e.name.toLowerCase() === "href" && !Bo(e.value) && t.removeAttribute(e.name);
|
|
4110
4139
|
}
|
|
4111
4140
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
4112
|
-
for (let e of Array.from(t.childNodes))
|
|
4141
|
+
for (let e of Array.from(t.childNodes)) Vo(e);
|
|
4113
4142
|
}
|
|
4114
|
-
function
|
|
4143
|
+
function Ho(e) {
|
|
4115
4144
|
if (!e) return "";
|
|
4116
4145
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
4117
4146
|
if (!t) return "";
|
|
4118
|
-
for (let e of Array.from(t.childNodes))
|
|
4147
|
+
for (let e of Array.from(t.childNodes)) Vo(e);
|
|
4119
4148
|
return t.innerHTML;
|
|
4120
4149
|
}
|
|
4121
4150
|
//#endregion
|
|
4122
4151
|
//#region src/utils/format.ts
|
|
4123
|
-
var
|
|
4124
|
-
function
|
|
4125
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
4152
|
+
var Uo = "—";
|
|
4153
|
+
function Wo(e, t = 4) {
|
|
4154
|
+
if (e == null || typeof e == "string" && e.trim() === "") return Uo;
|
|
4126
4155
|
let n = typeof e == "string" ? Number(e) : e;
|
|
4127
4156
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
4128
4157
|
minimumFractionDigits: t,
|
|
4129
4158
|
maximumFractionDigits: t
|
|
4130
|
-
}) :
|
|
4159
|
+
}) : Uo;
|
|
4131
4160
|
}
|
|
4132
|
-
function
|
|
4133
|
-
if (e == null || e === "") return
|
|
4161
|
+
function Go(e) {
|
|
4162
|
+
if (e == null || e === "") return Uo;
|
|
4134
4163
|
let t = new Date(e);
|
|
4135
4164
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
4136
4165
|
}
|
|
4137
|
-
function
|
|
4166
|
+
function Ko(e) {
|
|
4138
4167
|
return new Date(e).toLocaleString(void 0, {
|
|
4139
4168
|
month: "short",
|
|
4140
4169
|
day: "numeric",
|
|
@@ -4142,13 +4171,13 @@ function Uo(e) {
|
|
|
4142
4171
|
minute: "2-digit"
|
|
4143
4172
|
});
|
|
4144
4173
|
}
|
|
4145
|
-
function
|
|
4174
|
+
function qo(e) {
|
|
4146
4175
|
return new Date(e).toLocaleDateString(void 0, {
|
|
4147
4176
|
month: "short",
|
|
4148
4177
|
day: "numeric"
|
|
4149
4178
|
});
|
|
4150
4179
|
}
|
|
4151
|
-
function
|
|
4180
|
+
function Jo(e) {
|
|
4152
4181
|
try {
|
|
4153
4182
|
return new Date(e).toLocaleString(void 0, {
|
|
4154
4183
|
year: "numeric",
|
|
@@ -4164,7 +4193,7 @@ function Go(e) {
|
|
|
4164
4193
|
return String(e);
|
|
4165
4194
|
}
|
|
4166
4195
|
}
|
|
4167
|
-
function
|
|
4196
|
+
function Yo(e) {
|
|
4168
4197
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
4169
4198
|
let t = Math.abs(e), n = 2;
|
|
4170
4199
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -4172,14 +4201,14 @@ function Ko(e) {
|
|
|
4172
4201
|
maximumFractionDigits: n
|
|
4173
4202
|
});
|
|
4174
4203
|
}
|
|
4175
|
-
function
|
|
4204
|
+
function Xo(e, t = 2) {
|
|
4176
4205
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
4177
4206
|
}
|
|
4178
|
-
function
|
|
4207
|
+
function Zo(e) {
|
|
4179
4208
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
4180
4209
|
}
|
|
4181
|
-
function
|
|
4182
|
-
if (e == null || e === "") return
|
|
4210
|
+
function Qo(e) {
|
|
4211
|
+
if (e == null || e === "") return Uo;
|
|
4183
4212
|
let t = new Date(e);
|
|
4184
4213
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
4185
4214
|
year: "numeric",
|
|
@@ -4187,8 +4216,8 @@ function Yo(e) {
|
|
|
4187
4216
|
day: "numeric"
|
|
4188
4217
|
});
|
|
4189
4218
|
}
|
|
4190
|
-
function
|
|
4191
|
-
if (e == null || e === "") return
|
|
4219
|
+
function $o(e) {
|
|
4220
|
+
if (e == null || e === "") return Uo;
|
|
4192
4221
|
let t = new Date(e);
|
|
4193
4222
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
4194
4223
|
year: "numeric",
|
|
@@ -4198,22 +4227,22 @@ function Xo(e) {
|
|
|
4198
4227
|
minute: "2-digit"
|
|
4199
4228
|
});
|
|
4200
4229
|
}
|
|
4201
|
-
function
|
|
4230
|
+
function es(e) {
|
|
4202
4231
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
4203
4232
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
4204
4233
|
return `= ${t.toFixed(n)} s`;
|
|
4205
4234
|
}
|
|
4206
|
-
function
|
|
4235
|
+
function ts(e) {
|
|
4207
4236
|
return e ? e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB` : "";
|
|
4208
4237
|
}
|
|
4209
|
-
function
|
|
4238
|
+
function ns(e) {
|
|
4210
4239
|
try {
|
|
4211
4240
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
4212
4241
|
} catch {
|
|
4213
4242
|
return e;
|
|
4214
4243
|
}
|
|
4215
4244
|
}
|
|
4216
|
-
function
|
|
4245
|
+
function rs(e) {
|
|
4217
4246
|
if (e == null) return "";
|
|
4218
4247
|
if (typeof e == "string") return e;
|
|
4219
4248
|
try {
|
|
@@ -4222,14 +4251,14 @@ function es(e) {
|
|
|
4222
4251
|
return String(e);
|
|
4223
4252
|
}
|
|
4224
4253
|
}
|
|
4225
|
-
function
|
|
4226
|
-
if (e == null || !isFinite(e)) return
|
|
4254
|
+
function is(e, t = 2) {
|
|
4255
|
+
if (e == null || !isFinite(e)) return Uo;
|
|
4227
4256
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
4228
4257
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
4229
4258
|
}
|
|
4230
4259
|
//#endregion
|
|
4231
4260
|
//#region src/utils/validate.ts
|
|
4232
|
-
function
|
|
4261
|
+
function as(e) {
|
|
4233
4262
|
let t = (e ?? "").trim();
|
|
4234
4263
|
if (!t) return !1;
|
|
4235
4264
|
try {
|
|
@@ -4239,7 +4268,7 @@ function ns(e) {
|
|
|
4239
4268
|
return !1;
|
|
4240
4269
|
}
|
|
4241
4270
|
}
|
|
4242
|
-
function
|
|
4271
|
+
function os(e) {
|
|
4243
4272
|
if (!e.trim()) return !0;
|
|
4244
4273
|
try {
|
|
4245
4274
|
return JSON.parse(e), !0;
|
|
@@ -4247,7 +4276,7 @@ function rs(e) {
|
|
|
4247
4276
|
return !1;
|
|
4248
4277
|
}
|
|
4249
4278
|
}
|
|
4250
|
-
function
|
|
4279
|
+
function ss(e) {
|
|
4251
4280
|
if (!e.trim()) return !0;
|
|
4252
4281
|
try {
|
|
4253
4282
|
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
@@ -4255,7 +4284,7 @@ function is(e) {
|
|
|
4255
4284
|
return !1;
|
|
4256
4285
|
}
|
|
4257
4286
|
}
|
|
4258
|
-
function
|
|
4287
|
+
function cs(e) {
|
|
4259
4288
|
if (!e.trim()) return !0;
|
|
4260
4289
|
let t = e.replace(/\s+/g, "");
|
|
4261
4290
|
if (!t) return !0;
|
|
@@ -4268,7 +4297,7 @@ function as(e) {
|
|
|
4268
4297
|
}
|
|
4269
4298
|
//#endregion
|
|
4270
4299
|
//#region src/utils/specForm.ts
|
|
4271
|
-
function
|
|
4300
|
+
function ls(e, t) {
|
|
4272
4301
|
let n = {};
|
|
4273
4302
|
if (!e) return n;
|
|
4274
4303
|
for (let r of e) {
|
|
@@ -4277,7 +4306,7 @@ function os(e, t) {
|
|
|
4277
4306
|
}
|
|
4278
4307
|
return n;
|
|
4279
4308
|
}
|
|
4280
|
-
function
|
|
4309
|
+
function us(e, t) {
|
|
4281
4310
|
if (!e) return null;
|
|
4282
4311
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
4283
4312
|
let e = t[n.key], r = e === "" || e == null;
|
|
@@ -4288,7 +4317,7 @@ function ss(e, t) {
|
|
|
4288
4317
|
}
|
|
4289
4318
|
//#endregion
|
|
4290
4319
|
//#region src/utils/pnl.ts
|
|
4291
|
-
function
|
|
4320
|
+
function ds(e) {
|
|
4292
4321
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
4293
4322
|
pnlUsd: null,
|
|
4294
4323
|
pnlPct: null
|
|
@@ -4303,4 +4332,4 @@ function cs(e) {
|
|
|
4303
4332
|
};
|
|
4304
4333
|
}
|
|
4305
4334
|
//#endregion
|
|
4306
|
-
export {
|
|
4335
|
+
export { V as AlertEnum, Er as BaseActionButton, ze as BaseAlert, gr as BaseAppLayout, uo as BaseAuthLayout, Ue as BaseBadge, wo as BaseBadgeEnum, ya as BaseBarDistribution, mo as BaseBooleanBadge, qe as BaseBreadcrumb, nt as BaseButton, K as BaseButtonEnum, q as BaseButtonSizeEnum, La as BaseCard, Qa as BaseCheckbox, $r as BaseChipButton, si as BaseCodeBlock, Cn as BaseCollapsibleSection, Dn as BaseConfirmModal, Or as BaseCopyButton, ia as BaseCredentialsForm, ba as BaseDateTimePicker, vo as BaseDetailList, gi as BaseDropdown, pr as BaseEntityPickerModal, Ha as BaseField, oi as BaseFileDropzone, Vi as BaseFilterChip, Mr as BaseGoogleSignInButton, li as BaseInput, st as BaseLine, ct as BaseLoginEnum, Wr as BaseLoginForm, jt as BaseLogo, J as BaseLogoEnum, Rt as BaseModal, Mt as BaseModalEnum, bn as BaseModalShell, Pn as BaseNotFoundPage, Zr as BaseNotificationPanel, br as BasePageHeader, ma as BasePillPickerModal, ei as BaseRemoveButton, zt as BaseRow, ka as BaseSearchSelect, bi as BaseSegmentedControl, di as BaseSelect, er as BaseSidebar, io as BaseSidebarUser, Ii as BaseSpecFields, Bt as BaseSpinner, zi as BaseStatBreakdown, Ka as BaseStatCard, ri as BaseStatusPill, Oi as BaseTable, jn as BaseTextInputModal, Ut as BaseToast, Y as BaseToastEnum, Ya as BaseToggle, Cr as BaseToolbarButton, Gt as ColoredSquares, G as ColorsEnums, Jt as EarningsCard, $t as EuroAmount, rt as LineEnum, an as Pagination, X as PositioningEnum, un as TrendArrow, ls as buildSpecParams, ds as computePnL, us as firstInvalidNumericSpec, ts as fmtBytes, Qo as fmtCalendarDate, $o as fmtCalendarDateTime, Go as fmtDate, qo as fmtDateShort, Ko as fmtDateTime, Jo as fmtDateTimeMs, is as fmtDuration, es as fmtMsAsSeconds, Wo as fmtNumber, Xo as fmtPct, Yo as fmtPrice, Zo as fmtUsd, ns as formatJson, To as getBaseColor, Eo as getBaseColorOf, Be as humanizeEnum, Ve as humanizeTextVNodes, Ie as initTheme, Bo as isSafeHref, as as isValidAbsoluteUrl, cs as isValidBase64, os as isValidJson, ss as isValidXml, Ao as methodBadgeBright, ko as methodBadgeSolid, Mo as methodBadgeTinted, Io as rowKeyMissing, Fo as rowValueMissing, Ho as sanitizeHtml, No as statusBadgeSoft, jo as statusBadgeSolid, Po as statusBadgeTinted, rs as stringifyValue, yo as useDebouncedRef, dn as useEscapeKey, So as useFieldClasses, In as useMobileSidebar, Un as useNotifications, Co as usePolling, xo as useQueryParamSync, Bn as useSidebarCollapse, W as useTheme, Z as useThemeClasses, bo as useToast };
|