@reinosoft-ui/core 0.1.86 → 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 +1349 -1394
- 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,42 +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
2534
|
o.value.trim() && (t.editor?.restoreSelection(), t.editor?.applyLink(o.value), t.editor?.rootElement?.dispatchEvent(
|
|
2580
2535
|
new Event("input", { bubbles: !0 })
|
|
2581
2536
|
), o.value = "", i.value = !1, t.editor?.focus());
|
|
2582
|
-
},
|
|
2537
|
+
}, R = () => {
|
|
2583
2538
|
i.value = !1, o.value = "";
|
|
2584
|
-
},
|
|
2539
|
+
}, $ = (g) => {
|
|
2585
2540
|
g.action(t.editor);
|
|
2586
|
-
},
|
|
2587
|
-
if (
|
|
2588
|
-
const D = g.target,
|
|
2541
|
+
}, V = (g) => {
|
|
2542
|
+
if (d) return;
|
|
2543
|
+
const D = g.target, E = s.value, q = t.editor?.rootElement;
|
|
2589
2544
|
if (i.value) {
|
|
2590
|
-
const T =
|
|
2545
|
+
const T = E?.contains(D), Y = q?.contains(D);
|
|
2591
2546
|
if (T || Y) return;
|
|
2592
|
-
|
|
2547
|
+
R(), r.value = !1;
|
|
2593
2548
|
return;
|
|
2594
2549
|
}
|
|
2595
|
-
if (!
|
|
2596
|
-
const
|
|
2597
|
-
|
|
2550
|
+
if (!E || !q) return;
|
|
2551
|
+
const H = E.contains(D), k = q.contains(D);
|
|
2552
|
+
H || k || (r.value = !1);
|
|
2598
2553
|
};
|
|
2599
2554
|
return ve(() => {
|
|
2600
2555
|
document.addEventListener("selectionchange", () => {
|
|
2601
2556
|
re();
|
|
2602
|
-
}), document.addEventListener("focusin",
|
|
2557
|
+
}), document.addEventListener("focusin", V);
|
|
2603
2558
|
}), Se(() => {
|
|
2604
|
-
|
|
2559
|
+
h?.(), C?.disconnect(), C = null, cancelAnimationFrame(x), document.removeEventListener("selectionchange", re), document.removeEventListener("focusin", V);
|
|
2605
2560
|
}), n({
|
|
2606
2561
|
focusFirstButton: oe
|
|
2607
|
-
}), (g, D) => (
|
|
2562
|
+
}), (g, D) => (f(), ae(Fe, { to: "body" }, [
|
|
2608
2563
|
U(Ae, { name: "tooltip-fade" }, {
|
|
2609
2564
|
default: J(() => [
|
|
2610
|
-
r.value ? (
|
|
2565
|
+
r.value ? (f(), b("div", {
|
|
2611
2566
|
key: 0,
|
|
2612
2567
|
ref_key: "toolbarRef",
|
|
2613
2568
|
ref: s,
|
|
@@ -2619,41 +2574,41 @@ const At = (e) => {
|
|
|
2619
2574
|
tabindex: "-1",
|
|
2620
2575
|
onKeydown: ue
|
|
2621
2576
|
}, [
|
|
2622
|
-
D[4] || (D[4] =
|
|
2623
|
-
i.value ? (
|
|
2624
|
-
_e(
|
|
2577
|
+
D[4] || (D[4] = M("div", { class: "arrow" }, null, -1)),
|
|
2578
|
+
i.value ? (f(), b("div", Xa, [
|
|
2579
|
+
_e(M("input", {
|
|
2625
2580
|
ref_key: "linkInputRef",
|
|
2626
2581
|
ref: u,
|
|
2627
|
-
"onUpdate:modelValue": D[0] || (D[0] = (
|
|
2582
|
+
"onUpdate:modelValue": D[0] || (D[0] = (E) => o.value = E),
|
|
2628
2583
|
type: "text",
|
|
2629
2584
|
placeholder: "https://...",
|
|
2630
|
-
onBlur: D[1] || (D[1] = se((
|
|
2585
|
+
onBlur: D[1] || (D[1] = se((E) => i.value = !1, ["prevent"])),
|
|
2631
2586
|
onKeydown: ye(F, ["enter"]),
|
|
2632
2587
|
onMousedown: D[2] || (D[2] = se(() => {
|
|
2633
2588
|
}, ["stop"]))
|
|
2634
2589
|
}, null, 544), [
|
|
2635
2590
|
[Ye, o.value]
|
|
2636
2591
|
]),
|
|
2637
|
-
|
|
2592
|
+
M("button", {
|
|
2638
2593
|
onClick: F,
|
|
2639
2594
|
onMousedown: D[3] || (D[3] = se(() => {
|
|
2640
2595
|
}, ["prevent"]))
|
|
2641
2596
|
}, "Ok ", 32)
|
|
2642
|
-
])) : (
|
|
2643
|
-
key:
|
|
2597
|
+
])) : (f(!0), b(de, { key: 0 }, he(P.value, (E, q) => (f(), b("button", {
|
|
2598
|
+
key: E.key ?? q,
|
|
2644
2599
|
type: "button",
|
|
2645
2600
|
ref_for: !0,
|
|
2646
|
-
ref: (
|
|
2647
|
-
class: fe({ "is-active":
|
|
2648
|
-
"aria-pressed":
|
|
2649
|
-
onClick: (
|
|
2650
|
-
"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
|
|
2651
2606
|
}, [
|
|
2652
|
-
|
|
2607
|
+
E.type === "icon" ? (f(), ae(Ce, {
|
|
2653
2608
|
key: 0,
|
|
2654
|
-
name:
|
|
2655
|
-
size:
|
|
2656
|
-
}, 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))
|
|
2657
2612
|
], 10, Wa))), 128))
|
|
2658
2613
|
], 44, ja)) : O("", !0)
|
|
2659
2614
|
]),
|
|
@@ -2677,7 +2632,7 @@ const At = (e) => {
|
|
|
2677
2632
|
}),
|
|
2678
2633
|
emits: ["update:modelValue"],
|
|
2679
2634
|
setup(e, { expose: n }) {
|
|
2680
|
-
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);
|
|
2681
2636
|
return Q(
|
|
2682
2637
|
() => t.value,
|
|
2683
2638
|
(s) => {
|
|
@@ -2704,8 +2659,8 @@ const At = (e) => {
|
|
|
2704
2659
|
c.addEventListener("input", u), Be(() => c.removeEventListener("input", u));
|
|
2705
2660
|
}), He("announce", (s) => r.value?.announce(s)), n({
|
|
2706
2661
|
editor: r
|
|
2707
|
-
}), (s, c) => (
|
|
2708
|
-
U(
|
|
2662
|
+
}), (s, c) => (f(), b("section", en, [
|
|
2663
|
+
U(p1, {
|
|
2709
2664
|
ref_key: "contentRef",
|
|
2710
2665
|
ref: l,
|
|
2711
2666
|
editor: r.value,
|
|
@@ -2747,7 +2702,7 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2747
2702
|
key: 3,
|
|
2748
2703
|
class: "ui-upload__status canceled",
|
|
2749
2704
|
role: "status"
|
|
2750
|
-
},
|
|
2705
|
+
}, pn = { class: "ui-upload__actions" }, mn = {
|
|
2751
2706
|
class: "sr-only",
|
|
2752
2707
|
"aria-live": "polite"
|
|
2753
2708
|
}, Cn = ["id"], hn = /* @__PURE__ */ Z({
|
|
@@ -2768,94 +2723,94 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2768
2723
|
}),
|
|
2769
2724
|
emits: /* @__PURE__ */ ie(["select", "upload", "remove"], ["update:modelValue"]),
|
|
2770
2725
|
setup(e, { emit: n }) {
|
|
2771
|
-
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 = () => {
|
|
2772
2727
|
a.disabled || (i.value++, l.value = !0);
|
|
2773
|
-
},
|
|
2728
|
+
}, B = () => {
|
|
2774
2729
|
i.value = Math.max(0, i.value - 1), i.value === 0 && (l.value = !1);
|
|
2775
|
-
},
|
|
2776
|
-
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (i.value = 0, l.value = !1,
|
|
2777
|
-
if (!a.multiple &&
|
|
2778
|
-
const
|
|
2779
|
-
_([
|
|
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]);
|
|
2780
2735
|
return;
|
|
2781
2736
|
}
|
|
2782
|
-
_(Array.from(
|
|
2737
|
+
_(Array.from($.dataTransfer.files));
|
|
2783
2738
|
}
|
|
2784
|
-
},
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2787
|
-
}, _ = (
|
|
2788
|
-
const
|
|
2789
|
-
for (const D of
|
|
2790
|
-
if (u.value.length +
|
|
2791
|
-
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({
|
|
2792
2747
|
id: crypto.randomUUID(),
|
|
2793
2748
|
file: D,
|
|
2794
2749
|
progress: 0,
|
|
2795
2750
|
status: "idle"
|
|
2796
2751
|
});
|
|
2797
2752
|
}
|
|
2798
|
-
if (!
|
|
2799
|
-
o("select",
|
|
2800
|
-
const g = [...u.value, ...
|
|
2801
|
-
t.value = g, a.autoUpload &&
|
|
2802
|
-
}, z = (
|
|
2803
|
-
const
|
|
2804
|
-
|
|
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}`);
|
|
2805
2760
|
const g = () => {
|
|
2806
|
-
|
|
2761
|
+
V.signal.removeEventListener("abort", g);
|
|
2807
2762
|
};
|
|
2808
|
-
|
|
2763
|
+
V.signal.addEventListener("abort", g);
|
|
2809
2764
|
const D = {
|
|
2810
|
-
signal:
|
|
2811
|
-
onProgress: (
|
|
2812
|
-
|
|
2765
|
+
signal: V.signal,
|
|
2766
|
+
onProgress: (E) => {
|
|
2767
|
+
$.progress = E, ue();
|
|
2813
2768
|
},
|
|
2814
2769
|
done: () => {
|
|
2815
|
-
|
|
2770
|
+
$.status = "success", $.progress = 100, $.controller = void 0, F(`Finished uploading ${$.file.name}`), ue();
|
|
2816
2771
|
},
|
|
2817
|
-
fail: (
|
|
2818
|
-
|
|
2772
|
+
fail: (E) => {
|
|
2773
|
+
$.status = "error", $.error = E, $.controller = void 0, F(`Failed to upload ${$.file.name}: ${E}`), ue();
|
|
2819
2774
|
}
|
|
2820
2775
|
};
|
|
2821
|
-
o("upload",
|
|
2822
|
-
}, P = (
|
|
2823
|
-
|
|
2824
|
-
}, oe = (
|
|
2825
|
-
|
|
2826
|
-
}, ue = () => t.value = [...u.value], re = (
|
|
2827
|
-
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"];
|
|
2828
2783
|
let g = 0;
|
|
2829
|
-
for (;
|
|
2830
|
-
|
|
2831
|
-
return `${
|
|
2832
|
-
}, F = (
|
|
2784
|
+
for (; $ >= 1024 && g < V.length - 1; )
|
|
2785
|
+
$ /= 1024, g++;
|
|
2786
|
+
return `${$.toFixed(2)} ${V[g]}`;
|
|
2787
|
+
}, F = ($) => {
|
|
2833
2788
|
r.value = "", requestAnimationFrame(() => {
|
|
2834
|
-
r.value =
|
|
2789
|
+
r.value = $;
|
|
2835
2790
|
});
|
|
2836
|
-
},
|
|
2837
|
-
|
|
2791
|
+
}, R = ($) => {
|
|
2792
|
+
$.controller && $.controller.abort(), o("remove", $), t.value = u.value.filter((V) => V.id !== $.id);
|
|
2838
2793
|
};
|
|
2839
|
-
return (
|
|
2794
|
+
return ($, V) => (f(), b("div", {
|
|
2840
2795
|
role: "button",
|
|
2841
2796
|
class: "ui-upload",
|
|
2842
2797
|
tabindex: e.disabled ? -1 : 0,
|
|
2843
2798
|
"aria-label": e.ariaLabel || "File upload area",
|
|
2844
2799
|
"aria-describedby": l.value ? N(s) : void 0,
|
|
2845
|
-
"aria-busy":
|
|
2800
|
+
"aria-busy": C.value ? "true" : void 0,
|
|
2846
2801
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
2847
2802
|
"data-disabled": e.disabled || void 0,
|
|
2848
2803
|
"data-dragging": l.value || void 0,
|
|
2849
|
-
onClick:
|
|
2804
|
+
onClick: V[0] || (V[0] = (g) => !e.disabled && h()),
|
|
2850
2805
|
onKeydown: [
|
|
2851
|
-
|
|
2852
|
-
|
|
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"]))
|
|
2853
2808
|
],
|
|
2854
|
-
onDragover:
|
|
2855
|
-
onDragleave:
|
|
2856
|
-
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"]))
|
|
2857
2812
|
}, [
|
|
2858
|
-
|
|
2813
|
+
M("input", {
|
|
2859
2814
|
type: "file",
|
|
2860
2815
|
ref_key: "inputRef",
|
|
2861
2816
|
ref: c,
|
|
@@ -2863,9 +2818,9 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2863
2818
|
multiple: e.multiple,
|
|
2864
2819
|
accept: e.accept,
|
|
2865
2820
|
disabled: e.disabled,
|
|
2866
|
-
onChange:
|
|
2821
|
+
onChange: L
|
|
2867
2822
|
}, null, 40, an),
|
|
2868
|
-
e.multiple || !e.multiple && t.value.length === 0 ? G(
|
|
2823
|
+
e.multiple || !e.multiple && t.value.length === 0 ? G($.$slots, "default", {
|
|
2869
2824
|
key: 0,
|
|
2870
2825
|
dragging: l.value
|
|
2871
2826
|
}, () => [
|
|
@@ -2873,77 +2828,77 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2873
2828
|
name: "upload",
|
|
2874
2829
|
size: 32
|
|
2875
2830
|
}),
|
|
2876
|
-
|
|
2877
|
-
|
|
2831
|
+
V[6] || (V[6] = M("p", null, "Drag and Drop files here", -1)),
|
|
2832
|
+
V[7] || (V[7] = M("span", null, "or", -1)),
|
|
2878
2833
|
U(Le, {
|
|
2879
2834
|
type: "button",
|
|
2880
2835
|
class: "btn btn-outline"
|
|
2881
2836
|
}, {
|
|
2882
|
-
default: J(() => [...
|
|
2837
|
+
default: J(() => [...V[5] || (V[5] = [
|
|
2883
2838
|
Me("Choose File", -1)
|
|
2884
2839
|
])]),
|
|
2885
2840
|
_: 1
|
|
2886
2841
|
}),
|
|
2887
|
-
|
|
2842
|
+
M("span", null, "Maximum size: " + K(d.value), 1)
|
|
2888
2843
|
], !0) : O("", !0),
|
|
2889
|
-
u.value?.length ? (
|
|
2890
|
-
(
|
|
2844
|
+
u.value?.length ? (f(), b("ul", nn, [
|
|
2845
|
+
(f(!0), b(de, null, he(u.value, (g) => (f(), b("li", {
|
|
2891
2846
|
key: g.id,
|
|
2892
2847
|
class: "ui-upload__item"
|
|
2893
2848
|
}, [
|
|
2894
|
-
G(
|
|
2849
|
+
G($.$slots, "file", {
|
|
2895
2850
|
file: g,
|
|
2896
|
-
remove: () =>
|
|
2851
|
+
remove: () => R(g),
|
|
2897
2852
|
cancel: () => P(g),
|
|
2898
2853
|
retry: () => oe(g)
|
|
2899
2854
|
}, () => [
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2855
|
+
M("div", on, [
|
|
2856
|
+
M("span", ln, K(g.file.name), 1),
|
|
2857
|
+
M("span", rn, K(re(g.file.size)), 1)
|
|
2903
2858
|
]),
|
|
2904
|
-
g.status === "uploading" ? (
|
|
2905
|
-
|
|
2906
|
-
|
|
2859
|
+
g.status === "uploading" ? (f(), b("div", sn, [
|
|
2860
|
+
M("span", un, K(g.progress) + "% ", 1),
|
|
2861
|
+
M("progress", {
|
|
2907
2862
|
class: "ui-upload__progress",
|
|
2908
2863
|
value: g.progress,
|
|
2909
2864
|
max: "100",
|
|
2910
2865
|
"aria-label": `Upload progress for ${g.file.name}`
|
|
2911
2866
|
}, null, 8, cn)
|
|
2912
2867
|
])) : O("", !0),
|
|
2913
|
-
g.status === "success" ? (
|
|
2914
|
-
g.status === "error" ? (
|
|
2915
|
-
g.status === "canceled" ? (
|
|
2916
|
-
|
|
2917
|
-
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, {
|
|
2918
2873
|
key: 0,
|
|
2919
2874
|
type: "button",
|
|
2920
2875
|
class: "btn-danger btn-xs",
|
|
2921
2876
|
onClick: se((D) => P(g), ["stop"])
|
|
2922
2877
|
}, {
|
|
2923
|
-
default: J(() => [...
|
|
2878
|
+
default: J(() => [...V[8] || (V[8] = [
|
|
2924
2879
|
Me(" Cancel ", -1)
|
|
2925
2880
|
])]),
|
|
2926
2881
|
_: 1
|
|
2927
2882
|
}, 8, ["onClick"])) : O("", !0),
|
|
2928
|
-
g.status === "error" || g.status === "canceled" ? (
|
|
2883
|
+
g.status === "error" || g.status === "canceled" ? (f(), ae(Le, {
|
|
2929
2884
|
key: 1,
|
|
2930
2885
|
type: "button",
|
|
2931
2886
|
class: "btn-info btn-xs",
|
|
2932
2887
|
onClick: se((D) => oe(g), ["stop"])
|
|
2933
2888
|
}, {
|
|
2934
|
-
default: J(() => [...
|
|
2889
|
+
default: J(() => [...V[9] || (V[9] = [
|
|
2935
2890
|
Me(" Retry ", -1)
|
|
2936
2891
|
])]),
|
|
2937
2892
|
_: 1
|
|
2938
2893
|
}, 8, ["onClick"])) : O("", !0),
|
|
2939
|
-
g.status !== "uploading" ? (
|
|
2894
|
+
g.status !== "uploading" ? (f(), ae(Le, {
|
|
2940
2895
|
key: 2,
|
|
2941
2896
|
type: "button",
|
|
2942
2897
|
class: "btn-outline btn-xs",
|
|
2943
|
-
onClick: se((D) =>
|
|
2898
|
+
onClick: se((D) => R(g), ["stop"]),
|
|
2944
2899
|
"aria-label": "Remove file"
|
|
2945
2900
|
}, {
|
|
2946
|
-
default: J(() => [...
|
|
2901
|
+
default: J(() => [...V[10] || (V[10] = [
|
|
2947
2902
|
Me(" Remove ", -1)
|
|
2948
2903
|
])]),
|
|
2949
2904
|
_: 1
|
|
@@ -2952,8 +2907,8 @@ const tn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2952
2907
|
], !0)
|
|
2953
2908
|
]))), 128))
|
|
2954
2909
|
])) : O("", !0),
|
|
2955
|
-
|
|
2956
|
-
|
|
2910
|
+
M("div", mn, K(r.value), 1),
|
|
2911
|
+
M("p", {
|
|
2957
2912
|
id: N(s),
|
|
2958
2913
|
class: "sr-only"
|
|
2959
2914
|
}, " Drop files to upload ", 8, Cn)
|
|
@@ -2977,65 +2932,65 @@ const gn = (e) => {
|
|
|
2977
2932
|
disabled: { type: Boolean, default: !1 }
|
|
2978
2933
|
},
|
|
2979
2934
|
setup(e) {
|
|
2980
|
-
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({});
|
|
2981
2936
|
let s = null, c = null, u = null;
|
|
2982
|
-
const
|
|
2937
|
+
const d = () => {
|
|
2983
2938
|
n.disabled || (s && (clearTimeout(s), s = null), n.delay ? s = window.setTimeout(() => {
|
|
2984
2939
|
a.value = !0, s = null;
|
|
2985
2940
|
}, n.delay) : a.value = !0);
|
|
2986
|
-
}, C = () => {
|
|
2987
|
-
s && (clearTimeout(s), s = null), a.value = !1;
|
|
2988
2941
|
}, m = () => {
|
|
2942
|
+
s && (clearTimeout(s), s = null), a.value = !1;
|
|
2943
|
+
}, C = () => {
|
|
2989
2944
|
if (!i.value || !r.value) return {};
|
|
2990
|
-
const
|
|
2945
|
+
const x = i.value.getBoundingClientRect(), B = r.value.getBoundingClientRect(), S = {
|
|
2991
2946
|
position: "fixed"
|
|
2992
2947
|
};
|
|
2993
2948
|
switch (n.placement) {
|
|
2994
2949
|
case "top":
|
|
2995
|
-
|
|
2950
|
+
S.left = `${x.left + x.width / 2 - B.width / 2}px`, S.top = `${x.top - B.height - t}px`;
|
|
2996
2951
|
break;
|
|
2997
2952
|
case "bottom":
|
|
2998
|
-
|
|
2953
|
+
S.left = `${x.left + x.width / 2 - B.width / 2}px`, S.top = `${x.bottom + t}px`;
|
|
2999
2954
|
break;
|
|
3000
2955
|
case "left":
|
|
3001
|
-
|
|
2956
|
+
S.left = `${x.left - B.width - t}px`, S.top = `${x.top + x.height / 2 - B.height / 2}px`;
|
|
3002
2957
|
break;
|
|
3003
2958
|
case "right":
|
|
3004
|
-
|
|
2959
|
+
S.left = `${x.right + t}px`, S.top = `${x.top + x.height / 2 - B.height / 2}px`;
|
|
3005
2960
|
break;
|
|
3006
2961
|
}
|
|
3007
|
-
return
|
|
3008
|
-
},
|
|
3009
|
-
l.value =
|
|
2962
|
+
return S;
|
|
2963
|
+
}, h = () => {
|
|
2964
|
+
l.value = C();
|
|
3010
2965
|
};
|
|
3011
|
-
return Q(a, async (
|
|
3012
|
-
if (!
|
|
2966
|
+
return Q(a, async (x) => {
|
|
2967
|
+
if (!x) {
|
|
3013
2968
|
c?.(), c = null, u?.disconnect(), u = null;
|
|
3014
2969
|
return;
|
|
3015
2970
|
}
|
|
3016
|
-
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);
|
|
3017
2972
|
}), Se(() => {
|
|
3018
2973
|
c?.(), u?.disconnect();
|
|
3019
|
-
}), (
|
|
3020
|
-
|
|
2974
|
+
}), (x, B) => (f(), b(de, null, [
|
|
2975
|
+
M("span", {
|
|
3021
2976
|
ref_key: "triggerRef",
|
|
3022
2977
|
ref: i,
|
|
3023
2978
|
class: "tooltip-trigger",
|
|
3024
2979
|
"aria-describedby": a.value ? o : void 0,
|
|
3025
2980
|
"aria-disabled": e.disabled || void 0,
|
|
3026
2981
|
"aria-expanded": a.value || void 0,
|
|
3027
|
-
onMouseenter:
|
|
3028
|
-
onMouseleave:
|
|
3029
|
-
onFocus:
|
|
3030
|
-
onBlur:
|
|
3031
|
-
onKeydown: ye(
|
|
2982
|
+
onMouseenter: d,
|
|
2983
|
+
onMouseleave: m,
|
|
2984
|
+
onFocus: d,
|
|
2985
|
+
onBlur: m,
|
|
2986
|
+
onKeydown: ye(m, ["esc"])
|
|
3032
2987
|
}, [
|
|
3033
|
-
G(
|
|
2988
|
+
G(x.$slots, "default", {}, void 0, !0)
|
|
3034
2989
|
], 40, yn),
|
|
3035
|
-
(
|
|
2990
|
+
(f(), ae(Fe, { to: "body" }, [
|
|
3036
2991
|
U(Ae, { name: "tooltip-fade" }, {
|
|
3037
2992
|
default: J(() => [
|
|
3038
|
-
a.value ? (
|
|
2993
|
+
a.value ? (f(), b("div", {
|
|
3039
2994
|
key: 0,
|
|
3040
2995
|
ref_key: "tooltipRef",
|
|
3041
2996
|
ref: r,
|
|
@@ -3047,8 +3002,8 @@ const gn = (e) => {
|
|
|
3047
3002
|
"data-placement": n.placement,
|
|
3048
3003
|
style: Ie(l.value)
|
|
3049
3004
|
}, [
|
|
3050
|
-
|
|
3051
|
-
G(
|
|
3005
|
+
B[0] || (B[0] = M("div", { class: "tooltip-arrow" }, null, -1)),
|
|
3006
|
+
G(x.$slots, "content", {}, () => [
|
|
3052
3007
|
Me(K(e.content), 1)
|
|
3053
3008
|
], !0)
|
|
3054
3009
|
], 12, bn)) : O("", !0)
|
|
@@ -3078,17 +3033,17 @@ const Ln = {
|
|
|
3078
3033
|
},
|
|
3079
3034
|
emits: ["click", "remove"],
|
|
3080
3035
|
setup(e, { emit: n }) {
|
|
3081
|
-
const t = e, a = n, o =
|
|
3036
|
+
const t = e, a = n, o = A(() => t.clickable || t.as === "button" || t.as === "a"), i = A(() => [
|
|
3082
3037
|
`ui-tag--${t.variant}`,
|
|
3083
3038
|
`ui-tag--${t.size}`,
|
|
3084
3039
|
{
|
|
3085
3040
|
"is-clickable": t.clickable,
|
|
3086
3041
|
"is-removable": t.removable
|
|
3087
3042
|
}
|
|
3088
|
-
]), r =
|
|
3043
|
+
]), r = A(() => t.clickable && t.as !== "button" && t.as !== "a"), l = (c) => {
|
|
3089
3044
|
t.disabled || !o.value || a("click", c);
|
|
3090
3045
|
}, s = () => a("remove");
|
|
3091
|
-
return (c, u) => (
|
|
3046
|
+
return (c, u) => (f(), ae(Ne(e.as), {
|
|
3092
3047
|
ref: "rootRef",
|
|
3093
3048
|
class: fe(["ui-tag", i.value]),
|
|
3094
3049
|
"aria-disabled": e.disabled || void 0,
|
|
@@ -3096,18 +3051,18 @@ const Ln = {
|
|
|
3096
3051
|
role: r.value ? "button" : void 0,
|
|
3097
3052
|
onClick: l,
|
|
3098
3053
|
onKeydown: [
|
|
3099
|
-
u[0] || (u[0] = ye(se((
|
|
3100
|
-
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"]))
|
|
3101
3056
|
]
|
|
3102
3057
|
}, {
|
|
3103
3058
|
default: J(() => [
|
|
3104
|
-
c.$slots.icon ? (
|
|
3059
|
+
c.$slots.icon ? (f(), b("span", Ln, [
|
|
3105
3060
|
G(c.$slots, "icon", {}, void 0, !0)
|
|
3106
3061
|
])) : O("", !0),
|
|
3107
|
-
|
|
3062
|
+
M("span", xn, [
|
|
3108
3063
|
G(c.$slots, "default", {}, void 0, !0)
|
|
3109
3064
|
]),
|
|
3110
|
-
e.removable ? (
|
|
3065
|
+
e.removable ? (f(), b("button", {
|
|
3111
3066
|
key: 1,
|
|
3112
3067
|
class: "ui-tag__remove",
|
|
3113
3068
|
type: "button",
|
|
@@ -3140,7 +3095,7 @@ const Ln = {
|
|
|
3140
3095
|
}
|
|
3141
3096
|
a("click", i);
|
|
3142
3097
|
};
|
|
3143
|
-
return (i, r) => (
|
|
3098
|
+
return (i, r) => (f(), b("a", {
|
|
3144
3099
|
class: "link",
|
|
3145
3100
|
href: e.disabled ? void 0 : e.href,
|
|
3146
3101
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
@@ -3157,43 +3112,43 @@ const Ln = {
|
|
|
3157
3112
|
__name: "Dropdown",
|
|
3158
3113
|
setup(e) {
|
|
3159
3114
|
let n = 0;
|
|
3160
|
-
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 = () => {
|
|
3161
3116
|
t.value = !1, o.value = {}, n = 0, a.value?.focus({ preventScroll: !0 });
|
|
3162
|
-
}, u = () => t.value = !t.value,
|
|
3117
|
+
}, u = () => t.value = !t.value, d = (L) => {
|
|
3163
3118
|
const _ = `dropdown-item-${n++}`;
|
|
3164
|
-
return o.value[_] =
|
|
3165
|
-
},
|
|
3166
|
-
const _ = o.value[
|
|
3119
|
+
return o.value[_] = L, _;
|
|
3120
|
+
}, m = (L) => {
|
|
3121
|
+
const _ = o.value[L];
|
|
3167
3122
|
_ && _.focus({ preventScroll: !0 });
|
|
3168
|
-
},
|
|
3169
|
-
const
|
|
3170
|
-
|
|
3171
|
-
},
|
|
3172
|
-
const
|
|
3173
|
-
_ &&
|
|
3174
|
-
},
|
|
3175
|
-
const _ = Object.keys(o.value), z =
|
|
3176
|
-
z >= 0 && z < _.length - 1 && P &&
|
|
3177
|
-
},
|
|
3178
|
-
const _ = Object.keys(o.value), z =
|
|
3179
|
-
z > 0 && P &&
|
|
3180
|
-
},
|
|
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);
|
|
3181
3136
|
return He("DropdownContext", {
|
|
3182
3137
|
open: s,
|
|
3183
3138
|
close: c,
|
|
3184
3139
|
toggle: u,
|
|
3185
3140
|
isOpen: t,
|
|
3186
|
-
registerItem:
|
|
3187
|
-
focusItem:
|
|
3188
|
-
focusNextItem:
|
|
3189
|
-
focusPrevItem:
|
|
3190
|
-
focusFirstItem:
|
|
3191
|
-
focusLastItem:
|
|
3141
|
+
registerItem: d,
|
|
3142
|
+
focusItem: m,
|
|
3143
|
+
focusNextItem: x,
|
|
3144
|
+
focusPrevItem: B,
|
|
3145
|
+
focusFirstItem: C,
|
|
3146
|
+
focusLastItem: h,
|
|
3192
3147
|
triggerRef: a,
|
|
3193
3148
|
menuId: r,
|
|
3194
3149
|
triggerId: l
|
|
3195
|
-
}), (
|
|
3196
|
-
G(
|
|
3150
|
+
}), (L, _) => (f(), b("div", _n, [
|
|
3151
|
+
G(L.$slots, "default", {}, void 0, !0)
|
|
3197
3152
|
]));
|
|
3198
3153
|
}
|
|
3199
3154
|
}), En = /* @__PURE__ */ W(An, [["__scopeId", "data-v-3a863710"]]), Rn = /* @__PURE__ */ Z({
|
|
@@ -3203,12 +3158,12 @@ const Ln = {
|
|
|
3203
3158
|
classes: {}
|
|
3204
3159
|
},
|
|
3205
3160
|
setup(e) {
|
|
3206
|
-
const n = e, t =
|
|
3161
|
+
const n = e, t = me("DropdownContext");
|
|
3207
3162
|
if (!t) throw new Error("DropdownTrigger must be used within a Dropdown");
|
|
3208
|
-
const a =
|
|
3163
|
+
const a = w(), o = (i) => {
|
|
3209
3164
|
i.key === "ArrowDown" && (i.preventDefault(), t.open(), $e(() => t.focusFirstItem())), i.key === "ArrowUp" && (i.preventDefault(), t.open(), $e(() => t.focusLastItem()));
|
|
3210
3165
|
};
|
|
3211
|
-
return ve(() => t.triggerRef.value = a.value?.el), (i, r) => (
|
|
3166
|
+
return ve(() => t.triggerRef.value = a.value?.el), (i, r) => (f(), ae(Le, {
|
|
3212
3167
|
ref_key: "btn",
|
|
3213
3168
|
ref: a,
|
|
3214
3169
|
id: N(t).triggerId,
|
|
@@ -3221,7 +3176,7 @@ const Ln = {
|
|
|
3221
3176
|
}, {
|
|
3222
3177
|
default: J(() => [
|
|
3223
3178
|
G(i.$slots, "default", {}, void 0, !0),
|
|
3224
|
-
n.variant === "button" ? (
|
|
3179
|
+
n.variant === "button" ? (f(), ae(Ce, {
|
|
3225
3180
|
key: 0,
|
|
3226
3181
|
name: "directionDown"
|
|
3227
3182
|
})) : O("", !0)
|
|
@@ -3232,28 +3187,28 @@ const Ln = {
|
|
|
3232
3187
|
}), Sn = /* @__PURE__ */ W(Rn, [["__scopeId", "data-v-75ab95f2"]]), Tn = ["id", "aria-labelledby"], Dn = /* @__PURE__ */ Z({
|
|
3233
3188
|
__name: "DropdownMenu",
|
|
3234
3189
|
setup(e) {
|
|
3235
|
-
const n =
|
|
3190
|
+
const n = me("DropdownContext");
|
|
3236
3191
|
if (!n) throw new Error("DropdownMenu must be used within a Dropdown");
|
|
3237
|
-
const t =
|
|
3192
|
+
const t = w(), a = w({});
|
|
3238
3193
|
let o = !1, i;
|
|
3239
|
-
const r = (
|
|
3240
|
-
const
|
|
3241
|
-
t.value?.contains(
|
|
3242
|
-
}, l = (
|
|
3243
|
-
const
|
|
3244
|
-
if (!
|
|
3245
|
-
const
|
|
3246
|
-
let
|
|
3247
|
-
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 = {
|
|
3248
3203
|
"--dropdown-menu-position": "fixed",
|
|
3249
|
-
"--dropdown-menu-top": `${
|
|
3250
|
-
"--dropdown-menu-left": `${
|
|
3204
|
+
"--dropdown-menu-top": `${x}px`,
|
|
3205
|
+
"--dropdown-menu-left": `${B}px`
|
|
3251
3206
|
};
|
|
3252
|
-
}, c = () => new Promise((
|
|
3207
|
+
}, c = () => new Promise((d) => requestAnimationFrame(() => d()));
|
|
3253
3208
|
Q(
|
|
3254
3209
|
() => n.isOpen.value,
|
|
3255
|
-
async (
|
|
3256
|
-
|
|
3210
|
+
async (d) => {
|
|
3211
|
+
d ? (await c(), await c(), s(), n.focusFirstItem(), document.addEventListener("pointerdown", r, !0)) : document.removeEventListener("pointerdown", r, !0);
|
|
3257
3212
|
}
|
|
3258
3213
|
);
|
|
3259
3214
|
const u = () => {
|
|
@@ -3267,8 +3222,8 @@ const Ln = {
|
|
|
3267
3222
|
}), t.value && i.observe(t.value), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u);
|
|
3268
3223
|
}), Be(() => {
|
|
3269
3224
|
i?.disconnect(), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
|
|
3270
|
-
}), (
|
|
3271
|
-
N(n).isOpen.value ? (
|
|
3225
|
+
}), (d, m) => (f(), ae(Fe, { to: "body" }, [
|
|
3226
|
+
N(n).isOpen.value ? (f(), b("div", {
|
|
3272
3227
|
key: 0,
|
|
3273
3228
|
role: "menu",
|
|
3274
3229
|
ref_key: "menuRef",
|
|
@@ -3280,7 +3235,7 @@ const Ln = {
|
|
|
3280
3235
|
class: "ui-dropdown-menu",
|
|
3281
3236
|
onKeydown: l
|
|
3282
3237
|
}, [
|
|
3283
|
-
G(
|
|
3238
|
+
G(d.$slots, "default", {}, void 0, !0)
|
|
3284
3239
|
], 44, Tn)) : O("", !0)
|
|
3285
3240
|
]));
|
|
3286
3241
|
}
|
|
@@ -3291,7 +3246,7 @@ const Ln = {
|
|
|
3291
3246
|
},
|
|
3292
3247
|
emits: ["click"],
|
|
3293
3248
|
setup(e) {
|
|
3294
|
-
return (n, t) => (
|
|
3249
|
+
return (n, t) => (f(), b("div", zn, [
|
|
3295
3250
|
U(Le, be({
|
|
3296
3251
|
class: ["btn-menu-primary", e.variant]
|
|
3297
3252
|
}, n.$attrs, {
|
|
@@ -3363,16 +3318,16 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3363
3318
|
for (; n > 0 && n < a.length && a[n - 1]?.type === "literal"; )
|
|
3364
3319
|
n += t;
|
|
3365
3320
|
return n;
|
|
3366
|
-
}, dt = (e, n, t, a) =>
|
|
3321
|
+
}, dt = (e, n, t, a) => A(() => {
|
|
3367
3322
|
const o = [];
|
|
3368
3323
|
return e.invalid && e.errorMessage && o.push(t), n.hint && o.push(a), o.length > 0 ? o.join(" ") : void 0;
|
|
3369
|
-
}), 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({
|
|
3370
3325
|
__name: "Hint",
|
|
3371
3326
|
props: {
|
|
3372
3327
|
hintId: {}
|
|
3373
3328
|
},
|
|
3374
3329
|
setup(e) {
|
|
3375
|
-
return (n, t) => n.$slots.default ? (
|
|
3330
|
+
return (n, t) => n.$slots.default ? (f(), b("p", {
|
|
3376
3331
|
key: 0,
|
|
3377
3332
|
id: e.hintId,
|
|
3378
3333
|
class: "visually-hidden"
|
|
@@ -3387,13 +3342,13 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3387
3342
|
isRequired: {}
|
|
3388
3343
|
},
|
|
3389
3344
|
setup(e) {
|
|
3390
|
-
return (n, t) => e.isRequired ? (
|
|
3345
|
+
return (n, t) => e.isRequired ? (f(), b("p", {
|
|
3391
3346
|
key: 0,
|
|
3392
3347
|
id: `${e.baseId}-required-hint`,
|
|
3393
3348
|
class: "visually-hidden"
|
|
3394
3349
|
}, " Required field ", 8, jn)) : O("", !0);
|
|
3395
3350
|
}
|
|
3396
|
-
}), Wn = ["id"],
|
|
3351
|
+
}), Wn = ["id"], pt = /* @__PURE__ */ Z({
|
|
3397
3352
|
__name: "ErrorMessage",
|
|
3398
3353
|
props: {
|
|
3399
3354
|
errorId: {},
|
|
@@ -3401,7 +3356,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3401
3356
|
errorMessage: {}
|
|
3402
3357
|
},
|
|
3403
3358
|
setup(e) {
|
|
3404
|
-
return (n, t) => e.invalid && e.errorMessage ? (
|
|
3359
|
+
return (n, t) => e.invalid && e.errorMessage ? (f(), b("p", {
|
|
3405
3360
|
key: 0,
|
|
3406
3361
|
id: e.errorId,
|
|
3407
3362
|
class: "error-text",
|
|
@@ -3427,99 +3382,99 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3427
3382
|
}),
|
|
3428
3383
|
emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:modelValue"]),
|
|
3429
3384
|
setup(e, { emit: n }) {
|
|
3430
|
-
const t = ke(e, "modelValue"), a = e, o = n, i = st(), r =
|
|
3431
|
-
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;
|
|
3432
3387
|
return q;
|
|
3433
|
-
}), _ =
|
|
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", {
|
|
3434
3389
|
style: "currency",
|
|
3435
3390
|
currency: a.currency
|
|
3436
|
-
}) : null), oe =
|
|
3391
|
+
}) : null), oe = A(() => ({
|
|
3437
3392
|
input: !0,
|
|
3438
3393
|
"input-currency": !!a.currency
|
|
3439
|
-
})), ue = (
|
|
3440
|
-
if (!P.value) return
|
|
3441
|
-
const q = Number(
|
|
3394
|
+
})), ue = (E) => {
|
|
3395
|
+
if (!P.value) return E;
|
|
3396
|
+
const q = Number(E || "0") / 100;
|
|
3442
3397
|
return P.value.format(q);
|
|
3443
|
-
}, re = () =>
|
|
3398
|
+
}, re = () => C.value = !C.value, F = (E) => {
|
|
3444
3399
|
if (!a.mask && !a.currency) return;
|
|
3445
3400
|
if (a.currency) {
|
|
3446
|
-
const
|
|
3401
|
+
const k = E.target, T = D(k.value);
|
|
3447
3402
|
r.value = {
|
|
3448
3403
|
rawCaret: T.length,
|
|
3449
|
-
inputType:
|
|
3404
|
+
inputType: E.inputType
|
|
3450
3405
|
};
|
|
3451
3406
|
return;
|
|
3452
3407
|
}
|
|
3453
|
-
const q =
|
|
3408
|
+
const q = E.target, H = q.selectionStart ?? 0;
|
|
3454
3409
|
r.value = {
|
|
3455
|
-
rawCaret: qn(q.value,
|
|
3456
|
-
inputType:
|
|
3410
|
+
rawCaret: qn(q.value, H),
|
|
3411
|
+
inputType: E.inputType
|
|
3457
3412
|
};
|
|
3458
|
-
},
|
|
3459
|
-
const q =
|
|
3413
|
+
}, R = (E) => {
|
|
3414
|
+
const q = E.target;
|
|
3460
3415
|
if (a.currency) {
|
|
3461
3416
|
let T = D(q.value);
|
|
3462
|
-
r.value?.inputType === "deleteContentBackward" && (T =
|
|
3463
|
-
const Y = ue(
|
|
3464
|
-
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;
|
|
3465
3420
|
return;
|
|
3466
3421
|
}
|
|
3467
|
-
let
|
|
3468
|
-
a.mask && (
|
|
3469
|
-
const
|
|
3470
|
-
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) {
|
|
3471
3426
|
let { rawCaret: T, inputType: Y } = r.value;
|
|
3472
3427
|
Y.startsWith("insert") && T++, Y === "deleteContentBackward" && (T = Math.max(0, T - 1));
|
|
3473
|
-
let
|
|
3474
|
-
|
|
3428
|
+
let p = Fn(k, T);
|
|
3429
|
+
p = Pn(a.mask, p, 1), q.setSelectionRange(p, p);
|
|
3475
3430
|
}
|
|
3476
3431
|
r.value = null;
|
|
3477
|
-
},
|
|
3478
|
-
if (!a.mask || a.currency ||
|
|
3479
|
-
const q =
|
|
3480
|
-
let
|
|
3481
|
-
const
|
|
3482
|
-
for (;
|
|
3483
|
-
requestAnimationFrame(() => q.setSelectionRange(
|
|
3484
|
-
},
|
|
3485
|
-
|
|
3486
|
-
}, g = (
|
|
3487
|
-
|
|
3488
|
-
}, 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, "");
|
|
3489
3444
|
return Q(
|
|
3490
3445
|
() => t.value,
|
|
3491
|
-
(
|
|
3446
|
+
(E) => {
|
|
3492
3447
|
if (!a.currency) return;
|
|
3493
|
-
const q = Math.round(Number(
|
|
3494
|
-
|
|
3448
|
+
const q = Math.round(Number(E || 0) * 100);
|
|
3449
|
+
m.value = String(q);
|
|
3495
3450
|
},
|
|
3496
3451
|
{ immediate: !0 }
|
|
3497
|
-
), (
|
|
3498
|
-
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 }])
|
|
3499
3454
|
}, [
|
|
3500
|
-
|
|
3455
|
+
M("label", {
|
|
3501
3456
|
for: e.id,
|
|
3502
3457
|
class: "label"
|
|
3503
3458
|
}, K(e.label), 9, Yn),
|
|
3504
|
-
|
|
3459
|
+
M("input", be({
|
|
3505
3460
|
id: e.id,
|
|
3506
|
-
type:
|
|
3507
|
-
},
|
|
3461
|
+
type: S.value
|
|
3462
|
+
}, L.value, {
|
|
3508
3463
|
class: oe.value,
|
|
3509
3464
|
onBeforeinput: F,
|
|
3510
|
-
onInput:
|
|
3511
|
-
onFocus:
|
|
3465
|
+
onInput: R,
|
|
3466
|
+
onFocus: V,
|
|
3512
3467
|
onBlur: g,
|
|
3513
|
-
onKeydown:
|
|
3468
|
+
onKeydown: $,
|
|
3514
3469
|
value: _.value,
|
|
3515
3470
|
required: N(u),
|
|
3516
3471
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3517
|
-
"aria-errormessage":
|
|
3518
|
-
"aria-describedby": N(dt)(
|
|
3472
|
+
"aria-errormessage": B.value,
|
|
3473
|
+
"aria-describedby": N(dt)(E.$props, E.$slots, s, x.value).value
|
|
3519
3474
|
}), null, 16, Xn),
|
|
3520
3475
|
U(vt, { hintId: c }, {
|
|
3521
3476
|
default: J(() => [
|
|
3522
|
-
G(
|
|
3477
|
+
G(E.$slots, "hint", {}, void 0, !0)
|
|
3523
3478
|
]),
|
|
3524
3479
|
_: 3
|
|
3525
3480
|
}),
|
|
@@ -3527,20 +3482,20 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3527
3482
|
baseId: N(l),
|
|
3528
3483
|
isRequired: N(u)
|
|
3529
3484
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3530
|
-
U(
|
|
3485
|
+
U(pt, {
|
|
3531
3486
|
errorId: s,
|
|
3532
3487
|
invalid: e.invalid,
|
|
3533
3488
|
errorMessage: e.errorMessage
|
|
3534
3489
|
}, null, 8, ["invalid", "errorMessage"]),
|
|
3535
|
-
e.type === "password" ? (
|
|
3490
|
+
e.type === "password" ? (f(), ae(Le, be({ key: 0 }, Object.keys(E.$attrs).includes("disabled") ? { disabled: !0 } : void 0, {
|
|
3536
3491
|
type: "button",
|
|
3537
3492
|
class: "btn-icon",
|
|
3538
3493
|
onClick: re,
|
|
3539
|
-
"aria-label":
|
|
3494
|
+
"aria-label": C.value ? "Hide password" : "Show password"
|
|
3540
3495
|
}), {
|
|
3541
3496
|
default: J(() => [
|
|
3542
3497
|
U(Ce, {
|
|
3543
|
-
name:
|
|
3498
|
+
name: C.value ? "eyeOff" : "eye"
|
|
3544
3499
|
}, null, 8, ["name"])
|
|
3545
3500
|
]),
|
|
3546
3501
|
_: 1
|
|
@@ -3564,25 +3519,25 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3564
3519
|
shape: { default: "circle" }
|
|
3565
3520
|
},
|
|
3566
3521
|
setup(e) {
|
|
3567
|
-
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";
|
|
3568
3523
|
return Q(
|
|
3569
3524
|
() => n.src,
|
|
3570
3525
|
() => n.src && (t.value = "loading")
|
|
3571
|
-
), ve(() => !n.src && (t.value = "error")), (s, c) => (
|
|
3526
|
+
), ve(() => !n.src && (t.value = "error")), (s, c) => (f(), b("div", {
|
|
3572
3527
|
class: "ui-avatar",
|
|
3573
3528
|
"data-size": e.size,
|
|
3574
3529
|
"data-shape": e.shape,
|
|
3575
3530
|
"aria-label": a.value ? void 0 : i.value,
|
|
3576
3531
|
"aria-busy": t.value === "loading" || void 0
|
|
3577
3532
|
}, [
|
|
3578
|
-
a.value ? (
|
|
3533
|
+
a.value ? (f(), ae(ze, {
|
|
3579
3534
|
key: 0,
|
|
3580
3535
|
src: e.src,
|
|
3581
3536
|
alt: e.alt ?? "",
|
|
3582
3537
|
class: "ui-avatar__img",
|
|
3583
3538
|
onLoad: r,
|
|
3584
3539
|
onError: l
|
|
3585
|
-
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (
|
|
3540
|
+
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (f(), b("div", Qn)) : (f(), b("div", eo, [
|
|
3586
3541
|
G(s.$slots, "default", {}, () => [
|
|
3587
3542
|
Me(K(o.value), 1)
|
|
3588
3543
|
], !0)
|
|
@@ -3603,11 +3558,11 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3603
3558
|
}),
|
|
3604
3559
|
emits: /* @__PURE__ */ ie(["focus", "blur", "change", "click"], ["update:modelValue"]),
|
|
3605
3560
|
setup(e, { emit: n }) {
|
|
3606
|
-
const t = ke(e, "modelValue"), a = e, o = n, i =
|
|
3607
|
-
Q(i, (
|
|
3608
|
-
|
|
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);
|
|
3609
3564
|
});
|
|
3610
|
-
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 : "");
|
|
3611
3566
|
Q(
|
|
3612
3567
|
() => t.value,
|
|
3613
3568
|
() => q()
|
|
@@ -3616,58 +3571,58 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3616
3571
|
() => q(),
|
|
3617
3572
|
{ deep: !0 }
|
|
3618
3573
|
);
|
|
3619
|
-
const ue = (
|
|
3620
|
-
l.value = !0, o("focus",
|
|
3621
|
-
}, re = (
|
|
3622
|
-
const
|
|
3623
|
-
!T || T?.contains(
|
|
3624
|
-
}, F = (
|
|
3625
|
-
i.value = !i.value, i.value && t.value.toString().length > 0 && (
|
|
3626
|
-
},
|
|
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) => {
|
|
3627
3582
|
const T = s.value;
|
|
3628
|
-
!T ||
|
|
3629
|
-
},
|
|
3630
|
-
if (!i.value && ["ArrowDown", "ArrowUp"].includes(
|
|
3631
|
-
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();
|
|
3632
3587
|
return;
|
|
3633
3588
|
}
|
|
3634
3589
|
if (i.value) {
|
|
3635
|
-
if (
|
|
3636
|
-
const
|
|
3637
|
-
|
|
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();
|
|
3638
3593
|
}
|
|
3639
|
-
if (
|
|
3640
|
-
const
|
|
3641
|
-
|
|
3594
|
+
if (H.key === "End") {
|
|
3595
|
+
const k = D();
|
|
3596
|
+
k >= 0 && (x.value = k), H.preventDefault();
|
|
3642
3597
|
}
|
|
3643
|
-
if (
|
|
3644
|
-
if (
|
|
3645
|
-
const
|
|
3646
|
-
if (!
|
|
3647
|
-
|
|
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();
|
|
3648
3603
|
}
|
|
3649
|
-
|
|
3604
|
+
H.key === "Escape" && (i.value = !1);
|
|
3650
3605
|
}
|
|
3651
|
-
},
|
|
3652
|
-
if (
|
|
3653
|
-
let
|
|
3606
|
+
}, V = (H) => {
|
|
3607
|
+
if (x.value === null) return;
|
|
3608
|
+
let k = x.value;
|
|
3654
3609
|
do
|
|
3655
|
-
|
|
3656
|
-
while (
|
|
3657
|
-
|
|
3658
|
-
}, g = () => a.options.findIndex((
|
|
3659
|
-
const
|
|
3660
|
-
!
|
|
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);
|
|
3661
3616
|
};
|
|
3662
3617
|
Se(() => {
|
|
3663
|
-
document.removeEventListener("mousedown",
|
|
3618
|
+
document.removeEventListener("mousedown", E);
|
|
3664
3619
|
});
|
|
3665
3620
|
const q = () => {
|
|
3666
|
-
const
|
|
3667
|
-
if (
|
|
3668
|
-
|
|
3669
|
-
const
|
|
3670
|
-
|
|
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");
|
|
3671
3626
|
}
|
|
3672
3627
|
};
|
|
3673
3628
|
return ve(() => {
|
|
@@ -3675,38 +3630,38 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3675
3630
|
if (!a.options || a.options.length === 0) return;
|
|
3676
3631
|
q();
|
|
3677
3632
|
}
|
|
3678
|
-
}), (
|
|
3633
|
+
}), (H, k) => (f(), b("div", {
|
|
3679
3634
|
ref_key: "selectRef",
|
|
3680
3635
|
ref: s,
|
|
3681
|
-
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 }])
|
|
3682
3637
|
}, [
|
|
3683
|
-
|
|
3638
|
+
M("button", be({
|
|
3684
3639
|
id: c.value,
|
|
3685
3640
|
class: "select-btn",
|
|
3686
3641
|
role: "combobox",
|
|
3687
3642
|
type: "button"
|
|
3688
|
-
},
|
|
3643
|
+
}, H.$attrs, {
|
|
3689
3644
|
"aria-haspopup": "listbox",
|
|
3690
3645
|
"aria-expanded": i.value,
|
|
3691
|
-
"aria-controls":
|
|
3646
|
+
"aria-controls": d,
|
|
3692
3647
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3693
|
-
"aria-labelledby": `${u} ${
|
|
3648
|
+
"aria-labelledby": `${u} ${h}`,
|
|
3694
3649
|
"aria-required": N(_),
|
|
3695
|
-
"aria-describedby": N(dt)(
|
|
3650
|
+
"aria-describedby": N(dt)(H.$props, H.$slots, m, z.value).value,
|
|
3696
3651
|
"aria-activedescendant": P.value,
|
|
3697
3652
|
"aria-disabled": N(r).disabled ? "true" : void 0,
|
|
3698
3653
|
onBlur: re,
|
|
3699
3654
|
onFocus: ue,
|
|
3700
3655
|
onClick: F,
|
|
3701
|
-
onKeydown:
|
|
3656
|
+
onKeydown: $,
|
|
3702
3657
|
ref: "buttonRef"
|
|
3703
3658
|
}), [
|
|
3704
|
-
|
|
3659
|
+
M("span", {
|
|
3705
3660
|
id: u,
|
|
3706
3661
|
class: "label"
|
|
3707
3662
|
}, K(e.label), 1),
|
|
3708
|
-
|
|
3709
|
-
id:
|
|
3663
|
+
M("span", {
|
|
3664
|
+
id: h,
|
|
3710
3665
|
class: "selected-object",
|
|
3711
3666
|
"aria-live": "polite",
|
|
3712
3667
|
"aria-atomic": "true",
|
|
@@ -3719,21 +3674,21 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3719
3674
|
], 16, ao),
|
|
3720
3675
|
U(Ae, { name: "select" }, {
|
|
3721
3676
|
default: J(() => [
|
|
3722
|
-
_e(
|
|
3723
|
-
id:
|
|
3677
|
+
_e(M("ul", {
|
|
3678
|
+
id: d,
|
|
3724
3679
|
role: "listbox",
|
|
3725
3680
|
class: "options"
|
|
3726
3681
|
}, [
|
|
3727
|
-
(
|
|
3728
|
-
id: `${
|
|
3682
|
+
(f(!0), b(de, null, he(e.options, (T, Y) => (f(), b("li", {
|
|
3683
|
+
id: `${d}-option-${Y}`,
|
|
3729
3684
|
key: Y,
|
|
3730
3685
|
role: "option",
|
|
3731
|
-
class: fe(["option", { "focus-visible":
|
|
3686
|
+
class: fe(["option", { "focus-visible": x.value === Y }]),
|
|
3732
3687
|
"aria-disabled": T.disabled,
|
|
3733
|
-
"aria-selected":
|
|
3734
|
-
onClick: (
|
|
3688
|
+
"aria-selected": B.value === Y,
|
|
3689
|
+
onClick: (p) => !T.disabled && R(T, Y)
|
|
3735
3690
|
}, [
|
|
3736
|
-
|
|
3691
|
+
M("div", {
|
|
3737
3692
|
class: "option-value",
|
|
3738
3693
|
innerHTML: T.value
|
|
3739
3694
|
}, null, 8, lo)
|
|
@@ -3744,9 +3699,9 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3744
3699
|
]),
|
|
3745
3700
|
_: 1
|
|
3746
3701
|
}),
|
|
3747
|
-
U(vt, { hintId:
|
|
3702
|
+
U(vt, { hintId: C }, {
|
|
3748
3703
|
default: J(() => [
|
|
3749
|
-
G(
|
|
3704
|
+
G(H.$slots, "hint", {}, void 0, !0)
|
|
3750
3705
|
]),
|
|
3751
3706
|
_: 3
|
|
3752
3707
|
}),
|
|
@@ -3754,8 +3709,8 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3754
3709
|
baseId: c.value,
|
|
3755
3710
|
isRequired: N(_)
|
|
3756
3711
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3757
|
-
U(
|
|
3758
|
-
errorId:
|
|
3712
|
+
U(pt, {
|
|
3713
|
+
errorId: m,
|
|
3759
3714
|
invalid: e.invalid,
|
|
3760
3715
|
errorMessage: e.errorMessage
|
|
3761
3716
|
}, null, 8, ["invalid", "errorMessage"])
|
|
@@ -3785,30 +3740,30 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3785
3740
|
}),
|
|
3786
3741
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
3787
3742
|
setup(e, { emit: n }) {
|
|
3788
|
-
const t = ke(e, "modelValue"), a = e, o = n, i =
|
|
3789
|
-
|
|
3790
|
-
},
|
|
3791
|
-
|
|
3792
|
-
},
|
|
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 = () => {
|
|
3793
3748
|
if (u.value === a.images.length - 1) {
|
|
3794
|
-
a.loop &&
|
|
3749
|
+
a.loop && C(0);
|
|
3795
3750
|
return;
|
|
3796
3751
|
}
|
|
3797
|
-
|
|
3798
|
-
},
|
|
3752
|
+
C(u.value + 1);
|
|
3753
|
+
}, x = () => {
|
|
3799
3754
|
if (u.value === 0) {
|
|
3800
|
-
a.loop &&
|
|
3755
|
+
a.loop && C(a.images.length - 1);
|
|
3801
3756
|
return;
|
|
3802
3757
|
}
|
|
3803
|
-
|
|
3804
|
-
},
|
|
3758
|
+
C(u.value - 1);
|
|
3759
|
+
}, B = () => {
|
|
3805
3760
|
c.value && (l.value = c.value.offsetHeight);
|
|
3806
|
-
},
|
|
3761
|
+
}, S = () => {
|
|
3807
3762
|
l.value = null;
|
|
3808
3763
|
};
|
|
3809
|
-
return Q(u, async (
|
|
3764
|
+
return Q(u, async (L) => {
|
|
3810
3765
|
await $e();
|
|
3811
|
-
const _ = i.value[
|
|
3766
|
+
const _ = i.value[L];
|
|
3812
3767
|
_ && _.scrollIntoView({
|
|
3813
3768
|
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
3814
3769
|
inline: "center",
|
|
@@ -3816,7 +3771,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3816
3771
|
});
|
|
3817
3772
|
}), Q(() => a.images, () => {
|
|
3818
3773
|
i.value = [];
|
|
3819
|
-
}), (
|
|
3774
|
+
}), (L, _) => (f(), b("div", {
|
|
3820
3775
|
role: "region",
|
|
3821
3776
|
class: "rs-gallery",
|
|
3822
3777
|
"aria-roledescription": "carousel",
|
|
@@ -3824,54 +3779,54 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3824
3779
|
"aria-live": "polite",
|
|
3825
3780
|
"aria-describedby": s
|
|
3826
3781
|
}, [
|
|
3827
|
-
|
|
3782
|
+
M("div", {
|
|
3828
3783
|
ref_key: "previewRef",
|
|
3829
3784
|
ref: c,
|
|
3830
3785
|
tabindex: "0",
|
|
3831
3786
|
class: "rs-gallery-review",
|
|
3832
3787
|
style: Ie(l.value ? { height: `${l.value}px` } : void 0),
|
|
3833
3788
|
onKeydown: [
|
|
3834
|
-
ye(se(
|
|
3835
|
-
ye(se(
|
|
3789
|
+
ye(se(x, ["prevent"]), ["left"]),
|
|
3790
|
+
ye(se(h, ["prevent"]), ["right"])
|
|
3836
3791
|
]
|
|
3837
3792
|
}, [
|
|
3838
3793
|
U(Ae, {
|
|
3839
3794
|
name: `rs-gallery-slide-${r.value}`,
|
|
3840
3795
|
mode: "out-in",
|
|
3841
|
-
onBeforeLeave:
|
|
3842
|
-
onAfterEnter:
|
|
3796
|
+
onBeforeLeave: B,
|
|
3797
|
+
onAfterEnter: S
|
|
3843
3798
|
}, {
|
|
3844
3799
|
default: J(() => [
|
|
3845
|
-
|
|
3846
|
-
key:
|
|
3847
|
-
src:
|
|
3848
|
-
alt:
|
|
3800
|
+
d.value ? (f(), ae(ze, {
|
|
3801
|
+
key: d.value.src,
|
|
3802
|
+
src: d.value.src,
|
|
3803
|
+
alt: d.value.alt || "",
|
|
3849
3804
|
transform: e.transform
|
|
3850
3805
|
}, null, 8, ["src", "alt", "transform"])) : O("", !0)
|
|
3851
3806
|
]),
|
|
3852
3807
|
_: 1
|
|
3853
3808
|
}, 8, ["name"]),
|
|
3854
|
-
G(
|
|
3855
|
-
image:
|
|
3809
|
+
G(L.$slots, "overlay", {
|
|
3810
|
+
image: d.value,
|
|
3856
3811
|
index: u.value
|
|
3857
3812
|
}, void 0, !0)
|
|
3858
3813
|
], 44, io),
|
|
3859
|
-
|
|
3814
|
+
d.value?.title ? (f(), b("p", {
|
|
3860
3815
|
key: 0,
|
|
3861
3816
|
id: s,
|
|
3862
3817
|
class: "rs-gallery-caption"
|
|
3863
|
-
}, K(
|
|
3864
|
-
e.showThumbnails ? (
|
|
3865
|
-
(
|
|
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", {
|
|
3866
3821
|
key: z.src,
|
|
3867
3822
|
ref_for: !0,
|
|
3868
|
-
ref: (oe) =>
|
|
3823
|
+
ref: (oe) => m(oe, P),
|
|
3869
3824
|
"aria-selected": u.value === P
|
|
3870
3825
|
}, [
|
|
3871
|
-
|
|
3826
|
+
M("button", {
|
|
3872
3827
|
type: "button",
|
|
3873
3828
|
class: fe(["rs-gallery-thumb", { active: u.value === P }]),
|
|
3874
|
-
onClick: (oe) =>
|
|
3829
|
+
onClick: (oe) => C(P)
|
|
3875
3830
|
}, [
|
|
3876
3831
|
U(ze, {
|
|
3877
3832
|
src: z.src,
|
|
@@ -3883,7 +3838,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3883
3838
|
])) : O("", !0)
|
|
3884
3839
|
], 8, so));
|
|
3885
3840
|
}
|
|
3886
|
-
}), 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({
|
|
3887
3842
|
__name: "GalleryGrid",
|
|
3888
3843
|
props: {
|
|
3889
3844
|
images: {},
|
|
@@ -3898,13 +3853,13 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3898
3853
|
},
|
|
3899
3854
|
emits: ["change"],
|
|
3900
3855
|
setup(e) {
|
|
3901
|
-
return (n, t) => (
|
|
3856
|
+
return (n, t) => (f(), b("div", {
|
|
3902
3857
|
class: "rs-gallery-grid",
|
|
3903
3858
|
style: Ie({ "--grid-columns": e.columns, "--grid-gap": e.gap }),
|
|
3904
3859
|
role: "list",
|
|
3905
3860
|
"aria-label": e.ariaLabel || "Image grid gallery"
|
|
3906
3861
|
}, [
|
|
3907
|
-
(
|
|
3862
|
+
(f(!0), b(de, null, he(e.images, (a, o) => (f(), b("button", {
|
|
3908
3863
|
key: a.src,
|
|
3909
3864
|
type: "button",
|
|
3910
3865
|
class: "grid-item",
|
|
@@ -3915,8 +3870,8 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3915
3870
|
alt: a.alt || "",
|
|
3916
3871
|
transform: e.transform
|
|
3917
3872
|
}, null, 8, ["src", "alt", "transform"])
|
|
3918
|
-
], 8,
|
|
3919
|
-
], 12,
|
|
3873
|
+
], 8, mo))), 128))
|
|
3874
|
+
], 12, po));
|
|
3920
3875
|
}
|
|
3921
3876
|
}), Tt = /* @__PURE__ */ W(Co, [["__scopeId", "data-v-17067a4b"]]), Ge = /* @__PURE__ */ Symbol("ModalContext");
|
|
3922
3877
|
let nt = 0, Ue = 0, Ke = null;
|
|
@@ -3936,11 +3891,11 @@ const lt = Z({
|
|
|
3936
3891
|
},
|
|
3937
3892
|
emits: ["update:open", "opened", "closed"],
|
|
3938
3893
|
setup(e, { emit: n, slots: t }) {
|
|
3939
|
-
const a =
|
|
3940
|
-
Q(() => e.open, (
|
|
3941
|
-
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");
|
|
3942
3897
|
});
|
|
3943
|
-
const s = () => o.value = !1, c =
|
|
3898
|
+
const s = () => o.value = !1, c = A(() => e.motion), u = A(() => e.size);
|
|
3944
3899
|
return He(Ge, {
|
|
3945
3900
|
isOpen: o,
|
|
3946
3901
|
motion: c,
|
|
@@ -3955,29 +3910,29 @@ const lt = Z({
|
|
|
3955
3910
|
}), Dt = Z({
|
|
3956
3911
|
name: "ModalContent",
|
|
3957
3912
|
setup(e, { slots: n }) {
|
|
3958
|
-
const t =
|
|
3913
|
+
const t = me(Ge);
|
|
3959
3914
|
if (!t) throw new Error("ModalContent components must be used inside <Modal>");
|
|
3960
|
-
const a =
|
|
3915
|
+
const a = w(null);
|
|
3961
3916
|
let o = 0;
|
|
3962
|
-
const i = (
|
|
3963
|
-
|
|
3917
|
+
const i = (d) => {
|
|
3918
|
+
d.key === "Escape" && o === nt && t.close();
|
|
3964
3919
|
};
|
|
3965
3920
|
let r = !1, l = null;
|
|
3966
|
-
const s = (
|
|
3967
|
-
const
|
|
3968
|
-
|
|
3921
|
+
const s = (d) => {
|
|
3922
|
+
const m = Array.from(
|
|
3923
|
+
d.querySelectorAll(
|
|
3969
3924
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
3970
3925
|
)
|
|
3971
|
-
).filter((
|
|
3972
|
-
if (
|
|
3973
|
-
|
|
3926
|
+
).filter((B) => !B.hasAttribute("disabled"));
|
|
3927
|
+
if (m.length === 0) {
|
|
3928
|
+
d.setAttribute("tabindex", "-1"), d.focus();
|
|
3974
3929
|
return;
|
|
3975
3930
|
}
|
|
3976
|
-
const
|
|
3977
|
-
|
|
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()));
|
|
3978
3933
|
};
|
|
3979
|
-
|
|
3980
|
-
|
|
3934
|
+
d.addEventListener("keydown", x), C?.focus(), l = () => {
|
|
3935
|
+
d.removeEventListener("keydown", x), l = null;
|
|
3981
3936
|
};
|
|
3982
3937
|
}, c = () => {
|
|
3983
3938
|
++Ue === 1 && (document.body.style.overflow = "hidden");
|
|
@@ -4009,12 +3964,12 @@ const lt = Z({
|
|
|
4009
3964
|
"div",
|
|
4010
3965
|
{
|
|
4011
3966
|
class: "modal-overlay",
|
|
4012
|
-
onMousedown: (
|
|
4013
|
-
r =
|
|
3967
|
+
onMousedown: (d) => {
|
|
3968
|
+
r = d.target === d.currentTarget;
|
|
4014
3969
|
},
|
|
4015
|
-
onMouseup: (
|
|
4016
|
-
const
|
|
4017
|
-
t.closeOnOverlay && r &&
|
|
3970
|
+
onMouseup: (d) => {
|
|
3971
|
+
const m = d.target === d.currentTarget;
|
|
3972
|
+
t.closeOnOverlay && r && m && t.close(), r = !1;
|
|
4018
3973
|
}
|
|
4019
3974
|
},
|
|
4020
3975
|
j(
|
|
@@ -4026,7 +3981,7 @@ const lt = Z({
|
|
|
4026
3981
|
"aria-labelledby": t.labelId,
|
|
4027
3982
|
"aria-describedby": t.descriptionId,
|
|
4028
3983
|
class: ["modal-content", `modal--${t.size.value}`],
|
|
4029
|
-
onClick: (
|
|
3984
|
+
onClick: (d) => d.stopPropagation()
|
|
4030
3985
|
},
|
|
4031
3986
|
n.default?.()
|
|
4032
3987
|
)
|
|
@@ -4038,7 +3993,7 @@ const lt = Z({
|
|
|
4038
3993
|
}), Zt = Z({
|
|
4039
3994
|
name: "ModalTitle",
|
|
4040
3995
|
setup(e, { slots: n }) {
|
|
4041
|
-
const t =
|
|
3996
|
+
const t = me(Ge);
|
|
4042
3997
|
if (!t) throw new Error("ModalTitle components must be used inside <Modal>");
|
|
4043
3998
|
return t.hasTitle.value = !0, () => j("h2", { id: t.labelId }, n.default?.());
|
|
4044
3999
|
}
|
|
@@ -4060,7 +4015,7 @@ const lt = Z({
|
|
|
4060
4015
|
}), Ot = Z({
|
|
4061
4016
|
name: "ModalClose",
|
|
4062
4017
|
setup() {
|
|
4063
|
-
const e =
|
|
4018
|
+
const e = me(Ge);
|
|
4064
4019
|
if (!e) throw new Error("ModalClose components must be used inside <Modal>");
|
|
4065
4020
|
return () => j(
|
|
4066
4021
|
"button",
|
|
@@ -4094,10 +4049,10 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4094
4049
|
},
|
|
4095
4050
|
emits: ["change"],
|
|
4096
4051
|
setup(e) {
|
|
4097
|
-
const n =
|
|
4052
|
+
const n = w(0), t = w(!1), a = (i) => {
|
|
4098
4053
|
n.value = i, t.value = !0;
|
|
4099
4054
|
}, o = () => t.value = !1;
|
|
4100
|
-
return (i, r) => (
|
|
4055
|
+
return (i, r) => (f(), b(de, null, [
|
|
4101
4056
|
U(Tt, {
|
|
4102
4057
|
images: e.images,
|
|
4103
4058
|
onChange: a,
|
|
@@ -4161,8 +4116,8 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4161
4116
|
gap: { default: "1rem" }
|
|
4162
4117
|
},
|
|
4163
4118
|
setup(e) {
|
|
4164
|
-
return (n, t) => (
|
|
4165
|
-
(
|
|
4119
|
+
return (n, t) => (f(), b("div", go, [
|
|
4120
|
+
(f(!0), b(de, null, he(e.images, (a) => (f(), b("button", {
|
|
4166
4121
|
key: a.src,
|
|
4167
4122
|
class: "masonry-item"
|
|
4168
4123
|
}, [
|
|
@@ -4199,14 +4154,14 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4199
4154
|
}),
|
|
4200
4155
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
4201
4156
|
setup(e, { emit: n }) {
|
|
4202
|
-
const t = ke(e, "modelValue"), a = n, o =
|
|
4157
|
+
const t = ke(e, "modelValue"), a = n, o = A({
|
|
4203
4158
|
get: () => t.value ?? 0,
|
|
4204
4159
|
set: (r) => {
|
|
4205
4160
|
t.value = r, a("change", r);
|
|
4206
4161
|
}
|
|
4207
4162
|
}), i = (r) => o.value = r;
|
|
4208
|
-
return (r, l) => (
|
|
4209
|
-
e.layout === "carousel" ? (
|
|
4163
|
+
return (r, l) => (f(), b("section", ko, [
|
|
4164
|
+
e.layout === "carousel" ? (f(), ae(St, {
|
|
4210
4165
|
key: 0,
|
|
4211
4166
|
modelValue: o.value,
|
|
4212
4167
|
"onUpdate:modelValue": l[0] || (l[0] = (s) => o.value = s),
|
|
@@ -4216,7 +4171,7 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4216
4171
|
transform: e.transform,
|
|
4217
4172
|
"transform-thumbnails": e.transformThumbnails,
|
|
4218
4173
|
"show-thumbnails": e.showThumbnails
|
|
4219
|
-
}, 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, {
|
|
4220
4175
|
key: 1,
|
|
4221
4176
|
modelValue: o.value,
|
|
4222
4177
|
"onUpdate:modelValue": l[1] || (l[1] = (s) => o.value = s),
|
|
@@ -4226,14 +4181,14 @@ const ho = /* @__PURE__ */ Z({
|
|
|
4226
4181
|
gap: e.gap,
|
|
4227
4182
|
transform: e.transform,
|
|
4228
4183
|
"aria-label": e.ariaLabel
|
|
4229
|
-
}, 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, {
|
|
4230
4185
|
key: 2,
|
|
4231
4186
|
modelValue: o.value,
|
|
4232
4187
|
"onUpdate:modelValue": l[2] || (l[2] = (s) => o.value = s),
|
|
4233
4188
|
images: e.images,
|
|
4234
4189
|
transform: e.transform,
|
|
4235
4190
|
"aria-label": e.ariaLabel
|
|
4236
|
-
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (
|
|
4191
|
+
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (f(), ae(bo, {
|
|
4237
4192
|
key: 3,
|
|
4238
4193
|
modelValue: o.value,
|
|
4239
4194
|
"onUpdate:modelValue": l[3] || (l[3] = (s) => o.value = s),
|
|
@@ -4258,7 +4213,7 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4258
4213
|
message: {}
|
|
4259
4214
|
},
|
|
4260
4215
|
setup(e) {
|
|
4261
|
-
const n = e, t =
|
|
4216
|
+
const n = e, t = w(0), a = w(null), o = w(n.message || ""), i = () => {
|
|
4262
4217
|
!n.message || a.value !== null || o.value.length > 0 && (a.value = window.setInterval(() => {
|
|
4263
4218
|
t.value = t.value % 3 + 1, o.value = `${n.message}${".".repeat(t.value)}`;
|
|
4264
4219
|
}, 750));
|
|
@@ -4270,18 +4225,18 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4270
4225
|
(l, s) => {
|
|
4271
4226
|
l !== s && (o.value = l || "", r());
|
|
4272
4227
|
}
|
|
4273
|
-
), ve(i), Be(r), (l, s) => (
|
|
4228
|
+
), ve(i), Be(r), (l, s) => (f(), b("div", {
|
|
4274
4229
|
class: "spinner-container",
|
|
4275
4230
|
role: "status",
|
|
4276
4231
|
"aria-live": "polite",
|
|
4277
4232
|
"aria-busy": !!e.message
|
|
4278
4233
|
}, [
|
|
4279
|
-
s[0] || (s[0] =
|
|
4234
|
+
s[0] || (s[0] = M("div", {
|
|
4280
4235
|
class: "spinner",
|
|
4281
4236
|
"aria-hidden": "true"
|
|
4282
4237
|
}, null, -1)),
|
|
4283
|
-
e.message ? (
|
|
4284
|
-
|
|
4238
|
+
e.message ? (f(), b("span", Lo, K(o.value), 1)) : O("", !0),
|
|
4239
|
+
M("span", xo, K(e.message || "Loading"), 1)
|
|
4285
4240
|
], 8, Mo));
|
|
4286
4241
|
}
|
|
4287
4242
|
}), qt = /* @__PURE__ */ W($o, [["__scopeId", "data-v-e61a1cf5"]]), Io = ["id", "required", "checked", "disabled", "aria-invalid", "aria-disabled", "aria-checked"], Ho = {
|
|
@@ -4308,28 +4263,28 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4308
4263
|
}),
|
|
4309
4264
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
4310
4265
|
setup(e, { emit: n }) {
|
|
4311
|
-
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);
|
|
4312
4267
|
Q(
|
|
4313
4268
|
() => a.value,
|
|
4314
|
-
(
|
|
4315
|
-
l.value && (l.value.indeterminate =
|
|
4269
|
+
(m) => {
|
|
4270
|
+
l.value && (l.value.indeterminate = m === void 0, l.value.checked = m === !0);
|
|
4316
4271
|
},
|
|
4317
4272
|
{ immediate: !0 }
|
|
4318
4273
|
);
|
|
4319
|
-
const
|
|
4274
|
+
const d = (m) => {
|
|
4320
4275
|
if (!o.disabled) {
|
|
4321
4276
|
if (!o.triState) {
|
|
4322
|
-
const
|
|
4323
|
-
a.value =
|
|
4277
|
+
const C = m.target.checked;
|
|
4278
|
+
a.value = C, t("change", a.value);
|
|
4324
4279
|
return;
|
|
4325
4280
|
}
|
|
4326
4281
|
a.value === !1 ? a.value = !0 : a.value === !0 ? a.value = void 0 : a.value = !1, t("change", a.value);
|
|
4327
4282
|
}
|
|
4328
4283
|
};
|
|
4329
|
-
return (
|
|
4284
|
+
return (m, C) => (f(), b("label", {
|
|
4330
4285
|
class: fe(["checkbox-root", { required: c.value, error: e.invalid }])
|
|
4331
4286
|
}, [
|
|
4332
|
-
|
|
4287
|
+
M("input", {
|
|
4333
4288
|
id: r.value,
|
|
4334
4289
|
type: "checkbox",
|
|
4335
4290
|
class: "checkbox",
|
|
@@ -4339,26 +4294,26 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4339
4294
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4340
4295
|
"aria-disabled": N(s),
|
|
4341
4296
|
"aria-checked": u.value,
|
|
4342
|
-
onClick:
|
|
4343
|
-
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)),
|
|
4344
4299
|
ref_key: "inputRef",
|
|
4345
4300
|
ref: l
|
|
4346
4301
|
}, null, 40, Io),
|
|
4347
|
-
|
|
4348
|
-
a.value === !0 ? (
|
|
4349
|
-
|
|
4302
|
+
M("span", Ho, [
|
|
4303
|
+
a.value === !0 ? (f(), b("svg", Vo, [...C[2] || (C[2] = [
|
|
4304
|
+
M("path", {
|
|
4350
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",
|
|
4351
4306
|
fill: "currentColor"
|
|
4352
4307
|
}, null, -1)
|
|
4353
|
-
])])) : a.value === void 0 ? (
|
|
4354
|
-
|
|
4308
|
+
])])) : a.value === void 0 ? (f(), b("svg", Bo, [...C[3] || (C[3] = [
|
|
4309
|
+
M("path", {
|
|
4355
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",
|
|
4356
4311
|
fill: "currentColor"
|
|
4357
4312
|
}, null, -1)
|
|
4358
4313
|
])])) : O("", !0)
|
|
4359
4314
|
]),
|
|
4360
|
-
|
|
4361
|
-
G(
|
|
4315
|
+
M("span", _o, [
|
|
4316
|
+
G(m.$slots, "default", {}, void 0, !0)
|
|
4362
4317
|
])
|
|
4363
4318
|
], 2));
|
|
4364
4319
|
}
|
|
@@ -4378,31 +4333,31 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4378
4333
|
}),
|
|
4379
4334
|
emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:modelValue"]),
|
|
4380
4335
|
setup(e, { emit: n }) {
|
|
4381
|
-
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 = (_) => {
|
|
4382
4337
|
const z = _.target;
|
|
4383
4338
|
t.value = r.type === "number" ? Number(z.value) : z.value;
|
|
4384
|
-
},
|
|
4339
|
+
}, B = (_) => {
|
|
4385
4340
|
s.value = !0, i("focus", _);
|
|
4386
|
-
},
|
|
4341
|
+
}, S = (_) => {
|
|
4387
4342
|
s.value = !1, i("blur", _);
|
|
4388
|
-
},
|
|
4389
|
-
return (_, z) => (
|
|
4390
|
-
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 }])
|
|
4391
4346
|
}, [
|
|
4392
|
-
|
|
4347
|
+
M("label", {
|
|
4393
4348
|
for: e.id,
|
|
4394
4349
|
class: "label"
|
|
4395
4350
|
}, K(e.label), 9, Eo),
|
|
4396
|
-
|
|
4351
|
+
M("textarea", be({ id: e.id }, _.$attrs, {
|
|
4397
4352
|
class: "custom-textarea",
|
|
4398
|
-
onFocus: z[0] || (z[0] = (P) =>
|
|
4399
|
-
onBlur: z[1] || (z[1] = (P) =>
|
|
4400
|
-
onInput:
|
|
4353
|
+
onFocus: z[0] || (z[0] = (P) => B(P)),
|
|
4354
|
+
onBlur: z[1] || (z[1] = (P) => S(P)),
|
|
4355
|
+
onInput: x,
|
|
4401
4356
|
value: t.value,
|
|
4402
|
-
required: N(
|
|
4357
|
+
required: N(d),
|
|
4403
4358
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4404
|
-
"aria-errormessage":
|
|
4405
|
-
"aria-describedby": N(
|
|
4359
|
+
"aria-errormessage": L.value,
|
|
4360
|
+
"aria-describedby": N(h)
|
|
4406
4361
|
}), " ", 16, Ro),
|
|
4407
4362
|
U(vt, { hintId: u }, {
|
|
4408
4363
|
default: J(() => [
|
|
@@ -4412,9 +4367,9 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4412
4367
|
}),
|
|
4413
4368
|
U(ft, {
|
|
4414
4369
|
baseId: N(l),
|
|
4415
|
-
isRequired: N(
|
|
4370
|
+
isRequired: N(d)
|
|
4416
4371
|
}, null, 8, ["baseId", "isRequired"]),
|
|
4417
|
-
U(
|
|
4372
|
+
U(pt, {
|
|
4418
4373
|
errorId: c,
|
|
4419
4374
|
invalid: e.invalid,
|
|
4420
4375
|
errorMessage: e.errorMessage
|
|
@@ -4434,8 +4389,8 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4434
4389
|
let l = 0;
|
|
4435
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;
|
|
4436
4391
|
};
|
|
4437
|
-
return (t, a) => (
|
|
4438
|
-
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))
|
|
4439
4394
|
], 64))), 128));
|
|
4440
4395
|
}
|
|
4441
4396
|
}), zo = /* @__PURE__ */ W(Zo, [["__scopeId", "data-v-edfa70b3"]]), No = [
|
|
@@ -4476,7 +4431,7 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4476
4431
|
},
|
|
4477
4432
|
emits: ["valid"],
|
|
4478
4433
|
setup(e, { emit: n }) {
|
|
4479
|
-
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);
|
|
4480
4435
|
Q(
|
|
4481
4436
|
() => t.password,
|
|
4482
4437
|
() => {
|
|
@@ -4491,52 +4446,52 @@ const Mo = ["aria-busy"], Lo = {
|
|
|
4491
4446
|
const s = {
|
|
4492
4447
|
"--strength-fill-color": t.strengthFillColor
|
|
4493
4448
|
}, c = () => {
|
|
4494
|
-
const
|
|
4495
|
-
return
|
|
4449
|
+
const C = u(), h = Object.values(d()).every(Boolean);
|
|
4450
|
+
return C && h;
|
|
4496
4451
|
}, u = () => {
|
|
4497
|
-
const
|
|
4498
|
-
return i.value && (i.value.style.width = `${
|
|
4499
|
-
},
|
|
4500
|
-
const
|
|
4501
|
-
return o.value.forEach((
|
|
4502
|
-
const
|
|
4503
|
-
|
|
4504
|
-
}),
|
|
4505
|
-
},
|
|
4506
|
-
const
|
|
4507
|
-
return t.rules.forEach((
|
|
4508
|
-
|
|
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(
|
|
4509
4464
|
t.password,
|
|
4510
4465
|
t.passwordConfirmation
|
|
4511
4466
|
);
|
|
4512
|
-
}),
|
|
4467
|
+
}), C;
|
|
4513
4468
|
};
|
|
4514
|
-
return (
|
|
4515
|
-
|
|
4516
|
-
(
|
|
4517
|
-
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,
|
|
4518
4473
|
class: "password-rule",
|
|
4519
|
-
"data-rule":
|
|
4474
|
+
"data-rule": x.key,
|
|
4520
4475
|
ref_for: !0,
|
|
4521
|
-
ref: (
|
|
4476
|
+
ref: (S) => l(S, B)
|
|
4522
4477
|
}, [
|
|
4523
|
-
|
|
4524
|
-
Me(" " + K(
|
|
4478
|
+
h[0] || (h[0] = M("span", { class: "rule-icon" }, "•", -1)),
|
|
4479
|
+
Me(" " + K(x.label), 1)
|
|
4525
4480
|
], 8, Fo))), 128))
|
|
4526
4481
|
]),
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4482
|
+
M("div", Po, [
|
|
4483
|
+
M("div", Uo, [
|
|
4484
|
+
h[1] || (h[1] = M("span", null, "Força da senha", -1)),
|
|
4485
|
+
M("span", {
|
|
4531
4486
|
ref_key: "strengthLabelRef",
|
|
4532
4487
|
ref: r
|
|
4533
4488
|
}, "Muito fraca", 512)
|
|
4534
4489
|
]),
|
|
4535
|
-
|
|
4490
|
+
M("div", {
|
|
4536
4491
|
class: "strength-bar",
|
|
4537
4492
|
style: s
|
|
4538
4493
|
}, [
|
|
4539
|
-
|
|
4494
|
+
M("div", {
|
|
4540
4495
|
class: "strength-fill",
|
|
4541
4496
|
ref_key: "strengthFillRef",
|
|
4542
4497
|
ref: i
|
|
@@ -4563,19 +4518,19 @@ const jo = {
|
|
|
4563
4518
|
separator: { default: "/" }
|
|
4564
4519
|
},
|
|
4565
4520
|
setup(e) {
|
|
4566
|
-
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 ? {
|
|
4567
4522
|
href: l.href,
|
|
4568
4523
|
target: l.external ? "_blank" : void 0,
|
|
4569
4524
|
rel: l.external ? "noopener noreferrer" : void 0,
|
|
4570
4525
|
"aria-label": l.external ? `${l.label} (opens in a new tab)` : void 0
|
|
4571
4526
|
} : {};
|
|
4572
|
-
return (l, s) => (
|
|
4573
|
-
|
|
4574
|
-
(
|
|
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", {
|
|
4575
4530
|
key: c.to ?? c.href ?? `${c.label}-${u}`,
|
|
4576
4531
|
class: "ui-breadcrumb__item"
|
|
4577
4532
|
}, [
|
|
4578
|
-
(
|
|
4533
|
+
(f(), ae(Ne(o(c, u)), be({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, r(c, u), {
|
|
4579
4534
|
"aria-posinset": u + 1,
|
|
4580
4535
|
"aria-setsize": e.items.length,
|
|
4581
4536
|
"aria-current": a(u) ? "page" : void 0,
|
|
@@ -4586,7 +4541,7 @@ const jo = {
|
|
|
4586
4541
|
]),
|
|
4587
4542
|
_: 2
|
|
4588
4543
|
}, 1040, ["aria-posinset", "aria-setsize", "aria-current", "tabindex"])),
|
|
4589
|
-
a(u) ? O("", !0) : (
|
|
4544
|
+
a(u) ? O("", !0) : (f(), b("span", Yo, [
|
|
4590
4545
|
G(l.$slots, "separator", {}, () => [
|
|
4591
4546
|
Me(K(e.separator), 1)
|
|
4592
4547
|
], !0)
|
|
@@ -4617,19 +4572,19 @@ const jo = {
|
|
|
4617
4572
|
}),
|
|
4618
4573
|
emits: ["update:modelValue"],
|
|
4619
4574
|
setup(e) {
|
|
4620
|
-
const n = e, t = ke(e, "modelValue"), a =
|
|
4621
|
-
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", {
|
|
4622
4577
|
class: fe(["radio-group", { "in-column": e.inColumn, btn: e.mode === "button" }]),
|
|
4623
4578
|
"aria-invalid": a.value,
|
|
4624
4579
|
"aria-required": o.value,
|
|
4625
4580
|
disabled: i.value
|
|
4626
4581
|
}, [
|
|
4627
|
-
|
|
4628
|
-
(
|
|
4582
|
+
M("legend", Jo, K(e.name), 1),
|
|
4583
|
+
(f(!0), b(de, null, he(e.options, (s) => (f(), b("label", {
|
|
4629
4584
|
key: s.key,
|
|
4630
4585
|
class: fe(["radio", { checked: t.value === s.key, disabled: e.disabled || s.disabled }])
|
|
4631
4586
|
}, [
|
|
4632
|
-
_e(
|
|
4587
|
+
_e(M("input", {
|
|
4633
4588
|
type: "radio",
|
|
4634
4589
|
class: "radio-input",
|
|
4635
4590
|
name: e.name,
|
|
@@ -4640,9 +4595,9 @@ const jo = {
|
|
|
4640
4595
|
}, null, 8, Qo), [
|
|
4641
4596
|
[Kt, t.value]
|
|
4642
4597
|
]),
|
|
4643
|
-
e.mode === "standard" ? (
|
|
4644
|
-
|
|
4645
|
-
s.icon ? (
|
|
4598
|
+
e.mode === "standard" ? (f(), b("span", e2)) : O("", !0),
|
|
4599
|
+
M("span", t2, [
|
|
4600
|
+
s.icon ? (f(), ae(Ce, {
|
|
4646
4601
|
key: 0,
|
|
4647
4602
|
name: s.icon,
|
|
4648
4603
|
size: 22
|
|
@@ -4694,32 +4649,32 @@ const jo = {
|
|
|
4694
4649
|
}),
|
|
4695
4650
|
emits: /* @__PURE__ */ ie(["change", "select", "focus", "blur"], ["update:modelValue"]),
|
|
4696
4651
|
setup(e, { emit: n }) {
|
|
4697
|
-
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(() => {
|
|
4698
4653
|
if (!t.filterable) return t.options;
|
|
4699
|
-
const
|
|
4700
|
-
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));
|
|
4701
4656
|
}), z = Xe(t).value;
|
|
4702
4657
|
Q(
|
|
4703
|
-
() =>
|
|
4704
|
-
(
|
|
4705
|
-
if (
|
|
4658
|
+
() => d.value,
|
|
4659
|
+
(k) => {
|
|
4660
|
+
if (k)
|
|
4706
4661
|
try {
|
|
4707
|
-
s.value = JSON.parse(localStorage.getItem(
|
|
4662
|
+
s.value = JSON.parse(localStorage.getItem(k) || "[]");
|
|
4708
4663
|
} catch {
|
|
4709
4664
|
s.value = [];
|
|
4710
4665
|
}
|
|
4711
4666
|
},
|
|
4712
4667
|
{ immediate: !0 }
|
|
4713
|
-
), Q(l, async (
|
|
4714
|
-
if (!
|
|
4668
|
+
), Q(l, async (k) => {
|
|
4669
|
+
if (!k) {
|
|
4715
4670
|
c.value = null;
|
|
4716
4671
|
return;
|
|
4717
4672
|
}
|
|
4718
|
-
_.value.length !== 0 && (await $e(),
|
|
4673
|
+
_.value.length !== 0 && (await $e(), E());
|
|
4719
4674
|
}), Q(
|
|
4720
4675
|
() => t.loading,
|
|
4721
|
-
async (
|
|
4722
|
-
|
|
4676
|
+
async (k) => {
|
|
4677
|
+
k || l.value && _.value.length !== 0 && (await $e(), E());
|
|
4723
4678
|
}
|
|
4724
4679
|
), Q(
|
|
4725
4680
|
() => t.options,
|
|
@@ -4727,94 +4682,94 @@ const jo = {
|
|
|
4727
4682
|
o.value || (u.value = null, c.value = null);
|
|
4728
4683
|
}
|
|
4729
4684
|
);
|
|
4730
|
-
const P = (
|
|
4731
|
-
r.value.length >= t.minChars && !t.filterable && !t.loading && (l.value = !0),
|
|
4732
|
-
}, oe = (
|
|
4733
|
-
const T =
|
|
4734
|
-
i.value?.contains(T) || (l.value = !1, o.value ?
|
|
4735
|
-
}, 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) => {
|
|
4736
4691
|
const Y = i.value;
|
|
4737
|
-
if (!Y || t.isDisabled(
|
|
4692
|
+
if (!Y || t.isDisabled(k)) return;
|
|
4738
4693
|
l.value = !1, g(r.value), u.value = T, c.value = T;
|
|
4739
|
-
const
|
|
4740
|
-
|
|
4741
|
-
}, re = (
|
|
4742
|
-
if (!l.value && ["ArrowDown", "ArrowUp"].includes(
|
|
4743
|
-
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();
|
|
4744
4699
|
return;
|
|
4745
4700
|
}
|
|
4746
4701
|
if (l.value) {
|
|
4747
|
-
if (
|
|
4702
|
+
if (k.key === "ArrowDown" && (F(1), k.preventDefault()), k.key === "ArrowUp" && (F(-1), k.preventDefault()), k.key === "Home") {
|
|
4748
4703
|
const T = q();
|
|
4749
|
-
T >= 0 && (c.value = T),
|
|
4704
|
+
T >= 0 && (c.value = T), k.preventDefault();
|
|
4750
4705
|
}
|
|
4751
|
-
if (
|
|
4752
|
-
const T =
|
|
4753
|
-
T >= 0 && (c.value = T),
|
|
4706
|
+
if (k.key === "End") {
|
|
4707
|
+
const T = H();
|
|
4708
|
+
T >= 0 && (c.value = T), k.preventDefault();
|
|
4754
4709
|
}
|
|
4755
|
-
if (
|
|
4710
|
+
if (k.key === "Enter") {
|
|
4756
4711
|
if (c.value === null) return;
|
|
4757
4712
|
const T = _.value[c.value];
|
|
4758
4713
|
if (!T || t.isDisabled(T)) return;
|
|
4759
|
-
ue(T, c.value), l.value = !1,
|
|
4714
|
+
ue(T, c.value), l.value = !1, k.preventDefault();
|
|
4760
4715
|
}
|
|
4761
|
-
|
|
4716
|
+
k.key === "Escape" && (l.value = !1);
|
|
4762
4717
|
}
|
|
4763
|
-
}, F = (
|
|
4718
|
+
}, F = (k) => {
|
|
4764
4719
|
if (c.value === null) return;
|
|
4765
4720
|
let T = c.value;
|
|
4766
4721
|
do
|
|
4767
|
-
T +=
|
|
4722
|
+
T += k;
|
|
4768
4723
|
while (T >= 0 && T < _.value.length && t.isDisabled(_.value[T]));
|
|
4769
4724
|
T >= 0 && T < _.value.length && (c.value = T);
|
|
4770
|
-
},
|
|
4725
|
+
}, R = () => {
|
|
4771
4726
|
r.value.length === 0 && (o.value = ""), r.value.length >= t.minChars ? (a("change", r.value), l.value = !0) : l.value = !1;
|
|
4772
|
-
},
|
|
4727
|
+
}, $ = () => {
|
|
4773
4728
|
if (o.value.toString().length === 0) return;
|
|
4774
|
-
const
|
|
4775
|
-
|
|
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();
|
|
4776
4731
|
};
|
|
4777
4732
|
Q(
|
|
4778
4733
|
[() => t.options.length, () => o.value],
|
|
4779
|
-
async ([
|
|
4780
|
-
T && (await $e(),
|
|
4734
|
+
async ([k, T]) => {
|
|
4735
|
+
T && (await $e(), $());
|
|
4781
4736
|
},
|
|
4782
4737
|
{ flush: "post", immediate: !0 }
|
|
4783
4738
|
);
|
|
4784
|
-
const
|
|
4739
|
+
const V = () => {
|
|
4785
4740
|
r.value = "", o.value = "";
|
|
4786
|
-
}, g = (
|
|
4787
|
-
!
|
|
4788
|
-
|
|
4789
|
-
...s.value.filter((T) => T !==
|
|
4790
|
-
].slice(0, t.suggestionsLimit), localStorage.setItem(
|
|
4791
|
-
}, D = (
|
|
4792
|
-
r.value =
|
|
4793
|
-
},
|
|
4794
|
-
const
|
|
4795
|
-
|
|
4796
|
-
}, q = () => _.value.findIndex((
|
|
4797
|
-
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;
|
|
4798
4753
|
return -1;
|
|
4799
4754
|
};
|
|
4800
|
-
return ve(() =>
|
|
4801
|
-
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 }]),
|
|
4802
4757
|
ref_key: "autocompleteRef",
|
|
4803
4758
|
ref: i
|
|
4804
4759
|
}, [
|
|
4805
|
-
|
|
4760
|
+
M("label", {
|
|
4806
4761
|
for: e.id,
|
|
4807
4762
|
class: "label"
|
|
4808
4763
|
}, K(e.label), 9, n2),
|
|
4809
|
-
_e(
|
|
4764
|
+
_e(M("input", be({
|
|
4810
4765
|
id: e.id,
|
|
4811
4766
|
type: e.type
|
|
4812
|
-
},
|
|
4767
|
+
}, k.$attrs, {
|
|
4813
4768
|
role: "combobox",
|
|
4814
4769
|
"aria-autocomplete": "list",
|
|
4815
4770
|
"aria-expanded": l.value,
|
|
4816
|
-
"aria-controls":
|
|
4817
|
-
"aria-activedescendant":
|
|
4771
|
+
"aria-controls": C,
|
|
4772
|
+
"aria-activedescendant": S.value,
|
|
4818
4773
|
"aria-required": N(z),
|
|
4819
4774
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4820
4775
|
disabled: e.disabled ? !0 : void 0,
|
|
@@ -4822,69 +4777,69 @@ const jo = {
|
|
|
4822
4777
|
"onUpdate:modelValue": T[0] || (T[0] = (Y) => r.value = Y),
|
|
4823
4778
|
onFocus: P,
|
|
4824
4779
|
onBlur: oe,
|
|
4825
|
-
onInput:
|
|
4780
|
+
onInput: R,
|
|
4826
4781
|
onKeydown: re
|
|
4827
4782
|
}), null, 16, o2), [
|
|
4828
4783
|
[jt, r.value]
|
|
4829
4784
|
]),
|
|
4830
4785
|
U(Ae, { name: "select" }, {
|
|
4831
4786
|
default: J(() => [
|
|
4832
|
-
_e(
|
|
4833
|
-
id:
|
|
4787
|
+
_e(M("ul", {
|
|
4788
|
+
id: C,
|
|
4834
4789
|
role: "listbox",
|
|
4835
4790
|
class: "options"
|
|
4836
4791
|
}, [
|
|
4837
|
-
_.value.length > 0 ? (
|
|
4838
|
-
id: `${
|
|
4792
|
+
_.value.length > 0 ? (f(!0), b(de, { key: 0 }, he(_.value, (Y, p) => (f(), b("li", {
|
|
4793
|
+
id: `${C}-option-${p}`,
|
|
4839
4794
|
key: e.getKey(Y),
|
|
4840
4795
|
role: "option",
|
|
4841
|
-
class: fe(["option", { "focus-visible": c.value ===
|
|
4796
|
+
class: fe(["option", { "focus-visible": c.value === p }]),
|
|
4842
4797
|
"aria-disabled": t.isDisabled(Y) || void 0,
|
|
4843
|
-
"aria-selected":
|
|
4798
|
+
"aria-selected": p === u.value,
|
|
4844
4799
|
onMousedown: T[1] || (T[1] = se(() => {
|
|
4845
4800
|
}, ["prevent"])),
|
|
4846
|
-
onClick: (
|
|
4801
|
+
onClick: (v) => !t.isDisabled(Y) && ue(Y, p)
|
|
4847
4802
|
}, [
|
|
4848
|
-
t.isDisabled(Y) ? O("", !0) : (
|
|
4803
|
+
t.isDisabled(Y) ? O("", !0) : (f(), ae(Ce, {
|
|
4849
4804
|
key: 0,
|
|
4850
4805
|
name: "search",
|
|
4851
4806
|
size: 22
|
|
4852
4807
|
})),
|
|
4853
|
-
G(
|
|
4808
|
+
G(k.$slots, "option", {
|
|
4854
4809
|
option: Y,
|
|
4855
4810
|
value: e.getValue(Y),
|
|
4856
4811
|
query: r.value,
|
|
4857
|
-
selected:
|
|
4858
|
-
active:
|
|
4812
|
+
selected: p === u.value,
|
|
4813
|
+
active: p === c.value
|
|
4859
4814
|
}, () => [
|
|
4860
|
-
|
|
4815
|
+
M("div", r2, [
|
|
4861
4816
|
U(zo, {
|
|
4862
4817
|
text: e.getValue(Y),
|
|
4863
4818
|
query: r.value
|
|
4864
4819
|
}, null, 8, ["text", "query"])
|
|
4865
4820
|
])
|
|
4866
4821
|
], !0),
|
|
4867
|
-
|
|
4868
|
-
], 42, l2))), 128)) : _.value.length === 0 && !e.loading ? (
|
|
4869
|
-
|
|
4870
|
-
])])) : (
|
|
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, {
|
|
4871
4826
|
key: 2,
|
|
4872
4827
|
"aria-live": "polite",
|
|
4873
4828
|
role: "status",
|
|
4874
4829
|
message: "Loading"
|
|
4875
4830
|
})),
|
|
4876
|
-
|
|
4877
|
-
|
|
4831
|
+
L.value ? (f(), b("li", u2, [...T[4] || (T[4] = [
|
|
4832
|
+
M("div", { class: "option-value" }, " Recents ", -1)
|
|
4878
4833
|
])])) : O("", !0),
|
|
4879
|
-
(
|
|
4834
|
+
(f(!0), b(de, null, he(s.value, (Y) => (f(), b("li", {
|
|
4880
4835
|
key: Y,
|
|
4881
4836
|
role: "presentation",
|
|
4882
4837
|
"aria-hidden": "true",
|
|
4883
4838
|
class: "option recent-item",
|
|
4884
|
-
onClick: (
|
|
4839
|
+
onClick: (p) => D(Y)
|
|
4885
4840
|
}, [
|
|
4886
4841
|
U(Ce, { name: "clock" }),
|
|
4887
|
-
|
|
4842
|
+
M("div", d2, K(Y), 1)
|
|
4888
4843
|
], 8, c2))), 128))
|
|
4889
4844
|
], 512), [
|
|
4890
4845
|
[rt, l.value]
|
|
@@ -4892,10 +4847,10 @@ const jo = {
|
|
|
4892
4847
|
]),
|
|
4893
4848
|
_: 3
|
|
4894
4849
|
}),
|
|
4895
|
-
|
|
4896
|
-
G(
|
|
4850
|
+
k.$slots.icon ? (f(), b("span", v2, [
|
|
4851
|
+
G(k.$slots, "icon", {}, void 0, !0)
|
|
4897
4852
|
])) : O("", !0),
|
|
4898
|
-
r.value.length > 0 && !e.disabled ? (
|
|
4853
|
+
r.value.length > 0 && !e.disabled ? (f(), ae(Le, {
|
|
4899
4854
|
key: 1,
|
|
4900
4855
|
type: "button",
|
|
4901
4856
|
class: "btn btn-icon",
|
|
@@ -4904,7 +4859,7 @@ const jo = {
|
|
|
4904
4859
|
"\\": "",
|
|
4905
4860
|
onMousedown: T[2] || (T[2] = se(() => {
|
|
4906
4861
|
}, ["prevent"])),
|
|
4907
|
-
onClick:
|
|
4862
|
+
onClick: V
|
|
4908
4863
|
}, {
|
|
4909
4864
|
default: J(() => [
|
|
4910
4865
|
U(Ce, {
|
|
@@ -4918,18 +4873,18 @@ const jo = {
|
|
|
4918
4873
|
})) : O("", !0)
|
|
4919
4874
|
], 2));
|
|
4920
4875
|
}
|
|
4921
|
-
}), ir = /* @__PURE__ */ W(f2, [["__scopeId", "data-v-7b61315b"]]),
|
|
4876
|
+
}), ir = /* @__PURE__ */ W(f2, [["__scopeId", "data-v-7b61315b"]]), p2 = 5, we = ut({
|
|
4922
4877
|
toasts: []
|
|
4923
4878
|
});
|
|
4924
|
-
let
|
|
4879
|
+
let m2 = 0;
|
|
4925
4880
|
const Ze = (e, n = "info") => {
|
|
4926
4881
|
const t = {
|
|
4927
|
-
id: `toast-${
|
|
4882
|
+
id: `toast-${m2++}`,
|
|
4928
4883
|
duration: 4e3,
|
|
4929
4884
|
...typeof e == "string" ? { description: e } : e,
|
|
4930
4885
|
variant: n
|
|
4931
4886
|
};
|
|
4932
|
-
return we.toasts.push(t), we.toasts.length >
|
|
4887
|
+
return we.toasts.push(t), we.toasts.length > p2 && we.toasts.shift(), t.id;
|
|
4933
4888
|
}, C2 = (e, n) => we.toasts = we.toasts.map((t) => t.id === e ? { ...t, ...n, loading: !1 } : t), ur = Object.assign(
|
|
4934
4889
|
(e) => Ze(e),
|
|
4935
4890
|
{
|
|
@@ -4958,7 +4913,7 @@ const Ze = (e, n = "info") => {
|
|
|
4958
4913
|
focus: { type: Boolean }
|
|
4959
4914
|
},
|
|
4960
4915
|
setup(e) {
|
|
4961
|
-
const n = e, t =
|
|
4916
|
+
const n = e, t = w(null), a = w("open"), o = w(100);
|
|
4962
4917
|
let i = Date.now(), r;
|
|
4963
4918
|
const l = () => {
|
|
4964
4919
|
const u = Date.now() - i;
|
|
@@ -4982,7 +4937,7 @@ const Ze = (e, n = "info") => {
|
|
|
4982
4937
|
const c = () => {
|
|
4983
4938
|
cancelAnimationFrame(r), a.value = "closing", setTimeout(() => we.toasts = we.toasts.filter((u) => u.id !== n.id), b2);
|
|
4984
4939
|
};
|
|
4985
|
-
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", {
|
|
4986
4941
|
ref_key: "rootRef",
|
|
4987
4942
|
ref: t,
|
|
4988
4943
|
tabindex: "-1",
|
|
@@ -4994,7 +4949,7 @@ const Ze = (e, n = "info") => {
|
|
|
4994
4949
|
"aria-atomic": "true",
|
|
4995
4950
|
"aria-describedby": e.loading ? void 0 : `toast-desc-${e.id}`
|
|
4996
4951
|
}, [
|
|
4997
|
-
|
|
4952
|
+
M("div", g2, [
|
|
4998
4953
|
G(u.$slots, "default", {}, void 0, !0),
|
|
4999
4954
|
U(Le, {
|
|
5000
4955
|
type: "button",
|
|
@@ -5011,8 +4966,8 @@ const Ze = (e, n = "info") => {
|
|
|
5011
4966
|
_: 1
|
|
5012
4967
|
}, 8, ["aria-label"])
|
|
5013
4968
|
]),
|
|
5014
|
-
e.duration !== 1 / 0 ? (
|
|
5015
|
-
|
|
4969
|
+
e.duration !== 1 / 0 ? (f(), b("div", y2, [
|
|
4970
|
+
M("div", {
|
|
5016
4971
|
class: "bar",
|
|
5017
4972
|
style: Ie({ width: o.value + "%" })
|
|
5018
4973
|
}, null, 4)
|
|
@@ -5022,11 +4977,11 @@ const Ze = (e, n = "info") => {
|
|
|
5022
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({
|
|
5023
4978
|
__name: "ToastViewport",
|
|
5024
4979
|
setup(e) {
|
|
5025
|
-
return (n, t) => (
|
|
5026
|
-
|
|
4980
|
+
return (n, t) => (f(), ae(Fe, { to: "body" }, [
|
|
4981
|
+
M("div", M2, [
|
|
5027
4982
|
U(Wt, { name: "toast-stack" }, {
|
|
5028
4983
|
default: J(() => [
|
|
5029
|
-
(
|
|
4984
|
+
(f(!0), b(de, null, he(N(we).toasts, (a) => (f(), ae(w2, {
|
|
5030
4985
|
key: a.id,
|
|
5031
4986
|
id: a.id,
|
|
5032
4987
|
duration: a.duration,
|
|
@@ -5034,13 +4989,13 @@ const Ze = (e, n = "info") => {
|
|
|
5034
4989
|
loading: a.loading
|
|
5035
4990
|
}, {
|
|
5036
4991
|
default: J(() => [
|
|
5037
|
-
|
|
5038
|
-
a.title ? (
|
|
5039
|
-
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, {
|
|
5040
4995
|
key: 1,
|
|
5041
4996
|
message: a.description,
|
|
5042
4997
|
"aria-hidden": "true"
|
|
5043
|
-
}, null, 8, ["message"])) : (
|
|
4998
|
+
}, null, 8, ["message"])) : (f(), b("p", {
|
|
5044
4999
|
key: 2,
|
|
5045
5000
|
id: `toast-desc-${a.id}`
|
|
5046
5001
|
}, K(a.description), 9, $2))
|
|
@@ -5122,39 +5077,39 @@ const E2 = {
|
|
|
5122
5077
|
}, N2 = { class: "actions" }, O2 = /* @__PURE__ */ Z({
|
|
5123
5078
|
__name: "ConfirmModal",
|
|
5124
5079
|
setup(e) {
|
|
5125
|
-
const n =
|
|
5080
|
+
const n = A(() => Ve.current), t = () => {
|
|
5126
5081
|
n && _2();
|
|
5127
5082
|
}, a = () => {
|
|
5128
5083
|
n.value && A2();
|
|
5129
5084
|
}, o = (i) => i.key === "Escape" && n && a();
|
|
5130
|
-
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" }, [
|
|
5131
5086
|
U(Ae, { name: "fade" }, {
|
|
5132
5087
|
default: J(() => [
|
|
5133
|
-
n.value ? (
|
|
5088
|
+
n.value ? (f(), b("div", {
|
|
5134
5089
|
key: n.value.id,
|
|
5135
5090
|
class: "overlay",
|
|
5136
5091
|
onClick: se(a, ["self"])
|
|
5137
5092
|
}, [
|
|
5138
5093
|
U(Ae, { name: "scale" }, {
|
|
5139
5094
|
default: J(() => [
|
|
5140
|
-
|
|
5141
|
-
|
|
5095
|
+
M("div", E2, [
|
|
5096
|
+
M("div", {
|
|
5142
5097
|
class: "icon",
|
|
5143
5098
|
"data-type": n.value.type
|
|
5144
5099
|
}, [
|
|
5145
|
-
r[0] || (r[0] =
|
|
5146
|
-
n.value.type === "success" ? (
|
|
5147
|
-
n.value.type === "error" ? (
|
|
5148
|
-
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)
|
|
5149
5104
|
], 8, R2),
|
|
5150
|
-
n.value.title ? (
|
|
5151
|
-
n.value.text ? (
|
|
5152
|
-
|
|
5153
|
-
|
|
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", {
|
|
5154
5109
|
class: "btn btn--ghost",
|
|
5155
5110
|
onClick: a
|
|
5156
5111
|
}, K(n.value.cancelText), 1),
|
|
5157
|
-
|
|
5112
|
+
M("button", {
|
|
5158
5113
|
class: "btn btn--primary",
|
|
5159
5114
|
onClick: t
|
|
5160
5115
|
}, K(n.value.confirmText), 1)
|
|
@@ -5188,10 +5143,10 @@ const dr = {
|
|
|
5188
5143
|
},
|
|
5189
5144
|
emits: ["click"],
|
|
5190
5145
|
setup(e, { emit: n }) {
|
|
5191
|
-
const t = e, a = n, o =
|
|
5146
|
+
const t = e, a = n, o = w(), i = w();
|
|
5192
5147
|
He("card:labelId", o), He("card:descriptionId", i);
|
|
5193
|
-
const r =
|
|
5194
|
-
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), {
|
|
5195
5150
|
class: fe(["rs-card", { clickable: e.clickable }]),
|
|
5196
5151
|
tabindex: r.value ? 0 : void 0,
|
|
5197
5152
|
role: r.value ? "button" : void 0,
|
|
@@ -5215,8 +5170,8 @@ const dr = {
|
|
|
5215
5170
|
as: { default: "div" }
|
|
5216
5171
|
},
|
|
5217
5172
|
setup(e) {
|
|
5218
|
-
const n =
|
|
5219
|
-
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), {
|
|
5220
5175
|
id: t,
|
|
5221
5176
|
class: "rs-card-header"
|
|
5222
5177
|
}, {
|
|
@@ -5229,28 +5184,28 @@ const dr = {
|
|
|
5229
5184
|
}), fr = /* @__PURE__ */ W(F2, [["__scopeId", "data-v-570794b4"]]), P2 = /* @__PURE__ */ Z({
|
|
5230
5185
|
__name: "CardBody",
|
|
5231
5186
|
setup(e) {
|
|
5232
|
-
const n =
|
|
5233
|
-
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", {
|
|
5234
5189
|
id: t,
|
|
5235
5190
|
class: "rs-card-body"
|
|
5236
5191
|
}, [
|
|
5237
5192
|
G(a.$slots, "default", {}, void 0, !0)
|
|
5238
5193
|
]));
|
|
5239
5194
|
}
|
|
5240
|
-
}),
|
|
5195
|
+
}), pr = /* @__PURE__ */ W(P2, [["__scopeId", "data-v-f0380fda"]]), U2 = /* @__PURE__ */ Z({
|
|
5241
5196
|
__name: "CardFooter",
|
|
5242
5197
|
props: {
|
|
5243
5198
|
as: { default: "div" }
|
|
5244
5199
|
},
|
|
5245
5200
|
setup(e) {
|
|
5246
|
-
return (n, t) => (
|
|
5201
|
+
return (n, t) => (f(), ae(Ne(e.as), { class: "rs-card-footer" }, {
|
|
5247
5202
|
default: J(() => [
|
|
5248
5203
|
G(n.$slots, "default", {}, void 0, !0)
|
|
5249
5204
|
]),
|
|
5250
5205
|
_: 3
|
|
5251
5206
|
}));
|
|
5252
5207
|
}
|
|
5253
|
-
}),
|
|
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 = {
|
|
5254
5209
|
key: 2,
|
|
5255
5210
|
class: "icon",
|
|
5256
5211
|
"aria-hidden": "true",
|
|
@@ -5275,13 +5230,13 @@ const dr = {
|
|
|
5275
5230
|
size: { default: "sm" }
|
|
5276
5231
|
},
|
|
5277
5232
|
setup(e) {
|
|
5278
|
-
const n = e, t =
|
|
5233
|
+
const n = e, t = me("StepsContext");
|
|
5279
5234
|
if (!t) throw new Error("Step component must be used inside Steps.");
|
|
5280
|
-
const a = it(), o =
|
|
5235
|
+
const a = it(), o = w(null), i = w(null), r = A(() => t.orientation ?? "horizontal");
|
|
5281
5236
|
let l = null, s = null;
|
|
5282
|
-
const c =
|
|
5237
|
+
const c = me("StepIndex");
|
|
5283
5238
|
if (c == null) throw new Error("StepIndex component must be used inside Steps.");
|
|
5284
|
-
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(() => {
|
|
5285
5240
|
switch (u.value) {
|
|
5286
5241
|
case "completed":
|
|
5287
5242
|
return "Stage completed";
|
|
@@ -5292,7 +5247,7 @@ const dr = {
|
|
|
5292
5247
|
default:
|
|
5293
5248
|
return "Stage pending";
|
|
5294
5249
|
}
|
|
5295
|
-
}),
|
|
5250
|
+
}), h = A(() => {
|
|
5296
5251
|
switch (u.value) {
|
|
5297
5252
|
case "completed":
|
|
5298
5253
|
return "success";
|
|
@@ -5303,7 +5258,7 @@ const dr = {
|
|
|
5303
5258
|
default:
|
|
5304
5259
|
return "default";
|
|
5305
5260
|
}
|
|
5306
|
-
}),
|
|
5261
|
+
}), x = A(() => n.size ?? t.size ?? "sm"), B = A(() => {
|
|
5307
5262
|
switch (u.value) {
|
|
5308
5263
|
case "completed":
|
|
5309
5264
|
return t.tagTitles.completed;
|
|
@@ -5320,11 +5275,11 @@ const dr = {
|
|
|
5320
5275
|
(z) => t.registerStepStatus(c, z),
|
|
5321
5276
|
{ immediate: !0 }
|
|
5322
5277
|
);
|
|
5323
|
-
const
|
|
5278
|
+
const S = () => {
|
|
5324
5279
|
l == null && (l = requestAnimationFrame(() => {
|
|
5325
|
-
l = null,
|
|
5280
|
+
l = null, L();
|
|
5326
5281
|
}));
|
|
5327
|
-
},
|
|
5282
|
+
}, L = () => {
|
|
5328
5283
|
if (!o.value || !i.value) return;
|
|
5329
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;
|
|
5330
5285
|
t.registerIndicatorCenter(c, oe);
|
|
@@ -5356,16 +5311,16 @@ const dr = {
|
|
|
5356
5311
|
};
|
|
5357
5312
|
return ve(() => {
|
|
5358
5313
|
!o.value || !i.value || (requestAnimationFrame(() => {
|
|
5359
|
-
requestAnimationFrame(
|
|
5314
|
+
requestAnimationFrame(L);
|
|
5360
5315
|
}), s = new ResizeObserver(() => {
|
|
5361
|
-
|
|
5316
|
+
S();
|
|
5362
5317
|
}), s.observe(o.value), s.observe(i.value), t.stepsRef.value && s.observe(t.stepsRef.value), t.registerStep(o.value));
|
|
5363
5318
|
}), Be(() => {
|
|
5364
5319
|
s?.disconnect(), t.unregisterStep(o.value), l != null && cancelAnimationFrame(l);
|
|
5365
|
-
}), (z, P) => (
|
|
5320
|
+
}), (z, P) => (f(), b("li", {
|
|
5366
5321
|
ref_key: "stepRef",
|
|
5367
5322
|
ref: o,
|
|
5368
|
-
class: fe(["step", `step__${
|
|
5323
|
+
class: fe(["step", `step__${x.value}`]),
|
|
5369
5324
|
role: "listitem",
|
|
5370
5325
|
"data-status": u.value,
|
|
5371
5326
|
"data-orientation": r.value,
|
|
@@ -5379,7 +5334,7 @@ const dr = {
|
|
|
5379
5334
|
"aria-describedby": `step-status-${N(c)}`,
|
|
5380
5335
|
onKeydown: _
|
|
5381
5336
|
}, [
|
|
5382
|
-
|
|
5337
|
+
M("span", {
|
|
5383
5338
|
ref_key: "indicatorRef",
|
|
5384
5339
|
ref: i,
|
|
5385
5340
|
class: "indicator",
|
|
@@ -5388,42 +5343,42 @@ const dr = {
|
|
|
5388
5343
|
z.$slots.icon ? G(z.$slots, "icon", {
|
|
5389
5344
|
key: 0,
|
|
5390
5345
|
status: u.value
|
|
5391
|
-
}, void 0, !0) :
|
|
5346
|
+
}, void 0, !0) : m.value ? (f(), ae(Ce, {
|
|
5392
5347
|
key: 1,
|
|
5393
|
-
name:
|
|
5348
|
+
name: m.value,
|
|
5394
5349
|
class: "icon"
|
|
5395
5350
|
}, null, 8, ["name"])) : O("", !0),
|
|
5396
|
-
u.value === "completed" ? (
|
|
5397
|
-
|
|
5351
|
+
u.value === "completed" ? (f(), b("svg", j2, [...P[0] || (P[0] = [
|
|
5352
|
+
M("path", {
|
|
5398
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",
|
|
5399
5354
|
fill: "currentColor"
|
|
5400
5355
|
}, null, -1)
|
|
5401
|
-
])])) : u.value === "error" ? (
|
|
5402
|
-
|
|
5356
|
+
])])) : u.value === "error" ? (f(), b("svg", W2, [...P[1] || (P[1] = [
|
|
5357
|
+
M("path", {
|
|
5403
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",
|
|
5404
5359
|
fill: "currentColor"
|
|
5405
5360
|
}, null, -1)
|
|
5406
|
-
])])) : u.value === "active" ? (
|
|
5361
|
+
])])) : u.value === "active" ? (f(), b("span", Y2)) : O("", !0)
|
|
5407
5362
|
], 512),
|
|
5408
|
-
|
|
5363
|
+
M("span", {
|
|
5409
5364
|
id: `step-status-${N(c)}`,
|
|
5410
5365
|
class: "sr-only"
|
|
5411
|
-
}, K(
|
|
5412
|
-
|
|
5413
|
-
|
|
5366
|
+
}, K(C.value), 9, X2),
|
|
5367
|
+
M("div", G2, [
|
|
5368
|
+
M("span", {
|
|
5414
5369
|
id: `step-title-${N(c)}`,
|
|
5415
5370
|
class: "title"
|
|
5416
5371
|
}, K(e.title), 9, J2),
|
|
5417
5372
|
U(Hn, {
|
|
5418
|
-
variant:
|
|
5373
|
+
variant: h.value,
|
|
5419
5374
|
size: "sm"
|
|
5420
5375
|
}, {
|
|
5421
5376
|
default: J(() => [
|
|
5422
|
-
Me(K(
|
|
5377
|
+
Me(K(B.value), 1)
|
|
5423
5378
|
]),
|
|
5424
5379
|
_: 1
|
|
5425
5380
|
}, 8, ["variant"]),
|
|
5426
|
-
z.$slots.default ? (
|
|
5381
|
+
z.$slots.default ? (f(), b("span", Q2, [
|
|
5427
5382
|
G(z.$slots, "default", {}, void 0, !0)
|
|
5428
5383
|
])) : O("", !0)
|
|
5429
5384
|
])
|
|
@@ -5462,13 +5417,13 @@ const dr = {
|
|
|
5462
5417
|
}),
|
|
5463
5418
|
emits: ["update:modelValue"],
|
|
5464
5419
|
setup(e) {
|
|
5465
|
-
const n = e, t =
|
|
5466
|
-
let
|
|
5467
|
-
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(
|
|
5468
5423
|
() => Object.values(u).includes("error")
|
|
5469
|
-
),
|
|
5470
|
-
const F = l.value,
|
|
5471
|
-
if (
|
|
5424
|
+
), x = A(() => {
|
|
5425
|
+
const F = l.value, R = c;
|
|
5426
|
+
if (R.value[0] == null || R.value[F] == null)
|
|
5472
5427
|
return n.orientation === "vertical" ? {
|
|
5473
5428
|
height: "100%",
|
|
5474
5429
|
top: "0px"
|
|
@@ -5476,31 +5431,31 @@ const dr = {
|
|
|
5476
5431
|
width: "100%",
|
|
5477
5432
|
left: "0px"
|
|
5478
5433
|
};
|
|
5479
|
-
const
|
|
5434
|
+
const $ = R.value[0], V = R.value[F];
|
|
5480
5435
|
return n.orientation === "vertical" ? {
|
|
5481
|
-
top: `${
|
|
5482
|
-
height: `${
|
|
5436
|
+
top: `${$}px`,
|
|
5437
|
+
height: `${V - $}px`
|
|
5483
5438
|
} : {
|
|
5484
|
-
left: `${
|
|
5485
|
-
width: `${
|
|
5439
|
+
left: `${$}px`,
|
|
5440
|
+
width: `${V - $}px`
|
|
5486
5441
|
};
|
|
5487
|
-
}),
|
|
5488
|
-
const F = Object.values(c.value).sort((
|
|
5442
|
+
}), B = A(() => {
|
|
5443
|
+
const F = Object.values(c.value).sort((V, g) => V - g);
|
|
5489
5444
|
if (F.length < 2) return {};
|
|
5490
|
-
const
|
|
5445
|
+
const R = F[0], $ = F[F.length - 1];
|
|
5491
5446
|
return n.orientation === "vertical" ? {
|
|
5492
|
-
top: `${
|
|
5493
|
-
height: `${
|
|
5447
|
+
top: `${R}px`,
|
|
5448
|
+
height: `${$ - R}px`
|
|
5494
5449
|
} : {
|
|
5495
|
-
left: `${
|
|
5496
|
-
right: `calc(100% - ${
|
|
5450
|
+
left: `${R}px`,
|
|
5451
|
+
right: `calc(100% - ${$}px)`
|
|
5497
5452
|
};
|
|
5498
|
-
}),
|
|
5499
|
-
function
|
|
5453
|
+
}), S = (F, R) => c.value = { ...c.value, [F]: R };
|
|
5454
|
+
function L(F) {
|
|
5500
5455
|
i.value.push(F), t.value = i.value.length;
|
|
5501
5456
|
}
|
|
5502
5457
|
function _(F) {
|
|
5503
|
-
i.value = i.value.filter((
|
|
5458
|
+
i.value = i.value.filter((R) => R !== F), t.value = i.value.length;
|
|
5504
5459
|
}
|
|
5505
5460
|
function z(F) {
|
|
5506
5461
|
F < 0 || F >= i.value.length || (o.value = F, i.value[F]?.focus());
|
|
@@ -5518,10 +5473,10 @@ const dr = {
|
|
|
5518
5473
|
z(t.value - 1);
|
|
5519
5474
|
}
|
|
5520
5475
|
return ve(() => {
|
|
5521
|
-
r.value && (
|
|
5522
|
-
}),
|
|
5523
|
-
}), Be(() =>
|
|
5524
|
-
current:
|
|
5476
|
+
r.value && (d = new ResizeObserver(() => {
|
|
5477
|
+
}), d.observe(r.value));
|
|
5478
|
+
}), Be(() => d?.disconnect()), He("StepsContext", {
|
|
5479
|
+
current: A(() => o.value),
|
|
5525
5480
|
update: (F) => o.value = F,
|
|
5526
5481
|
stepsCount: t,
|
|
5527
5482
|
icons: n.icons,
|
|
@@ -5529,19 +5484,19 @@ const dr = {
|
|
|
5529
5484
|
orientation: n.orientation,
|
|
5530
5485
|
stepStatusMap: u,
|
|
5531
5486
|
stepsRef: r,
|
|
5532
|
-
registerStepStatus: (F,
|
|
5533
|
-
u[F] =
|
|
5487
|
+
registerStepStatus: (F, R) => {
|
|
5488
|
+
u[F] = R;
|
|
5534
5489
|
},
|
|
5535
|
-
registerIndicatorCenter:
|
|
5536
|
-
registerStep:
|
|
5490
|
+
registerIndicatorCenter: S,
|
|
5491
|
+
registerStep: L,
|
|
5537
5492
|
unregisterStep: _,
|
|
5538
5493
|
focusNext: P,
|
|
5539
5494
|
focusPrev: oe,
|
|
5540
5495
|
focusFirst: ue,
|
|
5541
5496
|
focusLast: re,
|
|
5542
5497
|
tagTitles: n.tagTitles
|
|
5543
|
-
}), (F,
|
|
5544
|
-
|
|
5498
|
+
}), (F, R) => (f(), b(de, null, [
|
|
5499
|
+
M("ol", {
|
|
5545
5500
|
ref_key: "stepsRef",
|
|
5546
5501
|
ref: r,
|
|
5547
5502
|
class: "steps",
|
|
@@ -5550,33 +5505,33 @@ const dr = {
|
|
|
5550
5505
|
"data-orientation": n.orientation,
|
|
5551
5506
|
"aria-describedby": s
|
|
5552
5507
|
}, [
|
|
5553
|
-
|
|
5508
|
+
M("p", {
|
|
5554
5509
|
id: s,
|
|
5555
5510
|
class: "sr-only"
|
|
5556
5511
|
}, " This is a multi-step process. Use arrow keys to navigate between steps. "),
|
|
5557
|
-
|
|
5512
|
+
M("div", {
|
|
5558
5513
|
class: "track",
|
|
5559
5514
|
"aria-hidden": "true",
|
|
5560
|
-
style: Ie(
|
|
5515
|
+
style: Ie(B.value)
|
|
5561
5516
|
}, [
|
|
5562
|
-
|
|
5517
|
+
M("div", {
|
|
5563
5518
|
class: "track-progress",
|
|
5564
|
-
"data-error":
|
|
5565
|
-
"data-completed":
|
|
5566
|
-
style: Ie(
|
|
5519
|
+
"data-error": h.value,
|
|
5520
|
+
"data-completed": C.value,
|
|
5521
|
+
style: Ie(x.value)
|
|
5567
5522
|
}, null, 12, nl)
|
|
5568
5523
|
], 4),
|
|
5569
|
-
(
|
|
5570
|
-
key:
|
|
5571
|
-
index:
|
|
5524
|
+
(f(!0), b(de, null, he(F.$slots.default?.(), ($, V) => (f(), ae(tl, {
|
|
5525
|
+
key: V,
|
|
5526
|
+
index: V
|
|
5572
5527
|
}, {
|
|
5573
5528
|
default: J(() => [
|
|
5574
|
-
(
|
|
5529
|
+
(f(), ae(Ne($)))
|
|
5575
5530
|
]),
|
|
5576
5531
|
_: 2
|
|
5577
5532
|
}, 1032, ["index"]))), 128))
|
|
5578
5533
|
], 8, al),
|
|
5579
|
-
|
|
5534
|
+
M("div", ol, " Step " + K(l.value + 1) + " of " + K(t.value) + ": " + K(m.value), 1)
|
|
5580
5535
|
], 64));
|
|
5581
5536
|
}
|
|
5582
5537
|
}), hr = /* @__PURE__ */ W(ll, [["__scopeId", "data-v-3b60596b"]]), rl = ["data-align"], sl = /* @__PURE__ */ Z({
|
|
@@ -5585,7 +5540,7 @@ const dr = {
|
|
|
5585
5540
|
align: { default: "left" }
|
|
5586
5541
|
},
|
|
5587
5542
|
setup(e) {
|
|
5588
|
-
return He("TimelineContext", e), (t, a) => (
|
|
5543
|
+
return He("TimelineContext", e), (t, a) => (f(), b("ol", {
|
|
5589
5544
|
role: "list",
|
|
5590
5545
|
class: "ui-timeline",
|
|
5591
5546
|
"data-align": e.align
|
|
@@ -5593,7 +5548,7 @@ const dr = {
|
|
|
5593
5548
|
G(t.$slots, "default", {}, void 0, !0)
|
|
5594
5549
|
], 8, rl));
|
|
5595
5550
|
}
|
|
5596
|
-
}), 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({
|
|
5597
5552
|
__name: "TimelineItem",
|
|
5598
5553
|
props: {
|
|
5599
5554
|
date: {},
|
|
@@ -5604,40 +5559,40 @@ const dr = {
|
|
|
5604
5559
|
titleAs: {}
|
|
5605
5560
|
},
|
|
5606
5561
|
setup(e) {
|
|
5607
|
-
const n = e, t =
|
|
5562
|
+
const n = e, t = me("TimelineContext");
|
|
5608
5563
|
if (!t) throw new Error("TimelineItem must be used within a Timeline component");
|
|
5609
|
-
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) => {
|
|
5610
5565
|
const u = new Date(c).getDay();
|
|
5611
5566
|
return u < 10 ? `0${u}` : u;
|
|
5612
5567
|
}, l = (c) => new Date(c).toLocaleString("default", { month: "short" }), s = (c) => new Date(c).getFullYear();
|
|
5613
|
-
return (c, u) => (
|
|
5568
|
+
return (c, u) => (f(), b("li", {
|
|
5614
5569
|
tabindex: "0",
|
|
5615
5570
|
class: fe([i.value, "ui-timeline-item"]),
|
|
5616
5571
|
"data-align": N(t).align,
|
|
5617
5572
|
"aria-labelledby": e.title ? N(a) : void 0,
|
|
5618
5573
|
"aria-describedby": e.description ? N(o) : void 0
|
|
5619
5574
|
}, [
|
|
5620
|
-
u[0] || (u[0] =
|
|
5575
|
+
u[0] || (u[0] = M("div", {
|
|
5621
5576
|
class: "ui-timeline-marker",
|
|
5622
5577
|
"aria-hidden": "true"
|
|
5623
5578
|
}, null, -1)),
|
|
5624
|
-
|
|
5625
|
-
e.date ? (
|
|
5579
|
+
M("div", ul, [
|
|
5580
|
+
e.date ? (f(), b("time", {
|
|
5626
5581
|
key: 0,
|
|
5627
5582
|
class: "ui-timeline-date",
|
|
5628
5583
|
datetime: e.date
|
|
5629
5584
|
}, [
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
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)
|
|
5633
5588
|
], 8, cl)) : O("", !0),
|
|
5634
|
-
|
|
5589
|
+
M("div", {
|
|
5635
5590
|
class: "ui-timeline-body",
|
|
5636
5591
|
"data-direction": e.flexDirection
|
|
5637
5592
|
}, [
|
|
5638
|
-
|
|
5593
|
+
M("div", ml, [
|
|
5639
5594
|
G(c.$slots, "title", {}, () => [
|
|
5640
|
-
(
|
|
5595
|
+
(f(), ae(Ne(e.titleAs ?? "h3"), {
|
|
5641
5596
|
id: N(a),
|
|
5642
5597
|
class: "ui-timeline-title"
|
|
5643
5598
|
}, {
|
|
@@ -5648,17 +5603,17 @@ const dr = {
|
|
|
5648
5603
|
}, 8, ["id"]))
|
|
5649
5604
|
], !0),
|
|
5650
5605
|
G(c.$slots, "description", {}, () => [
|
|
5651
|
-
e.description ? (
|
|
5606
|
+
e.description ? (f(), b("p", {
|
|
5652
5607
|
key: 0,
|
|
5653
5608
|
id: N(o),
|
|
5654
5609
|
class: "ui-timeline-description"
|
|
5655
5610
|
}, K(e.description), 9, Cl)) : O("", !0)
|
|
5656
5611
|
], !0)
|
|
5657
5612
|
]),
|
|
5658
|
-
|
|
5613
|
+
M("div", hl, [
|
|
5659
5614
|
G(c.$slots, "default", {}, void 0, !0)
|
|
5660
5615
|
])
|
|
5661
|
-
], 8,
|
|
5616
|
+
], 8, pl)
|
|
5662
5617
|
])
|
|
5663
5618
|
], 10, il));
|
|
5664
5619
|
}
|
|
@@ -5691,120 +5646,120 @@ const dr = {
|
|
|
5691
5646
|
}),
|
|
5692
5647
|
emits: ["update:modelValue"],
|
|
5693
5648
|
setup(e) {
|
|
5694
|
-
const n = ke(e, "modelValue"), t = e, a =
|
|
5695
|
-
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;
|
|
5696
5651
|
Q(
|
|
5697
5652
|
() => n.value,
|
|
5698
|
-
(
|
|
5653
|
+
(p) => h.value = p
|
|
5699
5654
|
);
|
|
5700
|
-
const _ =
|
|
5701
|
-
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;
|
|
5702
5657
|
return {
|
|
5703
|
-
transform: `translateX(calc(-${
|
|
5658
|
+
transform: `translateX(calc(-${p}% + ${v}%))`,
|
|
5704
5659
|
transition: u.value ? "none" : "transform 300ms ease"
|
|
5705
5660
|
};
|
|
5706
|
-
}), re = (
|
|
5707
|
-
let
|
|
5661
|
+
}), re = (p) => {
|
|
5662
|
+
let v = p;
|
|
5708
5663
|
if (t.loop) {
|
|
5709
|
-
const y = Math.round(
|
|
5710
|
-
|
|
5664
|
+
const y = Math.round(p / C.value), I = P.value;
|
|
5665
|
+
v = (y % I + I) % I * C.value;
|
|
5711
5666
|
} else
|
|
5712
|
-
|
|
5713
|
-
Math.max(
|
|
5667
|
+
v = Math.min(
|
|
5668
|
+
Math.max(p, 0),
|
|
5714
5669
|
oe.value
|
|
5715
5670
|
);
|
|
5716
|
-
|
|
5717
|
-
}, F = () => re(
|
|
5718
|
-
|
|
5719
|
-
},
|
|
5720
|
-
!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(() => {
|
|
5721
5676
|
c.value || F();
|
|
5722
5677
|
}, t.autoplayDelay));
|
|
5723
5678
|
}, q = () => {
|
|
5724
|
-
|
|
5725
|
-
},
|
|
5679
|
+
S !== null && (clearInterval(S), S = null);
|
|
5680
|
+
}, H = (p) => {
|
|
5726
5681
|
if (typeof t.itemsPerView == "number")
|
|
5727
5682
|
return t.itemsPerView;
|
|
5728
|
-
const
|
|
5729
|
-
let y =
|
|
5730
|
-
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);
|
|
5731
5686
|
return y;
|
|
5732
|
-
},
|
|
5733
|
-
|
|
5734
|
-
}, 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) => {
|
|
5735
5690
|
if (!u.value) return;
|
|
5736
|
-
const
|
|
5737
|
-
|
|
5738
|
-
}, 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) => {
|
|
5739
5694
|
if (!u.value) return;
|
|
5740
|
-
u.value = !1,
|
|
5741
|
-
const
|
|
5742
|
-
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();
|
|
5743
5698
|
};
|
|
5744
5699
|
return ve(() => {
|
|
5745
|
-
|
|
5746
|
-
const
|
|
5747
|
-
|
|
5748
|
-
}),
|
|
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));
|
|
5749
5704
|
}), Be(() => {
|
|
5750
|
-
q(),
|
|
5705
|
+
q(), L?.disconnect();
|
|
5751
5706
|
}), Q(
|
|
5752
5707
|
() => t.autoplay,
|
|
5753
|
-
(
|
|
5754
|
-
|
|
5708
|
+
(p) => {
|
|
5709
|
+
p ? E() : q();
|
|
5755
5710
|
},
|
|
5756
5711
|
{ immediate: !0 }
|
|
5757
|
-
), Q(
|
|
5758
|
-
register:
|
|
5712
|
+
), Q(C, () => h.value = Math.min(h.value, oe.value)), He("CarouselContext", {
|
|
5713
|
+
register: V,
|
|
5759
5714
|
unregister: g,
|
|
5760
|
-
activeIndex:
|
|
5715
|
+
activeIndex: h,
|
|
5761
5716
|
slideCount: D,
|
|
5762
5717
|
deltaX: i,
|
|
5763
|
-
itemsPerView: t.itemsPerView instanceof Object ?
|
|
5764
|
-
}), (
|
|
5718
|
+
itemsPerView: t.itemsPerView instanceof Object ? C : w(t.itemsPerView)
|
|
5719
|
+
}), (p, v) => (f(), b("div", {
|
|
5765
5720
|
ref_key: "rootRef",
|
|
5766
|
-
ref:
|
|
5721
|
+
ref: x,
|
|
5767
5722
|
role: "region",
|
|
5768
5723
|
class: "carousel",
|
|
5769
5724
|
"aria-roledescription": "carousel",
|
|
5770
5725
|
"aria-label": e.ariaLabel,
|
|
5771
5726
|
tabindex: "0",
|
|
5772
5727
|
"aria-activedescendant": _.value,
|
|
5773
|
-
style: Ie({ "--items-per-view":
|
|
5774
|
-
onKeydown:
|
|
5775
|
-
onMouseenter:
|
|
5776
|
-
onMouseleave:
|
|
5777
|
-
onFocusin:
|
|
5778
|
-
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)
|
|
5779
5734
|
}, [
|
|
5780
|
-
|
|
5735
|
+
v[4] || (v[4] = M("span", {
|
|
5781
5736
|
id: "carousel-instructions",
|
|
5782
5737
|
class: "sr-only"
|
|
5783
5738
|
}, " Use left and right arrow keys to navigate slides ", -1)),
|
|
5784
|
-
|
|
5785
|
-
|
|
5739
|
+
M("div", bl, [
|
|
5740
|
+
M("div", {
|
|
5786
5741
|
ref_key: "trackRef",
|
|
5787
|
-
ref:
|
|
5742
|
+
ref: B,
|
|
5788
5743
|
class: "carousel-track",
|
|
5789
5744
|
style: Ie(ue.value),
|
|
5790
|
-
onPointerdown:
|
|
5745
|
+
onPointerdown: k,
|
|
5791
5746
|
onPointermove: T,
|
|
5792
5747
|
onPointerup: Y,
|
|
5793
5748
|
onPointercancel: Y
|
|
5794
5749
|
}, [
|
|
5795
|
-
G(
|
|
5750
|
+
G(p.$slots, "default", {}, void 0, !0)
|
|
5796
5751
|
], 36)
|
|
5797
5752
|
]),
|
|
5798
|
-
|
|
5799
|
-
|
|
5753
|
+
M("span", kl, " Slide " + K(Math.floor(h.value / C.value) + 1) + " of " + K(P.value), 1),
|
|
5754
|
+
M("button", {
|
|
5800
5755
|
type: "button",
|
|
5801
5756
|
class: "carousel-control prev",
|
|
5802
5757
|
"aria-label": "Previous slide",
|
|
5803
|
-
onClick:
|
|
5758
|
+
onClick: R
|
|
5804
5759
|
}, [
|
|
5805
5760
|
U(Ce, { name: "directionDown" })
|
|
5806
5761
|
]),
|
|
5807
|
-
|
|
5762
|
+
M("button", {
|
|
5808
5763
|
type: "button",
|
|
5809
5764
|
class: "carousel-control next",
|
|
5810
5765
|
"aria-label": "Next slide",
|
|
@@ -5812,19 +5767,19 @@ const dr = {
|
|
|
5812
5767
|
}, [
|
|
5813
5768
|
U(Ce, { name: "directionDown" })
|
|
5814
5769
|
]),
|
|
5815
|
-
e.showIndicators ? (
|
|
5816
|
-
(
|
|
5770
|
+
e.showIndicators ? (f(), b("div", wl, [
|
|
5771
|
+
(f(!0), b(de, null, he(P.value, (y, I) => (f(), b("button", {
|
|
5817
5772
|
role: "tab",
|
|
5818
5773
|
type: "button",
|
|
5819
|
-
key:
|
|
5820
|
-
class: fe(["indicator", { active:
|
|
5821
|
-
"aria-label": `Go to slide ${
|
|
5822
|
-
"aria-selected":
|
|
5823
|
-
"aria-current":
|
|
5824
|
-
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),
|
|
5825
5780
|
onKeydown: [
|
|
5826
|
-
ye(se((X) => re((
|
|
5827
|
-
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"])
|
|
5828
5783
|
]
|
|
5829
5784
|
}, null, 42, Ml))), 128))
|
|
5830
5785
|
])) : O("", !0)
|
|
@@ -5833,10 +5788,10 @@ const dr = {
|
|
|
5833
5788
|
}), br = /* @__PURE__ */ W($l, [["__scopeId", "data-v-30cdfc00"]]), Il = ["aria-hidden", "aria-label"], Hl = /* @__PURE__ */ Z({
|
|
5834
5789
|
__name: "CarouselItem",
|
|
5835
5790
|
setup(e) {
|
|
5836
|
-
const n =
|
|
5791
|
+
const n = me("CarouselContext");
|
|
5837
5792
|
if (!n) throw new Error("CarouselItem must be used inside a Carousel");
|
|
5838
|
-
const t = "carousel-item-" + ge(), a =
|
|
5839
|
-
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", {
|
|
5840
5795
|
role: "group",
|
|
5841
5796
|
class: "carousel-item",
|
|
5842
5797
|
id: t,
|
|
@@ -5864,43 +5819,43 @@ const dr = {
|
|
|
5864
5819
|
},
|
|
5865
5820
|
emits: ["update:modelValue"],
|
|
5866
5821
|
setup(e, { emit: n, slots: t }) {
|
|
5867
|
-
const a =
|
|
5868
|
-
Q(a, (
|
|
5869
|
-
!
|
|
5870
|
-
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;
|
|
5871
5826
|
});
|
|
5872
5827
|
}), Q(
|
|
5873
5828
|
() => e.modelValue,
|
|
5874
|
-
(
|
|
5875
|
-
|
|
5829
|
+
(h) => {
|
|
5830
|
+
h !== void 0 && (a.value = h);
|
|
5876
5831
|
}
|
|
5877
|
-
), Q(i, (
|
|
5878
|
-
!a.value &&
|
|
5832
|
+
), Q(i, (h) => {
|
|
5833
|
+
!a.value && h.length && (a.value = h[0]);
|
|
5879
5834
|
});
|
|
5880
|
-
const s = (
|
|
5881
|
-
const
|
|
5882
|
-
if (!
|
|
5883
|
-
const
|
|
5884
|
-
if (!
|
|
5885
|
-
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);
|
|
5886
5841
|
return;
|
|
5887
5842
|
}
|
|
5888
|
-
const
|
|
5889
|
-
if (
|
|
5890
|
-
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);
|
|
5891
5846
|
return;
|
|
5892
5847
|
}
|
|
5893
|
-
|
|
5894
|
-
}, u =
|
|
5895
|
-
|
|
5896
|
-
},
|
|
5897
|
-
if (
|
|
5898
|
-
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;
|
|
5899
5854
|
requestAnimationFrame(() => {
|
|
5900
|
-
l.value && (l.value.style.height = `${
|
|
5855
|
+
l.value && (l.value.style.height = `${x}px`);
|
|
5901
5856
|
});
|
|
5902
5857
|
}
|
|
5903
|
-
},
|
|
5858
|
+
}, C = () => {
|
|
5904
5859
|
l.value && (l.value.style.height = "");
|
|
5905
5860
|
};
|
|
5906
5861
|
return He(Je, {
|
|
@@ -5908,19 +5863,19 @@ const dr = {
|
|
|
5908
5863
|
setValue: c,
|
|
5909
5864
|
registerTrigger: s,
|
|
5910
5865
|
direction: r,
|
|
5911
|
-
activationMode:
|
|
5912
|
-
orientation:
|
|
5866
|
+
activationMode: w(e.activationMode),
|
|
5867
|
+
orientation: w(e.orientation),
|
|
5913
5868
|
triggers: i,
|
|
5914
5869
|
contentWrapperRef: l,
|
|
5915
5870
|
focusOnChange: o
|
|
5916
5871
|
}), () => {
|
|
5917
|
-
const
|
|
5918
|
-
|
|
5919
|
-
|
|
5872
|
+
const h = t.default?.() || [], x = [], B = [];
|
|
5873
|
+
h.forEach((L) => {
|
|
5874
|
+
L.type?.name === "TabsContent" ? B.push(L) : x.push(L);
|
|
5920
5875
|
});
|
|
5921
|
-
const
|
|
5876
|
+
const S = B.find((L) => L.props?.value === a.value);
|
|
5922
5877
|
return [
|
|
5923
|
-
...
|
|
5878
|
+
...x,
|
|
5924
5879
|
j(
|
|
5925
5880
|
"div",
|
|
5926
5881
|
{
|
|
@@ -5932,14 +5887,14 @@ const dr = {
|
|
|
5932
5887
|
{
|
|
5933
5888
|
name: u.value,
|
|
5934
5889
|
mode: "out-in",
|
|
5935
|
-
onBeforeLeave:
|
|
5936
|
-
onEnter:
|
|
5937
|
-
onAfterEnter:
|
|
5890
|
+
onBeforeLeave: d,
|
|
5891
|
+
onEnter: m,
|
|
5892
|
+
onAfterEnter: C
|
|
5938
5893
|
},
|
|
5939
|
-
() =>
|
|
5940
|
-
|
|
5941
|
-
key:
|
|
5942
|
-
},
|
|
5894
|
+
() => S ? [j(S.type, {
|
|
5895
|
+
...S.props,
|
|
5896
|
+
key: S.props.value
|
|
5897
|
+
}, S.children)] : []
|
|
5943
5898
|
)
|
|
5944
5899
|
)
|
|
5945
5900
|
];
|
|
@@ -5948,7 +5903,7 @@ const dr = {
|
|
|
5948
5903
|
}), Mr = Z({
|
|
5949
5904
|
name: "TabsList",
|
|
5950
5905
|
setup(e, { slots: n }) {
|
|
5951
|
-
const t =
|
|
5906
|
+
const t = me(Je);
|
|
5952
5907
|
if (!t) throw new Error("TabsList components must be used inside <Tabs>");
|
|
5953
5908
|
return () => j(
|
|
5954
5909
|
"div",
|
|
@@ -5977,26 +5932,26 @@ const dr = {
|
|
|
5977
5932
|
}
|
|
5978
5933
|
},
|
|
5979
5934
|
setup(e, { slots: n }) {
|
|
5980
|
-
const t =
|
|
5935
|
+
const t = me(Je);
|
|
5981
5936
|
if (!t) throw new Error("TabsTrigger components must be used inside <Tabs>");
|
|
5982
|
-
const a =
|
|
5937
|
+
const a = A(() => t.activeValue.value === e.value), o = () => !e.disabled && t.setValue(e.value), i = (r) => {
|
|
5983
5938
|
if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(r.key)) return;
|
|
5984
5939
|
r.preventDefault();
|
|
5985
5940
|
const s = t.triggers.value.filter(Boolean);
|
|
5986
5941
|
let u = s.indexOf(e.value);
|
|
5987
|
-
const
|
|
5942
|
+
const d = t.orientation.value === "horizontal";
|
|
5988
5943
|
switch (r.key) {
|
|
5989
5944
|
case "ArrowRight":
|
|
5990
|
-
|
|
5945
|
+
d && u++;
|
|
5991
5946
|
break;
|
|
5992
5947
|
case "ArrowLeft":
|
|
5993
|
-
|
|
5948
|
+
d && u--;
|
|
5994
5949
|
break;
|
|
5995
5950
|
case "ArrowDown":
|
|
5996
|
-
|
|
5951
|
+
d || u++;
|
|
5997
5952
|
break;
|
|
5998
5953
|
case "ArrowUp":
|
|
5999
|
-
|
|
5954
|
+
d || u--;
|
|
6000
5955
|
break;
|
|
6001
5956
|
case "Home":
|
|
6002
5957
|
u = 0;
|
|
@@ -6006,9 +5961,9 @@ const dr = {
|
|
|
6006
5961
|
break;
|
|
6007
5962
|
}
|
|
6008
5963
|
u = (u + s.length) % s.length;
|
|
6009
|
-
const
|
|
6010
|
-
t.activationMode.value === "auto" && t.setValue(
|
|
6011
|
-
document.getElementById(`tab-${
|
|
5964
|
+
const m = s[u];
|
|
5965
|
+
t.activationMode.value === "auto" && t.setValue(m), requestAnimationFrame(() => {
|
|
5966
|
+
document.getElementById(`tab-${m}`)?.focus();
|
|
6012
5967
|
});
|
|
6013
5968
|
};
|
|
6014
5969
|
return ve(() => !e.disabled && t.registerTrigger(e.value, e.index)), Be(() => t.triggers.value[e.index] = void 0), () => j(
|
|
@@ -6037,7 +5992,7 @@ const dr = {
|
|
|
6037
5992
|
}
|
|
6038
5993
|
},
|
|
6039
5994
|
setup(e, { slots: n }) {
|
|
6040
|
-
if (!
|
|
5995
|
+
if (!me(Je)) throw new Error("TabsContent components must be used inside <Tabs>");
|
|
6041
5996
|
return () => j(
|
|
6042
5997
|
"div",
|
|
6043
5998
|
{
|
|
@@ -6053,13 +6008,13 @@ const dr = {
|
|
|
6053
6008
|
}), Vl = /* @__PURE__ */ Z({
|
|
6054
6009
|
__name: "DropdownItem",
|
|
6055
6010
|
setup(e) {
|
|
6056
|
-
const n =
|
|
6011
|
+
const n = me("DropdownContext");
|
|
6057
6012
|
if (!n) throw new Error("DropdownItem must be used within a Dropdown");
|
|
6058
6013
|
let t;
|
|
6059
|
-
const a =
|
|
6014
|
+
const a = w(), o = (i) => {
|
|
6060
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());
|
|
6061
6016
|
};
|
|
6062
|
-
return ve(() => t = n.registerItem(a.value)), (i, r) => (
|
|
6017
|
+
return ve(() => t = n.registerItem(a.value)), (i, r) => (f(), b("div", {
|
|
6063
6018
|
ref_key: "itemRef",
|
|
6064
6019
|
ref: a,
|
|
6065
6020
|
role: "menuitem",
|
|
@@ -6074,20 +6029,20 @@ const dr = {
|
|
|
6074
6029
|
], 544));
|
|
6075
6030
|
}
|
|
6076
6031
|
}), $r = /* @__PURE__ */ W(Vl, [["__scopeId", "data-v-69de3d9c"]]), Bl = (e) => {
|
|
6077
|
-
const n = /* @__PURE__ */ new Date(), t = e.locale || "default", a =
|
|
6078
|
-
const
|
|
6079
|
-
return
|
|
6080
|
-
}), l =
|
|
6081
|
-
const
|
|
6082
|
-
return Array.from({ length: 7 }).map((
|
|
6083
|
-
const
|
|
6084
|
-
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(".", "");
|
|
6085
6040
|
});
|
|
6086
|
-
}), s =
|
|
6087
|
-
const
|
|
6088
|
-
for (let _ = 0; _ <
|
|
6089
|
-
for (let _ = 1; _ <=
|
|
6090
|
-
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;
|
|
6091
6046
|
});
|
|
6092
6047
|
return {
|
|
6093
6048
|
today: n,
|
|
@@ -6098,7 +6053,7 @@ const dr = {
|
|
|
6098
6053
|
days: s,
|
|
6099
6054
|
nextMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() + 1, 1),
|
|
6100
6055
|
prevMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() - 1, 1),
|
|
6101
|
-
select: (
|
|
6056
|
+
select: (m) => a.value = m
|
|
6102
6057
|
};
|
|
6103
6058
|
}, Pt = /(DD|MM|YYYY|HH|mm|ss)/g, ot = (e, n) => {
|
|
6104
6059
|
const t = {
|
|
@@ -6163,14 +6118,14 @@ const Al = (e, n) => {
|
|
|
6163
6118
|
}),
|
|
6164
6119
|
emits: /* @__PURE__ */ ie(["update:open"], ["update:modelValue"]),
|
|
6165
6120
|
setup(e, { emit: n }) {
|
|
6166
|
-
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), {
|
|
6167
6122
|
monthLabel: u,
|
|
6168
|
-
weekDays:
|
|
6169
|
-
currentMonth:
|
|
6170
|
-
days:
|
|
6171
|
-
nextMonth:
|
|
6172
|
-
prevMonth:
|
|
6173
|
-
select:
|
|
6123
|
+
weekDays: d,
|
|
6124
|
+
currentMonth: m,
|
|
6125
|
+
days: C,
|
|
6126
|
+
nextMonth: h,
|
|
6127
|
+
prevMonth: x,
|
|
6128
|
+
select: B
|
|
6174
6129
|
} = Bl({
|
|
6175
6130
|
modelValue: t.value,
|
|
6176
6131
|
locale: o.locale,
|
|
@@ -6178,70 +6133,70 @@ const Al = (e, n) => {
|
|
|
6178
6133
|
});
|
|
6179
6134
|
Q(
|
|
6180
6135
|
() => t.value,
|
|
6181
|
-
(
|
|
6182
|
-
if (!
|
|
6136
|
+
(R) => {
|
|
6137
|
+
if (!R) {
|
|
6183
6138
|
l.value = "", c.value = null;
|
|
6184
6139
|
return;
|
|
6185
6140
|
}
|
|
6186
|
-
|
|
6141
|
+
B(R), m.value = new Date(R), c.value = R, l.value = ot(R, o.format);
|
|
6187
6142
|
},
|
|
6188
6143
|
{ immediate: !0 }
|
|
6189
6144
|
), Q(
|
|
6190
6145
|
i,
|
|
6191
|
-
async (
|
|
6192
|
-
if (
|
|
6146
|
+
async (R) => {
|
|
6147
|
+
if (R) {
|
|
6193
6148
|
await $e();
|
|
6194
|
-
let
|
|
6195
|
-
if (
|
|
6196
|
-
const
|
|
6197
|
-
|
|
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);
|
|
6198
6153
|
}
|
|
6199
|
-
|
|
6154
|
+
$ && $.focus(), document.addEventListener("keydown", z);
|
|
6200
6155
|
} else document.removeEventListener("keydown", z);
|
|
6201
6156
|
}
|
|
6202
6157
|
);
|
|
6203
|
-
const
|
|
6204
|
-
c.value =
|
|
6205
|
-
},
|
|
6206
|
-
if (!
|
|
6207
|
-
const
|
|
6208
|
-
return c.value && _(
|
|
6209
|
-
}, _ = (
|
|
6210
|
-
|
|
6211
|
-
}, oe = (
|
|
6212
|
-
const
|
|
6213
|
-
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, "");
|
|
6214
6169
|
const q = El(o.format);
|
|
6215
|
-
|
|
6216
|
-
const
|
|
6217
|
-
l.value =
|
|
6218
|
-
let
|
|
6219
|
-
for (let
|
|
6220
|
-
if (/\d/.test(
|
|
6221
|
-
|
|
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;
|
|
6222
6177
|
break;
|
|
6223
6178
|
}
|
|
6224
|
-
requestAnimationFrame(() =>
|
|
6225
|
-
const Y = Bt(
|
|
6179
|
+
requestAnimationFrame(() => $.setSelectionRange(k, k));
|
|
6180
|
+
const Y = Bt(H, o.format);
|
|
6226
6181
|
Y && (c.value = Y, t.value = Y);
|
|
6227
6182
|
}, ue = () => {
|
|
6228
6183
|
i.value || (i.value = !0, a("update:open", !0));
|
|
6229
|
-
}, re = (
|
|
6230
|
-
s.value && (s.value.contains(
|
|
6184
|
+
}, re = (R) => {
|
|
6185
|
+
s.value && (s.value.contains(R.target) || (i.value = !1, a("update:open", !1)));
|
|
6231
6186
|
}, F = () => {
|
|
6232
|
-
const
|
|
6233
|
-
!
|
|
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));
|
|
6234
6189
|
};
|
|
6235
|
-
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", {
|
|
6236
6191
|
ref_key: "root",
|
|
6237
6192
|
ref: s,
|
|
6238
|
-
class: fe(["dp", { required: Object.keys(
|
|
6193
|
+
class: fe(["dp", { required: Object.keys(R.$attrs).includes("required"), error: e.invalid }])
|
|
6239
6194
|
}, [
|
|
6240
|
-
|
|
6195
|
+
M("label", {
|
|
6241
6196
|
for: e.id,
|
|
6242
6197
|
class: "label"
|
|
6243
6198
|
}, K(e.label), 9, Rl),
|
|
6244
|
-
|
|
6199
|
+
M("input", {
|
|
6245
6200
|
id: e.id,
|
|
6246
6201
|
class: "dp-input",
|
|
6247
6202
|
value: l.value,
|
|
@@ -6249,7 +6204,7 @@ const Al = (e, n) => {
|
|
|
6249
6204
|
onInput: oe,
|
|
6250
6205
|
onKeydown: P,
|
|
6251
6206
|
onMousedown: ue,
|
|
6252
|
-
required: Object.keys(
|
|
6207
|
+
required: Object.keys(R.$attrs).includes("required") || void 0,
|
|
6253
6208
|
"aria-invalid": !c.value && l.value !== "",
|
|
6254
6209
|
disabled: e.disabled ? !0 : void 0,
|
|
6255
6210
|
"data-disabled": e.disabled ? !0 : void 0,
|
|
@@ -6269,57 +6224,57 @@ const Al = (e, n) => {
|
|
|
6269
6224
|
]),
|
|
6270
6225
|
_: 1
|
|
6271
6226
|
}, 8, ["disabled"]),
|
|
6272
|
-
|
|
6227
|
+
$[3] || ($[3] = M("small", {
|
|
6273
6228
|
id: "time-help",
|
|
6274
6229
|
class: "sr-only"
|
|
6275
6230
|
}, "After selecting a date, adjust hours and minutes", -1)),
|
|
6276
|
-
i.value ? (
|
|
6277
|
-
|
|
6278
|
-
|
|
6231
|
+
i.value ? (f(), b("div", Tl, [
|
|
6232
|
+
M("header", Dl, [
|
|
6233
|
+
M("button", {
|
|
6279
6234
|
type: "button",
|
|
6280
|
-
onClick:
|
|
6281
|
-
(...
|
|
6235
|
+
onClick: $[0] || ($[0] = //@ts-ignore
|
|
6236
|
+
(...V) => N(x) && N(x)(...V)),
|
|
6282
6237
|
class: "btn__prev_month",
|
|
6283
6238
|
"aria-label": "Previous month"
|
|
6284
6239
|
}, "‹"),
|
|
6285
|
-
|
|
6286
|
-
|
|
6240
|
+
M("span", Zl, K(N(u)), 1),
|
|
6241
|
+
M("button", {
|
|
6287
6242
|
type: "button",
|
|
6288
|
-
onClick:
|
|
6289
|
-
(...
|
|
6243
|
+
onClick: $[1] || ($[1] = //@ts-ignore
|
|
6244
|
+
(...V) => N(h) && N(h)(...V)),
|
|
6290
6245
|
class: "btn__next_month",
|
|
6291
6246
|
"aria-label": "Next month"
|
|
6292
6247
|
}, "›")
|
|
6293
6248
|
]),
|
|
6294
|
-
|
|
6295
|
-
(
|
|
6249
|
+
M("div", zl, [
|
|
6250
|
+
(f(!0), b(de, null, he(N(d), (V) => (f(), b("span", {
|
|
6296
6251
|
class: "week-day__name",
|
|
6297
|
-
key:
|
|
6298
|
-
}, K(
|
|
6252
|
+
key: V
|
|
6253
|
+
}, K(V), 1))), 128))
|
|
6299
6254
|
]),
|
|
6300
|
-
|
|
6301
|
-
(
|
|
6255
|
+
M("div", Nl, [
|
|
6256
|
+
(f(!0), b(de, null, he(N(C), (V, g) => (f(), b("button", {
|
|
6302
6257
|
key: g,
|
|
6303
6258
|
type: "button",
|
|
6304
6259
|
role: "gridcell",
|
|
6305
|
-
class: fe(["btn__day",
|
|
6306
|
-
disabled: !
|
|
6307
|
-
"aria-pressed":
|
|
6308
|
-
"data-selected":
|
|
6309
|
-
onMousedown: se((D) =>
|
|
6310
|
-
"aria-label":
|
|
6311
|
-
}, 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))
|
|
6312
6267
|
]),
|
|
6313
6268
|
U(Le, {
|
|
6314
6269
|
class: "btn-ghost btn-sm",
|
|
6315
|
-
onClick:
|
|
6270
|
+
onClick: $[2] || ($[2] = (V) => t.value = /* @__PURE__ */ new Date())
|
|
6316
6271
|
}, {
|
|
6317
6272
|
default: J(() => [
|
|
6318
6273
|
Me(K(e.todayLabel), 1)
|
|
6319
6274
|
]),
|
|
6320
6275
|
_: 1
|
|
6321
6276
|
}),
|
|
6322
|
-
G(
|
|
6277
|
+
G(R.$slots, "time", {}, void 0, !0)
|
|
6323
6278
|
])) : O("", !0)
|
|
6324
6279
|
], 2));
|
|
6325
6280
|
}
|
|
@@ -6348,51 +6303,51 @@ const Al = (e, n) => {
|
|
|
6348
6303
|
}),
|
|
6349
6304
|
emits: ["update:modelValue"],
|
|
6350
6305
|
setup(e) {
|
|
6351
|
-
const n = ke(e, "modelValue"), t = e, a = ge(), o =
|
|
6352
|
-
Q(n, (
|
|
6353
|
-
if (
|
|
6354
|
-
const
|
|
6355
|
-
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();
|
|
6356
6311
|
} else
|
|
6357
|
-
c.value = null, u.value = 0,
|
|
6358
|
-
}, { immediate: !0 }), Q(c, (
|
|
6359
|
-
if (
|
|
6360
|
-
const
|
|
6361
|
-
|
|
6362
|
-
}, { 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], () => {
|
|
6363
6318
|
if (!c.value) {
|
|
6364
6319
|
n.value = null;
|
|
6365
6320
|
return;
|
|
6366
6321
|
}
|
|
6367
|
-
const
|
|
6368
|
-
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);
|
|
6369
6324
|
});
|
|
6370
|
-
const
|
|
6371
|
-
i.value && (i.value.contains(
|
|
6372
|
-
},
|
|
6373
|
-
const
|
|
6374
|
-
isNaN(
|
|
6375
|
-
},
|
|
6376
|
-
const
|
|
6377
|
-
isNaN(
|
|
6378
|
-
},
|
|
6379
|
-
const
|
|
6380
|
-
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;
|
|
6381
6336
|
};
|
|
6382
6337
|
return ve(() => {
|
|
6383
|
-
document.addEventListener("mousedown",
|
|
6338
|
+
document.addEventListener("mousedown", C);
|
|
6384
6339
|
}), Se(() => {
|
|
6385
|
-
document.removeEventListener("mousedown",
|
|
6386
|
-
}), (
|
|
6340
|
+
document.removeEventListener("mousedown", C);
|
|
6341
|
+
}), (S, L) => (f(), b("div", {
|
|
6387
6342
|
class: "dtp",
|
|
6388
6343
|
ref_key: "root",
|
|
6389
6344
|
ref: i
|
|
6390
6345
|
}, [
|
|
6391
|
-
U(Fl, be(
|
|
6346
|
+
U(Fl, be(S.$attrs, {
|
|
6392
6347
|
modelValue: c.value,
|
|
6393
|
-
"onUpdate:modelValue":
|
|
6348
|
+
"onUpdate:modelValue": L[3] || (L[3] = (_) => c.value = _),
|
|
6394
6349
|
open: o.value,
|
|
6395
|
-
"onUpdate:open":
|
|
6350
|
+
"onUpdate:open": L[4] || (L[4] = (_) => o.value = _),
|
|
6396
6351
|
id: t.id,
|
|
6397
6352
|
invalid: e.invalid,
|
|
6398
6353
|
locale: e.locale,
|
|
@@ -6402,19 +6357,19 @@ const Al = (e, n) => {
|
|
|
6402
6357
|
placeholder: e.placeholder
|
|
6403
6358
|
}), {
|
|
6404
6359
|
time: J(() => [
|
|
6405
|
-
o.value ? (
|
|
6406
|
-
r.value ? _e((
|
|
6360
|
+
o.value ? (f(), b("div", Pl, [
|
|
6361
|
+
r.value ? _e((f(), b("input", {
|
|
6407
6362
|
key: 0,
|
|
6408
6363
|
id: `hour_${N(a)}`,
|
|
6409
6364
|
type: "number",
|
|
6410
|
-
"onUpdate:modelValue":
|
|
6365
|
+
"onUpdate:modelValue": L[0] || (L[0] = (_) => u.value = _),
|
|
6411
6366
|
min: "0",
|
|
6412
6367
|
max: "23",
|
|
6413
6368
|
"aria-label": "Hour",
|
|
6414
6369
|
"aria-valuemin": "0",
|
|
6415
6370
|
"aria-valuemax": "23",
|
|
6416
6371
|
"aria-valuenow": u.value,
|
|
6417
|
-
onInput:
|
|
6372
|
+
onInput: h
|
|
6418
6373
|
}, null, 40, Ul)), [
|
|
6419
6374
|
[
|
|
6420
6375
|
Ye,
|
|
@@ -6423,44 +6378,44 @@ const Al = (e, n) => {
|
|
|
6423
6378
|
{ number: !0 }
|
|
6424
6379
|
]
|
|
6425
6380
|
]) : O("", !0),
|
|
6426
|
-
r.value && l.value ? (
|
|
6427
|
-
l.value ? _e((
|
|
6381
|
+
r.value && l.value ? (f(), b("span", Kl, ":")) : O("", !0),
|
|
6382
|
+
l.value ? _e((f(), b("input", {
|
|
6428
6383
|
key: 2,
|
|
6429
6384
|
id: `minute_${N(a)}`,
|
|
6430
6385
|
type: "number",
|
|
6431
|
-
"onUpdate:modelValue":
|
|
6386
|
+
"onUpdate:modelValue": L[1] || (L[1] = (_) => d.value = _),
|
|
6432
6387
|
min: "0",
|
|
6433
6388
|
max: "59",
|
|
6434
6389
|
"aria-label": "Minute",
|
|
6435
6390
|
"aria-valuemin": "0",
|
|
6436
6391
|
"aria-valuemax": "59",
|
|
6437
|
-
"aria-valuenow":
|
|
6438
|
-
onInput:
|
|
6392
|
+
"aria-valuenow": d.value,
|
|
6393
|
+
onInput: x
|
|
6439
6394
|
}, null, 40, jl)), [
|
|
6440
6395
|
[
|
|
6441
6396
|
Ye,
|
|
6442
|
-
|
|
6397
|
+
d.value,
|
|
6443
6398
|
void 0,
|
|
6444
6399
|
{ number: !0 }
|
|
6445
6400
|
]
|
|
6446
6401
|
]) : O("", !0),
|
|
6447
|
-
(r.value || l.value) && s.value ? (
|
|
6448
|
-
s.value ? _e((
|
|
6402
|
+
(r.value || l.value) && s.value ? (f(), b("span", Wl, ":")) : O("", !0),
|
|
6403
|
+
s.value ? _e((f(), b("input", {
|
|
6449
6404
|
key: 4,
|
|
6450
6405
|
id: `second_${N(a)}`,
|
|
6451
6406
|
type: "number",
|
|
6452
|
-
"onUpdate:modelValue":
|
|
6407
|
+
"onUpdate:modelValue": L[2] || (L[2] = (_) => m.value = _),
|
|
6453
6408
|
min: "0",
|
|
6454
6409
|
max: "59",
|
|
6455
6410
|
"aria-label": "Second",
|
|
6456
6411
|
"aria-valuemin": "0",
|
|
6457
6412
|
"aria-valuemax": "59",
|
|
6458
|
-
"aria-valuenow":
|
|
6459
|
-
onInput:
|
|
6413
|
+
"aria-valuenow": m.value,
|
|
6414
|
+
onInput: B
|
|
6460
6415
|
}, null, 40, Yl)), [
|
|
6461
6416
|
[
|
|
6462
6417
|
Ye,
|
|
6463
|
-
|
|
6418
|
+
m.value,
|
|
6464
6419
|
void 0,
|
|
6465
6420
|
{ number: !0 }
|
|
6466
6421
|
]
|
|
@@ -6502,7 +6457,7 @@ const Al = (e, n) => {
|
|
|
6502
6457
|
if (!s.sortable) return;
|
|
6503
6458
|
const c = e.sort?.key === s.key && e.sort.direction === "asc" ? "desc" : "asc";
|
|
6504
6459
|
n("update:sort", { key: s.key, direction: c });
|
|
6505
|
-
}, 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(
|
|
6506
6461
|
"div",
|
|
6507
6462
|
{
|
|
6508
6463
|
class: "rs-table-mobile",
|
|
@@ -6685,23 +6640,23 @@ const Al = (e, n) => {
|
|
|
6685
6640
|
}
|
|
6686
6641
|
},
|
|
6687
6642
|
setup(e, { slots: n }) {
|
|
6688
|
-
const t =
|
|
6689
|
-
if (a.value.has(
|
|
6690
|
-
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);
|
|
6691
6646
|
return;
|
|
6692
6647
|
}
|
|
6693
|
-
e.multiple || a.value.clear(), a.value.add(
|
|
6694
|
-
}, i = (
|
|
6695
|
-
|
|
6696
|
-
}, r = (
|
|
6697
|
-
const
|
|
6698
|
-
t.value[(
|
|
6699
|
-
}, s = (
|
|
6700
|
-
const
|
|
6701
|
-
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();
|
|
6702
6657
|
}, c = () => t.value[0]?.focus(), u = () => {
|
|
6703
|
-
const
|
|
6704
|
-
|
|
6658
|
+
const d = t.value;
|
|
6659
|
+
d.length && d[d.length - 1]?.focus();
|
|
6705
6660
|
};
|
|
6706
6661
|
return He(Qe, {
|
|
6707
6662
|
multiple: e.multiple,
|
|
@@ -6722,9 +6677,9 @@ const Al = (e, n) => {
|
|
|
6722
6677
|
disabled: { type: Boolean, default: !1 }
|
|
6723
6678
|
},
|
|
6724
6679
|
setup(e, { slots: n }) {
|
|
6725
|
-
const t =
|
|
6680
|
+
const t = me(Qe);
|
|
6726
6681
|
if (!t) throw new Error("AccordionItem must be used inside Accordion");
|
|
6727
|
-
const a =
|
|
6682
|
+
const a = A(() => t.openItems.value.has(e.id));
|
|
6728
6683
|
return () => j(
|
|
6729
6684
|
"div",
|
|
6730
6685
|
{
|
|
@@ -6741,9 +6696,9 @@ const Al = (e, n) => {
|
|
|
6741
6696
|
disabled: { type: Boolean, default: !1 }
|
|
6742
6697
|
},
|
|
6743
6698
|
setup(e, { slots: n }) {
|
|
6744
|
-
const t =
|
|
6699
|
+
const t = me(Qe), a = w(null);
|
|
6745
6700
|
if (!t) throw new Error("AccordionHeader must be used inside Accordion");
|
|
6746
|
-
const o =
|
|
6701
|
+
const o = A(() => t.openItems.value.has(e.id)), i = () => {
|
|
6747
6702
|
e.disabled || t.toggle?.(e.id);
|
|
6748
6703
|
}, r = (l) => {
|
|
6749
6704
|
if (a.value)
|
|
@@ -6800,9 +6755,9 @@ const Al = (e, n) => {
|
|
|
6800
6755
|
id: { type: String, required: !0 }
|
|
6801
6756
|
},
|
|
6802
6757
|
setup(e, { slots: n }) {
|
|
6803
|
-
const t =
|
|
6758
|
+
const t = me(Qe);
|
|
6804
6759
|
if (!t) throw new Error("AccordionPanel must be used inside Accordion");
|
|
6805
|
-
const a =
|
|
6760
|
+
const a = A(() => t.openItems.value.has(e.id));
|
|
6806
6761
|
return () => j(
|
|
6807
6762
|
"div",
|
|
6808
6763
|
{
|
|
@@ -6832,8 +6787,8 @@ export {
|
|
|
6832
6787
|
Le as Button,
|
|
6833
6788
|
kt as ButtonMenu,
|
|
6834
6789
|
vr as Card,
|
|
6835
|
-
|
|
6836
|
-
|
|
6790
|
+
pr as CardBody,
|
|
6791
|
+
mr as CardFooter,
|
|
6837
6792
|
fr as CardHeader,
|
|
6838
6793
|
br as Carousel,
|
|
6839
6794
|
kr as CarouselItem,
|
|
@@ -6877,7 +6832,7 @@ export {
|
|
|
6877
6832
|
yr as TimelineItem,
|
|
6878
6833
|
cr as ToastPlugin,
|
|
6879
6834
|
xt as ToastViewport,
|
|
6880
|
-
|
|
6835
|
+
mt as Toggle,
|
|
6881
6836
|
bt as Tooltip,
|
|
6882
6837
|
yt as Upload,
|
|
6883
6838
|
qe as confirm,
|