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