@stonecrop/aform 0.4.5 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/aform.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as M, mergeModels as G, useModel as H, openBlock as g, createElementBlock as b, createElementVNode as d, toDisplayString as D, withDirectives as E, vModelCheckbox as Ve, vShow as R, resolveComponent as Pe, createBlock as te, withCtx as Oe, useTemplateRef as _e, vModelText as F, getCurrentScope as Ae, onScopeDispose as De, unref as C, toRef as Fe, readonly as Ee, customRef as He, ref as y, watch as P, computed as T, reactive as Re, normalizeClass as J, withKeys as O, Fragment as U, renderList as N, withModifiers as Me, onMounted as ne, onBeforeUnmount as Be, getCurrentInstance as qe, nextTick as We, resolveDynamicComponent as Ue, mergeProps as Ne, createTextVNode as Ie, createCommentVNode as oe, renderSlot as Ye, createVNode as je } from "vue";
2
- import './assets/index.css';const Ge = { class: "aform_form-element" }, Ke = ["for"], ze = { class: "aform_checkbox-container aform_input-field" }, Xe = ["id", "readonly", "required"], Je = ["innerHTML"], Qe = /* @__PURE__ */ M({
1
+ import { defineComponent as C, mergeModels as G, useModel as W, createElementBlock as w, openBlock as g, createElementVNode as d, withDirectives as M, toDisplayString as A, vModelCheckbox as Oe, vShow as U, resolveComponent as Fe, createBlock as oe, withCtx as Re, useTemplateRef as Me, vModelText as B, watch as O, getCurrentScope as Ae, onScopeDispose as Ie, toRef as He, readonly as Ce, ref as k, customRef as Be, computed as T, toValue as D, unref as $, shallowRef as le, reactive as qe, normalizeClass as Q, withKeys as R, Fragment as j, renderList as K, withModifiers as Te, onMounted as se, onBeforeUnmount as We, watchEffect as Ue, getCurrentInstance as Ne, nextTick as Ye, resolveDynamicComponent as je, mergeProps as Ke, renderSlot as ze, createTextVNode as Se, createCommentVNode as ae, createVNode as Ge } from "vue";
2
+ import './assets/index.css';const Xe = { class: "aform_form-element" }, Je = ["for"], Qe = { class: "aform_checkbox-container aform_input-field" }, Ze = ["id", "readonly", "required"], et = ["innerHTML"], tt = /* @__PURE__ */ C({
3
3
  __name: "ACheckbox",
4
4
  props: /* @__PURE__ */ G({
5
5
  schema: {},
@@ -15,49 +15,49 @@ import './assets/index.css';const Ge = { class: "aform_form-element" }, Ke = ["f
15
15
  }),
16
16
  emits: ["update:modelValue"],
17
17
  setup(e) {
18
- const t = H(e, "modelValue");
19
- return (n, o) => (g(), b("div", Ge, [
18
+ const t = W(e, "modelValue");
19
+ return (n, o) => (g(), w("div", Xe, [
20
20
  d("label", {
21
21
  class: "aform_field-label",
22
22
  for: n.uuid
23
- }, D(n.label), 9, Ke),
24
- d("span", ze, [
25
- E(d("input", {
26
- "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
23
+ }, A(n.label), 9, Je),
24
+ d("span", Qe, [
25
+ M(d("input", {
26
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
27
27
  type: "checkbox",
28
28
  id: n.uuid,
29
29
  class: "aform_checkbox",
30
30
  readonly: n.readonly,
31
31
  required: n.required
32
- }, null, 8, Xe), [
33
- [Ve, t.value]
32
+ }, null, 8, Ze), [
33
+ [Oe, t.value]
34
34
  ])
35
35
  ]),
36
- E(d("p", {
36
+ M(d("p", {
37
37
  class: "aform_error",
38
38
  innerHTML: n.validation.errorMessage
39
- }, null, 8, Je), [
40
- [R, n.validation.errorMessage]
39
+ }, null, 8, et), [
40
+ [U, n.validation.errorMessage]
41
41
  ])
42
42
  ]));
43
43
  }
44
- }), S = (e, t) => {
44
+ }), L = (e, t) => {
45
45
  const n = e.__vccOpts || e;
46
- for (const [o, l] of t)
47
- n[o] = l;
46
+ for (const [o, s] of t)
47
+ n[o] = s;
48
48
  return n;
49
- }, Ze = /* @__PURE__ */ S(Qe, [["__scopeId", "data-v-9f382ad4"]]), et = /* @__PURE__ */ M({
49
+ }, nt = /* @__PURE__ */ L(tt, [["__scopeId", "data-v-9f382ad4"]]), ot = /* @__PURE__ */ C({
50
50
  __name: "AComboBox",
51
51
  props: ["event", "cellData", "tableID"],
52
52
  setup(e) {
53
53
  return (t, n) => {
54
- const o = Pe("ATableModal");
55
- return g(), te(o, {
54
+ const o = Fe("ATableModal");
55
+ return g(), oe(o, {
56
56
  event: e.event,
57
57
  cellData: e.cellData,
58
58
  class: "amodal"
59
59
  }, {
60
- default: Oe(() => n[0] || (n[0] = [
60
+ default: Re(() => n[0] || (n[0] = [
61
61
  d("div", null, [
62
62
  d("input", { type: "text" }),
63
63
  d("input", { type: "text" }),
@@ -68,7 +68,7 @@ import './assets/index.css';const Ge = { class: "aform_form-element" }, Ke = ["f
68
68
  }, 8, ["event", "cellData"]);
69
69
  };
70
70
  }
71
- }), tt = ["id", "disabled", "required"], nt = ["for"], ot = ["innerHTML"], lt = /* @__PURE__ */ M({
71
+ }), lt = ["id", "disabled", "required"], st = ["for"], at = ["innerHTML"], rt = /* @__PURE__ */ C({
72
72
  __name: "ADate",
73
73
  props: /* @__PURE__ */ G({
74
74
  schema: {},
@@ -86,277 +86,324 @@ import './assets/index.css';const Ge = { class: "aform_form-element" }, Ke = ["f
86
86
  }),
87
87
  emits: ["update:modelValue"],
88
88
  setup(e) {
89
- const t = H(e, "modelValue", {
89
+ const t = W(e, "modelValue", {
90
90
  // format the date to be compatible with the native input datepicker
91
- set: (l) => new Date(l).toISOString().split("T")[0]
92
- }), n = _e("date"), o = () => {
91
+ set: (s) => new Date(s).toISOString().split("T")[0]
92
+ }), n = Me("date"), o = () => {
93
93
  n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
94
94
  };
95
- return (l, a) => (g(), b("div", null, [
96
- E(d("input", {
97
- "onUpdate:modelValue": a[0] || (a[0] = (s) => t.value = s),
95
+ return (s, r) => (g(), w("div", null, [
96
+ M(d("input", {
97
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => t.value = a),
98
98
  ref: "date",
99
99
  type: "date",
100
- id: l.uuid,
101
- disabled: l.readonly,
102
- required: l.required,
100
+ id: s.uuid,
101
+ disabled: s.readonly,
102
+ required: s.required,
103
103
  onClick: o
104
- }, null, 8, tt), [
105
- [F, t.value]
104
+ }, null, 8, lt), [
105
+ [B, t.value]
106
106
  ]),
107
- d("label", { for: l.uuid }, D(l.label), 9, nt),
108
- E(d("p", {
109
- innerHTML: l.validation.errorMessage
110
- }, null, 8, ot), [
111
- [R, l.validation.errorMessage]
107
+ d("label", { for: s.uuid }, A(s.label), 9, st),
108
+ M(d("p", {
109
+ innerHTML: s.validation.errorMessage
110
+ }, null, 8, at), [
111
+ [U, s.validation.errorMessage]
112
112
  ])
113
113
  ]));
114
114
  }
115
- }), st = /* @__PURE__ */ S(lt, [["__scopeId", "data-v-280b3d1a"]]);
116
- function le(e) {
117
- return Ae() ? (De(e), !0) : !1;
115
+ }), it = /* @__PURE__ */ L(rt, [["__scopeId", "data-v-280b3d1a"]]);
116
+ function re(e) {
117
+ return Ae() ? (Ie(e), !0) : !1;
118
118
  }
119
- function de() {
120
- const e = /* @__PURE__ */ new Set(), t = (l) => {
121
- e.delete(l);
119
+ function pe() {
120
+ const e = /* @__PURE__ */ new Set(), t = (r) => {
121
+ e.delete(r);
122
122
  };
123
123
  return {
124
- on: (l) => {
125
- e.add(l);
126
- const a = () => t(l);
127
- return le(a), {
124
+ on: (r) => {
125
+ e.add(r);
126
+ const a = () => t(r);
127
+ return re(a), {
128
128
  off: a
129
129
  };
130
130
  },
131
131
  off: t,
132
- trigger: (...l) => Promise.all(Array.from(e).map((a) => a(...l)))
132
+ trigger: (...r) => Promise.all(Array.from(e).map((a) => a(...r))),
133
+ clear: () => {
134
+ e.clear();
135
+ }
133
136
  };
134
137
  }
135
- function V(e) {
136
- return typeof e == "function" ? e() : C(e);
137
- }
138
- const se = typeof window < "u" && typeof document < "u";
138
+ const ie = typeof window < "u" && typeof document < "u";
139
139
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
140
- const at = Object.prototype.toString, rt = (e) => at.call(e) === "[object Object]", W = () => {
141
- }, it = (e, t) => Object.prototype.hasOwnProperty.call(e, t), ee = /* @__PURE__ */ ut();
142
- function ut() {
140
+ const ut = Object.prototype.toString, ct = (e) => ut.call(e) === "[object Object]", F = () => {
141
+ }, dt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), ne = /* @__PURE__ */ ft();
142
+ function ft() {
143
143
  var e, t;
144
- return se && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
144
+ return ie && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
145
+ }
146
+ function Z(e) {
147
+ return Array.isArray(e) ? e : [e];
145
148
  }
146
- function ct(...e) {
149
+ function mt(...e) {
147
150
  if (e.length !== 1)
148
- return Fe(...e);
151
+ return He(...e);
149
152
  const t = e[0];
150
- return typeof t == "function" ? Ee(He(() => ({ get: t, set: W }))) : y(t);
153
+ return typeof t == "function" ? Ce(Be(() => ({ get: t, set: F }))) : k(t);
154
+ }
155
+ function pt(e, t, n) {
156
+ return O(
157
+ e,
158
+ t,
159
+ {
160
+ ...n,
161
+ immediate: !0
162
+ }
163
+ );
151
164
  }
152
- const dt = se ? window.document : void 0, ft = {
165
+ const vt = ie ? window.document : void 0, ht = {
153
166
  multiple: !0,
154
167
  accept: "*",
155
168
  reset: !1,
156
169
  directory: !1
157
170
  };
158
- function mt(e = {}) {
171
+ function gt(e) {
172
+ if (!e)
173
+ return null;
174
+ if (e instanceof FileList)
175
+ return e;
176
+ const t = new DataTransfer();
177
+ for (const n of e)
178
+ t.items.add(n);
179
+ return t.files;
180
+ }
181
+ function yt(e = {}) {
159
182
  const {
160
- document: t = dt
161
- } = e, n = y(null), { on: o, trigger: l } = de(), { on: a, trigger: s } = de();
162
- let r;
163
- t && (r = t.createElement("input"), r.type = "file", r.onchange = (c) => {
164
- const m = c.target;
165
- n.value = m.files, l(n.value);
166
- }, r.oncancel = () => {
167
- s();
183
+ document: t = vt
184
+ } = e, n = k(gt(e.initialFiles)), { on: o, trigger: s } = pe(), { on: r, trigger: a } = pe();
185
+ let l;
186
+ t && (l = t.createElement("input"), l.type = "file", l.onchange = (c) => {
187
+ const v = c.target;
188
+ n.value = v.files, s(n.value);
189
+ }, l.oncancel = () => {
190
+ a();
168
191
  });
169
- const u = () => {
170
- n.value = null, r && r.value && (r.value = "", l(null));
171
- }, i = (c) => {
172
- if (!r)
192
+ const i = () => {
193
+ n.value = null, l && l.value && (l.value = "", s(null));
194
+ }, u = (c) => {
195
+ if (!l)
173
196
  return;
174
- const m = {
175
- ...ft,
197
+ const v = {
198
+ ...ht,
176
199
  ...e,
177
200
  ...c
178
201
  };
179
- r.multiple = m.multiple, r.accept = m.accept, r.webkitdirectory = m.directory, it(m, "capture") && (r.capture = m.capture), m.reset && u(), r.click();
202
+ l.multiple = v.multiple, l.accept = v.accept, l.webkitdirectory = v.directory, dt(v, "capture") && (l.capture = v.capture), v.reset && i(), l.click();
180
203
  };
181
204
  return {
182
- files: Ee(n),
183
- open: i,
184
- reset: u,
185
- onCancel: a,
205
+ files: Ce(n),
206
+ open: u,
207
+ reset: i,
208
+ onCancel: r,
186
209
  onChange: o
187
210
  };
188
211
  }
189
- const Ce = se ? window : void 0;
190
- function q(e) {
212
+ const $e = ie ? window : void 0;
213
+ function Y(e) {
191
214
  var t;
192
- const n = V(e);
215
+ const n = D(e);
193
216
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
194
217
  }
195
- function X(...e) {
196
- let t, n, o, l;
197
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = Ce) : [t, n, o, l] = e, !t)
198
- return W;
199
- Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
200
- const a = [], s = () => {
201
- a.forEach((c) => c()), a.length = 0;
202
- }, r = (c, m, f, p) => (c.addEventListener(m, f, p), () => c.removeEventListener(m, f, p)), u = P(
203
- () => [q(t), V(l)],
204
- ([c, m]) => {
205
- if (s(), !c)
218
+ function H(...e) {
219
+ const t = [], n = () => {
220
+ t.forEach((l) => l()), t.length = 0;
221
+ }, o = (l, i, u, c) => (l.addEventListener(i, u, c), () => l.removeEventListener(i, u, c)), s = T(() => {
222
+ const l = Z(D(e[0])).filter((i) => i != null);
223
+ return l.every((i) => typeof i != "string") ? l : void 0;
224
+ }), r = pt(
225
+ () => {
226
+ var l, i;
227
+ return [
228
+ (i = (l = s.value) == null ? void 0 : l.map((u) => Y(u))) != null ? i : [$e].filter((u) => u != null),
229
+ Z(D(s.value ? e[1] : e[0])),
230
+ Z($(s.value ? e[2] : e[1])),
231
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
232
+ D(s.value ? e[3] : e[2])
233
+ ];
234
+ },
235
+ ([l, i, u, c]) => {
236
+ if (n(), !(l != null && l.length) || !(i != null && i.length) || !(u != null && u.length))
206
237
  return;
207
- const f = rt(m) ? { ...m } : m;
208
- a.push(
209
- ...n.flatMap((p) => o.map((w) => r(c, p, w, f)))
238
+ const v = ct(c) ? { ...c } : c;
239
+ t.push(
240
+ ...l.flatMap(
241
+ (f) => i.flatMap(
242
+ (p) => u.map((y) => o(f, p, y, v))
243
+ )
244
+ )
210
245
  );
211
246
  },
212
- { immediate: !0, flush: "post" }
213
- ), i = () => {
214
- u(), s();
247
+ { flush: "post" }
248
+ ), a = () => {
249
+ r(), n();
215
250
  };
216
- return le(i), i;
251
+ return re(n), a;
217
252
  }
218
- let fe = !1;
219
- function me(e, t, n = {}) {
220
- const { window: o = Ce, ignore: l = [], capture: a = !0, detectIframe: s = !1 } = n;
253
+ let ve = !1;
254
+ function he(e, t, n = {}) {
255
+ const { window: o = $e, ignore: s = [], capture: r = !0, detectIframe: a = !1, controls: l = !1 } = n;
221
256
  if (!o)
222
- return W;
223
- ee && !fe && (fe = !0, Array.from(o.document.body.children).forEach((v) => v.addEventListener("click", W)), o.document.documentElement.addEventListener("click", W));
224
- let r = !0;
225
- const u = (v) => V(l).some((h) => {
257
+ return l ? { stop: F, cancel: F, trigger: F } : F;
258
+ if (ne && !ve) {
259
+ ve = !0;
260
+ const m = { passive: !0 };
261
+ Array.from(o.document.body.children).forEach((h) => H(h, "click", F, m)), H(o.document.documentElement, "click", F, m);
262
+ }
263
+ let i = !0;
264
+ const u = (m) => D(s).some((h) => {
226
265
  if (typeof h == "string")
227
- return Array.from(o.document.querySelectorAll(h)).some((_) => _ === v.target || v.composedPath().includes(_));
266
+ return Array.from(o.document.querySelectorAll(h)).some((E) => E === m.target || m.composedPath().includes(E));
228
267
  {
229
- const _ = q(h);
230
- return _ && (v.target === _ || v.composedPath().includes(_));
268
+ const E = Y(h);
269
+ return E && (m.target === E || m.composedPath().includes(E));
231
270
  }
232
271
  });
233
- function i(v) {
234
- const h = V(v);
272
+ function c(m) {
273
+ const h = D(m);
235
274
  return h && h.$.subTree.shapeFlag === 16;
236
275
  }
237
- function c(v, h) {
238
- const _ = V(v), B = _.$.subTree && _.$.subTree.children;
239
- return B == null || !Array.isArray(B) ? !1 : B.some((k) => k.el === h.target || h.composedPath().includes(k.el));
276
+ function v(m, h) {
277
+ const E = D(m), b = E.$.subTree && E.$.subTree.children;
278
+ return b == null || !Array.isArray(b) ? !1 : b.some((_) => _.el === h.target || h.composedPath().includes(_.el));
240
279
  }
241
- const m = (v) => {
242
- const h = q(e);
243
- if (v.target != null && !(!(h instanceof Element) && i(e) && c(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
244
- if (v.detail === 0 && (r = !u(v)), !r) {
245
- r = !0;
280
+ const f = (m) => {
281
+ const h = Y(e);
282
+ if (m.target != null && !(!(h instanceof Element) && c(e) && v(e, m)) && !(!h || h === m.target || m.composedPath().includes(h))) {
283
+ if ("detail" in m && m.detail === 0 && (i = !u(m)), !i) {
284
+ i = !0;
246
285
  return;
247
286
  }
248
- t(v);
287
+ t(m);
249
288
  }
250
289
  };
251
- let f = !1;
252
- const p = [
253
- X(o, "click", (v) => {
254
- f || (f = !0, setTimeout(() => {
255
- f = !1;
256
- }, 0), m(v));
257
- }, { passive: !0, capture: a }),
258
- X(o, "pointerdown", (v) => {
259
- const h = q(e);
260
- r = !u(v) && !!(h && !v.composedPath().includes(h));
290
+ let p = !1;
291
+ const y = [
292
+ H(o, "click", (m) => {
293
+ p || (p = !0, setTimeout(() => {
294
+ p = !1;
295
+ }, 0), f(m));
296
+ }, { passive: !0, capture: r }),
297
+ H(o, "pointerdown", (m) => {
298
+ const h = Y(e);
299
+ i = !u(m) && !!(h && !m.composedPath().includes(h));
261
300
  }, { passive: !0 }),
262
- s && X(o, "blur", (v) => {
301
+ a && H(o, "blur", (m) => {
263
302
  setTimeout(() => {
264
303
  var h;
265
- const _ = q(e);
266
- ((h = o.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(_ != null && _.contains(o.document.activeElement)) && t(v);
304
+ const E = Y(e);
305
+ ((h = o.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(E != null && E.contains(o.document.activeElement)) && t(m);
267
306
  }, 0);
268
- })
269
- ].filter(Boolean);
270
- return () => p.forEach((v) => v());
307
+ }, { passive: !0 })
308
+ ].filter(Boolean), I = () => y.forEach((m) => m());
309
+ return l ? {
310
+ stop: I,
311
+ cancel: () => {
312
+ i = !1;
313
+ },
314
+ trigger: (m) => {
315
+ i = !0, f(m), i = !1;
316
+ }
317
+ } : I;
271
318
  }
272
- const pt = {
319
+ const bt = {
273
320
  mounted(e, t) {
274
321
  const n = !t.modifiers.bubble;
275
322
  if (typeof t.value == "function")
276
- e.__onClickOutside_stop = me(e, t.value, { capture: n });
323
+ e.__onClickOutside_stop = he(e, t.value, { capture: n });
277
324
  else {
278
- const [o, l] = t.value;
279
- e.__onClickOutside_stop = me(e, o, Object.assign({ capture: n }, l));
325
+ const [o, s] = t.value;
326
+ e.__onClickOutside_stop = he(e, o, Object.assign({ capture: n }, s));
280
327
  }
281
328
  },
282
329
  unmounted(e) {
283
330
  e.__onClickOutside_stop();
284
331
  }
285
332
  };
286
- function Q(e) {
333
+ function ee(e) {
287
334
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
288
335
  }
289
- function Te(e) {
336
+ function Le(e) {
290
337
  const t = window.getComputedStyle(e);
291
338
  if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
292
339
  return !0;
293
340
  {
294
341
  const n = e.parentNode;
295
- return !n || n.tagName === "BODY" ? !1 : Te(n);
342
+ return !n || n.tagName === "BODY" ? !1 : Le(n);
296
343
  }
297
344
  }
298
- function vt(e) {
345
+ function wt(e) {
299
346
  const t = e || window.event, n = t.target;
300
- return Te(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
347
+ return Le(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
301
348
  }
302
- const Z = /* @__PURE__ */ new WeakMap();
303
- function ht(e, t = !1) {
304
- const n = y(t);
305
- let o = null, l = "";
306
- P(ct(e), (r) => {
307
- const u = Q(V(r));
308
- if (u) {
309
- const i = u;
310
- if (Z.get(i) || Z.set(i, i.style.overflow), i.style.overflow !== "hidden" && (l = i.style.overflow), i.style.overflow === "hidden")
349
+ const te = /* @__PURE__ */ new WeakMap();
350
+ function kt(e, t = !1) {
351
+ const n = k(t);
352
+ let o = null, s = "";
353
+ O(mt(e), (l) => {
354
+ const i = ee(D(l));
355
+ if (i) {
356
+ const u = i;
357
+ if (te.get(u) || te.set(u, u.style.overflow), u.style.overflow !== "hidden" && (s = u.style.overflow), u.style.overflow === "hidden")
311
358
  return n.value = !0;
312
359
  if (n.value)
313
- return i.style.overflow = "hidden";
360
+ return u.style.overflow = "hidden";
314
361
  }
315
362
  }, {
316
363
  immediate: !0
317
364
  });
318
- const a = () => {
319
- const r = Q(V(e));
320
- !r || n.value || (ee && (o = X(
321
- r,
365
+ const r = () => {
366
+ const l = ee(D(e));
367
+ !l || n.value || (ne && (o = H(
368
+ l,
322
369
  "touchmove",
323
- (u) => {
324
- vt(u);
370
+ (i) => {
371
+ wt(i);
325
372
  },
326
373
  { passive: !1 }
327
- )), r.style.overflow = "hidden", n.value = !0);
328
- }, s = () => {
329
- const r = Q(V(e));
330
- !r || !n.value || (ee && (o == null || o()), r.style.overflow = l, Z.delete(r), n.value = !1);
374
+ )), l.style.overflow = "hidden", n.value = !0);
375
+ }, a = () => {
376
+ const l = ee(D(e));
377
+ !l || !n.value || (ne && (o == null || o()), l.style.overflow = s, te.delete(l), n.value = !1);
331
378
  };
332
- return le(s), T({
379
+ return re(a), T({
333
380
  get() {
334
381
  return n.value;
335
382
  },
336
- set(r) {
337
- r ? a() : s();
383
+ set(l) {
384
+ l ? r() : a();
338
385
  }
339
386
  });
340
387
  }
341
- function gt() {
388
+ function _t() {
342
389
  let e = !1;
343
- const t = y(!1);
390
+ const t = le(!1);
344
391
  return (n, o) => {
345
392
  if (t.value = o.value, e)
346
393
  return;
347
394
  e = !0;
348
- const l = ht(n, o.value);
349
- P(t, (a) => l.value = a);
395
+ const s = kt(n, o.value);
396
+ O(t, (r) => s.value = r);
350
397
  };
351
398
  }
352
- gt();
353
- const yt = { class: "input-wrapper" }, bt = {
399
+ _t();
400
+ const Dt = { class: "input-wrapper" }, Et = {
354
401
  id: "autocomplete-results",
355
402
  class: "autocomplete-results"
356
- }, wt = {
403
+ }, Mt = {
357
404
  key: 0,
358
405
  class: "loading autocomplete-result"
359
- }, kt = ["onClick"], _t = /* @__PURE__ */ M({
406
+ }, At = ["onClick"], It = /* @__PURE__ */ C({
360
407
  __name: "ADropdown",
361
408
  props: /* @__PURE__ */ G({
362
409
  label: {},
@@ -369,12 +416,12 @@ const yt = { class: "input-wrapper" }, bt = {
369
416
  }),
370
417
  emits: ["update:modelValue"],
371
418
  setup(e) {
372
- const t = H(e, "modelValue"), n = Re({
419
+ const t = W(e, "modelValue"), n = qe({
373
420
  activeItemIndex: null,
374
421
  open: !1,
375
422
  loading: !1,
376
423
  results: e.items
377
- }), o = () => r(), l = async () => {
424
+ }), o = () => l(), s = async () => {
378
425
  if (n.open = !0, e.filterFunction) {
379
426
  e.isAsync && (n.loading = !0);
380
427
  try {
@@ -386,276 +433,347 @@ const yt = { class: "input-wrapper" }, bt = {
386
433
  e.isAsync && (n.loading = !1);
387
434
  }
388
435
  } else
389
- u();
390
- }, a = (f) => {
391
- t.value = f, r(f);
392
- }, s = () => {
436
+ i();
437
+ }, r = (f) => {
438
+ t.value = f, l(f);
439
+ }, a = () => {
393
440
  var f;
394
441
  n.activeItemIndex = e.isAsync ? null : t.value && ((f = e.items) == null ? void 0 : f.indexOf(t.value)) || null, n.open = !0, n.results = e.isAsync ? [] : e.items;
395
- }, r = (f) => {
442
+ }, l = (f) => {
396
443
  var p;
397
444
  n.activeItemIndex = null, n.open = !1, (p = e.items) != null && p.includes(f || t.value || "") || (t.value = "");
398
- }, u = () => {
445
+ }, i = () => {
399
446
  var f;
400
447
  t.value ? n.results = (f = e.items) == null ? void 0 : f.filter((p) => p.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.items;
401
- }, i = () => {
448
+ }, u = () => {
402
449
  var p;
403
450
  const f = ((p = n.results) == null ? void 0 : p.length) || 0;
404
451
  if (n.activeItemIndex != null) {
405
- const w = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
406
- n.activeItemIndex = (w + 1) % f;
452
+ const y = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
453
+ n.activeItemIndex = (y + 1) % f;
407
454
  } else
408
455
  n.activeItemIndex = 0;
409
456
  }, c = () => {
410
457
  var p;
411
458
  const f = ((p = n.results) == null ? void 0 : p.length) || 0;
412
459
  if (n.activeItemIndex != null) {
413
- const w = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
414
- n.activeItemIndex = (w - 1 + f) % f;
460
+ const y = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
461
+ n.activeItemIndex = (y - 1 + f) % f;
415
462
  } else
416
463
  n.activeItemIndex = f - 1;
417
- }, m = () => {
464
+ }, v = () => {
418
465
  if (n.results) {
419
466
  const f = n.activeItemIndex || 0, p = n.results[f];
420
- a(p);
467
+ r(p);
421
468
  }
422
469
  n.activeItemIndex = 0;
423
470
  };
424
- return (f, p) => E((g(), b("div", {
425
- class: J(["autocomplete", { isOpen: n.open }])
471
+ return (f, p) => M((g(), w("div", {
472
+ class: Q(["autocomplete", { isOpen: n.open }])
426
473
  }, [
427
- d("div", yt, [
428
- E(d("input", {
429
- "onUpdate:modelValue": p[0] || (p[0] = (w) => t.value = w),
474
+ d("div", Dt, [
475
+ M(d("input", {
476
+ "onUpdate:modelValue": p[0] || (p[0] = (y) => t.value = y),
430
477
  type: "text",
431
- onInput: l,
432
- onFocus: s,
478
+ onInput: s,
479
+ onFocus: a,
433
480
  onKeydown: [
434
- O(i, ["down"]),
435
- O(c, ["up"]),
436
- O(m, ["enter"]),
437
- O(o, ["esc"]),
438
- O(o, ["tab"])
481
+ R(u, ["down"]),
482
+ R(c, ["up"]),
483
+ R(v, ["enter"]),
484
+ R(o, ["esc"]),
485
+ R(o, ["tab"])
439
486
  ]
440
487
  }, null, 544), [
441
- [F, t.value]
488
+ [B, t.value]
442
489
  ]),
443
- E(d("ul", bt, [
444
- n.loading ? (g(), b("li", wt, "Loading results...")) : (g(!0), b(U, { key: 1 }, N(n.results, (w, v) => (g(), b("li", {
445
- key: w,
446
- onClick: Me((h) => a(w), ["stop"]),
447
- class: J(["autocomplete-result", { "is-active": v === n.activeItemIndex }])
448
- }, D(w), 11, kt))), 128))
490
+ M(d("ul", Et, [
491
+ n.loading ? (g(), w("li", Mt, "Loading results...")) : (g(!0), w(j, { key: 1 }, K(n.results, (y, I) => (g(), w("li", {
492
+ key: y,
493
+ onClick: Te((m) => r(y), ["stop"]),
494
+ class: Q(["autocomplete-result", { "is-active": I === n.activeItemIndex }])
495
+ }, A(y), 11, At))), 128))
449
496
  ], 512), [
450
- [R, n.open]
497
+ [U, n.open]
451
498
  ]),
452
- d("label", null, D(f.label), 1)
499
+ d("label", null, A(f.label), 1)
453
500
  ])
454
501
  ], 2)), [
455
- [C(pt), o]
502
+ [$(bt), o]
456
503
  ]);
457
504
  }
458
- }), At = /* @__PURE__ */ S(_t, [["__scopeId", "data-v-16c329d1"]]);
459
- function Se(e) {
460
- return Ae() ? (De(e), !0) : !1;
461
- }
462
- function ae(e) {
463
- return typeof e == "function" ? e() : C(e);
505
+ }), Ct = /* @__PURE__ */ L(It, [["__scopeId", "data-v-16c329d1"]]);
506
+ function ue(e) {
507
+ return Ae() ? (Ie(e), !0) : !1;
464
508
  }
465
- const Dt = typeof window < "u" && typeof document < "u";
509
+ const Tt = typeof window < "u" && typeof document < "u";
466
510
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
467
- const Et = (e) => e != null, Mt = Object.prototype.toString, It = (e) => Mt.call(e) === "[object Object]", Ct = () => {
468
- }, K = Dt ? window : void 0;
469
- function Y(e) {
511
+ const St = (e) => e != null, $t = Object.prototype.toString, Lt = (e) => $t.call(e) === "[object Object]", xt = () => {
512
+ };
513
+ function J(e) {
514
+ return Array.isArray(e) ? e : [e];
515
+ }
516
+ function Vt(e, t, n) {
517
+ return O(
518
+ e,
519
+ t,
520
+ {
521
+ ...n,
522
+ immediate: !0
523
+ }
524
+ );
525
+ }
526
+ const N = Tt ? window : void 0;
527
+ function q(e) {
470
528
  var t;
471
- const n = ae(e);
529
+ const n = D(e);
472
530
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
473
531
  }
474
- function j(...e) {
475
- let t, n, o, l;
476
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = K) : [t, n, o, l] = e, !t)
477
- return Ct;
478
- Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
479
- const a = [], s = () => {
480
- a.forEach((c) => c()), a.length = 0;
481
- }, r = (c, m, f, p) => (c.addEventListener(m, f, p), () => c.removeEventListener(m, f, p)), u = P(
482
- () => [Y(t), ae(l)],
483
- ([c, m]) => {
484
- if (s(), !c)
532
+ function z(...e) {
533
+ const t = [], n = () => {
534
+ t.forEach((l) => l()), t.length = 0;
535
+ }, o = (l, i, u, c) => (l.addEventListener(i, u, c), () => l.removeEventListener(i, u, c)), s = T(() => {
536
+ const l = J(D(e[0])).filter((i) => i != null);
537
+ return l.every((i) => typeof i != "string") ? l : void 0;
538
+ }), r = Vt(
539
+ () => {
540
+ var l, i;
541
+ return [
542
+ (i = (l = s.value) == null ? void 0 : l.map((u) => q(u))) != null ? i : [N].filter((u) => u != null),
543
+ J(D(s.value ? e[1] : e[0])),
544
+ J($(s.value ? e[2] : e[1])),
545
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
546
+ D(s.value ? e[3] : e[2])
547
+ ];
548
+ },
549
+ ([l, i, u, c]) => {
550
+ if (n(), !(l != null && l.length) || !(i != null && i.length) || !(u != null && u.length))
485
551
  return;
486
- const f = It(m) ? { ...m } : m;
487
- a.push(
488
- ...n.flatMap((p) => o.map((w) => r(c, p, w, f)))
552
+ const v = Lt(c) ? { ...c } : c;
553
+ t.push(
554
+ ...l.flatMap(
555
+ (f) => i.flatMap(
556
+ (p) => u.map((y) => o(f, p, y, v))
557
+ )
558
+ )
489
559
  );
490
560
  },
491
- { immediate: !0, flush: "post" }
492
- ), i = () => {
493
- u(), s();
561
+ { flush: "post" }
562
+ ), a = () => {
563
+ r(), n();
494
564
  };
495
- return Se(i), i;
565
+ return ue(n), a;
496
566
  }
497
- function Tt() {
498
- const e = y(!1), t = qe();
499
- return t && ne(() => {
567
+ function Pt() {
568
+ const e = le(!1), t = Ne();
569
+ return t && se(() => {
500
570
  e.value = !0;
501
571
  }, t), e;
502
572
  }
503
- function St(e) {
504
- const t = Tt();
573
+ function Ot(e) {
574
+ const t = Pt();
505
575
  return T(() => (t.value, !!e()));
506
576
  }
507
- function Lt(e, t, n = {}) {
508
- const { window: o = K, ...l } = n;
509
- let a;
510
- const s = St(() => o && "MutationObserver" in o), r = () => {
511
- a && (a.disconnect(), a = void 0);
512
- }, u = T(() => {
513
- const f = ae(e), p = (Array.isArray(f) ? f : [f]).map(Y).filter(Et);
577
+ function Ft(e, t, n = {}) {
578
+ const { window: o = N, ...s } = n;
579
+ let r;
580
+ const a = Ot(() => o && "MutationObserver" in o), l = () => {
581
+ r && (r.disconnect(), r = void 0);
582
+ }, i = T(() => {
583
+ const f = D(e), p = J(f).map(q).filter(St);
514
584
  return new Set(p);
515
- }), i = P(
516
- () => u.value,
585
+ }), u = O(
586
+ () => i.value,
517
587
  (f) => {
518
- r(), s.value && f.size && (a = new MutationObserver(t), f.forEach((p) => a.observe(p, l)));
588
+ l(), a.value && f.size && (r = new MutationObserver(t), f.forEach((p) => r.observe(p, s)));
519
589
  },
520
590
  { immediate: !0, flush: "post" }
521
- ), c = () => a == null ? void 0 : a.takeRecords(), m = () => {
522
- i(), r();
591
+ ), c = () => r == null ? void 0 : r.takeRecords(), v = () => {
592
+ u(), l();
523
593
  };
524
- return Se(m), {
525
- isSupported: s,
526
- stop: m,
594
+ return ue(v), {
595
+ isSupported: a,
596
+ stop: v,
527
597
  takeRecords: c
528
598
  };
529
599
  }
530
- function $t(e = {}) {
600
+ function Rt(e, t, n = {}) {
601
+ const {
602
+ window: o = N,
603
+ document: s = o == null ? void 0 : o.document,
604
+ flush: r = "sync"
605
+ } = n;
606
+ if (!o || !s)
607
+ return xt;
608
+ let a;
609
+ const l = (c) => {
610
+ a == null || a(), a = c;
611
+ }, i = Ue(() => {
612
+ const c = q(e);
613
+ if (c) {
614
+ const { stop: v } = Ft(
615
+ s,
616
+ (f) => {
617
+ f.map((p) => [...p.removedNodes]).flat().some((p) => p === c || p.contains(c)) && t(f);
618
+ },
619
+ {
620
+ window: o,
621
+ childList: !0,
622
+ subtree: !0
623
+ }
624
+ );
625
+ l(v);
626
+ }
627
+ }, { flush: r }), u = () => {
628
+ i(), l();
629
+ };
630
+ return ue(u), u;
631
+ }
632
+ function Ht(e = {}) {
531
633
  var t;
532
634
  const {
533
- window: n = K,
635
+ window: n = N,
534
636
  deep: o = !0,
535
- triggerOnRemoval: l = !1
536
- } = e, a = (t = e.document) != null ? t : n == null ? void 0 : n.document, s = () => {
537
- var i;
538
- let c = a == null ? void 0 : a.activeElement;
637
+ triggerOnRemoval: s = !1
638
+ } = e, r = (t = e.document) != null ? t : n == null ? void 0 : n.document, a = () => {
639
+ var u;
640
+ let c = r == null ? void 0 : r.activeElement;
539
641
  if (o)
540
642
  for (; c != null && c.shadowRoot; )
541
- c = (i = c == null ? void 0 : c.shadowRoot) == null ? void 0 : i.activeElement;
643
+ c = (u = c == null ? void 0 : c.shadowRoot) == null ? void 0 : u.activeElement;
542
644
  return c;
543
- }, r = y(), u = () => {
544
- r.value = s();
645
+ }, l = k(), i = () => {
646
+ l.value = a();
545
647
  };
546
- return n && (j(n, "blur", (i) => {
547
- i.relatedTarget === null && u();
548
- }, !0), j(n, "focus", u, !0)), l && Lt(a, (i) => {
549
- i.filter((c) => c.removedNodes.length).map((c) => Array.from(c.removedNodes)).flat().forEach((c) => {
550
- c === r.value && u();
551
- });
552
- }, {
553
- childList: !0,
554
- subtree: !0
555
- }), u(), r;
648
+ if (n) {
649
+ const u = {
650
+ capture: !0,
651
+ passive: !0
652
+ };
653
+ z(
654
+ n,
655
+ "blur",
656
+ (c) => {
657
+ c.relatedTarget === null && i();
658
+ },
659
+ u
660
+ ), z(
661
+ n,
662
+ "focus",
663
+ i,
664
+ u
665
+ );
666
+ }
667
+ return s && Rt(l, i, { document: r }), i(), l;
556
668
  }
557
- const xt = "focusin", Vt = "focusout";
558
- function Pt(e, t = {}) {
559
- const { window: n = K } = t, o = T(() => Y(e)), l = y(!1), a = T(() => l.value), s = $t(t);
560
- return !n || !s.value ? { focused: a } : (j(o, xt, () => l.value = !0), j(o, Vt, () => l.value = !1), { focused: a });
669
+ const Bt = "focusin", qt = "focusout", Wt = ":focus-within";
670
+ function Ut(e, t = {}) {
671
+ const { window: n = N } = t, o = T(() => q(e)), s = le(!1), r = T(() => s.value), a = Ht(t);
672
+ if (!n || !a.value)
673
+ return { focused: r };
674
+ const l = { passive: !0 };
675
+ return z(o, Bt, () => s.value = !0, l), z(o, qt, () => {
676
+ var i, u, c;
677
+ return s.value = (c = (u = (i = o.value) == null ? void 0 : i.matches) == null ? void 0 : u.call(i, Wt)) != null ? c : !1;
678
+ }, l), { focused: r };
561
679
  }
562
- function Ot(e, { window: t = K, scrollTarget: n } = {}) {
563
- const o = y(!1), l = () => {
680
+ function Nt(e, { window: t = N, scrollTarget: n } = {}) {
681
+ const o = k(!1), s = () => {
564
682
  if (!t) return;
565
- const a = t.document, s = Y(e);
566
- if (!s)
683
+ const r = t.document, a = q(e);
684
+ if (!a)
567
685
  o.value = !1;
568
686
  else {
569
- const r = s.getBoundingClientRect();
570
- o.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
687
+ const l = a.getBoundingClientRect();
688
+ o.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
571
689
  }
572
690
  };
573
- return P(
574
- () => Y(e),
575
- () => l(),
691
+ return O(
692
+ () => q(e),
693
+ () => s(),
576
694
  { immediate: !0, flush: "post" }
577
- ), t && j(n || t, "scroll", l, {
695
+ ), t && z(n || t, "scroll", s, {
578
696
  capture: !1,
579
697
  passive: !0
580
698
  }), o;
581
699
  }
582
- const L = (e) => {
583
- let t = Ot(e).value;
700
+ const x = (e) => {
701
+ let t = Nt(e).value;
584
702
  return t = t && e.offsetHeight > 0, t;
585
- }, $ = (e) => e.tabIndex >= 0, pe = (e) => {
703
+ }, V = (e) => e.tabIndex >= 0, ge = (e) => {
586
704
  const t = e.target;
587
- return re(t);
588
- }, re = (e) => {
705
+ return ce(t);
706
+ }, ce = (e) => {
589
707
  var t;
590
708
  let n;
591
709
  if (e instanceof HTMLTableCellElement) {
592
710
  const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
593
711
  if (o) {
594
- const l = Array.from(o.children)[e.cellIndex];
595
- l && (n = l);
712
+ const s = Array.from(o.children)[e.cellIndex];
713
+ s && (n = s);
596
714
  }
597
715
  } else if (e instanceof HTMLTableRowElement) {
598
716
  const o = e.previousElementSibling;
599
717
  o && (n = o);
600
718
  }
601
- return n && (!$(n) || !L(n)) ? re(n) : n;
602
- }, Ft = (e) => {
719
+ return n && (!V(n) || !x(n)) ? ce(n) : n;
720
+ }, Yt = (e) => {
603
721
  var t;
604
722
  const n = e.target;
605
723
  let o;
606
724
  if (n instanceof HTMLTableCellElement) {
607
- const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
608
- if (l) {
609
- const a = l.firstElementChild, s = a == null ? void 0 : a.children[n.cellIndex];
610
- s && (o = s);
725
+ const s = (t = n.parentElement) == null ? void 0 : t.parentElement;
726
+ if (s) {
727
+ const r = s.firstElementChild, a = r == null ? void 0 : r.children[n.cellIndex];
728
+ a && (o = a);
611
729
  }
612
730
  } else if (n instanceof HTMLTableRowElement) {
613
- const l = n.parentElement;
614
- if (l) {
615
- const a = l.firstElementChild;
616
- a && (o = a);
731
+ const s = n.parentElement;
732
+ if (s) {
733
+ const r = s.firstElementChild;
734
+ r && (o = r);
617
735
  }
618
736
  }
619
- return o && (!$(o) || !L(o)) ? ie(o) : o;
620
- }, ve = (e) => {
737
+ return o && (!V(o) || !x(o)) ? de(o) : o;
738
+ }, ye = (e) => {
621
739
  const t = e.target;
622
- return ie(t);
623
- }, ie = (e) => {
740
+ return de(t);
741
+ }, de = (e) => {
624
742
  var t;
625
743
  let n;
626
744
  if (e instanceof HTMLTableCellElement) {
627
745
  const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
628
746
  if (o) {
629
- const l = Array.from(o.children)[e.cellIndex];
630
- l && (n = l);
747
+ const s = Array.from(o.children)[e.cellIndex];
748
+ s && (n = s);
631
749
  }
632
750
  } else if (e instanceof HTMLTableRowElement) {
633
751
  const o = e.nextElementSibling;
634
752
  o && (n = o);
635
753
  }
636
- return n && (!$(n) || !L(n)) ? ie(n) : n;
637
- }, Ht = (e) => {
754
+ return n && (!V(n) || !x(n)) ? de(n) : n;
755
+ }, jt = (e) => {
638
756
  var t;
639
757
  const n = e.target;
640
758
  let o;
641
759
  if (n instanceof HTMLTableCellElement) {
642
- const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
643
- if (l) {
644
- const a = l.lastElementChild, s = a == null ? void 0 : a.children[n.cellIndex];
645
- s && (o = s);
760
+ const s = (t = n.parentElement) == null ? void 0 : t.parentElement;
761
+ if (s) {
762
+ const r = s.lastElementChild, a = r == null ? void 0 : r.children[n.cellIndex];
763
+ a && (o = a);
646
764
  }
647
765
  } else if (n instanceof HTMLTableRowElement) {
648
- const l = n.parentElement;
649
- if (l) {
650
- const a = l.lastElementChild;
651
- a && (o = a);
766
+ const s = n.parentElement;
767
+ if (s) {
768
+ const r = s.lastElementChild;
769
+ r && (o = r);
652
770
  }
653
771
  }
654
- return o && (!$(o) || !L(o)) ? re(o) : o;
655
- }, he = (e) => {
772
+ return o && (!V(o) || !x(o)) ? ce(o) : o;
773
+ }, be = (e) => {
656
774
  const t = e.target;
657
- return ue(t);
658
- }, ue = (e) => {
775
+ return fe(t);
776
+ }, fe = (e) => {
659
777
  var t;
660
778
  let n;
661
779
  if (e.previousElementSibling)
@@ -664,11 +782,11 @@ const L = (e) => {
664
782
  const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
665
783
  n = o == null ? void 0 : o.lastElementChild;
666
784
  }
667
- return n && (!$(n) || !L(n)) ? ue(n) : n;
668
- }, ge = (e) => {
785
+ return n && (!V(n) || !x(n)) ? fe(n) : n;
786
+ }, we = (e) => {
669
787
  const t = e.target;
670
- return ce(t);
671
- }, ce = (e) => {
788
+ return me(t);
789
+ }, me = (e) => {
672
790
  var t;
673
791
  let n;
674
792
  if (e.nextElementSibling)
@@ -677,155 +795,155 @@ const L = (e) => {
677
795
  const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
678
796
  n = o == null ? void 0 : o.firstElementChild;
679
797
  }
680
- return n && (!$(n) || !L(n)) ? ce(n) : n;
681
- }, ye = (e) => {
798
+ return n && (!V(n) || !x(n)) ? me(n) : n;
799
+ }, ke = (e) => {
682
800
  const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
683
- return n && (!$(n) || !L(n)) ? ce(n) : n;
684
- }, be = (e) => {
801
+ return n && (!V(n) || !x(n)) ? me(n) : n;
802
+ }, _e = (e) => {
685
803
  const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
686
- return n && (!$(n) || !L(n)) ? ue(n) : n;
687
- }, z = ["alt", "control", "shift", "meta"], Rt = {
804
+ return n && (!V(n) || !x(n)) ? fe(n) : n;
805
+ }, X = ["alt", "control", "shift", "meta"], Kt = {
688
806
  ArrowUp: "up",
689
807
  ArrowDown: "down",
690
808
  ArrowLeft: "left",
691
809
  ArrowRight: "right"
692
- }, Le = {
810
+ }, xe = {
693
811
  "keydown.up": (e) => {
694
- const t = pe(e);
812
+ const t = ge(e);
695
813
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
696
814
  },
697
815
  "keydown.down": (e) => {
698
- const t = ve(e);
816
+ const t = ye(e);
699
817
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
700
818
  },
701
819
  "keydown.left": (e) => {
702
- const t = he(e);
820
+ const t = be(e);
703
821
  e.preventDefault(), e.stopPropagation(), t && t.focus();
704
822
  },
705
823
  "keydown.right": (e) => {
706
- const t = ge(e);
824
+ const t = we(e);
707
825
  e.preventDefault(), e.stopPropagation(), t && t.focus();
708
826
  },
709
827
  "keydown.control.up": (e) => {
710
- const t = Ft(e);
828
+ const t = Yt(e);
711
829
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
712
830
  },
713
831
  "keydown.control.down": (e) => {
714
- const t = Ht(e);
832
+ const t = jt(e);
715
833
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
716
834
  },
717
835
  "keydown.control.left": (e) => {
718
- const t = ye(e);
836
+ const t = ke(e);
719
837
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
720
838
  },
721
839
  "keydown.control.right": (e) => {
722
- const t = be(e);
840
+ const t = _e(e);
723
841
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
724
842
  },
725
843
  "keydown.end": (e) => {
726
- const t = be(e);
844
+ const t = _e(e);
727
845
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
728
846
  },
729
847
  "keydown.enter": (e) => {
730
848
  if (e.target instanceof HTMLTableCellElement) {
731
849
  e.preventDefault(), e.stopPropagation();
732
- const t = ve(e);
850
+ const t = ye(e);
733
851
  t && t.focus();
734
852
  }
735
853
  },
736
854
  "keydown.shift.enter": (e) => {
737
855
  if (e.target instanceof HTMLTableCellElement) {
738
856
  e.preventDefault(), e.stopPropagation();
739
- const t = pe(e);
857
+ const t = ge(e);
740
858
  t && t.focus();
741
859
  }
742
860
  },
743
861
  "keydown.home": (e) => {
744
- const t = ye(e);
862
+ const t = ke(e);
745
863
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
746
864
  },
747
865
  "keydown.tab": (e) => {
748
- const t = ge(e);
866
+ const t = we(e);
749
867
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
750
868
  },
751
869
  "keydown.shift.tab": (e) => {
752
- const t = he(e);
870
+ const t = be(e);
753
871
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
754
872
  }
755
873
  };
756
- function Bt(e) {
757
- const t = (s) => {
758
- let r = null;
759
- return s.parent && (typeof s.parent == "string" ? r = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? r = s.parent : r = s.parent.value), r;
760
- }, n = (s) => {
761
- var r;
762
- const u = t(s);
763
- let i = [];
764
- if (typeof s.selectors == "string")
765
- i = u ? Array.from(u.querySelectorAll(s.selectors)) : Array.from(document.querySelectorAll(s.selectors));
766
- else if (Array.isArray(s.selectors))
767
- for (const c of s.selectors)
768
- c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
769
- else if (s.selectors instanceof HTMLElement)
770
- i.push(s.selectors);
771
- else if ((r = s.selectors) != null && r.value)
772
- if (Array.isArray(s.selectors.value))
773
- for (const c of s.selectors.value)
774
- c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
775
- else
776
- i.push(s.selectors.value);
777
- return i;
778
- }, o = (s) => {
779
- const r = t(s);
874
+ function zt(e) {
875
+ const t = (a) => {
876
+ let l = null;
877
+ return a.parent && (typeof a.parent == "string" ? l = document.querySelector(a.parent) : a.parent instanceof HTMLElement ? l = a.parent : l = a.parent.value), l;
878
+ }, n = (a) => {
879
+ var l;
880
+ const i = t(a);
780
881
  let u = [];
781
- return s.selectors ? u = n(s) : r && (u = Array.from(r.children).filter((i) => $(i) && L(i))), u;
782
- }, l = (s) => (r) => {
783
- const u = Rt[r.key] || r.key.toLowerCase();
784
- if (z.includes(u)) return;
785
- const i = s.handlers || Le;
786
- for (const c of Object.keys(i)) {
787
- const [m, ...f] = c.split(".");
788
- if (m === "keydown" && f.includes(u)) {
789
- const p = i[c], w = f.filter((h) => z.includes(h)), v = z.some((h) => {
790
- const _ = h.charAt(0).toUpperCase() + h.slice(1);
791
- return r.getModifierState(_);
882
+ if (typeof a.selectors == "string")
883
+ u = i ? Array.from(i.querySelectorAll(a.selectors)) : Array.from(document.querySelectorAll(a.selectors));
884
+ else if (Array.isArray(a.selectors))
885
+ for (const c of a.selectors)
886
+ c instanceof HTMLElement ? u.push(c) : u.push(c.$el);
887
+ else if (a.selectors instanceof HTMLElement)
888
+ u.push(a.selectors);
889
+ else if ((l = a.selectors) != null && l.value)
890
+ if (Array.isArray(a.selectors.value))
891
+ for (const c of a.selectors.value)
892
+ c instanceof HTMLElement ? u.push(c) : u.push(c.$el);
893
+ else
894
+ u.push(a.selectors.value);
895
+ return u;
896
+ }, o = (a) => {
897
+ const l = t(a);
898
+ let i = [];
899
+ return a.selectors ? i = n(a) : l && (i = Array.from(l.children).filter((u) => V(u) && x(u))), i;
900
+ }, s = (a) => (l) => {
901
+ const i = Kt[l.key] || l.key.toLowerCase();
902
+ if (X.includes(i)) return;
903
+ const u = a.handlers || xe;
904
+ for (const c of Object.keys(u)) {
905
+ const [v, ...f] = c.split(".");
906
+ if (v === "keydown" && f.includes(i)) {
907
+ const p = u[c], y = f.filter((m) => X.includes(m)), I = X.some((m) => {
908
+ const h = m.charAt(0).toUpperCase() + m.slice(1);
909
+ return l.getModifierState(h);
792
910
  });
793
- if (w.length > 0) {
794
- if (v) {
795
- for (const h of z)
796
- if (f.includes(h)) {
797
- const _ = h.charAt(0).toUpperCase() + h.slice(1);
798
- r.getModifierState(_) && p(r);
911
+ if (y.length > 0) {
912
+ if (I) {
913
+ for (const m of X)
914
+ if (f.includes(m)) {
915
+ const h = m.charAt(0).toUpperCase() + m.slice(1);
916
+ l.getModifierState(h) && p(l);
799
917
  }
800
918
  }
801
919
  } else
802
- v || p(r);
920
+ I || p(l);
803
921
  }
804
922
  }
805
- }, a = [];
806
- ne(() => {
807
- for (const s of e) {
808
- const r = t(s), u = o(s), i = l(s), c = r ? [r] : u;
809
- for (const m of c) {
810
- const { focused: f } = Pt(y(m)), p = P(f, (w) => {
811
- w ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
923
+ }, r = [];
924
+ se(() => {
925
+ for (const a of e) {
926
+ const l = t(a), i = o(a), u = s(a), c = l ? [l] : i;
927
+ for (const v of c) {
928
+ const { focused: f } = Ut(k(v)), p = O(f, (y) => {
929
+ y ? v.addEventListener("keydown", u) : v.removeEventListener("keydown", u);
812
930
  });
813
- a.push(p);
931
+ r.push(p);
814
932
  }
815
933
  }
816
- }), Be(() => {
817
- for (const s of a)
818
- s();
934
+ }), We(() => {
935
+ for (const a of r)
936
+ a();
819
937
  });
820
938
  }
821
- const qt = {
939
+ const Gt = {
822
940
  class: "adatepicker",
823
941
  tabindex: "0",
824
942
  ref: "datepicker"
825
- }, Wt = {
943
+ }, Xt = {
826
944
  colspan: "5",
827
945
  tabindex: -1
828
- }, Ut = ["onClick", "onKeydown"], Nt = 6, we = 7, Yt = /* @__PURE__ */ M({
946
+ }, Jt = ["onClick", "onKeydown"], Qt = 6, De = 7, Zt = /* @__PURE__ */ C({
829
947
  __name: "ADatePicker",
830
948
  props: {
831
949
  modelValue: { default: /* @__PURE__ */ new Date() },
@@ -833,46 +951,46 @@ const qt = {
833
951
  },
834
952
  emits: ["update:modelValue"],
835
953
  setup(e, { expose: t }) {
836
- const n = H(e, "modelValue"), o = y(new Date(n.value)), l = y(o.value.getMonth()), a = y(o.value.getFullYear()), s = y([]), r = _e("datepicker");
837
- ne(async () => {
838
- u(), await We();
839
- const k = document.getElementsByClassName("selectedDate");
840
- if (k.length > 0)
841
- k[0].focus();
954
+ const n = W(e, "modelValue"), o = k(new Date(n.value)), s = k(o.value.getMonth()), r = k(o.value.getFullYear()), a = k([]), l = Me("datepicker");
955
+ se(async () => {
956
+ i(), await Ye();
957
+ const b = document.getElementsByClassName("selectedDate");
958
+ if (b.length > 0)
959
+ b[0].focus();
842
960
  else {
843
- const A = document.getElementsByClassName("todaysDate");
844
- A.length > 0 && A[0].focus();
961
+ const _ = document.getElementsByClassName("todaysDate");
962
+ _.length > 0 && _[0].focus();
845
963
  }
846
964
  });
847
- const u = () => {
848
- s.value = [];
849
- const k = new Date(a.value, l.value, 1), A = k.getDay(), I = k.setDate(k.getDate() - A);
850
- for (const x of Array(43).keys())
851
- s.value.push(I + x * 864e5);
965
+ const i = () => {
966
+ a.value = [];
967
+ const b = new Date(r.value, s.value, 1), _ = b.getDay(), S = b.setDate(b.getDate() - _);
968
+ for (const P of Array(43).keys())
969
+ a.value.push(S + P * 864e5);
852
970
  };
853
- P([l, a], u);
854
- const i = () => a.value -= 1, c = () => a.value += 1, m = () => {
855
- l.value == 0 ? (l.value = 11, i()) : l.value -= 1;
971
+ O([s, r], i);
972
+ const u = () => r.value -= 1, c = () => r.value += 1, v = () => {
973
+ s.value == 0 ? (s.value = 11, u()) : s.value -= 1;
856
974
  }, f = () => {
857
- l.value == 11 ? (l.value = 0, c()) : l.value += 1;
858
- }, p = (k) => {
859
- const A = /* @__PURE__ */ new Date();
860
- if (l.value === A.getMonth())
861
- return A.toDateString() === new Date(k).toDateString();
862
- }, w = (k) => new Date(k).toDateString() === new Date(o.value).toDateString(), v = (k, A) => (k - 1) * we + A, h = (k, A) => s.value[v(k, A)], _ = (k) => {
863
- n.value = o.value = new Date(s.value[k]);
864
- }, B = T(() => new Date(a.value, l.value, 1).toLocaleDateString(void 0, {
975
+ s.value == 11 ? (s.value = 0, c()) : s.value += 1;
976
+ }, p = (b) => {
977
+ const _ = /* @__PURE__ */ new Date();
978
+ if (s.value === _.getMonth())
979
+ return _.toDateString() === new Date(b).toDateString();
980
+ }, y = (b) => new Date(b).toDateString() === new Date(o.value).toDateString(), I = (b, _) => (b - 1) * De + _, m = (b, _) => a.value[I(b, _)], h = (b) => {
981
+ n.value = o.value = new Date(a.value[b]);
982
+ }, E = T(() => new Date(r.value, s.value, 1).toLocaleDateString(void 0, {
865
983
  year: "numeric",
866
984
  month: "long"
867
985
  }));
868
- return Bt([
986
+ return zt([
869
987
  {
870
- parent: r,
988
+ parent: l,
871
989
  selectors: "td",
872
990
  handlers: {
873
- ...Le,
874
- "keydown.pageup": m,
875
- "keydown.shift.pageup": i,
991
+ ...xe,
992
+ "keydown.pageup": v,
993
+ "keydown.shift.pageup": u,
876
994
  "keydown.pagedown": f,
877
995
  "keydown.shift.pagedown": c,
878
996
  // TODO: this is a hack to override the stonecrop enter handler;
@@ -882,23 +1000,23 @@ const qt = {
882
1000
  }
883
1001
  }
884
1002
  }
885
- ]), t({ currentMonth: l, currentYear: a, selectedDate: o }), (k, A) => (g(), b("div", qt, [
1003
+ ]), t({ currentMonth: s, currentYear: r, selectedDate: o }), (b, _) => (g(), w("div", Gt, [
886
1004
  d("table", null, [
887
1005
  d("tbody", null, [
888
1006
  d("tr", null, [
889
1007
  d("td", {
890
1008
  id: "previous-month-btn",
891
- onClick: m,
1009
+ onClick: v,
892
1010
  tabindex: -1
893
1011
  }, "<"),
894
- d("th", Wt, D(B.value), 1),
1012
+ d("th", Xt, A(E.value), 1),
895
1013
  d("td", {
896
1014
  id: "next-month-btn",
897
1015
  onClick: f,
898
1016
  tabindex: -1
899
1017
  }, ">")
900
1018
  ]),
901
- A[0] || (A[0] = d("tr", { class: "days-header" }, [
1019
+ _[0] || (_[0] = d("tr", { class: "days-header" }, [
902
1020
  d("td", null, "M"),
903
1021
  d("td", null, "T"),
904
1022
  d("td", null, "W"),
@@ -907,37 +1025,37 @@ const qt = {
907
1025
  d("td", null, "S"),
908
1026
  d("td", null, "S")
909
1027
  ], -1)),
910
- (g(), b(U, null, N(Nt, (I) => d("tr", { key: I }, [
911
- (g(), b(U, null, N(we, (x) => d("td", {
1028
+ (g(), w(j, null, K(Qt, (S) => d("tr", { key: S }, [
1029
+ (g(), w(j, null, K(De, (P) => d("td", {
912
1030
  ref_for: !0,
913
1031
  ref: "celldate",
914
- key: v(I, x),
1032
+ key: I(S, P),
915
1033
  contenteditable: !1,
916
1034
  spellcheck: !1,
917
1035
  tabindex: 0,
918
- onClick: Me((xe) => _(v(I, x)), ["prevent", "stop"]),
919
- onKeydown: O((xe) => _(v(I, x)), ["enter"]),
920
- class: J({
921
- todaysDate: p(h(I, x)),
922
- selectedDate: w(h(I, x))
1036
+ onClick: Te((Pe) => h(I(S, P)), ["prevent", "stop"]),
1037
+ onKeydown: R((Pe) => h(I(S, P)), ["enter"]),
1038
+ class: Q({
1039
+ todaysDate: p(m(S, P)),
1040
+ selectedDate: y(m(S, P))
923
1041
  })
924
- }, D(new Date(h(I, x)).getDate()), 43, Ut)), 64))
1042
+ }, A(new Date(m(S, P)).getDate()), 43, Jt)), 64))
925
1043
  ])), 64))
926
1044
  ])
927
1045
  ])
928
1046
  ], 512));
929
1047
  }
930
- }), jt = /* @__PURE__ */ S(Yt, [["__scopeId", "data-v-f49cfd40"]]), Gt = /* @__PURE__ */ M({
1048
+ }), en = /* @__PURE__ */ L(Zt, [["__scopeId", "data-v-f49cfd40"]]), tn = /* @__PURE__ */ C({
931
1049
  __name: "CollapseButton",
932
1050
  props: {
933
1051
  collapsed: { type: Boolean }
934
1052
  },
935
1053
  setup(e) {
936
- return (t, n) => (g(), b("button", {
937
- class: J(["collapse-button", t.collapsed ? "rotated" : "unrotated"])
1054
+ return (t, n) => (g(), w("button", {
1055
+ class: Q(["collapse-button", t.collapsed ? "rotated" : "unrotated"])
938
1056
  }, "×", 2));
939
1057
  }
940
- }), Kt = /* @__PURE__ */ S(Gt, [["__scopeId", "data-v-6f1c1b45"]]), zt = { class: "aform" }, Xt = /* @__PURE__ */ M({
1058
+ }), nn = /* @__PURE__ */ L(tn, [["__scopeId", "data-v-6f1c1b45"]]), on = { class: "aform" }, ln = /* @__PURE__ */ C({
941
1059
  __name: "AForm",
942
1060
  props: {
943
1061
  modelValue: {},
@@ -946,36 +1064,36 @@ const qt = {
946
1064
  },
947
1065
  emits: ["update:modelValue"],
948
1066
  setup(e, { emit: t }) {
949
- const n = t, o = y(e.data || {}), l = (s) => {
950
- let r = {};
951
- for (const [u, i] of Object.entries(s))
952
- ["component", "fieldtype"].includes(u) || (r[u] = i), u === "rows" && i && i.length === 0 && (r.rows = o.value[s.fieldname]);
953
- return r;
954
- }, a = T({
955
- get: () => e.modelValue.map((s, r) => T({
1067
+ const n = t, o = k(e.data || {}), s = (a) => {
1068
+ let l = {};
1069
+ for (const [i, u] of Object.entries(a))
1070
+ ["component", "fieldtype"].includes(i) || (l[i] = u), i === "rows" && u && u.length === 0 && (l.rows = o.value[a.fieldname]);
1071
+ return l;
1072
+ }, r = T({
1073
+ get: () => e.modelValue.map((a, l) => T({
956
1074
  get() {
957
- return s.value;
1075
+ return a.value;
958
1076
  },
959
- set: (u) => {
960
- e.modelValue[r].value = u, n("update:modelValue", e.modelValue);
1077
+ set: (i) => {
1078
+ e.modelValue[l].value = i, n("update:modelValue", e.modelValue);
961
1079
  }
962
1080
  })),
963
1081
  set: () => {
964
1082
  }
965
1083
  });
966
- return (s, r) => (g(), b("form", zt, [
967
- (g(!0), b(U, null, N(s.modelValue, (u, i) => (g(), te(Ue(u.component), Ne({
968
- key: i,
969
- schema: u,
970
- modelValue: a.value[i].value,
971
- "onUpdate:modelValue": (c) => a.value[i].value = c,
972
- data: o.value[u.fieldname],
973
- readonly: s.readonly,
1084
+ return (a, l) => (g(), w("form", on, [
1085
+ (g(!0), w(j, null, K(a.modelValue, (i, u) => (g(), oe(je(i.component), Ke({
1086
+ key: u,
1087
+ schema: i,
1088
+ modelValue: r.value[u].value,
1089
+ "onUpdate:modelValue": (c) => r.value[u].value = c,
1090
+ data: o.value[i.fieldname],
1091
+ readonly: a.readonly,
974
1092
  ref_for: !0
975
- }, l(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
1093
+ }, s(i)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
976
1094
  ]));
977
1095
  }
978
- }), $e = /* @__PURE__ */ S(Xt, [["__scopeId", "data-v-68845234"]]), Jt = /* @__PURE__ */ M({
1096
+ }), Ve = /* @__PURE__ */ L(ln, [["__scopeId", "data-v-68845234"]]), sn = /* @__PURE__ */ C({
979
1097
  __name: "AFieldset",
980
1098
  props: {
981
1099
  schema: {},
@@ -984,65 +1102,65 @@ const qt = {
984
1102
  data: {}
985
1103
  },
986
1104
  setup(e, { expose: t }) {
987
- const n = y(!1), o = y(e.data || []), l = y(e.schema), a = (s) => {
988
- s.preventDefault(), e.collapsible && (n.value = !n.value);
1105
+ const n = k(!1), o = k(e.data || []), s = k(e.schema), r = (a) => {
1106
+ a.preventDefault(), e.collapsible && (n.value = !n.value);
989
1107
  };
990
- return t({ collapsed: n }), (s, r) => (g(), b("fieldset", null, [
1108
+ return t({ collapsed: n }), (a, l) => (g(), w("fieldset", null, [
991
1109
  d("legend", {
992
- onClick: a,
993
- onSubmit: a
1110
+ onClick: r,
1111
+ onSubmit: r
994
1112
  }, [
995
- Ie(D(s.label) + " ", 1),
996
- s.collapsible ? (g(), te(Kt, {
1113
+ Se(A(a.label) + " ", 1),
1114
+ a.collapsible ? (g(), oe(nn, {
997
1115
  key: 0,
998
1116
  collapsed: n.value
999
- }, null, 8, ["collapsed"])) : oe("", !0)
1117
+ }, null, 8, ["collapsed"])) : ae("", !0)
1000
1118
  ], 32),
1001
- Ye(s.$slots, "default", { collapsed: n.value }, () => [
1002
- E(je($e, {
1003
- modelValue: l.value,
1004
- "onUpdate:modelValue": r[0] || (r[0] = (u) => l.value = u),
1119
+ ze(a.$slots, "default", { collapsed: n.value }, () => [
1120
+ M(Ge(Ve, {
1121
+ modelValue: s.value,
1122
+ "onUpdate:modelValue": l[0] || (l[0] = (i) => s.value = i),
1005
1123
  data: o.value
1006
1124
  }, null, 8, ["modelValue", "data"]), [
1007
- [R, !n.value]
1125
+ [U, !n.value]
1008
1126
  ])
1009
1127
  ], !0)
1010
1128
  ]));
1011
1129
  }
1012
- }), Qt = /* @__PURE__ */ S(Jt, [["__scopeId", "data-v-e7ea7e12"]]), Zt = { class: "aform_form-element aform_file-attach aform__grid--full" }, en = {
1130
+ }), an = /* @__PURE__ */ L(sn, [["__scopeId", "data-v-e7ea7e12"]]), rn = { class: "aform_form-element aform_file-attach aform__grid--full" }, un = {
1013
1131
  key: 0,
1014
1132
  class: "aform_file-attach-feedback"
1015
- }, tn = ["disabled"], nn = /* @__PURE__ */ M({
1133
+ }, cn = ["disabled"], dn = /* @__PURE__ */ C({
1016
1134
  __name: "AFileAttach",
1017
1135
  props: {
1018
1136
  label: {}
1019
1137
  },
1020
1138
  setup(e) {
1021
- const { files: t, open: n, reset: o, onChange: l } = mt(), a = T(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
1022
- return l((s) => s), (s, r) => (g(), b("div", Zt, [
1023
- C(t) ? (g(), b("div", en, [
1139
+ const { files: t, open: n, reset: o, onChange: s } = yt(), r = T(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
1140
+ return s((a) => a), (a, l) => (g(), w("div", rn, [
1141
+ $(t) ? (g(), w("div", un, [
1024
1142
  d("p", null, [
1025
- r[2] || (r[2] = Ie(" You have selected: ")),
1026
- d("b", null, D(a.value), 1)
1143
+ l[2] || (l[2] = Se(" You have selected: ")),
1144
+ d("b", null, A(r.value), 1)
1027
1145
  ]),
1028
- (g(!0), b(U, null, N(C(t), (u) => (g(), b("li", {
1029
- key: u.name
1030
- }, D(u.name), 1))), 128))
1031
- ])) : oe("", !0),
1146
+ (g(!0), w(j, null, K($(t), (i) => (g(), w("li", {
1147
+ key: i.name
1148
+ }, A(i.name), 1))), 128))
1149
+ ])) : ae("", !0),
1032
1150
  d("button", {
1033
1151
  type: "button",
1034
- onClick: r[0] || (r[0] = (u) => C(n)()),
1152
+ onClick: l[0] || (l[0] = (i) => $(n)()),
1035
1153
  class: "aform_form-btn"
1036
- }, D(s.label), 1),
1154
+ }, A(a.label), 1),
1037
1155
  d("button", {
1038
1156
  type: "button",
1039
- disabled: !C(t),
1040
- onClick: r[1] || (r[1] = (u) => C(o)()),
1157
+ disabled: !$(t),
1158
+ onClick: l[1] || (l[1] = (i) => $(o)()),
1041
1159
  class: "aform_form-btn"
1042
- }, "Reset", 8, tn)
1160
+ }, "Reset", 8, cn)
1043
1161
  ]));
1044
1162
  }
1045
- }), on = /* @__PURE__ */ S(nn, [["__scopeId", "data-v-0b3a11cc"]]), ln = { class: "aform_form-element" }, sn = ["id", "disabled", "required"], an = ["for"], rn = ["innerHTML"], un = /* @__PURE__ */ M({
1163
+ }), fn = /* @__PURE__ */ L(dn, [["__scopeId", "data-v-0b3a11cc"]]), mn = { class: "aform_form-element" }, pn = ["id", "disabled", "required"], vn = ["for"], hn = ["innerHTML"], gn = /* @__PURE__ */ C({
1046
1164
  __name: "ANumericInput",
1047
1165
  props: /* @__PURE__ */ G({
1048
1166
  schema: {},
@@ -1058,31 +1176,31 @@ const qt = {
1058
1176
  }),
1059
1177
  emits: ["update:modelValue"],
1060
1178
  setup(e) {
1061
- const t = H(e, "modelValue");
1062
- return (n, o) => (g(), b("div", ln, [
1063
- E(d("input", {
1179
+ const t = W(e, "modelValue");
1180
+ return (n, o) => (g(), w("div", mn, [
1181
+ M(d("input", {
1064
1182
  class: "aform_input-field",
1065
- "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
1183
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
1066
1184
  type: "number",
1067
1185
  id: n.uuid,
1068
1186
  disabled: n.readonly,
1069
1187
  required: n.required
1070
- }, null, 8, sn), [
1071
- [F, t.value]
1188
+ }, null, 8, pn), [
1189
+ [B, t.value]
1072
1190
  ]),
1073
1191
  d("label", {
1074
1192
  class: "aform_field-label",
1075
1193
  for: n.uuid
1076
- }, D(n.label), 9, an),
1077
- E(d("p", {
1194
+ }, A(n.label), 9, vn),
1195
+ M(d("p", {
1078
1196
  class: "aform_error",
1079
1197
  innerHTML: n.validation.errorMessage
1080
- }, null, 8, rn), [
1081
- [R, n.validation.errorMessage]
1198
+ }, null, 8, hn), [
1199
+ [U, n.validation.errorMessage]
1082
1200
  ])
1083
1201
  ]));
1084
1202
  }
1085
- }), ke = {
1203
+ }), Ee = {
1086
1204
  date: "##/##/####",
1087
1205
  datetime: "####/##/## ##:##",
1088
1206
  time: "##:##",
@@ -1090,57 +1208,57 @@ const qt = {
1090
1208
  phone: "(###) ### - ####",
1091
1209
  card: "#### #### #### ####"
1092
1210
  };
1093
- function cn(e) {
1211
+ function yn(e) {
1094
1212
  try {
1095
1213
  return Function(`"use strict";return (${e})`)();
1096
1214
  } catch {
1097
1215
  }
1098
1216
  }
1099
- function dn(e) {
1100
- var n, o, l;
1217
+ function bn(e) {
1218
+ var n, o, s;
1101
1219
  let t = e.value;
1102
1220
  if (t) {
1103
- const a = cn(t);
1104
- if (a) {
1105
- const s = (n = e.instance) == null ? void 0 : n.locale;
1106
- t = a(s);
1221
+ const r = yn(t);
1222
+ if (r) {
1223
+ const a = (n = e.instance) == null ? void 0 : n.locale;
1224
+ t = r(a);
1107
1225
  }
1108
1226
  } else {
1109
- const a = (o = e.instance) == null ? void 0 : o.schema, s = (l = a == null ? void 0 : a.fieldtype) == null ? void 0 : l.toLowerCase();
1110
- s && ke[s] && (t = ke[s]);
1227
+ const r = (o = e.instance) == null ? void 0 : o.schema, a = (s = r == null ? void 0 : r.fieldtype) == null ? void 0 : s.toLowerCase();
1228
+ a && Ee[a] && (t = Ee[a]);
1111
1229
  }
1112
1230
  return t;
1113
1231
  }
1114
- function fn(e, t) {
1232
+ function wn(e, t) {
1115
1233
  let n = e;
1116
1234
  const o = [t, "/", "-", "(", ")", " "];
1117
- for (const l of o)
1118
- n = n.replaceAll(l, "");
1235
+ for (const s of o)
1236
+ n = n.replaceAll(s, "");
1119
1237
  return n;
1120
1238
  }
1121
- function mn(e, t, n) {
1239
+ function kn(e, t, n) {
1122
1240
  let o = t;
1123
- for (const l of e) {
1124
- const a = o.indexOf(n);
1125
- if (a !== -1) {
1126
- const s = o.substring(0, a), r = o.substring(a + 1);
1127
- o = s + l + r;
1241
+ for (const s of e) {
1242
+ const r = o.indexOf(n);
1243
+ if (r !== -1) {
1244
+ const a = o.substring(0, r), l = o.substring(r + 1);
1245
+ o = a + s + l;
1128
1246
  }
1129
1247
  }
1130
1248
  return o.slice(0, t.length);
1131
1249
  }
1132
- function pn(e, t) {
1133
- var s;
1134
- const n = dn(t);
1250
+ function _n(e, t) {
1251
+ var a;
1252
+ const n = bn(t);
1135
1253
  if (!n) return;
1136
- const o = "#", l = e.value, a = fn(l, o);
1137
- if (a) {
1138
- const r = mn(a, n, o);
1139
- (s = t.instance) != null && s.maskFilled && (t.instance.maskFilled = !r.includes(o)), e.value = r;
1254
+ const o = "#", s = e.value, r = wn(s, o);
1255
+ if (r) {
1256
+ const l = kn(r, n, o);
1257
+ (a = t.instance) != null && a.maskFilled && (t.instance.maskFilled = !l.includes(o)), e.value = l;
1140
1258
  } else
1141
1259
  e.value = n;
1142
1260
  }
1143
- const vn = { class: "aform_form-element" }, hn = ["id", "disabled", "maxlength", "required"], gn = ["for"], yn = ["innerHTML"], bn = /* @__PURE__ */ M({
1261
+ const Dn = { class: "aform_form-element" }, En = ["id", "disabled", "maxlength", "required"], Mn = ["for"], An = ["innerHTML"], In = /* @__PURE__ */ C({
1144
1262
  __name: "ATextInput",
1145
1263
  props: /* @__PURE__ */ G({
1146
1264
  schema: {},
@@ -1156,35 +1274,35 @@ const vn = { class: "aform_form-element" }, hn = ["id", "disabled", "maxlength",
1156
1274
  }),
1157
1275
  emits: ["update:modelValue"],
1158
1276
  setup(e) {
1159
- const t = y(!0), n = H(e, "modelValue");
1160
- return (o, l) => (g(), b("div", vn, [
1161
- E(d("input", {
1277
+ const t = k(!0), n = W(e, "modelValue");
1278
+ return (o, s) => (g(), w("div", Dn, [
1279
+ M(d("input", {
1162
1280
  class: "aform_input-field",
1163
- "onUpdate:modelValue": l[0] || (l[0] = (a) => n.value = a),
1281
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
1164
1282
  id: o.uuid,
1165
1283
  disabled: o.readonly,
1166
1284
  maxlength: o.mask ? t.value && o.mask.length : void 0,
1167
1285
  required: o.required
1168
- }, null, 8, hn), [
1169
- [F, n.value],
1170
- [C(pn), o.mask]
1286
+ }, null, 8, En), [
1287
+ [B, n.value],
1288
+ [$(_n), o.mask]
1171
1289
  ]),
1172
1290
  d("label", {
1173
1291
  class: "aform_field-label",
1174
1292
  for: o.uuid
1175
- }, D(o.label), 9, gn),
1176
- E(d("p", {
1293
+ }, A(o.label), 9, Mn),
1294
+ M(d("p", {
1177
1295
  class: "aform_error",
1178
1296
  innerHTML: o.validation.errorMessage
1179
- }, null, 8, yn), [
1180
- [R, o.validation.errorMessage]
1297
+ }, null, 8, An), [
1298
+ [U, o.validation.errorMessage]
1181
1299
  ])
1182
1300
  ]));
1183
1301
  }
1184
- }), wn = { class: "login-container" }, kn = { class: "account-container" }, _n = { class: "account-header" }, An = { id: "account-title" }, Dn = { id: "account-subtitle" }, En = { class: "login-form-container" }, Mn = { class: "login-form-email aform_form-element" }, In = ["disabled"], Cn = { class: "login-form-password aform_form-element" }, Tn = ["disabled"], Sn = ["disabled"], Ln = {
1302
+ }), Cn = { class: "login-container" }, Tn = { class: "account-container" }, Sn = { class: "account-header" }, $n = { id: "account-title" }, Ln = { id: "account-subtitle" }, xn = { class: "login-form-container" }, Vn = { class: "login-form-email aform_form-element" }, Pn = ["disabled"], On = { class: "login-form-password aform_form-element" }, Fn = ["disabled"], Rn = ["disabled"], Hn = {
1185
1303
  key: 0,
1186
1304
  class: "material-symbols-outlined loading-icon"
1187
- }, $n = /* @__PURE__ */ M({
1305
+ }, Bn = /* @__PURE__ */ C({
1188
1306
  __name: "Login",
1189
1307
  props: {
1190
1308
  headerTitle: { default: "Login" },
@@ -1192,94 +1310,94 @@ const vn = { class: "aform_form-element" }, hn = ["id", "disabled", "maxlength",
1192
1310
  },
1193
1311
  emits: ["loginFailed", "loginSuccess"],
1194
1312
  setup(e, { emit: t }) {
1195
- const n = t, o = y(""), l = y(""), a = y(!1), s = y(!1);
1196
- function r(u) {
1197
- if (u.preventDefault(), a.value = !0, s.value) {
1198
- a.value = !1, n("loginFailed");
1313
+ const n = t, o = k(""), s = k(""), r = k(!1), a = k(!1);
1314
+ function l(i) {
1315
+ if (i.preventDefault(), r.value = !0, a.value) {
1316
+ r.value = !1, n("loginFailed");
1199
1317
  return;
1200
1318
  }
1201
- a.value = !1, n("loginSuccess");
1319
+ r.value = !1, n("loginSuccess");
1202
1320
  }
1203
- return (u, i) => (g(), b("div", wn, [
1321
+ return (i, u) => (g(), w("div", Cn, [
1204
1322
  d("div", null, [
1205
- d("div", kn, [
1206
- d("div", _n, [
1207
- d("h1", An, D(u.headerTitle), 1),
1208
- d("p", Dn, D(u.headerSubtitle), 1)
1323
+ d("div", Tn, [
1324
+ d("div", Sn, [
1325
+ d("h1", $n, A(i.headerTitle), 1),
1326
+ d("p", Ln, A(i.headerSubtitle), 1)
1209
1327
  ]),
1210
- d("form", { onSubmit: r }, [
1211
- d("div", En, [
1212
- d("div", Mn, [
1213
- i[2] || (i[2] = d("label", {
1328
+ d("form", { onSubmit: l }, [
1329
+ d("div", xn, [
1330
+ d("div", Vn, [
1331
+ u[2] || (u[2] = d("label", {
1214
1332
  id: "login-email",
1215
1333
  for: "email",
1216
1334
  class: "aform_field-label"
1217
1335
  }, "Email", -1)),
1218
- E(d("input", {
1336
+ M(d("input", {
1219
1337
  id: "email",
1220
1338
  class: "aform_input-field",
1221
1339
  name: "email",
1222
1340
  placeholder: "name@example.com",
1223
1341
  type: "email",
1224
- "onUpdate:modelValue": i[0] || (i[0] = (c) => o.value = c),
1342
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
1225
1343
  "auto-capitalize": "none",
1226
1344
  "auto-complete": "email",
1227
1345
  "auto-correct": "off",
1228
- disabled: a.value
1229
- }, null, 8, In), [
1230
- [F, o.value]
1346
+ disabled: r.value
1347
+ }, null, 8, Pn), [
1348
+ [B, o.value]
1231
1349
  ])
1232
1350
  ]),
1233
- d("div", Cn, [
1234
- i[3] || (i[3] = d("label", {
1351
+ d("div", On, [
1352
+ u[3] || (u[3] = d("label", {
1235
1353
  id: "login-password",
1236
1354
  for: "password",
1237
1355
  class: "aform_field-label"
1238
1356
  }, "Password", -1)),
1239
- E(d("input", {
1357
+ M(d("input", {
1240
1358
  id: "password",
1241
1359
  class: "aform_input-field",
1242
1360
  name: "password",
1243
1361
  type: "password",
1244
- "onUpdate:modelValue": i[1] || (i[1] = (c) => l.value = c),
1245
- disabled: a.value
1246
- }, null, 8, Tn), [
1247
- [F, l.value]
1362
+ "onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c),
1363
+ disabled: r.value
1364
+ }, null, 8, Fn), [
1365
+ [B, s.value]
1248
1366
  ])
1249
1367
  ]),
1250
1368
  d("button", {
1251
1369
  class: "btn",
1252
- onClick: r,
1253
- disabled: a.value || !o.value || !l.value
1370
+ onClick: l,
1371
+ disabled: r.value || !o.value || !s.value
1254
1372
  }, [
1255
- a.value ? (g(), b("span", Ln, "progress_activity")) : oe("", !0),
1256
- i[4] || (i[4] = d("span", { id: "login-form-button" }, "Login", -1))
1257
- ], 8, Sn)
1373
+ r.value ? (g(), w("span", Hn, "progress_activity")) : ae("", !0),
1374
+ u[4] || (u[4] = d("span", { id: "login-form-button" }, "Login", -1))
1375
+ ], 8, Rn)
1258
1376
  ])
1259
1377
  ], 32),
1260
- i[5] || (i[5] = d("button", { class: "btn" }, [
1378
+ u[5] || (u[5] = d("button", { class: "btn" }, [
1261
1379
  d("span", { id: "forgot-password-button" }, "Forgot password?")
1262
1380
  ], -1))
1263
1381
  ])
1264
1382
  ])
1265
1383
  ]));
1266
1384
  }
1267
- }), Vn = /* @__PURE__ */ S($n, [["__scopeId", "data-v-6cbd3add"]]);
1268
- function Pn(e) {
1269
- e.component("ACheckbox", Ze), e.component("ACombobox", et), e.component("ADate", st), e.component("ADropdown", At), e.component("ADatePicker", jt), e.component("AFieldset", Qt), e.component("AFileAttach", on), e.component("AForm", $e), e.component("ANumericInput", un), e.component("ATextInput", bn);
1385
+ }), Wn = /* @__PURE__ */ L(Bn, [["__scopeId", "data-v-6cbd3add"]]);
1386
+ function Un(e) {
1387
+ e.component("ACheckbox", nt), e.component("ACombobox", ot), e.component("ADate", it), e.component("ADropdown", Ct), e.component("ADatePicker", en), e.component("AFieldset", an), e.component("AFileAttach", fn), e.component("AForm", Ve), e.component("ANumericInput", gn), e.component("ATextInput", In);
1270
1388
  }
1271
1389
  export {
1272
- Ze as ACheckbox,
1273
- et as AComboBox,
1274
- st as ADate,
1275
- jt as ADatePicker,
1276
- At as ADropdown,
1277
- Qt as AFieldset,
1278
- on as AFileAttach,
1279
- $e as AForm,
1280
- un as ANumericInput,
1281
- bn as ATextInput,
1282
- Vn as Login,
1283
- Pn as install
1390
+ nt as ACheckbox,
1391
+ ot as AComboBox,
1392
+ it as ADate,
1393
+ en as ADatePicker,
1394
+ Ct as ADropdown,
1395
+ an as AFieldset,
1396
+ fn as AFileAttach,
1397
+ Ve as AForm,
1398
+ gn as ANumericInput,
1399
+ In as ATextInput,
1400
+ Wn as Login,
1401
+ Un as install
1284
1402
  };
1285
1403
  //# sourceMappingURL=aform.js.map