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