@aerogel/core 0.0.0-next.d824b40e5d06757cd9f47c9f771d916185df4f05 → 0.0.0-next.f0368a3107664018eb88652e719d2cb7d24b82e7

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