@signal24/vue-foundation 4.7.0 → 4.7.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,16 +1,16 @@
1
1
  var Ve = Object.defineProperty;
2
2
  var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var v = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as S, defineProps as Ne, defineEmits as Re, ref as T, computed as K, openBlock as u, createElementBlock as h, createElementVNode as E, toDisplayString as x, withDirectives as U, createCommentVNode as O, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as C, normalizeClass as w, normalizeStyle as Ue, withModifiers as te, renderSlot as R, reactive as je, h as W, Teleport as We, markRaw as Pe, onBeforeUnmount as ne, resolveDirective as Te, createBlock as ke, createSlots as qe, withCtx as Y, createTextVNode as ae, vModelText as ze, watch as ce, onActivated as Se, onDeactivated as xe } from "vue";
5
- import { debounce as Xe, isEqual as Ce, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
6
- import { escapeHtml as Je } from "@vue/shared";
7
- import { escapeHtml as ss } from "@vue/shared";
4
+ import { defineComponent as x, defineProps as Ne, defineEmits as Re, ref as w, computed as V, openBlock as u, createElementBlock as f, createElementVNode as O, toDisplayString as C, withDirectives as U, createCommentVNode as T, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ue, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as We, markRaw as Pe, onBeforeUnmount as ne, resolveDirective as Te, createBlock as ke, createSlots as qe, withCtx as Y, createTextVNode as ae, vModelText as ze, watch as ce, onActivated as Se, onDeactivated as xe } from "vue";
5
+ import { compact as Xe, debounce as Ye, isEqual as Ce, upperFirst as Ze, startCase as Ge, cloneDeep as Qe, remove as Je } from "lodash";
6
+ import { escapeHtml as et } from "@vue/shared";
7
+ import { escapeHtml as is } from "@vue/shared";
8
8
  import { format as G } from "date-fns";
9
- const et = S({
9
+ const tt = x({
10
10
  setup() {
11
11
  const e = Ne();
12
12
  Re(["update:modelValue"]);
13
- const t = T(null), n = K(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), s = T(e.modelValue ?? null);
13
+ const t = w(null), n = V(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), s = w(e.modelValue ?? null);
14
14
  return { props: e, options: t, renderOptions: n, selectedItem: s };
15
15
  },
16
16
  watch: {
@@ -37,100 +37,100 @@ const et = S({
37
37
  for (const [s, i] of t)
38
38
  n[s] = i;
39
39
  return n;
40
- }, tt = {
40
+ }, nt = {
41
41
  key: 0,
42
42
  disabled: ""
43
- }, nt = {
43
+ }, st = {
44
44
  key: 0,
45
45
  value: null
46
- }, st = ["value"];
47
- function it(e, t, n, s, i, o) {
48
- return e.renderOptions ? U((u(), h("select", {
46
+ }, it = ["value"];
47
+ function ot(e, t, n, s, i, o) {
48
+ return e.renderOptions ? U((u(), f("select", {
49
49
  key: 1,
50
50
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
51
51
  }, [
52
- e.props.nullText ? (u(), h("option", nt, x(e.props.nullText), 1)) : O("", !0),
53
- (u(!0), h(j, null, J(e.renderOptions, (r, l) => {
52
+ e.props.nullText ? (u(), f("option", st, C(e.props.nullText), 1)) : T("", !0),
53
+ (u(!0), f(j, null, J(e.renderOptions, (r, l) => {
54
54
  var c;
55
- return u(), h("option", {
55
+ return u(), f("option", {
56
56
  key: l,
57
57
  value: (c = e.options) == null ? void 0 : c[l]
58
- }, x(r), 9, st);
58
+ }, C(r), 9, it);
59
59
  }), 128))
60
60
  ], 512)), [
61
61
  [Ke, e.selectedItem]
62
- ]) : (u(), h("select", tt, [
63
- E("option", null, x(e.props.loadingText || "Loading..."), 1)
62
+ ]) : (u(), f("select", nt, [
63
+ O("option", null, C(e.props.loadingText || "Loading..."), 1)
64
64
  ]));
65
65
  }
66
- const In = /* @__PURE__ */ Le(et, [["render", it]]), ot = ["onClick"], lt = /* @__PURE__ */ S({
66
+ const Hn = /* @__PURE__ */ Le(tt, [["render", ot]]), lt = ["onClick"], rt = /* @__PURE__ */ x({
67
67
  __name: "overlay-anchor",
68
68
  props: {
69
69
  overlayId: {},
70
70
  anchor: {}
71
71
  },
72
72
  setup(e) {
73
- const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), o = ee();
74
- C(r);
73
+ const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s = w({ visibility: "hidden", top: "0", left: "0" }), i = w([]), o = ee();
74
+ L(r);
75
75
  function r() {
76
- const f = o.vnode.el, { styles: g, classes: a } = l(f, n);
77
- s.value = g, i.value = a;
76
+ const h = o.vnode.el, { styles: b, classes: m } = l(h, n);
77
+ s.value = b, i.value = m;
78
78
  }
79
- function l(f, g) {
80
- const a = t.anchor instanceof HTMLElement ? {} : t.anchor, m = g.getBoundingClientRect(), p = f.getBoundingClientRect();
81
- a.matchWidth && (p.width = m.width), a.matchHeight && (p.height = m.height);
82
- const d = a.class ? Array.isArray(a.class) ? a.class : [a.class] : [];
83
- let b, L;
84
- if (a.y === "center")
85
- b = m.top + m.height / 2 - p.height / 2, d.push("anchored-center-y");
79
+ function l(h, b) {
80
+ const m = t.anchor instanceof HTMLElement ? {} : t.anchor, y = b.getBoundingClientRect(), p = h.getBoundingClientRect();
81
+ m.matchWidth && (p.width = y.width), m.matchHeight && (p.height = y.height);
82
+ const a = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
83
+ let d, E;
84
+ if (m.y === "center")
85
+ d = y.top + y.height / 2 - p.height / 2, a.push("anchored-center-y");
86
86
  else {
87
- const M = (m.bottom + p.height < window.innerHeight || a.y === "below") && a.y !== "above";
88
- b = M ? m.bottom : m.top - p.height, d.push(M ? "anchored-top" : "anchored-bottom");
87
+ const I = (y.bottom + p.height < window.innerHeight || m.y === "below") && m.y !== "above";
88
+ d = I ? y.bottom : y.top - p.height, a.push(I ? "anchored-top" : "anchored-bottom");
89
89
  }
90
- if (a.x === "center")
91
- L = m.left + m.width / 2 - p.width / 2, d.push("anchored-center-x");
90
+ if (m.x === "center")
91
+ E = y.left + y.width / 2 - p.width / 2, a.push("anchored-center-x");
92
92
  else {
93
- const M = (m.left + p.width < window.innerWidth || a.x === "left") && a.x !== "right";
94
- L = M ? m.left : m.right - p.width, d.push(M ? "anchored-left" : "anchored-right");
93
+ const I = (y.left + p.width < window.innerWidth || m.x === "left") && m.x !== "right";
94
+ E = I ? y.left : y.right - p.width, a.push(I ? "anchored-left" : "anchored-right");
95
95
  }
96
96
  return {
97
97
  styles: {
98
- top: `${b}px`,
99
- left: `${L}px`,
100
- ...a.matchWidth ? { width: `${p.width}px` } : {},
101
- ...a.matchHeight ? { height: `${p.height}px` } : {}
98
+ top: `${d}px`,
99
+ left: `${E}px`,
100
+ ...m.matchWidth ? { width: `${p.width}px` } : {},
101
+ ...m.matchHeight ? { height: `${p.height}px` } : {}
102
102
  },
103
- classes: d
103
+ classes: a
104
104
  };
105
105
  }
106
106
  function c() {
107
- window.removeEventListener("click", c), ct(t.overlayId);
107
+ window.removeEventListener("click", c), dt(t.overlayId);
108
108
  }
109
- return C(() => {
109
+ return L(() => {
110
110
  setTimeout(() => {
111
111
  window.addEventListener("click", c);
112
112
  }, 10);
113
- }), (f, g) => (u(), h("div", {
114
- class: w(["vf-overlay-anchor", i.value]),
113
+ }), (h, b) => (u(), f("div", {
114
+ class: k(["vf-overlay-anchor", i.value]),
115
115
  style: Ue(s.value),
116
116
  onClick: te(c, ["stop"])
117
117
  }, [
118
- R(f.$slots, "default")
119
- ], 14, ot));
118
+ K(h.$slots, "default")
119
+ ], 14, lt));
120
120
  }
121
121
  });
122
- let rt = 0;
123
- const k = je([]), _n = S({
122
+ let at = 0;
123
+ const S = je([]), _n = x({
124
124
  setup() {
125
125
  return () => W("div", [
126
- J(k, (e) => W(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
+ J(S, (e) => W(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
127
127
  ]);
128
128
  }
129
129
  });
130
130
  function se(e, t, n) {
131
131
  const s = document.getElementById("vf-overlay-target") ?? document.createElement("div");
132
132
  s.id = "vf-overlay-target", s.removeAttribute("inert"), document.body.appendChild(s);
133
- const i = String(++rt), o = Pe(e), r = W(o, t), l = n != null && n.anchor ? W(lt, { overlayId: i, anchor: n.anchor }, () => [r]) : void 0, c = {
133
+ const i = String(++at), o = Pe(e), r = W(o, t), l = n != null && n.anchor ? W(rt, { overlayId: i, anchor: n.anchor }, () => [r]) : void 0, c = {
134
134
  id: i,
135
135
  component: o,
136
136
  props: t,
@@ -138,27 +138,27 @@ function se(e, t, n) {
138
138
  vnode: r,
139
139
  wrapperVnode: l
140
140
  };
141
- return k.push(c), c;
141
+ return S.push(c), c;
142
142
  }
143
- function Hn(e) {
143
+ function Dn(e) {
144
144
  Me(e.$);
145
145
  }
146
146
  function Me(e) {
147
147
  let t = e;
148
- for (; t && !at(t.vnode); )
148
+ for (; t && !ct(t.vnode); )
149
149
  t = t.parent;
150
150
  }
151
- function at(e) {
152
- const t = k.findIndex((n) => n.vnode.component === e.component);
153
- return t >= 0 ? (k[t].props.callback(), !0) : !1;
154
- }
155
151
  function ct(e) {
156
- const t = k.findIndex((n) => n.id === e);
157
- return t >= 0 ? (k[t].props.callback(), !0) : !1;
152
+ const t = S.findIndex((n) => n.vnode.component === e.component);
153
+ return t >= 0 ? (S[t].props.callback(), !0) : !1;
154
+ }
155
+ function dt(e) {
156
+ const t = S.findIndex((n) => n.id === e);
157
+ return t >= 0 ? (S[t].props.callback(), !0) : !1;
158
158
  }
159
159
  function P(e) {
160
- const t = k.indexOf(e);
161
- t >= 0 && k.splice(t, 1);
160
+ const t = S.indexOf(e);
161
+ t >= 0 && S.splice(t, 1);
162
162
  }
163
163
  async function ie(e, t, n) {
164
164
  return new Promise((s) => {
@@ -175,20 +175,20 @@ function q(e, t) {
175
175
  async function de(e, t) {
176
176
  await ie(X, q(e, t));
177
177
  }
178
- async function Dn(e, t) {
178
+ async function $n(e, t) {
179
179
  return await ie(X, {
180
180
  ...q(e, t),
181
181
  shouldConfirm: !0
182
182
  }) === !0;
183
183
  }
184
- async function $n(e, t) {
184
+ async function An(e, t) {
185
185
  return await ie(X, {
186
186
  ...q(e, t),
187
187
  shouldConfirm: !0,
188
188
  classes: ["destructive"]
189
189
  }) === !0;
190
190
  }
191
- function An(e, t) {
191
+ function Bn(e, t) {
192
192
  const n = se(X, {
193
193
  ...q(e, t),
194
194
  isBare: !0,
@@ -198,59 +198,59 @@ function An(e, t) {
198
198
  });
199
199
  return () => P(n);
200
200
  }
201
- const V = {
201
+ const N = {
202
202
  unhandledErrorSupportText: "please contact support",
203
203
  errorHandler: (e) => console.error("Unhandled error:", e),
204
204
  defaultDateTimeFormat: "MM/dd/yy HH:mm"
205
205
  };
206
- function Bn(e) {
207
- Object.assign(V, e);
206
+ function Vn(e) {
207
+ Object.assign(N, e);
208
208
  }
209
209
  class z extends Error {
210
210
  constructor(t) {
211
211
  super(t), this.name = "UserError";
212
212
  }
213
213
  }
214
- function dt(e) {
214
+ function ut(e) {
215
215
  return e instanceof z ? e.message : `An application error has occurred:
216
216
 
217
217
  ${oe(e).message}
218
218
 
219
- Please refresh the page and try again. If this error persists, ${V.unhandledErrorSupportText}.`;
219
+ Please refresh the page and try again. If this error persists, ${N.unhandledErrorSupportText}.`;
220
220
  }
221
221
  function oe(e) {
222
222
  return e instanceof Error ? e : new Error(String(e));
223
223
  }
224
- async function Vn(e, t) {
224
+ async function Fn(e, t) {
225
225
  const n = oe(e);
226
- return n instanceof z || V.errorHandler(n), t ? de(t, n) : de(n);
226
+ return n instanceof z || N.errorHandler(n), t ? de(t, n) : de(n);
227
227
  }
228
- async function Fn(e) {
228
+ async function Nn(e) {
229
229
  const t = oe(e);
230
- t instanceof z || V.errorHandler(t);
230
+ t instanceof z || N.errorHandler(t);
231
231
  }
232
- const D = Symbol("MaskState");
233
- function Nn(e, t) {
232
+ const $ = Symbol("MaskState");
233
+ function Rn(e, t) {
234
234
  const n = e.$.vnode.el, s = n.closest(".vf-modal");
235
- return ut(s ?? n, t);
235
+ return ht(s ?? n, t);
236
236
  }
237
- function Rn(e) {
237
+ function Kn(e) {
238
238
  const t = e.$.vnode.el, n = t.closest(".vf-modal");
239
239
  return Ie(n ?? t);
240
240
  }
241
- function ut(e, t) {
242
- if (!e[D]) {
241
+ function ht(e, t) {
242
+ if (!e[$]) {
243
243
  const n = document.createElement("div");
244
- n.classList.add("vf-mask"), e.appendChild(n), e[D] = { maskEl: n };
244
+ n.classList.add("vf-mask"), e.appendChild(n), e[$] = { maskEl: n };
245
245
  }
246
- return e[D].maskEl.innerText = t ?? "", () => Ie(e);
246
+ return e[$].maskEl.innerText = t ?? "", () => Ie(e);
247
247
  }
248
248
  function Ie(e) {
249
- e[D] && e.removeChild(e[D].maskEl);
249
+ e[$] && e.removeChild(e[$].maskEl);
250
250
  }
251
251
  const Q = Symbol("FormMaskState");
252
- function ht(e, t, n) {
253
- const s = e instanceof Element ? e : He(e);
252
+ function ft(e, t, n) {
253
+ const s = e instanceof Element ? e : _e(e);
254
254
  s.classList.add("vf-masked");
255
255
  const i = t instanceof Element ? t : s.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0], o = i.tagName === "INPUT" ? i.value : i.innerHTML;
256
256
  i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...";
@@ -259,23 +259,23 @@ function ht(e, t, n) {
259
259
  disabledElements: l,
260
260
  waitButton: i,
261
261
  buttonHtml: o
262
- }, () => _e(s);
262
+ }, () => He(s);
263
263
  }
264
- function _e(e) {
265
- const t = e instanceof Element ? e : He(e), n = t[Q];
264
+ function He(e) {
265
+ const t = e instanceof Element ? e : _e(e), n = t[Q];
266
266
  n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((s) => s.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[Q]);
267
267
  }
268
- function He(e) {
268
+ function _e(e) {
269
269
  const t = e.$.vnode.el;
270
270
  return t.tagName === "FORM" ? t : t.querySelector("form");
271
271
  }
272
- const ft = ["id"], pt = {
272
+ const pt = ["id"], mt = {
273
273
  key: 0,
274
274
  class: "vf-modal-header"
275
- }, mt = { class: "vf-modal-content" }, vt = {
275
+ }, vt = { class: "vf-modal-content" }, yt = {
276
276
  key: 1,
277
277
  class: "vf-modal-footer"
278
- }, yt = /* @__PURE__ */ S({
278
+ }, gt = /* @__PURE__ */ x({
279
279
  __name: "modal",
280
280
  props: {
281
281
  id: {},
@@ -287,64 +287,70 @@ const ft = ["id"], pt = {
287
287
  emits: ["formSubmit"],
288
288
  setup(e, { expose: t }) {
289
289
  const n = e, s = ee();
290
- t({ mask: f, unmask: g });
291
- const i = T(), o = T();
292
- C(() => {
293
- var a;
294
- document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", l), (a = i.value) == null || a.addEventListener("click", r));
290
+ t({ mask: m, unmask: y, hide: p, unhide: a });
291
+ const i = w(), o = w(), r = w(!1), l = V(() => Xe([n.class, r.value && "hidden"]));
292
+ L(() => {
293
+ var d;
294
+ document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", h), (d = i.value) == null || d.addEventListener("click", c));
295
295
  }), ne(() => {
296
- window.removeEventListener("keydown", l), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
296
+ window.removeEventListener("keydown", h), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
297
297
  });
298
- function r(a) {
299
- a.target == i.value && c();
298
+ function c(d) {
299
+ d.target == i.value && b();
300
300
  }
301
- function l(a) {
302
- if (a.key === "Esc" || a.key === "Escape") {
303
- const m = document.querySelectorAll(".vf-modal-wrap");
304
- m[m.length - 1] === i.value && c();
301
+ function h(d) {
302
+ if (d.key === "Esc" || d.key === "Escape") {
303
+ const E = document.querySelectorAll(".vf-modal-wrap");
304
+ E[E.length - 1] === i.value && b();
305
305
  }
306
306
  }
307
- function c() {
307
+ function b() {
308
308
  Me(s);
309
309
  }
310
- function f() {
311
- ht(o.value);
310
+ function m() {
311
+ ft(o.value);
312
+ }
313
+ function y() {
314
+ He(o.value);
315
+ }
316
+ function p() {
317
+ r.value = !0;
312
318
  }
313
- function g() {
314
- _e(o.value);
319
+ function a() {
320
+ r.value = !1;
315
321
  }
316
- return (a, m) => (u(), h("div", {
317
- id: a.id,
318
- class: w(["vf-overlay vf-modal-wrap", n.class]),
322
+ return (d, E) => (u(), f("div", {
323
+ id: d.id,
324
+ class: k(["vf-overlay vf-modal-wrap", l.value]),
319
325
  ref_key: "overlay",
320
326
  ref: i
321
327
  }, [
322
- E("form", {
328
+ O("form", {
323
329
  action: ".",
324
- class: w(["vf-modal", { scrolls: a.scrolls }]),
325
- onSubmit: m[0] || (m[0] = te((p) => a.$emit("formSubmit"), ["prevent"])),
330
+ class: k(["vf-modal", { scrolls: d.scrolls }]),
331
+ onSubmit: E[0] || (E[0] = te((M) => d.$emit("formSubmit"), ["prevent"])),
326
332
  ref_key: "form",
327
333
  ref: o
328
334
  }, [
329
- a.$slots.header ? (u(), h("div", pt, [
330
- R(a.$slots, "header"),
331
- n.closeX ? (u(), h("i", {
335
+ d.$slots.header ? (u(), f("div", mt, [
336
+ K(d.$slots, "header"),
337
+ n.closeX ? (u(), f("i", {
332
338
  key: 0,
333
339
  class: "close",
334
- onClick: c
335
- })) : O("", !0)
336
- ])) : O("", !0),
337
- E("div", mt, [
338
- R(a.$slots, "default")
340
+ onClick: b
341
+ })) : T("", !0)
342
+ ])) : T("", !0),
343
+ O("div", vt, [
344
+ K(d.$slots, "default")
339
345
  ]),
340
- a.$slots.footer ? (u(), h("div", vt, [
341
- R(a.$slots, "footer")
342
- ])) : O("", !0)
346
+ d.$slots.footer ? (u(), f("div", yt, [
347
+ K(d.$slots, "footer")
348
+ ])) : T("", !0)
343
349
  ], 34)
344
- ], 10, ft));
350
+ ], 10, pt));
345
351
  }
346
352
  });
347
- const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
353
+ const bt = ["innerHtml"], Et = ["innerText"], X = /* @__PURE__ */ x({
348
354
  __name: "alert-modal",
349
355
  props: {
350
356
  isBare: { type: Boolean },
@@ -356,36 +362,36 @@ const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
356
362
  callback: { type: Function }
357
363
  },
358
364
  setup(e) {
359
- const t = e, n = K(() => t.message instanceof Error ? dt(t.message) : t.message);
365
+ const t = e, n = V(() => t.message instanceof Error ? ut(t.message) : t.message);
360
366
  return (s, i) => {
361
367
  const o = Te("autofocus");
362
- return u(), ke(yt, {
363
- class: w(["vf-alert", s.classes])
368
+ return u(), ke(gt, {
369
+ class: k(["vf-alert", s.classes])
364
370
  }, qe({
365
371
  default: Y(() => [
366
- s.isHtml ? (u(), h("div", {
372
+ s.isHtml ? (u(), f("div", {
367
373
  key: 0,
368
374
  innerHtml: s.message,
369
375
  class: "user-message"
370
- }, null, 8, gt)) : (u(), h("div", {
376
+ }, null, 8, bt)) : (u(), f("div", {
371
377
  key: 1,
372
378
  innerText: n.value
373
- }, null, 8, bt))
379
+ }, null, 8, Et))
374
380
  ]),
375
381
  _: 2
376
382
  }, [
377
383
  s.title ? {
378
384
  name: "header",
379
385
  fn: Y(() => [
380
- E("h1", null, x(s.title), 1)
386
+ O("h1", null, C(s.title), 1)
381
387
  ]),
382
388
  key: "0"
383
389
  } : void 0,
384
390
  s.isBare ? void 0 : {
385
391
  name: "footer",
386
392
  fn: Y(() => [
387
- s.shouldConfirm ? (u(), h(j, { key: 0 }, [
388
- U((u(), h("button", {
393
+ s.shouldConfirm ? (u(), f(j, { key: 0 }, [
394
+ U((u(), f("button", {
389
395
  class: "primary",
390
396
  onClick: i[0] || (i[0] = () => s.callback(!0))
391
397
  }, [
@@ -393,11 +399,11 @@ const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
393
399
  ])), [
394
400
  [o]
395
401
  ]),
396
- E("button", {
402
+ O("button", {
397
403
  class: "default",
398
404
  onClick: i[1] || (i[1] = () => s.callback(!1))
399
405
  }, "Cancel")
400
- ], 64)) : U((u(), h("button", {
406
+ ], 64)) : U((u(), f("button", {
401
407
  key: 1,
402
408
  class: "default",
403
409
  onClick: i[2] || (i[2] = () => s.callback(!0))
@@ -413,52 +419,52 @@ const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
413
419
  };
414
420
  }
415
421
  });
416
- let N;
417
- const Et = new Uint8Array(16);
418
- function Ot() {
419
- if (!N && (N = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !N))
422
+ let R;
423
+ const Ot = new Uint8Array(16);
424
+ function wt() {
425
+ if (!R && (R = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))
420
426
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
421
- return N(Et);
427
+ return R(Ot);
422
428
  }
423
- const y = [];
429
+ const g = [];
424
430
  for (let e = 0; e < 256; ++e)
425
- y.push((e + 256).toString(16).slice(1));
426
- function wt(e, t = 0) {
427
- return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
431
+ g.push((e + 256).toString(16).slice(1));
432
+ function Tt(e, t = 0) {
433
+ return (g[e[t + 0]] + g[e[t + 1]] + g[e[t + 2]] + g[e[t + 3]] + "-" + g[e[t + 4]] + g[e[t + 5]] + "-" + g[e[t + 6]] + g[e[t + 7]] + "-" + g[e[t + 8]] + g[e[t + 9]] + "-" + g[e[t + 10]] + g[e[t + 11]] + g[e[t + 12]] + g[e[t + 13]] + g[e[t + 14]] + g[e[t + 15]]).toLowerCase();
428
434
  }
429
- const Tt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
430
- randomUUID: Tt
435
+ const kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
436
+ randomUUID: kt
431
437
  };
432
- function kt(e, t, n) {
438
+ function St(e, t, n) {
433
439
  if (ue.randomUUID && !t && !e)
434
440
  return ue.randomUUID();
435
441
  e = e || {};
436
- const s = e.random || (e.rng || Ot)();
442
+ const s = e.random || (e.rng || wt)();
437
443
  if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, t) {
438
444
  n = n || 0;
439
445
  for (let i = 0; i < 16; ++i)
440
446
  t[n + i] = s[i];
441
447
  return t;
442
448
  }
443
- return wt(s);
449
+ return Tt(s);
444
450
  }
445
- function Kn(e) {
451
+ function Un(e) {
446
452
  return e.replace(/\n/g, "<br>");
447
453
  }
448
- function St(e) {
454
+ function xt(e) {
449
455
  return e.replace(/_/g, " ");
450
456
  }
451
- function xt(e) {
457
+ function Ct(e) {
452
458
  const t = e.replace(/\D/g, "").replace(/^1/, "");
453
459
  return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
454
460
  }
455
- function Ct(e) {
461
+ function Lt(e) {
456
462
  return "$" + Number(e).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
457
463
  }
458
- function Un() {
459
- return kt();
464
+ function jn() {
465
+ return St();
460
466
  }
461
- const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Mt = {
467
+ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", It = {
462
468
  props: {
463
469
  modelValue: {
464
470
  type: null,
@@ -537,8 +543,8 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
537
543
  return this.allOptions.map((e, t) => {
538
544
  var l, c;
539
545
  const n = this.formatter(e), s = (l = this.subtitleFormatter) == null ? void 0 : l.call(this, e), i = n ? n.trim().toLowerCase() : "", o = s ? s.trim().toLowerCase() : "", r = [];
540
- return this.searchFields ? this.searchFields.forEach((f) => {
541
- e[f] && r.push(String(e[f]).toLowerCase());
546
+ return this.searchFields ? this.searchFields.forEach((h) => {
547
+ e[h] && r.push(String(e[h]).toLowerCase());
542
548
  }) : (r.push(i), o && r.push(o)), {
543
549
  // eslint-disable-next-line vue/no-use-computed-property-like-method
544
550
  key: ((c = this.effectiveKeyExtractor) == null ? void 0 : c.call(this, e)) ?? String(t),
@@ -555,7 +561,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
555
561
  const t = this.searchText.trim().toLowerCase();
556
562
  if (t.length) {
557
563
  e = e.filter((i) => i.searchContent.includes(t));
558
- const n = Je(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), s = new RegExp(`(${n})`, "ig");
564
+ const n = et(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), s = new RegExp(`(${n})`, "ig");
559
565
  e = e.map((i) => {
560
566
  var o;
561
567
  return {
@@ -570,7 +576,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
570
576
  }
571
577
  } else
572
578
  this.nullTitle && e.unshift({
573
- key: I,
579
+ key: H,
574
580
  title: this.nullTitle
575
581
  });
576
582
  return e;
@@ -596,7 +602,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
596
602
  },
597
603
  effectiveOptions() {
598
604
  var e;
599
- this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ?? I);
605
+ this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ?? H);
600
606
  }
601
607
  },
602
608
  async mounted() {
@@ -605,7 +611,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
605
611
  "update:modelValue",
606
612
  this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
607
613
  );
608
- }), this.remoteSearch && this.$watch("searchText", Xe(this.reloadOptionsIfSearching, 250));
614
+ }), this.remoteSearch && this.$watch("searchText", Ye(this.reloadOptionsIfSearching, 250));
609
615
  },
610
616
  methods: {
611
617
  async loadRemoteOptions() {
@@ -650,7 +656,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
650
656
  this.searchText.length > 1 && (this.isSearching = !0);
651
657
  return;
652
658
  }
653
- !e.metaKey && Lt.includes(e.key) && (this.isSearching = !0);
659
+ !e.metaKey && Mt.includes(e.key) && (this.isSearching = !0);
654
660
  }
655
661
  },
656
662
  handleInputFocused() {
@@ -658,7 +664,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
658
664
  },
659
665
  setHighlightedOptionKey(e) {
660
666
  var t;
661
- this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ?? I : this.nullTitle && (this.highlightedOptionKey = I);
667
+ this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ?? H : this.nullTitle && (this.highlightedOptionKey = H);
662
668
  },
663
669
  getOptionKey(e) {
664
670
  var t;
@@ -706,7 +712,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
706
712
  i.offsetTop < s.scrollTop ? s.scrollTop = i.offsetTop : i.offsetTop + i.offsetHeight > s.scrollTop + s.clientHeight && (s.scrollTop = i.offsetTop + i.offsetHeight - s.clientHeight);
707
713
  },
708
714
  selectOption(e) {
709
- if (this.isSearching = !1, e.key == I)
715
+ if (this.isSearching = !1, e.key == H)
710
716
  this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
711
717
  else if (e.key === he) {
712
718
  const t = this.searchText.trim();
@@ -725,61 +731,61 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
725
731
  }
726
732
  }
727
733
  };
728
- const It = ["placeholder"], _t = {
734
+ const Ht = ["placeholder"], _t = {
729
735
  key: 0,
730
736
  ref: "optionsContainer",
731
737
  class: "vf-smart-select-options"
732
- }, Ht = {
738
+ }, Dt = {
733
739
  key: 0,
734
740
  class: "no-results"
735
- }, Dt = ["onMousemove", "onMousedown"], $t = ["innerHTML"], At = ["innerHTML"], Bt = {
741
+ }, $t = ["onMousemove", "onMousedown"], At = ["innerHTML"], Bt = ["innerHTML"], Vt = {
736
742
  key: 0,
737
743
  class: "no-results"
738
744
  };
739
- function Vt(e, t, n, s, i, o) {
745
+ function Ft(e, t, n, s, i, o) {
740
746
  const r = Te("disabled");
741
- return u(), h("div", {
742
- class: w(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
747
+ return u(), f("div", {
748
+ class: k(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
743
749
  }, [
744
- U(E("input", {
750
+ U(O("input", {
745
751
  "onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l),
746
752
  ref: "searchField",
747
753
  type: "text",
748
- class: w({ nullable: !!n.nullTitle }),
754
+ class: k({ nullable: !!n.nullTitle }),
749
755
  onKeydown: t[1] || (t[1] = (...l) => o.handleKeyDown && o.handleKeyDown(...l)),
750
756
  placeholder: o.effectivePlaceholder,
751
757
  onFocus: t[2] || (t[2] = (...l) => o.handleInputFocused && o.handleInputFocused(...l)),
752
758
  onBlur: t[3] || (t[3] = (...l) => o.handleInputBlurred && o.handleInputBlurred(...l))
753
- }, null, 42, It), [
759
+ }, null, 42, Ht), [
754
760
  [ze, e.searchText],
755
761
  [r, o.effectiveDisabled]
756
762
  ]),
757
- e.shouldDisplayOptions ? (u(), h("div", _t, [
758
- e.isLoaded ? (u(), h(j, { key: 1 }, [
759
- (u(!0), h(j, null, J(o.effectiveOptions, (l) => (u(), h("div", {
763
+ e.shouldDisplayOptions ? (u(), f("div", _t, [
764
+ e.isLoaded ? (u(), f(j, { key: 1 }, [
765
+ (u(!0), f(j, null, J(o.effectiveOptions, (l) => (u(), f("div", {
760
766
  key: String(l.key),
761
- class: w(["option", {
767
+ class: k(["option", {
762
768
  highlighted: e.highlightedOptionKey === l.key
763
769
  }]),
764
770
  onMousemove: (c) => o.handleOptionHover(l),
765
771
  onMousedown: (c) => o.selectOption(l)
766
772
  }, [
767
- E("div", {
773
+ O("div", {
768
774
  class: "title",
769
775
  innerHTML: l.title
770
- }, null, 8, $t),
771
- l.subtitle ? (u(), h("div", {
776
+ }, null, 8, At),
777
+ l.subtitle ? (u(), f("div", {
772
778
  key: 0,
773
779
  class: "subtitle",
774
780
  innerHTML: l.subtitle
775
- }, null, 8, At)) : O("", !0)
776
- ], 42, Dt))), 128)),
777
- !o.effectiveOptions.length && e.searchText ? (u(), h("div", Bt, x(o.effectiveNoResultsText), 1)) : O("", !0)
778
- ], 64)) : (u(), h("div", Ht, "Loading..."))
779
- ], 512)) : O("", !0)
781
+ }, null, 8, Bt)) : T("", !0)
782
+ ], 42, $t))), 128)),
783
+ !o.effectiveOptions.length && e.searchText ? (u(), f("div", Vt, C(o.effectiveNoResultsText), 1)) : T("", !0)
784
+ ], 64)) : (u(), f("div", Dt, "Loading..."))
785
+ ], 512)) : T("", !0)
780
786
  ], 2);
781
787
  }
782
- const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
788
+ const Nt = /* @__PURE__ */ Le(It, [["render", Ft]]), Wn = /* @__PURE__ */ x({
783
789
  __name: "ez-smart-select",
784
790
  props: {
785
791
  modelValue: {},
@@ -790,13 +796,13 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
790
796
  },
791
797
  emits: ["update:modelValue"],
792
798
  setup(e, { emit: t }) {
793
- const n = e, s = K(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, l]) => ({
799
+ const n = e, s = V(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, l]) => ({
794
800
  value: r,
795
801
  label: l
796
- }))), i = K(() => n.formatter ? (r) => {
802
+ }))), i = V(() => n.formatter ? (r) => {
797
803
  var l;
798
804
  return (l = n.formatter) == null ? void 0 : l.call(n, r.label);
799
- } : (r) => r.label), o = T(s.value.find((r) => r.value === n.modelValue) ?? null);
805
+ } : (r) => r.label), o = w(s.value.find((r) => r.value === n.modelValue) ?? null);
800
806
  return ce(
801
807
  () => n.modelValue,
802
808
  (r) => {
@@ -805,7 +811,7 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
805
811
  ), ce(o, (r) => {
806
812
  var l;
807
813
  t("update:modelValue", r ? ((l = s.value.find((c) => Ce(c, r))) == null ? void 0 : l.value) ?? null : null);
808
- }), (r, l) => (u(), ke(Ft, {
814
+ }), (r, l) => (u(), ke(Nt, {
809
815
  modelValue: o.value,
810
816
  "onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
811
817
  options: s.value,
@@ -813,13 +819,13 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
813
819
  "null-title": r.nullTitle
814
820
  }, null, 8, ["modelValue", "options", "formatter", "null-title"]));
815
821
  }
816
- }), Nt = ["onClick"], Rt = { class: "content" }, Kt = { class: "message" }, Ut = {
822
+ }), Rt = ["onClick"], Kt = { class: "content" }, Ut = { class: "message" }, jt = {
817
823
  key: 0,
818
824
  class: "close"
819
- }, jt = {
825
+ }, Wt = {
820
826
  key: 0,
821
827
  class: "progress-bar"
822
- }, Wt = /* @__PURE__ */ S({
828
+ }, Pt = /* @__PURE__ */ x({
823
829
  __name: "toast",
824
830
  props: {
825
831
  message: {},
@@ -834,157 +840,157 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
834
840
  function n() {
835
841
  t.onClick ? t.onClick() : t.disableClose || t.callback();
836
842
  }
837
- const s = T();
838
- return t.durationSecs !== null && C(() => {
843
+ const s = w();
844
+ return t.durationSecs !== null && L(() => {
839
845
  var o;
840
846
  const i = t.durationSecs ?? 5;
841
847
  (o = s.value) == null || o.animate([{ width: "0%" }, { width: "100%" }], {
842
848
  duration: i * 1e3,
843
849
  easing: "linear"
844
850
  }), setTimeout(() => t.callback(), i * 1e3);
845
- }), (i, o) => (u(), h("div", {
846
- class: w(["vf-toast", i.className]),
851
+ }), (i, o) => (u(), f("div", {
852
+ class: k(["vf-toast", i.className]),
847
853
  onClick: te(n, ["stop"])
848
854
  }, [
849
- E("div", Rt, [
850
- E("div", Kt, x(i.message), 1),
851
- i.disableClose ? O("", !0) : (u(), h("div", Ut, "x"))
855
+ O("div", Kt, [
856
+ O("div", Ut, C(i.message), 1),
857
+ i.disableClose ? T("", !0) : (u(), f("div", jt, "x"))
852
858
  ]),
853
- i.durationSecs !== null ? (u(), h("div", jt, [
854
- E("div", {
859
+ i.durationSecs !== null ? (u(), f("div", Wt, [
860
+ O("div", {
855
861
  ref_key: "progressInnerEl",
856
862
  ref: s,
857
863
  class: "inner"
858
864
  }, null, 512)
859
- ])) : O("", !0)
860
- ], 10, Nt));
865
+ ])) : T("", !0)
866
+ ], 10, Rt));
861
867
  }
862
868
  });
863
- function Wn(e) {
864
- const t = se(Wt, {
869
+ function Pn(e) {
870
+ const t = se(Pt, {
865
871
  ...e,
866
872
  callback: () => P(t)
867
873
  });
868
874
  return () => P(t);
869
875
  }
870
- function Pt(e) {
876
+ function qt(e) {
871
877
  const t = Math.floor(Math.log(e) / Math.log(1024)), s = (e / Math.pow(1024, t)).toFixed(2), i = ["B", "KB", "MB", "GB", "TB"][t];
872
878
  return `${s} ${i}`;
873
879
  }
874
- function qt(e) {
875
- return e != null && String(e).length ? e : "-";
876
- }
877
880
  function zt(e) {
878
- return e || "-";
881
+ return e != null && String(e).length ? e : "-";
879
882
  }
880
883
  function Xt(e) {
881
- return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : nn(Number(e));
884
+ return e || "-";
882
885
  }
883
886
  function Yt(e) {
884
- return e && xt(e);
887
+ return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : sn(Number(e));
885
888
  }
886
889
  function Zt(e) {
887
- return e ? Ye(e) : null;
890
+ return e && Ct(e);
888
891
  }
889
892
  function Gt(e) {
890
893
  return e ? Ze(e) : null;
891
894
  }
892
895
  function Qt(e) {
893
- return e ? e.toUpperCase() : null;
896
+ return e ? Ge(e) : null;
894
897
  }
895
898
  function Jt(e) {
896
- return e ? St(e) : null;
899
+ return e ? e.toUpperCase() : null;
897
900
  }
898
901
  function en(e) {
899
- return Ct(e);
902
+ return e ? xt(e) : null;
903
+ }
904
+ function tn(e) {
905
+ return Lt(e);
900
906
  }
901
907
  const fe = {
902
- bytes: Pt,
903
- dash: qt,
904
- dashZeros: zt,
905
- number: Xt,
906
- phone: Yt,
907
- upperFirst: Zt,
908
- startCase: Gt,
909
- upperCase: Qt,
910
- desnake: Jt,
911
- usCurrency: en
912
- }, Pn = (e) => ({
908
+ bytes: qt,
909
+ dash: zt,
910
+ dashZeros: Xt,
911
+ number: Yt,
912
+ phone: Zt,
913
+ upperFirst: Gt,
914
+ startCase: Qt,
915
+ upperCase: Jt,
916
+ desnake: en,
917
+ usCurrency: tn
918
+ }, qn = (e) => ({
913
919
  ...fe,
914
920
  ...e(fe)
915
921
  });
916
- function qn(e, t, n) {
922
+ function zn(e, t, n) {
917
923
  const s = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
918
924
  return s === -1 ? !1 : (e.splice(s, 1, n), !0);
919
925
  }
920
- function zn(e, t) {
926
+ function Xn(e, t) {
921
927
  const n = document.createElement("div");
922
- n.classList.add("vf-overlay"), n.addEventListener("click", a), document.body.appendChild(n);
928
+ n.classList.add("vf-overlay"), n.addEventListener("click", m), document.body.appendChild(n);
923
929
  const s = document.createElement("div");
924
930
  s.classList.add("vf-context-menu"), s.style.position = "absolute", n.appendChild(s);
925
931
  const i = e.currentTarget;
926
932
  i.style.userSelect = "none", i.classList.add("context-menu-active"), t.targetClass && i.classList.add(t.targetClass), t.class && s.classList.add(t.class), t.items.forEach((p) => {
927
933
  if (p == "-") {
928
- const b = document.createElement("div");
929
- b.classList.add("separator"), s.appendChild(b);
934
+ const d = document.createElement("div");
935
+ d.classList.add("separator"), s.appendChild(d);
930
936
  return;
931
937
  }
932
- const d = document.createElement("div");
933
- d.classList.add("item"), d.style.userSelect = "none", d.innerText = p.title, s.appendChild(d), p.class && d.classList.add(p.class), p.shouldConfirm ? d.addEventListener("click", (b) => m(b, d, p.handler)) : d.addEventListener("click", () => p.handler());
938
+ const a = document.createElement("div");
939
+ a.classList.add("item"), a.style.userSelect = "none", a.innerText = p.title, s.appendChild(a), p.class && a.classList.add(p.class), p.shouldConfirm ? a.addEventListener("click", (d) => y(d, a, p.handler)) : a.addEventListener("click", () => p.handler());
934
940
  });
935
- const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = s.offsetHeight, c = s.offsetWidth, f = o < c ? e.clientX - c - 1 : e.clientX + 1, g = r < l ? e.clientY - l - 1 : e.clientY + 1;
936
- s.style.left = f + "px", s.style.top = g + "px", setTimeout(() => {
941
+ const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = s.offsetHeight, c = s.offsetWidth, h = o < c ? e.clientX - c - 1 : e.clientX + 1, b = r < l ? e.clientY - l - 1 : e.clientY + 1;
942
+ s.style.left = h + "px", s.style.top = b + "px", setTimeout(() => {
937
943
  s.style.width = s.offsetWidth + "px";
938
944
  }, 50);
939
- function a() {
945
+ function m() {
940
946
  t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
941
947
  }
942
- function m(p, d, b) {
943
- if (d.classList.contains("pending-confirm"))
944
- return b();
945
- const L = d.innerHTML;
946
- d.classList.add("pending-confirm"), d.innerText = "Confirm";
947
- const F = () => {
948
- d.classList.remove("pending-confirm"), d.innerHTML = L, d.removeEventListener("mouseleave", F);
948
+ function y(p, a, d) {
949
+ if (a.classList.contains("pending-confirm"))
950
+ return d();
951
+ const E = a.innerHTML;
952
+ a.classList.add("pending-confirm"), a.innerText = "Confirm";
953
+ const M = () => {
954
+ a.classList.remove("pending-confirm"), a.innerHTML = E, a.removeEventListener("mouseleave", M);
949
955
  };
950
- d.addEventListener("mouseleave", F), p.stopPropagation();
956
+ a.addEventListener("mouseleave", M), p.stopPropagation();
951
957
  }
952
958
  }
953
- const tn = (e) => new Promise((t) => setTimeout(t, e)), Xn = (e) => tn(e * 1e3);
954
- function nn(e) {
959
+ const nn = (e) => new Promise((t) => setTimeout(t, e)), Yn = (e) => nn(e * 1e3);
960
+ function sn(e) {
955
961
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
956
962
  }
957
- function Yn(e, t) {
958
- return e != null ? Ge(e) : t;
959
- }
960
963
  function Zn(e, t) {
964
+ return e != null ? Qe(e) : t;
965
+ }
966
+ function Gn(e, t) {
961
967
  const n = { ...e };
962
968
  for (const s of t)
963
969
  n[s] === "" && (n[s] = null);
964
970
  return n;
965
971
  }
966
- function sn(e) {
972
+ function on(e) {
967
973
  return e instanceof Error && "status" in e && "body" in e;
968
974
  }
969
- function Gn({ apiClient: e, wrapper: t, onRequest: n, onError: s, afterRequest: i, CancelablePromise: o }) {
970
- const r = e.request.request.bind(e.request), l = t ?? ((c, f) => f(c));
971
- e.request.request = (c) => l(c, (f) => (f = on(f), n && (f = n(f)), new o((g, a, m) => {
972
- const p = r(f);
973
- m(p.cancel), p.then(g).catch((d) => {
974
- if (sn(d) && typeof d.body == "object" && "error" in d.body) {
975
- if (d.status === 422)
976
- return a(new z(d.body.error));
977
- d.message = `${d.body.error} (${d.status})`;
975
+ function Qn({ apiClient: e, wrapper: t, onRequest: n, onError: s, afterRequest: i, CancelablePromise: o }) {
976
+ const r = e.request.request.bind(e.request), l = t ?? ((c, h) => h(c));
977
+ e.request.request = (c) => l(c, (h) => (h = ln(h), n && (h = n(h)), new o((b, m, y) => {
978
+ const p = r(h);
979
+ y(p.cancel), p.then(b).catch((a) => {
980
+ if (on(a) && typeof a.body == "object" && "error" in a.body) {
981
+ if (a.status === 422)
982
+ return m(new z(a.body.error));
983
+ a.message = `${a.body.error} (${a.status})`;
978
984
  }
979
985
  if (s) {
980
- const b = s(d, f);
981
- if (b === null)
986
+ const d = s(a, h);
987
+ if (d === null)
982
988
  return;
983
- if (b instanceof Error)
984
- return a(b);
989
+ if (d instanceof Error)
990
+ return m(d);
985
991
  }
986
- a(d);
987
- }).finally(() => i == null ? void 0 : i(f));
992
+ m(a);
993
+ }).finally(() => i == null ? void 0 : i(h));
988
994
  })));
989
995
  }
990
996
  class pe {
@@ -999,7 +1005,7 @@ class pe {
999
1005
  this.blob = t;
1000
1006
  }
1001
1007
  }
1002
- function on(e) {
1008
+ function ln(e) {
1003
1009
  if (!(typeof e.body == "object" && Object.values(e.body).some((i) => i instanceof pe)))
1004
1010
  return e;
1005
1011
  const n = {}, s = {};
@@ -1012,19 +1018,19 @@ function on(e) {
1012
1018
  };
1013
1019
  }
1014
1020
  const le = Symbol("HookState");
1015
- function Qn(e, t) {
1021
+ function Jn(e, t) {
1016
1022
  const n = t ?? ee();
1017
- C(() => ln(n, e), n), Se(() => rn(n), n), xe(() => me(n), n), ne(() => me(n), n);
1023
+ L(() => rn(n, e), n), Se(() => an(n), n), xe(() => me(n), n), ne(() => me(n), n);
1018
1024
  }
1019
- function ln(e, t) {
1025
+ function rn(e, t) {
1020
1026
  const n = {};
1021
- if (t.elScrolledToBottom && (n.el = new $(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1027
+ if (t.elScrolledToBottom && (n.el = new A(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1022
1028
  const s = De(e.vnode.el);
1023
- s ? n.ancestor = new $(s, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1029
+ s ? n.ancestor = new A(s, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1024
1030
  }
1025
- t.windowScrolledToBottom && (n.window = new $(window, t.windowScrolledToBottom)), e[le] = n;
1031
+ t.windowScrolledToBottom && (n.window = new A(window, t.windowScrolledToBottom)), e[le] = n;
1026
1032
  }
1027
- function rn(e) {
1033
+ function an(e) {
1028
1034
  var n, s, i;
1029
1035
  const t = e[le];
1030
1036
  (n = t == null ? void 0 : t.el) == null || n.install(), (s = t == null ? void 0 : t.ancestor) == null || s.install(), (i = t == null ? void 0 : t.window) == null || i.install();
@@ -1042,7 +1048,7 @@ function De(e) {
1042
1048
  const n = window.getComputedStyle(t);
1043
1049
  return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t : De(t);
1044
1050
  }
1045
- class $ {
1051
+ class A {
1046
1052
  constructor(t, n) {
1047
1053
  v(this, "isTripped", !1);
1048
1054
  v(this, "onScrollWithContext", this.onScroll.bind(this));
@@ -1058,10 +1064,10 @@ class $ {
1058
1064
  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);
1059
1065
  }
1060
1066
  }
1061
- function Jn(e) {
1062
- C(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), xe(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1067
+ function es(e) {
1068
+ L(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), xe(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1063
1069
  }
1064
- const an = {
1070
+ const cn = {
1065
1071
  mounted: ye,
1066
1072
  updated: ye
1067
1073
  }, ve = Symbol("HasAutoFocused");
@@ -1072,10 +1078,10 @@ function ye(e, t) {
1072
1078
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
1073
1079
  setTimeout(() => n.focus(), 10);
1074
1080
  }
1075
- const cn = {
1076
- mounted: dn
1081
+ const dn = {
1082
+ mounted: un
1077
1083
  }, _ = Symbol("ConfirmState");
1078
- function dn(e) {
1084
+ function un(e) {
1079
1085
  e.addEventListener("click", (t) => {
1080
1086
  const n = Date.now();
1081
1087
  if (e[_]) {
@@ -1095,10 +1101,10 @@ function dn(e) {
1095
1101
  e[_] = s, e.innerHTML = "Confirm", e.addEventListener("mouseout", s.resetHandler);
1096
1102
  });
1097
1103
  }
1098
- const un = {
1099
- beforeMount: hn
1104
+ const hn = {
1105
+ beforeMount: fn
1100
1106
  };
1101
- function hn(e) {
1107
+ function fn(e) {
1102
1108
  e.addEventListener("blur", () => {
1103
1109
  let t = e.value;
1104
1110
  /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + G(/* @__PURE__ */ new Date(), "yy"));
@@ -1106,49 +1112,49 @@ function hn(e) {
1106
1112
  isNaN(n) ? e.value = "" : e.value = G(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1107
1113
  });
1108
1114
  }
1109
- const fn = {
1115
+ const pn = {
1110
1116
  beforeMount: ge,
1111
1117
  updated: ge
1112
1118
  };
1113
1119
  function ge(e, t) {
1114
- t.value == t.oldValue && e.innerHTML.length || (e.innerText = pn(e, t));
1120
+ t.value == t.oldValue && e.innerHTML.length || (e.innerText = mn(e, t));
1115
1121
  }
1116
- function pn(e, t) {
1117
- var c, f;
1122
+ function mn(e, t) {
1123
+ var c, h;
1118
1124
  if (!t.value)
1119
1125
  return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
1120
1126
  let n = "";
1121
1127
  const s = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? s.replace(/Z$/, "") : s.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(i);
1122
1128
  e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
1123
- let r = (f = e.attributes.getNamedItem("format")) == null ? void 0 : f.value;
1129
+ let r = (h = e.attributes.getNamedItem("format")) == null ? void 0 : h.value;
1124
1130
  if (!r && e.attributes.getNamedItem("relative-date") !== null) {
1125
- const g = /* @__PURE__ */ new Date();
1126
- g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1131
+ const b = /* @__PURE__ */ new Date();
1132
+ b.getFullYear() == o.getFullYear() && b.getMonth() == o.getMonth() && b.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1127
1133
  }
1128
- r || (r = V.defaultDateTimeFormat);
1134
+ r || (r = N.defaultDateTimeFormat);
1129
1135
  let l = G(o, r);
1130
1136
  return n && (l = n + " " + l), l;
1131
1137
  }
1132
- const mn = {
1138
+ const vn = {
1133
1139
  beforeMount: be,
1134
1140
  updated: be,
1135
- unmounted: vn
1141
+ unmounted: yn
1136
1142
  };
1137
1143
  function be(e, t) {
1138
1144
  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");
1139
1145
  }
1140
- function vn(e) {
1146
+ function yn(e) {
1141
1147
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1142
1148
  }
1143
- const yn = {
1149
+ const gn = {
1144
1150
  beforeMount: Ee,
1145
1151
  updated: Ee,
1146
1152
  unmounted: Ae
1147
- }, B = Symbol("HasAutoFocused"), re = [];
1148
- function gn() {
1153
+ }, F = Symbol("HasAutoFocused"), re = [];
1154
+ function bn() {
1149
1155
  re.forEach($e);
1150
1156
  }
1151
- setInterval(gn, 1e3);
1157
+ setInterval(bn, 1e3);
1152
1158
  function Ee(e, t) {
1153
1159
  var r;
1154
1160
  if (t.value == t.oldValue)
@@ -1156,19 +1162,19 @@ function Ee(e, t) {
1156
1162
  if (!t.value)
1157
1163
  return Ae(e);
1158
1164
  const n = new Date(t.value), s = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, i = n.getTime() - (s ? new Date(s).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
1159
- e[B] || re.push(e), e[B] = {
1165
+ e[F] || re.push(e), e[F] = {
1160
1166
  startTs: i,
1161
1167
  includeSeconds: o
1162
1168
  }, $e(e);
1163
1169
  }
1164
1170
  function $e(e) {
1165
- const t = e[B], n = Math.round((Date.now() - t.startTs) / 1e3);
1166
- e.innerText = bn(n, t.includeSeconds);
1171
+ const t = e[F], n = Math.round((Date.now() - t.startTs) / 1e3);
1172
+ e.innerText = En(n, t.includeSeconds);
1167
1173
  }
1168
1174
  function Ae(e) {
1169
- e[B] && (Qe(re, e), delete e[B]), e.innerText = "-";
1175
+ e[F] && (Je(re, e), delete e[F]), e.innerText = "-";
1170
1176
  }
1171
- function bn(e, t) {
1177
+ function En(e, t) {
1172
1178
  const n = [], s = Math.floor(e / 86400);
1173
1179
  s && n.push(s + "d"), e -= s * 86400;
1174
1180
  const i = Math.floor(e / 3600);
@@ -1176,30 +1182,30 @@ function bn(e, t) {
1176
1182
  const o = Math.floor(e / 60);
1177
1183
  return (s || i || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
1178
1184
  }
1179
- const H = Symbol("InfiniteScrollHandler"), En = {
1185
+ const D = Symbol("InfiniteScrollHandler"), On = {
1180
1186
  mounted(e, t) {
1181
- e[H] = new $(e, t.value);
1187
+ e[D] = new A(e, t.value);
1182
1188
  },
1183
1189
  updated(e, t) {
1184
1190
  var n;
1185
- (n = e[H]) == null || n.uninstall(), e[H] = new $(e, t.value);
1191
+ (n = e[D]) == null || n.uninstall(), e[D] = new A(e, t.value);
1186
1192
  },
1187
1193
  unmounted(e) {
1188
1194
  var t;
1189
- (t = e[H]) == null || t.uninstall(), delete e[H];
1195
+ (t = e[D]) == null || t.uninstall(), delete e[D];
1190
1196
  }
1191
- }, On = {
1197
+ }, wn = {
1192
1198
  beforeMount: Oe,
1193
1199
  updated: Oe
1194
1200
  };
1195
1201
  function Oe(e, t) {
1196
1202
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1197
1203
  }
1198
- const wn = {
1204
+ const Tn = {
1199
1205
  mounted: we,
1200
1206
  updated: we,
1201
1207
  unmounted: Be
1202
- }, A = Symbol("TooltipState");
1208
+ }, B = Symbol("TooltipState");
1203
1209
  function we(e, t) {
1204
1210
  var s;
1205
1211
  let n = ((s = e.attributes.getNamedItem("tip")) == null ? void 0 : s.value) ?? t.value;
@@ -1208,15 +1214,15 @@ function we(e, t) {
1208
1214
  content: n,
1209
1215
  html: e.getAttribute("html") !== null
1210
1216
  };
1211
- e[A] ? e[A].configure(i) : e[A] = new Tn(e, i);
1217
+ e[B] ? e[B].configure(i) : e[B] = new kn(e, i);
1212
1218
  } else
1213
1219
  Be(e);
1214
1220
  }
1215
1221
  function Be(e) {
1216
1222
  var t;
1217
- (t = e[A]) == null || t.destroy(), delete e[A];
1223
+ (t = e[B]) == null || t.destroy(), delete e[B];
1218
1224
  }
1219
- class Tn {
1225
+ class kn {
1220
1226
  constructor(t, n) {
1221
1227
  v(this, "lastMoveEvt");
1222
1228
  v(this, "checkInterval");
@@ -1264,61 +1270,61 @@ class Tn {
1264
1270
  this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
1265
1271
  }
1266
1272
  }
1267
- function kn(e) {
1268
- e.directive("autofocus", an), e.directive("confirm-button", cn), e.directive("date-input", un), e.directive("datetime", fn), e.directive("disabled", mn), e.directive("duration", yn), e.directive("infinite-scroll", En), e.directive("readonly", On), e.directive("tooltip", wn);
1273
+ function Sn(e) {
1274
+ e.directive("autofocus", cn), e.directive("confirm-button", dn), e.directive("date-input", hn), e.directive("datetime", pn), e.directive("disabled", vn), e.directive("duration", gn), e.directive("infinite-scroll", On), e.directive("readonly", wn), e.directive("tooltip", Tn);
1269
1275
  }
1270
- function es(e) {
1271
- kn(e);
1276
+ function ts(e) {
1277
+ Sn(e);
1272
1278
  }
1273
1279
  export {
1274
1280
  pe as FileUploadRequest,
1275
1281
  _n as OverlayContainer,
1276
1282
  z as UserError,
1277
- In as VfAjaxSelect,
1283
+ Hn as VfAjaxSelect,
1278
1284
  X as VfAlertModal,
1279
- jn as VfEzSmartSelect,
1280
- yt as VfModal,
1281
- Ft as VfSmartSelect,
1282
- Yn as cloneProp,
1283
- Bn as configureVf,
1284
- Pn as createFilters,
1285
+ Wn as VfEzSmartSelect,
1286
+ gt as VfModal,
1287
+ Nt as VfSmartSelect,
1288
+ Zn as cloneProp,
1289
+ Vn as configureVf,
1290
+ qn as createFilters,
1285
1291
  se as createOverlayInjection,
1286
- St as desnakeCase,
1287
- ct as dismissOverlayInjectionById,
1288
- Hn as dismissOverlayInjectionByInstance,
1292
+ xt as desnakeCase,
1293
+ dt as dismissOverlayInjectionById,
1294
+ Dn as dismissOverlayInjectionByInstance,
1289
1295
  Me as dismissOverlayInjectionByInternalInstance,
1290
- at as dismissOverlayInjectionByVnode,
1291
- ss as escapeHtml,
1292
- dt as formatError,
1293
- nn as formatNumber,
1294
- xt as formatPhone,
1295
- Ct as formatUSCurrency,
1296
- Fn as handleError,
1297
- Vn as handleErrorAndAlert,
1298
- Gn as installApiClientInterceptors,
1299
- es as installVf,
1300
- sn as isApiError,
1301
- Nn as maskComponent,
1302
- ut as maskEl,
1303
- ht as maskForm,
1304
- Kn as nl2br,
1305
- Zn as nullifyEmptyInputs,
1296
+ ct as dismissOverlayInjectionByVnode,
1297
+ is as escapeHtml,
1298
+ ut as formatError,
1299
+ sn as formatNumber,
1300
+ Ct as formatPhone,
1301
+ Lt as formatUSCurrency,
1302
+ Nn as handleError,
1303
+ Fn as handleErrorAndAlert,
1304
+ Qn as installApiClientInterceptors,
1305
+ ts as installVf,
1306
+ on as isApiError,
1307
+ Rn as maskComponent,
1308
+ ht as maskEl,
1309
+ ft as maskForm,
1310
+ Un as nl2br,
1311
+ Gn as nullifyEmptyInputs,
1306
1312
  ie as presentOverlay,
1307
1313
  P as removeOverlayInjection,
1308
- qn as replaceElement,
1314
+ zn as replaceElement,
1309
1315
  de as showAlert,
1310
- Dn as showConfirm,
1311
- $n as showConfirmDestroy,
1312
- zn as showContextMenu,
1313
- Wn as showToast,
1314
- An as showWait,
1315
- tn as sleep,
1316
- Xn as sleepSecs,
1316
+ $n as showConfirm,
1317
+ An as showConfirmDestroy,
1318
+ Xn as showContextMenu,
1319
+ Pn as showToast,
1320
+ Bn as showWait,
1321
+ nn as sleep,
1322
+ Yn as sleepSecs,
1317
1323
  oe as toError,
1318
- Rn as unmaskComponent,
1324
+ Kn as unmaskComponent,
1319
1325
  Ie as unmaskEl,
1320
- _e as unmaskForm,
1321
- Qn as useInfiniteScroll,
1322
- Jn as useResizeWatcher,
1323
- Un as uuid
1326
+ He as unmaskForm,
1327
+ Jn as useInfiniteScroll,
1328
+ es as useResizeWatcher,
1329
+ jn as uuid
1324
1330
  };