@stonecrop/aform 0.20.0 → 0.22.0

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,13 +1,13 @@
1
- import { install as Le } from "@stonecrop/atable";
2
- import { defineComponent as V, computed as A, useModel as G, openBlock as u, createElementBlock as m, Fragment as L, createElementVNode as a, toDisplayString as g, withDirectives as p, vModelCheckbox as qe, vShow as P, mergeModels as Q, useId as Fe, ref as I, inject as re, watch as Z, normalizeClass as O, withKeys as _, withModifiers as R, vModelText as Y, createCommentVNode as B, renderList as j, renderSlot as fe, createTextVNode as ne, unref as J, createVNode as oe, withCtx as _e, useTemplateRef as le, onMounted as we, nextTick as Ce, reactive as ve, vModelSelect as Be, provide as Re, createBlock as ee, watchEffect as Ve, resolveDynamicComponent as $e, mergeProps as Ne } from "vue";
1
+ import { install as _e } from "@stonecrop/atable";
2
+ import { defineComponent as R, computed as I, useModel as Y, openBlock as d, createElementBlock as f, Fragment as p, createElementVNode as a, toDisplayString as g, withDirectives as _, vModelCheckbox as Le, vShow as E, mergeModels as K, useId as qe, ref as T, inject as de, watch as O, normalizeClass as Z, withKeys as F, withModifiers as V, vModelText as G, createCommentVNode as B, renderList as j, renderSlot as fe, createTextVNode as se, unref as J, createVNode as oe, withCtx as Fe, useTemplateRef as ne, onMounted as we, nextTick as Ce, reactive as ve, vModelSelect as Be, provide as Re, createBlock as ee, watchEffect as Ve, resolveDynamicComponent as ke, mergeProps as He } from "vue";
3
3
  import { vOnClickOutside as ye } from "@vueuse/components";
4
- import { onClickOutside as De, useFileDialog as Ue } from "@vueuse/core";
4
+ import { onClickOutside as he, useFileDialog as Ne } from "@vueuse/core";
5
5
  import './assets/index.css';function ce(e) {
6
6
  return Function(`"use strict"; return (${e})`)();
7
7
  }
8
- const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" }, Ke = { class: "aform_display-value" }, Pe = ["for"], Qe = { class: "aform_checkbox-container aform_input-field" }, Ye = ["id", "disabled", "required"], Ge = ["innerHTML"], ze = /* @__PURE__ */ V({
8
+ const Ue = { class: "aform_form-element" }, Pe = { class: "aform_field-label" }, Ee = { class: "aform_display-value" }, Ke = ["for"], Qe = { class: "aform_checkbox-container aform_input-field" }, Ye = ["id", "disabled", "required"], Ge = ["innerHTML"], ze = /* @__PURE__ */ R({
9
9
  __name: "ACheckbox",
10
- props: /* @__PURE__ */ Q({
10
+ props: /* @__PURE__ */ K({
11
11
  schema: {},
12
12
  label: {},
13
13
  selectRange: { type: Boolean },
@@ -23,54 +23,54 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
23
23
  }),
24
24
  emits: ["update:modelValue"],
25
25
  setup(e) {
26
- const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue");
27
- return (c, t) => (u(), m("div", He, [
28
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
29
- a("label", Ee, g(e.label), 1),
30
- a("span", Ke, g(n.value ? "✓" : "✗"), 1)
31
- ], 64)) : (u(), m(L, { key: 1 }, [
26
+ const u = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = Y(e, "modelValue");
27
+ return (r, t) => (d(), f("div", Ue, [
28
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
29
+ a("label", Pe, g(e.label), 1),
30
+ a("span", Ee, g(n.value ? "✓" : "✗"), 1)
31
+ ], 64)) : (d(), f(p, { key: 1 }, [
32
32
  a("label", {
33
33
  class: "aform_field-label",
34
34
  for: e.uuid
35
- }, g(e.label), 9, Pe),
35
+ }, g(e.label), 9, Ke),
36
36
  a("span", Qe, [
37
- p(a("input", {
37
+ _(a("input", {
38
38
  id: e.uuid,
39
- "onUpdate:modelValue": t[0] || (t[0] = (d) => n.value = d),
39
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => n.value = c),
40
40
  type: "checkbox",
41
41
  class: "aform_checkbox",
42
42
  disabled: e.mode === "read",
43
43
  required: e.required
44
44
  }, null, 8, Ye), [
45
- [qe, n.value]
45
+ [Le, n.value]
46
46
  ])
47
47
  ]),
48
- p(a("p", {
48
+ _(a("p", {
49
49
  class: "aform_error",
50
- innerHTML: s.value
50
+ innerHTML: u.value
51
51
  }, null, 8, Ge), [
52
- [P, s.value]
52
+ [E, u.value]
53
53
  ])
54
54
  ], 64))
55
55
  ]));
56
56
  }
57
- }), H = (e, s) => {
57
+ }), H = (e, u) => {
58
58
  const n = e.__vccOpts || e;
59
- for (const [c, t] of s)
60
- n[c] = t;
59
+ for (const [r, t] of u)
60
+ n[r] = t;
61
61
  return n;
62
62
  }, We = /* @__PURE__ */ H(ze, [["__scopeId", "data-v-ca06741d"]]), Je = {
63
63
  key: 0,
64
64
  class: "aform_display-value"
65
- }, Xe = { class: "aform_form-link-wrapper" }, Ze = { class: "input-group" }, Oe = ["placeholder", "aria-label", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "onKeydown"], je = ["onKeydown"], et = ["aria-label"], tt = {
65
+ }, Oe = { class: "aform_form-link-wrapper" }, Xe = { class: "input-group" }, Ze = ["placeholder", "aria-label", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "onKeydown"], je = ["onKeydown"], et = ["aria-label"], tt = {
66
66
  key: 0,
67
67
  class: "autocomplete-result loading"
68
68
  }, at = ["id", "aria-selected", "onMousedown"], lt = {
69
69
  key: 0,
70
70
  class: "aform_field-label"
71
- }, nt = /* @__PURE__ */ V({
71
+ }, nt = /* @__PURE__ */ R({
72
72
  __name: "AFormLink",
73
- props: /* @__PURE__ */ Q({
73
+ props: /* @__PURE__ */ K({
74
74
  schema: {},
75
75
  label: {},
76
76
  selectRange: { type: Boolean },
@@ -98,39 +98,39 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
98
98
  }),
99
99
  emits: ["update:modelValue"],
100
100
  setup(e) {
101
- const s = `${e.uuid ?? `aform-link-${Fe()}`}-listbox`, n = G(e, "modelValue"), c = A(() => T(n.value) !== void 0), t = A(() => {
102
- const D = T(n.value);
103
- return D === void 0 ? "—" : e.formatter ? e.formatter(l(n.value)) : f(n.value) ?? D;
104
- }), d = I(c.value ? t.value : ""), y = I(!1), k = I(!1), v = I([]), h = I(null), x = re("aformLinkNavigator", null), $ = re("aformLinkResolver", null);
105
- function T(D) {
106
- if (D == null) return;
107
- if (typeof D == "string") return D === "" ? void 0 : D;
108
- if (typeof D == "number") return String(D);
109
- const C = D.id;
101
+ const u = `${e.uuid ?? `aform-link-${qe()}`}-listbox`, n = Y(e, "modelValue"), r = I(() => S(n.value) !== void 0), t = I(() => {
102
+ const w = S(n.value);
103
+ return w === void 0 ? "—" : e.formatter ? e.formatter(l(n.value)) : s(n.value) ?? w;
104
+ }), c = T(r.value ? t.value : ""), y = T(!1), k = T(!1), h = T([]), v = T(null), x = de("aformLinkNavigator", null), $ = de("aformLinkResolver", null);
105
+ function S(w) {
106
+ if (w == null) return;
107
+ if (typeof w == "string") return w === "" ? void 0 : w;
108
+ if (typeof w == "number") return String(w);
109
+ const C = w.id;
110
110
  if (!(C == null || C === ""))
111
111
  return String(C);
112
112
  }
113
- function f(D) {
114
- if (D == null || typeof D != "object") return;
115
- const C = D.displayText;
113
+ function s(w) {
114
+ if (w == null || typeof w != "object") return;
115
+ const C = w.displayText;
116
116
  return typeof C == "string" || typeof C == "number" ? String(C) : void 0;
117
117
  }
118
- function l(D) {
119
- if (D != null && typeof D == "object") return D;
120
- const C = T(D);
118
+ function l(w) {
119
+ if (w != null && typeof w == "object") return w;
120
+ const C = S(w);
121
121
  return C !== void 0 ? { id: C } : { id: "" };
122
122
  }
123
- Z(
124
- () => T(n.value),
125
- async (D) => {
126
- if (!(!D || f(n.value)))
123
+ O(
124
+ () => S(n.value),
125
+ async (w) => {
126
+ if (!(!w || s(n.value)))
127
127
  try {
128
- let C, E;
129
- if (e.filterFunction ? (C = (await (typeof e.filterFunction == "string" ? ce(e.filterFunction) : e.filterFunction)(String(D))).find((ue) => String(ue.id) === String(D)), E = C?.displayText, E === void 0 && console.warn(
130
- `[AFormLink] filterFunction returned no matching result for id "${D}". The function must return an item whose \`id\` exactly matches the search string.`
131
- )) : $ && e.doctype && (E = await $(e.doctype, D.toString()) ?? void 0), E) {
132
- const X = { ...l(n.value), ...C, id: D, displayText: E };
133
- d.value = e.formatter ? e.formatter(X) : E, n.value = X;
128
+ let C, P;
129
+ if (e.filterFunction ? (C = (await (typeof e.filterFunction == "string" ? ce(e.filterFunction) : e.filterFunction)(String(w))).find((ue) => String(ue.id) === String(w)), P = C?.displayText, P === void 0 && console.warn(
130
+ `[AFormLink] filterFunction returned no matching result for id "${w}". The function must return an item whose \`id\` exactly matches the search string.`
131
+ )) : $ && e.doctype && (P = await $(e.doctype, w.toString()) ?? void 0), P) {
132
+ const X = { ...l(n.value), ...C, id: w, displayText: P };
133
+ c.value = e.formatter ? e.formatter(X) : P, n.value = X;
134
134
  }
135
135
  } catch {
136
136
  }
@@ -138,108 +138,108 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
138
138
  { immediate: !0 }
139
139
  );
140
140
  const o = () => {
141
- const D = T(n.value);
142
- x && e.doctype && D !== void 0 ? x.navigate(e.doctype, D) : x && !e.doctype && console.warn(
141
+ const w = S(n.value);
142
+ x && e.doctype && w !== void 0 ? x.navigate(e.doctype, w) : x && !e.doctype && console.warn(
143
143
  "[AFormLink] Navigation requested but `doctype` prop is missing. Add `options` (or `doctype`) to the Link field definition to enable navigation."
144
144
  );
145
- }, i = async (D) => {
145
+ }, i = async (w) => {
146
146
  if (!(!e.filterFunction || e.mode === "read")) {
147
- h.value = null, y.value = !0, e.isAsync && (k.value = !0);
147
+ v.value = null, y.value = !0, e.isAsync && (k.value = !0);
148
148
  try {
149
149
  const C = typeof e.filterFunction == "string" ? ce(e.filterFunction) : e.filterFunction;
150
- v.value = await C(D) ?? [];
150
+ h.value = await C(w) ?? [];
151
151
  } catch {
152
- v.value = [];
152
+ h.value = [];
153
153
  } finally {
154
154
  k.value = !1;
155
155
  }
156
156
  }
157
- }, w = () => {
158
- y.value = !1, h.value = null, d.value = c.value ? t.value : "";
159
- }, r = () => {
160
- y.value && w();
161
- }, F = () => i(d.value), b = () => i(d.value), q = (D) => {
162
- n.value = D, d.value = e.formatter ? e.formatter(D) : D.displayText ?? String(D.id), y.value = !1, h.value = null;
157
+ }, D = () => {
158
+ y.value = !1, v.value = null, c.value = r.value ? t.value : "";
159
+ }, m = () => {
160
+ y.value && D();
161
+ }, q = () => i(c.value), b = () => i(c.value), L = (w) => {
162
+ n.value = w, c.value = e.formatter ? e.formatter(w) : w.displayText ?? String(w.id), y.value = !1, v.value = null;
163
163
  }, N = () => {
164
- const D = v.value.length;
165
- D && (h.value = h.value === null ? 0 : (h.value + 1) % D);
164
+ const w = h.value.length;
165
+ w && (v.value = v.value === null ? 0 : (v.value + 1) % w);
166
166
  }, W = () => {
167
- v.value.length && (h.value === null || h.value === 0 ? h.value = null : h.value -= 1);
167
+ h.value.length && (v.value === null || v.value === 0 ? v.value = null : v.value -= 1);
168
168
  }, te = () => {
169
- h.value !== null && v.value[h.value] && q(v.value[h.value]);
169
+ v.value !== null && h.value[v.value] && L(h.value[v.value]);
170
170
  };
171
- return (D, C) => (u(), m("div", {
172
- class: O(["aform_form-element", { "aform_form-element--embedded": e.embedded }])
171
+ return (w, C) => (d(), f("div", {
172
+ class: Z(["aform_form-element", { "aform_form-element--embedded": e.embedded }])
173
173
  }, [
174
- e.mode === "display" ? (u(), m("span", Je, g(t.value), 1)) : (u(), m(L, { key: 1 }, [
175
- p((u(), m("div", Xe, [
176
- a("div", Ze, [
177
- p(a("input", {
178
- "onUpdate:modelValue": C[0] || (C[0] = (E) => d.value = E),
174
+ e.mode === "display" ? (d(), f("span", Je, g(t.value), 1)) : (d(), f(p, { key: 1 }, [
175
+ _((d(), f("div", Oe, [
176
+ a("div", Xe, [
177
+ _(a("input", {
178
+ "onUpdate:modelValue": C[0] || (C[0] = (P) => c.value = P),
179
179
  type: "text",
180
180
  role: "combobox",
181
181
  autocomplete: "off",
182
182
  "aria-autocomplete": "list",
183
- class: O(["aform_input-field", { "aform_input-field--embedded": e.embedded }]),
183
+ class: Z(["aform_input-field", { "aform_input-field--embedded": e.embedded }]),
184
184
  placeholder: e.placeholder,
185
185
  "aria-label": e.ariaLabel,
186
186
  required: e.required,
187
187
  "aria-expanded": y.value,
188
- "aria-controls": y.value ? s : void 0,
189
- "aria-activedescendant": h.value === null ? void 0 : `${s}-opt-${h.value}`,
188
+ "aria-controls": y.value ? u : void 0,
189
+ "aria-activedescendant": v.value === null ? void 0 : `${u}-opt-${v.value}`,
190
190
  disabled: e.disabled || e.mode === "read",
191
191
  onInput: b,
192
- onFocus: F,
192
+ onFocus: q,
193
193
  onKeydown: [
194
- _(R(N, ["prevent"]), ["down"]),
195
- _(R(W, ["prevent"]), ["up"]),
196
- _(R(te, ["prevent"]), ["enter"]),
197
- _(w, ["esc"]),
198
- _(w, ["tab"])
194
+ F(V(N, ["prevent"]), ["down"]),
195
+ F(V(W, ["prevent"]), ["up"]),
196
+ F(V(te, ["prevent"]), ["enter"]),
197
+ F(D, ["esc"]),
198
+ F(D, ["tab"])
199
199
  ]
200
- }, null, 42, Oe), [
201
- [Y, d.value]
200
+ }, null, 42, Ze), [
201
+ [G, c.value]
202
202
  ]),
203
- c.value && !e.disabled && !e.embedded ? (u(), m("button", {
203
+ r.value && !e.disabled && !e.embedded ? (d(), f("button", {
204
204
  key: 0,
205
205
  type: "button",
206
206
  class: "aform_form-btn",
207
207
  onClick: o,
208
- onKeydown: _(R(o, ["prevent"]), ["enter"])
208
+ onKeydown: F(V(o, ["prevent"]), ["enter"])
209
209
  }, [
210
210
  a("span", null, g(e.icon === "chevron-right" ? "›" : "→"), 1)
211
211
  ], 40, je)) : B("", !0)
212
212
  ]),
213
- y.value ? (u(), m("ul", {
213
+ y.value ? (d(), f("ul", {
214
214
  key: 0,
215
- id: s,
215
+ id: u,
216
216
  class: "autocomplete-results",
217
217
  role: "listbox",
218
218
  "aria-label": e.ariaLabel
219
219
  }, [
220
- k.value ? (u(), m("li", tt, "Loading…")) : (u(!0), m(L, { key: 1 }, j(v.value, (E, X) => (u(), m("li", {
221
- id: `${s}-opt-${X}`,
222
- key: String(E.id),
220
+ k.value ? (d(), f("li", tt, "Loading…")) : (d(!0), f(p, { key: 1 }, j(h.value, (P, X) => (d(), f("li", {
221
+ id: `${u}-opt-${X}`,
222
+ key: String(P.id),
223
223
  role: "option",
224
- "aria-selected": X === h.value,
225
- class: O(["autocomplete-result", { "is-active": X === h.value }]),
226
- onMousedown: R((ie) => q(E), ["prevent"])
224
+ "aria-selected": X === v.value,
225
+ class: Z(["autocomplete-result", { "is-active": X === v.value }]),
226
+ onMousedown: V((ie) => L(P), ["prevent"])
227
227
  }, [
228
- fe(D.$slots, "option", { option: E }, () => [
229
- ne(g(E.displayText ?? String(E.id)), 1)
228
+ fe(w.$slots, "option", { option: P }, () => [
229
+ se(g(P.displayText ?? String(P.id)), 1)
230
230
  ], !0)
231
231
  ], 42, at))), 128))
232
232
  ], 8, et)) : B("", !0)
233
233
  ])), [
234
- [J(ye), r]
234
+ [J(ye), m]
235
235
  ]),
236
- e.label && !e.embedded ? (u(), m("label", lt, g(e.label), 1)) : B("", !0)
236
+ e.label && !e.embedded ? (d(), f("label", lt, g(e.label), 1)) : B("", !0)
237
237
  ], 64))
238
238
  ], 2));
239
239
  }
240
- }), Me = /* @__PURE__ */ H(nt, [["__scopeId", "data-v-154d79c9"]]), ot = { class: "aform_form-element acurrency" }, st = { class: "aform_display-value" }, it = { class: "aform_field-label" }, ut = { class: "acurrency__row" }, dt = { class: "acurrency__field acurrency__field--amount" }, rt = { class: "acurrency__group" }, ct = { class: "acurrency__currency" }, mt = { class: "acurrency__amount-wrap" }, ft = ["id", "disabled", "required"], vt = ["for"], yt = { class: "acurrency__row acurrency__row--base" }, ht = { class: "acurrency__field acurrency__field--base-currency" }, bt = ["value"], gt = { class: "aform_field-label" }, $t = { class: "acurrency__field acurrency__field--base-amount" }, kt = ["value"], xt = { class: "aform_field-label" }, wt = { class: "acurrency__field acurrency__field--exchange-rate" }, Dt = ["value"], Mt = { class: "aform_field-label" }, Tt = ["innerHTML"], ke = 6, St = /* @__PURE__ */ V({
240
+ }), Me = /* @__PURE__ */ H(nt, [["__scopeId", "data-v-154d79c9"]]), st = { class: "aform_form-element acurrency" }, ot = { class: "aform_display-value" }, it = { class: "aform_field-label" }, ut = { class: "acurrency__row" }, rt = { class: "acurrency__field acurrency__field--amount" }, dt = { class: "acurrency__group" }, ct = { class: "acurrency__currency" }, mt = { class: "acurrency__amount-wrap" }, ft = ["id", "disabled", "required"], vt = ["for"], yt = { class: "acurrency__row acurrency__row--base" }, ht = { class: "acurrency__field acurrency__field--base-currency" }, bt = ["value"], gt = { class: "aform_field-label" }, $t = { class: "acurrency__field acurrency__field--base-amount" }, kt = ["value"], xt = { class: "aform_field-label" }, Dt = { class: "acurrency__field acurrency__field--exchange-rate" }, wt = ["value"], Mt = { class: "aform_field-label" }, Tt = ["innerHTML"], xe = 6, St = /* @__PURE__ */ R({
241
241
  __name: "ACurrencyInput",
242
- props: /* @__PURE__ */ Q({
242
+ props: /* @__PURE__ */ K({
243
243
  schema: {},
244
244
  label: {},
245
245
  selectRange: { type: Boolean },
@@ -268,51 +268,51 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
268
268
  }),
269
269
  emits: ["update:modelValue"],
270
270
  setup(e) {
271
- const s = (r) => r.symbol ?? r.displayText ?? String(r.id), n = G(e, "modelValue"), c = A(() => {
272
- const r = e.options.baseCurrency ?? n.value?.baseCurrency;
273
- return r ? typeof r == "string" ? { id: r } : r : { id: "" };
274
- }), t = re("aformLinkResolver", null), d = I(c.value);
275
- Z(
276
- c,
277
- async (r) => {
278
- if (!r.id || r.displayText || !t || !e.options.doctype) {
279
- d.value = r;
271
+ const u = (m) => m.symbol ?? m.displayText ?? String(m.id), n = Y(e, "modelValue"), r = I(() => {
272
+ const m = e.options.baseCurrency ?? n.value?.baseCurrency;
273
+ return m ? typeof m == "string" ? { id: m } : m : { id: "" };
274
+ }), t = de("aformLinkResolver", null), c = T(r.value);
275
+ O(
276
+ r,
277
+ async (m) => {
278
+ if (!m.id || m.displayText || !t || !e.options.doctype) {
279
+ c.value = m;
280
280
  return;
281
281
  }
282
282
  try {
283
- const F = await t(e.options.doctype, String(r.id));
284
- d.value = F ? { ...r, displayText: F } : r;
283
+ const q = await t(e.options.doctype, String(m.id));
284
+ c.value = q ? { ...m, displayText: q } : m;
285
285
  } catch {
286
- d.value = r;
286
+ c.value = m;
287
287
  }
288
288
  },
289
289
  { immediate: !0 }
290
290
  );
291
- const y = A(() => {
292
- const r = d.value;
293
- return r?.id ? r.displayText ?? String(r.id) : "";
294
- }), k = (r) => {
295
- const F = d.value.id;
296
- return !r || String(r) === String(F) ? 1 : String(r) === String(n.value?.currency?.id) ? n.value?.exchangeRate ?? e.options.exchangeRates?.[String(r)] ?? 1 : e.options.exchangeRates?.[String(r)] ?? 1;
297
- }, v = A(() => {
298
- const { precision: r } = e.options;
299
- return r === void 0 ? ke : Number.isInteger(r) && r >= 0 && r <= 100 ? r : ke;
300
- }), h = (r) => Number(r.toFixed(v.value)), x = (r, F) => {
301
- const b = k(F.id);
291
+ const y = I(() => {
292
+ const m = c.value;
293
+ return m?.id ? m.displayText ?? String(m.id) : "";
294
+ }), k = (m) => {
295
+ const q = c.value.id;
296
+ return !m || String(m) === String(q) ? 1 : String(m) === String(n.value?.currency?.id) ? n.value?.exchangeRate ?? e.options.exchangeRates?.[String(m)] ?? 1 : e.options.exchangeRates?.[String(m)] ?? 1;
297
+ }, h = I(() => {
298
+ const { precision: m } = e.options;
299
+ return m === void 0 ? xe : Number.isInteger(m) && m >= 0 && m <= 100 ? m : xe;
300
+ }), v = (m) => Number(m.toFixed(h.value)), x = (m, q) => {
301
+ const b = k(q.id);
302
302
  n.value = {
303
- amount: r,
304
- currency: F,
303
+ amount: m,
304
+ currency: q,
305
305
  exchangeRate: b,
306
- baseCurrency: d.value,
307
- baseAmount: h(r * b)
306
+ baseCurrency: c.value,
307
+ baseAmount: v(m * b)
308
308
  };
309
- }, $ = A({
309
+ }, $ = I({
310
310
  get: () => n.value?.amount ?? 0,
311
- set: (r) => x(r, n.value?.currency ?? { id: "" })
312
- }), T = A({
311
+ set: (m) => x(m, n.value?.currency ?? { id: "" })
312
+ }), S = I({
313
313
  get: () => n.value?.currency ?? { id: "" },
314
- set: (r) => x(n.value?.amount ?? 0, r)
315
- }), f = /* @__PURE__ */ new Set([
314
+ set: (m) => x(n.value?.amount ?? 0, m)
315
+ }), s = /* @__PURE__ */ new Set([
316
316
  "Backspace",
317
317
  "Delete",
318
318
  "Tab",
@@ -324,56 +324,56 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
324
324
  "ArrowDown",
325
325
  "Home",
326
326
  "End"
327
- ]), l = (r) => {
328
- if (r.ctrlKey || r.metaKey || r.altKey || f.has(r.key) || /^[0-9]$/.test(r.key)) return;
329
- const F = r.target;
330
- r.key === "." && !F.value.includes(".") || r.key === "-" && !F.value.includes("-") || r.preventDefault();
331
- }, o = (r) => {
332
- const F = r.clipboardData?.getData("text") ?? "";
333
- /^-?\d*\.?\d*$/.test(F) || r.preventDefault();
334
- }, i = A(() => {
335
- const r = n.value;
336
- return !!r?.baseCurrency?.id && (r.currency?.id !== r.baseCurrency?.id || r.amount !== r.baseAmount);
337
- }), w = A(() => {
338
- const r = n.value;
339
- if (!r || !r.currency?.id) return "—";
340
- const F = r.currency.displayText ?? String(r.currency.id), b = `${r.amount} ${F}`;
327
+ ]), l = (m) => {
328
+ if (m.ctrlKey || m.metaKey || m.altKey || s.has(m.key) || /^[0-9]$/.test(m.key)) return;
329
+ const q = m.target;
330
+ m.key === "." && !q.value.includes(".") || m.key === "-" && !q.value.includes("-") || m.preventDefault();
331
+ }, o = (m) => {
332
+ const q = m.clipboardData?.getData("text") ?? "";
333
+ /^-?\d*\.?\d*$/.test(q) || m.preventDefault();
334
+ }, i = I(() => {
335
+ const m = n.value;
336
+ return !!m?.baseCurrency?.id && (m.currency?.id !== m.baseCurrency?.id || m.amount !== m.baseAmount);
337
+ }), D = I(() => {
338
+ const m = n.value;
339
+ if (!m || !m.currency?.id) return "—";
340
+ const q = m.currency.displayText ?? String(m.currency.id), b = `${m.amount} ${q}`;
341
341
  if (!i.value) return b;
342
- const q = r.baseCurrency.displayText ?? String(r.baseCurrency.id);
343
- return `${b} (${r.baseAmount} ${q})`;
342
+ const L = m.baseCurrency.displayText ?? String(m.baseCurrency.id);
343
+ return `${b} (${m.baseAmount} ${L})`;
344
344
  });
345
- return (r, F) => (u(), m("div", ot, [
346
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
347
- a("span", st, g(w.value), 1),
345
+ return (m, q) => (d(), f("div", st, [
346
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
347
+ a("span", ot, g(D.value), 1),
348
348
  a("label", it, g(e.label), 1)
349
- ], 64)) : (u(), m(L, { key: 1 }, [
349
+ ], 64)) : (d(), f(p, { key: 1 }, [
350
350
  a("div", ut, [
351
- a("div", dt, [
352
- a("div", rt, [
351
+ a("div", rt, [
352
+ a("div", dt, [
353
353
  a("div", ct, [
354
354
  oe(Me, {
355
- modelValue: T.value,
356
- "onUpdate:modelValue": F[0] || (F[0] = (b) => T.value = b),
355
+ modelValue: S.value,
356
+ "onUpdate:modelValue": q[0] || (q[0] = (b) => S.value = b),
357
357
  mode: e.mode,
358
358
  embedded: "",
359
359
  placeholder: e.currencyLabel,
360
360
  "aria-label": e.currencyLabel,
361
361
  required: e.required,
362
- formatter: s,
362
+ formatter: u,
363
363
  doctype: e.options.doctype,
364
364
  "filter-function": e.options.filterFunction,
365
365
  "is-async": e.options.isAsync
366
366
  }, {
367
- option: _e(({ option: b }) => [
368
- ne(g(b.symbol ? `${b.symbol} — ` : "") + g(b.displayText ?? b.id), 1)
367
+ option: Fe(({ option: b }) => [
368
+ se(g(b.symbol ? `${b.symbol} — ` : "") + g(b.displayText ?? b.id), 1)
369
369
  ]),
370
370
  _: 1
371
371
  }, 8, ["modelValue", "mode", "placeholder", "aria-label", "required", "doctype", "filter-function", "is-async"])
372
372
  ]),
373
373
  a("div", mt, [
374
- p(a("input", {
374
+ _(a("input", {
375
375
  id: e.uuid,
376
- "onUpdate:modelValue": F[1] || (F[1] = (b) => $.value = b),
376
+ "onUpdate:modelValue": q[1] || (q[1] = (b) => $.value = b),
377
377
  class: "acurrency__amount",
378
378
  type: "number",
379
379
  disabled: e.mode === "read",
@@ -382,7 +382,7 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
382
382
  onPaste: o
383
383
  }, null, 40, ft), [
384
384
  [
385
- Y,
385
+ G,
386
386
  $.value,
387
387
  void 0,
388
388
  { number: !0 }
@@ -415,35 +415,35 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
415
415
  }, null, 8, kt),
416
416
  a("label", xt, g(e.baseAmountLabel), 1)
417
417
  ]),
418
- a("div", wt, [
418
+ a("div", Dt, [
419
419
  a("input", {
420
420
  value: n.value.exchangeRate,
421
421
  class: "aform_input-field acurrency__base-field",
422
422
  type: "number",
423
423
  disabled: ""
424
- }, null, 8, Dt),
424
+ }, null, 8, wt),
425
425
  a("label", Mt, g(e.exchangeRateLabel), 1)
426
426
  ])
427
427
  ]),
428
- p(a("p", {
428
+ _(a("p", {
429
429
  class: "aform_error",
430
430
  innerHTML: e.validation.errorMessage
431
431
  }, null, 8, Tt), [
432
- [P, e.validation.errorMessage]
432
+ [E, e.validation.errorMessage]
433
433
  ])
434
434
  ], 64))
435
435
  ]));
436
436
  }
437
- }), It = /* @__PURE__ */ H(St, [["__scopeId", "data-v-15bec6ef"]]), At = { class: "aform_display-value" }, pt = { key: 0 }, Lt = ["innerHTML"], qt = {
437
+ }), It = /* @__PURE__ */ H(St, [["__scopeId", "data-v-15bec6ef"]]), At = { class: "aform_display-value" }, pt = { key: 0 }, _t = ["innerHTML"], Lt = {
438
438
  ref: "datepicker",
439
439
  class: "adatepicker",
440
440
  tabindex: "0"
441
- }, Ft = {
441
+ }, qt = {
442
442
  colspan: "5",
443
443
  tabindex: -1
444
- }, _t = { key: 0 }, Ct = { colspan: "7" }, Bt = { class: "date-input" }, Rt = ["value"], Vt = ["value"], Nt = ["onClick", "onKeydown", "onMouseover"], Ut = ["innerHTML"], Ht = 6, xe = 7, Et = /* @__PURE__ */ V({
444
+ }, Ft = { key: 0 }, Ct = { colspan: "7" }, Bt = { class: "date-input" }, Rt = ["value"], Vt = ["value"], Ht = ["onClick", "onKeydown", "onMouseover"], Nt = ["innerHTML"], Ut = 6, De = 7, Pt = /* @__PURE__ */ R({
445
445
  __name: "ADatePicker",
446
- props: /* @__PURE__ */ Q({
446
+ props: /* @__PURE__ */ K({
447
447
  schema: {},
448
448
  label: {},
449
449
  selectRange: { type: Boolean, default: !1 },
@@ -457,68 +457,68 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
457
457
  modelValue: { default: () => /* @__PURE__ */ new Date() },
458
458
  modelModifiers: {}
459
459
  }),
460
- emits: /* @__PURE__ */ Q(["get-date"], ["update:modelValue"]),
461
- setup(e, { expose: s, emit: n }) {
462
- const c = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), t = G(e, "modelValue"), d = I(new Date(t.value)), y = I(d.value.getMonth()), k = I(d.value.getFullYear()), v = I([]), h = I(new Date(t.value)), x = I(null), $ = I(null), T = le("start-date-input"), f = le("end-date-input"), l = n, o = A(() => new Date(k.value, y.value, 1).toLocaleDateString(void 0, {
460
+ emits: /* @__PURE__ */ K(["get-date"], ["update:modelValue"]),
461
+ setup(e, { expose: u, emit: n }) {
462
+ const r = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), t = Y(e, "modelValue"), c = T(new Date(t.value)), y = T(c.value.getMonth()), k = T(c.value.getFullYear()), h = T([]), v = T(new Date(t.value)), x = T(null), $ = T(null), S = ne("start-date-input"), s = ne("end-date-input"), l = n, o = I(() => new Date(k.value, y.value, 1).toLocaleDateString(void 0, {
463
463
  year: "numeric",
464
464
  month: "long"
465
- })), i = A(() => x.value != null ? r(x.value) : ""), w = A(() => $.value != null ? r($.value) : ""), r = (M) => z(M) ? M.getMonth() + 1 + "/" + M.getDate() + "/" + M.getFullYear() : "", F = (M) => {
466
- const S = /* @__PURE__ */ new Date();
467
- return y.value !== S.getMonth() ? !1 : S.toDateString() === new Date(M).toDateString();
468
- }, b = (M) => new Date(M).toDateString() === new Date(d.value).toDateString(), q = (M) => {
469
- const S = x.value;
470
- return z(S) ? new Date(M).toDateString() === S.toDateString() : !1;
465
+ })), i = I(() => x.value != null ? m(x.value) : ""), D = I(() => $.value != null ? m($.value) : ""), m = (M) => z(M) ? M.getMonth() + 1 + "/" + M.getDate() + "/" + M.getFullYear() : "", q = (M) => {
466
+ const A = /* @__PURE__ */ new Date();
467
+ return y.value !== A.getMonth() ? !1 : A.toDateString() === new Date(M).toDateString();
468
+ }, b = (M) => new Date(M).toDateString() === new Date(c.value).toDateString(), L = (M) => {
469
+ const A = x.value;
470
+ return z(A) ? new Date(M).toDateString() === A.toDateString() : !1;
471
471
  }, N = (M) => {
472
- const S = $.value;
473
- return z(S) ? new Date(M).toDateString() === S.toDateString() : !1;
474
- }, W = (M, S) => (M - 1) * xe + S, te = (M) => {
475
- const S = x.value;
476
- if (!z(S)) return !1;
477
- const U = new Date(M), K = $.value, ae = z(K) ? K : new Date(h.value);
478
- return U.getTime() > S.getTime() && U.getTime() < ae.getTime();
479
- }, D = (M, S) => v.value[W(M, S)], C = (M) => {
480
- h.value = new Date(v.value[M]);
481
- }, E = (M) => {
472
+ const A = $.value;
473
+ return z(A) ? new Date(M).toDateString() === A.toDateString() : !1;
474
+ }, W = (M, A) => (M - 1) * De + A, te = (M) => {
475
+ const A = x.value;
476
+ if (!z(A)) return !1;
477
+ const U = new Date(M), Q = $.value, le = z(Q) ? Q : new Date(v.value);
478
+ return U.getTime() > A.getTime() && U.getTime() < le.getTime();
479
+ }, w = (M, A) => h.value[W(M, A)], C = (M) => {
480
+ v.value = new Date(h.value[M]);
481
+ }, P = (M) => {
482
482
  M.target?.tagName !== "INPUT" && M.preventDefault();
483
483
  }, X = () => {
484
- v.value = [];
485
- const M = new Date(k.value, y.value, 1), S = M.getDay(), U = M.setDate(M.getDate() - S);
486
- for (const K of Array(43).keys())
487
- v.value.push(U + K * 864e5);
484
+ h.value = [];
485
+ const M = new Date(k.value, y.value, 1), A = M.getDay(), U = M.setDate(M.getDate() - A);
486
+ for (const Q of Array(43).keys())
487
+ h.value.push(U + Q * 864e5);
488
488
  }, ie = () => k.value -= 1, ue = () => k.value += 1, Ie = () => {
489
489
  y.value == 0 ? (y.value = 11, ie()) : y.value -= 1;
490
490
  }, Ae = () => {
491
491
  y.value == 11 ? (y.value = 0, ue()) : y.value += 1;
492
- }, he = (M) => {
493
- M.key === "Enter" && de();
494
492
  }, be = (M) => {
495
- if (t.value = d.value = new Date(v.value[M]), e.selectRange) {
496
- const S = x.value;
497
- S == null || $.value != null ? (x.value = t.value, $.value = null) : z(S) && d.value.getTime() < S.getTime() ? ($.value = null, x.value = t.value) : $.value = t.value, T.value && (T.value.value = r(x.value) ?? ""), f.value && (f.value.value = r($.value) ?? "");
493
+ M.key === "Enter" && re();
494
+ }, ge = (M) => {
495
+ if (t.value = c.value = new Date(h.value[M]), e.selectRange) {
496
+ const A = x.value;
497
+ A == null || $.value != null ? (x.value = t.value, $.value = null) : z(A) && c.value.getTime() < A.getTime() ? ($.value = null, x.value = t.value) : $.value = t.value, S.value && (S.value.value = m(x.value) ?? ""), s.value && (s.value.value = m($.value) ?? "");
498
498
  }
499
- ge();
499
+ $e();
500
500
  }, pe = () => {
501
- const M = x.value, S = $.value;
502
- z(S) && z(M) && S.getTime() < M.getTime() && ([x.value, $.value] = [S, M]);
503
- }, z = (M) => M instanceof Date && !isNaN(M.getTime()), de = () => {
504
- if (T.value?.value == "")
501
+ const M = x.value, A = $.value;
502
+ z(A) && z(M) && A.getTime() < M.getTime() && ([x.value, $.value] = [A, M]);
503
+ }, z = (M) => M instanceof Date && !isNaN(M.getTime()), re = () => {
504
+ if (S.value?.value == "")
505
505
  x.value = null;
506
- else if (T.value) {
507
- const M = new Date(T.value.value);
506
+ else if (S.value) {
507
+ const M = new Date(S.value.value);
508
508
  x.value = z(M) ? M : null;
509
509
  }
510
- if (f.value?.value == "")
510
+ if (s.value?.value == "")
511
511
  $.value = null;
512
- else if (f.value) {
513
- const M = new Date(f.value.value);
512
+ else if (s.value) {
513
+ const M = new Date(s.value.value);
514
514
  $.value = z(M) ? M : null;
515
515
  }
516
- z(x.value) && (z($.value) && pe(), d.value = x.value), ge();
517
- }, ge = () => {
516
+ z(x.value) && (z($.value) && pe(), c.value = x.value), $e();
517
+ }, $e = () => {
518
518
  l("get-date", {
519
519
  start: e.selectRange ? x.value : null,
520
520
  end: e.selectRange ? $.value : null,
521
- selected: d.value
521
+ selected: c.value
522
522
  });
523
523
  };
524
524
  return we(async () => {
@@ -527,21 +527,21 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
527
527
  if (M.length > 0)
528
528
  M[0].focus();
529
529
  else {
530
- const S = document.getElementsByClassName("todaysDate");
531
- S.length > 0 && S[0].focus();
530
+ const A = document.getElementsByClassName("todaysDate");
531
+ A.length > 0 && A[0].focus();
532
532
  }
533
- }), Z([y, k], X), s({ currentMonth: y, currentYear: k, selectedDate: d }), (M, S) => e.mode === "display" || e.mode === "read" ? (u(), m(L, { key: 0 }, [
533
+ }), O([y, k], X), u({ currentMonth: y, currentYear: k, selectedDate: c }), (M, A) => e.mode === "display" || e.mode === "read" ? (d(), f(p, { key: 0 }, [
534
534
  a("span", At, g(t.value ? new Date(t.value).toLocaleDateString() : ""), 1),
535
- e.label ? (u(), m("label", pt, g(e.label), 1)) : B("", !0),
536
- p(a("p", {
535
+ e.label ? (d(), f("label", pt, g(e.label), 1)) : B("", !0),
536
+ _(a("p", {
537
537
  class: "aform_error",
538
- innerHTML: c.value
539
- }, null, 8, Lt), [
540
- [P, c.value]
538
+ innerHTML: r.value
539
+ }, null, 8, _t), [
540
+ [E, r.value]
541
541
  ])
542
- ], 64)) : (u(), m(L, { key: 1 }, [
543
- a("div", qt, [
544
- a("table", { onMousedown: E }, [
542
+ ], 64)) : (d(), f(p, { key: 1 }, [
543
+ a("div", Lt, [
544
+ a("table", { onMousedown: P }, [
545
545
  a("tbody", null, [
546
546
  a("tr", null, [
547
547
  a("td", {
@@ -549,14 +549,14 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
549
549
  tabindex: -1,
550
550
  onClick: Ie
551
551
  }, "<"),
552
- a("th", Ft, g(o.value), 1),
552
+ a("th", qt, g(o.value), 1),
553
553
  a("td", {
554
554
  id: "next-month-btn",
555
555
  tabindex: -1,
556
556
  onClick: Ae
557
557
  }, ">")
558
558
  ]),
559
- e.selectRange ? (u(), m("tr", _t, [
559
+ e.selectRange ? (d(), f("tr", Ft, [
560
560
  a("td", Ct, [
561
561
  a("div", Bt, [
562
562
  a("input", {
@@ -565,23 +565,23 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
565
565
  class: "date-input-start aform_input-field",
566
566
  type: "text",
567
567
  placeholder: "start date",
568
- onBlur: S[0] || (S[0] = (U) => de()),
569
- onKeydown: he
568
+ onBlur: A[0] || (A[0] = (U) => re()),
569
+ onKeydown: be
570
570
  }, null, 40, Rt),
571
- S[2] || (S[2] = a("div", null, "-", -1)),
571
+ A[2] || (A[2] = a("div", null, "-", -1)),
572
572
  a("input", {
573
573
  ref: "end-date-input",
574
- value: w.value,
574
+ value: D.value,
575
575
  class: "date-input-end aform_input-field",
576
576
  type: "text",
577
577
  placeholder: "end date",
578
- onBlur: S[1] || (S[1] = (U) => de()),
579
- onKeydown: he
578
+ onBlur: A[1] || (A[1] = (U) => re()),
579
+ onKeydown: be
580
580
  }, null, 40, Vt)
581
581
  ])
582
582
  ])
583
583
  ])) : B("", !0),
584
- S[3] || (S[3] = a("tr", { class: "days-header" }, [
584
+ A[3] || (A[3] = a("tr", { class: "days-header" }, [
585
585
  a("td", null, "M"),
586
586
  a("td", null, "T"),
587
587
  a("td", null, "W"),
@@ -590,42 +590,42 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
590
590
  a("td", null, "S"),
591
591
  a("td", null, "S")
592
592
  ], -1)),
593
- (u(), m(L, null, j(Ht, (U) => a("tr", { key: U }, [
594
- (u(), m(L, null, j(xe, (K) => a("td", {
593
+ (d(), f(p, null, j(Ut, (U) => a("tr", { key: U }, [
594
+ (d(), f(p, null, j(De, (Q) => a("td", {
595
595
  ref_for: !0,
596
596
  ref: "celldate",
597
- key: W(U, K),
598
- class: O(["date-cell", {
599
- todaysDate: F(D(U, K)),
600
- selectedDate: b(D(U, K)),
601
- withinRange: e.selectRange ? te(D(U, K)) : !1,
602
- startDate: e.selectRange ? q(D(U, K)) : !1,
603
- endDate: e.selectRange ? N(D(U, K)) : !1
597
+ key: W(U, Q),
598
+ class: Z(["date-cell", {
599
+ todaysDate: q(w(U, Q)),
600
+ selectedDate: b(w(U, Q)),
601
+ withinRange: e.selectRange ? te(w(U, Q)) : !1,
602
+ startDate: e.selectRange ? L(w(U, Q)) : !1,
603
+ endDate: e.selectRange ? N(w(U, Q)) : !1
604
604
  }]),
605
605
  contenteditable: !1,
606
606
  spellcheck: !1,
607
607
  tabindex: 0,
608
- onClick: R((ae) => be(W(U, K)), ["prevent", "stop"]),
609
- onKeydown: _((ae) => be(W(U, K)), ["enter"]),
610
- onMouseover: (ae) => C(W(U, K))
611
- }, g(new Date(D(U, K)).getDate()), 43, Nt)), 64))
608
+ onClick: V((le) => ge(W(U, Q)), ["prevent", "stop"]),
609
+ onKeydown: F((le) => ge(W(U, Q)), ["enter"]),
610
+ onMouseover: (le) => C(W(U, Q))
611
+ }, g(new Date(w(U, Q)).getDate()), 43, Ht)), 64))
612
612
  ])), 64))
613
613
  ])
614
614
  ], 32)
615
615
  ], 512),
616
- p(a("p", {
616
+ _(a("p", {
617
617
  class: "aform_error",
618
- innerHTML: c.value
619
- }, null, 8, Ut), [
620
- [P, c.value]
618
+ innerHTML: r.value
619
+ }, null, 8, Nt), [
620
+ [E, r.value]
621
621
  ])
622
622
  ], 64));
623
623
  }
624
- }), Te = /* @__PURE__ */ H(Et, [["__scopeId", "data-v-322c2ceb"]]), Kt = { class: "adate_time" }, Pt = { class: "adate_time_fields" }, Qt = ["onKeydown"], Yt = ["onKeydown"], Gt = {
624
+ }), Te = /* @__PURE__ */ H(Pt, [["__scopeId", "data-v-322c2ceb"]]), Et = { class: "adate_time" }, Kt = { class: "adate_time_fields" }, Qt = ["onKeydown"], Yt = ["onKeydown"], Gt = {
625
625
  key: 0,
626
626
  class: "colon"
627
- }, zt = ["onKeydown"], Wt = /* @__PURE__ */ V({
628
- __name: "ADateTime",
627
+ }, zt = ["onKeydown"], Wt = /* @__PURE__ */ R({
628
+ __name: "ADateTimeInput",
629
629
  props: {
630
630
  allowMilitaryTime: { type: Boolean, default: !1 },
631
631
  defaultHours: { default: 12 },
@@ -635,145 +635,146 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
635
635
  useSeconds: { type: Boolean, default: !0 }
636
636
  },
637
637
  emits: ["get-time"],
638
- setup(e, { emit: s }) {
639
- const n = s, c = le("meridiem-selector"), t = ve({
638
+ setup(e, { emit: u }) {
639
+ const n = u, r = ne("meridiem-selector"), t = ve({
640
640
  hours: String(e.defaultHours).padStart(2, "0"),
641
641
  minutes: String(e.defaultMinutes).padStart(2, "0"),
642
642
  seconds: String(e.defaultSeconds).padStart(2, "0")
643
- }), d = I(e.defaultMeridiem == "AM" ? "AM" : "PM");
643
+ }), c = T(e.defaultMeridiem == "AM" ? "AM" : "PM");
644
644
  we(() => {
645
- k();
645
+ k("init");
646
646
  });
647
647
  const y = () => {
648
- const f = e.allowMilitaryTime ? 23 : 12, l = e.allowMilitaryTime ? 0 : 1;
649
- let o = Number(t.hours), i = Number(t.minutes), w = Number(t.seconds);
650
- (isNaN(o) || t.hours === "" || o > f) && (o = f), !e.allowMilitaryTime && o < l && (o = l), (isNaN(i) || t.minutes === "" || i > 59) && (i = 59), (isNaN(w) || t.seconds === "" || w > 59) && (w = 59), t.hours = String(o).padStart(2, "0"), t.minutes = String(i).padStart(2, "0"), t.seconds = String(w).padStart(2, "0"), k();
651
- }, k = () => {
652
- const f = Number(t.hours), l = Number(t.minutes), o = Number(t.seconds);
648
+ const s = e.allowMilitaryTime ? 23 : 12, l = e.allowMilitaryTime ? 0 : 1;
649
+ let o = Number(t.hours), i = Number(t.minutes), D = Number(t.seconds);
650
+ (isNaN(o) || t.hours === "" || o > s) && (o = s), !e.allowMilitaryTime && o < l && (o = l), (isNaN(i) || t.minutes === "" || i > 59) && (i = 59), (isNaN(D) || t.seconds === "" || D > 59) && (D = 59), t.hours = String(o).padStart(2, "0"), t.minutes = String(i).padStart(2, "0"), t.seconds = String(D).padStart(2, "0"), k("user");
651
+ }, k = (s) => {
652
+ const l = Number(t.hours), o = Number(t.minutes), i = Number(t.seconds);
653
653
  n("get-time", {
654
- hours: f,
655
- minutes: l,
656
- seconds: o,
657
- meridiem: d.value,
658
- militaryTime: e.allowMilitaryTime ? f : d.value === "PM" ? f === 12 ? 12 : f + 12 : f % 12
654
+ hours: l,
655
+ minutes: o,
656
+ seconds: i,
657
+ source: s,
658
+ meridiem: c.value,
659
+ militaryTime: e.allowMilitaryTime ? l : c.value === "PM" ? l === 12 ? 12 : l + 12 : l % 12
659
660
  });
660
- }, v = (f) => {
661
- const l = f.target;
661
+ }, h = (s) => {
662
+ const l = s.target;
662
663
  l instanceof HTMLInputElement && l.select();
663
- }, h = (f, l = 1) => {
664
+ }, v = (s, l = 1) => {
664
665
  const o = e.allowMilitaryTime ? 23 : 12, i = e.allowMilitaryTime ? 0 : 1;
665
- if (f == "hours") {
666
- const F = Number(t.hours);
667
- t.hours = String(F + l), (F == 11 && Number(t.hours) == 12 || F == 12 && Number(t.hours) == 11) && $();
668
- } else f == "minutes" ? t.minutes = String(Number(t.minutes) + l) : f == "seconds" && (t.seconds = String(Number(t.seconds) + l));
669
- const w = Number(t.hours);
670
- Number(t.seconds) < 0 ? t.minutes = String(Number(t.minutes) - 1) : Number(t.seconds) > 59 && (t.minutes = String(Number(t.minutes) + 1)), Number(t.minutes) < 0 ? t.hours = String(w - 1) : Number(t.minutes) > 59 && (t.hours = String(w + 1));
671
- const r = Number(t.hours);
672
- !e.allowMilitaryTime && r !== w && (w === 11 && r === 12 || w === 12 && r === 11) && $(), t.hours = String(x(Number(t.hours), i, o)).padStart(2, "0"), t.minutes = String(x(Number(t.minutes), 0, 59)).padStart(2, "0"), t.seconds = String(x(Number(t.seconds), 0, 59)).padStart(2, "0");
666
+ if (s == "hours") {
667
+ const q = Number(t.hours);
668
+ t.hours = String(q + l), (q == 11 && Number(t.hours) == 12 || q == 12 && Number(t.hours) == 11) && $();
669
+ } else s == "minutes" ? t.minutes = String(Number(t.minutes) + l) : s == "seconds" && (t.seconds = String(Number(t.seconds) + l));
670
+ const D = Number(t.hours);
671
+ Number(t.seconds) < 0 ? t.minutes = String(Number(t.minutes) - 1) : Number(t.seconds) > 59 && (t.minutes = String(Number(t.minutes) + 1)), Number(t.minutes) < 0 ? t.hours = String(D - 1) : Number(t.minutes) > 59 && (t.hours = String(D + 1));
672
+ const m = Number(t.hours);
673
+ !e.allowMilitaryTime && m !== D && (D === 11 && m === 12 || D === 12 && m === 11) && $(), t.hours = String(x(Number(t.hours), i, o)).padStart(2, "0"), t.minutes = String(x(Number(t.minutes), 0, 59)).padStart(2, "0"), t.seconds = String(x(Number(t.seconds), 0, 59)).padStart(2, "0");
673
674
  };
674
- Z(
675
+ O(
675
676
  () => t.hours,
676
- (f, l) => {
677
- t.hours = Number(f) > 99 ? l : f;
677
+ (s, l) => {
678
+ t.hours = Number(s) > 99 ? l : s;
678
679
  }
679
- ), Z(
680
+ ), O(
680
681
  () => t.minutes,
681
- (f, l) => {
682
- t.minutes = Number(f) > 99 ? l : f;
682
+ (s, l) => {
683
+ t.minutes = Number(s) > 99 ? l : s;
683
684
  }
684
- ), Z(
685
+ ), O(
685
686
  () => t.seconds,
686
- (f, l) => {
687
- t.seconds = Number(f) > 99 ? l : f;
687
+ (s, l) => {
688
+ t.seconds = Number(s) > 99 ? l : s;
688
689
  }
689
690
  );
690
- const x = (f, l, o) => f > o ? l : f < l ? o : f, $ = () => {
691
- d.value = d.value == "PM" ? "AM" : "PM", k();
692
- }, T = (f, l = !1) => {
693
- f.stopPropagation(), f.preventDefault();
694
- const o = f.clipboardData;
691
+ const x = (s, l, o) => s > o ? l : s < l ? o : s, $ = () => {
692
+ c.value = c.value == "PM" ? "AM" : "PM", k("user");
693
+ }, S = (s, l = !1) => {
694
+ s.stopPropagation(), s.preventDefault();
695
+ const o = s.clipboardData;
695
696
  if (!o) return;
696
697
  let i = o.getData("Text");
697
698
  if (i = i.replace(/[^0-9]/g, ""), l) {
698
699
  i.length % 2 != 0 && (i = "0" + i), i.length < 3 && (i += "00"), i.length < 5 && (i += "00");
699
- const w = i.match(/(..?)/g);
700
- if (!w || w.length < 3) return;
701
- t.seconds = w[2], t.minutes = w[1], t.hours = w[0], y(), e.allowMilitaryTime || c.value?.focus();
700
+ const D = i.match(/(..?)/g);
701
+ if (!D || D.length < 3) return;
702
+ t.seconds = D[2], t.minutes = D[1], t.hours = D[0], y(), e.allowMilitaryTime || r.value?.focus();
702
703
  } else {
703
704
  i.length > 2 && (i = i.slice(0, 2));
704
- const w = f.target;
705
- w instanceof HTMLInputElement && (w.value = i, w.dispatchEvent(new Event("input")));
705
+ const D = s.target;
706
+ D instanceof HTMLInputElement && (D.value = i, D.dispatchEvent(new Event("input")));
706
707
  }
707
708
  };
708
- return (f, l) => (u(), m("div", Kt, [
709
- a("div", Pt, [
710
- p(a("input", {
709
+ return (s, l) => (d(), f("div", Et, [
710
+ a("div", Kt, [
711
+ _(a("input", {
711
712
  "onUpdate:modelValue": l[0] || (l[0] = (o) => t.hours = o),
712
713
  type: "text",
713
714
  inputmode: "numeric",
714
- onPaste: l[1] || (l[1] = (o) => T(o, !0)),
715
- onFocus: v,
715
+ onPaste: l[1] || (l[1] = (o) => S(o, !0)),
716
+ onFocus: h,
716
717
  onBlur: y,
717
718
  onKeydown: [
718
- _(R(y, ["prevent"]), ["enter"]),
719
- l[2] || (l[2] = _(R((o) => h("hours"), ["prevent"]), ["up"])),
720
- l[3] || (l[3] = _(R((o) => h("hours", -1), ["prevent"]), ["down"]))
719
+ F(V(y, ["prevent"]), ["enter"]),
720
+ l[2] || (l[2] = F(V((o) => v("hours"), ["prevent"]), ["up"])),
721
+ l[3] || (l[3] = F(V((o) => v("hours", -1), ["prevent"]), ["down"]))
721
722
  ]
722
723
  }, null, 40, Qt), [
723
- [Y, t.hours]
724
+ [G, t.hours]
724
725
  ]),
725
726
  l[12] || (l[12] = a("span", { class: "colon" }, ":", -1)),
726
- p(a("input", {
727
+ _(a("input", {
727
728
  "onUpdate:modelValue": l[4] || (l[4] = (o) => t.minutes = o),
728
729
  type: "text",
729
730
  inputmode: "numeric",
730
- onPaste: T,
731
- onFocus: v,
731
+ onPaste: S,
732
+ onFocus: h,
732
733
  onBlur: y,
733
734
  onKeydown: [
734
- _(R(y, ["prevent"]), ["enter"]),
735
- l[5] || (l[5] = _(R((o) => h("minutes"), ["prevent"]), ["up"])),
736
- l[6] || (l[6] = _(R((o) => h("minutes", -1), ["prevent"]), ["down"]))
735
+ F(V(y, ["prevent"]), ["enter"]),
736
+ l[5] || (l[5] = F(V((o) => v("minutes"), ["prevent"]), ["up"])),
737
+ l[6] || (l[6] = F(V((o) => v("minutes", -1), ["prevent"]), ["down"]))
737
738
  ]
738
739
  }, null, 40, Yt), [
739
- [Y, t.minutes]
740
+ [G, t.minutes]
740
741
  ]),
741
- e.useSeconds ? (u(), m("span", Gt, ":")) : B("", !0),
742
- e.useSeconds ? p((u(), m("input", {
742
+ e.useSeconds ? (d(), f("span", Gt, ":")) : B("", !0),
743
+ e.useSeconds ? _((d(), f("input", {
743
744
  key: 1,
744
745
  "onUpdate:modelValue": l[7] || (l[7] = (o) => t.seconds = o),
745
746
  type: "text",
746
747
  inputmode: "numeric",
747
- onPaste: T,
748
- onFocus: v,
748
+ onPaste: S,
749
+ onFocus: h,
749
750
  onBlur: y,
750
751
  onKeydown: [
751
- _(R(y, ["prevent"]), ["enter"]),
752
- l[8] || (l[8] = _(R((o) => h("seconds"), ["prevent"]), ["up"])),
753
- l[9] || (l[9] = _(R((o) => h("seconds", -1), ["prevent"]), ["down"]))
752
+ F(V(y, ["prevent"]), ["enter"]),
753
+ l[8] || (l[8] = F(V((o) => v("seconds"), ["prevent"]), ["up"])),
754
+ l[9] || (l[9] = F(V((o) => v("seconds", -1), ["prevent"]), ["down"]))
754
755
  ]
755
756
  }, null, 40, zt)), [
756
- [Y, t.seconds]
757
+ [G, t.seconds]
757
758
  ]) : B("", !0),
758
- e.allowMilitaryTime ? B("", !0) : p((u(), m("select", {
759
+ e.allowMilitaryTime ? B("", !0) : _((d(), f("select", {
759
760
  key: 2,
760
761
  ref: "meridiem-selector",
761
- "onUpdate:modelValue": l[10] || (l[10] = (o) => d.value = o),
762
+ "onUpdate:modelValue": l[10] || (l[10] = (o) => c.value = o),
762
763
  class: "aform-select meridiem-selector",
763
764
  onChange: y
764
765
  }, [...l[11] || (l[11] = [
765
766
  a("option", { value: "AM" }, "AM", -1),
766
767
  a("option", { value: "PM" }, "PM", -1)
767
768
  ])], 544)), [
768
- [Be, d.value]
769
+ [Be, c.value]
769
770
  ])
770
771
  ])
771
772
  ]));
772
773
  }
773
- }), me = /* @__PURE__ */ H(Wt, [["__scopeId", "data-v-959a3e41"]]), Jt = { class: "adate-selection" }, Xt = {
774
+ }), me = /* @__PURE__ */ H(Wt, [["__scopeId", "data-v-95ad0aa4"]]), Jt = { class: "adate-selection" }, Ot = {
774
775
  key: 3,
775
776
  class: "empty"
776
- }, Zt = /* @__PURE__ */ V({
777
+ }, Xt = /* @__PURE__ */ R({
777
778
  __name: "ADateSelection",
778
779
  props: {
779
780
  showDate: { type: Boolean, default: !0 },
@@ -788,13 +789,13 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
788
789
  useSeconds: { type: Boolean, default: !0 }
789
790
  },
790
791
  emits: ["get-date", "get-time", "get-range"],
791
- setup(e, { emit: s }) {
792
- const n = s;
792
+ setup(e, { emit: u }) {
793
+ const n = u;
793
794
  Re("select-range", e.selectRange);
794
- const c = /* @__PURE__ */ new Date(), t = I(c), d = I(c), y = I(0), k = I(0), v = (l, o) => {
795
+ const r = /* @__PURE__ */ new Date(), t = T(r), c = T(r), y = T(0), k = T(0), h = (l, o) => {
795
796
  const i = new Date(l);
796
797
  return i.setHours(0, 0, 0, 0), new Date(i.getTime() + o);
797
- }, h = (l) => {
798
+ }, v = (l) => {
798
799
  let o;
799
800
  if (l.militaryTime !== void 0)
800
801
  o = l.militaryTime;
@@ -803,25 +804,26 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
803
804
  o = l.meridiem === "PM" ? i + 12 : i;
804
805
  }
805
806
  return (o * 3600 + l.minutes * 60 + (l.seconds ?? 0)) * 1e3;
806
- }, x = () => {
807
+ }, x = (l) => {
807
808
  !e.selectRange || !e.showTime || !e.showEndTime || n("get-range", {
808
- start: v(t.value, y.value),
809
- end: v(d.value, k.value)
809
+ start: h(t.value, y.value),
810
+ end: h(c.value, k.value),
811
+ source: l
810
812
  });
811
813
  }, $ = (l) => {
812
- n("get-date", l), e.selectRange && (t.value = l.start ?? l.selected, d.value = l.end ?? l.selected, x());
813
- }, T = (l) => {
814
- y.value = h(l), e.showEndTime ? x() : n("get-time", l);
815
- }, f = (l) => {
816
- k.value = h(l), x();
814
+ n("get-date", l), e.selectRange && (t.value = l.start ?? l.selected, c.value = l.end ?? l.selected, x("user"));
815
+ }, S = (l) => {
816
+ y.value = v(l), e.showEndTime ? x(l.source ?? "user") : n("get-time", l);
817
+ }, s = (l) => {
818
+ k.value = v(l), x(l.source ?? "user");
817
819
  };
818
- return (l, o) => (u(), m("div", Jt, [
819
- e.showDate ? (u(), ee(Te, {
820
+ return (l, o) => (d(), f("div", Jt, [
821
+ e.showDate ? (d(), ee(Te, {
820
822
  key: 0,
821
823
  "select-range": e.selectRange,
822
824
  onGetDate: $
823
825
  }, null, 8, ["select-range"])) : B("", !0),
824
- e.showTime ? (u(), ee(me, {
826
+ e.showTime ? (d(), ee(me, {
825
827
  key: 1,
826
828
  "allow-military-time": e.allowMilitaryTime,
827
829
  "default-hours": e.defaultHours,
@@ -829,9 +831,9 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
829
831
  "default-seconds": e.defaultSeconds,
830
832
  "default-meridiem": e.defaultMeridiem,
831
833
  "use-seconds": e.useSeconds,
832
- onGetTime: T
834
+ onGetTime: S
833
835
  }, null, 8, ["allow-military-time", "default-hours", "default-minutes", "default-seconds", "default-meridiem", "use-seconds"])) : B("", !0),
834
- e.selectRange && e.showTime && e.showEndTime ? (u(), m(L, { key: 2 }, [
836
+ e.selectRange && e.showTime && e.showEndTime ? (d(), f(p, { key: 2 }, [
835
837
  o[0] || (o[0] = a("div", { class: "adate-selection__end-label" }, "End time", -1)),
836
838
  oe(me, {
837
839
  "allow-military-time": e.allowMilitaryTime,
@@ -840,15 +842,15 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
840
842
  "default-seconds": e.defaultSeconds,
841
843
  "default-meridiem": e.defaultMeridiem,
842
844
  "use-seconds": e.useSeconds,
843
- onGetTime: f
845
+ onGetTime: s
844
846
  }, null, 8, ["allow-military-time", "default-hours", "default-minutes", "default-seconds", "default-meridiem", "use-seconds"])
845
847
  ], 64)) : B("", !0),
846
- !e.showTime && !e.showDate ? (u(), m("p", Xt, "empty")) : B("", !0)
848
+ !e.showTime && !e.showDate ? (d(), f("p", Ot, "empty")) : B("", !0)
847
849
  ]));
848
850
  }
849
- }), se = /* @__PURE__ */ H(Zt, [["__scopeId", "data-v-eeadb3e2"]]), Ot = { class: "aform_display-value" }, jt = ["id", "value", "disabled", "required"], ea = ["for"], ta = ["innerHTML"], aa = /* @__PURE__ */ V({
851
+ }), ae = /* @__PURE__ */ H(Xt, [["__scopeId", "data-v-602dfd69"]]), Zt = { class: "aform_form-element" }, jt = { class: "aform_display-value" }, ea = { class: "aform_field-label" }, ta = ["id", "disabled", "required"], aa = ["for"], la = ["innerHTML"], na = /* @__PURE__ */ R({
850
852
  __name: "ADate",
851
- props: /* @__PURE__ */ Q({
853
+ props: /* @__PURE__ */ K({
852
854
  schema: {},
853
855
  label: { default: "Date" },
854
856
  selectRange: { type: Boolean },
@@ -864,71 +866,75 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
864
866
  }),
865
867
  emits: ["update:modelValue"],
866
868
  setup(e) {
867
- const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue"), c = I(n.value ? new Date(n.value) : /* @__PURE__ */ new Date()), t = A({
868
- get: () => c.value.toISOString().split("T")[0],
869
+ const u = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = Y(e, "modelValue"), r = T(n.value ? new Date(n.value) : /* @__PURE__ */ new Date()), t = I({
870
+ get: () => r.value.toISOString().split("T")[0],
869
871
  set: (v) => {
870
- c.value = new Date(v), n.value = v;
872
+ r.value = new Date(v), n.value = v;
871
873
  }
872
- }), d = le("picker"), y = I(!1);
873
- De(d, () => y.value = !1), Z(
874
+ }), c = ne("picker"), y = T(!1);
875
+ he(c, () => y.value = !1);
876
+ const k = () => {
877
+ e.mode !== "read" && (y.value = !y.value);
878
+ };
879
+ O(
874
880
  () => n.value,
875
881
  (v) => {
876
- v && (c.value = new Date(v));
882
+ v && (r.value = new Date(v));
877
883
  }
878
884
  );
879
- const k = (v) => {
880
- c.value = v.selected, n.value = t.value;
885
+ const h = (v) => {
886
+ r.value = v.selected, n.value = t.value, y.value = !1;
881
887
  };
882
- return (v, h) => (u(), m("div", null, [
883
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
884
- a("span", Ot, g(n.value ? new Date(t.value).toLocaleDateString() : ""), 1),
885
- a("label", null, g(e.label), 1)
886
- ], 64)) : (u(), m(L, { key: 1 }, [
887
- p(a("input", {
888
+ return (v, x) => (d(), f("div", Zt, [
889
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
890
+ a("span", jt, g(n.value ? new Date(t.value).toLocaleDateString() : ""), 1),
891
+ a("label", ea, g(e.label), 1)
892
+ ], 64)) : (d(), f(p, { key: 1 }, [
893
+ _(a("input", {
888
894
  id: e.uuid,
889
895
  ref: "date",
890
- "onUpdate:modelValue": h[0] || (h[0] = (x) => t.value = x),
891
- class: "adate-input",
892
- value: t.value,
896
+ "onUpdate:modelValue": x[0] || (x[0] = ($) => t.value = $),
897
+ class: "aform_input-field",
893
898
  type: "date",
894
899
  disabled: e.mode === "read",
895
900
  required: e.required,
896
- onClick: h[1] || (h[1] = R(
897
- () => {
898
- y.value = !y.value;
899
- },
900
- ["prevent"]
901
- ))
902
- }, null, 8, jt), [
903
- [Y, t.value]
901
+ onClick: k
902
+ }, null, 8, ta), [
903
+ [G, t.value]
904
904
  ]),
905
- a("label", { for: e.uuid }, g(e.label), 9, ea),
906
- p(a("p", { innerHTML: s.value }, null, 8, ta), [
907
- [P, s.value]
905
+ a("label", {
906
+ class: "aform_field-label",
907
+ for: e.uuid
908
+ }, g(e.label), 9, aa),
909
+ _(a("p", {
910
+ class: "aform_error",
911
+ innerHTML: u.value
912
+ }, null, 8, la), [
913
+ [E, u.value]
908
914
  ]),
909
- y.value ? (u(), ee(se, {
915
+ y.value ? (d(), ee(ae, {
910
916
  key: 0,
911
917
  ref: "picker",
912
- class: "picker",
918
+ class: "adate-picker",
913
919
  "select-range": !1,
914
920
  "show-time": !1,
915
- onGetDate: k
921
+ onGetDate: h
916
922
  }, null, 512)) : B("", !0)
917
923
  ], 64))
918
924
  ]));
919
925
  }
920
- }), la = /* @__PURE__ */ H(aa, [["__scopeId", "data-v-a73c275b"]]), na = {
926
+ }), sa = /* @__PURE__ */ H(na, [["__scopeId", "data-v-5de3fe7a"]]), oa = {
921
927
  key: 0,
922
928
  class: "input-wrapper"
923
- }, oa = { class: "aform_display-value" }, sa = ["innerHTML"], ia = { class: "input-wrapper" }, ua = ["disabled"], da = {
929
+ }, ia = { class: "aform_display-value" }, ua = ["innerHTML"], ra = { class: "input-wrapper" }, da = ["disabled"], ca = {
924
930
  id: "autocomplete-results",
925
931
  class: "autocomplete-results"
926
- }, ra = {
932
+ }, ma = {
927
933
  key: 0,
928
934
  class: "loading autocomplete-result"
929
- }, ca = ["onClick"], ma = ["innerHTML"], fa = /* @__PURE__ */ V({
935
+ }, fa = ["onClick"], va = ["innerHTML"], ya = /* @__PURE__ */ R({
930
936
  __name: "ADropdown",
931
- props: /* @__PURE__ */ Q({
937
+ props: /* @__PURE__ */ K({
932
938
  schema: {},
933
939
  label: {},
934
940
  selectRange: { type: Boolean },
@@ -947,12 +953,12 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
947
953
  }),
948
954
  emits: ["update:modelValue"],
949
955
  setup(e) {
950
- const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue"), c = I(n.value ?? ""), t = ve({
956
+ const u = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = Y(e, "modelValue"), r = T(n.value ?? ""), t = ve({
951
957
  activeItemIndex: null,
952
958
  open: !1,
953
959
  loading: !1,
954
960
  results: e.options
955
- }), d = () => h(), y = async () => {
961
+ }), c = () => v(), y = async () => {
956
962
  if (t.open = !0, t.activeItemIndex = null, e.filterFunction) {
957
963
  e.isAsync && (t.loading = !0);
958
964
  try {
@@ -966,12 +972,12 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
966
972
  } else
967
973
  x();
968
974
  }, k = (l) => {
969
- n.value = l, c.value = l, h(l);
970
- }, v = () => {
975
+ n.value = l, r.value = l, v(l);
976
+ }, h = () => {
971
977
  const l = e.options?.indexOf(n.value ?? "") ?? -1;
972
978
  t.activeItemIndex = e.isAsync ? null : l >= 0 ? l : null, t.open = !0, t.results = e.isAsync ? [] : e.options;
973
- }, h = (l) => {
974
- t.activeItemIndex = null, t.open = !1, e.options?.includes(l || n.value || "") || (n.value = c.value);
979
+ }, v = (l) => {
980
+ t.activeItemIndex = null, t.open = !1, e.options?.includes(l || n.value || "") || (n.value = r.value);
975
981
  }, x = () => {
976
982
  n.value ? t.results = e.options?.filter((l) => l.toLowerCase().includes((n.value ?? "").toLowerCase())) : t.results = e.options;
977
983
  }, $ = () => {
@@ -981,77 +987,169 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
981
987
  t.activeItemIndex = (o + 1) % l;
982
988
  } else
983
989
  t.activeItemIndex = 0;
984
- }, T = () => {
990
+ }, S = () => {
985
991
  const l = t.results?.length || 0;
986
992
  if (t.activeItemIndex != null) {
987
993
  const o = isNaN(t.activeItemIndex) ? 0 : t.activeItemIndex;
988
994
  o === 0 ? t.activeItemIndex = null : t.activeItemIndex = o - 1;
989
995
  } else
990
996
  t.activeItemIndex = l - 1;
991
- }, f = () => {
997
+ }, s = () => {
992
998
  if (t.results) {
993
999
  const l = t.activeItemIndex || 0, o = t.results[l];
994
1000
  k(o);
995
1001
  }
996
1002
  t.activeItemIndex = 0;
997
1003
  };
998
- return (l, o) => e.mode === "display" ? (u(), m("div", na, [
999
- a("span", oa, g(n.value ?? ""), 1),
1004
+ return (l, o) => e.mode === "display" ? (d(), f("div", oa, [
1005
+ a("span", ia, g(n.value ?? ""), 1),
1000
1006
  a("label", null, g(e.label), 1),
1001
- p(a("p", {
1007
+ _(a("p", {
1002
1008
  class: "aform_error",
1003
- innerHTML: s.value
1004
- }, null, 8, sa), [
1005
- [P, s.value]
1009
+ innerHTML: u.value
1010
+ }, null, 8, ua), [
1011
+ [E, u.value]
1006
1012
  ])
1007
- ])) : p((u(), m("div", {
1013
+ ])) : _((d(), f("div", {
1008
1014
  key: 1,
1009
- class: O(["autocomplete", { isOpen: t.open }])
1015
+ class: Z(["autocomplete", { isOpen: t.open }])
1010
1016
  }, [
1011
- a("div", ia, [
1012
- p(a("input", {
1017
+ a("div", ra, [
1018
+ _(a("input", {
1013
1019
  "onUpdate:modelValue": o[0] || (o[0] = (i) => n.value = i),
1014
1020
  type: "text",
1015
1021
  disabled: e.mode === "read",
1016
1022
  onInput: y,
1017
- onFocus: v,
1023
+ onFocus: h,
1018
1024
  onKeydown: [
1019
- _($, ["down"]),
1020
- _(T, ["up"]),
1021
- _(f, ["enter"]),
1022
- _(d, ["esc"]),
1023
- _(d, ["tab"])
1025
+ F($, ["down"]),
1026
+ F(S, ["up"]),
1027
+ F(s, ["enter"]),
1028
+ F(c, ["esc"]),
1029
+ F(c, ["tab"])
1024
1030
  ]
1025
- }, null, 40, ua), [
1026
- [Y, n.value]
1031
+ }, null, 40, da), [
1032
+ [G, n.value]
1027
1033
  ]),
1028
- p(a("ul", da, [
1029
- t.loading ? (u(), m("li", ra, "Loading results...")) : (u(!0), m(L, { key: 1 }, j(t.results, (i, w) => (u(), m("li", {
1034
+ _(a("ul", ca, [
1035
+ t.loading ? (d(), f("li", ma, "Loading results...")) : (d(!0), f(p, { key: 1 }, j(t.results, (i, D) => (d(), f("li", {
1030
1036
  key: i,
1031
- class: O(["autocomplete-result", { "is-active": w === t.activeItemIndex }]),
1032
- onClick: R((r) => k(i), ["stop"])
1033
- }, g(i), 11, ca))), 128))
1037
+ class: Z(["autocomplete-result", { "is-active": D === t.activeItemIndex }]),
1038
+ onClick: V((m) => k(i), ["stop"])
1039
+ }, g(i), 11, fa))), 128))
1034
1040
  ], 512), [
1035
- [P, t.open]
1041
+ [E, t.open]
1036
1042
  ]),
1037
1043
  a("label", null, g(e.label), 1)
1038
1044
  ]),
1039
- p(a("p", {
1045
+ _(a("p", {
1040
1046
  class: "aform_error",
1041
- innerHTML: s.value
1042
- }, null, 8, ma), [
1043
- [P, s.value]
1047
+ innerHTML: u.value
1048
+ }, null, 8, va), [
1049
+ [E, u.value]
1044
1050
  ])
1045
1051
  ], 2)), [
1046
- [J(ye), d]
1052
+ [J(ye), c]
1047
1053
  ]);
1048
1054
  }
1049
- }), va = /* @__PURE__ */ H(fa, [["__scopeId", "data-v-2b75e2d5"]]), ya = { class: "aduration" }, ha = { class: "aform_display-value" }, ba = { class: "aduration__footer" }, ga = {
1055
+ }), ha = /* @__PURE__ */ H(ya, [["__scopeId", "data-v-2b75e2d5"]]), ba = { class: "aform_form-element" }, ga = { class: "aform_display-value" }, $a = { class: "aform_field-label" }, ka = ["id", "value", "disabled"], xa = ["for"], Da = ["innerHTML"], wa = /* @__PURE__ */ R({
1056
+ __name: "ADateTime",
1057
+ props: /* @__PURE__ */ K({
1058
+ schema: {},
1059
+ label: { default: "Date & Time" },
1060
+ selectRange: { type: Boolean },
1061
+ mask: {},
1062
+ required: { type: Boolean },
1063
+ mode: {},
1064
+ uuid: {},
1065
+ validation: { default: () => ({ errorMessage: "" }) },
1066
+ errors: {},
1067
+ allowMilitaryTime: { type: Boolean, default: !1 },
1068
+ useSeconds: { type: Boolean, default: !0 }
1069
+ }, {
1070
+ modelValue: {},
1071
+ modelModifiers: {}
1072
+ }),
1073
+ emits: ["update:modelValue"],
1074
+ setup(e) {
1075
+ const u = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = Y(e, "modelValue"), r = T(n.value ? new Date(n.value) : /* @__PURE__ */ new Date()), t = T(!1), c = T(null);
1076
+ he(c, () => t.value = !1);
1077
+ const y = () => {
1078
+ e.mode !== "read" && (t.value = !0);
1079
+ }, k = I(() => n.value ? r.value.toLocaleString() : ""), h = I(() => k.value), v = I(() => {
1080
+ const s = r.value, l = s.getHours(), o = l >= 12 ? "PM" : "AM", i = l % 12 || 12;
1081
+ return {
1082
+ hours: e.allowMilitaryTime ? l : i,
1083
+ minutes: s.getMinutes(),
1084
+ seconds: s.getSeconds(),
1085
+ meridiem: o
1086
+ };
1087
+ }), x = () => {
1088
+ n.value = r.value.toISOString();
1089
+ }, $ = (s) => {
1090
+ const l = new Date(r.value);
1091
+ l.setFullYear(s.selected.getFullYear(), s.selected.getMonth(), s.selected.getDate()), r.value = l, x();
1092
+ }, S = (s) => {
1093
+ if (s.source === "init") return;
1094
+ const l = new Date(r.value), o = s.militaryTime ?? s.hours;
1095
+ l.setHours(o, s.minutes, e.useSeconds ? s.seconds : 0, 0), r.value = l, x();
1096
+ };
1097
+ return O(
1098
+ () => n.value,
1099
+ (s) => {
1100
+ s && (r.value = new Date(s));
1101
+ }
1102
+ ), (s, l) => (d(), f("div", ba, [
1103
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
1104
+ a("span", ga, g(k.value), 1),
1105
+ a("label", $a, g(e.label), 1)
1106
+ ], 64)) : (d(), f(p, { key: 1 }, [
1107
+ a("input", {
1108
+ id: e.uuid,
1109
+ class: "aform_input-field",
1110
+ type: "text",
1111
+ value: h.value,
1112
+ placeholder: "Select date and time",
1113
+ disabled: e.mode === "read",
1114
+ readonly: "",
1115
+ onClick: y
1116
+ }, null, 8, ka),
1117
+ a("label", {
1118
+ class: "aform_field-label",
1119
+ for: e.uuid
1120
+ }, g(e.label), 9, xa),
1121
+ _(a("p", {
1122
+ class: "aform_error",
1123
+ innerHTML: u.value
1124
+ }, null, 8, Da), [
1125
+ [E, u.value]
1126
+ ]),
1127
+ t.value ? (d(), ee(ae, {
1128
+ key: 0,
1129
+ ref_key: "pickerRef",
1130
+ ref: c,
1131
+ class: "adatetime-picker",
1132
+ "select-range": !1,
1133
+ "show-date": !0,
1134
+ "show-time": !0,
1135
+ "default-hours": v.value.hours,
1136
+ "default-minutes": v.value.minutes,
1137
+ "default-seconds": v.value.seconds,
1138
+ "default-meridiem": v.value.meridiem,
1139
+ "allow-military-time": e.allowMilitaryTime,
1140
+ "use-seconds": e.useSeconds,
1141
+ onGetDate: $,
1142
+ onGetTime: S
1143
+ }, null, 8, ["default-hours", "default-minutes", "default-seconds", "default-meridiem", "allow-military-time", "use-seconds"])) : B("", !0)
1144
+ ], 64))
1145
+ ]));
1146
+ }
1147
+ }), Ma = /* @__PURE__ */ H(wa, [["__scopeId", "data-v-b0fa488b"]]), Ta = { class: "aduration" }, Sa = { class: "aform_display-value" }, Ia = { class: "aduration__footer" }, Aa = {
1050
1148
  key: 0,
1051
1149
  class: "aduration__summary"
1052
- }, $a = { class: "aduration__value" }, ka = { class: "aduration__ms" }, xa = /* @__PURE__ */ V({
1150
+ }, pa = { class: "aduration__value" }, _a = { class: "aduration__ms" }, La = /* @__PURE__ */ R({
1053
1151
  __name: "ADuration",
1054
- props: /* @__PURE__ */ Q({
1152
+ props: /* @__PURE__ */ K({
1055
1153
  label: { default: "Duration" },
1056
1154
  mode: { default: "edit" },
1057
1155
  allowMilitaryTime: { type: Boolean, default: !1 },
@@ -1062,55 +1160,55 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1062
1160
  }),
1063
1161
  emits: ["update:modelValue"],
1064
1162
  setup(e) {
1065
- const s = G(e, "modelValue"), n = I(null), c = I(null), t = A(() => {
1066
- if (!n.value || !c.value) return 0;
1067
- const v = c.value.getTime() - n.value.getTime();
1068
- return v > 0 ? v : 0;
1163
+ const u = Y(e, "modelValue"), n = T(null), r = T(null), t = I(() => {
1164
+ if (!n.value || !r.value) return 0;
1165
+ const h = r.value.getTime() - n.value.getTime();
1166
+ return h > 0 ? h : 0;
1069
1167
  });
1070
- Z(t, (v) => {
1071
- s.value = v;
1168
+ O(t, (h) => {
1169
+ u.value = h;
1072
1170
  });
1073
- const d = (v) => {
1074
- n.value = v.start, c.value = v.end, s.value = t.value;
1075
- }, y = A(() => {
1076
- const v = t.value;
1077
- if (v === 0) return "0s";
1078
- const h = Math.floor(v / 1e3) % 60, x = Math.floor(v / 6e4) % 60, $ = Math.floor(v / 36e5) % 24, T = Math.floor(v / 864e5);
1079
- return [T && `${T}d`, $ && `${$}h`, x && `${x}m`, h && `${h}s`].filter(Boolean).join(" ") || "0s";
1080
- }), k = A(() => {
1081
- const v = s.value;
1082
- if (!v) return "—";
1083
- const h = Math.floor(v / 1e3) % 60, x = Math.floor(v / 6e4) % 60, $ = Math.floor(v / 36e5) % 24, T = Math.floor(v / 864e5);
1084
- return [T && `${T}d`, $ && `${$}h`, x && `${x}m`, h && `${h}s`].filter(Boolean).join(" ") || "0s";
1171
+ const c = (h) => {
1172
+ h.source !== "init" && (n.value = h.start, r.value = h.end, u.value = t.value);
1173
+ }, y = I(() => {
1174
+ const h = t.value;
1175
+ if (h === 0) return "0s";
1176
+ const v = Math.floor(h / 1e3) % 60, x = Math.floor(h / 6e4) % 60, $ = Math.floor(h / 36e5) % 24, S = Math.floor(h / 864e5);
1177
+ return [S && `${S}d`, $ && `${$}h`, x && `${x}m`, v && `${v}s`].filter(Boolean).join(" ") || "0s";
1178
+ }), k = I(() => {
1179
+ const h = u.value;
1180
+ if (!h) return "—";
1181
+ const v = Math.floor(h / 1e3) % 60, x = Math.floor(h / 6e4) % 60, $ = Math.floor(h / 36e5) % 24, S = Math.floor(h / 864e5);
1182
+ return [S && `${S}d`, $ && `${$}h`, x && `${x}m`, v && `${v}s`].filter(Boolean).join(" ") || "0s";
1085
1183
  });
1086
- return (v, h) => (u(), m("div", ya, [
1087
- e.mode === "display" || e.mode === "read" ? (u(), m(L, { key: 0 }, [
1088
- a("span", ha, g(k.value), 1),
1184
+ return (h, v) => (d(), f("div", Ta, [
1185
+ e.mode === "display" || e.mode === "read" ? (d(), f(p, { key: 0 }, [
1186
+ a("span", Sa, g(k.value), 1),
1089
1187
  a("label", null, g(e.label), 1)
1090
- ], 64)) : (u(), m(L, { key: 1 }, [
1091
- oe(se, {
1188
+ ], 64)) : (d(), f(p, { key: 1 }, [
1189
+ oe(ae, {
1092
1190
  ref: "selectionRef",
1093
1191
  "select-range": !0,
1094
1192
  "show-time": !0,
1095
1193
  "show-end-time": !0,
1096
1194
  "allow-military-time": e.allowMilitaryTime,
1097
1195
  "use-seconds": e.useSeconds,
1098
- onGetRange: d
1196
+ onGetRange: c
1099
1197
  }, null, 8, ["allow-military-time", "use-seconds"]),
1100
- a("div", ba, [
1198
+ a("div", Ia, [
1101
1199
  a("label", null, g(e.label), 1),
1102
- n.value && c.value ? (u(), m("div", ga, [
1103
- h[0] || (h[0] = a("span", { class: "aduration__label" }, "Duration:", -1)),
1104
- a("span", $a, g(y.value), 1),
1105
- a("span", ka, "(" + g(s.value ?? 0) + " ms)", 1)
1200
+ n.value && r.value ? (d(), f("div", Aa, [
1201
+ v[0] || (v[0] = a("span", { class: "aduration__label" }, "Duration:", -1)),
1202
+ a("span", pa, g(y.value), 1),
1203
+ a("span", _a, "(" + g(u.value ?? 0) + " ms)", 1)
1106
1204
  ])) : B("", !0)
1107
1205
  ])
1108
1206
  ], 64))
1109
1207
  ]));
1110
1208
  }
1111
- }), wa = /* @__PURE__ */ H(xa, [["__scopeId", "data-v-22611dd6"]]), Da = { class: "adaterange" }, Ma = { class: "aform_display-value" }, Ta = ["id", "value", "disabled"], Sa = ["for"], Ia = ["innerHTML"], Aa = /* @__PURE__ */ V({
1209
+ }), qa = /* @__PURE__ */ H(La, [["__scopeId", "data-v-2e4dd7dd"]]), Fa = { class: "aform_form-element" }, Ca = { class: "aform_display-value" }, Ba = { class: "aform_field-label" }, Ra = ["id", "value", "disabled"], Va = ["for"], Ha = ["innerHTML"], Na = /* @__PURE__ */ R({
1112
1210
  __name: "ADateRange",
1113
- props: /* @__PURE__ */ Q({
1211
+ props: /* @__PURE__ */ K({
1114
1212
  schema: {},
1115
1213
  label: { default: "Date Range" },
1116
1214
  selectRange: { type: Boolean },
@@ -1128,57 +1226,63 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1128
1226
  }),
1129
1227
  emits: ["update:modelValue"],
1130
1228
  setup(e) {
1131
- const s = (i) => new Date(i).toLocaleDateString(), n = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), c = G(e, "modelValue"), t = I(c.value.start_date ? new Date(c.value.start_date) : null), d = I(c.value.end_date ? new Date(c.value.end_date) : null), y = I(!1), k = I(null);
1132
- De(k, () => y.value = !1);
1133
- const v = () => {
1229
+ const u = (i) => new Date(i).toLocaleDateString(), n = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), r = Y(e, "modelValue"), t = T(r.value.start_date ? new Date(r.value.start_date) : null), c = T(r.value.end_date ? new Date(r.value.end_date) : null), y = T(!1), k = T(null);
1230
+ he(k, () => y.value = !1);
1231
+ const h = () => {
1134
1232
  e.mode !== "read" && (y.value = !0);
1135
- }, h = (i) => i ? `${i.getMonth() + 1}/${i.getDate()}/${i.getFullYear()}` : "", x = A(() => {
1136
- const i = h(t.value), w = h(d.value);
1137
- return i && w ? `${i} — ${w}` : i ? `${i} — ...` : "";
1138
- }), $ = A(() => {
1139
- const i = c.value.start_date, w = c.value.end_date;
1140
- return !i && !w ? "" : i && w ? `${s(i)} — ${s(w)}` : i ? `From ${s(i)}` : `Until ${s(w)}`;
1141
- }), T = () => {
1142
- const i = t.value, w = d.value;
1143
- i && w && w.getTime() < i.getTime() && ([t.value, d.value] = [w, i]);
1144
- }, f = (i) => i ? i.toISOString().split("T")[0] : null, l = () => {
1145
- c.value = {
1146
- start_date: f(t.value),
1147
- end_date: f(d.value)
1233
+ }, v = (i) => i ? `${i.getMonth() + 1}/${i.getDate()}/${i.getFullYear()}` : "", x = I(() => {
1234
+ const i = v(t.value), D = v(c.value);
1235
+ return i && D ? `${i} — ${D}` : i ? `${i} — ...` : "";
1236
+ }), $ = I(() => {
1237
+ const i = r.value.start_date, D = r.value.end_date;
1238
+ return !i && !D ? "" : i && D ? `${u(i)} — ${u(D)}` : i ? `From ${u(i)}` : `Until ${u(D)}`;
1239
+ }), S = () => {
1240
+ const i = t.value, D = c.value;
1241
+ i && D && D.getTime() < i.getTime() && ([t.value, c.value] = [D, i]);
1242
+ }, s = (i) => i ? i.toISOString().split("T")[0] : null, l = () => {
1243
+ r.value = {
1244
+ start_date: s(t.value),
1245
+ end_date: s(c.value)
1148
1246
  };
1149
1247
  }, o = (i) => {
1150
- i.start && (t.value = i.start), i.end && (d.value = i.end, T(), y.value = !1), l();
1248
+ i.start && (t.value = i.start), i.end && (c.value = i.end, S(), y.value = !1), l();
1151
1249
  };
1152
- return Z(
1153
- () => c.value,
1250
+ return O(
1251
+ () => r.value,
1154
1252
  (i) => {
1155
- t.value = i.start_date ? new Date(i.start_date) : null, d.value = i.end_date ? new Date(i.end_date) : null;
1253
+ t.value = i.start_date ? new Date(i.start_date) : null, c.value = i.end_date ? new Date(i.end_date) : null;
1156
1254
  },
1157
1255
  { deep: !0 }
1158
- ), (i, w) => (u(), m("div", Da, [
1159
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
1160
- a("span", Ma, g($.value), 1),
1161
- a("label", null, g(e.label), 1)
1162
- ], 64)) : (u(), m(L, { key: 1 }, [
1256
+ ), (i, D) => (d(), f("div", Fa, [
1257
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
1258
+ a("span", Ca, g($.value), 1),
1259
+ a("label", Ba, g(e.label), 1)
1260
+ ], 64)) : (d(), f(p, { key: 1 }, [
1163
1261
  a("input", {
1164
1262
  id: e.uuid,
1165
- class: "adate-input aform_input-field",
1263
+ class: "aform_input-field",
1166
1264
  type: "text",
1167
1265
  value: x.value,
1168
1266
  placeholder: "Select date range",
1169
1267
  disabled: e.mode === "read",
1170
1268
  readonly: "",
1171
- onClick: v
1172
- }, null, 8, Ta),
1173
- a("label", { for: e.uuid }, g(e.label), 9, Sa),
1174
- p(a("p", { innerHTML: n.value }, null, 8, Ia), [
1175
- [P, n.value]
1269
+ onClick: h
1270
+ }, null, 8, Ra),
1271
+ a("label", {
1272
+ class: "aform_field-label",
1273
+ for: e.uuid
1274
+ }, g(e.label), 9, Va),
1275
+ _(a("p", {
1276
+ class: "aform_error",
1277
+ innerHTML: n.value
1278
+ }, null, 8, Ha), [
1279
+ [E, n.value]
1176
1280
  ]),
1177
- y.value ? (u(), ee(se, {
1281
+ y.value ? (d(), ee(ae, {
1178
1282
  key: 0,
1179
1283
  ref_key: "pickerRef",
1180
1284
  ref: k,
1181
- class: "picker",
1285
+ class: "adaterange-picker",
1182
1286
  "select-range": !0,
1183
1287
  "show-time": !1,
1184
1288
  onGetDate: o
@@ -1186,15 +1290,15 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1186
1290
  ], 64))
1187
1291
  ]));
1188
1292
  }
1189
- }), pa = /* @__PURE__ */ H(Aa, [["__scopeId", "data-v-b5838478"]]), La = { class: "aform" }, qa = {
1293
+ }), Ua = /* @__PURE__ */ H(Na, [["__scopeId", "data-v-f8dad4d3"]]), Pa = { class: "aform" }, Ea = {
1190
1294
  key: 0,
1191
1295
  class: "aform-nested-section"
1192
- }, Fa = {
1296
+ }, Ka = {
1193
1297
  key: 0,
1194
1298
  class: "aform-nested-label"
1195
- }, _a = /* @__PURE__ */ V({
1299
+ }, Qa = /* @__PURE__ */ R({
1196
1300
  __name: "AForm",
1197
- props: /* @__PURE__ */ Q({
1301
+ props: /* @__PURE__ */ K({
1198
1302
  schema: {},
1199
1303
  mode: { default: "edit" },
1200
1304
  errors: {}
@@ -1202,84 +1306,84 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1202
1306
  data: { required: !0 },
1203
1307
  dataModifiers: {}
1204
1308
  }),
1205
- emits: /* @__PURE__ */ Q(["update:schema", "update:data"], ["update:data"]),
1206
- setup(e, { emit: s }) {
1207
- const n = s, c = G(e, "data"), t = (f) => (f.kind === "link" || f.kind === "fieldset") && "schema" in f && Array.isArray(f.schema) && f.schema.length > 0, d = I({});
1208
- Z(
1209
- () => c.value,
1210
- (f) => {
1211
- !e.schema || !f || e.schema.forEach((l) => {
1212
- t(l) && (d.value[l.fieldname] = f[l.fieldname] ?? {});
1309
+ emits: /* @__PURE__ */ K(["update:schema", "update:data"], ["update:data"]),
1310
+ setup(e, { emit: u }) {
1311
+ const n = u, r = Y(e, "data"), t = (s) => (s.kind === "link" || s.kind === "fieldset") && "schema" in s && Array.isArray(s.schema) && s.schema.length > 0, c = T({});
1312
+ O(
1313
+ () => r.value,
1314
+ (s) => {
1315
+ !e.schema || !s || e.schema.forEach((l) => {
1316
+ t(l) && (c.value[l.fieldname] = s[l.fieldname] ?? {});
1213
1317
  });
1214
1318
  },
1215
1319
  { immediate: !0 }
1216
1320
  );
1217
- const y = (f, l) => {
1218
- d.value[f] = l, c.value && (c.value[f] = l, n("update:data", { ...c.value }));
1219
- }, k = (f) => {
1321
+ const y = (s, l) => {
1322
+ c.value[s] = l, r.value && (r.value[s] = l, n("update:data", { ...r.value }));
1323
+ }, k = (s) => {
1220
1324
  const l = {};
1221
- for (const [o, i] of Object.entries(f))
1325
+ for (const [o, i] of Object.entries(s))
1222
1326
  ["component", "primaryKey", "computed", "language", "hidden", "mode", "width"].includes(o) || (l[o] = i);
1223
- return f.kind === "table" && (l.rows = c.value[f.fieldname] || []), l;
1224
- }, v = (f) => {
1225
- if (f.kind !== "field") return {};
1226
- const l = f.width;
1327
+ return s.kind === "table" && (l.rows = r.value[s.fieldname] || []), l;
1328
+ }, h = (s) => {
1329
+ if (s.kind !== "field") return {};
1330
+ const l = s.width;
1227
1331
  return l ? { flexBasis: l, width: l } : {};
1228
- }, h = A(() => e.mode ?? "edit");
1229
- function x(f) {
1230
- const l = f.mode;
1231
- return l || h.value;
1332
+ }, v = I(() => e.mode ?? "edit");
1333
+ function x(s) {
1334
+ const l = s.mode;
1335
+ return l || v.value;
1232
1336
  }
1233
- const $ = I([]);
1337
+ const $ = T([]);
1234
1338
  Ve(() => {
1235
- e.schema && $.value.length !== e.schema.length && ($.value = e.schema.map((f, l) => A({
1339
+ e.schema && $.value.length !== e.schema.length && ($.value = e.schema.map((s, l) => I({
1236
1340
  get() {
1237
- return c.value?.[e.schema[l].fieldname];
1341
+ return r.value?.[e.schema[l].fieldname];
1238
1342
  },
1239
1343
  set: (o) => {
1240
1344
  const i = e.schema[l].fieldname;
1241
- i && c.value && (c.value[i] = o, n("update:data", { ...c.value })), n("update:schema", e.schema);
1345
+ i && r.value && (r.value[i] = o, n("update:data", { ...r.value })), n("update:schema", e.schema);
1242
1346
  }
1243
1347
  })));
1244
1348
  });
1245
- const T = A(() => $.value);
1246
- return (f, l) => (u(), m("form", La, [
1247
- (u(!0), m(L, null, j(e.schema, (o, i) => (u(), m(L, { key: i }, [
1248
- t(o) ? (u(), m("div", qa, [
1249
- o.label && o.kind !== "fieldset" ? (u(), m("h4", Fa, g(o.label), 1)) : B("", !0),
1250
- (u(), ee($e(o.component ?? "AForm"), {
1251
- data: d.value[o.fieldname],
1349
+ const S = I(() => $.value);
1350
+ return (s, l) => (d(), f("form", Pa, [
1351
+ (d(!0), f(p, null, j(e.schema, (o, i) => (d(), f(p, { key: i }, [
1352
+ t(o) ? (d(), f("div", Ea, [
1353
+ o.label && o.kind !== "fieldset" ? (d(), f("h4", Ka, g(o.label), 1)) : B("", !0),
1354
+ (d(), ee(ke(o.component ?? "AForm"), {
1355
+ data: c.value[o.fieldname],
1252
1356
  mode: x(o),
1253
1357
  schema: o.schema,
1254
1358
  label: o.label,
1255
1359
  collapsible: o.kind === "fieldset" ? o.collapsible : void 0,
1256
1360
  errors: e.errors,
1257
- "onUpdate:data": (w) => y(o.fieldname, w)
1361
+ "onUpdate:data": (D) => y(o.fieldname, D)
1258
1362
  }, null, 40, ["data", "mode", "schema", "label", "collapsible", "errors", "onUpdate:data"]))
1259
- ])) : o.hidden ? B("", !0) : (u(), ee($e(o.component), Ne({
1363
+ ])) : o.hidden ? B("", !0) : (d(), ee(ke(o.component), He({
1260
1364
  key: 1,
1261
- modelValue: T.value[i].value,
1262
- "onUpdate:modelValue": (w) => T.value[i].value = w,
1263
- style: v(o),
1365
+ modelValue: S.value[i].value,
1366
+ "onUpdate:modelValue": (D) => S.value[i].value = D,
1367
+ style: h(o),
1264
1368
  schema: o,
1265
- data: c.value[o.fieldname],
1369
+ data: r.value[o.fieldname],
1266
1370
  mode: x(o),
1267
1371
  errors: e.errors?.[o.fieldname]
1268
1372
  }, { ref_for: !0 }, k(o)), null, 16, ["modelValue", "onUpdate:modelValue", "style", "schema", "data", "mode", "errors"]))
1269
1373
  ], 64))), 128))
1270
1374
  ]));
1271
1375
  }
1272
- }), Se = /* @__PURE__ */ H(_a, [["__scopeId", "data-v-bb17171c"]]), Ca = /* @__PURE__ */ V({
1376
+ }), Se = /* @__PURE__ */ H(Qa, [["__scopeId", "data-v-bb17171c"]]), Ya = /* @__PURE__ */ R({
1273
1377
  __name: "CollapseButton",
1274
1378
  props: {
1275
1379
  collapsed: { type: Boolean }
1276
1380
  },
1277
1381
  setup(e) {
1278
- return (s, n) => (u(), m("button", {
1279
- class: O(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
1382
+ return (u, n) => (d(), f("button", {
1383
+ class: Z(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
1280
1384
  }, "×", 2));
1281
1385
  }
1282
- }), Ba = /* @__PURE__ */ H(Ca, [["__scopeId", "data-v-6f1c1b45"]]), Ra = /* @__PURE__ */ V({
1386
+ }), Ga = /* @__PURE__ */ H(Ya, [["__scopeId", "data-v-6f1c1b45"]]), za = /* @__PURE__ */ R({
1283
1387
  __name: "AFieldset",
1284
1388
  props: {
1285
1389
  schema: {},
@@ -1289,44 +1393,44 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1289
1393
  data: { default: () => ({}) },
1290
1394
  mode: { default: "edit" }
1291
1395
  },
1292
- setup(e, { expose: s }) {
1293
- const n = I(!1), c = I(e.data || []), t = I(e.schema), d = (y) => {
1396
+ setup(e, { expose: u }) {
1397
+ const n = T(!1), r = T(e.data || []), t = T(e.schema), c = (y) => {
1294
1398
  y.preventDefault(), e.collapsible && (n.value = !n.value);
1295
1399
  };
1296
- return s({ collapsed: n }), (y, k) => (u(), m("fieldset", null, [
1297
- e.label || e.collapsible ? (u(), m("legend", {
1400
+ return u({ collapsed: n }), (y, k) => (d(), f("fieldset", null, [
1401
+ e.label || e.collapsible ? (d(), f("legend", {
1298
1402
  key: 0,
1299
- onClick: d,
1300
- onSubmit: d
1403
+ onClick: c,
1404
+ onSubmit: c
1301
1405
  }, [
1302
- ne(g(e.label) + " ", 1),
1303
- e.collapsible ? (u(), ee(Ba, {
1406
+ se(g(e.label) + " ", 1),
1407
+ e.collapsible ? (d(), ee(Ga, {
1304
1408
  key: 0,
1305
1409
  collapsed: n.value
1306
1410
  }, null, 8, ["collapsed"])) : B("", !0)
1307
1411
  ], 32)) : B("", !0),
1308
1412
  fe(y.$slots, "default", { collapsed: n.value }, () => [
1309
- p(oe(Se, {
1310
- data: c.value,
1311
- "onUpdate:data": k[0] || (k[0] = (v) => c.value = v),
1413
+ _(oe(Se, {
1414
+ data: r.value,
1415
+ "onUpdate:data": k[0] || (k[0] = (h) => r.value = h),
1312
1416
  schema: t.value,
1313
1417
  mode: e.mode
1314
1418
  }, null, 8, ["data", "schema", "mode"]), [
1315
- [P, !n.value]
1419
+ [E, !n.value]
1316
1420
  ])
1317
1421
  ], !0)
1318
1422
  ]));
1319
1423
  }
1320
- }), Va = /* @__PURE__ */ H(Ra, [["__scopeId", "data-v-162e7317"]]), Na = { class: "aform_form-element aform_file-attach aform__grid--full" }, Ua = {
1424
+ }), Wa = /* @__PURE__ */ H(za, [["__scopeId", "data-v-162e7317"]]), Ja = { class: "aform_form-element aform_file-attach aform__grid--full" }, Oa = {
1321
1425
  key: 0,
1322
1426
  class: "aform_file-attach-feedback"
1323
- }, Ha = {
1427
+ }, Xa = {
1324
1428
  key: 1,
1325
1429
  class: "aform_display-value"
1326
- }, Ea = {
1430
+ }, Za = {
1327
1431
  key: 0,
1328
1432
  class: "aform_file-attach-feedback"
1329
- }, Ka = ["disabled"], Pa = ["disabled"], Qa = /* @__PURE__ */ V({
1433
+ }, ja = ["disabled"], el = ["disabled"], tl = /* @__PURE__ */ R({
1330
1434
  __name: "AFileAttach",
1331
1435
  props: {
1332
1436
  schema: {},
@@ -1340,48 +1444,48 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1340
1444
  errors: {}
1341
1445
  },
1342
1446
  setup(e) {
1343
- const { files: s, open: n, reset: c, onChange: t } = Ue(), d = A(() => {
1344
- const y = s.value?.length ?? 0;
1447
+ const { files: u, open: n, reset: r, onChange: t } = Ne(), c = I(() => {
1448
+ const y = u.value?.length ?? 0;
1345
1449
  return `${y} ${y === 1 ? "file" : "files"}`;
1346
1450
  });
1347
- return t((y) => y), (y, k) => (u(), m("div", Na, [
1348
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
1349
- J(s) ? (u(), m("div", Ua, [
1451
+ return t((y) => y), (y, k) => (d(), f("div", Ja, [
1452
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
1453
+ J(u) ? (d(), f("div", Oa, [
1350
1454
  a("p", null, [
1351
- a("b", null, g(d.value), 1)
1455
+ a("b", null, g(c.value), 1)
1352
1456
  ]),
1353
- (u(!0), m(L, null, j(J(s), (v) => (u(), m("li", {
1354
- key: v.name
1355
- }, g(v.name), 1))), 128))
1356
- ])) : (u(), m("span", Ha, "No file selected"))
1357
- ], 64)) : (u(), m(L, { key: 1 }, [
1358
- J(s) ? (u(), m("div", Ea, [
1457
+ (d(!0), f(p, null, j(J(u), (h) => (d(), f("li", {
1458
+ key: h.name
1459
+ }, g(h.name), 1))), 128))
1460
+ ])) : (d(), f("span", Xa, "No file selected"))
1461
+ ], 64)) : (d(), f(p, { key: 1 }, [
1462
+ J(u) ? (d(), f("div", Za, [
1359
1463
  a("p", null, [
1360
- k[2] || (k[2] = ne(" You have selected: ", -1)),
1361
- a("b", null, g(d.value), 1)
1464
+ k[2] || (k[2] = se(" You have selected: ", -1)),
1465
+ a("b", null, g(c.value), 1)
1362
1466
  ]),
1363
- (u(!0), m(L, null, j(J(s), (v) => (u(), m("li", {
1364
- key: v.name
1365
- }, g(v.name), 1))), 128))
1467
+ (d(!0), f(p, null, j(J(u), (h) => (d(), f("li", {
1468
+ key: h.name
1469
+ }, g(h.name), 1))), 128))
1366
1470
  ])) : B("", !0),
1367
1471
  a("button", {
1368
1472
  type: "button",
1369
1473
  class: "aform_form-btn",
1370
1474
  disabled: e.mode === "read",
1371
- onClick: k[0] || (k[0] = (v) => J(n)())
1372
- }, g(e.label), 9, Ka),
1475
+ onClick: k[0] || (k[0] = (h) => J(n)())
1476
+ }, g(e.label), 9, ja),
1373
1477
  a("button", {
1374
1478
  type: "button",
1375
- disabled: !J(s) || e.mode === "read",
1479
+ disabled: !J(u) || e.mode === "read",
1376
1480
  class: "aform_form-btn",
1377
- onClick: k[1] || (k[1] = (v) => J(c)())
1378
- }, "Reset", 8, Pa)
1481
+ onClick: k[1] || (k[1] = (h) => J(r)())
1482
+ }, "Reset", 8, el)
1379
1483
  ], 64))
1380
1484
  ]));
1381
1485
  }
1382
- }), Ya = /* @__PURE__ */ H(Qa, [["__scopeId", "data-v-8eefd179"]]), Ga = { class: "aform_form-element" }, za = { class: "aform_display-value" }, Wa = { class: "aform_field-label" }, Ja = ["id", "disabled", "required"], Xa = ["for"], Za = ["innerHTML"], Oa = /* @__PURE__ */ V({
1486
+ }), al = /* @__PURE__ */ H(tl, [["__scopeId", "data-v-8eefd179"]]), ll = { class: "aform_form-element" }, nl = { class: "aform_display-value" }, sl = { class: "aform_field-label" }, ol = ["id", "disabled", "required"], il = ["for"], ul = ["innerHTML"], rl = /* @__PURE__ */ R({
1383
1487
  __name: "ANumericInput",
1384
- props: /* @__PURE__ */ Q({
1488
+ props: /* @__PURE__ */ K({
1385
1489
  schema: {},
1386
1490
  label: {},
1387
1491
  selectRange: { type: Boolean },
@@ -1397,38 +1501,38 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1397
1501
  }),
1398
1502
  emits: ["update:modelValue"],
1399
1503
  setup(e) {
1400
- const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue");
1401
- return (c, t) => (u(), m("div", Ga, [
1402
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
1403
- a("span", za, g(n.value ?? ""), 1),
1404
- a("label", Wa, g(e.label), 1)
1405
- ], 64)) : (u(), m(L, { key: 1 }, [
1406
- p(a("input", {
1504
+ const u = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = Y(e, "modelValue");
1505
+ return (r, t) => (d(), f("div", ll, [
1506
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
1507
+ a("span", nl, g(n.value ?? ""), 1),
1508
+ a("label", sl, g(e.label), 1)
1509
+ ], 64)) : (d(), f(p, { key: 1 }, [
1510
+ _(a("input", {
1407
1511
  id: e.uuid,
1408
- "onUpdate:modelValue": t[0] || (t[0] = (d) => n.value = d),
1512
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => n.value = c),
1409
1513
  class: "aform_input-field",
1410
1514
  type: "number",
1411
1515
  disabled: e.mode === "read",
1412
1516
  required: e.required
1413
- }, null, 8, Ja), [
1414
- [Y, n.value]
1517
+ }, null, 8, ol), [
1518
+ [G, n.value]
1415
1519
  ]),
1416
1520
  a("label", {
1417
1521
  class: "aform_field-label",
1418
1522
  for: e.uuid
1419
- }, g(e.label), 9, Xa),
1420
- p(a("p", {
1523
+ }, g(e.label), 9, il),
1524
+ _(a("p", {
1421
1525
  class: "aform_error",
1422
- innerHTML: s.value
1423
- }, null, 8, Za), [
1424
- [P, s.value]
1526
+ innerHTML: u.value
1527
+ }, null, 8, ul), [
1528
+ [E, u.value]
1425
1529
  ])
1426
1530
  ], 64))
1427
1531
  ]));
1428
1532
  }
1429
- }), ja = { class: "aform_form-element aquantity" }, el = { class: "aform_display-value" }, tl = { class: "aform_field-label" }, al = { class: "aquantity__row" }, ll = { class: "aquantity__field aquantity__field--qty" }, nl = { class: "aquantity__group" }, ol = ["id", "disabled", "required"], sl = { class: "aquantity__uom" }, il = ["id", "disabled", "aria-expanded", "aria-activedescendant", "onKeydown"], ul = { class: "aquantity__uom-value" }, dl = ["aria-label"], rl = ["id", "aria-selected", "onMouseenter", "onClick"], cl = ["for"], ml = { class: "aquantity__row aquantity__row--stock" }, fl = { class: "aquantity__field aquantity__field--stock-uom" }, vl = ["value"], yl = { class: "aform_field-label" }, hl = { class: "aquantity__field aquantity__field--stock-qty" }, bl = ["value"], gl = { class: "aform_field-label" }, $l = { class: "aquantity__field aquantity__field--conversion" }, kl = ["value"], xl = { class: "aform_field-label" }, wl = ["innerHTML"], Dl = /* @__PURE__ */ V({
1533
+ }), dl = { class: "aform_form-element aquantity" }, cl = { class: "aform_display-value" }, ml = { class: "aform_field-label" }, fl = { class: "aquantity__row" }, vl = { class: "aquantity__field aquantity__field--qty" }, yl = { class: "aquantity__group" }, hl = ["id", "disabled", "required"], bl = { class: "aquantity__uom" }, gl = ["id", "disabled", "aria-expanded", "aria-activedescendant", "onKeydown"], $l = { class: "aquantity__uom-value" }, kl = ["aria-label"], xl = ["id", "aria-selected", "onMouseenter", "onClick"], Dl = ["for"], wl = { class: "aquantity__row aquantity__row--stock" }, Ml = { class: "aquantity__field aquantity__field--stock-uom" }, Tl = ["value"], Sl = { class: "aform_field-label" }, Il = { class: "aquantity__field aquantity__field--stock-qty" }, Al = ["value"], pl = { class: "aform_field-label" }, _l = { class: "aquantity__field aquantity__field--conversion" }, Ll = ["value"], ql = { class: "aform_field-label" }, Fl = ["innerHTML"], Cl = /* @__PURE__ */ R({
1430
1534
  __name: "AQuantityInput",
1431
- props: /* @__PURE__ */ Q({
1535
+ props: /* @__PURE__ */ K({
1432
1536
  schema: {},
1433
1537
  label: {},
1434
1538
  selectRange: { type: Boolean },
@@ -1451,27 +1555,27 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1451
1555
  }),
1452
1556
  emits: ["update:modelValue"],
1453
1557
  setup(e) {
1454
- const s = G(e, "modelValue"), n = A(() => e.options.uoms ?? []), c = (b) => Number(b.toFixed(6)), t = (b) => {
1455
- const q = e.options.stockUom ?? s.value.stockUom;
1456
- if (!b || b === q) return 1;
1558
+ const u = Y(e, "modelValue"), n = I(() => e.options.uoms ?? []), r = (b) => Number(b.toFixed(6)), t = (b) => {
1559
+ const L = e.options.stockUom ?? u.value.stockUom;
1560
+ if (!b || b === L) return 1;
1457
1561
  const N = e.options.conversionFactors?.[b];
1458
- return N !== void 0 ? N : b === s.value.uom ? s.value.conversionFactor ?? 1 : 1;
1459
- }, d = (b, q) => {
1460
- const N = t(q);
1461
- s.value = {
1562
+ return N !== void 0 ? N : b === u.value.uom ? u.value.conversionFactor ?? 1 : 1;
1563
+ }, c = (b, L) => {
1564
+ const N = t(L);
1565
+ u.value = {
1462
1566
  qty: b,
1463
- uom: q,
1567
+ uom: L,
1464
1568
  conversionFactor: N,
1465
- stockUom: e.options.stockUom ?? s.value.stockUom,
1466
- stockQty: c(b * N)
1569
+ stockUom: e.options.stockUom ?? u.value.stockUom,
1570
+ stockQty: r(b * N)
1467
1571
  };
1468
- }, y = A({
1469
- get: () => s.value?.qty ?? 0,
1470
- set: (b) => d(b, s.value?.uom ?? "")
1471
- }), k = A({
1472
- get: () => s.value?.uom ?? "",
1473
- set: (b) => d(s.value?.qty ?? 0, b)
1474
- }), v = /* @__PURE__ */ new Set([
1572
+ }, y = I({
1573
+ get: () => u.value?.qty ?? 0,
1574
+ set: (b) => c(b, u.value?.uom ?? "")
1575
+ }), k = I({
1576
+ get: () => u.value?.uom ?? "",
1577
+ set: (b) => c(u.value?.qty ?? 0, b)
1578
+ }), h = /* @__PURE__ */ new Set([
1475
1579
  "Backspace",
1476
1580
  "Delete",
1477
1581
  "Tab",
@@ -1483,70 +1587,70 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1483
1587
  "ArrowDown",
1484
1588
  "Home",
1485
1589
  "End"
1486
- ]), h = (b) => {
1487
- if (b.ctrlKey || b.metaKey || b.altKey || v.has(b.key) || /^[0-9]$/.test(b.key)) return;
1488
- const q = b.target;
1489
- b.key === "." && !q.value.includes(".") || b.preventDefault();
1590
+ ]), v = (b) => {
1591
+ if (b.ctrlKey || b.metaKey || b.altKey || h.has(b.key) || /^[0-9]$/.test(b.key)) return;
1592
+ const L = b.target;
1593
+ b.key === "." && !L.value.includes(".") || b.preventDefault();
1490
1594
  }, x = (b) => {
1491
- const q = b.clipboardData?.getData("text") ?? "";
1492
- /^\d*\.?\d*$/.test(q) || b.preventDefault();
1493
- }, $ = ve({ open: !1, activeIndex: -1 }), T = () => {
1595
+ const L = b.clipboardData?.getData("text") ?? "";
1596
+ /^\d*\.?\d*$/.test(L) || b.preventDefault();
1597
+ }, $ = ve({ open: !1, activeIndex: -1 }), S = () => {
1494
1598
  $.activeIndex = Math.max(n.value.indexOf(k.value), 0), $.open = !0;
1495
- }, f = () => {
1599
+ }, s = () => {
1496
1600
  $.open = !1;
1497
1601
  }, l = () => {
1498
- $.open ? f() : T();
1602
+ $.open ? s() : S();
1499
1603
  }, o = (b) => {
1500
- k.value = b, f();
1604
+ k.value = b, s();
1501
1605
  }, i = (b) => {
1502
1606
  if (!$.open) {
1503
- T();
1607
+ S();
1504
1608
  return;
1505
1609
  }
1506
- const q = n.value.length;
1507
- q && ($.activeIndex = ($.activeIndex + b + q) % q);
1508
- }, w = () => {
1610
+ const L = n.value.length;
1611
+ L && ($.activeIndex = ($.activeIndex + b + L) % L);
1612
+ }, D = () => {
1509
1613
  if (!$.open) {
1510
- T();
1614
+ S();
1511
1615
  return;
1512
1616
  }
1513
1617
  const b = n.value[$.activeIndex];
1514
1618
  b !== void 0 && o(b);
1515
- }, r = A(() => {
1516
- const b = s.value;
1619
+ }, m = I(() => {
1620
+ const b = u.value;
1517
1621
  return !!b?.stockUom && (b.uom !== b.stockUom || b.qty !== b.stockQty);
1518
- }), F = A(() => {
1519
- const b = s.value;
1622
+ }), q = I(() => {
1623
+ const b = u.value;
1520
1624
  if (!b || !b.uom) return "—";
1521
- const q = `${b.qty} ${b.uom}`;
1522
- return r.value ? `${q} (${b.stockQty} ${b.stockUom})` : q;
1625
+ const L = `${b.qty} ${b.uom}`;
1626
+ return m.value ? `${L} (${b.stockQty} ${b.stockUom})` : L;
1523
1627
  });
1524
- return (b, q) => (u(), m("div", ja, [
1525
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
1526
- a("span", el, g(F.value), 1),
1527
- a("label", tl, g(e.label), 1)
1528
- ], 64)) : (u(), m(L, { key: 1 }, [
1529
- a("div", al, [
1530
- a("div", ll, [
1531
- a("div", nl, [
1532
- p(a("input", {
1628
+ return (b, L) => (d(), f("div", dl, [
1629
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
1630
+ a("span", cl, g(q.value), 1),
1631
+ a("label", ml, g(e.label), 1)
1632
+ ], 64)) : (d(), f(p, { key: 1 }, [
1633
+ a("div", fl, [
1634
+ a("div", vl, [
1635
+ a("div", yl, [
1636
+ _(a("input", {
1533
1637
  id: e.uuid,
1534
- "onUpdate:modelValue": q[0] || (q[0] = (N) => y.value = N),
1638
+ "onUpdate:modelValue": L[0] || (L[0] = (N) => y.value = N),
1535
1639
  class: "aquantity__qty",
1536
1640
  type: "number",
1537
1641
  disabled: e.mode === "read",
1538
1642
  required: e.required,
1539
- onKeydown: h,
1643
+ onKeydown: v,
1540
1644
  onPaste: x
1541
- }, null, 40, ol), [
1645
+ }, null, 40, hl), [
1542
1646
  [
1543
- Y,
1647
+ G,
1544
1648
  y.value,
1545
1649
  void 0,
1546
1650
  { number: !0 }
1547
1651
  ]
1548
1652
  ]),
1549
- p((u(), m("div", sl, [
1653
+ _((d(), f("div", bl, [
1550
1654
  a("button", {
1551
1655
  id: `${e.uuid}-uom`,
1552
1656
  type: "button",
@@ -1557,132 +1661,132 @@ const He = { class: "aform_form-element" }, Ee = { class: "aform_field-label" },
1557
1661
  "aria-activedescendant": $.open && $.activeIndex >= 0 ? `${e.uuid}-uom-opt-${$.activeIndex}` : void 0,
1558
1662
  onClick: l,
1559
1663
  onKeydown: [
1560
- q[1] || (q[1] = _(R((N) => i(1), ["prevent"]), ["down"])),
1561
- q[2] || (q[2] = _(R((N) => i(-1), ["prevent"]), ["up"])),
1562
- _(R(w, ["prevent"]), ["enter"]),
1563
- _(f, ["esc"])
1664
+ L[1] || (L[1] = F(V((N) => i(1), ["prevent"]), ["down"])),
1665
+ L[2] || (L[2] = F(V((N) => i(-1), ["prevent"]), ["up"])),
1666
+ F(V(D, ["prevent"]), ["enter"]),
1667
+ F(s, ["esc"])
1564
1668
  ]
1565
1669
  }, [
1566
- a("span", ul, g(k.value || e.uomLabel), 1),
1567
- q[3] || (q[3] = a("span", {
1670
+ a("span", $l, g(k.value || e.uomLabel), 1),
1671
+ L[3] || (L[3] = a("span", {
1568
1672
  class: "aquantity__caret",
1569
1673
  "aria-hidden": "true"
1570
1674
  }, null, -1))
1571
- ], 40, il),
1572
- p(a("ul", {
1675
+ ], 40, gl),
1676
+ _(a("ul", {
1573
1677
  class: "aquantity__uom-menu",
1574
1678
  role: "listbox",
1575
1679
  "aria-label": e.uomLabel
1576
1680
  }, [
1577
- (u(!0), m(L, null, j(n.value, (N, W) => (u(), m("li", {
1681
+ (d(!0), f(p, null, j(n.value, (N, W) => (d(), f("li", {
1578
1682
  id: `${e.uuid}-uom-opt-${W}`,
1579
1683
  key: N,
1580
1684
  role: "option",
1581
1685
  "aria-selected": N === k.value,
1582
- class: O(["aquantity__uom-option", { "is-active": W === $.activeIndex }]),
1686
+ class: Z(["aquantity__uom-option", { "is-active": W === $.activeIndex }]),
1583
1687
  onMouseenter: (te) => $.activeIndex = W,
1584
1688
  onClick: (te) => o(N)
1585
- }, g(N), 43, rl))), 128))
1586
- ], 8, dl), [
1587
- [P, $.open]
1689
+ }, g(N), 43, xl))), 128))
1690
+ ], 8, kl), [
1691
+ [E, $.open]
1588
1692
  ])
1589
1693
  ])), [
1590
- [J(ye), f]
1694
+ [J(ye), s]
1591
1695
  ])
1592
1696
  ]),
1593
1697
  a("label", {
1594
1698
  class: "aform_field-label",
1595
1699
  for: e.uuid
1596
- }, g(e.label), 9, cl)
1700
+ }, g(e.label), 9, Dl)
1597
1701
  ])
1598
1702
  ]),
1599
- a("div", ml, [
1600
- a("div", fl, [
1703
+ a("div", wl, [
1704
+ a("div", Ml, [
1601
1705
  a("input", {
1602
- value: s.value.stockUom,
1706
+ value: u.value.stockUom,
1603
1707
  class: "aform_input-field aquantity__stock-field",
1604
1708
  type: "text",
1605
1709
  disabled: ""
1606
- }, null, 8, vl),
1607
- a("label", yl, g(e.stockUomLabel), 1)
1710
+ }, null, 8, Tl),
1711
+ a("label", Sl, g(e.stockUomLabel), 1)
1608
1712
  ]),
1609
- a("div", hl, [
1713
+ a("div", Il, [
1610
1714
  a("input", {
1611
- value: s.value.stockQty,
1715
+ value: u.value.stockQty,
1612
1716
  class: "aform_input-field aquantity__stock-field",
1613
1717
  type: "number",
1614
1718
  disabled: ""
1615
- }, null, 8, bl),
1616
- a("label", gl, g(e.stockQtyLabel), 1)
1719
+ }, null, 8, Al),
1720
+ a("label", pl, g(e.stockQtyLabel), 1)
1617
1721
  ]),
1618
- a("div", $l, [
1722
+ a("div", _l, [
1619
1723
  a("input", {
1620
- value: s.value.conversionFactor,
1724
+ value: u.value.conversionFactor,
1621
1725
  class: "aform_input-field aquantity__stock-field",
1622
1726
  type: "number",
1623
1727
  disabled: ""
1624
- }, null, 8, kl),
1625
- a("label", xl, g(e.conversionFactorLabel), 1)
1728
+ }, null, 8, Ll),
1729
+ a("label", ql, g(e.conversionFactorLabel), 1)
1626
1730
  ])
1627
1731
  ]),
1628
- p(a("p", {
1732
+ _(a("p", {
1629
1733
  class: "aform_error",
1630
1734
  innerHTML: e.validation.errorMessage
1631
- }, null, 8, wl), [
1632
- [P, e.validation.errorMessage]
1735
+ }, null, 8, Fl), [
1736
+ [E, e.validation.errorMessage]
1633
1737
  ])
1634
1738
  ], 64))
1635
1739
  ]));
1636
1740
  }
1637
- }), Ml = /* @__PURE__ */ H(Dl, [["__scopeId", "data-v-0b714861"]]);
1638
- function Tl(e) {
1741
+ }), Bl = /* @__PURE__ */ H(Cl, [["__scopeId", "data-v-0b714861"]]);
1742
+ function Rl(e) {
1639
1743
  try {
1640
1744
  return ce(e);
1641
1745
  } catch {
1642
1746
  return;
1643
1747
  }
1644
1748
  }
1645
- function Sl(e) {
1646
- const s = e.value;
1647
- if (!s) return;
1648
- const n = Tl(s);
1749
+ function Vl(e) {
1750
+ const u = e.value;
1751
+ if (!u) return;
1752
+ const n = Rl(u);
1649
1753
  if (n) {
1650
1754
  const t = e.instance?.locale;
1651
1755
  return n(t);
1652
1756
  }
1653
- return s;
1757
+ return u;
1654
1758
  }
1655
- function Il(e, s) {
1759
+ function Hl(e, u) {
1656
1760
  let n = e;
1657
- const c = [s, "/", "-", "(", ")", " "];
1658
- for (const t of c)
1761
+ const r = [u, "/", "-", "(", ")", " "];
1762
+ for (const t of r)
1659
1763
  n = n.replaceAll(t, "");
1660
1764
  return n;
1661
1765
  }
1662
- function Al(e, s, n) {
1663
- let c = s;
1766
+ function Nl(e, u, n) {
1767
+ let r = u;
1664
1768
  for (const t of e) {
1665
- const d = c.indexOf(n);
1666
- if (d !== -1) {
1667
- const y = c.substring(0, d), k = c.substring(d + 1);
1668
- c = y + t + k;
1769
+ const c = r.indexOf(n);
1770
+ if (c !== -1) {
1771
+ const y = r.substring(0, c), k = r.substring(c + 1);
1772
+ r = y + t + k;
1669
1773
  }
1670
1774
  }
1671
- return c.slice(0, s.length);
1775
+ return r.slice(0, u.length);
1672
1776
  }
1673
- function pl(e, s) {
1674
- const n = Sl(s);
1777
+ function Ul(e, u) {
1778
+ const n = Vl(u);
1675
1779
  if (!n) return;
1676
- const c = "#", t = e.value, d = Il(t, c);
1677
- if (d) {
1678
- const y = Al(d, n, c), k = s.instance;
1679
- k?.maskFilled && (k.maskFilled = !y.includes(c)), e.value = y;
1780
+ const r = "#", t = e.value, c = Hl(t, r);
1781
+ if (c) {
1782
+ const y = Nl(c, n, r), k = u.instance;
1783
+ k?.maskFilled && (k.maskFilled = !y.includes(r)), e.value = y;
1680
1784
  } else
1681
1785
  e.value = n;
1682
1786
  }
1683
- const Ll = { class: "aform_form-element" }, ql = { class: "aform_display-value" }, Fl = { class: "aform_field-label" }, _l = ["id", "disabled", "maxlength", "required"], Cl = ["for"], Bl = ["innerHTML"], Rl = /* @__PURE__ */ V({
1787
+ const Pl = { class: "aform_form-element" }, El = { class: "aform_display-value" }, Kl = { class: "aform_field-label" }, Ql = ["id", "disabled", "maxlength", "required"], Yl = ["for"], Gl = ["innerHTML"], zl = /* @__PURE__ */ R({
1684
1788
  __name: "ATextInput",
1685
- props: /* @__PURE__ */ Q({
1789
+ props: /* @__PURE__ */ K({
1686
1790
  schema: {},
1687
1791
  label: {},
1688
1792
  selectRange: { type: Boolean },
@@ -1698,39 +1802,39 @@ const Ll = { class: "aform_form-element" }, ql = { class: "aform_display-value"
1698
1802
  }),
1699
1803
  emits: ["update:modelValue"],
1700
1804
  setup(e) {
1701
- const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = I(!0), c = G(e, "modelValue");
1702
- return (t, d) => (u(), m("div", Ll, [
1703
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
1704
- a("span", ql, g(c.value ?? ""), 1),
1705
- a("label", Fl, g(e.label), 1)
1706
- ], 64)) : (u(), m(L, { key: 1 }, [
1707
- p(a("input", {
1805
+ const u = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = T(!0), r = Y(e, "modelValue");
1806
+ return (t, c) => (d(), f("div", Pl, [
1807
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
1808
+ a("span", El, g(r.value ?? ""), 1),
1809
+ a("label", Kl, g(e.label), 1)
1810
+ ], 64)) : (d(), f(p, { key: 1 }, [
1811
+ _(a("input", {
1708
1812
  id: e.uuid,
1709
- "onUpdate:modelValue": d[0] || (d[0] = (y) => c.value = y),
1813
+ "onUpdate:modelValue": c[0] || (c[0] = (y) => r.value = y),
1710
1814
  class: "aform_input-field",
1711
1815
  disabled: e.mode === "read",
1712
1816
  maxlength: e.mask && n.value ? e.mask.length : void 0,
1713
1817
  required: e.required
1714
- }, null, 8, _l), [
1715
- [Y, c.value],
1716
- [J(pl), e.mask]
1818
+ }, null, 8, Ql), [
1819
+ [G, r.value],
1820
+ [J(Ul), e.mask]
1717
1821
  ]),
1718
1822
  a("label", {
1719
1823
  class: "aform_field-label",
1720
1824
  for: e.uuid
1721
- }, g(e.label), 9, Cl),
1722
- p(a("p", {
1825
+ }, g(e.label), 9, Yl),
1826
+ _(a("p", {
1723
1827
  class: "aform_error",
1724
- innerHTML: s.value
1725
- }, null, 8, Bl), [
1726
- [P, s.value]
1828
+ innerHTML: u.value
1829
+ }, null, 8, Gl), [
1830
+ [E, u.value]
1727
1831
  ])
1728
1832
  ], 64))
1729
1833
  ]));
1730
1834
  }
1731
- }), Vl = { class: "aform_form-element" }, Nl = { class: "aform_display-value aform_textbox-display" }, Ul = { class: "aform_field-label" }, Hl = ["id", "placeholder", "rows", "maxlength", "disabled", "required"], El = ["for"], Kl = ["innerHTML"], Pl = /* @__PURE__ */ V({
1835
+ }), Wl = { class: "aform_form-element" }, Jl = { class: "aform_display-value aform_textbox-display" }, Ol = { class: "aform_field-label" }, Xl = ["id", "placeholder", "rows", "maxlength", "disabled", "required"], Zl = ["for"], jl = ["innerHTML"], en = /* @__PURE__ */ R({
1732
1836
  __name: "ATextboxInput",
1733
- props: /* @__PURE__ */ Q({
1837
+ props: /* @__PURE__ */ K({
1734
1838
  schema: {},
1735
1839
  label: {},
1736
1840
  selectRange: { type: Boolean },
@@ -1749,74 +1853,74 @@ const Ll = { class: "aform_form-element" }, ql = { class: "aform_display-value"
1749
1853
  }),
1750
1854
  emits: ["update:modelValue"],
1751
1855
  setup(e) {
1752
- const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue");
1753
- return (c, t) => (u(), m("div", Vl, [
1754
- e.mode === "display" ? (u(), m(L, { key: 0 }, [
1755
- a("span", Nl, g(n.value ?? ""), 1),
1756
- a("label", Ul, g(e.label), 1)
1757
- ], 64)) : (u(), m(L, { key: 1 }, [
1758
- p(a("textarea", {
1856
+ const u = I(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = Y(e, "modelValue");
1857
+ return (r, t) => (d(), f("div", Wl, [
1858
+ e.mode === "display" ? (d(), f(p, { key: 0 }, [
1859
+ a("span", Jl, g(n.value ?? ""), 1),
1860
+ a("label", Ol, g(e.label), 1)
1861
+ ], 64)) : (d(), f(p, { key: 1 }, [
1862
+ _(a("textarea", {
1759
1863
  id: e.uuid,
1760
- "onUpdate:modelValue": t[0] || (t[0] = (d) => n.value = d),
1864
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => n.value = c),
1761
1865
  class: "aform_input-field aform_textbox",
1762
1866
  placeholder: e.placeholder,
1763
1867
  rows: e.rows,
1764
1868
  maxlength: e.maxlength,
1765
1869
  disabled: e.mode === "read",
1766
1870
  required: e.required
1767
- }, null, 8, Hl), [
1768
- [Y, n.value]
1871
+ }, null, 8, Xl), [
1872
+ [G, n.value]
1769
1873
  ]),
1770
1874
  a("label", {
1771
1875
  class: "aform_field-label",
1772
1876
  for: e.uuid
1773
- }, g(e.label), 9, El),
1774
- p(a("p", {
1877
+ }, g(e.label), 9, Zl),
1878
+ _(a("p", {
1775
1879
  class: "aform_error",
1776
- innerHTML: s.value
1777
- }, null, 8, Kl), [
1778
- [P, s.value]
1880
+ innerHTML: u.value
1881
+ }, null, 8, jl), [
1882
+ [E, u.value]
1779
1883
  ])
1780
1884
  ], 64))
1781
1885
  ]));
1782
1886
  }
1783
- }), Ql = /* @__PURE__ */ H(Pl, [["__scopeId", "data-v-2a9c793b"]]), Yl = { class: "login-container" }, Gl = { class: "account-container" }, zl = { class: "account-header" }, Wl = { id: "account-title" }, Jl = { id: "account-subtitle" }, Xl = { class: "login-form-container" }, Zl = { class: "login-form-email aform_form-element" }, Ol = ["disabled"], jl = { class: "login-form-password aform_form-element" }, en = ["disabled"], tn = ["disabled"], an = {
1887
+ }), tn = /* @__PURE__ */ H(en, [["__scopeId", "data-v-2a9c793b"]]), an = { class: "login-container" }, ln = { class: "account-container" }, nn = { class: "account-header" }, sn = { id: "account-title" }, on = { id: "account-subtitle" }, un = { class: "login-form-container" }, rn = { class: "login-form-email aform_form-element" }, dn = ["disabled"], cn = { class: "login-form-password aform_form-element" }, mn = ["disabled"], fn = ["disabled"], vn = {
1784
1888
  key: 0,
1785
1889
  class: "material-symbols-outlined loading-icon"
1786
- }, ln = /* @__PURE__ */ V({
1890
+ }, yn = /* @__PURE__ */ R({
1787
1891
  __name: "Login",
1788
1892
  props: {
1789
1893
  headerTitle: { default: "Login" },
1790
1894
  headerSubtitle: { default: "Enter your email and password to login" }
1791
1895
  },
1792
1896
  emits: ["loginFailed", "loginSuccess"],
1793
- setup(e, { emit: s }) {
1794
- const n = s, c = I(""), t = I(""), d = I(!1), y = I(!1);
1795
- function k(v) {
1796
- if (v.preventDefault(), d.value = !0, y.value) {
1797
- d.value = !1, n("loginFailed");
1897
+ setup(e, { emit: u }) {
1898
+ const n = u, r = T(""), t = T(""), c = T(!1), y = T(!1);
1899
+ function k(h) {
1900
+ if (h.preventDefault(), c.value = !0, y.value) {
1901
+ c.value = !1, n("loginFailed");
1798
1902
  return;
1799
1903
  }
1800
- d.value = !1, n("loginSuccess");
1904
+ c.value = !1, n("loginSuccess");
1801
1905
  }
1802
- return (v, h) => (u(), m("div", Yl, [
1906
+ return (h, v) => (d(), f("div", an, [
1803
1907
  a("div", null, [
1804
- a("div", Gl, [
1805
- a("div", zl, [
1806
- a("h1", Wl, g(e.headerTitle), 1),
1807
- a("p", Jl, g(e.headerSubtitle), 1)
1908
+ a("div", ln, [
1909
+ a("div", nn, [
1910
+ a("h1", sn, g(e.headerTitle), 1),
1911
+ a("p", on, g(e.headerSubtitle), 1)
1808
1912
  ]),
1809
1913
  a("form", { onSubmit: k }, [
1810
- a("div", Xl, [
1811
- a("div", Zl, [
1812
- h[2] || (h[2] = a("label", {
1914
+ a("div", un, [
1915
+ a("div", rn, [
1916
+ v[2] || (v[2] = a("label", {
1813
1917
  id: "login-email",
1814
1918
  for: "email",
1815
1919
  class: "aform_field-label"
1816
1920
  }, "Email", -1)),
1817
- p(a("input", {
1921
+ _(a("input", {
1818
1922
  id: "email",
1819
- "onUpdate:modelValue": h[0] || (h[0] = (x) => c.value = x),
1923
+ "onUpdate:modelValue": v[0] || (v[0] = (x) => r.value = x),
1820
1924
  class: "aform_input-field",
1821
1925
  name: "email",
1822
1926
  placeholder: "name@example.com",
@@ -1824,79 +1928,80 @@ const Ll = { class: "aform_form-element" }, ql = { class: "aform_display-value"
1824
1928
  "auto-capitalize": "none",
1825
1929
  "auto-complete": "email",
1826
1930
  "auto-correct": "off",
1827
- disabled: d.value
1828
- }, null, 8, Ol), [
1829
- [Y, c.value]
1931
+ disabled: c.value
1932
+ }, null, 8, dn), [
1933
+ [G, r.value]
1830
1934
  ])
1831
1935
  ]),
1832
- a("div", jl, [
1833
- h[3] || (h[3] = a("label", {
1936
+ a("div", cn, [
1937
+ v[3] || (v[3] = a("label", {
1834
1938
  id: "login-password",
1835
1939
  for: "password",
1836
1940
  class: "aform_field-label"
1837
1941
  }, "Password", -1)),
1838
- p(a("input", {
1942
+ _(a("input", {
1839
1943
  id: "password",
1840
- "onUpdate:modelValue": h[1] || (h[1] = (x) => t.value = x),
1944
+ "onUpdate:modelValue": v[1] || (v[1] = (x) => t.value = x),
1841
1945
  class: "aform_input-field",
1842
1946
  name: "password",
1843
1947
  type: "password",
1844
- disabled: d.value
1845
- }, null, 8, en), [
1846
- [Y, t.value]
1948
+ disabled: c.value
1949
+ }, null, 8, mn), [
1950
+ [G, t.value]
1847
1951
  ])
1848
1952
  ]),
1849
1953
  a("button", {
1850
1954
  class: "btn",
1851
- disabled: d.value || !c.value || !t.value,
1955
+ disabled: c.value || !r.value || !t.value,
1852
1956
  onClick: k
1853
1957
  }, [
1854
- d.value ? (u(), m("span", an, "progress_activity")) : B("", !0),
1855
- h[4] || (h[4] = a("span", { id: "login-form-button" }, "Login", -1))
1856
- ], 8, tn)
1958
+ c.value ? (d(), f("span", vn, "progress_activity")) : B("", !0),
1959
+ v[4] || (v[4] = a("span", { id: "login-form-button" }, "Login", -1))
1960
+ ], 8, fn)
1857
1961
  ])
1858
1962
  ], 32),
1859
- h[5] || (h[5] = a("button", { class: "btn" }, [
1963
+ v[5] || (v[5] = a("button", { class: "btn" }, [
1860
1964
  a("span", { id: "forgot-password-button" }, "Forgot password?")
1861
1965
  ], -1))
1862
1966
  ])
1863
1967
  ])
1864
1968
  ]));
1865
1969
  }
1866
- }), vn = /* @__PURE__ */ H(ln, [["__scopeId", "data-v-2c0f0634"]]), nn = {}, on = { class: "aform-loading" }, sn = { class: "aform-loading__label" };
1867
- function un(e, s) {
1868
- return u(), m("div", on, [
1869
- a("div", sn, [
1970
+ }), Tn = /* @__PURE__ */ H(yn, [["__scopeId", "data-v-2c0f0634"]]), hn = {}, bn = { class: "aform-loading" }, gn = { class: "aform-loading__label" };
1971
+ function $n(e, u) {
1972
+ return d(), f("div", bn, [
1973
+ a("div", gn, [
1870
1974
  fe(e.$slots, "default", {}, void 0, !0)
1871
1975
  ]),
1872
- s[0] || (s[0] = a("div", { class: "aform-loading__bar" }, null, -1))
1976
+ u[0] || (u[0] = a("div", { class: "aform-loading__bar" }, null, -1))
1873
1977
  ]);
1874
1978
  }
1875
- const dn = /* @__PURE__ */ H(nn, [["render", un], ["__scopeId", "data-v-274f5ba3"]]);
1876
- function yn(e) {
1877
- e.use(Le), e.component("ACheckbox", We), e.component("ACurrencyInput", It), e.component("ADate", la), e.component("ADropdown", va), e.component("ADatePicker", Te), e.component("ADateTime", me), e.component("ADateRange", pa), e.component("ADateSelection", se), e.component("AFieldset", Va), e.component("AFileAttach", Ya), e.component("AForm", Se), e.component("AFormLink", Me), e.component("ANumericInput", Oa), e.component("AQuantityInput", Ml), e.component("ATextInput", Rl), e.component("ATextboxInput", Ql), e.component("ADuration", wa), e.component("AFormLoading", dn);
1979
+ const kn = /* @__PURE__ */ H(hn, [["render", $n], ["__scopeId", "data-v-274f5ba3"]]);
1980
+ function Sn(e) {
1981
+ e.use(_e), e.component("ACheckbox", We), e.component("ACurrencyInput", It), e.component("ADate", sa), e.component("ADropdown", ha), e.component("ADatePicker", Te), e.component("ADateTime", Ma), e.component("ADateTimeInput", me), e.component("ADateRange", Ua), e.component("ADateSelection", ae), e.component("AFieldset", Wa), e.component("AFileAttach", al), e.component("AForm", Se), e.component("AFormLink", Me), e.component("ANumericInput", rl), e.component("AQuantityInput", Bl), e.component("ATextInput", zl), e.component("ATextboxInput", tn), e.component("ADuration", qa), e.component("AFormLoading", kn);
1878
1982
  }
1879
1983
  export {
1880
1984
  We as ACheckbox,
1881
1985
  It as ACurrencyInput,
1882
- la as ADate,
1986
+ sa as ADate,
1883
1987
  Te as ADatePicker,
1884
- pa as ADateRange,
1885
- se as ADateSelection,
1886
- me as ADateTime,
1887
- va as ADropdown,
1888
- wa as ADuration,
1889
- Va as AFieldset,
1890
- Ya as AFileAttach,
1988
+ Ua as ADateRange,
1989
+ ae as ADateSelection,
1990
+ Ma as ADateTime,
1991
+ me as ADateTimeInput,
1992
+ ha as ADropdown,
1993
+ qa as ADuration,
1994
+ Wa as AFieldset,
1995
+ al as AFileAttach,
1891
1996
  Se as AForm,
1892
1997
  Me as AFormLink,
1893
- dn as AFormLoading,
1894
- Oa as ANumericInput,
1895
- Ml as AQuantityInput,
1896
- Rl as ATextInput,
1897
- Ql as ATextboxInput,
1898
- vn as Login,
1998
+ kn as AFormLoading,
1999
+ rl as ANumericInput,
2000
+ Bl as AQuantityInput,
2001
+ zl as ATextInput,
2002
+ tn as ATextboxInput,
2003
+ Tn as Login,
1899
2004
  ce as deserializeFunction,
1900
- yn as install
2005
+ Sn as install
1901
2006
  };
1902
2007
  //# sourceMappingURL=aform.js.map