@signal24/vue-foundation 4.17.2 → 4.18.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.
@@ -1,19 +1,19 @@
1
1
  var kt = Object.defineProperty;
2
2
  var bt = (e, t, n) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var A = (e, t, n) => bt(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as _, ref as T, computed as M, watch as F, onMounted as $, openBlock as w, createElementBlock as b, createElementVNode as O, toDisplayString as W, withDirectives as J, createCommentVNode as D, Fragment as ee, renderList as he, vModelSelect as Tt, getCurrentInstance as pe, normalizeClass as B, normalizeStyle as St, withModifiers as ye, renderSlot as Q, reactive as Ct, h as te, Teleport as Lt, markRaw as xt, onBeforeUnmount as ge, resolveDirective as Mt, createBlock as qe, createSlots as It, withCtx as ce, createTextVNode as De, vModelText as Ht, onActivated as ze, onDeactivated as Ke } from "vue";
5
- import { compact as At, debounce as Ft, isEqual as Xe, upperFirst as Ot, startCase as Dt, cloneDeep as Bt, remove as $t, last as Vt } from "lodash";
6
- import { escapeHtml as _t } from "@vue/shared";
7
- import { escapeHtml as Ro } from "@vue/shared";
8
- import { installOpenApiClientInterceptors as Nt, isOpenApiError as Rt } from "@signal24/openapi-client-codegen/browser";
9
- import { format as ve } from "date-fns";
10
- const Wt = {
4
+ import { defineComponent as N, ref as T, computed as x, watch as F, onMounted as V, openBlock as w, createElementBlock as k, createElementVNode as D, toDisplayString as U, withDirectives as Q, createCommentVNode as O, Fragment as J, renderList as me, vModelSelect as Tt, getCurrentInstance as he, withModifiers as pe, normalizeStyle as St, normalizeClass as B, renderSlot as G, reactive as Ct, h as ee, Teleport as Lt, markRaw as Mt, onBeforeUnmount as ye, resolveDirective as xt, createBlock as Pe, createSlots as It, withCtx as ue, createTextVNode as De, vModelText as Ht, onActivated as qe, onDeactivated as ze } from "vue";
5
+ import { compact as Ye, debounce as At, isEqual as Ke, startCase as Ft, upperFirst as Dt, cloneDeep as Ot, remove as $t, last as Bt } from "lodash";
6
+ import { escapeHtml as Vt } from "@vue/shared";
7
+ import { escapeHtml as No } from "@vue/shared";
8
+ import { installOpenApiClientInterceptors as _t, isOpenApiError as Nt } from "@signal24/openapi-client-codegen/browser";
9
+ import { format as fe } from "date-fns";
10
+ const Rt = {
11
11
  key: 0,
12
12
  disabled: ""
13
- }, Ut = {
13
+ }, Wt = {
14
14
  key: 0,
15
15
  value: null
16
- }, jt = ["value"], vo = /* @__PURE__ */ _({
16
+ }, Ut = ["value"], fo = /* @__PURE__ */ N({
17
17
  __name: "vf-ajax-select",
18
18
  props: {
19
19
  modelValue: {},
@@ -25,229 +25,229 @@ const Wt = {
25
25
  },
26
26
  emits: ["update:modelValue"],
27
27
  setup(e, { emit: t }) {
28
- const n = e, o = t, i = T(null), l = M(() => i.value ? i.value.map((p) => {
29
- const k = p;
30
- return n.preprocesor ? n.preprocesor(k) : n.displayKey ? k[n.displayKey] : "";
31
- }) : null), c = T(n.modelValue ?? null);
28
+ const n = e, o = t, i = T(null), l = x(() => i.value ? i.value.map((y) => {
29
+ const b = y;
30
+ return n.preprocesor ? n.preprocesor(b) : n.displayKey ? b[n.displayKey] : "";
31
+ }) : null), u = T(n.modelValue ?? null);
32
32
  F(() => n.loadFn, r), F(
33
33
  () => n.modelValue,
34
- () => c.value = n.modelValue
35
- ), F(c, () => o("update:modelValue", c.value));
34
+ () => u.value = n.modelValue
35
+ ), F(u, () => o("update:modelValue", u.value));
36
36
  async function r() {
37
37
  i.value = await n.loadFn();
38
38
  }
39
- return $(r), (d, p) => l.value ? J((w(), b("select", {
39
+ return V(r), (d, y) => l.value ? Q((w(), k("select", {
40
40
  key: 1,
41
- "onUpdate:modelValue": p[0] || (p[0] = (k) => c.value = k)
41
+ "onUpdate:modelValue": y[0] || (y[0] = (b) => u.value = b)
42
42
  }, [
43
- n.nullText ? (w(), b("option", Ut, W(n.nullText), 1)) : D("", !0),
44
- (w(!0), b(ee, null, he(l.value, (k, y) => {
45
- var E;
46
- return w(), b("option", {
47
- key: y,
48
- value: (E = i.value) == null ? void 0 : E[y]
49
- }, W(k), 9, jt);
43
+ n.nullText ? (w(), k("option", Wt, U(n.nullText), 1)) : O("", !0),
44
+ (w(!0), k(J, null, me(l.value, (b, f) => {
45
+ var g;
46
+ return w(), k("option", {
47
+ key: f,
48
+ value: (g = i.value) == null ? void 0 : g[f]
49
+ }, U(b), 9, Ut);
50
50
  }), 128))
51
51
  ], 512)), [
52
- [Tt, c.value]
53
- ]) : (w(), b("select", Wt, [
54
- O("option", null, W(n.loadingText || "Loading..."), 1)
52
+ [Tt, u.value]
53
+ ]) : (w(), k("select", Rt, [
54
+ D("option", null, U(n.loadingText || "Loading..."), 1)
55
55
  ]));
56
56
  }
57
- }), Pt = /* @__PURE__ */ _({
57
+ }), jt = /* @__PURE__ */ N({
58
58
  __name: "overlay-anchor",
59
59
  props: {
60
60
  overlayId: {},
61
61
  anchor: {}
62
62
  },
63
63
  setup(e) {
64
- const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), l = pe();
65
- $(c);
66
- function c() {
64
+ const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), l = he();
65
+ V(u);
66
+ function u() {
67
67
  if (!l) return;
68
- const p = l.vnode.el, { styles: k, classes: y } = r(p, n);
69
- o.value = k, i.value = y;
68
+ const y = l.vnode.el, { styles: b, classes: f } = r(y, n);
69
+ o.value = b, i.value = f;
70
70
  }
71
- function r(p, k) {
72
- const y = t.anchor instanceof HTMLElement ? {} : t.anchor, E = k.getBoundingClientRect(), v = p.getBoundingClientRect();
73
- y.matchWidth && (v.width = E.width), y.matchHeight && (v.height = E.height);
74
- const a = y.class ? Array.isArray(y.class) ? y.class : [y.class] : [];
75
- let u, S;
76
- if (y.y === "center")
77
- u = E.top + E.height / 2 - v.height / 2, a.push("anchored-center-y");
71
+ function r(y, b) {
72
+ const f = t.anchor instanceof HTMLElement ? {} : t.anchor, g = b.getBoundingClientRect(), v = y.getBoundingClientRect();
73
+ f.matchWidth && (v.width = g.width), f.matchHeight && (v.height = g.height);
74
+ const a = f.class ? Array.isArray(f.class) ? f.class : [f.class] : [];
75
+ let c, S;
76
+ if (f.y === "center")
77
+ c = g.top + g.height / 2 - v.height / 2, a.push("anchored-center-y");
78
78
  else {
79
- const L = (E.bottom + v.height < window.innerHeight || y.y === "below") && y.y !== "above";
80
- u = L ? E.bottom : E.top - v.height, a.push(L ? "anchored-top" : "anchored-bottom");
79
+ const L = (g.bottom + v.height < window.innerHeight || f.y === "below") && f.y !== "above";
80
+ c = L ? g.bottom : g.top - v.height, a.push(L ? "anchored-top" : "anchored-bottom");
81
81
  }
82
- if (y.x === "center")
83
- S = E.left + E.width / 2 - v.width / 2, a.push("anchored-center-x");
82
+ if (f.x === "center")
83
+ S = g.left + g.width / 2 - v.width / 2, a.push("anchored-center-x");
84
84
  else {
85
- const L = (E.left + v.width < window.innerWidth || y.x === "left") && y.x !== "right";
86
- S = L ? E.left : E.right - v.width, a.push(L ? "anchored-left" : "anchored-right");
85
+ const L = (g.left + v.width < window.innerWidth || f.x === "left") && f.x !== "right";
86
+ S = L ? g.left : g.right - v.width, a.push(L ? "anchored-left" : "anchored-right");
87
87
  }
88
88
  return {
89
89
  styles: {
90
- top: `${u}px`,
90
+ top: `${c}px`,
91
91
  left: `${S}px`,
92
- ...y.matchWidth ? { width: `${v.width}px` } : {},
93
- ...y.matchHeight ? { height: `${v.height}px` } : {}
92
+ ...f.matchWidth ? { width: `${v.width}px` } : {},
93
+ ...f.matchHeight ? { height: `${v.height}px` } : {}
94
94
  },
95
95
  classes: a
96
96
  };
97
97
  }
98
98
  function d() {
99
- window.removeEventListener("click", d), Kt(t.overlayId);
99
+ window.removeEventListener("click", d), zt(t.overlayId);
100
100
  }
101
- return $(() => {
101
+ return V(() => {
102
102
  setTimeout(() => {
103
103
  window.addEventListener("click", d);
104
104
  }, 10);
105
- }), (p, k) => (w(), b("div", {
105
+ }), (y, b) => (w(), k("div", {
106
106
  class: B(["vf-overlay-anchor", i.value]),
107
107
  style: St(o.value),
108
- onClick: ye(d, ["stop"])
108
+ onClick: pe(d, ["stop"])
109
109
  }, [
110
- Q(p.$slots, "default")
110
+ G(y.$slots, "default")
111
111
  ], 6));
112
112
  }
113
113
  });
114
- let qt = 0;
115
- const V = Ct([]), mo = _({
114
+ let Pt = 0;
115
+ const _ = Ct([]), vo = N({
116
116
  setup() {
117
- return () => te("div", [
118
- he(V, (e) => te(Lt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
117
+ return () => ee("div", [
118
+ me(_, (e) => ee(Lt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
119
119
  ]);
120
120
  }
121
121
  });
122
- function Ee(e, t, n) {
122
+ function ge(e, t, n) {
123
123
  const o = document.getElementById("vf-overlay-target") ?? document.createElement("div");
124
124
  o.id = "vf-overlay-target", o.removeAttribute("inert"), document.body.appendChild(o);
125
- const i = String(++qt), l = xt(e), c = te(l, t), r = n != null && n.anchor ? te(Pt, { overlayId: i, anchor: n.anchor }, () => [c]) : void 0, d = {
125
+ const i = String(++Pt), l = Mt(e), u = ee(l, t), r = n != null && n.anchor ? ee(jt, { overlayId: i, anchor: n.anchor }, () => [u]) : void 0, d = {
126
126
  id: i,
127
127
  component: l,
128
128
  props: t,
129
129
  options: n ?? {},
130
- vnode: c,
130
+ vnode: u,
131
131
  wrapperVnode: r
132
132
  };
133
- return V.push(d), d;
133
+ return _.push(d), d;
134
134
  }
135
- function ho(e) {
136
- e.$ && Ye(e.$);
135
+ function mo(e) {
136
+ e.$ && Xe(e.$);
137
137
  }
138
- function Ye(e) {
138
+ function Xe(e) {
139
139
  let t = e;
140
- for (; t && !zt(t.vnode); )
140
+ for (; t && !qt(t.vnode); )
141
141
  t = t.parent;
142
142
  }
143
- function zt(e) {
144
- const t = V.findIndex((n) => n.vnode.component === e.component);
145
- return t >= 0 ? (V[t].props.callback(), !0) : !1;
143
+ function qt(e) {
144
+ const t = _.findIndex((n) => n.vnode.component === e.component);
145
+ return t >= 0 ? (_[t].props.callback(), !0) : !1;
146
146
  }
147
- function Kt(e) {
148
- const t = V.findIndex((n) => n.id === e);
149
- return t >= 0 ? (V[t].props.callback(), !0) : !1;
147
+ function zt(e) {
148
+ const t = _.findIndex((n) => n.id === e);
149
+ return t >= 0 ? (_[t].props.callback(), !0) : !1;
150
150
  }
151
- function ne(e) {
152
- const t = V.indexOf(e);
153
- t >= 0 && V.splice(t, 1);
151
+ function te(e) {
152
+ const t = _.indexOf(e);
153
+ t >= 0 && _.splice(t, 1);
154
154
  }
155
- async function we(e, t, n) {
155
+ async function Ee(e, t, n) {
156
156
  return new Promise((o) => {
157
157
  let i = null;
158
- const c = { ...t, callback: async (r) => {
158
+ const u = { ...t, callback: async (r) => {
159
159
  if (n != null && n.onCallback) {
160
160
  const d = n.onCallback(r);
161
161
  if (typeof d == "object" && "then" in d && typeof d.then == "function" && await d === !1)
162
162
  return;
163
163
  }
164
- ne(i), o(r);
164
+ te(i), o(r);
165
165
  } };
166
- i = Ee(e, c, n);
166
+ i = ge(e, u, n);
167
167
  });
168
168
  }
169
- function oe(e, t) {
169
+ function ne(e, t) {
170
170
  return typeof e == "object" && !(e instanceof Error) ? {
171
171
  ...e,
172
172
  classes: e.classes ?? []
173
173
  } : { title: t ? e : void 0, message: t ?? e, classes: [] };
174
174
  }
175
- async function Xt(e, t) {
176
- await we(se, oe(e, t));
175
+ async function Yt(e, t) {
176
+ await Ee(le, ne(e, t));
177
177
  }
178
- async function po(e, t) {
179
- const n = oe(e, t);
180
- return await we(se, {
178
+ async function ho(e, t) {
179
+ const n = ne(e, t);
180
+ return await Ee(le, {
181
181
  ...n,
182
182
  shouldConfirm: !0
183
183
  }) === !0;
184
184
  }
185
- async function yo(e, t) {
186
- const n = oe(e, t);
187
- return await we(se, {
185
+ async function po(e, t) {
186
+ const n = ne(e, t);
187
+ return await Ee(le, {
188
188
  ...n,
189
189
  shouldConfirm: !0,
190
190
  classes: ["destructive", ...n.classes]
191
191
  }) === !0;
192
192
  }
193
- function go(e, t) {
194
- const n = oe(e, t), o = Ee(se, {
193
+ function yo(e, t) {
194
+ const n = ne(e, t), o = ge(le, {
195
195
  ...n,
196
196
  isBare: !0,
197
197
  classes: ["wait", ...n.classes],
198
198
  callback: () => {
199
199
  }
200
200
  });
201
- return () => ne(o);
201
+ return () => te(o);
202
202
  }
203
- const U = {
203
+ const $ = {
204
204
  unhandledErrorSupportText: "please contact support",
205
205
  errorHandler: (e) => console.error("Unhandled error:", e),
206
206
  defaultDateFormat: "M/d/yy",
207
- defaultDateTimeFormat: "M/d/yy H:mm"
207
+ defaultTimeFormat: "H:mm"
208
208
  };
209
- function Eo(e) {
210
- Object.assign(U, e);
209
+ function go(e) {
210
+ Object.assign($, e);
211
211
  }
212
- class le extends Error {
212
+ class oe extends Error {
213
213
  constructor(t) {
214
214
  super(t), this.name = "UserError";
215
215
  }
216
216
  }
217
- function Yt(e) {
218
- return e instanceof le ? e.message : `An application error has occurred:
217
+ function Kt(e) {
218
+ return e instanceof oe ? e.message : `An application error has occurred:
219
219
 
220
- ${ke(e).message}
220
+ ${we(e).message}
221
221
 
222
- Please refresh the page and try again. If this error persists, ${U.unhandledErrorSupportText}.`;
222
+ Please refresh the page and try again. If this error persists, ${$.unhandledErrorSupportText}.`;
223
223
  }
224
- function ke(e) {
224
+ function we(e) {
225
225
  return e instanceof Error ? e : new Error(String(e));
226
226
  }
227
- async function wo(e, t) {
228
- const n = ke(e);
229
- return n instanceof le || U.errorHandler(n), Xt({
227
+ async function Eo(e, t) {
228
+ const n = we(e);
229
+ return n instanceof oe || $.errorHandler(n), Yt({
230
230
  title: t == null ? void 0 : t.title,
231
231
  message: n,
232
232
  classes: t == null ? void 0 : t.classes
233
233
  });
234
234
  }
235
- async function ko(e) {
236
- const t = ke(e);
237
- t instanceof le || U.errorHandler(t);
235
+ async function wo(e) {
236
+ const t = we(e);
237
+ t instanceof oe || $.errorHandler(t);
238
238
  }
239
239
  const z = Symbol("MaskState");
240
- function bo(e, t) {
240
+ function ko(e, t) {
241
241
  var i;
242
242
  const n = (i = e.$) == null ? void 0 : i.vnode.el, o = n.closest(".vf-modal");
243
- return Zt(o ?? n, t);
243
+ return Xt(o ?? n, t);
244
244
  }
245
- function To(e) {
245
+ function bo(e) {
246
246
  var o;
247
247
  const t = (o = e.$) == null ? void 0 : o.vnode.el, n = t.closest(".vf-modal");
248
248
  return Ze(n ?? t);
249
249
  }
250
- function Zt(e, t) {
250
+ function Xt(e, t) {
251
251
  if (!e[z]) {
252
252
  const n = document.createElement("div");
253
253
  n.classList.add("vf-mask"), e.appendChild(n), e[z] = { maskEl: n };
@@ -257,8 +257,8 @@ function Zt(e, t) {
257
257
  function Ze(e) {
258
258
  e[z] && e.removeChild(e[z].maskEl);
259
259
  }
260
- const me = Symbol("FormMaskState");
261
- function Gt(e, t, n) {
260
+ const ve = Symbol("FormMaskState");
261
+ function Zt(e, t, n) {
262
262
  const o = e instanceof Element ? e : Qe(e);
263
263
  if (!o) return () => {
264
264
  };
@@ -267,7 +267,7 @@ function Gt(e, t, n) {
267
267
  let l;
268
268
  i && (l = i.tagName === "INPUT" ? i.value : i.innerHTML, i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...");
269
269
  const r = [...o.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
270
- return r.forEach((d) => d.setAttribute("disabled", "disabled")), o[me] = {
270
+ return r.forEach((d) => d.setAttribute("disabled", "disabled")), o[ve] = {
271
271
  disabledElements: r,
272
272
  waitButton: i,
273
273
  buttonHtml: l
@@ -276,21 +276,21 @@ function Gt(e, t, n) {
276
276
  function Ge(e) {
277
277
  const t = e instanceof Element ? e : Qe(e);
278
278
  if (!t) return;
279
- const n = t[me];
280
- n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((o) => o.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[me]);
279
+ const n = t[ve];
280
+ n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((o) => o.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[ve]);
281
281
  }
282
282
  function Qe(e) {
283
283
  var n;
284
284
  const t = (n = e == null ? void 0 : e.$) == null ? void 0 : n.vnode.el;
285
285
  return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
286
286
  }
287
- const Qt = ["id"], Jt = {
287
+ const Gt = ["id"], Qt = {
288
288
  key: 0,
289
289
  class: "vf-modal-header"
290
- }, en = { class: "vf-modal-content" }, tn = {
290
+ }, Jt = { class: "vf-modal-content" }, en = {
291
291
  key: 1,
292
292
  class: "vf-modal-footer"
293
- }, nn = /* @__PURE__ */ _({
293
+ }, tn = /* @__PURE__ */ N({
294
294
  __name: "vf-modal",
295
295
  props: {
296
296
  id: {},
@@ -301,70 +301,70 @@ const Qt = ["id"], Jt = {
301
301
  },
302
302
  emits: ["formSubmit"],
303
303
  setup(e, { expose: t }) {
304
- const n = pe(), o = e;
305
- t({ mask: y, unmask: E, hide: v, unhide: a });
306
- const i = T(), l = T(), c = T(!1), r = M(() => At([...Array.isArray(o.class) ? o.class : [o.class], c.value && "hidden"]));
307
- $(() => {
308
- var u;
309
- document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", p), (u = i.value) == null || u.addEventListener("click", d));
310
- }), ge(() => {
311
- window.removeEventListener("keydown", p), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
304
+ const n = he(), o = e;
305
+ t({ mask: f, unmask: g, hide: v, unhide: a });
306
+ const i = T(), l = T(), u = T(!1), r = x(() => Ye([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
307
+ V(() => {
308
+ var c;
309
+ document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", y), (c = i.value) == null || c.addEventListener("click", d));
310
+ }), ye(() => {
311
+ window.removeEventListener("keydown", y), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
312
312
  });
313
- function d(u) {
314
- u.target == i.value && k();
313
+ function d(c) {
314
+ c.target == i.value && b();
315
315
  }
316
- function p(u) {
317
- if (u.key === "Esc" || u.key === "Escape") {
316
+ function y(c) {
317
+ if (c.key === "Esc" || c.key === "Escape") {
318
318
  const S = document.querySelectorAll(".vf-modal-wrap");
319
- S[S.length - 1] === i.value && k();
319
+ S[S.length - 1] === i.value && b();
320
320
  }
321
321
  }
322
- function k() {
323
- Ye(n);
322
+ function b() {
323
+ Xe(n);
324
324
  }
325
- function y() {
326
- return Gt(l.value), () => E();
325
+ function f() {
326
+ return Zt(l.value), () => g();
327
327
  }
328
- function E() {
328
+ function g() {
329
329
  Ge(l.value);
330
330
  }
331
331
  function v() {
332
- return c.value = !0, () => a();
332
+ return u.value = !0, () => a();
333
333
  }
334
334
  function a() {
335
- c.value = !1;
335
+ u.value = !1;
336
336
  }
337
- return (u, S) => (w(), b("div", {
338
- id: u.id,
337
+ return (c, S) => (w(), k("div", {
338
+ id: c.id,
339
339
  ref_key: "overlay",
340
340
  ref: i,
341
341
  class: B(["vf-overlay vf-modal-wrap", r.value])
342
342
  }, [
343
- O("form", {
343
+ D("form", {
344
344
  ref_key: "form",
345
345
  ref: l,
346
346
  action: ".",
347
- class: B(["vf-modal", { scrolls: u.scrolls }]),
348
- onSubmit: S[0] || (S[0] = ye((I) => u.$emit("formSubmit"), ["prevent"]))
347
+ class: B(["vf-modal", { scrolls: c.scrolls }]),
348
+ onSubmit: S[0] || (S[0] = pe((I) => c.$emit("formSubmit"), ["prevent"]))
349
349
  }, [
350
- u.$slots.header ? (w(), b("div", Jt, [
351
- Q(u.$slots, "header"),
352
- o.closeX ? (w(), b("i", {
350
+ c.$slots.header ? (w(), k("div", Qt, [
351
+ G(c.$slots, "header"),
352
+ o.closeX ? (w(), k("i", {
353
353
  key: 0,
354
354
  class: "close",
355
- onClick: k
356
- })) : D("", !0)
357
- ])) : D("", !0),
358
- O("div", en, [
359
- Q(u.$slots, "default")
355
+ onClick: b
356
+ })) : O("", !0)
357
+ ])) : O("", !0),
358
+ D("div", Jt, [
359
+ G(c.$slots, "default")
360
360
  ]),
361
- u.$slots.footer ? (w(), b("div", tn, [
362
- Q(u.$slots, "footer")
363
- ])) : D("", !0)
361
+ c.$slots.footer ? (w(), k("div", en, [
362
+ G(c.$slots, "footer")
363
+ ])) : O("", !0)
364
364
  ], 34)
365
- ], 10, Qt));
365
+ ], 10, Gt));
366
366
  }
367
- }), on = ["innerHtml"], ln = ["innerText"], se = /* @__PURE__ */ _({
367
+ }), nn = ["innerHtml"], on = ["innerText"], le = /* @__PURE__ */ N({
368
368
  __name: "vf-alert-modal",
369
369
  props: {
370
370
  isBare: { type: Boolean },
@@ -376,36 +376,36 @@ const Qt = ["id"], Jt = {
376
376
  callback: { type: Function }
377
377
  },
378
378
  setup(e) {
379
- const t = e, n = M(() => t.message instanceof Error ? Yt(t.message) : t.message);
379
+ const t = e, n = x(() => t.message instanceof Error ? Kt(t.message) : t.message);
380
380
  return (o, i) => {
381
- const l = Mt("autofocus");
382
- return w(), qe(nn, {
381
+ const l = xt("autofocus");
382
+ return w(), Pe(tn, {
383
383
  class: B(["vf-alert", ...o.classes ?? []])
384
384
  }, It({
385
- default: ce(() => [
386
- o.isHtml ? (w(), b("div", {
385
+ default: ue(() => [
386
+ o.isHtml ? (w(), k("div", {
387
387
  key: 0,
388
388
  innerHtml: o.message,
389
389
  class: "user-message"
390
- }, null, 8, on)) : (w(), b("div", {
390
+ }, null, 8, nn)) : (w(), k("div", {
391
391
  key: 1,
392
392
  innerText: n.value
393
- }, null, 8, ln))
393
+ }, null, 8, on))
394
394
  ]),
395
395
  _: 2
396
396
  }, [
397
397
  o.title ? {
398
398
  name: "header",
399
- fn: ce(() => [
400
- O("h1", null, W(o.title), 1)
399
+ fn: ue(() => [
400
+ D("h1", null, U(o.title), 1)
401
401
  ]),
402
402
  key: "0"
403
403
  } : void 0,
404
404
  o.isBare ? void 0 : {
405
405
  name: "footer",
406
- fn: ce(() => [
407
- o.shouldConfirm ? (w(), b(ee, { key: 0 }, [
408
- J((w(), b("button", {
406
+ fn: ue(() => [
407
+ o.shouldConfirm ? (w(), k(J, { key: 0 }, [
408
+ Q((w(), k("button", {
409
409
  class: "primary",
410
410
  onClick: i[0] || (i[0] = () => o.callback(!0))
411
411
  }, i[3] || (i[3] = [
@@ -413,11 +413,11 @@ const Qt = ["id"], Jt = {
413
413
  ]))), [
414
414
  [l]
415
415
  ]),
416
- O("button", {
416
+ D("button", {
417
417
  class: "default",
418
418
  onClick: i[1] || (i[1] = () => o.callback(!1))
419
419
  }, "Cancel")
420
- ], 64)) : J((w(), b("button", {
420
+ ], 64)) : Q((w(), k("button", {
421
421
  key: 1,
422
422
  class: "default",
423
423
  onClick: i[2] || (i[2] = () => o.callback(!0))
@@ -432,53 +432,53 @@ const Qt = ["id"], Jt = {
432
432
  ]), 1032, ["class"]);
433
433
  };
434
434
  }
435
- });
436
- var x = [];
437
- for (var de = 0; de < 256; ++de)
438
- x.push((de + 256).toString(16).slice(1));
439
- function sn(e, t = 0) {
440
- return (x[e[t + 0]] + x[e[t + 1]] + x[e[t + 2]] + x[e[t + 3]] + "-" + x[e[t + 4]] + x[e[t + 5]] + "-" + x[e[t + 6]] + x[e[t + 7]] + "-" + x[e[t + 8]] + x[e[t + 9]] + "-" + x[e[t + 10]] + x[e[t + 11]] + x[e[t + 12]] + x[e[t + 13]] + x[e[t + 14]] + x[e[t + 15]]).toLowerCase();
441
- }
442
- var G, rn = new Uint8Array(16);
443
- function an() {
444
- if (!G && (G = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !G))
445
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
446
- return G(rn);
447
- }
448
- var un = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
449
- const Be = {
450
- randomUUID: un
451
- };
452
- function cn(e, t, n) {
453
- if (Be.randomUUID && !t && !e)
454
- return Be.randomUUID();
435
+ }), M = [];
436
+ for (let e = 0; e < 256; ++e)
437
+ M.push((e + 256).toString(16).slice(1));
438
+ function ln(e, t = 0) {
439
+ return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
440
+ }
441
+ let ce;
442
+ const sn = new Uint8Array(16);
443
+ function rn() {
444
+ if (!ce) {
445
+ if (typeof crypto > "u" || !crypto.getRandomValues)
446
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
447
+ ce = crypto.getRandomValues.bind(crypto);
448
+ }
449
+ return ce(sn);
450
+ }
451
+ const an = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Oe = { randomUUID: an };
452
+ function un(e, t, n) {
453
+ if (Oe.randomUUID && !t && !e)
454
+ return Oe.randomUUID();
455
455
  e = e || {};
456
- var o = e.random || (e.rng || an)();
457
- return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, sn(o);
456
+ const o = e.random || (e.rng || rn)();
457
+ return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, ln(o);
458
458
  }
459
- function So(e) {
459
+ function To(e) {
460
460
  return e.replace(/\n/g, "<br>");
461
461
  }
462
- function dn(e) {
462
+ function cn(e) {
463
463
  return e.replace(/_/g, " ");
464
464
  }
465
- function fn(e) {
465
+ function dn(e) {
466
466
  const t = e.replace(/\D/g, "").replace(/^1/, "");
467
467
  return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
468
468
  }
469
- function vn(e, t = 1) {
469
+ function fn(e, t = 1) {
470
470
  return "$" + (Number(e) / t).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
471
471
  }
472
- function Co() {
473
- return cn();
472
+ function So() {
473
+ return un();
474
474
  }
475
- const mn = ["disabled", "placeholder", "required"], hn = {
475
+ const vn = ["disabled", "placeholder", "required"], mn = {
476
476
  key: 0,
477
477
  class: "no-results"
478
- }, pn = ["onMousemove", "onMousedown"], yn = ["innerHTML"], gn = ["innerHTML"], En = {
478
+ }, hn = ["onMousemove", "onMousedown"], pn = ["innerHTML"], yn = ["innerHTML"], gn = {
479
479
  key: 0,
480
480
  class: "no-results"
481
- }, wn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", kn = /* @__PURE__ */ _({
481
+ }, En = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", wn = /* @__PURE__ */ N({
482
482
  __name: "vf-smart-select",
483
483
  props: {
484
484
  modelValue: {},
@@ -507,37 +507,37 @@ const mn = ["disabled", "placeholder", "required"], hn = {
507
507
  },
508
508
  emits: ["optionsLoaded", "update:modelValue"],
509
509
  setup(e, { expose: t, emit: n }) {
510
- const o = Symbol("null"), i = Symbol("create"), l = e, c = n;
510
+ const o = Symbol("null"), i = Symbol("create"), l = e, u = n;
511
511
  t({
512
512
  addRemoteOption: wt
513
513
  });
514
- const r = T(), d = T(), p = T(), k = T(!1), y = T(!1), E = T([]), v = T(!1), a = T(""), u = T(null), S = T(null), I = T(!1), L = T(null), Se = T(!1), it = M(() => l.prependOptions ?? []), rt = M(() => l.appendOptions ?? []), Ce = M(() => !!l.disabled), at = M(() => !y.value && l.preload ? "Loading..." : l.nullTitle ? l.nullTitle : l.placeholder || ""), ut = M(() => l.noResultsText || "No options match your search."), R = M(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (s) => s[l.valueField] : null), j = M(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (s) => String(s[l.keyField]) : R.value ? (s) => String(R.value(s)) : null), ie = M(() => l.formatter ? l.formatter : l.labelField ? (s) => String(s[l.labelField]) : (s) => String(s)), Le = M(() => [...it.value, ...E.value, ...rt.value]), re = M(() => Le.value.map((s, f) => {
515
- var Ae, Fe;
516
- const m = ie.value(s), h = (Ae = l.subtitleFormatter) == null ? void 0 : Ae.call(l, s), g = m ? m.trim().toLowerCase() : "", C = h ? h.trim().toLowerCase() : "", Z = [];
517
- return l.searchFields ? l.searchFields.forEach((Oe) => {
518
- s[Oe] && Z.push(String(s[Oe]).toLowerCase());
519
- }) : (Z.push(g), C && Z.push(C)), {
520
- key: ((Fe = j.value) == null ? void 0 : Fe.call(j, s)) ?? String(f),
521
- title: m,
522
- subtitle: h,
514
+ const r = T(), d = T(), y = T(), b = T(!1), f = T(!1), g = T([]), v = T(!1), a = T(""), c = T(null), S = T(null), I = T(!1), L = T(null), Te = T(!1), it = x(() => l.prependOptions ?? []), rt = x(() => l.appendOptions ?? []), Se = x(() => !!l.disabled), at = x(() => !f.value && l.preload ? "Loading..." : l.nullTitle ? l.nullTitle : l.placeholder || ""), ut = x(() => l.noResultsText || "No options match your search."), W = x(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (s) => s[l.valueField] : null), j = x(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (s) => String(s[l.keyField]) : W.value ? (s) => String(W.value(s)) : null), se = x(() => l.formatter ? l.formatter : l.labelField ? (s) => String(s[l.labelField]) : (s) => String(s)), Ce = x(() => [...it.value, ...g.value, ...rt.value]), ie = x(() => Ce.value.map((s, m) => {
515
+ var He, Ae;
516
+ const h = se.value(s), p = (He = l.subtitleFormatter) == null ? void 0 : He.call(l, s), E = h ? h.trim().toLowerCase() : "", C = p ? p.trim().toLowerCase() : "", Z = [];
517
+ return l.searchFields ? l.searchFields.forEach((Fe) => {
518
+ s[Fe] && Z.push(String(s[Fe]).toLowerCase());
519
+ }) : (Z.push(E), C && Z.push(C)), {
520
+ key: ((Ae = j.value) == null ? void 0 : Ae.call(j, s)) ?? String(m),
521
+ title: h,
522
+ subtitle: p,
523
523
  searchContent: Z.join(""),
524
524
  ref: s
525
525
  };
526
- })), H = M(() => {
527
- let s = [...re.value];
526
+ })), H = x(() => {
527
+ let s = [...ie.value];
528
528
  if (v.value) {
529
- const f = a.value.trim().toLowerCase();
530
- if (f.length) {
531
- s = s.filter((g) => g.searchContent.includes(f));
532
- const m = _t(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), h = new RegExp(`(${m})`, "ig");
533
- s = s.map((g) => {
529
+ const m = a.value.trim().toLowerCase();
530
+ if (m.length) {
531
+ s = s.filter((E) => E.searchContent.includes(m));
532
+ const h = Vt(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${h})`, "ig");
533
+ s = s.map((E) => {
534
534
  var C;
535
535
  return {
536
- ...g,
537
- title: g.title.replace(h, "<mark>$1</mark>"),
538
- subtitle: (C = g.subtitle) == null ? void 0 : C.replace(h, "<mark>$1</mark>")
536
+ ...E,
537
+ title: E.title.replace(p, "<mark>$1</mark>"),
538
+ subtitle: (C = E.subtitle) == null ? void 0 : C.replace(p, "<mark>$1</mark>")
539
539
  };
540
- }), Se.value && (s.find((C) => C.searchContent === f) !== void 0 || s.push({
540
+ }), Te.value && (s.find((C) => C.searchContent === m) !== void 0 || s.push({
541
541
  key: i,
542
542
  title: "Create <strong>" + a.value.trim() + "</strong>..."
543
543
  }));
@@ -548,35 +548,35 @@ const mn = ["disabled", "placeholder", "required"], hn = {
548
548
  });
549
549
  return s;
550
550
  });
551
- F(() => l.modelValue, ue), F(
551
+ F(() => l.modelValue, ae), F(
552
552
  () => l.options,
553
553
  () => {
554
- E.value = l.options ?? [], y.value = !0;
554
+ g.value = l.options ?? [], f.value = !0;
555
555
  }
556
- ), F(re, () => {
557
- I.value && setTimeout(Ie, 0);
556
+ ), F(ie, () => {
557
+ I.value && setTimeout(xe, 0);
558
558
  }), F(a, () => {
559
559
  v.value && !l.remoteSearch && !a.value.trim().length && (v.value = !1);
560
560
  }), F(I, () => {
561
- I.value ? setTimeout(yt, 0) : (v.value = !1, a.value = S.value || "", p.value && (p.value.style.visibility = "hidden"));
561
+ I.value ? setTimeout(yt, 0) : (v.value = !1, a.value = S.value || "", y.value && (y.value.style.visibility = "hidden"));
562
562
  }), F(H, () => {
563
563
  var s;
564
- l.modelValue && !u.value && ue(), (L.value || v.value) && !H.value.find((f) => f.key == L.value) && (L.value = ((s = H.value[0]) == null ? void 0 : s.key) ?? o);
565
- }), $(async () => {
566
- Se.value = l.onCreateItem !== void 0, l.options ? (E.value = [...l.options], y.value = !0) : l.preload && await xe(), ue(), F(u, () => {
567
- u.value !== l.modelValue && c(
564
+ l.modelValue && !c.value && ae(), (L.value || v.value) && !H.value.find((m) => m.key == L.value) && (L.value = ((s = H.value[0]) == null ? void 0 : s.key) ?? o);
565
+ }), V(async () => {
566
+ Te.value = l.onCreateItem !== void 0, l.options ? (g.value = [...l.options], f.value = !0) : l.preload && await Le(), ae(), F(c, () => {
567
+ c.value !== l.modelValue && u(
568
568
  "update:modelValue",
569
- u.value && R.value ? R.value(u.value) : u.value
569
+ c.value && W.value ? W.value(c.value) : c.value
570
570
  );
571
- }), l.remoteSearch && F(a, Ft(ct, 250));
571
+ }), l.remoteSearch && F(a, At(ct, 250));
572
572
  });
573
- async function xe() {
574
- await Me(), E.value && c("optionsLoaded", E.value);
573
+ async function Le() {
574
+ await Me(), g.value && u("optionsLoaded", g.value);
575
575
  }
576
576
  async function Me() {
577
- var f;
577
+ var m;
578
578
  const s = l.remoteSearch && v.value && a.value ? a.value : null;
579
- k.value = !0, E.value = await ((f = l.loadOptions) == null ? void 0 : f.call(l, s)) ?? [], k.value = !1, y.value = !0;
579
+ b.value = !0, g.value = await ((m = l.loadOptions) == null ? void 0 : m.call(l, s)) ?? [], b.value = !1, f.value = !0;
580
580
  }
581
581
  function ct() {
582
582
  v.value && (Me(), v.value = a.value.trim().length > 0);
@@ -587,26 +587,26 @@ const mn = ["disabled", "placeholder", "required"], hn = {
587
587
  return;
588
588
  }
589
589
  if (!(s.key == "ArrowLeft" || s.key == "ArrowRight") && s.key != "Tab") {
590
- if (!y.value) {
590
+ if (!f.value) {
591
591
  v.value || s.preventDefault();
592
592
  return;
593
593
  }
594
594
  if (s.key == "ArrowUp" || s.key == "ArrowDown")
595
- return s.preventDefault(), ae(s.key == "ArrowUp" ? -1 : 1);
595
+ return s.preventDefault(), re(s.key == "ArrowUp" ? -1 : 1);
596
596
  if (s.key == "PageUp" || s.key == "PageDown")
597
- return s.preventDefault(), ae(s.key == "PageUp" ? -10 : 10);
597
+ return s.preventDefault(), re(s.key == "PageUp" ? -10 : 10);
598
598
  if (s.key == "Home" || s.key == "End")
599
- return s.preventDefault(), ae(s.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
599
+ return s.preventDefault(), re(s.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
600
600
  if (s.key == "Enter") {
601
601
  s.preventDefault();
602
- const f = H.value.find((m) => m.key == L.value);
603
- if (f) return He(f);
602
+ const m = H.value.find((h) => h.key == L.value);
603
+ if (m) return Ie(m);
604
604
  }
605
605
  if (s.key === "Delete" || s.key === "Backspace") {
606
606
  a.value.length > 1 && (v.value = !0);
607
607
  return;
608
608
  }
609
- !s.metaKey && wn.includes(s.key) && (v.value = !0);
609
+ !s.metaKey && En.includes(s.key) && (v.value = !0);
610
610
  }
611
611
  }
612
612
  function ft() {
@@ -616,82 +616,82 @@ const mn = ["disabled", "placeholder", "required"], hn = {
616
616
  }, 0);
617
617
  }
618
618
  function vt(s) {
619
- u.value ? L.value = mt(u.value) : l.nullTitle && (L.value = o);
619
+ c.value ? L.value = mt(c.value) : l.nullTitle && (L.value = o);
620
620
  }
621
621
  function mt(s) {
622
- var f;
623
- return j.value ? j.value(u.value) : ((f = ht(s)) == null ? void 0 : f.key) ?? "";
622
+ var m;
623
+ return j.value ? j.value(c.value) : ((m = ht(s)) == null ? void 0 : m.key) ?? "";
624
624
  }
625
625
  function ht(s) {
626
- const f = H.value.find((g) => g.ref === s);
627
- if (f)
628
- return f;
629
- const m = l.keyExtractor ? (g, C) => l.keyExtractor(g) === l.keyExtractor(C) : Xe, h = H.value.find((g) => m(g.ref, s));
630
- return h || null;
626
+ const m = H.value.find((E) => E.ref === s);
627
+ if (m)
628
+ return m;
629
+ const h = l.keyExtractor ? (E, C) => l.keyExtractor(E) === l.keyExtractor(C) : Ke, p = H.value.find((E) => h(E.ref, s));
630
+ return p || null;
631
631
  }
632
632
  function pt() {
633
- l.debug || (!a.value.length && l.nullTitle && (u.value = null, S.value = null), I.value = !1);
633
+ l.debug || (!a.value.length && l.nullTitle && (c.value = null, S.value = null), I.value = !1);
634
634
  }
635
635
  function yt() {
636
636
  var s;
637
- y.value || xe(), l.optionsListId && ((s = p.value) == null || s.setAttribute("id", l.optionsListId)), gt();
637
+ f.value || Le(), l.optionsListId && ((s = y.value) == null || s.setAttribute("id", l.optionsListId)), gt();
638
638
  }
639
639
  function gt() {
640
- const s = r.value.getBoundingClientRect(), f = s.y + s.height + 2, m = s.x, h = p.value, g = window.getComputedStyle(r.value);
641
- for (let C in g)
642
- /^(font|text)/.test(C) && (h.style[C] = g[C]);
643
- if (h.style.top = f + "px", h.style.left = m + "px", h.style.minWidth = s.width + "px", !g.maxHeight || g.maxHeight == "none") {
644
- const C = window.innerHeight - f - 12;
645
- h.style.maxHeight = C + "px";
640
+ const s = r.value.getBoundingClientRect(), m = s.y + s.height + 2, h = s.x, p = y.value, E = window.getComputedStyle(r.value);
641
+ for (let C in E)
642
+ /^(font|text)/.test(C) && (p.style[C] = E[C]);
643
+ if (p.style.top = m + "px", p.style.left = h + "px", p.style.minWidth = s.width + "px", !E.maxHeight || E.maxHeight == "none") {
644
+ const C = window.innerHeight - m - 12;
645
+ p.style.maxHeight = C + "px";
646
646
  }
647
- h.style.visibility = "visible", document.body.appendChild(h), setTimeout(Ie, 0);
647
+ p.style.visibility = "visible", document.body.appendChild(p), setTimeout(xe, 0);
648
648
  }
649
- function Ie() {
650
- if (!y.value || !L.value) return;
651
- const s = H.value.findIndex((h) => h.key == L.value), f = p.value, m = f == null ? void 0 : f.querySelectorAll(".option")[s];
652
- m && (f.scrollTop = m.offsetTop);
649
+ function xe() {
650
+ if (!f.value || !L.value) return;
651
+ const s = H.value.findIndex((p) => p.key == L.value), m = y.value, h = m == null ? void 0 : m.querySelectorAll(".option")[s];
652
+ h && (m.scrollTop = h.offsetTop);
653
653
  }
654
654
  function Et(s) {
655
655
  L.value = s ? s.key : null;
656
656
  }
657
- function ae(s) {
658
- const f = H.value.findIndex((C) => C.key == L.value);
659
- let m = f + s;
660
- if (m < 0 ? m = 0 : m >= H.value.length && (m = H.value.length - 1), f == m) return;
661
- L.value = H.value[m].key;
662
- const h = p.value, g = h == null ? void 0 : h.querySelectorAll(".option")[m];
663
- g && (g.offsetTop < h.scrollTop ? h.scrollTop = g.offsetTop : g.offsetTop + g.offsetHeight > h.scrollTop + h.clientHeight && (h.scrollTop = g.offsetTop + g.offsetHeight - h.clientHeight));
657
+ function re(s) {
658
+ const m = H.value.findIndex((C) => C.key == L.value);
659
+ let h = m + s;
660
+ if (h < 0 ? h = 0 : h >= H.value.length && (h = H.value.length - 1), m == h) return;
661
+ L.value = H.value[h].key;
662
+ const p = y.value, E = p == null ? void 0 : p.querySelectorAll(".option")[h];
663
+ E && (E.offsetTop < p.scrollTop ? p.scrollTop = E.offsetTop : E.offsetTop + E.offsetHeight > p.scrollTop + p.clientHeight && (p.scrollTop = E.offsetTop + E.offsetHeight - p.clientHeight));
664
664
  }
665
- function He(s) {
666
- var f, m;
665
+ function Ie(s) {
666
+ var m, h;
667
667
  if (v.value = !1, s.key == o)
668
- a.value = "", u.value = null, S.value = null;
668
+ a.value = "", c.value = null, S.value = null;
669
669
  else if (s.key === i) {
670
- const h = a.value.trim();
671
- a.value = "", u.value = null, S.value = null, (f = l.onCreateItem) == null || f.call(l, h);
670
+ const p = a.value.trim();
671
+ a.value = "", c.value = null, S.value = null, (m = l.onCreateItem) == null || m.call(l, p);
672
672
  } else {
673
- const g = re.value.find((C) => C.key == s.key).ref;
674
- u.value = g, S.value = ie.value(g), a.value = S.value || "";
673
+ const E = ie.value.find((C) => C.key == s.key).ref;
674
+ c.value = E, S.value = se.value(E), a.value = S.value || "";
675
675
  }
676
- (m = d.value) == null || m.blur();
676
+ (h = d.value) == null || h.blur();
677
677
  }
678
- function ue() {
679
- l.modelValue ? (u.value = R.value ? Le.value.find((s) => l.modelValue === R.value(s)) : l.modelValue, S.value = u.value ? ie.value(u.value) : null, a.value = S.value || "") : (u.value = null, S.value = null, a.value = "");
678
+ function ae() {
679
+ l.modelValue ? (c.value = W.value ? Ce.value.find((s) => l.modelValue === W.value(s)) : l.modelValue, S.value = c.value ? se.value(c.value) : null, a.value = S.value || "") : (c.value = null, S.value = null, a.value = "");
680
680
  }
681
681
  function wt(s) {
682
- E.value.unshift(s);
682
+ g.value.unshift(s);
683
683
  }
684
- return (s, f) => (w(), b("div", {
684
+ return (s, m) => (w(), k("div", {
685
685
  ref_key: "el",
686
686
  ref: r,
687
- class: B(["vf-smart-select", { disabled: Ce.value, open: I.value }])
687
+ class: B(["vf-smart-select", { disabled: Se.value, open: I.value }])
688
688
  }, [
689
- J(O("input", {
689
+ Q(D("input", {
690
690
  ref_key: "searchField",
691
691
  ref: d,
692
- "onUpdate:modelValue": f[0] || (f[0] = (m) => a.value = m),
692
+ "onUpdate:modelValue": m[0] || (m[0] = (h) => a.value = h),
693
693
  type: "text",
694
- disabled: Ce.value,
694
+ disabled: Se.value,
695
695
  class: B({ nullable: !!s.nullTitle }),
696
696
  placeholder: at.value,
697
697
  required: s.required,
@@ -699,40 +699,40 @@ const mn = ["disabled", "placeholder", "required"], hn = {
699
699
  onKeydown: dt,
700
700
  onFocus: ft,
701
701
  onBlur: pt
702
- }, null, 42, mn), [
702
+ }, null, 42, vn), [
703
703
  [Ht, a.value]
704
704
  ]),
705
- I.value ? (w(), b("div", {
705
+ I.value ? (w(), k("div", {
706
706
  key: 0,
707
707
  ref_key: "optionsContainer",
708
- ref: p,
708
+ ref: y,
709
709
  class: "vf-smart-select-options"
710
710
  }, [
711
- y.value ? (w(), b(ee, { key: 1 }, [
712
- (w(!0), b(ee, null, he(H.value, (m) => (w(), b("div", {
713
- key: String(m.key),
711
+ f.value ? (w(), k(J, { key: 1 }, [
712
+ (w(!0), k(J, null, me(H.value, (h) => (w(), k("div", {
713
+ key: String(h.key),
714
714
  class: B(["option", {
715
- highlighted: L.value === m.key
715
+ highlighted: L.value === h.key
716
716
  }]),
717
- onMousemove: (h) => Et(m),
718
- onMousedown: (h) => He(m)
717
+ onMousemove: (p) => Et(h),
718
+ onMousedown: (p) => Ie(h)
719
719
  }, [
720
- O("div", {
720
+ D("div", {
721
721
  class: "title",
722
- innerHTML: m.title
723
- }, null, 8, yn),
724
- m.subtitle ? (w(), b("div", {
722
+ innerHTML: h.title
723
+ }, null, 8, pn),
724
+ h.subtitle ? (w(), k("div", {
725
725
  key: 0,
726
726
  class: "subtitle",
727
- innerHTML: m.subtitle
728
- }, null, 8, gn)) : D("", !0)
729
- ], 42, pn))), 128)),
730
- !H.value.length && a.value ? (w(), b("div", En, W(ut.value), 1)) : D("", !0)
731
- ], 64)) : (w(), b("div", hn, "Loading..."))
732
- ], 512)) : D("", !0)
727
+ innerHTML: h.subtitle
728
+ }, null, 8, yn)) : O("", !0)
729
+ ], 42, hn))), 128)),
730
+ !H.value.length && a.value ? (w(), k("div", gn, U(ut.value), 1)) : O("", !0)
731
+ ], 64)) : (w(), k("div", mn, "Loading..."))
732
+ ], 512)) : O("", !0)
733
733
  ], 2));
734
734
  }
735
- }), Lo = /* @__PURE__ */ _({
735
+ }), Co = /* @__PURE__ */ N({
736
736
  __name: "vf-ez-smart-select",
737
737
  props: {
738
738
  modelValue: {},
@@ -743,34 +743,34 @@ const mn = ["disabled", "placeholder", "required"], hn = {
743
743
  },
744
744
  emits: ["update:modelValue"],
745
745
  setup(e, { emit: t }) {
746
- const n = e, o = M(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, d]) => ({
746
+ const n = e, o = x(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, d]) => ({
747
747
  value: r,
748
748
  label: d
749
- }))), i = M(() => n.formatter ? (r) => n.formatter(r) : (r) => r.label), l = t, c = T(o.value.find((r) => r.value === n.modelValue) ?? null);
749
+ }))), i = x(() => n.formatter ? (r) => n.formatter(r) : (r) => r.label), l = t, u = T(o.value.find((r) => r.value === n.modelValue) ?? null);
750
750
  return F(
751
751
  () => n.modelValue,
752
752
  (r) => {
753
- c.value = o.value.find((d) => d.value === r) ?? null;
753
+ u.value = o.value.find((d) => d.value === r) ?? null;
754
754
  }
755
- ), F(c, (r) => {
756
- var p;
757
- const d = r ? (p = o.value.find((k) => Xe(k, r))) == null ? void 0 : p.value : null;
755
+ ), F(u, (r) => {
756
+ var y;
757
+ const d = r ? (y = o.value.find((b) => Ke(b, r))) == null ? void 0 : y.value : null;
758
758
  l("update:modelValue", d ?? null);
759
- }), (r, d) => (w(), qe(kn, {
760
- modelValue: c.value,
761
- "onUpdate:modelValue": d[0] || (d[0] = (p) => c.value = p),
759
+ }), (r, d) => (w(), Pe(wn, {
760
+ modelValue: u.value,
761
+ "onUpdate:modelValue": d[0] || (d[0] = (y) => u.value = y),
762
762
  options: o.value,
763
763
  formatter: i.value,
764
764
  "null-title": r.nullTitle
765
765
  }, null, 8, ["modelValue", "options", "formatter", "null-title"]));
766
766
  }
767
- }), bn = { class: "content" }, Tn = { class: "message" }, Sn = {
767
+ }), kn = { class: "content" }, bn = { class: "message" }, Tn = {
768
768
  key: 0,
769
769
  class: "close"
770
- }, Cn = {
770
+ }, Sn = {
771
771
  key: 0,
772
772
  class: "progress-bar"
773
- }, Ln = /* @__PURE__ */ _({
773
+ }, Cn = /* @__PURE__ */ N({
774
774
  __name: "vf-toast",
775
775
  props: {
776
776
  message: {},
@@ -786,113 +786,113 @@ const mn = ["disabled", "placeholder", "required"], hn = {
786
786
  t.onClick ? t.onClick() : t.disableClose || t.callback();
787
787
  }
788
788
  const o = T();
789
- return t.durationSecs !== null && $(() => {
789
+ return t.durationSecs !== null && V(() => {
790
790
  var l;
791
791
  const i = t.durationSecs ?? 5;
792
792
  (l = o.value) == null || l.animate([{ width: "0%" }, { width: "100%" }], {
793
793
  duration: i * 1e3,
794
794
  easing: "linear"
795
795
  }), setTimeout(() => t.callback(), i * 1e3);
796
- }), (i, l) => (w(), b("div", {
796
+ }), (i, l) => (w(), k("div", {
797
797
  class: B(["vf-toast", i.className]),
798
- onClick: ye(n, ["stop"])
798
+ onClick: pe(n, ["stop"])
799
799
  }, [
800
- O("div", bn, [
801
- O("div", Tn, W(i.message), 1),
802
- i.disableClose ? D("", !0) : (w(), b("div", Sn, "x"))
800
+ D("div", kn, [
801
+ D("div", bn, U(i.message), 1),
802
+ i.disableClose ? O("", !0) : (w(), k("div", Tn, "x"))
803
803
  ]),
804
- i.durationSecs !== null ? (w(), b("div", Cn, [
805
- O("div", {
804
+ i.durationSecs !== null ? (w(), k("div", Sn, [
805
+ D("div", {
806
806
  ref_key: "progressInnerEl",
807
807
  ref: o,
808
808
  class: "inner"
809
809
  }, null, 512)
810
- ])) : D("", !0)
810
+ ])) : O("", !0)
811
811
  ], 2));
812
812
  }
813
813
  });
814
- function xo(e) {
815
- const t = Ee(Ln, {
814
+ function Lo(e) {
815
+ const t = ge(Cn, {
816
816
  ...e,
817
- callback: () => ne(t)
817
+ callback: () => te(t)
818
818
  });
819
- return () => ne(t);
819
+ return () => te(t);
820
820
  }
821
- function xn(e) {
821
+ function Ln(e) {
822
822
  const t = Math.floor(Math.log(e) / Math.log(1024)), o = (e / Math.pow(1024, t)).toFixed(2), i = ["B", "KB", "MB", "GB", "TB"][t];
823
823
  return `${o} ${i}`;
824
824
  }
825
825
  function Mn(e) {
826
826
  return e != null && String(e).length ? e : "-";
827
827
  }
828
- function In(e) {
828
+ function xn(e) {
829
829
  return e || "-";
830
830
  }
831
+ function In(e) {
832
+ return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Vn(Number(e));
833
+ }
831
834
  function Hn(e) {
832
- return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : _n(Number(e));
835
+ return e && dn(e);
833
836
  }
834
837
  function An(e) {
835
- return e && fn(e);
838
+ return e ? Dt(e) : null;
836
839
  }
837
840
  function Fn(e) {
838
- return e ? Ot(e) : null;
839
- }
840
- function On(e) {
841
- return e ? Dt(e) : null;
841
+ return e ? Ft(e) : null;
842
842
  }
843
843
  function Dn(e) {
844
844
  return e ? e.toUpperCase() : null;
845
845
  }
846
- function Bn(e) {
847
- return e ? dn(e) : null;
846
+ function On(e) {
847
+ return e ? cn(e) : null;
848
848
  }
849
849
  function $n(e, t = 1) {
850
- return vn(e, t);
850
+ return fn(e, t);
851
851
  }
852
852
  const $e = {
853
- bytes: xn,
853
+ bytes: Ln,
854
854
  dash: Mn,
855
- dashZeros: In,
856
- number: Hn,
857
- phone: An,
858
- upperFirst: Fn,
859
- startCase: On,
855
+ dashZeros: xn,
856
+ number: In,
857
+ phone: Hn,
858
+ upperFirst: An,
859
+ startCase: Fn,
860
860
  upperCase: Dn,
861
- desnake: Bn,
861
+ desnake: On,
862
862
  usCurrency: $n
863
863
  }, Mo = (e) => ({
864
864
  ...$e,
865
865
  ...e($e)
866
866
  });
867
- function Io(e, t, n) {
867
+ function xo(e, t, n) {
868
868
  const o = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
869
869
  return o === -1 ? !1 : (e.splice(o, 1, n), !0);
870
870
  }
871
- function Ho(e, t) {
871
+ function Io(e, t) {
872
872
  const n = document.createElement("div");
873
- n.classList.add("vf-overlay"), n.addEventListener("click", y), document.body.appendChild(n);
873
+ n.classList.add("vf-overlay"), n.addEventListener("click", f), document.body.appendChild(n);
874
874
  const o = document.createElement("div");
875
875
  o.classList.add("vf-context-menu"), o.style.position = "absolute", n.appendChild(o);
876
876
  const i = e.currentTarget;
877
877
  i.style.userSelect = "none", i.classList.add("context-menu-active"), t.targetClass && i.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((v) => {
878
878
  if (v == "-") {
879
- const u = document.createElement("div");
880
- u.classList.add("separator"), o.appendChild(u);
879
+ const c = document.createElement("div");
880
+ c.classList.add("separator"), o.appendChild(c);
881
881
  return;
882
882
  }
883
883
  const a = document.createElement("div");
884
- a.classList.add("item"), a.style.userSelect = "none", a.innerText = v.title, o.appendChild(a), v.class && a.classList.add(v.class), v.shouldConfirm ? a.addEventListener("click", (u) => E(u, a, v.handler)) : a.addEventListener("click", () => v.handler());
884
+ a.classList.add("item"), a.style.userSelect = "none", a.innerText = v.title, o.appendChild(a), v.class && a.classList.add(v.class), v.shouldConfirm ? a.addEventListener("click", (c) => g(c, a, v.handler)) : a.addEventListener("click", () => v.handler());
885
885
  });
886
- const l = window.innerWidth - e.clientX, c = window.innerHeight - e.clientY, r = o.offsetHeight, d = o.offsetWidth, p = l < d ? e.clientX - d - 1 : e.clientX + 1, k = c < r ? e.clientY - r - 1 : e.clientY + 1;
887
- o.style.left = p + "px", o.style.top = k + "px", setTimeout(() => {
886
+ const l = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY, r = o.offsetHeight, d = o.offsetWidth, y = l < d ? e.clientX - d - 1 : e.clientX + 1, b = u < r ? e.clientY - r - 1 : e.clientY + 1;
887
+ o.style.left = y + "px", o.style.top = b + "px", setTimeout(() => {
888
888
  o.style.width = o.offsetWidth + "px";
889
889
  }, 50);
890
- function y() {
890
+ function f() {
891
891
  t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
892
892
  }
893
- function E(v, a, u) {
893
+ function g(v, a, c) {
894
894
  if (a.classList.contains("pending-confirm"))
895
- return u();
895
+ return c();
896
896
  const S = a.innerHTML;
897
897
  a.classList.add("pending-confirm"), a.innerText = "Confirm";
898
898
  const I = () => {
@@ -901,61 +901,61 @@ function Ho(e, t) {
901
901
  a.addEventListener("mouseleave", I), v.stopPropagation();
902
902
  }
903
903
  }
904
- const Vn = (e) => new Promise((t) => setTimeout(t, e)), Ao = (e) => Vn(e * 1e3);
905
- function _n(e) {
904
+ const Bn = (e) => new Promise((t) => setTimeout(t, e)), Ho = (e) => Bn(e * 1e3);
905
+ function Vn(e) {
906
906
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
907
907
  }
908
- function Fo(e, t) {
909
- return e != null ? Bt(e) : t;
908
+ function Ao(e, t) {
909
+ return e != null ? Ot(e) : t;
910
910
  }
911
- function Oo(e, t) {
911
+ function Fo(e, t) {
912
912
  const n = { ...e };
913
913
  for (const o of t)
914
914
  n[o] === "" && (n[o] = null);
915
915
  return n;
916
916
  }
917
917
  function Do(e) {
918
- Nt({
918
+ _t({
919
919
  ...e,
920
920
  onError(t, n) {
921
921
  var i;
922
- Rt(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new le(t.body.error));
922
+ Nt(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new oe(t.body.error));
923
923
  const o = (i = e.onError) == null ? void 0 : i.call(e, t, n);
924
924
  return o !== void 0 ? o : t;
925
925
  }
926
926
  });
927
927
  }
928
- const be = Symbol("HookState");
929
- function Bo(e, t) {
930
- const n = t ?? pe();
931
- $(() => Nn(n, e), n), ze(() => Rn(n), n), Ke(() => Ve(n), n), ge(() => Ve(n), n);
928
+ const ke = Symbol("HookState");
929
+ function Oo(e, t) {
930
+ const n = t ?? he();
931
+ V(() => _n(n, e), n), qe(() => Nn(n), n), ze(() => Be(n), n), ye(() => Be(n), n);
932
932
  }
933
- function Nn(e, t) {
933
+ function _n(e, t) {
934
934
  const n = {};
935
- if (t.elScrolledToBottom && (n.el = new K(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
935
+ if (t.elScrolledToBottom && (n.el = new Y(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
936
936
  const o = Je(e.vnode.el);
937
- o ? n.ancestor = new K(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
937
+ o ? n.ancestor = new Y(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
938
938
  }
939
- t.windowScrolledToBottom && (n.window = new K(window, t.windowScrolledToBottom)), e[be] = n;
939
+ t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[ke] = n;
940
940
  }
941
- function Rn(e) {
941
+ function Nn(e) {
942
942
  var n, o, i;
943
- const t = e[be];
943
+ const t = e[ke];
944
944
  (n = t == null ? void 0 : t.el) == null || n.install(), (o = t == null ? void 0 : t.ancestor) == null || o.install(), (i = t == null ? void 0 : t.window) == null || i.install();
945
945
  }
946
- function Ve(e) {
946
+ function Be(e) {
947
947
  var n, o, i;
948
- const t = e[be];
948
+ const t = e[ke];
949
949
  (n = t == null ? void 0 : t.el) == null || n.uninstall(), (o = t == null ? void 0 : t.ancestor) == null || o.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
950
950
  }
951
- const fe = ["auto", "scroll"];
951
+ const de = ["auto", "scroll"];
952
952
  function Je(e) {
953
953
  const t = e.parentElement;
954
954
  if (!t) return null;
955
955
  const n = window.getComputedStyle(t);
956
- return fe.includes(n.overflow) || fe.includes(n.overflowX) || fe.includes(n.overflowY) ? t : Je(t);
956
+ return de.includes(n.overflow) || de.includes(n.overflowX) || de.includes(n.overflowY) ? t : Je(t);
957
957
  }
958
- class K {
958
+ class Y {
959
959
  constructor(t, n) {
960
960
  A(this, "isTripped", !1);
961
961
  A(this, "onScrollWithContext", this.onScroll.bind(this));
@@ -972,25 +972,25 @@ class K {
972
972
  }
973
973
  }
974
974
  function $o(e) {
975
- $(() => window.addEventListener("resize", e)), ze(() => window.addEventListener("resize", e)), Ke(() => window.removeEventListener("resize", e)), ge(() => window.removeEventListener("resize", e));
976
- }
977
- const Wn = {
978
- mounted: Ne,
979
- updated: Ne
980
- }, _e = Symbol("HasAutoFocused");
981
- function Ne(e, t) {
982
- if (t.value === void 0 && e[_e] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
983
- e[_e] = !0;
975
+ V(() => window.addEventListener("resize", e)), qe(() => window.addEventListener("resize", e)), ze(() => window.removeEventListener("resize", e)), ye(() => window.removeEventListener("resize", e));
976
+ }
977
+ const Rn = {
978
+ mounted: _e,
979
+ updated: _e
980
+ }, Ve = Symbol("HasAutoFocused");
981
+ function _e(e, t) {
982
+ if (t.value === void 0 && e[Ve] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
983
+ e[Ve] = !0;
984
984
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
985
985
  setTimeout(() => n.focus(), 10);
986
986
  }
987
- const Un = {
988
- mounted: jn
987
+ const Wn = {
988
+ mounted: Un
989
989
  }, P = Symbol("ConfirmState");
990
- function jn(e, t) {
990
+ function Un(e, t) {
991
991
  e.addEventListener("click", (n) => {
992
- var c, r;
993
- const o = Date.now(), i = ((c = t.value) == null ? void 0 : c.text) !== void 0 ? t.value.text : "Confirm";
992
+ var u, r;
993
+ const o = Date.now(), i = ((u = t.value) == null ? void 0 : u.text) !== void 0 ? t.value.text : "Confirm";
994
994
  if (e[P]) {
995
995
  if (o - e[P].initTime < 300)
996
996
  return;
@@ -1009,78 +1009,86 @@ function jn(e, t) {
1009
1009
  e[P] = l, i && (e.innerHTML = i), (r = t.value) != null && r.class && e.classList.add(t.value.class), e.addEventListener("mouseout", l.resetHandler);
1010
1010
  });
1011
1011
  }
1012
- const Pn = {
1013
- beforeMount: qn
1012
+ const jn = {
1013
+ beforeMount: Pn
1014
1014
  };
1015
- function qn(e) {
1015
+ function Pn(e) {
1016
1016
  e.addEventListener("blur", () => {
1017
1017
  let t = e.value;
1018
- /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + ve(/* @__PURE__ */ new Date(), "yy"));
1018
+ /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + fe(/* @__PURE__ */ new Date(), "yy"));
1019
1019
  const n = Date.parse(t);
1020
- isNaN(n) ? e.value = "" : e.value = ve(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1020
+ isNaN(n) ? e.value = "" : e.value = fe(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1021
1021
  });
1022
1022
  }
1023
- const zn = {
1024
- beforeMount: Re,
1025
- updated: Re
1023
+ const qn = {
1024
+ beforeMount: Ne,
1025
+ updated: Ne
1026
1026
  };
1027
- function Re(e, t) {
1028
- t.value == t.oldValue && e.innerHTML.length || (e.innerText = Kn(e, t));
1027
+ function Ne(e, t) {
1028
+ t.value == t.oldValue && e.innerHTML.length || (e.innerText = zn(e, t));
1029
1029
  }
1030
- function Kn(e, t) {
1031
- var d, p;
1030
+ function zn(e, t) {
1031
+ var y, b;
1032
1032
  if (!t.value)
1033
- return ((d = e.attributes.getNamedItem("placeholder")) == null ? void 0 : d.value) ?? "";
1033
+ return ((y = e.attributes.getNamedItem("placeholder")) == null ? void 0 : y.value) ?? "";
1034
1034
  let n = "";
1035
1035
  const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"), l = new Date(i);
1036
1036
  e.attributes.getNamedItem("display-utc") !== null && l.setMinutes(l.getMinutes() - l.getTimezoneOffset());
1037
- let c = (p = e.attributes.getNamedItem("format")) == null ? void 0 : p.value;
1038
- if (!c && e.attributes.getNamedItem("relative-date") !== null) {
1039
- const k = /* @__PURE__ */ new Date();
1040
- k.getFullYear() == l.getFullYear() && k.getMonth() == l.getMonth() && k.getDate() == l.getDate() && (n = "at", c = "HH:mm");
1037
+ let u = (b = e.attributes.getNamedItem("format")) == null ? void 0 : b.value;
1038
+ const r = e.attributes.getNamedItem("date-only") !== null;
1039
+ if (!u && e.attributes.getNamedItem("relative-date") !== null) {
1040
+ const f = /* @__PURE__ */ new Date();
1041
+ f.getFullYear() === l.getFullYear() && f.getMonth() === l.getMonth() && f.getDate() === l.getDate() && (n = "at", u = "HH:mm");
1042
+ }
1043
+ if (!u && e.attributes.getNamedItem("simplified-date") !== null) {
1044
+ let f = null;
1045
+ const g = /* @__PURE__ */ new Date();
1046
+ g.getFullYear() === l.getFullYear() ? (g.getMonth() !== l.getMonth() || g.getDate() !== l.getDate()) && (f = "M/d") : f = "M/d/YY";
1047
+ const v = r ? null : $.defaultTimeFormat;
1048
+ u = Ye([f, v]).join(" ");
1041
1049
  }
1042
- c || (e.attributes.getNamedItem("date-only") !== null ? c = U.defaultDateFormat : c = U.defaultDateTimeFormat);
1043
- let r = ve(l, c);
1044
- return n && (r = n + " " + r), r;
1050
+ u || (r ? u = $.defaultDateFormat : u = `${$.defaultDateFormat} ${$.defaultTimeFormat}`);
1051
+ let d = fe(l, u);
1052
+ return n && (d = n + " " + d), d;
1045
1053
  }
1046
- const Xn = {
1047
- beforeMount: We,
1048
- updated: We,
1049
- unmounted: Yn
1054
+ const Yn = {
1055
+ beforeMount: Re,
1056
+ updated: Re,
1057
+ unmounted: Kn
1050
1058
  };
1051
- function We(e, t) {
1059
+ function Re(e, t) {
1052
1060
  e.tagName === "LABEL" && (t.value ? e.classList.remove("disabled") : e.classList.add("disabled"), e = e.querySelector("input")), t.value ? e.setAttribute("disabled", "disabled") : e.removeAttribute("disabled");
1053
1061
  }
1054
- function Yn(e) {
1062
+ function Kn(e) {
1055
1063
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1056
1064
  }
1057
- const Zn = {
1058
- beforeMount: Ue,
1059
- updated: Ue,
1065
+ const Xn = {
1066
+ beforeMount: We,
1067
+ updated: We,
1060
1068
  unmounted: tt
1061
- }, Y = Symbol("HasAutoFocused"), Te = [];
1062
- function Gn() {
1063
- Te.forEach(et);
1069
+ }, X = Symbol("HasAutoFocused"), be = [];
1070
+ function Zn() {
1071
+ be.forEach(et);
1064
1072
  }
1065
- setInterval(Gn, 1e3);
1066
- function Ue(e, t) {
1067
- var c;
1073
+ setInterval(Zn, 1e3);
1074
+ function We(e, t) {
1075
+ var u;
1068
1076
  if (t.value == t.oldValue) return;
1069
1077
  if (!t.value) return tt(e);
1070
- const n = new Date(t.value), o = (c = e.attributes.getNamedItem("base-time")) == null ? void 0 : c.value, i = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
1071
- e[Y] || Te.push(e), e[Y] = {
1078
+ const n = new Date(t.value), o = (u = e.attributes.getNamedItem("base-time")) == null ? void 0 : u.value, i = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
1079
+ e[X] || be.push(e), e[X] = {
1072
1080
  startTs: i,
1073
1081
  includeSeconds: l
1074
1082
  }, et(e);
1075
1083
  }
1076
1084
  function et(e) {
1077
- const t = e[Y], n = Math.round((Date.now() - t.startTs) / 1e3);
1078
- e.innerText = Qn(n, t.includeSeconds);
1085
+ const t = e[X], n = Math.round((Date.now() - t.startTs) / 1e3);
1086
+ e.innerText = Gn(n, t.includeSeconds);
1079
1087
  }
1080
1088
  function tt(e) {
1081
- e[Y] && ($t(Te, e), delete e[Y]), e.innerText = "-";
1089
+ e[X] && ($t(be, e), delete e[X]), e.innerText = "-";
1082
1090
  }
1083
- function Qn(e, t) {
1091
+ function Gn(e, t) {
1084
1092
  const n = [], o = Math.floor(e / 86400);
1085
1093
  o && n.push(o + "d"), e -= o * 86400;
1086
1094
  const i = Math.floor(e / 3600);
@@ -1088,58 +1096,58 @@ function Qn(e, t) {
1088
1096
  const l = Math.floor(e / 60);
1089
1097
  return (o || i || l) && n.push(l + "m"), t ? n.length || n.push("0m") : (e -= l * 60, n.push(e + "s")), n.join(" ");
1090
1098
  }
1091
- const Jn = {
1099
+ const Qn = {
1092
1100
  mounted: nt,
1093
- updated: eo,
1101
+ updated: Jn,
1094
1102
  unmounted: ot
1095
- }, N = /* @__PURE__ */ new Map();
1103
+ }, R = /* @__PURE__ */ new Map();
1096
1104
  function nt(e, t) {
1097
- N.size === 0 && window.addEventListener("keydown", lt), N.set(t.value.toLowerCase(), [...N.get(t.value.toLowerCase()) ?? [], e]);
1105
+ R.size === 0 && window.addEventListener("keydown", lt), R.set(t.value.toLowerCase(), [...R.get(t.value.toLowerCase()) ?? [], e]);
1098
1106
  }
1099
1107
  function ot(e, t) {
1100
- const n = N.get(t.value.toLowerCase());
1108
+ const n = R.get(t.value.toLowerCase());
1101
1109
  if (n) {
1102
1110
  const o = n.indexOf(e);
1103
- o !== -1 && n.splice(o, 1), n.length === 0 && N.delete(t.value.toLowerCase());
1111
+ o !== -1 && n.splice(o, 1), n.length === 0 && R.delete(t.value.toLowerCase());
1104
1112
  }
1105
- N.size === 0 && window.removeEventListener("keydown", lt);
1113
+ R.size === 0 && window.removeEventListener("keydown", lt);
1106
1114
  }
1107
- function eo(e, t) {
1115
+ function Jn(e, t) {
1108
1116
  ot(e, t), nt(e, t);
1109
1117
  }
1110
1118
  function lt(e) {
1111
1119
  if (typeof e.key != "string") return;
1112
- const t = e.key.toLowerCase(), n = N.get(t);
1120
+ const t = e.key.toLowerCase(), n = R.get(t);
1113
1121
  if (n) {
1114
- const o = Vt(n);
1122
+ const o = Bt(n);
1115
1123
  o == null || o.click(), e.preventDefault();
1116
1124
  }
1117
1125
  }
1118
- const q = Symbol("InfiniteScrollHandler"), to = {
1126
+ const q = Symbol("InfiniteScrollHandler"), eo = {
1119
1127
  mounted(e, t) {
1120
- e[q] = new K(e, t.value);
1128
+ e[q] = new Y(e, t.value);
1121
1129
  },
1122
1130
  updated(e, t) {
1123
1131
  var n;
1124
- (n = e[q]) == null || n.uninstall(), e[q] = new K(e, t.value);
1132
+ (n = e[q]) == null || n.uninstall(), e[q] = new Y(e, t.value);
1125
1133
  },
1126
1134
  unmounted(e) {
1127
1135
  var t;
1128
1136
  (t = e[q]) == null || t.uninstall(), delete e[q];
1129
1137
  }
1130
- }, no = {
1131
- beforeMount: je,
1132
- updated: je
1138
+ }, to = {
1139
+ beforeMount: Ue,
1140
+ updated: Ue
1133
1141
  };
1134
- function je(e, t) {
1142
+ function Ue(e, t) {
1135
1143
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1136
1144
  }
1137
- const oo = {
1138
- mounted: Pe,
1139
- updated: Pe,
1145
+ const no = {
1146
+ mounted: je,
1147
+ updated: je,
1140
1148
  unmounted: st
1141
- }, X = Symbol("TooltipState");
1142
- function Pe(e, t) {
1149
+ }, K = Symbol("TooltipState");
1150
+ function je(e, t) {
1143
1151
  var o;
1144
1152
  let n = ((o = e.attributes.getNamedItem("tip")) == null ? void 0 : o.value) ?? t.value;
1145
1153
  if (t.value || (n = null), n) {
@@ -1147,15 +1155,15 @@ function Pe(e, t) {
1147
1155
  content: n,
1148
1156
  html: e.getAttribute("html") !== null
1149
1157
  };
1150
- e[X] ? e[X].configure(i) : e[X] = new lo(e, i);
1158
+ e[K] ? e[K].configure(i) : e[K] = new oo(e, i);
1151
1159
  } else
1152
1160
  st(e);
1153
1161
  }
1154
1162
  function st(e) {
1155
1163
  var t;
1156
- (t = e[X]) == null || t.destroy(), delete e[X];
1164
+ (t = e[K]) == null || t.destroy(), delete e[K];
1157
1165
  }
1158
- class lo {
1166
+ class oo {
1159
1167
  constructor(t, n) {
1160
1168
  A(this, "lastMoveEvt");
1161
1169
  A(this, "checkInterval");
@@ -1192,8 +1200,8 @@ class lo {
1192
1200
  }
1193
1201
  handleMouseMove(t) {
1194
1202
  const n = this.tipEl.offsetWidth, o = this.tipEl.offsetHeight, i = window.innerWidth, l = window.innerHeight;
1195
- let c = t.pageX + 10, r = t.pageY + 20;
1196
- c + n > i && (c = t.pageX - 5 - n), r + o > l && (r = t.pageY - 5 - o), this.tipEl.style.left = c + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
1203
+ let u = t.pageX + 10, r = t.pageY + 20;
1204
+ u + n > i && (u = t.pageX - 5 - n), r + o > l && (r = t.pageY - 5 - o), this.tipEl.style.left = u + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
1197
1205
  }
1198
1206
  checkMoveEvent() {
1199
1207
  var t;
@@ -1203,59 +1211,59 @@ class lo {
1203
1211
  this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
1204
1212
  }
1205
1213
  }
1206
- function so(e) {
1207
- e.directive("autofocus", Wn), e.directive("confirm-button", Un), e.directive("date-input", Pn), e.directive("datetime", zn), e.directive("disabled", Xn), e.directive("duration", Zn), e.directive("hotkey", Jn), e.directive("infinite-scroll", to), e.directive("readonly", no), e.directive("tooltip", oo);
1214
+ function lo(e) {
1215
+ e.directive("autofocus", Rn), e.directive("confirm-button", Wn), e.directive("date-input", jn), e.directive("datetime", qn), e.directive("disabled", Yn), e.directive("duration", Xn), e.directive("hotkey", Qn), e.directive("infinite-scroll", eo), e.directive("readonly", to), e.directive("tooltip", no);
1208
1216
  }
1209
- function Vo(e) {
1210
- so(e);
1217
+ function Bo(e) {
1218
+ lo(e);
1211
1219
  }
1212
1220
  export {
1213
- mo as OverlayContainer,
1214
- le as UserError,
1215
- vo as VfAjaxSelect,
1216
- se as VfAlertModal,
1217
- Lo as VfEzSmartSelect,
1218
- nn as VfModal,
1219
- kn as VfSmartSelect,
1220
- Fo as cloneProp,
1221
- Eo as configureVf,
1221
+ vo as OverlayContainer,
1222
+ oe as UserError,
1223
+ fo as VfAjaxSelect,
1224
+ le as VfAlertModal,
1225
+ Co as VfEzSmartSelect,
1226
+ tn as VfModal,
1227
+ wn as VfSmartSelect,
1228
+ Ao as cloneProp,
1229
+ go as configureVf,
1222
1230
  Mo as createFilters,
1223
- Ee as createOverlayInjection,
1224
- dn as desnakeCase,
1225
- Kt as dismissOverlayInjectionById,
1226
- ho as dismissOverlayInjectionByInstance,
1227
- Ye as dismissOverlayInjectionByInternalInstance,
1228
- zt as dismissOverlayInjectionByVnode,
1229
- Ro as escapeHtml,
1230
- Yt as formatError,
1231
- _n as formatNumber,
1232
- fn as formatPhone,
1233
- vn as formatUSCurrency,
1234
- ko as handleError,
1235
- wo as handleErrorAndAlert,
1231
+ ge as createOverlayInjection,
1232
+ cn as desnakeCase,
1233
+ zt as dismissOverlayInjectionById,
1234
+ mo as dismissOverlayInjectionByInstance,
1235
+ Xe as dismissOverlayInjectionByInternalInstance,
1236
+ qt as dismissOverlayInjectionByVnode,
1237
+ No as escapeHtml,
1238
+ Kt as formatError,
1239
+ Vn as formatNumber,
1240
+ dn as formatPhone,
1241
+ fn as formatUSCurrency,
1242
+ wo as handleError,
1243
+ Eo as handleErrorAndAlert,
1236
1244
  Do as installApiClientInterceptors,
1237
- Vo as installVf,
1238
- bo as maskComponent,
1239
- Zt as maskEl,
1240
- Gt as maskForm,
1241
- So as nl2br,
1242
- Oo as nullifyEmptyInputs,
1243
- we as presentOverlay,
1244
- ne as removeOverlayInjection,
1245
- Io as replaceElement,
1246
- Xt as showAlert,
1247
- po as showConfirm,
1248
- yo as showConfirmDestroy,
1249
- Ho as showContextMenu,
1250
- xo as showToast,
1251
- go as showWait,
1252
- Vn as sleep,
1253
- Ao as sleepSecs,
1254
- ke as toError,
1255
- To as unmaskComponent,
1245
+ Bo as installVf,
1246
+ ko as maskComponent,
1247
+ Xt as maskEl,
1248
+ Zt as maskForm,
1249
+ To as nl2br,
1250
+ Fo as nullifyEmptyInputs,
1251
+ Ee as presentOverlay,
1252
+ te as removeOverlayInjection,
1253
+ xo as replaceElement,
1254
+ Yt as showAlert,
1255
+ ho as showConfirm,
1256
+ po as showConfirmDestroy,
1257
+ Io as showContextMenu,
1258
+ Lo as showToast,
1259
+ yo as showWait,
1260
+ Bn as sleep,
1261
+ Ho as sleepSecs,
1262
+ we as toError,
1263
+ bo as unmaskComponent,
1256
1264
  Ze as unmaskEl,
1257
1265
  Ge as unmaskForm,
1258
- Bo as useInfiniteScroll,
1266
+ Oo as useInfiniteScroll,
1259
1267
  $o as useResizeWatcher,
1260
- Co as uuid
1268
+ So as uuid
1261
1269
  };