@signal24/vue-foundation 4.14.0 → 4.15.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,18 +1,18 @@
1
- var Ve = Object.defineProperty;
2
- var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var E = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as C, defineProps as _e, defineEmits as Re, ref as O, computed as _, openBlock as d, createElementBlock as h, createElementVNode as w, toDisplayString as x, withDirectives as j, createCommentVNode as b, Fragment as U, renderList as J, vModelSelect as Ne, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ke, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as Ue, markRaw as We, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as be, createSlots as Pe, withCtx as Y, createTextVNode as ae, vModelText as qe, watch as ce, onActivated as ke, onDeactivated as Se } from "vue";
5
- import { compact as ze, 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 ni } from "@vue/shared";
8
- import { installOpenApiClientInterceptors as et, isOpenApiError as tt } from "@signal24/openapi-client-codegen/browser";
1
+ var Be = Object.defineProperty;
2
+ var Ve = (e, t, n) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var E = (e, t, n) => Ve(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as C, defineProps as Fe, defineEmits as _e, ref as b, computed as _, openBlock as d, createElementBlock as h, createElementVNode as w, toDisplayString as x, withDirectives as j, createCommentVNode as O, Fragment as U, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ne, withModifiers as te, renderSlot as K, reactive as Ke, h as W, Teleport as je, markRaw as Ue, onBeforeUnmount as ne, resolveDirective as we, createBlock as be, createSlots as We, withCtx as Y, createTextVNode as ae, vModelText as Pe, watch as ce, onActivated as Oe, onDeactivated as ke } from "vue";
5
+ import { compact as qe, debounce as ze, isEqual as Se, upperFirst as Xe, startCase as Ye, cloneDeep as Ze, remove as Ge } from "lodash";
6
+ import { escapeHtml as Qe } from "@vue/shared";
7
+ import { escapeHtml as ns } from "@vue/shared";
8
+ import { installOpenApiClientInterceptors as Je, isOpenApiError as et } from "@signal24/openapi-client-codegen/browser";
9
9
  import { format as G } from "date-fns";
10
- const nt = C({
10
+ const tt = C({
11
11
  setup() {
12
- const e = _e();
13
- Re(["update:modelValue"]);
14
- const t = O(null), n = _(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = O(e.modelValue ?? null);
15
- return { props: e, options: t, renderOptions: n, selectedItem: i };
12
+ const e = Fe();
13
+ _e(["update:modelValue"]);
14
+ const t = b(null), n = _(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), s = b(e.modelValue ?? null);
15
+ return { props: e, options: t, renderOptions: n, selectedItem: s };
16
16
  },
17
17
  watch: {
18
18
  loadFn() {
@@ -33,51 +33,50 @@ const nt = C({
33
33
  this.options = await this.props.loadFn();
34
34
  }
35
35
  }
36
- }), xe = (e, t) => {
36
+ }), Ce = (e, t) => {
37
37
  const n = e.__vccOpts || e;
38
- for (const [i, s] of t)
39
- n[i] = s;
38
+ for (const [s, i] of t)
39
+ n[s] = i;
40
40
  return n;
41
- }, it = {
41
+ }, nt = {
42
42
  key: 0,
43
43
  disabled: ""
44
44
  }, st = {
45
45
  key: 0,
46
46
  value: null
47
- }, ot = ["value"];
48
- function lt(e, t, n, i, s, o) {
47
+ }, it = ["value"];
48
+ function ot(e, t, n, s, i, o) {
49
49
  return e.renderOptions ? j((d(), h("select", {
50
50
  key: 1,
51
51
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
52
52
  }, [
53
- e.props.nullText ? (d(), h("option", st, x(e.props.nullText), 1)) : b("", !0),
53
+ e.props.nullText ? (d(), h("option", st, x(e.props.nullText), 1)) : O("", !0),
54
54
  (d(!0), h(U, null, J(e.renderOptions, (r, l) => {
55
55
  var a;
56
56
  return d(), h("option", {
57
57
  key: l,
58
58
  value: (a = e.options) == null ? void 0 : a[l]
59
- }, x(r), 9, ot);
59
+ }, x(r), 9, it);
60
60
  }), 128))
61
61
  ], 512)), [
62
- [Ne, e.selectedItem]
63
- ]) : (d(), h("select", it, [
62
+ [Re, e.selectedItem]
63
+ ]) : (d(), h("select", nt, [
64
64
  w("option", null, x(e.props.loadingText || "Loading..."), 1)
65
65
  ]));
66
66
  }
67
- const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
67
+ const Mn = /* @__PURE__ */ Ce(tt, [["render", ot]]), lt = /* @__PURE__ */ C({
68
68
  __name: "overlay-anchor",
69
69
  props: {
70
70
  overlayId: {},
71
71
  anchor: {}
72
72
  },
73
73
  setup(e) {
74
- const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, i = O({ visibility: "hidden", top: "0", left: "0" }), s = O([]), o = ee();
74
+ const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s = b({ visibility: "hidden", top: "0", left: "0" }), i = b([]), o = ee();
75
75
  L(r);
76
76
  function r() {
77
- if (!o)
78
- return;
77
+ if (!o) return;
79
78
  const p = o.vnode.el, { styles: g, classes: m } = l(p, n);
80
- i.value = g, s.value = m;
79
+ s.value = g, i.value = m;
81
80
  }
82
81
  function l(p, g) {
83
82
  const m = t.anchor instanceof HTMLElement ? {} : t.anchor, v = g.getBoundingClientRect(), f = p.getBoundingClientRect();
@@ -107,34 +106,34 @@ const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
107
106
  };
108
107
  }
109
108
  function a() {
110
- window.removeEventListener("click", a), dt(t.overlayId);
109
+ window.removeEventListener("click", a), ct(t.overlayId);
111
110
  }
112
111
  return L(() => {
113
112
  setTimeout(() => {
114
113
  window.addEventListener("click", a);
115
114
  }, 10);
116
115
  }), (p, g) => (d(), h("div", {
117
- class: k(["vf-overlay-anchor", s.value]),
118
- style: Ke(i.value),
116
+ class: k(["vf-overlay-anchor", i.value]),
117
+ style: Ne(s.value),
119
118
  onClick: te(a, ["stop"])
120
119
  }, [
121
120
  K(p.$slots, "default")
122
121
  ], 6));
123
122
  }
124
123
  });
125
- let at = 0;
126
- const S = je([]), In = C({
124
+ let rt = 0;
125
+ const S = Ke([]), In = C({
127
126
  setup() {
128
127
  return () => W("div", [
129
- J(S, (e) => W(Ue, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
128
+ J(S, (e) => W(je, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
130
129
  ]);
131
130
  }
132
131
  });
133
- function ie(e, t, n) {
134
- const i = document.getElementById("vf-overlay-target") ?? document.createElement("div");
135
- i.id = "vf-overlay-target", i.removeAttribute("inert"), document.body.appendChild(i);
136
- const s = String(++at), o = We(e), r = W(o, t), l = n != null && n.anchor ? W(rt, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, a = {
137
- id: s,
132
+ function se(e, t, n) {
133
+ const s = document.getElementById("vf-overlay-target") ?? document.createElement("div");
134
+ s.id = "vf-overlay-target", s.removeAttribute("inert"), document.body.appendChild(s);
135
+ const i = String(++rt), o = Ue(e), r = W(o, t), l = n != null && n.anchor ? W(lt, { overlayId: i, anchor: n.anchor }, () => [r]) : void 0, a = {
136
+ id: i,
138
137
  component: o,
139
138
  props: t,
140
139
  options: n ?? {},
@@ -144,18 +143,18 @@ function ie(e, t, n) {
144
143
  return S.push(a), a;
145
144
  }
146
145
  function Hn(e) {
147
- e.$ && Le(e.$);
146
+ e.$ && xe(e.$);
148
147
  }
149
- function Le(e) {
148
+ function xe(e) {
150
149
  let t = e;
151
- for (; t && !ct(t.vnode); )
150
+ for (; t && !at(t.vnode); )
152
151
  t = t.parent;
153
152
  }
154
- function ct(e) {
153
+ function at(e) {
155
154
  const t = S.findIndex((n) => n.vnode.component === e.component);
156
155
  return t >= 0 ? (S[t].props.callback(), !0) : !1;
157
156
  }
158
- function dt(e) {
157
+ function ct(e) {
159
158
  const t = S.findIndex((n) => n.id === e);
160
159
  return t >= 0 ? (S[t].props.callback(), !0) : !1;
161
160
  }
@@ -163,48 +162,53 @@ function P(e) {
163
162
  const t = S.indexOf(e);
164
163
  t >= 0 && S.splice(t, 1);
165
164
  }
166
- async function se(e, t, n) {
167
- return new Promise((i) => {
168
- let s = null;
165
+ async function ie(e, t, n) {
166
+ return new Promise((s) => {
167
+ let i = null;
169
168
  const r = { ...t, callback: async (l) => {
170
169
  if (n != null && n.onCallback) {
171
170
  const a = n.onCallback(l);
172
171
  if (typeof a == "object" && "then" in a && typeof a.then == "function" && await a === !1)
173
172
  return;
174
173
  }
175
- P(s), i(l);
174
+ P(i), s(l);
176
175
  } };
177
- s = ie(e, r, n);
176
+ i = se(e, r, n);
178
177
  });
179
178
  }
180
179
  function q(e, t) {
181
- return { title: t ? e : void 0, message: t ?? e };
180
+ return typeof e == "object" && !(e instanceof Error) ? {
181
+ ...e,
182
+ classes: e.classes ?? []
183
+ } : { title: t ? e : void 0, message: t ?? e, classes: [] };
182
184
  }
183
- async function de(e, t) {
184
- await se(X, q(e, t));
185
+ async function dt(e, t) {
186
+ await ie(X, q(e, t));
185
187
  }
186
188
  async function Dn(e, t) {
187
- return await se(X, {
188
- ...q(e, t),
189
+ const n = q(e, t);
190
+ return await ie(X, {
191
+ ...n,
189
192
  shouldConfirm: !0
190
193
  }) === !0;
191
194
  }
192
195
  async function An(e, t) {
193
- return await se(X, {
194
- ...q(e, t),
196
+ const n = q(e, t);
197
+ return await ie(X, {
198
+ ...n,
195
199
  shouldConfirm: !0,
196
- classes: ["destructive"]
200
+ classes: ["destructive", ...n.classes]
197
201
  }) === !0;
198
202
  }
199
203
  function $n(e, t) {
200
- const n = ie(X, {
201
- ...q(e, t),
204
+ const n = q(e, t), s = se(X, {
205
+ ...n,
202
206
  isBare: !0,
203
- classes: ["wait"],
207
+ classes: ["wait", ...n.classes],
204
208
  callback: () => {
205
209
  }
206
210
  });
207
- return () => P(n);
211
+ return () => P(s);
208
212
  }
209
213
  const M = {
210
214
  unhandledErrorSupportText: "please contact support",
@@ -232,7 +236,11 @@ function oe(e) {
232
236
  }
233
237
  async function Vn(e, t) {
234
238
  const n = oe(e);
235
- return n instanceof z || M.errorHandler(n), t ? de(t, n) : de(n);
239
+ return n instanceof z || M.errorHandler(n), dt({
240
+ title: t == null ? void 0 : t.title,
241
+ message: n,
242
+ classes: t == null ? void 0 : t.classes
243
+ });
236
244
  }
237
245
  async function Fn(e) {
238
246
  const t = oe(e);
@@ -240,50 +248,48 @@ async function Fn(e) {
240
248
  }
241
249
  const B = Symbol("MaskState");
242
250
  function _n(e, t) {
243
- var s;
244
- const n = (s = e.$) == null ? void 0 : s.vnode.el, i = n.closest(".vf-modal");
245
- return ht(i ?? n, t);
251
+ var i;
252
+ const n = (i = e.$) == null ? void 0 : i.vnode.el, s = n.closest(".vf-modal");
253
+ return ht(s ?? n, t);
246
254
  }
247
255
  function Rn(e) {
248
- var i;
249
- const t = (i = e.$) == null ? void 0 : i.vnode.el, n = t.closest(".vf-modal");
250
- return Me(n ?? t);
256
+ var s;
257
+ const t = (s = e.$) == null ? void 0 : s.vnode.el, n = t.closest(".vf-modal");
258
+ return Le(n ?? t);
251
259
  }
252
260
  function ht(e, t) {
253
261
  if (!e[B]) {
254
262
  const n = document.createElement("div");
255
263
  n.classList.add("vf-mask"), e.appendChild(n), e[B] = { maskEl: n };
256
264
  }
257
- return e[B].maskEl.innerText = t ?? "", () => Me(e);
265
+ return e[B].maskEl.innerText = t ?? "", () => Le(e);
258
266
  }
259
- function Me(e) {
267
+ function Le(e) {
260
268
  e[B] && e.removeChild(e[B].maskEl);
261
269
  }
262
270
  const Q = Symbol("FormMaskState");
263
271
  function ft(e, t, n) {
264
- const i = e instanceof Element ? e : He(e);
265
- if (!i)
266
- return () => {
267
- };
268
- i.classList.add("vf-masked");
269
- const s = t instanceof Element ? t : i.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
272
+ const s = e instanceof Element ? e : Ie(e);
273
+ if (!s) return () => {
274
+ };
275
+ s.classList.add("vf-masked");
276
+ const i = t instanceof Element ? t : s.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
270
277
  let o;
271
- s && (o = s.tagName === "INPUT" ? s.value : s.innerHTML, s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...");
272
- const l = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
273
- return l.forEach((a) => a.setAttribute("disabled", "disabled")), i[Q] = {
278
+ i && (o = i.tagName === "INPUT" ? i.value : i.innerHTML, i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...");
279
+ const l = [...s.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
280
+ return l.forEach((a) => a.setAttribute("disabled", "disabled")), s[Q] = {
274
281
  disabledElements: l,
275
- waitButton: s,
282
+ waitButton: i,
276
283
  buttonHtml: o
277
- }, () => Ie(i);
284
+ }, () => Me(s);
278
285
  }
279
- function Ie(e) {
280
- const t = e instanceof Element ? e : He(e);
281
- if (!t)
282
- return;
286
+ function Me(e) {
287
+ const t = e instanceof Element ? e : Ie(e);
288
+ if (!t) return;
283
289
  const n = t[Q];
284
- n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[Q]);
290
+ n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((s) => s.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[Q]);
285
291
  }
286
- function He(e) {
292
+ function Ie(e) {
287
293
  var n;
288
294
  const t = (n = e == null ? void 0 : e.$) == null ? void 0 : n.vnode.el;
289
295
  return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
@@ -305,32 +311,32 @@ const pt = ["id"], mt = {
305
311
  },
306
312
  emits: ["formSubmit"],
307
313
  setup(e, { expose: t }) {
308
- const n = ee(), i = e;
314
+ const n = ee(), s = e;
309
315
  t({ mask: m, unmask: v, hide: f, unhide: u });
310
- const s = O(), o = O(), r = O(!1), l = _(() => ze([i.class, r.value && "hidden"]));
316
+ const i = b(), o = b(), r = b(!1), l = _(() => qe([s.class, r.value && "hidden"]));
311
317
  L(() => {
312
318
  var c;
313
- document.body.classList.add("vf-modal-open"), i.closeOnMaskClick && (window.addEventListener("keydown", p), (c = s.value) == null || c.addEventListener("click", a));
319
+ document.body.classList.add("vf-modal-open"), s.closeOnMaskClick && (window.addEventListener("keydown", p), (c = i.value) == null || c.addEventListener("click", a));
314
320
  }), ne(() => {
315
321
  window.removeEventListener("keydown", p), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
316
322
  });
317
323
  function a(c) {
318
- c.target == s.value && g();
324
+ c.target == i.value && g();
319
325
  }
320
326
  function p(c) {
321
327
  if (c.key === "Esc" || c.key === "Escape") {
322
328
  const T = document.querySelectorAll(".vf-modal-wrap");
323
- T[T.length - 1] === s.value && g();
329
+ T[T.length - 1] === i.value && g();
324
330
  }
325
331
  }
326
332
  function g() {
327
- Le(n);
333
+ xe(n);
328
334
  }
329
335
  function m() {
330
336
  return ft(o.value), () => v();
331
337
  }
332
338
  function v() {
333
- Ie(o.value);
339
+ Me(o.value);
334
340
  }
335
341
  function f() {
336
342
  return r.value = !0, () => u();
@@ -342,7 +348,7 @@ const pt = ["id"], mt = {
342
348
  id: c.id,
343
349
  class: k(["vf-overlay vf-modal-wrap", l.value]),
344
350
  ref_key: "overlay",
345
- ref: s
351
+ ref: i
346
352
  }, [
347
353
  w("form", {
348
354
  action: ".",
@@ -353,18 +359,18 @@ const pt = ["id"], mt = {
353
359
  }, [
354
360
  c.$slots.header ? (d(), h("div", mt, [
355
361
  K(c.$slots, "header"),
356
- i.closeX ? (d(), h("i", {
362
+ s.closeX ? (d(), h("i", {
357
363
  key: 0,
358
364
  class: "close",
359
365
  onClick: g
360
- })) : b("", !0)
361
- ])) : b("", !0),
366
+ })) : O("", !0)
367
+ ])) : O("", !0),
362
368
  w("div", vt, [
363
369
  K(c.$slots, "default")
364
370
  ]),
365
371
  c.$slots.footer ? (d(), h("div", yt, [
366
372
  K(c.$slots, "footer")
367
- ])) : b("", !0)
373
+ ])) : O("", !0)
368
374
  ], 34)
369
375
  ], 10, pt));
370
376
  }
@@ -381,15 +387,15 @@ const pt = ["id"], mt = {
381
387
  },
382
388
  setup(e) {
383
389
  const t = e, n = _(() => t.message instanceof Error ? ut(t.message) : t.message);
384
- return (i, s) => {
385
- const o = Oe("autofocus");
390
+ return (s, i) => {
391
+ const o = we("autofocus");
386
392
  return d(), be(gt, {
387
- class: k(["vf-alert", i.classes])
388
- }, Pe({
393
+ class: k(["vf-alert", s.classes])
394
+ }, We({
389
395
  default: Y(() => [
390
- i.isHtml ? (d(), h("div", {
396
+ s.isHtml ? (d(), h("div", {
391
397
  key: 0,
392
- innerHtml: i.message,
398
+ innerHtml: s.message,
393
399
  class: "user-message"
394
400
  }, null, 8, Et)) : (d(), h("div", {
395
401
  key: 1,
@@ -398,20 +404,20 @@ const pt = ["id"], mt = {
398
404
  ]),
399
405
  _: 2
400
406
  }, [
401
- i.title ? {
407
+ s.title ? {
402
408
  name: "header",
403
409
  fn: Y(() => [
404
- w("h1", null, x(i.title), 1)
410
+ w("h1", null, x(s.title), 1)
405
411
  ]),
406
412
  key: "0"
407
413
  } : void 0,
408
- i.isBare ? void 0 : {
414
+ s.isBare ? void 0 : {
409
415
  name: "footer",
410
416
  fn: Y(() => [
411
- i.shouldConfirm ? (d(), h(U, { key: 0 }, [
417
+ s.shouldConfirm ? (d(), h(U, { key: 0 }, [
412
418
  j((d(), h("button", {
413
419
  class: "primary",
414
- onClick: s[0] || (s[0] = () => i.callback(!0))
420
+ onClick: i[0] || (i[0] = () => s.callback(!0))
415
421
  }, [
416
422
  ae("Confirm")
417
423
  ])), [
@@ -419,12 +425,12 @@ const pt = ["id"], mt = {
419
425
  ]),
420
426
  w("button", {
421
427
  class: "default",
422
- onClick: s[1] || (s[1] = () => i.callback(!1))
428
+ onClick: i[1] || (i[1] = () => s.callback(!1))
423
429
  }, "Cancel")
424
430
  ], 64)) : j((d(), h("button", {
425
431
  key: 1,
426
432
  class: "default",
427
- onClick: s[2] || (s[2] = () => i.callback(!0))
433
+ onClick: i[2] || (i[2] = () => s.callback(!0))
428
434
  }, [
429
435
  ae("OK")
430
436
  ])), [
@@ -439,7 +445,7 @@ const pt = ["id"], mt = {
439
445
  });
440
446
  let N;
441
447
  const wt = new Uint8Array(16);
442
- function Ot() {
448
+ function bt() {
443
449
  if (!N && (N = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !N))
444
450
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
445
451
  return N(wt);
@@ -447,24 +453,18 @@ function Ot() {
447
453
  const y = [];
448
454
  for (let e = 0; e < 256; ++e)
449
455
  y.push((e + 256).toString(16).slice(1));
450
- function bt(e, t = 0) {
456
+ function Ot(e, t = 0) {
451
457
  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]];
452
458
  }
453
- const kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
459
+ const kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), de = {
454
460
  randomUUID: kt
455
461
  };
456
462
  function St(e, t, n) {
457
- if (ue.randomUUID && !t && !e)
458
- return ue.randomUUID();
463
+ if (de.randomUUID && !t && !e)
464
+ return de.randomUUID();
459
465
  e = e || {};
460
- const i = e.random || (e.rng || Ot)();
461
- if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
462
- n = n || 0;
463
- for (let s = 0; s < 16; ++s)
464
- t[n + s] = i[s];
465
- return t;
466
- }
467
- return bt(i);
466
+ const s = e.random || (e.rng || bt)();
467
+ return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Ot(s);
468
468
  }
469
469
  function Nn(e) {
470
470
  return e.replace(/\n/g, "<br>");
@@ -482,7 +482,7 @@ function Lt(e, t = 1) {
482
482
  function Kn() {
483
483
  return St();
484
484
  }
485
- const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", It = {
485
+ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", It = {
486
486
  props: {
487
487
  modelValue: {
488
488
  type: null,
@@ -560,14 +560,14 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
560
560
  optionsDescriptors() {
561
561
  return this.allOptions.map((e, t) => {
562
562
  var l, a;
563
- const n = this.formatter(e), i = (l = this.subtitleFormatter) == null ? void 0 : l.call(this, e), s = n ? n.trim().toLowerCase() : "", o = i ? i.trim().toLowerCase() : "", r = [];
563
+ 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 = [];
564
564
  return this.searchFields ? this.searchFields.forEach((p) => {
565
565
  e[p] && r.push(String(e[p]).toLowerCase());
566
- }) : (r.push(s), o && r.push(o)), {
566
+ }) : (r.push(i), o && r.push(o)), {
567
567
  // eslint-disable-next-line vue/no-use-computed-property-like-method
568
568
  key: ((a = this.effectiveKeyExtractor) == null ? void 0 : a.call(this, e)) ?? String(t),
569
569
  title: n,
570
- subtitle: i,
570
+ subtitle: s,
571
571
  searchContent: r.join(""),
572
572
  ref: e
573
573
  };
@@ -578,25 +578,24 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
578
578
  if (this.isSearching) {
579
579
  const t = this.searchText.trim().toLowerCase();
580
580
  if (t.length) {
581
- e = e.filter((s) => s.searchContent.includes(t));
582
- const n = Je(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(`(${n})`, "ig");
583
- e = e.map((s) => {
581
+ e = e.filter((i) => i.searchContent.includes(t));
582
+ const n = Qe(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), s = new RegExp(`(${n})`, "ig");
583
+ e = e.map((i) => {
584
584
  var o;
585
585
  return {
586
- ...s,
587
- title: s.title.replace(i, "<mark>$1</mark>"),
588
- subtitle: (o = s.subtitle) == null ? void 0 : o.replace(i, "<mark>$1</mark>")
586
+ ...i,
587
+ title: i.title.replace(s, "<mark>$1</mark>"),
588
+ subtitle: (o = i.subtitle) == null ? void 0 : o.replace(s, "<mark>$1</mark>")
589
589
  };
590
590
  }), this.shouldShowCreateOption && (e.find((o) => o.searchContent === t) !== void 0 || e.push({
591
- key: he,
591
+ key: ue,
592
592
  title: "Create <strong>" + this.searchText.trim() + "</strong>..."
593
593
  }));
594
594
  }
595
- } else
596
- this.nullTitle && e.unshift({
597
- key: D,
598
- title: this.nullTitle
599
- });
595
+ } else this.nullTitle && e.unshift({
596
+ key: D,
597
+ title: this.nullTitle
598
+ });
600
599
  return e;
601
600
  }
602
601
  },
@@ -629,7 +628,7 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
629
628
  "update:modelValue",
630
629
  this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
631
630
  );
632
- }), this.remoteSearch && this.$watch("searchText", Xe(this.reloadOptionsIfSearching, 250));
631
+ }), this.remoteSearch && this.$watch("searchText", ze(this.reloadOptionsIfSearching, 250));
633
632
  },
634
633
  methods: {
635
634
  async loadRemoteOptions() {
@@ -662,8 +661,7 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
662
661
  if (e.key == "Enter") {
663
662
  e.preventDefault();
664
663
  const t = this.effectiveOptions.find((n) => n.key == this.highlightedOptionKey);
665
- if (t)
666
- return this.selectOption(t);
664
+ if (t) return this.selectOption(t);
667
665
  }
668
666
  if (e.key === "Delete" || e.key === "Backspace") {
669
667
  this.searchText.length > 1 && (this.isSearching = !0);
@@ -684,11 +682,11 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
684
682
  return this.effectiveKeyExtractor ? this.effectiveKeyExtractor(this.selectedOption) : ((t = this.getOptionDescriptor(e)) == null ? void 0 : t.key) ?? "";
685
683
  },
686
684
  getOptionDescriptor(e) {
687
- const t = this.effectiveOptions.find((s) => s.ref === e);
685
+ const t = this.effectiveOptions.find((i) => i.ref === e);
688
686
  if (t)
689
687
  return t;
690
- const n = this.keyExtractor ? (s, o) => this.keyExtractor(s) === this.keyExtractor(o) : Ce, i = this.effectiveOptions.find((s) => n(s.ref, e));
691
- return i || null;
688
+ const n = this.keyExtractor ? (i, o) => this.keyExtractor(i) === this.keyExtractor(o) : Se, s = this.effectiveOptions.find((i) => n(i.ref, e));
689
+ return s || null;
692
690
  },
693
691
  handleInputBlurred() {
694
692
  this.debug || (!this.searchText.length && this.nullTitle && (this.selectedOption = null, this.selectedOptionTitle = null), this.shouldDisplayOptions = !1);
@@ -697,19 +695,18 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
697
695
  this.isLoaded || this.loadRemoteOptions(), this.optionsListId && this.$refs.optionsContainer.setAttribute("id", this.optionsListId), this.teleportOptionsContainer();
698
696
  },
699
697
  teleportOptionsContainer() {
700
- const e = this.$el.getBoundingClientRect(), t = e.y + e.height + 2, n = e.x, i = this.$refs.optionsContainer, s = window.getComputedStyle(this.$el);
701
- for (let o in s)
702
- /^(font|text)/.test(o) && (i.style[o] = s[o]);
703
- if (i.style.top = t + "px", i.style.left = n + "px", i.style.minWidth = e.width + "px", !s.maxHeight || s.maxHeight == "none") {
698
+ const e = this.$el.getBoundingClientRect(), t = e.y + e.height + 2, n = e.x, s = this.$refs.optionsContainer, i = window.getComputedStyle(this.$el);
699
+ for (let o in i)
700
+ /^(font|text)/.test(o) && (s.style[o] = i[o]);
701
+ if (s.style.top = t + "px", s.style.left = n + "px", s.style.minWidth = e.width + "px", !i.maxHeight || i.maxHeight == "none") {
704
702
  const o = window.innerHeight - t - 12;
705
- i.style.maxHeight = o + "px";
703
+ s.style.maxHeight = o + "px";
706
704
  }
707
- i.style.visibility = "visible", document.body.appendChild(i), setTimeout(this.highlightInitialOption, 0);
705
+ s.style.visibility = "visible", document.body.appendChild(s), setTimeout(this.highlightInitialOption, 0);
708
706
  },
709
707
  highlightInitialOption() {
710
- if (!this.isLoaded || !this.highlightedOptionKey)
711
- return;
712
- const e = this.effectiveOptions.findIndex((i) => i.key == this.highlightedOptionKey), t = this.$refs.optionsContainer, n = t.querySelectorAll(".option")[e];
708
+ if (!this.isLoaded || !this.highlightedOptionKey) return;
709
+ const e = this.effectiveOptions.findIndex((s) => s.key == this.highlightedOptionKey), t = this.$refs.optionsContainer, n = t.querySelectorAll(".option")[e];
713
710
  t.scrollTop = n.offsetTop;
714
711
  },
715
712
  handleOptionHover(e) {
@@ -718,22 +715,21 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
718
715
  incrementHighlightedOption(e) {
719
716
  const t = this.effectiveOptions.findIndex((o) => o.key == this.highlightedOptionKey);
720
717
  let n = t + e;
721
- if (n < 0 ? n = 0 : n >= this.effectiveOptions.length && (n = this.effectiveOptions.length - 1), t == n)
722
- return;
718
+ if (n < 0 ? n = 0 : n >= this.effectiveOptions.length && (n = this.effectiveOptions.length - 1), t == n) return;
723
719
  this.highlightedOptionKey = this.effectiveOptions[n].key;
724
- const i = this.$refs.optionsContainer, s = i.querySelectorAll(".option")[n];
725
- s.offsetTop < i.scrollTop ? i.scrollTop = s.offsetTop : s.offsetTop + s.offsetHeight > i.scrollTop + i.clientHeight && (i.scrollTop = s.offsetTop + s.offsetHeight - i.clientHeight);
720
+ const s = this.$refs.optionsContainer, i = s.querySelectorAll(".option")[n];
721
+ i.offsetTop < s.scrollTop ? s.scrollTop = i.offsetTop : i.offsetTop + i.offsetHeight > s.scrollTop + s.clientHeight && (s.scrollTop = i.offsetTop + i.offsetHeight - s.clientHeight);
726
722
  },
727
723
  selectOption(e) {
728
724
  var t;
729
725
  if (this.isSearching = !1, e.key == D)
730
726
  this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
731
- else if (e.key === he) {
727
+ else if (e.key === ue) {
732
728
  const n = this.searchText.trim();
733
729
  this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, (t = this.onCreateItem) == null || t.call(this, n);
734
730
  } else {
735
- const i = this.optionsDescriptors.find((s) => s.key == e.key).ref;
736
- this.selectedOption = i, this.selectedOptionTitle = this.formatter(i), this.searchText = this.selectedOptionTitle || "";
731
+ const s = this.optionsDescriptors.find((i) => i.key == e.key).ref;
732
+ this.selectedOption = s, this.selectedOptionTitle = this.formatter(s), this.searchText = this.selectedOptionTitle || "";
737
733
  }
738
734
  this.$refs.searchField.blur();
739
735
  },
@@ -755,8 +751,8 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
755
751
  key: 0,
756
752
  class: "no-results"
757
753
  };
758
- function _t(e, t, n, i, s, o) {
759
- const r = Oe("disabled");
754
+ function _t(e, t, n, s, i, o) {
755
+ const r = we("disabled");
760
756
  return d(), h("div", {
761
757
  class: k(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
762
758
  }, [
@@ -772,7 +768,7 @@ function _t(e, t, n, i, s, o) {
772
768
  required: n.required,
773
769
  "data-1p-ignore": ""
774
770
  }, null, 42, Ht), [
775
- [qe, e.searchText],
771
+ [Pe, e.searchText],
776
772
  [r, o.effectiveDisabled]
777
773
  ]),
778
774
  e.shouldDisplayOptions ? (d(), h("div", Dt, [
@@ -793,14 +789,14 @@ function _t(e, t, n, i, s, o) {
793
789
  key: 0,
794
790
  class: "subtitle",
795
791
  innerHTML: l.subtitle
796
- }, null, 8, Vt)) : b("", !0)
792
+ }, null, 8, Vt)) : O("", !0)
797
793
  ], 42, $t))), 128)),
798
- !o.effectiveOptions.length && e.searchText ? (d(), h("div", Ft, x(o.effectiveNoResultsText), 1)) : b("", !0)
794
+ !o.effectiveOptions.length && e.searchText ? (d(), h("div", Ft, x(o.effectiveNoResultsText), 1)) : O("", !0)
799
795
  ], 64)) : (d(), h("div", At, "Loading..."))
800
- ], 512)) : b("", !0)
796
+ ], 512)) : O("", !0)
801
797
  ], 2);
802
798
  }
803
- const Rt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
799
+ const Rt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ C({
804
800
  __name: "ez-smart-select",
805
801
  props: {
806
802
  modelValue: {},
@@ -811,26 +807,26 @@ const Rt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
811
807
  },
812
808
  emits: ["update:modelValue"],
813
809
  setup(e, { emit: t }) {
814
- const n = e, i = _(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, a]) => ({
810
+ const n = e, s = _(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, a]) => ({
815
811
  value: l,
816
812
  label: a
817
- }))), s = _(() => n.formatter ? (l) => {
813
+ }))), i = _(() => n.formatter ? (l) => {
818
814
  var a;
819
815
  return (a = n.formatter) == null ? void 0 : a.call(n, l.label);
820
- } : (l) => l.label), o = t, r = O(i.value.find((l) => l.value === n.modelValue) ?? null);
816
+ } : (l) => l.label), o = t, r = b(s.value.find((l) => l.value === n.modelValue) ?? null);
821
817
  return ce(
822
818
  () => n.modelValue,
823
819
  (l) => {
824
- r.value = i.value.find((a) => a.value === l) ?? null;
820
+ r.value = s.value.find((a) => a.value === l) ?? null;
825
821
  }
826
822
  ), ce(r, (l) => {
827
823
  var a;
828
- o("update:modelValue", l ? ((a = i.value.find((p) => Ce(p, l))) == null ? void 0 : a.value) ?? null : null);
824
+ o("update:modelValue", l ? ((a = s.value.find((p) => Se(p, l))) == null ? void 0 : a.value) ?? null : null);
829
825
  }), (l, a) => (d(), be(Rt, {
830
826
  modelValue: r.value,
831
827
  "onUpdate:modelValue": a[0] || (a[0] = (p) => r.value = p),
832
- options: i.value,
833
- formatter: s.value,
828
+ options: s.value,
829
+ formatter: i.value,
834
830
  "null-title": l.nullTitle
835
831
  }, null, 8, ["modelValue", "options", "formatter", "null-title"]));
836
832
  }
@@ -855,42 +851,42 @@ const Rt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
855
851
  function n() {
856
852
  t.onClick ? t.onClick() : t.disableClose || t.callback();
857
853
  }
858
- const i = O();
854
+ const s = b();
859
855
  return t.durationSecs !== null && L(() => {
860
856
  var o;
861
- const s = t.durationSecs ?? 5;
862
- (o = i.value) == null || o.animate([{ width: "0%" }, { width: "100%" }], {
863
- duration: s * 1e3,
857
+ const i = t.durationSecs ?? 5;
858
+ (o = s.value) == null || o.animate([{ width: "0%" }, { width: "100%" }], {
859
+ duration: i * 1e3,
864
860
  easing: "linear"
865
- }), setTimeout(() => t.callback(), s * 1e3);
866
- }), (s, o) => (d(), h("div", {
867
- class: k(["vf-toast", s.className]),
861
+ }), setTimeout(() => t.callback(), i * 1e3);
862
+ }), (i, o) => (d(), h("div", {
863
+ class: k(["vf-toast", i.className]),
868
864
  onClick: te(n, ["stop"])
869
865
  }, [
870
866
  w("div", Nt, [
871
- w("div", Kt, x(s.message), 1),
872
- s.disableClose ? b("", !0) : (d(), h("div", jt, "x"))
867
+ w("div", Kt, x(i.message), 1),
868
+ i.disableClose ? O("", !0) : (d(), h("div", jt, "x"))
873
869
  ]),
874
- s.durationSecs !== null ? (d(), h("div", Ut, [
870
+ i.durationSecs !== null ? (d(), h("div", Ut, [
875
871
  w("div", {
876
872
  ref_key: "progressInnerEl",
877
- ref: i,
873
+ ref: s,
878
874
  class: "inner"
879
875
  }, null, 512)
880
- ])) : b("", !0)
876
+ ])) : O("", !0)
881
877
  ], 2));
882
878
  }
883
879
  });
884
880
  function Un(e) {
885
- const t = ie(Wt, {
881
+ const t = se(Wt, {
886
882
  ...e,
887
883
  callback: () => P(t)
888
884
  });
889
885
  return () => P(t);
890
886
  }
891
887
  function Pt(e) {
892
- const t = Math.floor(Math.log(e) / Math.log(1024)), i = (e / Math.pow(1024, t)).toFixed(2), s = ["B", "KB", "MB", "GB", "TB"][t];
893
- return `${i} ${s}`;
888
+ 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];
889
+ return `${s} ${i}`;
894
890
  }
895
891
  function qt(e) {
896
892
  return e != null && String(e).length ? e : "-";
@@ -905,10 +901,10 @@ function Yt(e) {
905
901
  return e && xt(e);
906
902
  }
907
903
  function Zt(e) {
908
- return e ? Ye(e) : null;
904
+ return e ? Xe(e) : null;
909
905
  }
910
906
  function Gt(e) {
911
- return e ? Ze(e) : null;
907
+ return e ? Ye(e) : null;
912
908
  }
913
909
  function Qt(e) {
914
910
  return e ? e.toUpperCase() : null;
@@ -919,7 +915,7 @@ function Jt(e) {
919
915
  function en(e, t = 1) {
920
916
  return Lt(e, t);
921
917
  }
922
- const fe = {
918
+ const he = {
923
919
  bytes: Pt,
924
920
  dash: qt,
925
921
  dashZeros: zt,
@@ -931,34 +927,34 @@ const fe = {
931
927
  desnake: Jt,
932
928
  usCurrency: en
933
929
  }, Wn = (e) => ({
934
- ...fe,
935
- ...e(fe)
930
+ ...he,
931
+ ...e(he)
936
932
  });
937
933
  function Pn(e, t, n) {
938
- const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
939
- return i === -1 ? !1 : (e.splice(i, 1, n), !0);
934
+ const s = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
935
+ return s === -1 ? !1 : (e.splice(s, 1, n), !0);
940
936
  }
941
937
  function qn(e, t) {
942
938
  const n = document.createElement("div");
943
939
  n.classList.add("vf-overlay"), n.addEventListener("click", m), document.body.appendChild(n);
944
- const i = document.createElement("div");
945
- i.classList.add("vf-context-menu"), i.style.position = "absolute", n.appendChild(i);
946
- const s = e.currentTarget;
947
- s.style.userSelect = "none", s.classList.add("context-menu-active"), t.targetClass && s.classList.add(t.targetClass), t.class && i.classList.add(t.class), t.items.forEach((f) => {
940
+ const s = document.createElement("div");
941
+ s.classList.add("vf-context-menu"), s.style.position = "absolute", n.appendChild(s);
942
+ const i = e.currentTarget;
943
+ 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((f) => {
948
944
  if (f == "-") {
949
945
  const c = document.createElement("div");
950
- c.classList.add("separator"), i.appendChild(c);
946
+ c.classList.add("separator"), s.appendChild(c);
951
947
  return;
952
948
  }
953
949
  const u = document.createElement("div");
954
- u.classList.add("item"), u.style.userSelect = "none", u.innerText = f.title, i.appendChild(u), f.class && u.classList.add(f.class), f.shouldConfirm ? u.addEventListener("click", (c) => v(c, u, f.handler)) : u.addEventListener("click", () => f.handler());
950
+ u.classList.add("item"), u.style.userSelect = "none", u.innerText = f.title, s.appendChild(u), f.class && u.classList.add(f.class), f.shouldConfirm ? u.addEventListener("click", (c) => v(c, u, f.handler)) : u.addEventListener("click", () => f.handler());
955
951
  });
956
- const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, a = i.offsetWidth, p = o < a ? e.clientX - a - 1 : e.clientX + 1, g = r < l ? e.clientY - l - 1 : e.clientY + 1;
957
- i.style.left = p + "px", i.style.top = g + "px", setTimeout(() => {
958
- i.style.width = i.offsetWidth + "px";
952
+ const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = s.offsetHeight, a = s.offsetWidth, p = o < a ? e.clientX - a - 1 : e.clientX + 1, g = r < l ? e.clientY - l - 1 : e.clientY + 1;
953
+ s.style.left = p + "px", s.style.top = g + "px", setTimeout(() => {
954
+ s.style.width = s.offsetWidth + "px";
959
955
  }, 50);
960
956
  function m() {
961
- t.targetClass && s.classList.remove(t.targetClass), s.classList.remove("context-menu-active"), s.style.userSelect = "", n.remove();
957
+ t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
962
958
  }
963
959
  function v(f, u, c) {
964
960
  if (u.classList.contains("pending-confirm"))
@@ -976,55 +972,54 @@ function nn(e) {
976
972
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
977
973
  }
978
974
  function Xn(e, t) {
979
- return e != null ? Ge(e) : t;
975
+ return e != null ? Ze(e) : t;
980
976
  }
981
977
  function Yn(e, t) {
982
978
  const n = { ...e };
983
- for (const i of t)
984
- n[i] === "" && (n[i] = null);
979
+ for (const s of t)
980
+ n[s] === "" && (n[s] = null);
985
981
  return n;
986
982
  }
987
983
  function Zn(e) {
988
- et({
984
+ Je({
989
985
  ...e,
990
986
  onError(t, n) {
991
- var s;
992
- tt(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new z(t.body.error));
993
- const i = (s = e.onError) == null ? void 0 : s.call(e, t, n);
994
- return i !== void 0 ? i : t;
987
+ var i;
988
+ et(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new z(t.body.error));
989
+ const s = (i = e.onError) == null ? void 0 : i.call(e, t, n);
990
+ return s !== void 0 ? s : t;
995
991
  }
996
992
  });
997
993
  }
998
994
  const le = Symbol("HookState");
999
995
  function Gn(e, t) {
1000
996
  const n = t ?? ee();
1001
- L(() => sn(n, e), n), ke(() => on(n), n), Se(() => pe(n), n), ne(() => pe(n), n);
997
+ L(() => sn(n, e), n), Oe(() => on(n), n), ke(() => fe(n), n), ne(() => fe(n), n);
1002
998
  }
1003
999
  function sn(e, t) {
1004
1000
  const n = {};
1005
1001
  if (t.elScrolledToBottom && (n.el = new V(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1006
- const i = De(e.vnode.el);
1007
- i ? n.ancestor = new V(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1002
+ const s = He(e.vnode.el);
1003
+ s ? n.ancestor = new V(s, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1008
1004
  }
1009
1005
  t.windowScrolledToBottom && (n.window = new V(window, t.windowScrolledToBottom)), e[le] = n;
1010
1006
  }
1011
1007
  function on(e) {
1012
- var n, i, s;
1008
+ var n, s, i;
1013
1009
  const t = e[le];
1014
- (n = t == null ? void 0 : t.el) == null || n.install(), (i = t == null ? void 0 : t.ancestor) == null || i.install(), (s = t == null ? void 0 : t.window) == null || s.install();
1010
+ (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();
1015
1011
  }
1016
- function pe(e) {
1017
- var n, i, s;
1012
+ function fe(e) {
1013
+ var n, s, i;
1018
1014
  const t = e[le];
1019
- (n = t == null ? void 0 : t.el) == null || n.uninstall(), (i = t == null ? void 0 : t.ancestor) == null || i.uninstall(), (s = t == null ? void 0 : t.window) == null || s.uninstall();
1015
+ (n = t == null ? void 0 : t.el) == null || n.uninstall(), (s = t == null ? void 0 : t.ancestor) == null || s.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
1020
1016
  }
1021
1017
  const Z = ["auto", "scroll"];
1022
- function De(e) {
1018
+ function He(e) {
1023
1019
  const t = e.parentElement;
1024
- if (!t)
1025
- return null;
1020
+ if (!t) return null;
1026
1021
  const n = window.getComputedStyle(t);
1027
- return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t : De(t);
1022
+ return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t : He(t);
1028
1023
  }
1029
1024
  class V {
1030
1025
  constructor(t, n) {
@@ -1043,16 +1038,15 @@ class V {
1043
1038
  }
1044
1039
  }
1045
1040
  function Qn(e) {
1046
- L(() => window.addEventListener("resize", e)), ke(() => window.addEventListener("resize", e)), Se(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1041
+ L(() => window.addEventListener("resize", e)), Oe(() => window.addEventListener("resize", e)), ke(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1047
1042
  }
1048
1043
  const ln = {
1049
- mounted: ve,
1050
- updated: ve
1051
- }, me = Symbol("HasAutoFocused");
1052
- function ve(e, t) {
1053
- if (t.value === void 0 && e[me] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue)
1054
- return;
1055
- e[me] = !0;
1044
+ mounted: me,
1045
+ updated: me
1046
+ }, pe = Symbol("HasAutoFocused");
1047
+ function me(e, t) {
1048
+ if (t.value === void 0 && e[pe] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
1049
+ e[pe] = !0;
1056
1050
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
1057
1051
  setTimeout(() => n.focus(), 10);
1058
1052
  }
@@ -1062,23 +1056,23 @@ const rn = {
1062
1056
  function an(e, t) {
1063
1057
  e.addEventListener("click", (n) => {
1064
1058
  var r, l;
1065
- const i = Date.now(), s = ((r = t.value) == null ? void 0 : r.text) !== void 0 ? t.value.text : "Confirm";
1059
+ const s = Date.now(), i = ((r = t.value) == null ? void 0 : r.text) !== void 0 ? t.value.text : "Confirm";
1066
1060
  if (e[A]) {
1067
- if (i - e[A].initTime < 300)
1061
+ if (s - e[A].initTime < 300)
1068
1062
  return;
1069
1063
  e[A].resetHandler(), e.dispatchEvent(new Event("confirm"));
1070
1064
  return;
1071
1065
  }
1072
1066
  n.preventDefault(), n.stopImmediatePropagation();
1073
1067
  const o = {
1074
- initTime: i,
1068
+ initTime: s,
1075
1069
  preconfirmHtml: e.innerHTML,
1076
1070
  resetHandler: () => {
1077
1071
  var a;
1078
- s && (e.innerHTML = o.preconfirmHtml), (a = t.value) != null && a.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", o.resetHandler), delete e[A];
1072
+ i && (e.innerHTML = o.preconfirmHtml), (a = t.value) != null && a.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", o.resetHandler), delete e[A];
1079
1073
  }
1080
1074
  };
1081
- e[A] = o, s && (e.innerHTML = s), (l = t.value) != null && l.class && e.classList.add(t.value.class), e.addEventListener("mouseout", o.resetHandler);
1075
+ e[A] = o, i && (e.innerHTML = i), (l = t.value) != null && l.class && e.classList.add(t.value.class), e.addEventListener("mouseout", o.resetHandler);
1082
1076
  });
1083
1077
  }
1084
1078
  const cn = {
@@ -1093,10 +1087,10 @@ function dn(e) {
1093
1087
  });
1094
1088
  }
1095
1089
  const un = {
1096
- beforeMount: ye,
1097
- updated: ye
1090
+ beforeMount: ve,
1091
+ updated: ve
1098
1092
  };
1099
- function ye(e, t) {
1093
+ function ve(e, t) {
1100
1094
  t.value == t.oldValue && e.innerHTML.length || (e.innerText = hn(e, t));
1101
1095
  }
1102
1096
  function hn(e, t) {
@@ -1104,7 +1098,7 @@ function hn(e, t) {
1104
1098
  if (!t.value)
1105
1099
  return ((a = e.attributes.getNamedItem("placeholder")) == null ? void 0 : a.value) ?? "";
1106
1100
  let n = "";
1107
- const i = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), s = e.attributes.getNamedItem("local") !== null ? i.replace(/Z$/, "") : i.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(s);
1101
+ 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);
1108
1102
  e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
1109
1103
  let r = (p = e.attributes.getNamedItem("format")) == null ? void 0 : p.value;
1110
1104
  if (!r && e.attributes.getNamedItem("relative-date") !== null) {
@@ -1116,51 +1110,49 @@ function hn(e, t) {
1116
1110
  return n && (l = n + " " + l), l;
1117
1111
  }
1118
1112
  const fn = {
1119
- beforeMount: ge,
1120
- updated: ge,
1113
+ beforeMount: ye,
1114
+ updated: ye,
1121
1115
  unmounted: pn
1122
1116
  };
1123
- function ge(e, t) {
1117
+ function ye(e, t) {
1124
1118
  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");
1125
1119
  }
1126
1120
  function pn(e) {
1127
1121
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1128
1122
  }
1129
1123
  const mn = {
1130
- beforeMount: Ee,
1131
- updated: Ee,
1132
- unmounted: $e
1124
+ beforeMount: ge,
1125
+ updated: ge,
1126
+ unmounted: Ae
1133
1127
  }, R = Symbol("HasAutoFocused"), re = [];
1134
1128
  function vn() {
1135
- re.forEach(Ae);
1129
+ re.forEach(De);
1136
1130
  }
1137
1131
  setInterval(vn, 1e3);
1138
- function Ee(e, t) {
1132
+ function ge(e, t) {
1139
1133
  var r;
1140
- if (t.value == t.oldValue)
1141
- return;
1142
- if (!t.value)
1143
- return $e(e);
1144
- const n = new Date(t.value), i = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
1134
+ if (t.value == t.oldValue) return;
1135
+ if (!t.value) return Ae(e);
1136
+ 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;
1145
1137
  e[R] || re.push(e), e[R] = {
1146
- startTs: s,
1138
+ startTs: i,
1147
1139
  includeSeconds: o
1148
- }, Ae(e);
1140
+ }, De(e);
1149
1141
  }
1150
- function Ae(e) {
1142
+ function De(e) {
1151
1143
  const t = e[R], n = Math.round((Date.now() - t.startTs) / 1e3);
1152
1144
  e.innerText = yn(n, t.includeSeconds);
1153
1145
  }
1154
- function $e(e) {
1155
- e[R] && (Qe(re, e), delete e[R]), e.innerText = "-";
1146
+ function Ae(e) {
1147
+ e[R] && (Ge(re, e), delete e[R]), e.innerText = "-";
1156
1148
  }
1157
1149
  function yn(e, t) {
1158
- const n = [], i = Math.floor(e / 86400);
1159
- i && n.push(i + "d"), e -= i * 86400;
1160
- const s = Math.floor(e / 3600);
1161
- (i || s) && n.push(s + "h"), e -= s * 3600;
1150
+ const n = [], s = Math.floor(e / 86400);
1151
+ s && n.push(s + "d"), e -= s * 86400;
1152
+ const i = Math.floor(e / 3600);
1153
+ (s || i) && n.push(i + "h"), e -= i * 3600;
1162
1154
  const o = Math.floor(e / 60);
1163
- return (i || s || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
1155
+ return (s || i || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
1164
1156
  }
1165
1157
  const $ = Symbol("InfiniteScrollHandler"), gn = {
1166
1158
  mounted(e, t) {
@@ -1175,30 +1167,30 @@ const $ = Symbol("InfiniteScrollHandler"), gn = {
1175
1167
  (t = e[$]) == null || t.uninstall(), delete e[$];
1176
1168
  }
1177
1169
  }, En = {
1178
- beforeMount: Te,
1179
- updated: Te
1170
+ beforeMount: Ee,
1171
+ updated: Ee
1180
1172
  };
1181
- function Te(e, t) {
1173
+ function Ee(e, t) {
1182
1174
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1183
1175
  }
1184
1176
  const Tn = {
1185
- mounted: we,
1186
- updated: we,
1187
- unmounted: Be
1177
+ mounted: Te,
1178
+ updated: Te,
1179
+ unmounted: $e
1188
1180
  }, F = Symbol("TooltipState");
1189
- function we(e, t) {
1190
- var i;
1191
- let n = ((i = e.attributes.getNamedItem("tip")) == null ? void 0 : i.value) ?? t.value;
1181
+ function Te(e, t) {
1182
+ var s;
1183
+ let n = ((s = e.attributes.getNamedItem("tip")) == null ? void 0 : s.value) ?? t.value;
1192
1184
  if (t.value || (n = null), n) {
1193
- const s = {
1185
+ const i = {
1194
1186
  content: n,
1195
1187
  html: e.getAttribute("html") !== null
1196
1188
  };
1197
- e[F] ? e[F].configure(s) : e[F] = new wn(e, s);
1189
+ e[F] ? e[F].configure(i) : e[F] = new wn(e, i);
1198
1190
  } else
1199
- Be(e);
1191
+ $e(e);
1200
1192
  }
1201
- function Be(e) {
1193
+ function $e(e) {
1202
1194
  var t;
1203
1195
  (t = e[F]) == null || t.destroy(), delete e[F];
1204
1196
  }
@@ -1238,9 +1230,9 @@ class wn {
1238
1230
  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);
1239
1231
  }
1240
1232
  handleMouseMove(t) {
1241
- const n = this.tipEl.offsetWidth, i = this.tipEl.offsetHeight, s = window.innerWidth, o = window.innerHeight;
1233
+ const n = this.tipEl.offsetWidth, s = this.tipEl.offsetHeight, i = window.innerWidth, o = window.innerHeight;
1242
1234
  let r = t.pageX + 10, l = t.pageY + 20;
1243
- r + n > s && (r = t.pageX - 5 - n), l + i > o && (l = t.pageY - 5 - i), this.tipEl.style.left = r + "px", this.tipEl.style.top = l + "px", this.lastMoveEvt = t;
1235
+ r + n > i && (r = t.pageX - 5 - n), l + s > o && (l = t.pageY - 5 - s), this.tipEl.style.left = r + "px", this.tipEl.style.top = l + "px", this.lastMoveEvt = t;
1244
1236
  }
1245
1237
  checkMoveEvent() {
1246
1238
  var t;
@@ -1250,11 +1242,11 @@ class wn {
1250
1242
  this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
1251
1243
  }
1252
1244
  }
1253
- function On(e) {
1245
+ function bn(e) {
1254
1246
  e.directive("autofocus", ln), e.directive("confirm-button", rn), e.directive("date-input", cn), e.directive("datetime", un), e.directive("disabled", fn), e.directive("duration", mn), e.directive("infinite-scroll", gn), e.directive("readonly", En), e.directive("tooltip", Tn);
1255
1247
  }
1256
1248
  function Jn(e) {
1257
- On(e);
1249
+ bn(e);
1258
1250
  }
1259
1251
  export {
1260
1252
  In as OverlayContainer,
@@ -1267,13 +1259,13 @@ export {
1267
1259
  Xn as cloneProp,
1268
1260
  Bn as configureVf,
1269
1261
  Wn as createFilters,
1270
- ie as createOverlayInjection,
1262
+ se as createOverlayInjection,
1271
1263
  Ct as desnakeCase,
1272
- dt as dismissOverlayInjectionById,
1264
+ ct as dismissOverlayInjectionById,
1273
1265
  Hn as dismissOverlayInjectionByInstance,
1274
- Le as dismissOverlayInjectionByInternalInstance,
1275
- ct as dismissOverlayInjectionByVnode,
1276
- ni as escapeHtml,
1266
+ xe as dismissOverlayInjectionByInternalInstance,
1267
+ at as dismissOverlayInjectionByVnode,
1268
+ ns as escapeHtml,
1277
1269
  ut as formatError,
1278
1270
  nn as formatNumber,
1279
1271
  xt as formatPhone,
@@ -1287,10 +1279,10 @@ export {
1287
1279
  ft as maskForm,
1288
1280
  Nn as nl2br,
1289
1281
  Yn as nullifyEmptyInputs,
1290
- se as presentOverlay,
1282
+ ie as presentOverlay,
1291
1283
  P as removeOverlayInjection,
1292
1284
  Pn as replaceElement,
1293
- de as showAlert,
1285
+ dt as showAlert,
1294
1286
  Dn as showConfirm,
1295
1287
  An as showConfirmDestroy,
1296
1288
  qn as showContextMenu,
@@ -1300,8 +1292,8 @@ export {
1300
1292
  zn as sleepSecs,
1301
1293
  oe as toError,
1302
1294
  Rn as unmaskComponent,
1303
- Me as unmaskEl,
1304
- Ie as unmaskForm,
1295
+ Le as unmaskEl,
1296
+ Me as unmaskForm,
1305
1297
  Gn as useInfiniteScroll,
1306
1298
  Qn as useResizeWatcher,
1307
1299
  Kn as uuid