@signal24/vue-foundation 4.17.3 → 4.18.1

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 bt = Object.defineProperty;
2
- var Tt = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var A = (e, t, n) => Tt(e, typeof t != "symbol" ? t + "" : t, n);
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 J, createCommentVNode as O, Fragment as ee, renderList as he, vModelSelect as St, getCurrentInstance as pe, normalizeClass as B, normalizeStyle as Ct, withModifiers as ye, renderSlot as Q, reactive as Lt, h as te, Teleport as Mt, markRaw as xt, onBeforeUnmount as ge, resolveDirective as It, createBlock as qe, createSlots as Ht, withCtx as ce, createTextVNode as Oe, vModelText as At, onActivated as ze, onDeactivated as Ye } from "vue";
5
- import { compact as Ke, debounce as Ft, isEqual as Xe, upperFirst as Dt, startCase as Ot, cloneDeep as $t, remove as Bt, last as Vt } from "lodash";
6
- import { escapeHtml as _t } from "@vue/shared";
1
+ var kt = Object.defineProperty;
2
+ var bt = (e, t, n) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var A = (e, t, n) => bt(e, typeof t != "symbol" ? t + "" : t, n);
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
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 = {
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__ */ N({
16
+ }, Ut = ["value"], fo = /* @__PURE__ */ N({
17
17
  __name: "vf-ajax-select",
18
18
  props: {
19
19
  modelValue: {},
@@ -36,32 +36,32 @@ const Wt = {
36
36
  async function r() {
37
37
  i.value = await n.loadFn();
38
38
  }
39
- return V(r), (d, y) => l.value ? J((w(), k("select", {
39
+ return V(r), (d, y) => l.value ? Q((w(), k("select", {
40
40
  key: 1,
41
41
  "onUpdate:modelValue": y[0] || (y[0] = (b) => u.value = b)
42
42
  }, [
43
- n.nullText ? (w(), k("option", Ut, U(n.nullText), 1)) : O("", !0),
44
- (w(!0), k(ee, null, he(l.value, (b, f) => {
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
45
  var g;
46
46
  return w(), k("option", {
47
47
  key: f,
48
48
  value: (g = i.value) == null ? void 0 : g[f]
49
- }, U(b), 9, jt);
49
+ }, U(b), 9, Ut);
50
50
  }), 128))
51
51
  ], 512)), [
52
- [St, u.value]
53
- ]) : (w(), k("select", Wt, [
52
+ [Tt, u.value]
53
+ ]) : (w(), k("select", Rt, [
54
54
  D("option", null, U(n.loadingText || "Loading..."), 1)
55
55
  ]));
56
56
  }
57
- }), Pt = /* @__PURE__ */ N({
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();
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
65
  V(u);
66
66
  function u() {
67
67
  if (!l) return;
@@ -96,7 +96,7 @@ const Wt = {
96
96
  };
97
97
  }
98
98
  function d() {
99
- window.removeEventListener("click", d), Yt(t.overlayId);
99
+ window.removeEventListener("click", d), zt(t.overlayId);
100
100
  }
101
101
  return V(() => {
102
102
  setTimeout(() => {
@@ -104,25 +104,25 @@ const Wt = {
104
104
  }, 10);
105
105
  }), (y, b) => (w(), k("div", {
106
106
  class: B(["vf-overlay-anchor", i.value]),
107
- style: Ct(o.value),
108
- onClick: ye(d, ["stop"])
107
+ style: St(o.value),
108
+ onClick: pe(d, ["stop"])
109
109
  }, [
110
- Q(y.$slots, "default")
110
+ G(y.$slots, "default")
111
111
  ], 6));
112
112
  }
113
113
  });
114
- let qt = 0;
115
- const _ = Lt([]), mo = N({
114
+ let Pt = 0;
115
+ const _ = Ct([]), vo = N({
116
116
  setup() {
117
- return () => te("div", [
118
- he(_, (e) => te(Mt, { 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), u = te(l, t), r = n != null && n.anchor ? te(Pt, { overlayId: i, anchor: n.anchor }, () => [u]) : 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,
@@ -132,27 +132,27 @@ function Ee(e, t, n) {
132
132
  };
133
133
  return _.push(d), d;
134
134
  }
135
- function ho(e) {
136
- e.$ && Ze(e.$);
135
+ function mo(e) {
136
+ e.$ && Xe(e.$);
137
137
  }
138
- function Ze(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) {
143
+ function qt(e) {
144
144
  const t = _.findIndex((n) => n.vnode.component === e.component);
145
145
  return t >= 0 ? (_[t].props.callback(), !0) : !1;
146
146
  }
147
- function Yt(e) {
147
+ function zt(e) {
148
148
  const t = _.findIndex((n) => n.id === e);
149
149
  return t >= 0 ? (_[t].props.callback(), !0) : !1;
150
150
  }
151
- function ne(e) {
151
+ function te(e) {
152
152
  const t = _.indexOf(e);
153
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
158
  const u = { ...t, callback: async (r) => {
@@ -161,44 +161,44 @@ async function we(e, t, n) {
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, u, 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 Kt(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
203
  const $ = {
204
204
  unhandledErrorSupportText: "please contact support",
@@ -206,60 +206,60 @@ const $ = {
206
206
  defaultDateFormat: "M/d/yy",
207
207
  defaultTimeFormat: "H:mm"
208
208
  };
209
- function Eo(e) {
209
+ function go(e) {
210
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 Xt(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
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 || $.errorHandler(n), Kt({
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 || $.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
- return Ge(n ?? t);
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 };
254
254
  }
255
- return e[z].maskEl.innerText = t ?? "", () => Ge(e);
255
+ return e[z].maskEl.innerText = t ?? "", () => Ze(e);
256
256
  }
257
- function Ge(e) {
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) {
262
- const o = e instanceof Element ? e : Je(e);
260
+ const ve = Symbol("FormMaskState");
261
+ function Zt(e, t, n) {
262
+ const o = e instanceof Element ? e : Qe(e);
263
263
  if (!o) return () => {
264
264
  };
265
265
  o.classList.add("vf-masked");
@@ -267,30 +267,30 @@ 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
274
- }, () => Qe(o);
274
+ }, () => Ge(o);
275
275
  }
276
- function Qe(e) {
277
- const t = e instanceof Element ? e : Je(e);
276
+ function Ge(e) {
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
- function Je(e) {
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__ */ N({
293
+ }, tn = /* @__PURE__ */ N({
294
294
  __name: "vf-modal",
295
295
  props: {
296
296
  id: {},
@@ -301,13 +301,13 @@ const Qt = ["id"], Jt = {
301
301
  },
302
302
  emits: ["formSubmit"],
303
303
  setup(e, { expose: t }) {
304
- const n = pe(), o = e;
304
+ const n = he(), o = e;
305
305
  t({ mask: f, unmask: g, hide: v, unhide: a });
306
- const i = T(), l = T(), u = T(!1), r = x(() => Ke([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
306
+ const i = T(), l = T(), u = T(!1), r = x(() => Ye([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
307
307
  V(() => {
308
308
  var c;
309
309
  document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", y), (c = i.value) == null || c.addEventListener("click", d));
310
- }), ge(() => {
310
+ }), ye(() => {
311
311
  window.removeEventListener("keydown", y), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
312
312
  });
313
313
  function d(c) {
@@ -320,13 +320,13 @@ const Qt = ["id"], Jt = {
320
320
  }
321
321
  }
322
322
  function b() {
323
- Ze(n);
323
+ Xe(n);
324
324
  }
325
325
  function f() {
326
- return Gt(l.value), () => g();
326
+ return Zt(l.value), () => g();
327
327
  }
328
328
  function g() {
329
- Qe(l.value);
329
+ Ge(l.value);
330
330
  }
331
331
  function v() {
332
332
  return u.value = !0, () => a();
@@ -345,26 +345,26 @@ const Qt = ["id"], Jt = {
345
345
  ref: l,
346
346
  action: ".",
347
347
  class: B(["vf-modal", { scrolls: c.scrolls }]),
348
- onSubmit: S[0] || (S[0] = ye((I) => c.$emit("formSubmit"), ["prevent"]))
348
+ onSubmit: S[0] || (S[0] = pe((I) => c.$emit("formSubmit"), ["prevent"]))
349
349
  }, [
350
- c.$slots.header ? (w(), k("div", Jt, [
351
- Q(c.$slots, "header"),
350
+ c.$slots.header ? (w(), k("div", Qt, [
351
+ G(c.$slots, "header"),
352
352
  o.closeX ? (w(), k("i", {
353
353
  key: 0,
354
354
  class: "close",
355
355
  onClick: b
356
356
  })) : O("", !0)
357
357
  ])) : O("", !0),
358
- D("div", en, [
359
- Q(c.$slots, "default")
358
+ D("div", Jt, [
359
+ G(c.$slots, "default")
360
360
  ]),
361
- c.$slots.footer ? (w(), k("div", tn, [
362
- Q(c.$slots, "footer")
361
+ c.$slots.footer ? (w(), k("div", en, [
362
+ G(c.$slots, "footer")
363
363
  ])) : O("", !0)
364
364
  ], 34)
365
- ], 10, Qt));
365
+ ], 10, Gt));
366
366
  }
367
- }), on = ["innerHtml"], ln = ["innerText"], se = /* @__PURE__ */ N({
367
+ }), nn = ["innerHtml"], on = ["innerText"], le = /* @__PURE__ */ N({
368
368
  __name: "vf-alert-modal",
369
369
  props: {
370
370
  isBare: { type: Boolean },
@@ -376,40 +376,40 @@ const Qt = ["id"], Jt = {
376
376
  callback: { type: Function }
377
377
  },
378
378
  setup(e) {
379
- const t = e, n = x(() => t.message instanceof Error ? Xt(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 = It("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
- }, Ht({
385
- default: ce(() => [
384
+ }, It({
385
+ default: ue(() => [
386
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(), k("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(() => [
399
+ fn: ue(() => [
400
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(), k(ee, { key: 0 }, [
408
- J((w(), k("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] = [
412
- Oe("Confirm")
412
+ De("Confirm")
413
413
  ]))), [
414
414
  [l]
415
415
  ]),
@@ -417,12 +417,12 @@ const Qt = ["id"], Jt = {
417
417
  class: "default",
418
418
  onClick: i[1] || (i[1] = () => o.callback(!1))
419
419
  }, "Cancel")
420
- ], 64)) : J((w(), k("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))
424
424
  }, i[4] || (i[4] = [
425
- Oe("OK")
425
+ De("OK")
426
426
  ]))), [
427
427
  [l]
428
428
  ])
@@ -432,53 +432,53 @@ const Qt = ["id"], Jt = {
432
432
  ]), 1032, ["class"]);
433
433
  };
434
434
  }
435
- });
436
- var M = [];
437
- for (var de = 0; de < 256; ++de)
438
- M.push((de + 256).toString(16).slice(1));
439
- function sn(e, t = 0) {
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) {
440
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();
441
440
  }
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);
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);
447
450
  }
448
- var un = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
449
- const $e = {
450
- randomUUID: un
451
- };
452
- function cn(e, t, n) {
453
- if ($e.randomUUID && !t && !e)
454
- return $e.randomUUID();
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__ */ N({
481
+ }, En = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", wn = /* @__PURE__ */ N({
482
482
  __name: "vf-smart-select",
483
483
  props: {
484
484
  modelValue: {},
@@ -509,27 +509,27 @@ const mn = ["disabled", "placeholder", "required"], hn = {
509
509
  setup(e, { expose: t, emit: n }) {
510
510
  const o = Symbol("null"), i = Symbol("create"), l = e, u = n;
511
511
  t({
512
- addRemoteOption: kt
512
+ addRemoteOption: wt
513
513
  });
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), Se = T(!1), rt = x(() => l.prependOptions ?? []), at = x(() => l.appendOptions ?? []), Ce = x(() => !!l.disabled), ut = x(() => !f.value && l.preload ? "Loading..." : l.nullTitle ? l.nullTitle : l.placeholder || ""), ct = 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), ie = x(() => l.formatter ? l.formatter : l.labelField ? (s) => String(s[l.labelField]) : (s) => String(s)), Le = x(() => [...rt.value, ...g.value, ...at.value]), re = x(() => Le.value.map((s, m) => {
515
- var Ae, Fe;
516
- const h = ie.value(s), p = (Ae = l.subtitleFormatter) == null ? void 0 : Ae.call(l, s), E = h ? h.trim().toLowerCase() : "", C = p ? p.trim().toLowerCase() : "", Z = [];
517
- return l.searchFields ? l.searchFields.forEach((De) => {
518
- s[De] && Z.push(String(s[De]).toLowerCase());
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
519
  }) : (Z.push(E), C && Z.push(C)), {
520
- key: ((Fe = j.value) == null ? void 0 : Fe.call(j, s)) ?? String(m),
520
+ key: ((Ae = j.value) == null ? void 0 : Ae.call(j, s)) ?? String(m),
521
521
  title: h,
522
522
  subtitle: p,
523
523
  searchContent: Z.join(""),
524
524
  ref: s
525
525
  };
526
526
  })), H = x(() => {
527
- let s = [...re.value];
527
+ let s = [...ie.value];
528
528
  if (v.value) {
529
529
  const m = a.value.trim().toLowerCase();
530
530
  if (m.length) {
531
531
  s = s.filter((E) => E.searchContent.includes(m));
532
- const h = _t(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${h})`, "ig");
532
+ const h = Vt(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${h})`, "ig");
533
533
  s = s.map((E) => {
534
534
  var C;
535
535
  return {
@@ -537,7 +537,7 @@ const mn = ["disabled", "placeholder", "required"], hn = {
537
537
  title: E.title.replace(p, "<mark>$1</mark>"),
538
538
  subtitle: (C = E.subtitle) == null ? void 0 : C.replace(p, "<mark>$1</mark>")
539
539
  };
540
- }), Se.value && (s.find((C) => C.searchContent === m) !== 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,40 +548,40 @@ 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
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(gt, 0) : (v.value = !1, a.value = S.value || "", y.value && (y.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 && !c.value && ue(), (L.value || v.value) && !H.value.find((m) => m.key == L.value) && (L.value = ((s = H.value[0]) == null ? void 0 : s.key) ?? o);
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
565
  }), V(async () => {
566
- Se.value = l.onCreateItem !== void 0, l.options ? (g.value = [...l.options], f.value = !0) : l.preload && await Me(), ue(), F(c, () => {
566
+ Te.value = l.onCreateItem !== void 0, l.options ? (g.value = [...l.options], f.value = !0) : l.preload && await Le(), ae(), F(c, () => {
567
567
  c.value !== l.modelValue && u(
568
568
  "update:modelValue",
569
569
  c.value && W.value ? W.value(c.value) : c.value
570
570
  );
571
- }), l.remoteSearch && F(a, Ft(dt, 250));
571
+ }), l.remoteSearch && F(a, At(ct, 250));
572
572
  });
573
- async function Me() {
574
- await xe(), g.value && u("optionsLoaded", g.value);
573
+ async function Le() {
574
+ await Me(), g.value && u("optionsLoaded", g.value);
575
575
  }
576
- async function xe() {
576
+ async function Me() {
577
577
  var m;
578
578
  const s = l.remoteSearch && v.value && a.value ? a.value : null;
579
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
- function dt() {
582
- v.value && (xe(), v.value = a.value.trim().length > 0);
581
+ function ct() {
582
+ v.value && (Me(), v.value = a.value.trim().length > 0);
583
583
  }
584
- function ft(s) {
584
+ function dt(s) {
585
585
  if (s.key == "Escape") {
586
586
  s.stopPropagation(), s.target.blur();
587
587
  return;
@@ -592,51 +592,51 @@ const mn = ["disabled", "placeholder", "required"], hn = {
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
602
  const m = H.value.find((h) => h.key == L.value);
603
- if (m) return He(m);
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
- function vt() {
613
- mt(), I.value = !0, setTimeout(() => {
612
+ function ft() {
613
+ vt(), I.value = !0, setTimeout(() => {
614
614
  var s;
615
615
  return (s = d.value) == null ? void 0 : s.select();
616
616
  }, 0);
617
617
  }
618
- function mt(s) {
619
- c.value ? L.value = ht(c.value) : l.nullTitle && (L.value = o);
618
+ function vt(s) {
619
+ c.value ? L.value = mt(c.value) : l.nullTitle && (L.value = o);
620
620
  }
621
- function ht(s) {
621
+ function mt(s) {
622
622
  var m;
623
- return j.value ? j.value(c.value) : ((m = pt(s)) == null ? void 0 : m.key) ?? "";
623
+ return j.value ? j.value(c.value) : ((m = ht(s)) == null ? void 0 : m.key) ?? "";
624
624
  }
625
- function pt(s) {
625
+ function ht(s) {
626
626
  const m = H.value.find((E) => E.ref === s);
627
627
  if (m)
628
628
  return m;
629
- const h = l.keyExtractor ? (E, C) => l.keyExtractor(E) === l.keyExtractor(C) : Xe, p = H.value.find((E) => h(E.ref, s));
629
+ const h = l.keyExtractor ? (E, C) => l.keyExtractor(E) === l.keyExtractor(C) : Ke, p = H.value.find((E) => h(E.ref, s));
630
630
  return p || null;
631
631
  }
632
- function yt() {
632
+ function pt() {
633
633
  l.debug || (!a.value.length && l.nullTitle && (c.value = null, S.value = null), I.value = !1);
634
634
  }
635
- function gt() {
635
+ function yt() {
636
636
  var s;
637
- f.value || Me(), l.optionsListId && ((s = y.value) == null || s.setAttribute("id", l.optionsListId)), Et();
637
+ f.value || Le(), l.optionsListId && ((s = y.value) == null || s.setAttribute("id", l.optionsListId)), gt();
638
638
  }
639
- function Et() {
639
+ function gt() {
640
640
  const s = r.value.getBoundingClientRect(), m = s.y + s.height + 2, h = s.x, p = y.value, E = window.getComputedStyle(r.value);
641
641
  for (let C in E)
642
642
  /^(font|text)/.test(C) && (p.style[C] = E[C]);
@@ -644,17 +644,17 @@ const mn = ["disabled", "placeholder", "required"], hn = {
644
644
  const C = window.innerHeight - m - 12;
645
645
  p.style.maxHeight = C + "px";
646
646
  }
647
- p.style.visibility = "visible", document.body.appendChild(p), setTimeout(Ie, 0);
647
+ p.style.visibility = "visible", document.body.appendChild(p), setTimeout(xe, 0);
648
648
  }
649
- function Ie() {
649
+ function xe() {
650
650
  if (!f.value || !L.value) return;
651
651
  const s = H.value.findIndex((p) => p.key == L.value), m = y.value, h = m == null ? void 0 : m.querySelectorAll(".option")[s];
652
652
  h && (m.scrollTop = h.offsetTop);
653
653
  }
654
- function wt(s) {
654
+ function Et(s) {
655
655
  L.value = s ? s.key : null;
656
656
  }
657
- function ae(s) {
657
+ function re(s) {
658
658
  const m = H.value.findIndex((C) => C.key == L.value);
659
659
  let h = m + s;
660
660
  if (h < 0 ? h = 0 : h >= H.value.length && (h = H.value.length - 1), m == h) return;
@@ -662,7 +662,7 @@ const mn = ["disabled", "placeholder", "required"], hn = {
662
662
  const p = y.value, E = p == null ? void 0 : p.querySelectorAll(".option")[h];
663
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) {
665
+ function Ie(s) {
666
666
  var m, h;
667
667
  if (v.value = !1, s.key == o)
668
668
  a.value = "", c.value = null, S.value = null;
@@ -670,37 +670,37 @@ const mn = ["disabled", "placeholder", "required"], hn = {
670
670
  const p = a.value.trim();
671
671
  a.value = "", c.value = null, S.value = null, (m = l.onCreateItem) == null || m.call(l, p);
672
672
  } else {
673
- const E = re.value.find((C) => C.key == s.key).ref;
674
- c.value = E, S.value = ie.value(E), 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
676
  (h = d.value) == null || h.blur();
677
677
  }
678
- function ue() {
679
- 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 = "");
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
- function kt(s) {
681
+ function wt(s) {
682
682
  g.value.unshift(s);
683
683
  }
684
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(D("input", {
689
+ Q(D("input", {
690
690
  ref_key: "searchField",
691
691
  ref: d,
692
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
- placeholder: ut.value,
696
+ placeholder: at.value,
697
697
  required: s.required,
698
698
  "data-1p-ignore": "",
699
- onKeydown: ft,
700
- onFocus: vt,
701
- onBlur: yt
702
- }, null, 42, mn), [
703
- [At, a.value]
699
+ onKeydown: dt,
700
+ onFocus: ft,
701
+ onBlur: pt
702
+ }, null, 42, vn), [
703
+ [Ht, a.value]
704
704
  ]),
705
705
  I.value ? (w(), k("div", {
706
706
  key: 0,
@@ -708,31 +708,31 @@ const mn = ["disabled", "placeholder", "required"], hn = {
708
708
  ref: y,
709
709
  class: "vf-smart-select-options"
710
710
  }, [
711
- f.value ? (w(), k(ee, { key: 1 }, [
712
- (w(!0), k(ee, null, he(H.value, (h) => (w(), k("div", {
711
+ f.value ? (w(), k(J, { key: 1 }, [
712
+ (w(!0), k(J, null, me(H.value, (h) => (w(), k("div", {
713
713
  key: String(h.key),
714
714
  class: B(["option", {
715
715
  highlighted: L.value === h.key
716
716
  }]),
717
- onMousemove: (p) => wt(h),
718
- onMousedown: (p) => He(h)
717
+ onMousemove: (p) => Et(h),
718
+ onMousedown: (p) => Ie(h)
719
719
  }, [
720
720
  D("div", {
721
721
  class: "title",
722
722
  innerHTML: h.title
723
- }, null, 8, yn),
723
+ }, null, 8, pn),
724
724
  h.subtitle ? (w(), k("div", {
725
725
  key: 0,
726
726
  class: "subtitle",
727
727
  innerHTML: h.subtitle
728
- }, null, 8, gn)) : O("", !0)
729
- ], 42, pn))), 128)),
730
- !H.value.length && a.value ? (w(), k("div", En, U(ct.value), 1)) : O("", !0)
731
- ], 64)) : (w(), k("div", hn, "Loading..."))
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
732
  ], 512)) : O("", !0)
733
733
  ], 2));
734
734
  }
735
- }), Lo = /* @__PURE__ */ N({
735
+ }), Co = /* @__PURE__ */ N({
736
736
  __name: "vf-ez-smart-select",
737
737
  props: {
738
738
  modelValue: {},
@@ -754,9 +754,9 @@ const mn = ["disabled", "placeholder", "required"], hn = {
754
754
  }
755
755
  ), F(u, (r) => {
756
756
  var y;
757
- const d = r ? (y = o.value.find((b) => Xe(b, r))) == null ? void 0 : y.value : null;
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, {
759
+ }), (r, d) => (w(), Pe(wn, {
760
760
  modelValue: u.value,
761
761
  "onUpdate:modelValue": d[0] || (d[0] = (y) => u.value = y),
762
762
  options: o.value,
@@ -764,13 +764,17 @@ const mn = ["disabled", "placeholder", "required"], hn = {
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
+ });
768
+ function Lo() {
769
+ return T();
770
+ }
771
+ const kn = { class: "content" }, bn = { class: "message" }, Tn = {
768
772
  key: 0,
769
773
  class: "close"
770
- }, Cn = {
774
+ }, Sn = {
771
775
  key: 0,
772
776
  class: "progress-bar"
773
- }, Ln = /* @__PURE__ */ N({
777
+ }, Cn = /* @__PURE__ */ N({
774
778
  __name: "vf-toast",
775
779
  props: {
776
780
  message: {},
@@ -795,13 +799,13 @@ const mn = ["disabled", "placeholder", "required"], hn = {
795
799
  }), setTimeout(() => t.callback(), i * 1e3);
796
800
  }), (i, l) => (w(), k("div", {
797
801
  class: B(["vf-toast", i.className]),
798
- onClick: ye(n, ["stop"])
802
+ onClick: pe(n, ["stop"])
799
803
  }, [
800
- D("div", bn, [
801
- D("div", Tn, U(i.message), 1),
802
- i.disableClose ? O("", !0) : (w(), k("div", Sn, "x"))
804
+ D("div", kn, [
805
+ D("div", bn, U(i.message), 1),
806
+ i.disableClose ? O("", !0) : (w(), k("div", Tn, "x"))
803
807
  ]),
804
- i.durationSecs !== null ? (w(), k("div", Cn, [
808
+ i.durationSecs !== null ? (w(), k("div", Sn, [
805
809
  D("div", {
806
810
  ref_key: "progressInnerEl",
807
811
  ref: o,
@@ -812,57 +816,57 @@ const mn = ["disabled", "placeholder", "required"], hn = {
812
816
  }
813
817
  });
814
818
  function Mo(e) {
815
- const t = Ee(Ln, {
819
+ const t = ge(Cn, {
816
820
  ...e,
817
- callback: () => ne(t)
821
+ callback: () => te(t)
818
822
  });
819
- return () => ne(t);
823
+ return () => te(t);
820
824
  }
821
- function Mn(e) {
825
+ function Ln(e) {
822
826
  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
827
  return `${o} ${i}`;
824
828
  }
825
- function xn(e) {
829
+ function Mn(e) {
826
830
  return e != null && String(e).length ? e : "-";
827
831
  }
828
- function In(e) {
832
+ function xn(e) {
829
833
  return e || "-";
830
834
  }
835
+ function In(e) {
836
+ return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Vn(Number(e));
837
+ }
831
838
  function Hn(e) {
832
- return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : _n(Number(e));
839
+ return e && dn(e);
833
840
  }
834
841
  function An(e) {
835
- return e && fn(e);
842
+ return e ? Dt(e) : null;
836
843
  }
837
844
  function Fn(e) {
838
- return e ? Dt(e) : null;
845
+ return e ? Ft(e) : null;
839
846
  }
840
847
  function Dn(e) {
841
- return e ? Ot(e) : null;
848
+ return e ? e.toUpperCase() : null;
842
849
  }
843
850
  function On(e) {
844
- return e ? e.toUpperCase() : null;
851
+ return e ? cn(e) : null;
845
852
  }
846
- function $n(e) {
847
- return e ? dn(e) : null;
848
- }
849
- function Bn(e, t = 1) {
850
- return vn(e, t);
851
- }
852
- const Be = {
853
- bytes: Mn,
854
- dash: xn,
855
- dashZeros: In,
856
- number: Hn,
857
- phone: An,
858
- upperFirst: Fn,
859
- startCase: Dn,
860
- upperCase: On,
861
- desnake: $n,
862
- usCurrency: Bn
853
+ function $n(e, t = 1) {
854
+ return fn(e, t);
855
+ }
856
+ const $e = {
857
+ bytes: Ln,
858
+ dash: Mn,
859
+ dashZeros: xn,
860
+ number: In,
861
+ phone: Hn,
862
+ upperFirst: An,
863
+ startCase: Fn,
864
+ upperCase: Dn,
865
+ desnake: On,
866
+ usCurrency: $n
863
867
  }, xo = (e) => ({
864
- ...Be,
865
- ...e(Be)
868
+ ...$e,
869
+ ...e($e)
866
870
  });
867
871
  function Io(e, t, n) {
868
872
  const o = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
@@ -901,12 +905,12 @@ function Ho(e, t) {
901
905
  a.addEventListener("mouseleave", I), v.stopPropagation();
902
906
  }
903
907
  }
904
- const Vn = (e) => new Promise((t) => setTimeout(t, e)), Ao = (e) => Vn(e * 1e3);
905
- function _n(e) {
908
+ const Bn = (e) => new Promise((t) => setTimeout(t, e)), Ao = (e) => Bn(e * 1e3);
909
+ function Vn(e) {
906
910
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
907
911
  }
908
912
  function Fo(e, t) {
909
- return e != null ? $t(e) : t;
913
+ return e != null ? Ot(e) : t;
910
914
  }
911
915
  function Do(e, t) {
912
916
  const n = { ...e };
@@ -915,45 +919,45 @@ function Do(e, t) {
915
919
  return n;
916
920
  }
917
921
  function Oo(e) {
918
- Nt({
922
+ _t({
919
923
  ...e,
920
924
  onError(t, n) {
921
925
  var i;
922
- Rt(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new le(t.body.error));
926
+ Nt(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new oe(t.body.error));
923
927
  const o = (i = e.onError) == null ? void 0 : i.call(e, t, n);
924
928
  return o !== void 0 ? o : t;
925
929
  }
926
930
  });
927
931
  }
928
- const be = Symbol("HookState");
932
+ const ke = Symbol("HookState");
929
933
  function $o(e, t) {
930
- const n = t ?? pe();
931
- V(() => Nn(n, e), n), ze(() => Rn(n), n), Ye(() => Ve(n), n), ge(() => Ve(n), n);
934
+ const n = t ?? he();
935
+ V(() => _n(n, e), n), qe(() => Nn(n), n), ze(() => Be(n), n), ye(() => Be(n), n);
932
936
  }
933
- function Nn(e, t) {
937
+ function _n(e, t) {
934
938
  const n = {};
935
939
  if (t.elScrolledToBottom && (n.el = new Y(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
936
- const o = et(e.vnode.el);
940
+ const o = Je(e.vnode.el);
937
941
  o ? n.ancestor = new Y(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
938
942
  }
939
- t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[be] = n;
943
+ t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[ke] = n;
940
944
  }
941
- function Rn(e) {
945
+ function Nn(e) {
942
946
  var n, o, i;
943
- const t = e[be];
947
+ const t = e[ke];
944
948
  (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
949
  }
946
- function Ve(e) {
950
+ function Be(e) {
947
951
  var n, o, i;
948
- const t = e[be];
952
+ const t = e[ke];
949
953
  (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
954
  }
951
- const fe = ["auto", "scroll"];
952
- function et(e) {
955
+ const de = ["auto", "scroll"];
956
+ function Je(e) {
953
957
  const t = e.parentElement;
954
958
  if (!t) return null;
955
959
  const n = window.getComputedStyle(t);
956
- return fe.includes(n.overflow) || fe.includes(n.overflowX) || fe.includes(n.overflowY) ? t : et(t);
960
+ return de.includes(n.overflow) || de.includes(n.overflowX) || de.includes(n.overflowY) ? t : Je(t);
957
961
  }
958
962
  class Y {
959
963
  constructor(t, n) {
@@ -972,22 +976,22 @@ class Y {
972
976
  }
973
977
  }
974
978
  function Bo(e) {
975
- V(() => window.addEventListener("resize", e)), ze(() => window.addEventListener("resize", e)), Ye(() => 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;
979
+ V(() => window.addEventListener("resize", e)), qe(() => window.addEventListener("resize", e)), ze(() => window.removeEventListener("resize", e)), ye(() => window.removeEventListener("resize", e));
980
+ }
981
+ const Rn = {
982
+ mounted: _e,
983
+ updated: _e
984
+ }, Ve = Symbol("HasAutoFocused");
985
+ function _e(e, t) {
986
+ if (t.value === void 0 && e[Ve] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
987
+ e[Ve] = !0;
984
988
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
985
989
  setTimeout(() => n.focus(), 10);
986
990
  }
987
- const Un = {
988
- mounted: jn
991
+ const Wn = {
992
+ mounted: Un
989
993
  }, P = Symbol("ConfirmState");
990
- function jn(e, t) {
994
+ function Un(e, t) {
991
995
  e.addEventListener("click", (n) => {
992
996
  var u, r;
993
997
  const o = Date.now(), i = ((u = t.value) == null ? void 0 : u.text) !== void 0 ? t.value.text : "Confirm";
@@ -1009,25 +1013,25 @@ function jn(e, t) {
1009
1013
  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
1014
  });
1011
1015
  }
1012
- const Pn = {
1013
- beforeMount: qn
1016
+ const jn = {
1017
+ beforeMount: Pn
1014
1018
  };
1015
- function qn(e) {
1019
+ function Pn(e) {
1016
1020
  e.addEventListener("blur", () => {
1017
1021
  let t = e.value;
1018
- /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + ve(/* @__PURE__ */ new Date(), "yy"));
1022
+ /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + fe(/* @__PURE__ */ new Date(), "yy"));
1019
1023
  const n = Date.parse(t);
1020
- isNaN(n) ? e.value = "" : e.value = ve(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1024
+ isNaN(n) ? e.value = "" : e.value = fe(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1021
1025
  });
1022
1026
  }
1023
- const zn = {
1024
- beforeMount: Re,
1025
- updated: Re
1027
+ const qn = {
1028
+ beforeMount: Ne,
1029
+ updated: Ne
1026
1030
  };
1027
- function Re(e, t) {
1028
- t.value == t.oldValue && e.innerHTML.length || (e.innerText = Yn(e, t));
1031
+ function Ne(e, t) {
1032
+ t.value == t.oldValue && e.innerHTML.length || (e.innerText = zn(e, t));
1029
1033
  }
1030
- function Yn(e, t) {
1034
+ function zn(e, t) {
1031
1035
  var y, b;
1032
1036
  if (!t.value)
1033
1037
  return ((y = e.attributes.getNamedItem("placeholder")) == null ? void 0 : y.value) ?? "";
@@ -1045,50 +1049,50 @@ function Yn(e, t) {
1045
1049
  const g = /* @__PURE__ */ new Date();
1046
1050
  g.getFullYear() === l.getFullYear() ? (g.getMonth() !== l.getMonth() || g.getDate() !== l.getDate()) && (f = "M/d") : f = "M/d/YY";
1047
1051
  const v = r ? null : $.defaultTimeFormat;
1048
- u = Ke([f, v]).join(" ");
1052
+ u = Ye([f, v]).join(" ");
1049
1053
  }
1050
1054
  u || (r ? u = $.defaultDateFormat : u = `${$.defaultDateFormat} ${$.defaultTimeFormat}`);
1051
- let d = ve(l, u);
1055
+ let d = fe(l, u);
1052
1056
  return n && (d = n + " " + d), d;
1053
1057
  }
1054
- const Kn = {
1055
- beforeMount: We,
1056
- updated: We,
1057
- unmounted: Xn
1058
+ const Yn = {
1059
+ beforeMount: Re,
1060
+ updated: Re,
1061
+ unmounted: Kn
1058
1062
  };
1059
- function We(e, t) {
1063
+ function Re(e, t) {
1060
1064
  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");
1061
1065
  }
1062
- function Xn(e) {
1066
+ function Kn(e) {
1063
1067
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1064
1068
  }
1065
- const Zn = {
1066
- beforeMount: Ue,
1067
- updated: Ue,
1068
- unmounted: nt
1069
- }, X = Symbol("HasAutoFocused"), Te = [];
1070
- function Gn() {
1071
- Te.forEach(tt);
1069
+ const Xn = {
1070
+ beforeMount: We,
1071
+ updated: We,
1072
+ unmounted: tt
1073
+ }, X = Symbol("HasAutoFocused"), be = [];
1074
+ function Zn() {
1075
+ be.forEach(et);
1072
1076
  }
1073
- setInterval(Gn, 1e3);
1074
- function Ue(e, t) {
1077
+ setInterval(Zn, 1e3);
1078
+ function We(e, t) {
1075
1079
  var u;
1076
1080
  if (t.value == t.oldValue) return;
1077
- if (!t.value) return nt(e);
1081
+ if (!t.value) return tt(e);
1078
1082
  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] || Te.push(e), e[X] = {
1083
+ e[X] || be.push(e), e[X] = {
1080
1084
  startTs: i,
1081
1085
  includeSeconds: l
1082
- }, tt(e);
1086
+ }, et(e);
1083
1087
  }
1084
- function tt(e) {
1088
+ function et(e) {
1085
1089
  const t = e[X], n = Math.round((Date.now() - t.startTs) / 1e3);
1086
- e.innerText = Qn(n, t.includeSeconds);
1090
+ e.innerText = Gn(n, t.includeSeconds);
1087
1091
  }
1088
- function nt(e) {
1089
- e[X] && (Bt(Te, e), delete e[X]), e.innerText = "-";
1092
+ function tt(e) {
1093
+ e[X] && ($t(be, e), delete e[X]), e.innerText = "-";
1090
1094
  }
1091
- function Qn(e, t) {
1095
+ function Gn(e, t) {
1092
1096
  const n = [], o = Math.floor(e / 86400);
1093
1097
  o && n.push(o + "d"), e -= o * 86400;
1094
1098
  const i = Math.floor(e / 3600);
@@ -1096,34 +1100,34 @@ function Qn(e, t) {
1096
1100
  const l = Math.floor(e / 60);
1097
1101
  return (o || i || l) && n.push(l + "m"), t ? n.length || n.push("0m") : (e -= l * 60, n.push(e + "s")), n.join(" ");
1098
1102
  }
1099
- const Jn = {
1100
- mounted: ot,
1101
- updated: eo,
1102
- unmounted: lt
1103
+ const Qn = {
1104
+ mounted: nt,
1105
+ updated: Jn,
1106
+ unmounted: ot
1103
1107
  }, R = /* @__PURE__ */ new Map();
1104
- function ot(e, t) {
1105
- R.size === 0 && window.addEventListener("keydown", st), R.set(t.value.toLowerCase(), [...R.get(t.value.toLowerCase()) ?? [], e]);
1108
+ function nt(e, t) {
1109
+ R.size === 0 && window.addEventListener("keydown", lt), R.set(t.value.toLowerCase(), [...R.get(t.value.toLowerCase()) ?? [], e]);
1106
1110
  }
1107
- function lt(e, t) {
1111
+ function ot(e, t) {
1108
1112
  const n = R.get(t.value.toLowerCase());
1109
1113
  if (n) {
1110
1114
  const o = n.indexOf(e);
1111
1115
  o !== -1 && n.splice(o, 1), n.length === 0 && R.delete(t.value.toLowerCase());
1112
1116
  }
1113
- R.size === 0 && window.removeEventListener("keydown", st);
1117
+ R.size === 0 && window.removeEventListener("keydown", lt);
1114
1118
  }
1115
- function eo(e, t) {
1116
- lt(e, t), ot(e, t);
1119
+ function Jn(e, t) {
1120
+ ot(e, t), nt(e, t);
1117
1121
  }
1118
- function st(e) {
1122
+ function lt(e) {
1119
1123
  if (typeof e.key != "string") return;
1120
1124
  const t = e.key.toLowerCase(), n = R.get(t);
1121
1125
  if (n) {
1122
- const o = Vt(n);
1126
+ const o = Bt(n);
1123
1127
  o == null || o.click(), e.preventDefault();
1124
1128
  }
1125
1129
  }
1126
- const q = Symbol("InfiniteScrollHandler"), to = {
1130
+ const q = Symbol("InfiniteScrollHandler"), eo = {
1127
1131
  mounted(e, t) {
1128
1132
  e[q] = new Y(e, t.value);
1129
1133
  },
@@ -1135,19 +1139,19 @@ const q = Symbol("InfiniteScrollHandler"), to = {
1135
1139
  var t;
1136
1140
  (t = e[q]) == null || t.uninstall(), delete e[q];
1137
1141
  }
1138
- }, no = {
1139
- beforeMount: je,
1140
- updated: je
1142
+ }, to = {
1143
+ beforeMount: Ue,
1144
+ updated: Ue
1141
1145
  };
1142
- function je(e, t) {
1146
+ function Ue(e, t) {
1143
1147
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1144
1148
  }
1145
- const oo = {
1146
- mounted: Pe,
1147
- updated: Pe,
1148
- unmounted: it
1149
+ const no = {
1150
+ mounted: je,
1151
+ updated: je,
1152
+ unmounted: st
1149
1153
  }, K = Symbol("TooltipState");
1150
- function Pe(e, t) {
1154
+ function je(e, t) {
1151
1155
  var o;
1152
1156
  let n = ((o = e.attributes.getNamedItem("tip")) == null ? void 0 : o.value) ?? t.value;
1153
1157
  if (t.value || (n = null), n) {
@@ -1155,15 +1159,15 @@ function Pe(e, t) {
1155
1159
  content: n,
1156
1160
  html: e.getAttribute("html") !== null
1157
1161
  };
1158
- e[K] ? e[K].configure(i) : e[K] = new lo(e, i);
1162
+ e[K] ? e[K].configure(i) : e[K] = new oo(e, i);
1159
1163
  } else
1160
- it(e);
1164
+ st(e);
1161
1165
  }
1162
- function it(e) {
1166
+ function st(e) {
1163
1167
  var t;
1164
1168
  (t = e[K]) == null || t.destroy(), delete e[K];
1165
1169
  }
1166
- class lo {
1170
+ class oo {
1167
1171
  constructor(t, n) {
1168
1172
  A(this, "lastMoveEvt");
1169
1173
  A(this, "checkInterval");
@@ -1211,59 +1215,60 @@ class lo {
1211
1215
  this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
1212
1216
  }
1213
1217
  }
1214
- function so(e) {
1215
- e.directive("autofocus", Wn), e.directive("confirm-button", Un), e.directive("date-input", Pn), e.directive("datetime", zn), e.directive("disabled", Kn), e.directive("duration", Zn), e.directive("hotkey", Jn), e.directive("infinite-scroll", to), e.directive("readonly", no), e.directive("tooltip", oo);
1218
+ function lo(e) {
1219
+ 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);
1216
1220
  }
1217
1221
  function Vo(e) {
1218
- so(e);
1222
+ lo(e);
1219
1223
  }
1220
1224
  export {
1221
- mo as OverlayContainer,
1222
- le as UserError,
1223
- vo as VfAjaxSelect,
1224
- se as VfAlertModal,
1225
- Lo as VfEzSmartSelect,
1226
- nn as VfModal,
1227
- kn as VfSmartSelect,
1225
+ vo as OverlayContainer,
1226
+ oe as UserError,
1227
+ fo as VfAjaxSelect,
1228
+ le as VfAlertModal,
1229
+ Co as VfEzSmartSelect,
1230
+ tn as VfModal,
1231
+ wn as VfSmartSelect,
1228
1232
  Fo as cloneProp,
1229
- Eo as configureVf,
1233
+ go as configureVf,
1230
1234
  xo as createFilters,
1231
- Ee as createOverlayInjection,
1232
- dn as desnakeCase,
1233
- Yt as dismissOverlayInjectionById,
1234
- ho as dismissOverlayInjectionByInstance,
1235
- Ze as dismissOverlayInjectionByInternalInstance,
1236
- zt as dismissOverlayInjectionByVnode,
1235
+ ge as createOverlayInjection,
1236
+ cn as desnakeCase,
1237
+ zt as dismissOverlayInjectionById,
1238
+ mo as dismissOverlayInjectionByInstance,
1239
+ Xe as dismissOverlayInjectionByInternalInstance,
1240
+ qt as dismissOverlayInjectionByVnode,
1237
1241
  Ro as escapeHtml,
1238
- Xt as formatError,
1239
- _n as formatNumber,
1240
- fn as formatPhone,
1241
- vn as formatUSCurrency,
1242
- ko as handleError,
1243
- wo as handleErrorAndAlert,
1242
+ Kt as formatError,
1243
+ Vn as formatNumber,
1244
+ dn as formatPhone,
1245
+ fn as formatUSCurrency,
1246
+ wo as handleError,
1247
+ Eo as handleErrorAndAlert,
1244
1248
  Oo as installApiClientInterceptors,
1245
1249
  Vo as installVf,
1246
- bo as maskComponent,
1247
- Zt as maskEl,
1248
- Gt as maskForm,
1249
- So as nl2br,
1250
+ ko as maskComponent,
1251
+ Xt as maskEl,
1252
+ Zt as maskForm,
1253
+ To as nl2br,
1250
1254
  Do as nullifyEmptyInputs,
1251
- we as presentOverlay,
1252
- ne as removeOverlayInjection,
1255
+ Ee as presentOverlay,
1256
+ te as removeOverlayInjection,
1253
1257
  Io as replaceElement,
1254
- Kt as showAlert,
1255
- po as showConfirm,
1256
- yo as showConfirmDestroy,
1258
+ Yt as showAlert,
1259
+ ho as showConfirm,
1260
+ po as showConfirmDestroy,
1257
1261
  Ho as showContextMenu,
1258
1262
  Mo as showToast,
1259
- go as showWait,
1260
- Vn as sleep,
1263
+ yo as showWait,
1264
+ Bn as sleep,
1261
1265
  Ao as sleepSecs,
1262
- ke as toError,
1263
- To as unmaskComponent,
1264
- Ge as unmaskEl,
1265
- Qe as unmaskForm,
1266
+ we as toError,
1267
+ bo as unmaskComponent,
1268
+ Ze as unmaskEl,
1269
+ Ge as unmaskForm,
1266
1270
  $o as useInfiniteScroll,
1267
1271
  Bo as useResizeWatcher,
1268
- Co as uuid
1272
+ So as uuid,
1273
+ Lo as vfModalRef
1269
1274
  };