@aerogel/core 0.1.1-next.7fce7b4ce55cfb9c329a7746f571015aedc8e3bd → 0.1.1-next.83b702b110078faef3926d147f4746121b64a2d5
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/aerogel-core.d.ts +279 -101
- package/dist/aerogel-core.js +1365 -1118
- package/dist/aerogel-core.js.map +1 -1
- package/package.json +2 -1
- package/src/components/AppLayout.vue +1 -1
- package/src/components/AppOverlays.vue +1 -1
- package/src/components/contracts/Button.ts +1 -1
- package/src/components/contracts/Modal.ts +2 -0
- package/src/components/contracts/Select.ts +80 -2
- package/src/components/contracts/Toast.ts +1 -1
- package/src/components/headless/HeadlessInputInput.vue +13 -5
- package/src/components/headless/HeadlessModal.vue +3 -12
- package/src/components/headless/HeadlessModalContent.vue +1 -1
- package/src/components/headless/HeadlessSelect.vue +6 -91
- package/src/components/ui/AdvancedOptions.vue +4 -13
- package/src/components/ui/Button.vue +1 -0
- package/src/components/ui/Combobox.vue +30 -0
- package/src/components/ui/ComboboxLabel.vue +27 -0
- package/src/components/ui/ComboboxOption.vue +30 -0
- package/src/components/ui/ComboboxOptions.vue +40 -0
- package/src/components/ui/ComboboxTrigger.vue +26 -0
- package/src/components/ui/Details.vue +33 -0
- package/src/components/ui/Input.vue +12 -4
- package/src/components/ui/LoadingModal.vue +1 -2
- package/src/components/ui/Modal.vue +32 -13
- package/src/components/ui/ProgressBar.vue +16 -2
- package/src/components/ui/SettingsModal.vue +1 -1
- package/src/components/ui/Toast.vue +1 -0
- package/src/components/ui/index.ts +6 -0
- package/src/errors/Errors.ts +4 -0
- package/src/forms/FormController.ts +4 -0
- package/src/index.css +10 -0
- package/src/services/App.state.ts +1 -0
- package/src/services/App.ts +4 -0
- package/src/services/index.ts +5 -0
- package/src/ui/UI.ts +2 -2
- package/src/ui/index.ts +1 -1
- package/src/ui/modals.ts +36 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/time.ts +2 -0
package/dist/aerogel-core.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { markRaw as
|
|
5
|
-
import { JSError as
|
|
1
|
+
var Bt = Object.defineProperty;
|
|
2
|
+
var jt = (t, s, e) => s in t ? Bt(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
3
|
+
var C = (t, s, e) => jt(t, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
+
import { markRaw as I, Comment as Ft, Text as Ot, Static as Ut, inject as X, reactive as ve, unref as l, onUnmounted as we, ref as W, computed as c, readonly as $e, nextTick as Nt, useAttrs as st, onMounted as rt, watch as Ie, toRaw as Wt, customRef as Kt, watchEffect as Y, defineComponent as g, createBlock as f, openBlock as o, mergeProps as V, withCtx as m, renderSlot as w, createPropsRestProxy as O, provide as ce, createVNode as d, normalizeProps as de, guardReactiveProps as pe, createTextVNode as L, toDisplayString as x, normalizeClass as $, createElementBlock as b, Fragment as A, renderList as B, resolveDynamicComponent as ee, useSlots as xe, createCommentVNode as M, createElementVNode as v, h as Qt, useTemplateRef as te, withModifiers as nt, withDirectives as at, vModelCheckbox as Zt, normalizeStyle as Ue, resolveComponent as Jt, createApp as Gt, vModelText as Xt } from "vue";
|
|
5
|
+
import { JSError as Ce, stringToSlug as Yt, tap as se, MagicObject as lt, PromisedValue as Z, Storage as N, objectOnly as ae, arrayFrom as ot, isEmpty as Me, objectDeepClone as es, fail as K, facade as re, arrayRemove as He, getEnv as ts, updateLocationQueryParameters as ss, forever as rs, toString as D, objectWithout as ns, noop as as, debounce as ls, stringMatchAll as it, isDevelopment as J, isTesting as ze, after as oe, uuid as ue, isObject as he, objectWithoutEmpty as ut, evaluate as os, isInstanceOf as Ne, stringExcerpt as is, arraySorted as us, ListenersManager as cs, toError as ds, round as ps } from "@noeldemartin/utils";
|
|
6
6
|
import j from "virtual:aerogel";
|
|
7
|
-
import { createPinia as
|
|
8
|
-
import
|
|
9
|
-
import { marked as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import { cva as
|
|
14
|
-
import { twMerge as
|
|
15
|
-
import { Primitive as
|
|
16
|
-
class
|
|
7
|
+
import { createPinia as ms, setActivePinia as fs, defineStore as hs } from "pinia";
|
|
8
|
+
import gs from "dompurify";
|
|
9
|
+
import { marked as vs, Renderer as We } from "marked";
|
|
10
|
+
import { injectModal as ct, useModal as bs, createModal as ys, showModal as Ke, closeModal as Qe, modals as le, ModalComponent as _s, ModalsPortal as ws } from "@noeldemartin/vue-modals";
|
|
11
|
+
import { ModalComponent as To, ModalsPortal as Mo, closeModal as Eo, createModal as Vo, injectModal as Ho, modals as Lo, showModal as Io } from "@noeldemartin/vue-modals";
|
|
12
|
+
import $s from "clsx";
|
|
13
|
+
import { cva as xs } from "class-variance-authority";
|
|
14
|
+
import { twMerge as Cs } from "tailwind-merge";
|
|
15
|
+
import { Primitive as ks, SelectValue as Ze, SelectTrigger as Ss, SelectIcon as Ts, SelectItem as Ms, SelectItemText as Es, SelectPortal as Vs, SelectContent as Hs, SelectViewport as Ls, SelectRoot as Is, Label as dt, useForwardExpose as Re, SwitchRoot as zs, SwitchThumb as Rs, DialogRoot as qs, DialogPortal as Ps, DialogContent as As, DialogDescription as Ds, DialogOverlay as Bs, DialogTitle as js, ToastClose as Fs, ToastRoot as Os, ToastProvider as Us, ToastViewport as Ns, ComboboxItem as Ws, ComboboxPortal as Ks, ComboboxContent as Qs, ComboboxViewport as Zs, ComboboxEmpty as Js, ComboboxGroup as Gs, ComboboxAnchor as Xs, ComboboxInput as Ys, ComboboxRoot as er, DropdownMenuItem as tr, DropdownMenuContent as sr, DropdownMenuRoot as rr, DropdownMenuTrigger as nr, DropdownMenuPortal as ar } from "reka-ui";
|
|
16
|
+
class Le extends Ce {
|
|
17
17
|
constructor(s, e) {
|
|
18
18
|
super(`Service '${s}' failed booting`, { cause: e });
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return j.namespace ??
|
|
21
|
+
function lr() {
|
|
22
|
+
return j.namespace ?? Yt(j.name);
|
|
23
23
|
}
|
|
24
|
-
let
|
|
25
|
-
function
|
|
26
|
-
return
|
|
24
|
+
let qe = null;
|
|
25
|
+
function pt() {
|
|
26
|
+
return qe ?? or();
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
|
|
28
|
+
function or() {
|
|
29
|
+
return se(ms(), (t) => {
|
|
30
|
+
qe = t, fs(t);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function ir() {
|
|
34
|
+
return qe ?? pt();
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function ur(t, s) {
|
|
37
|
+
return pt(), hs(t, s)();
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ke(t) {
|
|
40
40
|
var s;
|
|
41
|
-
return s = class extends
|
|
41
|
+
return s = class extends Se {
|
|
42
42
|
usesStore() {
|
|
43
43
|
return !0;
|
|
44
44
|
}
|
|
@@ -72,19 +72,19 @@ To fix this problem, declare your initialState as a function instead.`
|
|
|
72
72
|
var r;
|
|
73
73
|
return ((r = t.restore) == null ? void 0 : r.call(t, e)) ?? e;
|
|
74
74
|
}
|
|
75
|
-
},
|
|
75
|
+
}, C(s, "persist", t.persist ?? []), s;
|
|
76
76
|
}
|
|
77
|
-
var
|
|
78
|
-
let
|
|
77
|
+
var Ve;
|
|
78
|
+
let Se = (Ve = class extends lt {
|
|
79
79
|
constructor() {
|
|
80
80
|
super();
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
C(this, "_name");
|
|
82
|
+
C(this, "_booted");
|
|
83
|
+
C(this, "_computedStateKeys");
|
|
84
|
+
C(this, "_watchers");
|
|
85
|
+
C(this, "_store");
|
|
86
86
|
const e = this.getComputedStateDefinition();
|
|
87
|
-
this._name = this.getName() ?? new.target.name, this._booted = new
|
|
87
|
+
this._name = this.getName() ?? new.target.name, this._booted = new Z(), this._computedStateKeys = new Set(Object.keys(e)), this._watchers = this.getStateWatchers(), this._store = this.usesStore() && ur(this._name, {
|
|
88
88
|
state: () => this.getInitialState(),
|
|
89
89
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90
90
|
getters: e
|
|
@@ -97,7 +97,7 @@ let Ce = (Me = class extends rt {
|
|
|
97
97
|
return super.static(e);
|
|
98
98
|
}
|
|
99
99
|
launch() {
|
|
100
|
-
const e = (r) => this._booted.reject(new
|
|
100
|
+
const e = (r) => this._booted.reject(new Le(this._name, r));
|
|
101
101
|
try {
|
|
102
102
|
this.frameworkBoot().then(() => this.boot()).then(() => this._booted.resolve()).catch(e);
|
|
103
103
|
} catch (r) {
|
|
@@ -106,7 +106,7 @@ let Ce = (Me = class extends rt {
|
|
|
106
106
|
return this._booted;
|
|
107
107
|
}
|
|
108
108
|
hasPersistedState() {
|
|
109
|
-
return
|
|
109
|
+
return N.has(this.storageKey);
|
|
110
110
|
}
|
|
111
111
|
hasState(e) {
|
|
112
112
|
return this._store ? e in this._store.$state || this._computedStateKeys.has(e) : !1;
|
|
@@ -118,14 +118,14 @@ let Ce = (Me = class extends rt {
|
|
|
118
118
|
setState(e, r) {
|
|
119
119
|
if (!this._store)
|
|
120
120
|
return;
|
|
121
|
-
const n = typeof e == "string" ? { [e]: r } : e, a =
|
|
121
|
+
const n = typeof e == "string" ? { [e]: r } : e, a = ae(this._store.$state, Object.keys(n));
|
|
122
122
|
Object.assign(this._store.$state, n), this.onStateUpdated(n, a);
|
|
123
123
|
}
|
|
124
124
|
updatePersistedState(e) {
|
|
125
125
|
if (!this._store)
|
|
126
126
|
return;
|
|
127
|
-
const r =
|
|
128
|
-
|
|
127
|
+
const r = ot(e), n = ae(this._store.$state, r);
|
|
128
|
+
Me(n) || this.onPersistentStateUpdated(n);
|
|
129
129
|
}
|
|
130
130
|
__get(e) {
|
|
131
131
|
return this.hasState(e) ? this.getState(e) : super.__get(e);
|
|
@@ -134,21 +134,21 @@ let Ce = (Me = class extends rt {
|
|
|
134
134
|
this.setState({ [e]: r });
|
|
135
135
|
}
|
|
136
136
|
get storageKey() {
|
|
137
|
-
return `${
|
|
137
|
+
return `${lr()}:${this._name}`;
|
|
138
138
|
}
|
|
139
139
|
onStateUpdated(e, r) {
|
|
140
|
-
const n =
|
|
141
|
-
|
|
140
|
+
const n = ae(e, this.static("persist"));
|
|
141
|
+
Me(n) || this.onPersistentStateUpdated(n);
|
|
142
142
|
for (const a in e) {
|
|
143
143
|
const u = this._watchers[a];
|
|
144
144
|
!u || e[a] === r[a] || u.call(this, e[a], r[a]);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
onPersistentStateUpdated(e) {
|
|
148
|
-
const r =
|
|
149
|
-
r &&
|
|
148
|
+
const r = N.get(this.storageKey);
|
|
149
|
+
r && N.set(this.storageKey, {
|
|
150
150
|
...r,
|
|
151
|
-
...this.serializePersistedState(
|
|
151
|
+
...this.serializePersistedState(es(e))
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
usesStore() {
|
|
@@ -178,28 +178,28 @@ let Ce = (Me = class extends rt {
|
|
|
178
178
|
async boot() {
|
|
179
179
|
}
|
|
180
180
|
restorePersistedState() {
|
|
181
|
-
if (!(!this.usesStore() ||
|
|
182
|
-
if (
|
|
183
|
-
const e =
|
|
181
|
+
if (!(!this.usesStore() || Me(this.static("persist")))) {
|
|
182
|
+
if (N.has(this.storageKey)) {
|
|
183
|
+
const e = N.require(this.storageKey);
|
|
184
184
|
this.setState(this.deserializePersistedState(e));
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
N.set(this.storageKey, ae(this.getState(), this.static("persist")));
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
requireStore() {
|
|
191
|
-
return this._store ? this._store :
|
|
191
|
+
return this._store ? this._store : K(`Failed getting '${this._name}' store`);
|
|
192
192
|
}
|
|
193
|
-
},
|
|
194
|
-
const
|
|
193
|
+
}, C(Ve, "persist", []), Ve);
|
|
194
|
+
const Al = {
|
|
195
195
|
Low: -256,
|
|
196
196
|
Default: 0,
|
|
197
197
|
High: 256
|
|
198
198
|
};
|
|
199
|
-
class
|
|
199
|
+
class cr extends Se {
|
|
200
200
|
constructor() {
|
|
201
201
|
super(...arguments);
|
|
202
|
-
|
|
202
|
+
C(this, "listeners", {});
|
|
203
203
|
}
|
|
204
204
|
async boot() {
|
|
205
205
|
Object.entries(globalThis.__aerogelEvents__ ?? {}).forEach(([e, r]) => (
|
|
@@ -211,7 +211,7 @@ class Zs extends Ce {
|
|
|
211
211
|
var a;
|
|
212
212
|
const n = this.listeners[e] ?? { priorities: [], handlers: {} };
|
|
213
213
|
for (const u of n.priorities)
|
|
214
|
-
await Promise.all(((a = n.handlers[u]) == null ? void 0 : a.map((
|
|
214
|
+
await Promise.all(((a = n.handlers[u]) == null ? void 0 : a.map((i) => i(r))) ?? []);
|
|
215
215
|
}
|
|
216
216
|
// prettier-ignore
|
|
217
217
|
/* eslint-enable max-len */
|
|
@@ -223,11 +223,11 @@ class Zs extends Ce {
|
|
|
223
223
|
/* eslint-enable max-len */
|
|
224
224
|
once(e, r, n) {
|
|
225
225
|
let a = null;
|
|
226
|
-
const u = typeof r == "function" ? {} : r,
|
|
227
|
-
return
|
|
226
|
+
const u = typeof r == "function" ? {} : r, i = typeof r == "function" ? r : n;
|
|
227
|
+
return se(
|
|
228
228
|
() => a && this.off(e, a),
|
|
229
229
|
(p) => {
|
|
230
|
-
a = (...
|
|
230
|
+
a = (...h) => (p(), i(...h)), this.registerListener(e, u, i);
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
233
|
}
|
|
@@ -237,31 +237,32 @@ class Zs extends Ce {
|
|
|
237
237
|
if (!n)
|
|
238
238
|
return;
|
|
239
239
|
const a = [...n.priorities];
|
|
240
|
-
for (const
|
|
241
|
-
|
|
240
|
+
for (const i of a)
|
|
241
|
+
He(n.handlers[i] ?? [], r), ((u = n.handlers[i]) == null ? void 0 : u.length) === 0 && (delete n.handlers[i], He(n.priorities, i));
|
|
242
242
|
n.priorities.length === 0 && delete this.listeners[e];
|
|
243
243
|
}
|
|
244
244
|
registerListener(e, r, n) {
|
|
245
|
-
var p,
|
|
245
|
+
var p, h, y;
|
|
246
246
|
const a = r.priority ?? 0;
|
|
247
247
|
e in this.listeners || (this.listeners[e] = { priorities: [], handlers: {} });
|
|
248
|
-
const u = ((p = this.listeners[e]) == null ? void 0 : p.priorities) ??
|
|
249
|
-
u.includes(a) || (u.push(a), u.sort((
|
|
248
|
+
const u = ((p = this.listeners[e]) == null ? void 0 : p.priorities) ?? K(`priorities missing for event '${e}'`), i = ((h = this.listeners[e]) == null ? void 0 : h.handlers) ?? K(`handlers missing for event '${e}'`);
|
|
249
|
+
u.includes(a) || (u.push(a), u.sort((_, E) => E - _), i[a] = []), (y = i[a]) == null || y.push(n);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
const F =
|
|
253
|
-
function
|
|
252
|
+
const F = re(cr);
|
|
253
|
+
function Dl(t) {
|
|
254
254
|
return t;
|
|
255
255
|
}
|
|
256
|
-
const
|
|
256
|
+
const dr = ke({
|
|
257
257
|
name: "app",
|
|
258
258
|
initialState: {
|
|
259
259
|
plugins: {},
|
|
260
260
|
instance: null,
|
|
261
|
-
environment:
|
|
261
|
+
environment: ts() ?? "development",
|
|
262
262
|
version: j.version,
|
|
263
263
|
sourceUrl: j.sourceUrl,
|
|
264
|
-
settings: []
|
|
264
|
+
settings: [],
|
|
265
|
+
settingsFullscreenOnMobile: !1
|
|
265
266
|
},
|
|
266
267
|
computed: {
|
|
267
268
|
development: (t) => t.environment === "development",
|
|
@@ -275,12 +276,12 @@ const Xs = xe({
|
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
278
|
});
|
|
278
|
-
class
|
|
279
|
+
class pr extends dr {
|
|
279
280
|
constructor() {
|
|
280
281
|
super(...arguments);
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
C(this, "name", j.name);
|
|
283
|
+
C(this, "ready", new Z());
|
|
284
|
+
C(this, "mounted", new Z());
|
|
284
285
|
}
|
|
285
286
|
isReady() {
|
|
286
287
|
return this.ready.isResolved();
|
|
@@ -289,13 +290,16 @@ class Gs extends Xs {
|
|
|
289
290
|
return this.mounted.isResolved();
|
|
290
291
|
}
|
|
291
292
|
addSetting(e) {
|
|
292
|
-
this.settings.push(
|
|
293
|
+
this.settings.push(I(e));
|
|
294
|
+
}
|
|
295
|
+
setSettingsFullscreenOnMobile(e) {
|
|
296
|
+
this.settingsFullscreenOnMobile = e;
|
|
293
297
|
}
|
|
294
298
|
async whenReady(e) {
|
|
295
299
|
return await this.ready.then(e);
|
|
296
300
|
}
|
|
297
301
|
async reload(e) {
|
|
298
|
-
e &&
|
|
302
|
+
e && ss(e), location.reload(), await rs();
|
|
299
303
|
}
|
|
300
304
|
plugin(e) {
|
|
301
305
|
return this.plugins[e] ?? null;
|
|
@@ -308,12 +312,12 @@ class Gs extends Xs {
|
|
|
308
312
|
F.once("application-ready", () => this.ready.resolve()), F.once("application-mounted", () => this.mounted.resolve());
|
|
309
313
|
}
|
|
310
314
|
}
|
|
311
|
-
const
|
|
312
|
-
function
|
|
315
|
+
const q = re(pr);
|
|
316
|
+
function Bl(t) {
|
|
313
317
|
return t;
|
|
314
318
|
}
|
|
315
|
-
async function
|
|
316
|
-
|
|
319
|
+
async function mr(t, ...s) {
|
|
320
|
+
q.setState(
|
|
317
321
|
"plugins",
|
|
318
322
|
t.reduce(
|
|
319
323
|
(e, r) => (r.name && (e[r.name] = r), e),
|
|
@@ -321,55 +325,55 @@ async function Ys(t, ...s) {
|
|
|
321
325
|
)
|
|
322
326
|
), await Promise.all(t.map((e) => e.install(...s)) ?? []);
|
|
323
327
|
}
|
|
324
|
-
function
|
|
325
|
-
return Object.entries(t.props ?? {}).reduce((s, [e, r]) => s + `${e}="${
|
|
328
|
+
function fr(t) {
|
|
329
|
+
return Object.entries(t.props ?? {}).reduce((s, [e, r]) => s + `${e}="${D(r)}"`, "");
|
|
326
330
|
}
|
|
327
|
-
function
|
|
331
|
+
function jl(t) {
|
|
328
332
|
return t;
|
|
329
333
|
}
|
|
330
|
-
function
|
|
334
|
+
function hr(t) {
|
|
331
335
|
const s = X(t);
|
|
332
|
-
return s ?
|
|
336
|
+
return s ? ve(s) : void 0;
|
|
333
337
|
}
|
|
334
|
-
function
|
|
335
|
-
return
|
|
338
|
+
function H(t, s) {
|
|
339
|
+
return hr(t) ?? K(s ?? `Could not resolve '${D(t)}' injection key`);
|
|
336
340
|
}
|
|
337
|
-
function
|
|
338
|
-
return X(t) ??
|
|
341
|
+
function gr(t, s) {
|
|
342
|
+
return X(t) ?? K(s ?? `Could not resolve '${D(t)}' injection key`);
|
|
339
343
|
}
|
|
340
|
-
function
|
|
341
|
-
return typeof t == "string" ? t : t.type ===
|
|
344
|
+
function mt(t) {
|
|
345
|
+
return typeof t == "string" ? t : t.type === Ft ? "" : t.type === Ot || t.type === Ut ? t.children : t.type === "br" ? `
|
|
342
346
|
|
|
343
|
-
` : `<${t.type} ${
|
|
347
|
+
` : `<${t.type} ${fr(t)}>${Array.from(t.children).map(mt).join("")}</${t.type}>`;
|
|
344
348
|
}
|
|
345
|
-
const
|
|
349
|
+
const Ee = /* @__PURE__ */ new WeakMap(), vr = {
|
|
346
350
|
mounted(t, { value: s, modifiers: e }) {
|
|
347
351
|
const r = typeof s == "function" ? s : null, n = () => {
|
|
348
352
|
const a = t.getBoundingClientRect();
|
|
349
353
|
e.css && (t.style.setProperty("--width", `${a.width}px`), t.style.setProperty("--height", `${a.height}px`)), r == null || r({ width: a.width, height: a.height });
|
|
350
354
|
};
|
|
351
|
-
e.watch &&
|
|
355
|
+
e.watch && Ee.set(t, se(new ResizeObserver(n)).observe(t)), n();
|
|
352
356
|
},
|
|
353
357
|
unmounted(t) {
|
|
354
358
|
var s;
|
|
355
|
-
(s =
|
|
359
|
+
(s = Ee.get(t)) == null || s.unobserve(t), Ee.delete(t);
|
|
356
360
|
}
|
|
357
361
|
};
|
|
358
|
-
function
|
|
359
|
-
const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, u =
|
|
360
|
-
return
|
|
362
|
+
function ft(t, s) {
|
|
363
|
+
const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, u = xs(n, a);
|
|
364
|
+
return k(u(r), l(e));
|
|
361
365
|
}
|
|
362
|
-
function
|
|
363
|
-
return
|
|
366
|
+
function k(...t) {
|
|
367
|
+
return Cs($s(t));
|
|
364
368
|
}
|
|
365
|
-
function
|
|
369
|
+
function Fl(t, s) {
|
|
366
370
|
const e = F.on(t, s);
|
|
367
|
-
|
|
371
|
+
we(() => e());
|
|
368
372
|
}
|
|
369
|
-
const
|
|
373
|
+
const br = {
|
|
370
374
|
required: (t) => t ? void 0 : "required"
|
|
371
375
|
};
|
|
372
|
-
function
|
|
376
|
+
function yr(t, s) {
|
|
373
377
|
var e;
|
|
374
378
|
if (t == null)
|
|
375
379
|
return !0;
|
|
@@ -388,32 +392,32 @@ function ar(t, s) {
|
|
|
388
392
|
return typeof t == "object";
|
|
389
393
|
}
|
|
390
394
|
}
|
|
391
|
-
const
|
|
392
|
-
function
|
|
393
|
-
|
|
395
|
+
const ge = { ...br };
|
|
396
|
+
function Ol(t, s) {
|
|
397
|
+
ge[t] = s;
|
|
394
398
|
}
|
|
395
|
-
function
|
|
396
|
-
return
|
|
399
|
+
function _r(t, s) {
|
|
400
|
+
return yr(t, s) ? [] : ["invalid_value"];
|
|
397
401
|
}
|
|
398
|
-
function
|
|
402
|
+
function wr(t, s) {
|
|
399
403
|
var r;
|
|
400
|
-
const e = (r =
|
|
401
|
-
return e ?
|
|
404
|
+
const e = (r = ge[s]) == null ? void 0 : r.call(ge, t);
|
|
405
|
+
return e ? ot(e) : [];
|
|
402
406
|
}
|
|
403
|
-
const
|
|
404
|
-
class
|
|
407
|
+
const Ul = Symbol(), Je = /* @__PURE__ */ new WeakMap();
|
|
408
|
+
class $r extends lt {
|
|
405
409
|
constructor(e) {
|
|
406
410
|
super();
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
this._fields = e, this._submitted =
|
|
411
|
+
C(this, "errors");
|
|
412
|
+
C(this, "_fields");
|
|
413
|
+
C(this, "_data");
|
|
414
|
+
C(this, "_submitted");
|
|
415
|
+
C(this, "_errors");
|
|
416
|
+
C(this, "_listeners", {});
|
|
417
|
+
this._fields = e, this._submitted = W(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), Je.set(
|
|
414
418
|
this,
|
|
415
419
|
c(() => !Object.values(this._errors).some((r) => r !== null))
|
|
416
|
-
), this.errors =
|
|
420
|
+
), this.errors = $e(this._errors);
|
|
417
421
|
}
|
|
418
422
|
get valid() {
|
|
419
423
|
var e;
|
|
@@ -423,8 +427,8 @@ class or extends rt {
|
|
|
423
427
|
return this._submitted.value;
|
|
424
428
|
}
|
|
425
429
|
setFieldValue(e, r) {
|
|
426
|
-
const n = this._fields[e] ??
|
|
427
|
-
this._data[e] = n.type === "string" && (n.trim ?? !0) ?
|
|
430
|
+
const n = this._fields[e] ?? K(`Trying to set undefined '${D(e)}' field`);
|
|
431
|
+
this._data[e] = n.type === "string" && (n.trim ?? !0) ? D(r).trim() : r, this._submitted.value && this.validate();
|
|
428
432
|
}
|
|
429
433
|
getFieldValue(e) {
|
|
430
434
|
return this._data[e];
|
|
@@ -433,6 +437,9 @@ class or extends rt {
|
|
|
433
437
|
var r, n;
|
|
434
438
|
return ((n = (r = this._fields[e]) == null ? void 0 : r.rules) == null ? void 0 : n.split("|")) ?? [];
|
|
435
439
|
}
|
|
440
|
+
setFieldErrors(e, r) {
|
|
441
|
+
this._errors[e] = r;
|
|
442
|
+
}
|
|
436
443
|
getFieldType(e) {
|
|
437
444
|
var r;
|
|
438
445
|
return ((r = this._fields[e]) == null ? void 0 : r.type) ?? null;
|
|
@@ -461,11 +468,11 @@ class or extends rt {
|
|
|
461
468
|
return (n = this._listeners)[e] ?? (n[e] = []), (a = this._listeners[e]) == null || a.push(r), () => this.off(e, r);
|
|
462
469
|
}
|
|
463
470
|
off(e, r) {
|
|
464
|
-
|
|
471
|
+
He(this._listeners[e] ?? [], r);
|
|
465
472
|
}
|
|
466
473
|
async focus(e) {
|
|
467
474
|
var r;
|
|
468
|
-
await
|
|
475
|
+
await Nt(), (r = this._listeners.focus) == null || r.forEach((n) => n(e));
|
|
469
476
|
}
|
|
470
477
|
__get(e) {
|
|
471
478
|
return e in this._fields ? this.getFieldValue(e) : super.__get(e);
|
|
@@ -478,24 +485,24 @@ class or extends rt {
|
|
|
478
485
|
this.setFieldValue(e, r);
|
|
479
486
|
}
|
|
480
487
|
getFieldErrors(e, r) {
|
|
481
|
-
var
|
|
482
|
-
const n = [], a = this._data[e], u = ((
|
|
483
|
-
n.push(...
|
|
488
|
+
var i;
|
|
489
|
+
const n = [], a = this._data[e], u = ((i = r.rules) == null ? void 0 : i.split("|")) ?? [];
|
|
490
|
+
n.push(..._r(a, r));
|
|
484
491
|
for (const p of u)
|
|
485
|
-
p !== "required" && a == null || n.push(...
|
|
492
|
+
p !== "required" && a == null || n.push(...wr(a, p));
|
|
486
493
|
return n.length > 0 ? n : null;
|
|
487
494
|
}
|
|
488
495
|
getInitialData(e) {
|
|
489
496
|
if (this.static().isConjuring())
|
|
490
497
|
return {};
|
|
491
498
|
const r = Object.entries(e).reduce((n, [a, u]) => (n[a] = u.default ?? null, n), {});
|
|
492
|
-
return
|
|
499
|
+
return ve(r);
|
|
493
500
|
}
|
|
494
501
|
getInitialErrors(e) {
|
|
495
502
|
if (this.static().isConjuring())
|
|
496
503
|
return {};
|
|
497
504
|
const r = Object.keys(e).reduce((n, a) => (n[a] = null, n), {});
|
|
498
|
-
return
|
|
505
|
+
return ve(r);
|
|
499
506
|
}
|
|
500
507
|
resetData() {
|
|
501
508
|
for (const [e, r] of Object.entries(this._fields))
|
|
@@ -505,30 +512,30 @@ class or extends rt {
|
|
|
505
512
|
Object.keys(this._errors).forEach((r) => delete this._errors[r]), e && Object.assign(this._errors, e);
|
|
506
513
|
}
|
|
507
514
|
}
|
|
508
|
-
function
|
|
515
|
+
function ht(t, s) {
|
|
509
516
|
const e = X("form", null), r = e == null ? void 0 : e.on("focus", (n) => t.name === n && s());
|
|
510
|
-
|
|
517
|
+
we(() => r == null ? void 0 : r());
|
|
511
518
|
}
|
|
512
|
-
function
|
|
513
|
-
return new
|
|
519
|
+
function gt(t) {
|
|
520
|
+
return new $r(t);
|
|
514
521
|
}
|
|
515
522
|
function Pe() {
|
|
516
|
-
const t =
|
|
517
|
-
return [c(() =>
|
|
523
|
+
const t = st(), s = c(() => t.class);
|
|
524
|
+
return [c(() => ns(t, "class")), s];
|
|
518
525
|
}
|
|
519
|
-
function
|
|
520
|
-
let s =
|
|
521
|
-
|
|
526
|
+
function Nl(t) {
|
|
527
|
+
let s = as;
|
|
528
|
+
rt(() => s = t()), we(() => s());
|
|
522
529
|
}
|
|
523
|
-
function
|
|
524
|
-
const e =
|
|
525
|
-
return
|
|
530
|
+
function Wl(t, s) {
|
|
531
|
+
const e = ve(N.get(t) ?? s);
|
|
532
|
+
return Ie(e, () => N.set(t, Wt(e))), e;
|
|
526
533
|
}
|
|
527
|
-
function
|
|
534
|
+
function xr(t) {
|
|
528
535
|
let s = new Set(t), e, r;
|
|
529
|
-
const n =
|
|
536
|
+
const n = Kt((a, u) => (r = a, e = u, {
|
|
530
537
|
get: () => s,
|
|
531
|
-
set: () =>
|
|
538
|
+
set: () => K("Attempted to write read-only reactive set")
|
|
532
539
|
}));
|
|
533
540
|
return {
|
|
534
541
|
values() {
|
|
@@ -551,71 +558,71 @@ function ur(t) {
|
|
|
551
558
|
}
|
|
552
559
|
};
|
|
553
560
|
}
|
|
554
|
-
function
|
|
555
|
-
const s =
|
|
556
|
-
return
|
|
561
|
+
function Kl(t) {
|
|
562
|
+
const s = W(), e = c(t);
|
|
563
|
+
return Ie(e, async () => s.value = await e.value, { immediate: !0 }), s;
|
|
557
564
|
}
|
|
558
|
-
function
|
|
559
|
-
const e = s ? t : {}, r = s ?? t, n =
|
|
560
|
-
return
|
|
565
|
+
function Ql(t, s) {
|
|
566
|
+
const e = s ? t : {}, r = s ?? t, n = W(e.initial ?? null), a = ls((u) => n.value = u, e.delay ?? 300);
|
|
567
|
+
return Y(() => a(r())), n;
|
|
561
568
|
}
|
|
562
569
|
let ie = null;
|
|
563
|
-
function
|
|
564
|
-
return
|
|
570
|
+
function Cr() {
|
|
571
|
+
return se(new We(), (t) => {
|
|
565
572
|
t.link = function(s) {
|
|
566
|
-
const e =
|
|
573
|
+
const e = We.prototype.link.apply(this, [s]);
|
|
567
574
|
return s.href.startsWith("#") ? e : e.replace("<a", '<a target="_blank"');
|
|
568
575
|
};
|
|
569
576
|
});
|
|
570
577
|
}
|
|
571
|
-
function
|
|
572
|
-
const s =
|
|
578
|
+
function kr(t) {
|
|
579
|
+
const s = it(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
|
|
573
580
|
for (const [e, r, n] of s)
|
|
574
581
|
t = t.replace(e, `<button type="button" data-markdown-action="${r}">${n}</button>`);
|
|
575
582
|
return t;
|
|
576
583
|
}
|
|
577
|
-
function
|
|
578
|
-
const s =
|
|
584
|
+
function Sr(t) {
|
|
585
|
+
const s = it(t, /<a[^>]*href="#route:([^"]+)"[^>]*>([^<]+)<\/a>/g);
|
|
579
586
|
for (const [e, r, n] of s) {
|
|
580
587
|
const a = (ie == null ? void 0 : ie.resolve(r)) ?? r;
|
|
581
588
|
t = t.replace(e, `<a data-markdown-route="${r}" href="${a}">${n}</a>`);
|
|
582
589
|
}
|
|
583
590
|
return t;
|
|
584
591
|
}
|
|
585
|
-
function
|
|
592
|
+
function Tr() {
|
|
586
593
|
return ie;
|
|
587
594
|
}
|
|
588
|
-
function
|
|
595
|
+
function Zl(t) {
|
|
589
596
|
ie = t;
|
|
590
597
|
}
|
|
591
|
-
function
|
|
592
|
-
let s =
|
|
593
|
-
return s =
|
|
598
|
+
function Mr(t) {
|
|
599
|
+
let s = vs(t, { renderer: Cr(), async: !1 });
|
|
600
|
+
return s = vt(s), s = kr(s), s = Sr(s), s;
|
|
594
601
|
}
|
|
595
|
-
function
|
|
596
|
-
return
|
|
602
|
+
function vt(t) {
|
|
603
|
+
return gs.sanitize(t, { ADD_ATTR: ["target"] });
|
|
597
604
|
}
|
|
598
|
-
const
|
|
605
|
+
const Er = 6e4, Ge = -(/* @__PURE__ */ new Date()).getTimezoneOffset() * -Er, Vr = {
|
|
599
606
|
mounted(t, { value: s }) {
|
|
600
|
-
t.innerHTML =
|
|
607
|
+
t.innerHTML = vt(s);
|
|
601
608
|
}
|
|
602
|
-
},
|
|
603
|
-
measure:
|
|
604
|
-
"safe-html":
|
|
605
|
-
},
|
|
609
|
+
}, Hr = {
|
|
610
|
+
measure: vr,
|
|
611
|
+
"safe-html": Vr
|
|
612
|
+
}, Lr = {
|
|
606
613
|
install(t, s) {
|
|
607
614
|
const e = {
|
|
608
|
-
...
|
|
615
|
+
...Hr,
|
|
609
616
|
...s.directives
|
|
610
617
|
};
|
|
611
618
|
for (const [r, n] of Object.entries(e))
|
|
612
619
|
t.directive(r, n);
|
|
613
620
|
}
|
|
614
621
|
};
|
|
615
|
-
class
|
|
622
|
+
class Ir extends Se {
|
|
616
623
|
constructor() {
|
|
617
624
|
super(...arguments);
|
|
618
|
-
|
|
625
|
+
C(this, "cache");
|
|
619
626
|
}
|
|
620
627
|
async get(e) {
|
|
621
628
|
return await (await this.open()).match(e) ?? null;
|
|
@@ -628,30 +635,30 @@ class br extends Ce {
|
|
|
628
635
|
(await n.keys(e)).length !== 0 && await n.put(e, r);
|
|
629
636
|
}
|
|
630
637
|
async open() {
|
|
631
|
-
return this.cache = this.cache ??
|
|
638
|
+
return this.cache = this.cache ?? se(new Z(), (e) => {
|
|
632
639
|
caches.open("app").then((r) => e.resolve(r));
|
|
633
640
|
});
|
|
634
641
|
}
|
|
635
642
|
}
|
|
636
|
-
const
|
|
637
|
-
class
|
|
643
|
+
const Jl = re(Ir);
|
|
644
|
+
class zr extends Se {
|
|
638
645
|
async purge() {
|
|
639
646
|
await F.emit("purge-storage");
|
|
640
647
|
}
|
|
641
648
|
}
|
|
642
|
-
const
|
|
643
|
-
function
|
|
649
|
+
const bt = re(zr);
|
|
650
|
+
function Gl(t, s) {
|
|
644
651
|
return {
|
|
645
652
|
...t,
|
|
646
|
-
...
|
|
653
|
+
...ae(s, Object.keys(t))
|
|
647
654
|
};
|
|
648
655
|
}
|
|
649
|
-
const
|
|
650
|
-
$app:
|
|
656
|
+
const Rr = {
|
|
657
|
+
$app: q,
|
|
651
658
|
$events: F,
|
|
652
|
-
$storage:
|
|
659
|
+
$storage: bt
|
|
653
660
|
};
|
|
654
|
-
async function
|
|
661
|
+
async function Te(t, s) {
|
|
655
662
|
await Promise.all(
|
|
656
663
|
Object.entries(s).map(async ([e, r]) => {
|
|
657
664
|
await r.launch().catch((n) => {
|
|
@@ -661,37 +668,47 @@ async function ke(t, s) {
|
|
|
661
668
|
})
|
|
662
669
|
), Object.assign(t.config.globalProperties, s), (J() || ze()) && Object.assign(globalThis, s);
|
|
663
670
|
}
|
|
664
|
-
const
|
|
671
|
+
const qr = {
|
|
665
672
|
async install(t, s) {
|
|
666
673
|
var r;
|
|
667
674
|
const e = {
|
|
668
|
-
|
|
675
|
+
...Rr,
|
|
669
676
|
...s.services
|
|
670
677
|
};
|
|
671
|
-
t.use(
|
|
672
|
-
}
|
|
673
|
-
},
|
|
678
|
+
t.use(ir()), (r = s.settings) == null || r.forEach((n) => q.addSetting(n)), s.settingsFullscreenOnMobile !== void 0 && q.setSettingsFullscreenOnMobile(s.settingsFullscreenOnMobile), await Te(t, e);
|
|
679
|
+
}
|
|
680
|
+
}, Xe = /* @__PURE__ */ new WeakSet();
|
|
681
|
+
function Ae() {
|
|
682
|
+
const t = ct(), { close: s, remove: e, ...r } = bs(Xe.has(t) ? {} : { removeOnClose: !1 });
|
|
683
|
+
return Xe.add(t), {
|
|
684
|
+
...r,
|
|
685
|
+
async close(n) {
|
|
686
|
+
s(n), await oe(1e3), e();
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
const yt = 768, be = {
|
|
674
691
|
Mobile: "mobile",
|
|
675
692
|
Desktop: "desktop"
|
|
676
693
|
};
|
|
677
|
-
function
|
|
678
|
-
return globalThis.innerWidth >
|
|
694
|
+
function _t() {
|
|
695
|
+
return globalThis.innerWidth > yt ? be.Desktop : be.Mobile;
|
|
679
696
|
}
|
|
680
|
-
const
|
|
697
|
+
const Pr = ke({
|
|
681
698
|
name: "ui",
|
|
682
699
|
initialState: {
|
|
683
700
|
toasts: [],
|
|
684
|
-
layout:
|
|
701
|
+
layout: _t()
|
|
685
702
|
},
|
|
686
703
|
computed: {
|
|
687
|
-
desktop: ({ layout: t }) => t ===
|
|
688
|
-
mobile: ({ layout: t }) => t ===
|
|
704
|
+
desktop: ({ layout: t }) => t === be.Desktop,
|
|
705
|
+
mobile: ({ layout: t }) => t === be.Mobile
|
|
689
706
|
}
|
|
690
707
|
});
|
|
691
|
-
class
|
|
708
|
+
class Ar extends Pr {
|
|
692
709
|
constructor() {
|
|
693
710
|
super(...arguments);
|
|
694
|
-
|
|
711
|
+
C(this, "components", {});
|
|
695
712
|
}
|
|
696
713
|
registerComponent(e, r) {
|
|
697
714
|
this.components[e] = r;
|
|
@@ -700,7 +717,7 @@ class xr extends _r {
|
|
|
700
717
|
return this.components[e] ?? null;
|
|
701
718
|
}
|
|
702
719
|
requireComponent(e) {
|
|
703
|
-
return this.resolveComponent(e) ??
|
|
720
|
+
return this.resolveComponent(e) ?? K(`UI Component '${e}' is not defined!`);
|
|
704
721
|
}
|
|
705
722
|
alert(e, r) {
|
|
706
723
|
const n = () => typeof r != "string" ? { message: e } : {
|
|
@@ -721,17 +738,17 @@ class xr extends _r {
|
|
|
721
738
|
title: e,
|
|
722
739
|
message: r,
|
|
723
740
|
required: !!(n != null && n.required)
|
|
724
|
-
}, { response:
|
|
725
|
-
(
|
|
726
|
-
[
|
|
727
|
-
|
|
741
|
+
}, { response: i } = await this.modal(this.requireComponent("confirm-modal"), u), p = typeof i == "object" ? i[0] : i ?? !1, h = typeof i == "object" ? i[1] : Object.entries(u.checkboxes ?? {}).reduce(
|
|
742
|
+
(y, [_, { default: E }]) => ({
|
|
743
|
+
[_]: E ?? !1,
|
|
744
|
+
...y
|
|
728
745
|
}),
|
|
729
746
|
{}
|
|
730
747
|
);
|
|
731
|
-
for (const [
|
|
732
|
-
if (!(!
|
|
733
|
-
return p && J() && console.warn(`Confirmed confirm modal was suppressed because required '${
|
|
734
|
-
return "checkboxes" in u ? [p,
|
|
748
|
+
for (const [y, _] of Object.entries(u.checkboxes ?? {}))
|
|
749
|
+
if (!(!_.required || h[y]))
|
|
750
|
+
return p && J() && console.warn(`Confirmed confirm modal was suppressed because required '${y}' checkbox was missing`), [!1, h];
|
|
751
|
+
return "checkboxes" in u ? [p, h] : p;
|
|
735
752
|
}
|
|
736
753
|
async prompt(e, r, n) {
|
|
737
754
|
const a = (n == null ? void 0 : n.trim) ?? !0, u = () => typeof r != "string" ? {
|
|
@@ -741,11 +758,11 @@ class xr extends _r {
|
|
|
741
758
|
title: e,
|
|
742
759
|
message: r,
|
|
743
760
|
...n ?? {}
|
|
744
|
-
}, { response:
|
|
745
|
-
return (a && typeof
|
|
761
|
+
}, { response: i } = await this.modal(this.requireComponent("prompt-modal"), u());
|
|
762
|
+
return (a && typeof i == "string" ? i == null ? void 0 : i.trim() : i) ?? null;
|
|
746
763
|
}
|
|
747
764
|
async loading(e, r) {
|
|
748
|
-
const n = (
|
|
765
|
+
const n = (_) => typeof _ == "function" ? Promise.resolve(_()) : _, a = () => {
|
|
749
766
|
if (typeof e == "string")
|
|
750
767
|
return {
|
|
751
768
|
props: { message: e },
|
|
@@ -753,39 +770,39 @@ class xr extends _r {
|
|
|
753
770
|
};
|
|
754
771
|
if (typeof e == "function" || e instanceof Promise)
|
|
755
772
|
return { operationPromise: n(e) };
|
|
756
|
-
const { delay:
|
|
773
|
+
const { delay: _, ...E } = e;
|
|
757
774
|
return {
|
|
758
|
-
props:
|
|
759
|
-
delay: l(
|
|
775
|
+
props: E,
|
|
776
|
+
delay: l(_),
|
|
760
777
|
operationPromise: n(r)
|
|
761
778
|
};
|
|
762
779
|
};
|
|
763
780
|
let u = !1;
|
|
764
|
-
const { operationPromise:
|
|
765
|
-
if (
|
|
766
|
-
return
|
|
767
|
-
const
|
|
768
|
-
|
|
781
|
+
const { operationPromise: i, props: p, delay: h } = a();
|
|
782
|
+
if (h && await Promise.race([oe({ ms: h }).then(() => u = !0), i]), h && !u)
|
|
783
|
+
return i;
|
|
784
|
+
const y = ys(this.requireComponent("loading-modal"), p);
|
|
785
|
+
Ke(y);
|
|
769
786
|
try {
|
|
770
|
-
const
|
|
771
|
-
return await
|
|
787
|
+
const _ = await i;
|
|
788
|
+
return await oe({ ms: 500 }), _;
|
|
772
789
|
} finally {
|
|
773
|
-
await
|
|
790
|
+
await Qe(y.id, { removeAfter: 1e3 });
|
|
774
791
|
}
|
|
775
792
|
}
|
|
776
793
|
toast(e, r = {}) {
|
|
777
794
|
const { component: n, ...a } = r, u = {
|
|
778
|
-
id:
|
|
795
|
+
id: ue(),
|
|
779
796
|
properties: { message: e, ...a },
|
|
780
|
-
component:
|
|
797
|
+
component: I(n ?? this.requireComponent("toast"))
|
|
781
798
|
};
|
|
782
799
|
this.setState("toasts", this.toasts.concat(u));
|
|
783
800
|
}
|
|
784
801
|
modal(e, r) {
|
|
785
|
-
return
|
|
802
|
+
return Ke(e, r ?? {});
|
|
786
803
|
}
|
|
787
804
|
async closeAllModals() {
|
|
788
|
-
await Promise.all(
|
|
805
|
+
await Promise.all(le.value.map(({ id: e }) => Qe(e, { removeAfter: 1e3 })));
|
|
789
806
|
}
|
|
790
807
|
async boot() {
|
|
791
808
|
this.watchMountedEvent(), this.watchViewportBreakpoints();
|
|
@@ -795,17 +812,17 @@ class xr extends _r {
|
|
|
795
812
|
if (!globalThis.document || !globalThis.getComputedStyle)
|
|
796
813
|
return;
|
|
797
814
|
const e = globalThis.document.getElementById("splash");
|
|
798
|
-
e && (globalThis.getComputedStyle(e).opacity !== "0" && (e.style.opacity = "0", await
|
|
815
|
+
e && (globalThis.getComputedStyle(e).opacity !== "0" && (e.style.opacity = "0", await oe({ ms: 600 })), e.remove());
|
|
799
816
|
});
|
|
800
817
|
}
|
|
801
818
|
watchViewportBreakpoints() {
|
|
802
819
|
if (!globalThis.matchMedia)
|
|
803
820
|
return;
|
|
804
|
-
globalThis.matchMedia(`(min-width: ${
|
|
821
|
+
globalThis.matchMedia(`(min-width: ${yt}px)`).addEventListener("change", () => this.setState({ layout: _t() }));
|
|
805
822
|
}
|
|
806
823
|
}
|
|
807
|
-
const P =
|
|
808
|
-
class
|
|
824
|
+
const P = re(Ar);
|
|
825
|
+
class Dr {
|
|
809
826
|
constructor(s, e) {
|
|
810
827
|
this.locale = s, this.fallbackLocale = e;
|
|
811
828
|
}
|
|
@@ -831,7 +848,7 @@ class Cr {
|
|
|
831
848
|
return J() && console.warn("Lang provider is missing"), e;
|
|
832
849
|
}
|
|
833
850
|
}
|
|
834
|
-
const
|
|
851
|
+
const Br = ke({
|
|
835
852
|
name: "lang",
|
|
836
853
|
persist: ["locale", "fallbackLocale"],
|
|
837
854
|
initialState: {
|
|
@@ -840,11 +857,11 @@ const kr = xe({
|
|
|
840
857
|
fallbackLocale: "en"
|
|
841
858
|
}
|
|
842
859
|
});
|
|
843
|
-
class
|
|
860
|
+
class jr extends Br {
|
|
844
861
|
constructor() {
|
|
845
862
|
super();
|
|
846
|
-
|
|
847
|
-
this.provider = new
|
|
863
|
+
C(this, "provider");
|
|
864
|
+
this.provider = new Dr(
|
|
848
865
|
this.getState("locale") ?? this.getBrowserLocale(),
|
|
849
866
|
this.getState("fallbackLocale")
|
|
850
867
|
);
|
|
@@ -872,7 +889,7 @@ class Sr extends kr {
|
|
|
872
889
|
);
|
|
873
890
|
}
|
|
874
891
|
}
|
|
875
|
-
const
|
|
892
|
+
const G = re(jr), wt = G.translate.bind(G), S = G.translateWithDefault.bind(G), Fr = ke({
|
|
876
893
|
name: "errors",
|
|
877
894
|
initialState: {
|
|
878
895
|
logs: [],
|
|
@@ -885,12 +902,13 @@ const Z = se(Sr), gt = Z.translate.bind(Z), k = Z.translateWithDefault.bind(Z),
|
|
|
885
902
|
hasStartupErrors: ({ startupErrors: t }) => t.length > 0
|
|
886
903
|
}
|
|
887
904
|
});
|
|
888
|
-
class
|
|
905
|
+
class Or extends Fr {
|
|
889
906
|
constructor() {
|
|
890
907
|
super(...arguments);
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
908
|
+
C(this, "forceReporting", !1);
|
|
909
|
+
C(this, "enabled", !0);
|
|
910
|
+
C(this, "eruda", null);
|
|
911
|
+
C(this, "erudaPlugins", null);
|
|
894
912
|
}
|
|
895
913
|
enable() {
|
|
896
914
|
this.enabled = !0;
|
|
@@ -900,7 +918,7 @@ class Hr extends Tr {
|
|
|
900
918
|
}
|
|
901
919
|
async inspect(e, r) {
|
|
902
920
|
if (Array.isArray(e) && e.length === 0) {
|
|
903
|
-
P.alert(
|
|
921
|
+
P.alert(S("errors.inspectEmpty", "Nothing to inspect!"));
|
|
904
922
|
return;
|
|
905
923
|
}
|
|
906
924
|
const n = Array.isArray(e) ? e[0] : this.isErrorReport(e) ? e : await this.createErrorReport(e), a = Array.isArray(e) ? e : r ?? [n];
|
|
@@ -909,7 +927,7 @@ class Hr extends Tr {
|
|
|
909
927
|
async report(e, r) {
|
|
910
928
|
if (await F.emit("error", { error: e, message: r }), ze("unit") || (J() && this.logError(e), !this.enabled))
|
|
911
929
|
throw e;
|
|
912
|
-
if (!
|
|
930
|
+
if (!q.isMounted()) {
|
|
913
931
|
const u = await this.createStartupErrorReport(e);
|
|
914
932
|
u && this.setState({ startupErrors: this.startupErrors.concat(u) });
|
|
915
933
|
return;
|
|
@@ -920,12 +938,12 @@ class Hr extends Tr {
|
|
|
920
938
|
date: /* @__PURE__ */ new Date()
|
|
921
939
|
};
|
|
922
940
|
P.toast(
|
|
923
|
-
r ??
|
|
941
|
+
r ?? S("errors.notice", "Something went wrong, but it's not your fault. Try again!"),
|
|
924
942
|
{
|
|
925
943
|
variant: "danger",
|
|
926
944
|
actions: [
|
|
927
945
|
{
|
|
928
|
-
label:
|
|
946
|
+
label: S("errors.viewDetails", "View details"),
|
|
929
947
|
dismiss: !0,
|
|
930
948
|
click: () => P.modal(P.requireComponent("error-report-modal"), { report: n, reports: [n] })
|
|
931
949
|
}
|
|
@@ -945,37 +963,40 @@ class Hr extends Tr {
|
|
|
945
963
|
});
|
|
946
964
|
}
|
|
947
965
|
async boot() {
|
|
948
|
-
|
|
966
|
+
Y(async () => {
|
|
949
967
|
var e;
|
|
950
968
|
if (!this.debug) {
|
|
951
969
|
(e = this.eruda) == null || e.destroy();
|
|
952
970
|
return;
|
|
953
971
|
}
|
|
954
|
-
this.eruda ?? (this.eruda = (await import("eruda")).default), this.eruda.init()
|
|
972
|
+
this.eruda ?? (this.eruda = (await import("eruda")).default), this.erudaPlugins ?? (this.erudaPlugins = [(await import("eruda-indexeddb")).default]), this.eruda.init(), this.erudaPlugins.forEach((r) => {
|
|
973
|
+
var n;
|
|
974
|
+
return (n = this.eruda) == null ? void 0 : n.add(r);
|
|
975
|
+
});
|
|
955
976
|
});
|
|
956
977
|
}
|
|
957
978
|
logError(e) {
|
|
958
|
-
console.error(e),
|
|
979
|
+
console.error(e), he(e) && e.cause && this.logError(e.cause);
|
|
959
980
|
}
|
|
960
981
|
isErrorReport(e) {
|
|
961
|
-
return
|
|
982
|
+
return he(e) && "title" in e;
|
|
962
983
|
}
|
|
963
984
|
async createErrorReport(e) {
|
|
964
|
-
return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof
|
|
965
|
-
title:
|
|
966
|
-
e.name ?? e.title ??
|
|
985
|
+
return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof Ce ? this.createErrorReportFromError(e) : he(e) ? ut({
|
|
986
|
+
title: D(
|
|
987
|
+
e.name ?? e.title ?? S("errors.unknown", "Unknown Error")
|
|
967
988
|
),
|
|
968
|
-
description:
|
|
969
|
-
e.message ?? e.description ??
|
|
989
|
+
description: D(
|
|
990
|
+
e.message ?? e.description ?? S("errors.unknownDescription", "Unknown error object")
|
|
970
991
|
),
|
|
971
992
|
error: e
|
|
972
993
|
}) : {
|
|
973
|
-
title:
|
|
994
|
+
title: S("errors.unknown", "Unknown Error"),
|
|
974
995
|
error: e
|
|
975
996
|
};
|
|
976
997
|
}
|
|
977
998
|
async createStartupErrorReport(e) {
|
|
978
|
-
return e instanceof
|
|
999
|
+
return e instanceof Le ? e.cause instanceof Le ? null : this.createErrorReport(e.cause) : this.createErrorReport(e);
|
|
979
1000
|
}
|
|
980
1001
|
createErrorReportFromError(e, r = {}) {
|
|
981
1002
|
return {
|
|
@@ -987,7 +1008,7 @@ class Hr extends Tr {
|
|
|
987
1008
|
};
|
|
988
1009
|
}
|
|
989
1010
|
}
|
|
990
|
-
const
|
|
1011
|
+
const $t = re(Or), xt = /* @__PURE__ */ g({
|
|
991
1012
|
__name: "HeadlessButton",
|
|
992
1013
|
props: {
|
|
993
1014
|
class: {},
|
|
@@ -1005,7 +1026,7 @@ const vt = se(Hr), bt = /* @__PURE__ */ h({
|
|
|
1005
1026
|
setup(t) {
|
|
1006
1027
|
const s = c(() => t.as ? { as: t.as } : t.route ? {
|
|
1007
1028
|
as: P.resolveComponent("router-link") ?? "a",
|
|
1008
|
-
to:
|
|
1029
|
+
to: ut({
|
|
1009
1030
|
name: t.route,
|
|
1010
1031
|
params: t.routeParams,
|
|
1011
1032
|
query: t.routeQuery
|
|
@@ -1018,7 +1039,7 @@ const vt = se(Hr), bt = /* @__PURE__ */ h({
|
|
|
1018
1039
|
as: "button",
|
|
1019
1040
|
type: t.submit ? "submit" : "button"
|
|
1020
1041
|
});
|
|
1021
|
-
return (e, r) => (
|
|
1042
|
+
return (e, r) => (o(), f(l(ks), V({
|
|
1022
1043
|
class: t.class,
|
|
1023
1044
|
"as-child": e.asChild,
|
|
1024
1045
|
disabled: e.disabled
|
|
@@ -1029,7 +1050,7 @@ const vt = se(Hr), bt = /* @__PURE__ */ h({
|
|
|
1029
1050
|
_: 3
|
|
1030
1051
|
}, 16, ["class", "as-child", "disabled"]));
|
|
1031
1052
|
}
|
|
1032
|
-
}),
|
|
1053
|
+
}), z = /* @__PURE__ */ g({
|
|
1033
1054
|
__name: "Button",
|
|
1034
1055
|
props: {
|
|
1035
1056
|
class: {},
|
|
@@ -1045,7 +1066,7 @@ const vt = se(Hr), bt = /* @__PURE__ */ h({
|
|
|
1045
1066
|
as: {}
|
|
1046
1067
|
},
|
|
1047
1068
|
setup(t) {
|
|
1048
|
-
const s =
|
|
1069
|
+
const s = O(t, ["class", "size", "variant", "disabled"]), e = c(() => ft(
|
|
1049
1070
|
{ baseClasses: t.class, variant: t.variant, size: t.size, disabled: t.disabled },
|
|
1050
1071
|
{
|
|
1051
1072
|
baseClasses: "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
@@ -1054,6 +1075,7 @@ const vt = se(Hr), bt = /* @__PURE__ */ h({
|
|
|
1054
1075
|
default: "bg-primary-600 text-white focus-visible:outline-primary-600",
|
|
1055
1076
|
secondary: "bg-background text-gray-900 ring-gray-300",
|
|
1056
1077
|
danger: "bg-red-600 text-white focus-visible:outline-red-600",
|
|
1078
|
+
warning: "bg-yellow-600 text-white focus-visible:outline-yellow-600",
|
|
1057
1079
|
ghost: "bg-transparent",
|
|
1058
1080
|
outline: "bg-transparent text-primary-600 ring-primary-600",
|
|
1059
1081
|
link: "text-links"
|
|
@@ -1140,7 +1162,7 @@ const vt = se(Hr), bt = /* @__PURE__ */ h({
|
|
|
1140
1162
|
}
|
|
1141
1163
|
}
|
|
1142
1164
|
));
|
|
1143
|
-
return (r, n) => (
|
|
1165
|
+
return (r, n) => (o(), f(xt, V({
|
|
1144
1166
|
class: e.value,
|
|
1145
1167
|
disabled: r.disabled
|
|
1146
1168
|
}, s), {
|
|
@@ -1151,17 +1173,56 @@ const vt = se(Hr), bt = /* @__PURE__ */ h({
|
|
|
1151
1173
|
}, 16, ["class", "disabled"]));
|
|
1152
1174
|
}
|
|
1153
1175
|
});
|
|
1154
|
-
function
|
|
1176
|
+
function Ur(t) {
|
|
1155
1177
|
return typeof t == "object" && t !== null && "label" in t;
|
|
1156
1178
|
}
|
|
1157
|
-
|
|
1179
|
+
function Ct(t, s) {
|
|
1180
|
+
const e = X("form", null), r = c(() => e && t.name ? e.getFieldValue(t.name) : t.modelValue), n = c(() => r.value), a = c(() => !e || !t.name ? null : e.errors[t.name] ?? null), u = c(() => t.options ? t.options.map((h) => ({
|
|
1181
|
+
key: ue(),
|
|
1182
|
+
label: t.renderOption ? t.renderOption(h) : Ur(h) ? os(h.label) : D(h),
|
|
1183
|
+
value: h
|
|
1184
|
+
})) : null), i = {
|
|
1185
|
+
labelClass: t.labelClass,
|
|
1186
|
+
optionsClass: t.optionsClass,
|
|
1187
|
+
align: t.align,
|
|
1188
|
+
side: t.side,
|
|
1189
|
+
value: r,
|
|
1190
|
+
id: `select-${ue()}`,
|
|
1191
|
+
name: c(() => t.name),
|
|
1192
|
+
label: c(() => t.label),
|
|
1193
|
+
description: c(() => t.description),
|
|
1194
|
+
placeholder: c(() => t.placeholder ?? S("ui.select", "Select an option")),
|
|
1195
|
+
options: u,
|
|
1196
|
+
selectedOption: c(() => {
|
|
1197
|
+
var h;
|
|
1198
|
+
return (h = u.value) == null ? void 0 : h.find((y) => y.value === t.modelValue);
|
|
1199
|
+
}),
|
|
1200
|
+
errors: $e(a),
|
|
1201
|
+
required: c(() => {
|
|
1202
|
+
if (!(!t.name || !e))
|
|
1203
|
+
return e.getFieldRules(t.name).includes("required");
|
|
1204
|
+
}),
|
|
1205
|
+
update(h) {
|
|
1206
|
+
if (e && t.name) {
|
|
1207
|
+
e.setFieldValue(t.name, h);
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
s("update:modelValue", h);
|
|
1211
|
+
}
|
|
1212
|
+
};
|
|
1213
|
+
function p(h) {
|
|
1214
|
+
i.update(h);
|
|
1215
|
+
}
|
|
1216
|
+
return ce("select", i), { expose: i, update: p, acceptableValue: n };
|
|
1217
|
+
}
|
|
1218
|
+
const kt = /* @__PURE__ */ g({
|
|
1158
1219
|
__name: "HeadlessSelectValue",
|
|
1159
1220
|
setup(t) {
|
|
1160
|
-
const s =
|
|
1221
|
+
const s = H(
|
|
1161
1222
|
"select",
|
|
1162
1223
|
"<HeadlessSelectValue> must be a child of a <HeadlessSelect>"
|
|
1163
1224
|
);
|
|
1164
|
-
return (e, r) => e.$slots.default ? (
|
|
1225
|
+
return (e, r) => e.$slots.default ? (o(), f(l(Ze), {
|
|
1165
1226
|
key: 0,
|
|
1166
1227
|
placeholder: l(s).placeholder
|
|
1167
1228
|
}, {
|
|
@@ -1169,33 +1230,33 @@ const yt = /* @__PURE__ */ h({
|
|
|
1169
1230
|
w(e.$slots, "default")
|
|
1170
1231
|
]),
|
|
1171
1232
|
_: 3
|
|
1172
|
-
}, 8, ["placeholder"])) : (
|
|
1233
|
+
}, 8, ["placeholder"])) : (o(), f(l(Ze), {
|
|
1173
1234
|
key: 1,
|
|
1174
1235
|
placeholder: l(s).placeholder
|
|
1175
1236
|
}, null, 8, ["placeholder"]));
|
|
1176
1237
|
}
|
|
1177
|
-
}),
|
|
1238
|
+
}), St = /* @__PURE__ */ g({
|
|
1178
1239
|
__name: "HeadlessSelectTrigger",
|
|
1179
1240
|
setup(t) {
|
|
1180
|
-
const s =
|
|
1241
|
+
const s = H(
|
|
1181
1242
|
"select",
|
|
1182
1243
|
"<HeadlessSelectTrigger> must be a child of a <HeadlessSelect>"
|
|
1183
1244
|
);
|
|
1184
|
-
return (e, r) => (
|
|
1245
|
+
return (e, r) => (o(), f(l(Ss), {
|
|
1185
1246
|
id: l(s).id
|
|
1186
1247
|
}, {
|
|
1187
1248
|
default: m(() => [
|
|
1188
1249
|
w(e.$slots, "default", {}, () => [
|
|
1189
|
-
d(
|
|
1250
|
+
d(kt, {
|
|
1190
1251
|
placeholder: l(s).placeholder
|
|
1191
1252
|
}, null, 8, ["placeholder"]),
|
|
1192
|
-
d(l(
|
|
1253
|
+
d(l(Ts))
|
|
1193
1254
|
])
|
|
1194
1255
|
]),
|
|
1195
1256
|
_: 3
|
|
1196
1257
|
}, 8, ["id"]));
|
|
1197
1258
|
}
|
|
1198
|
-
}),
|
|
1259
|
+
}), Tt = /* @__PURE__ */ g({
|
|
1199
1260
|
__name: "HeadlessSelectOption",
|
|
1200
1261
|
props: {
|
|
1201
1262
|
value: {},
|
|
@@ -1205,17 +1266,17 @@ const yt = /* @__PURE__ */ h({
|
|
|
1205
1266
|
as: {}
|
|
1206
1267
|
},
|
|
1207
1268
|
setup(t) {
|
|
1208
|
-
const s =
|
|
1269
|
+
const s = H(
|
|
1209
1270
|
"select",
|
|
1210
1271
|
"<HeadlessSelectOption> must be a child of a <HeadlessSelect>"
|
|
1211
1272
|
), e = c(() => {
|
|
1212
1273
|
var n;
|
|
1213
1274
|
const r = (n = s.options) == null ? void 0 : n.find((a) => a.value === t.value);
|
|
1214
|
-
return r ? r.label :
|
|
1275
|
+
return r ? r.label : D(t.value);
|
|
1215
1276
|
});
|
|
1216
|
-
return (r, n) => (
|
|
1277
|
+
return (r, n) => (o(), f(l(Ms), de(pe(r.$props)), {
|
|
1217
1278
|
default: m(() => [
|
|
1218
|
-
d(l(
|
|
1279
|
+
d(l(Es), null, {
|
|
1219
1280
|
default: m(() => [
|
|
1220
1281
|
w(r.$slots, "default", {}, () => [
|
|
1221
1282
|
L(x(e.value), 1)
|
|
@@ -1227,33 +1288,33 @@ const yt = /* @__PURE__ */ h({
|
|
|
1227
1288
|
_: 3
|
|
1228
1289
|
}, 16));
|
|
1229
1290
|
}
|
|
1230
|
-
}),
|
|
1291
|
+
}), Mt = /* @__PURE__ */ g({
|
|
1231
1292
|
__name: "HeadlessSelectOptions",
|
|
1232
1293
|
props: {
|
|
1233
1294
|
class: {},
|
|
1234
1295
|
innerClass: {}
|
|
1235
1296
|
},
|
|
1236
1297
|
setup(t) {
|
|
1237
|
-
const s =
|
|
1298
|
+
const s = H(
|
|
1238
1299
|
"select",
|
|
1239
1300
|
"<HeadlessSelectOptions> must be a child of a <HeadlessSelect>"
|
|
1240
|
-
), e = c(() =>
|
|
1241
|
-
return (r, n) => (
|
|
1301
|
+
), e = c(() => k("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
|
|
1302
|
+
return (r, n) => (o(), f(l(Vs), null, {
|
|
1242
1303
|
default: m(() => [
|
|
1243
|
-
d(l(
|
|
1304
|
+
d(l(Hs), {
|
|
1244
1305
|
position: "popper",
|
|
1245
|
-
class:
|
|
1306
|
+
class: $(e.value),
|
|
1246
1307
|
align: l(s).align,
|
|
1247
1308
|
side: l(s).side,
|
|
1248
1309
|
"side-offset": 4
|
|
1249
1310
|
}, {
|
|
1250
1311
|
default: m(() => [
|
|
1251
|
-
d(l(
|
|
1252
|
-
class:
|
|
1312
|
+
d(l(Ls), {
|
|
1313
|
+
class: $(r.innerClass)
|
|
1253
1314
|
}, {
|
|
1254
1315
|
default: m(() => [
|
|
1255
1316
|
w(r.$slots, "default", {}, () => [
|
|
1256
|
-
(
|
|
1317
|
+
(o(!0), b(A, null, B(l(s).options ?? [], (a) => (o(), f(Tt, {
|
|
1257
1318
|
key: a.key,
|
|
1258
1319
|
value: a.value
|
|
1259
1320
|
}, null, 8, ["value"]))), 128))
|
|
@@ -1268,7 +1329,7 @@ const yt = /* @__PURE__ */ h({
|
|
|
1268
1329
|
_: 3
|
|
1269
1330
|
}));
|
|
1270
1331
|
}
|
|
1271
|
-
}),
|
|
1332
|
+
}), Nr = /* @__PURE__ */ g({
|
|
1272
1333
|
inheritAttrs: !1,
|
|
1273
1334
|
__name: "HeadlessSelect",
|
|
1274
1335
|
props: {
|
|
@@ -1288,56 +1349,21 @@ const yt = /* @__PURE__ */ h({
|
|
|
1288
1349
|
},
|
|
1289
1350
|
emits: ["update:modelValue"],
|
|
1290
1351
|
setup(t, { expose: s, emit: e }) {
|
|
1291
|
-
const r = e, n =
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
labelClass: t.labelClass,
|
|
1297
|
-
optionsClass: t.optionsClass,
|
|
1298
|
-
align: t.align,
|
|
1299
|
-
side: t.side,
|
|
1300
|
-
value: a,
|
|
1301
|
-
id: `select-${oe()}`,
|
|
1302
|
-
name: c(() => t.name),
|
|
1303
|
-
label: c(() => t.label),
|
|
1304
|
-
description: c(() => t.description),
|
|
1305
|
-
placeholder: c(() => t.placeholder ?? k("ui.select", "Select an option")),
|
|
1306
|
-
options: p,
|
|
1307
|
-
selectedOption: c(() => {
|
|
1308
|
-
var v;
|
|
1309
|
-
return (v = p.value) == null ? void 0 : v.find((S) => S.value === t.modelValue);
|
|
1310
|
-
}),
|
|
1311
|
-
errors: we(o),
|
|
1312
|
-
required: c(() => {
|
|
1313
|
-
if (!(!t.name || !n))
|
|
1314
|
-
return n.getFieldRules(t.name).includes("required");
|
|
1315
|
-
}),
|
|
1316
|
-
update(v) {
|
|
1317
|
-
if (n && t.name) {
|
|
1318
|
-
n.setFieldValue(t.name, v);
|
|
1319
|
-
return;
|
|
1320
|
-
}
|
|
1321
|
-
r("update:modelValue", v);
|
|
1322
|
-
}
|
|
1323
|
-
};
|
|
1324
|
-
function $(v) {
|
|
1325
|
-
g.update(v);
|
|
1326
|
-
}
|
|
1327
|
-
return de("select", g), s(g), (v, S) => (i(), f(l(Ts), {
|
|
1328
|
-
"model-value": u.value,
|
|
1329
|
-
by: v.compareOptions,
|
|
1330
|
-
"onUpdate:modelValue": S[0] || (S[0] = (q) => $(q))
|
|
1352
|
+
const r = e, n = O(t, ["as", "compareOptions"]), { expose: a, acceptableValue: u, update: i } = Ct({ as: t.as, compareOptions: t.compareOptions, ...n }, r);
|
|
1353
|
+
return s(a), (p, h) => (o(), f(l(Is), {
|
|
1354
|
+
"model-value": l(u),
|
|
1355
|
+
by: p.compareOptions,
|
|
1356
|
+
"onUpdate:modelValue": h[0] || (h[0] = (y) => l(i)(y))
|
|
1331
1357
|
}, {
|
|
1332
|
-
default: m(({ open:
|
|
1333
|
-
(
|
|
1358
|
+
default: m(({ open: y }) => [
|
|
1359
|
+
(o(), f(ee(p.as), de(pe(p.$attrs)), {
|
|
1334
1360
|
default: m(() => [
|
|
1335
|
-
w(
|
|
1336
|
-
modelValue:
|
|
1337
|
-
open:
|
|
1361
|
+
w(p.$slots, "default", {
|
|
1362
|
+
modelValue: p.modelValue,
|
|
1363
|
+
open: y
|
|
1338
1364
|
}, () => [
|
|
1339
|
-
d(
|
|
1340
|
-
d(
|
|
1365
|
+
d(St),
|
|
1366
|
+
d(Mt)
|
|
1341
1367
|
])
|
|
1342
1368
|
]),
|
|
1343
1369
|
_: 2
|
|
@@ -1346,18 +1372,18 @@ const yt = /* @__PURE__ */ h({
|
|
|
1346
1372
|
_: 3
|
|
1347
1373
|
}, 8, ["model-value", "by"]));
|
|
1348
1374
|
}
|
|
1349
|
-
}),
|
|
1375
|
+
}), Ye = /* @__PURE__ */ g({
|
|
1350
1376
|
__name: "HeadlessSelectLabel",
|
|
1351
1377
|
props: {
|
|
1352
1378
|
asChild: { type: Boolean },
|
|
1353
1379
|
as: {}
|
|
1354
1380
|
},
|
|
1355
1381
|
setup(t) {
|
|
1356
|
-
const s =
|
|
1382
|
+
const s = H(
|
|
1357
1383
|
"select",
|
|
1358
1384
|
"<HeadlessSelectLabel> must be a child of a <HeadlessSelect>"
|
|
1359
|
-
), e =
|
|
1360
|
-
return (n, a) => r.value ? (
|
|
1385
|
+
), e = xe(), r = c(() => !!(s.label || e.default));
|
|
1386
|
+
return (n, a) => r.value ? (o(), f(l(dt), V({
|
|
1361
1387
|
key: 0,
|
|
1362
1388
|
for: l(s).id
|
|
1363
1389
|
}, n.$props), {
|
|
@@ -1367,29 +1393,29 @@ const yt = /* @__PURE__ */ h({
|
|
|
1367
1393
|
])
|
|
1368
1394
|
]),
|
|
1369
1395
|
_: 3
|
|
1370
|
-
}, 16, ["for"])) :
|
|
1396
|
+
}, 16, ["for"])) : M("", !0);
|
|
1371
1397
|
}
|
|
1372
|
-
}),
|
|
1398
|
+
}), Et = /* @__PURE__ */ g({
|
|
1373
1399
|
__name: "SelectLabel",
|
|
1374
1400
|
props: {
|
|
1375
1401
|
class: {}
|
|
1376
1402
|
},
|
|
1377
1403
|
setup(t) {
|
|
1378
|
-
const s =
|
|
1379
|
-
return (r, n) => r.$slots.default ? (
|
|
1404
|
+
const s = H("select", "<SelectLabel> must be a child of a <Select>"), e = c(() => k("block text-sm leading-6 font-medium text-gray-900", s.labelClass, t.class));
|
|
1405
|
+
return (r, n) => r.$slots.default ? (o(), f(Ye, {
|
|
1380
1406
|
key: 0,
|
|
1381
|
-
class:
|
|
1407
|
+
class: $(e.value)
|
|
1382
1408
|
}, {
|
|
1383
1409
|
default: m(() => [
|
|
1384
1410
|
w(r.$slots, "default")
|
|
1385
1411
|
]),
|
|
1386
1412
|
_: 3
|
|
1387
|
-
}, 8, ["class"])) : (
|
|
1413
|
+
}, 8, ["class"])) : (o(), f(Ye, {
|
|
1388
1414
|
key: 1,
|
|
1389
|
-
class:
|
|
1415
|
+
class: $(e.value)
|
|
1390
1416
|
}, null, 8, ["class"]));
|
|
1391
1417
|
}
|
|
1392
|
-
}),
|
|
1418
|
+
}), et = /* @__PURE__ */ g({
|
|
1393
1419
|
__name: "SelectOption",
|
|
1394
1420
|
props: {
|
|
1395
1421
|
value: {},
|
|
@@ -1397,18 +1423,18 @@ const yt = /* @__PURE__ */ h({
|
|
|
1397
1423
|
innerClass: {}
|
|
1398
1424
|
},
|
|
1399
1425
|
setup(t) {
|
|
1400
|
-
const s = c(() =>
|
|
1426
|
+
const s = c(() => k("group p-1 outline-none", t.class)), e = c(() => k(
|
|
1401
1427
|
// eslint-disable-next-line vue/max-len
|
|
1402
1428
|
"relative flex max-w-[calc(100vw-2rem)] cursor-pointer items-center truncate rounded-md gap-2 px-2 py-1 text-sm select-none *:truncate group-data-[highlighted]:bg-gray-100 group-data-[state=checked]:font-semibold group-data-[state=unchecked]:opacity-50",
|
|
1403
1429
|
t.innerClass
|
|
1404
1430
|
));
|
|
1405
|
-
return (r, n) => (
|
|
1406
|
-
class:
|
|
1431
|
+
return (r, n) => (o(), f(Tt, {
|
|
1432
|
+
class: $(s.value),
|
|
1407
1433
|
value: r.value
|
|
1408
1434
|
}, {
|
|
1409
1435
|
default: m(() => [
|
|
1410
|
-
|
|
1411
|
-
class:
|
|
1436
|
+
v("div", {
|
|
1437
|
+
class: $(e.value)
|
|
1412
1438
|
}, [
|
|
1413
1439
|
w(r.$slots, "default")
|
|
1414
1440
|
], 2)
|
|
@@ -1416,19 +1442,19 @@ const yt = /* @__PURE__ */ h({
|
|
|
1416
1442
|
_: 3
|
|
1417
1443
|
}, 8, ["class", "value"]));
|
|
1418
1444
|
}
|
|
1419
|
-
}),
|
|
1445
|
+
}), Vt = /* @__PURE__ */ g({
|
|
1420
1446
|
__name: "SelectOptions",
|
|
1421
1447
|
props: {
|
|
1422
1448
|
class: {}
|
|
1423
1449
|
},
|
|
1424
1450
|
setup(t) {
|
|
1425
|
-
const s =
|
|
1451
|
+
const s = H("select", "<SelectOptions> must be a child of a <Select>"), e = c(() => k(
|
|
1426
1452
|
"z-50 overflow-auto rounded-lg bg-white text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden",
|
|
1427
1453
|
s.optionsClass,
|
|
1428
1454
|
t.class
|
|
1429
1455
|
));
|
|
1430
|
-
return (r, n) => (
|
|
1431
|
-
class:
|
|
1456
|
+
return (r, n) => (o(), f(Mt, {
|
|
1457
|
+
class: $(e.value)
|
|
1432
1458
|
}, {
|
|
1433
1459
|
default: m(() => {
|
|
1434
1460
|
var a;
|
|
@@ -1436,18 +1462,18 @@ const yt = /* @__PURE__ */ h({
|
|
|
1436
1462
|
(a = l(s).options) != null && a.length ? w(r.$slots, "default", { key: 0 }, () => {
|
|
1437
1463
|
var u;
|
|
1438
1464
|
return [
|
|
1439
|
-
(
|
|
1440
|
-
key:
|
|
1441
|
-
value:
|
|
1465
|
+
(o(!0), b(A, null, B(((u = l(s)) == null ? void 0 : u.options) ?? [], (i) => (o(), f(et, {
|
|
1466
|
+
key: i.key,
|
|
1467
|
+
value: i.value
|
|
1442
1468
|
}, {
|
|
1443
1469
|
default: m(() => [
|
|
1444
|
-
L(x(
|
|
1470
|
+
L(x(i.label), 1)
|
|
1445
1471
|
]),
|
|
1446
1472
|
_: 2
|
|
1447
1473
|
}, 1032, ["value"]))), 128))
|
|
1448
1474
|
];
|
|
1449
1475
|
}) : w(r.$slots, "default", { key: 1 }, () => [
|
|
1450
|
-
d(
|
|
1476
|
+
d(et, {
|
|
1451
1477
|
disabled: "",
|
|
1452
1478
|
value: null
|
|
1453
1479
|
}, {
|
|
@@ -1462,42 +1488,42 @@ const yt = /* @__PURE__ */ h({
|
|
|
1462
1488
|
_: 3
|
|
1463
1489
|
}, 8, ["class"]));
|
|
1464
1490
|
}
|
|
1465
|
-
}),
|
|
1491
|
+
}), Wr = {
|
|
1466
1492
|
viewBox: "0 0 20 20",
|
|
1467
1493
|
width: "1.2em",
|
|
1468
1494
|
height: "1.2em"
|
|
1469
1495
|
};
|
|
1470
|
-
function
|
|
1471
|
-
return
|
|
1472
|
-
|
|
1496
|
+
function Kr(t, s) {
|
|
1497
|
+
return o(), b("svg", Wr, s[0] || (s[0] = [
|
|
1498
|
+
v("path", {
|
|
1473
1499
|
fill: "currentColor",
|
|
1474
1500
|
d: "m9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828L5.757 6.586L4.343 8z"
|
|
1475
1501
|
}, null, -1)
|
|
1476
1502
|
]));
|
|
1477
1503
|
}
|
|
1478
|
-
const
|
|
1504
|
+
const Qr = I({ name: "zondicons-cheveron-down", render: Kr }), Ht = /* @__PURE__ */ g({
|
|
1479
1505
|
__name: "SelectTrigger",
|
|
1480
1506
|
props: {
|
|
1481
1507
|
class: {}
|
|
1482
1508
|
},
|
|
1483
1509
|
setup(t) {
|
|
1484
|
-
const s =
|
|
1510
|
+
const s = H("select", "<SelectTrigger> must be a child of a <Select>"), e = c(() => k(
|
|
1485
1511
|
// eslint-disable-next-line vue/max-len
|
|
1486
1512
|
"focus:outline-primary-600 data-[state=open]:outline-primary-600 grid w-full cursor-default grid-cols-1 rounded-md bg-white py-1.5 pr-2 pl-3 text-left text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 sm:text-sm/6",
|
|
1487
1513
|
{ "mt-1": s.label },
|
|
1488
1514
|
t.class
|
|
1489
1515
|
));
|
|
1490
|
-
return (r, n) => (
|
|
1491
|
-
class:
|
|
1516
|
+
return (r, n) => (o(), f(St, {
|
|
1517
|
+
class: $(e.value)
|
|
1492
1518
|
}, {
|
|
1493
1519
|
default: m(() => [
|
|
1494
|
-
d(
|
|
1495
|
-
d(l(
|
|
1520
|
+
d(kt, { class: "col-start-1 row-start-1 truncate pr-6" }),
|
|
1521
|
+
d(l(Qr), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
|
|
1496
1522
|
]),
|
|
1497
1523
|
_: 1
|
|
1498
1524
|
}, 8, ["class"]));
|
|
1499
1525
|
}
|
|
1500
|
-
}),
|
|
1526
|
+
}), Zr = /* @__PURE__ */ g({
|
|
1501
1527
|
__name: "Select",
|
|
1502
1528
|
props: {
|
|
1503
1529
|
as: {},
|
|
@@ -1516,30 +1542,30 @@ const Rr = E({ name: "zondicons-cheveron-down", render: Lr }), kt = /* @__PURE__
|
|
|
1516
1542
|
},
|
|
1517
1543
|
emits: ["update:modelValue"],
|
|
1518
1544
|
setup(t) {
|
|
1519
|
-
const { forwardRef: s } =
|
|
1520
|
-
return (e, r) => (
|
|
1545
|
+
const { forwardRef: s } = Re();
|
|
1546
|
+
return (e, r) => (o(), f(Nr, V({ ref: l(s) }, e.$props, {
|
|
1521
1547
|
"onUpdate:modelValue": r[0] || (r[0] = (n) => e.$emit("update:modelValue", n))
|
|
1522
1548
|
}), {
|
|
1523
1549
|
default: m(() => [
|
|
1524
|
-
d(
|
|
1550
|
+
d(Et),
|
|
1525
1551
|
w(e.$slots, "default", {}, () => [
|
|
1526
|
-
d(
|
|
1527
|
-
d(
|
|
1552
|
+
d(Ht),
|
|
1553
|
+
d(Vt)
|
|
1528
1554
|
])
|
|
1529
1555
|
]),
|
|
1530
1556
|
_: 3
|
|
1531
1557
|
}, 16));
|
|
1532
1558
|
}
|
|
1533
|
-
}),
|
|
1559
|
+
}), Jr = { class: "grow" }, Gr = /* @__PURE__ */ g({
|
|
1534
1560
|
__name: "Language",
|
|
1535
1561
|
setup(t) {
|
|
1536
|
-
const s =
|
|
1562
|
+
const s = G.getBrowserLocale(), e = c(() => [null, ...G.locales]);
|
|
1537
1563
|
function r(n) {
|
|
1538
|
-
return (n && j.locales[n]) ??
|
|
1564
|
+
return (n && j.locales[n]) ?? S("settings.localeDefault", "{locale} (default)", {
|
|
1539
1565
|
locale: j.locales[s] ?? s
|
|
1540
1566
|
});
|
|
1541
1567
|
}
|
|
1542
|
-
return (n, a) => (
|
|
1568
|
+
return (n, a) => (o(), f(Zr, {
|
|
1543
1569
|
modelValue: n.$lang.locale,
|
|
1544
1570
|
"onUpdate:modelValue": a[0] || (a[0] = (u) => n.$lang.locale = u),
|
|
1545
1571
|
class: "flex flex-col items-start md:flex-row",
|
|
@@ -1548,40 +1574,40 @@ const Rr = E({ name: "zondicons-cheveron-down", render: Lr }), kt = /* @__PURE__
|
|
|
1548
1574
|
"render-option": r
|
|
1549
1575
|
}, {
|
|
1550
1576
|
default: m(() => [
|
|
1551
|
-
|
|
1552
|
-
d(
|
|
1577
|
+
v("div", Jr, [
|
|
1578
|
+
d(Et, { class: "text-base font-semibold" }, {
|
|
1553
1579
|
default: m(() => [
|
|
1554
1580
|
L(x(n.$td("settings.locale", "Language")), 1)
|
|
1555
1581
|
]),
|
|
1556
1582
|
_: 1
|
|
1557
1583
|
}),
|
|
1558
|
-
d(
|
|
1584
|
+
d(R, {
|
|
1559
1585
|
"lang-key": "settings.localeDescription",
|
|
1560
1586
|
"lang-default": "Choose the application's language.",
|
|
1561
1587
|
class: "mt-1 text-sm text-gray-500"
|
|
1562
1588
|
})
|
|
1563
1589
|
]),
|
|
1564
|
-
d(
|
|
1590
|
+
d(z, {
|
|
1565
1591
|
variant: "ghost",
|
|
1566
|
-
as:
|
|
1592
|
+
as: Ht,
|
|
1567
1593
|
class: "grid w-auto outline-none"
|
|
1568
1594
|
}),
|
|
1569
|
-
d(
|
|
1595
|
+
d(Vt)
|
|
1570
1596
|
]),
|
|
1571
1597
|
_: 1
|
|
1572
1598
|
}, 8, ["modelValue", "options"]));
|
|
1573
1599
|
}
|
|
1574
|
-
}),
|
|
1600
|
+
}), Xr = [
|
|
1575
1601
|
{
|
|
1576
1602
|
priority: 100,
|
|
1577
|
-
component:
|
|
1603
|
+
component: Gr
|
|
1578
1604
|
}
|
|
1579
|
-
],
|
|
1605
|
+
], Yr = { $lang: G }, en = {
|
|
1580
1606
|
async install(t) {
|
|
1581
1607
|
var s;
|
|
1582
|
-
(s = t.config.globalProperties).$t ?? (s.$t =
|
|
1608
|
+
(s = t.config.globalProperties).$t ?? (s.$t = wt), t.config.globalProperties.$td = S, Xr.forEach((e) => q.addSetting(e)), await Te(t, Yr);
|
|
1583
1609
|
}
|
|
1584
|
-
},
|
|
1610
|
+
}, tn = /* @__PURE__ */ g({
|
|
1585
1611
|
__name: "Markdown",
|
|
1586
1612
|
props: {
|
|
1587
1613
|
as: {},
|
|
@@ -1593,38 +1619,38 @@ const Rr = E({ name: "zondicons-cheveron-down", render: Lr }), kt = /* @__PURE__
|
|
|
1593
1619
|
actions: {}
|
|
1594
1620
|
},
|
|
1595
1621
|
setup(t) {
|
|
1596
|
-
const s =
|
|
1622
|
+
const s = st(), e = xe(), r = c(() => e.default ? e.default().map(mt).join("") : t.text ?? (t.langKey && (t.langDefault ? S(t.langKey, t.langDefault, t.langParams ?? {}) : wt(t.langKey, t.langParams ?? {})))), n = c(() => {
|
|
1597
1623
|
if (!r.value)
|
|
1598
1624
|
return null;
|
|
1599
|
-
let
|
|
1600
|
-
return t.inline && (
|
|
1601
|
-
}), a = () =>
|
|
1625
|
+
let i = Mr(r.value);
|
|
1626
|
+
return t.inline && (i = i.replace("<p>", "<span>").replace("</p>", "</span>")), i;
|
|
1627
|
+
}), a = () => Qt(t.as ?? (t.inline ? "span" : "div"), {
|
|
1602
1628
|
innerHTML: n.value,
|
|
1603
1629
|
onClick: u,
|
|
1604
1630
|
...s,
|
|
1605
1631
|
class: `${s.class ?? ""} ${t.inline ? "" : "prose"}`
|
|
1606
1632
|
});
|
|
1607
|
-
async function u(
|
|
1608
|
-
var
|
|
1609
|
-
const { target: p } =
|
|
1610
|
-
if (
|
|
1611
|
-
(
|
|
1633
|
+
async function u(i) {
|
|
1634
|
+
var h, y;
|
|
1635
|
+
const { target: p } = i;
|
|
1636
|
+
if (Ne(p, HTMLElement) && p.dataset.markdownAction) {
|
|
1637
|
+
(y = (h = t.actions) == null ? void 0 : h[p.dataset.markdownAction]) == null || y.call(h);
|
|
1612
1638
|
return;
|
|
1613
1639
|
}
|
|
1614
|
-
if (
|
|
1615
|
-
const
|
|
1616
|
-
|
|
1640
|
+
if (Ne(p, HTMLAnchorElement) && p.dataset.markdownRoute) {
|
|
1641
|
+
const _ = Tr();
|
|
1642
|
+
_ && (i.preventDefault(), _.visit(p.dataset.markdownRoute));
|
|
1617
1643
|
return;
|
|
1618
1644
|
}
|
|
1619
1645
|
}
|
|
1620
|
-
return (
|
|
1646
|
+
return (i, p) => (o(), f(a));
|
|
1621
1647
|
}
|
|
1622
|
-
}),
|
|
1648
|
+
}), sn = (t, s) => {
|
|
1623
1649
|
const e = t.__vccOpts || t;
|
|
1624
1650
|
for (const [r, n] of s)
|
|
1625
1651
|
e[r] = n;
|
|
1626
1652
|
return e;
|
|
1627
|
-
},
|
|
1653
|
+
}, R = /* @__PURE__ */ sn(tn, [["__scopeId", "data-v-8b211cfb"]]), rn = { class: "flex-grow" }, nn = ["id"], an = /* @__PURE__ */ g({
|
|
1628
1654
|
__name: "Setting",
|
|
1629
1655
|
props: {
|
|
1630
1656
|
title: {},
|
|
@@ -1634,29 +1660,29 @@ const Rr = E({ name: "zondicons-cheveron-down", render: Lr }), kt = /* @__PURE__
|
|
|
1634
1660
|
layout: { default: "horizontal" }
|
|
1635
1661
|
},
|
|
1636
1662
|
setup(t) {
|
|
1637
|
-
const s = c(() =>
|
|
1638
|
-
return (e, r) => (
|
|
1639
|
-
class:
|
|
1663
|
+
const s = c(() => k(t.class, "flex flex-col justify-center gap-1"));
|
|
1664
|
+
return (e, r) => (o(), b("div", {
|
|
1665
|
+
class: $(["mt-4 flex", { "flex-col": e.layout === "vertical" }])
|
|
1640
1666
|
}, [
|
|
1641
|
-
|
|
1642
|
-
|
|
1667
|
+
v("div", rn, [
|
|
1668
|
+
v("h3", {
|
|
1643
1669
|
id: e.titleId,
|
|
1644
1670
|
class: "text-base font-semibold"
|
|
1645
|
-
}, x(e.title), 9,
|
|
1646
|
-
e.description ? (
|
|
1671
|
+
}, x(e.title), 9, nn),
|
|
1672
|
+
e.description ? (o(), f(R, {
|
|
1647
1673
|
key: 0,
|
|
1648
1674
|
text: e.description,
|
|
1649
1675
|
class: "mt-1 text-sm text-gray-500"
|
|
1650
|
-
}, null, 8, ["text"])) :
|
|
1676
|
+
}, null, 8, ["text"])) : M("", !0)
|
|
1651
1677
|
]),
|
|
1652
|
-
|
|
1653
|
-
class:
|
|
1678
|
+
v("div", {
|
|
1679
|
+
class: $(s.value)
|
|
1654
1680
|
}, [
|
|
1655
1681
|
w(e.$slots, "default")
|
|
1656
1682
|
], 2)
|
|
1657
1683
|
], 2));
|
|
1658
1684
|
}
|
|
1659
|
-
}),
|
|
1685
|
+
}), ln = ["for"], on = /* @__PURE__ */ g({
|
|
1660
1686
|
inheritAttrs: !1,
|
|
1661
1687
|
__name: "HeadlessSwitch",
|
|
1662
1688
|
props: {
|
|
@@ -1672,70 +1698,70 @@ const Rr = E({ name: "zondicons-cheveron-down", render: Lr }), kt = /* @__PURE__
|
|
|
1672
1698
|
emits: ["update:modelValue"],
|
|
1673
1699
|
setup(t, { expose: s, emit: e }) {
|
|
1674
1700
|
const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), u = {
|
|
1675
|
-
id: `switch-${
|
|
1701
|
+
id: `switch-${ue()}`,
|
|
1676
1702
|
name: c(() => t.name),
|
|
1677
1703
|
label: c(() => t.label),
|
|
1678
1704
|
description: c(() => t.description),
|
|
1679
1705
|
value: c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
|
|
1680
|
-
errors:
|
|
1706
|
+
errors: $e(a),
|
|
1681
1707
|
required: c(() => {
|
|
1682
1708
|
if (!(!t.name || !n))
|
|
1683
1709
|
return n.getFieldRules(t.name).includes("required");
|
|
1684
1710
|
}),
|
|
1685
|
-
update(
|
|
1711
|
+
update(i) {
|
|
1686
1712
|
if (n && t.name) {
|
|
1687
|
-
n.setFieldValue(t.name,
|
|
1713
|
+
n.setFieldValue(t.name, i);
|
|
1688
1714
|
return;
|
|
1689
1715
|
}
|
|
1690
|
-
r("update:modelValue",
|
|
1716
|
+
r("update:modelValue", i);
|
|
1691
1717
|
}
|
|
1692
1718
|
};
|
|
1693
|
-
return s(u),
|
|
1719
|
+
return s(u), Y(() => {
|
|
1694
1720
|
!t.description && !a.value || console.warn("Errors and description not implemented in <HeadlessSwitch>");
|
|
1695
|
-
}), (
|
|
1696
|
-
class:
|
|
1721
|
+
}), (i, p) => (o(), b("div", {
|
|
1722
|
+
class: $(t.class)
|
|
1697
1723
|
}, [
|
|
1698
|
-
|
|
1724
|
+
i.label ? (o(), b("label", {
|
|
1699
1725
|
key: 0,
|
|
1700
1726
|
for: u.id,
|
|
1701
|
-
class:
|
|
1702
|
-
}, x(
|
|
1703
|
-
d(l(
|
|
1727
|
+
class: $(i.labelClass)
|
|
1728
|
+
}, x(i.label), 11, ln)) : M("", !0),
|
|
1729
|
+
d(l(zs), V({
|
|
1704
1730
|
id: u.id,
|
|
1705
|
-
name:
|
|
1731
|
+
name: i.name,
|
|
1706
1732
|
"model-value": u.value.value
|
|
1707
|
-
},
|
|
1708
|
-
class:
|
|
1709
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
1733
|
+
}, i.$attrs, {
|
|
1734
|
+
class: i.inputClass,
|
|
1735
|
+
"onUpdate:modelValue": p[0] || (p[0] = (h) => i.$emit("update:modelValue", h))
|
|
1710
1736
|
}), {
|
|
1711
1737
|
default: m(() => [
|
|
1712
|
-
d(l(
|
|
1713
|
-
class:
|
|
1738
|
+
d(l(Rs), {
|
|
1739
|
+
class: $(i.thumbClass)
|
|
1714
1740
|
}, null, 8, ["class"])
|
|
1715
1741
|
]),
|
|
1716
1742
|
_: 1
|
|
1717
1743
|
}, 16, ["id", "name", "model-value", "class"])
|
|
1718
1744
|
], 2));
|
|
1719
1745
|
}
|
|
1720
|
-
}),
|
|
1746
|
+
}), un = /* @__PURE__ */ g({
|
|
1721
1747
|
__name: "Switch",
|
|
1722
1748
|
setup(t) {
|
|
1723
|
-
return (s, e) => (
|
|
1749
|
+
return (s, e) => (o(), f(on, {
|
|
1724
1750
|
class: "flex flex-row items-center gap-1",
|
|
1725
1751
|
"input-class": "disabled:opacity-50 disabled:cursor-not-allowed data-[state=checked]:bg-primary-600 data-[state=unchecked]:bg-gray-200 relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focusdisabled:opacity-50 disabled:cursor-not-allowed :ring-2 focus:ring-primary-600 focus:ring-offset-2 focus:outline-hidden",
|
|
1726
1752
|
"thumb-class": "data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 pointer-events-none inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out"
|
|
1727
1753
|
}));
|
|
1728
1754
|
}
|
|
1729
|
-
}),
|
|
1755
|
+
}), cn = /* @__PURE__ */ g({
|
|
1730
1756
|
__name: "Debug",
|
|
1731
1757
|
setup(t) {
|
|
1732
|
-
return (s, e) => (
|
|
1758
|
+
return (s, e) => (o(), f(an, {
|
|
1733
1759
|
"title-id": "debug-setting",
|
|
1734
1760
|
title: s.$td("settings.debug", "Debugging"),
|
|
1735
1761
|
description: s.$td("settings.debugDescription", "Enable debugging with [Eruda](https://eruda.liriliri.io/).")
|
|
1736
1762
|
}, {
|
|
1737
1763
|
default: m(() => [
|
|
1738
|
-
d(
|
|
1764
|
+
d(un, {
|
|
1739
1765
|
modelValue: s.$errors.debug,
|
|
1740
1766
|
"onUpdate:modelValue": e[0] || (e[0] = (r) => s.$errors.debug = r),
|
|
1741
1767
|
"aria-labelledby": "debug-setting"
|
|
@@ -1744,80 +1770,78 @@ const Rr = E({ name: "zondicons-cheveron-down", render: Lr }), kt = /* @__PURE__
|
|
|
1744
1770
|
_: 1
|
|
1745
1771
|
}, 8, ["title", "description"]));
|
|
1746
1772
|
}
|
|
1747
|
-
}),
|
|
1773
|
+
}), dn = [
|
|
1748
1774
|
{
|
|
1749
1775
|
priority: 10,
|
|
1750
|
-
component:
|
|
1776
|
+
component: cn
|
|
1751
1777
|
}
|
|
1752
|
-
],
|
|
1753
|
-
function
|
|
1754
|
-
|
|
1778
|
+
], Lt = [];
|
|
1779
|
+
function Xl(t) {
|
|
1780
|
+
Lt.push(t);
|
|
1755
1781
|
}
|
|
1756
|
-
function
|
|
1757
|
-
for (const s of
|
|
1782
|
+
function It(t) {
|
|
1783
|
+
for (const s of Lt) {
|
|
1758
1784
|
const e = s(t);
|
|
1759
1785
|
if (e)
|
|
1760
1786
|
return e;
|
|
1761
1787
|
}
|
|
1762
|
-
return typeof t == "string" ? t : t instanceof Error || t instanceof
|
|
1788
|
+
return typeof t == "string" ? t : t instanceof Error || t instanceof Ce ? t.message : he(t) ? D(t.message ?? t.description ?? "Unknown error object") : S("errors.unknown", "Unknown Error");
|
|
1763
1789
|
}
|
|
1764
|
-
class
|
|
1790
|
+
class tt extends Ce {
|
|
1765
1791
|
}
|
|
1766
|
-
const
|
|
1767
|
-
function
|
|
1768
|
-
const e = (r) => s(r) ||
|
|
1769
|
-
t.config.errorHandler = e, globalThis.onerror = (r, n, a, u,
|
|
1792
|
+
const pn = { $errors: $t }, mn = (t) => ($t.report(t), !0);
|
|
1793
|
+
function fn(t, s = () => !1) {
|
|
1794
|
+
const e = (r) => s(r) || mn(r);
|
|
1795
|
+
t.config.errorHandler = e, globalThis.onerror = (r, n, a, u, i) => e(i ?? r), globalThis.onunhandledrejection = (r) => e(r.reason);
|
|
1770
1796
|
}
|
|
1771
|
-
const
|
|
1797
|
+
const hn = {
|
|
1772
1798
|
async install(t, s) {
|
|
1773
|
-
|
|
1799
|
+
fn(t, s.handleError), dn.forEach((e) => q.addSetting(e)), await Te(t, pn);
|
|
1774
1800
|
}
|
|
1775
|
-
},
|
|
1801
|
+
}, gn = {
|
|
1776
1802
|
async install() {
|
|
1777
1803
|
ze() && (globalThis.testingRuntime = {
|
|
1778
1804
|
on: (...t) => F.on(...t),
|
|
1779
|
-
service: (t) =>
|
|
1805
|
+
service: (t) => q.service(t)
|
|
1780
1806
|
});
|
|
1781
1807
|
}
|
|
1782
|
-
},
|
|
1808
|
+
}, vn = {
|
|
1783
1809
|
viewBox: "0 0 20 20",
|
|
1784
1810
|
width: "1.2em",
|
|
1785
1811
|
height: "1.2em"
|
|
1786
1812
|
};
|
|
1787
|
-
function
|
|
1788
|
-
return
|
|
1789
|
-
|
|
1813
|
+
function bn(t, s) {
|
|
1814
|
+
return o(), b("svg", vn, s[0] || (s[0] = [
|
|
1815
|
+
v("path", {
|
|
1790
1816
|
fill: "currentColor",
|
|
1791
1817
|
d: "M10 8.586L2.929 1.515L1.515 2.929L8.586 10l-7.071 7.071l1.414 1.414L10 11.414l7.071 7.071l1.414-1.414L11.414 10l7.071-7.071l-1.414-1.414z"
|
|
1792
1818
|
}, null, -1)
|
|
1793
1819
|
]));
|
|
1794
1820
|
}
|
|
1795
|
-
const
|
|
1821
|
+
const yn = I({ name: "zondicons-close", render: bn }), _n = /* @__PURE__ */ g({
|
|
1796
1822
|
__name: "HeadlessModal",
|
|
1797
1823
|
props: {
|
|
1798
1824
|
persistent: { type: Boolean },
|
|
1825
|
+
fullscreen: { type: Boolean },
|
|
1826
|
+
fullscreenOnMobile: { type: Boolean },
|
|
1799
1827
|
title: {},
|
|
1800
1828
|
titleHidden: { type: Boolean },
|
|
1801
1829
|
description: {},
|
|
1802
1830
|
descriptionHidden: { type: Boolean }
|
|
1803
1831
|
},
|
|
1804
1832
|
setup(t, { expose: s }) {
|
|
1805
|
-
const e =
|
|
1833
|
+
const e = W(null), { close: r } = Ae();
|
|
1806
1834
|
s({ $content: e });
|
|
1807
|
-
const { forwardRef: n } =
|
|
1808
|
-
|
|
1809
|
-
async function a(u) {
|
|
1810
|
-
r.close(u), await le(1e3), r.remove();
|
|
1811
|
-
}
|
|
1812
|
-
return (u, o) => (i(), f(l(Es), {
|
|
1835
|
+
const { forwardRef: n } = Re();
|
|
1836
|
+
return ce("$modalContentRef", e), (a, u) => (o(), f(l(qs), {
|
|
1813
1837
|
ref: l(n),
|
|
1814
1838
|
open: "",
|
|
1815
|
-
"onUpdate:open":
|
|
1839
|
+
"onUpdate:open": u[0] || (u[0] = (i) => a.persistent || i || l(r)())
|
|
1816
1840
|
}, {
|
|
1817
1841
|
default: m(() => [
|
|
1818
|
-
d(l(
|
|
1842
|
+
d(l(Ps), null, {
|
|
1819
1843
|
default: m(() => [
|
|
1820
|
-
w(
|
|
1844
|
+
w(a.$slots, "default", { close: l(r) })
|
|
1821
1845
|
]),
|
|
1822
1846
|
_: 3
|
|
1823
1847
|
})
|
|
@@ -1825,36 +1849,36 @@ const rn = E({ name: "zondicons-close", render: sn }), nn = /* @__PURE__ */ h({
|
|
|
1825
1849
|
_: 3
|
|
1826
1850
|
}, 512));
|
|
1827
1851
|
}
|
|
1828
|
-
}),
|
|
1852
|
+
}), wn = /* @__PURE__ */ g({
|
|
1829
1853
|
__name: "HeadlessModalContent",
|
|
1830
1854
|
setup(t) {
|
|
1831
|
-
const { child: s } =
|
|
1832
|
-
return
|
|
1855
|
+
const { child: s } = Ae(), e = gr("$modalContentRef"), r = te("$contentRef");
|
|
1856
|
+
return Y(() => e.value = r.value), (n, a) => (o(), f(l(As), { ref: "$contentRef" }, {
|
|
1833
1857
|
default: m(() => [
|
|
1834
1858
|
w(n.$slots, "default"),
|
|
1835
|
-
l(s) ? (
|
|
1859
|
+
l(s) ? (o(), f(l(_s), {
|
|
1836
1860
|
key: 0,
|
|
1837
1861
|
is: l(s)
|
|
1838
|
-
}, null, 8, ["is"])) :
|
|
1862
|
+
}, null, 8, ["is"])) : M("", !0)
|
|
1839
1863
|
]),
|
|
1840
1864
|
_: 3
|
|
1841
1865
|
}, 512));
|
|
1842
1866
|
}
|
|
1843
|
-
}),
|
|
1867
|
+
}), $n = /* @__PURE__ */ g({
|
|
1844
1868
|
__name: "HeadlessModalDescription",
|
|
1845
1869
|
props: {
|
|
1846
1870
|
asChild: { type: Boolean },
|
|
1847
1871
|
as: {}
|
|
1848
1872
|
},
|
|
1849
1873
|
setup(t) {
|
|
1850
|
-
return (s, e) => (
|
|
1874
|
+
return (s, e) => (o(), f(l(Ds), de(pe(s.$props)), {
|
|
1851
1875
|
default: m(() => [
|
|
1852
1876
|
w(s.$slots, "default")
|
|
1853
1877
|
]),
|
|
1854
1878
|
_: 3
|
|
1855
1879
|
}, 16));
|
|
1856
1880
|
}
|
|
1857
|
-
}),
|
|
1881
|
+
}), xn = /* @__PURE__ */ g({
|
|
1858
1882
|
__name: "HeadlessModalOverlay",
|
|
1859
1883
|
props: {
|
|
1860
1884
|
forceMount: { type: Boolean },
|
|
@@ -1862,34 +1886,33 @@ const rn = E({ name: "zondicons-close", render: sn }), nn = /* @__PURE__ */ h({
|
|
|
1862
1886
|
as: {}
|
|
1863
1887
|
},
|
|
1864
1888
|
setup(t) {
|
|
1865
|
-
return (s, e) => (
|
|
1889
|
+
return (s, e) => (o(), f(l(Bs), de(pe(s.$props)), {
|
|
1866
1890
|
default: m(() => [
|
|
1867
1891
|
w(s.$slots, "default")
|
|
1868
1892
|
]),
|
|
1869
1893
|
_: 3
|
|
1870
1894
|
}, 16));
|
|
1871
1895
|
}
|
|
1872
|
-
}),
|
|
1896
|
+
}), Cn = /* @__PURE__ */ g({
|
|
1873
1897
|
__name: "HeadlessModalTitle",
|
|
1874
1898
|
props: {
|
|
1875
1899
|
asChild: { type: Boolean },
|
|
1876
1900
|
as: {}
|
|
1877
1901
|
},
|
|
1878
1902
|
setup(t) {
|
|
1879
|
-
return (s, e) => (
|
|
1903
|
+
return (s, e) => (o(), f(l(js), de(pe(s.$props)), {
|
|
1880
1904
|
default: m(() => [
|
|
1881
1905
|
w(s.$slots, "default")
|
|
1882
1906
|
]),
|
|
1883
1907
|
_: 3
|
|
1884
1908
|
}, 16));
|
|
1885
1909
|
}
|
|
1886
|
-
}),
|
|
1887
|
-
key: 0,
|
|
1888
|
-
class: "absolute top-0 right-0 hidden pt-3.5 pr-2.5 sm:block"
|
|
1889
|
-
}, dn = ["onClick"], pn = { class: "sr-only" }, He = ur(), re = /* @__PURE__ */ h({
|
|
1910
|
+
}), kn = ["onClick"], Sn = { class: "sr-only" }, fe = xr(), ne = /* @__PURE__ */ g({
|
|
1890
1911
|
__name: "Modal",
|
|
1891
1912
|
props: {
|
|
1892
1913
|
persistent: { type: Boolean },
|
|
1914
|
+
fullscreen: { type: Boolean },
|
|
1915
|
+
fullscreenOnMobile: { type: Boolean },
|
|
1893
1916
|
title: {},
|
|
1894
1917
|
titleHidden: { type: Boolean },
|
|
1895
1918
|
description: {},
|
|
@@ -1899,85 +1922,97 @@ const rn = E({ name: "zondicons-close", render: sn }), nn = /* @__PURE__ */ h({
|
|
|
1899
1922
|
closeHidden: { type: Boolean }
|
|
1900
1923
|
},
|
|
1901
1924
|
setup(t, { expose: s }) {
|
|
1902
|
-
const e =
|
|
1925
|
+
const e = O(t, ["class", "wrapperClass", "title", "titleHidden", "description", "persistent", "closeHidden", "fullscreen", "fullscreenOnMobile"]);
|
|
1903
1926
|
s({
|
|
1904
1927
|
$content: c(() => {
|
|
1905
1928
|
var T;
|
|
1906
|
-
return (T =
|
|
1929
|
+
return (T = i.value) == null ? void 0 : T.$content;
|
|
1907
1930
|
})
|
|
1908
1931
|
});
|
|
1909
|
-
const { forwardRef: r, currentRef: n } =
|
|
1932
|
+
const { forwardRef: r, currentRef: n } = Re(), { id: a, visible: u } = Ae(), i = n, p = ct(), h = c(
|
|
1910
1933
|
() => {
|
|
1911
1934
|
var T;
|
|
1912
|
-
return u.value && ((T =
|
|
1935
|
+
return u.value && ((T = le.value.toReversed().find((je) => je.visible.value)) == null ? void 0 : T.id) === a.value;
|
|
1913
1936
|
}
|
|
1914
|
-
),
|
|
1915
|
-
"
|
|
1916
|
-
"
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
"
|
|
1922
|
-
|
|
1937
|
+
), y = c(() => le.value.find((T) => T.visible.value)), _ = c(() => le.value.some((T) => fe.has(T))), E = c(() => t.description ? {} : { "aria-describedby": void 0 }), U = c(() => k(
|
|
1938
|
+
"overflow-auto px-4 pb-4 flex flex-col flex-1",
|
|
1939
|
+
{ "pt-4": !t.title || t.titleHidden, "max-h-[90vh]": !Q.value },
|
|
1940
|
+
t.class
|
|
1941
|
+
)), Q = c(() => t.fullscreen || t.fullscreenOnMobile && P.mobile), Dt = c(() => k(
|
|
1942
|
+
"isolate fixed z-50 flex flex-col overflow-hidden bg-white text-left duration-300",
|
|
1943
|
+
Q.value ? [
|
|
1944
|
+
"inset-0 transition-[transform,translate] will-change-[transform,translate]",
|
|
1945
|
+
fe.has(p.value) || "animate-[slide-in_var(--tw-duration)_ease-in-out]",
|
|
1946
|
+
h.value ? "translate-y-0" : "translate-y-full"
|
|
1947
|
+
] : [
|
|
1948
|
+
"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full",
|
|
1949
|
+
"max-w-[calc(100%-2rem)] rounded-lg shadow-xl sm:max-w-lg",
|
|
1950
|
+
"transition-[scale,opacity] will-change-[scale,opacity]",
|
|
1951
|
+
fe.has(p.value) || "animate-[fade-in_var(--tw-duration)_ease-in-out,grow_var(--tw-duration)_ease-in-out]",
|
|
1952
|
+
h.value ? "scale-100 opacity-100" : "scale-50 opacity-0"
|
|
1953
|
+
],
|
|
1923
1954
|
t.wrapperClass
|
|
1924
1955
|
));
|
|
1925
|
-
return
|
|
1956
|
+
return rt(() => oe(500).then(() => fe.add(p.value))), (T, je) => (o(), f(_n, V(e, {
|
|
1926
1957
|
ref: (me) => l(r)(me),
|
|
1927
1958
|
persistent: T.persistent
|
|
1928
1959
|
}), {
|
|
1929
1960
|
default: m(({ close: me }) => {
|
|
1930
|
-
var Fe,
|
|
1961
|
+
var Fe, Oe;
|
|
1931
1962
|
return [
|
|
1932
|
-
d(
|
|
1933
|
-
class:
|
|
1934
|
-
"animate-[fade-in_var(--tw-duration)_ease-in-out]": !
|
|
1935
|
-
"bg-black/30": ((Fe =
|
|
1936
|
-
"opacity-0":
|
|
1963
|
+
d(xn, {
|
|
1964
|
+
class: $(["fixed inset-0 transition-opacity duration-300 will-change-[opacity]", {
|
|
1965
|
+
"animate-[fade-in_var(--tw-duration)_ease-in-out]": !_.value,
|
|
1966
|
+
"bg-black/30": ((Fe = y.value) == null ? void 0 : Fe.id) === l(a) || !y.value && ((Oe = l(le)[0]) == null ? void 0 : Oe.id) === l(a),
|
|
1967
|
+
"opacity-0": !y.value,
|
|
1968
|
+
hidden: Q.value
|
|
1937
1969
|
}])
|
|
1938
1970
|
}, null, 8, ["class"]),
|
|
1939
|
-
d(
|
|
1971
|
+
d(wn, V(E.value, { class: Dt.value }), {
|
|
1940
1972
|
default: m(() => [
|
|
1941
|
-
!T.persistent && !T.closeHidden ? (
|
|
1942
|
-
|
|
1973
|
+
!T.persistent && !T.closeHidden ? (o(), b("div", {
|
|
1974
|
+
key: 0,
|
|
1975
|
+
class: $(["absolute top-0 right-0 pt-3.5 pr-2.5", { "hidden sm:block": !Q.value }])
|
|
1976
|
+
}, [
|
|
1977
|
+
v("button", {
|
|
1943
1978
|
type: "button",
|
|
1944
1979
|
class: "clickable z-10 rounded-full p-2.5 text-gray-400 hover:text-gray-500",
|
|
1945
|
-
onClick: (
|
|
1980
|
+
onClick: (Cl) => me()
|
|
1946
1981
|
}, [
|
|
1947
|
-
|
|
1948
|
-
d(l(
|
|
1949
|
-
], 8,
|
|
1950
|
-
])) :
|
|
1951
|
-
T.title ? (
|
|
1982
|
+
v("span", Sn, x(T.$td("ui.close", "Close")), 1),
|
|
1983
|
+
d(l(yn), { class: "size-4" })
|
|
1984
|
+
], 8, kn)
|
|
1985
|
+
], 2)) : M("", !0),
|
|
1986
|
+
T.title ? (o(), f(Cn, {
|
|
1952
1987
|
key: 1,
|
|
1953
|
-
class:
|
|
1988
|
+
class: $(["px-4 pt-5 text-base font-semibold text-gray-900", {
|
|
1954
1989
|
"sr-only": T.titleHidden,
|
|
1955
1990
|
"pb-0": T.description && !T.descriptionHidden,
|
|
1956
1991
|
"pb-2": !T.description || T.descriptionHidden
|
|
1957
1992
|
}])
|
|
1958
1993
|
}, {
|
|
1959
1994
|
default: m(() => [
|
|
1960
|
-
d(
|
|
1995
|
+
d(R, {
|
|
1961
1996
|
text: T.title,
|
|
1962
1997
|
inline: ""
|
|
1963
1998
|
}, null, 8, ["text"])
|
|
1964
1999
|
]),
|
|
1965
2000
|
_: 1
|
|
1966
|
-
}, 8, ["class"])) :
|
|
1967
|
-
T.description ? (
|
|
2001
|
+
}, 8, ["class"])) : M("", !0),
|
|
2002
|
+
T.description ? (o(), f($n, {
|
|
1968
2003
|
key: 2,
|
|
1969
|
-
class:
|
|
2004
|
+
class: $(["px-4 pt-1 pb-2", { "sr-only": T.descriptionHidden }])
|
|
1970
2005
|
}, {
|
|
1971
2006
|
default: m(() => [
|
|
1972
|
-
d(
|
|
2007
|
+
d(R, {
|
|
1973
2008
|
text: T.description,
|
|
1974
2009
|
class: "text-sm leading-6 text-gray-500"
|
|
1975
2010
|
}, null, 8, ["text"])
|
|
1976
2011
|
]),
|
|
1977
2012
|
_: 1
|
|
1978
|
-
}, 8, ["class"])) :
|
|
1979
|
-
|
|
1980
|
-
class:
|
|
2013
|
+
}, 8, ["class"])) : M("", !0),
|
|
2014
|
+
v("div", {
|
|
2015
|
+
class: $(U.value)
|
|
1981
2016
|
}, [
|
|
1982
2017
|
w(T.$slots, "default", { close: me })
|
|
1983
2018
|
], 2)
|
|
@@ -1990,29 +2025,29 @@ const rn = E({ name: "zondicons-close", render: sn }), nn = /* @__PURE__ */ h({
|
|
|
1990
2025
|
}, 16, ["persistent"]));
|
|
1991
2026
|
}
|
|
1992
2027
|
});
|
|
1993
|
-
function
|
|
1994
|
-
const s = c(() => t.title ??
|
|
2028
|
+
function Tn(t) {
|
|
2029
|
+
const s = c(() => t.title ?? S("ui.alert", "Alert")), e = c(() => !t.title);
|
|
1995
2030
|
return { renderedTitle: s, titleHidden: e };
|
|
1996
2031
|
}
|
|
1997
|
-
const
|
|
2032
|
+
const Mn = /* @__PURE__ */ g({
|
|
1998
2033
|
__name: "AlertModal",
|
|
1999
2034
|
props: {
|
|
2000
2035
|
title: {},
|
|
2001
2036
|
message: {}
|
|
2002
2037
|
},
|
|
2003
2038
|
setup(t, { expose: s }) {
|
|
2004
|
-
const e = t, { renderedTitle: r, titleHidden: n } =
|
|
2005
|
-
return s(), (a, u) => (
|
|
2039
|
+
const e = t, { renderedTitle: r, titleHidden: n } = Tn(e);
|
|
2040
|
+
return s(), (a, u) => (o(), f(ne, {
|
|
2006
2041
|
title: l(r),
|
|
2007
2042
|
"title-hidden": l(n)
|
|
2008
2043
|
}, {
|
|
2009
2044
|
default: m(() => [
|
|
2010
|
-
d(
|
|
2045
|
+
d(R, { text: a.message }, null, 8, ["text"])
|
|
2011
2046
|
]),
|
|
2012
2047
|
_: 1
|
|
2013
2048
|
}, 8, ["title", "title-hidden"]));
|
|
2014
2049
|
}
|
|
2015
|
-
}),
|
|
2050
|
+
}), zt = /* @__PURE__ */ g({
|
|
2016
2051
|
__name: "Form",
|
|
2017
2052
|
props: {
|
|
2018
2053
|
form: {}
|
|
@@ -2021,21 +2056,21 @@ const fn = /* @__PURE__ */ h({
|
|
|
2021
2056
|
setup(t, { emit: s }) {
|
|
2022
2057
|
let e;
|
|
2023
2058
|
const r = s;
|
|
2024
|
-
return
|
|
2059
|
+
return Y((n) => {
|
|
2025
2060
|
var a;
|
|
2026
2061
|
e == null || e(), e = (a = t.form) == null ? void 0 : a.on("submit", () => r("submit")), n(() => e == null ? void 0 : e());
|
|
2027
|
-
}),
|
|
2028
|
-
onSubmit: a[0] || (a[0] =
|
|
2062
|
+
}), ce("form", t.form), (n, a) => (o(), b("form", {
|
|
2063
|
+
onSubmit: a[0] || (a[0] = nt((u) => n.form ? n.form.submit() : n.$emit("submit"), ["prevent"]))
|
|
2029
2064
|
}, [
|
|
2030
2065
|
w(n.$slots, "default")
|
|
2031
2066
|
], 32));
|
|
2032
2067
|
}
|
|
2033
2068
|
});
|
|
2034
|
-
function
|
|
2035
|
-
const s =
|
|
2069
|
+
function En(t) {
|
|
2070
|
+
const s = gt(
|
|
2036
2071
|
Object.entries(t.checkboxes ?? {}).reduce(
|
|
2037
|
-
(u, [
|
|
2038
|
-
[
|
|
2072
|
+
(u, [i, p]) => ({
|
|
2073
|
+
[i]: {
|
|
2039
2074
|
type: "boolean",
|
|
2040
2075
|
default: p.default,
|
|
2041
2076
|
required: p.required ? "required" : void 0
|
|
@@ -2044,13 +2079,13 @@ function hn(t) {
|
|
|
2044
2079
|
}),
|
|
2045
2080
|
{}
|
|
2046
2081
|
)
|
|
2047
|
-
), e = c(() => t.title ??
|
|
2082
|
+
), e = c(() => t.title ?? S("ui.confirm", "Confirm")), r = c(() => !t.title), n = c(() => t.acceptText ?? S("ui.accept", "Ok")), a = c(() => t.cancelText ?? S("ui.cancel", "Cancel"));
|
|
2048
2083
|
return { form: s, renderedTitle: e, titleHidden: r, renderedAcceptText: n, renderedCancelText: a };
|
|
2049
2084
|
}
|
|
2050
|
-
const
|
|
2085
|
+
const Vn = {
|
|
2051
2086
|
key: 0,
|
|
2052
2087
|
class: "mt-4 flex flex-col text-sm text-gray-600"
|
|
2053
|
-
},
|
|
2088
|
+
}, Hn = { class: "flex items-center" }, Ln = ["onUpdate:modelValue", "required"], In = { class: "ml-1.5" }, zn = { class: "mt-4 flex flex-row-reverse gap-2" }, Rn = /* @__PURE__ */ g({
|
|
2054
2089
|
__name: "ConfirmModal",
|
|
2055
2090
|
props: {
|
|
2056
2091
|
title: {},
|
|
@@ -2065,39 +2100,39 @@ const gn = {
|
|
|
2065
2100
|
},
|
|
2066
2101
|
emits: ["close"],
|
|
2067
2102
|
setup(t, { expose: s }) {
|
|
2068
|
-
const e =
|
|
2069
|
-
return s(), (p,
|
|
2103
|
+
const e = O(t, ["cancelVariant"]), { form: r, renderedTitle: n, titleHidden: a, renderedAcceptText: u, renderedCancelText: i } = En(e);
|
|
2104
|
+
return s(), (p, h) => (o(), f(ne, {
|
|
2070
2105
|
title: l(n),
|
|
2071
2106
|
"title-hidden": l(a),
|
|
2072
2107
|
persistent: ""
|
|
2073
2108
|
}, {
|
|
2074
|
-
default: m(({ close:
|
|
2075
|
-
d(
|
|
2109
|
+
default: m(({ close: y }) => [
|
|
2110
|
+
d(zt, {
|
|
2076
2111
|
form: l(r),
|
|
2077
|
-
onSubmit: (
|
|
2112
|
+
onSubmit: (_) => y([!0, l(r).data()])
|
|
2078
2113
|
}, {
|
|
2079
2114
|
default: m(() => [
|
|
2080
|
-
d(
|
|
2115
|
+
d(R, {
|
|
2081
2116
|
text: p.message,
|
|
2082
2117
|
actions: p.actions
|
|
2083
2118
|
}, null, 8, ["text", "actions"]),
|
|
2084
|
-
p.checkboxes ? (
|
|
2085
|
-
(
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
"onUpdate:modelValue": (
|
|
2119
|
+
p.checkboxes ? (o(), b("ul", Vn, [
|
|
2120
|
+
(o(!0), b(A, null, B(p.checkboxes, (_, E) => (o(), b("li", { key: E }, [
|
|
2121
|
+
v("label", Hn, [
|
|
2122
|
+
at(v("input", {
|
|
2123
|
+
"onUpdate:modelValue": (U) => l(r)[E] = U,
|
|
2089
2124
|
type: "checkbox",
|
|
2090
|
-
required:
|
|
2125
|
+
required: _.required,
|
|
2091
2126
|
class: "border-primary-600 text-primary-600 hover:bg-primary-50 hover:checked:bg-primary-500 focus:ring-primary-600 focus-visible:ring-primary-600 rounded border-2"
|
|
2092
|
-
}, null, 8,
|
|
2093
|
-
[
|
|
2127
|
+
}, null, 8, Ln), [
|
|
2128
|
+
[Zt, l(r)[E]]
|
|
2094
2129
|
]),
|
|
2095
|
-
|
|
2130
|
+
v("span", In, x(_.label), 1)
|
|
2096
2131
|
])
|
|
2097
2132
|
]))), 128))
|
|
2098
|
-
])) :
|
|
2099
|
-
|
|
2100
|
-
d(
|
|
2133
|
+
])) : M("", !0),
|
|
2134
|
+
v("div", zn, [
|
|
2135
|
+
d(z, {
|
|
2101
2136
|
variant: p.acceptVariant,
|
|
2102
2137
|
submit: ""
|
|
2103
2138
|
}, {
|
|
@@ -2106,13 +2141,13 @@ const gn = {
|
|
|
2106
2141
|
]),
|
|
2107
2142
|
_: 1
|
|
2108
2143
|
}, 8, ["variant"]),
|
|
2109
|
-
p.required ?
|
|
2144
|
+
p.required ? M("", !0) : (o(), f(z, {
|
|
2110
2145
|
key: 0,
|
|
2111
2146
|
variant: p.cancelVariant,
|
|
2112
|
-
onClick: (
|
|
2147
|
+
onClick: (_) => y(!1)
|
|
2113
2148
|
}, {
|
|
2114
2149
|
default: m(() => [
|
|
2115
|
-
L(x(l(
|
|
2150
|
+
L(x(l(i)), 1)
|
|
2116
2151
|
]),
|
|
2117
2152
|
_: 2
|
|
2118
2153
|
}, 1032, ["variant", "onClick"]))
|
|
@@ -2124,92 +2159,92 @@ const gn = {
|
|
|
2124
2159
|
_: 1
|
|
2125
2160
|
}, 8, ["title", "title-hidden"]));
|
|
2126
2161
|
}
|
|
2127
|
-
}),
|
|
2162
|
+
}), qn = {
|
|
2128
2163
|
viewBox: "0 0 20 20",
|
|
2129
2164
|
width: "1.2em",
|
|
2130
2165
|
height: "1.2em"
|
|
2131
2166
|
};
|
|
2132
|
-
function
|
|
2133
|
-
return
|
|
2134
|
-
|
|
2167
|
+
function Pn(t, s) {
|
|
2168
|
+
return o(), b("svg", qn, s[0] || (s[0] = [
|
|
2169
|
+
v("path", {
|
|
2135
2170
|
fill: "currentColor",
|
|
2136
2171
|
d: "M7.05 9.293L6.343 10L12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"
|
|
2137
2172
|
}, null, -1)
|
|
2138
2173
|
]));
|
|
2139
2174
|
}
|
|
2140
|
-
const
|
|
2175
|
+
const An = I({ name: "zondicons-cheveron-left", render: Pn }), Dn = {
|
|
2141
2176
|
viewBox: "0 0 20 20",
|
|
2142
2177
|
width: "1.2em",
|
|
2143
2178
|
height: "1.2em"
|
|
2144
2179
|
};
|
|
2145
|
-
function
|
|
2146
|
-
return
|
|
2147
|
-
|
|
2180
|
+
function Bn(t, s) {
|
|
2181
|
+
return o(), b("svg", Dn, s[0] || (s[0] = [
|
|
2182
|
+
v("path", {
|
|
2148
2183
|
fill: "currentColor",
|
|
2149
2184
|
d: "m12.95 10.707l.707-.707L8 4.343L6.586 5.757L10.828 10l-4.242 4.243L8 15.657z"
|
|
2150
2185
|
}, null, -1)
|
|
2151
2186
|
]));
|
|
2152
2187
|
}
|
|
2153
|
-
const
|
|
2188
|
+
const Rt = I({ name: "zondicons-cheveron-right", render: Bn }), jn = {
|
|
2154
2189
|
viewBox: "0 0 20 20",
|
|
2155
2190
|
width: "1.2em",
|
|
2156
2191
|
height: "1.2em"
|
|
2157
2192
|
};
|
|
2158
|
-
function
|
|
2159
|
-
return
|
|
2160
|
-
|
|
2193
|
+
function Fn(t, s) {
|
|
2194
|
+
return o(), b("svg", jn, s[0] || (s[0] = [
|
|
2195
|
+
v("path", {
|
|
2161
2196
|
fill: "currentColor",
|
|
2162
2197
|
d: "M2.93 17.07A10 10 0 1 1 17.07 2.93A10 10 0 0 1 2.93 17.07M9 5v6h2V5zm0 8v2h2v-2z"
|
|
2163
2198
|
}, null, -1)
|
|
2164
2199
|
]));
|
|
2165
2200
|
}
|
|
2166
|
-
const De =
|
|
2201
|
+
const De = I({ name: "zondicons-exclamation-solid", render: Fn }), On = {
|
|
2167
2202
|
viewBox: "0 0 24 24",
|
|
2168
2203
|
width: "1.2em",
|
|
2169
2204
|
height: "1.2em"
|
|
2170
2205
|
};
|
|
2171
|
-
function
|
|
2172
|
-
return
|
|
2173
|
-
|
|
2206
|
+
function Un(t, s) {
|
|
2207
|
+
return o(), b("svg", On, s[0] || (s[0] = [
|
|
2208
|
+
v("path", {
|
|
2174
2209
|
fill: "currentColor",
|
|
2175
2210
|
d: "M20 19V7H4v12zm0-16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm-7 14v-2h5v2zm-3.42-4L5.57 9H8.4l3.3 3.3c.39.39.39 1.03 0 1.42L8.42 17H5.59z"
|
|
2176
2211
|
}, null, -1)
|
|
2177
2212
|
]));
|
|
2178
2213
|
}
|
|
2179
|
-
const
|
|
2214
|
+
const Nn = I({ name: "mdi-console", render: Un }), Wn = {
|
|
2180
2215
|
viewBox: "0 0 20 20",
|
|
2181
2216
|
width: "1.2em",
|
|
2182
2217
|
height: "1.2em"
|
|
2183
2218
|
};
|
|
2184
|
-
function
|
|
2185
|
-
return
|
|
2186
|
-
|
|
2219
|
+
function Kn(t, s) {
|
|
2220
|
+
return o(), b("svg", Wn, s[0] || (s[0] = [
|
|
2221
|
+
v("path", {
|
|
2187
2222
|
fill: "currentColor",
|
|
2188
2223
|
d: "M6 6V2c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4v4a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8c0-1.1.9-2 2-2zm2 0h4a2 2 0 0 1 2 2v4h4V2H8zM2 8v10h10V8z"
|
|
2189
2224
|
}, null, -1)
|
|
2190
2225
|
]));
|
|
2191
2226
|
}
|
|
2192
|
-
const
|
|
2227
|
+
const Qn = I({ name: "zondicons-copy", render: Kn }), Zn = {
|
|
2193
2228
|
viewBox: "0 0 24 24",
|
|
2194
2229
|
width: "1.2em",
|
|
2195
2230
|
height: "1.2em"
|
|
2196
2231
|
};
|
|
2197
|
-
function
|
|
2198
|
-
return
|
|
2199
|
-
|
|
2232
|
+
function Jn(t, s) {
|
|
2233
|
+
return o(), b("svg", Zn, s[0] || (s[0] = [
|
|
2234
|
+
v("path", {
|
|
2200
2235
|
fill: "currentColor",
|
|
2201
2236
|
d: "M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
|
|
2202
2237
|
}, null, -1)
|
|
2203
2238
|
]));
|
|
2204
2239
|
}
|
|
2205
|
-
const
|
|
2240
|
+
const Gn = I({ name: "mdi-github", render: Jn }), Xn = { class: "flex" }, Yn = { class: "sr-only" }, ea = /* @__PURE__ */ g({
|
|
2206
2241
|
__name: "ErrorReportModalButtons",
|
|
2207
2242
|
props: {
|
|
2208
2243
|
report: {}
|
|
2209
2244
|
},
|
|
2210
2245
|
setup(t) {
|
|
2211
2246
|
const s = t, e = c(() => s.report.description ? `${s.report.title}: ${s.report.description}` : s.report.title), r = c(() => {
|
|
2212
|
-
if (!
|
|
2247
|
+
if (!q.sourceUrl)
|
|
2213
2248
|
return !1;
|
|
2214
2249
|
const a = encodeURIComponent(e.value), u = encodeURIComponent(
|
|
2215
2250
|
[
|
|
@@ -2217,35 +2252,35 @@ const An = E({ name: "mdi-github", render: qn }), Pn = { class: "flex" }, Dn = {
|
|
|
2217
2252
|
"",
|
|
2218
2253
|
"Error details:",
|
|
2219
2254
|
"```",
|
|
2220
|
-
|
|
2255
|
+
is(
|
|
2221
2256
|
s.report.details ?? "Details missing from report",
|
|
2222
|
-
1800 - a.length -
|
|
2257
|
+
1800 - a.length - q.sourceUrl.length
|
|
2223
2258
|
).trim(),
|
|
2224
2259
|
"```"
|
|
2225
2260
|
].join(`
|
|
2226
2261
|
`)
|
|
2227
2262
|
);
|
|
2228
|
-
return `${
|
|
2229
|
-
}), n = c(() =>
|
|
2263
|
+
return `${q.sourceUrl}/issues/new?title=${a}&body=${u}`;
|
|
2264
|
+
}), n = c(() => se(
|
|
2230
2265
|
[
|
|
2231
2266
|
{
|
|
2232
2267
|
id: "clipboard",
|
|
2233
2268
|
description: "Copy to clipboard",
|
|
2234
|
-
iconComponent:
|
|
2269
|
+
iconComponent: Qn,
|
|
2235
2270
|
async click() {
|
|
2236
2271
|
await navigator.clipboard.writeText(`${e.value}
|
|
2237
2272
|
|
|
2238
|
-
${s.report.details}`), P.toast(
|
|
2273
|
+
${s.report.details}`), P.toast(S("errors.copiedToClipboard", "Debug information copied to clipboard"));
|
|
2239
2274
|
}
|
|
2240
2275
|
},
|
|
2241
2276
|
{
|
|
2242
2277
|
id: "console",
|
|
2243
2278
|
description: "Log to console",
|
|
2244
|
-
iconComponent:
|
|
2279
|
+
iconComponent: Nn,
|
|
2245
2280
|
click() {
|
|
2246
2281
|
const a = s.report.error ?? s.report;
|
|
2247
2282
|
window.error = a, console.error(a), P.toast(
|
|
2248
|
-
|
|
2283
|
+
S(
|
|
2249
2284
|
"errors.addedToConsole",
|
|
2250
2285
|
"You can now use the **error** variable in the console"
|
|
2251
2286
|
)
|
|
@@ -2257,24 +2292,24 @@ ${s.report.details}`), P.toast(k("errors.copiedToClipboard", "Debug information
|
|
|
2257
2292
|
r.value && a.push({
|
|
2258
2293
|
id: "github",
|
|
2259
2294
|
description: "Report in GitHub",
|
|
2260
|
-
iconComponent:
|
|
2295
|
+
iconComponent: Gn,
|
|
2261
2296
|
url: r.value
|
|
2262
2297
|
});
|
|
2263
2298
|
}
|
|
2264
2299
|
));
|
|
2265
|
-
return (a, u) => (
|
|
2266
|
-
(
|
|
2267
|
-
d(
|
|
2300
|
+
return (a, u) => (o(), b("div", Xn, [
|
|
2301
|
+
(o(!0), b(A, null, B(n.value, (i) => w(a.$slots, "default", V({ ref_for: !0 }, i), () => [
|
|
2302
|
+
d(z, {
|
|
2268
2303
|
size: "icon",
|
|
2269
2304
|
variant: "ghost",
|
|
2270
2305
|
class: "group whitespace-nowrap",
|
|
2271
|
-
href:
|
|
2272
|
-
title: a.$td(`errors.report_${
|
|
2273
|
-
onClick:
|
|
2306
|
+
href: i.url,
|
|
2307
|
+
title: a.$td(`errors.report_${i.id}`, i.description),
|
|
2308
|
+
onClick: i.click
|
|
2274
2309
|
}, {
|
|
2275
2310
|
default: m(() => [
|
|
2276
|
-
|
|
2277
|
-
(
|
|
2311
|
+
v("span", Yn, x(a.$td(`errors.report_${i.id}`, i.description)), 1),
|
|
2312
|
+
(o(), f(ee(i.iconComponent), {
|
|
2278
2313
|
class: "size-4",
|
|
2279
2314
|
"aria-hidden": "true"
|
|
2280
2315
|
}))
|
|
@@ -2284,7 +2319,7 @@ ${s.report.details}`), P.toast(k("errors.copiedToClipboard", "Debug information
|
|
|
2284
2319
|
])), 256))
|
|
2285
2320
|
]));
|
|
2286
2321
|
}
|
|
2287
|
-
}),
|
|
2322
|
+
}), ta = /* @__PURE__ */ g({
|
|
2288
2323
|
__name: "ErrorReportModalTitle",
|
|
2289
2324
|
props: {
|
|
2290
2325
|
report: {},
|
|
@@ -2293,19 +2328,19 @@ ${s.report.details}`), P.toast(k("errors.copiedToClipboard", "Debug information
|
|
|
2293
2328
|
},
|
|
2294
2329
|
setup(t) {
|
|
2295
2330
|
const s = c(() => !t.totalReports || t.totalReports <= 1 ? t.report.title : `${t.report.title} (${t.currentReport}/${t.totalReports})`);
|
|
2296
|
-
return (e, r) => (
|
|
2331
|
+
return (e, r) => (o(), f(R, {
|
|
2297
2332
|
text: s.value,
|
|
2298
2333
|
inline: ""
|
|
2299
2334
|
}, null, 8, ["text"]));
|
|
2300
2335
|
}
|
|
2301
2336
|
});
|
|
2302
|
-
function
|
|
2303
|
-
const s =
|
|
2337
|
+
function sa(t) {
|
|
2338
|
+
const s = W(t.reports.includes(t.report) ? t.reports.indexOf(t.report) : 0), e = c(() => t.reports[s.value]), r = c(
|
|
2304
2339
|
() => {
|
|
2305
2340
|
var u;
|
|
2306
|
-
return ((u = e.value.details) == null ? void 0 : u.trim()) ||
|
|
2341
|
+
return ((u = e.value.details) == null ? void 0 : u.trim()) || S("errors.detailsEmpty", "This error is missing a stacktrace.");
|
|
2307
2342
|
}
|
|
2308
|
-
), n =
|
|
2343
|
+
), n = S("errors.previousReport", "Show previous report"), a = S("errors.nextReport", "Show next report");
|
|
2309
2344
|
return {
|
|
2310
2345
|
activeReportIndex: s,
|
|
2311
2346
|
details: r,
|
|
@@ -2314,18 +2349,18 @@ function Fn(t) {
|
|
|
2314
2349
|
activeReport: e
|
|
2315
2350
|
};
|
|
2316
2351
|
}
|
|
2317
|
-
const
|
|
2352
|
+
const ra = { class: "px-4 pt-5 pb-4" }, na = { class: "flex justify-between gap-4" }, aa = { class: "flex items-center gap-2" }, la = {
|
|
2318
2353
|
key: 0,
|
|
2319
2354
|
class: "flex gap-0.5"
|
|
2320
|
-
},
|
|
2355
|
+
}, oa = { class: "-mt-2 max-h-[75vh] overflow-auto bg-red-800/10" }, ia = ["textContent"], ua = /* @__PURE__ */ g({
|
|
2321
2356
|
__name: "ErrorReportModal",
|
|
2322
2357
|
props: {
|
|
2323
2358
|
report: {},
|
|
2324
2359
|
reports: {}
|
|
2325
2360
|
},
|
|
2326
2361
|
setup(t, { expose: s }) {
|
|
2327
|
-
const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: u, activeReport:
|
|
2328
|
-
return s(), (p,
|
|
2362
|
+
const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: u, activeReport: i } = sa(e);
|
|
2363
|
+
return s(), (p, h) => (o(), f(ne, {
|
|
2329
2364
|
title: p.$td("errors.report", "Error report"),
|
|
2330
2365
|
"title-hidden": "",
|
|
2331
2366
|
"close-hidden": "",
|
|
@@ -2333,83 +2368,83 @@ const Un = { class: "px-4 pt-5 pb-4" }, On = { class: "flex justify-between gap-
|
|
|
2333
2368
|
"wrapper-class": "sm:w-auto sm:min-w-lg sm:max-w-[80vw]"
|
|
2334
2369
|
}, {
|
|
2335
2370
|
default: m(() => [
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2371
|
+
v("div", ra, [
|
|
2372
|
+
v("h2", na, [
|
|
2373
|
+
v("div", aa, [
|
|
2339
2374
|
d(l(De), { class: "size-5 text-red-600" }),
|
|
2340
|
-
d(
|
|
2375
|
+
d(ta, {
|
|
2341
2376
|
class: "text-lg leading-6 font-semibold text-gray-900",
|
|
2342
|
-
report: l(
|
|
2377
|
+
report: l(i),
|
|
2343
2378
|
"current-report": l(r) + 1,
|
|
2344
2379
|
"total-reports": p.reports.length
|
|
2345
2380
|
}, null, 8, ["report", "current-report", "total-reports"]),
|
|
2346
|
-
p.reports.length > 1 ? (
|
|
2347
|
-
d(
|
|
2381
|
+
p.reports.length > 1 ? (o(), b("span", la, [
|
|
2382
|
+
d(z, {
|
|
2348
2383
|
size: "icon",
|
|
2349
2384
|
variant: "ghost",
|
|
2350
2385
|
disabled: l(r) === 0,
|
|
2351
2386
|
"aria-label": l(u),
|
|
2352
2387
|
title: l(u),
|
|
2353
|
-
onClick:
|
|
2388
|
+
onClick: h[0] || (h[0] = (y) => r.value--)
|
|
2354
2389
|
}, {
|
|
2355
2390
|
default: m(() => [
|
|
2356
|
-
d(l(
|
|
2391
|
+
d(l(An), { class: "size-4" })
|
|
2357
2392
|
]),
|
|
2358
2393
|
_: 1
|
|
2359
2394
|
}, 8, ["disabled", "aria-label", "title"]),
|
|
2360
|
-
d(
|
|
2395
|
+
d(z, {
|
|
2361
2396
|
size: "icon",
|
|
2362
2397
|
variant: "ghost",
|
|
2363
2398
|
disabled: l(r) === p.reports.length - 1,
|
|
2364
2399
|
"aria-label": l(a),
|
|
2365
2400
|
title: l(a),
|
|
2366
|
-
onClick:
|
|
2401
|
+
onClick: h[1] || (h[1] = (y) => r.value++)
|
|
2367
2402
|
}, {
|
|
2368
2403
|
default: m(() => [
|
|
2369
|
-
d(l(
|
|
2404
|
+
d(l(Rt), { class: "size-4" })
|
|
2370
2405
|
]),
|
|
2371
2406
|
_: 1
|
|
2372
2407
|
}, 8, ["disabled", "aria-label", "title"])
|
|
2373
|
-
])) :
|
|
2408
|
+
])) : M("", !0)
|
|
2374
2409
|
]),
|
|
2375
|
-
d(
|
|
2376
|
-
report: l(
|
|
2410
|
+
d(ea, {
|
|
2411
|
+
report: l(i),
|
|
2377
2412
|
class: "gap-0.5"
|
|
2378
2413
|
}, null, 8, ["report"])
|
|
2379
2414
|
]),
|
|
2380
|
-
l(
|
|
2415
|
+
l(i).description ? (o(), f(R, {
|
|
2381
2416
|
key: 0,
|
|
2382
|
-
text: l(
|
|
2417
|
+
text: l(i).description,
|
|
2383
2418
|
class: "text-gray-600"
|
|
2384
|
-
}, null, 8, ["text"])) :
|
|
2419
|
+
}, null, 8, ["text"])) : M("", !0)
|
|
2385
2420
|
]),
|
|
2386
|
-
|
|
2387
|
-
|
|
2421
|
+
v("div", oa, [
|
|
2422
|
+
v("pre", {
|
|
2388
2423
|
class: "p-4 text-xs text-red-800",
|
|
2389
2424
|
textContent: x(l(n))
|
|
2390
|
-
}, null, 8,
|
|
2425
|
+
}, null, 8, ia)
|
|
2391
2426
|
])
|
|
2392
2427
|
]),
|
|
2393
2428
|
_: 1
|
|
2394
2429
|
}, 8, ["title"]));
|
|
2395
2430
|
}
|
|
2396
|
-
}),
|
|
2431
|
+
}), ca = {
|
|
2397
2432
|
viewBox: "0 0 24 24",
|
|
2398
2433
|
width: "1.2em",
|
|
2399
2434
|
height: "1.2em"
|
|
2400
2435
|
};
|
|
2401
|
-
function
|
|
2402
|
-
return
|
|
2403
|
-
|
|
2436
|
+
function da(t, s) {
|
|
2437
|
+
return o(), b("svg", ca, s[0] || (s[0] = [
|
|
2438
|
+
v("path", {
|
|
2404
2439
|
fill: "currentColor",
|
|
2405
2440
|
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
|
|
2406
2441
|
opacity: ".25"
|
|
2407
2442
|
}, null, -1),
|
|
2408
|
-
|
|
2443
|
+
v("path", {
|
|
2409
2444
|
fill: "currentColor",
|
|
2410
2445
|
d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
|
|
2411
2446
|
}, [
|
|
2412
|
-
|
|
2447
|
+
v("animateTransform", {
|
|
2413
2448
|
attributeName: "transform",
|
|
2414
2449
|
dur: "0.75s",
|
|
2415
2450
|
repeatCount: "indefinite",
|
|
@@ -2419,40 +2454,50 @@ function Xn(t, s) {
|
|
|
2419
2454
|
], -1)
|
|
2420
2455
|
]));
|
|
2421
2456
|
}
|
|
2422
|
-
const
|
|
2457
|
+
const pa = I({ name: "svg-spinners-90-ring-with-bg", render: da }), ma = { class: "relative mt-1 h-2 w-full overflow-hidden rounded-full bg-gray-200" }, fa = { class: "sr-only" }, ha = /* @__PURE__ */ g({
|
|
2423
2458
|
__name: "ProgressBar",
|
|
2424
2459
|
props: {
|
|
2425
2460
|
filledClass: {},
|
|
2461
|
+
overflowClass: {},
|
|
2426
2462
|
progress: {},
|
|
2427
2463
|
job: {}
|
|
2428
2464
|
},
|
|
2429
2465
|
setup(t) {
|
|
2430
2466
|
let s;
|
|
2431
|
-
const e =
|
|
2432
|
-
|
|
2467
|
+
const e = W(0), r = c(() => k("size-full transition-transform duration-500 rounded-r-full ease-linear bg-primary-600", t.filledClass)), n = c(() => k(
|
|
2468
|
+
"absolute inset-y-0 right-0 size-full rounded-r-full",
|
|
2469
|
+
"bg-primary-900 transition-[width] duration-500 ease-linear",
|
|
2470
|
+
t.overflowClass
|
|
2471
|
+
)), a = c(() => typeof t.progress == "number" ? t.progress : e.value), u = c(() => a.value > 1 ? 100 * ((a.value - 1) / a.value) : null);
|
|
2472
|
+
return Ie(
|
|
2433
2473
|
() => t.job,
|
|
2434
2474
|
() => {
|
|
2435
|
-
s && s(), e.value = t.job ? t.job.progress : 0, s = t.job && t.job.listeners.add({ onUpdated: (
|
|
2475
|
+
s && s(), e.value = t.job ? t.job.progress : 0, s = t.job && t.job.listeners.add({ onUpdated: (i) => e.value = i });
|
|
2436
2476
|
},
|
|
2437
2477
|
{ immediate: !0 }
|
|
2438
|
-
),
|
|
2439
|
-
|
|
2440
|
-
class:
|
|
2441
|
-
style:
|
|
2478
|
+
), we(() => s && s()), (i, p) => (o(), b("div", ma, [
|
|
2479
|
+
v("div", {
|
|
2480
|
+
class: $(r.value),
|
|
2481
|
+
style: Ue(`transform:translateX(-${(1 - a.value) * 100}%)`)
|
|
2442
2482
|
}, null, 6),
|
|
2443
|
-
|
|
2444
|
-
|
|
2483
|
+
u.value ? (o(), b("div", {
|
|
2484
|
+
key: 0,
|
|
2485
|
+
class: $(n.value),
|
|
2486
|
+
style: Ue({ width: `${u.value}%` })
|
|
2487
|
+
}, null, 6)) : M("", !0),
|
|
2488
|
+
v("span", fa, x(i.$td("ui.progress", "{progress}% complete", {
|
|
2489
|
+
progress: a.value * 100
|
|
2445
2490
|
})), 1)
|
|
2446
2491
|
]));
|
|
2447
2492
|
}
|
|
2448
2493
|
});
|
|
2449
|
-
function
|
|
2450
|
-
const s = c(() => t.title ??
|
|
2451
|
-
() => t.message ??
|
|
2494
|
+
function ga(t) {
|
|
2495
|
+
const s = c(() => t.title ?? S("ui.loading", "Loading")), e = c(
|
|
2496
|
+
() => t.message ?? S("ui.loadingInProgress", "Loading in progress...")
|
|
2452
2497
|
), r = c(() => typeof t.progress == "number" || !!t.job), n = c(() => !t.title);
|
|
2453
2498
|
return { renderedTitle: s, renderedMessage: e, titleHidden: n, showProgress: r };
|
|
2454
2499
|
}
|
|
2455
|
-
const
|
|
2500
|
+
const va = /* @__PURE__ */ g({
|
|
2456
2501
|
__name: "LoadingModal",
|
|
2457
2502
|
props: {
|
|
2458
2503
|
title: {},
|
|
@@ -2461,30 +2506,30 @@ const ra = /* @__PURE__ */ h({
|
|
|
2461
2506
|
job: {}
|
|
2462
2507
|
},
|
|
2463
2508
|
setup(t, { expose: s }) {
|
|
2464
|
-
const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: u } =
|
|
2465
|
-
return s(), (
|
|
2509
|
+
const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: u } = ga(e);
|
|
2510
|
+
return s(), (i, p) => (o(), f(ne, {
|
|
2466
2511
|
persistent: "",
|
|
2467
|
-
class: C(["flex", { "flex-col-reverse": l(u), "items-center justify-center gap-2": !l(u) }]),
|
|
2468
2512
|
"wrapper-class": "w-auto",
|
|
2469
2513
|
title: l(r),
|
|
2470
|
-
"title-hidden": l(a)
|
|
2514
|
+
"title-hidden": l(a),
|
|
2515
|
+
class: $({ "flex-col-reverse": l(u), "flex-row items-center justify-center gap-2": !l(u) })
|
|
2471
2516
|
}, {
|
|
2472
2517
|
default: m(() => [
|
|
2473
|
-
l(u) ? (
|
|
2518
|
+
l(u) ? (o(), f(ha, {
|
|
2474
2519
|
key: 0,
|
|
2475
|
-
progress:
|
|
2476
|
-
job:
|
|
2520
|
+
progress: i.progress,
|
|
2521
|
+
job: i.job,
|
|
2477
2522
|
class: "min-w-[min(400px,80vw)]"
|
|
2478
|
-
}, null, 8, ["progress", "job"])) : (
|
|
2523
|
+
}, null, 8, ["progress", "job"])) : (o(), f(l(pa), {
|
|
2479
2524
|
key: 1,
|
|
2480
2525
|
class: "text-primary-600 mr-1 size-6"
|
|
2481
2526
|
})),
|
|
2482
|
-
d(
|
|
2527
|
+
d(R, { text: l(n) }, null, 8, ["text"])
|
|
2483
2528
|
]),
|
|
2484
2529
|
_: 1
|
|
2485
2530
|
}, 8, ["title", "title-hidden", "class"]));
|
|
2486
2531
|
}
|
|
2487
|
-
}),
|
|
2532
|
+
}), Be = /* @__PURE__ */ g({
|
|
2488
2533
|
__name: "HeadlessInput",
|
|
2489
2534
|
props: {
|
|
2490
2535
|
name: {},
|
|
@@ -2496,127 +2541,132 @@ const ra = /* @__PURE__ */ h({
|
|
|
2496
2541
|
emits: ["update:modelValue"],
|
|
2497
2542
|
setup(t, { expose: s, emit: e }) {
|
|
2498
2543
|
const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), u = {
|
|
2499
|
-
id: `input-${
|
|
2544
|
+
id: `input-${ue()}`,
|
|
2500
2545
|
name: c(() => t.name),
|
|
2501
2546
|
label: c(() => t.label),
|
|
2502
2547
|
description: c(() => t.description),
|
|
2503
2548
|
value: c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
|
|
2504
|
-
errors:
|
|
2549
|
+
errors: $e(a),
|
|
2505
2550
|
required: c(() => {
|
|
2506
2551
|
if (!(!t.name || !n))
|
|
2507
2552
|
return n.getFieldRules(t.name).includes("required");
|
|
2508
2553
|
}),
|
|
2509
|
-
update(
|
|
2554
|
+
update(i) {
|
|
2510
2555
|
if (n && t.name) {
|
|
2511
|
-
n.setFieldValue(t.name,
|
|
2556
|
+
n.setFieldValue(t.name, i);
|
|
2512
2557
|
return;
|
|
2513
2558
|
}
|
|
2514
|
-
r("update:modelValue",
|
|
2559
|
+
r("update:modelValue", i);
|
|
2515
2560
|
}
|
|
2516
2561
|
};
|
|
2517
|
-
return
|
|
2562
|
+
return ce("input", u), s(u), (i, p) => (o(), f(ee(i.as), null, {
|
|
2518
2563
|
default: m(() => [
|
|
2519
|
-
w(
|
|
2564
|
+
w(i.$slots, "default")
|
|
2520
2565
|
]),
|
|
2521
2566
|
_: 3
|
|
2522
2567
|
}));
|
|
2523
2568
|
}
|
|
2524
|
-
}),
|
|
2569
|
+
}), ba = ["for"], ye = /* @__PURE__ */ g({
|
|
2525
2570
|
__name: "HeadlessInputLabel",
|
|
2526
2571
|
setup(t) {
|
|
2527
|
-
const s =
|
|
2528
|
-
return (n, a) => r.value ? (
|
|
2572
|
+
const s = H("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = xe(), r = c(() => !!(s.label || e.default));
|
|
2573
|
+
return (n, a) => r.value ? (o(), b("label", {
|
|
2529
2574
|
key: 0,
|
|
2530
2575
|
for: l(s).id
|
|
2531
2576
|
}, [
|
|
2532
2577
|
w(n.$slots, "default", {}, () => [
|
|
2533
2578
|
L(x(l(s).label), 1)
|
|
2534
2579
|
])
|
|
2535
|
-
], 8,
|
|
2580
|
+
], 8, ba)) : M("", !0);
|
|
2536
2581
|
}
|
|
2537
|
-
}),
|
|
2582
|
+
}), ya = ["id", "name", "checked", "type", "required", "aria-invalid", "aria-describedby"], qt = /* @__PURE__ */ g({
|
|
2538
2583
|
__name: "HeadlessInputInput",
|
|
2539
2584
|
props: {
|
|
2540
2585
|
type: {}
|
|
2541
2586
|
},
|
|
2542
2587
|
setup(t) {
|
|
2543
|
-
const s =
|
|
2588
|
+
const s = te("$inputRef"), e = H("input", "<HeadlessInputInput> must be a child of a <HeadlessInput>"), r = X("form", null), n = c(() => e.name ?? void 0), a = c(() => e.value), u = c(() => {
|
|
2544
2589
|
if (t.type)
|
|
2545
2590
|
return t.type;
|
|
2546
|
-
const
|
|
2547
|
-
return ["text", "email", "number", "tel", "url"].includes(
|
|
2548
|
-
}),
|
|
2549
|
-
if (
|
|
2591
|
+
const y = (n.value && (r == null ? void 0 : r.getFieldType(n.value))) ?? "";
|
|
2592
|
+
return ["text", "email", "number", "tel", "url"].includes(y) ? y : "text";
|
|
2593
|
+
}), i = c(() => {
|
|
2594
|
+
if (u.value === "checkbox")
|
|
2550
2595
|
return !!a.value;
|
|
2551
2596
|
});
|
|
2552
2597
|
function p() {
|
|
2553
|
-
s.value && e.update(
|
|
2598
|
+
s.value && e.update(h());
|
|
2554
2599
|
}
|
|
2555
|
-
function
|
|
2600
|
+
function h() {
|
|
2556
2601
|
if (!s.value)
|
|
2557
2602
|
return null;
|
|
2558
|
-
switch (
|
|
2603
|
+
switch (u.value) {
|
|
2559
2604
|
case "checkbox":
|
|
2560
2605
|
return s.value.checked;
|
|
2561
2606
|
case "date":
|
|
2562
|
-
|
|
2607
|
+
case "time":
|
|
2608
|
+
case "datetime-local":
|
|
2609
|
+
return new Date(Math.round(s.value.valueAsNumber / 6e4) * 6e4 + Ge);
|
|
2610
|
+
case "number":
|
|
2611
|
+
return s.value.valueAsNumber;
|
|
2563
2612
|
default:
|
|
2564
2613
|
return s.value.value;
|
|
2565
2614
|
}
|
|
2566
2615
|
}
|
|
2567
|
-
return
|
|
2568
|
-
var
|
|
2569
|
-
return (
|
|
2570
|
-
}),
|
|
2616
|
+
return ht(e, () => {
|
|
2617
|
+
var y;
|
|
2618
|
+
return (y = s.value) == null ? void 0 : y.focus();
|
|
2619
|
+
}), Y(() => {
|
|
2571
2620
|
if (s.value) {
|
|
2572
|
-
if (
|
|
2573
|
-
|
|
2621
|
+
if (["date", "time", "datetime-local"].includes(u.value) && a.value instanceof Date) {
|
|
2622
|
+
const y = Math.round(a.value.getTime() / 6e4) * 6e4;
|
|
2623
|
+
s.value.valueAsNumber = y - Ge, e.update(new Date(y));
|
|
2574
2624
|
return;
|
|
2575
2625
|
}
|
|
2576
2626
|
s.value.value = a.value ?? null;
|
|
2577
2627
|
}
|
|
2578
|
-
}), (
|
|
2628
|
+
}), (y, _) => (o(), b("input", {
|
|
2579
2629
|
id: l(e).id,
|
|
2580
2630
|
ref: "$inputRef",
|
|
2581
2631
|
name: n.value,
|
|
2582
|
-
checked:
|
|
2632
|
+
checked: i.value,
|
|
2583
2633
|
type: u.value,
|
|
2584
2634
|
required: l(e).required ?? void 0,
|
|
2585
2635
|
"aria-invalid": l(e).errors ? "true" : "false",
|
|
2586
2636
|
"aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
|
|
2587
2637
|
onInput: p
|
|
2588
|
-
}, null, 40,
|
|
2638
|
+
}, null, 40, ya));
|
|
2589
2639
|
}
|
|
2590
|
-
}),
|
|
2640
|
+
}), Pt = /* @__PURE__ */ g({
|
|
2591
2641
|
inheritAttrs: !1,
|
|
2592
2642
|
__name: "HeadlessInputDescription",
|
|
2593
2643
|
setup(t) {
|
|
2594
|
-
const s =
|
|
2644
|
+
const s = H(
|
|
2595
2645
|
"input",
|
|
2596
2646
|
"<HeadlessInputDescription> must be a child of a <HeadlessInput>"
|
|
2597
2647
|
), e = c(() => typeof s.description == "string" ? s.description : ""), r = c(() => !!s.description);
|
|
2598
2648
|
return (n, a) => w(n.$slots, "default", {
|
|
2599
2649
|
id: `${l(s).id}-description`
|
|
2600
2650
|
}, () => [
|
|
2601
|
-
r.value ? (
|
|
2651
|
+
r.value ? (o(), f(R, V({ key: 0 }, n.$attrs, {
|
|
2602
2652
|
id: `${l(s).id}-description`,
|
|
2603
2653
|
text: e.value
|
|
2604
|
-
}), null, 16, ["id", "text"])) :
|
|
2654
|
+
}), null, 16, ["id", "text"])) : M("", !0)
|
|
2605
2655
|
]);
|
|
2606
2656
|
}
|
|
2607
|
-
}),
|
|
2657
|
+
}), _a = ["id"], _e = /* @__PURE__ */ g({
|
|
2608
2658
|
__name: "HeadlessInputError",
|
|
2609
2659
|
setup(t) {
|
|
2610
|
-
const s =
|
|
2611
|
-
return (r, n) => e.value ? (
|
|
2660
|
+
const s = H("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = c(() => s.errors ? S(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
|
|
2661
|
+
return (r, n) => e.value ? (o(), b("p", {
|
|
2612
2662
|
key: 0,
|
|
2613
2663
|
id: `${l(s).id}-error`
|
|
2614
|
-
}, x(e.value), 9,
|
|
2664
|
+
}, x(e.value), 9, _a)) : M("", !0);
|
|
2615
2665
|
}
|
|
2616
|
-
}),
|
|
2666
|
+
}), wa = {
|
|
2617
2667
|
key: 0,
|
|
2618
2668
|
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
|
|
2619
|
-
},
|
|
2669
|
+
}, $a = /* @__PURE__ */ g({
|
|
2620
2670
|
inheritAttrs: !1,
|
|
2621
2671
|
__name: "Input",
|
|
2622
2672
|
props: {
|
|
@@ -2625,65 +2675,71 @@ const ra = /* @__PURE__ */ h({
|
|
|
2625
2675
|
description: {},
|
|
2626
2676
|
modelValue: {},
|
|
2627
2677
|
inputClass: {},
|
|
2628
|
-
wrapperClass: {}
|
|
2678
|
+
wrapperClass: {},
|
|
2679
|
+
descriptionClass: {},
|
|
2680
|
+
errorClass: {}
|
|
2629
2681
|
},
|
|
2630
2682
|
emits: ["update:modelValue"],
|
|
2631
2683
|
setup(t) {
|
|
2632
|
-
const s =
|
|
2633
|
-
var
|
|
2634
|
-
return
|
|
2684
|
+
const s = O(t, ["label", "inputClass", "wrapperClass", "descriptionClass", "errorClass"]), e = te("$inputRef"), [r, n] = Pe(), a = c(() => k("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), u = c(() => k("mt-2 text-sm text-gray-600", t.descriptionClass)), i = c(() => k("mt-2 text-sm text-red-600", t.errorClass)), p = c(() => {
|
|
2685
|
+
var h, y, _;
|
|
2686
|
+
return k(
|
|
2635
2687
|
// eslint-disable-next-line vue/max-len
|
|
2636
2688
|
"block w-full rounded-md border-0 py-1.5 ring-1 ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6",
|
|
2637
2689
|
{
|
|
2638
|
-
"focus:ring-primary-600": !((
|
|
2639
|
-
"text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((
|
|
2640
|
-
"pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (
|
|
2690
|
+
"focus:ring-primary-600": !((h = e.value) != null && h.errors),
|
|
2691
|
+
"text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((y = e.value) != null && y.errors),
|
|
2692
|
+
"pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (_ = e.value) == null ? void 0 : _.errors
|
|
2641
2693
|
},
|
|
2642
2694
|
t.inputClass
|
|
2643
2695
|
);
|
|
2644
2696
|
});
|
|
2645
|
-
return (
|
|
2697
|
+
return (h, y) => (o(), f(Be, V({
|
|
2646
2698
|
ref: "$inputRef",
|
|
2647
|
-
label:
|
|
2699
|
+
label: h.label,
|
|
2648
2700
|
class: l(n)
|
|
2649
2701
|
}, s, {
|
|
2650
|
-
"onUpdate:modelValue":
|
|
2702
|
+
"onUpdate:modelValue": y[0] || (y[0] = (_) => h.$emit("update:modelValue", _))
|
|
2651
2703
|
}), {
|
|
2652
2704
|
default: m(() => {
|
|
2653
|
-
var
|
|
2705
|
+
var _;
|
|
2654
2706
|
return [
|
|
2655
|
-
d(
|
|
2656
|
-
|
|
2657
|
-
class:
|
|
2707
|
+
d(ye, { class: "block text-sm leading-6 font-medium text-gray-900" }),
|
|
2708
|
+
v("div", {
|
|
2709
|
+
class: $(a.value)
|
|
2658
2710
|
}, [
|
|
2659
|
-
d(
|
|
2660
|
-
(
|
|
2711
|
+
d(qt, V(l(r), { class: p.value }), null, 16, ["class"]),
|
|
2712
|
+
(_ = e.value) != null && _.errors ? (o(), b("div", wa, [
|
|
2661
2713
|
d(l(De), { class: "size-5 text-red-500" })
|
|
2662
|
-
])) :
|
|
2714
|
+
])) : M("", !0)
|
|
2663
2715
|
], 2),
|
|
2664
|
-
d(
|
|
2665
|
-
|
|
2716
|
+
d(Pt, {
|
|
2717
|
+
class: $(u.value)
|
|
2718
|
+
}, null, 8, ["class"]),
|
|
2719
|
+
d(_e, {
|
|
2720
|
+
class: $(i.value)
|
|
2721
|
+
}, null, 8, ["class"])
|
|
2666
2722
|
];
|
|
2667
2723
|
}),
|
|
2668
2724
|
_: 1
|
|
2669
2725
|
}, 16, ["label", "class"]));
|
|
2670
2726
|
}
|
|
2671
2727
|
});
|
|
2672
|
-
function
|
|
2728
|
+
function Yl(t, s = {}) {
|
|
2673
2729
|
return {
|
|
2674
2730
|
default: t,
|
|
2675
2731
|
type: "boolean",
|
|
2676
2732
|
rules: s.rules
|
|
2677
2733
|
};
|
|
2678
2734
|
}
|
|
2679
|
-
function
|
|
2735
|
+
function eo(t, s = {}) {
|
|
2680
2736
|
return {
|
|
2681
2737
|
default: t,
|
|
2682
2738
|
type: "date",
|
|
2683
2739
|
rules: s.rules
|
|
2684
2740
|
};
|
|
2685
2741
|
}
|
|
2686
|
-
function
|
|
2742
|
+
function to(t, s, e = {}) {
|
|
2687
2743
|
return {
|
|
2688
2744
|
default: s,
|
|
2689
2745
|
type: "enum",
|
|
@@ -2691,21 +2747,21 @@ function ql(t, s, e = {}) {
|
|
|
2691
2747
|
values: t
|
|
2692
2748
|
};
|
|
2693
2749
|
}
|
|
2694
|
-
function
|
|
2750
|
+
function so(t) {
|
|
2695
2751
|
return {
|
|
2696
2752
|
default: t,
|
|
2697
2753
|
type: "boolean",
|
|
2698
2754
|
rules: "required"
|
|
2699
2755
|
};
|
|
2700
2756
|
}
|
|
2701
|
-
function
|
|
2757
|
+
function ro(t) {
|
|
2702
2758
|
return {
|
|
2703
2759
|
default: t,
|
|
2704
2760
|
type: "date",
|
|
2705
2761
|
rules: "required"
|
|
2706
2762
|
};
|
|
2707
2763
|
}
|
|
2708
|
-
function
|
|
2764
|
+
function no(t, s) {
|
|
2709
2765
|
return {
|
|
2710
2766
|
default: s,
|
|
2711
2767
|
type: "enum",
|
|
@@ -2713,55 +2769,55 @@ function Dl(t, s) {
|
|
|
2713
2769
|
values: t
|
|
2714
2770
|
};
|
|
2715
2771
|
}
|
|
2716
|
-
function
|
|
2772
|
+
function ao(t) {
|
|
2717
2773
|
return {
|
|
2718
2774
|
default: t,
|
|
2719
2775
|
type: "number",
|
|
2720
2776
|
rules: "required"
|
|
2721
2777
|
};
|
|
2722
2778
|
}
|
|
2723
|
-
function
|
|
2779
|
+
function lo(t) {
|
|
2724
2780
|
return {
|
|
2725
2781
|
default: t,
|
|
2726
2782
|
type: "object",
|
|
2727
2783
|
rules: "required"
|
|
2728
2784
|
};
|
|
2729
2785
|
}
|
|
2730
|
-
function
|
|
2786
|
+
function xa(t) {
|
|
2731
2787
|
return {
|
|
2732
2788
|
default: t,
|
|
2733
2789
|
type: "string",
|
|
2734
2790
|
rules: "required"
|
|
2735
2791
|
};
|
|
2736
2792
|
}
|
|
2737
|
-
function
|
|
2793
|
+
function oo(t, s = {}) {
|
|
2738
2794
|
return {
|
|
2739
2795
|
default: t,
|
|
2740
2796
|
type: "number",
|
|
2741
2797
|
rules: s.rules
|
|
2742
2798
|
};
|
|
2743
2799
|
}
|
|
2744
|
-
function
|
|
2800
|
+
function io(t, s = {}) {
|
|
2745
2801
|
return {
|
|
2746
2802
|
default: t,
|
|
2747
2803
|
type: "object",
|
|
2748
2804
|
rules: s.rules
|
|
2749
2805
|
};
|
|
2750
2806
|
}
|
|
2751
|
-
function
|
|
2807
|
+
function uo(t, s = {}) {
|
|
2752
2808
|
return {
|
|
2753
2809
|
default: t,
|
|
2754
2810
|
type: "string",
|
|
2755
2811
|
rules: s.rules
|
|
2756
2812
|
};
|
|
2757
2813
|
}
|
|
2758
|
-
function
|
|
2759
|
-
const s =
|
|
2760
|
-
draft:
|
|
2761
|
-
}), e = c(() => t.title ?? t.message), r = c(() => t.title ? t.message : null), n = c(() => t.acceptText ??
|
|
2814
|
+
function Ca(t) {
|
|
2815
|
+
const s = gt({
|
|
2816
|
+
draft: xa(t.defaultValue ?? "")
|
|
2817
|
+
}), e = c(() => t.title ?? t.message), r = c(() => t.title ? t.message : null), n = c(() => t.acceptText ?? S("ui.accept", "Ok")), a = c(() => t.cancelText ?? S("ui.cancel", "Cancel"));
|
|
2762
2818
|
return { form: s, renderedTitle: e, renderedMessage: r, renderedAcceptText: n, renderedCancelText: a };
|
|
2763
2819
|
}
|
|
2764
|
-
const
|
|
2820
|
+
const ka = { class: "mt-4 flex flex-row-reverse gap-2" }, Sa = /* @__PURE__ */ g({
|
|
2765
2821
|
__name: "PromptModal",
|
|
2766
2822
|
props: {
|
|
2767
2823
|
title: {},
|
|
@@ -2776,29 +2832,29 @@ const da = { class: "mt-4 flex flex-row-reverse gap-2" }, pa = /* @__PURE__ */ h
|
|
|
2776
2832
|
},
|
|
2777
2833
|
emits: ["close"],
|
|
2778
2834
|
setup(t, { expose: s }) {
|
|
2779
|
-
const e =
|
|
2780
|
-
return s(), (p,
|
|
2835
|
+
const e = O(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: u, renderedCancelText: i } = Ca(e);
|
|
2836
|
+
return s(), (p, h) => (o(), f(ne, {
|
|
2781
2837
|
title: l(n),
|
|
2782
2838
|
persistent: ""
|
|
2783
2839
|
}, {
|
|
2784
|
-
default: m(({ close:
|
|
2785
|
-
d(
|
|
2840
|
+
default: m(({ close: y }) => [
|
|
2841
|
+
d(zt, {
|
|
2786
2842
|
form: l(r),
|
|
2787
|
-
onSubmit: (
|
|
2843
|
+
onSubmit: (_) => y(l(r).draft)
|
|
2788
2844
|
}, {
|
|
2789
2845
|
default: m(() => [
|
|
2790
|
-
l(a) ? (
|
|
2846
|
+
l(a) ? (o(), f(R, {
|
|
2791
2847
|
key: 0,
|
|
2792
2848
|
text: l(a)
|
|
2793
|
-
}, null, 8, ["text"])) :
|
|
2794
|
-
d(
|
|
2849
|
+
}, null, 8, ["text"])) : M("", !0),
|
|
2850
|
+
d($a, {
|
|
2795
2851
|
name: "draft",
|
|
2796
2852
|
class: "mt-2",
|
|
2797
2853
|
placeholder: p.placeholder,
|
|
2798
2854
|
label: p.label
|
|
2799
2855
|
}, null, 8, ["placeholder", "label"]),
|
|
2800
|
-
|
|
2801
|
-
d(
|
|
2856
|
+
v("div", ka, [
|
|
2857
|
+
d(z, {
|
|
2802
2858
|
variant: p.acceptVariant,
|
|
2803
2859
|
submit: ""
|
|
2804
2860
|
}, {
|
|
@@ -2807,12 +2863,12 @@ const da = { class: "mt-4 flex flex-row-reverse gap-2" }, pa = /* @__PURE__ */ h
|
|
|
2807
2863
|
]),
|
|
2808
2864
|
_: 1
|
|
2809
2865
|
}, 8, ["variant"]),
|
|
2810
|
-
d(
|
|
2866
|
+
d(z, {
|
|
2811
2867
|
variant: p.cancelVariant,
|
|
2812
|
-
onClick: (
|
|
2868
|
+
onClick: (_) => y()
|
|
2813
2869
|
}, {
|
|
2814
2870
|
default: m(() => [
|
|
2815
|
-
L(x(l(
|
|
2871
|
+
L(x(l(i)), 1)
|
|
2816
2872
|
]),
|
|
2817
2873
|
_: 2
|
|
2818
2874
|
}, 1032, ["variant", "onClick"])
|
|
@@ -2824,65 +2880,65 @@ const da = { class: "mt-4 flex flex-row-reverse gap-2" }, pa = /* @__PURE__ */ h
|
|
|
2824
2880
|
_: 1
|
|
2825
2881
|
}, 8, ["title"]));
|
|
2826
2882
|
}
|
|
2827
|
-
}),
|
|
2883
|
+
}), Ta = {
|
|
2828
2884
|
viewBox: "0 0 24 24",
|
|
2829
2885
|
width: "1.2em",
|
|
2830
2886
|
height: "1.2em"
|
|
2831
2887
|
};
|
|
2832
|
-
function
|
|
2833
|
-
return
|
|
2834
|
-
|
|
2888
|
+
function Ma(t, s) {
|
|
2889
|
+
return o(), b("svg", Ta, s[0] || (s[0] = [
|
|
2890
|
+
v("path", {
|
|
2835
2891
|
fill: "currentColor",
|
|
2836
2892
|
d: "M12 21q-1.625 0-3.012-.8T6.8 18H4v-2h2.1q-.075-.5-.088-1T6 14H4v-2h2q0-.5.012-1t.088-1H4V8h2.8q.35-.575.788-1.075T8.6 6.05L7 4.4L8.4 3l2.15 2.15q.7-.225 1.425-.225t1.425.225L15.6 3L17 4.4l-1.65 1.65q.575.375 1.038.862T17.2 8H20v2h-2.1q.075.5.088 1T18 12h2v2h-2q0 .5-.013 1t-.087 1H20v2h-2.8q-.8 1.4-2.187 2.2T12 21m-2-5h4v-2h-4zm0-4h4v-2h-4z"
|
|
2837
2893
|
}, null, -1)
|
|
2838
2894
|
]));
|
|
2839
2895
|
}
|
|
2840
|
-
const
|
|
2896
|
+
const Ea = I({ name: "material-symbols-bug-report", render: Ma }), Va = {
|
|
2841
2897
|
viewBox: "0 0 24 24",
|
|
2842
2898
|
width: "1.2em",
|
|
2843
2899
|
height: "1.2em"
|
|
2844
2900
|
};
|
|
2845
|
-
function
|
|
2846
|
-
return
|
|
2847
|
-
|
|
2901
|
+
function Ha(t, s) {
|
|
2902
|
+
return o(), b("svg", Va, s[0] || (s[0] = [
|
|
2903
|
+
v("path", {
|
|
2848
2904
|
fill: "currentColor",
|
|
2849
2905
|
d: "M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zm5-7.1l1.9 1.9q.275.275.7.275t.7-.275t.275-.7t-.275-.7l-1.9-1.9l1.9-1.9q.275-.275.275-.7t-.275-.7t-.7-.275t-.7.275L12 11.1l-1.9-1.9q-.275-.275-.7-.275t-.7.275t-.275.7t.275.7l1.9 1.9l-1.9 1.9q-.275.275-.275.7t.275.7t.7.275t.7-.275z"
|
|
2850
2906
|
}, null, -1)
|
|
2851
2907
|
]));
|
|
2852
2908
|
}
|
|
2853
|
-
const
|
|
2909
|
+
const La = I({ name: "material-symbols-delete-forever-rounded", render: Ha }), Ia = {
|
|
2854
2910
|
viewBox: "0 0 24 24",
|
|
2855
2911
|
width: "1.2em",
|
|
2856
2912
|
height: "1.2em"
|
|
2857
2913
|
};
|
|
2858
|
-
function
|
|
2859
|
-
return
|
|
2860
|
-
|
|
2914
|
+
function za(t, s) {
|
|
2915
|
+
return o(), b("svg", Ia, s[0] || (s[0] = [
|
|
2916
|
+
v("path", {
|
|
2861
2917
|
fill: "currentColor",
|
|
2862
2918
|
d: "M11.25 13.5q.95 0 1.6-.65t.65-1.6t-.65-1.6t-1.6-.65t-1.6.65t-.65 1.6t.65 1.6t1.6.65m4.825 4l-2.625-2.625q-.5.325-1.062.475t-1.138.15q-1.775 0-3.012-1.237T7 11.25t1.238-3.012T11.25 7t3.013 1.238T15.5 11.25q0 .575-.162 1.138t-.488 1.062l2.65 2.65zM5 21q-.825 0-1.412-.587T3 19v-4h2v4h4v2zm10 0v-2h4v-4h2v4q0 .825-.587 1.413T19 21zM3 9V5q0-.825.588-1.412T5 3h4v2H5v4zm16 0V5h-4V3h4q.825 0 1.413.588T21 5v4z"
|
|
2863
2919
|
}, null, -1)
|
|
2864
2920
|
]));
|
|
2865
2921
|
}
|
|
2866
|
-
const
|
|
2922
|
+
const Ra = I({ name: "material-symbols-frame-inspect", render: za }), qa = {
|
|
2867
2923
|
viewBox: "0 0 24 24",
|
|
2868
2924
|
width: "1.2em",
|
|
2869
2925
|
height: "1.2em"
|
|
2870
2926
|
};
|
|
2871
|
-
function
|
|
2872
|
-
return
|
|
2873
|
-
|
|
2927
|
+
function Pa(t, s) {
|
|
2928
|
+
return o(), b("svg", qa, s[0] || (s[0] = [
|
|
2929
|
+
v("path", {
|
|
2874
2930
|
fill: "currentColor",
|
|
2875
2931
|
d: "M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V5q0-.425.288-.712T19 4t.713.288T20 5v5q0 .425-.288.713T19 11h-5q-.425 0-.712-.288T13 10t.288-.712T14 9h3.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12t1.75 4.25T12 18q1.7 0 3.113-.862t2.187-2.313q.2-.35.563-.487t.737-.013q.4.125.575.525t-.025.75q-1.025 2-2.925 3.2T12 20"
|
|
2876
2932
|
}, null, -1)
|
|
2877
2933
|
]));
|
|
2878
2934
|
}
|
|
2879
|
-
const
|
|
2935
|
+
const Aa = I({ name: "material-symbols-refresh-rounded", render: Pa }), Da = { class: "grid grow place-items-center" }, Ba = { class: "flex flex-col items-center p-8" }, ja = { class: "mt-0 mb-0 text-center text-4xl font-medium text-red-600" }, Fa = { class: "mt-4 grid grid-cols-1 gap-2 sm:grid-cols-2 [&_button]:justify-start sm:[&_button]:size-32 sm:[&_button]:flex-col sm:[&_button]:justify-center [&_svg]:size-6 sm:[&_svg]:size-8" }, Oa = /* @__PURE__ */ g({
|
|
2880
2936
|
__name: "StartupCrash",
|
|
2881
2937
|
setup(t) {
|
|
2882
2938
|
async function s() {
|
|
2883
2939
|
await P.confirm(
|
|
2884
|
-
|
|
2885
|
-
|
|
2940
|
+
S("startupCrash.purgeConfirmTitle", "Delete everything?"),
|
|
2941
|
+
S(
|
|
2886
2942
|
"startupCrash.purgeConfirmMessage",
|
|
2887
2943
|
`If the problem persists, one drastic solution may be to wipe the storage in this device to start from scratch. However, keep in mind that **all the data that you haven't synchronized will be deleted forever**.
|
|
2888
2944
|
|
|
@@ -2890,60 +2946,60 @@ Do you still want to proceed?`
|
|
|
2890
2946
|
),
|
|
2891
2947
|
{
|
|
2892
2948
|
acceptVariant: "danger",
|
|
2893
|
-
acceptText:
|
|
2949
|
+
acceptText: S("startupCrash.purgeConfirmAccept", "Purge device")
|
|
2894
2950
|
}
|
|
2895
|
-
) && (await
|
|
2951
|
+
) && (await bt.purge(), await q.reload());
|
|
2896
2952
|
}
|
|
2897
2953
|
return (e, r) => {
|
|
2898
|
-
const n =
|
|
2899
|
-
return
|
|
2900
|
-
|
|
2954
|
+
const n = Jt("i-majesticons-exclamation");
|
|
2955
|
+
return o(), b("div", Da, [
|
|
2956
|
+
v("div", Ba, [
|
|
2901
2957
|
d(n, { class: "size-20 text-red-600" }),
|
|
2902
|
-
|
|
2903
|
-
d(
|
|
2958
|
+
v("h1", ja, x(e.$td("startupCrash.title", "Oops, something went wrong!")), 1),
|
|
2959
|
+
d(R, {
|
|
2904
2960
|
text: e.$td(
|
|
2905
2961
|
"startupCrash.message",
|
|
2906
2962
|
"There was a problem starting the application, but here's some things you can do:"
|
|
2907
2963
|
),
|
|
2908
2964
|
class: "mt-4 text-center"
|
|
2909
2965
|
}, null, 8, ["text"]),
|
|
2910
|
-
|
|
2911
|
-
d(
|
|
2966
|
+
v("div", Fa, [
|
|
2967
|
+
d(z, {
|
|
2912
2968
|
variant: "danger",
|
|
2913
2969
|
onClick: r[0] || (r[0] = (a) => e.$app.reload())
|
|
2914
2970
|
}, {
|
|
2915
2971
|
default: m(() => [
|
|
2916
|
-
d(l(
|
|
2972
|
+
d(l(Aa)),
|
|
2917
2973
|
L(" " + x(e.$td("startupCrash.reload", "Try again")), 1)
|
|
2918
2974
|
]),
|
|
2919
2975
|
_: 1
|
|
2920
2976
|
}),
|
|
2921
|
-
d(
|
|
2977
|
+
d(z, {
|
|
2922
2978
|
variant: "danger",
|
|
2923
2979
|
onClick: r[1] || (r[1] = (a) => e.$errors.inspect(e.$errors.startupErrors))
|
|
2924
2980
|
}, {
|
|
2925
2981
|
default: m(() => [
|
|
2926
|
-
d(l(
|
|
2982
|
+
d(l(Ea)),
|
|
2927
2983
|
L(" " + x(e.$td("startupCrash.inspect", "View error details")), 1)
|
|
2928
2984
|
]),
|
|
2929
2985
|
_: 1
|
|
2930
2986
|
}),
|
|
2931
|
-
d(
|
|
2987
|
+
d(z, {
|
|
2932
2988
|
variant: "danger",
|
|
2933
2989
|
onClick: r[2] || (r[2] = (a) => s())
|
|
2934
2990
|
}, {
|
|
2935
2991
|
default: m(() => [
|
|
2936
|
-
d(l(
|
|
2992
|
+
d(l(La)),
|
|
2937
2993
|
L(" " + x(e.$td("startupCrash.purge", "Purge device")), 1)
|
|
2938
2994
|
]),
|
|
2939
2995
|
_: 1
|
|
2940
2996
|
}),
|
|
2941
|
-
d(
|
|
2997
|
+
d(z, {
|
|
2942
2998
|
variant: "danger",
|
|
2943
2999
|
onClick: r[3] || (r[3] = (a) => e.$errors.debug = !e.$errors.debug)
|
|
2944
3000
|
}, {
|
|
2945
3001
|
default: m(() => [
|
|
2946
|
-
d(l(
|
|
3002
|
+
d(l(Ra)),
|
|
2947
3003
|
L(" " + x(e.$td("startupCrash.debug", "Toggle debugging")), 1)
|
|
2948
3004
|
]),
|
|
2949
3005
|
_: 1
|
|
@@ -2953,13 +3009,13 @@ Do you still want to proceed?`
|
|
|
2953
3009
|
]);
|
|
2954
3010
|
};
|
|
2955
3011
|
}
|
|
2956
|
-
}),
|
|
3012
|
+
}), At = /* @__PURE__ */ g({
|
|
2957
3013
|
__name: "HeadlessToastAction",
|
|
2958
3014
|
props: {
|
|
2959
3015
|
action: {}
|
|
2960
3016
|
},
|
|
2961
3017
|
setup(t) {
|
|
2962
|
-
return (s, e) => (
|
|
3018
|
+
return (s, e) => (o(), f(ee(s.action.dismiss ? l(Fs) : "button"), {
|
|
2963
3019
|
type: "button",
|
|
2964
3020
|
onClick: s.action.click
|
|
2965
3021
|
}, {
|
|
@@ -2969,7 +3025,7 @@ Do you still want to proceed?`
|
|
|
2969
3025
|
_: 1
|
|
2970
3026
|
}, 8, ["onClick"]));
|
|
2971
3027
|
}
|
|
2972
|
-
}),
|
|
3028
|
+
}), Ua = { key: 0 }, Na = /* @__PURE__ */ g({
|
|
2973
3029
|
__name: "HeadlessToast",
|
|
2974
3030
|
props: {
|
|
2975
3031
|
message: {},
|
|
@@ -2977,11 +3033,11 @@ Do you still want to proceed?`
|
|
|
2977
3033
|
variant: {}
|
|
2978
3034
|
},
|
|
2979
3035
|
setup(t) {
|
|
2980
|
-
return (s, e) => (
|
|
3036
|
+
return (s, e) => (o(), f(l(Os), null, {
|
|
2981
3037
|
default: m(() => [
|
|
2982
3038
|
w(s.$slots, "default", {}, () => [
|
|
2983
|
-
s.message ? (
|
|
2984
|
-
(
|
|
3039
|
+
s.message ? (o(), b("span", Ua, x(s.message), 1)) : M("", !0),
|
|
3040
|
+
(o(!0), b(A, null, B(s.actions, (r, n) => (o(), f(At, {
|
|
2985
3041
|
key: n,
|
|
2986
3042
|
action: r
|
|
2987
3043
|
}, null, 8, ["action"]))), 128))
|
|
@@ -2990,7 +3046,7 @@ Do you still want to proceed?`
|
|
|
2990
3046
|
_: 3
|
|
2991
3047
|
}));
|
|
2992
3048
|
}
|
|
2993
|
-
}),
|
|
3049
|
+
}), Wa = /* @__PURE__ */ g({
|
|
2994
3050
|
__name: "Toast",
|
|
2995
3051
|
props: {
|
|
2996
3052
|
message: {},
|
|
@@ -2999,14 +3055,15 @@ Do you still want to proceed?`
|
|
|
2999
3055
|
class: {}
|
|
3000
3056
|
},
|
|
3001
3057
|
setup(t, { expose: s }) {
|
|
3002
|
-
const e = c(() =>
|
|
3058
|
+
const e = c(() => ft(
|
|
3003
3059
|
{ baseClasses: t.class, variant: t.variant },
|
|
3004
3060
|
{
|
|
3005
3061
|
baseClasses: "flex items-center gap-2 rounded-md p-2 ring-1 shadow-lg border-gray-200",
|
|
3006
3062
|
variants: {
|
|
3007
3063
|
variant: {
|
|
3008
3064
|
secondary: "bg-gray-900 text-white ring-black",
|
|
3009
|
-
danger: "bg-red-50 text-red-900 ring-red-100"
|
|
3065
|
+
danger: "bg-red-50 text-red-900 ring-red-100",
|
|
3066
|
+
warning: "bg-yellow-50 text-yellow-900 ring-yellow-100"
|
|
3010
3067
|
}
|
|
3011
3068
|
},
|
|
3012
3069
|
defaultVariants: {
|
|
@@ -3014,98 +3071,98 @@ Do you still want to proceed?`
|
|
|
3014
3071
|
}
|
|
3015
3072
|
}
|
|
3016
3073
|
));
|
|
3017
|
-
return s(), (r, n) => (
|
|
3018
|
-
class:
|
|
3074
|
+
return s(), (r, n) => (o(), f(Na, {
|
|
3075
|
+
class: $(e.value)
|
|
3019
3076
|
}, {
|
|
3020
3077
|
default: m(() => [
|
|
3021
|
-
r.message ? (
|
|
3078
|
+
r.message ? (o(), f(R, {
|
|
3022
3079
|
key: 0,
|
|
3023
3080
|
text: r.message,
|
|
3024
3081
|
inline: ""
|
|
3025
|
-
}, null, 8, ["text"])) :
|
|
3026
|
-
(
|
|
3082
|
+
}, null, 8, ["text"])) : M("", !0),
|
|
3083
|
+
(o(!0), b(A, null, B(r.actions, (a, u) => (o(), f(z, {
|
|
3027
3084
|
key: u,
|
|
3028
3085
|
action: a,
|
|
3029
3086
|
variant: r.variant,
|
|
3030
|
-
as:
|
|
3087
|
+
as: At
|
|
3031
3088
|
}, null, 8, ["action", "variant"]))), 128))
|
|
3032
3089
|
]),
|
|
3033
3090
|
_: 1
|
|
3034
3091
|
}, 8, ["class"]));
|
|
3035
3092
|
}
|
|
3036
|
-
}),
|
|
3093
|
+
}), Ka = { $ui: P }, Qa = {
|
|
3037
3094
|
async install(t, s) {
|
|
3038
3095
|
const e = {
|
|
3039
|
-
"alert-modal":
|
|
3040
|
-
"confirm-modal":
|
|
3041
|
-
"error-report-modal":
|
|
3042
|
-
"loading-modal":
|
|
3043
|
-
"prompt-modal":
|
|
3044
|
-
"startup-crash":
|
|
3045
|
-
toast:
|
|
3096
|
+
"alert-modal": Mn,
|
|
3097
|
+
"confirm-modal": Rn,
|
|
3098
|
+
"error-report-modal": ua,
|
|
3099
|
+
"loading-modal": va,
|
|
3100
|
+
"prompt-modal": Sa,
|
|
3101
|
+
"startup-crash": Oa,
|
|
3102
|
+
toast: Wa,
|
|
3046
3103
|
...s.components
|
|
3047
3104
|
};
|
|
3048
3105
|
for (const [r, n] of Object.entries(e))
|
|
3049
3106
|
P.registerComponent(r, n);
|
|
3050
|
-
await
|
|
3107
|
+
await Te(t, Ka);
|
|
3051
3108
|
}
|
|
3052
3109
|
};
|
|
3053
|
-
async function
|
|
3110
|
+
async function Za(t, s = {}) {
|
|
3054
3111
|
var r;
|
|
3055
|
-
const e = [
|
|
3056
|
-
|
|
3112
|
+
const e = [gn, Lr, hn, en, qr, Qa, ...s.plugins ?? []];
|
|
3113
|
+
q.instance = t, await mr(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await F.emit("application-ready");
|
|
3057
3114
|
}
|
|
3058
|
-
async function
|
|
3115
|
+
async function co(t, s = {}) {
|
|
3059
3116
|
var r;
|
|
3060
|
-
const e =
|
|
3061
|
-
J() && (window.$aerogel = e), await
|
|
3117
|
+
const e = Gt(t);
|
|
3118
|
+
J() && (window.$aerogel = e), await Za(e, s), e.mount("#app"), (r = e._container) == null || r.classList.remove("loading"), await F.emit("application-mounted");
|
|
3062
3119
|
}
|
|
3063
|
-
const
|
|
3120
|
+
const Ja = /* @__PURE__ */ g({
|
|
3064
3121
|
__name: "AppToasts",
|
|
3065
3122
|
setup(t) {
|
|
3066
|
-
return (s, e) => (
|
|
3123
|
+
return (s, e) => (o(), f(l(Us), null, {
|
|
3067
3124
|
default: m(() => [
|
|
3068
|
-
(
|
|
3125
|
+
(o(!0), b(A, null, B(s.$ui.toasts, (r) => (o(), f(ee(r.component), V({
|
|
3069
3126
|
id: r.id,
|
|
3070
3127
|
key: r.id
|
|
3071
3128
|
}, { ref_for: !0 }, r.properties), null, 16, ["id"]))), 128)),
|
|
3072
|
-
d(l(
|
|
3129
|
+
d(l(Ns), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
|
|
3073
3130
|
]),
|
|
3074
3131
|
_: 1
|
|
3075
3132
|
}));
|
|
3076
3133
|
}
|
|
3077
|
-
}),
|
|
3134
|
+
}), Ga = /* @__PURE__ */ g({
|
|
3078
3135
|
__name: "AppOverlays",
|
|
3079
3136
|
setup(t) {
|
|
3080
|
-
return (s, e) => (
|
|
3081
|
-
d(l(
|
|
3082
|
-
d(
|
|
3137
|
+
return (s, e) => (o(), b(A, null, [
|
|
3138
|
+
d(l(ws), { nested: "" }),
|
|
3139
|
+
d(Ja)
|
|
3083
3140
|
], 64));
|
|
3084
3141
|
}
|
|
3085
|
-
}),
|
|
3142
|
+
}), Xa = { class: "text-primary-text flex min-h-full flex-col text-base leading-tight font-normal antialiased" }, po = /* @__PURE__ */ g({
|
|
3086
3143
|
__name: "AppLayout",
|
|
3087
3144
|
setup(t) {
|
|
3088
|
-
return (s, e) => (
|
|
3145
|
+
return (s, e) => (o(), b("div", Xa, [
|
|
3089
3146
|
s.$errors.hasStartupErrors ? w(s.$slots, "startup-crash", { key: 0 }, () => [
|
|
3090
|
-
(
|
|
3147
|
+
(o(), f(ee(s.$ui.requireComponent("startup-crash"))))
|
|
3091
3148
|
]) : w(s.$slots, "default", { key: 1 }),
|
|
3092
|
-
d(
|
|
3149
|
+
d(Ga)
|
|
3093
3150
|
]));
|
|
3094
3151
|
}
|
|
3095
|
-
}),
|
|
3152
|
+
}), Ya = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], el = /* @__PURE__ */ g({
|
|
3096
3153
|
__name: "HeadlessInputTextArea",
|
|
3097
3154
|
setup(t) {
|
|
3098
|
-
const s =
|
|
3155
|
+
const s = te("$textAreaRef"), e = H(
|
|
3099
3156
|
"input",
|
|
3100
3157
|
"<HeadlessInputTextArea> must be a child of a <HeadlessInput>"
|
|
3101
3158
|
), r = c(() => e.name ?? void 0), n = c(() => e.value);
|
|
3102
3159
|
function a() {
|
|
3103
3160
|
s.value && e.update(s.value.value);
|
|
3104
3161
|
}
|
|
3105
|
-
return
|
|
3162
|
+
return ht(e, () => {
|
|
3106
3163
|
var u;
|
|
3107
3164
|
return (u = s.value) == null ? void 0 : u.focus();
|
|
3108
|
-
}), (u,
|
|
3165
|
+
}), (u, i) => (o(), b("textarea", {
|
|
3109
3166
|
id: l(e).id,
|
|
3110
3167
|
ref: "$textAreaRef",
|
|
3111
3168
|
name: r.value,
|
|
@@ -3114,22 +3171,51 @@ const qa = /* @__PURE__ */ h({
|
|
|
3114
3171
|
"aria-invalid": l(e).errors ? "true" : "false",
|
|
3115
3172
|
"aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
|
|
3116
3173
|
onInput: a
|
|
3117
|
-
}, null, 40,
|
|
3174
|
+
}, null, 40, Ya));
|
|
3175
|
+
}
|
|
3176
|
+
}), tl = { class: "group" }, sl = /* @__PURE__ */ g({
|
|
3177
|
+
__name: "Details",
|
|
3178
|
+
props: {
|
|
3179
|
+
label: { default: () => {
|
|
3180
|
+
} },
|
|
3181
|
+
contentClass: {},
|
|
3182
|
+
summaryClass: {}
|
|
3183
|
+
},
|
|
3184
|
+
setup(t) {
|
|
3185
|
+
const s = c(() => k("pt-2 pl-4", t.contentClass)), e = c(() => k(
|
|
3186
|
+
"-ml-2 flex w-[max-content] items-center rounded-lg py-2 pr-3 pl-1 max-w-full",
|
|
3187
|
+
"hover:bg-gray-100 focus-visible:outline focus-visible:outline-gray-700",
|
|
3188
|
+
t.summaryClass
|
|
3189
|
+
));
|
|
3190
|
+
return (r, n) => (o(), b("details", tl, [
|
|
3191
|
+
v("summary", {
|
|
3192
|
+
class: $(e.value)
|
|
3193
|
+
}, [
|
|
3194
|
+
d(l(Rt), { class: "size-6 transition-transform group-open:rotate-90" }),
|
|
3195
|
+
w(r.$slots, "label", {}, () => [
|
|
3196
|
+
v("span", null, x(r.label ?? r.$td("ui.details", "Details")), 1)
|
|
3197
|
+
])
|
|
3198
|
+
], 2),
|
|
3199
|
+
v("div", {
|
|
3200
|
+
class: $(s.value)
|
|
3201
|
+
}, [
|
|
3202
|
+
w(r.$slots, "default")
|
|
3203
|
+
], 2)
|
|
3204
|
+
]));
|
|
3118
3205
|
}
|
|
3119
|
-
}),
|
|
3206
|
+
}), mo = /* @__PURE__ */ g({
|
|
3120
3207
|
__name: "AdvancedOptions",
|
|
3121
3208
|
setup(t) {
|
|
3122
|
-
return (s, e) => (
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
]),
|
|
3127
|
-
b("div", Ua, [
|
|
3209
|
+
return (s, e) => (o(), f(sl, {
|
|
3210
|
+
label: s.$td("ui.advancedOptions", "Advanced options")
|
|
3211
|
+
}, {
|
|
3212
|
+
default: m(() => [
|
|
3128
3213
|
w(s.$slots, "default")
|
|
3129
|
-
])
|
|
3130
|
-
|
|
3214
|
+
]),
|
|
3215
|
+
_: 3
|
|
3216
|
+
}, 8, ["label"]));
|
|
3131
3217
|
}
|
|
3132
|
-
}),
|
|
3218
|
+
}), rl = { class: "flex h-6 items-center" }, fo = /* @__PURE__ */ g({
|
|
3133
3219
|
inheritAttrs: !1,
|
|
3134
3220
|
__name: "Checkbox",
|
|
3135
3221
|
props: {
|
|
@@ -3142,53 +3228,197 @@ const qa = /* @__PURE__ */ h({
|
|
|
3142
3228
|
},
|
|
3143
3229
|
emits: ["update:modelValue"],
|
|
3144
3230
|
setup(t) {
|
|
3145
|
-
const s =
|
|
3146
|
-
var p,
|
|
3147
|
-
return
|
|
3231
|
+
const s = O(t, ["inputClass", "labelClass"]), e = te("$inputRef"), [r, n] = Pe(), a = c(() => k("relative flex items-start", n.value)), u = c(() => {
|
|
3232
|
+
var p, h;
|
|
3233
|
+
return k(
|
|
3148
3234
|
"size-4 rounded text-primary-600 not-checked:hover:bg-gray-200 checked:hover:text-primary-500 checked:border-0",
|
|
3149
3235
|
{
|
|
3150
3236
|
"border-gray-300 focus:ring-primary-600": !((p = e.value) != null && p.errors),
|
|
3151
|
-
"border-red-400 border-2 focus:ring-red-600": (
|
|
3237
|
+
"border-red-400 border-2 focus:ring-red-600": (h = e.value) == null ? void 0 : h.errors
|
|
3152
3238
|
},
|
|
3153
3239
|
t.inputClass
|
|
3154
3240
|
);
|
|
3155
|
-
}),
|
|
3156
|
-
return (p,
|
|
3241
|
+
}), i = c(() => k("ml-2 text-sm leading-6", t.labelClass));
|
|
3242
|
+
return (p, h) => (o(), f(Be, V({
|
|
3157
3243
|
ref: "$inputRef",
|
|
3158
3244
|
class: a.value
|
|
3159
3245
|
}, s, {
|
|
3160
|
-
"onUpdate:modelValue":
|
|
3246
|
+
"onUpdate:modelValue": h[0] || (h[0] = (y) => p.$emit("update:modelValue", y))
|
|
3161
3247
|
}), {
|
|
3162
3248
|
default: m(() => [
|
|
3163
|
-
|
|
3164
|
-
d(
|
|
3249
|
+
v("div", rl, [
|
|
3250
|
+
d(qt, V(l(r), {
|
|
3165
3251
|
type: "checkbox",
|
|
3166
3252
|
class: u.value
|
|
3167
3253
|
}), null, 16, ["class"])
|
|
3168
3254
|
]),
|
|
3169
|
-
p.$slots.default ? (
|
|
3255
|
+
p.$slots.default ? (o(), b("div", {
|
|
3170
3256
|
key: 0,
|
|
3171
|
-
class:
|
|
3257
|
+
class: $(i.value)
|
|
3172
3258
|
}, [
|
|
3173
|
-
d(
|
|
3259
|
+
d(ye, { class: "text-gray-900" }, {
|
|
3174
3260
|
default: m(() => [
|
|
3175
3261
|
w(p.$slots, "default")
|
|
3176
3262
|
]),
|
|
3177
3263
|
_: 3
|
|
3178
3264
|
}),
|
|
3179
|
-
d(
|
|
3180
|
-
], 2)) : p.label ? (
|
|
3265
|
+
d(_e, { class: "text-red-600" })
|
|
3266
|
+
], 2)) : p.label ? (o(), b("div", {
|
|
3181
3267
|
key: 1,
|
|
3182
|
-
class:
|
|
3268
|
+
class: $(i.value)
|
|
3183
3269
|
}, [
|
|
3184
|
-
d(
|
|
3185
|
-
d(
|
|
3186
|
-
], 2)) :
|
|
3270
|
+
d(ye, { class: "text-gray-900" }),
|
|
3271
|
+
d(_e, { class: "text-red-600" })
|
|
3272
|
+
], 2)) : M("", !0)
|
|
3187
3273
|
]),
|
|
3188
3274
|
_: 3
|
|
3189
3275
|
}, 16, ["class"]));
|
|
3190
3276
|
}
|
|
3191
|
-
}),
|
|
3277
|
+
}), nl = { class: "relative flex max-w-[calc(100vw-2rem)] cursor-pointer items-center gap-2 truncate rounded-md px-2 py-1 text-sm select-none *:truncate group-data-[highlighted]:bg-gray-100 group-data-[state=checked]:font-semibold group-data-[state=unchecked]:opacity-50" }, al = /* @__PURE__ */ g({
|
|
3278
|
+
__name: "ComboboxOption",
|
|
3279
|
+
props: {
|
|
3280
|
+
textValue: {},
|
|
3281
|
+
value: {},
|
|
3282
|
+
disabled: { type: Boolean },
|
|
3283
|
+
asChild: { type: Boolean },
|
|
3284
|
+
as: {}
|
|
3285
|
+
},
|
|
3286
|
+
setup(t) {
|
|
3287
|
+
const s = H("select", "<ComboboxOption> must be a child of a <Combobox>"), e = c(() => {
|
|
3288
|
+
var n;
|
|
3289
|
+
const r = (n = s.options) == null ? void 0 : n.find((a) => a.value === t.value);
|
|
3290
|
+
return r ? r.label : D(t.value);
|
|
3291
|
+
});
|
|
3292
|
+
return (r, n) => (o(), f(l(Ws), V(r.$props, { class: "group p-1 outline-none" }), {
|
|
3293
|
+
default: m(() => [
|
|
3294
|
+
v("div", nl, x(e.value), 1)
|
|
3295
|
+
]),
|
|
3296
|
+
_: 1
|
|
3297
|
+
}, 16));
|
|
3298
|
+
}
|
|
3299
|
+
}), ll = { class: "relative flex max-w-[calc(100vw-2rem)] items-center gap-2 truncate rounded-md px-2 py-1 text-sm select-none *:truncate" }, ol = /* @__PURE__ */ g({
|
|
3300
|
+
__name: "ComboboxOptions",
|
|
3301
|
+
setup(t) {
|
|
3302
|
+
const s = H("select", "<ComboboxOptions> must be a child of a <Combobox>"), e = k(
|
|
3303
|
+
"max-h-(--reka-combobox-content-available-height) min-w-(--reka-combobox-trigger-width)",
|
|
3304
|
+
"z-50 overflow-auto rounded-lg bg-white text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden"
|
|
3305
|
+
);
|
|
3306
|
+
return (r, n) => (o(), f(l(Ks), null, {
|
|
3307
|
+
default: m(() => [
|
|
3308
|
+
d(l(Qs), {
|
|
3309
|
+
position: "popper",
|
|
3310
|
+
align: l(s).align,
|
|
3311
|
+
side: l(s).side,
|
|
3312
|
+
"side-offset": 4,
|
|
3313
|
+
class: $(l(e))
|
|
3314
|
+
}, {
|
|
3315
|
+
default: m(() => [
|
|
3316
|
+
d(l(Zs), null, {
|
|
3317
|
+
default: m(() => [
|
|
3318
|
+
d(l(Js), { class: "group p-1 outline-none" }, {
|
|
3319
|
+
default: m(() => [
|
|
3320
|
+
v("div", ll, x(r.$td("ui.comboboxEmpty", "No options found")), 1)
|
|
3321
|
+
]),
|
|
3322
|
+
_: 1
|
|
3323
|
+
}),
|
|
3324
|
+
d(l(Gs), null, {
|
|
3325
|
+
default: m(() => [
|
|
3326
|
+
(o(!0), b(A, null, B(l(s).options ?? [], (a) => (o(), f(al, {
|
|
3327
|
+
key: a.key,
|
|
3328
|
+
value: a.value
|
|
3329
|
+
}, null, 8, ["value"]))), 128))
|
|
3330
|
+
]),
|
|
3331
|
+
_: 1
|
|
3332
|
+
})
|
|
3333
|
+
]),
|
|
3334
|
+
_: 1
|
|
3335
|
+
})
|
|
3336
|
+
]),
|
|
3337
|
+
_: 1
|
|
3338
|
+
}, 8, ["align", "side", "class"])
|
|
3339
|
+
]),
|
|
3340
|
+
_: 1
|
|
3341
|
+
}));
|
|
3342
|
+
}
|
|
3343
|
+
}), il = /* @__PURE__ */ g({
|
|
3344
|
+
__name: "ComboboxTrigger",
|
|
3345
|
+
setup(t) {
|
|
3346
|
+
const s = H("select", "<ComboboxTrigger> must be a child of a <Combobox>"), e = c(() => k(
|
|
3347
|
+
// eslint-disable-next-line vue/max-len
|
|
3348
|
+
"block w-full rounded-md border-0 py-1.5 ring-1 ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6",
|
|
3349
|
+
{
|
|
3350
|
+
"mt-1": s.label,
|
|
3351
|
+
"focus:ring-primary-600": !s.errors,
|
|
3352
|
+
"text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !s.errors,
|
|
3353
|
+
"pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": s.errors
|
|
3354
|
+
}
|
|
3355
|
+
));
|
|
3356
|
+
return (r, n) => (o(), f(l(Xs), null, {
|
|
3357
|
+
default: m(() => [
|
|
3358
|
+
d(l(Ys), {
|
|
3359
|
+
id: l(s).id,
|
|
3360
|
+
placeholder: l(s).placeholder,
|
|
3361
|
+
class: $(e.value)
|
|
3362
|
+
}, null, 8, ["id", "placeholder", "class"])
|
|
3363
|
+
]),
|
|
3364
|
+
_: 1
|
|
3365
|
+
}));
|
|
3366
|
+
}
|
|
3367
|
+
}), ul = /* @__PURE__ */ g({
|
|
3368
|
+
__name: "ComboboxLabel",
|
|
3369
|
+
props: {
|
|
3370
|
+
asChild: { type: Boolean },
|
|
3371
|
+
as: {}
|
|
3372
|
+
},
|
|
3373
|
+
setup(t) {
|
|
3374
|
+
const s = H("select", "<ComboboxLabel> must be a child of a <Combobox>"), e = xe(), r = c(() => !!(s.label || e.default));
|
|
3375
|
+
return (n, a) => r.value ? (o(), f(l(dt), V({
|
|
3376
|
+
key: 0,
|
|
3377
|
+
for: l(s).id
|
|
3378
|
+
}, n.$props, { class: "block text-sm leading-6 font-medium text-gray-900" }), {
|
|
3379
|
+
default: m(() => [
|
|
3380
|
+
w(n.$slots, "default", {}, () => [
|
|
3381
|
+
L(x(l(s).label), 1)
|
|
3382
|
+
])
|
|
3383
|
+
]),
|
|
3384
|
+
_: 3
|
|
3385
|
+
}, 16, ["for"])) : M("", !0);
|
|
3386
|
+
}
|
|
3387
|
+
}), ho = /* @__PURE__ */ g({
|
|
3388
|
+
__name: "Combobox",
|
|
3389
|
+
props: {
|
|
3390
|
+
as: { default: "div" },
|
|
3391
|
+
options: {},
|
|
3392
|
+
placeholder: {},
|
|
3393
|
+
renderOption: { type: Function },
|
|
3394
|
+
compareOptions: { type: Function, default: (t, s) => t === s },
|
|
3395
|
+
labelClass: {},
|
|
3396
|
+
optionsClass: {},
|
|
3397
|
+
align: {},
|
|
3398
|
+
side: {},
|
|
3399
|
+
name: {},
|
|
3400
|
+
label: {},
|
|
3401
|
+
description: {},
|
|
3402
|
+
modelValue: {}
|
|
3403
|
+
},
|
|
3404
|
+
emits: ["update:modelValue"],
|
|
3405
|
+
setup(t, { expose: s, emit: e }) {
|
|
3406
|
+
const r = e, n = O(t, ["as", "compareOptions"]), { expose: a, acceptableValue: u, update: i } = Ct({ as: t.as, compareOptions: t.compareOptions, ...n }, r);
|
|
3407
|
+
return s(a), (p, h) => (o(), f(l(er), {
|
|
3408
|
+
"open-on-focus": "",
|
|
3409
|
+
"model-value": l(u),
|
|
3410
|
+
by: p.compareOptions,
|
|
3411
|
+
"onUpdate:modelValue": h[0] || (h[0] = (y) => l(i)(y))
|
|
3412
|
+
}, {
|
|
3413
|
+
default: m(() => [
|
|
3414
|
+
d(ul),
|
|
3415
|
+
d(il),
|
|
3416
|
+
d(ol)
|
|
3417
|
+
]),
|
|
3418
|
+
_: 1
|
|
3419
|
+
}, 8, ["model-value", "by"]));
|
|
3420
|
+
}
|
|
3421
|
+
}), cl = /* @__PURE__ */ g({
|
|
3192
3422
|
__name: "DropdownMenuOption",
|
|
3193
3423
|
props: {
|
|
3194
3424
|
class: {},
|
|
@@ -3197,11 +3427,11 @@ const qa = /* @__PURE__ */ h({
|
|
|
3197
3427
|
},
|
|
3198
3428
|
emits: ["select"],
|
|
3199
3429
|
setup(t) {
|
|
3200
|
-
const s =
|
|
3430
|
+
const s = O(t, ["class"]), e = c(() => k(
|
|
3201
3431
|
"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-gray-900 data-[highlighted]:bg-gray-100",
|
|
3202
3432
|
t.class
|
|
3203
3433
|
));
|
|
3204
|
-
return (r, n) => (
|
|
3434
|
+
return (r, n) => (o(), f(l(tr), V({ class: e.value }, s, {
|
|
3205
3435
|
onSelect: n[0] || (n[0] = (a) => r.$emit("select"))
|
|
3206
3436
|
}), {
|
|
3207
3437
|
default: m(() => [
|
|
@@ -3210,24 +3440,24 @@ const qa = /* @__PURE__ */ h({
|
|
|
3210
3440
|
_: 3
|
|
3211
3441
|
}, 16, ["class"]));
|
|
3212
3442
|
}
|
|
3213
|
-
}),
|
|
3443
|
+
}), dl = /* @__PURE__ */ g({
|
|
3214
3444
|
__name: "DropdownMenuOptions",
|
|
3215
3445
|
setup(t) {
|
|
3216
|
-
const s =
|
|
3446
|
+
const s = H(
|
|
3217
3447
|
"dropdown-menu",
|
|
3218
3448
|
"<DropdownMenuOptions> must be a child of a <DropdownMenu>"
|
|
3219
3449
|
);
|
|
3220
|
-
return (e, r) => (
|
|
3450
|
+
return (e, r) => (o(), f(l(sr), {
|
|
3221
3451
|
class: "gap-y-0.5 rounded-lg bg-white p-1.5 shadow-lg ring-1 ring-black/5",
|
|
3222
3452
|
align: l(s).align,
|
|
3223
3453
|
side: l(s).side
|
|
3224
3454
|
}, {
|
|
3225
3455
|
default: m(() => [
|
|
3226
3456
|
w(e.$slots, "default", {}, () => [
|
|
3227
|
-
(
|
|
3457
|
+
(o(!0), b(A, null, B(l(s).options, (n, a) => (o(), f(cl, V(
|
|
3228
3458
|
{
|
|
3229
3459
|
key: a,
|
|
3230
|
-
as: n.route || n.href ?
|
|
3460
|
+
as: n.route || n.href ? xt : void 0,
|
|
3231
3461
|
class: n.class
|
|
3232
3462
|
},
|
|
3233
3463
|
{ ref_for: !0 },
|
|
@@ -3239,8 +3469,8 @@ const qa = /* @__PURE__ */ h({
|
|
|
3239
3469
|
} : {},
|
|
3240
3470
|
{
|
|
3241
3471
|
onSelect: (u) => {
|
|
3242
|
-
var
|
|
3243
|
-
return (
|
|
3472
|
+
var i;
|
|
3473
|
+
return (i = n.click) == null ? void 0 : i.call(n);
|
|
3244
3474
|
}
|
|
3245
3475
|
}
|
|
3246
3476
|
), {
|
|
@@ -3254,7 +3484,7 @@ const qa = /* @__PURE__ */ h({
|
|
|
3254
3484
|
_: 3
|
|
3255
3485
|
}, 8, ["align", "side"]));
|
|
3256
3486
|
}
|
|
3257
|
-
}),
|
|
3487
|
+
}), go = /* @__PURE__ */ g({
|
|
3258
3488
|
__name: "DropdownMenu",
|
|
3259
3489
|
props: {
|
|
3260
3490
|
align: {},
|
|
@@ -3270,18 +3500,18 @@ const qa = /* @__PURE__ */ h({
|
|
|
3270
3500
|
return (r = t.options) == null ? void 0 : r.filter(Boolean);
|
|
3271
3501
|
})
|
|
3272
3502
|
};
|
|
3273
|
-
return
|
|
3503
|
+
return ce("dropdown-menu", e), s(e), (r, n) => (o(), f(l(rr), null, {
|
|
3274
3504
|
default: m(() => [
|
|
3275
|
-
d(l(
|
|
3505
|
+
d(l(nr), null, {
|
|
3276
3506
|
default: m(() => [
|
|
3277
3507
|
w(r.$slots, "default")
|
|
3278
3508
|
]),
|
|
3279
3509
|
_: 3
|
|
3280
3510
|
}),
|
|
3281
|
-
d(l(
|
|
3511
|
+
d(l(ar), null, {
|
|
3282
3512
|
default: m(() => [
|
|
3283
3513
|
w(r.$slots, "options", {}, () => [
|
|
3284
|
-
d(
|
|
3514
|
+
d(dl)
|
|
3285
3515
|
])
|
|
3286
3516
|
]),
|
|
3287
3517
|
_: 3
|
|
@@ -3290,7 +3520,7 @@ const qa = /* @__PURE__ */ h({
|
|
|
3290
3520
|
_: 3
|
|
3291
3521
|
}));
|
|
3292
3522
|
}
|
|
3293
|
-
}),
|
|
3523
|
+
}), pl = ["aria-hidden"], ml = ["tabindex", "aria-label", "type"], vo = /* @__PURE__ */ g({
|
|
3294
3524
|
__name: "EditableContent",
|
|
3295
3525
|
props: {
|
|
3296
3526
|
type: { default: "text" },
|
|
@@ -3303,106 +3533,106 @@ const qa = /* @__PURE__ */ h({
|
|
|
3303
3533
|
},
|
|
3304
3534
|
emits: ["update", "save"],
|
|
3305
3535
|
setup(t, { emit: s }) {
|
|
3306
|
-
const e = s, r =
|
|
3307
|
-
function
|
|
3536
|
+
const e = s, r = te("$inputRef"), n = W(null), a = W(t.text), u = c(() => k("inline whitespace-pre", t.contentClass)), i = c(() => k("invisible whitespace-pre", t.contentClass)), p = c(() => k("absolute inset-0 h-full w-full resize-none border-0 bg-transparent p-0 focus:ring-0", t.contentClass));
|
|
3537
|
+
function h() {
|
|
3308
3538
|
n.value = t.text;
|
|
3309
3539
|
}
|
|
3310
|
-
function
|
|
3540
|
+
function y() {
|
|
3311
3541
|
n.value && (t.type !== "number" && a.value.trim().length === 0 && (a.value = n.value, e("update", a.value)), n.value = null, e("save"));
|
|
3312
3542
|
}
|
|
3313
|
-
return
|
|
3314
|
-
class:
|
|
3543
|
+
return Y(() => a.value = t.text), (_, E) => (o(), b("div", {
|
|
3544
|
+
class: $(["relative", { "pointer-events-none!": _.disabled && !n.value }])
|
|
3315
3545
|
}, [
|
|
3316
|
-
n.value ? (
|
|
3546
|
+
n.value ? (o(), b("span", {
|
|
3317
3547
|
key: 1,
|
|
3318
|
-
class:
|
|
3319
|
-
}, x(a.value), 3)) : (
|
|
3548
|
+
class: $(i.value)
|
|
3549
|
+
}, x(a.value), 3)) : (o(), b("div", {
|
|
3320
3550
|
key: 0,
|
|
3321
|
-
class:
|
|
3551
|
+
class: $(u.value)
|
|
3322
3552
|
}, [
|
|
3323
|
-
w(
|
|
3553
|
+
w(_.$slots, "default")
|
|
3324
3554
|
], 2)),
|
|
3325
|
-
|
|
3555
|
+
_.type === "number" ? (o(), b("span", {
|
|
3326
3556
|
key: 2,
|
|
3327
|
-
class:
|
|
3328
|
-
}, null, 2)) :
|
|
3329
|
-
|
|
3557
|
+
class: $(["inline-block transition-[width]", n.value ? "w-5" : "w-0"])
|
|
3558
|
+
}, null, 2)) : M("", !0),
|
|
3559
|
+
v("form", {
|
|
3330
3560
|
class: "w-full",
|
|
3331
|
-
"aria-hidden":
|
|
3332
|
-
onSubmit:
|
|
3333
|
-
var
|
|
3334
|
-
return (
|
|
3561
|
+
"aria-hidden": _.formAriaHidden,
|
|
3562
|
+
onSubmit: E[4] || (E[4] = nt((U) => {
|
|
3563
|
+
var Q;
|
|
3564
|
+
return (Q = r.value) == null ? void 0 : Q.blur();
|
|
3335
3565
|
}, ["prevent"]))
|
|
3336
3566
|
}, [
|
|
3337
|
-
|
|
3567
|
+
at(v("input", {
|
|
3338
3568
|
ref: "$inputRef",
|
|
3339
|
-
"onUpdate:modelValue":
|
|
3340
|
-
tabindex:
|
|
3341
|
-
"aria-label":
|
|
3342
|
-
type:
|
|
3343
|
-
class:
|
|
3569
|
+
"onUpdate:modelValue": E[0] || (E[0] = (U) => a.value = U),
|
|
3570
|
+
tabindex: _.tabindex ?? void 0,
|
|
3571
|
+
"aria-label": _.ariaLabel ?? void 0,
|
|
3572
|
+
type: _.type,
|
|
3573
|
+
class: $([
|
|
3344
3574
|
p.value,
|
|
3345
|
-
{ "opacity-0": !n.value, "appearance-textfield": !n.value &&
|
|
3575
|
+
{ "opacity-0": !n.value, "appearance-textfield": !n.value && _.type === "number" }
|
|
3346
3576
|
]),
|
|
3347
|
-
onKeyup:
|
|
3348
|
-
onFocus:
|
|
3349
|
-
onBlur:
|
|
3350
|
-
}, null, 42,
|
|
3351
|
-
[
|
|
3577
|
+
onKeyup: E[1] || (E[1] = (U) => _.$emit("update", a.value)),
|
|
3578
|
+
onFocus: E[2] || (E[2] = (U) => h()),
|
|
3579
|
+
onBlur: E[3] || (E[3] = (U) => y())
|
|
3580
|
+
}, null, 42, ml), [
|
|
3581
|
+
[Xt, a.value]
|
|
3352
3582
|
])
|
|
3353
|
-
], 40,
|
|
3583
|
+
], 40, pl)
|
|
3354
3584
|
], 2));
|
|
3355
3585
|
}
|
|
3356
|
-
}),
|
|
3586
|
+
}), fl = {
|
|
3357
3587
|
viewBox: "0 0 512 512",
|
|
3358
3588
|
width: "1.2em",
|
|
3359
3589
|
height: "1.2em"
|
|
3360
3590
|
};
|
|
3361
|
-
function
|
|
3362
|
-
return
|
|
3363
|
-
|
|
3591
|
+
function hl(t, s) {
|
|
3592
|
+
return o(), b("svg", fl, s[0] || (s[0] = [
|
|
3593
|
+
v("path", {
|
|
3364
3594
|
fill: "currentColor",
|
|
3365
3595
|
d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17m-198.6-1.83a20 20 0 1 1 20-20a20 20 0 0 1-20 20m21.72-201.15l-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7Z"
|
|
3366
3596
|
}, null, -1)
|
|
3367
3597
|
]));
|
|
3368
3598
|
}
|
|
3369
|
-
const
|
|
3599
|
+
const gl = I({ name: "ion-warning", render: hl }), vl = {
|
|
3370
3600
|
viewBox: "0 0 20 20",
|
|
3371
3601
|
width: "1.2em",
|
|
3372
3602
|
height: "1.2em"
|
|
3373
3603
|
};
|
|
3374
|
-
function
|
|
3375
|
-
return
|
|
3376
|
-
|
|
3604
|
+
function bl(t, s) {
|
|
3605
|
+
return o(), b("svg", vl, s[0] || (s[0] = [
|
|
3606
|
+
v("path", {
|
|
3377
3607
|
fill: "currentColor",
|
|
3378
3608
|
d: "M.2 10a11 11 0 0 1 19.6 0A11 11 0 0 1 .2 10m9.8 4a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0-2a2 2 0 1 1 0-4a2 2 0 0 1 0 4"
|
|
3379
3609
|
}, null, -1)
|
|
3380
3610
|
]));
|
|
3381
3611
|
}
|
|
3382
|
-
const
|
|
3612
|
+
const yl = I({ name: "zondicons-view-show", render: bl }), _l = { class: "font-medium" }, wl = ["datetime"], $l = /* @__PURE__ */ g({
|
|
3383
3613
|
__name: "ErrorLogsModal",
|
|
3384
3614
|
setup(t) {
|
|
3385
|
-
return (s, e) => (
|
|
3615
|
+
return (s, e) => (o(), f(ne, {
|
|
3386
3616
|
title: s.$td("errors.report", "Errors ({count})", { count: s.$errors.logs.length })
|
|
3387
3617
|
}, {
|
|
3388
3618
|
default: m(() => [
|
|
3389
|
-
|
|
3390
|
-
(
|
|
3619
|
+
v("ol", null, [
|
|
3620
|
+
(o(!0), b(A, null, B(s.$errors.logs, (r, n) => (o(), b("li", {
|
|
3391
3621
|
key: n,
|
|
3392
3622
|
class: "mb-2 flex max-w-prose min-w-56 justify-between py-2 last:mb-0"
|
|
3393
3623
|
}, [
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3624
|
+
v("div", null, [
|
|
3625
|
+
v("h3", _l, x(r.report.title), 1),
|
|
3626
|
+
v("time", {
|
|
3397
3627
|
datetime: r.date.toISOString(),
|
|
3398
3628
|
class: "text-xs text-gray-700"
|
|
3399
|
-
}, x(r.date.toLocaleTimeString()), 9,
|
|
3400
|
-
d(
|
|
3629
|
+
}, x(r.date.toLocaleTimeString()), 9, wl),
|
|
3630
|
+
d(R, {
|
|
3401
3631
|
class: "text-sm text-gray-500",
|
|
3402
|
-
text: r.report.description ?? l(
|
|
3632
|
+
text: r.report.description ?? l(It)(r.report)
|
|
3403
3633
|
}, null, 8, ["text"])
|
|
3404
3634
|
]),
|
|
3405
|
-
d(
|
|
3635
|
+
d(z, {
|
|
3406
3636
|
size: "icon",
|
|
3407
3637
|
variant: "ghost",
|
|
3408
3638
|
"aria-label": s.$td("errors.viewDetails", "View details"),
|
|
@@ -3414,7 +3644,7 @@ const el = E({ name: "zondicons-view-show", render: Ya }), tl = { class: "font-m
|
|
|
3414
3644
|
)
|
|
3415
3645
|
}, {
|
|
3416
3646
|
default: m(() => [
|
|
3417
|
-
d(l(
|
|
3647
|
+
d(l(yl), {
|
|
3418
3648
|
class: "size-4",
|
|
3419
3649
|
"aria-hidden": "true"
|
|
3420
3650
|
})
|
|
@@ -3427,36 +3657,36 @@ const el = E({ name: "zondicons-view-show", render: Ya }), tl = { class: "font-m
|
|
|
3427
3657
|
_: 1
|
|
3428
3658
|
}, 8, ["title"]));
|
|
3429
3659
|
}
|
|
3430
|
-
}),
|
|
3660
|
+
}), bo = /* @__PURE__ */ g({
|
|
3431
3661
|
__name: "ErrorLogs",
|
|
3432
3662
|
setup(t) {
|
|
3433
|
-
return (s, e) => s.$errors.logs.length > 0 ? (
|
|
3663
|
+
return (s, e) => s.$errors.logs.length > 0 ? (o(), f(z, {
|
|
3434
3664
|
key: 0,
|
|
3435
3665
|
size: "icon",
|
|
3436
3666
|
variant: "ghost",
|
|
3437
3667
|
title: s.$td("errors.viewLogs", "View error logs"),
|
|
3438
3668
|
"aria-label": s.$td("errors.viewLogs", "View error logs"),
|
|
3439
|
-
onClick: e[0] || (e[0] = (r) => s.$ui.modal(
|
|
3669
|
+
onClick: e[0] || (e[0] = (r) => s.$ui.modal($l))
|
|
3440
3670
|
}, {
|
|
3441
3671
|
default: m(() => [
|
|
3442
|
-
d(l(
|
|
3672
|
+
d(l(gl), { class: "size-6 text-red-500" })
|
|
3443
3673
|
]),
|
|
3444
3674
|
_: 1
|
|
3445
|
-
}, 8, ["title", "aria-label"])) :
|
|
3675
|
+
}, 8, ["title", "aria-label"])) : M("", !0);
|
|
3446
3676
|
}
|
|
3447
|
-
}),
|
|
3677
|
+
}), yo = /* @__PURE__ */ g({
|
|
3448
3678
|
__name: "ErrorMessage",
|
|
3449
3679
|
props: {
|
|
3450
3680
|
error: {}
|
|
3451
3681
|
},
|
|
3452
3682
|
setup(t) {
|
|
3453
|
-
const s = c(() =>
|
|
3454
|
-
return (e, r) => (
|
|
3683
|
+
const s = c(() => It(t.error));
|
|
3684
|
+
return (e, r) => (o(), f(R, {
|
|
3455
3685
|
text: s.value,
|
|
3456
3686
|
inline: ""
|
|
3457
3687
|
}, null, 8, ["text"]));
|
|
3458
3688
|
}
|
|
3459
|
-
}),
|
|
3689
|
+
}), _o = /* @__PURE__ */ g({
|
|
3460
3690
|
__name: "Link",
|
|
3461
3691
|
props: {
|
|
3462
3692
|
class: {},
|
|
@@ -3471,30 +3701,31 @@ const el = E({ name: "zondicons-view-show", render: Ya }), tl = { class: "font-m
|
|
|
3471
3701
|
as: {}
|
|
3472
3702
|
},
|
|
3473
3703
|
setup(t) {
|
|
3474
|
-
return (s, e) => (
|
|
3704
|
+
return (s, e) => (o(), f(z, V({ variant: "link" }, s.$props), {
|
|
3475
3705
|
default: m(() => [
|
|
3476
3706
|
w(s.$slots, "default")
|
|
3477
3707
|
]),
|
|
3478
3708
|
_: 3
|
|
3479
3709
|
}, 16));
|
|
3480
3710
|
}
|
|
3481
|
-
}),
|
|
3711
|
+
}), wo = /* @__PURE__ */ g({
|
|
3482
3712
|
__name: "SettingsModal",
|
|
3483
3713
|
setup(t) {
|
|
3484
|
-
const s = c(() =>
|
|
3485
|
-
return (e, r) => (
|
|
3486
|
-
title: e.$td("settings.title", "Settings")
|
|
3714
|
+
const s = c(() => us(q.settings, "priority", "desc"));
|
|
3715
|
+
return (e, r) => (o(), f(ne, {
|
|
3716
|
+
title: e.$td("settings.title", "Settings"),
|
|
3717
|
+
"fullscreen-on-mobile": e.$app.settingsFullscreenOnMobile
|
|
3487
3718
|
}, {
|
|
3488
3719
|
default: m(() => [
|
|
3489
|
-
(
|
|
3720
|
+
(o(!0), b(A, null, B(s.value, (n, a) => (o(), f(ee(n.component), { key: a }))), 128))
|
|
3490
3721
|
]),
|
|
3491
3722
|
_: 1
|
|
3492
|
-
}, 8, ["title"]));
|
|
3723
|
+
}, 8, ["title", "fullscreen-on-mobile"]));
|
|
3493
3724
|
}
|
|
3494
|
-
}),
|
|
3725
|
+
}), xl = {
|
|
3495
3726
|
key: 0,
|
|
3496
3727
|
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
|
|
3497
|
-
},
|
|
3728
|
+
}, $o = /* @__PURE__ */ g({
|
|
3498
3729
|
inheritAttrs: !1,
|
|
3499
3730
|
__name: "TextArea",
|
|
3500
3731
|
props: {
|
|
@@ -3507,70 +3738,70 @@ const el = E({ name: "zondicons-view-show", render: Ya }), tl = { class: "font-m
|
|
|
3507
3738
|
},
|
|
3508
3739
|
emits: ["update:modelValue"],
|
|
3509
3740
|
setup(t) {
|
|
3510
|
-
const s =
|
|
3511
|
-
var
|
|
3512
|
-
return
|
|
3741
|
+
const s = O(t, ["label", "inputClass", "wrapperClass"]), e = te("$inputRef"), [r, n] = Pe(), a = c(() => k("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), u = c(() => {
|
|
3742
|
+
var i, p, h;
|
|
3743
|
+
return k(
|
|
3513
3744
|
// eslint-disable-next-line vue/max-len
|
|
3514
3745
|
"block w-full rounded-md border-0 py-1.5 ring-1 ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6",
|
|
3515
3746
|
{
|
|
3516
|
-
"focus:ring-primary-600": !((
|
|
3747
|
+
"focus:ring-primary-600": !((i = e.value) != null && i.errors),
|
|
3517
3748
|
"text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((p = e.value) != null && p.errors),
|
|
3518
|
-
"pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (
|
|
3749
|
+
"pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (h = e.value) == null ? void 0 : h.errors
|
|
3519
3750
|
},
|
|
3520
3751
|
t.inputClass
|
|
3521
3752
|
);
|
|
3522
3753
|
});
|
|
3523
|
-
return (
|
|
3754
|
+
return (i, p) => (o(), f(Be, V({
|
|
3524
3755
|
ref: "$inputRef",
|
|
3525
|
-
label:
|
|
3756
|
+
label: i.label,
|
|
3526
3757
|
class: l(n)
|
|
3527
3758
|
}, s, {
|
|
3528
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
3759
|
+
"onUpdate:modelValue": p[0] || (p[0] = (h) => i.$emit("update:modelValue", h))
|
|
3529
3760
|
}), {
|
|
3530
3761
|
default: m(() => {
|
|
3531
|
-
var
|
|
3762
|
+
var h;
|
|
3532
3763
|
return [
|
|
3533
|
-
d(
|
|
3534
|
-
|
|
3535
|
-
class:
|
|
3764
|
+
d(ye, { class: "block text-sm leading-6 font-medium text-gray-900" }),
|
|
3765
|
+
v("div", {
|
|
3766
|
+
class: $(a.value)
|
|
3536
3767
|
}, [
|
|
3537
|
-
d(
|
|
3538
|
-
(
|
|
3768
|
+
d(el, V(l(r), { class: u.value }), null, 16, ["class"]),
|
|
3769
|
+
(h = e.value) != null && h.errors ? (o(), b("div", xl, [
|
|
3539
3770
|
d(l(De), { class: "size-5 text-red-500" })
|
|
3540
|
-
])) :
|
|
3771
|
+
])) : M("", !0)
|
|
3541
3772
|
], 2),
|
|
3542
|
-
d(
|
|
3543
|
-
d(
|
|
3773
|
+
d(Pt, { class: "mt-2 text-sm text-gray-600" }),
|
|
3774
|
+
d(_e, { class: "mt-2 text-sm text-red-600" })
|
|
3544
3775
|
];
|
|
3545
3776
|
}),
|
|
3546
3777
|
_: 1
|
|
3547
3778
|
}, 16, ["label", "class"]));
|
|
3548
3779
|
}
|
|
3549
3780
|
});
|
|
3550
|
-
class
|
|
3781
|
+
class xo {
|
|
3551
3782
|
constructor() {
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
this.status = this.getInitialStatus(), this._listeners = new
|
|
3783
|
+
C(this, "status");
|
|
3784
|
+
C(this, "_listeners");
|
|
3785
|
+
C(this, "_progress");
|
|
3786
|
+
C(this, "_cancelled");
|
|
3787
|
+
C(this, "_started");
|
|
3788
|
+
C(this, "_completed");
|
|
3789
|
+
this.status = this.getInitialStatus(), this._listeners = new cs(), this._started = new Z(), this._completed = new Z();
|
|
3559
3790
|
}
|
|
3560
3791
|
async start() {
|
|
3561
3792
|
this.beforeStart(), this._started.resolve();
|
|
3562
3793
|
try {
|
|
3563
3794
|
await this.updateProgress(), await this.run(), await this.updateProgress(), this._completed.resolve();
|
|
3564
3795
|
} catch (s) {
|
|
3565
|
-
if (s instanceof
|
|
3796
|
+
if (s instanceof tt)
|
|
3566
3797
|
return;
|
|
3567
|
-
throw
|
|
3798
|
+
throw se(ds(s), (e) => {
|
|
3568
3799
|
this._completed.reject(e);
|
|
3569
3800
|
});
|
|
3570
3801
|
}
|
|
3571
3802
|
}
|
|
3572
3803
|
async cancel() {
|
|
3573
|
-
this._cancelled = new
|
|
3804
|
+
this._cancelled = new Z(), await this._cancelled;
|
|
3574
3805
|
}
|
|
3575
3806
|
serialize() {
|
|
3576
3807
|
return this.serializeStatus(this.status);
|
|
@@ -3605,10 +3836,10 @@ class si {
|
|
|
3605
3836
|
}
|
|
3606
3837
|
assertNotCancelled() {
|
|
3607
3838
|
if (this._cancelled)
|
|
3608
|
-
throw this._cancelled.resolve(), new
|
|
3839
|
+
throw this._cancelled.resolve(), new tt();
|
|
3609
3840
|
}
|
|
3610
3841
|
calculateCurrentProgress(s) {
|
|
3611
|
-
return s ?? (s = this.status), s.completed ? 1 : s.children ?
|
|
3842
|
+
return s ?? (s = this.status), s.completed ? 1 : s.children ? ps(
|
|
3612
3843
|
s.children.reduce((e, r) => e + this.calculateCurrentProgress(r), 0) / s.children.length,
|
|
3613
3844
|
2
|
|
3614
3845
|
) : 0;
|
|
@@ -3622,148 +3853,164 @@ class si {
|
|
|
3622
3853
|
return { ...s };
|
|
3623
3854
|
}
|
|
3624
3855
|
}
|
|
3625
|
-
async function
|
|
3856
|
+
async function Co(t) {
|
|
3626
3857
|
await t.start();
|
|
3627
3858
|
}
|
|
3628
3859
|
export {
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3860
|
+
mo as AdvancedOptions,
|
|
3861
|
+
Mn as AlertModal,
|
|
3862
|
+
q as App,
|
|
3863
|
+
po as AppLayout,
|
|
3864
|
+
Ga as AppOverlays,
|
|
3865
|
+
pr as AppService,
|
|
3866
|
+
Ja as AppToasts,
|
|
3867
|
+
z as Button,
|
|
3868
|
+
Jl as Cache,
|
|
3869
|
+
Ir as CacheService,
|
|
3870
|
+
fo as Checkbox,
|
|
3871
|
+
ho as Combobox,
|
|
3872
|
+
ul as ComboboxLabel,
|
|
3873
|
+
al as ComboboxOption,
|
|
3874
|
+
ol as ComboboxOptions,
|
|
3875
|
+
il as ComboboxTrigger,
|
|
3876
|
+
Rn as ConfirmModal,
|
|
3877
|
+
sl as Details,
|
|
3878
|
+
go as DropdownMenu,
|
|
3879
|
+
cl as DropdownMenuOption,
|
|
3880
|
+
dl as DropdownMenuOptions,
|
|
3881
|
+
vo as EditableContent,
|
|
3882
|
+
bo as ErrorLogs,
|
|
3883
|
+
$l as ErrorLogsModal,
|
|
3884
|
+
yo as ErrorMessage,
|
|
3885
|
+
ua as ErrorReportModal,
|
|
3886
|
+
ea as ErrorReportModalButtons,
|
|
3887
|
+
ta as ErrorReportModalTitle,
|
|
3888
|
+
$t as Errors,
|
|
3889
|
+
Al as EventListenerPriorities,
|
|
3653
3890
|
F as Events,
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3891
|
+
cr as EventsService,
|
|
3892
|
+
zt as Form,
|
|
3893
|
+
$r as FormController,
|
|
3894
|
+
xt as HeadlessButton,
|
|
3895
|
+
Be as HeadlessInput,
|
|
3896
|
+
Pt as HeadlessInputDescription,
|
|
3897
|
+
_e as HeadlessInputError,
|
|
3898
|
+
qt as HeadlessInputInput,
|
|
3899
|
+
ye as HeadlessInputLabel,
|
|
3900
|
+
el as HeadlessInputTextArea,
|
|
3901
|
+
_n as HeadlessModal,
|
|
3902
|
+
wn as HeadlessModalContent,
|
|
3903
|
+
$n as HeadlessModalDescription,
|
|
3904
|
+
xn as HeadlessModalOverlay,
|
|
3905
|
+
Cn as HeadlessModalTitle,
|
|
3906
|
+
Nr as HeadlessSelect,
|
|
3907
|
+
Ye as HeadlessSelectLabel,
|
|
3908
|
+
Tt as HeadlessSelectOption,
|
|
3909
|
+
Mt as HeadlessSelectOptions,
|
|
3910
|
+
St as HeadlessSelectTrigger,
|
|
3911
|
+
kt as HeadlessSelectValue,
|
|
3912
|
+
on as HeadlessSwitch,
|
|
3913
|
+
Na as HeadlessToast,
|
|
3914
|
+
$a as Input,
|
|
3915
|
+
xo as Job,
|
|
3916
|
+
tt as JobCancelledError,
|
|
3917
|
+
Ge as LOCAL_TIMEZONE_OFFSET,
|
|
3918
|
+
G as Lang,
|
|
3919
|
+
be as Layouts,
|
|
3920
|
+
_o as Link,
|
|
3921
|
+
va as LoadingModal,
|
|
3922
|
+
Er as MINUTE_MILLISECONDS,
|
|
3923
|
+
yt as MOBILE_BREAKPOINT,
|
|
3924
|
+
R as Markdown,
|
|
3925
|
+
ne as Modal,
|
|
3926
|
+
To as ModalComponent,
|
|
3927
|
+
Mo as ModalsPortal,
|
|
3928
|
+
ha as ProgressBar,
|
|
3929
|
+
Sa as PromptModal,
|
|
3930
|
+
Zr as Select,
|
|
3931
|
+
Et as SelectLabel,
|
|
3932
|
+
et as SelectOption,
|
|
3933
|
+
Vt as SelectOptions,
|
|
3934
|
+
Ht as SelectTrigger,
|
|
3935
|
+
Se as Service,
|
|
3936
|
+
Le as ServiceBootError,
|
|
3937
|
+
an as Setting,
|
|
3938
|
+
wo as SettingsModal,
|
|
3939
|
+
Oa as StartupCrash,
|
|
3940
|
+
bt as Storage,
|
|
3941
|
+
un as Switch,
|
|
3942
|
+
$o as TextArea,
|
|
3943
|
+
Wa as Toast,
|
|
3703
3944
|
P as UI,
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3945
|
+
Ar as UIService,
|
|
3946
|
+
Ul as __valueType,
|
|
3947
|
+
Hr as aerogelDirectives,
|
|
3948
|
+
lr as appNamespace,
|
|
3949
|
+
Yl as booleanInput,
|
|
3950
|
+
Te as bootServices,
|
|
3951
|
+
co as bootstrap,
|
|
3952
|
+
Za as bootstrapApplication,
|
|
3953
|
+
k as classes,
|
|
3954
|
+
Eo as closeModal,
|
|
3955
|
+
Kl as computedAsync,
|
|
3956
|
+
Ql as computedDebounce,
|
|
3957
|
+
Vo as createModal,
|
|
3958
|
+
eo as dateInput,
|
|
3959
|
+
jl as defineDirective,
|
|
3960
|
+
Ol as defineFormValidationRule,
|
|
3961
|
+
Bl as definePlugin,
|
|
3962
|
+
ke as defineServiceState,
|
|
3963
|
+
ur as defineServiceStore,
|
|
3964
|
+
Dl as defineSettings,
|
|
3965
|
+
Co as dispatch,
|
|
3966
|
+
to as enumInput,
|
|
3967
|
+
_t as getCurrentLayout,
|
|
3968
|
+
It as getErrorMessage,
|
|
3969
|
+
Tr as getMarkdownRouter,
|
|
3970
|
+
ir as getPiniaStore,
|
|
3971
|
+
Ur as hasSelectOptionLabel,
|
|
3972
|
+
Ho as injectModal,
|
|
3973
|
+
gr as injectOrFail,
|
|
3974
|
+
hr as injectReactive,
|
|
3975
|
+
H as injectReactiveOrFail,
|
|
3976
|
+
mr as installPlugins,
|
|
3977
|
+
Lo as modals,
|
|
3978
|
+
oo as numberInput,
|
|
3979
|
+
io as objectInput,
|
|
3980
|
+
Nl as onCleanMounted,
|
|
3981
|
+
ht as onFormFocus,
|
|
3982
|
+
Wl as persistent,
|
|
3983
|
+
xr as reactiveSet,
|
|
3984
|
+
Xl as registerErrorHandler,
|
|
3985
|
+
Mr as renderMarkdown,
|
|
3986
|
+
mt as renderVNode,
|
|
3987
|
+
Gl as replaceExisting,
|
|
3988
|
+
so as requiredBooleanInput,
|
|
3989
|
+
ro as requiredDateInput,
|
|
3990
|
+
no as requiredEnumInput,
|
|
3991
|
+
ao as requiredNumberInput,
|
|
3992
|
+
lo as requiredObjectInput,
|
|
3993
|
+
xa as requiredStringInput,
|
|
3994
|
+
or as resetPiniaStore,
|
|
3995
|
+
vt as safeHtml,
|
|
3996
|
+
Zl as setMarkdownRouter,
|
|
3997
|
+
Io as showModal,
|
|
3998
|
+
uo as stringInput,
|
|
3999
|
+
wt as translate,
|
|
4000
|
+
S as translateWithDefault,
|
|
4001
|
+
Tn as useAlertModal,
|
|
4002
|
+
En as useConfirmModal,
|
|
4003
|
+
sa as useErrorReportModal,
|
|
4004
|
+
Fl as useEvent,
|
|
4005
|
+
gt as useForm,
|
|
3760
4006
|
Pe as useInputAttrs,
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
4007
|
+
ga as useLoadingModal,
|
|
4008
|
+
Ae as useModal,
|
|
4009
|
+
Ca as usePromptModal,
|
|
4010
|
+
Ct as useSelect,
|
|
4011
|
+
wr as validate,
|
|
4012
|
+
_r as validateType,
|
|
4013
|
+
ge as validators,
|
|
4014
|
+
ft as variantClasses
|
|
3768
4015
|
};
|
|
3769
4016
|
//# sourceMappingURL=aerogel-core.js.map
|