@signal24/vue-foundation 4.30.3 → 4.30.4
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.
- package/dist/src/components/alert-helpers.d.ts +1 -0
- package/dist/src/config.d.ts +1 -0
- package/dist/src/directives/sticky-min-width.d.ts +1 -1
- package/dist/src/directives/tooltip.d.ts +2 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/vue-foundation.es.js +660 -642
- package/package.json +1 -1
- package/src/components/alert-helpers.ts +1 -0
- package/src/components/vf-alert-modal.vue +3 -3
- package/src/config.ts +1 -0
- package/src/directives/sticky-min-width.ts +36 -15
- package/src/directives/tooltip.ts +14 -1
|
@@ -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
|
|
2
|
-
import { compact as
|
|
3
|
-
import { configureOpenApiClient as
|
|
4
|
-
import { escapeHtml as
|
|
5
|
-
import { format as X, addDays as
|
|
6
|
-
const
|
|
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 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
disabled: ""
|
|
9
|
-
},
|
|
9
|
+
}, un = {
|
|
10
10
|
key: 0,
|
|
11
11
|
value: null
|
|
12
|
-
},
|
|
12
|
+
}, cn = ["value"], Xo = /* @__PURE__ */ q({
|
|
13
13
|
__name: "vf-ajax-select",
|
|
14
14
|
props: {
|
|
15
15
|
modelValue: {},
|
|
@@ -32,32 +32,32 @@ const rn = {
|
|
|
32
32
|
async function g() {
|
|
33
33
|
p.value = await o.loadFn();
|
|
34
34
|
}
|
|
35
|
-
return z(g), (E, v) => l.value ? fe((
|
|
35
|
+
return z(g), (E, v) => l.value ? fe((S(), I("select", {
|
|
36
36
|
key: 1,
|
|
37
37
|
"onUpdate:modelValue": v[0] || (v[0] = (c) => y.value = c)
|
|
38
38
|
}, [
|
|
39
|
-
o.nullText ? (
|
|
40
|
-
(
|
|
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", {
|
|
41
41
|
key: n,
|
|
42
42
|
value: p.value?.[n]
|
|
43
|
-
}, J(c), 9,
|
|
43
|
+
}, J(c), 9, cn))), 128))
|
|
44
44
|
], 512)), [
|
|
45
|
-
[
|
|
46
|
-
]) : (
|
|
45
|
+
[_t, y.value]
|
|
46
|
+
]) : (S(), I("select", ln, [
|
|
47
47
|
U("option", null, J(o.loadingText || "Loading..."), 1)
|
|
48
48
|
]));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), D = {
|
|
51
51
|
unhandledErrorSupportText: "please contact support",
|
|
52
52
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
53
53
|
defaultDateFormat: "M/d/yy",
|
|
54
54
|
defaultTimeFormat: "H:mm",
|
|
55
55
|
defaultCurrencyDivisor: 1
|
|
56
56
|
};
|
|
57
|
-
function
|
|
58
|
-
Object.assign(
|
|
57
|
+
function Zo(e) {
|
|
58
|
+
Object.assign(D, e);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const dn = /* @__PURE__ */ q({
|
|
61
61
|
__name: "overlay-anchor",
|
|
62
62
|
props: {
|
|
63
63
|
overlayId: {},
|
|
@@ -72,64 +72,64 @@ const ln = /* @__PURE__ */ q({
|
|
|
72
72
|
a.value = c, p.value = n;
|
|
73
73
|
}
|
|
74
74
|
function g(v, c) {
|
|
75
|
-
const n = t.anchor instanceof HTMLElement ? {} : t.anchor,
|
|
76
|
-
n.matchWidth && (
|
|
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);
|
|
77
77
|
const s = n.class ? Array.isArray(n.class) ? n.class : [n.class] : [];
|
|
78
78
|
let u, h;
|
|
79
79
|
if (n.y === "center")
|
|
80
|
-
u =
|
|
80
|
+
u = r.top + r.height / 2 - i.height / 2, s.push("anchored-center-y");
|
|
81
81
|
else {
|
|
82
|
-
const m = (
|
|
83
|
-
u = m ?
|
|
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");
|
|
84
84
|
}
|
|
85
85
|
if (n.x === "center")
|
|
86
|
-
h =
|
|
86
|
+
h = r.left + r.width / 2 - i.width / 2, s.push("anchored-center-x");
|
|
87
87
|
else {
|
|
88
|
-
const m = (
|
|
89
|
-
h = m ?
|
|
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");
|
|
90
90
|
}
|
|
91
91
|
return {
|
|
92
92
|
styles: {
|
|
93
93
|
top: `${u}px`,
|
|
94
94
|
left: `${h}px`,
|
|
95
|
-
...n.matchWidth ? { width: `${
|
|
96
|
-
...n.matchHeight ? { height: `${
|
|
95
|
+
...n.matchWidth ? { width: `${i.width}px` } : {},
|
|
96
|
+
...n.matchHeight ? { height: `${i.height}px` } : {}
|
|
97
97
|
},
|
|
98
98
|
classes: s
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
function E() {
|
|
102
|
-
window.removeEventListener("click", E),
|
|
102
|
+
window.removeEventListener("click", E), pn(t.overlayId);
|
|
103
103
|
}
|
|
104
104
|
return z(() => {
|
|
105
105
|
setTimeout(() => {
|
|
106
106
|
window.addEventListener("click", E);
|
|
107
107
|
}, 10);
|
|
108
|
-
}), (v, c) => (
|
|
108
|
+
}), (v, c) => (S(), I("div", {
|
|
109
109
|
class: P(["vf-overlay-anchor", p.value]),
|
|
110
|
-
style:
|
|
110
|
+
style: Wt(a.value),
|
|
111
111
|
onClick: Le(E, ["stop"])
|
|
112
112
|
}, [
|
|
113
113
|
K(v.$slots, "default")
|
|
114
114
|
], 6));
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
-
let
|
|
118
|
-
const j =
|
|
117
|
+
let fn = 0;
|
|
118
|
+
const j = Pt([]);
|
|
119
119
|
H(j, () => {
|
|
120
|
-
|
|
120
|
+
D.onOverlaysChanged?.(j.length);
|
|
121
121
|
});
|
|
122
|
-
const
|
|
122
|
+
const Go = q({
|
|
123
123
|
setup() {
|
|
124
124
|
return () => ve("div", [
|
|
125
|
-
pe(j, (e) => ve(
|
|
125
|
+
pe(j, (e) => ve(jt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
126
126
|
]);
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
function ge(e, t, o) {
|
|
130
130
|
const a = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
131
131
|
a.id = "vf-overlay-target", a.removeAttribute("inert"), document.body.appendChild(a);
|
|
132
|
-
const p = String(++
|
|
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
133
|
id: p,
|
|
134
134
|
component: l,
|
|
135
135
|
props: t,
|
|
@@ -139,23 +139,23 @@ function ge(e, t, o) {
|
|
|
139
139
|
};
|
|
140
140
|
return j.push(E), E;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
e.$ &&
|
|
142
|
+
function Qo(e) {
|
|
143
|
+
e.$ && ft(e.$);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function ft(e) {
|
|
146
146
|
let t = e;
|
|
147
|
-
for (; t && !
|
|
147
|
+
for (; t && !hn(t.vnode); )
|
|
148
148
|
t = t.parent;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function hn(e) {
|
|
151
151
|
const t = j.findIndex((o) => o.vnode.component === e.component);
|
|
152
152
|
return t >= 0 ? (j[t].props.callback(), !0) : !1;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function pn(e) {
|
|
155
155
|
const t = j.findIndex((o) => o.id === e);
|
|
156
156
|
return t >= 0 ? (j[t].props.callback(), !0) : !1;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function re(e) {
|
|
159
159
|
const t = j.indexOf(e);
|
|
160
160
|
t >= 0 && j.splice(t, 1);
|
|
161
161
|
}
|
|
@@ -168,12 +168,12 @@ async function Re(e, t, o) {
|
|
|
168
168
|
if (typeof E == "object" && "then" in E && typeof E.then == "function" && await E === !1)
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
re(p), a(g);
|
|
172
172
|
} };
|
|
173
173
|
p = ge(e, y, o);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
176
|
+
async function vn(e, t) {
|
|
177
177
|
const o = e.vnode.component.props;
|
|
178
178
|
for (const a in t)
|
|
179
179
|
o[a] = t[a];
|
|
@@ -184,17 +184,17 @@ function se(e, t) {
|
|
|
184
184
|
classes: e.classes ?? []
|
|
185
185
|
} : { title: t ? e : void 0, message: t ?? e, classes: [] };
|
|
186
186
|
}
|
|
187
|
-
async function
|
|
187
|
+
async function ht(e, t) {
|
|
188
188
|
await Re(le, se(e, t));
|
|
189
189
|
}
|
|
190
|
-
async function
|
|
190
|
+
async function ei(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
|
|
197
|
+
async function ti(e, t) {
|
|
198
198
|
const o = se(e, t);
|
|
199
199
|
return await Re(le, {
|
|
200
200
|
...o,
|
|
@@ -202,7 +202,7 @@ async function Qo(e, t) {
|
|
|
202
202
|
classes: ["destructive", ...o.classes]
|
|
203
203
|
}) === !0;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ni(e, t) {
|
|
206
206
|
const o = se(e, t), a = ge(le, {
|
|
207
207
|
...o,
|
|
208
208
|
isBare: !0,
|
|
@@ -210,9 +210,9 @@ function er(e, t) {
|
|
|
210
210
|
callback: () => {
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
|
-
return () =>
|
|
213
|
+
return () => re(a);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function oi(e, t) {
|
|
216
216
|
const o = se(e, t), a = ge(le, {
|
|
217
217
|
...o,
|
|
218
218
|
isBare: !0,
|
|
@@ -222,9 +222,9 @@ function tr(e, t) {
|
|
|
222
222
|
});
|
|
223
223
|
return {
|
|
224
224
|
update: (p) => {
|
|
225
|
-
|
|
225
|
+
vn(a, { message: p });
|
|
226
226
|
},
|
|
227
|
-
dismiss: () =>
|
|
227
|
+
dismiss: () => re(a)
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
class ye extends Error {
|
|
@@ -232,54 +232,54 @@ class ye extends Error {
|
|
|
232
232
|
super(t), this.name = "UserError";
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function mn(e) {
|
|
236
236
|
return e instanceof ye ? e.message : `An application error has occurred:
|
|
237
237
|
|
|
238
238
|
${Ee(e).message}
|
|
239
239
|
|
|
240
|
-
Please refresh the page and try again. If this error persists, ${
|
|
240
|
+
Please refresh the page and try again. If this error persists, ${D.unhandledErrorSupportText}.`;
|
|
241
241
|
}
|
|
242
242
|
function Ee(e, t) {
|
|
243
|
-
const o =
|
|
243
|
+
const o = gn(e) ? e : new Error(String(e));
|
|
244
244
|
return t && (o.cause = Ee(t)), o;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function gn(e) {
|
|
247
247
|
return e instanceof Error || typeof e == "object" && e !== null && "message" in e && "name" in e;
|
|
248
248
|
}
|
|
249
|
-
async function
|
|
249
|
+
async function ii(e, t) {
|
|
250
250
|
const o = Ee(e, t?.cause);
|
|
251
|
-
return o instanceof ye ||
|
|
251
|
+
return o instanceof ye || 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
|
|
257
|
+
async function ri(e, t) {
|
|
258
258
|
const o = Ee(e, t);
|
|
259
|
-
o instanceof ye ||
|
|
259
|
+
o instanceof ye || D.errorHandler(o);
|
|
260
260
|
}
|
|
261
261
|
const ne = Symbol("MaskState");
|
|
262
|
-
function
|
|
262
|
+
function ai(e, t) {
|
|
263
263
|
const o = e.$?.vnode.el, a = o.closest(".vf-modal");
|
|
264
|
-
return
|
|
264
|
+
return yn(a ?? o, t);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function si(e) {
|
|
267
267
|
const t = e.$?.vnode.el, o = t.closest(".vf-modal");
|
|
268
|
-
return
|
|
268
|
+
return pt(o ?? t);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function yn(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 };
|
|
274
274
|
}
|
|
275
|
-
return e[ne].maskEl.innerText = t ?? "", () =>
|
|
275
|
+
return e[ne].maskEl.innerText = t ?? "", () => pt(e);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function pt(e) {
|
|
278
278
|
e[ne] && e.removeChild(e[ne].maskEl);
|
|
279
279
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
282
|
-
const a = e instanceof Element ? e :
|
|
280
|
+
const Ce = Symbol("FormMaskState");
|
|
281
|
+
function En(e, t, o) {
|
|
282
|
+
const a = e instanceof Element ? e : mt(e);
|
|
283
283
|
if (!a) return () => {
|
|
284
284
|
};
|
|
285
285
|
a.classList.add("vf-masked");
|
|
@@ -287,29 +287,29 @@ function gn(e, t, o) {
|
|
|
287
287
|
let l;
|
|
288
288
|
p && (l = p.tagName === "INPUT" ? p.value : p.innerHTML, p.setAttribute("disabled", "disabled"), p.innerText = o ?? "Please wait...");
|
|
289
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[
|
|
290
|
+
return g.forEach((E) => E.setAttribute("disabled", "disabled")), a[Ce] = {
|
|
291
291
|
disabledElements: g,
|
|
292
292
|
waitButton: p,
|
|
293
293
|
buttonHtml: l
|
|
294
|
-
}, () =>
|
|
294
|
+
}, () => vt(a);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const t = e instanceof Element ? e :
|
|
296
|
+
function vt(e) {
|
|
297
|
+
const t = e instanceof Element ? e : mt(e);
|
|
298
298
|
if (!t) return;
|
|
299
|
-
const o = t[
|
|
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[
|
|
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]);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
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
|
|
306
|
+
const kn = ["id"], wn = {
|
|
307
307
|
key: 0,
|
|
308
308
|
class: "vf-modal-header"
|
|
309
|
-
},
|
|
309
|
+
}, xn = { class: "vf-modal-content" }, bn = {
|
|
310
310
|
key: 1,
|
|
311
311
|
class: "vf-modal-footer"
|
|
312
|
-
},
|
|
312
|
+
}, Tn = /* @__PURE__ */ q({
|
|
313
313
|
__name: "vf-modal",
|
|
314
314
|
props: {
|
|
315
315
|
id: {},
|
|
@@ -322,8 +322,8 @@ const yn = ["id"], En = {
|
|
|
322
322
|
emits: ["formSubmit"],
|
|
323
323
|
setup(e, { expose: t }) {
|
|
324
324
|
const o = Ne(), a = e;
|
|
325
|
-
t({ mask: n, unmask:
|
|
326
|
-
const p = N(), l = N(), y = N(!1), g = O(() =>
|
|
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"]));
|
|
327
327
|
z(() => {
|
|
328
328
|
document.body.classList.add("vf-modal-open"), a.closeOnMaskClick && (window.addEventListener("keydown", v), p.value?.addEventListener("click", E));
|
|
329
329
|
}), me(() => {
|
|
@@ -339,21 +339,21 @@ const yn = ["id"], En = {
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
function c() {
|
|
342
|
-
a.onClose ? a.onClose() :
|
|
342
|
+
a.onClose ? a.onClose() : ft(o);
|
|
343
343
|
}
|
|
344
344
|
function n() {
|
|
345
|
-
return
|
|
346
|
-
}
|
|
347
|
-
function i() {
|
|
348
|
-
ft(l.value);
|
|
345
|
+
return En(l.value), () => r();
|
|
349
346
|
}
|
|
350
347
|
function r() {
|
|
348
|
+
vt(l.value);
|
|
349
|
+
}
|
|
350
|
+
function i() {
|
|
351
351
|
return y.value = !0, () => s();
|
|
352
352
|
}
|
|
353
353
|
function s() {
|
|
354
354
|
y.value = !1;
|
|
355
355
|
}
|
|
356
|
-
return (u, h) => (
|
|
356
|
+
return (u, h) => (S(), I("div", {
|
|
357
357
|
id: e.id,
|
|
358
358
|
ref_key: "overlay",
|
|
359
359
|
ref: p,
|
|
@@ -366,24 +366,24 @@ const yn = ["id"], En = {
|
|
|
366
366
|
class: P(["vf-modal", { scrolls: e.scrolls }]),
|
|
367
367
|
onSubmit: h[0] || (h[0] = Le((f) => u.$emit("formSubmit"), ["prevent"]))
|
|
368
368
|
}, [
|
|
369
|
-
u.$slots.header ? (
|
|
369
|
+
u.$slots.header ? (S(), I("div", wn, [
|
|
370
370
|
K(u.$slots, "header"),
|
|
371
|
-
a.closeX ? (
|
|
371
|
+
a.closeX ? (S(), I("i", {
|
|
372
372
|
key: 0,
|
|
373
373
|
class: "close",
|
|
374
374
|
onClick: c
|
|
375
375
|
})) : W("", !0)
|
|
376
376
|
])) : W("", !0),
|
|
377
|
-
U("div",
|
|
377
|
+
U("div", xn, [
|
|
378
378
|
K(u.$slots, "default")
|
|
379
379
|
]),
|
|
380
|
-
u.$slots.footer ? (
|
|
380
|
+
u.$slots.footer ? (S(), I("div", bn, [
|
|
381
381
|
K(u.$slots, "footer")
|
|
382
382
|
])) : W("", !0)
|
|
383
383
|
], 34)
|
|
384
|
-
], 10,
|
|
384
|
+
], 10, kn));
|
|
385
385
|
}
|
|
386
|
-
}),
|
|
386
|
+
}), Sn = ["innerHTML"], In = ["innerText"], le = /* @__PURE__ */ q({
|
|
387
387
|
__name: "vf-alert-modal",
|
|
388
388
|
props: {
|
|
389
389
|
isBare: { type: Boolean },
|
|
@@ -396,41 +396,41 @@ const yn = ["id"], En = {
|
|
|
396
396
|
callback: { type: Function }
|
|
397
397
|
},
|
|
398
398
|
setup(e) {
|
|
399
|
-
const t = e, o = O(() => t.message instanceof Error ?
|
|
399
|
+
const t = e, o = O(() => t.message instanceof Error ? mn(t.message) : t.message);
|
|
400
400
|
return (a, p) => {
|
|
401
|
-
const l =
|
|
402
|
-
return
|
|
401
|
+
const l = zt("autofocus");
|
|
402
|
+
return S(), lt(Tn, {
|
|
403
403
|
class: P(["vf-alert", ...e.classes ?? []]),
|
|
404
404
|
scrolls: ""
|
|
405
|
-
},
|
|
406
|
-
default:
|
|
407
|
-
e.iconClass ? (
|
|
405
|
+
}, qt({
|
|
406
|
+
default: Te(() => [
|
|
407
|
+
e.iconClass ? (S(), I("i", {
|
|
408
408
|
key: 0,
|
|
409
409
|
class: P(["vf-alert-icon", e.iconClass])
|
|
410
410
|
}, null, 2)) : W("", !0),
|
|
411
|
-
e.isHtml ? (
|
|
411
|
+
e.isHtml ? (S(), I("div", {
|
|
412
412
|
key: 1,
|
|
413
|
-
|
|
413
|
+
innerHTML: o.value,
|
|
414
414
|
class: "user-message"
|
|
415
|
-
}, null, 8,
|
|
415
|
+
}, null, 8, Sn)) : (S(), I("div", {
|
|
416
416
|
key: 2,
|
|
417
417
|
innerText: o.value
|
|
418
|
-
}, null, 8,
|
|
418
|
+
}, null, 8, In))
|
|
419
419
|
]),
|
|
420
420
|
_: 2
|
|
421
421
|
}, [
|
|
422
422
|
e.title ? {
|
|
423
423
|
name: "header",
|
|
424
|
-
fn:
|
|
424
|
+
fn: Te(() => [
|
|
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:
|
|
432
|
-
e.shouldConfirm ? (
|
|
433
|
-
fe((
|
|
431
|
+
fn: Te(() => [
|
|
432
|
+
e.shouldConfirm ? (S(), I(he, { key: 0 }, [
|
|
433
|
+
fe((S(), I("button", {
|
|
434
434
|
class: "primary",
|
|
435
435
|
onClick: p[0] || (p[0] = () => e.callback(!0))
|
|
436
436
|
}, [...p[3] || (p[3] = [
|
|
@@ -442,7 +442,7 @@ const yn = ["id"], En = {
|
|
|
442
442
|
class: "default",
|
|
443
443
|
onClick: p[1] || (p[1] = () => e.callback(!1))
|
|
444
444
|
}, "Cancel")
|
|
445
|
-
], 64)) : fe((
|
|
445
|
+
], 64)) : fe((S(), I("button", {
|
|
446
446
|
key: 1,
|
|
447
447
|
class: "default",
|
|
448
448
|
onClick: p[2] || (p[2] = () => e.callback(!0))
|
|
@@ -458,16 +458,16 @@ const yn = ["id"], En = {
|
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
460
|
});
|
|
461
|
-
function
|
|
461
|
+
function Mn(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
|
|
466
|
-
function
|
|
465
|
+
var Cn = ce.exports, Ke;
|
|
466
|
+
function On() {
|
|
467
467
|
return Ke || (Ke = 1, (function(e, t) {
|
|
468
468
|
(function(o, a) {
|
|
469
469
|
e.exports = a();
|
|
470
|
-
})(
|
|
470
|
+
})(Cn, (function() {
|
|
471
471
|
var o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(v) {
|
|
472
472
|
return typeof v;
|
|
473
473
|
} : function(v) {
|
|
@@ -477,67 +477,67 @@ function Mn() {
|
|
|
477
477
|
throw new TypeError("Cannot call a class as a function");
|
|
478
478
|
}, p = /* @__PURE__ */ (function() {
|
|
479
479
|
function v(c, n) {
|
|
480
|
-
for (var
|
|
481
|
-
var
|
|
482
|
-
|
|
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);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
return function(c, n,
|
|
486
|
-
return n && v(c.prototype, n),
|
|
485
|
+
return function(c, n, r) {
|
|
486
|
+
return n && v(c.prototype, n), r && v(c, r), c;
|
|
487
487
|
};
|
|
488
488
|
})(), l = Object.assign || function(v) {
|
|
489
489
|
for (var c = 1; c < arguments.length; c++) {
|
|
490
490
|
var n = arguments[c];
|
|
491
|
-
for (var
|
|
492
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
491
|
+
for (var r in n)
|
|
492
|
+
Object.prototype.hasOwnProperty.call(n, r) && (v[r] = n[r]);
|
|
493
493
|
}
|
|
494
494
|
return v;
|
|
495
495
|
}, y = (function() {
|
|
496
496
|
function v(c) {
|
|
497
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
|
|
498
|
-
a(this, v), this.ctx = c, this.iframes = n, this.exclude =
|
|
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;
|
|
499
499
|
}
|
|
500
500
|
return p(v, [{
|
|
501
501
|
key: "getContexts",
|
|
502
502
|
value: function() {
|
|
503
|
-
var n = void 0,
|
|
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(
|
|
505
|
-
var s =
|
|
506
|
-
return u.contains(
|
|
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);
|
|
507
507
|
}).length > 0;
|
|
508
|
-
|
|
509
|
-
}),
|
|
508
|
+
r.indexOf(i) === -1 && !s && r.push(i);
|
|
509
|
+
}), r;
|
|
510
510
|
}
|
|
511
511
|
}, {
|
|
512
512
|
key: "getIframeContents",
|
|
513
|
-
value: function(n,
|
|
514
|
-
var
|
|
513
|
+
value: function(n, r) {
|
|
514
|
+
var i = 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
|
-
|
|
521
|
+
i();
|
|
522
522
|
}
|
|
523
|
-
s &&
|
|
523
|
+
s && r(s);
|
|
524
524
|
}
|
|
525
525
|
}, {
|
|
526
526
|
key: "isIframeBlank",
|
|
527
527
|
value: function(n) {
|
|
528
|
-
var
|
|
529
|
-
return s ===
|
|
528
|
+
var r = "about:blank", i = n.getAttribute("src").trim(), s = n.contentWindow.location.href;
|
|
529
|
+
return s === r && i !== r && i;
|
|
530
530
|
}
|
|
531
531
|
}, {
|
|
532
532
|
key: "observeIframeLoad",
|
|
533
|
-
value: function(n,
|
|
533
|
+
value: function(n, r, i) {
|
|
534
534
|
var s = this, u = !1, h = null, f = function m() {
|
|
535
535
|
if (!u) {
|
|
536
536
|
u = !0, clearTimeout(h);
|
|
537
537
|
try {
|
|
538
|
-
s.isIframeBlank(n) || (n.removeEventListener("load", m), s.getIframeContents(n,
|
|
538
|
+
s.isIframeBlank(n) || (n.removeEventListener("load", m), s.getIframeContents(n, r, i));
|
|
539
539
|
} catch {
|
|
540
|
-
|
|
540
|
+
i();
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
};
|
|
@@ -545,46 +545,46 @@ function Mn() {
|
|
|
545
545
|
}
|
|
546
546
|
}, {
|
|
547
547
|
key: "onIframeReady",
|
|
548
|
-
value: function(n,
|
|
548
|
+
value: function(n, r, i) {
|
|
549
549
|
try {
|
|
550
|
-
n.contentWindow.document.readyState === "complete" ? this.isIframeBlank(n) ? this.observeIframeLoad(n,
|
|
550
|
+
n.contentWindow.document.readyState === "complete" ? this.isIframeBlank(n) ? this.observeIframeLoad(n, r, i) : this.getIframeContents(n, r, i) : this.observeIframeLoad(n, r, i);
|
|
551
551
|
} catch {
|
|
552
|
-
|
|
552
|
+
i();
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}, {
|
|
556
556
|
key: "waitForIframes",
|
|
557
|
-
value: function(n,
|
|
558
|
-
var
|
|
557
|
+
value: function(n, r) {
|
|
558
|
+
var i = this, s = 0;
|
|
559
559
|
this.forEachIframe(n, function() {
|
|
560
560
|
return !0;
|
|
561
561
|
}, function(u) {
|
|
562
|
-
s++,
|
|
563
|
-
--s ||
|
|
562
|
+
s++, i.waitForIframes(u.querySelector("html"), function() {
|
|
563
|
+
--s || r();
|
|
564
564
|
});
|
|
565
565
|
}, function(u) {
|
|
566
|
-
u ||
|
|
566
|
+
u || r();
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
569
|
}, {
|
|
570
570
|
key: "forEachIframe",
|
|
571
|
-
value: function(n,
|
|
571
|
+
value: function(n, r, i) {
|
|
572
572
|
var s = this, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : function() {
|
|
573
573
|
}, h = n.querySelectorAll("iframe"), f = h.length, m = 0;
|
|
574
574
|
h = Array.prototype.slice.call(h);
|
|
575
|
-
var
|
|
575
|
+
var x = function() {
|
|
576
576
|
--f <= 0 && u(m);
|
|
577
577
|
};
|
|
578
|
-
f ||
|
|
579
|
-
v.matches(
|
|
580
|
-
|
|
581
|
-
},
|
|
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);
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
584
|
}, {
|
|
585
585
|
key: "createIterator",
|
|
586
|
-
value: function(n,
|
|
587
|
-
return document.createNodeIterator(n,
|
|
586
|
+
value: function(n, r, i) {
|
|
587
|
+
return document.createNodeIterator(n, r, i, !1);
|
|
588
588
|
}
|
|
589
589
|
}, {
|
|
590
590
|
key: "createInstanceOnIframe",
|
|
@@ -593,11 +593,11 @@ function Mn() {
|
|
|
593
593
|
}
|
|
594
594
|
}, {
|
|
595
595
|
key: "compareNodeIframe",
|
|
596
|
-
value: function(n,
|
|
597
|
-
var s = n.compareDocumentPosition(
|
|
596
|
+
value: function(n, r, i) {
|
|
597
|
+
var s = n.compareDocumentPosition(i), u = Node.DOCUMENT_POSITION_PRECEDING;
|
|
598
598
|
if (s & u)
|
|
599
|
-
if (
|
|
600
|
-
var h =
|
|
599
|
+
if (r !== null) {
|
|
600
|
+
var h = r.compareDocumentPosition(i), f = Node.DOCUMENT_POSITION_FOLLOWING;
|
|
601
601
|
if (h & f)
|
|
602
602
|
return !0;
|
|
603
603
|
} else
|
|
@@ -607,75 +607,75 @@ function Mn() {
|
|
|
607
607
|
}, {
|
|
608
608
|
key: "getIteratorNode",
|
|
609
609
|
value: function(n) {
|
|
610
|
-
var
|
|
611
|
-
return
|
|
612
|
-
prevNode:
|
|
613
|
-
node:
|
|
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
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
616
|
}, {
|
|
617
617
|
key: "checkIframeFilter",
|
|
618
|
-
value: function(n,
|
|
618
|
+
value: function(n, r, i, s) {
|
|
619
619
|
var u = !1, h = !1;
|
|
620
620
|
return s.forEach(function(f, m) {
|
|
621
|
-
f.val ===
|
|
622
|
-
}), this.compareNodeIframe(n,
|
|
623
|
-
val:
|
|
621
|
+
f.val === i && (u = m, h = f.handled);
|
|
622
|
+
}), this.compareNodeIframe(n, r, i) ? (u === !1 && !h ? s.push({
|
|
623
|
+
val: i,
|
|
624
624
|
handled: !0
|
|
625
625
|
}) : u !== !1 && !h && (s[u].handled = !0), !0) : (u === !1 && s.push({
|
|
626
|
-
val:
|
|
626
|
+
val: i,
|
|
627
627
|
handled: !1
|
|
628
628
|
}), !1);
|
|
629
629
|
}
|
|
630
630
|
}, {
|
|
631
631
|
key: "handleOpenIframes",
|
|
632
|
-
value: function(n,
|
|
632
|
+
value: function(n, r, i, s) {
|
|
633
633
|
var u = this;
|
|
634
634
|
n.forEach(function(h) {
|
|
635
635
|
h.handled || u.getIframeContents(h.val, function(f) {
|
|
636
|
-
u.createInstanceOnIframe(f).forEachNode(
|
|
636
|
+
u.createInstanceOnIframe(f).forEachNode(r, i, s);
|
|
637
637
|
});
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
640
|
}, {
|
|
641
641
|
key: "iterateThroughNodes",
|
|
642
|
-
value: function(n,
|
|
643
|
-
for (var h = this, f = this.createIterator(
|
|
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
644
|
var F = h.getIteratorNode(f);
|
|
645
|
-
return C = F.prevNode,
|
|
645
|
+
return C = F.prevNode, T = F.node, T;
|
|
646
646
|
}; L(); )
|
|
647
|
-
this.iframes && this.forEachIframe(
|
|
648
|
-
return h.checkIframeFilter(
|
|
647
|
+
this.iframes && this.forEachIframe(r, function(R) {
|
|
648
|
+
return h.checkIframeFilter(T, C, R, m);
|
|
649
649
|
}, function(R) {
|
|
650
650
|
h.createInstanceOnIframe(R).forEachNode(n, function(F) {
|
|
651
|
-
return
|
|
651
|
+
return x.push(F);
|
|
652
652
|
}, s);
|
|
653
|
-
}),
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}), this.iframes && this.handleOpenIframes(m, n,
|
|
653
|
+
}), x.push(T);
|
|
654
|
+
x.forEach(function(R) {
|
|
655
|
+
i(R);
|
|
656
|
+
}), this.iframes && this.handleOpenIframes(m, n, i, s), u();
|
|
657
657
|
}
|
|
658
658
|
}, {
|
|
659
659
|
key: "forEachNode",
|
|
660
|
-
value: function(n,
|
|
660
|
+
value: function(n, r, i) {
|
|
661
661
|
var s = this, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : function() {
|
|
662
662
|
}, h = this.getContexts(), f = h.length;
|
|
663
663
|
f || u(), h.forEach(function(m) {
|
|
664
|
-
var
|
|
665
|
-
s.iterateThroughNodes(n, m,
|
|
664
|
+
var x = function() {
|
|
665
|
+
s.iterateThroughNodes(n, m, r, i, function() {
|
|
666
666
|
--f <= 0 && u();
|
|
667
667
|
});
|
|
668
668
|
};
|
|
669
|
-
s.iframes ? s.waitForIframes(m,
|
|
669
|
+
s.iframes ? s.waitForIframes(m, x) : x();
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
}], [{
|
|
673
673
|
key: "matches",
|
|
674
|
-
value: function(n,
|
|
675
|
-
var
|
|
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;
|
|
676
676
|
if (s) {
|
|
677
677
|
var u = !1;
|
|
678
|
-
return
|
|
678
|
+
return i.every(function(h) {
|
|
679
679
|
return s.call(n, h) ? (u = !0, !1) : !0;
|
|
680
680
|
}), u;
|
|
681
681
|
} else
|
|
@@ -691,8 +691,8 @@ function Mn() {
|
|
|
691
691
|
return p(v, [{
|
|
692
692
|
key: "log",
|
|
693
693
|
value: function(n) {
|
|
694
|
-
var
|
|
695
|
-
this.opt.debug && (typeof
|
|
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);
|
|
696
696
|
}
|
|
697
697
|
}, {
|
|
698
698
|
key: "escapeStr",
|
|
@@ -707,11 +707,11 @@ function Mn() {
|
|
|
707
707
|
}, {
|
|
708
708
|
key: "createSynonymsRegExp",
|
|
709
709
|
value: function(n) {
|
|
710
|
-
var
|
|
711
|
-
for (var u in
|
|
712
|
-
if (
|
|
713
|
-
var h =
|
|
714
|
-
f !== "" && m !== "" && (n = n.replace(new RegExp("(" + this.escapeStr(f) + "|" + this.escapeStr(m) + ")", "gm" +
|
|
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));
|
|
715
715
|
}
|
|
716
716
|
return n;
|
|
717
717
|
}
|
|
@@ -723,42 +723,42 @@ function Mn() {
|
|
|
723
723
|
}, {
|
|
724
724
|
key: "setupWildcardsRegExp",
|
|
725
725
|
value: function(n) {
|
|
726
|
-
return n = n.replace(/(?:\\)*\?/g, function(
|
|
727
|
-
return
|
|
728
|
-
}), n.replace(/(?:\\)*\*/g, function(
|
|
729
|
-
return
|
|
726
|
+
return n = n.replace(/(?:\\)*\?/g, function(r) {
|
|
727
|
+
return r.charAt(0) === "\\" ? "?" : "";
|
|
728
|
+
}), n.replace(/(?:\\)*\*/g, function(r) {
|
|
729
|
+
return r.charAt(0) === "\\" ? "*" : "";
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
732
|
}, {
|
|
733
733
|
key: "createWildcardsRegExp",
|
|
734
734
|
value: function(n) {
|
|
735
|
-
var
|
|
736
|
-
return n.replace(/\u0001/g,
|
|
735
|
+
var r = this.opt.wildcards === "withSpaces";
|
|
736
|
+
return n.replace(/\u0001/g, r ? "[\\S\\s]?" : "\\S?").replace(/\u0002/g, r ? "[\\S\\s]*?" : "\\S*");
|
|
737
737
|
}
|
|
738
738
|
}, {
|
|
739
739
|
key: "setupIgnoreJoinersRegExp",
|
|
740
740
|
value: function(n) {
|
|
741
|
-
return n.replace(/[^(|)\\]/g, function(
|
|
742
|
-
var u = s.charAt(
|
|
743
|
-
return /[(|)\\]/.test(u) || u === "" ?
|
|
741
|
+
return n.replace(/[^(|)\\]/g, function(r, i, s) {
|
|
742
|
+
var u = s.charAt(i + 1);
|
|
743
|
+
return /[(|)\\]/.test(u) || u === "" ? r : r + "\0";
|
|
744
744
|
});
|
|
745
745
|
}
|
|
746
746
|
}, {
|
|
747
747
|
key: "createJoinersRegExp",
|
|
748
748
|
value: function(n) {
|
|
749
|
-
var
|
|
750
|
-
return Array.isArray(
|
|
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;
|
|
751
751
|
}
|
|
752
752
|
}, {
|
|
753
753
|
key: "createDiacriticsRegExp",
|
|
754
754
|
value: function(n) {
|
|
755
|
-
var
|
|
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 = [];
|
|
756
756
|
return n.split("").forEach(function(u) {
|
|
757
|
-
|
|
757
|
+
i.every(function(h) {
|
|
758
758
|
if (h.indexOf(u) !== -1) {
|
|
759
759
|
if (s.indexOf(h) > -1)
|
|
760
760
|
return !1;
|
|
761
|
-
n = n.replace(new RegExp("[" + h + "]", "gm" +
|
|
761
|
+
n = n.replace(new RegExp("[" + h + "]", "gm" + r), "[" + h + "]"), s.push(h);
|
|
762
762
|
}
|
|
763
763
|
return !0;
|
|
764
764
|
});
|
|
@@ -772,15 +772,15 @@ function Mn() {
|
|
|
772
772
|
}, {
|
|
773
773
|
key: "createAccuracyRegExp",
|
|
774
774
|
value: function(n) {
|
|
775
|
-
var
|
|
775
|
+
var r = this, i = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿", s = this.opt.accuracy, u = typeof s == "string" ? s : s.value, h = typeof s == "string" ? [] : s.limiters, f = "";
|
|
776
776
|
switch (h.forEach(function(m) {
|
|
777
|
-
f += "|" +
|
|
777
|
+
f += "|" + r.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(
|
|
783
|
+
return f = "\\s" + (f || this.escapeStr(i)), "()([^" + f + "]*" + n + "[^" + f + "]*)";
|
|
784
784
|
case "exactly":
|
|
785
785
|
return "(^|\\s" + f + ")(" + n + ")(?=$|\\s" + f + ")";
|
|
786
786
|
}
|
|
@@ -788,16 +788,16 @@ function Mn() {
|
|
|
788
788
|
}, {
|
|
789
789
|
key: "getSeparatedKeywords",
|
|
790
790
|
value: function(n) {
|
|
791
|
-
var
|
|
791
|
+
var r = this, i = [];
|
|
792
792
|
return n.forEach(function(s) {
|
|
793
|
-
|
|
794
|
-
u.trim() &&
|
|
795
|
-
}) : s.trim() &&
|
|
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);
|
|
796
796
|
}), {
|
|
797
|
-
keywords:
|
|
797
|
+
keywords: i.sort(function(s, u) {
|
|
798
798
|
return u.length - s.length;
|
|
799
799
|
}),
|
|
800
|
-
length:
|
|
800
|
+
length: i.length
|
|
801
801
|
};
|
|
802
802
|
}
|
|
803
803
|
}, {
|
|
@@ -808,32 +808,32 @@ function Mn() {
|
|
|
808
808
|
}, {
|
|
809
809
|
key: "checkRanges",
|
|
810
810
|
value: function(n) {
|
|
811
|
-
var
|
|
811
|
+
var r = 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
|
|
814
|
+
var i = [], s = 0;
|
|
815
815
|
return n.sort(function(u, h) {
|
|
816
816
|
return u.start - h.start;
|
|
817
817
|
}).forEach(function(u) {
|
|
818
|
-
var h =
|
|
819
|
-
|
|
820
|
-
}),
|
|
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;
|
|
821
821
|
}
|
|
822
822
|
}, {
|
|
823
823
|
key: "callNoMatchOnInvalidRanges",
|
|
824
|
-
value: function(n,
|
|
825
|
-
var
|
|
826
|
-
return n && typeof n.start < "u" ? (
|
|
827
|
-
start:
|
|
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,
|
|
828
828
|
end: s,
|
|
829
829
|
valid: u
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
832
|
}, {
|
|
833
833
|
key: "checkWhitespaceRanges",
|
|
834
|
-
value: function(n,
|
|
835
|
-
var s = void 0, u = !0, h =
|
|
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)) :
|
|
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)), {
|
|
837
837
|
start: m,
|
|
838
838
|
end: s,
|
|
839
839
|
valid: u
|
|
@@ -842,18 +842,18 @@ function Mn() {
|
|
|
842
842
|
}, {
|
|
843
843
|
key: "getTextNodes",
|
|
844
844
|
value: function(n) {
|
|
845
|
-
var
|
|
845
|
+
var r = this, i = "", s = [];
|
|
846
846
|
this.iterator.forEachNode(NodeFilter.SHOW_TEXT, function(u) {
|
|
847
847
|
s.push({
|
|
848
|
-
start:
|
|
849
|
-
end: (
|
|
848
|
+
start: i.length,
|
|
849
|
+
end: (i += u.textContent).length,
|
|
850
850
|
node: u
|
|
851
851
|
});
|
|
852
852
|
}, function(u) {
|
|
853
|
-
return
|
|
853
|
+
return r.matchesExclude(u.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
854
854
|
}, function() {
|
|
855
855
|
n({
|
|
856
|
-
value:
|
|
856
|
+
value: i,
|
|
857
857
|
nodes: s
|
|
858
858
|
});
|
|
859
859
|
});
|
|
@@ -865,24 +865,24 @@ function Mn() {
|
|
|
865
865
|
}
|
|
866
866
|
}, {
|
|
867
867
|
key: "wrapRangeInTextNode",
|
|
868
|
-
value: function(n,
|
|
869
|
-
var s = this.opt.element ? this.opt.element : "mark", u = n.splitText(
|
|
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
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;
|
|
871
871
|
}
|
|
872
872
|
}, {
|
|
873
873
|
key: "wrapRangeInMappedTextNode",
|
|
874
|
-
value: function(n,
|
|
874
|
+
value: function(n, r, i, s, u) {
|
|
875
875
|
var h = this;
|
|
876
876
|
n.nodes.every(function(f, m) {
|
|
877
|
-
var
|
|
878
|
-
if (typeof
|
|
877
|
+
var x = n.nodes[m + 1];
|
|
878
|
+
if (typeof x > "u" || x.start > r) {
|
|
879
879
|
if (!s(f.node))
|
|
880
880
|
return !1;
|
|
881
|
-
var
|
|
882
|
-
if (f.node = h.wrapRangeInTextNode(f.node,
|
|
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
883
|
V >= m && (n.nodes[V].start > 0 && V !== m && (n.nodes[V].start -= C), n.nodes[V].end -= C);
|
|
884
|
-
}),
|
|
885
|
-
|
|
884
|
+
}), i -= C, u(f.node.previousSibling, f.start), i > f.end)
|
|
885
|
+
r = f.end;
|
|
886
886
|
else
|
|
887
887
|
return !1;
|
|
888
888
|
}
|
|
@@ -891,35 +891,35 @@ function Mn() {
|
|
|
891
891
|
}
|
|
892
892
|
}, {
|
|
893
893
|
key: "wrapMatches",
|
|
894
|
-
value: function(n,
|
|
895
|
-
var h = this, f =
|
|
894
|
+
value: function(n, r, i, s, u) {
|
|
895
|
+
var h = this, f = r === 0 ? 0 : r + 1;
|
|
896
896
|
this.getTextNodes(function(m) {
|
|
897
|
-
m.nodes.forEach(function(
|
|
898
|
-
|
|
899
|
-
for (var
|
|
900
|
-
if (
|
|
901
|
-
var C =
|
|
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)) {
|
|
901
|
+
var C = T.index;
|
|
902
902
|
if (f !== 0)
|
|
903
903
|
for (var L = 1; L < f; L++)
|
|
904
|
-
C +=
|
|
905
|
-
|
|
904
|
+
C += T[L].length;
|
|
905
|
+
x = h.wrapRangeInTextNode(x, C, C + T[f].length), s(x.previousSibling), n.lastIndex = 0;
|
|
906
906
|
}
|
|
907
907
|
}), u();
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
910
|
}, {
|
|
911
911
|
key: "wrapMatchesAcrossElements",
|
|
912
|
-
value: function(n,
|
|
913
|
-
var h = this, f =
|
|
912
|
+
value: function(n, r, i, s, u) {
|
|
913
|
+
var h = this, f = r === 0 ? 0 : r + 1;
|
|
914
914
|
this.getTextNodes(function(m) {
|
|
915
|
-
for (var
|
|
916
|
-
var
|
|
915
|
+
for (var x = void 0; (x = n.exec(m.value)) !== null && x[f] !== ""; ) {
|
|
916
|
+
var T = x.index;
|
|
917
917
|
if (f !== 0)
|
|
918
918
|
for (var C = 1; C < f; C++)
|
|
919
|
-
|
|
920
|
-
var L =
|
|
921
|
-
h.wrapRangeInMappedTextNode(m,
|
|
922
|
-
return
|
|
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);
|
|
923
923
|
}, function(R, F) {
|
|
924
924
|
n.lastIndex = F, s(R);
|
|
925
925
|
});
|
|
@@ -929,16 +929,16 @@ function Mn() {
|
|
|
929
929
|
}
|
|
930
930
|
}, {
|
|
931
931
|
key: "wrapRangeFromIndex",
|
|
932
|
-
value: function(n,
|
|
932
|
+
value: function(n, r, i, s) {
|
|
933
933
|
var u = this;
|
|
934
934
|
this.getTextNodes(function(h) {
|
|
935
935
|
var f = h.value.length;
|
|
936
|
-
n.forEach(function(m,
|
|
937
|
-
var
|
|
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
938
|
R && u.wrapRangeInMappedTextNode(h, C, L, function(F) {
|
|
939
|
-
return
|
|
939
|
+
return r(F, m, h.value.substring(C, L), x);
|
|
940
940
|
}, function(F) {
|
|
941
|
-
|
|
941
|
+
i(F, m);
|
|
942
942
|
});
|
|
943
943
|
}), s();
|
|
944
944
|
});
|
|
@@ -946,9 +946,9 @@ function Mn() {
|
|
|
946
946
|
}, {
|
|
947
947
|
key: "unwrapMatches",
|
|
948
948
|
value: function(n) {
|
|
949
|
-
for (var
|
|
950
|
-
|
|
951
|
-
|
|
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();
|
|
952
952
|
}
|
|
953
953
|
}, {
|
|
954
954
|
key: "normalizeTextNode",
|
|
@@ -964,59 +964,59 @@ function Mn() {
|
|
|
964
964
|
}
|
|
965
965
|
}, {
|
|
966
966
|
key: "markRegExp",
|
|
967
|
-
value: function(n,
|
|
968
|
-
var
|
|
969
|
-
this.opt =
|
|
967
|
+
value: function(n, r) {
|
|
968
|
+
var i = this;
|
|
969
|
+
this.opt = r, this.log('Searching with expression "' + n + '"');
|
|
970
970
|
var s = 0, u = "wrapMatches", h = function(m) {
|
|
971
|
-
s++,
|
|
971
|
+
s++, i.opt.each(m);
|
|
972
972
|
};
|
|
973
973
|
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), this[u](n, this.opt.ignoreGroups, function(f, m) {
|
|
974
|
-
return
|
|
974
|
+
return i.opt.filter(m, f, s);
|
|
975
975
|
}, h, function() {
|
|
976
|
-
s === 0 &&
|
|
976
|
+
s === 0 && i.opt.noMatch(n), i.opt.done(s);
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
979
|
}, {
|
|
980
980
|
key: "mark",
|
|
981
|
-
value: function(n,
|
|
982
|
-
var
|
|
983
|
-
this.opt =
|
|
984
|
-
var s = 0, u = "wrapMatches", h = this.getSeparatedKeywords(typeof n == "string" ? [n] : n), f = h.keywords, m = h.length,
|
|
985
|
-
var R = new RegExp(
|
|
986
|
-
|
|
987
|
-
return
|
|
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
988
|
}, function(V) {
|
|
989
|
-
F++, s++,
|
|
989
|
+
F++, s++, i.opt.each(V);
|
|
990
990
|
}, function() {
|
|
991
|
-
F === 0 &&
|
|
991
|
+
F === 0 && i.opt.noMatch(L), f[m - 1] === L ? i.opt.done(s) : C(f[f.indexOf(L) + 1]);
|
|
992
992
|
});
|
|
993
993
|
};
|
|
994
|
-
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) :
|
|
994
|
+
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) : T(f[0]);
|
|
995
995
|
}
|
|
996
996
|
}, {
|
|
997
997
|
key: "markRanges",
|
|
998
|
-
value: function(n,
|
|
999
|
-
var
|
|
1000
|
-
this.opt =
|
|
998
|
+
value: function(n, r) {
|
|
999
|
+
var i = this;
|
|
1000
|
+
this.opt = r;
|
|
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,
|
|
1003
|
-
return
|
|
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
1004
|
}, function(h, f) {
|
|
1005
|
-
s++,
|
|
1005
|
+
s++, i.opt.each(h, f);
|
|
1006
1006
|
}, function() {
|
|
1007
|
-
|
|
1007
|
+
i.opt.done(s);
|
|
1008
1008
|
})) : this.opt.done(s);
|
|
1009
1009
|
}
|
|
1010
1010
|
}, {
|
|
1011
1011
|
key: "unmark",
|
|
1012
1012
|
value: function(n) {
|
|
1013
|
-
var
|
|
1013
|
+
var r = this;
|
|
1014
1014
|
this.opt = n;
|
|
1015
|
-
var
|
|
1016
|
-
|
|
1017
|
-
|
|
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);
|
|
1018
1018
|
}, function(s) {
|
|
1019
|
-
var u = y.matches(s,
|
|
1019
|
+
var u = y.matches(s, i), h = r.matchesExclude(s);
|
|
1020
1020
|
return !u || h ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
1021
1021
|
}, this.opt.done);
|
|
1022
1022
|
}
|
|
@@ -1064,40 +1064,40 @@ function Mn() {
|
|
|
1064
1064
|
})();
|
|
1065
1065
|
function E(v) {
|
|
1066
1066
|
var c = this, n = new g(v);
|
|
1067
|
-
return this.mark = function(
|
|
1068
|
-
return n.mark(
|
|
1069
|
-
}, this.markRegExp = function(
|
|
1070
|
-
return n.markRegExp(
|
|
1071
|
-
}, this.markRanges = function(
|
|
1072
|
-
return n.markRanges(
|
|
1073
|
-
}, this.unmark = function(
|
|
1074
|
-
return n.unmark(
|
|
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;
|
|
1075
1075
|
}, this;
|
|
1076
1076
|
}
|
|
1077
1077
|
return E;
|
|
1078
1078
|
}));
|
|
1079
1079
|
})(ce)), ce.exports;
|
|
1080
1080
|
}
|
|
1081
|
-
var
|
|
1082
|
-
const
|
|
1083
|
-
function
|
|
1081
|
+
var Nn = On();
|
|
1082
|
+
const Ln = /* @__PURE__ */ Mn(Nn);
|
|
1083
|
+
function li(e, t, o) {
|
|
1084
1084
|
const a = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
1085
1085
|
return a === -1 ? !1 : (e.splice(a, 1, o), !0);
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function ui(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
1090
|
const a = document.createElement("div");
|
|
1091
1091
|
a.classList.add("vf-context-menu"), a.style.position = "absolute", o.appendChild(a);
|
|
1092
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((
|
|
1094
|
-
if (
|
|
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 == "-") {
|
|
1095
1095
|
const u = document.createElement("div");
|
|
1096
1096
|
u.classList.add("separator"), a.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 =
|
|
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());
|
|
1101
1101
|
});
|
|
1102
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
1103
|
a.style.left = v + "px", a.style.top = c + "px", setTimeout(() => {
|
|
@@ -1106,7 +1106,7 @@ function sr(e, t) {
|
|
|
1106
1106
|
function n() {
|
|
1107
1107
|
t.targetClass && p.classList.remove(t.targetClass), p.classList.remove("context-menu-active"), p.style.userSelect = "", o.remove();
|
|
1108
1108
|
}
|
|
1109
|
-
function i
|
|
1109
|
+
function r(i, s, u) {
|
|
1110
1110
|
if (s.classList.contains("pending-confirm"))
|
|
1111
1111
|
return u();
|
|
1112
1112
|
const h = s.innerHTML;
|
|
@@ -1114,17 +1114,17 @@ function sr(e, t) {
|
|
|
1114
1114
|
const f = () => {
|
|
1115
1115
|
s.classList.remove("pending-confirm"), s.innerHTML = h, s.removeEventListener("mouseleave", f);
|
|
1116
1116
|
};
|
|
1117
|
-
s.addEventListener("mouseleave", f),
|
|
1117
|
+
s.addEventListener("mouseleave", f), i.stopPropagation();
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
const
|
|
1121
|
-
function
|
|
1120
|
+
const Rn = (e) => new Promise((t) => setTimeout(t, e)), ci = (e) => Rn(e * 1e3);
|
|
1121
|
+
function Fn(e) {
|
|
1122
1122
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1125
|
-
return e != null ?
|
|
1124
|
+
function di(e, t) {
|
|
1125
|
+
return e != null ? Yt(e) : t;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function fi(e, t) {
|
|
1128
1128
|
const o = { ...e };
|
|
1129
1129
|
for (const a of t)
|
|
1130
1130
|
o[a] === "" && (o[a] = null);
|
|
@@ -1133,17 +1133,17 @@ function cr(e, t) {
|
|
|
1133
1133
|
function Ye(e) {
|
|
1134
1134
|
return e != null;
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1137
|
-
|
|
1136
|
+
function hi(e, t) {
|
|
1137
|
+
on(e, {
|
|
1138
1138
|
...t,
|
|
1139
1139
|
onError(o, a) {
|
|
1140
|
-
o instanceof
|
|
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
1141
|
const p = t.onError?.(o, a);
|
|
1142
1142
|
return p !== void 0 ? p : o;
|
|
1143
1143
|
}
|
|
1144
1144
|
});
|
|
1145
1145
|
}
|
|
1146
|
-
var
|
|
1146
|
+
var An = {
|
|
1147
1147
|
symbol: "$",
|
|
1148
1148
|
separator: ",",
|
|
1149
1149
|
decimal: ".",
|
|
@@ -1151,21 +1151,21 @@ var Rn = {
|
|
|
1151
1151
|
precision: 2,
|
|
1152
1152
|
pattern: "!#",
|
|
1153
1153
|
negativePattern: "-!#",
|
|
1154
|
-
format:
|
|
1154
|
+
format: Vn,
|
|
1155
1155
|
fromCents: !1
|
|
1156
|
-
},
|
|
1156
|
+
}, gt = function(t) {
|
|
1157
1157
|
return Math.round(t);
|
|
1158
1158
|
}, Fe = function(t) {
|
|
1159
1159
|
return Math.pow(10, t);
|
|
1160
|
-
},
|
|
1161
|
-
return
|
|
1162
|
-
},
|
|
1160
|
+
}, Dn = function(t, o) {
|
|
1161
|
+
return gt(t / o) * o;
|
|
1162
|
+
}, $n = /(\d)(?=(\d{3})+\b)/g, Hn = /(\d)(?=(\d\d)+\d\b)/g;
|
|
1163
1163
|
function _(e, t) {
|
|
1164
1164
|
var o = this;
|
|
1165
1165
|
if (!(o instanceof _))
|
|
1166
1166
|
return new _(e, t);
|
|
1167
|
-
var a = Object.assign({},
|
|
1168
|
-
o.intValue = l, o.value = l / p, a.increment = a.increment || 1 / p, a.useVedic ? a.groups =
|
|
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;
|
|
1169
1169
|
}
|
|
1170
1170
|
function de(e, t) {
|
|
1171
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 _;
|
|
@@ -1174,16 +1174,16 @@ function de(e, t) {
|
|
|
1174
1174
|
if (v || c)
|
|
1175
1175
|
a = c ? e.value : e;
|
|
1176
1176
|
else if (typeof e == "string") {
|
|
1177
|
-
var n = new RegExp("[^-\\d" + p + "]", "g"),
|
|
1178
|
-
a = e.replace(/\((.*)\)/, "-$1").replace(n, "").replace(
|
|
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;
|
|
1179
1179
|
} else {
|
|
1180
1180
|
if (l)
|
|
1181
1181
|
throw Error("Invalid Input");
|
|
1182
1182
|
a = 0;
|
|
1183
1183
|
}
|
|
1184
|
-
return g || (a *= E, a = a.toFixed(4)), o ?
|
|
1184
|
+
return g || (a *= E, a = a.toFixed(4)), o ? gt(a) : a;
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function Vn(e, t) {
|
|
1187
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
1188
|
return (e.value >= 0 ? o : a).replace("!", p).replace("#", v.replace(g, "$1" + l) + (c ? y + c : ""));
|
|
1189
1189
|
}
|
|
@@ -1267,7 +1267,7 @@ _.prototype = {
|
|
|
1267
1267
|
*/
|
|
1268
1268
|
toString: function() {
|
|
1269
1269
|
var t = this.intValue, o = this.p, a = this.s;
|
|
1270
|
-
return
|
|
1270
|
+
return Dn(t / o, a.increment).toFixed(a.precision);
|
|
1271
1271
|
},
|
|
1272
1272
|
/**
|
|
1273
1273
|
* Value for JSON serialization.
|
|
@@ -1280,56 +1280,56 @@ _.prototype = {
|
|
|
1280
1280
|
const A = [];
|
|
1281
1281
|
for (let e = 0; e < 256; ++e)
|
|
1282
1282
|
A.push((e + 256).toString(16).slice(1));
|
|
1283
|
-
function
|
|
1283
|
+
function Bn(e, t = 0) {
|
|
1284
1284
|
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
1285
|
}
|
|
1286
|
-
let
|
|
1287
|
-
const
|
|
1288
|
-
function
|
|
1289
|
-
if (!
|
|
1286
|
+
let Se;
|
|
1287
|
+
const _n = new Uint8Array(16);
|
|
1288
|
+
function Wn() {
|
|
1289
|
+
if (!Se) {
|
|
1290
1290
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1291
1291
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1292
|
-
|
|
1292
|
+
Se = crypto.getRandomValues.bind(crypto);
|
|
1293
1293
|
}
|
|
1294
|
-
return
|
|
1294
|
+
return Se(_n);
|
|
1295
1295
|
}
|
|
1296
|
-
const
|
|
1297
|
-
function
|
|
1296
|
+
const Pn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Xe = { randomUUID: Pn };
|
|
1297
|
+
function jn(e, t, o) {
|
|
1298
1298
|
e = e || {};
|
|
1299
|
-
const a = e.random ?? e.rng?.() ??
|
|
1299
|
+
const a = e.random ?? e.rng?.() ?? Wn();
|
|
1300
1300
|
if (a.length < 16)
|
|
1301
1301
|
throw new Error("Random bytes length must be >= 16");
|
|
1302
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1302
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Bn(a);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return Xe.randomUUID && !e ? Xe.randomUUID() :
|
|
1304
|
+
function Un(e, t, o) {
|
|
1305
|
+
return Xe.randomUUID && !e ? Xe.randomUUID() : jn(e);
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function pi(e) {
|
|
1308
1308
|
return e.replace(/\n/g, "<br>");
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function zn(e) {
|
|
1311
1311
|
return e.replace(/_/g, " ");
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function qn(e) {
|
|
1314
1314
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
1315
1315
|
return t.length !== 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1318
|
-
return _(e).divide(t ??
|
|
1317
|
+
function Jn(e, t) {
|
|
1318
|
+
return _(e).divide(t ?? D.defaultCurrencyDivisor).format();
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
return
|
|
1320
|
+
function vi() {
|
|
1321
|
+
return Un();
|
|
1322
1322
|
}
|
|
1323
|
-
const
|
|
1323
|
+
const Kn = ["disabled", "placeholder", "required", "name"], Yn = {
|
|
1324
1324
|
key: 0,
|
|
1325
1325
|
class: "no-results"
|
|
1326
|
-
},
|
|
1326
|
+
}, Xn = {
|
|
1327
1327
|
key: 0,
|
|
1328
1328
|
class: "group-title"
|
|
1329
|
-
},
|
|
1329
|
+
}, Zn = ["onMousemove", "onMousedown"], Gn = ["innerHTML"], Qn = ["innerHTML"], eo = {
|
|
1330
1330
|
key: 1,
|
|
1331
1331
|
class: "no-results"
|
|
1332
|
-
},
|
|
1332
|
+
}, to = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", no = /* @__PURE__ */ q({
|
|
1333
1333
|
__name: "vf-smart-select",
|
|
1334
1334
|
props: {
|
|
1335
1335
|
modelValue: {},
|
|
@@ -1368,62 +1368,62 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1368
1368
|
setup(e, { expose: t, emit: o }) {
|
|
1369
1369
|
const a = Symbol("null"), p = Symbol("create"), l = e, y = o;
|
|
1370
1370
|
t({
|
|
1371
|
-
addRemoteOption:
|
|
1371
|
+
addRemoteOption: Bt
|
|
1372
1372
|
});
|
|
1373
|
-
const g = N(), E = N(), v = N(), c = N(!1), n = N(),
|
|
1374
|
-
const k =
|
|
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 = [];
|
|
1375
1375
|
return l.searchFields ? l.searchFields.forEach((Je) => {
|
|
1376
1376
|
d[Je] && ue.push(
|
|
1377
1377
|
String(d[Je]).toLowerCase().replace(/^[a-z0-9 ]+$/i, "")
|
|
1378
1378
|
);
|
|
1379
1379
|
}) : (ue.push(B), qe && ue.push(qe)), {
|
|
1380
|
-
key:
|
|
1380
|
+
key: we.value?.(d) ?? String(b),
|
|
1381
1381
|
group: k,
|
|
1382
|
-
title:
|
|
1382
|
+
title: w,
|
|
1383
1383
|
subtitle: M,
|
|
1384
1384
|
searchContent: ue.join(""),
|
|
1385
1385
|
ref: d
|
|
1386
1386
|
};
|
|
1387
|
-
})),
|
|
1388
|
-
let d = [...
|
|
1389
|
-
if (
|
|
1390
|
-
const b =
|
|
1391
|
-
b.length && (d = d.filter((k) => k.searchContent.includes(b)), m.value && (d.find((
|
|
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
1392
|
key: p,
|
|
1393
|
-
title:
|
|
1393
|
+
title: x.value ? "Create <strong>" + i.value.trim() + "</strong>..." : i.value.trim()
|
|
1394
1394
|
})));
|
|
1395
1395
|
} else l.nullTitle && d.unshift({
|
|
1396
1396
|
key: a,
|
|
1397
1397
|
title: l.nullTitle
|
|
1398
1398
|
});
|
|
1399
1399
|
return d;
|
|
1400
|
-
}),
|
|
1400
|
+
}), Ct = O(() => {
|
|
1401
1401
|
if (!Be.value)
|
|
1402
1402
|
return [
|
|
1403
1403
|
{
|
|
1404
1404
|
groupTitle: "",
|
|
1405
|
-
options:
|
|
1405
|
+
options: $.value
|
|
1406
1406
|
}
|
|
1407
1407
|
];
|
|
1408
|
-
const d =
|
|
1408
|
+
const d = Xt($.value.map((k) => k.group ?? "")), b = Zt($.value, (k) => k.group ?? "");
|
|
1409
1409
|
return d.map((k) => ({
|
|
1410
1410
|
groupTitle: k,
|
|
1411
1411
|
options: b[k]
|
|
1412
1412
|
}));
|
|
1413
1413
|
});
|
|
1414
|
-
H(() => l.modelValue, G), H(
|
|
1414
|
+
H(() => l.modelValue, G), H(xe, () => {
|
|
1415
1415
|
h.value && setTimeout(je, 0);
|
|
1416
|
-
}), H(
|
|
1417
|
-
|
|
1416
|
+
}), H(i, () => {
|
|
1417
|
+
r.value && !l.remoteSearch && !i.value.trim().length && (r.value = !1);
|
|
1418
1418
|
}), H(h, () => {
|
|
1419
|
-
h.value ? setTimeout(
|
|
1420
|
-
}), H(
|
|
1421
|
-
l.modelValue !== null && s.value === null && G(), (f.value !== null ||
|
|
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);
|
|
1422
1422
|
}), z(async () => {
|
|
1423
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
1424
|
const d = Ye(s.value) && Z.value !== null ? Z.value(s.value) : s.value;
|
|
1425
|
-
|
|
1426
|
-
}), l.remoteSearch && H(
|
|
1425
|
+
Me(l.modelValue, d) || y("update:modelValue", d);
|
|
1426
|
+
}), l.remoteSearch && H(i, Gt(Ot, 250));
|
|
1427
1427
|
}), me(() => {
|
|
1428
1428
|
v.value?.remove();
|
|
1429
1429
|
});
|
|
@@ -1431,20 +1431,20 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1431
1431
|
await We(!0), G(), n.value && y("optionsLoaded", n.value);
|
|
1432
1432
|
}
|
|
1433
1433
|
async function We(d = !1) {
|
|
1434
|
-
const b = l.remoteSearch &&
|
|
1434
|
+
const b = l.remoteSearch && r.value && i.value.length ? i.value : null;
|
|
1435
1435
|
c.value = !0, n.value = await l.loadOptions?.(b) ?? [], c.value = !1, d && G(), Pe();
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1438
|
-
|
|
1437
|
+
function Ot() {
|
|
1438
|
+
r.value && (We(), r.value = i.value.trim().length > 0);
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function Nt(d) {
|
|
1441
1441
|
if (d.key == "Escape") {
|
|
1442
1442
|
d.stopPropagation(), d.target.blur(), ze();
|
|
1443
1443
|
return;
|
|
1444
1444
|
}
|
|
1445
1445
|
if (!(d.key == "ArrowLeft" || d.key == "ArrowRight") && d.key != "Tab") {
|
|
1446
|
-
if (!
|
|
1447
|
-
|
|
1446
|
+
if (!T.value) {
|
|
1447
|
+
r.value || d.preventDefault();
|
|
1448
1448
|
return;
|
|
1449
1449
|
}
|
|
1450
1450
|
if (d.key == "ArrowUp" || d.key == "ArrowDown")
|
|
@@ -1455,83 +1455,83 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1455
1455
|
return d.preventDefault(), be(d.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
|
|
1456
1456
|
if (d.key == "Enter") {
|
|
1457
1457
|
d.preventDefault();
|
|
1458
|
-
const b =
|
|
1458
|
+
const b = $.value.find((k) => k.key == f.value);
|
|
1459
1459
|
if (b) return Ue(b);
|
|
1460
1460
|
}
|
|
1461
1461
|
if (d.key === "Delete" || d.key === "Backspace") {
|
|
1462
|
-
|
|
1462
|
+
i.value.length > 1 && (r.value = !0);
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
|
-
!d.metaKey &&
|
|
1465
|
+
!d.metaKey && to.includes(d.key) && (r.value = !0);
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1469
|
-
|
|
1468
|
+
function Lt() {
|
|
1469
|
+
r.value = !0;
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function Rt() {
|
|
1472
1472
|
Pe(), h.value = !0, setTimeout(() => E.value?.select(), 0);
|
|
1473
1473
|
}
|
|
1474
1474
|
function Pe(d) {
|
|
1475
|
-
s.value ? f.value =
|
|
1475
|
+
s.value ? f.value = Ft(s.value) : l.nullTitle && (f.value = a);
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1478
|
-
return
|
|
1477
|
+
function Ft(d) {
|
|
1478
|
+
return we.value ? we.value(s.value) : At(d)?.key ?? "";
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1481
|
-
const b =
|
|
1480
|
+
function At(d) {
|
|
1481
|
+
const b = $.value.find((M) => M.ref === d);
|
|
1482
1482
|
if (b)
|
|
1483
1483
|
return b;
|
|
1484
|
-
const k = l.keyExtractor ? (M, B) => l.keyExtractor(M) === l.keyExtractor(B) :
|
|
1485
|
-
return
|
|
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;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1488
|
-
l.debug || (!
|
|
1487
|
+
function Dt() {
|
|
1488
|
+
l.debug || (!i.value.length && l.nullTitle && (s.value = null, u.value = null), h.value = !1);
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1491
|
-
|
|
1490
|
+
function $t() {
|
|
1491
|
+
T.value || _e(), l.optionsListId && v.value?.setAttribute("id", l.optionsListId), Ht();
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1494
|
-
const d = g.value.getBoundingClientRect(), b = d.y + d.height + 2, k = d.x,
|
|
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);
|
|
1495
1495
|
for (let B in M)
|
|
1496
|
-
/^(font|text)/.test(B) && (
|
|
1497
|
-
if (
|
|
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") {
|
|
1498
1498
|
const B = window.innerHeight - b - 12;
|
|
1499
|
-
|
|
1499
|
+
w.style.maxHeight = B + "px";
|
|
1500
1500
|
}
|
|
1501
|
-
|
|
1501
|
+
w.style.visibility = "visible", document.body.appendChild(w), setTimeout(je, 0);
|
|
1502
1502
|
}
|
|
1503
1503
|
function je() {
|
|
1504
|
-
if (!
|
|
1505
|
-
const d =
|
|
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];
|
|
1506
1506
|
k && (b.scrollTop = k.offsetTop);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1508
|
+
function Vt(d) {
|
|
1509
1509
|
f.value = d ? d.key : null;
|
|
1510
1510
|
}
|
|
1511
1511
|
function be(d) {
|
|
1512
|
-
const b =
|
|
1512
|
+
const b = $.value.findIndex((B) => B.key == f.value);
|
|
1513
1513
|
let k = b + d;
|
|
1514
|
-
if (k < 0 ? k = 0 : k >=
|
|
1515
|
-
f.value =
|
|
1516
|
-
const
|
|
1517
|
-
M && (M.offsetTop <
|
|
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));
|
|
1518
1518
|
}
|
|
1519
1519
|
function Ue(d) {
|
|
1520
|
-
if (
|
|
1521
|
-
|
|
1520
|
+
if (r.value = !1, d.key === a)
|
|
1521
|
+
i.value = "", s.value = null, u.value = null;
|
|
1522
1522
|
else if (d.key === p) {
|
|
1523
|
-
const b =
|
|
1524
|
-
|
|
1523
|
+
const b = i.value.trim();
|
|
1524
|
+
i.value = "", s.value = null, u.value = null, l.onCreateItem?.(b);
|
|
1525
1525
|
} else {
|
|
1526
|
-
const k =
|
|
1527
|
-
s.value = k, u.value = He.value(k),
|
|
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 ?? "";
|
|
1528
1528
|
}
|
|
1529
1529
|
E.value?.blur(), ze();
|
|
1530
1530
|
}
|
|
1531
1531
|
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,
|
|
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 = "");
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function Bt(d) {
|
|
1535
1535
|
n.value.unshift(d);
|
|
1536
1536
|
}
|
|
1537
1537
|
function ze() {
|
|
@@ -1542,21 +1542,21 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1542
1542
|
if (!d) return;
|
|
1543
1543
|
const b = d.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
|
|
1544
1544
|
if (!b) return;
|
|
1545
|
-
const k = Array.from(b).findIndex((M) => M === E.value),
|
|
1546
|
-
|
|
1545
|
+
const k = Array.from(b).findIndex((M) => M === E.value), w = b[k + 1];
|
|
1546
|
+
w && setTimeout(() => w.focus(), 0);
|
|
1547
1547
|
}
|
|
1548
|
-
return
|
|
1549
|
-
if (!h.value || !
|
|
1550
|
-
const d =
|
|
1548
|
+
return Jt(() => {
|
|
1549
|
+
if (!h.value || !r.value || !i.value) return;
|
|
1550
|
+
const d = i.value.trim().replace(/[^a-z0-9 -]/gi, "").split(" ");
|
|
1551
1551
|
v.value?.querySelectorAll(".option").forEach((b) => {
|
|
1552
|
-
const k = new
|
|
1552
|
+
const k = new Ln(b);
|
|
1553
1553
|
k.unmark(), k.mark(d, {
|
|
1554
1554
|
done: () => {
|
|
1555
1555
|
b.innerHTML = b.innerHTML.replace(/ <mark /g, " <mark ").replace(/<\/mark> /g, "</mark> ");
|
|
1556
1556
|
}
|
|
1557
1557
|
});
|
|
1558
1558
|
});
|
|
1559
|
-
}), (d, b) => (
|
|
1559
|
+
}), (d, b) => (S(), I("div", {
|
|
1560
1560
|
ref_key: "el",
|
|
1561
1561
|
ref: g,
|
|
1562
1562
|
class: P(["vf-smart-select", { disabled: F.value, open: h.value }])
|
|
@@ -1564,7 +1564,7 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1564
1564
|
fe(U("input", {
|
|
1565
1565
|
ref_key: "searchField",
|
|
1566
1566
|
ref: E,
|
|
1567
|
-
"onUpdate:modelValue": b[0] || (b[0] = (k) =>
|
|
1567
|
+
"onUpdate:modelValue": b[0] || (b[0] = (k) => i.value = k),
|
|
1568
1568
|
type: "text",
|
|
1569
1569
|
disabled: F.value,
|
|
1570
1570
|
class: P({ nullable: !!e.nullTitle }),
|
|
@@ -1572,58 +1572,58 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1572
1572
|
required: e.required,
|
|
1573
1573
|
name: e.name,
|
|
1574
1574
|
"data-1p-ignore": "",
|
|
1575
|
-
onKeydown:
|
|
1576
|
-
onPaste:
|
|
1577
|
-
onFocus:
|
|
1578
|
-
onBlur:
|
|
1579
|
-
}, null, 42,
|
|
1580
|
-
[
|
|
1575
|
+
onKeydown: Nt,
|
|
1576
|
+
onPaste: Lt,
|
|
1577
|
+
onFocus: Rt,
|
|
1578
|
+
onBlur: Dt
|
|
1579
|
+
}, null, 42, Kn), [
|
|
1580
|
+
[Kt, i.value]
|
|
1581
1581
|
]),
|
|
1582
|
-
h.value ? (
|
|
1582
|
+
h.value ? (S(), I("div", {
|
|
1583
1583
|
key: 0,
|
|
1584
1584
|
ref_key: "optionsContainer",
|
|
1585
1585
|
ref: v,
|
|
1586
1586
|
class: P(["vf-smart-select-options", { grouped: Be.value }])
|
|
1587
1587
|
}, [
|
|
1588
|
-
|
|
1588
|
+
T.value ? (S(!0), I(he, { key: 1 }, pe(Ct.value, (k) => (S(), I("div", {
|
|
1589
1589
|
key: k.groupTitle,
|
|
1590
1590
|
class: "group"
|
|
1591
1591
|
}, [
|
|
1592
|
-
k.groupTitle ? (
|
|
1592
|
+
k.groupTitle ? (S(), I("div", Xn, [
|
|
1593
1593
|
K(d.$slots, "group", {
|
|
1594
1594
|
group: k.groupTitle
|
|
1595
1595
|
}, () => [
|
|
1596
1596
|
te(J(k.groupTitle), 1)
|
|
1597
1597
|
])
|
|
1598
1598
|
])) : W("", !0),
|
|
1599
|
-
(
|
|
1600
|
-
key:
|
|
1601
|
-
class: P(["option", [f.value ===
|
|
1602
|
-
onMousemove: (M) =>
|
|
1603
|
-
onMousedown: (M) => Ue(
|
|
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)
|
|
1604
1604
|
}, [
|
|
1605
|
-
K(d.$slots, "option", { option:
|
|
1605
|
+
K(d.$slots, "option", { option: w }, () => [
|
|
1606
1606
|
U("div", {
|
|
1607
1607
|
class: "title",
|
|
1608
|
-
innerHTML:
|
|
1609
|
-
}, null, 8,
|
|
1610
|
-
|
|
1608
|
+
innerHTML: w.title
|
|
1609
|
+
}, null, 8, Gn),
|
|
1610
|
+
w.subtitle ? (S(), I("div", {
|
|
1611
1611
|
key: 0,
|
|
1612
1612
|
class: "subtitle",
|
|
1613
|
-
innerHTML:
|
|
1614
|
-
}, null, 8,
|
|
1613
|
+
innerHTML: w.subtitle
|
|
1614
|
+
}, null, 8, Qn)) : W("", !0)
|
|
1615
1615
|
])
|
|
1616
|
-
], 42,
|
|
1617
|
-
|
|
1616
|
+
], 42, Zn))), 128)),
|
|
1617
|
+
!$.value.length && i.value ? (S(), I("div", eo, [
|
|
1618
1618
|
K(d.$slots, "no-results", {}, () => [
|
|
1619
|
-
te(J(
|
|
1619
|
+
te(J(It.value), 1)
|
|
1620
1620
|
])
|
|
1621
1621
|
])) : W("", !0)
|
|
1622
|
-
]))), 128)) : (
|
|
1622
|
+
]))), 128)) : (S(), I("div", Yn, "Loading..."))
|
|
1623
1623
|
], 2)) : W("", !0)
|
|
1624
1624
|
], 2));
|
|
1625
1625
|
}
|
|
1626
|
-
}),
|
|
1626
|
+
}), mi = /* @__PURE__ */ q({
|
|
1627
1627
|
__name: "vf-ez-smart-select",
|
|
1628
1628
|
props: {
|
|
1629
1629
|
modelValue: {},
|
|
@@ -1645,9 +1645,9 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1645
1645
|
y.value = a.value.find((E) => E.value === g) ?? null;
|
|
1646
1646
|
}
|
|
1647
1647
|
), H(y, (g) => {
|
|
1648
|
-
const E = g ? a.value.find((v) =>
|
|
1648
|
+
const E = g ? a.value.find((v) => Me(v, g))?.value : null;
|
|
1649
1649
|
l("update:modelValue", E ?? null);
|
|
1650
|
-
}), (g, E) => (
|
|
1650
|
+
}), (g, E) => (S(), lt(no, {
|
|
1651
1651
|
modelValue: y.value,
|
|
1652
1652
|
"onUpdate:modelValue": E[0] || (E[0] = (v) => y.value = v),
|
|
1653
1653
|
options: a.value,
|
|
@@ -1658,16 +1658,16 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1658
1658
|
}, null, 8, ["modelValue", "options", "formatter", "null-title", "placeholder", "name"]));
|
|
1659
1659
|
}
|
|
1660
1660
|
});
|
|
1661
|
-
function
|
|
1661
|
+
function gi() {
|
|
1662
1662
|
return N();
|
|
1663
1663
|
}
|
|
1664
|
-
const
|
|
1664
|
+
const oo = { class: "content" }, io = { class: "message" }, ro = {
|
|
1665
1665
|
key: 0,
|
|
1666
1666
|
class: "close"
|
|
1667
|
-
},
|
|
1667
|
+
}, ao = {
|
|
1668
1668
|
key: 0,
|
|
1669
1669
|
class: "progress-bar"
|
|
1670
|
-
},
|
|
1670
|
+
}, so = /* @__PURE__ */ q({
|
|
1671
1671
|
__name: "vf-toast",
|
|
1672
1672
|
props: {
|
|
1673
1673
|
position: {},
|
|
@@ -1690,15 +1690,15 @@ const to = { class: "content" }, no = { class: "message" }, oo = {
|
|
|
1690
1690
|
duration: p * 1e3,
|
|
1691
1691
|
easing: "linear"
|
|
1692
1692
|
}), setTimeout(() => t.callback(), p * 1e3);
|
|
1693
|
-
}), (p, l) => (
|
|
1693
|
+
}), (p, l) => (S(), I("div", {
|
|
1694
1694
|
class: P(["vf-toast", [e.className, { top: e.position === "top", bottom: e.position !== "top" }]]),
|
|
1695
1695
|
onClick: Le(o, ["stop"])
|
|
1696
1696
|
}, [
|
|
1697
|
-
U("div",
|
|
1698
|
-
U("div",
|
|
1699
|
-
e.disableClose ? W("", !0) : (
|
|
1697
|
+
U("div", oo, [
|
|
1698
|
+
U("div", io, J(e.message), 1),
|
|
1699
|
+
e.disableClose ? W("", !0) : (S(), I("div", ro, "x"))
|
|
1700
1700
|
]),
|
|
1701
|
-
e.durationSecs !== null ? (
|
|
1701
|
+
e.durationSecs !== null ? (S(), I("div", ao, [
|
|
1702
1702
|
U("div", {
|
|
1703
1703
|
ref_key: "progressInnerEl",
|
|
1704
1704
|
ref: a,
|
|
@@ -1708,96 +1708,96 @@ const to = { class: "content" }, no = { class: "message" }, oo = {
|
|
|
1708
1708
|
], 2));
|
|
1709
1709
|
}
|
|
1710
1710
|
});
|
|
1711
|
-
function
|
|
1712
|
-
const t = ge(
|
|
1711
|
+
function yi(e) {
|
|
1712
|
+
const t = ge(so, {
|
|
1713
1713
|
...e,
|
|
1714
|
-
callback: () =>
|
|
1714
|
+
callback: () => re(t)
|
|
1715
1715
|
});
|
|
1716
|
-
return () =>
|
|
1716
|
+
return () => re(t);
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function lo(e) {
|
|
1719
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
1720
|
return `${a} ${p}`;
|
|
1721
1721
|
}
|
|
1722
|
-
function so(e) {
|
|
1723
|
-
return e != null && String(e).length ? e : "-";
|
|
1724
|
-
}
|
|
1725
|
-
function lo(e) {
|
|
1726
|
-
return e || "-";
|
|
1727
|
-
}
|
|
1728
1722
|
function uo(e) {
|
|
1729
|
-
return e
|
|
1723
|
+
return e != null && String(e).length ? e : "-";
|
|
1730
1724
|
}
|
|
1731
1725
|
function co(e) {
|
|
1732
|
-
return e
|
|
1726
|
+
return e || "-";
|
|
1733
1727
|
}
|
|
1734
1728
|
function fo(e) {
|
|
1735
|
-
return e
|
|
1736
|
-
}
|
|
1737
|
-
function vt(e) {
|
|
1738
|
-
return e ? Xt(e) : null;
|
|
1729
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Fn(Number(e));
|
|
1739
1730
|
}
|
|
1740
1731
|
function ho(e) {
|
|
1741
|
-
return e
|
|
1732
|
+
return e && qn(e);
|
|
1742
1733
|
}
|
|
1743
1734
|
function po(e) {
|
|
1744
|
-
return e ?
|
|
1735
|
+
return e ? en(e) : null;
|
|
1736
|
+
}
|
|
1737
|
+
function yt(e) {
|
|
1738
|
+
return e ? Qt(e) : null;
|
|
1745
1739
|
}
|
|
1746
1740
|
function vo(e) {
|
|
1747
|
-
return e ?
|
|
1741
|
+
return e ? e.toUpperCase() : null;
|
|
1748
1742
|
}
|
|
1749
|
-
function mo(e
|
|
1750
|
-
return
|
|
1743
|
+
function mo(e) {
|
|
1744
|
+
return e ? yt(e.toLowerCase()) : null;
|
|
1751
1745
|
}
|
|
1752
|
-
function go(e
|
|
1753
|
-
return
|
|
1746
|
+
function go(e) {
|
|
1747
|
+
return e ? zn(e) : null;
|
|
1754
1748
|
}
|
|
1755
1749
|
function yo(e, t) {
|
|
1756
|
-
return
|
|
1750
|
+
return Jn(e, t);
|
|
1757
1751
|
}
|
|
1758
1752
|
function Eo(e, t) {
|
|
1759
|
-
return
|
|
1753
|
+
return _(e).divide(t).value;
|
|
1760
1754
|
}
|
|
1761
1755
|
function ko(e, t) {
|
|
1762
|
-
return e && X(new Date(e), t ??
|
|
1756
|
+
return e && X(new Date(e), t ?? D.defaultDateFormat);
|
|
1757
|
+
}
|
|
1758
|
+
function wo(e, t) {
|
|
1759
|
+
return e && X(new Date(e), t ?? D.defaultTimeFormat);
|
|
1760
|
+
}
|
|
1761
|
+
function xo(e, t) {
|
|
1762
|
+
return e && X(new Date(e), t ?? `${D.defaultDateFormat} ${D.defaultTimeFormat}`);
|
|
1763
1763
|
}
|
|
1764
|
-
function
|
|
1765
|
-
return e && X(
|
|
1764
|
+
function bo(e) {
|
|
1765
|
+
return e && X(an(sn(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), D.defaultDateFormat);
|
|
1766
1766
|
}
|
|
1767
1767
|
const Ze = {
|
|
1768
|
-
bytes:
|
|
1769
|
-
dash:
|
|
1770
|
-
dashZeros:
|
|
1771
|
-
number:
|
|
1772
|
-
phone:
|
|
1773
|
-
upperFirst:
|
|
1774
|
-
startCase:
|
|
1775
|
-
upperCase:
|
|
1776
|
-
upperWords:
|
|
1777
|
-
desnake:
|
|
1778
|
-
usCurrency:
|
|
1779
|
-
divide:
|
|
1780
|
-
date:
|
|
1781
|
-
time:
|
|
1782
|
-
dateTime:
|
|
1783
|
-
oneDayForward:
|
|
1784
|
-
},
|
|
1768
|
+
bytes: lo,
|
|
1769
|
+
dash: uo,
|
|
1770
|
+
dashZeros: co,
|
|
1771
|
+
number: fo,
|
|
1772
|
+
phone: ho,
|
|
1773
|
+
upperFirst: po,
|
|
1774
|
+
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) => ({
|
|
1785
1785
|
...Ze,
|
|
1786
1786
|
...e(Ze)
|
|
1787
1787
|
}), Ae = Symbol("HookState");
|
|
1788
|
-
function
|
|
1788
|
+
function ki(e, t) {
|
|
1789
1789
|
const o = t ?? Ne();
|
|
1790
|
-
z(() =>
|
|
1790
|
+
z(() => To(o, e), o), ut(() => So(o), o), ct(() => Ge(o), o), me(() => Ge(o), o);
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function To(e, t) {
|
|
1793
1793
|
const o = {};
|
|
1794
1794
|
if (t.elScrolledToBottom && (o.el = new oe(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
1795
|
-
const a =
|
|
1795
|
+
const a = Et(e.vnode.el);
|
|
1796
1796
|
a ? o.ancestor = new oe(a, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
1797
1797
|
}
|
|
1798
1798
|
t.windowScrolledToBottom && (o.window = new oe(window, t.windowScrolledToBottom)), e[Ae] = o;
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1800
|
+
function So(e) {
|
|
1801
1801
|
const t = e[Ae];
|
|
1802
1802
|
t?.el?.install(), t?.ancestor?.install(), t?.window?.install();
|
|
1803
1803
|
}
|
|
@@ -1806,11 +1806,11 @@ function Ge(e) {
|
|
|
1806
1806
|
t?.el?.uninstall(), t?.ancestor?.uninstall(), t?.window?.uninstall();
|
|
1807
1807
|
}
|
|
1808
1808
|
const Ie = ["auto", "scroll"];
|
|
1809
|
-
function
|
|
1809
|
+
function Et(e) {
|
|
1810
1810
|
const t = e.parentElement;
|
|
1811
1811
|
if (!t) return null;
|
|
1812
1812
|
const o = window.getComputedStyle(t);
|
|
1813
|
-
return Ie.includes(o.overflow) || Ie.includes(o.overflowX) || Ie.includes(o.overflowY) ? t :
|
|
1813
|
+
return Ie.includes(o.overflow) || Ie.includes(o.overflowX) || Ie.includes(o.overflowY) ? t : Et(t);
|
|
1814
1814
|
}
|
|
1815
1815
|
class oe {
|
|
1816
1816
|
constructor(t, o) {
|
|
@@ -1828,10 +1828,10 @@ class oe {
|
|
|
1828
1828
|
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
1829
|
}
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
z(() => window.addEventListener("resize", e)),
|
|
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));
|
|
1833
1833
|
}
|
|
1834
|
-
const
|
|
1834
|
+
const Io = {
|
|
1835
1835
|
mounted: et,
|
|
1836
1836
|
updated: et
|
|
1837
1837
|
}, Qe = Symbol("HasAutoFocused");
|
|
@@ -1841,10 +1841,10 @@ function et(e, t) {
|
|
|
1841
1841
|
const o = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1842
1842
|
setTimeout(() => o.focus(), 10);
|
|
1843
1843
|
}
|
|
1844
|
-
const
|
|
1845
|
-
mounted:
|
|
1844
|
+
const Mo = {
|
|
1845
|
+
mounted: Co
|
|
1846
1846
|
}, Q = Symbol("ConfirmState");
|
|
1847
|
-
function
|
|
1847
|
+
function Co(e, t) {
|
|
1848
1848
|
e.addEventListener("click", (o) => {
|
|
1849
1849
|
const a = Date.now(), p = t.value?.text !== void 0 ? t.value.text : "Confirm";
|
|
1850
1850
|
if (e[Q]) {
|
|
@@ -1864,10 +1864,10 @@ function Io(e, t) {
|
|
|
1864
1864
|
e[Q] = l, p && (e.innerHTML = p), t.value?.class && e.classList.add(t.value.class), e.addEventListener("mouseout", l.resetHandler);
|
|
1865
1865
|
});
|
|
1866
1866
|
}
|
|
1867
|
-
const
|
|
1868
|
-
beforeMount:
|
|
1867
|
+
const Oo = {
|
|
1868
|
+
beforeMount: No
|
|
1869
1869
|
};
|
|
1870
|
-
function
|
|
1870
|
+
function No(e) {
|
|
1871
1871
|
e.addEventListener("blur", () => {
|
|
1872
1872
|
let t = e.value;
|
|
1873
1873
|
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + X(/* @__PURE__ */ new Date(), "yy"));
|
|
@@ -1875,14 +1875,14 @@ function Co(e) {
|
|
|
1875
1875
|
isNaN(o) ? e.value = "" : e.value = X(o, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
1878
|
-
const
|
|
1878
|
+
const Lo = {
|
|
1879
1879
|
beforeMount: tt,
|
|
1880
1880
|
updated: tt
|
|
1881
1881
|
};
|
|
1882
1882
|
function tt(e, t) {
|
|
1883
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1883
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = Ro(e, t));
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Ro(e, t) {
|
|
1886
1886
|
if (!t.value)
|
|
1887
1887
|
return e.attributes.getNamedItem("placeholder")?.value ?? "";
|
|
1888
1888
|
let o = "";
|
|
@@ -1898,50 +1898,50 @@ function No(e, t) {
|
|
|
1898
1898
|
let v = null;
|
|
1899
1899
|
const c = /* @__PURE__ */ new Date();
|
|
1900
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 :
|
|
1902
|
-
y =
|
|
1901
|
+
const n = g ? null : D.defaultTimeFormat;
|
|
1902
|
+
y = dt([v, n]).join(" ");
|
|
1903
1903
|
}
|
|
1904
|
-
y || (g ? y =
|
|
1904
|
+
y || (g ? y = D.defaultDateFormat : y = `${D.defaultDateFormat} ${D.defaultTimeFormat}`);
|
|
1905
1905
|
let E = X(l, y);
|
|
1906
1906
|
return o && (E = o + " " + E), E;
|
|
1907
1907
|
}
|
|
1908
|
-
const
|
|
1908
|
+
const Fo = {
|
|
1909
1909
|
beforeMount: nt,
|
|
1910
1910
|
updated: nt,
|
|
1911
|
-
unmounted:
|
|
1911
|
+
unmounted: Ao
|
|
1912
1912
|
};
|
|
1913
1913
|
function nt(e, t) {
|
|
1914
1914
|
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
1915
|
}
|
|
1916
|
-
function
|
|
1916
|
+
function Ao(e) {
|
|
1917
1917
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1918
1918
|
}
|
|
1919
|
-
const
|
|
1919
|
+
const Do = {
|
|
1920
1920
|
beforeMount: ot,
|
|
1921
1921
|
updated: ot,
|
|
1922
|
-
unmounted:
|
|
1922
|
+
unmounted: wt
|
|
1923
1923
|
}, ae = Symbol("HasAutoFocused"), De = [];
|
|
1924
|
-
function
|
|
1925
|
-
De.forEach(
|
|
1924
|
+
function $o() {
|
|
1925
|
+
De.forEach(kt);
|
|
1926
1926
|
}
|
|
1927
|
-
setInterval(
|
|
1927
|
+
setInterval($o, 1e3);
|
|
1928
1928
|
function ot(e, t) {
|
|
1929
1929
|
if (t.value == t.oldValue) return;
|
|
1930
|
-
if (!t.value) return
|
|
1930
|
+
if (!t.value) return wt(e);
|
|
1931
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;
|
|
1932
1932
|
e[ae] || De.push(e), e[ae] = {
|
|
1933
1933
|
startTs: p,
|
|
1934
1934
|
includeSeconds: l
|
|
1935
|
-
},
|
|
1935
|
+
}, kt(e);
|
|
1936
1936
|
}
|
|
1937
|
-
function
|
|
1937
|
+
function kt(e) {
|
|
1938
1938
|
const t = e[ae], o = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1939
|
-
e.innerText =
|
|
1939
|
+
e.innerText = Ho(o, t.includeSeconds);
|
|
1940
1940
|
}
|
|
1941
|
-
function
|
|
1942
|
-
e[ae] && (
|
|
1941
|
+
function wt(e) {
|
|
1942
|
+
e[ae] && (tn(De, e), delete e[ae]), e.innerText = "-";
|
|
1943
1943
|
}
|
|
1944
|
-
function
|
|
1944
|
+
function Ho(e, t) {
|
|
1945
1945
|
const o = [], a = Math.floor(e / 86400);
|
|
1946
1946
|
a && o.push(a + "d"), e -= a * 86400;
|
|
1947
1947
|
const p = Math.floor(e / 3600);
|
|
@@ -1949,31 +1949,31 @@ function Do(e, t) {
|
|
|
1949
1949
|
const l = Math.floor(e / 60);
|
|
1950
1950
|
return (a || p || l) && o.push(l + "m"), t ? o.length || o.push("0m") : (e -= l * 60, o.push(e + "s")), o.join(" ");
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1953
|
-
mounted:
|
|
1954
|
-
updated:
|
|
1955
|
-
unmounted:
|
|
1952
|
+
const Vo = {
|
|
1953
|
+
mounted: xt,
|
|
1954
|
+
updated: Bo,
|
|
1955
|
+
unmounted: bt
|
|
1956
1956
|
}, Y = /* @__PURE__ */ new Map();
|
|
1957
|
-
function
|
|
1958
|
-
Y.size === 0 && window.addEventListener("keydown",
|
|
1957
|
+
function xt(e, t) {
|
|
1958
|
+
Y.size === 0 && window.addEventListener("keydown", Tt), Y.set(t.value.toLowerCase(), [...Y.get(t.value.toLowerCase()) ?? [], e]);
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1960
|
+
function bt(e, t) {
|
|
1961
1961
|
const o = Y.get(t.value.toLowerCase());
|
|
1962
1962
|
if (o) {
|
|
1963
1963
|
const a = o.indexOf(e);
|
|
1964
1964
|
a !== -1 && o.splice(a, 1), o.length === 0 && Y.delete(t.value.toLowerCase());
|
|
1965
1965
|
}
|
|
1966
|
-
Y.size === 0 && window.removeEventListener("keydown",
|
|
1966
|
+
Y.size === 0 && window.removeEventListener("keydown", Tt);
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1969
|
-
|
|
1968
|
+
function Bo(e, t) {
|
|
1969
|
+
bt(e, t), xt(e, t);
|
|
1970
1970
|
}
|
|
1971
|
-
function
|
|
1971
|
+
function Tt(e) {
|
|
1972
1972
|
if (typeof e.key != "string") return;
|
|
1973
1973
|
const t = e.key.toLowerCase(), o = Y.get(t);
|
|
1974
|
-
o && (
|
|
1974
|
+
o && (nn(o)?.click(), e.preventDefault());
|
|
1975
1975
|
}
|
|
1976
|
-
const ee = Symbol("InfiniteScrollHandler"),
|
|
1976
|
+
const ee = Symbol("InfiniteScrollHandler"), _o = {
|
|
1977
1977
|
mounted(e, t) {
|
|
1978
1978
|
e[ee] = new oe(e, t.value);
|
|
1979
1979
|
},
|
|
@@ -1983,47 +1983,58 @@ const ee = Symbol("InfiniteScrollHandler"), Vo = {
|
|
|
1983
1983
|
unmounted(e) {
|
|
1984
1984
|
e[ee]?.uninstall(), delete e[ee];
|
|
1985
1985
|
}
|
|
1986
|
-
},
|
|
1987
|
-
beforeMount:
|
|
1988
|
-
updated:
|
|
1986
|
+
}, Wo = {
|
|
1987
|
+
beforeMount: it,
|
|
1988
|
+
updated: it
|
|
1989
1989
|
};
|
|
1990
|
-
function
|
|
1990
|
+
function it(e, t) {
|
|
1991
1991
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1992
1992
|
}
|
|
1993
|
-
const
|
|
1994
|
-
beforeMount(e) {
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
Me.set(e, t), t.observe(e);
|
|
1993
|
+
const Oe = /* @__PURE__ */ new WeakMap(), Po = {
|
|
1994
|
+
beforeMount(e, t) {
|
|
1995
|
+
t.value === !1 || D.disableStickyMinWidthDirective || rt(e);
|
|
1996
|
+
},
|
|
1997
|
+
updated(e, t) {
|
|
1998
|
+
t.value !== t.oldValue && (t.value === !1 || D.disableStickyMinWidthDirective ? at(e) : rt(e));
|
|
2000
1999
|
},
|
|
2001
2000
|
beforeUnmount(e) {
|
|
2002
|
-
|
|
2003
|
-
t && (t.unobserve(e), Me.delete(e));
|
|
2001
|
+
at(e);
|
|
2004
2002
|
}
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2003
|
+
};
|
|
2004
|
+
function rt(e) {
|
|
2005
|
+
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`);
|
|
2008
|
+
});
|
|
2009
|
+
Oe.set(e, t), t.observe(e);
|
|
2010
|
+
}
|
|
2011
|
+
function at(e) {
|
|
2012
|
+
const t = Oe.get(e);
|
|
2013
|
+
t && (t.unobserve(e), Oe.delete(e));
|
|
2014
|
+
}
|
|
2015
|
+
const jo = {
|
|
2016
|
+
mounted: st,
|
|
2017
|
+
updated: st,
|
|
2018
|
+
unmounted: St
|
|
2019
|
+
}, ie = Symbol("TooltipState");
|
|
2020
|
+
function st(e, t) {
|
|
2011
2021
|
let o = e.attributes.getNamedItem("tip")?.value ?? t.value;
|
|
2012
2022
|
if (t.value || (o = null), o) {
|
|
2013
2023
|
const a = {
|
|
2014
2024
|
content: o,
|
|
2015
|
-
html: e.getAttribute("html") !== null
|
|
2025
|
+
html: e.getAttribute("html") !== null,
|
|
2026
|
+
alertOnTap: e.getAttribute("alert-on-tap") !== null
|
|
2016
2027
|
};
|
|
2017
|
-
e[
|
|
2028
|
+
e[ie] ? e[ie].configure(a) : e[ie] = new Uo(e, a);
|
|
2018
2029
|
} else
|
|
2019
|
-
|
|
2030
|
+
St(e);
|
|
2020
2031
|
}
|
|
2021
|
-
function
|
|
2022
|
-
e[
|
|
2032
|
+
function St(e) {
|
|
2033
|
+
e[ie]?.destroy(), delete e[ie];
|
|
2023
2034
|
}
|
|
2024
|
-
class
|
|
2035
|
+
class Uo {
|
|
2025
2036
|
constructor(t, o) {
|
|
2026
|
-
this.el = t, this.config = o, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
2037
|
+
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());
|
|
2027
2038
|
}
|
|
2028
2039
|
lastMoveEvt;
|
|
2029
2040
|
checkInterval;
|
|
@@ -2047,6 +2058,13 @@ class Po {
|
|
|
2047
2058
|
show(t) {
|
|
2048
2059
|
this.shouldShow && (this.renderTooltip(), t && this.handleMouseMove(t));
|
|
2049
2060
|
}
|
|
2061
|
+
showTapAlert() {
|
|
2062
|
+
ht({
|
|
2063
|
+
title: this.config.title,
|
|
2064
|
+
message: this.config.content,
|
|
2065
|
+
isHtml: this.config.html ?? !1
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2050
2068
|
renderTooltip() {
|
|
2051
2069
|
this.tipEl || (this.tipEl = document.createElement("div"), this.tipEl.style.position = "absolute", this.tipEl.style.zIndex = "1000000", document.body.appendChild(this.tipEl)), this.tipEl.className = this.getClasses().join(" "), this.config.title ? (this.titleEl || (this.titleEl = document.createElement("div"), this.titleEl.className = "title", this.tipEl.appendChild(this.titleEl)), this.titleEl.innerText = this.config.title) : this.titleEl && this.titleEl.remove(), this.contentEl || (this.contentEl = document.createElement("div"), this.contentEl.className = "content", this.tipEl.appendChild(this.contentEl)), this.contentEl[this.config.html ? "innerHTML" : "innerText"] = this.config.content, this.checkInterval && (this.checkInterval = setInterval(() => this.checkMoveEvent(), 250)), this.mouseMoveBound || (this.mouseMoveBound = !0, window.addEventListener("mousemove", this.handleMouseMoveWithContext));
|
|
2052
2070
|
}
|
|
@@ -2068,64 +2086,64 @@ class Po {
|
|
|
2068
2086
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
2069
2087
|
}
|
|
2070
2088
|
}
|
|
2071
|
-
function
|
|
2072
|
-
e.directive("autofocus",
|
|
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);
|
|
2073
2091
|
}
|
|
2074
|
-
function
|
|
2075
|
-
|
|
2092
|
+
function xi(e) {
|
|
2093
|
+
zo(e);
|
|
2076
2094
|
}
|
|
2077
2095
|
export {
|
|
2078
|
-
|
|
2096
|
+
Go as OverlayContainer,
|
|
2079
2097
|
ye as UserError,
|
|
2080
|
-
|
|
2098
|
+
Xo as VfAjaxSelect,
|
|
2081
2099
|
le as VfAlertModal,
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
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,
|
|
2089
2107
|
ge as createOverlayInjection,
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2108
|
+
zn as desnakeCase,
|
|
2109
|
+
pn as dismissOverlayInjectionById,
|
|
2110
|
+
Qo as dismissOverlayInjectionByInstance,
|
|
2111
|
+
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,
|
|
2104
2122
|
Ye as isNotNullOrUndefined,
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2123
|
+
ai as maskComponent,
|
|
2124
|
+
yn as maskEl,
|
|
2125
|
+
En as maskForm,
|
|
2126
|
+
pi as nl2br,
|
|
2127
|
+
fi as nullifyEmptyInputs,
|
|
2110
2128
|
Re as presentOverlay,
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2129
|
+
re as removeOverlayInjection,
|
|
2130
|
+
li as replaceElement,
|
|
2131
|
+
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,
|
|
2122
2140
|
Ee as toError,
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2141
|
+
si as unmaskComponent,
|
|
2142
|
+
pt as unmaskEl,
|
|
2143
|
+
vt as unmaskForm,
|
|
2144
|
+
vn as updateOverlayProps,
|
|
2145
|
+
ki as useInfiniteScroll,
|
|
2146
|
+
wi as useResizeWatcher,
|
|
2147
|
+
vi as uuid,
|
|
2148
|
+
gi as vfModalRef
|
|
2131
2149
|
};
|