@signal24/vue-foundation 4.24.2 → 4.25.0

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