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