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