@reinosoft-ui/core 0.1.85 → 0.1.87
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/reinosoft-ui.es.js +1353 -1396
- package/dist/reinosoft-ui.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/reinosoft-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as
|
|
1
|
+
import { defineComponent as Z, ref as w, computed as A, watch as Q, onMounted as ve, createElementBlock as b, openBlock as f, normalizeStyle as Ie, normalizeClass as fe, renderSlot as G, createCommentVNode as O, withDirectives as _e, createElementVNode as M, vShow as rt, mergeProps as be, mergeModels as ie, useModel as ke, withKeys as ye, withModifiers as se, onUnmounted as Be, Fragment as de, unref as N, toDisplayString as K, renderList as he, nextTick as $e, onBeforeUnmount as Se, createBlock as ae, Teleport as Fe, createVNode as U, Transition as Ae, withCtx as J, vModelText as Ye, useId as ge, provide as He, createTextVNode as Me, resolveDynamicComponent as Ne, inject as me, useAttrs as st, h as j, useSlots as it, resolveComponent as Ut, vModelRadio as Kt, vModelDynamic as jt, reactive as ut, TransitionGroup as Wt, createApp as _t, shallowRef as Yt } from "vue";
|
|
2
2
|
import { routerKey as Xt } from "vue-router";
|
|
3
3
|
const Gt = ["aria-busy"], Jt = ["aria-label"], Qt = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], e1 = /* @__PURE__ */ Z({
|
|
4
4
|
__name: "Image",
|
|
@@ -16,7 +16,7 @@ const Gt = ["aria-busy"], Jt = ["aria-label"], Qt = ["src", "srcset", "sizes", "
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["loaded", "error"],
|
|
18
18
|
setup(e, { emit: n }) {
|
|
19
|
-
const t = e, a = n, o =
|
|
19
|
+
const t = e, a = n, o = w(t.src), i = w(), r = w("loading"), l = A(() => t.ratio ? {
|
|
20
20
|
aspectRatio: typeof t.ratio == "number" ? `${t.ratio}` : t.ratio
|
|
21
21
|
} : void 0), s = () => {
|
|
22
22
|
r.value = "loaded", a("loaded");
|
|
@@ -32,7 +32,7 @@ const Gt = ["aria-busy"], Jt = ["aria-label"], Qt = ["src", "srcset", "sizes", "
|
|
|
32
32
|
(u) => {
|
|
33
33
|
o.value = u, r.value = "loading";
|
|
34
34
|
}
|
|
35
|
-
), ve(() => i.value?.complete && i.value.naturalWidth > 0 && (r.value = "loaded")), (u,
|
|
35
|
+
), ve(() => i.value?.complete && i.value.naturalWidth > 0 && (r.value = "loaded")), (u, d) => (f(), b("div", {
|
|
36
36
|
class: fe(["ui-image", {
|
|
37
37
|
"is-loading": r.value === "loading",
|
|
38
38
|
"is-error": r.value === "error",
|
|
@@ -43,18 +43,18 @@ const Gt = ["aria-busy"], Jt = ["aria-label"], Qt = ["src", "srcset", "sizes", "
|
|
|
43
43
|
"aria-busy": r.value === "loading" || void 0
|
|
44
44
|
}, [
|
|
45
45
|
r.value === "loading" ? G(u.$slots, "placeholder", { key: 0 }, () => [
|
|
46
|
-
|
|
46
|
+
d[0] || (d[0] = M("div", {
|
|
47
47
|
class: "ui-image__placeholder",
|
|
48
48
|
"aria-hidden": "true"
|
|
49
49
|
}, null, -1))
|
|
50
50
|
], !0) : r.value === "error" ? G(u.$slots, "fallback", { key: 1 }, () => [
|
|
51
|
-
|
|
51
|
+
M("div", {
|
|
52
52
|
class: "ui-image__fallback",
|
|
53
53
|
role: "img",
|
|
54
54
|
"aria-label": e.decorative ? void 0 : e.alt
|
|
55
55
|
}, "Image not available", 8, Jt)
|
|
56
56
|
], !0) : O("", !0),
|
|
57
|
-
_e(
|
|
57
|
+
_e(M("img", {
|
|
58
58
|
ref_key: "imgRef",
|
|
59
59
|
ref: i,
|
|
60
60
|
class: "ui-image__img",
|
|
@@ -84,10 +84,10 @@ ze.install = (e) => {
|
|
|
84
84
|
const t1 = /* @__PURE__ */ Z({
|
|
85
85
|
__name: "Button",
|
|
86
86
|
setup(e, { expose: n }) {
|
|
87
|
-
const t =
|
|
87
|
+
const t = w();
|
|
88
88
|
return n({
|
|
89
89
|
el: t
|
|
90
|
-
}), (a, o) => (
|
|
90
|
+
}), (a, o) => (f(), b("button", be({
|
|
91
91
|
ref_key: "rootRef",
|
|
92
92
|
ref: t,
|
|
93
93
|
type: "button",
|
|
@@ -111,12 +111,12 @@ const a1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], n1
|
|
|
111
111
|
}),
|
|
112
112
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
113
113
|
setup(e, { emit: n }) {
|
|
114
|
-
const t = ke(e, "modelValue"), a = n, o = e, i =
|
|
114
|
+
const t = ke(e, "modelValue"), a = n, o = e, i = A(() => t.value), r = () => {
|
|
115
115
|
if (o.disabled) return;
|
|
116
116
|
const l = !t.value;
|
|
117
117
|
t.value = l, a("change", l);
|
|
118
118
|
};
|
|
119
|
-
return (l, s) => (
|
|
119
|
+
return (l, s) => (f(), b("button", {
|
|
120
120
|
id: e.id,
|
|
121
121
|
role: "switch",
|
|
122
122
|
type: "button",
|
|
@@ -130,14 +130,14 @@ const a1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], n1
|
|
|
130
130
|
ye(se(r, ["prevent"]), ["enter"])
|
|
131
131
|
]
|
|
132
132
|
}, [...s[0] || (s[0] = [
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
M("span", { class: "ui-toggle__track" }, [
|
|
134
|
+
M("span", { class: "ui-toggle__thumb" })
|
|
135
135
|
], -1)
|
|
136
136
|
])], 42, a1));
|
|
137
137
|
}
|
|
138
|
-
}),
|
|
139
|
-
|
|
140
|
-
e.component("Toggle",
|
|
138
|
+
}), mt = /* @__PURE__ */ W(n1, [["__scopeId", "data-v-d2681823"]]);
|
|
139
|
+
mt.install = (e) => {
|
|
140
|
+
e.component("Toggle", mt);
|
|
141
141
|
};
|
|
142
142
|
const At = (e) => {
|
|
143
143
|
for (; e; ) {
|
|
@@ -192,20 +192,20 @@ const At = (e) => {
|
|
|
192
192
|
const a = t.getRangeAt(0);
|
|
193
193
|
let o = At(a.startContainer);
|
|
194
194
|
if (o && o.tagName === "LI") {
|
|
195
|
-
const
|
|
196
|
-
|
|
195
|
+
const B = o.parentElement;
|
|
196
|
+
B && ["UL", "OL"].includes(B.tagName) && (o = B);
|
|
197
197
|
}
|
|
198
198
|
if (!o) return;
|
|
199
199
|
const i = o.tagName.toLowerCase(), l = ["p", "h1", "blockquote"].includes(i) ? i : "p", s = ct(l);
|
|
200
200
|
document.createRange().selectNodeContents(o);
|
|
201
|
-
const u = a.cloneRange(),
|
|
202
|
-
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
o.innerHTML = "", o.appendChild(
|
|
207
|
-
const
|
|
208
|
-
|
|
201
|
+
const u = a.cloneRange(), d = document.createRange();
|
|
202
|
+
d.selectNodeContents(o), d.setEnd(u.startContainer, u.startOffset);
|
|
203
|
+
const m = d.cloneContents(), C = document.createRange();
|
|
204
|
+
C.selectNodeContents(o), C.setStart(u.startContainer, u.startOffset);
|
|
205
|
+
const h = C.cloneContents();
|
|
206
|
+
o.innerHTML = "", o.appendChild(m), o.innerHTML === "" && (o.innerHTML = "<br>"), s.innerHTML = "", s.appendChild(h), s.innerHTML === "" && (s.innerHTML = "<br>"), o.after(s);
|
|
207
|
+
const x = document.createRange();
|
|
208
|
+
x.setStart(s, 0), x.collapse(!0), t.removeAllRanges(), t.addRange(x), n?.normalize();
|
|
209
209
|
}, i1 = () => {
|
|
210
210
|
const e = window.getSelection();
|
|
211
211
|
if (!e || e.rangeCount === 0) return;
|
|
@@ -258,252 +258,252 @@ const At = (e) => {
|
|
|
258
258
|
const n = document.createRange(), t = window.getSelection();
|
|
259
259
|
n.selectNodeContents(e), n.collapse(!1), t?.removeAllRanges(), t?.addRange(n);
|
|
260
260
|
}, u1 = (e, n) => {
|
|
261
|
-
const t =
|
|
262
|
-
let l =
|
|
261
|
+
const t = w(null), a = n?.buttons ?? [], o = n?.uploadImage, i = n?.minImageResolution, r = n?.onImageResolutionError;
|
|
262
|
+
let l = w(null);
|
|
263
263
|
const s = () => {
|
|
264
|
-
const
|
|
265
|
-
if (!
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
268
|
-
const y =
|
|
269
|
-
|
|
270
|
-
}, c = (
|
|
271
|
-
const
|
|
272
|
-
if (!
|
|
273
|
-
const y =
|
|
274
|
-
if (!
|
|
275
|
-
const X = u(y,
|
|
264
|
+
const p = e;
|
|
265
|
+
if (!p) return;
|
|
266
|
+
const v = window.getSelection();
|
|
267
|
+
if (!v || v.rangeCount === 0) return;
|
|
268
|
+
const y = v.getRangeAt(0);
|
|
269
|
+
p.contains(y.commonAncestorContainer) && (t.value = y.cloneRange());
|
|
270
|
+
}, c = (p) => {
|
|
271
|
+
const v = window.getSelection();
|
|
272
|
+
if (!v || v.rangeCount === 0 || v.isCollapsed) return !1;
|
|
273
|
+
const y = v.getRangeAt(0), I = e;
|
|
274
|
+
if (!I) return !1;
|
|
275
|
+
const X = u(y, I), ce = [];
|
|
276
276
|
if (X.forEach((ee) => {
|
|
277
277
|
const te = ee === y.startContainer ? y.startOffset : 0, ne = ee === y.endContainer ? y.endOffset : ee.textContent.length;
|
|
278
278
|
if (te === ne) return;
|
|
279
279
|
let le;
|
|
280
280
|
te === 0 && ne === ee.textContent.length ? le = ee : (le = ee.splitText(te), ne - te < le.textContent.length && le.splitText(ne - te));
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
283
|
-
l1(
|
|
281
|
+
const pe = o1(le, p, I);
|
|
282
|
+
if (pe)
|
|
283
|
+
l1(pe), ce.push(le);
|
|
284
284
|
else {
|
|
285
|
-
const xe = document.createElement(
|
|
285
|
+
const xe = document.createElement(p);
|
|
286
286
|
le.replaceWith(xe), xe.appendChild(le), ce.push(le);
|
|
287
287
|
}
|
|
288
288
|
}), ce.length > 0) {
|
|
289
289
|
const ee = document.createRange();
|
|
290
290
|
ee.setStart(ce[0], 0);
|
|
291
291
|
const te = ce[ce.length - 1];
|
|
292
|
-
ee.setEnd(te, te.textContent.length),
|
|
292
|
+
ee.setEnd(te, te.textContent.length), v.removeAllRanges(), v.addRange(ee), s();
|
|
293
293
|
}
|
|
294
|
-
return
|
|
295
|
-
}, u = (
|
|
296
|
-
if (!
|
|
297
|
-
const y =
|
|
298
|
-
|
|
294
|
+
return h(), x(p);
|
|
295
|
+
}, u = (p, v) => {
|
|
296
|
+
if (!p || !v || !(v instanceof HTMLElement)) return [];
|
|
297
|
+
const y = p.commonAncestorContainer, I = v.contains(y) ? v : y.nodeType === 3 ? y.parentNode : y, X = document.createTreeWalker(
|
|
298
|
+
I,
|
|
299
299
|
NodeFilter.SHOW_TEXT,
|
|
300
300
|
{
|
|
301
301
|
acceptNode(te) {
|
|
302
|
-
return
|
|
302
|
+
return v.contains(te) && p.intersectsNode(te) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
), ce = [];
|
|
306
306
|
let ee;
|
|
307
307
|
for (; ee = X.nextNode(); ) ce.push(ee);
|
|
308
308
|
return ce;
|
|
309
|
-
},
|
|
310
|
-
const
|
|
311
|
-
if (!
|
|
312
|
-
const y =
|
|
313
|
-
if (!
|
|
314
|
-
const X =
|
|
315
|
-
if (
|
|
316
|
-
if (
|
|
317
|
-
const le =
|
|
309
|
+
}, d = (p) => {
|
|
310
|
+
const v = window.getSelection();
|
|
311
|
+
if (!v || v.rangeCount === 0) return !1;
|
|
312
|
+
const y = v.getRangeAt(0), I = m(y.startContainer);
|
|
313
|
+
if (!I) return !1;
|
|
314
|
+
const X = I.tagName.toLowerCase() === p.toLowerCase();
|
|
315
|
+
if (p === "ul" || p === "ol") {
|
|
316
|
+
if (I.tagName === "LI") {
|
|
317
|
+
const le = I.parentElement;
|
|
318
318
|
if (!le) return !1;
|
|
319
|
-
const
|
|
320
|
-
return
|
|
319
|
+
const pe = document.createElement("p");
|
|
320
|
+
return pe.dataset.block = "true", pe.innerHTML = I.innerHTML, le.replaceWith(pe), C(pe), h(), !1;
|
|
321
321
|
}
|
|
322
|
-
const te = document.createElement(
|
|
323
|
-
for (ne.dataset.block = "true";
|
|
324
|
-
return te.appendChild(ne),
|
|
322
|
+
const te = document.createElement(p), ne = document.createElement("li");
|
|
323
|
+
for (ne.dataset.block = "true"; I.firstChild; ) ne.appendChild(I.firstChild);
|
|
324
|
+
return te.appendChild(ne), I.replaceWith(te), C(ne), h(), !0;
|
|
325
325
|
}
|
|
326
|
-
const ce = X ? "p" :
|
|
327
|
-
for (ce === "blockquote" && (ee.className = "rs-blockquote"), ee.dataset.block = "true";
|
|
328
|
-
return
|
|
329
|
-
},
|
|
330
|
-
const
|
|
331
|
-
if (!
|
|
332
|
-
for (;
|
|
333
|
-
if (
|
|
334
|
-
|
|
326
|
+
const ce = X ? "p" : p.toLowerCase(), ee = document.createElement(ce);
|
|
327
|
+
for (ce === "blockquote" && (ee.className = "rs-blockquote"), ee.dataset.block = "true"; I.firstChild; ) ee.appendChild(I.firstChild);
|
|
328
|
+
return I.replaceWith(ee), C(ee), h(), B(p);
|
|
329
|
+
}, m = (p) => {
|
|
330
|
+
const v = e;
|
|
331
|
+
if (!v) return null;
|
|
332
|
+
for (; p && p !== v; ) {
|
|
333
|
+
if (p instanceof HTMLElement && p.dataset.block !== void 0) return p;
|
|
334
|
+
p = p.parentNode;
|
|
335
335
|
}
|
|
336
336
|
return null;
|
|
337
|
-
},
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
},
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
|
|
337
|
+
}, C = (p) => {
|
|
338
|
+
const v = document.createRange(), y = window.getSelection();
|
|
339
|
+
v.selectNodeContents(p), v.collapse(!0), y?.removeAllRanges(), y?.addRange(v);
|
|
340
|
+
}, h = () => {
|
|
341
|
+
const p = e;
|
|
342
|
+
p && (p.querySelectorAll("[data-block]").forEach((v) => {
|
|
343
|
+
v.childNodes.forEach((y) => {
|
|
344
344
|
y.nodeType === 3 && !y.textContent?.trim() && y.remove();
|
|
345
345
|
});
|
|
346
|
-
}),
|
|
347
|
-
|
|
348
|
-
}),
|
|
349
|
-
|
|
350
|
-
}),
|
|
351
|
-
const y =
|
|
346
|
+
}), p.querySelectorAll("ul[data-block], ol[data-block]").forEach((v) => {
|
|
347
|
+
v.removeAttribute("data-block");
|
|
348
|
+
}), p.querySelectorAll("li").forEach((v) => {
|
|
349
|
+
v.dataset.block = "true";
|
|
350
|
+
}), p.querySelectorAll("[data-block] [data-block]").forEach((v) => {
|
|
351
|
+
const y = v.parentElement;
|
|
352
352
|
if (y) {
|
|
353
|
-
for (;
|
|
354
|
-
y.insertBefore(
|
|
355
|
-
|
|
353
|
+
for (; v.firstChild; )
|
|
354
|
+
y.insertBefore(v.firstChild, v);
|
|
355
|
+
v.remove();
|
|
356
356
|
}
|
|
357
|
-
}),
|
|
358
|
-
const y =
|
|
357
|
+
}), p.querySelectorAll("li").forEach((v) => {
|
|
358
|
+
const y = v.parentElement;
|
|
359
359
|
if (!y || !["UL", "OL"].includes(y.tagName)) {
|
|
360
|
-
const
|
|
361
|
-
|
|
360
|
+
const I = document.createElement("ul");
|
|
361
|
+
v.replaceWith(I), I.appendChild(v);
|
|
362
362
|
}
|
|
363
|
-
}),
|
|
364
|
-
!
|
|
365
|
-
}),
|
|
366
|
-
},
|
|
367
|
-
const
|
|
368
|
-
if (!
|
|
369
|
-
let y =
|
|
363
|
+
}), p.querySelectorAll("[data-block]").forEach((v) => {
|
|
364
|
+
!v.querySelector("img, iframe") && v.hasAttribute("style") && v.removeAttribute("style");
|
|
365
|
+
}), p.normalize());
|
|
366
|
+
}, x = (p) => {
|
|
367
|
+
const v = t.value;
|
|
368
|
+
if (!v) return !1;
|
|
369
|
+
let y = v.startContainer;
|
|
370
370
|
y.nodeType === Node.TEXT_NODE && (y = y.parentNode);
|
|
371
|
-
const
|
|
372
|
-
if (!
|
|
373
|
-
for (; y && y !==
|
|
374
|
-
if (y instanceof HTMLElement && y.tagName.toLowerCase() ===
|
|
371
|
+
const I = e;
|
|
372
|
+
if (!I) return !1;
|
|
373
|
+
for (; y && y !== I; ) {
|
|
374
|
+
if (y instanceof HTMLElement && y.tagName.toLowerCase() === p.toLowerCase()) return !0;
|
|
375
375
|
y = y.parentNode;
|
|
376
376
|
}
|
|
377
377
|
return !1;
|
|
378
|
-
},
|
|
379
|
-
const
|
|
380
|
-
if (!
|
|
381
|
-
let y =
|
|
378
|
+
}, B = (p) => {
|
|
379
|
+
const v = t.value;
|
|
380
|
+
if (!v) return !1;
|
|
381
|
+
let y = v.startContainer;
|
|
382
382
|
y.nodeType === Node.TEXT_NODE && (y = y.parentNode);
|
|
383
|
-
const
|
|
384
|
-
if (!
|
|
385
|
-
for (; y && y !==
|
|
386
|
-
if (y instanceof HTMLElement && y.dataset.block !== void 0 && y.tagName.toLowerCase() ===
|
|
383
|
+
const I = e;
|
|
384
|
+
if (!I) return !1;
|
|
385
|
+
for (; y && y !== I; ) {
|
|
386
|
+
if (y instanceof HTMLElement && y.dataset.block !== void 0 && y.tagName.toLowerCase() === p.toLowerCase()) return !0;
|
|
387
387
|
y = y.parentNode;
|
|
388
388
|
}
|
|
389
389
|
return !1;
|
|
390
|
-
},
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
const
|
|
395
|
-
if (!
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
}, _ = () => l.value?.focusFirstButton?.(), z = (
|
|
399
|
-
const
|
|
400
|
-
if (!
|
|
401
|
-
const y =
|
|
402
|
-
let
|
|
403
|
-
if (!
|
|
404
|
-
if (
|
|
405
|
-
const De =
|
|
406
|
-
De && ["UL", "OL"].includes(De.tagName) && (
|
|
390
|
+
}, S = () => {
|
|
391
|
+
const p = e;
|
|
392
|
+
p && p.focus();
|
|
393
|
+
}, L = () => {
|
|
394
|
+
const p = e;
|
|
395
|
+
if (!p || !t.value || !p || !p.contains(t.value.commonAncestorContainer)) return;
|
|
396
|
+
const v = window.getSelection();
|
|
397
|
+
v && (v.removeAllRanges(), v.addRange(t.value));
|
|
398
|
+
}, _ = () => l.value?.focusFirstButton?.(), z = (p) => {
|
|
399
|
+
const v = window.getSelection();
|
|
400
|
+
if (!v || v.rangeCount === 0) return;
|
|
401
|
+
const y = v.getRangeAt(0);
|
|
402
|
+
let I = m(y.startContainer);
|
|
403
|
+
if (!I) return;
|
|
404
|
+
if (I.tagName === "LI") {
|
|
405
|
+
const De = I.parentElement;
|
|
406
|
+
De && ["UL", "OL"].includes(De.tagName) && (I = De);
|
|
407
407
|
}
|
|
408
408
|
const X = y.cloneRange();
|
|
409
|
-
X.selectNodeContents(
|
|
409
|
+
X.selectNodeContents(I), X.setEnd(y.startContainer, y.startOffset);
|
|
410
410
|
const ce = X.toString().length, ee = y.cloneRange();
|
|
411
|
-
ee.selectNodeContents(
|
|
412
|
-
const te = ee.toString().length, ne = y.collapsed, le =
|
|
413
|
-
|
|
414
|
-
const
|
|
411
|
+
ee.selectNodeContents(I), ee.setEnd(y.endContainer, y.endOffset);
|
|
412
|
+
const te = ee.toString().length, ne = y.collapsed, le = p(I);
|
|
413
|
+
I.replaceWith(le);
|
|
414
|
+
const pe = document.createTreeWalker(
|
|
415
415
|
le,
|
|
416
416
|
NodeFilter.SHOW_TEXT,
|
|
417
417
|
null
|
|
418
418
|
);
|
|
419
419
|
let xe = 0, Pe = null, We = 0, Ee = null, Re = 0;
|
|
420
|
-
for (;
|
|
421
|
-
const De =
|
|
420
|
+
for (; pe.nextNode(); ) {
|
|
421
|
+
const De = pe.currentNode, et = De.textContent?.length ?? 0;
|
|
422
422
|
!Pe && xe + et >= ce && (Pe = De, We = ce - xe), !Ee && xe + et >= te && (Ee = De, Re = te - xe), xe += et;
|
|
423
423
|
}
|
|
424
424
|
const Te = document.createRange();
|
|
425
|
-
Pe ? Te.setStart(Pe, We) : Te.setStart(le, 0), !ne && Ee ? Te.setEnd(Ee, Re) : Te.collapse(!0),
|
|
426
|
-
}, P = (
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
}, oe = (
|
|
430
|
-
const
|
|
431
|
-
if (!
|
|
432
|
-
const y = document.createRange().createContextualFragment(
|
|
433
|
-
|
|
434
|
-
}, ue = (
|
|
435
|
-
const
|
|
436
|
-
if (!
|
|
437
|
-
oe(
|
|
425
|
+
Pe ? Te.setStart(Pe, We) : Te.setStart(le, 0), !ne && Ee ? Te.setEnd(Ee, Re) : Te.collapse(!0), v.removeAllRanges(), v.addRange(Te), s(), h();
|
|
426
|
+
}, P = (p) => {
|
|
427
|
+
const v = e.parentElement?.querySelector("#editor-status");
|
|
428
|
+
v && (v.textContent = p, setTimeout(() => v.textContent = "", 2e3));
|
|
429
|
+
}, oe = (p) => {
|
|
430
|
+
const v = e;
|
|
431
|
+
if (!v) return;
|
|
432
|
+
const y = document.createRange().createContextualFragment(p);
|
|
433
|
+
v.appendChild(y), h(), v.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
434
|
+
}, ue = (p) => {
|
|
435
|
+
const v = window.getSelection();
|
|
436
|
+
if (!v || v.rangeCount === 0) {
|
|
437
|
+
oe(p);
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
|
-
const y =
|
|
441
|
-
if (!
|
|
442
|
-
oe(
|
|
440
|
+
const y = v.getRangeAt(0), I = m(y.startContainer);
|
|
441
|
+
if (!I) {
|
|
442
|
+
oe(p);
|
|
443
443
|
return;
|
|
444
444
|
}
|
|
445
|
-
|
|
446
|
-
}, re = (
|
|
447
|
-
const
|
|
448
|
-
|
|
445
|
+
I.insertAdjacentHTML("afterend", p), h(), e.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
446
|
+
}, re = (p) => {
|
|
447
|
+
const v = document.createElement("span");
|
|
448
|
+
v.className = "img-resizable", v.style.display = "inline-block", v.style.position = "relative", v.style.width = "100%";
|
|
449
449
|
const y = document.createElement("img");
|
|
450
|
-
y.src =
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
}, F = (
|
|
454
|
-
const
|
|
455
|
-
|
|
450
|
+
y.src = p, y.loading = "lazy";
|
|
451
|
+
const I = document.createElement("span");
|
|
452
|
+
I.className = "resize-handle", v.append(y, I), D(v.outerHTML);
|
|
453
|
+
}, F = (p) => {
|
|
454
|
+
const v = document.createElement("span");
|
|
455
|
+
v.className = "img-resizable", v.style.display = "inline-block", v.style.position = "relative", v.style.width = "100%";
|
|
456
456
|
const y = document.createElement("img");
|
|
457
|
-
y.src =
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
},
|
|
461
|
-
const
|
|
462
|
-
if (!
|
|
463
|
-
const y =
|
|
464
|
-
if (!y ||
|
|
465
|
-
|
|
466
|
-
const
|
|
467
|
-
|
|
457
|
+
y.src = p, y.alt = "", y.loading = "lazy";
|
|
458
|
+
const I = document.createElement("span");
|
|
459
|
+
I.className = "resize-handle", v.append(y, I), ue(v.outerHTML);
|
|
460
|
+
}, R = (p) => {
|
|
461
|
+
const v = p.closest(".img-resizable");
|
|
462
|
+
if (!v) return;
|
|
463
|
+
const y = v.querySelector(".resize-handle");
|
|
464
|
+
if (!y || v.dataset.resizableInitialized === "true") return;
|
|
465
|
+
v.dataset.resizableInitialized = "true", v.style.display = "inline-block", v.style.position = "relative", p.style.display = "block", p.style.width = "100%", y.style.display = "none";
|
|
466
|
+
const I = () => {
|
|
467
|
+
v.classList.add("active"), y.style.display = "block";
|
|
468
468
|
}, X = () => {
|
|
469
|
-
|
|
469
|
+
v.classList.remove("active"), y.style.display = "none";
|
|
470
470
|
};
|
|
471
|
-
|
|
472
|
-
ne.stopPropagation(), e.querySelectorAll(".img-resizable.selected").forEach((le) => le.classList.remove("selected")),
|
|
471
|
+
p.addEventListener("click", (ne) => {
|
|
472
|
+
ne.stopPropagation(), e.querySelectorAll(".img-resizable.selected").forEach((le) => le.classList.remove("selected")), v.classList.add("selected"), I();
|
|
473
473
|
}), document.addEventListener("click", (ne) => {
|
|
474
474
|
const le = ne.target;
|
|
475
|
-
le.closest(".img-resizable") || e.querySelectorAll(".img-resizable.selected").forEach((
|
|
475
|
+
le.closest(".img-resizable") || e.querySelectorAll(".img-resizable.selected").forEach((pe) => pe.classList.remove("selected")), v.contains(le) || X();
|
|
476
476
|
});
|
|
477
477
|
let ce = 0, ee = 0;
|
|
478
478
|
const te = (ne) => {
|
|
479
|
-
ne.preventDefault(), ee =
|
|
479
|
+
ne.preventDefault(), ee = v.offsetWidth, ce = ne instanceof TouchEvent ? ne.touches[0].clientX : ne.clientX;
|
|
480
480
|
const le = (xe) => {
|
|
481
|
-
const We = (xe instanceof TouchEvent ? xe.touches[0].clientX : xe.clientX) - ce, Ee =
|
|
481
|
+
const We = (xe instanceof TouchEvent ? xe.touches[0].clientX : xe.clientX) - ce, Ee = v.parentElement?.clientWidth || window.innerWidth;
|
|
482
482
|
let Re = ee + We;
|
|
483
483
|
Re > Ee && (Re = Ee), Re < 40 && (Re = 40);
|
|
484
484
|
const Te = Re / Ee * 100;
|
|
485
|
-
|
|
486
|
-
},
|
|
487
|
-
document.removeEventListener("mousemove", le), document.removeEventListener("mouseup",
|
|
485
|
+
v.style.width = Te + "%";
|
|
486
|
+
}, pe = () => {
|
|
487
|
+
document.removeEventListener("mousemove", le), document.removeEventListener("mouseup", pe), document.removeEventListener("touchmove", le), document.removeEventListener("touchend", pe);
|
|
488
488
|
};
|
|
489
|
-
document.addEventListener("mousemove", le), document.addEventListener("mouseup",
|
|
489
|
+
document.addEventListener("mousemove", le), document.addEventListener("mouseup", pe), document.addEventListener("touchmove", le, { passive: !1 }), document.addEventListener("touchend", pe);
|
|
490
490
|
};
|
|
491
491
|
y.addEventListener("mousedown", te), y.addEventListener("touchstart", te, { passive: !1 });
|
|
492
|
-
},
|
|
493
|
-
if (
|
|
494
|
-
const
|
|
495
|
-
if (!
|
|
496
|
-
|
|
497
|
-
const y =
|
|
498
|
-
y && (
|
|
492
|
+
}, $ = (p) => {
|
|
493
|
+
if (p.key !== "Backspace" && p.key !== "Delete") return;
|
|
494
|
+
const v = e.querySelector(".img-resizable.selected");
|
|
495
|
+
if (!v) return;
|
|
496
|
+
p.preventDefault();
|
|
497
|
+
const y = v.closest("p[data-block]");
|
|
498
|
+
y && (v.remove(), y.replaceChildren(document.createElement("br")), C(y));
|
|
499
499
|
};
|
|
500
|
-
e.addEventListener("keydown",
|
|
501
|
-
const
|
|
502
|
-
const
|
|
500
|
+
e.addEventListener("keydown", $, { capture: !0 });
|
|
501
|
+
const V = (p) => {
|
|
502
|
+
const v = p.match(
|
|
503
503
|
/(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
|
|
504
504
|
);
|
|
505
|
-
if (!
|
|
506
|
-
const y =
|
|
505
|
+
if (!v) return;
|
|
506
|
+
const y = v[1];
|
|
507
507
|
D(
|
|
508
508
|
`
|
|
509
509
|
<iframe
|
|
@@ -523,115 +523,115 @@ const At = (e) => {
|
|
|
523
523
|
aspectRatio: "16/9"
|
|
524
524
|
}
|
|
525
525
|
);
|
|
526
|
-
}, g = (
|
|
527
|
-
if (
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
530
|
-
const y =
|
|
531
|
-
if (!
|
|
532
|
-
const X =
|
|
533
|
-
X && (
|
|
534
|
-
}, D = (
|
|
526
|
+
}, g = (p) => {
|
|
527
|
+
if (p.key !== "Backspace" && p.key !== "Delete") return;
|
|
528
|
+
const v = window.getSelection();
|
|
529
|
+
if (!v || v.rangeCount === 0) return;
|
|
530
|
+
const y = v.getRangeAt(0), I = m(y.startContainer);
|
|
531
|
+
if (!I) return;
|
|
532
|
+
const X = I.querySelector("iframe");
|
|
533
|
+
X && (p.preventDefault(), p.stopPropagation(), X.remove(), I.removeAttribute("style"), I.replaceChildren(document.createElement("br")), C(I));
|
|
534
|
+
}, D = (p, v) => {
|
|
535
535
|
const y = e;
|
|
536
536
|
if (!y) return;
|
|
537
|
-
const
|
|
537
|
+
const I = window.getSelection();
|
|
538
538
|
let X = null;
|
|
539
|
-
if (
|
|
540
|
-
const te =
|
|
541
|
-
X =
|
|
539
|
+
if (I && I.rangeCount > 0) {
|
|
540
|
+
const te = I.getRangeAt(0);
|
|
541
|
+
X = m(te.startContainer);
|
|
542
542
|
}
|
|
543
543
|
const ce = X && !X.textContent?.trim() && X.querySelectorAll("img, iframe").length === 0;
|
|
544
544
|
let ee = null;
|
|
545
545
|
if (ce && X)
|
|
546
|
-
|
|
546
|
+
v && Object.assign(X.style, v), X.innerHTML = p, ee = document.createElement("p"), ee.dataset.block = "true", ee.replaceChildren(document.createElement("br")), X.after(ee);
|
|
547
547
|
else {
|
|
548
548
|
const te = document.createElement("p");
|
|
549
|
-
te.dataset.block = "true",
|
|
549
|
+
te.dataset.block = "true", v && Object.assign(te.style, v), te.innerHTML = p;
|
|
550
550
|
const ne = document.createElement("p");
|
|
551
551
|
ne.dataset.block = "true", ne.replaceChildren(document.createElement("br")), X ? (X.after(te), te.after(ne)) : y.append(te, ne), ee = ne;
|
|
552
552
|
}
|
|
553
|
-
y.querySelectorAll(".img-resizable img").forEach((te) =>
|
|
554
|
-
},
|
|
555
|
-
const
|
|
556
|
-
return
|
|
557
|
-
}, q = async (
|
|
558
|
-
const
|
|
559
|
-
if (
|
|
560
|
-
for (const ne of
|
|
553
|
+
y.querySelectorAll(".img-resizable img").forEach((te) => R(te)), ee && C(ee), h(), y.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
554
|
+
}, E = (p) => {
|
|
555
|
+
const v = p.match(/(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);
|
|
556
|
+
return v && typeof v[1] == "string" ? v[1] : null;
|
|
557
|
+
}, q = async (p) => {
|
|
558
|
+
const v = p.clipboardData?.items;
|
|
559
|
+
if (v && o) {
|
|
560
|
+
for (const ne of v)
|
|
561
561
|
if (ne.type.startsWith("image/")) {
|
|
562
|
-
|
|
562
|
+
p.preventDefault();
|
|
563
563
|
const le = ne.getAsFile();
|
|
564
564
|
if (!le) return;
|
|
565
565
|
try {
|
|
566
|
-
const
|
|
567
|
-
re(
|
|
568
|
-
} catch (
|
|
569
|
-
console.error("Image upload failed",
|
|
566
|
+
const pe = await o(le);
|
|
567
|
+
re(pe);
|
|
568
|
+
} catch (pe) {
|
|
569
|
+
console.error("Image upload failed", pe);
|
|
570
570
|
}
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
const y =
|
|
574
|
+
const y = p.clipboardData?.getData("text/plain")?.trim();
|
|
575
575
|
if (!y) return;
|
|
576
|
-
const
|
|
577
|
-
if (!
|
|
578
|
-
|
|
576
|
+
const I = E(y), X = H(y);
|
|
577
|
+
if (!I && !X) return;
|
|
578
|
+
p.preventDefault();
|
|
579
579
|
const ce = window.getSelection();
|
|
580
580
|
if (!ce || ce.rangeCount === 0) return;
|
|
581
|
-
const ee = ce.getRangeAt(0), te =
|
|
582
|
-
if (te && te.textContent?.trim() === y && (te.innerHTML = "<br>"),
|
|
583
|
-
|
|
581
|
+
const ee = ce.getRangeAt(0), te = m(ee.startContainer);
|
|
582
|
+
if (te && te.textContent?.trim() === y && (te.innerHTML = "<br>"), I) {
|
|
583
|
+
V(y);
|
|
584
584
|
return;
|
|
585
585
|
}
|
|
586
586
|
if (X) {
|
|
587
|
-
if (!await
|
|
587
|
+
if (!await k(y)) {
|
|
588
588
|
r?.(i);
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
591
|
re(y);
|
|
592
592
|
}
|
|
593
|
-
},
|
|
593
|
+
}, H = (p) => {
|
|
594
594
|
try {
|
|
595
|
-
const
|
|
596
|
-
return /\.(png|jpe?g|gif|webp|svg|avif)$/i.test(
|
|
595
|
+
const v = new URL(p);
|
|
596
|
+
return /\.(png|jpe?g|gif|webp|svg|avif)$/i.test(v.pathname);
|
|
597
597
|
} catch {
|
|
598
598
|
return !1;
|
|
599
599
|
}
|
|
600
|
-
},
|
|
600
|
+
}, k = (p) => i ? new Promise((v) => {
|
|
601
601
|
const y = new Image();
|
|
602
602
|
y.onload = () => {
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
}, y.onerror = () =>
|
|
606
|
-
}) : Promise.resolve(!0), T = (
|
|
607
|
-
const
|
|
608
|
-
if (!
|
|
609
|
-
const y =
|
|
610
|
-
|
|
603
|
+
const I = y.naturalWidth >= i.width || y.naturalHeight >= i.height;
|
|
604
|
+
v(I);
|
|
605
|
+
}, y.onerror = () => v(!1), y.src = p;
|
|
606
|
+
}) : Promise.resolve(!0), T = (p) => {
|
|
607
|
+
const v = window.getSelection();
|
|
608
|
+
if (!v || v.rangeCount === 0 || v.isCollapsed) return;
|
|
609
|
+
const y = v.getRangeAt(0), I = document.createElement("a");
|
|
610
|
+
I.href = p, I.target = "_blank", I.rel = "noopener noreferrer", I.append(y.extractContents()), y.insertNode(I), y.selectNode(I), v.removeAllRanges(), v.addRange(y), s(), h();
|
|
611
611
|
}, Y = () => {
|
|
612
|
-
const
|
|
613
|
-
if (!
|
|
614
|
-
let y =
|
|
612
|
+
const p = window.getSelection();
|
|
613
|
+
if (!p || p.rangeCount === 0) return;
|
|
614
|
+
let y = p.getRangeAt(0).commonAncestorContainer;
|
|
615
615
|
for (y.nodeType === 3 && (y = y.parentNode); y && y.nodeName !== "A"; )
|
|
616
616
|
y = y.parentNode;
|
|
617
617
|
if (!y) return;
|
|
618
|
-
const
|
|
618
|
+
const I = y, X = I.parentNode;
|
|
619
619
|
if (X) {
|
|
620
|
-
for (;
|
|
621
|
-
X.insertBefore(
|
|
622
|
-
X.removeChild(
|
|
620
|
+
for (; I.firstChild; )
|
|
621
|
+
X.insertBefore(I.firstChild, I);
|
|
622
|
+
X.removeChild(I);
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
625
|
return e.addEventListener("keydown", g, { capture: !0 }), e.addEventListener("paste", q), {
|
|
626
626
|
toggleInline: c,
|
|
627
|
-
toggleBlock:
|
|
628
|
-
normalize:
|
|
627
|
+
toggleBlock: d,
|
|
628
|
+
normalize: h,
|
|
629
629
|
rootElement: e,
|
|
630
630
|
saveSelection: s,
|
|
631
|
-
restoreSelection:
|
|
632
|
-
isInlineActive:
|
|
633
|
-
isBlockActive:
|
|
634
|
-
focus:
|
|
631
|
+
restoreSelection: L,
|
|
632
|
+
isInlineActive: x,
|
|
633
|
+
isBlockActive: B,
|
|
634
|
+
focus: S,
|
|
635
635
|
toolbarRef: l,
|
|
636
636
|
focusFirstToolbarButton: _,
|
|
637
637
|
replaceCurrentBlock: z,
|
|
@@ -641,7 +641,7 @@ const At = (e) => {
|
|
|
641
641
|
insertBlockAfterCurrent: ue,
|
|
642
642
|
appendImage: re,
|
|
643
643
|
insertImage: F,
|
|
644
|
-
appendVideo:
|
|
644
|
+
appendVideo: V,
|
|
645
645
|
applyLink: T,
|
|
646
646
|
removeLink: Y
|
|
647
647
|
};
|
|
@@ -661,112 +661,67 @@ const At = (e) => {
|
|
|
661
661
|
onImageResolutionError: {}
|
|
662
662
|
},
|
|
663
663
|
setup(e, { expose: n }) {
|
|
664
|
-
const t = e, a =
|
|
665
|
-
if (
|
|
666
|
-
switch (
|
|
664
|
+
const t = e, a = w(""), o = w(null), i = (d) => {
|
|
665
|
+
if (d.ctrlKey || d.metaKey)
|
|
666
|
+
switch (d.altKey && d.key === "F10" && (d.preventDefault(), t.editor?.restoreSelection(), t.editor?.focusFirstToolbarButton()), d.key.toLowerCase()) {
|
|
667
667
|
case "b":
|
|
668
|
-
|
|
668
|
+
d.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("strong"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
|
|
669
669
|
break;
|
|
670
670
|
case "i":
|
|
671
|
-
|
|
671
|
+
d.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("em"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
|
|
672
672
|
break;
|
|
673
673
|
case "1":
|
|
674
|
-
|
|
674
|
+
d.altKey && (d.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleBlock("h1"), t.editor?.focus(), t.editor?.announce(t.editor.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled"));
|
|
675
675
|
break;
|
|
676
676
|
}
|
|
677
677
|
}, r = () => {
|
|
678
|
-
const
|
|
679
|
-
if (!
|
|
678
|
+
const d = window.getSelection();
|
|
679
|
+
if (!d || d.rangeCount === 0) return;
|
|
680
680
|
const m = o.value;
|
|
681
681
|
if (!m) return;
|
|
682
|
-
const
|
|
683
|
-
m.contains(
|
|
684
|
-
}, l = (
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
"LI",
|
|
696
|
-
"A"
|
|
697
|
-
]), L = document.createTreeWalker(
|
|
698
|
-
m.body,
|
|
699
|
-
NodeFilter.SHOW_ELEMENT,
|
|
700
|
-
null
|
|
701
|
-
), V = [];
|
|
702
|
-
for (; L.nextNode(); ) {
|
|
703
|
-
const $ = L.currentNode;
|
|
704
|
-
if (!p.has($.tagName)) {
|
|
705
|
-
V.push($);
|
|
706
|
-
continue;
|
|
707
|
-
}
|
|
708
|
-
if ($.removeAttribute("style"), $.removeAttribute("class"), $.tagName === "A") {
|
|
709
|
-
const k = $.getAttribute("href");
|
|
710
|
-
(!k || !k.startsWith("http")) && $.removeAttribute("href");
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
return V.forEach(($) => {
|
|
714
|
-
const k = $.parentNode;
|
|
715
|
-
for (; $.firstChild; ) k?.insertBefore($.firstChild, $);
|
|
716
|
-
k?.removeChild($);
|
|
717
|
-
}), m.querySelectorAll("li").forEach(($) => {
|
|
718
|
-
$.setAttribute("data-block", "true");
|
|
719
|
-
}), m.querySelectorAll("ul, ol").forEach(($) => {
|
|
720
|
-
$.removeAttribute("data-block");
|
|
721
|
-
}), m.body.innerHTML;
|
|
722
|
-
}, s = () => {
|
|
682
|
+
const C = d.getRangeAt(0);
|
|
683
|
+
m.contains(C.commonAncestorContainer) && t.editor?.saveSelection();
|
|
684
|
+
}, l = () => {
|
|
685
|
+
const d = window.getSelection();
|
|
686
|
+
if (!d || d.rangeCount === 0) return;
|
|
687
|
+
const m = d.anchorNode;
|
|
688
|
+
if (!m) return;
|
|
689
|
+
const C = (m instanceof Element ? m : m.parentElement)?.closest("[data-block]");
|
|
690
|
+
C && s(C);
|
|
691
|
+
}, s = (d) => {
|
|
692
|
+
const m = d.textContent?.replace(/\u00A0/g, "").trim() ?? "", C = d.querySelector("img, iframe"), h = d.innerHTML === "<br>";
|
|
693
|
+
(m === "" || h) && !C ? d.dataset.empty = "true" : d.dataset.empty = "false";
|
|
694
|
+
}, c = (d, m = !1) => {
|
|
723
695
|
const C = window.getSelection();
|
|
724
696
|
if (!C || C.rangeCount === 0) return;
|
|
725
|
-
const
|
|
697
|
+
const h = C.getRangeAt(0);
|
|
698
|
+
if (h.deleteContents(), m) {
|
|
699
|
+
const B = document.createTextNode(d);
|
|
700
|
+
h.insertNode(B), h.setStartAfter(B), h.collapse(!0), C.removeAllRanges(), C.addRange(h);
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
const x = h.createContextualFragment(d);
|
|
704
|
+
h.insertNode(x), C.collapseToEnd();
|
|
705
|
+
}, u = (d) => {
|
|
706
|
+
d.preventDefault();
|
|
707
|
+
const m = d.clipboardData?.getData("text/plain");
|
|
726
708
|
if (!m) return;
|
|
727
|
-
const
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
(
|
|
732
|
-
}, u = (C) => {
|
|
733
|
-
const m = window.getSelection();
|
|
734
|
-
if (!m || m.rangeCount === 0) return;
|
|
735
|
-
const p = m.getRangeAt(0);
|
|
736
|
-
p.deleteContents();
|
|
737
|
-
const L = p.createContextualFragment(C), V = document.createElement("div");
|
|
738
|
-
V.appendChild(L);
|
|
739
|
-
const $ = (p.startContainer instanceof Element ? p.startContainer : p.startContainer.parentElement)?.closest("[data-block]");
|
|
740
|
-
$ && V.querySelectorAll("[data-block]").forEach((k) => {
|
|
741
|
-
if (k !== $) {
|
|
742
|
-
for (; k.firstChild; )
|
|
743
|
-
$.insertBefore(k.firstChild, $.nextSibling);
|
|
744
|
-
k.remove();
|
|
745
|
-
}
|
|
746
|
-
}), p.insertNode(V), m.collapseToEnd();
|
|
747
|
-
}, h = (C) => {
|
|
748
|
-
C.preventDefault();
|
|
749
|
-
const m = C.clipboardData?.getData("text/html"), p = C.clipboardData?.getData("text/plain"), L = window.getSelection();
|
|
750
|
-
if (!L || L.rangeCount === 0) return;
|
|
751
|
-
const V = L.getRangeAt(0), $ = o.value;
|
|
752
|
-
if (!$) return;
|
|
753
|
-
const k = (V.startContainer instanceof Element ? V.startContainer : V.startContainer.parentElement)?.closest("[data-block]");
|
|
754
|
-
if (m) {
|
|
755
|
-
const _ = l(m);
|
|
756
|
-
u(k ? _ : `<p data-block>${_}</p>`);
|
|
757
|
-
} else p && u(k ? p : `<p data-block>${p}</p>`);
|
|
758
|
-
t.editor?.saveSelection(), $.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
709
|
+
const C = window.getSelection();
|
|
710
|
+
if (!C || C.rangeCount === 0) return;
|
|
711
|
+
const h = C.getRangeAt(0), x = o.value;
|
|
712
|
+
if (!x) return;
|
|
713
|
+
(h.startContainer instanceof Element ? h.startContainer : h.startContainer.parentElement)?.closest("[data-block]") ? c(m.trim(), !0) : c(`<p data-block>${m.trim()}</p>`, !1), t.editor?.saveSelection(), x.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
759
714
|
};
|
|
760
715
|
return ve(() => {
|
|
761
716
|
document.addEventListener("selectionchange", r);
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
|
|
717
|
+
const d = o.value;
|
|
718
|
+
d && d.querySelectorAll("[data-block]").forEach((m) => {
|
|
719
|
+
s(m);
|
|
765
720
|
});
|
|
766
721
|
}), Be(() => document.removeEventListener("selectionchange", r)), n({
|
|
767
722
|
getRoot: () => o
|
|
768
|
-
}), (
|
|
769
|
-
|
|
723
|
+
}), (d, m) => (f(), b(de, null, [
|
|
724
|
+
M("div", {
|
|
770
725
|
ref_key: "rootRef",
|
|
771
726
|
ref: o,
|
|
772
727
|
class: "editor",
|
|
@@ -776,36 +731,36 @@ const At = (e) => {
|
|
|
776
731
|
"aria-multiline": "true",
|
|
777
732
|
"aria-label": e.ariaLabel || "Text editor",
|
|
778
733
|
"aria-describedby": "editor-help editor-status",
|
|
779
|
-
onInput:
|
|
780
|
-
onPaste:
|
|
734
|
+
onInput: l,
|
|
735
|
+
onPaste: u,
|
|
781
736
|
onKeydown: [
|
|
782
737
|
i,
|
|
783
|
-
m[0] || (m[0] = ye((
|
|
738
|
+
m[0] || (m[0] = ye((C) => N(r1)(C, e.editor), ["enter"])),
|
|
784
739
|
m[1] || (m[1] = ye(
|
|
785
740
|
//@ts-ignore
|
|
786
|
-
(...
|
|
741
|
+
(...C) => N(Ct) && N(Ct)(...C),
|
|
787
742
|
["backspace"]
|
|
788
743
|
))
|
|
789
744
|
],
|
|
790
745
|
onMouseup: m[2] || (m[2] = //@ts-ignore
|
|
791
|
-
(...
|
|
746
|
+
(...C) => e.editor?.saveSelection && e.editor?.saveSelection(...C)),
|
|
792
747
|
onKeyup: m[3] || (m[3] = //@ts-ignore
|
|
793
|
-
(...
|
|
748
|
+
(...C) => e.editor?.saveSelection && e.editor?.saveSelection(...C))
|
|
794
749
|
}, [
|
|
795
|
-
|
|
750
|
+
M("p", {
|
|
796
751
|
"data-block": "",
|
|
797
752
|
"data-empty": "true",
|
|
798
753
|
"data-placeholder": e.writeHereText
|
|
799
754
|
}, null, 8, d1)
|
|
800
755
|
], 40, c1),
|
|
801
|
-
|
|
802
|
-
m[4] || (m[4] =
|
|
756
|
+
M("div", v1, K(a.value), 1),
|
|
757
|
+
m[4] || (m[4] = M("p", {
|
|
803
758
|
id: "editor-help",
|
|
804
759
|
class: "sr-only"
|
|
805
760
|
}, " Use Ctrl+B for bold, Ctrl+I for italic, Alt+Ctrl+1 for heading level 1. ", -1))
|
|
806
761
|
], 64));
|
|
807
762
|
}
|
|
808
|
-
}),
|
|
763
|
+
}), p1 = /* @__PURE__ */ W(f1, [["__scopeId", "data-v-a0f9b8f1"]]), m1 = {
|
|
809
764
|
viewBox: "0 0 512 512",
|
|
810
765
|
paths: [
|
|
811
766
|
{
|
|
@@ -1689,7 +1644,7 @@ const At = (e) => {
|
|
|
1689
1644
|
"stroke-width": 2
|
|
1690
1645
|
}
|
|
1691
1646
|
]
|
|
1692
|
-
},
|
|
1647
|
+
}, pa = {
|
|
1693
1648
|
viewBox: "0 0 24 24",
|
|
1694
1649
|
paths: [
|
|
1695
1650
|
{
|
|
@@ -1726,7 +1681,7 @@ const At = (e) => {
|
|
|
1726
1681
|
"stroke-width": 2
|
|
1727
1682
|
}
|
|
1728
1683
|
]
|
|
1729
|
-
},
|
|
1684
|
+
}, ma = {
|
|
1730
1685
|
viewBox: "0 0 24 24",
|
|
1731
1686
|
paths: [
|
|
1732
1687
|
{
|
|
@@ -2270,7 +2225,7 @@ const At = (e) => {
|
|
|
2270
2225
|
}
|
|
2271
2226
|
]
|
|
2272
2227
|
}, tt = {
|
|
2273
|
-
x:
|
|
2228
|
+
x: m1,
|
|
2274
2229
|
eye: C1,
|
|
2275
2230
|
sun: h1,
|
|
2276
2231
|
box: g1,
|
|
@@ -2323,9 +2278,9 @@ const At = (e) => {
|
|
|
2323
2278
|
camera: la,
|
|
2324
2279
|
pencil: Q1,
|
|
2325
2280
|
fashion: fa,
|
|
2326
|
-
addUser:
|
|
2281
|
+
addUser: pa,
|
|
2327
2282
|
loading: Ca,
|
|
2328
|
-
sortAsc:
|
|
2283
|
+
sortAsc: ma,
|
|
2329
2284
|
profile: ha,
|
|
2330
2285
|
youtube: ya,
|
|
2331
2286
|
warning: ga,
|
|
@@ -2362,7 +2317,7 @@ const At = (e) => {
|
|
|
2362
2317
|
spin: { type: Boolean }
|
|
2363
2318
|
},
|
|
2364
2319
|
setup(e) {
|
|
2365
|
-
return (n, t) => (
|
|
2320
|
+
return (n, t) => (f(), b("svg", {
|
|
2366
2321
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2367
2322
|
class: fe(["icon", { spin: e.spin }]),
|
|
2368
2323
|
viewBox: N(tt)[e.name].viewBox,
|
|
@@ -2372,28 +2327,28 @@ const At = (e) => {
|
|
|
2372
2327
|
fill: "none",
|
|
2373
2328
|
"aria-hidden": "true"
|
|
2374
2329
|
}, [
|
|
2375
|
-
(
|
|
2376
|
-
a.type === "path" ? (
|
|
2330
|
+
(f(!0), b(de, null, he(N(tt)[e.name].paths, (a, o) => (f(), b(de, { key: o }, [
|
|
2331
|
+
a.type === "path" ? (f(), b("path", be({
|
|
2377
2332
|
key: 0,
|
|
2378
2333
|
ref_for: !0
|
|
2379
2334
|
}, a), null, 16)) : O("", !0),
|
|
2380
|
-
a.type === "circle" ? (
|
|
2335
|
+
a.type === "circle" ? (f(), b("circle", be({
|
|
2381
2336
|
key: 1,
|
|
2382
2337
|
ref_for: !0
|
|
2383
2338
|
}, a), null, 16)) : O("", !0),
|
|
2384
|
-
a.type === "line" ? (
|
|
2339
|
+
a.type === "line" ? (f(), b("line", be({
|
|
2385
2340
|
key: 2,
|
|
2386
2341
|
ref_for: !0
|
|
2387
2342
|
}, a), null, 16)) : O("", !0),
|
|
2388
|
-
a.type === "polyline" ? (
|
|
2343
|
+
a.type === "polyline" ? (f(), b("polyline", be({
|
|
2389
2344
|
key: 3,
|
|
2390
2345
|
ref_for: !0
|
|
2391
2346
|
}, a), null, 16)) : O("", !0),
|
|
2392
|
-
a.type === "rect" ? (
|
|
2347
|
+
a.type === "rect" ? (f(), b("rect", be({
|
|
2393
2348
|
key: 4,
|
|
2394
2349
|
ref_for: !0
|
|
2395
2350
|
}, a), null, 16)) : O("", !0),
|
|
2396
|
-
a.type === "polygon" ? (
|
|
2351
|
+
a.type === "polygon" ? (f(), b("polygon", be({
|
|
2397
2352
|
key: 5,
|
|
2398
2353
|
ref_for: !0
|
|
2399
2354
|
}, a), null, 16)) : O("", !0)
|
|
@@ -2411,50 +2366,50 @@ const At = (e) => {
|
|
|
2411
2366
|
buttons: {}
|
|
2412
2367
|
},
|
|
2413
2368
|
setup(e, { expose: n }) {
|
|
2414
|
-
const t = e, a = at + Ga, o =
|
|
2415
|
-
let
|
|
2416
|
-
const
|
|
2417
|
-
c.value =
|
|
2369
|
+
const t = e, a = at + Ga, o = w(""), i = w(!1), r = w(!1), l = w([]), s = w(null), c = w({}), u = w(null);
|
|
2370
|
+
let d = !1, m = null, C = null, h = null, x = 0;
|
|
2371
|
+
const B = () => {
|
|
2372
|
+
c.value = S();
|
|
2418
2373
|
};
|
|
2419
2374
|
Q(r, async (g) => {
|
|
2420
2375
|
if (!g) {
|
|
2421
|
-
|
|
2376
|
+
h?.(), h = null, C?.disconnect(), C = null;
|
|
2422
2377
|
return;
|
|
2423
2378
|
}
|
|
2424
|
-
await $e(), await $e(),
|
|
2379
|
+
await $e(), await $e(), B(), s.value && (C = new ResizeObserver(B), C.observe(s.value)), h = L(B);
|
|
2425
2380
|
}, { flush: "post" });
|
|
2426
|
-
const
|
|
2381
|
+
const S = () => {
|
|
2427
2382
|
if (!t.editor?.rootElement) return {};
|
|
2428
2383
|
let D = null;
|
|
2429
|
-
if (i.value &&
|
|
2430
|
-
D =
|
|
2384
|
+
if (i.value && m)
|
|
2385
|
+
D = m;
|
|
2431
2386
|
else {
|
|
2432
|
-
const
|
|
2433
|
-
if (!
|
|
2434
|
-
if (!i.value &&
|
|
2435
|
-
D =
|
|
2387
|
+
const v = window.getSelection();
|
|
2388
|
+
if (!v || v.rangeCount === 0) return {};
|
|
2389
|
+
if (!i.value && v.isCollapsed) return {};
|
|
2390
|
+
D = v.getRangeAt(0);
|
|
2436
2391
|
}
|
|
2437
2392
|
if (!D) return {};
|
|
2438
|
-
const
|
|
2439
|
-
if (!
|
|
2393
|
+
const E = D.getClientRects().item(0) ?? D.getBoundingClientRect();
|
|
2394
|
+
if (!E || E.width === 0 && E.height === 0) return {};
|
|
2440
2395
|
const q = s.value;
|
|
2441
2396
|
if (!q) return {};
|
|
2442
|
-
const
|
|
2443
|
-
|
|
2444
|
-
Math.min(T, window.innerWidth -
|
|
2445
|
-
),
|
|
2446
|
-
return
|
|
2397
|
+
const H = q.getBoundingClientRect(), k = H.width, T = E.left + E.width / 2, Y = Math.max(
|
|
2398
|
+
k / 2 + at,
|
|
2399
|
+
Math.min(T, window.innerWidth - k / 2 - at)
|
|
2400
|
+
), p = E.top - H.height - a;
|
|
2401
|
+
return p < 0 ? {} : {
|
|
2447
2402
|
position: "fixed",
|
|
2448
2403
|
left: `${Y}px`,
|
|
2449
|
-
top: `${
|
|
2404
|
+
top: `${p}px`
|
|
2450
2405
|
};
|
|
2451
|
-
},
|
|
2406
|
+
}, L = (g) => {
|
|
2452
2407
|
let D = 0;
|
|
2453
|
-
const
|
|
2408
|
+
const E = () => {
|
|
2454
2409
|
cancelAnimationFrame(D), D = requestAnimationFrame(g);
|
|
2455
|
-
}, q =
|
|
2456
|
-
return window.addEventListener("scroll", q, { capture: !0, passive: !0 }), window.addEventListener("resize",
|
|
2457
|
-
cancelAnimationFrame(D), window.removeEventListener("scroll", q, { capture: !0 }), window.removeEventListener("resize",
|
|
2410
|
+
}, q = E, H = E;
|
|
2411
|
+
return window.addEventListener("scroll", q, { capture: !0, passive: !0 }), window.addEventListener("resize", H, { passive: !0 }), () => {
|
|
2412
|
+
cancelAnimationFrame(D), window.removeEventListener("scroll", q, { capture: !0 }), window.removeEventListener("resize", H);
|
|
2458
2413
|
};
|
|
2459
2414
|
}, _ = (g, D) => {
|
|
2460
2415
|
g && (l.value[D] = g);
|
|
@@ -2462,7 +2417,7 @@ const At = (e) => {
|
|
|
2462
2417
|
Q(r, () => {
|
|
2463
2418
|
l.value = [];
|
|
2464
2419
|
});
|
|
2465
|
-
const z =
|
|
2420
|
+
const z = A(() => [
|
|
2466
2421
|
{
|
|
2467
2422
|
key: "strong",
|
|
2468
2423
|
label: "bold",
|
|
@@ -2524,45 +2479,45 @@ const At = (e) => {
|
|
|
2524
2479
|
g.removeLink(), g.focus();
|
|
2525
2480
|
return;
|
|
2526
2481
|
}
|
|
2527
|
-
|
|
2482
|
+
d = !0, i.value = !0, r.value = !0, $e(() => {
|
|
2528
2483
|
u.value?.focus(), requestAnimationFrame(() => {
|
|
2529
|
-
|
|
2484
|
+
d = !1;
|
|
2530
2485
|
});
|
|
2531
2486
|
}), g.announce(g.isInlineActive("strong") ? "Link enabled" : "Link disabled");
|
|
2532
2487
|
},
|
|
2533
2488
|
isActive: (g) => g.isInlineActive("a")
|
|
2534
2489
|
}
|
|
2535
|
-
]), P =
|
|
2490
|
+
]), P = A(() => [
|
|
2536
2491
|
...z.value,
|
|
2537
2492
|
...t.editor?.buttons ?? []
|
|
2538
2493
|
]), oe = async () => {
|
|
2539
2494
|
await $e(), l.value[0]?.focus();
|
|
2540
2495
|
}, ue = (g) => {
|
|
2541
|
-
const D = l.value,
|
|
2496
|
+
const D = l.value, E = D.indexOf(document.activeElement);
|
|
2542
2497
|
if (g.key === "ArrowRight") {
|
|
2543
2498
|
g.preventDefault();
|
|
2544
|
-
const q =
|
|
2499
|
+
const q = E < D.length - 1 ? E + 1 : 0;
|
|
2545
2500
|
D[q]?.focus();
|
|
2546
2501
|
}
|
|
2547
2502
|
if (g.key === "ArrowLeft") {
|
|
2548
2503
|
g.preventDefault();
|
|
2549
|
-
const q =
|
|
2504
|
+
const q = E > 0 ? E - 1 : D.length - 1;
|
|
2550
2505
|
D[q]?.focus();
|
|
2551
2506
|
}
|
|
2552
2507
|
if (g.key === "Home" && (g.preventDefault(), D[0]?.focus()), g.key === "End" && (g.preventDefault(), D[D.length - 1]?.focus()), g.key === "Escape") {
|
|
2553
2508
|
if (g.preventDefault(), i.value) {
|
|
2554
|
-
|
|
2509
|
+
R(), t.editor?.focus();
|
|
2555
2510
|
return;
|
|
2556
2511
|
}
|
|
2557
2512
|
t.editor?.restoreSelection(), t.editor?.focus();
|
|
2558
2513
|
}
|
|
2559
2514
|
}, re = () => {
|
|
2560
|
-
cancelAnimationFrame(
|
|
2515
|
+
cancelAnimationFrame(x), x = requestAnimationFrame(() => {
|
|
2561
2516
|
const g = window.getSelection(), D = t.editor?.rootElement;
|
|
2562
2517
|
if (!D) return;
|
|
2563
2518
|
if (g && g.rangeCount > 0) {
|
|
2564
|
-
const
|
|
2565
|
-
D.contains(
|
|
2519
|
+
const H = g.getRangeAt(0), k = H.commonAncestorContainer.nodeType === 3 ? H.commonAncestorContainer.parentNode : H.commonAncestorContainer;
|
|
2520
|
+
D.contains(k) && !g.isCollapsed && (m = H.cloneRange());
|
|
2566
2521
|
}
|
|
2567
2522
|
if (i.value) {
|
|
2568
2523
|
r.value = !0;
|
|
@@ -2572,40 +2527,42 @@ const At = (e) => {
|
|
|
2572
2527
|
r.value = !1;
|
|
2573
2528
|
return;
|
|
2574
2529
|
}
|
|
2575
|
-
const
|
|
2530
|
+
const E = g.getRangeAt(0), q = E.commonAncestorContainer.nodeType === 3 ? E.commonAncestorContainer.parentNode : E.commonAncestorContainer;
|
|
2576
2531
|
r.value = D.contains(q) && !g.isCollapsed;
|
|
2577
2532
|
});
|
|
2578
2533
|
}, F = () => {
|
|
2579
|
-
o.value.trim() && (t.editor?.restoreSelection(), t.editor?.applyLink(o.value),
|
|
2580
|
-
|
|
2534
|
+
o.value.trim() && (t.editor?.restoreSelection(), t.editor?.applyLink(o.value), t.editor?.rootElement?.dispatchEvent(
|
|
2535
|
+
new Event("input", { bubbles: !0 })
|
|
2536
|
+
), o.value = "", i.value = !1, t.editor?.focus());
|
|
2537
|
+
}, R = () => {
|
|
2581
2538
|
i.value = !1, o.value = "";
|
|
2582
|
-
},
|
|
2539
|
+
}, $ = (g) => {
|
|
2583
2540
|
g.action(t.editor);
|
|
2584
|
-
},
|
|
2585
|
-
if (
|
|
2586
|
-
const D = g.target,
|
|
2541
|
+
}, V = (g) => {
|
|
2542
|
+
if (d) return;
|
|
2543
|
+
const D = g.target, E = s.value, q = t.editor?.rootElement;
|
|
2587
2544
|
if (i.value) {
|
|
2588
|
-
const T =
|
|
2545
|
+
const T = E?.contains(D), Y = q?.contains(D);
|
|
2589
2546
|
if (T || Y) return;
|
|
2590
|
-
|
|
2547
|
+
R(), r.value = !1;
|
|
2591
2548
|
return;
|
|
2592
2549
|
}
|
|
2593
|
-
if (!
|
|
2594
|
-
const
|
|
2595
|
-
|
|
2550
|
+
if (!E || !q) return;
|
|
2551
|
+
const H = E.contains(D), k = q.contains(D);
|
|
2552
|
+
H || k || (r.value = !1);
|
|
2596
2553
|
};
|
|
2597
2554
|
return ve(() => {
|
|
2598
2555
|
document.addEventListener("selectionchange", () => {
|
|
2599
2556
|
re();
|
|
2600
|
-
}), document.addEventListener("focusin",
|
|
2557
|
+
}), document.addEventListener("focusin", V);
|
|
2601
2558
|
}), Se(() => {
|
|
2602
|
-
|
|
2559
|
+
h?.(), C?.disconnect(), C = null, cancelAnimationFrame(x), document.removeEventListener("selectionchange", re), document.removeEventListener("focusin", V);
|
|
2603
2560
|
}), n({
|
|
2604
2561
|
focusFirstButton: oe
|
|
2605
|
-
}), (g, D) => (
|
|
2562
|
+
}), (g, D) => (f(), ae(Fe, { to: "body" }, [
|
|
2606
2563
|
U(Ae, { name: "tooltip-fade" }, {
|
|
2607
2564
|
default: J(() => [
|
|
2608
|
-
r.value ? (
|
|
2565
|
+
r.value ? (f(), b("div", {
|
|
2609
2566
|
key: 0,
|
|
2610
2567
|
ref_key: "toolbarRef",
|
|
2611
2568
|
ref: s,
|
|
@@ -2617,41 +2574,41 @@ const At = (e) => {
|
|
|
2617
2574
|
tabindex: "-1",
|
|
2618
2575
|
onKeydown: ue
|
|
2619
2576
|
}, [
|
|
2620
|
-
D[4] || (D[4] =
|
|
2621
|
-
i.value ? (
|
|
2622
|
-
_e(
|
|
2577
|
+
D[4] || (D[4] = M("div", { class: "arrow" }, null, -1)),
|
|
2578
|
+
i.value ? (f(), b("div", Xa, [
|
|
2579
|
+
_e(M("input", {
|
|
2623
2580
|
ref_key: "linkInputRef",
|
|
2624
2581
|
ref: u,
|
|
2625
|
-
"onUpdate:modelValue": D[0] || (D[0] = (
|
|
2582
|
+
"onUpdate:modelValue": D[0] || (D[0] = (E) => o.value = E),
|
|
2626
2583
|
type: "text",
|
|
2627
2584
|
placeholder: "https://...",
|
|
2628
|
-
onBlur: D[1] || (D[1] = se((
|
|
2585
|
+
onBlur: D[1] || (D[1] = se((E) => i.value = !1, ["prevent"])),
|
|
2629
2586
|
onKeydown: ye(F, ["enter"]),
|
|
2630
2587
|
onMousedown: D[2] || (D[2] = se(() => {
|
|
2631
2588
|
}, ["stop"]))
|
|
2632
2589
|
}, null, 544), [
|
|
2633
2590
|
[Ye, o.value]
|
|
2634
2591
|
]),
|
|
2635
|
-
|
|
2592
|
+
M("button", {
|
|
2636
2593
|
onClick: F,
|
|
2637
2594
|
onMousedown: D[3] || (D[3] = se(() => {
|
|
2638
2595
|
}, ["prevent"]))
|
|
2639
2596
|
}, "Ok ", 32)
|
|
2640
|
-
])) : (
|
|
2641
|
-
key:
|
|
2597
|
+
])) : (f(!0), b(de, { key: 0 }, he(P.value, (E, q) => (f(), b("button", {
|
|
2598
|
+
key: E.key ?? q,
|
|
2642
2599
|
type: "button",
|
|
2643
2600
|
ref_for: !0,
|
|
2644
|
-
ref: (
|
|
2645
|
-
class: fe({ "is-active":
|
|
2646
|
-
"aria-pressed":
|
|
2647
|
-
onClick: (
|
|
2648
|
-
"aria-label":
|
|
2601
|
+
ref: (H) => _(H, q),
|
|
2602
|
+
class: fe({ "is-active": E.isActive?.(t.editor) }),
|
|
2603
|
+
"aria-pressed": E.isActive?.(t.editor),
|
|
2604
|
+
onClick: (H) => $(E),
|
|
2605
|
+
"aria-label": E.ariaLabel
|
|
2649
2606
|
}, [
|
|
2650
|
-
|
|
2607
|
+
E.type === "icon" ? (f(), ae(Ce, {
|
|
2651
2608
|
key: 0,
|
|
2652
|
-
name:
|
|
2653
|
-
size:
|
|
2654
|
-
}, null, 8, ["name", "size"])) : (
|
|
2609
|
+
name: E.label,
|
|
2610
|
+
size: E.size ?? 14
|
|
2611
|
+
}, null, 8, ["name", "size"])) : (f(), b("span", Ya, K(E.label), 1))
|
|
2655
2612
|
], 10, Wa))), 128))
|
|
2656
2613
|
], 44, ja)) : O("", !0)
|
|
2657
2614
|
]),
|
|
@@ -2659,7 +2616,7 @@ const At = (e) => {
|
|
|
2659
2616
|
})
|
|
2660
2617
|
]));
|
|
2661
2618
|
}
|
|
2662
|
-
}), Qa = /* @__PURE__ */ W(Ja, [["__scopeId", "data-v-
|
|
2619
|
+
}), Qa = /* @__PURE__ */ W(Ja, [["__scopeId", "data-v-c5884737"]]), en = { class: "editor" }, gt = /* @__PURE__ */ Z({
|
|
2663
2620
|
__name: "Editor",
|
|
2664
2621
|
props: /* @__PURE__ */ ie({
|
|
2665
2622
|
ariaLabel: {},
|
|
@@ -2675,7 +2632,7 @@ const At = (e) => {
|
|
|
2675
2632
|
}),
|
|
2676
2633
|
emits: ["update:modelValue"],
|
|
2677
2634
|
setup(e, { expose: n }) {
|
|
2678
|
-
const t = ke(e, "modelValue"), a = e, o = ge(), i =
|
|
2635
|
+
const t = ke(e, "modelValue"), a = e, o = ge(), i = w(), r = w(null), l = w(null);
|
|
2679
2636
|
return Q(
|
|
2680
2637
|
() => t.value,
|
|
2681
2638
|
(s) => {
|
|
@@ -2702,8 +2659,8 @@ const At = (e) => {
|
|
|
2702
2659
|
c.addEventListener("input", u), Be(() => c.removeEventListener("input", u));
|
|
2703
2660
|
}), He("announce", (s) => r.value?.announce(s)), n({
|
|
2704
2661
|
editor: r
|
|
2705
|
-
}), (s, c) => (
|
|
2706
|
-
U(
|
|
2662
|
+
}), (s, c) => (f(), b("section", en, [
|
|
2663
|
+
U(p1, {
|
|
2707
2664
|
ref_key: "contentRef",
|
|
2708
2665
|
ref: l,
|
|
2709
2666
|
editor: r.value,
|
|
@@ -2745,7 +2702,7 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2745
2702
|
key: 3,
|
|
2746
2703
|
class: "ui-upload__status canceled",
|
|
2747
2704
|
role: "status"
|
|
2748
|
-
},
|
|
2705
|
+
}, pn = { class: "ui-upload__actions" }, mn = {
|
|
2749
2706
|
class: "sr-only",
|
|
2750
2707
|
"aria-live": "polite"
|
|
2751
2708
|
}, Cn = ["id"], hn = /* @__PURE__ */ Z({
|
|
@@ -2766,94 +2723,94 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2766
2723
|
}),
|
|
2767
2724
|
emits: /* @__PURE__ */ ie(["select", "upload", "remove"], ["update:modelValue"]),
|
|
2768
2725
|
setup(e, { emit: n }) {
|
|
2769
|
-
const t = ke(e, "modelValue"), a = e, o = n, i =
|
|
2726
|
+
const t = ke(e, "modelValue"), a = e, o = n, i = w(0), r = w(""), l = w(!1), s = ge(), c = w(), u = A(() => t.value), d = A(() => a.maxSize === 1 / 0 ? "Unlimited" : re(a.maxSize)), m = A(() => !a.disabled && (a.multiple || t.value.length === 0)), C = A(() => u.value.some(($) => $.status === "uploading")), h = () => m.value && c.value?.click(), x = () => {
|
|
2770
2727
|
a.disabled || (i.value++, l.value = !0);
|
|
2771
|
-
},
|
|
2728
|
+
}, B = () => {
|
|
2772
2729
|
i.value = Math.max(0, i.value - 1), i.value === 0 && (l.value = !1);
|
|
2773
|
-
},
|
|
2774
|
-
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (i.value = 0, l.value = !1,
|
|
2775
|
-
if (!a.multiple &&
|
|
2776
|
-
const
|
|
2777
|
-
_([
|
|
2730
|
+
}, S = ($) => {
|
|
2731
|
+
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (i.value = 0, l.value = !1, !!$.dataTransfer)) {
|
|
2732
|
+
if (!a.multiple && $.dataTransfer?.files.length) {
|
|
2733
|
+
const V = $.dataTransfer.files[0];
|
|
2734
|
+
_([V]);
|
|
2778
2735
|
return;
|
|
2779
2736
|
}
|
|
2780
|
-
_(Array.from(
|
|
2737
|
+
_(Array.from($.dataTransfer.files));
|
|
2781
2738
|
}
|
|
2782
|
-
},
|
|
2783
|
-
const
|
|
2784
|
-
|
|
2785
|
-
}, _ = (
|
|
2786
|
-
const
|
|
2787
|
-
for (const D of
|
|
2788
|
-
if (u.value.length +
|
|
2789
|
-
D.size > a.maxSize ||
|
|
2739
|
+
}, L = ($) => {
|
|
2740
|
+
const V = $.target;
|
|
2741
|
+
V.files && (_(Array.from(V.files)), V.value = "");
|
|
2742
|
+
}, _ = ($) => {
|
|
2743
|
+
const V = [];
|
|
2744
|
+
for (const D of $) {
|
|
2745
|
+
if (u.value.length + V.length >= a.maxFiles) break;
|
|
2746
|
+
D.size > a.maxSize || V.push({
|
|
2790
2747
|
id: crypto.randomUUID(),
|
|
2791
2748
|
file: D,
|
|
2792
2749
|
progress: 0,
|
|
2793
2750
|
status: "idle"
|
|
2794
2751
|
});
|
|
2795
2752
|
}
|
|
2796
|
-
if (!
|
|
2797
|
-
o("select",
|
|
2798
|
-
const g = [...u.value, ...
|
|
2799
|
-
t.value = g, a.autoUpload &&
|
|
2800
|
-
}, z = (
|
|
2801
|
-
const
|
|
2802
|
-
|
|
2753
|
+
if (!V.length) return;
|
|
2754
|
+
o("select", V.map((D) => D.file));
|
|
2755
|
+
const g = [...u.value, ...V];
|
|
2756
|
+
t.value = g, a.autoUpload && V.forEach(z);
|
|
2757
|
+
}, z = ($) => {
|
|
2758
|
+
const V = new AbortController();
|
|
2759
|
+
$.progress = 0, $.error = void 0, $.status = "uploading", $.controller = V, F(`Started uploading ${$.file.name}`);
|
|
2803
2760
|
const g = () => {
|
|
2804
|
-
|
|
2761
|
+
V.signal.removeEventListener("abort", g);
|
|
2805
2762
|
};
|
|
2806
|
-
|
|
2763
|
+
V.signal.addEventListener("abort", g);
|
|
2807
2764
|
const D = {
|
|
2808
|
-
signal:
|
|
2809
|
-
onProgress: (
|
|
2810
|
-
|
|
2765
|
+
signal: V.signal,
|
|
2766
|
+
onProgress: (E) => {
|
|
2767
|
+
$.progress = E, ue();
|
|
2811
2768
|
},
|
|
2812
2769
|
done: () => {
|
|
2813
|
-
|
|
2770
|
+
$.status = "success", $.progress = 100, $.controller = void 0, F(`Finished uploading ${$.file.name}`), ue();
|
|
2814
2771
|
},
|
|
2815
|
-
fail: (
|
|
2816
|
-
|
|
2772
|
+
fail: (E) => {
|
|
2773
|
+
$.status = "error", $.error = E, $.controller = void 0, F(`Failed to upload ${$.file.name}: ${E}`), ue();
|
|
2817
2774
|
}
|
|
2818
2775
|
};
|
|
2819
|
-
o("upload",
|
|
2820
|
-
}, P = (
|
|
2821
|
-
|
|
2822
|
-
}, oe = (
|
|
2823
|
-
|
|
2824
|
-
}, ue = () => t.value = [...u.value], re = (
|
|
2825
|
-
const
|
|
2776
|
+
o("upload", $, D);
|
|
2777
|
+
}, P = ($) => {
|
|
2778
|
+
$.controller && ($.controller.abort(), $.status = "canceled", $.controller = void 0, F(`Canceled uploading ${$.file.name}`), ue());
|
|
2779
|
+
}, oe = ($) => {
|
|
2780
|
+
$.status !== "error" && $.status !== "canceled" || z($);
|
|
2781
|
+
}, ue = () => t.value = [...u.value], re = ($) => {
|
|
2782
|
+
const V = ["B", "KB", "MB", "GB", "TB"];
|
|
2826
2783
|
let g = 0;
|
|
2827
|
-
for (;
|
|
2828
|
-
|
|
2829
|
-
return `${
|
|
2830
|
-
}, F = (
|
|
2784
|
+
for (; $ >= 1024 && g < V.length - 1; )
|
|
2785
|
+
$ /= 1024, g++;
|
|
2786
|
+
return `${$.toFixed(2)} ${V[g]}`;
|
|
2787
|
+
}, F = ($) => {
|
|
2831
2788
|
r.value = "", requestAnimationFrame(() => {
|
|
2832
|
-
r.value =
|
|
2789
|
+
r.value = $;
|
|
2833
2790
|
});
|
|
2834
|
-
},
|
|
2835
|
-
|
|
2791
|
+
}, R = ($) => {
|
|
2792
|
+
$.controller && $.controller.abort(), o("remove", $), t.value = u.value.filter((V) => V.id !== $.id);
|
|
2836
2793
|
};
|
|
2837
|
-
return (
|
|
2794
|
+
return ($, V) => (f(), b("div", {
|
|
2838
2795
|
role: "button",
|
|
2839
2796
|
class: "ui-upload",
|
|
2840
2797
|
tabindex: e.disabled ? -1 : 0,
|
|
2841
2798
|
"aria-label": e.ariaLabel || "File upload area",
|
|
2842
2799
|
"aria-describedby": l.value ? N(s) : void 0,
|
|
2843
|
-
"aria-busy":
|
|
2800
|
+
"aria-busy": C.value ? "true" : void 0,
|
|
2844
2801
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
2845
2802
|
"data-disabled": e.disabled || void 0,
|
|
2846
2803
|
"data-dragging": l.value || void 0,
|
|
2847
|
-
onClick:
|
|
2804
|
+
onClick: V[0] || (V[0] = (g) => !e.disabled && h()),
|
|
2848
2805
|
onKeydown: [
|
|
2849
|
-
|
|
2850
|
-
|
|
2806
|
+
V[1] || (V[1] = ye(se((g) => !e.disabled && h(), ["stop", "prevent"]), ["enter"])),
|
|
2807
|
+
V[2] || (V[2] = ye(se((g) => !e.disabled && h(), ["prevent"]), ["space"]))
|
|
2851
2808
|
],
|
|
2852
|
-
onDragover:
|
|
2853
|
-
onDragleave:
|
|
2854
|
-
onDrop:
|
|
2809
|
+
onDragover: V[3] || (V[3] = se((g) => !e.disabled && x(), ["prevent"])),
|
|
2810
|
+
onDragleave: B,
|
|
2811
|
+
onDrop: V[4] || (V[4] = se((g) => !e.disabled && S(g), ["prevent"]))
|
|
2855
2812
|
}, [
|
|
2856
|
-
|
|
2813
|
+
M("input", {
|
|
2857
2814
|
type: "file",
|
|
2858
2815
|
ref_key: "inputRef",
|
|
2859
2816
|
ref: c,
|
|
@@ -2861,9 +2818,9 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2861
2818
|
multiple: e.multiple,
|
|
2862
2819
|
accept: e.accept,
|
|
2863
2820
|
disabled: e.disabled,
|
|
2864
|
-
onChange:
|
|
2821
|
+
onChange: L
|
|
2865
2822
|
}, null, 40, an),
|
|
2866
|
-
e.multiple || !e.multiple && t.value.length === 0 ? G(
|
|
2823
|
+
e.multiple || !e.multiple && t.value.length === 0 ? G($.$slots, "default", {
|
|
2867
2824
|
key: 0,
|
|
2868
2825
|
dragging: l.value
|
|
2869
2826
|
}, () => [
|
|
@@ -2871,77 +2828,77 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2871
2828
|
name: "upload",
|
|
2872
2829
|
size: 32
|
|
2873
2830
|
}),
|
|
2874
|
-
|
|
2875
|
-
|
|
2831
|
+
V[6] || (V[6] = M("p", null, "Drag and Drop files here", -1)),
|
|
2832
|
+
V[7] || (V[7] = M("span", null, "or", -1)),
|
|
2876
2833
|
U(Le, {
|
|
2877
2834
|
type: "button",
|
|
2878
2835
|
class: "btn btn-outline"
|
|
2879
2836
|
}, {
|
|
2880
|
-
default: J(() => [...
|
|
2837
|
+
default: J(() => [...V[5] || (V[5] = [
|
|
2881
2838
|
Me("Choose File", -1)
|
|
2882
2839
|
])]),
|
|
2883
2840
|
_: 1
|
|
2884
2841
|
}),
|
|
2885
|
-
|
|
2842
|
+
M("span", null, "Maximum size: " + K(d.value), 1)
|
|
2886
2843
|
], !0) : O("", !0),
|
|
2887
|
-
u.value?.length ? (
|
|
2888
|
-
(
|
|
2844
|
+
u.value?.length ? (f(), b("ul", nn, [
|
|
2845
|
+
(f(!0), b(de, null, he(u.value, (g) => (f(), b("li", {
|
|
2889
2846
|
key: g.id,
|
|
2890
2847
|
class: "ui-upload__item"
|
|
2891
2848
|
}, [
|
|
2892
|
-
G(
|
|
2849
|
+
G($.$slots, "file", {
|
|
2893
2850
|
file: g,
|
|
2894
|
-
remove: () =>
|
|
2851
|
+
remove: () => R(g),
|
|
2895
2852
|
cancel: () => P(g),
|
|
2896
2853
|
retry: () => oe(g)
|
|
2897
2854
|
}, () => [
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2855
|
+
M("div", on, [
|
|
2856
|
+
M("span", ln, K(g.file.name), 1),
|
|
2857
|
+
M("span", rn, K(re(g.file.size)), 1)
|
|
2901
2858
|
]),
|
|
2902
|
-
g.status === "uploading" ? (
|
|
2903
|
-
|
|
2904
|
-
|
|
2859
|
+
g.status === "uploading" ? (f(), b("div", sn, [
|
|
2860
|
+
M("span", un, K(g.progress) + "% ", 1),
|
|
2861
|
+
M("progress", {
|
|
2905
2862
|
class: "ui-upload__progress",
|
|
2906
2863
|
value: g.progress,
|
|
2907
2864
|
max: "100",
|
|
2908
2865
|
"aria-label": `Upload progress for ${g.file.name}`
|
|
2909
2866
|
}, null, 8, cn)
|
|
2910
2867
|
])) : O("", !0),
|
|
2911
|
-
g.status === "success" ? (
|
|
2912
|
-
g.status === "error" ? (
|
|
2913
|
-
g.status === "canceled" ? (
|
|
2914
|
-
|
|
2915
|
-
g.status === "uploading" ? (
|
|
2868
|
+
g.status === "success" ? (f(), b("span", dn, " Uploaded successful ")) : O("", !0),
|
|
2869
|
+
g.status === "error" ? (f(), b("span", vn, K(g.error || "Upload failed"), 1)) : O("", !0),
|
|
2870
|
+
g.status === "canceled" ? (f(), b("span", fn, " Upload canceled ")) : O("", !0),
|
|
2871
|
+
M("div", pn, [
|
|
2872
|
+
g.status === "uploading" ? (f(), ae(Le, {
|
|
2916
2873
|
key: 0,
|
|
2917
2874
|
type: "button",
|
|
2918
2875
|
class: "btn-danger btn-xs",
|
|
2919
2876
|
onClick: se((D) => P(g), ["stop"])
|
|
2920
2877
|
}, {
|
|
2921
|
-
default: J(() => [...
|
|
2878
|
+
default: J(() => [...V[8] || (V[8] = [
|
|
2922
2879
|
Me(" Cancel ", -1)
|
|
2923
2880
|
])]),
|
|
2924
2881
|
_: 1
|
|
2925
2882
|
}, 8, ["onClick"])) : O("", !0),
|
|
2926
|
-
g.status === "error" || g.status === "canceled" ? (
|
|
2883
|
+
g.status === "error" || g.status === "canceled" ? (f(), ae(Le, {
|
|
2927
2884
|
key: 1,
|
|
2928
2885
|
type: "button",
|
|
2929
2886
|
class: "btn-info btn-xs",
|
|
2930
2887
|
onClick: se((D) => oe(g), ["stop"])
|
|
2931
2888
|
}, {
|
|
2932
|
-
default: J(() => [...
|
|
2889
|
+
default: J(() => [...V[9] || (V[9] = [
|
|
2933
2890
|
Me(" Retry ", -1)
|
|
2934
2891
|
])]),
|
|
2935
2892
|
_: 1
|
|
2936
2893
|
}, 8, ["onClick"])) : O("", !0),
|
|
2937
|
-
g.status !== "uploading" ? (
|
|
2894
|
+
g.status !== "uploading" ? (f(), ae(Le, {
|
|
2938
2895
|
key: 2,
|
|
2939
2896
|
type: "button",
|
|
2940
2897
|
class: "btn-outline btn-xs",
|
|
2941
|
-
onClick: se((D) =>
|
|
2898
|
+
onClick: se((D) => R(g), ["stop"]),
|
|
2942
2899
|
"aria-label": "Remove file"
|
|
2943
2900
|
}, {
|
|
2944
|
-
default: J(() => [...
|
|
2901
|
+
default: J(() => [...V[10] || (V[10] = [
|
|
2945
2902
|
Me(" Remove ", -1)
|
|
2946
2903
|
])]),
|
|
2947
2904
|
_: 1
|
|
@@ -2950,8 +2907,8 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2950
2907
|
], !0)
|
|
2951
2908
|
]))), 128))
|
|
2952
2909
|
])) : O("", !0),
|
|
2953
|
-
|
|
2954
|
-
|
|
2910
|
+
M("div", mn, K(r.value), 1),
|
|
2911
|
+
M("p", {
|
|
2955
2912
|
id: N(s),
|
|
2956
2913
|
class: "sr-only"
|
|
2957
2914
|
}, " Drop files to upload ", 8, Cn)
|
|
@@ -2975,65 +2932,65 @@ const gn = (e) => {
|
|
|
2975
2932
|
disabled: { type: Boolean, default: !1 }
|
|
2976
2933
|
},
|
|
2977
2934
|
setup(e) {
|
|
2978
|
-
const n = e, t = kn + wn, a =
|
|
2935
|
+
const n = e, t = kn + wn, a = w(!1), o = `tooltip-${ge()}`, i = w(null), r = w(null), l = w({});
|
|
2979
2936
|
let s = null, c = null, u = null;
|
|
2980
|
-
const
|
|
2937
|
+
const d = () => {
|
|
2981
2938
|
n.disabled || (s && (clearTimeout(s), s = null), n.delay ? s = window.setTimeout(() => {
|
|
2982
2939
|
a.value = !0, s = null;
|
|
2983
2940
|
}, n.delay) : a.value = !0);
|
|
2984
|
-
}, C = () => {
|
|
2985
|
-
s && (clearTimeout(s), s = null), a.value = !1;
|
|
2986
2941
|
}, m = () => {
|
|
2942
|
+
s && (clearTimeout(s), s = null), a.value = !1;
|
|
2943
|
+
}, C = () => {
|
|
2987
2944
|
if (!i.value || !r.value) return {};
|
|
2988
|
-
const
|
|
2945
|
+
const x = i.value.getBoundingClientRect(), B = r.value.getBoundingClientRect(), S = {
|
|
2989
2946
|
position: "fixed"
|
|
2990
2947
|
};
|
|
2991
2948
|
switch (n.placement) {
|
|
2992
2949
|
case "top":
|
|
2993
|
-
|
|
2950
|
+
S.left = `${x.left + x.width / 2 - B.width / 2}px`, S.top = `${x.top - B.height - t}px`;
|
|
2994
2951
|
break;
|
|
2995
2952
|
case "bottom":
|
|
2996
|
-
|
|
2953
|
+
S.left = `${x.left + x.width / 2 - B.width / 2}px`, S.top = `${x.bottom + t}px`;
|
|
2997
2954
|
break;
|
|
2998
2955
|
case "left":
|
|
2999
|
-
|
|
2956
|
+
S.left = `${x.left - B.width - t}px`, S.top = `${x.top + x.height / 2 - B.height / 2}px`;
|
|
3000
2957
|
break;
|
|
3001
2958
|
case "right":
|
|
3002
|
-
|
|
2959
|
+
S.left = `${x.right + t}px`, S.top = `${x.top + x.height / 2 - B.height / 2}px`;
|
|
3003
2960
|
break;
|
|
3004
2961
|
}
|
|
3005
|
-
return
|
|
3006
|
-
},
|
|
3007
|
-
l.value =
|
|
2962
|
+
return S;
|
|
2963
|
+
}, h = () => {
|
|
2964
|
+
l.value = C();
|
|
3008
2965
|
};
|
|
3009
|
-
return Q(a, async (
|
|
3010
|
-
if (!
|
|
2966
|
+
return Q(a, async (x) => {
|
|
2967
|
+
if (!x) {
|
|
3011
2968
|
c?.(), c = null, u?.disconnect(), u = null;
|
|
3012
2969
|
return;
|
|
3013
2970
|
}
|
|
3014
|
-
await $e(),
|
|
2971
|
+
await $e(), h(), c = gn(h), u = new ResizeObserver(h), r.value && u.observe(r.value), i.value && u.observe(i.value);
|
|
3015
2972
|
}), Se(() => {
|
|
3016
2973
|
c?.(), u?.disconnect();
|
|
3017
|
-
}), (
|
|
3018
|
-
|
|
2974
|
+
}), (x, B) => (f(), b(de, null, [
|
|
2975
|
+
M("span", {
|
|
3019
2976
|
ref_key: "triggerRef",
|
|
3020
2977
|
ref: i,
|
|
3021
2978
|
class: "tooltip-trigger",
|
|
3022
2979
|
"aria-describedby": a.value ? o : void 0,
|
|
3023
2980
|
"aria-disabled": e.disabled || void 0,
|
|
3024
2981
|
"aria-expanded": a.value || void 0,
|
|
3025
|
-
onMouseenter:
|
|
3026
|
-
onMouseleave:
|
|
3027
|
-
onFocus:
|
|
3028
|
-
onBlur:
|
|
3029
|
-
onKeydown: ye(
|
|
2982
|
+
onMouseenter: d,
|
|
2983
|
+
onMouseleave: m,
|
|
2984
|
+
onFocus: d,
|
|
2985
|
+
onBlur: m,
|
|
2986
|
+
onKeydown: ye(m, ["esc"])
|
|
3030
2987
|
}, [
|
|
3031
|
-
G(
|
|
2988
|
+
G(x.$slots, "default", {}, void 0, !0)
|
|
3032
2989
|
], 40, yn),
|
|
3033
|
-
(
|
|
2990
|
+
(f(), ae(Fe, { to: "body" }, [
|
|
3034
2991
|
U(Ae, { name: "tooltip-fade" }, {
|
|
3035
2992
|
default: J(() => [
|
|
3036
|
-
a.value ? (
|
|
2993
|
+
a.value ? (f(), b("div", {
|
|
3037
2994
|
key: 0,
|
|
3038
2995
|
ref_key: "tooltipRef",
|
|
3039
2996
|
ref: r,
|
|
@@ -3045,8 +3002,8 @@ const gn = (e) => {
|
|
|
3045
3002
|
"data-placement": n.placement,
|
|
3046
3003
|
style: Ie(l.value)
|
|
3047
3004
|
}, [
|
|
3048
|
-
|
|
3049
|
-
G(
|
|
3005
|
+
B[0] || (B[0] = M("div", { class: "tooltip-arrow" }, null, -1)),
|
|
3006
|
+
G(x.$slots, "content", {}, () => [
|
|
3050
3007
|
Me(K(e.content), 1)
|
|
3051
3008
|
], !0)
|
|
3052
3009
|
], 12, bn)) : O("", !0)
|
|
@@ -3076,17 +3033,17 @@ const Ln = {
|
|
|
3076
3033
|
},
|
|
3077
3034
|
emits: ["click", "remove"],
|
|
3078
3035
|
setup(e, { emit: n }) {
|
|
3079
|
-
const t = e, a = n, o =
|
|
3036
|
+
const t = e, a = n, o = A(() => t.clickable || t.as === "button" || t.as === "a"), i = A(() => [
|
|
3080
3037
|
`ui-tag--${t.variant}`,
|
|
3081
3038
|
`ui-tag--${t.size}`,
|
|
3082
3039
|
{
|
|
3083
3040
|
"is-clickable": t.clickable,
|
|
3084
3041
|
"is-removable": t.removable
|
|
3085
3042
|
}
|
|
3086
|
-
]), r =
|
|
3043
|
+
]), r = A(() => t.clickable && t.as !== "button" && t.as !== "a"), l = (c) => {
|
|
3087
3044
|
t.disabled || !o.value || a("click", c);
|
|
3088
3045
|
}, s = () => a("remove");
|
|
3089
|
-
return (c, u) => (
|
|
3046
|
+
return (c, u) => (f(), ae(Ne(e.as), {
|
|
3090
3047
|
ref: "rootRef",
|
|
3091
3048
|
class: fe(["ui-tag", i.value]),
|
|
3092
3049
|
"aria-disabled": e.disabled || void 0,
|
|
@@ -3094,18 +3051,18 @@ const Ln = {
|
|
|
3094
3051
|
role: r.value ? "button" : void 0,
|
|
3095
3052
|
onClick: l,
|
|
3096
3053
|
onKeydown: [
|
|
3097
|
-
u[0] || (u[0] = ye(se((
|
|
3098
|
-
u[1] || (u[1] = ye(se((
|
|
3054
|
+
u[0] || (u[0] = ye(se((d) => !e.disabled && o.value && l(d), ["prevent"]), ["enter"])),
|
|
3055
|
+
u[1] || (u[1] = ye(se((d) => !e.disabled && o.value && l(d), ["prevent"]), ["space"]))
|
|
3099
3056
|
]
|
|
3100
3057
|
}, {
|
|
3101
3058
|
default: J(() => [
|
|
3102
|
-
c.$slots.icon ? (
|
|
3059
|
+
c.$slots.icon ? (f(), b("span", Ln, [
|
|
3103
3060
|
G(c.$slots, "icon", {}, void 0, !0)
|
|
3104
3061
|
])) : O("", !0),
|
|
3105
|
-
|
|
3062
|
+
M("span", xn, [
|
|
3106
3063
|
G(c.$slots, "default", {}, void 0, !0)
|
|
3107
3064
|
]),
|
|
3108
|
-
e.removable ? (
|
|
3065
|
+
e.removable ? (f(), b("button", {
|
|
3109
3066
|
key: 1,
|
|
3110
3067
|
class: "ui-tag__remove",
|
|
3111
3068
|
type: "button",
|
|
@@ -3138,7 +3095,7 @@ const Ln = {
|
|
|
3138
3095
|
}
|
|
3139
3096
|
a("click", i);
|
|
3140
3097
|
};
|
|
3141
|
-
return (i, r) => (
|
|
3098
|
+
return (i, r) => (f(), b("a", {
|
|
3142
3099
|
class: "link",
|
|
3143
3100
|
href: e.disabled ? void 0 : e.href,
|
|
3144
3101
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
@@ -3155,43 +3112,43 @@ const Ln = {
|
|
|
3155
3112
|
__name: "Dropdown",
|
|
3156
3113
|
setup(e) {
|
|
3157
3114
|
let n = 0;
|
|
3158
|
-
const t =
|
|
3115
|
+
const t = w(!1), a = w(null), o = w({}), i = `dropdown-${ge()}`, r = `${i}-menu`, l = `${i}-trigger`, s = () => t.value = !0, c = () => {
|
|
3159
3116
|
t.value = !1, o.value = {}, n = 0, a.value?.focus({ preventScroll: !0 });
|
|
3160
|
-
}, u = () => t.value = !t.value,
|
|
3117
|
+
}, u = () => t.value = !t.value, d = (L) => {
|
|
3161
3118
|
const _ = `dropdown-item-${n++}`;
|
|
3162
|
-
return o.value[_] =
|
|
3163
|
-
},
|
|
3164
|
-
const _ = o.value[
|
|
3119
|
+
return o.value[_] = L, _;
|
|
3120
|
+
}, m = (L) => {
|
|
3121
|
+
const _ = o.value[L];
|
|
3165
3122
|
_ && _.focus({ preventScroll: !0 });
|
|
3166
|
-
},
|
|
3167
|
-
const
|
|
3168
|
-
|
|
3169
|
-
},
|
|
3170
|
-
const
|
|
3171
|
-
_ &&
|
|
3172
|
-
},
|
|
3173
|
-
const _ = Object.keys(o.value), z =
|
|
3174
|
-
z >= 0 && z < _.length - 1 && P &&
|
|
3175
|
-
},
|
|
3176
|
-
const _ = Object.keys(o.value), z =
|
|
3177
|
-
z > 0 && P &&
|
|
3178
|
-
},
|
|
3123
|
+
}, C = () => {
|
|
3124
|
+
const L = Object.keys(o.value)[0];
|
|
3125
|
+
L && m(L);
|
|
3126
|
+
}, h = () => {
|
|
3127
|
+
const L = Object.keys(o.value), _ = L[L.length - 1];
|
|
3128
|
+
_ && m(_);
|
|
3129
|
+
}, x = (L) => {
|
|
3130
|
+
const _ = Object.keys(o.value), z = S(L), P = _[z + 1];
|
|
3131
|
+
z >= 0 && z < _.length - 1 && P && m(P);
|
|
3132
|
+
}, B = (L) => {
|
|
3133
|
+
const _ = Object.keys(o.value), z = S(L), P = _[z - 1];
|
|
3134
|
+
z > 0 && P && m(P);
|
|
3135
|
+
}, S = (L) => Object.keys(o.value).indexOf(L);
|
|
3179
3136
|
return He("DropdownContext", {
|
|
3180
3137
|
open: s,
|
|
3181
3138
|
close: c,
|
|
3182
3139
|
toggle: u,
|
|
3183
3140
|
isOpen: t,
|
|
3184
|
-
registerItem:
|
|
3185
|
-
focusItem:
|
|
3186
|
-
focusNextItem:
|
|
3187
|
-
focusPrevItem:
|
|
3188
|
-
focusFirstItem:
|
|
3189
|
-
focusLastItem:
|
|
3141
|
+
registerItem: d,
|
|
3142
|
+
focusItem: m,
|
|
3143
|
+
focusNextItem: x,
|
|
3144
|
+
focusPrevItem: B,
|
|
3145
|
+
focusFirstItem: C,
|
|
3146
|
+
focusLastItem: h,
|
|
3190
3147
|
triggerRef: a,
|
|
3191
3148
|
menuId: r,
|
|
3192
3149
|
triggerId: l
|
|
3193
|
-
}), (
|
|
3194
|
-
G(
|
|
3150
|
+
}), (L, _) => (f(), b("div", _n, [
|
|
3151
|
+
G(L.$slots, "default", {}, void 0, !0)
|
|
3195
3152
|
]));
|
|
3196
3153
|
}
|
|
3197
3154
|
}), En = /* @__PURE__ */ W(An, [["__scopeId", "data-v-3a863710"]]), Rn = /* @__PURE__ */ Z({
|
|
@@ -3201,12 +3158,12 @@ const Ln = {
|
|
|
3201
3158
|
classes: {}
|
|
3202
3159
|
},
|
|
3203
3160
|
setup(e) {
|
|
3204
|
-
const n = e, t =
|
|
3161
|
+
const n = e, t = me("DropdownContext");
|
|
3205
3162
|
if (!t) throw new Error("DropdownTrigger must be used within a Dropdown");
|
|
3206
|
-
const a =
|
|
3163
|
+
const a = w(), o = (i) => {
|
|
3207
3164
|
i.key === "ArrowDown" && (i.preventDefault(), t.open(), $e(() => t.focusFirstItem())), i.key === "ArrowUp" && (i.preventDefault(), t.open(), $e(() => t.focusLastItem()));
|
|
3208
3165
|
};
|
|
3209
|
-
return ve(() => t.triggerRef.value = a.value?.el), (i, r) => (
|
|
3166
|
+
return ve(() => t.triggerRef.value = a.value?.el), (i, r) => (f(), ae(Le, {
|
|
3210
3167
|
ref_key: "btn",
|
|
3211
3168
|
ref: a,
|
|
3212
3169
|
id: N(t).triggerId,
|
|
@@ -3219,7 +3176,7 @@ const Ln = {
|
|
|
3219
3176
|
}, {
|
|
3220
3177
|
default: J(() => [
|
|
3221
3178
|
G(i.$slots, "default", {}, void 0, !0),
|
|
3222
|
-
n.variant === "button" ? (
|
|
3179
|
+
n.variant === "button" ? (f(), ae(Ce, {
|
|
3223
3180
|
key: 0,
|
|
3224
3181
|
name: "directionDown"
|
|
3225
3182
|
})) : O("", !0)
|
|
@@ -3230,28 +3187,28 @@ const Ln = {
|
|
|
3230
3187
|
}), Sn = /* @__PURE__ */ W(Rn, [["__scopeId", "data-v-75ab95f2"]]), Tn = ["id", "aria-labelledby"], Dn = /* @__PURE__ */ Z({
|
|
3231
3188
|
__name: "DropdownMenu",
|
|
3232
3189
|
setup(e) {
|
|
3233
|
-
const n =
|
|
3190
|
+
const n = me("DropdownContext");
|
|
3234
3191
|
if (!n) throw new Error("DropdownMenu must be used within a Dropdown");
|
|
3235
|
-
const t =
|
|
3192
|
+
const t = w(), a = w({});
|
|
3236
3193
|
let o = !1, i;
|
|
3237
|
-
const r = (
|
|
3238
|
-
const
|
|
3239
|
-
t.value?.contains(
|
|
3240
|
-
}, l = (
|
|
3241
|
-
const
|
|
3242
|
-
if (!
|
|
3243
|
-
const
|
|
3244
|
-
let
|
|
3245
|
-
window.innerHeight -
|
|
3194
|
+
const r = (d) => {
|
|
3195
|
+
const m = d.target;
|
|
3196
|
+
t.value?.contains(m) || n.triggerRef.value?.contains(m) || n.close();
|
|
3197
|
+
}, l = (d) => d.key === "Escape" && n.close(), s = () => {
|
|
3198
|
+
const d = n.triggerRef.value, m = t.value;
|
|
3199
|
+
if (!d || !m) return;
|
|
3200
|
+
const C = d.getBoundingClientRect(), h = m.getBoundingClientRect();
|
|
3201
|
+
let x, B;
|
|
3202
|
+
window.innerHeight - C.bottom >= h.height ? x = C.bottom : x = C.top - h.height, window.innerWidth - C.left <= h.width ? B = C.right - h.width : B = C.left, a.value = {
|
|
3246
3203
|
"--dropdown-menu-position": "fixed",
|
|
3247
|
-
"--dropdown-menu-top": `${
|
|
3248
|
-
"--dropdown-menu-left": `${
|
|
3204
|
+
"--dropdown-menu-top": `${x}px`,
|
|
3205
|
+
"--dropdown-menu-left": `${B}px`
|
|
3249
3206
|
};
|
|
3250
|
-
}, c = () => new Promise((
|
|
3207
|
+
}, c = () => new Promise((d) => requestAnimationFrame(() => d()));
|
|
3251
3208
|
Q(
|
|
3252
3209
|
() => n.isOpen.value,
|
|
3253
|
-
async (
|
|
3254
|
-
|
|
3210
|
+
async (d) => {
|
|
3211
|
+
d ? (await c(), await c(), s(), n.focusFirstItem(), document.addEventListener("pointerdown", r, !0)) : document.removeEventListener("pointerdown", r, !0);
|
|
3255
3212
|
}
|
|
3256
3213
|
);
|
|
3257
3214
|
const u = () => {
|
|
@@ -3265,8 +3222,8 @@ const Ln = {
|
|
|
3265
3222
|
}), t.value && i.observe(t.value), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u);
|
|
3266
3223
|
}), Be(() => {
|
|
3267
3224
|
i?.disconnect(), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
|
|
3268
|
-
}), (
|
|
3269
|
-
N(n).isOpen.value ? (
|
|
3225
|
+
}), (d, m) => (f(), ae(Fe, { to: "body" }, [
|
|
3226
|
+
N(n).isOpen.value ? (f(), b("div", {
|
|
3270
3227
|
key: 0,
|
|
3271
3228
|
role: "menu",
|
|
3272
3229
|
ref_key: "menuRef",
|
|
@@ -3278,7 +3235,7 @@ const Ln = {
|
|
|
3278
3235
|
class: "ui-dropdown-menu",
|
|
3279
3236
|
onKeydown: l
|
|
3280
3237
|
}, [
|
|
3281
|
-
G(
|
|
3238
|
+
G(d.$slots, "default", {}, void 0, !0)
|
|
3282
3239
|
], 44, Tn)) : O("", !0)
|
|
3283
3240
|
]));
|
|
3284
3241
|
}
|
|
@@ -3289,7 +3246,7 @@ const Ln = {
|
|
|
3289
3246
|
},
|
|
3290
3247
|
emits: ["click"],
|
|
3291
3248
|
setup(e) {
|
|
3292
|
-
return (n, t) => (
|
|
3249
|
+
return (n, t) => (f(), b("div", zn, [
|
|
3293
3250
|
U(Le, be({
|
|
3294
3251
|
class: ["btn-menu-primary", e.variant]
|
|
3295
3252
|
}, n.$attrs, {
|
|
@@ -3361,16 +3318,16 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3361
3318
|
for (; n > 0 && n < a.length && a[n - 1]?.type === "literal"; )
|
|
3362
3319
|
n += t;
|
|
3363
3320
|
return n;
|
|
3364
|
-
}, dt = (e, n, t, a) =>
|
|
3321
|
+
}, dt = (e, n, t, a) => A(() => {
|
|
3365
3322
|
const o = [];
|
|
3366
3323
|
return e.invalid && e.errorMessage && o.push(t), n.hint && o.push(a), o.length > 0 ? o.join(" ") : void 0;
|
|
3367
|
-
}), Xe = (e) =>
|
|
3324
|
+
}), Xe = (e) => A(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), Un = (e) => A(() => e.disabled === !0 ? "true" : void 0), Kn = ["id"], vt = /* @__PURE__ */ Z({
|
|
3368
3325
|
__name: "Hint",
|
|
3369
3326
|
props: {
|
|
3370
3327
|
hintId: {}
|
|
3371
3328
|
},
|
|
3372
3329
|
setup(e) {
|
|
3373
|
-
return (n, t) => n.$slots.default ? (
|
|
3330
|
+
return (n, t) => n.$slots.default ? (f(), b("p", {
|
|
3374
3331
|
key: 0,
|
|
3375
3332
|
id: e.hintId,
|
|
3376
3333
|
class: "visually-hidden"
|
|
@@ -3385,13 +3342,13 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3385
3342
|
isRequired: {}
|
|
3386
3343
|
},
|
|
3387
3344
|
setup(e) {
|
|
3388
|
-
return (n, t) => e.isRequired ? (
|
|
3345
|
+
return (n, t) => e.isRequired ? (f(), b("p", {
|
|
3389
3346
|
key: 0,
|
|
3390
3347
|
id: `${e.baseId}-required-hint`,
|
|
3391
3348
|
class: "visually-hidden"
|
|
3392
3349
|
}, " Required field ", 8, jn)) : O("", !0);
|
|
3393
3350
|
}
|
|
3394
|
-
}), Wn = ["id"],
|
|
3351
|
+
}), Wn = ["id"], pt = /* @__PURE__ */ Z({
|
|
3395
3352
|
__name: "ErrorMessage",
|
|
3396
3353
|
props: {
|
|
3397
3354
|
errorId: {},
|
|
@@ -3399,7 +3356,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3399
3356
|
errorMessage: {}
|
|
3400
3357
|
},
|
|
3401
3358
|
setup(e) {
|
|
3402
|
-
return (n, t) => e.invalid && e.errorMessage ? (
|
|
3359
|
+
return (n, t) => e.invalid && e.errorMessage ? (f(), b("p", {
|
|
3403
3360
|
key: 0,
|
|
3404
3361
|
id: e.errorId,
|
|
3405
3362
|
class: "error-text",
|
|
@@ -3425,99 +3382,99 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3425
3382
|
}),
|
|
3426
3383
|
emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:modelValue"]),
|
|
3427
3384
|
setup(e, { emit: n }) {
|
|
3428
|
-
const t = ke(e, "modelValue"), a = e, o = n, i = st(), r =
|
|
3429
|
-
const { type:
|
|
3385
|
+
const t = ke(e, "modelValue"), a = e, o = n, i = st(), r = w(null), l = ge(), s = `${l}-error`, c = `${l}-hint`, u = Xe(i).value, d = w(!1), m = w(""), C = w(!1), h = A(() => t.value !== null && t.value !== void 0 && t.value !== ""), x = A(() => u ? `${c} ${l}-required-hint` : c), B = A(() => a.invalid === !0 && a.errorMessage ? s : void 0), S = A(() => a.type === "password" ? C.value ? "text" : "password" : a.type), L = A(() => {
|
|
3386
|
+
const { type: E, ...q } = i;
|
|
3430
3387
|
return q;
|
|
3431
|
-
}), _ =
|
|
3388
|
+
}), _ = A(() => a.currency ? t.value === null || t.value === void 0 || t.value === "" ? "" : ue(m.value) : a.mask ? wt(String(t.value ?? ""), a.mask) : String(t.value ?? "")), z = A(() => a.mask ? je(a.mask).filter((E) => E.type !== "literal").length : 0), P = A(() => a.currency ? new Intl.NumberFormat(a.locale ?? "en-US", {
|
|
3432
3389
|
style: "currency",
|
|
3433
3390
|
currency: a.currency
|
|
3434
|
-
}) : null), oe =
|
|
3391
|
+
}) : null), oe = A(() => ({
|
|
3435
3392
|
input: !0,
|
|
3436
3393
|
"input-currency": !!a.currency
|
|
3437
|
-
})), ue = (
|
|
3438
|
-
if (!P.value) return
|
|
3439
|
-
const q = Number(
|
|
3394
|
+
})), ue = (E) => {
|
|
3395
|
+
if (!P.value) return E;
|
|
3396
|
+
const q = Number(E || "0") / 100;
|
|
3440
3397
|
return P.value.format(q);
|
|
3441
|
-
}, re = () =>
|
|
3398
|
+
}, re = () => C.value = !C.value, F = (E) => {
|
|
3442
3399
|
if (!a.mask && !a.currency) return;
|
|
3443
3400
|
if (a.currency) {
|
|
3444
|
-
const
|
|
3401
|
+
const k = E.target, T = D(k.value);
|
|
3445
3402
|
r.value = {
|
|
3446
3403
|
rawCaret: T.length,
|
|
3447
|
-
inputType:
|
|
3404
|
+
inputType: E.inputType
|
|
3448
3405
|
};
|
|
3449
3406
|
return;
|
|
3450
3407
|
}
|
|
3451
|
-
const q =
|
|
3408
|
+
const q = E.target, H = q.selectionStart ?? 0;
|
|
3452
3409
|
r.value = {
|
|
3453
|
-
rawCaret: qn(q.value,
|
|
3454
|
-
inputType:
|
|
3410
|
+
rawCaret: qn(q.value, H),
|
|
3411
|
+
inputType: E.inputType
|
|
3455
3412
|
};
|
|
3456
|
-
},
|
|
3457
|
-
const q =
|
|
3413
|
+
}, R = (E) => {
|
|
3414
|
+
const q = E.target;
|
|
3458
3415
|
if (a.currency) {
|
|
3459
3416
|
let T = D(q.value);
|
|
3460
|
-
r.value?.inputType === "deleteContentBackward" && (T =
|
|
3461
|
-
const Y = ue(
|
|
3462
|
-
q.value = Y, t.value = Number(
|
|
3417
|
+
r.value?.inputType === "deleteContentBackward" && (T = m.value.slice(0, -1)), m.value = T;
|
|
3418
|
+
const Y = ue(m.value);
|
|
3419
|
+
q.value = Y, t.value = Number(m.value || "0") / 100, r.value = null;
|
|
3463
3420
|
return;
|
|
3464
3421
|
}
|
|
3465
|
-
let
|
|
3466
|
-
a.mask && (
|
|
3467
|
-
const
|
|
3468
|
-
if (q.value =
|
|
3422
|
+
let H = a.mask ? On(q.value, a.mask) : q.value;
|
|
3423
|
+
a.mask && (H = H.slice(0, z.value));
|
|
3424
|
+
const k = a.mask ? wt(H, a.mask) : H;
|
|
3425
|
+
if (q.value = k, t.value = a.type === "number" ? Number(H) : H, a.mask && r.value) {
|
|
3469
3426
|
let { rawCaret: T, inputType: Y } = r.value;
|
|
3470
3427
|
Y.startsWith("insert") && T++, Y === "deleteContentBackward" && (T = Math.max(0, T - 1));
|
|
3471
|
-
let
|
|
3472
|
-
|
|
3428
|
+
let p = Fn(k, T);
|
|
3429
|
+
p = Pn(a.mask, p, 1), q.setSelectionRange(p, p);
|
|
3473
3430
|
}
|
|
3474
3431
|
r.value = null;
|
|
3475
|
-
},
|
|
3476
|
-
if (!a.mask || a.currency ||
|
|
3477
|
-
const q =
|
|
3478
|
-
let
|
|
3479
|
-
const
|
|
3480
|
-
for (;
|
|
3481
|
-
requestAnimationFrame(() => q.setSelectionRange(
|
|
3482
|
-
},
|
|
3483
|
-
|
|
3484
|
-
}, g = (
|
|
3485
|
-
|
|
3486
|
-
}, D = (
|
|
3432
|
+
}, $ = (E) => {
|
|
3433
|
+
if (!a.mask || a.currency || E.key !== "Backspace") return;
|
|
3434
|
+
const q = E.target;
|
|
3435
|
+
let H = q.selectionStart ?? 0;
|
|
3436
|
+
const k = je(a.mask);
|
|
3437
|
+
for (; H > 0 && k[H - 1]?.type === "literal"; ) H--;
|
|
3438
|
+
requestAnimationFrame(() => q.setSelectionRange(H, H));
|
|
3439
|
+
}, V = (E) => {
|
|
3440
|
+
d.value = !0, o("focus", E);
|
|
3441
|
+
}, g = (E) => {
|
|
3442
|
+
d.value = !1, o("blur", E);
|
|
3443
|
+
}, D = (E) => E.replace(/\D/g, "");
|
|
3487
3444
|
return Q(
|
|
3488
3445
|
() => t.value,
|
|
3489
|
-
(
|
|
3446
|
+
(E) => {
|
|
3490
3447
|
if (!a.currency) return;
|
|
3491
|
-
const q = Math.round(Number(
|
|
3492
|
-
|
|
3448
|
+
const q = Math.round(Number(E || 0) * 100);
|
|
3449
|
+
m.value = String(q);
|
|
3493
3450
|
},
|
|
3494
3451
|
{ immediate: !0 }
|
|
3495
|
-
), (
|
|
3496
|
-
class: fe(["input-box", { required: N(u), error: e.invalid, filled:
|
|
3452
|
+
), (E, q) => (f(), b("div", {
|
|
3453
|
+
class: fe(["input-box", { required: N(u), error: e.invalid, filled: h.value, focused: d.value }])
|
|
3497
3454
|
}, [
|
|
3498
|
-
|
|
3455
|
+
M("label", {
|
|
3499
3456
|
for: e.id,
|
|
3500
3457
|
class: "label"
|
|
3501
3458
|
}, K(e.label), 9, Yn),
|
|
3502
|
-
|
|
3459
|
+
M("input", be({
|
|
3503
3460
|
id: e.id,
|
|
3504
|
-
type:
|
|
3505
|
-
},
|
|
3461
|
+
type: S.value
|
|
3462
|
+
}, L.value, {
|
|
3506
3463
|
class: oe.value,
|
|
3507
3464
|
onBeforeinput: F,
|
|
3508
|
-
onInput:
|
|
3509
|
-
onFocus:
|
|
3465
|
+
onInput: R,
|
|
3466
|
+
onFocus: V,
|
|
3510
3467
|
onBlur: g,
|
|
3511
|
-
onKeydown:
|
|
3468
|
+
onKeydown: $,
|
|
3512
3469
|
value: _.value,
|
|
3513
3470
|
required: N(u),
|
|
3514
3471
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3515
|
-
"aria-errormessage":
|
|
3516
|
-
"aria-describedby": N(dt)(
|
|
3472
|
+
"aria-errormessage": B.value,
|
|
3473
|
+
"aria-describedby": N(dt)(E.$props, E.$slots, s, x.value).value
|
|
3517
3474
|
}), null, 16, Xn),
|
|
3518
3475
|
U(vt, { hintId: c }, {
|
|
3519
3476
|
default: J(() => [
|
|
3520
|
-
G(
|
|
3477
|
+
G(E.$slots, "hint", {}, void 0, !0)
|
|
3521
3478
|
]),
|
|
3522
3479
|
_: 3
|
|
3523
3480
|
}),
|
|
@@ -3525,20 +3482,20 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3525
3482
|
baseId: N(l),
|
|
3526
3483
|
isRequired: N(u)
|
|
3527
3484
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3528
|
-
U(
|
|
3485
|
+
U(pt, {
|
|
3529
3486
|
errorId: s,
|
|
3530
3487
|
invalid: e.invalid,
|
|
3531
3488
|
errorMessage: e.errorMessage
|
|
3532
3489
|
}, null, 8, ["invalid", "errorMessage"]),
|
|
3533
|
-
e.type === "password" ? (
|
|
3490
|
+
e.type === "password" ? (f(), ae(Le, be({ key: 0 }, Object.keys(E.$attrs).includes("disabled") ? { disabled: !0 } : void 0, {
|
|
3534
3491
|
type: "button",
|
|
3535
3492
|
class: "btn-icon",
|
|
3536
3493
|
onClick: re,
|
|
3537
|
-
"aria-label":
|
|
3494
|
+
"aria-label": C.value ? "Hide password" : "Show password"
|
|
3538
3495
|
}), {
|
|
3539
3496
|
default: J(() => [
|
|
3540
3497
|
U(Ce, {
|
|
3541
|
-
name:
|
|
3498
|
+
name: C.value ? "eyeOff" : "eye"
|
|
3542
3499
|
}, null, 8, ["name"])
|
|
3543
3500
|
]),
|
|
3544
3501
|
_: 1
|
|
@@ -3562,25 +3519,25 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3562
3519
|
shape: { default: "circle" }
|
|
3563
3520
|
},
|
|
3564
3521
|
setup(e) {
|
|
3565
|
-
const n = e, t =
|
|
3522
|
+
const n = e, t = w("loading"), a = A(() => n.src && t.value !== "error"), o = A(() => n.name ? n.name.split(" ").map((s) => s[0]).slice(0, 2).join("").toUpperCase() : ""), i = A(() => n.alt ? n.alt : n.name ? n.name : "Avatar"), r = () => t.value = "loaded", l = () => t.value = "error";
|
|
3566
3523
|
return Q(
|
|
3567
3524
|
() => n.src,
|
|
3568
3525
|
() => n.src && (t.value = "loading")
|
|
3569
|
-
), ve(() => !n.src && (t.value = "error")), (s, c) => (
|
|
3526
|
+
), ve(() => !n.src && (t.value = "error")), (s, c) => (f(), b("div", {
|
|
3570
3527
|
class: "ui-avatar",
|
|
3571
3528
|
"data-size": e.size,
|
|
3572
3529
|
"data-shape": e.shape,
|
|
3573
3530
|
"aria-label": a.value ? void 0 : i.value,
|
|
3574
3531
|
"aria-busy": t.value === "loading" || void 0
|
|
3575
3532
|
}, [
|
|
3576
|
-
a.value ? (
|
|
3533
|
+
a.value ? (f(), ae(ze, {
|
|
3577
3534
|
key: 0,
|
|
3578
3535
|
src: e.src,
|
|
3579
3536
|
alt: e.alt ?? "",
|
|
3580
3537
|
class: "ui-avatar__img",
|
|
3581
3538
|
onLoad: r,
|
|
3582
3539
|
onError: l
|
|
3583
|
-
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (
|
|
3540
|
+
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (f(), b("div", Qn)) : (f(), b("div", eo, [
|
|
3584
3541
|
G(s.$slots, "default", {}, () => [
|
|
3585
3542
|
Me(K(o.value), 1)
|
|
3586
3543
|
], !0)
|
|
@@ -3601,11 +3558,11 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3601
3558
|
}),
|
|
3602
3559
|
emits: /* @__PURE__ */ ie(["focus", "blur", "change", "click"], ["update:modelValue"]),
|
|
3603
3560
|
setup(e, { emit: n }) {
|
|
3604
|
-
const t = ke(e, "modelValue"), a = e, o = n, i =
|
|
3605
|
-
Q(i, (
|
|
3606
|
-
|
|
3561
|
+
const t = ke(e, "modelValue"), a = e, o = n, i = w(!1);
|
|
3562
|
+
Q(i, (H) => {
|
|
3563
|
+
H ? document.addEventListener("mousedown", E) : document.removeEventListener("mousedown", E);
|
|
3607
3564
|
});
|
|
3608
|
-
const r = st(), l =
|
|
3565
|
+
const r = st(), l = w(!1), s = w(null), c = A(() => a.id ?? ge()), u = `${c.value}-label`, d = `${c.value}-listbox`, m = `${c.value}-error`, C = `${c.value}-hint`, h = `${c.value}-value`, x = w(null), B = w(null), S = A(() => t.value !== null && t.value !== void 0 && t.value !== ""), L = A(() => x.value !== null ? `${d}-option-${x.value}` : void 0), _ = Xe(r).value, z = A(() => _ ? `${C} ${c.value}-required-hint` : C), P = A(() => i.value && L.value ? L.value : void 0), oe = A(() => B.value !== null ? a.options[B.value]?.value : "");
|
|
3609
3566
|
Q(
|
|
3610
3567
|
() => t.value,
|
|
3611
3568
|
() => q()
|
|
@@ -3614,58 +3571,58 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3614
3571
|
() => q(),
|
|
3615
3572
|
{ deep: !0 }
|
|
3616
3573
|
);
|
|
3617
|
-
const ue = (
|
|
3618
|
-
l.value = !0, o("focus",
|
|
3619
|
-
}, re = (
|
|
3620
|
-
const
|
|
3621
|
-
!T || T?.contains(
|
|
3622
|
-
}, F = (
|
|
3623
|
-
i.value = !i.value, i.value && t.value.toString().length > 0 && (
|
|
3624
|
-
},
|
|
3574
|
+
const ue = (H) => {
|
|
3575
|
+
l.value = !0, o("focus", H);
|
|
3576
|
+
}, re = (H) => {
|
|
3577
|
+
const k = H.relatedTarget, T = s.value;
|
|
3578
|
+
!T || T?.contains(k) || (l.value = !1, i.value = !1, o("blur", H));
|
|
3579
|
+
}, F = (H) => {
|
|
3580
|
+
i.value = !i.value, i.value && t.value.toString().length > 0 && (x.value = x.value ?? a.options.findIndex((k) => !k.disabled)), !(!a.options || a.options.length === 0) && o("click", H);
|
|
3581
|
+
}, R = (H, k) => {
|
|
3625
3582
|
const T = s.value;
|
|
3626
|
-
!T ||
|
|
3627
|
-
},
|
|
3628
|
-
if (!i.value && ["ArrowDown", "ArrowUp"].includes(
|
|
3629
|
-
i.value = !0,
|
|
3583
|
+
!T || H.disabled || (B.value = k, x.value = k, H && H.key && H.key.toString().length > 0 ? T.classList.add("filled") : T.classList.remove("filled"), t.value = H.key, o("change", H.key));
|
|
3584
|
+
}, $ = (H) => {
|
|
3585
|
+
if (!i.value && ["ArrowDown", "ArrowUp"].includes(H.key)) {
|
|
3586
|
+
i.value = !0, x.value = x.value ?? a.options.findIndex((k) => !k.disabled), H.preventDefault();
|
|
3630
3587
|
return;
|
|
3631
3588
|
}
|
|
3632
3589
|
if (i.value) {
|
|
3633
|
-
if (
|
|
3634
|
-
const
|
|
3635
|
-
|
|
3590
|
+
if (H.key === "ArrowDown" && (V(1), H.preventDefault()), H.key === "ArrowUp" && (V(-1), H.preventDefault()), H.key === "Home") {
|
|
3591
|
+
const k = g();
|
|
3592
|
+
k >= 0 && (x.value = k), H.preventDefault();
|
|
3636
3593
|
}
|
|
3637
|
-
if (
|
|
3638
|
-
const
|
|
3639
|
-
|
|
3594
|
+
if (H.key === "End") {
|
|
3595
|
+
const k = D();
|
|
3596
|
+
k >= 0 && (x.value = k), H.preventDefault();
|
|
3640
3597
|
}
|
|
3641
|
-
if (
|
|
3642
|
-
if (
|
|
3643
|
-
const
|
|
3644
|
-
if (!
|
|
3645
|
-
|
|
3598
|
+
if (H.key === "Enter" || H.key === " ") {
|
|
3599
|
+
if (x.value === null) return;
|
|
3600
|
+
const k = a.options[x.value];
|
|
3601
|
+
if (!k || k.disabled) return;
|
|
3602
|
+
R(k, x.value), i.value = !1, H.preventDefault();
|
|
3646
3603
|
}
|
|
3647
|
-
|
|
3604
|
+
H.key === "Escape" && (i.value = !1);
|
|
3648
3605
|
}
|
|
3649
|
-
},
|
|
3650
|
-
if (
|
|
3651
|
-
let
|
|
3606
|
+
}, V = (H) => {
|
|
3607
|
+
if (x.value === null) return;
|
|
3608
|
+
let k = x.value;
|
|
3652
3609
|
do
|
|
3653
|
-
|
|
3654
|
-
while (
|
|
3655
|
-
|
|
3656
|
-
}, g = () => a.options.findIndex((
|
|
3657
|
-
const
|
|
3658
|
-
!
|
|
3610
|
+
k += H;
|
|
3611
|
+
while (k >= 0 && k < a.options.length && a.options[k]?.disabled);
|
|
3612
|
+
k >= 0 && k < a.options.length && (x.value = k);
|
|
3613
|
+
}, g = () => a.options.findIndex((H) => !H.disabled), D = () => [...a.options].reverse().findIndex((H) => !H.disabled) >= 0 ? a.options.length - 1 - [...a.options].reverse().findIndex((H) => !H.disabled) : -1, E = (H) => {
|
|
3614
|
+
const k = s.value;
|
|
3615
|
+
!k || k.contains(H.target) || (i.value = !1);
|
|
3659
3616
|
};
|
|
3660
3617
|
Se(() => {
|
|
3661
|
-
document.removeEventListener("mousedown",
|
|
3618
|
+
document.removeEventListener("mousedown", E);
|
|
3662
3619
|
});
|
|
3663
3620
|
const q = () => {
|
|
3664
|
-
const
|
|
3665
|
-
if (
|
|
3666
|
-
|
|
3667
|
-
const
|
|
3668
|
-
|
|
3621
|
+
const H = a.options.findIndex((k) => !k.disabled && k.key === t.value);
|
|
3622
|
+
if (H > -1) {
|
|
3623
|
+
B.value = H, x.value = H;
|
|
3624
|
+
const k = s.value;
|
|
3625
|
+
k && k.classList.add("filled");
|
|
3669
3626
|
}
|
|
3670
3627
|
};
|
|
3671
3628
|
return ve(() => {
|
|
@@ -3673,38 +3630,38 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3673
3630
|
if (!a.options || a.options.length === 0) return;
|
|
3674
3631
|
q();
|
|
3675
3632
|
}
|
|
3676
|
-
}), (
|
|
3633
|
+
}), (H, k) => (f(), b("div", {
|
|
3677
3634
|
ref_key: "selectRef",
|
|
3678
3635
|
ref: s,
|
|
3679
|
-
class: fe(["select-box", { required: Object.keys(
|
|
3636
|
+
class: fe(["select-box", { required: Object.keys(H.$attrs).includes("required"), error: e.invalid, filled: S.value, focused: l.value }])
|
|
3680
3637
|
}, [
|
|
3681
|
-
|
|
3638
|
+
M("button", be({
|
|
3682
3639
|
id: c.value,
|
|
3683
3640
|
class: "select-btn",
|
|
3684
3641
|
role: "combobox",
|
|
3685
3642
|
type: "button"
|
|
3686
|
-
},
|
|
3643
|
+
}, H.$attrs, {
|
|
3687
3644
|
"aria-haspopup": "listbox",
|
|
3688
3645
|
"aria-expanded": i.value,
|
|
3689
|
-
"aria-controls":
|
|
3646
|
+
"aria-controls": d,
|
|
3690
3647
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3691
|
-
"aria-labelledby": `${u} ${
|
|
3648
|
+
"aria-labelledby": `${u} ${h}`,
|
|
3692
3649
|
"aria-required": N(_),
|
|
3693
|
-
"aria-describedby": N(dt)(
|
|
3650
|
+
"aria-describedby": N(dt)(H.$props, H.$slots, m, z.value).value,
|
|
3694
3651
|
"aria-activedescendant": P.value,
|
|
3695
3652
|
"aria-disabled": N(r).disabled ? "true" : void 0,
|
|
3696
3653
|
onBlur: re,
|
|
3697
3654
|
onFocus: ue,
|
|
3698
3655
|
onClick: F,
|
|
3699
|
-
onKeydown:
|
|
3656
|
+
onKeydown: $,
|
|
3700
3657
|
ref: "buttonRef"
|
|
3701
3658
|
}), [
|
|
3702
|
-
|
|
3659
|
+
M("span", {
|
|
3703
3660
|
id: u,
|
|
3704
3661
|
class: "label"
|
|
3705
3662
|
}, K(e.label), 1),
|
|
3706
|
-
|
|
3707
|
-
id:
|
|
3663
|
+
M("span", {
|
|
3664
|
+
id: h,
|
|
3708
3665
|
class: "selected-object",
|
|
3709
3666
|
"aria-live": "polite",
|
|
3710
3667
|
"aria-atomic": "true",
|
|
@@ -3717,21 +3674,21 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3717
3674
|
], 16, ao),
|
|
3718
3675
|
U(Ae, { name: "select" }, {
|
|
3719
3676
|
default: J(() => [
|
|
3720
|
-
_e(
|
|
3721
|
-
id:
|
|
3677
|
+
_e(M("ul", {
|
|
3678
|
+
id: d,
|
|
3722
3679
|
role: "listbox",
|
|
3723
3680
|
class: "options"
|
|
3724
3681
|
}, [
|
|
3725
|
-
(
|
|
3726
|
-
id: `${
|
|
3682
|
+
(f(!0), b(de, null, he(e.options, (T, Y) => (f(), b("li", {
|
|
3683
|
+
id: `${d}-option-${Y}`,
|
|
3727
3684
|
key: Y,
|
|
3728
3685
|
role: "option",
|
|
3729
|
-
class: fe(["option", { "focus-visible":
|
|
3686
|
+
class: fe(["option", { "focus-visible": x.value === Y }]),
|
|
3730
3687
|
"aria-disabled": T.disabled,
|
|
3731
|
-
"aria-selected":
|
|
3732
|
-
onClick: (
|
|
3688
|
+
"aria-selected": B.value === Y,
|
|
3689
|
+
onClick: (p) => !T.disabled && R(T, Y)
|
|
3733
3690
|
}, [
|
|
3734
|
-
|
|
3691
|
+
M("div", {
|
|
3735
3692
|
class: "option-value",
|
|
3736
3693
|
innerHTML: T.value
|
|
3737
3694
|
}, null, 8, lo)
|
|
@@ -3742,9 +3699,9 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3742
3699
|
]),
|
|
3743
3700
|
_: 1
|
|
3744
3701
|
}),
|
|
3745
|
-
U(vt, { hintId:
|
|
3702
|
+
U(vt, { hintId: C }, {
|
|
3746
3703
|
default: J(() => [
|
|
3747
|
-
G(
|
|
3704
|
+
G(H.$slots, "hint", {}, void 0, !0)
|
|
3748
3705
|
]),
|
|
3749
3706
|
_: 3
|
|
3750
3707
|
}),
|
|
@@ -3752,8 +3709,8 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3752
3709
|
baseId: c.value,
|
|
3753
3710
|
isRequired: N(_)
|
|
3754
3711
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3755
|
-
U(
|
|
3756
|
-
errorId:
|
|
3712
|
+
U(pt, {
|
|
3713
|
+
errorId: m,
|
|
3757
3714
|
invalid: e.invalid,
|
|
3758
3715
|
errorMessage: e.errorMessage
|
|
3759
3716
|
}, null, 8, ["invalid", "errorMessage"])
|
|
@@ -3783,30 +3740,30 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3783
3740
|
}),
|
|
3784
3741
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
3785
3742
|
setup(e, { emit: n }) {
|
|
3786
|
-
const t = ke(e, "modelValue"), a = e, o = n, i =
|
|
3787
|
-
|
|
3788
|
-
},
|
|
3789
|
-
|
|
3790
|
-
},
|
|
3743
|
+
const t = ke(e, "modelValue"), a = e, o = n, i = w([]), r = w("next"), l = w(null), s = `gallery-caption-${ge()}`, c = w(null), u = A(() => t.value), d = A(() => a.images[u.value]), m = (L, _) => {
|
|
3744
|
+
L && (i.value[_] = L);
|
|
3745
|
+
}, C = (L) => {
|
|
3746
|
+
L !== u.value && (r.value = L > u.value ? "next" : "prev", t.value = L, o("change", L));
|
|
3747
|
+
}, h = () => {
|
|
3791
3748
|
if (u.value === a.images.length - 1) {
|
|
3792
|
-
a.loop &&
|
|
3749
|
+
a.loop && C(0);
|
|
3793
3750
|
return;
|
|
3794
3751
|
}
|
|
3795
|
-
|
|
3796
|
-
},
|
|
3752
|
+
C(u.value + 1);
|
|
3753
|
+
}, x = () => {
|
|
3797
3754
|
if (u.value === 0) {
|
|
3798
|
-
a.loop &&
|
|
3755
|
+
a.loop && C(a.images.length - 1);
|
|
3799
3756
|
return;
|
|
3800
3757
|
}
|
|
3801
|
-
|
|
3802
|
-
},
|
|
3758
|
+
C(u.value - 1);
|
|
3759
|
+
}, B = () => {
|
|
3803
3760
|
c.value && (l.value = c.value.offsetHeight);
|
|
3804
|
-
},
|
|
3761
|
+
}, S = () => {
|
|
3805
3762
|
l.value = null;
|
|
3806
3763
|
};
|
|
3807
|
-
return Q(u, async (
|
|
3764
|
+
return Q(u, async (L) => {
|
|
3808
3765
|
await $e();
|
|
3809
|
-
const _ = i.value[
|
|
3766
|
+
const _ = i.value[L];
|
|
3810
3767
|
_ && _.scrollIntoView({
|
|
3811
3768
|
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
3812
3769
|
inline: "center",
|
|
@@ -3814,7 +3771,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3814
3771
|
});
|
|
3815
3772
|
}), Q(() => a.images, () => {
|
|
3816
3773
|
i.value = [];
|
|
3817
|
-
}), (
|
|
3774
|
+
}), (L, _) => (f(), b("div", {
|
|
3818
3775
|
role: "region",
|
|
3819
3776
|
class: "rs-gallery",
|
|
3820
3777
|
"aria-roledescription": "carousel",
|
|
@@ -3822,54 +3779,54 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3822
3779
|
"aria-live": "polite",
|
|
3823
3780
|
"aria-describedby": s
|
|
3824
3781
|
}, [
|
|
3825
|
-
|
|
3782
|
+
M("div", {
|
|
3826
3783
|
ref_key: "previewRef",
|
|
3827
3784
|
ref: c,
|
|
3828
3785
|
tabindex: "0",
|
|
3829
3786
|
class: "rs-gallery-review",
|
|
3830
3787
|
style: Ie(l.value ? { height: `${l.value}px` } : void 0),
|
|
3831
3788
|
onKeydown: [
|
|
3832
|
-
ye(se(
|
|
3833
|
-
ye(se(
|
|
3789
|
+
ye(se(x, ["prevent"]), ["left"]),
|
|
3790
|
+
ye(se(h, ["prevent"]), ["right"])
|
|
3834
3791
|
]
|
|
3835
3792
|
}, [
|
|
3836
3793
|
U(Ae, {
|
|
3837
3794
|
name: `rs-gallery-slide-${r.value}`,
|
|
3838
3795
|
mode: "out-in",
|
|
3839
|
-
onBeforeLeave:
|
|
3840
|
-
onAfterEnter:
|
|
3796
|
+
onBeforeLeave: B,
|
|
3797
|
+
onAfterEnter: S
|
|
3841
3798
|
}, {
|
|
3842
3799
|
default: J(() => [
|
|
3843
|
-
|
|
3844
|
-
key:
|
|
3845
|
-
src:
|
|
3846
|
-
alt:
|
|
3800
|
+
d.value ? (f(), ae(ze, {
|
|
3801
|
+
key: d.value.src,
|
|
3802
|
+
src: d.value.src,
|
|
3803
|
+
alt: d.value.alt || "",
|
|
3847
3804
|
transform: e.transform
|
|
3848
3805
|
}, null, 8, ["src", "alt", "transform"])) : O("", !0)
|
|
3849
3806
|
]),
|
|
3850
3807
|
_: 1
|
|
3851
3808
|
}, 8, ["name"]),
|
|
3852
|
-
G(
|
|
3853
|
-
image:
|
|
3809
|
+
G(L.$slots, "overlay", {
|
|
3810
|
+
image: d.value,
|
|
3854
3811
|
index: u.value
|
|
3855
3812
|
}, void 0, !0)
|
|
3856
3813
|
], 44, io),
|
|
3857
|
-
|
|
3814
|
+
d.value?.title ? (f(), b("p", {
|
|
3858
3815
|
key: 0,
|
|
3859
3816
|
id: s,
|
|
3860
3817
|
class: "rs-gallery-caption"
|
|
3861
|
-
}, K(
|
|
3862
|
-
e.showThumbnails ? (
|
|
3863
|
-
(
|
|
3818
|
+
}, K(d.value.title), 1)) : O("", !0),
|
|
3819
|
+
e.showThumbnails ? (f(), b("ul", uo, [
|
|
3820
|
+
(f(!0), b(de, null, he(e.images, (z, P) => (f(), b("li", {
|
|
3864
3821
|
key: z.src,
|
|
3865
3822
|
ref_for: !0,
|
|
3866
|
-
ref: (oe) =>
|
|
3823
|
+
ref: (oe) => m(oe, P),
|
|
3867
3824
|
"aria-selected": u.value === P
|
|
3868
3825
|
}, [
|
|
3869
|
-
|
|
3826
|
+
M("button", {
|
|
3870
3827
|
type: "button",
|
|
3871
3828
|
class: fe(["rs-gallery-thumb", { active: u.value === P }]),
|
|
3872
|
-
onClick: (oe) =>
|
|
3829
|
+
onClick: (oe) => C(P)
|
|
3873
3830
|
}, [
|
|
3874
3831
|
U(ze, {
|
|
3875
3832
|
src: z.src,
|
|
@@ -3881,7 +3838,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3881
3838
|
])) : O("", !0)
|
|
3882
3839
|
], 8, so));
|
|
3883
3840
|
}
|
|
3884
|
-
}), St = /* @__PURE__ */ W(fo, [["__scopeId", "data-v-dcfacff6"]]),
|
|
3841
|
+
}), St = /* @__PURE__ */ W(fo, [["__scopeId", "data-v-dcfacff6"]]), po = ["aria-label"], mo = ["onClick"], Co = /* @__PURE__ */ Z({
|
|
3885
3842
|
__name: "GalleryGrid",
|
|
3886
3843
|
props: {
|
|
3887
3844
|
images: {},
|
|
@@ -3896,13 +3853,13 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3896
3853
|
},
|
|
3897
3854
|
emits: ["change"],
|
|
3898
3855
|
setup(e) {
|
|
3899
|
-
return (n, t) => (
|
|
3856
|
+
return (n, t) => (f(), b("div", {
|
|
3900
3857
|
class: "rs-gallery-grid",
|
|
3901
3858
|
style: Ie({ "--grid-columns": e.columns, "--grid-gap": e.gap }),
|
|
3902
3859
|
role: "list",
|
|
3903
3860
|
"aria-label": e.ariaLabel || "Image grid gallery"
|
|
3904
3861
|
}, [
|
|
3905
|
-
(
|
|
3862
|
+
(f(!0), b(de, null, he(e.images, (a, o) => (f(), b("button", {
|
|
3906
3863
|
key: a.src,
|
|
3907
3864
|
type: "button",
|
|
3908
3865
|
class: "grid-item",
|
|
@@ -3913,8 +3870,8 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3913
3870
|
alt: a.alt || "",
|
|
3914
3871
|
transform: e.transform
|
|
3915
3872
|
}, null, 8, ["src", "alt", "transform"])
|
|
3916
|
-
], 8,
|
|
3917
|
-
], 12,
|
|
3873
|
+
], 8, mo))), 128))
|
|
3874
|
+
], 12, po));
|
|
3918
3875
|
}
|
|
3919
3876
|
}), Tt = /* @__PURE__ */ W(Co, [["__scopeId", "data-v-17067a4b"]]), Ge = /* @__PURE__ */ Symbol("ModalContext");
|
|
3920
3877
|
let nt = 0, Ue = 0, Ke = null;
|
|
@@ -3934,11 +3891,11 @@ const lt = Z({
|
|
|
3934
3891
|
},
|
|
3935
3892
|
emits: ["update:open", "opened", "closed"],
|
|
3936
3893
|
setup(e, { emit: n, slots: t }) {
|
|
3937
|
-
const a =
|
|
3938
|
-
Q(() => e.open, (
|
|
3939
|
-
n("update:open",
|
|
3894
|
+
const a = w(!1), o = w(e.open), i = ge(), r = `modal-title-${i}`, l = `modal-desc-${i}`;
|
|
3895
|
+
Q(() => e.open, (d) => o.value = d), Q(o, (d) => {
|
|
3896
|
+
n("update:open", d), n(d ? "opened" : "closed");
|
|
3940
3897
|
});
|
|
3941
|
-
const s = () => o.value = !1, c =
|
|
3898
|
+
const s = () => o.value = !1, c = A(() => e.motion), u = A(() => e.size);
|
|
3942
3899
|
return He(Ge, {
|
|
3943
3900
|
isOpen: o,
|
|
3944
3901
|
motion: c,
|
|
@@ -3953,29 +3910,29 @@ const lt = Z({
|
|
|
3953
3910
|
}), Dt = Z({
|
|
3954
3911
|
name: "ModalContent",
|
|
3955
3912
|
setup(e, { slots: n }) {
|
|
3956
|
-
const t =
|
|
3913
|
+
const t = me(Ge);
|
|
3957
3914
|
if (!t) throw new Error("ModalContent components must be used inside <Modal>");
|
|
3958
|
-
const a =
|
|
3915
|
+
const a = w(null);
|
|
3959
3916
|
let o = 0;
|
|
3960
|
-
const i = (
|
|
3961
|
-
|
|
3917
|
+
const i = (d) => {
|
|
3918
|
+
d.key === "Escape" && o === nt && t.close();
|
|
3962
3919
|
};
|
|
3963
3920
|
let r = !1, l = null;
|
|
3964
|
-
const s = (
|
|
3965
|
-
const
|
|
3966
|
-
|
|
3921
|
+
const s = (d) => {
|
|
3922
|
+
const m = Array.from(
|
|
3923
|
+
d.querySelectorAll(
|
|
3967
3924
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
3968
3925
|
)
|
|
3969
|
-
).filter((
|
|
3970
|
-
if (
|
|
3971
|
-
|
|
3926
|
+
).filter((B) => !B.hasAttribute("disabled"));
|
|
3927
|
+
if (m.length === 0) {
|
|
3928
|
+
d.setAttribute("tabindex", "-1"), d.focus();
|
|
3972
3929
|
return;
|
|
3973
3930
|
}
|
|
3974
|
-
const
|
|
3975
|
-
|
|
3931
|
+
const C = m[0], h = m[m.length - 1], x = (B) => {
|
|
3932
|
+
B.key === "Tab" && (B.shiftKey && document.activeElement === C ? (B.preventDefault(), h?.focus()) : !B.shiftKey && document.activeElement === h && (B.preventDefault(), C?.focus()));
|
|
3976
3933
|
};
|
|
3977
|
-
|
|
3978
|
-
|
|
3934
|
+
d.addEventListener("keydown", x), C?.focus(), l = () => {
|
|
3935
|
+
d.removeEventListener("keydown", x), l = null;
|
|
3979
3936
|
};
|
|
3980
3937
|
}, c = () => {
|
|
3981
3938
|
++Ue === 1 && (document.body.style.overflow = "hidden");
|
|
@@ -4007,12 +3964,12 @@ const lt = Z({
|
|
|
4007
3964
|
"div",
|
|
4008
3965
|
{
|
|
4009
3966
|
class: "modal-overlay",
|
|
4010
|
-
onMousedown: (
|
|
4011
|
-
r =
|
|
3967
|
+
onMousedown: (d) => {
|
|
3968
|
+
r = d.target === d.currentTarget;
|
|
4012
3969
|
},
|
|
4013
|
-
onMouseup: (
|
|
4014
|
-
const
|
|
4015
|
-
t.closeOnOverlay && r &&
|
|
3970
|
+
onMouseup: (d) => {
|
|
3971
|
+
const m = d.target === d.currentTarget;
|
|
3972
|
+
t.closeOnOverlay && r && m && t.close(), r = !1;
|
|
4016
3973
|
}
|
|
4017
3974
|
},
|
|
4018
3975
|
j(
|
|
@@ -4024,7 +3981,7 @@ const lt = Z({
|
|
|
4024
3981
|
"aria-labelledby": t.labelId,
|
|
4025
3982
|
"aria-describedby": t.descriptionId,
|
|
4026
3983
|
class: ["modal-content", `modal--${t.size.value}`],
|
|
4027
|
-
onClick: (
|
|
3984
|
+
onClick: (d) => d.stopPropagation()
|
|
4028
3985
|
},
|
|
4029
3986
|
n.default?.()
|
|
4030
3987
|
)
|
|
@@ -4036,7 +3993,7 @@ const lt = Z({
|
|
|
4036
3993
|
}), Zt = Z({
|
|
4037
3994
|
name: "ModalTitle",
|
|
4038
3995
|
setup(e, { slots: n }) {
|
|
4039
|
-
const t =
|
|
3996
|
+
const t = me(Ge);
|
|
4040
3997
|
if (!t) throw new Error("ModalTitle components must be used inside <Modal>");
|
|
4041
3998
|
return t.hasTitle.value = !0, () => j("h2", { id: t.labelId }, n.default?.());
|
|
4042
3999
|
}
|
|
@@ -4058,7 +4015,7 @@ const lt = Z({
|
|
|
4058
4015
|
}), Ot = Z({
|
|
4059
4016
|
name: "ModalClose",
|
|
4060
4017
|
setup() {
|
|
4061
|
-
const e =
|
|
4018
|
+
const e = me(Ge);
|
|
4062
4019
|
if (!e) throw new Error("ModalClose components must be used inside <Modal>");
|
|
4063
4020
|
return () => j(
|
|
4064
4021
|
"button",
|
|
@@ -4092,10 +4049,10 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4092
4049
|
},
|
|
4093
4050
|
emits: ["change"],
|
|
4094
4051
|
setup(e) {
|
|
4095
|
-
const n =
|
|
4052
|
+
const n = w(0), t = w(!1), a = (i) => {
|
|
4096
4053
|
n.value = i, t.value = !0;
|
|
4097
4054
|
}, o = () => t.value = !1;
|
|
4098
|
-
return (i, r) => (
|
|
4055
|
+
return (i, r) => (f(), b(de, null, [
|
|
4099
4056
|
U(Tt, {
|
|
4100
4057
|
images: e.images,
|
|
4101
4058
|
onChange: a,
|
|
@@ -4159,8 +4116,8 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4159
4116
|
gap: { default: "1rem" }
|
|
4160
4117
|
},
|
|
4161
4118
|
setup(e) {
|
|
4162
|
-
return (n, t) => (
|
|
4163
|
-
(
|
|
4119
|
+
return (n, t) => (f(), b("div", go, [
|
|
4120
|
+
(f(!0), b(de, null, he(e.images, (a) => (f(), b("button", {
|
|
4164
4121
|
key: a.src,
|
|
4165
4122
|
class: "masonry-item"
|
|
4166
4123
|
}, [
|
|
@@ -4197,14 +4154,14 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4197
4154
|
}),
|
|
4198
4155
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
4199
4156
|
setup(e, { emit: n }) {
|
|
4200
|
-
const t = ke(e, "modelValue"), a = n, o =
|
|
4157
|
+
const t = ke(e, "modelValue"), a = n, o = A({
|
|
4201
4158
|
get: () => t.value ?? 0,
|
|
4202
4159
|
set: (r) => {
|
|
4203
4160
|
t.value = r, a("change", r);
|
|
4204
4161
|
}
|
|
4205
4162
|
}), i = (r) => o.value = r;
|
|
4206
|
-
return (r, l) => (
|
|
4207
|
-
e.layout === "carousel" ? (
|
|
4163
|
+
return (r, l) => (f(), b("section", ko, [
|
|
4164
|
+
e.layout === "carousel" ? (f(), ae(St, {
|
|
4208
4165
|
key: 0,
|
|
4209
4166
|
modelValue: o.value,
|
|
4210
4167
|
"onUpdate:modelValue": l[0] || (l[0] = (s) => o.value = s),
|
|
@@ -4214,7 +4171,7 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4214
4171
|
transform: e.transform,
|
|
4215
4172
|
"transform-thumbnails": e.transformThumbnails,
|
|
4216
4173
|
"show-thumbnails": e.showThumbnails
|
|
4217
|
-
}, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (
|
|
4174
|
+
}, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (f(), ae(Tt, {
|
|
4218
4175
|
key: 1,
|
|
4219
4176
|
modelValue: o.value,
|
|
4220
4177
|
"onUpdate:modelValue": l[1] || (l[1] = (s) => o.value = s),
|
|
@@ -4224,14 +4181,14 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4224
4181
|
gap: e.gap,
|
|
4225
4182
|
transform: e.transform,
|
|
4226
4183
|
"aria-label": e.ariaLabel
|
|
4227
|
-
}, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (
|
|
4184
|
+
}, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (f(), ae(ho, {
|
|
4228
4185
|
key: 2,
|
|
4229
4186
|
modelValue: o.value,
|
|
4230
4187
|
"onUpdate:modelValue": l[2] || (l[2] = (s) => o.value = s),
|
|
4231
4188
|
images: e.images,
|
|
4232
4189
|
transform: e.transform,
|
|
4233
4190
|
"aria-label": e.ariaLabel
|
|
4234
|
-
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (
|
|
4191
|
+
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (f(), ae(bo, {
|
|
4235
4192
|
key: 3,
|
|
4236
4193
|
modelValue: o.value,
|
|
4237
4194
|
"onUpdate:modelValue": l[3] || (l[3] = (s) => o.value = s),
|
|
@@ -4256,7 +4213,7 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4256
4213
|
message: {}
|
|
4257
4214
|
},
|
|
4258
4215
|
setup(e) {
|
|
4259
|
-
const n = e, t =
|
|
4216
|
+
const n = e, t = w(0), a = w(null), o = w(n.message || ""), i = () => {
|
|
4260
4217
|
!n.message || a.value !== null || o.value.length > 0 && (a.value = window.setInterval(() => {
|
|
4261
4218
|
t.value = t.value % 3 + 1, o.value = `${n.message}${".".repeat(t.value)}`;
|
|
4262
4219
|
}, 750));
|
|
@@ -4268,18 +4225,18 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4268
4225
|
(l, s) => {
|
|
4269
4226
|
l !== s && (o.value = l || "", r());
|
|
4270
4227
|
}
|
|
4271
|
-
), ve(i), Be(r), (l, s) => (
|
|
4228
|
+
), ve(i), Be(r), (l, s) => (f(), b("div", {
|
|
4272
4229
|
class: "spinner-container",
|
|
4273
4230
|
role: "status",
|
|
4274
4231
|
"aria-live": "polite",
|
|
4275
4232
|
"aria-busy": !!e.message
|
|
4276
4233
|
}, [
|
|
4277
|
-
s[0] || (s[0] =
|
|
4234
|
+
s[0] || (s[0] = M("div", {
|
|
4278
4235
|
class: "spinner",
|
|
4279
4236
|
"aria-hidden": "true"
|
|
4280
4237
|
}, null, -1)),
|
|
4281
|
-
e.message ? (
|
|
4282
|
-
|
|
4238
|
+
e.message ? (f(), b("span", Lo, K(o.value), 1)) : O("", !0),
|
|
4239
|
+
M("span", xo, K(e.message || "Loading"), 1)
|
|
4283
4240
|
], 8, Mo));
|
|
4284
4241
|
}
|
|
4285
4242
|
}), qt = /* @__PURE__ */ W($o, [["__scopeId", "data-v-e61a1cf5"]]), Io = ["id", "required", "checked", "disabled", "aria-invalid", "aria-disabled", "aria-checked"], Ho = {
|
|
@@ -4306,28 +4263,28 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4306
4263
|
}),
|
|
4307
4264
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
4308
4265
|
setup(e, { emit: n }) {
|
|
4309
|
-
const t = n, a = ke(e, "modelValue"), o = e, i = ge(), r =
|
|
4266
|
+
const t = n, a = ke(e, "modelValue"), o = e, i = ge(), r = A(() => o.id ?? `checkbox-${i}`), l = w(null), s = Un(o).value, c = A(() => o.required ? !0 : void 0), u = A(() => o.triState && a.value === void 0 ? "mixed" : void 0);
|
|
4310
4267
|
Q(
|
|
4311
4268
|
() => a.value,
|
|
4312
|
-
(
|
|
4313
|
-
l.value && (l.value.indeterminate =
|
|
4269
|
+
(m) => {
|
|
4270
|
+
l.value && (l.value.indeterminate = m === void 0, l.value.checked = m === !0);
|
|
4314
4271
|
},
|
|
4315
4272
|
{ immediate: !0 }
|
|
4316
4273
|
);
|
|
4317
|
-
const
|
|
4274
|
+
const d = (m) => {
|
|
4318
4275
|
if (!o.disabled) {
|
|
4319
4276
|
if (!o.triState) {
|
|
4320
|
-
const
|
|
4321
|
-
a.value =
|
|
4277
|
+
const C = m.target.checked;
|
|
4278
|
+
a.value = C, t("change", a.value);
|
|
4322
4279
|
return;
|
|
4323
4280
|
}
|
|
4324
4281
|
a.value === !1 ? a.value = !0 : a.value === !0 ? a.value = void 0 : a.value = !1, t("change", a.value);
|
|
4325
4282
|
}
|
|
4326
4283
|
};
|
|
4327
|
-
return (
|
|
4284
|
+
return (m, C) => (f(), b("label", {
|
|
4328
4285
|
class: fe(["checkbox-root", { required: c.value, error: e.invalid }])
|
|
4329
4286
|
}, [
|
|
4330
|
-
|
|
4287
|
+
M("input", {
|
|
4331
4288
|
id: r.value,
|
|
4332
4289
|
type: "checkbox",
|
|
4333
4290
|
class: "checkbox",
|
|
@@ -4337,26 +4294,26 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4337
4294
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4338
4295
|
"aria-disabled": N(s),
|
|
4339
4296
|
"aria-checked": u.value,
|
|
4340
|
-
onClick:
|
|
4341
|
-
onChange:
|
|
4297
|
+
onClick: C[0] || (C[0] = (h) => e.triState ? d(h) : void 0),
|
|
4298
|
+
onChange: C[1] || (C[1] = (h) => e.triState ? void 0 : d(h)),
|
|
4342
4299
|
ref_key: "inputRef",
|
|
4343
4300
|
ref: l
|
|
4344
4301
|
}, null, 40, Io),
|
|
4345
|
-
|
|
4346
|
-
a.value === !0 ? (
|
|
4347
|
-
|
|
4302
|
+
M("span", Ho, [
|
|
4303
|
+
a.value === !0 ? (f(), b("svg", Vo, [...C[2] || (C[2] = [
|
|
4304
|
+
M("path", {
|
|
4348
4305
|
d: "M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",
|
|
4349
4306
|
fill: "currentColor"
|
|
4350
4307
|
}, null, -1)
|
|
4351
|
-
])])) : a.value === void 0 ? (
|
|
4352
|
-
|
|
4308
|
+
])])) : a.value === void 0 ? (f(), b("svg", Bo, [...C[3] || (C[3] = [
|
|
4309
|
+
M("path", {
|
|
4353
4310
|
d: "M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",
|
|
4354
4311
|
fill: "currentColor"
|
|
4355
4312
|
}, null, -1)
|
|
4356
4313
|
])])) : O("", !0)
|
|
4357
4314
|
]),
|
|
4358
|
-
|
|
4359
|
-
G(
|
|
4315
|
+
M("span", _o, [
|
|
4316
|
+
G(m.$slots, "default", {}, void 0, !0)
|
|
4360
4317
|
])
|
|
4361
4318
|
], 2));
|
|
4362
4319
|
}
|
|
@@ -4376,31 +4333,31 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4376
4333
|
}),
|
|
4377
4334
|
emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:modelValue"]),
|
|
4378
4335
|
setup(e, { emit: n }) {
|
|
4379
|
-
const t = ke(e, "modelValue"), a = st(), o = it(), i = n, r = e, l = ge(), s =
|
|
4336
|
+
const t = ke(e, "modelValue"), a = st(), o = it(), i = n, r = e, l = ge(), s = w(!1), c = `${l}-error`, u = `${l}-hint`, d = Xe(a).value, m = A(() => t.value !== null && t.value !== void 0 && t.value !== ""), C = A(() => d ? `${u} ${l}-required-hint` : u), h = dt(r, o, c, C.value).value, x = (_) => {
|
|
4380
4337
|
const z = _.target;
|
|
4381
4338
|
t.value = r.type === "number" ? Number(z.value) : z.value;
|
|
4382
|
-
},
|
|
4339
|
+
}, B = (_) => {
|
|
4383
4340
|
s.value = !0, i("focus", _);
|
|
4384
|
-
},
|
|
4341
|
+
}, S = (_) => {
|
|
4385
4342
|
s.value = !1, i("blur", _);
|
|
4386
|
-
},
|
|
4387
|
-
return (_, z) => (
|
|
4388
|
-
class: fe(["textarea-box", { required: N(
|
|
4343
|
+
}, L = A(() => r.invalid === !0 && r.errorMessage ? c : void 0);
|
|
4344
|
+
return (_, z) => (f(), b("div", {
|
|
4345
|
+
class: fe(["textarea-box", { required: N(d), error: e.invalid, filled: m.value, focused: s.value }])
|
|
4389
4346
|
}, [
|
|
4390
|
-
|
|
4347
|
+
M("label", {
|
|
4391
4348
|
for: e.id,
|
|
4392
4349
|
class: "label"
|
|
4393
4350
|
}, K(e.label), 9, Eo),
|
|
4394
|
-
|
|
4351
|
+
M("textarea", be({ id: e.id }, _.$attrs, {
|
|
4395
4352
|
class: "custom-textarea",
|
|
4396
|
-
onFocus: z[0] || (z[0] = (P) =>
|
|
4397
|
-
onBlur: z[1] || (z[1] = (P) =>
|
|
4398
|
-
onInput:
|
|
4353
|
+
onFocus: z[0] || (z[0] = (P) => B(P)),
|
|
4354
|
+
onBlur: z[1] || (z[1] = (P) => S(P)),
|
|
4355
|
+
onInput: x,
|
|
4399
4356
|
value: t.value,
|
|
4400
|
-
required: N(
|
|
4357
|
+
required: N(d),
|
|
4401
4358
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4402
|
-
"aria-errormessage":
|
|
4403
|
-
"aria-describedby": N(
|
|
4359
|
+
"aria-errormessage": L.value,
|
|
4360
|
+
"aria-describedby": N(h)
|
|
4404
4361
|
}), " ", 16, Ro),
|
|
4405
4362
|
U(vt, { hintId: u }, {
|
|
4406
4363
|
default: J(() => [
|
|
@@ -4410,9 +4367,9 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4410
4367
|
}),
|
|
4411
4368
|
U(ft, {
|
|
4412
4369
|
baseId: N(l),
|
|
4413
|
-
isRequired: N(
|
|
4370
|
+
isRequired: N(d)
|
|
4414
4371
|
}, null, 8, ["baseId", "isRequired"]),
|
|
4415
|
-
U(
|
|
4372
|
+
U(pt, {
|
|
4416
4373
|
errorId: c,
|
|
4417
4374
|
invalid: e.invalid,
|
|
4418
4375
|
errorMessage: e.errorMessage
|
|
@@ -4432,8 +4389,8 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4432
4389
|
let l = 0;
|
|
4433
4390
|
return t.replace(i, (s, c) => (c > l && r.push({ text: t.slice(l, c), match: !1 }), r.push({ text: s, match: !0 }), l = c + s.length, s)), l < t.length && r.push({ text: t.slice(l), match: !1 }), r;
|
|
4434
4391
|
};
|
|
4435
|
-
return (t, a) => (
|
|
4436
|
-
o.match ? (
|
|
4392
|
+
return (t, a) => (f(!0), b(de, null, he(n(e.text, e.query), (o, i) => (f(), b(de, { key: i }, [
|
|
4393
|
+
o.match ? (f(), b("mark", To, K(o.text), 1)) : (f(), b("span", Do, K(o.text), 1))
|
|
4437
4394
|
], 64))), 128));
|
|
4438
4395
|
}
|
|
4439
4396
|
}), zo = /* @__PURE__ */ W(Zo, [["__scopeId", "data-v-edfa70b3"]]), No = [
|
|
@@ -4474,7 +4431,7 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4474
4431
|
},
|
|
4475
4432
|
emits: ["valid"],
|
|
4476
4433
|
setup(e, { emit: n }) {
|
|
4477
|
-
const t = e, a = n, o =
|
|
4434
|
+
const t = e, a = n, o = w([]), i = w(null), r = w(null), l = (C, h) => C && (o.value[h] = C);
|
|
4478
4435
|
Q(
|
|
4479
4436
|
() => t.password,
|
|
4480
4437
|
() => {
|
|
@@ -4489,52 +4446,52 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4489
4446
|
const s = {
|
|
4490
4447
|
"--strength-fill-color": t.strengthFillColor
|
|
4491
4448
|
}, c = () => {
|
|
4492
|
-
const
|
|
4493
|
-
return
|
|
4449
|
+
const C = u(), h = Object.values(d()).every(Boolean);
|
|
4450
|
+
return C && h;
|
|
4494
4451
|
}, u = () => {
|
|
4495
|
-
const
|
|
4496
|
-
return i.value && (i.value.style.width = `${
|
|
4497
|
-
},
|
|
4498
|
-
const
|
|
4499
|
-
return o.value.forEach((
|
|
4500
|
-
const
|
|
4501
|
-
|
|
4502
|
-
}),
|
|
4503
|
-
},
|
|
4504
|
-
const
|
|
4505
|
-
return t.rules.forEach((
|
|
4506
|
-
|
|
4452
|
+
const C = d(), h = Object.values(C).filter(Boolean).length, x = t.password.length >= 12 ? 1 : 0, B = Math.min(100, (h + x) * 20), S = Math.min(t.labels.length - 1, Math.floor(B / 25));
|
|
4453
|
+
return i.value && (i.value.style.width = `${B}%`), r.value && (r.value.textContent = t.labels[S] ?? "Very weak"), h === t.rules.length;
|
|
4454
|
+
}, d = () => {
|
|
4455
|
+
const C = m();
|
|
4456
|
+
return o.value.forEach((h) => {
|
|
4457
|
+
const x = h.dataset.rule, B = !!C[x];
|
|
4458
|
+
h.classList.toggle("passed", B);
|
|
4459
|
+
}), C;
|
|
4460
|
+
}, m = () => {
|
|
4461
|
+
const C = {};
|
|
4462
|
+
return t.rules.forEach((h) => {
|
|
4463
|
+
C[h.key] = h.validator(
|
|
4507
4464
|
t.password,
|
|
4508
4465
|
t.passwordConfirmation
|
|
4509
4466
|
);
|
|
4510
|
-
}),
|
|
4467
|
+
}), C;
|
|
4511
4468
|
};
|
|
4512
|
-
return (
|
|
4513
|
-
|
|
4514
|
-
(
|
|
4515
|
-
key:
|
|
4469
|
+
return (C, h) => (f(), b("section", Oo, [
|
|
4470
|
+
M("ul", qo, [
|
|
4471
|
+
(f(!0), b(de, null, he(t.rules, (x, B) => (f(), b("li", {
|
|
4472
|
+
key: x.key,
|
|
4516
4473
|
class: "password-rule",
|
|
4517
|
-
"data-rule":
|
|
4474
|
+
"data-rule": x.key,
|
|
4518
4475
|
ref_for: !0,
|
|
4519
|
-
ref: (
|
|
4476
|
+
ref: (S) => l(S, B)
|
|
4520
4477
|
}, [
|
|
4521
|
-
|
|
4522
|
-
Me(" " + K(
|
|
4478
|
+
h[0] || (h[0] = M("span", { class: "rule-icon" }, "•", -1)),
|
|
4479
|
+
Me(" " + K(x.label), 1)
|
|
4523
4480
|
], 8, Fo))), 128))
|
|
4524
4481
|
]),
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4482
|
+
M("div", Po, [
|
|
4483
|
+
M("div", Uo, [
|
|
4484
|
+
h[1] || (h[1] = M("span", null, "Força da senha", -1)),
|
|
4485
|
+
M("span", {
|
|
4529
4486
|
ref_key: "strengthLabelRef",
|
|
4530
4487
|
ref: r
|
|
4531
4488
|
}, "Muito fraca", 512)
|
|
4532
4489
|
]),
|
|
4533
|
-
|
|
4490
|
+
M("div", {
|
|
4534
4491
|
class: "strength-bar",
|
|
4535
4492
|
style: s
|
|
4536
4493
|
}, [
|
|
4537
|
-
|
|
4494
|
+
M("div", {
|
|
4538
4495
|
class: "strength-fill",
|
|
4539
4496
|
ref_key: "strengthFillRef",
|
|
4540
4497
|
ref: i
|
|
@@ -4561,19 +4518,19 @@ const jo = {
|
|
|
4561
4518
|
separator: { default: "/" }
|
|
4562
4519
|
},
|
|
4563
4520
|
setup(e) {
|
|
4564
|
-
const n = e, t =
|
|
4521
|
+
const n = e, t = me(Xt), a = (l) => l === n.items.length - 1, o = (l, s) => i(l, s), i = (l, s) => a(s) || l.disabled ? "span" : l.to && t ? Ut("RouterLink") : l.href ? "a" : "span", r = (l, s) => a(s) || l.disabled ? { "data-disabled": l.disabled || void 0 } : l.to ? { to: l.to } : l.href ? {
|
|
4565
4522
|
href: l.href,
|
|
4566
4523
|
target: l.external ? "_blank" : void 0,
|
|
4567
4524
|
rel: l.external ? "noopener noreferrer" : void 0,
|
|
4568
4525
|
"aria-label": l.external ? `${l.label} (opens in a new tab)` : void 0
|
|
4569
4526
|
} : {};
|
|
4570
|
-
return (l, s) => (
|
|
4571
|
-
|
|
4572
|
-
(
|
|
4527
|
+
return (l, s) => (f(), b("nav", jo, [
|
|
4528
|
+
M("ol", Wo, [
|
|
4529
|
+
(f(!0), b(de, null, he(e.items, (c, u) => (f(), b("li", {
|
|
4573
4530
|
key: c.to ?? c.href ?? `${c.label}-${u}`,
|
|
4574
4531
|
class: "ui-breadcrumb__item"
|
|
4575
4532
|
}, [
|
|
4576
|
-
(
|
|
4533
|
+
(f(), ae(Ne(o(c, u)), be({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, r(c, u), {
|
|
4577
4534
|
"aria-posinset": u + 1,
|
|
4578
4535
|
"aria-setsize": e.items.length,
|
|
4579
4536
|
"aria-current": a(u) ? "page" : void 0,
|
|
@@ -4584,7 +4541,7 @@ const jo = {
|
|
|
4584
4541
|
]),
|
|
4585
4542
|
_: 2
|
|
4586
4543
|
}, 1040, ["aria-posinset", "aria-setsize", "aria-current", "tabindex"])),
|
|
4587
|
-
a(u) ? O("", !0) : (
|
|
4544
|
+
a(u) ? O("", !0) : (f(), b("span", Yo, [
|
|
4588
4545
|
G(l.$slots, "separator", {}, () => [
|
|
4589
4546
|
Me(K(e.separator), 1)
|
|
4590
4547
|
], !0)
|
|
@@ -4615,19 +4572,19 @@ const jo = {
|
|
|
4615
4572
|
}),
|
|
4616
4573
|
emits: ["update:modelValue"],
|
|
4617
4574
|
setup(e) {
|
|
4618
|
-
const n = e, t = ke(e, "modelValue"), a =
|
|
4619
|
-
return (r, l) => (
|
|
4575
|
+
const n = e, t = ke(e, "modelValue"), a = A(() => n.invalid ? "true" : void 0), o = A(() => n.required && !n.disabled ? "true" : void 0), i = A(() => n.disabled ? !0 : void 0);
|
|
4576
|
+
return (r, l) => (f(), b("fieldset", {
|
|
4620
4577
|
class: fe(["radio-group", { "in-column": e.inColumn, btn: e.mode === "button" }]),
|
|
4621
4578
|
"aria-invalid": a.value,
|
|
4622
4579
|
"aria-required": o.value,
|
|
4623
4580
|
disabled: i.value
|
|
4624
4581
|
}, [
|
|
4625
|
-
|
|
4626
|
-
(
|
|
4582
|
+
M("legend", Jo, K(e.name), 1),
|
|
4583
|
+
(f(!0), b(de, null, he(e.options, (s) => (f(), b("label", {
|
|
4627
4584
|
key: s.key,
|
|
4628
4585
|
class: fe(["radio", { checked: t.value === s.key, disabled: e.disabled || s.disabled }])
|
|
4629
4586
|
}, [
|
|
4630
|
-
_e(
|
|
4587
|
+
_e(M("input", {
|
|
4631
4588
|
type: "radio",
|
|
4632
4589
|
class: "radio-input",
|
|
4633
4590
|
name: e.name,
|
|
@@ -4638,9 +4595,9 @@ const jo = {
|
|
|
4638
4595
|
}, null, 8, Qo), [
|
|
4639
4596
|
[Kt, t.value]
|
|
4640
4597
|
]),
|
|
4641
|
-
e.mode === "standard" ? (
|
|
4642
|
-
|
|
4643
|
-
s.icon ? (
|
|
4598
|
+
e.mode === "standard" ? (f(), b("span", e2)) : O("", !0),
|
|
4599
|
+
M("span", t2, [
|
|
4600
|
+
s.icon ? (f(), ae(Ce, {
|
|
4644
4601
|
key: 0,
|
|
4645
4602
|
name: s.icon,
|
|
4646
4603
|
size: 22
|
|
@@ -4692,32 +4649,32 @@ const jo = {
|
|
|
4692
4649
|
}),
|
|
4693
4650
|
emits: /* @__PURE__ */ ie(["change", "select", "focus", "blur"], ["update:modelValue"]),
|
|
4694
4651
|
setup(e, { emit: n }) {
|
|
4695
|
-
const t = e, a = n, o = ke(e, "modelValue"), i =
|
|
4652
|
+
const t = e, a = n, o = ke(e, "modelValue"), i = w(null), r = w(""), l = w(!1), s = w([]), c = w(null), u = w(null), d = A(() => t.id ? `${t.id}-search-history` : "search-history"), C = `${ge()}-list`, h = w(!1), x = A(() => o.value !== null && o.value !== void 0 && o.value !== ""), B = A(() => c.value !== null ? `${C}-option-${c.value}` : void 0), S = A(() => l.value && B.value ? B.value : void 0), L = A(() => s.value.length > 0), _ = A(() => {
|
|
4696
4653
|
if (!t.filterable) return t.options;
|
|
4697
|
-
const
|
|
4698
|
-
return t.options.filter((T) => t.getValue(T).toLowerCase().includes(
|
|
4654
|
+
const k = r.value.toLowerCase();
|
|
4655
|
+
return t.options.filter((T) => t.getValue(T).toLowerCase().includes(k));
|
|
4699
4656
|
}), z = Xe(t).value;
|
|
4700
4657
|
Q(
|
|
4701
|
-
() =>
|
|
4702
|
-
(
|
|
4703
|
-
if (
|
|
4658
|
+
() => d.value,
|
|
4659
|
+
(k) => {
|
|
4660
|
+
if (k)
|
|
4704
4661
|
try {
|
|
4705
|
-
s.value = JSON.parse(localStorage.getItem(
|
|
4662
|
+
s.value = JSON.parse(localStorage.getItem(k) || "[]");
|
|
4706
4663
|
} catch {
|
|
4707
4664
|
s.value = [];
|
|
4708
4665
|
}
|
|
4709
4666
|
},
|
|
4710
4667
|
{ immediate: !0 }
|
|
4711
|
-
), Q(l, async (
|
|
4712
|
-
if (!
|
|
4668
|
+
), Q(l, async (k) => {
|
|
4669
|
+
if (!k) {
|
|
4713
4670
|
c.value = null;
|
|
4714
4671
|
return;
|
|
4715
4672
|
}
|
|
4716
|
-
_.value.length !== 0 && (await $e(),
|
|
4673
|
+
_.value.length !== 0 && (await $e(), E());
|
|
4717
4674
|
}), Q(
|
|
4718
4675
|
() => t.loading,
|
|
4719
|
-
async (
|
|
4720
|
-
|
|
4676
|
+
async (k) => {
|
|
4677
|
+
k || l.value && _.value.length !== 0 && (await $e(), E());
|
|
4721
4678
|
}
|
|
4722
4679
|
), Q(
|
|
4723
4680
|
() => t.options,
|
|
@@ -4725,94 +4682,94 @@ const jo = {
|
|
|
4725
4682
|
o.value || (u.value = null, c.value = null);
|
|
4726
4683
|
}
|
|
4727
4684
|
);
|
|
4728
|
-
const P = (
|
|
4729
|
-
r.value.length >= t.minChars && !t.filterable && !t.loading && (l.value = !0),
|
|
4730
|
-
}, oe = (
|
|
4731
|
-
const T =
|
|
4732
|
-
i.value?.contains(T) || (l.value = !1, o.value ?
|
|
4733
|
-
}, ue = (
|
|
4685
|
+
const P = (k) => {
|
|
4686
|
+
r.value.length >= t.minChars && !t.filterable && !t.loading && (l.value = !0), h.value = !0, a("focus", k);
|
|
4687
|
+
}, oe = (k) => {
|
|
4688
|
+
const T = k.relatedTarget;
|
|
4689
|
+
i.value?.contains(T) || (l.value = !1, o.value ? $() : r.value = "", h.value = !1, a("blur", k));
|
|
4690
|
+
}, ue = (k, T) => {
|
|
4734
4691
|
const Y = i.value;
|
|
4735
|
-
if (!Y || t.isDisabled(
|
|
4692
|
+
if (!Y || t.isDisabled(k)) return;
|
|
4736
4693
|
l.value = !1, g(r.value), u.value = T, c.value = T;
|
|
4737
|
-
const
|
|
4738
|
-
|
|
4739
|
-
}, re = (
|
|
4740
|
-
if (!l.value && ["ArrowDown", "ArrowUp"].includes(
|
|
4741
|
-
l.value = !0, c.value = c.value ?? _.value.findIndex((T) => !t.isDisabled(T)),
|
|
4694
|
+
const p = t.getKey(k);
|
|
4695
|
+
p && p.toString().length > 0 ? Y.classList.add("filled") : Y.classList.remove("filled"), r.value = t.getValue(k), o.value = p, a("select", p);
|
|
4696
|
+
}, re = (k) => {
|
|
4697
|
+
if (!l.value && ["ArrowDown", "ArrowUp"].includes(k.key)) {
|
|
4698
|
+
l.value = !0, c.value = c.value ?? _.value.findIndex((T) => !t.isDisabled(T)), k.preventDefault();
|
|
4742
4699
|
return;
|
|
4743
4700
|
}
|
|
4744
4701
|
if (l.value) {
|
|
4745
|
-
if (
|
|
4702
|
+
if (k.key === "ArrowDown" && (F(1), k.preventDefault()), k.key === "ArrowUp" && (F(-1), k.preventDefault()), k.key === "Home") {
|
|
4746
4703
|
const T = q();
|
|
4747
|
-
T >= 0 && (c.value = T),
|
|
4704
|
+
T >= 0 && (c.value = T), k.preventDefault();
|
|
4748
4705
|
}
|
|
4749
|
-
if (
|
|
4750
|
-
const T =
|
|
4751
|
-
T >= 0 && (c.value = T),
|
|
4706
|
+
if (k.key === "End") {
|
|
4707
|
+
const T = H();
|
|
4708
|
+
T >= 0 && (c.value = T), k.preventDefault();
|
|
4752
4709
|
}
|
|
4753
|
-
if (
|
|
4710
|
+
if (k.key === "Enter") {
|
|
4754
4711
|
if (c.value === null) return;
|
|
4755
4712
|
const T = _.value[c.value];
|
|
4756
4713
|
if (!T || t.isDisabled(T)) return;
|
|
4757
|
-
ue(T, c.value), l.value = !1,
|
|
4714
|
+
ue(T, c.value), l.value = !1, k.preventDefault();
|
|
4758
4715
|
}
|
|
4759
|
-
|
|
4716
|
+
k.key === "Escape" && (l.value = !1);
|
|
4760
4717
|
}
|
|
4761
|
-
}, F = (
|
|
4718
|
+
}, F = (k) => {
|
|
4762
4719
|
if (c.value === null) return;
|
|
4763
4720
|
let T = c.value;
|
|
4764
4721
|
do
|
|
4765
|
-
T +=
|
|
4722
|
+
T += k;
|
|
4766
4723
|
while (T >= 0 && T < _.value.length && t.isDisabled(_.value[T]));
|
|
4767
4724
|
T >= 0 && T < _.value.length && (c.value = T);
|
|
4768
|
-
},
|
|
4725
|
+
}, R = () => {
|
|
4769
4726
|
r.value.length === 0 && (o.value = ""), r.value.length >= t.minChars ? (a("change", r.value), l.value = !0) : l.value = !1;
|
|
4770
|
-
},
|
|
4727
|
+
}, $ = () => {
|
|
4771
4728
|
if (o.value.toString().length === 0) return;
|
|
4772
|
-
const
|
|
4773
|
-
|
|
4729
|
+
const k = t.options.findIndex((T) => t.getKey(T) === o.value);
|
|
4730
|
+
k > -1 ? (c.value = k, u.value = k, r.value = t.getValue(t.options[k])) : r.value = o.value.toString();
|
|
4774
4731
|
};
|
|
4775
4732
|
Q(
|
|
4776
4733
|
[() => t.options.length, () => o.value],
|
|
4777
|
-
async ([
|
|
4778
|
-
T && (await $e(),
|
|
4734
|
+
async ([k, T]) => {
|
|
4735
|
+
T && (await $e(), $());
|
|
4779
4736
|
},
|
|
4780
4737
|
{ flush: "post", immediate: !0 }
|
|
4781
4738
|
);
|
|
4782
|
-
const
|
|
4739
|
+
const V = () => {
|
|
4783
4740
|
r.value = "", o.value = "";
|
|
4784
|
-
}, g = (
|
|
4785
|
-
!
|
|
4786
|
-
|
|
4787
|
-
...s.value.filter((T) => T !==
|
|
4788
|
-
].slice(0, t.suggestionsLimit), localStorage.setItem(
|
|
4789
|
-
}, D = (
|
|
4790
|
-
r.value =
|
|
4791
|
-
},
|
|
4792
|
-
const
|
|
4793
|
-
|
|
4794
|
-
}, q = () => _.value.findIndex((
|
|
4795
|
-
for (let
|
|
4741
|
+
}, g = (k) => {
|
|
4742
|
+
!k || k.trim().length === 0 || (s.value = [
|
|
4743
|
+
k,
|
|
4744
|
+
...s.value.filter((T) => T !== k)
|
|
4745
|
+
].slice(0, t.suggestionsLimit), localStorage.setItem(d.value, JSON.stringify(s.value)));
|
|
4746
|
+
}, D = (k) => {
|
|
4747
|
+
r.value = k, R();
|
|
4748
|
+
}, E = () => {
|
|
4749
|
+
const k = q();
|
|
4750
|
+
k >= 0 && (c.value = k);
|
|
4751
|
+
}, q = () => _.value.findIndex((k) => !t.isDisabled(k)), H = () => {
|
|
4752
|
+
for (let k = _.value.length - 1; k >= 0; k--) if (!t.isDisabled(_.value[k])) return k;
|
|
4796
4753
|
return -1;
|
|
4797
4754
|
};
|
|
4798
|
-
return ve(() =>
|
|
4799
|
-
class: fe(["autocomplete", { required: N(z), error: e.invalid, "has-icon": Object.keys(
|
|
4755
|
+
return ve(() => $()), (k, T) => (f(), b("div", {
|
|
4756
|
+
class: fe(["autocomplete", { required: N(z), error: e.invalid, "has-icon": Object.keys(k.$slots).includes("icon"), filled: x.value, focused: h.value }]),
|
|
4800
4757
|
ref_key: "autocompleteRef",
|
|
4801
4758
|
ref: i
|
|
4802
4759
|
}, [
|
|
4803
|
-
|
|
4760
|
+
M("label", {
|
|
4804
4761
|
for: e.id,
|
|
4805
4762
|
class: "label"
|
|
4806
4763
|
}, K(e.label), 9, n2),
|
|
4807
|
-
_e(
|
|
4764
|
+
_e(M("input", be({
|
|
4808
4765
|
id: e.id,
|
|
4809
4766
|
type: e.type
|
|
4810
|
-
},
|
|
4767
|
+
}, k.$attrs, {
|
|
4811
4768
|
role: "combobox",
|
|
4812
4769
|
"aria-autocomplete": "list",
|
|
4813
4770
|
"aria-expanded": l.value,
|
|
4814
|
-
"aria-controls":
|
|
4815
|
-
"aria-activedescendant":
|
|
4771
|
+
"aria-controls": C,
|
|
4772
|
+
"aria-activedescendant": S.value,
|
|
4816
4773
|
"aria-required": N(z),
|
|
4817
4774
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4818
4775
|
disabled: e.disabled ? !0 : void 0,
|
|
@@ -4820,69 +4777,69 @@ const jo = {
|
|
|
4820
4777
|
"onUpdate:modelValue": T[0] || (T[0] = (Y) => r.value = Y),
|
|
4821
4778
|
onFocus: P,
|
|
4822
4779
|
onBlur: oe,
|
|
4823
|
-
onInput:
|
|
4780
|
+
onInput: R,
|
|
4824
4781
|
onKeydown: re
|
|
4825
4782
|
}), null, 16, o2), [
|
|
4826
4783
|
[jt, r.value]
|
|
4827
4784
|
]),
|
|
4828
4785
|
U(Ae, { name: "select" }, {
|
|
4829
4786
|
default: J(() => [
|
|
4830
|
-
_e(
|
|
4831
|
-
id:
|
|
4787
|
+
_e(M("ul", {
|
|
4788
|
+
id: C,
|
|
4832
4789
|
role: "listbox",
|
|
4833
4790
|
class: "options"
|
|
4834
4791
|
}, [
|
|
4835
|
-
_.value.length > 0 ? (
|
|
4836
|
-
id: `${
|
|
4792
|
+
_.value.length > 0 ? (f(!0), b(de, { key: 0 }, he(_.value, (Y, p) => (f(), b("li", {
|
|
4793
|
+
id: `${C}-option-${p}`,
|
|
4837
4794
|
key: e.getKey(Y),
|
|
4838
4795
|
role: "option",
|
|
4839
|
-
class: fe(["option", { "focus-visible": c.value ===
|
|
4796
|
+
class: fe(["option", { "focus-visible": c.value === p }]),
|
|
4840
4797
|
"aria-disabled": t.isDisabled(Y) || void 0,
|
|
4841
|
-
"aria-selected":
|
|
4798
|
+
"aria-selected": p === u.value,
|
|
4842
4799
|
onMousedown: T[1] || (T[1] = se(() => {
|
|
4843
4800
|
}, ["prevent"])),
|
|
4844
|
-
onClick: (
|
|
4801
|
+
onClick: (v) => !t.isDisabled(Y) && ue(Y, p)
|
|
4845
4802
|
}, [
|
|
4846
|
-
t.isDisabled(Y) ? O("", !0) : (
|
|
4803
|
+
t.isDisabled(Y) ? O("", !0) : (f(), ae(Ce, {
|
|
4847
4804
|
key: 0,
|
|
4848
4805
|
name: "search",
|
|
4849
4806
|
size: 22
|
|
4850
4807
|
})),
|
|
4851
|
-
G(
|
|
4808
|
+
G(k.$slots, "option", {
|
|
4852
4809
|
option: Y,
|
|
4853
4810
|
value: e.getValue(Y),
|
|
4854
4811
|
query: r.value,
|
|
4855
|
-
selected:
|
|
4856
|
-
active:
|
|
4812
|
+
selected: p === u.value,
|
|
4813
|
+
active: p === c.value
|
|
4857
4814
|
}, () => [
|
|
4858
|
-
|
|
4815
|
+
M("div", r2, [
|
|
4859
4816
|
U(zo, {
|
|
4860
4817
|
text: e.getValue(Y),
|
|
4861
4818
|
query: r.value
|
|
4862
4819
|
}, null, 8, ["text", "query"])
|
|
4863
4820
|
])
|
|
4864
4821
|
], !0),
|
|
4865
|
-
|
|
4866
|
-
], 42, l2))), 128)) : _.value.length === 0 && !e.loading ? (
|
|
4867
|
-
|
|
4868
|
-
])])) : (
|
|
4822
|
+
M("div", s2, K(e.getValue(Y)), 1)
|
|
4823
|
+
], 42, l2))), 128)) : _.value.length === 0 && !e.loading ? (f(), b("li", i2, [...T[3] || (T[3] = [
|
|
4824
|
+
M("div", { class: "option-value" }, "No results found", -1)
|
|
4825
|
+
])])) : (f(), ae(qt, {
|
|
4869
4826
|
key: 2,
|
|
4870
4827
|
"aria-live": "polite",
|
|
4871
4828
|
role: "status",
|
|
4872
4829
|
message: "Loading"
|
|
4873
4830
|
})),
|
|
4874
|
-
|
|
4875
|
-
|
|
4831
|
+
L.value ? (f(), b("li", u2, [...T[4] || (T[4] = [
|
|
4832
|
+
M("div", { class: "option-value" }, " Recents ", -1)
|
|
4876
4833
|
])])) : O("", !0),
|
|
4877
|
-
(
|
|
4834
|
+
(f(!0), b(de, null, he(s.value, (Y) => (f(), b("li", {
|
|
4878
4835
|
key: Y,
|
|
4879
4836
|
role: "presentation",
|
|
4880
4837
|
"aria-hidden": "true",
|
|
4881
4838
|
class: "option recent-item",
|
|
4882
|
-
onClick: (
|
|
4839
|
+
onClick: (p) => D(Y)
|
|
4883
4840
|
}, [
|
|
4884
4841
|
U(Ce, { name: "clock" }),
|
|
4885
|
-
|
|
4842
|
+
M("div", d2, K(Y), 1)
|
|
4886
4843
|
], 8, c2))), 128))
|
|
4887
4844
|
], 512), [
|
|
4888
4845
|
[rt, l.value]
|
|
@@ -4890,10 +4847,10 @@ const jo = {
|
|
|
4890
4847
|
]),
|
|
4891
4848
|
_: 3
|
|
4892
4849
|
}),
|
|
4893
|
-
|
|
4894
|
-
G(
|
|
4850
|
+
k.$slots.icon ? (f(), b("span", v2, [
|
|
4851
|
+
G(k.$slots, "icon", {}, void 0, !0)
|
|
4895
4852
|
])) : O("", !0),
|
|
4896
|
-
r.value.length > 0 && !e.disabled ? (
|
|
4853
|
+
r.value.length > 0 && !e.disabled ? (f(), ae(Le, {
|
|
4897
4854
|
key: 1,
|
|
4898
4855
|
type: "button",
|
|
4899
4856
|
class: "btn btn-icon",
|
|
@@ -4902,7 +4859,7 @@ const jo = {
|
|
|
4902
4859
|
"\\": "",
|
|
4903
4860
|
onMousedown: T[2] || (T[2] = se(() => {
|
|
4904
4861
|
}, ["prevent"])),
|
|
4905
|
-
onClick:
|
|
4862
|
+
onClick: V
|
|
4906
4863
|
}, {
|
|
4907
4864
|
default: J(() => [
|
|
4908
4865
|
U(Ce, {
|
|
@@ -4916,18 +4873,18 @@ const jo = {
|
|
|
4916
4873
|
})) : O("", !0)
|
|
4917
4874
|
], 2));
|
|
4918
4875
|
}
|
|
4919
|
-
}), ir = /* @__PURE__ */ W(f2, [["__scopeId", "data-v-7b61315b"]]),
|
|
4876
|
+
}), ir = /* @__PURE__ */ W(f2, [["__scopeId", "data-v-7b61315b"]]), p2 = 5, we = ut({
|
|
4920
4877
|
toasts: []
|
|
4921
4878
|
});
|
|
4922
|
-
let
|
|
4879
|
+
let m2 = 0;
|
|
4923
4880
|
const Ze = (e, n = "info") => {
|
|
4924
4881
|
const t = {
|
|
4925
|
-
id: `toast-${
|
|
4882
|
+
id: `toast-${m2++}`,
|
|
4926
4883
|
duration: 4e3,
|
|
4927
4884
|
...typeof e == "string" ? { description: e } : e,
|
|
4928
4885
|
variant: n
|
|
4929
4886
|
};
|
|
4930
|
-
return we.toasts.push(t), we.toasts.length >
|
|
4887
|
+
return we.toasts.push(t), we.toasts.length > p2 && we.toasts.shift(), t.id;
|
|
4931
4888
|
}, C2 = (e, n) => we.toasts = we.toasts.map((t) => t.id === e ? { ...t, ...n, loading: !1 } : t), ur = Object.assign(
|
|
4932
4889
|
(e) => Ze(e),
|
|
4933
4890
|
{
|
|
@@ -4956,7 +4913,7 @@ const Ze = (e, n = "info") => {
|
|
|
4956
4913
|
focus: { type: Boolean }
|
|
4957
4914
|
},
|
|
4958
4915
|
setup(e) {
|
|
4959
|
-
const n = e, t =
|
|
4916
|
+
const n = e, t = w(null), a = w("open"), o = w(100);
|
|
4960
4917
|
let i = Date.now(), r;
|
|
4961
4918
|
const l = () => {
|
|
4962
4919
|
const u = Date.now() - i;
|
|
@@ -4980,7 +4937,7 @@ const Ze = (e, n = "info") => {
|
|
|
4980
4937
|
const c = () => {
|
|
4981
4938
|
cancelAnimationFrame(r), a.value = "closing", setTimeout(() => we.toasts = we.toasts.filter((u) => u.id !== n.id), b2);
|
|
4982
4939
|
};
|
|
4983
|
-
return ve(() => n.variant === "error" && n.focus && t.value?.focus()), Se(() => cancelAnimationFrame(r)), (u,
|
|
4940
|
+
return ve(() => n.variant === "error" && n.focus && t.value?.focus()), Se(() => cancelAnimationFrame(r)), (u, d) => (f(), b("div", {
|
|
4984
4941
|
ref_key: "rootRef",
|
|
4985
4942
|
ref: t,
|
|
4986
4943
|
tabindex: "-1",
|
|
@@ -4992,7 +4949,7 @@ const Ze = (e, n = "info") => {
|
|
|
4992
4949
|
"aria-atomic": "true",
|
|
4993
4950
|
"aria-describedby": e.loading ? void 0 : `toast-desc-${e.id}`
|
|
4994
4951
|
}, [
|
|
4995
|
-
|
|
4952
|
+
M("div", g2, [
|
|
4996
4953
|
G(u.$slots, "default", {}, void 0, !0),
|
|
4997
4954
|
U(Le, {
|
|
4998
4955
|
type: "button",
|
|
@@ -5009,8 +4966,8 @@ const Ze = (e, n = "info") => {
|
|
|
5009
4966
|
_: 1
|
|
5010
4967
|
}, 8, ["aria-label"])
|
|
5011
4968
|
]),
|
|
5012
|
-
e.duration !== 1 / 0 ? (
|
|
5013
|
-
|
|
4969
|
+
e.duration !== 1 / 0 ? (f(), b("div", y2, [
|
|
4970
|
+
M("div", {
|
|
5014
4971
|
class: "bar",
|
|
5015
4972
|
style: Ie({ width: o.value + "%" })
|
|
5016
4973
|
}, null, 4)
|
|
@@ -5020,11 +4977,11 @@ const Ze = (e, n = "info") => {
|
|
|
5020
4977
|
}), w2 = /* @__PURE__ */ W(k2, [["__scopeId", "data-v-f9e75b9d"]]), M2 = { class: "toast-viewport" }, L2 = { class: "toast-message" }, x2 = { key: 0 }, $2 = ["id"], I2 = /* @__PURE__ */ Z({
|
|
5021
4978
|
__name: "ToastViewport",
|
|
5022
4979
|
setup(e) {
|
|
5023
|
-
return (n, t) => (
|
|
5024
|
-
|
|
4980
|
+
return (n, t) => (f(), ae(Fe, { to: "body" }, [
|
|
4981
|
+
M("div", M2, [
|
|
5025
4982
|
U(Wt, { name: "toast-stack" }, {
|
|
5026
4983
|
default: J(() => [
|
|
5027
|
-
(
|
|
4984
|
+
(f(!0), b(de, null, he(N(we).toasts, (a) => (f(), ae(w2, {
|
|
5028
4985
|
key: a.id,
|
|
5029
4986
|
id: a.id,
|
|
5030
4987
|
duration: a.duration,
|
|
@@ -5032,13 +4989,13 @@ const Ze = (e, n = "info") => {
|
|
|
5032
4989
|
loading: a.loading
|
|
5033
4990
|
}, {
|
|
5034
4991
|
default: J(() => [
|
|
5035
|
-
|
|
5036
|
-
a.title ? (
|
|
5037
|
-
a.loading ? (
|
|
4992
|
+
M("div", L2, [
|
|
4993
|
+
a.title ? (f(), b("strong", x2, K(a.title), 1)) : O("", !0),
|
|
4994
|
+
a.loading ? (f(), ae(qt, {
|
|
5038
4995
|
key: 1,
|
|
5039
4996
|
message: a.description,
|
|
5040
4997
|
"aria-hidden": "true"
|
|
5041
|
-
}, null, 8, ["message"])) : (
|
|
4998
|
+
}, null, 8, ["message"])) : (f(), b("p", {
|
|
5042
4999
|
key: 2,
|
|
5043
5000
|
id: `toast-desc-${a.id}`
|
|
5044
5001
|
}, K(a.description), 9, $2))
|
|
@@ -5120,39 +5077,39 @@ const E2 = {
|
|
|
5120
5077
|
}, N2 = { class: "actions" }, O2 = /* @__PURE__ */ Z({
|
|
5121
5078
|
__name: "ConfirmModal",
|
|
5122
5079
|
setup(e) {
|
|
5123
|
-
const n =
|
|
5080
|
+
const n = A(() => Ve.current), t = () => {
|
|
5124
5081
|
n && _2();
|
|
5125
5082
|
}, a = () => {
|
|
5126
5083
|
n.value && A2();
|
|
5127
5084
|
}, o = (i) => i.key === "Escape" && n && a();
|
|
5128
|
-
return ve(() => window.addEventListener("keydown", o)), Se(() => window.removeEventListener("keydown", o)), (i, r) => (
|
|
5085
|
+
return ve(() => window.addEventListener("keydown", o)), Se(() => window.removeEventListener("keydown", o)), (i, r) => (f(), ae(Fe, { to: "body" }, [
|
|
5129
5086
|
U(Ae, { name: "fade" }, {
|
|
5130
5087
|
default: J(() => [
|
|
5131
|
-
n.value ? (
|
|
5088
|
+
n.value ? (f(), b("div", {
|
|
5132
5089
|
key: n.value.id,
|
|
5133
5090
|
class: "overlay",
|
|
5134
5091
|
onClick: se(a, ["self"])
|
|
5135
5092
|
}, [
|
|
5136
5093
|
U(Ae, { name: "scale" }, {
|
|
5137
5094
|
default: J(() => [
|
|
5138
|
-
|
|
5139
|
-
|
|
5095
|
+
M("div", E2, [
|
|
5096
|
+
M("div", {
|
|
5140
5097
|
class: "icon",
|
|
5141
5098
|
"data-type": n.value.type
|
|
5142
5099
|
}, [
|
|
5143
|
-
r[0] || (r[0] =
|
|
5144
|
-
n.value.type === "success" ? (
|
|
5145
|
-
n.value.type === "error" ? (
|
|
5146
|
-
n.value.type === "warning" ? (
|
|
5100
|
+
r[0] || (r[0] = M("span", { class: "icon__circle" }, null, -1)),
|
|
5101
|
+
n.value.type === "success" ? (f(), b("span", S2)) : O("", !0),
|
|
5102
|
+
n.value.type === "error" ? (f(), b("span", T2)) : O("", !0),
|
|
5103
|
+
n.value.type === "warning" ? (f(), b("span", D2)) : O("", !0)
|
|
5147
5104
|
], 8, R2),
|
|
5148
|
-
n.value.title ? (
|
|
5149
|
-
n.value.text ? (
|
|
5150
|
-
|
|
5151
|
-
|
|
5105
|
+
n.value.title ? (f(), b("h3", Z2, K(n.value.title), 1)) : O("", !0),
|
|
5106
|
+
n.value.text ? (f(), b("p", z2, K(n.value.text), 1)) : O("", !0),
|
|
5107
|
+
M("div", N2, [
|
|
5108
|
+
M("button", {
|
|
5152
5109
|
class: "btn btn--ghost",
|
|
5153
5110
|
onClick: a
|
|
5154
5111
|
}, K(n.value.cancelText), 1),
|
|
5155
|
-
|
|
5112
|
+
M("button", {
|
|
5156
5113
|
class: "btn btn--primary",
|
|
5157
5114
|
onClick: t
|
|
5158
5115
|
}, K(n.value.confirmText), 1)
|
|
@@ -5186,10 +5143,10 @@ const dr = {
|
|
|
5186
5143
|
},
|
|
5187
5144
|
emits: ["click"],
|
|
5188
5145
|
setup(e, { emit: n }) {
|
|
5189
|
-
const t = e, a = n, o =
|
|
5146
|
+
const t = e, a = n, o = w(), i = w();
|
|
5190
5147
|
He("card:labelId", o), He("card:descriptionId", i);
|
|
5191
|
-
const r =
|
|
5192
|
-
return (s, c) => (
|
|
5148
|
+
const r = A(() => t.clickable && t.as !== "button" && t.as !== "a"), l = () => t.clickable && a("click");
|
|
5149
|
+
return (s, c) => (f(), ae(Ne(e.as), {
|
|
5193
5150
|
class: fe(["rs-card", { clickable: e.clickable }]),
|
|
5194
5151
|
tabindex: r.value ? 0 : void 0,
|
|
5195
5152
|
role: r.value ? "button" : void 0,
|
|
@@ -5213,8 +5170,8 @@ const dr = {
|
|
|
5213
5170
|
as: { default: "div" }
|
|
5214
5171
|
},
|
|
5215
5172
|
setup(e) {
|
|
5216
|
-
const n =
|
|
5217
|
-
return ve(() => n && (n.value = t)), (a, o) => (
|
|
5173
|
+
const n = me("card:labelId", void 0), t = `rs-card-label-${ge()}`;
|
|
5174
|
+
return ve(() => n && (n.value = t)), (a, o) => (f(), ae(Ne(e.as), {
|
|
5218
5175
|
id: t,
|
|
5219
5176
|
class: "rs-card-header"
|
|
5220
5177
|
}, {
|
|
@@ -5227,28 +5184,28 @@ const dr = {
|
|
|
5227
5184
|
}), fr = /* @__PURE__ */ W(F2, [["__scopeId", "data-v-570794b4"]]), P2 = /* @__PURE__ */ Z({
|
|
5228
5185
|
__name: "CardBody",
|
|
5229
5186
|
setup(e) {
|
|
5230
|
-
const n =
|
|
5231
|
-
return ve(() => n && (n.value = t)), (a, o) => (
|
|
5187
|
+
const n = me("card:descriptionId", void 0), t = `rs-card-desc-${ge()}`;
|
|
5188
|
+
return ve(() => n && (n.value = t)), (a, o) => (f(), b("div", {
|
|
5232
5189
|
id: t,
|
|
5233
5190
|
class: "rs-card-body"
|
|
5234
5191
|
}, [
|
|
5235
5192
|
G(a.$slots, "default", {}, void 0, !0)
|
|
5236
5193
|
]));
|
|
5237
5194
|
}
|
|
5238
|
-
}),
|
|
5195
|
+
}), pr = /* @__PURE__ */ W(P2, [["__scopeId", "data-v-f0380fda"]]), U2 = /* @__PURE__ */ Z({
|
|
5239
5196
|
__name: "CardFooter",
|
|
5240
5197
|
props: {
|
|
5241
5198
|
as: { default: "div" }
|
|
5242
5199
|
},
|
|
5243
5200
|
setup(e) {
|
|
5244
|
-
return (n, t) => (
|
|
5201
|
+
return (n, t) => (f(), ae(Ne(e.as), { class: "rs-card-footer" }, {
|
|
5245
5202
|
default: J(() => [
|
|
5246
5203
|
G(n.$slots, "default", {}, void 0, !0)
|
|
5247
5204
|
]),
|
|
5248
5205
|
_: 3
|
|
5249
5206
|
}));
|
|
5250
5207
|
}
|
|
5251
|
-
}),
|
|
5208
|
+
}), mr = /* @__PURE__ */ W(U2, [["__scopeId", "data-v-9b223473"]]), K2 = ["data-status", "data-orientation", "data-active", "data-completed", "aria-labelledby", "tabindex", "aria-current", "aria-posinset", "aria-setsize", "aria-describedby"], j2 = {
|
|
5252
5209
|
key: 2,
|
|
5253
5210
|
class: "icon",
|
|
5254
5211
|
"aria-hidden": "true",
|
|
@@ -5273,13 +5230,13 @@ const dr = {
|
|
|
5273
5230
|
size: { default: "sm" }
|
|
5274
5231
|
},
|
|
5275
5232
|
setup(e) {
|
|
5276
|
-
const n = e, t =
|
|
5233
|
+
const n = e, t = me("StepsContext");
|
|
5277
5234
|
if (!t) throw new Error("Step component must be used inside Steps.");
|
|
5278
|
-
const a = it(), o =
|
|
5235
|
+
const a = it(), o = w(null), i = w(null), r = A(() => t.orientation ?? "horizontal");
|
|
5279
5236
|
let l = null, s = null;
|
|
5280
|
-
const c =
|
|
5237
|
+
const c = me("StepIndex");
|
|
5281
5238
|
if (c == null) throw new Error("StepIndex component must be used inside Steps.");
|
|
5282
|
-
const u =
|
|
5239
|
+
const u = A(() => n.status ? n.status : c < t.current.value ? "completed" : c === t.current.value ? "active" : "pending"), d = A(() => t?.icons?.[u.value]), m = A(() => a.icon ? "slot" : n.icon ? n.icon : d.value), C = A(() => {
|
|
5283
5240
|
switch (u.value) {
|
|
5284
5241
|
case "completed":
|
|
5285
5242
|
return "Stage completed";
|
|
@@ -5290,7 +5247,7 @@ const dr = {
|
|
|
5290
5247
|
default:
|
|
5291
5248
|
return "Stage pending";
|
|
5292
5249
|
}
|
|
5293
|
-
}),
|
|
5250
|
+
}), h = A(() => {
|
|
5294
5251
|
switch (u.value) {
|
|
5295
5252
|
case "completed":
|
|
5296
5253
|
return "success";
|
|
@@ -5301,7 +5258,7 @@ const dr = {
|
|
|
5301
5258
|
default:
|
|
5302
5259
|
return "default";
|
|
5303
5260
|
}
|
|
5304
|
-
}),
|
|
5261
|
+
}), x = A(() => n.size ?? t.size ?? "sm"), B = A(() => {
|
|
5305
5262
|
switch (u.value) {
|
|
5306
5263
|
case "completed":
|
|
5307
5264
|
return t.tagTitles.completed;
|
|
@@ -5318,11 +5275,11 @@ const dr = {
|
|
|
5318
5275
|
(z) => t.registerStepStatus(c, z),
|
|
5319
5276
|
{ immediate: !0 }
|
|
5320
5277
|
);
|
|
5321
|
-
const
|
|
5278
|
+
const S = () => {
|
|
5322
5279
|
l == null && (l = requestAnimationFrame(() => {
|
|
5323
|
-
l = null,
|
|
5280
|
+
l = null, L();
|
|
5324
5281
|
}));
|
|
5325
|
-
},
|
|
5282
|
+
}, L = () => {
|
|
5326
5283
|
if (!o.value || !i.value) return;
|
|
5327
5284
|
const z = i.value.getBoundingClientRect(), P = t.stepsRef.value.getBoundingClientRect(), oe = t.orientation === "vertical" ? z.top + z.height / 2 - P.top : z.left + z.width / 2 - P.left;
|
|
5328
5285
|
t.registerIndicatorCenter(c, oe);
|
|
@@ -5354,16 +5311,16 @@ const dr = {
|
|
|
5354
5311
|
};
|
|
5355
5312
|
return ve(() => {
|
|
5356
5313
|
!o.value || !i.value || (requestAnimationFrame(() => {
|
|
5357
|
-
requestAnimationFrame(
|
|
5314
|
+
requestAnimationFrame(L);
|
|
5358
5315
|
}), s = new ResizeObserver(() => {
|
|
5359
|
-
|
|
5316
|
+
S();
|
|
5360
5317
|
}), s.observe(o.value), s.observe(i.value), t.stepsRef.value && s.observe(t.stepsRef.value), t.registerStep(o.value));
|
|
5361
5318
|
}), Be(() => {
|
|
5362
5319
|
s?.disconnect(), t.unregisterStep(o.value), l != null && cancelAnimationFrame(l);
|
|
5363
|
-
}), (z, P) => (
|
|
5320
|
+
}), (z, P) => (f(), b("li", {
|
|
5364
5321
|
ref_key: "stepRef",
|
|
5365
5322
|
ref: o,
|
|
5366
|
-
class: fe(["step", `step__${
|
|
5323
|
+
class: fe(["step", `step__${x.value}`]),
|
|
5367
5324
|
role: "listitem",
|
|
5368
5325
|
"data-status": u.value,
|
|
5369
5326
|
"data-orientation": r.value,
|
|
@@ -5377,7 +5334,7 @@ const dr = {
|
|
|
5377
5334
|
"aria-describedby": `step-status-${N(c)}`,
|
|
5378
5335
|
onKeydown: _
|
|
5379
5336
|
}, [
|
|
5380
|
-
|
|
5337
|
+
M("span", {
|
|
5381
5338
|
ref_key: "indicatorRef",
|
|
5382
5339
|
ref: i,
|
|
5383
5340
|
class: "indicator",
|
|
@@ -5386,42 +5343,42 @@ const dr = {
|
|
|
5386
5343
|
z.$slots.icon ? G(z.$slots, "icon", {
|
|
5387
5344
|
key: 0,
|
|
5388
5345
|
status: u.value
|
|
5389
|
-
}, void 0, !0) :
|
|
5346
|
+
}, void 0, !0) : m.value ? (f(), ae(Ce, {
|
|
5390
5347
|
key: 1,
|
|
5391
|
-
name:
|
|
5348
|
+
name: m.value,
|
|
5392
5349
|
class: "icon"
|
|
5393
5350
|
}, null, 8, ["name"])) : O("", !0),
|
|
5394
|
-
u.value === "completed" ? (
|
|
5395
|
-
|
|
5351
|
+
u.value === "completed" ? (f(), b("svg", j2, [...P[0] || (P[0] = [
|
|
5352
|
+
M("path", {
|
|
5396
5353
|
d: "M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",
|
|
5397
5354
|
fill: "currentColor"
|
|
5398
5355
|
}, null, -1)
|
|
5399
|
-
])])) : u.value === "error" ? (
|
|
5400
|
-
|
|
5356
|
+
])])) : u.value === "error" ? (f(), b("svg", W2, [...P[1] || (P[1] = [
|
|
5357
|
+
M("path", {
|
|
5401
5358
|
d: "M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",
|
|
5402
5359
|
fill: "currentColor"
|
|
5403
5360
|
}, null, -1)
|
|
5404
|
-
])])) : u.value === "active" ? (
|
|
5361
|
+
])])) : u.value === "active" ? (f(), b("span", Y2)) : O("", !0)
|
|
5405
5362
|
], 512),
|
|
5406
|
-
|
|
5363
|
+
M("span", {
|
|
5407
5364
|
id: `step-status-${N(c)}`,
|
|
5408
5365
|
class: "sr-only"
|
|
5409
|
-
}, K(
|
|
5410
|
-
|
|
5411
|
-
|
|
5366
|
+
}, K(C.value), 9, X2),
|
|
5367
|
+
M("div", G2, [
|
|
5368
|
+
M("span", {
|
|
5412
5369
|
id: `step-title-${N(c)}`,
|
|
5413
5370
|
class: "title"
|
|
5414
5371
|
}, K(e.title), 9, J2),
|
|
5415
5372
|
U(Hn, {
|
|
5416
|
-
variant:
|
|
5373
|
+
variant: h.value,
|
|
5417
5374
|
size: "sm"
|
|
5418
5375
|
}, {
|
|
5419
5376
|
default: J(() => [
|
|
5420
|
-
Me(K(
|
|
5377
|
+
Me(K(B.value), 1)
|
|
5421
5378
|
]),
|
|
5422
5379
|
_: 1
|
|
5423
5380
|
}, 8, ["variant"]),
|
|
5424
|
-
z.$slots.default ? (
|
|
5381
|
+
z.$slots.default ? (f(), b("span", Q2, [
|
|
5425
5382
|
G(z.$slots, "default", {}, void 0, !0)
|
|
5426
5383
|
])) : O("", !0)
|
|
5427
5384
|
])
|
|
@@ -5460,13 +5417,13 @@ const dr = {
|
|
|
5460
5417
|
}),
|
|
5461
5418
|
emits: ["update:modelValue"],
|
|
5462
5419
|
setup(e) {
|
|
5463
|
-
const n = e, t =
|
|
5464
|
-
let
|
|
5465
|
-
const
|
|
5420
|
+
const n = e, t = w(0), a = it(), o = ke(e, "modelValue"), i = w([]), r = w(null), l = A(() => o.value ?? 0), s = `steps-description-${ge()}`, c = Yt({}), u = ut({});
|
|
5421
|
+
let d = null;
|
|
5422
|
+
const m = A(() => (a.default?.() ?? [])[l.value]?.props?.title ?? ""), C = A(() => Object.entries(u).filter(([, F]) => F !== "completed").length === 0), h = A(
|
|
5466
5423
|
() => Object.values(u).includes("error")
|
|
5467
|
-
),
|
|
5468
|
-
const F = l.value,
|
|
5469
|
-
if (
|
|
5424
|
+
), x = A(() => {
|
|
5425
|
+
const F = l.value, R = c;
|
|
5426
|
+
if (R.value[0] == null || R.value[F] == null)
|
|
5470
5427
|
return n.orientation === "vertical" ? {
|
|
5471
5428
|
height: "100%",
|
|
5472
5429
|
top: "0px"
|
|
@@ -5474,31 +5431,31 @@ const dr = {
|
|
|
5474
5431
|
width: "100%",
|
|
5475
5432
|
left: "0px"
|
|
5476
5433
|
};
|
|
5477
|
-
const
|
|
5434
|
+
const $ = R.value[0], V = R.value[F];
|
|
5478
5435
|
return n.orientation === "vertical" ? {
|
|
5479
|
-
top: `${
|
|
5480
|
-
height: `${
|
|
5436
|
+
top: `${$}px`,
|
|
5437
|
+
height: `${V - $}px`
|
|
5481
5438
|
} : {
|
|
5482
|
-
left: `${
|
|
5483
|
-
width: `${
|
|
5439
|
+
left: `${$}px`,
|
|
5440
|
+
width: `${V - $}px`
|
|
5484
5441
|
};
|
|
5485
|
-
}),
|
|
5486
|
-
const F = Object.values(c.value).sort((
|
|
5442
|
+
}), B = A(() => {
|
|
5443
|
+
const F = Object.values(c.value).sort((V, g) => V - g);
|
|
5487
5444
|
if (F.length < 2) return {};
|
|
5488
|
-
const
|
|
5445
|
+
const R = F[0], $ = F[F.length - 1];
|
|
5489
5446
|
return n.orientation === "vertical" ? {
|
|
5490
|
-
top: `${
|
|
5491
|
-
height: `${
|
|
5447
|
+
top: `${R}px`,
|
|
5448
|
+
height: `${$ - R}px`
|
|
5492
5449
|
} : {
|
|
5493
|
-
left: `${
|
|
5494
|
-
right: `calc(100% - ${
|
|
5450
|
+
left: `${R}px`,
|
|
5451
|
+
right: `calc(100% - ${$}px)`
|
|
5495
5452
|
};
|
|
5496
|
-
}),
|
|
5497
|
-
function
|
|
5453
|
+
}), S = (F, R) => c.value = { ...c.value, [F]: R };
|
|
5454
|
+
function L(F) {
|
|
5498
5455
|
i.value.push(F), t.value = i.value.length;
|
|
5499
5456
|
}
|
|
5500
5457
|
function _(F) {
|
|
5501
|
-
i.value = i.value.filter((
|
|
5458
|
+
i.value = i.value.filter((R) => R !== F), t.value = i.value.length;
|
|
5502
5459
|
}
|
|
5503
5460
|
function z(F) {
|
|
5504
5461
|
F < 0 || F >= i.value.length || (o.value = F, i.value[F]?.focus());
|
|
@@ -5516,10 +5473,10 @@ const dr = {
|
|
|
5516
5473
|
z(t.value - 1);
|
|
5517
5474
|
}
|
|
5518
5475
|
return ve(() => {
|
|
5519
|
-
r.value && (
|
|
5520
|
-
}),
|
|
5521
|
-
}), Be(() =>
|
|
5522
|
-
current:
|
|
5476
|
+
r.value && (d = new ResizeObserver(() => {
|
|
5477
|
+
}), d.observe(r.value));
|
|
5478
|
+
}), Be(() => d?.disconnect()), He("StepsContext", {
|
|
5479
|
+
current: A(() => o.value),
|
|
5523
5480
|
update: (F) => o.value = F,
|
|
5524
5481
|
stepsCount: t,
|
|
5525
5482
|
icons: n.icons,
|
|
@@ -5527,19 +5484,19 @@ const dr = {
|
|
|
5527
5484
|
orientation: n.orientation,
|
|
5528
5485
|
stepStatusMap: u,
|
|
5529
5486
|
stepsRef: r,
|
|
5530
|
-
registerStepStatus: (F,
|
|
5531
|
-
u[F] =
|
|
5487
|
+
registerStepStatus: (F, R) => {
|
|
5488
|
+
u[F] = R;
|
|
5532
5489
|
},
|
|
5533
|
-
registerIndicatorCenter:
|
|
5534
|
-
registerStep:
|
|
5490
|
+
registerIndicatorCenter: S,
|
|
5491
|
+
registerStep: L,
|
|
5535
5492
|
unregisterStep: _,
|
|
5536
5493
|
focusNext: P,
|
|
5537
5494
|
focusPrev: oe,
|
|
5538
5495
|
focusFirst: ue,
|
|
5539
5496
|
focusLast: re,
|
|
5540
5497
|
tagTitles: n.tagTitles
|
|
5541
|
-
}), (F,
|
|
5542
|
-
|
|
5498
|
+
}), (F, R) => (f(), b(de, null, [
|
|
5499
|
+
M("ol", {
|
|
5543
5500
|
ref_key: "stepsRef",
|
|
5544
5501
|
ref: r,
|
|
5545
5502
|
class: "steps",
|
|
@@ -5548,33 +5505,33 @@ const dr = {
|
|
|
5548
5505
|
"data-orientation": n.orientation,
|
|
5549
5506
|
"aria-describedby": s
|
|
5550
5507
|
}, [
|
|
5551
|
-
|
|
5508
|
+
M("p", {
|
|
5552
5509
|
id: s,
|
|
5553
5510
|
class: "sr-only"
|
|
5554
5511
|
}, " This is a multi-step process. Use arrow keys to navigate between steps. "),
|
|
5555
|
-
|
|
5512
|
+
M("div", {
|
|
5556
5513
|
class: "track",
|
|
5557
5514
|
"aria-hidden": "true",
|
|
5558
|
-
style: Ie(
|
|
5515
|
+
style: Ie(B.value)
|
|
5559
5516
|
}, [
|
|
5560
|
-
|
|
5517
|
+
M("div", {
|
|
5561
5518
|
class: "track-progress",
|
|
5562
|
-
"data-error":
|
|
5563
|
-
"data-completed":
|
|
5564
|
-
style: Ie(
|
|
5519
|
+
"data-error": h.value,
|
|
5520
|
+
"data-completed": C.value,
|
|
5521
|
+
style: Ie(x.value)
|
|
5565
5522
|
}, null, 12, nl)
|
|
5566
5523
|
], 4),
|
|
5567
|
-
(
|
|
5568
|
-
key:
|
|
5569
|
-
index:
|
|
5524
|
+
(f(!0), b(de, null, he(F.$slots.default?.(), ($, V) => (f(), ae(tl, {
|
|
5525
|
+
key: V,
|
|
5526
|
+
index: V
|
|
5570
5527
|
}, {
|
|
5571
5528
|
default: J(() => [
|
|
5572
|
-
(
|
|
5529
|
+
(f(), ae(Ne($)))
|
|
5573
5530
|
]),
|
|
5574
5531
|
_: 2
|
|
5575
5532
|
}, 1032, ["index"]))), 128))
|
|
5576
5533
|
], 8, al),
|
|
5577
|
-
|
|
5534
|
+
M("div", ol, " Step " + K(l.value + 1) + " of " + K(t.value) + ": " + K(m.value), 1)
|
|
5578
5535
|
], 64));
|
|
5579
5536
|
}
|
|
5580
5537
|
}), hr = /* @__PURE__ */ W(ll, [["__scopeId", "data-v-3b60596b"]]), rl = ["data-align"], sl = /* @__PURE__ */ Z({
|
|
@@ -5583,7 +5540,7 @@ const dr = {
|
|
|
5583
5540
|
align: { default: "left" }
|
|
5584
5541
|
},
|
|
5585
5542
|
setup(e) {
|
|
5586
|
-
return He("TimelineContext", e), (t, a) => (
|
|
5543
|
+
return He("TimelineContext", e), (t, a) => (f(), b("ol", {
|
|
5587
5544
|
role: "list",
|
|
5588
5545
|
class: "ui-timeline",
|
|
5589
5546
|
"data-align": e.align
|
|
@@ -5591,7 +5548,7 @@ const dr = {
|
|
|
5591
5548
|
G(t.$slots, "default", {}, void 0, !0)
|
|
5592
5549
|
], 8, rl));
|
|
5593
5550
|
}
|
|
5594
|
-
}), gr = /* @__PURE__ */ W(sl, [["__scopeId", "data-v-d56deb2b"]]), il = ["data-align", "aria-labelledby", "aria-describedby"], ul = { class: "ui-timeline-content" }, cl = ["datetime"], dl = { class: "ui-timeline-date--month" }, vl = { class: "ui-timeline-date--day" }, fl = { class: "ui-timeline-date--year" },
|
|
5551
|
+
}), gr = /* @__PURE__ */ W(sl, [["__scopeId", "data-v-d56deb2b"]]), il = ["data-align", "aria-labelledby", "aria-describedby"], ul = { class: "ui-timeline-content" }, cl = ["datetime"], dl = { class: "ui-timeline-date--month" }, vl = { class: "ui-timeline-date--day" }, fl = { class: "ui-timeline-date--year" }, pl = ["data-direction"], ml = { class: "info" }, Cl = ["id"], hl = { class: "addons" }, gl = /* @__PURE__ */ Z({
|
|
5595
5552
|
__name: "TimelineItem",
|
|
5596
5553
|
props: {
|
|
5597
5554
|
date: {},
|
|
@@ -5602,40 +5559,40 @@ const dr = {
|
|
|
5602
5559
|
titleAs: {}
|
|
5603
5560
|
},
|
|
5604
5561
|
setup(e) {
|
|
5605
|
-
const n = e, t =
|
|
5562
|
+
const n = e, t = me("TimelineContext");
|
|
5606
5563
|
if (!t) throw new Error("TimelineItem must be used within a Timeline component");
|
|
5607
|
-
const a = ge(), o = ge(), i =
|
|
5564
|
+
const a = ge(), o = ge(), i = A(() => t.align === "alternate" ? (n.index ?? 0) % 2 === 0 ? "ui-timeline-item--left" : "ui-timeline-item--right" : `ui-timeline-item--${t.align}`), r = (c) => {
|
|
5608
5565
|
const u = new Date(c).getDay();
|
|
5609
5566
|
return u < 10 ? `0${u}` : u;
|
|
5610
5567
|
}, l = (c) => new Date(c).toLocaleString("default", { month: "short" }), s = (c) => new Date(c).getFullYear();
|
|
5611
|
-
return (c, u) => (
|
|
5568
|
+
return (c, u) => (f(), b("li", {
|
|
5612
5569
|
tabindex: "0",
|
|
5613
5570
|
class: fe([i.value, "ui-timeline-item"]),
|
|
5614
5571
|
"data-align": N(t).align,
|
|
5615
5572
|
"aria-labelledby": e.title ? N(a) : void 0,
|
|
5616
5573
|
"aria-describedby": e.description ? N(o) : void 0
|
|
5617
5574
|
}, [
|
|
5618
|
-
u[0] || (u[0] =
|
|
5575
|
+
u[0] || (u[0] = M("div", {
|
|
5619
5576
|
class: "ui-timeline-marker",
|
|
5620
5577
|
"aria-hidden": "true"
|
|
5621
5578
|
}, null, -1)),
|
|
5622
|
-
|
|
5623
|
-
e.date ? (
|
|
5579
|
+
M("div", ul, [
|
|
5580
|
+
e.date ? (f(), b("time", {
|
|
5624
5581
|
key: 0,
|
|
5625
5582
|
class: "ui-timeline-date",
|
|
5626
5583
|
datetime: e.date
|
|
5627
5584
|
}, [
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5585
|
+
M("span", dl, K(l(e.date)), 1),
|
|
5586
|
+
M("span", vl, K(r(e.date)), 1),
|
|
5587
|
+
M("span", fl, K(s(e.date)), 1)
|
|
5631
5588
|
], 8, cl)) : O("", !0),
|
|
5632
|
-
|
|
5589
|
+
M("div", {
|
|
5633
5590
|
class: "ui-timeline-body",
|
|
5634
5591
|
"data-direction": e.flexDirection
|
|
5635
5592
|
}, [
|
|
5636
|
-
|
|
5593
|
+
M("div", ml, [
|
|
5637
5594
|
G(c.$slots, "title", {}, () => [
|
|
5638
|
-
(
|
|
5595
|
+
(f(), ae(Ne(e.titleAs ?? "h3"), {
|
|
5639
5596
|
id: N(a),
|
|
5640
5597
|
class: "ui-timeline-title"
|
|
5641
5598
|
}, {
|
|
@@ -5646,17 +5603,17 @@ const dr = {
|
|
|
5646
5603
|
}, 8, ["id"]))
|
|
5647
5604
|
], !0),
|
|
5648
5605
|
G(c.$slots, "description", {}, () => [
|
|
5649
|
-
e.description ? (
|
|
5606
|
+
e.description ? (f(), b("p", {
|
|
5650
5607
|
key: 0,
|
|
5651
5608
|
id: N(o),
|
|
5652
5609
|
class: "ui-timeline-description"
|
|
5653
5610
|
}, K(e.description), 9, Cl)) : O("", !0)
|
|
5654
5611
|
], !0)
|
|
5655
5612
|
]),
|
|
5656
|
-
|
|
5613
|
+
M("div", hl, [
|
|
5657
5614
|
G(c.$slots, "default", {}, void 0, !0)
|
|
5658
5615
|
])
|
|
5659
|
-
], 8,
|
|
5616
|
+
], 8, pl)
|
|
5660
5617
|
])
|
|
5661
5618
|
], 10, il));
|
|
5662
5619
|
}
|
|
@@ -5689,120 +5646,120 @@ const dr = {
|
|
|
5689
5646
|
}),
|
|
5690
5647
|
emits: ["update:modelValue"],
|
|
5691
5648
|
setup(e) {
|
|
5692
|
-
const n = ke(e, "modelValue"), t = e, a =
|
|
5693
|
-
let
|
|
5649
|
+
const n = ke(e, "modelValue"), t = e, a = w(0), o = w(0), i = w(0), r = w(0), l = w(0), s = w(0), c = w(!1), u = w(!1), d = w(0), m = w([]), C = w(1), h = w(n.value), x = w(null), B = w(null);
|
|
5650
|
+
let S = null, L = null;
|
|
5694
5651
|
Q(
|
|
5695
5652
|
() => n.value,
|
|
5696
|
-
(
|
|
5653
|
+
(p) => h.value = p
|
|
5697
5654
|
);
|
|
5698
|
-
const _ =
|
|
5699
|
-
const
|
|
5655
|
+
const _ = A(() => m.value[h.value] ?? void 0), z = A(() => Math.floor(h.value / C.value)), P = A(() => Math.ceil(D.value / C.value)), oe = A(() => Math.max(0, D.value - C.value)), ue = A(() => {
|
|
5656
|
+
const p = h.value * (100 / C.value), v = u.value && B.value ? i.value / B.value.clientWidth * 100 : 0;
|
|
5700
5657
|
return {
|
|
5701
|
-
transform: `translateX(calc(-${
|
|
5658
|
+
transform: `translateX(calc(-${p}% + ${v}%))`,
|
|
5702
5659
|
transition: u.value ? "none" : "transform 300ms ease"
|
|
5703
5660
|
};
|
|
5704
|
-
}), re = (
|
|
5705
|
-
let
|
|
5661
|
+
}), re = (p) => {
|
|
5662
|
+
let v = p;
|
|
5706
5663
|
if (t.loop) {
|
|
5707
|
-
const y = Math.round(
|
|
5708
|
-
|
|
5664
|
+
const y = Math.round(p / C.value), I = P.value;
|
|
5665
|
+
v = (y % I + I) % I * C.value;
|
|
5709
5666
|
} else
|
|
5710
|
-
|
|
5711
|
-
Math.max(
|
|
5667
|
+
v = Math.min(
|
|
5668
|
+
Math.max(p, 0),
|
|
5712
5669
|
oe.value
|
|
5713
5670
|
);
|
|
5714
|
-
|
|
5715
|
-
}, F = () => re(
|
|
5716
|
-
|
|
5717
|
-
},
|
|
5718
|
-
!t.autoplay ||
|
|
5671
|
+
h.value = v, n.value = v;
|
|
5672
|
+
}, F = () => re(h.value + C.value), R = () => re(h.value - C.value), $ = (p) => {
|
|
5673
|
+
p.key === "ArrowRight" ? F() : p.key === "ArrowLeft" && R();
|
|
5674
|
+
}, V = (p) => (m.value.includes(p) || m.value.push(p), m.value.indexOf(p)), g = (p) => m.value = m.value.filter((v) => v !== p), D = A(() => m.value.length), E = () => {
|
|
5675
|
+
!t.autoplay || S !== null || (S = window.setInterval(() => {
|
|
5719
5676
|
c.value || F();
|
|
5720
5677
|
}, t.autoplayDelay));
|
|
5721
5678
|
}, q = () => {
|
|
5722
|
-
|
|
5723
|
-
},
|
|
5679
|
+
S !== null && (clearInterval(S), S = null);
|
|
5680
|
+
}, H = (p) => {
|
|
5724
5681
|
if (typeof t.itemsPerView == "number")
|
|
5725
5682
|
return t.itemsPerView;
|
|
5726
|
-
const
|
|
5727
|
-
let y =
|
|
5728
|
-
for (const [
|
|
5683
|
+
const v = Object.entries(t.itemsPerView).map(([I, X]) => [Number(I), X]).sort((I, X) => I[0] - X[0]);
|
|
5684
|
+
let y = v[0]?.[1] ?? 1;
|
|
5685
|
+
for (const [I, X] of v) p >= I && (y = X);
|
|
5729
5686
|
return y;
|
|
5730
|
-
},
|
|
5731
|
-
|
|
5732
|
-
}, T = (
|
|
5687
|
+
}, k = (p) => {
|
|
5688
|
+
p.button === 0 && (u.value = !0, o.value = p.clientX, a.value = p.clientX, s.value = p.clientX, i.value = 0, r.value = performance.now(), l.value = 0, d.value = h.value, B.value?.setPointerCapture(p.pointerId), q(), B.value.style.userSelect = "");
|
|
5689
|
+
}, T = (p) => {
|
|
5733
5690
|
if (!u.value) return;
|
|
5734
|
-
const
|
|
5735
|
-
|
|
5736
|
-
}, Y = (
|
|
5691
|
+
const v = performance.now(), y = p.clientX - a.value, I = v - r.value;
|
|
5692
|
+
I > 0 && (l.value = y / I), a.value = p.clientX, r.value = v, s.value = p.clientX, i.value = s.value - o.value;
|
|
5693
|
+
}, Y = (p) => {
|
|
5737
5694
|
if (!u.value) return;
|
|
5738
|
-
u.value = !1,
|
|
5739
|
-
const
|
|
5740
|
-
Math.abs(l.value) > Ll ? l.value < 0 ? F() :
|
|
5695
|
+
u.value = !1, B.value?.releasePointerCapture(p.pointerId), B.value.style.userSelect = "";
|
|
5696
|
+
const v = B.value.clientWidth / C.value, y = i.value / v;
|
|
5697
|
+
Math.abs(l.value) > Ll ? l.value < 0 ? F() : R() : Math.abs(y) > xl ? y < 0 ? F() : R() : re(d.value), i.value = 0, l.value = 0, E();
|
|
5741
5698
|
};
|
|
5742
5699
|
return ve(() => {
|
|
5743
|
-
|
|
5744
|
-
const
|
|
5745
|
-
|
|
5746
|
-
}),
|
|
5700
|
+
E(), x.value && (L = new ResizeObserver((p) => {
|
|
5701
|
+
const v = p[0]?.contentRect.width;
|
|
5702
|
+
v !== void 0 && (C.value = H(v));
|
|
5703
|
+
}), L.observe(x.value));
|
|
5747
5704
|
}), Be(() => {
|
|
5748
|
-
q(),
|
|
5705
|
+
q(), L?.disconnect();
|
|
5749
5706
|
}), Q(
|
|
5750
5707
|
() => t.autoplay,
|
|
5751
|
-
(
|
|
5752
|
-
|
|
5708
|
+
(p) => {
|
|
5709
|
+
p ? E() : q();
|
|
5753
5710
|
},
|
|
5754
5711
|
{ immediate: !0 }
|
|
5755
|
-
), Q(
|
|
5756
|
-
register:
|
|
5712
|
+
), Q(C, () => h.value = Math.min(h.value, oe.value)), He("CarouselContext", {
|
|
5713
|
+
register: V,
|
|
5757
5714
|
unregister: g,
|
|
5758
|
-
activeIndex:
|
|
5715
|
+
activeIndex: h,
|
|
5759
5716
|
slideCount: D,
|
|
5760
5717
|
deltaX: i,
|
|
5761
|
-
itemsPerView: t.itemsPerView instanceof Object ?
|
|
5762
|
-
}), (
|
|
5718
|
+
itemsPerView: t.itemsPerView instanceof Object ? C : w(t.itemsPerView)
|
|
5719
|
+
}), (p, v) => (f(), b("div", {
|
|
5763
5720
|
ref_key: "rootRef",
|
|
5764
|
-
ref:
|
|
5721
|
+
ref: x,
|
|
5765
5722
|
role: "region",
|
|
5766
5723
|
class: "carousel",
|
|
5767
5724
|
"aria-roledescription": "carousel",
|
|
5768
5725
|
"aria-label": e.ariaLabel,
|
|
5769
5726
|
tabindex: "0",
|
|
5770
5727
|
"aria-activedescendant": _.value,
|
|
5771
|
-
style: Ie({ "--items-per-view":
|
|
5772
|
-
onKeydown:
|
|
5773
|
-
onMouseenter:
|
|
5774
|
-
onMouseleave:
|
|
5775
|
-
onFocusin:
|
|
5776
|
-
onFocusout:
|
|
5728
|
+
style: Ie({ "--items-per-view": C.value }),
|
|
5729
|
+
onKeydown: $,
|
|
5730
|
+
onMouseenter: v[0] || (v[0] = (y) => c.value = !0),
|
|
5731
|
+
onMouseleave: v[1] || (v[1] = (y) => c.value = !1),
|
|
5732
|
+
onFocusin: v[2] || (v[2] = (y) => c.value = !0),
|
|
5733
|
+
onFocusout: v[3] || (v[3] = (y) => c.value = !1)
|
|
5777
5734
|
}, [
|
|
5778
|
-
|
|
5735
|
+
v[4] || (v[4] = M("span", {
|
|
5779
5736
|
id: "carousel-instructions",
|
|
5780
5737
|
class: "sr-only"
|
|
5781
5738
|
}, " Use left and right arrow keys to navigate slides ", -1)),
|
|
5782
|
-
|
|
5783
|
-
|
|
5739
|
+
M("div", bl, [
|
|
5740
|
+
M("div", {
|
|
5784
5741
|
ref_key: "trackRef",
|
|
5785
|
-
ref:
|
|
5742
|
+
ref: B,
|
|
5786
5743
|
class: "carousel-track",
|
|
5787
5744
|
style: Ie(ue.value),
|
|
5788
|
-
onPointerdown:
|
|
5745
|
+
onPointerdown: k,
|
|
5789
5746
|
onPointermove: T,
|
|
5790
5747
|
onPointerup: Y,
|
|
5791
5748
|
onPointercancel: Y
|
|
5792
5749
|
}, [
|
|
5793
|
-
G(
|
|
5750
|
+
G(p.$slots, "default", {}, void 0, !0)
|
|
5794
5751
|
], 36)
|
|
5795
5752
|
]),
|
|
5796
|
-
|
|
5797
|
-
|
|
5753
|
+
M("span", kl, " Slide " + K(Math.floor(h.value / C.value) + 1) + " of " + K(P.value), 1),
|
|
5754
|
+
M("button", {
|
|
5798
5755
|
type: "button",
|
|
5799
5756
|
class: "carousel-control prev",
|
|
5800
5757
|
"aria-label": "Previous slide",
|
|
5801
|
-
onClick:
|
|
5758
|
+
onClick: R
|
|
5802
5759
|
}, [
|
|
5803
5760
|
U(Ce, { name: "directionDown" })
|
|
5804
5761
|
]),
|
|
5805
|
-
|
|
5762
|
+
M("button", {
|
|
5806
5763
|
type: "button",
|
|
5807
5764
|
class: "carousel-control next",
|
|
5808
5765
|
"aria-label": "Next slide",
|
|
@@ -5810,19 +5767,19 @@ const dr = {
|
|
|
5810
5767
|
}, [
|
|
5811
5768
|
U(Ce, { name: "directionDown" })
|
|
5812
5769
|
]),
|
|
5813
|
-
e.showIndicators ? (
|
|
5814
|
-
(
|
|
5770
|
+
e.showIndicators ? (f(), b("div", wl, [
|
|
5771
|
+
(f(!0), b(de, null, he(P.value, (y, I) => (f(), b("button", {
|
|
5815
5772
|
role: "tab",
|
|
5816
5773
|
type: "button",
|
|
5817
|
-
key:
|
|
5818
|
-
class: fe(["indicator", { active:
|
|
5819
|
-
"aria-label": `Go to slide ${
|
|
5820
|
-
"aria-selected":
|
|
5821
|
-
"aria-current":
|
|
5822
|
-
onClick: (X) => re(
|
|
5774
|
+
key: I,
|
|
5775
|
+
class: fe(["indicator", { active: I === Math.floor(h.value / C.value) }]),
|
|
5776
|
+
"aria-label": `Go to slide ${I + 1}`,
|
|
5777
|
+
"aria-selected": I === z.value,
|
|
5778
|
+
"aria-current": I === z.value,
|
|
5779
|
+
onClick: (X) => re(I * C.value),
|
|
5823
5780
|
onKeydown: [
|
|
5824
|
-
ye(se((X) => re((
|
|
5825
|
-
ye(se((X) => re((
|
|
5781
|
+
ye(se((X) => re((I - 1 + P.value) % P.value * C.value), ["prevent"]), ["left"]),
|
|
5782
|
+
ye(se((X) => re((I + 1) % P.value * C.value), ["prevent"]), ["right"])
|
|
5826
5783
|
]
|
|
5827
5784
|
}, null, 42, Ml))), 128))
|
|
5828
5785
|
])) : O("", !0)
|
|
@@ -5831,10 +5788,10 @@ const dr = {
|
|
|
5831
5788
|
}), br = /* @__PURE__ */ W($l, [["__scopeId", "data-v-30cdfc00"]]), Il = ["aria-hidden", "aria-label"], Hl = /* @__PURE__ */ Z({
|
|
5832
5789
|
__name: "CarouselItem",
|
|
5833
5790
|
setup(e) {
|
|
5834
|
-
const n =
|
|
5791
|
+
const n = me("CarouselContext");
|
|
5835
5792
|
if (!n) throw new Error("CarouselItem must be used inside a Carousel");
|
|
5836
|
-
const t = "carousel-item-" + ge(), a =
|
|
5837
|
-
return ve(() => a.value = n.register(t)), Be(() => n.unregister(t)), (r, l) => (
|
|
5793
|
+
const t = "carousel-item-" + ge(), a = w(0), o = A(() => Math.abs(n.deltaX.value) > 5), i = A(() => Math.floor(a.value / n.itemsPerView.value) === Math.floor(n.activeIndex.value / n.itemsPerView.value));
|
|
5794
|
+
return ve(() => a.value = n.register(t)), Be(() => n.unregister(t)), (r, l) => (f(), b("div", {
|
|
5838
5795
|
role: "group",
|
|
5839
5796
|
class: "carousel-item",
|
|
5840
5797
|
id: t,
|
|
@@ -5862,43 +5819,43 @@ const dr = {
|
|
|
5862
5819
|
},
|
|
5863
5820
|
emits: ["update:modelValue"],
|
|
5864
5821
|
setup(e, { emit: n, slots: t }) {
|
|
5865
|
-
const a =
|
|
5866
|
-
Q(a, (
|
|
5867
|
-
!
|
|
5868
|
-
document.getElementById(`tab-${
|
|
5822
|
+
const a = w(e.modelValue ?? e.defaultValue), o = w(!1), i = w([]), r = w("forward"), l = w();
|
|
5823
|
+
Q(a, (h) => {
|
|
5824
|
+
!h || !o.value || requestAnimationFrame(() => {
|
|
5825
|
+
document.getElementById(`tab-${h}`)?.focus(), o.value = !1;
|
|
5869
5826
|
});
|
|
5870
5827
|
}), Q(
|
|
5871
5828
|
() => e.modelValue,
|
|
5872
|
-
(
|
|
5873
|
-
|
|
5829
|
+
(h) => {
|
|
5830
|
+
h !== void 0 && (a.value = h);
|
|
5874
5831
|
}
|
|
5875
|
-
), Q(i, (
|
|
5876
|
-
!a.value &&
|
|
5832
|
+
), Q(i, (h) => {
|
|
5833
|
+
!a.value && h.length && (a.value = h[0]);
|
|
5877
5834
|
});
|
|
5878
|
-
const s = (
|
|
5879
|
-
const
|
|
5880
|
-
if (!
|
|
5881
|
-
const
|
|
5882
|
-
if (!
|
|
5883
|
-
a.value =
|
|
5835
|
+
const s = (h, x) => i.value[x] = h, c = (h) => {
|
|
5836
|
+
const x = i.value.filter(Boolean);
|
|
5837
|
+
if (!x.length) return;
|
|
5838
|
+
const B = a.value;
|
|
5839
|
+
if (!B) {
|
|
5840
|
+
a.value = h, n("update:modelValue", h);
|
|
5884
5841
|
return;
|
|
5885
5842
|
}
|
|
5886
|
-
const
|
|
5887
|
-
if (
|
|
5888
|
-
a.value =
|
|
5843
|
+
const S = x.indexOf(B), L = x.indexOf(h);
|
|
5844
|
+
if (S === -1 || L === -1) {
|
|
5845
|
+
a.value = h, n("update:modelValue", h);
|
|
5889
5846
|
return;
|
|
5890
5847
|
}
|
|
5891
|
-
|
|
5892
|
-
}, u =
|
|
5893
|
-
|
|
5894
|
-
},
|
|
5895
|
-
if (
|
|
5896
|
-
const
|
|
5848
|
+
S !== -1 && L !== -1 && (r.value = L > S ? "forward" : "backward"), B !== h && (a.value = h, n("update:modelValue", h));
|
|
5849
|
+
}, u = A(() => r.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), d = (h) => {
|
|
5850
|
+
h instanceof HTMLElement && l.value && (l.value.style.height = `${h.offsetHeight}px`);
|
|
5851
|
+
}, m = (h) => {
|
|
5852
|
+
if (h instanceof HTMLElement && l.value) {
|
|
5853
|
+
const x = h.offsetHeight;
|
|
5897
5854
|
requestAnimationFrame(() => {
|
|
5898
|
-
l.value && (l.value.style.height = `${
|
|
5855
|
+
l.value && (l.value.style.height = `${x}px`);
|
|
5899
5856
|
});
|
|
5900
5857
|
}
|
|
5901
|
-
},
|
|
5858
|
+
}, C = () => {
|
|
5902
5859
|
l.value && (l.value.style.height = "");
|
|
5903
5860
|
};
|
|
5904
5861
|
return He(Je, {
|
|
@@ -5906,19 +5863,19 @@ const dr = {
|
|
|
5906
5863
|
setValue: c,
|
|
5907
5864
|
registerTrigger: s,
|
|
5908
5865
|
direction: r,
|
|
5909
|
-
activationMode:
|
|
5910
|
-
orientation:
|
|
5866
|
+
activationMode: w(e.activationMode),
|
|
5867
|
+
orientation: w(e.orientation),
|
|
5911
5868
|
triggers: i,
|
|
5912
5869
|
contentWrapperRef: l,
|
|
5913
5870
|
focusOnChange: o
|
|
5914
5871
|
}), () => {
|
|
5915
|
-
const
|
|
5916
|
-
|
|
5917
|
-
|
|
5872
|
+
const h = t.default?.() || [], x = [], B = [];
|
|
5873
|
+
h.forEach((L) => {
|
|
5874
|
+
L.type?.name === "TabsContent" ? B.push(L) : x.push(L);
|
|
5918
5875
|
});
|
|
5919
|
-
const
|
|
5876
|
+
const S = B.find((L) => L.props?.value === a.value);
|
|
5920
5877
|
return [
|
|
5921
|
-
...
|
|
5878
|
+
...x,
|
|
5922
5879
|
j(
|
|
5923
5880
|
"div",
|
|
5924
5881
|
{
|
|
@@ -5930,14 +5887,14 @@ const dr = {
|
|
|
5930
5887
|
{
|
|
5931
5888
|
name: u.value,
|
|
5932
5889
|
mode: "out-in",
|
|
5933
|
-
onBeforeLeave:
|
|
5934
|
-
onEnter:
|
|
5935
|
-
onAfterEnter:
|
|
5890
|
+
onBeforeLeave: d,
|
|
5891
|
+
onEnter: m,
|
|
5892
|
+
onAfterEnter: C
|
|
5936
5893
|
},
|
|
5937
|
-
() =>
|
|
5938
|
-
|
|
5939
|
-
key:
|
|
5940
|
-
},
|
|
5894
|
+
() => S ? [j(S.type, {
|
|
5895
|
+
...S.props,
|
|
5896
|
+
key: S.props.value
|
|
5897
|
+
}, S.children)] : []
|
|
5941
5898
|
)
|
|
5942
5899
|
)
|
|
5943
5900
|
];
|
|
@@ -5946,7 +5903,7 @@ const dr = {
|
|
|
5946
5903
|
}), Mr = Z({
|
|
5947
5904
|
name: "TabsList",
|
|
5948
5905
|
setup(e, { slots: n }) {
|
|
5949
|
-
const t =
|
|
5906
|
+
const t = me(Je);
|
|
5950
5907
|
if (!t) throw new Error("TabsList components must be used inside <Tabs>");
|
|
5951
5908
|
return () => j(
|
|
5952
5909
|
"div",
|
|
@@ -5975,26 +5932,26 @@ const dr = {
|
|
|
5975
5932
|
}
|
|
5976
5933
|
},
|
|
5977
5934
|
setup(e, { slots: n }) {
|
|
5978
|
-
const t =
|
|
5935
|
+
const t = me(Je);
|
|
5979
5936
|
if (!t) throw new Error("TabsTrigger components must be used inside <Tabs>");
|
|
5980
|
-
const a =
|
|
5937
|
+
const a = A(() => t.activeValue.value === e.value), o = () => !e.disabled && t.setValue(e.value), i = (r) => {
|
|
5981
5938
|
if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(r.key)) return;
|
|
5982
5939
|
r.preventDefault();
|
|
5983
5940
|
const s = t.triggers.value.filter(Boolean);
|
|
5984
5941
|
let u = s.indexOf(e.value);
|
|
5985
|
-
const
|
|
5942
|
+
const d = t.orientation.value === "horizontal";
|
|
5986
5943
|
switch (r.key) {
|
|
5987
5944
|
case "ArrowRight":
|
|
5988
|
-
|
|
5945
|
+
d && u++;
|
|
5989
5946
|
break;
|
|
5990
5947
|
case "ArrowLeft":
|
|
5991
|
-
|
|
5948
|
+
d && u--;
|
|
5992
5949
|
break;
|
|
5993
5950
|
case "ArrowDown":
|
|
5994
|
-
|
|
5951
|
+
d || u++;
|
|
5995
5952
|
break;
|
|
5996
5953
|
case "ArrowUp":
|
|
5997
|
-
|
|
5954
|
+
d || u--;
|
|
5998
5955
|
break;
|
|
5999
5956
|
case "Home":
|
|
6000
5957
|
u = 0;
|
|
@@ -6004,9 +5961,9 @@ const dr = {
|
|
|
6004
5961
|
break;
|
|
6005
5962
|
}
|
|
6006
5963
|
u = (u + s.length) % s.length;
|
|
6007
|
-
const
|
|
6008
|
-
t.activationMode.value === "auto" && t.setValue(
|
|
6009
|
-
document.getElementById(`tab-${
|
|
5964
|
+
const m = s[u];
|
|
5965
|
+
t.activationMode.value === "auto" && t.setValue(m), requestAnimationFrame(() => {
|
|
5966
|
+
document.getElementById(`tab-${m}`)?.focus();
|
|
6010
5967
|
});
|
|
6011
5968
|
};
|
|
6012
5969
|
return ve(() => !e.disabled && t.registerTrigger(e.value, e.index)), Be(() => t.triggers.value[e.index] = void 0), () => j(
|
|
@@ -6035,7 +5992,7 @@ const dr = {
|
|
|
6035
5992
|
}
|
|
6036
5993
|
},
|
|
6037
5994
|
setup(e, { slots: n }) {
|
|
6038
|
-
if (!
|
|
5995
|
+
if (!me(Je)) throw new Error("TabsContent components must be used inside <Tabs>");
|
|
6039
5996
|
return () => j(
|
|
6040
5997
|
"div",
|
|
6041
5998
|
{
|
|
@@ -6051,13 +6008,13 @@ const dr = {
|
|
|
6051
6008
|
}), Vl = /* @__PURE__ */ Z({
|
|
6052
6009
|
__name: "DropdownItem",
|
|
6053
6010
|
setup(e) {
|
|
6054
|
-
const n =
|
|
6011
|
+
const n = me("DropdownContext");
|
|
6055
6012
|
if (!n) throw new Error("DropdownItem must be used within a Dropdown");
|
|
6056
6013
|
let t;
|
|
6057
|
-
const a =
|
|
6014
|
+
const a = w(), o = (i) => {
|
|
6058
6015
|
i.key === "ArrowDown" && (i.preventDefault(), n.focusNextItem(t)), i.key === "ArrowUp" && (i.preventDefault(), n.focusPrevItem(t)), (i.key === "Enter" || i.key === " ") && (i.preventDefault(), a.value?.click(), n.close());
|
|
6059
6016
|
};
|
|
6060
|
-
return ve(() => t = n.registerItem(a.value)), (i, r) => (
|
|
6017
|
+
return ve(() => t = n.registerItem(a.value)), (i, r) => (f(), b("div", {
|
|
6061
6018
|
ref_key: "itemRef",
|
|
6062
6019
|
ref: a,
|
|
6063
6020
|
role: "menuitem",
|
|
@@ -6072,20 +6029,20 @@ const dr = {
|
|
|
6072
6029
|
], 544));
|
|
6073
6030
|
}
|
|
6074
6031
|
}), $r = /* @__PURE__ */ W(Vl, [["__scopeId", "data-v-69de3d9c"]]), Bl = (e) => {
|
|
6075
|
-
const n = /* @__PURE__ */ new Date(), t = e.locale || "default", a =
|
|
6076
|
-
const
|
|
6077
|
-
return
|
|
6078
|
-
}), l =
|
|
6079
|
-
const
|
|
6080
|
-
return Array.from({ length: 7 }).map((
|
|
6081
|
-
const
|
|
6082
|
-
return
|
|
6032
|
+
const n = /* @__PURE__ */ new Date(), t = e.locale || "default", a = w(e.modelValue ?? null), o = w(e.modelValue ? new Date(e.modelValue) : n), i = e.firstDayOfWeek ?? 0, r = A(() => {
|
|
6033
|
+
const m = new Intl.DateTimeFormat(t, { month: "long", year: "numeric" }).format(o.value);
|
|
6034
|
+
return m.charAt(0).toUpperCase() + m.slice(1);
|
|
6035
|
+
}), l = A(() => {
|
|
6036
|
+
const m = new Date(2021, 5, 6);
|
|
6037
|
+
return Array.from({ length: 7 }).map((C, h) => {
|
|
6038
|
+
const x = new Date(m);
|
|
6039
|
+
return x.setDate(m.getDate() + (h + i) % 7), new Intl.DateTimeFormat(t, { weekday: "short" }).format(x).replace(".", "");
|
|
6083
6040
|
});
|
|
6084
|
-
}), s =
|
|
6085
|
-
const
|
|
6086
|
-
for (let _ = 0; _ <
|
|
6087
|
-
for (let _ = 1; _ <=
|
|
6088
|
-
return
|
|
6041
|
+
}), s = A(() => {
|
|
6042
|
+
const m = o.value.getFullYear(), C = o.value.getMonth(), h = new Date(m, C, 1), x = new Date(m, C + 1, 0), B = (h.getDay() - i + 7) % 7, S = x.getDate(), L = [];
|
|
6043
|
+
for (let _ = 0; _ < B; _++) L.push(null);
|
|
6044
|
+
for (let _ = 1; _ <= S; _++) L.push(new Date(m, C, _));
|
|
6045
|
+
return L;
|
|
6089
6046
|
});
|
|
6090
6047
|
return {
|
|
6091
6048
|
today: n,
|
|
@@ -6096,7 +6053,7 @@ const dr = {
|
|
|
6096
6053
|
days: s,
|
|
6097
6054
|
nextMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() + 1, 1),
|
|
6098
6055
|
prevMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() - 1, 1),
|
|
6099
|
-
select: (
|
|
6056
|
+
select: (m) => a.value = m
|
|
6100
6057
|
};
|
|
6101
6058
|
}, Pt = /(DD|MM|YYYY|HH|mm|ss)/g, ot = (e, n) => {
|
|
6102
6059
|
const t = {
|
|
@@ -6161,14 +6118,14 @@ const Al = (e, n) => {
|
|
|
6161
6118
|
}),
|
|
6162
6119
|
emits: /* @__PURE__ */ ie(["update:open"], ["update:modelValue"]),
|
|
6163
6120
|
setup(e, { emit: n }) {
|
|
6164
|
-
const t = ke(e, "modelValue"), a = n, o = e, i =
|
|
6121
|
+
const t = ke(e, "modelValue"), a = n, o = e, i = w(!1), r = /* @__PURE__ */ new Date(), l = w(""), s = w(null), c = w(null), {
|
|
6165
6122
|
monthLabel: u,
|
|
6166
|
-
weekDays:
|
|
6167
|
-
currentMonth:
|
|
6168
|
-
days:
|
|
6169
|
-
nextMonth:
|
|
6170
|
-
prevMonth:
|
|
6171
|
-
select:
|
|
6123
|
+
weekDays: d,
|
|
6124
|
+
currentMonth: m,
|
|
6125
|
+
days: C,
|
|
6126
|
+
nextMonth: h,
|
|
6127
|
+
prevMonth: x,
|
|
6128
|
+
select: B
|
|
6172
6129
|
} = Bl({
|
|
6173
6130
|
modelValue: t.value,
|
|
6174
6131
|
locale: o.locale,
|
|
@@ -6176,70 +6133,70 @@ const Al = (e, n) => {
|
|
|
6176
6133
|
});
|
|
6177
6134
|
Q(
|
|
6178
6135
|
() => t.value,
|
|
6179
|
-
(
|
|
6180
|
-
if (!
|
|
6136
|
+
(R) => {
|
|
6137
|
+
if (!R) {
|
|
6181
6138
|
l.value = "", c.value = null;
|
|
6182
6139
|
return;
|
|
6183
6140
|
}
|
|
6184
|
-
|
|
6141
|
+
B(R), m.value = new Date(R), c.value = R, l.value = ot(R, o.format);
|
|
6185
6142
|
},
|
|
6186
6143
|
{ immediate: !0 }
|
|
6187
6144
|
), Q(
|
|
6188
6145
|
i,
|
|
6189
|
-
async (
|
|
6190
|
-
if (
|
|
6146
|
+
async (R) => {
|
|
6147
|
+
if (R) {
|
|
6191
6148
|
await $e();
|
|
6192
|
-
let
|
|
6193
|
-
if (
|
|
6194
|
-
const
|
|
6195
|
-
|
|
6149
|
+
let $ = s.value?.querySelector('button[data-selected="true"]');
|
|
6150
|
+
if (!$) {
|
|
6151
|
+
const V = /* @__PURE__ */ new Date();
|
|
6152
|
+
$ = Array.from(s.value?.querySelectorAll("button") || []).find((g) => Number(g.textContent) === V.getDate() && !g.disabled);
|
|
6196
6153
|
}
|
|
6197
|
-
|
|
6154
|
+
$ && $.focus(), document.addEventListener("keydown", z);
|
|
6198
6155
|
} else document.removeEventListener("keydown", z);
|
|
6199
6156
|
}
|
|
6200
6157
|
);
|
|
6201
|
-
const
|
|
6202
|
-
c.value =
|
|
6203
|
-
},
|
|
6204
|
-
if (!
|
|
6205
|
-
const
|
|
6206
|
-
return c.value && _(
|
|
6207
|
-
}, _ = (
|
|
6208
|
-
|
|
6209
|
-
}, oe = (
|
|
6210
|
-
const
|
|
6211
|
-
let
|
|
6158
|
+
const S = (R) => {
|
|
6159
|
+
c.value = R, t.value = R, l.value = ot(R, o.format), B(R), i.value = !1;
|
|
6160
|
+
}, L = (R) => {
|
|
6161
|
+
if (!R) return "";
|
|
6162
|
+
const $ = [];
|
|
6163
|
+
return c.value && _(R, c.value) && $.push("dp-selected"), _(R, r) && $.push("dp-today"), $.join(" ");
|
|
6164
|
+
}, _ = (R, $) => R.getFullYear() === $.getFullYear() && R.getMonth() === $.getMonth() && R.getDate() === $.getDate(), z = (R) => R.key === "Escape" && (i.value = !1), P = (R) => {
|
|
6165
|
+
R.key === "Backspace" || R.key === "Delete" || R.key === "ArrowLeft" || R.key === "ArrowRight" || R.key === "Tab" || /[0-9]/.test(R.key) || R.preventDefault();
|
|
6166
|
+
}, oe = (R) => {
|
|
6167
|
+
const $ = R.target, V = $.selectionStart ?? 0, D = $.value.slice(0, V).replace(/\D/g, "").length;
|
|
6168
|
+
let E = $.value.replace(/\D/g, "");
|
|
6212
6169
|
const q = El(o.format);
|
|
6213
|
-
|
|
6214
|
-
const
|
|
6215
|
-
l.value =
|
|
6216
|
-
let
|
|
6217
|
-
for (let
|
|
6218
|
-
if (/\d/.test(
|
|
6219
|
-
|
|
6170
|
+
E = E.slice(0, q);
|
|
6171
|
+
const H = Al(E, o.format);
|
|
6172
|
+
l.value = H, $.value = H;
|
|
6173
|
+
let k = 0, T = 0;
|
|
6174
|
+
for (let p = 0; p < H.length; p++)
|
|
6175
|
+
if (/\d/.test(H[p] ?? "") && T++, T >= D) {
|
|
6176
|
+
k = p + 1;
|
|
6220
6177
|
break;
|
|
6221
6178
|
}
|
|
6222
|
-
requestAnimationFrame(() =>
|
|
6223
|
-
const Y = Bt(
|
|
6179
|
+
requestAnimationFrame(() => $.setSelectionRange(k, k));
|
|
6180
|
+
const Y = Bt(H, o.format);
|
|
6224
6181
|
Y && (c.value = Y, t.value = Y);
|
|
6225
6182
|
}, ue = () => {
|
|
6226
6183
|
i.value || (i.value = !0, a("update:open", !0));
|
|
6227
|
-
}, re = (
|
|
6228
|
-
s.value && (s.value.contains(
|
|
6184
|
+
}, re = (R) => {
|
|
6185
|
+
s.value && (s.value.contains(R.target) || (i.value = !1, a("update:open", !1)));
|
|
6229
6186
|
}, F = () => {
|
|
6230
|
-
const
|
|
6231
|
-
!
|
|
6187
|
+
const R = Bt(l.value, o.format);
|
|
6188
|
+
!R && !c.value ? (l.value = "", t.value = null, c.value = null) : R && (c.value = R, t.value = R, l.value = ot(R, o.format));
|
|
6232
6189
|
};
|
|
6233
|
-
return ve(() => document.addEventListener("mousedown", re)), Se(() => document.removeEventListener("mousedown", re)), (
|
|
6190
|
+
return ve(() => document.addEventListener("mousedown", re)), Se(() => document.removeEventListener("mousedown", re)), (R, $) => (f(), b("div", {
|
|
6234
6191
|
ref_key: "root",
|
|
6235
6192
|
ref: s,
|
|
6236
|
-
class: fe(["dp", { required: Object.keys(
|
|
6193
|
+
class: fe(["dp", { required: Object.keys(R.$attrs).includes("required"), error: e.invalid }])
|
|
6237
6194
|
}, [
|
|
6238
|
-
|
|
6195
|
+
M("label", {
|
|
6239
6196
|
for: e.id,
|
|
6240
6197
|
class: "label"
|
|
6241
6198
|
}, K(e.label), 9, Rl),
|
|
6242
|
-
|
|
6199
|
+
M("input", {
|
|
6243
6200
|
id: e.id,
|
|
6244
6201
|
class: "dp-input",
|
|
6245
6202
|
value: l.value,
|
|
@@ -6247,7 +6204,7 @@ const Al = (e, n) => {
|
|
|
6247
6204
|
onInput: oe,
|
|
6248
6205
|
onKeydown: P,
|
|
6249
6206
|
onMousedown: ue,
|
|
6250
|
-
required: Object.keys(
|
|
6207
|
+
required: Object.keys(R.$attrs).includes("required") || void 0,
|
|
6251
6208
|
"aria-invalid": !c.value && l.value !== "",
|
|
6252
6209
|
disabled: e.disabled ? !0 : void 0,
|
|
6253
6210
|
"data-disabled": e.disabled ? !0 : void 0,
|
|
@@ -6267,57 +6224,57 @@ const Al = (e, n) => {
|
|
|
6267
6224
|
]),
|
|
6268
6225
|
_: 1
|
|
6269
6226
|
}, 8, ["disabled"]),
|
|
6270
|
-
|
|
6227
|
+
$[3] || ($[3] = M("small", {
|
|
6271
6228
|
id: "time-help",
|
|
6272
6229
|
class: "sr-only"
|
|
6273
6230
|
}, "After selecting a date, adjust hours and minutes", -1)),
|
|
6274
|
-
i.value ? (
|
|
6275
|
-
|
|
6276
|
-
|
|
6231
|
+
i.value ? (f(), b("div", Tl, [
|
|
6232
|
+
M("header", Dl, [
|
|
6233
|
+
M("button", {
|
|
6277
6234
|
type: "button",
|
|
6278
|
-
onClick:
|
|
6279
|
-
(...
|
|
6235
|
+
onClick: $[0] || ($[0] = //@ts-ignore
|
|
6236
|
+
(...V) => N(x) && N(x)(...V)),
|
|
6280
6237
|
class: "btn__prev_month",
|
|
6281
6238
|
"aria-label": "Previous month"
|
|
6282
6239
|
}, "‹"),
|
|
6283
|
-
|
|
6284
|
-
|
|
6240
|
+
M("span", Zl, K(N(u)), 1),
|
|
6241
|
+
M("button", {
|
|
6285
6242
|
type: "button",
|
|
6286
|
-
onClick:
|
|
6287
|
-
(...
|
|
6243
|
+
onClick: $[1] || ($[1] = //@ts-ignore
|
|
6244
|
+
(...V) => N(h) && N(h)(...V)),
|
|
6288
6245
|
class: "btn__next_month",
|
|
6289
6246
|
"aria-label": "Next month"
|
|
6290
6247
|
}, "›")
|
|
6291
6248
|
]),
|
|
6292
|
-
|
|
6293
|
-
(
|
|
6249
|
+
M("div", zl, [
|
|
6250
|
+
(f(!0), b(de, null, he(N(d), (V) => (f(), b("span", {
|
|
6294
6251
|
class: "week-day__name",
|
|
6295
|
-
key:
|
|
6296
|
-
}, K(
|
|
6252
|
+
key: V
|
|
6253
|
+
}, K(V), 1))), 128))
|
|
6297
6254
|
]),
|
|
6298
|
-
|
|
6299
|
-
(
|
|
6255
|
+
M("div", Nl, [
|
|
6256
|
+
(f(!0), b(de, null, he(N(C), (V, g) => (f(), b("button", {
|
|
6300
6257
|
key: g,
|
|
6301
6258
|
type: "button",
|
|
6302
6259
|
role: "gridcell",
|
|
6303
|
-
class: fe(["btn__day",
|
|
6304
|
-
disabled: !
|
|
6305
|
-
"aria-pressed":
|
|
6306
|
-
"data-selected":
|
|
6307
|
-
onMousedown: se((D) =>
|
|
6308
|
-
"aria-label":
|
|
6309
|
-
}, K(
|
|
6260
|
+
class: fe(["btn__day", L(V)]),
|
|
6261
|
+
disabled: !V,
|
|
6262
|
+
"aria-pressed": L(V) === "dp-selected",
|
|
6263
|
+
"data-selected": V && L(V) === "dp-selected",
|
|
6264
|
+
onMousedown: se((D) => V && S(V), ["prevent"]),
|
|
6265
|
+
"aria-label": V ? V.toLocaleDateString(o.locale, { weekday: "long", year: "numeric", month: "long", day: "numeric" }) : ""
|
|
6266
|
+
}, K(V?.getDate()), 43, Ol))), 128))
|
|
6310
6267
|
]),
|
|
6311
6268
|
U(Le, {
|
|
6312
6269
|
class: "btn-ghost btn-sm",
|
|
6313
|
-
onClick:
|
|
6270
|
+
onClick: $[2] || ($[2] = (V) => t.value = /* @__PURE__ */ new Date())
|
|
6314
6271
|
}, {
|
|
6315
6272
|
default: J(() => [
|
|
6316
6273
|
Me(K(e.todayLabel), 1)
|
|
6317
6274
|
]),
|
|
6318
6275
|
_: 1
|
|
6319
6276
|
}),
|
|
6320
|
-
G(
|
|
6277
|
+
G(R.$slots, "time", {}, void 0, !0)
|
|
6321
6278
|
])) : O("", !0)
|
|
6322
6279
|
], 2));
|
|
6323
6280
|
}
|
|
@@ -6346,51 +6303,51 @@ const Al = (e, n) => {
|
|
|
6346
6303
|
}),
|
|
6347
6304
|
emits: ["update:modelValue"],
|
|
6348
6305
|
setup(e) {
|
|
6349
|
-
const n = ke(e, "modelValue"), t = e, a = ge(), o =
|
|
6350
|
-
Q(n, (
|
|
6351
|
-
if (
|
|
6352
|
-
const
|
|
6353
|
-
c.value =
|
|
6306
|
+
const n = ke(e, "modelValue"), t = e, a = ge(), o = w(!1), i = w(null), r = A(() => t.format.includes("HH")), l = A(() => t.format.includes("mm")), s = A(() => t.format.includes("ss")), c = w(n.value ?? null), u = w(n.value?.getHours() ?? (r.value ? 0 : void 0)), d = w(n.value?.getMinutes() ?? (l.value ? 0 : void 0)), m = w(n.value?.getSeconds() ?? (s.value ? 0 : void 0));
|
|
6307
|
+
Q(n, (S) => {
|
|
6308
|
+
if (S) {
|
|
6309
|
+
const L = new Date(S);
|
|
6310
|
+
c.value = L, u.value = L.getHours(), d.value = L.getMinutes(), m.value = L.getSeconds();
|
|
6354
6311
|
} else
|
|
6355
|
-
c.value = null, u.value = 0,
|
|
6356
|
-
}, { immediate: !0 }), Q(c, (
|
|
6357
|
-
if (
|
|
6358
|
-
const
|
|
6359
|
-
|
|
6360
|
-
}, { immediate: !0 }), Q([c, u,
|
|
6312
|
+
c.value = null, u.value = 0, d.value = 0, m.value = 0;
|
|
6313
|
+
}, { immediate: !0 }), Q(c, (S) => {
|
|
6314
|
+
if (!S) return;
|
|
6315
|
+
const L = S.getHours(), _ = S.getMinutes(), z = S.getSeconds();
|
|
6316
|
+
L !== u.value && (u.value = L), _ !== d.value && (d.value = _), z !== m.value && (m.value = z);
|
|
6317
|
+
}, { immediate: !0 }), Q([c, u, d, m], () => {
|
|
6361
6318
|
if (!c.value) {
|
|
6362
6319
|
n.value = null;
|
|
6363
6320
|
return;
|
|
6364
6321
|
}
|
|
6365
|
-
const
|
|
6366
|
-
z.setHours(
|
|
6322
|
+
const S = Math.min(Math.max(u.value ?? 0, 0), 23), L = Math.min(Math.max(d.value ?? 0, 0), 59), _ = Math.min(Math.max(m.value ?? 0, 0), 59), z = new Date(c.value);
|
|
6323
|
+
z.setHours(S, L, _, 0), (!n.value || n.value.getTime() !== z.getTime()) && (n.value = z);
|
|
6367
6324
|
});
|
|
6368
|
-
const
|
|
6369
|
-
i.value && (i.value.contains(
|
|
6370
|
-
},
|
|
6371
|
-
const
|
|
6372
|
-
isNaN(
|
|
6373
|
-
},
|
|
6374
|
-
const
|
|
6375
|
-
isNaN(
|
|
6376
|
-
},
|
|
6377
|
-
const
|
|
6378
|
-
isNaN(
|
|
6325
|
+
const C = (S) => {
|
|
6326
|
+
i.value && (i.value.contains(S.target) || (o.value = !1));
|
|
6327
|
+
}, h = (S) => {
|
|
6328
|
+
const L = Number(S.target.value);
|
|
6329
|
+
isNaN(L) || L < 0 ? u.value = 0 : L > 23 ? u.value = 23 : u.value = L;
|
|
6330
|
+
}, x = (S) => {
|
|
6331
|
+
const L = Number(S.target.value);
|
|
6332
|
+
isNaN(L) || L < 0 ? d.value = 0 : L > 59 ? d.value = 59 : d.value = L;
|
|
6333
|
+
}, B = (S) => {
|
|
6334
|
+
const L = Number(S.target.value);
|
|
6335
|
+
isNaN(L) || L < 0 ? m.value = 0 : L > 59 ? m.value = 59 : m.value = L;
|
|
6379
6336
|
};
|
|
6380
6337
|
return ve(() => {
|
|
6381
|
-
document.addEventListener("mousedown",
|
|
6338
|
+
document.addEventListener("mousedown", C);
|
|
6382
6339
|
}), Se(() => {
|
|
6383
|
-
document.removeEventListener("mousedown",
|
|
6384
|
-
}), (
|
|
6340
|
+
document.removeEventListener("mousedown", C);
|
|
6341
|
+
}), (S, L) => (f(), b("div", {
|
|
6385
6342
|
class: "dtp",
|
|
6386
6343
|
ref_key: "root",
|
|
6387
6344
|
ref: i
|
|
6388
6345
|
}, [
|
|
6389
|
-
U(Fl, be(
|
|
6346
|
+
U(Fl, be(S.$attrs, {
|
|
6390
6347
|
modelValue: c.value,
|
|
6391
|
-
"onUpdate:modelValue":
|
|
6348
|
+
"onUpdate:modelValue": L[3] || (L[3] = (_) => c.value = _),
|
|
6392
6349
|
open: o.value,
|
|
6393
|
-
"onUpdate:open":
|
|
6350
|
+
"onUpdate:open": L[4] || (L[4] = (_) => o.value = _),
|
|
6394
6351
|
id: t.id,
|
|
6395
6352
|
invalid: e.invalid,
|
|
6396
6353
|
locale: e.locale,
|
|
@@ -6400,19 +6357,19 @@ const Al = (e, n) => {
|
|
|
6400
6357
|
placeholder: e.placeholder
|
|
6401
6358
|
}), {
|
|
6402
6359
|
time: J(() => [
|
|
6403
|
-
o.value ? (
|
|
6404
|
-
r.value ? _e((
|
|
6360
|
+
o.value ? (f(), b("div", Pl, [
|
|
6361
|
+
r.value ? _e((f(), b("input", {
|
|
6405
6362
|
key: 0,
|
|
6406
6363
|
id: `hour_${N(a)}`,
|
|
6407
6364
|
type: "number",
|
|
6408
|
-
"onUpdate:modelValue":
|
|
6365
|
+
"onUpdate:modelValue": L[0] || (L[0] = (_) => u.value = _),
|
|
6409
6366
|
min: "0",
|
|
6410
6367
|
max: "23",
|
|
6411
6368
|
"aria-label": "Hour",
|
|
6412
6369
|
"aria-valuemin": "0",
|
|
6413
6370
|
"aria-valuemax": "23",
|
|
6414
6371
|
"aria-valuenow": u.value,
|
|
6415
|
-
onInput:
|
|
6372
|
+
onInput: h
|
|
6416
6373
|
}, null, 40, Ul)), [
|
|
6417
6374
|
[
|
|
6418
6375
|
Ye,
|
|
@@ -6421,44 +6378,44 @@ const Al = (e, n) => {
|
|
|
6421
6378
|
{ number: !0 }
|
|
6422
6379
|
]
|
|
6423
6380
|
]) : O("", !0),
|
|
6424
|
-
r.value && l.value ? (
|
|
6425
|
-
l.value ? _e((
|
|
6381
|
+
r.value && l.value ? (f(), b("span", Kl, ":")) : O("", !0),
|
|
6382
|
+
l.value ? _e((f(), b("input", {
|
|
6426
6383
|
key: 2,
|
|
6427
6384
|
id: `minute_${N(a)}`,
|
|
6428
6385
|
type: "number",
|
|
6429
|
-
"onUpdate:modelValue":
|
|
6386
|
+
"onUpdate:modelValue": L[1] || (L[1] = (_) => d.value = _),
|
|
6430
6387
|
min: "0",
|
|
6431
6388
|
max: "59",
|
|
6432
6389
|
"aria-label": "Minute",
|
|
6433
6390
|
"aria-valuemin": "0",
|
|
6434
6391
|
"aria-valuemax": "59",
|
|
6435
|
-
"aria-valuenow":
|
|
6436
|
-
onInput:
|
|
6392
|
+
"aria-valuenow": d.value,
|
|
6393
|
+
onInput: x
|
|
6437
6394
|
}, null, 40, jl)), [
|
|
6438
6395
|
[
|
|
6439
6396
|
Ye,
|
|
6440
|
-
|
|
6397
|
+
d.value,
|
|
6441
6398
|
void 0,
|
|
6442
6399
|
{ number: !0 }
|
|
6443
6400
|
]
|
|
6444
6401
|
]) : O("", !0),
|
|
6445
|
-
(r.value || l.value) && s.value ? (
|
|
6446
|
-
s.value ? _e((
|
|
6402
|
+
(r.value || l.value) && s.value ? (f(), b("span", Wl, ":")) : O("", !0),
|
|
6403
|
+
s.value ? _e((f(), b("input", {
|
|
6447
6404
|
key: 4,
|
|
6448
6405
|
id: `second_${N(a)}`,
|
|
6449
6406
|
type: "number",
|
|
6450
|
-
"onUpdate:modelValue":
|
|
6407
|
+
"onUpdate:modelValue": L[2] || (L[2] = (_) => m.value = _),
|
|
6451
6408
|
min: "0",
|
|
6452
6409
|
max: "59",
|
|
6453
6410
|
"aria-label": "Second",
|
|
6454
6411
|
"aria-valuemin": "0",
|
|
6455
6412
|
"aria-valuemax": "59",
|
|
6456
|
-
"aria-valuenow":
|
|
6457
|
-
onInput:
|
|
6413
|
+
"aria-valuenow": m.value,
|
|
6414
|
+
onInput: B
|
|
6458
6415
|
}, null, 40, Yl)), [
|
|
6459
6416
|
[
|
|
6460
6417
|
Ye,
|
|
6461
|
-
|
|
6418
|
+
m.value,
|
|
6462
6419
|
void 0,
|
|
6463
6420
|
{ number: !0 }
|
|
6464
6421
|
]
|
|
@@ -6500,7 +6457,7 @@ const Al = (e, n) => {
|
|
|
6500
6457
|
if (!s.sortable) return;
|
|
6501
6458
|
const c = e.sort?.key === s.key && e.sort.direction === "asc" ? "desc" : "asc";
|
|
6502
6459
|
n("update:sort", { key: s.key, direction: c });
|
|
6503
|
-
}, o = () => window.matchMedia("(max-width: 640px)").matches, i = (s, c) => c.split(".").reduce((u,
|
|
6460
|
+
}, o = () => window.matchMedia("(max-width: 640px)").matches, i = (s, c) => c.split(".").reduce((u, d) => u?.[d], s), r = () => j(
|
|
6504
6461
|
"div",
|
|
6505
6462
|
{
|
|
6506
6463
|
class: "rs-table-mobile",
|
|
@@ -6683,23 +6640,23 @@ const Al = (e, n) => {
|
|
|
6683
6640
|
}
|
|
6684
6641
|
},
|
|
6685
6642
|
setup(e, { slots: n }) {
|
|
6686
|
-
const t =
|
|
6687
|
-
if (a.value.has(
|
|
6688
|
-
a.value.delete(
|
|
6643
|
+
const t = w([]), a = w(new Set(e.defaultOpen)), o = (d) => {
|
|
6644
|
+
if (a.value.has(d)) {
|
|
6645
|
+
a.value.delete(d);
|
|
6689
6646
|
return;
|
|
6690
6647
|
}
|
|
6691
|
-
e.multiple || a.value.clear(), a.value.add(
|
|
6692
|
-
}, i = (
|
|
6693
|
-
|
|
6694
|
-
}, r = (
|
|
6695
|
-
const
|
|
6696
|
-
t.value[(
|
|
6697
|
-
}, s = (
|
|
6698
|
-
const
|
|
6699
|
-
t.value[(
|
|
6648
|
+
e.multiple || a.value.clear(), a.value.add(d);
|
|
6649
|
+
}, i = (d) => {
|
|
6650
|
+
d.disabled || t.value.includes(d) || (t.value.push(d), t.value.sort((m, C) => m.offsetTop - C.offsetTop));
|
|
6651
|
+
}, r = (d) => t.value = t.value.filter((m) => m !== d), l = (d) => {
|
|
6652
|
+
const m = t.value.indexOf(d);
|
|
6653
|
+
t.value[(m + 1) % t.value.length]?.focus();
|
|
6654
|
+
}, s = (d) => {
|
|
6655
|
+
const m = t.value.indexOf(d);
|
|
6656
|
+
t.value[(m - 1 + t.value.length) % t.value.length]?.focus();
|
|
6700
6657
|
}, c = () => t.value[0]?.focus(), u = () => {
|
|
6701
|
-
const
|
|
6702
|
-
|
|
6658
|
+
const d = t.value;
|
|
6659
|
+
d.length && d[d.length - 1]?.focus();
|
|
6703
6660
|
};
|
|
6704
6661
|
return He(Qe, {
|
|
6705
6662
|
multiple: e.multiple,
|
|
@@ -6720,9 +6677,9 @@ const Al = (e, n) => {
|
|
|
6720
6677
|
disabled: { type: Boolean, default: !1 }
|
|
6721
6678
|
},
|
|
6722
6679
|
setup(e, { slots: n }) {
|
|
6723
|
-
const t =
|
|
6680
|
+
const t = me(Qe);
|
|
6724
6681
|
if (!t) throw new Error("AccordionItem must be used inside Accordion");
|
|
6725
|
-
const a =
|
|
6682
|
+
const a = A(() => t.openItems.value.has(e.id));
|
|
6726
6683
|
return () => j(
|
|
6727
6684
|
"div",
|
|
6728
6685
|
{
|
|
@@ -6739,9 +6696,9 @@ const Al = (e, n) => {
|
|
|
6739
6696
|
disabled: { type: Boolean, default: !1 }
|
|
6740
6697
|
},
|
|
6741
6698
|
setup(e, { slots: n }) {
|
|
6742
|
-
const t =
|
|
6699
|
+
const t = me(Qe), a = w(null);
|
|
6743
6700
|
if (!t) throw new Error("AccordionHeader must be used inside Accordion");
|
|
6744
|
-
const o =
|
|
6701
|
+
const o = A(() => t.openItems.value.has(e.id)), i = () => {
|
|
6745
6702
|
e.disabled || t.toggle?.(e.id);
|
|
6746
6703
|
}, r = (l) => {
|
|
6747
6704
|
if (a.value)
|
|
@@ -6798,9 +6755,9 @@ const Al = (e, n) => {
|
|
|
6798
6755
|
id: { type: String, required: !0 }
|
|
6799
6756
|
},
|
|
6800
6757
|
setup(e, { slots: n }) {
|
|
6801
|
-
const t =
|
|
6758
|
+
const t = me(Qe);
|
|
6802
6759
|
if (!t) throw new Error("AccordionPanel must be used inside Accordion");
|
|
6803
|
-
const a =
|
|
6760
|
+
const a = A(() => t.openItems.value.has(e.id));
|
|
6804
6761
|
return () => j(
|
|
6805
6762
|
"div",
|
|
6806
6763
|
{
|
|
@@ -6830,8 +6787,8 @@ export {
|
|
|
6830
6787
|
Le as Button,
|
|
6831
6788
|
kt as ButtonMenu,
|
|
6832
6789
|
vr as Card,
|
|
6833
|
-
|
|
6834
|
-
|
|
6790
|
+
pr as CardBody,
|
|
6791
|
+
mr as CardFooter,
|
|
6835
6792
|
fr as CardHeader,
|
|
6836
6793
|
br as Carousel,
|
|
6837
6794
|
kr as CarouselItem,
|
|
@@ -6875,7 +6832,7 @@ export {
|
|
|
6875
6832
|
yr as TimelineItem,
|
|
6876
6833
|
cr as ToastPlugin,
|
|
6877
6834
|
xt as ToastViewport,
|
|
6878
|
-
|
|
6835
|
+
mt as Toggle,
|
|
6879
6836
|
bt as Tooltip,
|
|
6880
6837
|
yt as Upload,
|
|
6881
6838
|
qe as confirm,
|