@signal24/vue-foundation 4.30.4 → 4.30.7

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,15 +1,15 @@
1
- import { defineComponent as q, ref as N, computed as O, watch as H, onMounted as z, createElementBlock as I, withDirectives as fe, openBlock as S, createElementVNode as U, toDisplayString as J, createCommentVNode as W, Fragment as he, renderList as pe, vModelSelect as _t, getCurrentInstance as Ne, withModifiers as Le, normalizeStyle as Wt, normalizeClass as P, renderSlot as K, reactive as Pt, h as ve, Teleport as jt, markRaw as Ut, onBeforeUnmount as me, resolveDirective as zt, createBlock as lt, createSlots as qt, withCtx as Te, createTextVNode as te, onUpdated as Jt, vModelText as Kt, onActivated as ut, onDeactivated as ct } from "vue";
2
- import { compact as dt, cloneDeep as Yt, uniq as Xt, groupBy as Zt, isEqual as Me, debounce as Gt, startCase as Qt, upperFirst as en, remove as tn, last as nn } from "lodash";
3
- import { configureOpenApiClient as on, OpenApiError as rn } from "@signal24/openapi-client-codegen";
4
- import { escapeHtml as Si } from "@vue/shared";
5
- import { format as X, addDays as an, parse as sn } from "date-fns";
6
- const ln = {
1
+ import { defineComponent as q, ref as N, computed as O, watch as $, onMounted as z, createElementBlock as I, withDirectives as fe, openBlock as S, createElementVNode as U, toDisplayString as J, createCommentVNode as W, Fragment as he, renderList as pe, vModelSelect as _t, getCurrentInstance as Le, withModifiers as ve, normalizeStyle as Wt, normalizeClass as j, renderSlot as K, reactive as jt, h as me, Teleport as Pt, markRaw as Ut, onBeforeUnmount as ye, resolveDirective as zt, createBlock as lt, createSlots as qt, withCtx as Ie, createTextVNode as te, onUpdated as Jt, vModelText as Kt, onActivated as ut, onDeactivated as ct } from "vue";
2
+ import { compact as dt, cloneDeep as Yt, isMatch as Xt, isEqual as ge, uniq as Zt, groupBy as Gt, debounce as Qt, startCase as en, upperFirst as tn, remove as nn, last as on } from "lodash";
3
+ import { configureOpenApiClient as rn, OpenApiError as an } from "@signal24/openapi-client-codegen";
4
+ import { escapeHtml as Fr } from "@vue/shared";
5
+ import { format as X, addDays as sn, parse as ln } from "date-fns";
6
+ const un = {
7
7
  key: 0,
8
8
  disabled: ""
9
- }, un = {
9
+ }, cn = {
10
10
  key: 0,
11
11
  value: null
12
- }, cn = ["value"], Xo = /* @__PURE__ */ q({
12
+ }, dn = ["value"], er = /* @__PURE__ */ q({
13
13
  __name: "vf-ajax-select",
14
14
  props: {
15
15
  modelValue: {},
@@ -21,29 +21,29 @@ const ln = {
21
21
  },
22
22
  emits: ["update:modelValue"],
23
23
  setup(e, { emit: t }) {
24
- const o = e, a = t, p = N(null), l = O(() => p.value ? p.value.map((v) => {
25
- const c = v;
26
- return o.preprocesor ? o.preprocesor(c) : o.displayKey ? c[o.displayKey] : "";
27
- }) : null), y = N(o.modelValue ?? null);
28
- H(() => o.loadFn, g), H(
24
+ const o = e, i = t, c = N(null), l = O(() => c.value ? c.value.map((v) => {
25
+ const d = v;
26
+ return o.preprocesor ? o.preprocesor(d) : o.displayKey ? d[o.displayKey] : "";
27
+ }) : null), g = N(o.modelValue ?? null);
28
+ $(() => o.loadFn, y), $(
29
29
  () => o.modelValue,
30
- () => y.value = o.modelValue
31
- ), H(y, () => a("update:modelValue", y.value));
32
- async function g() {
33
- p.value = await o.loadFn();
30
+ () => g.value = o.modelValue
31
+ ), $(g, () => i("update:modelValue", g.value));
32
+ async function y() {
33
+ c.value = await o.loadFn();
34
34
  }
35
- return z(g), (E, v) => l.value ? fe((S(), I("select", {
35
+ return z(y), (E, v) => l.value ? fe((S(), I("select", {
36
36
  key: 1,
37
- "onUpdate:modelValue": v[0] || (v[0] = (c) => y.value = c)
37
+ "onUpdate:modelValue": v[0] || (v[0] = (d) => g.value = d)
38
38
  }, [
39
- o.nullText ? (S(), I("option", un, J(o.nullText), 1)) : W("", !0),
40
- (S(!0), I(he, null, pe(l.value, (c, n) => (S(), I("option", {
39
+ o.nullText ? (S(), I("option", cn, J(o.nullText), 1)) : W("", !0),
40
+ (S(!0), I(he, null, pe(l.value, (d, n) => (S(), I("option", {
41
41
  key: n,
42
- value: p.value?.[n]
43
- }, J(c), 9, cn))), 128))
42
+ value: c.value?.[n]
43
+ }, J(d), 9, dn))), 128))
44
44
  ], 512)), [
45
- [_t, y.value]
46
- ]) : (S(), I("select", ln, [
45
+ [_t, g.value]
46
+ ]) : (S(), I("select", un, [
47
47
  U("option", null, J(o.loadingText || "Loading..."), 1)
48
48
  ]));
49
49
  }
@@ -54,129 +54,129 @@ const ln = {
54
54
  defaultTimeFormat: "H:mm",
55
55
  defaultCurrencyDivisor: 1
56
56
  };
57
- function Zo(e) {
57
+ function tr(e) {
58
58
  Object.assign(D, e);
59
59
  }
60
- const dn = /* @__PURE__ */ q({
60
+ const fn = /* @__PURE__ */ q({
61
61
  __name: "overlay-anchor",
62
62
  props: {
63
63
  overlayId: {},
64
64
  anchor: {}
65
65
  },
66
66
  setup(e) {
67
- const t = e, o = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, a = N({ visibility: "hidden", top: "0", left: "0" }), p = N([]), l = Ne();
68
- z(y);
69
- function y() {
67
+ const t = e, o = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, i = N({ visibility: "hidden", top: "0", left: "0" }), c = N([]), l = Le();
68
+ z(g);
69
+ function g() {
70
70
  if (!l) return;
71
- const v = l.vnode.el, { styles: c, classes: n } = g(v, o);
72
- a.value = c, p.value = n;
71
+ const v = l.vnode.el, { styles: d, classes: n } = y(v, o);
72
+ i.value = d, c.value = n;
73
73
  }
74
- function g(v, c) {
75
- const n = t.anchor instanceof HTMLElement ? {} : t.anchor, r = c.getBoundingClientRect(), i = v.getBoundingClientRect();
76
- n.matchWidth && (i.width = r.width), n.matchHeight && (i.height = r.height);
74
+ function y(v, d) {
75
+ const n = t.anchor instanceof HTMLElement ? {} : t.anchor, a = d.getBoundingClientRect(), r = v.getBoundingClientRect();
76
+ n.matchWidth && (r.width = a.width), n.matchHeight && (r.height = a.height);
77
77
  const s = n.class ? Array.isArray(n.class) ? n.class : [n.class] : [];
78
- let u, h;
78
+ let u, p;
79
79
  if (n.y === "center")
80
- u = r.top + r.height / 2 - i.height / 2, s.push("anchored-center-y");
80
+ u = a.top + a.height / 2 - r.height / 2, s.push("anchored-center-y");
81
81
  else {
82
- const m = (r.bottom + i.height < window.innerHeight || n.y === "below") && n.y !== "above";
83
- u = m ? r.bottom : r.top - i.height, s.push(m ? "anchored-top" : "anchored-bottom");
82
+ const m = (a.bottom + r.height < window.innerHeight || n.y === "below") && n.y !== "above";
83
+ u = m ? a.bottom : a.top - r.height, s.push(m ? "anchored-top" : "anchored-bottom");
84
84
  }
85
85
  if (n.x === "center")
86
- h = r.left + r.width / 2 - i.width / 2, s.push("anchored-center-x");
86
+ p = a.left + a.width / 2 - r.width / 2, s.push("anchored-center-x");
87
87
  else {
88
- const m = (r.left + i.width < window.innerWidth || n.x === "left") && n.x !== "right";
89
- h = m ? r.left : r.right - i.width, s.push(m ? "anchored-left" : "anchored-right");
88
+ const m = (a.left + r.width < window.innerWidth || n.x === "left") && n.x !== "right";
89
+ p = m ? a.left : a.right - r.width, s.push(m ? "anchored-left" : "anchored-right");
90
90
  }
91
91
  return {
92
92
  styles: {
93
93
  top: `${u}px`,
94
- left: `${h}px`,
95
- ...n.matchWidth ? { width: `${i.width}px` } : {},
96
- ...n.matchHeight ? { height: `${i.height}px` } : {}
94
+ left: `${p}px`,
95
+ ...n.matchWidth ? { width: `${r.width}px` } : {},
96
+ ...n.matchHeight ? { height: `${r.height}px` } : {}
97
97
  },
98
98
  classes: s
99
99
  };
100
100
  }
101
101
  function E() {
102
- window.removeEventListener("click", E), pn(t.overlayId);
102
+ window.removeEventListener("click", E), vn(t.overlayId);
103
103
  }
104
104
  return z(() => {
105
105
  setTimeout(() => {
106
106
  window.addEventListener("click", E);
107
107
  }, 10);
108
- }), (v, c) => (S(), I("div", {
109
- class: P(["vf-overlay-anchor", p.value]),
110
- style: Wt(a.value),
111
- onClick: Le(E, ["stop"])
108
+ }), (v, d) => (S(), I("div", {
109
+ class: j(["vf-overlay-anchor", c.value]),
110
+ style: Wt(i.value),
111
+ onClick: ve(E, ["stop"])
112
112
  }, [
113
113
  K(v.$slots, "default")
114
114
  ], 6));
115
115
  }
116
116
  });
117
- let fn = 0;
118
- const j = Pt([]);
119
- H(j, () => {
120
- D.onOverlaysChanged?.(j.length);
117
+ let hn = 0;
118
+ const P = jt([]);
119
+ $(P, () => {
120
+ D.onOverlaysChanged?.(P.length);
121
121
  });
122
- const Go = q({
122
+ const nr = q({
123
123
  setup() {
124
- return () => ve("div", [
125
- pe(j, (e) => ve(jt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
124
+ return () => me("div", [
125
+ pe(P, (e) => me(Pt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
126
  ]);
127
127
  }
128
128
  });
129
- function ge(e, t, o) {
130
- const a = document.getElementById("vf-overlay-target") ?? document.createElement("div");
131
- a.id = "vf-overlay-target", a.removeAttribute("inert"), document.body.appendChild(a);
132
- const p = String(++fn), l = Ut(e), y = ve(l, t), g = o?.anchor ? ve(dn, { overlayId: p, anchor: o.anchor }, () => [y]) : void 0, E = {
133
- id: p,
129
+ function Ee(e, t, o) {
130
+ const i = document.getElementById("vf-overlay-target") ?? document.createElement("div");
131
+ i.id = "vf-overlay-target", i.removeAttribute("inert"), document.body.appendChild(i);
132
+ const c = String(++hn), l = Ut(e), g = me(l, t), y = o?.anchor ? me(fn, { overlayId: c, anchor: o.anchor }, () => [g]) : void 0, E = {
133
+ id: c,
134
134
  component: l,
135
135
  props: t,
136
136
  options: o ?? {},
137
- vnode: y,
138
- wrapperVnode: g
137
+ vnode: g,
138
+ wrapperVnode: y
139
139
  };
140
- return j.push(E), E;
140
+ return P.push(E), E;
141
141
  }
142
- function Qo(e) {
142
+ function or(e) {
143
143
  e.$ && ft(e.$);
144
144
  }
145
145
  function ft(e) {
146
146
  let t = e;
147
- for (; t && !hn(t.vnode); )
147
+ for (; t && !pn(t.vnode); )
148
148
  t = t.parent;
149
149
  }
150
- function hn(e) {
151
- const t = j.findIndex((o) => o.vnode.component === e.component);
152
- return t >= 0 ? (j[t].props.callback(), !0) : !1;
153
- }
154
150
  function pn(e) {
155
- const t = j.findIndex((o) => o.id === e);
156
- return t >= 0 ? (j[t].props.callback(), !0) : !1;
151
+ const t = P.findIndex((o) => o.vnode.component === e.component);
152
+ return t >= 0 ? (P[t].props.callback(), !0) : !1;
153
+ }
154
+ function vn(e) {
155
+ const t = P.findIndex((o) => o.id === e);
156
+ return t >= 0 ? (P[t].props.callback(), !0) : !1;
157
157
  }
158
- function re(e) {
159
- const t = j.indexOf(e);
160
- t >= 0 && j.splice(t, 1);
158
+ function ie(e) {
159
+ const t = P.indexOf(e);
160
+ t >= 0 && P.splice(t, 1);
161
161
  }
162
162
  async function Re(e, t, o) {
163
- return new Promise((a) => {
164
- let p = null;
165
- const y = { ...t, callback: async (g) => {
163
+ return new Promise((i) => {
164
+ let c = null;
165
+ const g = { ...t, callback: async (y) => {
166
166
  if (o?.onCallback) {
167
- const E = o.onCallback(g);
167
+ const E = o.onCallback(y);
168
168
  if (typeof E == "object" && "then" in E && typeof E.then == "function" && await E === !1)
169
169
  return;
170
170
  }
171
- re(p), a(g);
171
+ ie(c), i(y);
172
172
  } };
173
- p = ge(e, y, o);
173
+ c = Ee(e, g, o);
174
174
  });
175
175
  }
176
- async function vn(e, t) {
176
+ async function mn(e, t) {
177
177
  const o = e.vnode.component.props;
178
- for (const a in t)
179
- o[a] = t[a];
178
+ for (const i in t)
179
+ o[i] = t[i];
180
180
  }
181
181
  function se(e, t) {
182
182
  return typeof e == "object" && !(e instanceof Error) ? {
@@ -187,14 +187,14 @@ function se(e, t) {
187
187
  async function ht(e, t) {
188
188
  await Re(le, se(e, t));
189
189
  }
190
- async function ei(e, t) {
190
+ async function rr(e, t) {
191
191
  const o = se(e, t);
192
192
  return await Re(le, {
193
193
  ...o,
194
194
  shouldConfirm: !0
195
195
  }) === !0;
196
196
  }
197
- async function ti(e, t) {
197
+ async function ir(e, t) {
198
198
  const o = se(e, t);
199
199
  return await Re(le, {
200
200
  ...o,
@@ -202,18 +202,18 @@ async function ti(e, t) {
202
202
  classes: ["destructive", ...o.classes]
203
203
  }) === !0;
204
204
  }
205
- function ni(e, t) {
206
- const o = se(e, t), a = ge(le, {
205
+ function ar(e, t) {
206
+ const o = se(e, t), i = Ee(le, {
207
207
  ...o,
208
208
  isBare: !0,
209
209
  classes: ["wait", ...o.classes],
210
210
  callback: () => {
211
211
  }
212
212
  });
213
- return () => re(a);
213
+ return () => ie(i);
214
214
  }
215
- function oi(e, t) {
216
- const o = se(e, t), a = ge(le, {
215
+ function sr(e, t) {
216
+ const o = se(e, t), i = Ee(le, {
217
217
  ...o,
218
218
  isBare: !0,
219
219
  classes: ["wait", ...o.classes],
@@ -221,53 +221,53 @@ function oi(e, t) {
221
221
  }
222
222
  });
223
223
  return {
224
- update: (p) => {
225
- vn(a, { message: p });
224
+ update: (c) => {
225
+ mn(i, { message: c });
226
226
  },
227
- dismiss: () => re(a)
227
+ dismiss: () => ie(i)
228
228
  };
229
229
  }
230
- class ye extends Error {
230
+ class ke extends Error {
231
231
  constructor(t) {
232
232
  super(t), this.name = "UserError";
233
233
  }
234
234
  }
235
- function mn(e) {
236
- return e instanceof ye ? e.message : `An application error has occurred:
235
+ function gn(e) {
236
+ return e instanceof ke ? e.message : `An application error has occurred:
237
237
 
238
- ${Ee(e).message}
238
+ ${xe(e).message}
239
239
 
240
240
  Please refresh the page and try again. If this error persists, ${D.unhandledErrorSupportText}.`;
241
241
  }
242
- function Ee(e, t) {
243
- const o = gn(e) ? e : new Error(String(e));
244
- return t && (o.cause = Ee(t)), o;
242
+ function xe(e, t) {
243
+ const o = yn(e) ? e : new Error(String(e));
244
+ return t && (o.cause = xe(t)), o;
245
245
  }
246
- function gn(e) {
246
+ function yn(e) {
247
247
  return e instanceof Error || typeof e == "object" && e !== null && "message" in e && "name" in e;
248
248
  }
249
- async function ii(e, t) {
250
- const o = Ee(e, t?.cause);
251
- return o instanceof ye || D.errorHandler(o), ht({
249
+ async function lr(e, t) {
250
+ const o = xe(e, t?.cause);
251
+ return o instanceof ke || D.errorHandler(o), ht({
252
252
  title: t?.title,
253
253
  message: o,
254
254
  classes: t?.classes
255
255
  });
256
256
  }
257
- async function ri(e, t) {
258
- const o = Ee(e, t);
259
- o instanceof ye || D.errorHandler(o);
257
+ async function ur(e, t) {
258
+ const o = xe(e, t);
259
+ o instanceof ke || D.errorHandler(o);
260
260
  }
261
- const ne = Symbol("MaskState");
262
- function ai(e, t) {
263
- const o = e.$?.vnode.el, a = o.closest(".vf-modal");
264
- return yn(a ?? o, t);
261
+ const ne = /* @__PURE__ */ Symbol("MaskState");
262
+ function cr(e, t) {
263
+ const o = e.$?.vnode.el, i = o.closest(".vf-modal");
264
+ return En(i ?? o, t);
265
265
  }
266
- function si(e) {
266
+ function dr(e) {
267
267
  const t = e.$?.vnode.el, o = t.closest(".vf-modal");
268
268
  return pt(o ?? t);
269
269
  }
270
- function yn(e, t) {
270
+ function En(e, t) {
271
271
  if (!e[ne]) {
272
272
  const o = document.createElement("div");
273
273
  o.classList.add("vf-mask"), e.appendChild(o), e[ne] = { maskEl: o };
@@ -277,39 +277,39 @@ function yn(e, t) {
277
277
  function pt(e) {
278
278
  e[ne] && e.removeChild(e[ne].maskEl);
279
279
  }
280
- const Ce = Symbol("FormMaskState");
281
- function En(e, t, o) {
282
- const a = e instanceof Element ? e : mt(e);
283
- if (!a) return () => {
280
+ const Oe = /* @__PURE__ */ Symbol("FormMaskState");
281
+ function kn(e, t, o) {
282
+ const i = e instanceof Element ? e : mt(e);
283
+ if (!i) return () => {
284
284
  };
285
- a.classList.add("vf-masked");
286
- const p = t instanceof Element ? t : a.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
285
+ i.classList.add("vf-masked");
286
+ const c = t instanceof Element ? t : i.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
287
287
  let l;
288
- p && (l = p.tagName === "INPUT" ? p.value : p.innerHTML, p.setAttribute("disabled", "disabled"), p.innerText = o ?? "Please wait...");
289
- const g = [...a.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
290
- return g.forEach((E) => E.setAttribute("disabled", "disabled")), a[Ce] = {
291
- disabledElements: g,
292
- waitButton: p,
288
+ c && (l = c.tagName === "INPUT" ? c.value : c.innerHTML, c.setAttribute("disabled", "disabled"), c.innerText = o ?? "Please wait...");
289
+ const y = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
290
+ return y.forEach((E) => E.setAttribute("disabled", "disabled")), i[Oe] = {
291
+ disabledElements: y,
292
+ waitButton: c,
293
293
  buttonHtml: l
294
- }, () => vt(a);
294
+ }, () => vt(i);
295
295
  }
296
296
  function vt(e) {
297
297
  const t = e instanceof Element ? e : mt(e);
298
298
  if (!t) return;
299
- const o = t[Ce];
300
- o && (t.classList.remove("vf-masked"), o.disabledElements.forEach((a) => a.removeAttribute("disabled")), o.waitButton && (o.waitButton.innerHTML = o.buttonHtml, o.waitButton.removeAttribute("disabled")), delete t[Ce]);
299
+ const o = t[Oe];
300
+ o && (t.classList.remove("vf-masked"), o.disabledElements.forEach((i) => i.removeAttribute("disabled")), o.waitButton && (o.waitButton.innerHTML = o.buttonHtml, o.waitButton.removeAttribute("disabled")), delete t[Oe]);
301
301
  }
302
302
  function mt(e) {
303
303
  const t = e?.$?.vnode.el;
304
304
  return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
305
305
  }
306
- const kn = ["id"], wn = {
306
+ const xn = ["id"], wn = {
307
307
  key: 0,
308
308
  class: "vf-modal-header"
309
- }, xn = { class: "vf-modal-content" }, bn = {
309
+ }, bn = { class: "vf-modal-content" }, Tn = {
310
310
  key: 1,
311
311
  class: "vf-modal-footer"
312
- }, Tn = /* @__PURE__ */ q({
312
+ }, Sn = /* @__PURE__ */ q({
313
313
  __name: "vf-modal",
314
314
  props: {
315
315
  id: {},
@@ -321,69 +321,69 @@ const kn = ["id"], wn = {
321
321
  },
322
322
  emits: ["formSubmit"],
323
323
  setup(e, { expose: t }) {
324
- const o = Ne(), a = e;
325
- t({ mask: n, unmask: r, hide: i, unhide: s });
326
- const p = N(), l = N(), y = N(!1), g = O(() => dt([...Array.isArray(a.class) ? a.class : [a.class], y.value && "hidden"]));
324
+ const o = Le(), i = e;
325
+ t({ mask: n, unmask: a, hide: r, unhide: s });
326
+ const c = N(), l = N(), g = N(!1), y = O(() => dt([...Array.isArray(i.class) ? i.class : [i.class], g.value && "hidden"]));
327
327
  z(() => {
328
- document.body.classList.add("vf-modal-open"), a.closeOnMaskClick && (window.addEventListener("keydown", v), p.value?.addEventListener("click", E));
329
- }), me(() => {
328
+ document.body.classList.add("vf-modal-open"), i.closeOnMaskClick && (window.addEventListener("keydown", v), c.value?.addEventListener("click", E));
329
+ }), ye(() => {
330
330
  window.removeEventListener("keydown", v), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
331
331
  });
332
332
  function E(u) {
333
- u.target == p.value && c();
333
+ u.target == c.value && d();
334
334
  }
335
335
  function v(u) {
336
336
  if (u.key === "Esc" || u.key === "Escape") {
337
- const h = document.querySelectorAll(".vf-modal-wrap");
338
- h[h.length - 1] === p.value && c();
337
+ const p = document.querySelectorAll(".vf-modal-wrap");
338
+ p[p.length - 1] === c.value && d();
339
339
  }
340
340
  }
341
- function c() {
342
- a.onClose ? a.onClose() : ft(o);
341
+ function d() {
342
+ i.onClose ? i.onClose() : ft(o);
343
343
  }
344
344
  function n() {
345
- return En(l.value), () => r();
345
+ return kn(l.value), () => a();
346
346
  }
347
- function r() {
347
+ function a() {
348
348
  vt(l.value);
349
349
  }
350
- function i() {
351
- return y.value = !0, () => s();
350
+ function r() {
351
+ return g.value = !0, () => s();
352
352
  }
353
353
  function s() {
354
- y.value = !1;
354
+ g.value = !1;
355
355
  }
356
- return (u, h) => (S(), I("div", {
356
+ return (u, p) => (S(), I("div", {
357
357
  id: e.id,
358
358
  ref_key: "overlay",
359
- ref: p,
360
- class: P(["vf-overlay vf-modal-wrap", g.value])
359
+ ref: c,
360
+ class: j(["vf-overlay vf-modal-wrap", y.value])
361
361
  }, [
362
362
  U("form", {
363
363
  ref_key: "form",
364
364
  ref: l,
365
365
  action: ".",
366
- class: P(["vf-modal", { scrolls: e.scrolls }]),
367
- onSubmit: h[0] || (h[0] = Le((f) => u.$emit("formSubmit"), ["prevent"]))
366
+ class: j(["vf-modal", { scrolls: e.scrolls }]),
367
+ onSubmit: p[0] || (p[0] = ve((h) => u.$emit("formSubmit"), ["prevent"]))
368
368
  }, [
369
369
  u.$slots.header ? (S(), I("div", wn, [
370
370
  K(u.$slots, "header"),
371
- a.closeX ? (S(), I("i", {
371
+ i.closeX ? (S(), I("i", {
372
372
  key: 0,
373
373
  class: "close",
374
- onClick: c
374
+ onClick: d
375
375
  })) : W("", !0)
376
376
  ])) : W("", !0),
377
- U("div", xn, [
377
+ U("div", bn, [
378
378
  K(u.$slots, "default")
379
379
  ]),
380
- u.$slots.footer ? (S(), I("div", bn, [
380
+ u.$slots.footer ? (S(), I("div", Tn, [
381
381
  K(u.$slots, "footer")
382
382
  ])) : W("", !0)
383
383
  ], 34)
384
- ], 10, kn));
384
+ ], 10, xn));
385
385
  }
386
- }), Sn = ["innerHTML"], In = ["innerText"], le = /* @__PURE__ */ q({
386
+ }), In = ["innerHTML"], Mn = ["innerText"], le = /* @__PURE__ */ q({
387
387
  __name: "vf-alert-modal",
388
388
  props: {
389
389
  isBare: { type: Boolean },
@@ -396,57 +396,57 @@ const kn = ["id"], wn = {
396
396
  callback: { type: Function }
397
397
  },
398
398
  setup(e) {
399
- const t = e, o = O(() => t.message instanceof Error ? mn(t.message) : t.message);
400
- return (a, p) => {
399
+ const t = e, o = O(() => t.message instanceof Error ? gn(t.message) : t.message);
400
+ return (i, c) => {
401
401
  const l = zt("autofocus");
402
- return S(), lt(Tn, {
403
- class: P(["vf-alert", ...e.classes ?? []]),
402
+ return S(), lt(Sn, {
403
+ class: j(["vf-alert", ...e.classes ?? []]),
404
404
  scrolls: ""
405
405
  }, qt({
406
- default: Te(() => [
406
+ default: Ie(() => [
407
407
  e.iconClass ? (S(), I("i", {
408
408
  key: 0,
409
- class: P(["vf-alert-icon", e.iconClass])
409
+ class: j(["vf-alert-icon", e.iconClass])
410
410
  }, null, 2)) : W("", !0),
411
411
  e.isHtml ? (S(), I("div", {
412
412
  key: 1,
413
413
  innerHTML: o.value,
414
414
  class: "user-message"
415
- }, null, 8, Sn)) : (S(), I("div", {
415
+ }, null, 8, In)) : (S(), I("div", {
416
416
  key: 2,
417
417
  innerText: o.value
418
- }, null, 8, In))
418
+ }, null, 8, Mn))
419
419
  ]),
420
420
  _: 2
421
421
  }, [
422
422
  e.title ? {
423
423
  name: "header",
424
- fn: Te(() => [
424
+ fn: Ie(() => [
425
425
  te(J(e.title), 1)
426
426
  ]),
427
427
  key: "0"
428
428
  } : void 0,
429
429
  e.isBare ? void 0 : {
430
430
  name: "footer",
431
- fn: Te(() => [
431
+ fn: Ie(() => [
432
432
  e.shouldConfirm ? (S(), I(he, { key: 0 }, [
433
433
  fe((S(), I("button", {
434
434
  class: "primary",
435
- onClick: p[0] || (p[0] = () => e.callback(!0))
436
- }, [...p[3] || (p[3] = [
435
+ onClick: c[0] || (c[0] = () => e.callback(!0))
436
+ }, [...c[3] || (c[3] = [
437
437
  te("Confirm", -1)
438
438
  ])])), [
439
439
  [l]
440
440
  ]),
441
441
  U("button", {
442
442
  class: "default",
443
- onClick: p[1] || (p[1] = () => e.callback(!1))
443
+ onClick: c[1] || (c[1] = () => e.callback(!1))
444
444
  }, "Cancel")
445
445
  ], 64)) : fe((S(), I("button", {
446
446
  key: 1,
447
447
  class: "default",
448
- onClick: p[2] || (p[2] = () => e.callback(!0))
449
- }, [...p[4] || (p[4] = [
448
+ onClick: c[2] || (c[2] = () => e.callback(!0))
449
+ }, [...c[4] || (c[4] = [
450
450
  te("OK", -1)
451
451
  ])])), [
452
452
  [l]
@@ -458,133 +458,133 @@ const kn = ["id"], wn = {
458
458
  };
459
459
  }
460
460
  });
461
- function Mn(e) {
461
+ function Cn(e) {
462
462
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
463
463
  }
464
464
  var ce = { exports: {} };
465
- var Cn = ce.exports, Ke;
466
- function On() {
465
+ var On = ce.exports, Ke;
466
+ function Nn() {
467
467
  return Ke || (Ke = 1, (function(e, t) {
468
- (function(o, a) {
469
- e.exports = a();
470
- })(Cn, (function() {
468
+ (function(o, i) {
469
+ e.exports = i();
470
+ })(On, (function() {
471
471
  var o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(v) {
472
472
  return typeof v;
473
473
  } : function(v) {
474
474
  return v && typeof Symbol == "function" && v.constructor === Symbol && v !== Symbol.prototype ? "symbol" : typeof v;
475
- }, a = function(v, c) {
476
- if (!(v instanceof c))
475
+ }, i = function(v, d) {
476
+ if (!(v instanceof d))
477
477
  throw new TypeError("Cannot call a class as a function");
478
- }, p = /* @__PURE__ */ (function() {
479
- function v(c, n) {
480
- for (var r = 0; r < n.length; r++) {
481
- var i = n[r];
482
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(c, i.key, i);
478
+ }, c = /* @__PURE__ */ (function() {
479
+ function v(d, n) {
480
+ for (var a = 0; a < n.length; a++) {
481
+ var r = n[a];
482
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(d, r.key, r);
483
483
  }
484
484
  }
485
- return function(c, n, r) {
486
- return n && v(c.prototype, n), r && v(c, r), c;
485
+ return function(d, n, a) {
486
+ return n && v(d.prototype, n), a && v(d, a), d;
487
487
  };
488
488
  })(), l = Object.assign || function(v) {
489
- for (var c = 1; c < arguments.length; c++) {
490
- var n = arguments[c];
491
- for (var r in n)
492
- Object.prototype.hasOwnProperty.call(n, r) && (v[r] = n[r]);
489
+ for (var d = 1; d < arguments.length; d++) {
490
+ var n = arguments[d];
491
+ for (var a in n)
492
+ Object.prototype.hasOwnProperty.call(n, a) && (v[a] = n[a]);
493
493
  }
494
494
  return v;
495
- }, y = (function() {
496
- function v(c) {
497
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 5e3;
498
- a(this, v), this.ctx = c, this.iframes = n, this.exclude = r, this.iframesTimeout = i;
495
+ }, g = (function() {
496
+ function v(d) {
497
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 5e3;
498
+ i(this, v), this.ctx = d, this.iframes = n, this.exclude = a, this.iframesTimeout = r;
499
499
  }
500
- return p(v, [{
500
+ return c(v, [{
501
501
  key: "getContexts",
502
502
  value: function() {
503
- var n = void 0, r = [];
504
- return typeof this.ctx > "u" || !this.ctx ? n = [] : NodeList.prototype.isPrototypeOf(this.ctx) ? n = Array.prototype.slice.call(this.ctx) : Array.isArray(this.ctx) ? n = this.ctx : typeof this.ctx == "string" ? n = Array.prototype.slice.call(document.querySelectorAll(this.ctx)) : n = [this.ctx], n.forEach(function(i) {
505
- var s = r.filter(function(u) {
506
- return u.contains(i);
503
+ var n = void 0, a = [];
504
+ return typeof this.ctx > "u" || !this.ctx ? n = [] : NodeList.prototype.isPrototypeOf(this.ctx) ? n = Array.prototype.slice.call(this.ctx) : Array.isArray(this.ctx) ? n = this.ctx : typeof this.ctx == "string" ? n = Array.prototype.slice.call(document.querySelectorAll(this.ctx)) : n = [this.ctx], n.forEach(function(r) {
505
+ var s = a.filter(function(u) {
506
+ return u.contains(r);
507
507
  }).length > 0;
508
- r.indexOf(i) === -1 && !s && r.push(i);
509
- }), r;
508
+ a.indexOf(r) === -1 && !s && a.push(r);
509
+ }), a;
510
510
  }
511
511
  }, {
512
512
  key: "getIframeContents",
513
- value: function(n, r) {
514
- var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
513
+ value: function(n, a) {
514
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
515
515
  }, s = void 0;
516
516
  try {
517
517
  var u = n.contentWindow;
518
518
  if (s = u.document, !u || !s)
519
519
  throw new Error("iframe inaccessible");
520
520
  } catch {
521
- i();
521
+ r();
522
522
  }
523
- s && r(s);
523
+ s && a(s);
524
524
  }
525
525
  }, {
526
526
  key: "isIframeBlank",
527
527
  value: function(n) {
528
- var r = "about:blank", i = n.getAttribute("src").trim(), s = n.contentWindow.location.href;
529
- return s === r && i !== r && i;
528
+ var a = "about:blank", r = n.getAttribute("src").trim(), s = n.contentWindow.location.href;
529
+ return s === a && r !== a && r;
530
530
  }
531
531
  }, {
532
532
  key: "observeIframeLoad",
533
- value: function(n, r, i) {
534
- var s = this, u = !1, h = null, f = function m() {
533
+ value: function(n, a, r) {
534
+ var s = this, u = !1, p = null, h = function m() {
535
535
  if (!u) {
536
- u = !0, clearTimeout(h);
536
+ u = !0, clearTimeout(p);
537
537
  try {
538
- s.isIframeBlank(n) || (n.removeEventListener("load", m), s.getIframeContents(n, r, i));
538
+ s.isIframeBlank(n) || (n.removeEventListener("load", m), s.getIframeContents(n, a, r));
539
539
  } catch {
540
- i();
540
+ r();
541
541
  }
542
542
  }
543
543
  };
544
- n.addEventListener("load", f), h = setTimeout(f, this.iframesTimeout);
544
+ n.addEventListener("load", h), p = setTimeout(h, this.iframesTimeout);
545
545
  }
546
546
  }, {
547
547
  key: "onIframeReady",
548
- value: function(n, r, i) {
548
+ value: function(n, a, r) {
549
549
  try {
550
- n.contentWindow.document.readyState === "complete" ? this.isIframeBlank(n) ? this.observeIframeLoad(n, r, i) : this.getIframeContents(n, r, i) : this.observeIframeLoad(n, r, i);
550
+ n.contentWindow.document.readyState === "complete" ? this.isIframeBlank(n) ? this.observeIframeLoad(n, a, r) : this.getIframeContents(n, a, r) : this.observeIframeLoad(n, a, r);
551
551
  } catch {
552
- i();
552
+ r();
553
553
  }
554
554
  }
555
555
  }, {
556
556
  key: "waitForIframes",
557
- value: function(n, r) {
558
- var i = this, s = 0;
557
+ value: function(n, a) {
558
+ var r = this, s = 0;
559
559
  this.forEachIframe(n, function() {
560
560
  return !0;
561
561
  }, function(u) {
562
- s++, i.waitForIframes(u.querySelector("html"), function() {
563
- --s || r();
562
+ s++, r.waitForIframes(u.querySelector("html"), function() {
563
+ --s || a();
564
564
  });
565
565
  }, function(u) {
566
- u || r();
566
+ u || a();
567
567
  });
568
568
  }
569
569
  }, {
570
570
  key: "forEachIframe",
571
- value: function(n, r, i) {
571
+ value: function(n, a, r) {
572
572
  var s = this, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : function() {
573
- }, h = n.querySelectorAll("iframe"), f = h.length, m = 0;
574
- h = Array.prototype.slice.call(h);
575
- var x = function() {
576
- --f <= 0 && u(m);
573
+ }, p = n.querySelectorAll("iframe"), h = p.length, m = 0;
574
+ p = Array.prototype.slice.call(p);
575
+ var w = function() {
576
+ --h <= 0 && u(m);
577
577
  };
578
- f || x(), h.forEach(function(T) {
579
- v.matches(T, s.exclude) ? x() : s.onIframeReady(T, function(C) {
580
- r(T) && (m++, i(C)), x();
581
- }, x);
578
+ h || w(), p.forEach(function(T) {
579
+ v.matches(T, s.exclude) ? w() : s.onIframeReady(T, function(C) {
580
+ a(T) && (m++, r(C)), w();
581
+ }, w);
582
582
  });
583
583
  }
584
584
  }, {
585
585
  key: "createIterator",
586
- value: function(n, r, i) {
587
- return document.createNodeIterator(n, r, i, !1);
586
+ value: function(n, a, r) {
587
+ return document.createNodeIterator(n, a, r, !1);
588
588
  }
589
589
  }, {
590
590
  key: "createInstanceOnIframe",
@@ -593,12 +593,12 @@ function On() {
593
593
  }
594
594
  }, {
595
595
  key: "compareNodeIframe",
596
- value: function(n, r, i) {
597
- var s = n.compareDocumentPosition(i), u = Node.DOCUMENT_POSITION_PRECEDING;
596
+ value: function(n, a, r) {
597
+ var s = n.compareDocumentPosition(r), u = Node.DOCUMENT_POSITION_PRECEDING;
598
598
  if (s & u)
599
- if (r !== null) {
600
- var h = r.compareDocumentPosition(i), f = Node.DOCUMENT_POSITION_FOLLOWING;
601
- if (h & f)
599
+ if (a !== null) {
600
+ var p = a.compareDocumentPosition(r), h = Node.DOCUMENT_POSITION_FOLLOWING;
601
+ if (p & h)
602
602
  return !0;
603
603
  } else
604
604
  return !0;
@@ -607,92 +607,92 @@ function On() {
607
607
  }, {
608
608
  key: "getIteratorNode",
609
609
  value: function(n) {
610
- var r = n.previousNode(), i = void 0;
611
- return r === null ? i = n.nextNode() : i = n.nextNode() && n.nextNode(), {
612
- prevNode: r,
613
- node: i
610
+ var a = n.previousNode(), r = void 0;
611
+ return a === null ? r = n.nextNode() : r = n.nextNode() && n.nextNode(), {
612
+ prevNode: a,
613
+ node: r
614
614
  };
615
615
  }
616
616
  }, {
617
617
  key: "checkIframeFilter",
618
- value: function(n, r, i, s) {
619
- var u = !1, h = !1;
620
- return s.forEach(function(f, m) {
621
- f.val === i && (u = m, h = f.handled);
622
- }), this.compareNodeIframe(n, r, i) ? (u === !1 && !h ? s.push({
623
- val: i,
618
+ value: function(n, a, r, s) {
619
+ var u = !1, p = !1;
620
+ return s.forEach(function(h, m) {
621
+ h.val === r && (u = m, p = h.handled);
622
+ }), this.compareNodeIframe(n, a, r) ? (u === !1 && !p ? s.push({
623
+ val: r,
624
624
  handled: !0
625
- }) : u !== !1 && !h && (s[u].handled = !0), !0) : (u === !1 && s.push({
626
- val: i,
625
+ }) : u !== !1 && !p && (s[u].handled = !0), !0) : (u === !1 && s.push({
626
+ val: r,
627
627
  handled: !1
628
628
  }), !1);
629
629
  }
630
630
  }, {
631
631
  key: "handleOpenIframes",
632
- value: function(n, r, i, s) {
632
+ value: function(n, a, r, s) {
633
633
  var u = this;
634
- n.forEach(function(h) {
635
- h.handled || u.getIframeContents(h.val, function(f) {
636
- u.createInstanceOnIframe(f).forEachNode(r, i, s);
634
+ n.forEach(function(p) {
635
+ p.handled || u.getIframeContents(p.val, function(h) {
636
+ u.createInstanceOnIframe(h).forEachNode(a, r, s);
637
637
  });
638
638
  });
639
639
  }
640
640
  }, {
641
641
  key: "iterateThroughNodes",
642
- value: function(n, r, i, s, u) {
643
- for (var h = this, f = this.createIterator(r, n, s), m = [], x = [], T = void 0, C = void 0, L = function() {
644
- var F = h.getIteratorNode(f);
642
+ value: function(n, a, r, s, u) {
643
+ for (var p = this, h = this.createIterator(a, n, s), m = [], w = [], T = void 0, C = void 0, L = function() {
644
+ var F = p.getIteratorNode(h);
645
645
  return C = F.prevNode, T = F.node, T;
646
646
  }; L(); )
647
- this.iframes && this.forEachIframe(r, function(R) {
648
- return h.checkIframeFilter(T, C, R, m);
647
+ this.iframes && this.forEachIframe(a, function(R) {
648
+ return p.checkIframeFilter(T, C, R, m);
649
649
  }, function(R) {
650
- h.createInstanceOnIframe(R).forEachNode(n, function(F) {
651
- return x.push(F);
650
+ p.createInstanceOnIframe(R).forEachNode(n, function(F) {
651
+ return w.push(F);
652
652
  }, s);
653
- }), x.push(T);
654
- x.forEach(function(R) {
655
- i(R);
656
- }), this.iframes && this.handleOpenIframes(m, n, i, s), u();
653
+ }), w.push(T);
654
+ w.forEach(function(R) {
655
+ r(R);
656
+ }), this.iframes && this.handleOpenIframes(m, n, r, s), u();
657
657
  }
658
658
  }, {
659
659
  key: "forEachNode",
660
- value: function(n, r, i) {
660
+ value: function(n, a, r) {
661
661
  var s = this, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : function() {
662
- }, h = this.getContexts(), f = h.length;
663
- f || u(), h.forEach(function(m) {
664
- var x = function() {
665
- s.iterateThroughNodes(n, m, r, i, function() {
666
- --f <= 0 && u();
662
+ }, p = this.getContexts(), h = p.length;
663
+ h || u(), p.forEach(function(m) {
664
+ var w = function() {
665
+ s.iterateThroughNodes(n, m, a, r, function() {
666
+ --h <= 0 && u();
667
667
  });
668
668
  };
669
- s.iframes ? s.waitForIframes(m, x) : x();
669
+ s.iframes ? s.waitForIframes(m, w) : w();
670
670
  });
671
671
  }
672
672
  }], [{
673
673
  key: "matches",
674
- value: function(n, r) {
675
- var i = typeof r == "string" ? [r] : r, s = n.matches || n.matchesSelector || n.msMatchesSelector || n.mozMatchesSelector || n.oMatchesSelector || n.webkitMatchesSelector;
674
+ value: function(n, a) {
675
+ var r = typeof a == "string" ? [a] : a, s = n.matches || n.matchesSelector || n.msMatchesSelector || n.mozMatchesSelector || n.oMatchesSelector || n.webkitMatchesSelector;
676
676
  if (s) {
677
677
  var u = !1;
678
- return i.every(function(h) {
679
- return s.call(n, h) ? (u = !0, !1) : !0;
678
+ return r.every(function(p) {
679
+ return s.call(n, p) ? (u = !0, !1) : !0;
680
680
  }), u;
681
681
  } else
682
682
  return !1;
683
683
  }
684
684
  }]), v;
685
- })(), g = (function() {
686
- function v(c) {
687
- a(this, v), this.ctx = c, this.ie = !1;
685
+ })(), y = (function() {
686
+ function v(d) {
687
+ i(this, v), this.ctx = d, this.ie = !1;
688
688
  var n = window.navigator.userAgent;
689
689
  (n.indexOf("MSIE") > -1 || n.indexOf("Trident") > -1) && (this.ie = !0);
690
690
  }
691
- return p(v, [{
691
+ return c(v, [{
692
692
  key: "log",
693
693
  value: function(n) {
694
- var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "debug", i = this.opt.log;
695
- this.opt.debug && (typeof i > "u" ? "undefined" : o(i)) === "object" && typeof i[r] == "function" && i[r]("mark.js: " + n);
694
+ var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "debug", r = this.opt.log;
695
+ this.opt.debug && (typeof r > "u" ? "undefined" : o(r)) === "object" && typeof r[a] == "function" && r[a]("mark.js: " + n);
696
696
  }
697
697
  }, {
698
698
  key: "escapeStr",
@@ -707,11 +707,11 @@ function On() {
707
707
  }, {
708
708
  key: "createSynonymsRegExp",
709
709
  value: function(n) {
710
- var r = this.opt.synonyms, i = this.opt.caseSensitive ? "" : "i", s = this.opt.ignoreJoiners || this.opt.ignorePunctuation.length ? "\0" : "";
711
- for (var u in r)
712
- if (r.hasOwnProperty(u)) {
713
- var h = r[u], f = this.opt.wildcards !== "disabled" ? this.setupWildcardsRegExp(u) : this.escapeStr(u), m = this.opt.wildcards !== "disabled" ? this.setupWildcardsRegExp(h) : this.escapeStr(h);
714
- f !== "" && m !== "" && (n = n.replace(new RegExp("(" + this.escapeStr(f) + "|" + this.escapeStr(m) + ")", "gm" + i), s + ("(" + this.processSynomyms(f) + "|") + (this.processSynomyms(m) + ")") + s));
710
+ var a = this.opt.synonyms, r = this.opt.caseSensitive ? "" : "i", s = this.opt.ignoreJoiners || this.opt.ignorePunctuation.length ? "\0" : "";
711
+ for (var u in a)
712
+ if (a.hasOwnProperty(u)) {
713
+ var p = a[u], h = this.opt.wildcards !== "disabled" ? this.setupWildcardsRegExp(u) : this.escapeStr(u), m = this.opt.wildcards !== "disabled" ? this.setupWildcardsRegExp(p) : this.escapeStr(p);
714
+ h !== "" && m !== "" && (n = n.replace(new RegExp("(" + this.escapeStr(h) + "|" + this.escapeStr(m) + ")", "gm" + r), s + ("(" + this.processSynomyms(h) + "|") + (this.processSynomyms(m) + ")") + s));
715
715
  }
716
716
  return n;
717
717
  }
@@ -723,42 +723,42 @@ function On() {
723
723
  }, {
724
724
  key: "setupWildcardsRegExp",
725
725
  value: function(n) {
726
- return n = n.replace(/(?:\\)*\?/g, function(r) {
727
- return r.charAt(0) === "\\" ? "?" : "";
728
- }), n.replace(/(?:\\)*\*/g, function(r) {
729
- return r.charAt(0) === "\\" ? "*" : "";
726
+ return n = n.replace(/(?:\\)*\?/g, function(a) {
727
+ return a.charAt(0) === "\\" ? "?" : "";
728
+ }), n.replace(/(?:\\)*\*/g, function(a) {
729
+ return a.charAt(0) === "\\" ? "*" : "";
730
730
  });
731
731
  }
732
732
  }, {
733
733
  key: "createWildcardsRegExp",
734
734
  value: function(n) {
735
- var r = this.opt.wildcards === "withSpaces";
736
- return n.replace(/\u0001/g, r ? "[\\S\\s]?" : "\\S?").replace(/\u0002/g, r ? "[\\S\\s]*?" : "\\S*");
735
+ var a = this.opt.wildcards === "withSpaces";
736
+ return n.replace(/\u0001/g, a ? "[\\S\\s]?" : "\\S?").replace(/\u0002/g, a ? "[\\S\\s]*?" : "\\S*");
737
737
  }
738
738
  }, {
739
739
  key: "setupIgnoreJoinersRegExp",
740
740
  value: function(n) {
741
- return n.replace(/[^(|)\\]/g, function(r, i, s) {
742
- var u = s.charAt(i + 1);
743
- return /[(|)\\]/.test(u) || u === "" ? r : r + "\0";
741
+ return n.replace(/[^(|)\\]/g, function(a, r, s) {
742
+ var u = s.charAt(r + 1);
743
+ return /[(|)\\]/.test(u) || u === "" ? a : a + "\0";
744
744
  });
745
745
  }
746
746
  }, {
747
747
  key: "createJoinersRegExp",
748
748
  value: function(n) {
749
- var r = [], i = this.opt.ignorePunctuation;
750
- return Array.isArray(i) && i.length && r.push(this.escapeStr(i.join(""))), this.opt.ignoreJoiners && r.push("\\u00ad\\u200b\\u200c\\u200d"), r.length ? n.split(/\u0000+/).join("[" + r.join("") + "]*") : n;
749
+ var a = [], r = this.opt.ignorePunctuation;
750
+ return Array.isArray(r) && r.length && a.push(this.escapeStr(r.join(""))), this.opt.ignoreJoiners && a.push("\\u00ad\\u200b\\u200c\\u200d"), a.length ? n.split(/\u0000+/).join("[" + a.join("") + "]*") : n;
751
751
  }
752
752
  }, {
753
753
  key: "createDiacriticsRegExp",
754
754
  value: function(n) {
755
- var r = this.opt.caseSensitive ? "" : "i", i = this.opt.caseSensitive ? ["aàáảãạăằắẳẵặâầấẩẫậäåāą", "AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ", "cçćč", "CÇĆČ", "dđď", "DĐĎ", "eèéẻẽẹêềếểễệëěēę", "EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ", "iìíỉĩịîïī", "IÌÍỈĨỊÎÏĪ", "lł", "LŁ", "nñňń", "NÑŇŃ", "oòóỏõọôồốổỗộơởỡớờợöøō", "OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ", "rř", "RŘ", "sšśșş", "SŠŚȘŞ", "tťțţ", "TŤȚŢ", "uùúủũụưừứửữựûüůū", "UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ", "yýỳỷỹỵÿ", "YÝỲỶỸỴŸ", "zžżź", "ZŽŻŹ"] : ["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ", "cçćčCÇĆČ", "dđďDĐĎ", "eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ", "iìíỉĩịîïīIÌÍỈĨỊÎÏĪ", "lłLŁ", "nñňńNÑŇŃ", "oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ", "rřRŘ", "sšśșşSŠŚȘŞ", "tťțţTŤȚŢ", "uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ", "yýỳỷỹỵÿYÝỲỶỸỴŸ", "zžżźZŽŻŹ"], s = [];
755
+ var a = this.opt.caseSensitive ? "" : "i", r = this.opt.caseSensitive ? ["aàáảãạăằắẳẵặâầấẩẫậäåāą", "AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ", "cçćč", "CÇĆČ", "dđď", "DĐĎ", "eèéẻẽẹêềếểễệëěēę", "EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ", "iìíỉĩịîïī", "IÌÍỈĨỊÎÏĪ", "lł", "LŁ", "nñňń", "NÑŇŃ", "oòóỏõọôồốổỗộơởỡớờợöøō", "OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ", "rř", "RŘ", "sšśșş", "SŠŚȘŞ", "tťțţ", "TŤȚŢ", "uùúủũụưừứửữựûüůū", "UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ", "yýỳỷỹỵÿ", "YÝỲỶỸỴŸ", "zžżź", "ZŽŻŹ"] : ["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ", "cçćčCÇĆČ", "dđďDĐĎ", "eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ", "iìíỉĩịîïīIÌÍỈĨỊÎÏĪ", "lłLŁ", "nñňńNÑŇŃ", "oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ", "rřRŘ", "sšśșşSŠŚȘŞ", "tťțţTŤȚŢ", "uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ", "yýỳỷỹỵÿYÝỲỶỸỴŸ", "zžżźZŽŻŹ"], s = [];
756
756
  return n.split("").forEach(function(u) {
757
- i.every(function(h) {
758
- if (h.indexOf(u) !== -1) {
759
- if (s.indexOf(h) > -1)
757
+ r.every(function(p) {
758
+ if (p.indexOf(u) !== -1) {
759
+ if (s.indexOf(p) > -1)
760
760
  return !1;
761
- n = n.replace(new RegExp("[" + h + "]", "gm" + r), "[" + h + "]"), s.push(h);
761
+ n = n.replace(new RegExp("[" + p + "]", "gm" + a), "[" + p + "]"), s.push(p);
762
762
  }
763
763
  return !0;
764
764
  });
@@ -772,32 +772,32 @@ function On() {
772
772
  }, {
773
773
  key: "createAccuracyRegExp",
774
774
  value: function(n) {
775
- var r = this, i = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿", s = this.opt.accuracy, u = typeof s == "string" ? s : s.value, h = typeof s == "string" ? [] : s.limiters, f = "";
776
- switch (h.forEach(function(m) {
777
- f += "|" + r.escapeStr(m);
775
+ var a = this, r = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿", s = this.opt.accuracy, u = typeof s == "string" ? s : s.value, p = typeof s == "string" ? [] : s.limiters, h = "";
776
+ switch (p.forEach(function(m) {
777
+ h += "|" + a.escapeStr(m);
778
778
  }), u) {
779
779
  case "partially":
780
780
  default:
781
781
  return "()(" + n + ")";
782
782
  case "complementary":
783
- return f = "\\s" + (f || this.escapeStr(i)), "()([^" + f + "]*" + n + "[^" + f + "]*)";
783
+ return h = "\\s" + (h || this.escapeStr(r)), "()([^" + h + "]*" + n + "[^" + h + "]*)";
784
784
  case "exactly":
785
- return "(^|\\s" + f + ")(" + n + ")(?=$|\\s" + f + ")";
785
+ return "(^|\\s" + h + ")(" + n + ")(?=$|\\s" + h + ")";
786
786
  }
787
787
  }
788
788
  }, {
789
789
  key: "getSeparatedKeywords",
790
790
  value: function(n) {
791
- var r = this, i = [];
791
+ var a = this, r = [];
792
792
  return n.forEach(function(s) {
793
- r.opt.separateWordSearch ? s.split(" ").forEach(function(u) {
794
- u.trim() && i.indexOf(u) === -1 && i.push(u);
795
- }) : s.trim() && i.indexOf(s) === -1 && i.push(s);
793
+ a.opt.separateWordSearch ? s.split(" ").forEach(function(u) {
794
+ u.trim() && r.indexOf(u) === -1 && r.push(u);
795
+ }) : s.trim() && r.indexOf(s) === -1 && r.push(s);
796
796
  }), {
797
- keywords: i.sort(function(s, u) {
797
+ keywords: r.sort(function(s, u) {
798
798
  return u.length - s.length;
799
799
  }),
800
- length: i.length
800
+ length: r.length
801
801
  };
802
802
  }
803
803
  }, {
@@ -808,32 +808,32 @@ function On() {
808
808
  }, {
809
809
  key: "checkRanges",
810
810
  value: function(n) {
811
- var r = this;
811
+ var a = this;
812
812
  if (!Array.isArray(n) || Object.prototype.toString.call(n[0]) !== "[object Object]")
813
813
  return this.log("markRanges() will only accept an array of objects"), this.opt.noMatch(n), [];
814
- var i = [], s = 0;
815
- return n.sort(function(u, h) {
816
- return u.start - h.start;
814
+ var r = [], s = 0;
815
+ return n.sort(function(u, p) {
816
+ return u.start - p.start;
817
817
  }).forEach(function(u) {
818
- var h = r.callNoMatchOnInvalidRanges(u, s), f = h.start, m = h.end, x = h.valid;
819
- x && (u.start = f, u.length = m - f, i.push(u), s = m);
820
- }), i;
818
+ var p = a.callNoMatchOnInvalidRanges(u, s), h = p.start, m = p.end, w = p.valid;
819
+ w && (u.start = h, u.length = m - h, r.push(u), s = m);
820
+ }), r;
821
821
  }
822
822
  }, {
823
823
  key: "callNoMatchOnInvalidRanges",
824
- value: function(n, r) {
825
- var i = void 0, s = void 0, u = !1;
826
- return n && typeof n.start < "u" ? (i = parseInt(n.start, 10), s = i + parseInt(n.length, 10), this.isNumeric(n.start) && this.isNumeric(n.length) && s - r > 0 && s - i > 0 ? u = !0 : (this.log("Ignoring invalid or overlapping range: " + ("" + JSON.stringify(n))), this.opt.noMatch(n))) : (this.log("Ignoring invalid range: " + JSON.stringify(n)), this.opt.noMatch(n)), {
827
- start: i,
824
+ value: function(n, a) {
825
+ var r = void 0, s = void 0, u = !1;
826
+ return n && typeof n.start < "u" ? (r = parseInt(n.start, 10), s = r + parseInt(n.length, 10), this.isNumeric(n.start) && this.isNumeric(n.length) && s - a > 0 && s - r > 0 ? u = !0 : (this.log("Ignoring invalid or overlapping range: " + ("" + JSON.stringify(n))), this.opt.noMatch(n))) : (this.log("Ignoring invalid range: " + JSON.stringify(n)), this.opt.noMatch(n)), {
827
+ start: r,
828
828
  end: s,
829
829
  valid: u
830
830
  };
831
831
  }
832
832
  }, {
833
833
  key: "checkWhitespaceRanges",
834
- value: function(n, r, i) {
835
- var s = void 0, u = !0, h = i.length, f = r - h, m = parseInt(n.start, 10) - f;
836
- return m = m > h ? h : m, s = m + parseInt(n.length, 10), s > h && (s = h, this.log("End range automatically set to the max value of " + h)), m < 0 || s - m < 0 || m > h || s > h ? (u = !1, this.log("Invalid range: " + JSON.stringify(n)), this.opt.noMatch(n)) : i.substring(m, s).replace(/\s+/g, "") === "" && (u = !1, this.log("Skipping whitespace only range: " + JSON.stringify(n)), this.opt.noMatch(n)), {
834
+ value: function(n, a, r) {
835
+ var s = void 0, u = !0, p = r.length, h = a - p, m = parseInt(n.start, 10) - h;
836
+ return m = m > p ? p : m, s = m + parseInt(n.length, 10), s > p && (s = p, this.log("End range automatically set to the max value of " + p)), m < 0 || s - m < 0 || m > p || s > p ? (u = !1, this.log("Invalid range: " + JSON.stringify(n)), this.opt.noMatch(n)) : r.substring(m, s).replace(/\s+/g, "") === "" && (u = !1, this.log("Skipping whitespace only range: " + JSON.stringify(n)), this.opt.noMatch(n)), {
837
837
  start: m,
838
838
  end: s,
839
839
  valid: u
@@ -842,18 +842,18 @@ function On() {
842
842
  }, {
843
843
  key: "getTextNodes",
844
844
  value: function(n) {
845
- var r = this, i = "", s = [];
845
+ var a = this, r = "", s = [];
846
846
  this.iterator.forEachNode(NodeFilter.SHOW_TEXT, function(u) {
847
847
  s.push({
848
- start: i.length,
849
- end: (i += u.textContent).length,
848
+ start: r.length,
849
+ end: (r += u.textContent).length,
850
850
  node: u
851
851
  });
852
852
  }, function(u) {
853
- return r.matchesExclude(u.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
853
+ return a.matchesExclude(u.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
854
854
  }, function() {
855
855
  n({
856
- value: i,
856
+ value: r,
857
857
  nodes: s
858
858
  });
859
859
  });
@@ -861,28 +861,28 @@ function On() {
861
861
  }, {
862
862
  key: "matchesExclude",
863
863
  value: function(n) {
864
- return y.matches(n, this.opt.exclude.concat(["script", "style", "title", "head", "html"]));
864
+ return g.matches(n, this.opt.exclude.concat(["script", "style", "title", "head", "html"]));
865
865
  }
866
866
  }, {
867
867
  key: "wrapRangeInTextNode",
868
- value: function(n, r, i) {
869
- var s = this.opt.element ? this.opt.element : "mark", u = n.splitText(r), h = u.splitText(i - r), f = document.createElement(s);
870
- return f.setAttribute("data-markjs", "true"), this.opt.className && f.setAttribute("class", this.opt.className), f.textContent = u.textContent, u.parentNode.replaceChild(f, u), h;
868
+ value: function(n, a, r) {
869
+ var s = this.opt.element ? this.opt.element : "mark", u = n.splitText(a), p = u.splitText(r - a), h = document.createElement(s);
870
+ return h.setAttribute("data-markjs", "true"), this.opt.className && h.setAttribute("class", this.opt.className), h.textContent = u.textContent, u.parentNode.replaceChild(h, u), p;
871
871
  }
872
872
  }, {
873
873
  key: "wrapRangeInMappedTextNode",
874
- value: function(n, r, i, s, u) {
875
- var h = this;
876
- n.nodes.every(function(f, m) {
877
- var x = n.nodes[m + 1];
878
- if (typeof x > "u" || x.start > r) {
879
- if (!s(f.node))
874
+ value: function(n, a, r, s, u) {
875
+ var p = this;
876
+ n.nodes.every(function(h, m) {
877
+ var w = n.nodes[m + 1];
878
+ if (typeof w > "u" || w.start > a) {
879
+ if (!s(h.node))
880
880
  return !1;
881
- var T = r - f.start, C = (i > f.end ? f.end : i) - f.start, L = n.value.substr(0, f.start), R = n.value.substr(C + f.start);
882
- if (f.node = h.wrapRangeInTextNode(f.node, T, C), n.value = L + R, n.nodes.forEach(function(F, V) {
883
- V >= m && (n.nodes[V].start > 0 && V !== m && (n.nodes[V].start -= C), n.nodes[V].end -= C);
884
- }), i -= C, u(f.node.previousSibling, f.start), i > f.end)
885
- r = f.end;
881
+ var T = a - h.start, C = (r > h.end ? h.end : r) - h.start, L = n.value.substr(0, h.start), R = n.value.substr(C + h.start);
882
+ if (h.node = p.wrapRangeInTextNode(h.node, T, C), n.value = L + R, n.nodes.forEach(function(F, H) {
883
+ H >= m && (n.nodes[H].start > 0 && H !== m && (n.nodes[H].start -= C), n.nodes[H].end -= C);
884
+ }), r -= C, u(h.node.previousSibling, h.start), r > h.end)
885
+ a = h.end;
886
886
  else
887
887
  return !1;
888
888
  }
@@ -891,35 +891,35 @@ function On() {
891
891
  }
892
892
  }, {
893
893
  key: "wrapMatches",
894
- value: function(n, r, i, s, u) {
895
- var h = this, f = r === 0 ? 0 : r + 1;
894
+ value: function(n, a, r, s, u) {
895
+ var p = this, h = a === 0 ? 0 : a + 1;
896
896
  this.getTextNodes(function(m) {
897
- m.nodes.forEach(function(x) {
898
- x = x.node;
899
- for (var T = void 0; (T = n.exec(x.textContent)) !== null && T[f] !== ""; )
900
- if (i(T[f], x)) {
897
+ m.nodes.forEach(function(w) {
898
+ w = w.node;
899
+ for (var T = void 0; (T = n.exec(w.textContent)) !== null && T[h] !== ""; )
900
+ if (r(T[h], w)) {
901
901
  var C = T.index;
902
- if (f !== 0)
903
- for (var L = 1; L < f; L++)
902
+ if (h !== 0)
903
+ for (var L = 1; L < h; L++)
904
904
  C += T[L].length;
905
- x = h.wrapRangeInTextNode(x, C, C + T[f].length), s(x.previousSibling), n.lastIndex = 0;
905
+ w = p.wrapRangeInTextNode(w, C, C + T[h].length), s(w.previousSibling), n.lastIndex = 0;
906
906
  }
907
907
  }), u();
908
908
  });
909
909
  }
910
910
  }, {
911
911
  key: "wrapMatchesAcrossElements",
912
- value: function(n, r, i, s, u) {
913
- var h = this, f = r === 0 ? 0 : r + 1;
912
+ value: function(n, a, r, s, u) {
913
+ var p = this, h = a === 0 ? 0 : a + 1;
914
914
  this.getTextNodes(function(m) {
915
- for (var x = void 0; (x = n.exec(m.value)) !== null && x[f] !== ""; ) {
916
- var T = x.index;
917
- if (f !== 0)
918
- for (var C = 1; C < f; C++)
919
- T += x[C].length;
920
- var L = T + x[f].length;
921
- h.wrapRangeInMappedTextNode(m, T, L, function(R) {
922
- return i(x[f], R);
915
+ for (var w = void 0; (w = n.exec(m.value)) !== null && w[h] !== ""; ) {
916
+ var T = w.index;
917
+ if (h !== 0)
918
+ for (var C = 1; C < h; C++)
919
+ T += w[C].length;
920
+ var L = T + w[h].length;
921
+ p.wrapRangeInMappedTextNode(m, T, L, function(R) {
922
+ return r(w[h], R);
923
923
  }, function(R, F) {
924
924
  n.lastIndex = F, s(R);
925
925
  });
@@ -929,16 +929,16 @@ function On() {
929
929
  }
930
930
  }, {
931
931
  key: "wrapRangeFromIndex",
932
- value: function(n, r, i, s) {
932
+ value: function(n, a, r, s) {
933
933
  var u = this;
934
- this.getTextNodes(function(h) {
935
- var f = h.value.length;
936
- n.forEach(function(m, x) {
937
- var T = u.checkWhitespaceRanges(m, f, h.value), C = T.start, L = T.end, R = T.valid;
938
- R && u.wrapRangeInMappedTextNode(h, C, L, function(F) {
939
- return r(F, m, h.value.substring(C, L), x);
934
+ this.getTextNodes(function(p) {
935
+ var h = p.value.length;
936
+ n.forEach(function(m, w) {
937
+ var T = u.checkWhitespaceRanges(m, h, p.value), C = T.start, L = T.end, R = T.valid;
938
+ R && u.wrapRangeInMappedTextNode(p, C, L, function(F) {
939
+ return a(F, m, p.value.substring(C, L), w);
940
940
  }, function(F) {
941
- i(F, m);
941
+ r(F, m);
942
942
  });
943
943
  }), s();
944
944
  });
@@ -946,9 +946,9 @@ function On() {
946
946
  }, {
947
947
  key: "unwrapMatches",
948
948
  value: function(n) {
949
- for (var r = n.parentNode, i = document.createDocumentFragment(); n.firstChild; )
950
- i.appendChild(n.removeChild(n.firstChild));
951
- r.replaceChild(i, n), this.ie ? this.normalizeTextNode(r) : r.normalize();
949
+ for (var a = n.parentNode, r = document.createDocumentFragment(); n.firstChild; )
950
+ r.appendChild(n.removeChild(n.firstChild));
951
+ a.replaceChild(r, n), this.ie ? this.normalizeTextNode(a) : a.normalize();
952
952
  }
953
953
  }, {
954
954
  key: "normalizeTextNode",
@@ -964,60 +964,60 @@ function On() {
964
964
  }
965
965
  }, {
966
966
  key: "markRegExp",
967
- value: function(n, r) {
968
- var i = this;
969
- this.opt = r, this.log('Searching with expression "' + n + '"');
970
- var s = 0, u = "wrapMatches", h = function(m) {
971
- s++, i.opt.each(m);
967
+ value: function(n, a) {
968
+ var r = this;
969
+ this.opt = a, this.log('Searching with expression "' + n + '"');
970
+ var s = 0, u = "wrapMatches", p = function(m) {
971
+ s++, r.opt.each(m);
972
972
  };
973
- this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), this[u](n, this.opt.ignoreGroups, function(f, m) {
974
- return i.opt.filter(m, f, s);
975
- }, h, function() {
976
- s === 0 && i.opt.noMatch(n), i.opt.done(s);
973
+ this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), this[u](n, this.opt.ignoreGroups, function(h, m) {
974
+ return r.opt.filter(m, h, s);
975
+ }, p, function() {
976
+ s === 0 && r.opt.noMatch(n), r.opt.done(s);
977
977
  });
978
978
  }
979
979
  }, {
980
980
  key: "mark",
981
- value: function(n, r) {
982
- var i = this;
983
- this.opt = r;
984
- var s = 0, u = "wrapMatches", h = this.getSeparatedKeywords(typeof n == "string" ? [n] : n), f = h.keywords, m = h.length, x = this.opt.caseSensitive ? "" : "i", T = function C(L) {
985
- var R = new RegExp(i.createRegExp(L), "gm" + x), F = 0;
986
- i.log('Searching with expression "' + R + '"'), i[u](R, 1, function(V, ke) {
987
- return i.opt.filter(ke, L, s, F);
988
- }, function(V) {
989
- F++, s++, i.opt.each(V);
981
+ value: function(n, a) {
982
+ var r = this;
983
+ this.opt = a;
984
+ var s = 0, u = "wrapMatches", p = this.getSeparatedKeywords(typeof n == "string" ? [n] : n), h = p.keywords, m = p.length, w = this.opt.caseSensitive ? "" : "i", T = function C(L) {
985
+ var R = new RegExp(r.createRegExp(L), "gm" + w), F = 0;
986
+ r.log('Searching with expression "' + R + '"'), r[u](R, 1, function(H, we) {
987
+ return r.opt.filter(we, L, s, F);
988
+ }, function(H) {
989
+ F++, s++, r.opt.each(H);
990
990
  }, function() {
991
- F === 0 && i.opt.noMatch(L), f[m - 1] === L ? i.opt.done(s) : C(f[f.indexOf(L) + 1]);
991
+ F === 0 && r.opt.noMatch(L), h[m - 1] === L ? r.opt.done(s) : C(h[h.indexOf(L) + 1]);
992
992
  });
993
993
  };
994
- this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) : T(f[0]);
994
+ this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) : T(h[0]);
995
995
  }
996
996
  }, {
997
997
  key: "markRanges",
998
- value: function(n, r) {
999
- var i = this;
1000
- this.opt = r;
998
+ value: function(n, a) {
999
+ var r = this;
1000
+ this.opt = a;
1001
1001
  var s = 0, u = this.checkRanges(n);
1002
- u && u.length ? (this.log("Starting to mark with the following ranges: " + JSON.stringify(u)), this.wrapRangeFromIndex(u, function(h, f, m, x) {
1003
- return i.opt.filter(h, f, m, x);
1004
- }, function(h, f) {
1005
- s++, i.opt.each(h, f);
1002
+ u && u.length ? (this.log("Starting to mark with the following ranges: " + JSON.stringify(u)), this.wrapRangeFromIndex(u, function(p, h, m, w) {
1003
+ return r.opt.filter(p, h, m, w);
1004
+ }, function(p, h) {
1005
+ s++, r.opt.each(p, h);
1006
1006
  }, function() {
1007
- i.opt.done(s);
1007
+ r.opt.done(s);
1008
1008
  })) : this.opt.done(s);
1009
1009
  }
1010
1010
  }, {
1011
1011
  key: "unmark",
1012
1012
  value: function(n) {
1013
- var r = this;
1013
+ var a = this;
1014
1014
  this.opt = n;
1015
- var i = this.opt.element ? this.opt.element : "*";
1016
- i += "[data-markjs]", this.opt.className && (i += "." + this.opt.className), this.log('Removal selector "' + i + '"'), this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT, function(s) {
1017
- r.unwrapMatches(s);
1015
+ var r = this.opt.element ? this.opt.element : "*";
1016
+ r += "[data-markjs]", this.opt.className && (r += "." + this.opt.className), this.log('Removal selector "' + r + '"'), this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT, function(s) {
1017
+ a.unwrapMatches(s);
1018
1018
  }, function(s) {
1019
- var u = y.matches(s, i), h = r.matchesExclude(s);
1020
- return !u || h ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
1019
+ var u = g.matches(s, r), p = a.matchesExclude(s);
1020
+ return !u || p ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
1021
1021
  }, this.opt.done);
1022
1022
  }
1023
1023
  }, {
@@ -1058,92 +1058,126 @@ function On() {
1058
1058
  }, {
1059
1059
  key: "iterator",
1060
1060
  get: function() {
1061
- return new y(this.ctx, this.opt.iframes, this.opt.exclude, this.opt.iframesTimeout);
1061
+ return new g(this.ctx, this.opt.iframes, this.opt.exclude, this.opt.iframesTimeout);
1062
1062
  }
1063
1063
  }]), v;
1064
1064
  })();
1065
1065
  function E(v) {
1066
- var c = this, n = new g(v);
1067
- return this.mark = function(r, i) {
1068
- return n.mark(r, i), c;
1069
- }, this.markRegExp = function(r, i) {
1070
- return n.markRegExp(r, i), c;
1071
- }, this.markRanges = function(r, i) {
1072
- return n.markRanges(r, i), c;
1073
- }, this.unmark = function(r) {
1074
- return n.unmark(r), c;
1066
+ var d = this, n = new y(v);
1067
+ return this.mark = function(a, r) {
1068
+ return n.mark(a, r), d;
1069
+ }, this.markRegExp = function(a, r) {
1070
+ return n.markRegExp(a, r), d;
1071
+ }, this.markRanges = function(a, r) {
1072
+ return n.markRanges(a, r), d;
1073
+ }, this.unmark = function(a) {
1074
+ return n.unmark(a), d;
1075
1075
  }, this;
1076
1076
  }
1077
1077
  return E;
1078
1078
  }));
1079
1079
  })(ce)), ce.exports;
1080
1080
  }
1081
- var Nn = On();
1082
- const Ln = /* @__PURE__ */ Mn(Nn);
1083
- function li(e, t, o) {
1084
- const a = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
1085
- return a === -1 ? !1 : (e.splice(a, 1, o), !0);
1081
+ var Ln = Nn();
1082
+ const Rn = /* @__PURE__ */ Cn(Ln);
1083
+ function fr(e, t, o) {
1084
+ const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
1085
+ return i === -1 ? !1 : (e.splice(i, 1, o), !0);
1086
1086
  }
1087
- function ui(e, t) {
1087
+ function hr(e, t) {
1088
1088
  const o = document.createElement("div");
1089
1089
  o.classList.add("vf-overlay"), o.addEventListener("click", n), document.body.appendChild(o);
1090
- const a = document.createElement("div");
1091
- a.classList.add("vf-context-menu"), a.style.position = "absolute", o.appendChild(a);
1092
- const p = e.currentTarget;
1093
- p.style.userSelect = "none", p.classList.add("context-menu-active"), t.targetClass && p.classList.add(t.targetClass), t.class && a.classList.add(t.class), t.items.forEach((i) => {
1094
- if (i == "-") {
1090
+ const i = document.createElement("div");
1091
+ i.classList.add("vf-context-menu"), i.style.position = "absolute", o.appendChild(i);
1092
+ const c = e.currentTarget;
1093
+ c.style.userSelect = "none", c.classList.add("context-menu-active"), t.targetClass && c.classList.add(t.targetClass), t.class && i.classList.add(t.class), t.items.forEach((r) => {
1094
+ if (r == "-") {
1095
1095
  const u = document.createElement("div");
1096
- u.classList.add("separator"), a.appendChild(u);
1096
+ u.classList.add("separator"), i.appendChild(u);
1097
1097
  return;
1098
1098
  }
1099
1099
  const s = document.createElement("div");
1100
- s.classList.add("item"), s.style.userSelect = "none", s.innerText = i.title, a.appendChild(s), i.class && s.classList.add(i.class), i.shouldConfirm ? s.addEventListener("click", (u) => r(u, s, i.handler)) : s.addEventListener("click", () => i.handler());
1100
+ s.classList.add("item"), s.style.userSelect = "none", s.innerText = r.title, i.appendChild(s), r.class && s.classList.add(r.class), r.shouldConfirm ? s.addEventListener("click", (u) => a(u, s, r.handler)) : s.addEventListener("click", () => r.handler());
1101
1101
  });
1102
- const l = window.innerWidth - e.clientX, y = window.innerHeight - e.clientY, g = a.offsetHeight, E = a.offsetWidth, v = l < E ? e.clientX - E - 1 : e.clientX + 1, c = y < g ? e.clientY - g - 1 : e.clientY + 1;
1103
- a.style.left = v + "px", a.style.top = c + "px", setTimeout(() => {
1104
- a.style.width = a.offsetWidth + "px";
1102
+ const l = window.innerWidth - e.clientX, g = window.innerHeight - e.clientY, y = i.offsetHeight, E = i.offsetWidth, v = l < E ? e.clientX - E - 1 : e.clientX + 1, d = g < y ? e.clientY - y - 1 : e.clientY + 1;
1103
+ i.style.left = v + "px", i.style.top = d + "px", setTimeout(() => {
1104
+ i.style.width = i.offsetWidth + "px";
1105
1105
  }, 50);
1106
1106
  function n() {
1107
- t.targetClass && p.classList.remove(t.targetClass), p.classList.remove("context-menu-active"), p.style.userSelect = "", o.remove();
1107
+ t.targetClass && c.classList.remove(t.targetClass), c.classList.remove("context-menu-active"), c.style.userSelect = "", o.remove();
1108
1108
  }
1109
- function r(i, s, u) {
1109
+ function a(r, s, u) {
1110
1110
  if (s.classList.contains("pending-confirm"))
1111
1111
  return u();
1112
- const h = s.innerHTML;
1112
+ const p = s.innerHTML;
1113
1113
  s.classList.add("pending-confirm"), s.innerText = "Confirm";
1114
- const f = () => {
1115
- s.classList.remove("pending-confirm"), s.innerHTML = h, s.removeEventListener("mouseleave", f);
1114
+ const h = () => {
1115
+ s.classList.remove("pending-confirm"), s.innerHTML = p, s.removeEventListener("mouseleave", h);
1116
1116
  };
1117
- s.addEventListener("mouseleave", f), i.stopPropagation();
1117
+ s.addEventListener("mouseleave", h), r.stopPropagation();
1118
1118
  }
1119
1119
  }
1120
- const Rn = (e) => new Promise((t) => setTimeout(t, e)), ci = (e) => Rn(e * 1e3);
1121
- function Fn(e) {
1120
+ const Fn = (e) => new Promise((t) => setTimeout(t, e)), pr = (e) => Fn(e * 1e3);
1121
+ function An(e) {
1122
1122
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1123
1123
  }
1124
- function di(e, t) {
1124
+ function vr(e, t) {
1125
1125
  return e != null ? Yt(e) : t;
1126
1126
  }
1127
- function fi(e, t) {
1127
+ function mr(e, t) {
1128
1128
  const o = { ...e };
1129
- for (const a of t)
1130
- o[a] === "" && (o[a] = null);
1129
+ for (const i of t)
1130
+ o[i] === "" && (o[i] = null);
1131
1131
  return o;
1132
1132
  }
1133
1133
  function Ye(e) {
1134
1134
  return e != null;
1135
1135
  }
1136
- function hi(e, t) {
1137
- on(e, {
1136
+ function Dn(e) {
1137
+ return Object.keys(e);
1138
+ }
1139
+ function Vn(e, ...t) {
1140
+ return Object.assign(e, ...t);
1141
+ }
1142
+ function gr(e) {
1143
+ return Object.entries(e);
1144
+ }
1145
+ function yr(e, t) {
1146
+ const o = {};
1147
+ for (const i of t)
1148
+ e[i] !== void 0 && (o[i] = e[i]);
1149
+ return o;
1150
+ }
1151
+ function $n(e, t, o) {
1152
+ return o === "matches" && typeof e == "object" && typeof t == "object" ? Xt(e, t) : ge(e, t);
1153
+ }
1154
+ function Hn(e, t, o, i) {
1155
+ const c = {}, l = o ?? Dn(t);
1156
+ for (const g of l)
1157
+ t[g] !== void 0 && !$n(e[g], t[g], i) && (c[g] = t[g]);
1158
+ return c;
1159
+ }
1160
+ function Er(e, t, o, i) {
1161
+ const c = Hn(e, t, o, i);
1162
+ return Vn(e, c), e;
1163
+ }
1164
+ function kr(e, t, o) {
1165
+ return e.reduce(
1166
+ (i, c) => (i[c[t]] = c[o], i),
1167
+ {}
1168
+ );
1169
+ }
1170
+ function xr(e, t) {
1171
+ rn(e, {
1138
1172
  ...t,
1139
- onError(o, a) {
1140
- o instanceof rn && o.response.status === 422 && typeof o.body == "object" && o.body && "error" in o.body && typeof o.body.error == "string" && (o = new ye(o.body.error));
1141
- const p = t.onError?.(o, a);
1142
- return p !== void 0 ? p : o;
1173
+ onError(o, i) {
1174
+ o instanceof an && o.response.status === 422 && typeof o.body == "object" && o.body && "error" in o.body && typeof o.body.error == "string" && (o = new ke(o.body.error));
1175
+ const c = t.onError?.(o, i);
1176
+ return c !== void 0 ? c : o;
1143
1177
  }
1144
1178
  });
1145
1179
  }
1146
- var An = {
1180
+ var Bn = {
1147
1181
  symbol: "$",
1148
1182
  separator: ",",
1149
1183
  decimal: ".",
@@ -1151,41 +1185,41 @@ var An = {
1151
1185
  precision: 2,
1152
1186
  pattern: "!#",
1153
1187
  negativePattern: "-!#",
1154
- format: Vn,
1188
+ format: Pn,
1155
1189
  fromCents: !1
1156
1190
  }, gt = function(t) {
1157
1191
  return Math.round(t);
1158
1192
  }, Fe = function(t) {
1159
1193
  return Math.pow(10, t);
1160
- }, Dn = function(t, o) {
1194
+ }, _n = function(t, o) {
1161
1195
  return gt(t / o) * o;
1162
- }, $n = /(\d)(?=(\d{3})+\b)/g, Hn = /(\d)(?=(\d\d)+\d\b)/g;
1196
+ }, Wn = /(\d)(?=(\d{3})+\b)/g, jn = /(\d)(?=(\d\d)+\d\b)/g;
1163
1197
  function _(e, t) {
1164
1198
  var o = this;
1165
1199
  if (!(o instanceof _))
1166
1200
  return new _(e, t);
1167
- var a = Object.assign({}, An, t), p = Fe(a.precision), l = de(e, a);
1168
- o.intValue = l, o.value = l / p, a.increment = a.increment || 1 / p, a.useVedic ? a.groups = Hn : a.groups = $n, this.s = a, this.p = p;
1201
+ var i = Object.assign({}, Bn, t), c = Fe(i.precision), l = de(e, i);
1202
+ o.intValue = l, o.value = l / c, i.increment = i.increment || 1 / c, i.useVedic ? i.groups = jn : i.groups = Wn, this.s = i, this.p = c;
1169
1203
  }
1170
1204
  function de(e, t) {
1171
- var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, a = 0, p = t.decimal, l = t.errorOnInvalid, y = t.precision, g = t.fromCents, E = Fe(y), v = typeof e == "number", c = e instanceof _;
1172
- if (c && g)
1205
+ var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, i = 0, c = t.decimal, l = t.errorOnInvalid, g = t.precision, y = t.fromCents, E = Fe(g), v = typeof e == "number", d = e instanceof _;
1206
+ if (d && y)
1173
1207
  return e.intValue;
1174
- if (v || c)
1175
- a = c ? e.value : e;
1208
+ if (v || d)
1209
+ i = d ? e.value : e;
1176
1210
  else if (typeof e == "string") {
1177
- var n = new RegExp("[^-\\d" + p + "]", "g"), r = new RegExp("\\" + p, "g");
1178
- a = e.replace(/\((.*)\)/, "-$1").replace(n, "").replace(r, "."), a = a || 0;
1211
+ var n = new RegExp("[^-\\d" + c + "]", "g"), a = new RegExp("\\" + c, "g");
1212
+ i = e.replace(/\((.*)\)/, "-$1").replace(n, "").replace(a, "."), i = i || 0;
1179
1213
  } else {
1180
1214
  if (l)
1181
1215
  throw Error("Invalid Input");
1182
- a = 0;
1216
+ i = 0;
1183
1217
  }
1184
- return g || (a *= E, a = a.toFixed(4)), o ? gt(a) : a;
1218
+ return y || (i *= E, i = i.toFixed(4)), o ? gt(i) : i;
1185
1219
  }
1186
- function Vn(e, t) {
1187
- var o = t.pattern, a = t.negativePattern, p = t.symbol, l = t.separator, y = t.decimal, g = t.groups, E = ("" + e).replace(/^-/, "").split("."), v = E[0], c = E[1];
1188
- return (e.value >= 0 ? o : a).replace("!", p).replace("#", v.replace(g, "$1" + l) + (c ? y + c : ""));
1220
+ function Pn(e, t) {
1221
+ var o = t.pattern, i = t.negativePattern, c = t.symbol, l = t.separator, g = t.decimal, y = t.groups, E = ("" + e).replace(/^-/, "").split("."), v = E[0], d = E[1];
1222
+ return (e.value >= 0 ? o : i).replace("!", c).replace("#", v.replace(y, "$1" + l) + (d ? g + d : ""));
1189
1223
  }
1190
1224
  _.prototype = {
1191
1225
  /**
@@ -1194,8 +1228,8 @@ _.prototype = {
1194
1228
  * @returns {currency}
1195
1229
  */
1196
1230
  add: function(t) {
1197
- var o = this.intValue, a = this.s, p = this.p;
1198
- return _((o += de(t, a)) / (a.fromCents ? 1 : p), a);
1231
+ var o = this.intValue, i = this.s, c = this.p;
1232
+ return _((o += de(t, i)) / (i.fromCents ? 1 : c), i);
1199
1233
  },
1200
1234
  /**
1201
1235
  * Subtracts value.
@@ -1203,8 +1237,8 @@ _.prototype = {
1203
1237
  * @returns {currency}
1204
1238
  */
1205
1239
  subtract: function(t) {
1206
- var o = this.intValue, a = this.s, p = this.p;
1207
- return _((o -= de(t, a)) / (a.fromCents ? 1 : p), a);
1240
+ var o = this.intValue, i = this.s, c = this.p;
1241
+ return _((o -= de(t, i)) / (i.fromCents ? 1 : c), i);
1208
1242
  },
1209
1243
  /**
1210
1244
  * Multiplies values.
@@ -1212,8 +1246,8 @@ _.prototype = {
1212
1246
  * @returns {currency}
1213
1247
  */
1214
1248
  multiply: function(t) {
1215
- var o = this.intValue, a = this.s;
1216
- return _((o *= t) / (a.fromCents ? 1 : Fe(a.precision)), a);
1249
+ var o = this.intValue, i = this.s;
1250
+ return _((o *= t) / (i.fromCents ? 1 : Fe(i.precision)), i);
1217
1251
  },
1218
1252
  /**
1219
1253
  * Divides value.
@@ -1221,8 +1255,8 @@ _.prototype = {
1221
1255
  * @returns {currency}
1222
1256
  */
1223
1257
  divide: function(t) {
1224
- var o = this.intValue, a = this.s;
1225
- return _(o /= de(t, a, !1), a);
1258
+ var o = this.intValue, i = this.s;
1259
+ return _(o /= de(t, i, !1), i);
1226
1260
  },
1227
1261
  /**
1228
1262
  * Takes the currency amount and distributes the values evenly. Any extra pennies
@@ -1231,9 +1265,9 @@ _.prototype = {
1231
1265
  * @returns {array}
1232
1266
  */
1233
1267
  distribute: function(t) {
1234
- for (var o = this.intValue, a = this.p, p = this.s, l = [], y = Math[o >= 0 ? "floor" : "ceil"](o / t), g = Math.abs(o - y * t), E = p.fromCents ? 1 : a; t !== 0; t--) {
1235
- var v = _(y / E, p);
1236
- g-- > 0 && (v = v[o >= 0 ? "add" : "subtract"](1 / E)), l.push(v);
1268
+ for (var o = this.intValue, i = this.p, c = this.s, l = [], g = Math[o >= 0 ? "floor" : "ceil"](o / t), y = Math.abs(o - g * t), E = c.fromCents ? 1 : i; t !== 0; t--) {
1269
+ var v = _(g / E, c);
1270
+ y-- > 0 && (v = v[o >= 0 ? "add" : "subtract"](1 / E)), l.push(v);
1237
1271
  }
1238
1272
  return l;
1239
1273
  },
@@ -1266,8 +1300,8 @@ _.prototype = {
1266
1300
  * @returns {string}
1267
1301
  */
1268
1302
  toString: function() {
1269
- var t = this.intValue, o = this.p, a = this.s;
1270
- return Dn(t / o, a.increment).toFixed(a.precision);
1303
+ var t = this.intValue, o = this.p, i = this.s;
1304
+ return _n(t / o, i.increment).toFixed(i.precision);
1271
1305
  },
1272
1306
  /**
1273
1307
  * Value for JSON serialization.
@@ -1280,56 +1314,56 @@ _.prototype = {
1280
1314
  const A = [];
1281
1315
  for (let e = 0; e < 256; ++e)
1282
1316
  A.push((e + 256).toString(16).slice(1));
1283
- function Bn(e, t = 0) {
1317
+ function Un(e, t = 0) {
1284
1318
  return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
1285
1319
  }
1286
- let Se;
1287
- const _n = new Uint8Array(16);
1288
- function Wn() {
1289
- if (!Se) {
1320
+ let Me;
1321
+ const zn = new Uint8Array(16);
1322
+ function qn() {
1323
+ if (!Me) {
1290
1324
  if (typeof crypto > "u" || !crypto.getRandomValues)
1291
1325
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1292
- Se = crypto.getRandomValues.bind(crypto);
1326
+ Me = crypto.getRandomValues.bind(crypto);
1293
1327
  }
1294
- return Se(_n);
1328
+ return Me(zn);
1295
1329
  }
1296
- const Pn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Xe = { randomUUID: Pn };
1297
- function jn(e, t, o) {
1330
+ const Jn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Xe = { randomUUID: Jn };
1331
+ function Kn(e, t, o) {
1298
1332
  e = e || {};
1299
- const a = e.random ?? e.rng?.() ?? Wn();
1300
- if (a.length < 16)
1333
+ const i = e.random ?? e.rng?.() ?? qn();
1334
+ if (i.length < 16)
1301
1335
  throw new Error("Random bytes length must be >= 16");
1302
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Bn(a);
1336
+ return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Un(i);
1303
1337
  }
1304
- function Un(e, t, o) {
1305
- return Xe.randomUUID && !e ? Xe.randomUUID() : jn(e);
1338
+ function Yn(e, t, o) {
1339
+ return Xe.randomUUID && !e ? Xe.randomUUID() : Kn(e);
1306
1340
  }
1307
- function pi(e) {
1341
+ function wr(e) {
1308
1342
  return e.replace(/\n/g, "<br>");
1309
1343
  }
1310
- function zn(e) {
1344
+ function Xn(e) {
1311
1345
  return e.replace(/_/g, " ");
1312
1346
  }
1313
- function qn(e) {
1347
+ function Zn(e) {
1314
1348
  const t = e.replace(/\D/g, "").replace(/^1/, "");
1315
1349
  return t.length !== 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
1316
1350
  }
1317
- function Jn(e, t) {
1351
+ function Gn(e, t) {
1318
1352
  return _(e).divide(t ?? D.defaultCurrencyDivisor).format();
1319
1353
  }
1320
- function vi() {
1321
- return Un();
1354
+ function br() {
1355
+ return Yn();
1322
1356
  }
1323
- const Kn = ["disabled", "placeholder", "required", "name"], Yn = {
1357
+ const Qn = ["disabled", "placeholder", "required", "name"], eo = {
1324
1358
  key: 0,
1325
1359
  class: "no-results"
1326
- }, Xn = {
1360
+ }, to = {
1327
1361
  key: 0,
1328
1362
  class: "group-title"
1329
- }, Zn = ["onMousemove", "onMousedown"], Gn = ["innerHTML"], Qn = ["innerHTML"], eo = {
1363
+ }, no = ["onMousemove", "onMousedown"], oo = ["innerHTML"], ro = ["innerHTML"], io = {
1330
1364
  key: 1,
1331
1365
  class: "no-results"
1332
- }, to = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", no = /* @__PURE__ */ q({
1366
+ }, ao = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", so = /* @__PURE__ */ q({
1333
1367
  __name: "vf-smart-select",
1334
1368
  props: {
1335
1369
  modelValue: {},
@@ -1366,209 +1400,209 @@ const Kn = ["disabled", "placeholder", "required", "name"], Yn = {
1366
1400
  },
1367
1401
  emits: ["optionsLoaded", "update:modelValue"],
1368
1402
  setup(e, { expose: t, emit: o }) {
1369
- const a = Symbol("null"), p = Symbol("create"), l = e, y = o;
1403
+ const i = /* @__PURE__ */ Symbol("null"), c = /* @__PURE__ */ Symbol("create"), l = e, g = o;
1370
1404
  t({
1371
1405
  addRemoteOption: Bt
1372
1406
  });
1373
- const g = N(), E = N(), v = N(), c = N(!1), n = N(), r = N(!1), i = N(""), s = N(null), u = N(null), h = N(!1), f = N(null), m = N(!1), x = O(() => l.showCreateTextOnNewItem ?? !0), T = O(() => !!(l.options || n.value)), C = O(() => l.options ?? n.value ?? []), L = O(() => l.prependOptions ?? []), R = O(() => l.appendOptions ?? []), F = O(() => !!l.disabled || !T.value && !l.loadOptions), V = O(() => l.loadingText || "..."), ke = O(() => !T.value && (!l.loadOptions || l.preload || l.modelValue && (l.valueField || l.valueExtractor)) ? V.value : l.nullTitle ? l.nullTitle : l.placeholder || ""), It = O(() => l.noResultsText || "No options match your search."), Z = O(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (d) => d[l.valueField] : null), we = O(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (d) => String(d[l.keyField]) : Z.value ? (d) => String(Z.value(d)) : null), Mt = O(() => l.groupFormatter ? l.groupFormatter : l.groupField ? (d) => String(d[l.groupField]) : null), $e = O(() => l.formatter ? l.formatter : l.labelField ? (d) => String(d[l.labelField]) : (d) => String(d)), He = O(() => l.selectionFormatter ? l.selectionFormatter : $e.value), Ve = O(() => [...L.value, ...C.value, ...R.value]), Be = O(() => !!(l.groupField || l.groupFormatter)), xe = O(() => Ve.value.map((d, b) => {
1374
- const k = Mt.value?.(d), w = $e.value(d), M = l.subtitleFormatter?.(d), B = w ? w.trim().toLowerCase() : "", qe = M ? M.trim().toLowerCase() : "", ue = [];
1407
+ const y = N(), E = N(), v = N(), d = N(!1), n = N(), a = N(!1), r = N(""), s = N(null), u = N(null), p = N(!1), h = N(null), m = N(!1), w = O(() => l.showCreateTextOnNewItem ?? !0), T = O(() => !!(l.options || n.value)), C = O(() => l.options ?? n.value ?? []), L = O(() => l.prependOptions ?? []), R = O(() => l.appendOptions ?? []), F = O(() => !!l.disabled || !T.value && !l.loadOptions), H = O(() => l.loadingText || "..."), we = O(() => !T.value && (!l.loadOptions || l.preload || l.modelValue && (l.valueField || l.valueExtractor)) ? H.value : l.nullTitle ? l.nullTitle : l.placeholder || ""), It = O(() => l.noResultsText || "No options match your search."), Z = O(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (f) => f[l.valueField] : null), be = O(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (f) => String(f[l.keyField]) : Z.value ? (f) => String(Z.value(f)) : null), Mt = O(() => l.groupFormatter ? l.groupFormatter : l.groupField ? (f) => String(f[l.groupField]) : null), Ve = O(() => l.formatter ? l.formatter : l.labelField ? (f) => String(f[l.labelField]) : (f) => String(f)), $e = O(() => l.selectionFormatter ? l.selectionFormatter : Ve.value), He = O(() => [...L.value, ...C.value, ...R.value]), Be = O(() => !!(l.groupField || l.groupFormatter)), Te = O(() => He.value.map((f, b) => {
1408
+ const k = Mt.value?.(f), x = Ve.value(f), M = l.subtitleFormatter?.(f), B = x ? x.trim().toLowerCase() : "", qe = M ? M.trim().toLowerCase() : "", ue = [];
1375
1409
  return l.searchFields ? l.searchFields.forEach((Je) => {
1376
- d[Je] && ue.push(
1377
- String(d[Je]).toLowerCase().replace(/^[a-z0-9 ]+$/i, "")
1410
+ f[Je] && ue.push(
1411
+ String(f[Je]).toLowerCase().replace(/^[a-z0-9 ]+$/i, "")
1378
1412
  );
1379
1413
  }) : (ue.push(B), qe && ue.push(qe)), {
1380
- key: we.value?.(d) ?? String(b),
1414
+ key: be.value?.(f) ?? String(b),
1381
1415
  group: k,
1382
- title: w,
1416
+ title: x,
1383
1417
  subtitle: M,
1384
1418
  searchContent: ue.join(""),
1385
- ref: d
1419
+ ref: f
1386
1420
  };
1387
- })), $ = O(() => {
1388
- let d = [...xe.value];
1389
- if (r.value) {
1390
- const b = i.value.trim().toLowerCase().replace(/[^a-z0-9 ]+$/i, "");
1391
- b.length && (d = d.filter((k) => k.searchContent.includes(b)), m.value && (d.find((w) => w.searchContent === b) !== void 0 || d.push({
1392
- key: p,
1393
- title: x.value ? "Create <strong>" + i.value.trim() + "</strong>..." : i.value.trim()
1421
+ })), V = O(() => {
1422
+ let f = [...Te.value];
1423
+ if (a.value) {
1424
+ const b = r.value.trim().toLowerCase().replace(/[^a-z0-9 ]+$/i, "");
1425
+ b.length && (f = f.filter((k) => k.searchContent.includes(b)), m.value && (f.find((x) => x.searchContent === b) !== void 0 || f.push({
1426
+ key: c,
1427
+ title: w.value ? "Create <strong>" + r.value.trim() + "</strong>..." : r.value.trim()
1394
1428
  })));
1395
- } else l.nullTitle && d.unshift({
1396
- key: a,
1429
+ } else l.nullTitle && f.unshift({
1430
+ key: i,
1397
1431
  title: l.nullTitle
1398
1432
  });
1399
- return d;
1433
+ return f;
1400
1434
  }), Ct = O(() => {
1401
1435
  if (!Be.value)
1402
1436
  return [
1403
1437
  {
1404
1438
  groupTitle: "",
1405
- options: $.value
1439
+ options: V.value
1406
1440
  }
1407
1441
  ];
1408
- const d = Xt($.value.map((k) => k.group ?? "")), b = Zt($.value, (k) => k.group ?? "");
1409
- return d.map((k) => ({
1442
+ const f = Zt(V.value.map((k) => k.group ?? "")), b = Gt(V.value, (k) => k.group ?? "");
1443
+ return f.map((k) => ({
1410
1444
  groupTitle: k,
1411
1445
  options: b[k]
1412
1446
  }));
1413
1447
  });
1414
- H(() => l.modelValue, G), H(xe, () => {
1415
- h.value && setTimeout(je, 0);
1416
- }), H(i, () => {
1417
- r.value && !l.remoteSearch && !i.value.trim().length && (r.value = !1);
1418
- }), H(h, () => {
1419
- h.value ? setTimeout($t, 0) : (r.value = !1, i.value = u.value ?? "", v.value && (v.value.style.visibility = "hidden"));
1420
- }), H($, () => {
1421
- l.modelValue !== null && s.value === null && G(), (f.value !== null || r.value) && !$.value.find((d) => d.key == f.value) && (f.value = $.value[0]?.key ?? a);
1448
+ $(() => l.modelValue, G), $(Te, () => {
1449
+ p.value && setTimeout(Pe, 0);
1450
+ }), $(r, () => {
1451
+ a.value && !l.remoteSearch && !r.value.trim().length && (a.value = !1);
1452
+ }), $(p, () => {
1453
+ p.value ? setTimeout(Vt, 0) : (a.value = !1, r.value = u.value ?? "", v.value && (v.value.style.visibility = "hidden"));
1454
+ }), $(V, () => {
1455
+ l.modelValue !== null && s.value === null && G(), (h.value !== null || a.value) && !V.value.find((f) => f.key == h.value) && (h.value = V.value[0]?.key ?? i);
1422
1456
  }), z(async () => {
1423
- m.value = l.onCreateItem !== void 0, l.loadOptions && l.preload ? await _e() : !l.options && !l.loadOptions && (l.valueField || l.valueExtractor) || G(), H(s, () => {
1424
- const d = Ye(s.value) && Z.value !== null ? Z.value(s.value) : s.value;
1425
- Me(l.modelValue, d) || y("update:modelValue", d);
1426
- }), l.remoteSearch && H(i, Gt(Ot, 250));
1427
- }), me(() => {
1457
+ m.value = l.onCreateItem !== void 0, l.loadOptions && l.preload ? await _e() : !l.options && !l.loadOptions && (l.valueField || l.valueExtractor) || G(), $(s, () => {
1458
+ const f = Ye(s.value) && Z.value !== null ? Z.value(s.value) : s.value;
1459
+ ge(l.modelValue, f) || g("update:modelValue", f);
1460
+ }), l.remoteSearch && $(r, Qt(Ot, 250));
1461
+ }), ye(() => {
1428
1462
  v.value?.remove();
1429
1463
  });
1430
1464
  async function _e() {
1431
- await We(!0), G(), n.value && y("optionsLoaded", n.value);
1465
+ await We(!0), G(), n.value && g("optionsLoaded", n.value);
1432
1466
  }
1433
- async function We(d = !1) {
1434
- const b = l.remoteSearch && r.value && i.value.length ? i.value : null;
1435
- c.value = !0, n.value = await l.loadOptions?.(b) ?? [], c.value = !1, d && G(), Pe();
1467
+ async function We(f = !1) {
1468
+ const b = l.remoteSearch && a.value && r.value.length ? r.value : null;
1469
+ d.value = !0, n.value = await l.loadOptions?.(b) ?? [], d.value = !1, f && G(), je();
1436
1470
  }
1437
1471
  function Ot() {
1438
- r.value && (We(), r.value = i.value.trim().length > 0);
1472
+ a.value && (We(), a.value = r.value.trim().length > 0);
1439
1473
  }
1440
- function Nt(d) {
1441
- if (d.key == "Escape") {
1442
- d.stopPropagation(), d.target.blur(), ze();
1474
+ function Nt(f) {
1475
+ if (f.key == "Escape") {
1476
+ f.stopPropagation(), f.target.blur(), ze();
1443
1477
  return;
1444
1478
  }
1445
- if (!(d.key == "ArrowLeft" || d.key == "ArrowRight") && d.key != "Tab") {
1479
+ if (!(f.key == "ArrowLeft" || f.key == "ArrowRight") && f.key != "Tab") {
1446
1480
  if (!T.value) {
1447
- r.value || d.preventDefault();
1481
+ a.value || f.preventDefault();
1448
1482
  return;
1449
1483
  }
1450
- if (d.key == "ArrowUp" || d.key == "ArrowDown")
1451
- return d.preventDefault(), be(d.key == "ArrowUp" ? -1 : 1);
1452
- if (d.key == "PageUp" || d.key == "PageDown")
1453
- return d.preventDefault(), be(d.key == "PageUp" ? -10 : 10);
1454
- if (d.key == "Home" || d.key == "End")
1455
- return d.preventDefault(), be(d.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
1456
- if (d.key == "Enter") {
1457
- d.preventDefault();
1458
- const b = $.value.find((k) => k.key == f.value);
1484
+ if (f.key == "ArrowUp" || f.key == "ArrowDown")
1485
+ return f.preventDefault(), Se(f.key == "ArrowUp" ? -1 : 1);
1486
+ if (f.key == "PageUp" || f.key == "PageDown")
1487
+ return f.preventDefault(), Se(f.key == "PageUp" ? -10 : 10);
1488
+ if (f.key == "Home" || f.key == "End")
1489
+ return f.preventDefault(), Se(f.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
1490
+ if (f.key == "Enter") {
1491
+ f.preventDefault();
1492
+ const b = V.value.find((k) => k.key == h.value);
1459
1493
  if (b) return Ue(b);
1460
1494
  }
1461
- if (d.key === "Delete" || d.key === "Backspace") {
1462
- i.value.length > 1 && (r.value = !0);
1495
+ if (f.key === "Delete" || f.key === "Backspace") {
1496
+ r.value.length > 1 && (a.value = !0);
1463
1497
  return;
1464
1498
  }
1465
- !d.metaKey && to.includes(d.key) && (r.value = !0);
1499
+ !f.metaKey && ao.includes(f.key) && (a.value = !0);
1466
1500
  }
1467
1501
  }
1468
1502
  function Lt() {
1469
- r.value = !0;
1503
+ a.value = !0;
1470
1504
  }
1471
1505
  function Rt() {
1472
- Pe(), h.value = !0, setTimeout(() => E.value?.select(), 0);
1506
+ je(), p.value = !0, setTimeout(() => E.value?.select(), 0);
1473
1507
  }
1474
- function Pe(d) {
1475
- s.value ? f.value = Ft(s.value) : l.nullTitle && (f.value = a);
1508
+ function je(f) {
1509
+ s.value ? h.value = Ft(s.value) : l.nullTitle && (h.value = i);
1476
1510
  }
1477
- function Ft(d) {
1478
- return we.value ? we.value(s.value) : At(d)?.key ?? "";
1511
+ function Ft(f) {
1512
+ return be.value ? be.value(s.value) : At(f)?.key ?? "";
1479
1513
  }
1480
- function At(d) {
1481
- const b = $.value.find((M) => M.ref === d);
1514
+ function At(f) {
1515
+ const b = V.value.find((M) => M.ref === f);
1482
1516
  if (b)
1483
1517
  return b;
1484
- const k = l.keyExtractor ? (M, B) => l.keyExtractor(M) === l.keyExtractor(B) : Me, w = $.value.find((M) => k(M.ref, d));
1485
- return w || null;
1518
+ const k = l.keyExtractor ? (M, B) => l.keyExtractor(M) === l.keyExtractor(B) : ge, x = V.value.find((M) => k(M.ref, f));
1519
+ return x || null;
1486
1520
  }
1487
1521
  function Dt() {
1488
- l.debug || (!i.value.length && l.nullTitle && (s.value = null, u.value = null), h.value = !1);
1522
+ l.debug || (!r.value.length && l.nullTitle && (s.value = null, u.value = null), p.value = !1);
1489
1523
  }
1490
- function $t() {
1491
- T.value || _e(), l.optionsListId && v.value?.setAttribute("id", l.optionsListId), Ht();
1524
+ function Vt() {
1525
+ T.value || _e(), l.optionsListId && v.value?.setAttribute("id", l.optionsListId), $t();
1492
1526
  }
1493
- function Ht() {
1494
- const d = g.value.getBoundingClientRect(), b = d.y + d.height + 2, k = d.x, w = v.value, M = window.getComputedStyle(g.value);
1527
+ function $t() {
1528
+ const f = y.value.getBoundingClientRect(), b = f.y + f.height + 2, k = f.x, x = v.value, M = window.getComputedStyle(y.value);
1495
1529
  for (let B in M)
1496
- /^(font|text)/.test(B) && (w.style[B] = M[B]);
1497
- if (w.style.top = b + "px", w.style.left = k + "px", w.style.minWidth = d.width + "px", !M.maxHeight || M.maxHeight == "none") {
1530
+ /^(font|text)/.test(B) && (x.style[B] = M[B]);
1531
+ if (x.style.top = b + "px", x.style.left = k + "px", x.style.minWidth = f.width + "px", !M.maxHeight || M.maxHeight == "none") {
1498
1532
  const B = window.innerHeight - b - 12;
1499
- w.style.maxHeight = B + "px";
1533
+ x.style.maxHeight = B + "px";
1500
1534
  }
1501
- w.style.visibility = "visible", document.body.appendChild(w), setTimeout(je, 0);
1535
+ x.style.visibility = "visible", document.body.appendChild(x), setTimeout(Pe, 0);
1502
1536
  }
1503
- function je() {
1504
- if (!T.value || !f.value) return;
1505
- const d = $.value.findIndex((w) => w.key == f.value), b = v.value, k = b?.querySelectorAll(".option")[d];
1537
+ function Pe() {
1538
+ if (!T.value || !h.value) return;
1539
+ const f = V.value.findIndex((x) => x.key == h.value), b = v.value, k = b?.querySelectorAll(".option")[f];
1506
1540
  k && (b.scrollTop = k.offsetTop);
1507
1541
  }
1508
- function Vt(d) {
1509
- f.value = d ? d.key : null;
1542
+ function Ht(f) {
1543
+ h.value = f ? f.key : null;
1510
1544
  }
1511
- function be(d) {
1512
- const b = $.value.findIndex((B) => B.key == f.value);
1513
- let k = b + d;
1514
- if (k < 0 ? k = 0 : k >= $.value.length && (k = $.value.length - 1), b == k) return;
1515
- f.value = $.value[k].key;
1516
- const w = v.value, M = w?.querySelectorAll(".option")[k];
1517
- M && (M.offsetTop < w.scrollTop ? w.scrollTop = M.offsetTop : M.offsetTop + M.offsetHeight > w.scrollTop + w.clientHeight && (w.scrollTop = M.offsetTop + M.offsetHeight - w.clientHeight));
1545
+ function Se(f) {
1546
+ const b = V.value.findIndex((B) => B.key == h.value);
1547
+ let k = b + f;
1548
+ if (k < 0 ? k = 0 : k >= V.value.length && (k = V.value.length - 1), b == k) return;
1549
+ h.value = V.value[k].key;
1550
+ const x = v.value, M = x?.querySelectorAll(".option")[k];
1551
+ M && (M.offsetTop < x.scrollTop ? x.scrollTop = M.offsetTop : M.offsetTop + M.offsetHeight > x.scrollTop + x.clientHeight && (x.scrollTop = M.offsetTop + M.offsetHeight - x.clientHeight));
1518
1552
  }
1519
- function Ue(d) {
1520
- if (r.value = !1, d.key === a)
1521
- i.value = "", s.value = null, u.value = null;
1522
- else if (d.key === p) {
1523
- const b = i.value.trim();
1524
- i.value = "", s.value = null, u.value = null, l.onCreateItem?.(b);
1553
+ function Ue(f) {
1554
+ if (a.value = !1, f.key === i)
1555
+ r.value = "", s.value = null, u.value = null;
1556
+ else if (f.key === c) {
1557
+ const b = r.value.trim();
1558
+ r.value = "", s.value = null, u.value = null, l.onCreateItem?.(b);
1525
1559
  } else {
1526
- const k = xe.value.find((w) => w.key == d.key).ref;
1527
- s.value = k, u.value = He.value(k), i.value = u.value ?? "";
1560
+ const k = Te.value.find((x) => x.key == f.key).ref;
1561
+ s.value = k, u.value = $e.value(k), r.value = u.value ?? "";
1528
1562
  }
1529
1563
  E.value?.blur(), ze();
1530
1564
  }
1531
1565
  function G() {
1532
- l.modelValue !== null ? (s.value = Z.value ? Ve.value.find((d) => l.modelValue === Z.value(d)) : l.modelValue, u.value = Ye(s.value) ? He.value(s.value) : null, i.value = u.value ?? "") : (s.value = null, u.value = null, i.value = "");
1566
+ l.modelValue !== null ? (s.value = Z.value ? He.value.find((f) => l.modelValue === Z.value(f)) : l.modelValue, u.value = Ye(s.value) ? $e.value(s.value) : null, r.value = u.value ?? "") : (s.value = null, u.value = null, r.value = "");
1533
1567
  }
1534
- function Bt(d) {
1535
- n.value.unshift(d);
1568
+ function Bt(f) {
1569
+ n.value.unshift(f);
1536
1570
  }
1537
1571
  function ze() {
1538
1572
  if (!l.autoNext) return;
1539
- let d = g.value?.parentElement;
1540
- for (; d && d.tagName !== "FORM" && d.tagName !== "BODY"; )
1541
- d = d.parentElement;
1542
- if (!d) return;
1543
- const b = d.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
1573
+ let f = y.value?.parentElement;
1574
+ for (; f && f.tagName !== "FORM" && f.tagName !== "BODY"; )
1575
+ f = f.parentElement;
1576
+ if (!f) return;
1577
+ const b = f.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
1544
1578
  if (!b) return;
1545
- const k = Array.from(b).findIndex((M) => M === E.value), w = b[k + 1];
1546
- w && setTimeout(() => w.focus(), 0);
1579
+ const k = Array.from(b).findIndex((M) => M === E.value), x = b[k + 1];
1580
+ x && setTimeout(() => x.focus(), 0);
1547
1581
  }
1548
1582
  return Jt(() => {
1549
- if (!h.value || !r.value || !i.value) return;
1550
- const d = i.value.trim().replace(/[^a-z0-9 -]/gi, "").split(" ");
1583
+ if (!p.value || !a.value || !r.value) return;
1584
+ const f = r.value.trim().replace(/[^a-z0-9 -]/gi, "").split(" ");
1551
1585
  v.value?.querySelectorAll(".option").forEach((b) => {
1552
- const k = new Ln(b);
1553
- k.unmark(), k.mark(d, {
1586
+ const k = new Rn(b);
1587
+ k.unmark(), k.mark(f, {
1554
1588
  done: () => {
1555
1589
  b.innerHTML = b.innerHTML.replace(/ <mark /g, "&nbsp;<mark ").replace(/<\/mark> /g, "</mark>&nbsp;");
1556
1590
  }
1557
1591
  });
1558
1592
  });
1559
- }), (d, b) => (S(), I("div", {
1593
+ }), (f, b) => (S(), I("div", {
1560
1594
  ref_key: "el",
1561
- ref: g,
1562
- class: P(["vf-smart-select", { disabled: F.value, open: h.value }])
1595
+ ref: y,
1596
+ class: j(["vf-smart-select", { disabled: F.value, open: p.value }])
1563
1597
  }, [
1564
1598
  fe(U("input", {
1565
1599
  ref_key: "searchField",
1566
1600
  ref: E,
1567
- "onUpdate:modelValue": b[0] || (b[0] = (k) => i.value = k),
1601
+ "onUpdate:modelValue": b[0] || (b[0] = (k) => r.value = k),
1568
1602
  type: "text",
1569
1603
  disabled: F.value,
1570
- class: P({ nullable: !!e.nullTitle }),
1571
- placeholder: ke.value,
1604
+ class: j({ nullable: !!e.nullTitle }),
1605
+ placeholder: we.value,
1572
1606
  required: e.required,
1573
1607
  name: e.name,
1574
1608
  "data-1p-ignore": "",
@@ -1576,54 +1610,54 @@ const Kn = ["disabled", "placeholder", "required", "name"], Yn = {
1576
1610
  onPaste: Lt,
1577
1611
  onFocus: Rt,
1578
1612
  onBlur: Dt
1579
- }, null, 42, Kn), [
1580
- [Kt, i.value]
1613
+ }, null, 42, Qn), [
1614
+ [Kt, r.value]
1581
1615
  ]),
1582
- h.value ? (S(), I("div", {
1616
+ p.value ? (S(), I("div", {
1583
1617
  key: 0,
1584
1618
  ref_key: "optionsContainer",
1585
1619
  ref: v,
1586
- class: P(["vf-smart-select-options", { grouped: Be.value }])
1620
+ class: j(["vf-smart-select-options", { grouped: Be.value }])
1587
1621
  }, [
1588
1622
  T.value ? (S(!0), I(he, { key: 1 }, pe(Ct.value, (k) => (S(), I("div", {
1589
1623
  key: k.groupTitle,
1590
1624
  class: "group"
1591
1625
  }, [
1592
- k.groupTitle ? (S(), I("div", Xn, [
1593
- K(d.$slots, "group", {
1626
+ k.groupTitle ? (S(), I("div", to, [
1627
+ K(f.$slots, "group", {
1594
1628
  group: k.groupTitle
1595
1629
  }, () => [
1596
1630
  te(J(k.groupTitle), 1)
1597
1631
  ])
1598
1632
  ])) : W("", !0),
1599
- (S(!0), I(he, null, pe(k.options, (w) => (S(), I("div", {
1600
- key: w.key,
1601
- class: P(["option", [f.value === w.key && "highlighted", w.ref && e.classForOption?.(w.ref)]]),
1602
- onMousemove: (M) => Vt(w),
1603
- onMousedown: (M) => Ue(w)
1633
+ (S(!0), I(he, null, pe(k.options, (x) => (S(), I("div", {
1634
+ key: x.key,
1635
+ class: j(["option", [h.value === x.key && "highlighted", x.ref && e.classForOption?.(x.ref)]]),
1636
+ onMousemove: (M) => Ht(x),
1637
+ onMousedown: (M) => Ue(x)
1604
1638
  }, [
1605
- K(d.$slots, "option", { option: w }, () => [
1639
+ K(f.$slots, "option", { option: x }, () => [
1606
1640
  U("div", {
1607
1641
  class: "title",
1608
- innerHTML: w.title
1609
- }, null, 8, Gn),
1610
- w.subtitle ? (S(), I("div", {
1642
+ innerHTML: x.title
1643
+ }, null, 8, oo),
1644
+ x.subtitle ? (S(), I("div", {
1611
1645
  key: 0,
1612
1646
  class: "subtitle",
1613
- innerHTML: w.subtitle
1614
- }, null, 8, Qn)) : W("", !0)
1647
+ innerHTML: x.subtitle
1648
+ }, null, 8, ro)) : W("", !0)
1615
1649
  ])
1616
- ], 42, Zn))), 128)),
1617
- !$.value.length && i.value ? (S(), I("div", eo, [
1618
- K(d.$slots, "no-results", {}, () => [
1650
+ ], 42, no))), 128)),
1651
+ !V.value.length && r.value ? (S(), I("div", io, [
1652
+ K(f.$slots, "no-results", {}, () => [
1619
1653
  te(J(It.value), 1)
1620
1654
  ])
1621
1655
  ])) : W("", !0)
1622
- ]))), 128)) : (S(), I("div", Yn, "Loading..."))
1656
+ ]))), 128)) : (S(), I("div", eo, "Loading..."))
1623
1657
  ], 2)) : W("", !0)
1624
1658
  ], 2));
1625
1659
  }
1626
- }), mi = /* @__PURE__ */ q({
1660
+ }), Tr = /* @__PURE__ */ q({
1627
1661
  __name: "vf-ez-smart-select",
1628
1662
  props: {
1629
1663
  modelValue: {},
@@ -1635,39 +1669,36 @@ const Kn = ["disabled", "placeholder", "required", "name"], Yn = {
1635
1669
  },
1636
1670
  emits: ["update:modelValue"],
1637
1671
  setup(e, { emit: t }) {
1638
- const o = e, a = O(() => Array.isArray(o.options) ? o.options.map((g) => ({ value: g, label: String(g) })) : Object.entries(o.options).map(([g, E]) => ({
1639
- value: g,
1672
+ const o = e, i = O(() => Array.isArray(o.options) ? o.options.map((y) => ({ value: y, label: String(y) })) : Object.entries(o.options).map(([y, E]) => ({
1673
+ value: y,
1640
1674
  label: E
1641
- }))), p = O(() => o.formatter ? (g) => o.formatter(g.label, g.value) : (g) => g.label), l = t, y = N(a.value.find((g) => g.value === o.modelValue) ?? null);
1642
- return H(
1675
+ }))), c = O(() => o.formatter ? (y) => o.formatter(y.label, y.value) : (y) => y.label), l = t, g = N(i.value.find((y) => y.value === o.modelValue) ?? null);
1676
+ return $(
1643
1677
  () => o.modelValue,
1644
- (g) => {
1645
- y.value = a.value.find((E) => E.value === g) ?? null;
1678
+ (y) => {
1679
+ g.value = i.value.find((E) => E.value === y) ?? null;
1646
1680
  }
1647
- ), H(y, (g) => {
1648
- const E = g ? a.value.find((v) => Me(v, g))?.value : null;
1681
+ ), $(g, (y) => {
1682
+ const E = y ? i.value.find((v) => ge(v, y))?.value : null;
1649
1683
  l("update:modelValue", E ?? null);
1650
- }), (g, E) => (S(), lt(no, {
1651
- modelValue: y.value,
1652
- "onUpdate:modelValue": E[0] || (E[0] = (v) => y.value = v),
1653
- options: a.value,
1654
- formatter: p.value,
1684
+ }), (y, E) => (S(), lt(so, {
1685
+ modelValue: g.value,
1686
+ "onUpdate:modelValue": E[0] || (E[0] = (v) => g.value = v),
1687
+ options: i.value,
1688
+ formatter: c.value,
1655
1689
  "null-title": e.nullTitle,
1656
1690
  placeholder: e.placeholder,
1657
1691
  name: e.name
1658
1692
  }, null, 8, ["modelValue", "options", "formatter", "null-title", "placeholder", "name"]));
1659
1693
  }
1660
1694
  });
1661
- function gi() {
1695
+ function Sr() {
1662
1696
  return N();
1663
1697
  }
1664
- const oo = { class: "content" }, io = { class: "message" }, ro = {
1665
- key: 0,
1666
- class: "close"
1667
- }, ao = {
1698
+ const lo = { class: "content" }, uo = { class: "message" }, co = {
1668
1699
  key: 0,
1669
1700
  class: "progress-bar"
1670
- }, so = /* @__PURE__ */ q({
1701
+ }, fo = /* @__PURE__ */ q({
1671
1702
  __name: "vf-toast",
1672
1703
  props: {
1673
1704
  position: {},
@@ -1683,121 +1714,128 @@ const oo = { class: "content" }, io = { class: "message" }, ro = {
1683
1714
  function o() {
1684
1715
  t.onClick ? (t.onClick(), t.callback()) : t.disableClose || t.callback();
1685
1716
  }
1686
- const a = N();
1717
+ function i() {
1718
+ t.callback();
1719
+ }
1720
+ const c = N();
1687
1721
  return t.durationSecs !== null && z(() => {
1688
- const p = t.durationSecs ?? 5;
1689
- a.value?.animate([{ width: "0%" }, { width: "100%" }], {
1690
- duration: p * 1e3,
1722
+ const l = t.durationSecs ?? 5;
1723
+ c.value?.animate([{ width: "0%" }, { width: "100%" }], {
1724
+ duration: l * 1e3,
1691
1725
  easing: "linear"
1692
- }), setTimeout(() => t.callback(), p * 1e3);
1693
- }), (p, l) => (S(), I("div", {
1694
- class: P(["vf-toast", [e.className, { top: e.position === "top", bottom: e.position !== "top" }]]),
1695
- onClick: Le(o, ["stop"])
1726
+ }), setTimeout(() => t.callback(), l * 1e3);
1727
+ }), (l, g) => (S(), I("div", {
1728
+ class: j(["vf-toast", [e.className, { top: e.position === "top", bottom: e.position !== "top" }]]),
1729
+ onClick: ve(o, ["stop"])
1696
1730
  }, [
1697
- U("div", oo, [
1698
- U("div", io, J(e.message), 1),
1699
- e.disableClose ? W("", !0) : (S(), I("div", ro, "x"))
1731
+ U("div", lo, [
1732
+ U("div", uo, J(e.message), 1),
1733
+ e.disableClose ? W("", !0) : (S(), I("div", {
1734
+ key: 0,
1735
+ class: "close",
1736
+ onClick: ve(i, ["stop"])
1737
+ }, "x"))
1700
1738
  ]),
1701
- e.durationSecs !== null ? (S(), I("div", ao, [
1739
+ e.durationSecs !== null ? (S(), I("div", co, [
1702
1740
  U("div", {
1703
1741
  ref_key: "progressInnerEl",
1704
- ref: a,
1742
+ ref: c,
1705
1743
  class: "inner"
1706
1744
  }, null, 512)
1707
1745
  ])) : W("", !0)
1708
1746
  ], 2));
1709
1747
  }
1710
1748
  });
1711
- function yi(e) {
1712
- const t = ge(so, {
1749
+ function Ir(e) {
1750
+ const t = Ee(fo, {
1713
1751
  ...e,
1714
- callback: () => re(t)
1752
+ callback: () => ie(t)
1715
1753
  });
1716
- return () => re(t);
1754
+ return () => ie(t);
1717
1755
  }
1718
- function lo(e) {
1719
- const t = Math.floor(Math.log(e) / Math.log(1024)), a = (e / Math.pow(1024, t)).toFixed(2), p = ["B", "KB", "MB", "GB", "TB"][t];
1720
- return `${a} ${p}`;
1756
+ function ho(e) {
1757
+ const t = Math.floor(Math.log(e) / Math.log(1024)), i = (e / Math.pow(1024, t)).toFixed(2), c = ["B", "KB", "MB", "GB", "TB"][t];
1758
+ return `${i} ${c}`;
1721
1759
  }
1722
- function uo(e) {
1760
+ function po(e) {
1723
1761
  return e != null && String(e).length ? e : "-";
1724
1762
  }
1725
- function co(e) {
1763
+ function vo(e) {
1726
1764
  return e || "-";
1727
1765
  }
1728
- function fo(e) {
1729
- return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Fn(Number(e));
1766
+ function mo(e) {
1767
+ return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : An(Number(e));
1730
1768
  }
1731
- function ho(e) {
1732
- return e && qn(e);
1769
+ function go(e) {
1770
+ return e && Zn(e);
1733
1771
  }
1734
- function po(e) {
1735
- return e ? en(e) : null;
1772
+ function yo(e) {
1773
+ return e ? tn(e) : null;
1736
1774
  }
1737
1775
  function yt(e) {
1738
- return e ? Qt(e) : null;
1776
+ return e ? en(e) : null;
1739
1777
  }
1740
- function vo(e) {
1778
+ function Eo(e) {
1741
1779
  return e ? e.toUpperCase() : null;
1742
1780
  }
1743
- function mo(e) {
1781
+ function ko(e) {
1744
1782
  return e ? yt(e.toLowerCase()) : null;
1745
1783
  }
1746
- function go(e) {
1747
- return e ? zn(e) : null;
1784
+ function xo(e) {
1785
+ return e ? Xn(e) : null;
1748
1786
  }
1749
- function yo(e, t) {
1750
- return Jn(e, t);
1787
+ function wo(e, t) {
1788
+ return Gn(e, t);
1751
1789
  }
1752
- function Eo(e, t) {
1790
+ function bo(e, t) {
1753
1791
  return _(e).divide(t).value;
1754
1792
  }
1755
- function ko(e, t) {
1793
+ function To(e, t) {
1756
1794
  return e && X(new Date(e), t ?? D.defaultDateFormat);
1757
1795
  }
1758
- function wo(e, t) {
1796
+ function So(e, t) {
1759
1797
  return e && X(new Date(e), t ?? D.defaultTimeFormat);
1760
1798
  }
1761
- function xo(e, t) {
1799
+ function Io(e, t) {
1762
1800
  return e && X(new Date(e), t ?? `${D.defaultDateFormat} ${D.defaultTimeFormat}`);
1763
1801
  }
1764
- function bo(e) {
1765
- return e && X(an(sn(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), D.defaultDateFormat);
1802
+ function Mo(e) {
1803
+ return e && X(sn(ln(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), D.defaultDateFormat);
1766
1804
  }
1767
1805
  const Ze = {
1768
- bytes: lo,
1769
- dash: uo,
1770
- dashZeros: co,
1771
- number: fo,
1772
- phone: ho,
1773
- upperFirst: po,
1806
+ bytes: ho,
1807
+ dash: po,
1808
+ dashZeros: vo,
1809
+ number: mo,
1810
+ phone: go,
1811
+ upperFirst: yo,
1774
1812
  startCase: yt,
1775
- upperCase: vo,
1776
- upperWords: mo,
1777
- desnake: go,
1778
- usCurrency: yo,
1779
- divide: Eo,
1780
- date: ko,
1781
- time: wo,
1782
- dateTime: xo,
1783
- oneDayForward: bo
1784
- }, Ei = (e) => ({
1813
+ upperCase: Eo,
1814
+ upperWords: ko,
1815
+ desnake: xo,
1816
+ usCurrency: wo,
1817
+ divide: bo,
1818
+ date: To,
1819
+ time: So,
1820
+ dateTime: Io,
1821
+ oneDayForward: Mo
1822
+ }, Mr = (e) => ({
1785
1823
  ...Ze,
1786
1824
  ...e(Ze)
1787
- }), Ae = Symbol("HookState");
1788
- function ki(e, t) {
1789
- const o = t ?? Ne();
1790
- z(() => To(o, e), o), ut(() => So(o), o), ct(() => Ge(o), o), me(() => Ge(o), o);
1825
+ }), Ae = /* @__PURE__ */ Symbol("HookState");
1826
+ function Cr(e, t) {
1827
+ const o = t ?? Le();
1828
+ z(() => Co(o, e), o), ut(() => Oo(o), o), ct(() => Ge(o), o), ye(() => Ge(o), o);
1791
1829
  }
1792
- function To(e, t) {
1830
+ function Co(e, t) {
1793
1831
  const o = {};
1794
1832
  if (t.elScrolledToBottom && (o.el = new oe(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1795
- const a = Et(e.vnode.el);
1796
- a ? o.ancestor = new oe(a, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1833
+ const i = Et(e.vnode.el);
1834
+ i ? o.ancestor = new oe(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1797
1835
  }
1798
1836
  t.windowScrolledToBottom && (o.window = new oe(window, t.windowScrolledToBottom)), e[Ae] = o;
1799
1837
  }
1800
- function So(e) {
1838
+ function Oo(e) {
1801
1839
  const t = e[Ae];
1802
1840
  t?.el?.install(), t?.ancestor?.install(), t?.window?.install();
1803
1841
  }
@@ -1805,12 +1843,12 @@ function Ge(e) {
1805
1843
  const t = e[Ae];
1806
1844
  t?.el?.uninstall(), t?.ancestor?.uninstall(), t?.window?.uninstall();
1807
1845
  }
1808
- const Ie = ["auto", "scroll"];
1846
+ const Ce = ["auto", "scroll"];
1809
1847
  function Et(e) {
1810
1848
  const t = e.parentElement;
1811
1849
  if (!t) return null;
1812
1850
  const o = window.getComputedStyle(t);
1813
- return Ie.includes(o.overflow) || Ie.includes(o.overflowX) || Ie.includes(o.overflowY) ? t : Et(t);
1851
+ return Ce.includes(o.overflow) || Ce.includes(o.overflowX) || Ce.includes(o.overflowY) ? t : Et(t);
1814
1852
  }
1815
1853
  class oe {
1816
1854
  constructor(t, o) {
@@ -1828,46 +1866,46 @@ class oe {
1828
1866
  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);
1829
1867
  }
1830
1868
  }
1831
- function wi(e) {
1832
- z(() => window.addEventListener("resize", e)), ut(() => window.addEventListener("resize", e)), ct(() => window.removeEventListener("resize", e)), me(() => window.removeEventListener("resize", e));
1869
+ function Or(e) {
1870
+ z(() => window.addEventListener("resize", e)), ut(() => window.addEventListener("resize", e)), ct(() => window.removeEventListener("resize", e)), ye(() => window.removeEventListener("resize", e));
1833
1871
  }
1834
- const Io = {
1872
+ const No = {
1835
1873
  mounted: et,
1836
1874
  updated: et
1837
- }, Qe = Symbol("HasAutoFocused");
1875
+ }, Qe = /* @__PURE__ */ Symbol("HasAutoFocused");
1838
1876
  function et(e, t) {
1839
1877
  if (t.value === void 0 && e[Qe] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
1840
1878
  e[Qe] = !0;
1841
1879
  const o = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
1842
1880
  setTimeout(() => o.focus(), 10);
1843
1881
  }
1844
- const Mo = {
1845
- mounted: Co
1846
- }, Q = Symbol("ConfirmState");
1847
- function Co(e, t) {
1882
+ const Lo = {
1883
+ mounted: Ro
1884
+ }, Q = /* @__PURE__ */ Symbol("ConfirmState");
1885
+ function Ro(e, t) {
1848
1886
  e.addEventListener("click", (o) => {
1849
- const a = Date.now(), p = t.value?.text !== void 0 ? t.value.text : "Confirm";
1887
+ const i = Date.now(), c = t.value?.text !== void 0 ? t.value.text : "Confirm";
1850
1888
  if (e[Q]) {
1851
- if (a - e[Q].initTime < 300)
1889
+ if (i - e[Q].initTime < 300)
1852
1890
  return;
1853
1891
  e[Q].resetHandler(), e.dispatchEvent(new Event("confirm"));
1854
1892
  return;
1855
1893
  }
1856
1894
  o.preventDefault(), o.stopImmediatePropagation();
1857
1895
  const l = {
1858
- initTime: a,
1896
+ initTime: i,
1859
1897
  preconfirmHtml: e.innerHTML,
1860
1898
  resetHandler: () => {
1861
- p && (e.innerHTML = l.preconfirmHtml), t.value?.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", l.resetHandler), delete e[Q];
1899
+ c && (e.innerHTML = l.preconfirmHtml), t.value?.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", l.resetHandler), delete e[Q];
1862
1900
  }
1863
1901
  };
1864
- e[Q] = l, p && (e.innerHTML = p), t.value?.class && e.classList.add(t.value.class), e.addEventListener("mouseout", l.resetHandler);
1902
+ e[Q] = l, c && (e.innerHTML = c), t.value?.class && e.classList.add(t.value.class), e.addEventListener("mouseout", l.resetHandler);
1865
1903
  });
1866
1904
  }
1867
- const Oo = {
1868
- beforeMount: No
1905
+ const Fo = {
1906
+ beforeMount: Ao
1869
1907
  };
1870
- function No(e) {
1908
+ function Ao(e) {
1871
1909
  e.addEventListener("blur", () => {
1872
1910
  let t = e.value;
1873
1911
  /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + X(/* @__PURE__ */ new Date(), "yy"));
@@ -1875,105 +1913,105 @@ function No(e) {
1875
1913
  isNaN(o) ? e.value = "" : e.value = X(o, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1876
1914
  });
1877
1915
  }
1878
- const Lo = {
1916
+ const Do = {
1879
1917
  beforeMount: tt,
1880
1918
  updated: tt
1881
1919
  };
1882
1920
  function tt(e, t) {
1883
- t.value == t.oldValue && e.innerHTML.length || (e.innerText = Ro(e, t));
1921
+ t.value == t.oldValue && e.innerHTML.length || (e.innerText = Vo(e, t));
1884
1922
  }
1885
- function Ro(e, t) {
1923
+ function Vo(e, t) {
1886
1924
  if (!t.value)
1887
1925
  return e.attributes.getNamedItem("placeholder")?.value ?? "";
1888
1926
  let o = "";
1889
- const a = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), p = e.attributes.getNamedItem("local") !== null ? a.replace(/Z$/, "") : a.replace(/(Z|\+00:00)?$/, "Z"), l = new Date(p);
1927
+ const i = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), c = e.attributes.getNamedItem("local") !== null ? i.replace(/Z$/, "") : i.replace(/(Z|\+00:00)?$/, "Z"), l = new Date(c);
1890
1928
  e.attributes.getNamedItem("display-utc") !== null && l.setMinutes(l.getMinutes() - l.getTimezoneOffset());
1891
- let y = e.attributes.getNamedItem("format")?.value;
1892
- const g = e.attributes.getNamedItem("date-only") !== null;
1893
- if (!y && e.attributes.getNamedItem("relative-date") !== null) {
1929
+ let g = e.attributes.getNamedItem("format")?.value;
1930
+ const y = e.attributes.getNamedItem("date-only") !== null;
1931
+ if (!g && e.attributes.getNamedItem("relative-date") !== null) {
1894
1932
  const v = /* @__PURE__ */ new Date();
1895
- v.getFullYear() === l.getFullYear() && v.getMonth() === l.getMonth() && v.getDate() === l.getDate() && (o = "at", y = "HH:mm");
1933
+ v.getFullYear() === l.getFullYear() && v.getMonth() === l.getMonth() && v.getDate() === l.getDate() && (o = "at", g = "HH:mm");
1896
1934
  }
1897
- if (!y && e.attributes.getNamedItem("simplified-date") !== null) {
1935
+ if (!g && e.attributes.getNamedItem("simplified-date") !== null) {
1898
1936
  let v = null;
1899
- const c = /* @__PURE__ */ new Date();
1900
- c.getFullYear() === l.getFullYear() ? (c.getMonth() !== l.getMonth() || c.getDate() !== l.getDate()) && (v = "M/d") : v = "M/d/yy";
1901
- const n = g ? null : D.defaultTimeFormat;
1902
- y = dt([v, n]).join(" ");
1937
+ const d = /* @__PURE__ */ new Date();
1938
+ d.getFullYear() === l.getFullYear() ? (d.getMonth() !== l.getMonth() || d.getDate() !== l.getDate()) && (v = "M/d") : v = "M/d/yy";
1939
+ const n = y ? null : D.defaultTimeFormat;
1940
+ g = dt([v, n]).join(" ");
1903
1941
  }
1904
- y || (g ? y = D.defaultDateFormat : y = `${D.defaultDateFormat} ${D.defaultTimeFormat}`);
1905
- let E = X(l, y);
1942
+ g || (y ? g = D.defaultDateFormat : g = `${D.defaultDateFormat} ${D.defaultTimeFormat}`);
1943
+ let E = X(l, g);
1906
1944
  return o && (E = o + " " + E), E;
1907
1945
  }
1908
- const Fo = {
1946
+ const $o = {
1909
1947
  beforeMount: nt,
1910
1948
  updated: nt,
1911
- unmounted: Ao
1949
+ unmounted: Ho
1912
1950
  };
1913
1951
  function nt(e, t) {
1914
1952
  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");
1915
1953
  }
1916
- function Ao(e) {
1954
+ function Ho(e) {
1917
1955
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1918
1956
  }
1919
- const Do = {
1957
+ const Bo = {
1920
1958
  beforeMount: ot,
1921
1959
  updated: ot,
1922
- unmounted: wt
1923
- }, ae = Symbol("HasAutoFocused"), De = [];
1924
- function $o() {
1960
+ unmounted: xt
1961
+ }, ae = /* @__PURE__ */ Symbol("HasAutoFocused"), De = [];
1962
+ function _o() {
1925
1963
  De.forEach(kt);
1926
1964
  }
1927
- setInterval($o, 1e3);
1965
+ setInterval(_o, 1e3);
1928
1966
  function ot(e, t) {
1929
1967
  if (t.value == t.oldValue) return;
1930
- if (!t.value) return wt(e);
1931
- const o = new Date(t.value), a = e.attributes.getNamedItem("base-time")?.value, p = o.getTime() - (a ? new Date(a).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
1968
+ if (!t.value) return xt(e);
1969
+ const o = new Date(t.value), i = e.attributes.getNamedItem("base-time")?.value, c = o.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
1932
1970
  e[ae] || De.push(e), e[ae] = {
1933
- startTs: p,
1971
+ startTs: c,
1934
1972
  includeSeconds: l
1935
1973
  }, kt(e);
1936
1974
  }
1937
1975
  function kt(e) {
1938
1976
  const t = e[ae], o = Math.round((Date.now() - t.startTs) / 1e3);
1939
- e.innerText = Ho(o, t.includeSeconds);
1977
+ e.innerText = Wo(o, t.includeSeconds);
1940
1978
  }
1941
- function wt(e) {
1942
- e[ae] && (tn(De, e), delete e[ae]), e.innerText = "-";
1979
+ function xt(e) {
1980
+ e[ae] && (nn(De, e), delete e[ae]), e.innerText = "-";
1943
1981
  }
1944
- function Ho(e, t) {
1945
- const o = [], a = Math.floor(e / 86400);
1946
- a && o.push(a + "d"), e -= a * 86400;
1947
- const p = Math.floor(e / 3600);
1948
- (a || p) && o.push(p + "h"), e -= p * 3600;
1982
+ function Wo(e, t) {
1983
+ const o = [], i = Math.floor(e / 86400);
1984
+ i && o.push(i + "d"), e -= i * 86400;
1985
+ const c = Math.floor(e / 3600);
1986
+ (i || c) && o.push(c + "h"), e -= c * 3600;
1949
1987
  const l = Math.floor(e / 60);
1950
- return (a || p || l) && o.push(l + "m"), t ? o.length || o.push("0m") : (e -= l * 60, o.push(e + "s")), o.join(" ");
1988
+ return (i || c || l) && o.push(l + "m"), t ? o.length || o.push("0m") : (e -= l * 60, o.push(e + "s")), o.join(" ");
1951
1989
  }
1952
- const Vo = {
1953
- mounted: xt,
1954
- updated: Bo,
1990
+ const jo = {
1991
+ mounted: wt,
1992
+ updated: Po,
1955
1993
  unmounted: bt
1956
1994
  }, Y = /* @__PURE__ */ new Map();
1957
- function xt(e, t) {
1995
+ function wt(e, t) {
1958
1996
  Y.size === 0 && window.addEventListener("keydown", Tt), Y.set(t.value.toLowerCase(), [...Y.get(t.value.toLowerCase()) ?? [], e]);
1959
1997
  }
1960
1998
  function bt(e, t) {
1961
1999
  const o = Y.get(t.value.toLowerCase());
1962
2000
  if (o) {
1963
- const a = o.indexOf(e);
1964
- a !== -1 && o.splice(a, 1), o.length === 0 && Y.delete(t.value.toLowerCase());
2001
+ const i = o.indexOf(e);
2002
+ i !== -1 && o.splice(i, 1), o.length === 0 && Y.delete(t.value.toLowerCase());
1965
2003
  }
1966
2004
  Y.size === 0 && window.removeEventListener("keydown", Tt);
1967
2005
  }
1968
- function Bo(e, t) {
1969
- bt(e, t), xt(e, t);
2006
+ function Po(e, t) {
2007
+ bt(e, t), wt(e, t);
1970
2008
  }
1971
2009
  function Tt(e) {
1972
2010
  if (typeof e.key != "string") return;
1973
2011
  const t = e.key.toLowerCase(), o = Y.get(t);
1974
- o && (nn(o)?.click(), e.preventDefault());
2012
+ o && (on(o)?.click(), e.preventDefault());
1975
2013
  }
1976
- const ee = Symbol("InfiniteScrollHandler"), _o = {
2014
+ const ee = /* @__PURE__ */ Symbol("InfiniteScrollHandler"), Uo = {
1977
2015
  mounted(e, t) {
1978
2016
  e[ee] = new oe(e, t.value);
1979
2017
  },
@@ -1983,56 +2021,56 @@ const ee = Symbol("InfiniteScrollHandler"), _o = {
1983
2021
  unmounted(e) {
1984
2022
  e[ee]?.uninstall(), delete e[ee];
1985
2023
  }
1986
- }, Wo = {
1987
- beforeMount: it,
1988
- updated: it
2024
+ }, zo = {
2025
+ beforeMount: rt,
2026
+ updated: rt
1989
2027
  };
1990
- function it(e, t) {
2028
+ function rt(e, t) {
1991
2029
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1992
2030
  }
1993
- const Oe = /* @__PURE__ */ new WeakMap(), Po = {
2031
+ const Ne = /* @__PURE__ */ new WeakMap(), qo = {
1994
2032
  beforeMount(e, t) {
1995
- t.value === !1 || D.disableStickyMinWidthDirective || rt(e);
2033
+ t.value === !1 || D.disableStickyMinWidthDirective || it(e);
1996
2034
  },
1997
2035
  updated(e, t) {
1998
- t.value !== t.oldValue && (t.value === !1 || D.disableStickyMinWidthDirective ? at(e) : rt(e));
2036
+ t.value !== t.oldValue && (t.value === !1 || D.disableStickyMinWidthDirective ? at(e) : it(e));
1999
2037
  },
2000
2038
  beforeUnmount(e) {
2001
2039
  at(e);
2002
2040
  }
2003
2041
  };
2004
- function rt(e) {
2042
+ function it(e) {
2005
2043
  const t = new ResizeObserver(() => {
2006
- const o = window.getComputedStyle(e).minWidth.match(/^(\d+)px$/)?.[1], a = o ? parseInt(o, 10) : 0;
2007
- e.clientWidth <= a || (e.style.minWidth = `${e.clientWidth}px`);
2044
+ const o = window.getComputedStyle(e).minWidth.match(/^(\d+)px$/)?.[1], i = o ? parseInt(o, 10) : 0;
2045
+ e.clientWidth <= i || (e.style.minWidth = `${e.clientWidth}px`);
2008
2046
  });
2009
- Oe.set(e, t), t.observe(e);
2047
+ Ne.set(e, t), t.observe(e);
2010
2048
  }
2011
2049
  function at(e) {
2012
- const t = Oe.get(e);
2013
- t && (t.unobserve(e), Oe.delete(e));
2050
+ const t = Ne.get(e);
2051
+ t && (t.unobserve(e), Ne.delete(e));
2014
2052
  }
2015
- const jo = {
2053
+ const Jo = {
2016
2054
  mounted: st,
2017
2055
  updated: st,
2018
2056
  unmounted: St
2019
- }, ie = Symbol("TooltipState");
2057
+ }, re = /* @__PURE__ */ Symbol("TooltipState");
2020
2058
  function st(e, t) {
2021
2059
  let o = e.attributes.getNamedItem("tip")?.value ?? t.value;
2022
2060
  if (t.value || (o = null), o) {
2023
- const a = {
2061
+ const i = {
2024
2062
  content: o,
2025
2063
  html: e.getAttribute("html") !== null,
2026
2064
  alertOnTap: e.getAttribute("alert-on-tap") !== null
2027
2065
  };
2028
- e[ie] ? e[ie].configure(a) : e[ie] = new Uo(e, a);
2066
+ e[re] ? e[re].configure(i) : e[re] = new Ko(e, i);
2029
2067
  } else
2030
2068
  St(e);
2031
2069
  }
2032
2070
  function St(e) {
2033
- e[ie]?.destroy(), delete e[ie];
2071
+ e[re]?.destroy(), delete e[re];
2034
2072
  }
2035
- class Uo {
2073
+ class Ko {
2036
2074
  constructor(t, o) {
2037
2075
  this.el = t, this.config = o, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext), o.alertOnTap && t.addEventListener("touchstart", () => this.showTapAlert());
2038
2076
  }
@@ -2075,9 +2113,9 @@ class Uo {
2075
2113
  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);
2076
2114
  }
2077
2115
  handleMouseMove(t) {
2078
- const o = this.tipEl.offsetWidth, a = this.tipEl.offsetHeight, p = window.innerWidth, l = window.innerHeight;
2079
- let y = t.pageX + 10, g = t.pageY + 20;
2080
- y + o > p && (y = Math.max(10, t.pageX - 5 - o)), g + a > l && (g = Math.max(10, t.pageY - 5 - a)), this.tipEl.style.left = y + "px", this.tipEl.style.top = g + "px", this.lastMoveEvt = t;
2116
+ const o = this.tipEl.offsetWidth, i = this.tipEl.offsetHeight, c = window.innerWidth, l = window.innerHeight;
2117
+ let g = t.pageX + 10, y = t.pageY + 20;
2118
+ g + o > c && (g = Math.max(10, t.pageX - 5 - o)), y + i > l && (y = Math.max(10, t.pageY - 5 - i)), this.tipEl.style.left = g + "px", this.tipEl.style.top = y + "px", this.lastMoveEvt = t;
2081
2119
  }
2082
2120
  checkMoveEvent() {
2083
2121
  this.lastMoveEvt && this.tipEl !== this.lastMoveEvt.target && (this.tipEl?.contains(this.lastMoveEvt.target) || this.handleTargetMouseLeave());
@@ -2086,64 +2124,71 @@ class Uo {
2086
2124
  this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
2087
2125
  }
2088
2126
  }
2089
- function zo(e) {
2090
- e.directive("autofocus", Io), e.directive("confirm-button", Mo), e.directive("date-input", Oo), e.directive("datetime", Lo), e.directive("disabled", Fo), e.directive("duration", Do), e.directive("hotkey", Vo), e.directive("infinite-scroll", _o), e.directive("readonly", Wo), e.directive("tooltip", jo), e.directive("sticky-min-width", Po);
2127
+ function Yo(e) {
2128
+ e.directive("autofocus", No), e.directive("confirm-button", Lo), e.directive("date-input", Fo), e.directive("datetime", Do), e.directive("disabled", $o), e.directive("duration", Bo), e.directive("hotkey", jo), e.directive("infinite-scroll", Uo), e.directive("readonly", zo), e.directive("tooltip", Jo), e.directive("sticky-min-width", qo);
2091
2129
  }
2092
- function xi(e) {
2093
- zo(e);
2130
+ function Nr(e) {
2131
+ Yo(e);
2094
2132
  }
2095
2133
  export {
2096
- Go as OverlayContainer,
2097
- ye as UserError,
2098
- Xo as VfAjaxSelect,
2134
+ nr as OverlayContainer,
2135
+ ke as UserError,
2136
+ er as VfAjaxSelect,
2099
2137
  le as VfAlertModal,
2100
- mi as VfEzSmartSelect,
2101
- Tn as VfModal,
2102
- no as VfSmartSelect,
2103
- di as cloneProp,
2104
- Zo as configureVf,
2105
- hi as configureVfOpenApiClient,
2106
- Ei as createFilters,
2107
- ge as createOverlayInjection,
2108
- zn as desnakeCase,
2109
- pn as dismissOverlayInjectionById,
2110
- Qo as dismissOverlayInjectionByInstance,
2138
+ Tr as VfEzSmartSelect,
2139
+ Sn as VfModal,
2140
+ so as VfSmartSelect,
2141
+ vr as cloneProp,
2142
+ tr as configureVf,
2143
+ xr as configureVfOpenApiClient,
2144
+ Mr as createFilters,
2145
+ Ee as createOverlayInjection,
2146
+ Xn as desnakeCase,
2147
+ vn as dismissOverlayInjectionById,
2148
+ or as dismissOverlayInjectionByInstance,
2111
2149
  ft as dismissOverlayInjectionByInternalInstance,
2112
- hn as dismissOverlayInjectionByVnode,
2113
- Si as escapeHtml,
2114
- mn as formatError,
2115
- Fn as formatNumber,
2116
- qn as formatPhone,
2117
- Jn as formatUSCurrency,
2118
- ri as handleError,
2119
- ii as handleErrorAndAlert,
2120
- xi as installVf,
2121
- gn as isError,
2150
+ pn as dismissOverlayInjectionByVnode,
2151
+ Fr as escapeHtml,
2152
+ kr as extractKV,
2153
+ Hn as extractUpdates,
2154
+ yr as extractValues,
2155
+ gn as formatError,
2156
+ An as formatNumber,
2157
+ Zn as formatPhone,
2158
+ Gn as formatUSCurrency,
2159
+ ur as handleError,
2160
+ lr as handleErrorAndAlert,
2161
+ Nr as installVf,
2162
+ yn as isError,
2122
2163
  Ye as isNotNullOrUndefined,
2123
- ai as maskComponent,
2124
- yn as maskEl,
2125
- En as maskForm,
2126
- pi as nl2br,
2127
- fi as nullifyEmptyInputs,
2164
+ cr as maskComponent,
2165
+ En as maskEl,
2166
+ kn as maskForm,
2167
+ wr as nl2br,
2168
+ mr as nullifyEmptyInputs,
2169
+ Vn as objectAssign,
2170
+ gr as objectEntries,
2171
+ Dn as objectKeys,
2172
+ Er as patchObject,
2128
2173
  Re as presentOverlay,
2129
- re as removeOverlayInjection,
2130
- li as replaceElement,
2174
+ ie as removeOverlayInjection,
2175
+ fr as replaceElement,
2131
2176
  ht as showAlert,
2132
- ei as showConfirm,
2133
- ti as showConfirmDestroy,
2134
- ui as showContextMenu,
2135
- oi as showMutableWait,
2136
- yi as showToast,
2137
- ni as showWait,
2138
- Rn as sleep,
2139
- ci as sleepSecs,
2140
- Ee as toError,
2141
- si as unmaskComponent,
2177
+ rr as showConfirm,
2178
+ ir as showConfirmDestroy,
2179
+ hr as showContextMenu,
2180
+ sr as showMutableWait,
2181
+ Ir as showToast,
2182
+ ar as showWait,
2183
+ Fn as sleep,
2184
+ pr as sleepSecs,
2185
+ xe as toError,
2186
+ dr as unmaskComponent,
2142
2187
  pt as unmaskEl,
2143
2188
  vt as unmaskForm,
2144
- vn as updateOverlayProps,
2145
- ki as useInfiniteScroll,
2146
- wi as useResizeWatcher,
2147
- vi as uuid,
2148
- gi as vfModalRef
2189
+ mn as updateOverlayProps,
2190
+ Cr as useInfiniteScroll,
2191
+ Or as useResizeWatcher,
2192
+ br as uuid,
2193
+ Sr as vfModalRef
2149
2194
  };