@reinosoft-ui/core 0.1.62 → 0.1.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { defineComponent as Z, ref as w, computed as H, watch as J, onMounted as se, createElementBlock as g, openBlock as f, normalizeStyle as Le, normalizeClass as ue, renderSlot as X, createCommentVNode as N, withDirectives as Ve, createElementVNode as L, vShow as et, mergeProps as ge, mergeModels as oe, useModel as he, withKeys as Ce, withModifiers as ie, onUnmounted as $e, Fragment as re, unref as E, toDisplayString as K, renderList as ve, nextTick as Me, onBeforeUnmount as _e, createBlock as ee, Teleport as Ze, createVNode as j, Transition as Se, withCtx as Q, useId as fe, provide as xe, createTextVNode as be, resolveDynamicComponent as Re, useAttrs as tt, inject as de, h as U, useSlots as at, resolveComponent as Dt, vModelRadio as _t, vModelDynamic as St, reactive as bt, TransitionGroup as Rt, createApp as Tt, shallowRef as Et, vModelText as Ue } from "vue";
1
+ import { defineComponent as Z, ref as w, computed as V, watch as J, onMounted as se, createElementBlock as b, openBlock as f, normalizeStyle as Le, normalizeClass as ue, renderSlot as X, createCommentVNode as N, withDirectives as Ve, createElementVNode as L, vShow as et, mergeProps as ge, mergeModels as oe, useModel as he, withKeys as Ce, withModifiers as ie, onUnmounted as $e, Fragment as re, unref as E, toDisplayString as K, renderList as ve, nextTick as Me, onBeforeUnmount as _e, createBlock as ee, Teleport as Ze, createVNode as j, Transition as Se, withCtx as Q, useId as fe, provide as xe, createTextVNode as be, resolveDynamicComponent as Re, useAttrs as tt, inject as de, h as U, useSlots as at, resolveComponent as Dt, vModelRadio as _t, vModelDynamic as St, reactive as bt, TransitionGroup as Rt, createApp as Tt, shallowRef as Et, vModelText as Ue } from "vue";
2
2
  import { routerKey as Zt } from "vue-router";
3
- const zt = ["aria-busy"], Ot = ["aria-label"], qt = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], Ft = /* @__PURE__ */ Z({
3
+ const zt = ["aria-busy"], qt = ["aria-label"], Ot = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], Ft = /* @__PURE__ */ Z({
4
4
  __name: "Image",
5
5
  props: {
6
6
  src: {},
@@ -16,47 +16,47 @@ const zt = ["aria-busy"], Ot = ["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 = w(t.src), u = w(), r = w("loading"), i = H(() => t.ratio ? {
19
+ const t = e, a = n, o = w(t.src), i = w(), l = w("loading"), r = V(() => t.ratio ? {
20
20
  aspectRatio: typeof t.ratio == "number" ? `${t.ratio}` : t.ratio
21
21
  } : void 0), s = () => {
22
- r.value = "loaded", a("loaded");
22
+ l.value = "loaded", a("loaded");
23
23
  }, d = () => {
24
24
  if (t.fallbackSrc && o.value !== t.fallbackSrc) {
25
- o.value = t.fallbackSrc, r.value = "loading";
25
+ o.value = t.fallbackSrc, l.value = "loading";
26
26
  return;
27
27
  }
28
- r.value = "error", a("error");
28
+ l.value = "error", a("error");
29
29
  };
30
30
  return J(
31
31
  () => t.src,
32
- (l) => {
33
- o.value = l, r.value = "loading";
32
+ (u) => {
33
+ o.value = u, l.value = "loading";
34
34
  }
35
- ), se(() => u.value?.complete && u.value.naturalWidth > 0 && (r.value = "loaded")), (l, p) => (f(), g("div", {
35
+ ), se(() => i.value?.complete && i.value.naturalWidth > 0 && (l.value = "loaded")), (u, h) => (f(), b("div", {
36
36
  class: ue(["ui-image", {
37
- "is-loading": r.value === "loading",
38
- "is-error": r.value === "error",
39
- "is-loaded": r.value === "loaded",
37
+ "is-loading": l.value === "loading",
38
+ "is-error": l.value === "error",
39
+ "is-loaded": l.value === "loaded",
40
40
  transform: e.transform
41
41
  }]),
42
- style: Le(i.value),
43
- "aria-busy": r.value === "loading" || void 0
42
+ style: Le(r.value),
43
+ "aria-busy": l.value === "loading" || void 0
44
44
  }, [
45
- r.value === "loading" ? X(l.$slots, "placeholder", { key: 0 }, () => [
46
- p[0] || (p[0] = L("div", {
45
+ l.value === "loading" ? X(u.$slots, "placeholder", { key: 0 }, () => [
46
+ h[0] || (h[0] = L("div", {
47
47
  class: "ui-image__placeholder",
48
48
  "aria-hidden": "true"
49
49
  }, null, -1))
50
- ], !0) : r.value === "error" ? X(l.$slots, "fallback", { key: 1 }, () => [
50
+ ], !0) : l.value === "error" ? X(u.$slots, "fallback", { key: 1 }, () => [
51
51
  L("div", {
52
52
  class: "ui-image__fallback",
53
53
  role: "img",
54
54
  "aria-label": e.decorative ? void 0 : e.alt
55
- }, "Image not available", 8, Ot)
55
+ }, "Image not available", 8, qt)
56
56
  ], !0) : N("", !0),
57
57
  Ve(L("img", {
58
58
  ref_key: "imgRef",
59
- ref: u,
59
+ ref: i,
60
60
  class: "ui-image__img",
61
61
  src: o.value,
62
62
  srcset: e.srcset,
@@ -67,8 +67,8 @@ const zt = ["aria-busy"], Ot = ["aria-label"], qt = ["src", "srcset", "sizes", "
67
67
  decoding: e.decoding,
68
68
  onLoad: s,
69
69
  onError: d
70
- }, null, 40, qt), [
71
- [et, r.value !== "error"]
70
+ }, null, 40, Ot), [
71
+ [et, l.value !== "error"]
72
72
  ])
73
73
  ], 14, zt));
74
74
  }
@@ -87,7 +87,7 @@ const Nt = /* @__PURE__ */ Z({
87
87
  const t = w();
88
88
  return n({
89
89
  el: t
90
- }), (a, o) => (f(), g("button", ge({
90
+ }), (a, o) => (f(), b("button", ge({
91
91
  ref_key: "rootRef",
92
92
  ref: t,
93
93
  type: "button",
@@ -111,23 +111,23 @@ const Pt = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], Kt
111
111
  }),
112
112
  emits: /* @__PURE__ */ oe(["change"], ["update:modelValue"]),
113
113
  setup(e, { emit: n }) {
114
- const t = he(e, "modelValue"), a = n, o = e, u = H(() => t.value), r = () => {
114
+ const t = he(e, "modelValue"), a = n, o = e, i = V(() => t.value), l = () => {
115
115
  if (o.disabled) return;
116
- const i = !t.value;
117
- t.value = i, a("change", i);
116
+ const r = !t.value;
117
+ t.value = r, a("change", r);
118
118
  };
119
- return (i, s) => (f(), g("button", {
119
+ return (r, s) => (f(), b("button", {
120
120
  id: e.id,
121
121
  role: "switch",
122
122
  type: "button",
123
- class: ue(["ui-toggle", { "ui-toggle--checked": u.value, "ui-toggle--disabled": e.disabled }]),
124
- "aria-checked": u.value,
123
+ class: ue(["ui-toggle", { "ui-toggle--checked": i.value, "ui-toggle--disabled": e.disabled }]),
124
+ "aria-checked": i.value,
125
125
  "aria-disabled": e.disabled || void 0,
126
126
  disabled: e.disabled || void 0,
127
- onClick: r,
127
+ onClick: l,
128
128
  onKeydown: [
129
- Ce(ie(r, ["prevent"]), ["space"]),
130
- Ce(ie(r, ["prevent"]), ["enter"])
129
+ Ce(ie(l, ["prevent"]), ["space"]),
130
+ Ce(ie(l, ["prevent"]), ["enter"])
131
131
  ]
132
132
  }, [...s[0] || (s[0] = [
133
133
  L("span", { class: "ui-toggle__track" }, [
@@ -169,16 +169,16 @@ const kt = (e) => {
169
169
  if (!t || t.rangeCount === 0) return;
170
170
  const a = t.getRangeAt(0), o = kt(a.startContainer);
171
171
  if (!o) return;
172
- const r = Wt("p");
172
+ const l = Wt("p");
173
173
  document.createRange().selectNodeContents(o);
174
174
  const s = a.cloneRange(), d = document.createRange();
175
175
  d.selectNodeContents(o), d.setEnd(s.startContainer, s.startOffset);
176
- const l = d.cloneContents(), p = document.createRange();
177
- p.selectNodeContents(o), p.setStart(s.startContainer, s.startOffset);
178
- const m = p.cloneContents();
179
- o.innerHTML = "", o.appendChild(l), o.innerHTML === "" && (o.innerHTML = "<br>"), r.innerHTML = "", r.appendChild(m), r.innerHTML === "" && (r.innerHTML = "<br>"), o.after(r);
180
- const b = document.createRange();
181
- b.setStart(r, 0), b.collapse(!0), t.removeAllRanges(), t.addRange(b), n?.normalize();
176
+ const u = d.cloneContents(), h = document.createRange();
177
+ h.selectNodeContents(o), h.setStart(s.startContainer, s.startOffset);
178
+ const p = h.cloneContents();
179
+ o.innerHTML = "", o.appendChild(u), o.innerHTML === "" && (o.innerHTML = "<br>"), l.innerHTML = "", l.appendChild(p), l.innerHTML === "" && (l.innerHTML = "<br>"), o.after(l);
180
+ const m = document.createRange();
181
+ m.setStart(l, 0), m.collapse(!0), t.removeAllRanges(), t.addRange(m), n?.normalize();
182
182
  }, Gt = () => {
183
183
  const e = window.getSelection();
184
184
  if (!e || e.rangeCount === 0) return;
@@ -189,33 +189,33 @@ const kt = (e) => {
189
189
  if (!n || n.rangeCount === 0) return;
190
190
  const t = n.getRangeAt(0), a = kt(t.startContainer);
191
191
  if (!a || !(a.textContent === "" || a.innerHTML === "<br>")) return;
192
- const u = a.previousElementSibling, r = a.nextElementSibling;
193
- if (e.preventDefault(), !u && !r) {
192
+ const i = a.previousElementSibling, l = a.nextElementSibling;
193
+ if (e.preventDefault(), !i && !l) {
194
194
  a.innerHTML = "<br>", it(a);
195
195
  return;
196
196
  }
197
- u && u.dataset.block !== void 0 ? (a.remove(), Jt(u)) : r && r.dataset.block !== void 0 && (a.remove(), it(r));
197
+ i && i.dataset.block !== void 0 ? (a.remove(), Jt(i)) : l && l.dataset.block !== void 0 && (a.remove(), it(l));
198
198
  }, Jt = (e) => {
199
199
  const n = document.createRange(), t = window.getSelection();
200
200
  n.selectNodeContents(e), n.collapse(!1), t?.removeAllRanges(), t?.addRange(n);
201
201
  }, Qt = (e, n) => {
202
202
  const t = w(null), a = n?.buttons ?? [], o = n?.uploadImage;
203
- let u = w(null);
204
- const r = () => {
203
+ let i = w(null);
204
+ const l = () => {
205
205
  const c = e;
206
206
  if (!c) return;
207
207
  const v = window.getSelection();
208
208
  if (!v || v.rangeCount === 0) return;
209
- const h = v.getRangeAt(0);
210
- c.contains(h.commonAncestorContainer) && (t.value = h.cloneRange());
211
- }, i = (c) => {
209
+ const y = v.getRangeAt(0);
210
+ c.contains(y.commonAncestorContainer) && (t.value = y.cloneRange());
211
+ }, r = (c) => {
212
212
  const v = window.getSelection();
213
213
  if (!v || v.rangeCount === 0 || v.isCollapsed) return !1;
214
- const h = v.getRangeAt(0), x = e;
214
+ const y = v.getRangeAt(0), x = e;
215
215
  if (!x) return !1;
216
- const T = s(h, x), Y = [];
216
+ const T = s(y, x), Y = [];
217
217
  if (T.forEach((z) => {
218
- const P = z === h.startContainer ? h.startOffset : 0, le = z === h.endContainer ? h.endOffset : z.textContent.length;
218
+ const P = z === y.startContainer ? y.startOffset : 0, le = z === y.endContainer ? y.endOffset : z.textContent.length;
219
219
  if (P === le) return;
220
220
  let ne;
221
221
  P === 0 && le === z.textContent.length ? ne = z : (ne = z.splitText(P), le - P < ne.textContent.length && ne.splitText(le - P));
@@ -230,12 +230,12 @@ const kt = (e) => {
230
230
  const z = document.createRange();
231
231
  z.setStart(Y[0], 0);
232
232
  const P = Y[Y.length - 1];
233
- z.setEnd(P, P.textContent.length), v.removeAllRanges(), v.addRange(z), r();
233
+ z.setEnd(P, P.textContent.length), v.removeAllRanges(), v.addRange(z), l();
234
234
  }
235
- return y(), k(c);
235
+ return C(), M(c);
236
236
  }, s = (c, v) => {
237
237
  if (!c || !v || !(v instanceof HTMLElement)) return [];
238
- const h = c.commonAncestorContainer, x = v.contains(h) ? v : h.nodeType === 3 ? h.parentNode : h, T = document.createTreeWalker(
238
+ const y = c.commonAncestorContainer, x = v.contains(y) ? v : y.nodeType === 3 ? y.parentNode : y, T = document.createTreeWalker(
239
239
  x,
240
240
  NodeFilter.SHOW_TEXT,
241
241
  {
@@ -250,14 +250,14 @@ const kt = (e) => {
250
250
  }, d = (c) => {
251
251
  const v = window.getSelection();
252
252
  if (!v || v.rangeCount === 0) return !1;
253
- const h = v.getRangeAt(0), x = l(h.startContainer);
253
+ const y = v.getRangeAt(0), x = u(y.startContainer);
254
254
  if (!x) return !1;
255
255
  const Y = x.tagName.toLowerCase() === c.toLowerCase() ? "p" : c.toLowerCase(), z = document.createElement(Y);
256
256
  for (Y === "blockquote" && z.setAttribute("class", "rs-blockquote"), z.dataset.block = "true"; x.firstChild; ) z.appendChild(x.firstChild);
257
257
  x.replaceWith(z);
258
258
  const P = document.createRange();
259
- return P.selectNodeContents(z), v.removeAllRanges(), v.addRange(P), r(), y(), _(c);
260
- }, l = (c) => {
259
+ return P.selectNodeContents(z), v.removeAllRanges(), v.addRange(P), l(), C(), S(c);
260
+ }, u = (c) => {
261
261
  const v = e;
262
262
  if (!v) return null;
263
263
  for (; c && c !== v; ) {
@@ -265,83 +265,83 @@ const kt = (e) => {
265
265
  c = c.parentNode;
266
266
  }
267
267
  return null;
268
- }, p = (c, v) => {
269
- const h = e;
270
- if (!h) return null;
271
- for (; c && c !== h; ) {
268
+ }, h = (c, v) => {
269
+ const y = e;
270
+ if (!y) return null;
271
+ for (; c && c !== y; ) {
272
272
  if (c instanceof HTMLElement && c.tagName.toLowerCase() === v.toLowerCase()) return c;
273
273
  c = c.parentNode;
274
274
  }
275
275
  return null;
276
- }, m = (c) => {
276
+ }, p = (c) => {
277
277
  if (c.key !== "Enter" || c.shiftKey) return;
278
278
  const v = window.getSelection();
279
279
  if (!v || v.rangeCount === 0) return;
280
- const h = v.getRangeAt(0), x = p(h.startContainer, "li");
280
+ const y = v.getRangeAt(0), x = h(y.startContainer, "li");
281
281
  if (!x) return;
282
282
  c.preventDefault(), c.stopPropagation();
283
283
  const T = x.parentElement;
284
284
  if (!T) return;
285
285
  if (x.textContent?.trim() === "") {
286
286
  const P = document.createElement("p");
287
- P.dataset.block = "true", P.innerHTML = "<br>", T.after(P), x.remove(), T.children.length === 0 && T.remove(), b(P);
287
+ P.dataset.block = "true", P.innerHTML = "<br>", T.after(P), x.remove(), T.children.length === 0 && T.remove(), m(P);
288
288
  return;
289
289
  }
290
290
  const z = document.createElement("li");
291
- z.innerHTML = "<br>", x.after(z), b(z);
292
- }, b = (c) => {
293
- const v = document.createRange(), h = window.getSelection();
294
- v.selectNodeContents(c), v.collapse(!0), h?.removeAllRanges(), h?.addRange(v);
295
- }, y = () => {
291
+ z.innerHTML = "<br>", x.after(z), m(z);
292
+ }, m = (c) => {
293
+ const v = document.createRange(), y = window.getSelection();
294
+ v.selectNodeContents(c), v.collapse(!0), y?.removeAllRanges(), y?.addRange(v);
295
+ }, C = () => {
296
296
  const c = e;
297
297
  if (!c) return;
298
- c.querySelectorAll("p[data-block]").forEach((h) => {
299
- !h.querySelector("iframe") && h.hasAttribute("style") && h.removeAttribute("style");
300
- const T = h.querySelector("p[data-block]");
301
- T && h.replaceWith(T);
298
+ c.querySelectorAll("p[data-block]").forEach((y) => {
299
+ !y.querySelector("iframe") && y.hasAttribute("style") && y.removeAttribute("style");
300
+ const T = y.querySelector("p[data-block]");
301
+ T && y.replaceWith(T);
302
302
  }), c.normalize();
303
- }, k = (c) => {
303
+ }, M = (c) => {
304
304
  const v = t.value;
305
305
  if (!v) return !1;
306
- let h = v.startContainer;
307
- h.nodeType === Node.TEXT_NODE && (h = h.parentNode);
306
+ let y = v.startContainer;
307
+ y.nodeType === Node.TEXT_NODE && (y = y.parentNode);
308
308
  const x = e;
309
309
  if (!x) return !1;
310
- for (; h && h !== x; ) {
311
- if (h instanceof HTMLElement && h.tagName.toLowerCase() === c.toLowerCase()) return !0;
312
- h = h.parentNode;
310
+ for (; y && y !== x; ) {
311
+ if (y instanceof HTMLElement && y.tagName.toLowerCase() === c.toLowerCase()) return !0;
312
+ y = y.parentNode;
313
313
  }
314
314
  return !1;
315
- }, _ = (c) => {
315
+ }, S = (c) => {
316
316
  const v = t.value;
317
317
  if (!v) return !1;
318
- let h = v.startContainer;
319
- h.nodeType === Node.TEXT_NODE && (h = h.parentNode);
318
+ let y = v.startContainer;
319
+ y.nodeType === Node.TEXT_NODE && (y = y.parentNode);
320
320
  const x = e;
321
321
  if (!x) return !1;
322
- for (; h && h !== x; ) {
323
- if (h instanceof HTMLElement && h.dataset.block !== void 0 && h.tagName.toLowerCase() === c.toLowerCase()) return !0;
324
- h = h.parentNode;
322
+ for (; y && y !== x; ) {
323
+ if (y instanceof HTMLElement && y.dataset.block !== void 0 && y.tagName.toLowerCase() === c.toLowerCase()) return !0;
324
+ y = y.parentNode;
325
325
  }
326
326
  return !1;
327
- }, B = () => {
327
+ }, $ = () => {
328
328
  const c = e;
329
329
  c && c.focus();
330
- }, M = () => {
330
+ }, k = () => {
331
331
  const c = e;
332
332
  if (!c || !t.value || !c || !c.contains(t.value.commonAncestorContainer)) return;
333
333
  const v = window.getSelection();
334
334
  v && (v.removeAllRanges(), v.addRange(t.value));
335
- }, I = () => u.value?.focusFirstButton?.(), C = (c) => {
335
+ }, H = () => i.value?.focusFirstButton?.(), g = (c) => {
336
336
  const v = window.getSelection();
337
337
  if (!v || v.rangeCount === 0) return;
338
- const h = v.getRangeAt(0), x = l(h.startContainer);
338
+ const y = v.getRangeAt(0), x = u(y.startContainer);
339
339
  if (!x) return;
340
- const T = h.cloneRange();
341
- T.selectNodeContents(x), T.setEnd(h.startContainer, h.startOffset);
342
- const Y = T.toString().length, z = h.cloneRange();
343
- z.selectNodeContents(x), z.setEnd(h.endContainer, h.endOffset);
344
- const P = z.toString().length, le = h.collapsed, ne = c(x);
340
+ const T = y.cloneRange();
341
+ T.selectNodeContents(x), T.setEnd(y.startContainer, y.startOffset);
342
+ const Y = T.toString().length, z = y.cloneRange();
343
+ z.selectNodeContents(x), z.setEnd(y.endContainer, y.endOffset);
344
+ const P = z.toString().length, le = y.collapsed, ne = c(x);
345
345
  x.replaceWith(ne);
346
346
  const me = document.createTreeWalker(
347
347
  ne,
@@ -354,34 +354,34 @@ const kt = (e) => {
354
354
  !Te && we + Ke >= Y && (Te = Pe, ze = Y - we), !Ie && we + Ke >= P && (Ie = Pe, He = P - we), we += Ke;
355
355
  }
356
356
  const Be = document.createRange();
357
- Te ? Be.setStart(Te, ze) : Be.setStart(ne, 0), !le && Ie ? Be.setEnd(Ie, He) : Be.collapse(!0), v.removeAllRanges(), v.addRange(Be), r(), y();
357
+ Te ? Be.setStart(Te, ze) : Be.setStart(ne, 0), !le && Ie ? Be.setEnd(Ie, He) : Be.collapse(!0), v.removeAllRanges(), v.addRange(Be), l(), C();
358
358
  }, R = (c) => {
359
359
  const v = e.parentElement?.querySelector("#editor-status");
360
360
  v && (v.textContent = c, setTimeout(() => v.textContent = "", 2e3));
361
361
  };
362
- e.addEventListener("keydown", m, { capture: !0 });
362
+ e.addEventListener("keydown", p, { capture: !0 });
363
363
  const F = (c) => {
364
364
  const v = e;
365
365
  if (!v) return;
366
- const h = document.createRange().createContextualFragment(c);
367
- v.appendChild(h), y(), v.dispatchEvent(new Event("input", { bubbles: !0 }));
366
+ const y = document.createRange().createContextualFragment(c);
367
+ v.appendChild(y), C(), v.dispatchEvent(new Event("input", { bubbles: !0 }));
368
368
  }, G = (c) => {
369
369
  const v = window.getSelection();
370
370
  if (!v || v.rangeCount === 0) {
371
371
  F(c);
372
372
  return;
373
373
  }
374
- const h = v.getRangeAt(0), x = l(h.startContainer);
374
+ const y = v.getRangeAt(0), x = u(y.startContainer);
375
375
  if (!x) {
376
376
  F(c);
377
377
  return;
378
378
  }
379
- x.insertAdjacentHTML("afterend", c), y(), e.dispatchEvent(new Event("input", { bubbles: !0 }));
379
+ x.insertAdjacentHTML("afterend", c), C(), e.dispatchEvent(new Event("input", { bubbles: !0 }));
380
380
  }, D = (c) => {
381
381
  te(
382
382
  `<img src="${c}" alt="" loading="lazy">`
383
383
  );
384
- }, S = (c) => {
384
+ }, _ = (c) => {
385
385
  G(`
386
386
  <p data-block>
387
387
  <img src="${c}" alt="">
@@ -390,12 +390,12 @@ const kt = (e) => {
390
390
  }, A = (c) => {
391
391
  const v = document.createElement("span");
392
392
  v.classList.add("img-resizable"), c.parentNode?.insertBefore(v, c), v.appendChild(c);
393
- let h = v.querySelector(".resize-handle");
394
- h || (h = document.createElement("span"), h.classList.add("resize-handle"), v.appendChild(h)), v.style.display = "inline-block", v.style.position = "relative", v.style.width = "100%", c.style.display = "block", c.style.width = "100%", h.style.display = "none";
393
+ let y = v.querySelector(".resize-handle");
394
+ y || (y = document.createElement("span"), y.classList.add("resize-handle"), v.appendChild(y)), v.style.display = "inline-block", v.style.position = "relative", v.style.width = "100%", c.style.display = "block", c.style.width = "100%", y.style.display = "none";
395
395
  const x = () => {
396
- v.classList.add("active"), h.style.display = "block";
396
+ v.classList.add("active"), y.style.display = "block";
397
397
  }, T = () => {
398
- v.classList.remove("active"), h.style.display = "none";
398
+ v.classList.remove("active"), y.style.display = "none";
399
399
  };
400
400
  c.addEventListener("click", (le) => {
401
401
  le.stopPropagation(), e.querySelectorAll(".img-resizable.selected").forEach((ne) => ne.classList.remove("selected")), v.classList.add("selected"), x();
@@ -417,31 +417,31 @@ const kt = (e) => {
417
417
  };
418
418
  document.addEventListener("mousemove", ne), document.addEventListener("mouseup", me), document.addEventListener("touchmove", ne, { passive: !1 }), document.addEventListener("touchend", me);
419
419
  };
420
- h.addEventListener("mousedown", P), h.addEventListener("touchstart", P, { passive: !1 });
420
+ y.addEventListener("mousedown", P), y.addEventListener("touchstart", P, { passive: !1 });
421
421
  };
422
422
  e.addEventListener("click", (c) => {
423
423
  const v = c.target.closest(".editor img");
424
424
  v && A(v);
425
425
  });
426
- const $ = (c) => {
426
+ const I = (c) => {
427
427
  if (c.key !== "Backspace" && c.key !== "Delete") return;
428
428
  const v = e.querySelector(".img-resizable.selected");
429
429
  if (!v) return;
430
430
  c.preventDefault();
431
- const h = v.closest("p[data-block]");
432
- h && (v.remove(), h.replaceChildren(document.createElement("br")), b(h));
431
+ const y = v.closest("p[data-block]");
432
+ y && (v.remove(), y.replaceChildren(document.createElement("br")), m(y));
433
433
  };
434
- e.addEventListener("keydown", $, { capture: !0 });
435
- const V = (c) => {
434
+ e.addEventListener("keydown", I, { capture: !0 });
435
+ const B = (c) => {
436
436
  const v = c.match(
437
437
  /(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
438
438
  );
439
439
  if (!v) return;
440
- const h = v[1];
440
+ const y = v[1];
441
441
  te(
442
442
  `
443
443
  <iframe
444
- src="https://www.youtube.com/embed/${h}?autoplay=0&mute=0&controls=0&showinfo=0&rel=0&iv_load_policy=3&modestbranding=1&enablejsapi=1&playsinline=1"
444
+ src="https://www.youtube.com/embed/${y}?autoplay=0&mute=0&controls=0&showinfo=0&rel=0&iv_load_policy=3&modestbranding=1&enablejsapi=1&playsinline=1"
445
445
  frameborder="0"
446
446
  allowfullscreen
447
447
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
@@ -457,22 +457,22 @@ const kt = (e) => {
457
457
  aspectRatio: "16/9"
458
458
  }
459
459
  );
460
- }, O = (c) => {
460
+ }, q = (c) => {
461
461
  if (c.key !== "Backspace" && c.key !== "Delete") return;
462
462
  const v = window.getSelection();
463
463
  if (!v || v.rangeCount === 0) return;
464
- const h = v.getRangeAt(0), x = l(h.startContainer);
464
+ const y = v.getRangeAt(0), x = u(y.startContainer);
465
465
  if (!x) return;
466
466
  const T = x.querySelector("iframe");
467
- T && (c.preventDefault(), c.stopPropagation(), T.remove(), x.removeAttribute("style"), x.replaceChildren(document.createElement("br")), b(x));
467
+ T && (c.preventDefault(), c.stopPropagation(), T.remove(), x.removeAttribute("style"), x.replaceChildren(document.createElement("br")), m(x));
468
468
  }, te = (c, v) => {
469
- const h = e;
470
- if (!h) return;
469
+ const y = e;
470
+ if (!y) return;
471
471
  const x = window.getSelection();
472
472
  let T = null;
473
473
  if (x && x.rangeCount > 0) {
474
474
  const P = x.getRangeAt(0);
475
- T = l(P.startContainer);
475
+ T = u(P.startContainer);
476
476
  }
477
477
  const Y = T && !T.textContent?.trim() && T.querySelectorAll("img, iframe").length === 0;
478
478
  let z = null;
@@ -482,9 +482,9 @@ const kt = (e) => {
482
482
  const P = document.createElement("p");
483
483
  P.dataset.block = "true", v && Object.assign(P.style, v), P.innerHTML = c;
484
484
  const le = document.createElement("p");
485
- le.dataset.block = "true", le.replaceChildren(document.createElement("br")), T ? (T.after(P), P.after(le)) : h.append(P, le), z = le;
485
+ le.dataset.block = "true", le.replaceChildren(document.createElement("br")), T ? (T.after(P), P.after(le)) : y.append(P, le), z = le;
486
486
  }
487
- z && b(z), y(), h.dispatchEvent(new Event("input", { bubbles: !0 }));
487
+ z && m(z), C(), y.dispatchEvent(new Event("input", { bubbles: !0 }));
488
488
  }, ae = (c) => {
489
489
  const v = c.match(/(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);
490
490
  return v && typeof v[1] == "string" ? v[1] : null;
@@ -505,20 +505,20 @@ const kt = (e) => {
505
505
  return;
506
506
  }
507
507
  }
508
- const h = c.clipboardData?.getData("text/plain")?.trim();
509
- if (!h) return;
510
- const x = ae(h), T = q(h);
508
+ const y = c.clipboardData?.getData("text/plain")?.trim();
509
+ if (!y) return;
510
+ const x = ae(y), T = O(y);
511
511
  if (!x && !T) return;
512
512
  c.preventDefault();
513
513
  const Y = window.getSelection();
514
514
  if (!Y || Y.rangeCount === 0) return;
515
- const z = Y.getRangeAt(0), P = l(z.startContainer);
516
- if (P && P.textContent?.trim() === h && (P.innerHTML = "<br>"), x) {
517
- V(h);
515
+ const z = Y.getRangeAt(0), P = u(z.startContainer);
516
+ if (P && P.textContent?.trim() === y && (P.innerHTML = "<br>"), x) {
517
+ B(y);
518
518
  return;
519
519
  }
520
- T && D(h);
521
- }, q = (c) => {
520
+ T && D(y);
521
+ }, O = (c) => {
522
522
  try {
523
523
  const v = new URL(c);
524
524
  return /\.(png|jpe?g|gif|webp|svg|avif)$/i.test(v.pathname);
@@ -526,28 +526,28 @@ const kt = (e) => {
526
526
  return !1;
527
527
  }
528
528
  };
529
- return e.addEventListener("keydown", O, { capture: !0 }), e.addEventListener("paste", ce), {
530
- toggleInline: i,
529
+ return e.addEventListener("keydown", q, { capture: !0 }), e.addEventListener("paste", ce), {
530
+ toggleInline: r,
531
531
  toggleBlock: d,
532
- normalize: y,
532
+ normalize: C,
533
533
  rootElement: e,
534
- saveSelection: r,
535
- restoreSelection: M,
536
- isInlineActive: k,
537
- isBlockActive: _,
538
- focus: B,
539
- toolbarRef: u,
540
- focusFirstToolbarButton: I,
541
- replaceCurrentBlock: C,
534
+ saveSelection: l,
535
+ restoreSelection: k,
536
+ isInlineActive: M,
537
+ isBlockActive: S,
538
+ focus: $,
539
+ toolbarRef: i,
540
+ focusFirstToolbarButton: H,
541
+ replaceCurrentBlock: g,
542
542
  buttons: a,
543
543
  announce: R,
544
544
  appendBlock: F,
545
545
  insertBlockAfterCurrent: G,
546
546
  appendImage: D,
547
- insertImage: S,
548
- appendVideo: V
547
+ insertImage: _,
548
+ appendVideo: B
549
549
  };
550
- }, e1 = ["id", "aria-label"], t1 = { "data-block": "" }, a1 = {
550
+ }, e1 = ["id", "aria-label"], t1 = ["data-placeholder"], a1 = {
551
551
  id: "editor-status",
552
552
  class: "sr-only",
553
553
  "aria-live": "polite",
@@ -561,28 +561,28 @@ const kt = (e) => {
561
561
  writeHereText: { default: "Write here..." }
562
562
  },
563
563
  setup(e, { expose: n }) {
564
- const t = e, a = w(""), o = w(null), u = (l) => {
565
- if (l.ctrlKey || l.metaKey)
566
- switch (l.altKey && l.key === "F10" && (l.preventDefault(), t.editor?.restoreSelection(), t.editor?.focusFirstToolbarButton()), l.key.toLowerCase()) {
564
+ const t = e, a = w(""), o = w(null), i = (p) => {
565
+ if (p.ctrlKey || p.metaKey)
566
+ switch (p.altKey && p.key === "F10" && (p.preventDefault(), t.editor?.restoreSelection(), t.editor?.focusFirstToolbarButton()), p.key.toLowerCase()) {
567
567
  case "b":
568
- l.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("strong"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
568
+ p.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("strong"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
569
569
  break;
570
570
  case "i":
571
- l.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("em"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
571
+ p.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("em"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
572
572
  break;
573
573
  case "1":
574
- l.altKey && (l.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"));
574
+ p.altKey && (p.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"));
575
575
  break;
576
576
  }
577
- }, r = () => {
578
- const l = window.getSelection();
579
- if (!l || l.rangeCount === 0) return;
580
- const p = o.value;
581
- if (!p) return;
582
- const m = l.getRangeAt(0);
583
- p.contains(m.commonAncestorContainer) && t.editor?.saveSelection();
584
- }, i = (l) => {
585
- const p = new DOMParser().parseFromString(l, "text/html"), m = /* @__PURE__ */ new Set([
577
+ }, l = () => {
578
+ const p = window.getSelection();
579
+ if (!p || p.rangeCount === 0) return;
580
+ const m = o.value;
581
+ if (!m) return;
582
+ const C = p.getRangeAt(0);
583
+ m.contains(C.commonAncestorContainer) && t.editor?.saveSelection();
584
+ }, r = (p) => {
585
+ const m = new DOMParser().parseFromString(p, "text/html"), C = /* @__PURE__ */ new Set([
586
586
  "P",
587
587
  "BR",
588
588
  "STRONG",
@@ -594,46 +594,62 @@ const kt = (e) => {
594
594
  "OL",
595
595
  "LI",
596
596
  "A"
597
- ]), b = document.createTreeWalker(
598
- p.body,
597
+ ]), M = document.createTreeWalker(
598
+ m.body,
599
599
  NodeFilter.SHOW_ELEMENT,
600
600
  null
601
- ), y = [];
602
- for (; b.nextNode(); ) {
603
- const k = b.currentNode;
604
- if (!m.has(k.tagName)) {
605
- y.push(k);
601
+ ), S = [];
602
+ for (; M.nextNode(); ) {
603
+ const $ = M.currentNode;
604
+ if (!C.has($.tagName)) {
605
+ S.push($);
606
606
  continue;
607
607
  }
608
- if (k.removeAttribute("style"), k.removeAttribute("class"), k.tagName === "A") {
609
- const _ = k.getAttribute("href");
610
- (!_ || !_.startsWith("http")) && k.removeAttribute("href");
608
+ if ($.removeAttribute("style"), $.removeAttribute("class"), $.tagName === "A") {
609
+ const k = $.getAttribute("href");
610
+ (!k || !k.startsWith("http")) && $.removeAttribute("href");
611
611
  }
612
612
  }
613
- return y.forEach((k) => {
614
- const _ = k.parentNode;
615
- for (; k.firstChild; ) _?.insertBefore(k.firstChild, k);
616
- _?.removeChild(k);
617
- }), p.body.innerHTML;
618
- }, s = (l) => {
613
+ return S.forEach(($) => {
614
+ const k = $.parentNode;
615
+ for (; $.firstChild; ) k?.insertBefore($.firstChild, $);
616
+ k?.removeChild($);
617
+ }), m.body.innerHTML;
618
+ }, s = () => {
619
619
  const p = window.getSelection();
620
620
  if (!p || p.rangeCount === 0) return;
621
- const m = p.getRangeAt(0);
622
- m.deleteContents();
623
- const b = m.createContextualFragment(l);
624
- m.insertNode(b), p.collapseToEnd();
625
- }, d = (l) => {
626
- l.preventDefault();
627
- const p = l.clipboardData?.getData("text/html"), m = l.clipboardData?.getData("text/plain");
628
- if (p) {
629
- const b = i(p);
630
- s(b);
631
- } else m && s(`<p data-block>${m}</p>`);
621
+ const m = p.anchorNode;
622
+ if (!m) return;
623
+ const C = (m instanceof Element ? m : m.parentElement)?.closest("[data-block]");
624
+ C && d(C);
625
+ }, d = (p) => {
626
+ const m = p.textContent?.replace(/\u00A0/g, "").trim() ?? "", C = p.querySelector("img, iframe"), M = p.innerHTML === "<br>";
627
+ (m === "" || M) && !C ? p.dataset.empty = "true" : p.dataset.empty = "false";
628
+ }, u = (p) => {
629
+ const m = window.getSelection();
630
+ if (!m || m.rangeCount === 0) return;
631
+ const C = m.getRangeAt(0);
632
+ C.deleteContents();
633
+ const M = C.createContextualFragment(p);
634
+ C.insertNode(M), m.collapseToEnd();
635
+ }, h = (p) => {
636
+ p.preventDefault();
637
+ const m = p.clipboardData?.getData("text/html"), C = p.clipboardData?.getData("text/plain");
638
+ if (m) {
639
+ const M = r(m);
640
+ u(M);
641
+ } else C && u(`<p data-block>${C}</p>`);
632
642
  t.editor?.saveSelection(), o.value?.dispatchEvent(new Event("input", { bubbles: !0 }));
633
643
  };
634
- return se(() => document.addEventListener("selectionchange", r)), $e(() => document.removeEventListener("selectionchange", r)), n({
644
+ return se(() => {
645
+ document.addEventListener("selectionchange", l);
646
+ const p = o.value;
647
+ p && p.querySelectorAll("[data-block]").forEach((m) => {
648
+ d(m);
649
+ });
650
+ }), $e(() => document.removeEventListener("selectionchange", l)), n({
635
651
  getRoot: () => o
636
- }), (l, p) => (f(), g(re, null, [
652
+ }), (p, m) => (f(), b(re, null, [
637
653
  L("div", {
638
654
  ref_key: "rootRef",
639
655
  ref: o,
@@ -644,31 +660,36 @@ const kt = (e) => {
644
660
  "aria-multiline": "true",
645
661
  "aria-label": e.ariaLabel || "Text editor",
646
662
  "aria-describedby": "editor-help editor-status",
647
- onPaste: d,
663
+ onInput: s,
664
+ onPaste: h,
648
665
  onKeydown: [
649
- u,
650
- p[0] || (p[0] = Ce((m) => E(Yt)(m, e.editor), ["enter"])),
651
- p[1] || (p[1] = Ce(
666
+ i,
667
+ m[0] || (m[0] = Ce((C) => E(Yt)(C, e.editor), ["enter"])),
668
+ m[1] || (m[1] = Ce(
652
669
  //@ts-ignore
653
- (...m) => E(ut) && E(ut)(...m),
670
+ (...C) => E(ut) && E(ut)(...C),
654
671
  ["backspace"]
655
672
  ))
656
673
  ],
657
- onMouseup: p[2] || (p[2] = //@ts-ignore
658
- (...m) => e.editor?.saveSelection && e.editor?.saveSelection(...m)),
659
- onKeyup: p[3] || (p[3] = //@ts-ignore
660
- (...m) => e.editor?.saveSelection && e.editor?.saveSelection(...m))
674
+ onMouseup: m[2] || (m[2] = //@ts-ignore
675
+ (...C) => e.editor?.saveSelection && e.editor?.saveSelection(...C)),
676
+ onKeyup: m[3] || (m[3] = //@ts-ignore
677
+ (...C) => e.editor?.saveSelection && e.editor?.saveSelection(...C))
661
678
  }, [
662
- L("p", t1, K(e.writeHereText), 1)
679
+ L("p", {
680
+ "data-block": "",
681
+ "data-empty": "true",
682
+ "data-placeholder": e.writeHereText
683
+ }, null, 8, t1)
663
684
  ], 40, e1),
664
685
  L("div", a1, K(a.value), 1),
665
- p[4] || (p[4] = L("p", {
686
+ m[4] || (m[4] = L("p", {
666
687
  id: "editor-help",
667
688
  class: "sr-only"
668
689
  }, " Use Ctrl+B for bold, Ctrl+I for italic, Alt+Ctrl+1 for heading level 1. ", -1))
669
690
  ], 64));
670
691
  }
671
- }), o1 = /* @__PURE__ */ W(n1, [["__scopeId", "data-v-7068c0fb"]]), l1 = {
692
+ }), o1 = /* @__PURE__ */ W(n1, [["__scopeId", "data-v-5be04de8"]]), l1 = {
672
693
  viewBox: "0 0 512 512",
673
694
  paths: [
674
695
  {
@@ -1286,7 +1307,7 @@ const kt = (e) => {
1286
1307
  "stroke-width": 2
1287
1308
  }
1288
1309
  ]
1289
- }, O1 = {
1310
+ }, q1 = {
1290
1311
  viewBox: "0 0 24 24",
1291
1312
  paths: [
1292
1313
  {
@@ -1297,7 +1318,7 @@ const kt = (e) => {
1297
1318
  "stroke-width": 2
1298
1319
  }
1299
1320
  ]
1300
- }, q1 = {
1321
+ }, O1 = {
1301
1322
  viewBox: "0 0 24 24",
1302
1323
  paths: [
1303
1324
  {
@@ -2086,8 +2107,8 @@ const kt = (e) => {
2086
2107
  church: Z1,
2087
2108
  health: W1,
2088
2109
  blocks: z1,
2089
- shield: O1,
2090
- upload: q1,
2110
+ shield: q1,
2111
+ upload: O1,
2091
2112
  italic: N1,
2092
2113
  logout: P1,
2093
2114
  ticket: U1,
@@ -2136,7 +2157,7 @@ const kt = (e) => {
2136
2157
  spin: { type: Boolean }
2137
2158
  },
2138
2159
  setup(e) {
2139
- return (n, t) => (f(), g("svg", {
2160
+ return (n, t) => (f(), b("svg", {
2140
2161
  xmlns: "http://www.w3.org/2000/svg",
2141
2162
  class: ue(["icon", { spin: e.spin }]),
2142
2163
  viewBox: E(je)[e.name].viewBox,
@@ -2146,28 +2167,28 @@ const kt = (e) => {
2146
2167
  fill: "none",
2147
2168
  "aria-hidden": "true"
2148
2169
  }, [
2149
- (f(!0), g(re, null, ve(E(je)[e.name].paths, (a, o) => (f(), g(re, { key: o }, [
2150
- a.type === "path" ? (f(), g("path", ge({
2170
+ (f(!0), b(re, null, ve(E(je)[e.name].paths, (a, o) => (f(), b(re, { key: o }, [
2171
+ a.type === "path" ? (f(), b("path", ge({
2151
2172
  key: 0,
2152
2173
  ref_for: !0
2153
2174
  }, a), null, 16)) : N("", !0),
2154
- a.type === "circle" ? (f(), g("circle", ge({
2175
+ a.type === "circle" ? (f(), b("circle", ge({
2155
2176
  key: 1,
2156
2177
  ref_for: !0
2157
2178
  }, a), null, 16)) : N("", !0),
2158
- a.type === "line" ? (f(), g("line", ge({
2179
+ a.type === "line" ? (f(), b("line", ge({
2159
2180
  key: 2,
2160
2181
  ref_for: !0
2161
2182
  }, a), null, 16)) : N("", !0),
2162
- a.type === "polyline" ? (f(), g("polyline", ge({
2183
+ a.type === "polyline" ? (f(), b("polyline", ge({
2163
2184
  key: 3,
2164
2185
  ref_for: !0
2165
2186
  }, a), null, 16)) : N("", !0),
2166
- a.type === "rect" ? (f(), g("rect", ge({
2187
+ a.type === "rect" ? (f(), b("rect", ge({
2167
2188
  key: 4,
2168
2189
  ref_for: !0
2169
2190
  }, a), null, 16)) : N("", !0),
2170
- a.type === "polygon" ? (f(), g("polygon", ge({
2191
+ a.type === "polygon" ? (f(), b("polygon", ge({
2171
2192
  key: 5,
2172
2193
  ref_for: !0
2173
2194
  }, a), null, 16)) : N("", !0)
@@ -2182,81 +2203,81 @@ const kt = (e) => {
2182
2203
  buttons: {}
2183
2204
  },
2184
2205
  setup(e, { expose: n }) {
2185
- const t = e, a = We + _a, o = w(!1), u = w([]), r = w(null), i = w({});
2186
- let s = null, d = null, l = 0;
2187
- const p = () => {
2188
- i.value = m();
2206
+ const t = e, a = We + _a, o = w(!1), i = w([]), l = w(null), r = w({});
2207
+ let s = null, d = null, u = 0;
2208
+ const h = () => {
2209
+ r.value = p();
2189
2210
  };
2190
- J(o, async (C) => {
2191
- if (!C) {
2211
+ J(o, async (g) => {
2212
+ if (!g) {
2192
2213
  d?.(), d = null, s?.disconnect(), s = null;
2193
2214
  return;
2194
2215
  }
2195
- await Me(), await Me(), p(), r.value && (s = new ResizeObserver(p), s.observe(r.value)), d = b(p);
2216
+ await Me(), await Me(), h(), l.value && (s = new ResizeObserver(h), s.observe(l.value)), d = m(h);
2196
2217
  }, { flush: "post" });
2197
- const m = () => {
2198
- const C = window.getSelection();
2199
- if (!C || C.rangeCount === 0) return {};
2218
+ const p = () => {
2219
+ const g = window.getSelection();
2220
+ if (!g || g.rangeCount === 0) return {};
2200
2221
  const R = t.editor?.rootElement;
2201
2222
  if (!R) return {};
2202
- const F = C.getRangeAt(0);
2223
+ const F = g.getRangeAt(0);
2203
2224
  if (!R.contains(
2204
2225
  F.commonAncestorContainer.nodeType === 3 ? F.commonAncestorContainer.parentNode : F.commonAncestorContainer
2205
- ) || C.isCollapsed) return {};
2226
+ ) || g.isCollapsed) return {};
2206
2227
  const G = F.getClientRects().item(0) ?? F.getBoundingClientRect();
2207
2228
  if (G.width === 0 && G.height === 0) return {};
2208
- const D = r.value;
2229
+ const D = l.value;
2209
2230
  if (!D) return {};
2210
- const S = D.getBoundingClientRect(), A = S.width, $ = G.left + G.width / 2, V = Math.max(A / 2 + We, Math.min($, window.innerWidth - A / 2 - We)), O = G.top - S.height - a;
2211
- return O < 0 ? {} : {
2231
+ const _ = D.getBoundingClientRect(), A = _.width, I = G.left + G.width / 2, B = Math.max(A / 2 + We, Math.min(I, window.innerWidth - A / 2 - We)), q = G.top - _.height - a;
2232
+ return q < 0 ? {} : {
2212
2233
  position: "fixed",
2213
- left: `${V}px`,
2214
- top: `${O}px`
2234
+ left: `${B}px`,
2235
+ top: `${q}px`
2215
2236
  };
2216
- }, b = (C) => {
2237
+ }, m = (g) => {
2217
2238
  let R = 0;
2218
2239
  const F = () => {
2219
- cancelAnimationFrame(R), R = requestAnimationFrame(C);
2240
+ cancelAnimationFrame(R), R = requestAnimationFrame(g);
2220
2241
  }, G = F, D = F;
2221
2242
  return window.addEventListener("scroll", G, { capture: !0, passive: !0 }), window.addEventListener("resize", D, { passive: !0 }), () => {
2222
2243
  cancelAnimationFrame(R), window.removeEventListener("scroll", G, { capture: !0 }), window.removeEventListener("resize", D);
2223
2244
  };
2224
- }, y = (C, R) => {
2225
- C && (u.value[R] = C);
2245
+ }, C = (g, R) => {
2246
+ g && (i.value[R] = g);
2226
2247
  };
2227
2248
  J(o, () => {
2228
- u.value = [];
2249
+ i.value = [];
2229
2250
  });
2230
- const k = H(() => [
2251
+ const M = V(() => [
2231
2252
  {
2232
2253
  key: "strong",
2233
2254
  label: "bold",
2234
2255
  type: "icon",
2235
2256
  ariaLabel: "Bold",
2236
- action: (C) => {
2237
- C.restoreSelection(), C.toggleInline("strong"), C.focus(), C.announce(C.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
2257
+ action: (g) => {
2258
+ g.restoreSelection(), g.toggleInline("strong"), g.focus(), g.announce(g.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
2238
2259
  },
2239
- isActive: (C) => C.isInlineActive("strong")
2260
+ isActive: (g) => g.isInlineActive("strong")
2240
2261
  },
2241
2262
  {
2242
2263
  key: "em",
2243
2264
  label: "italic",
2244
2265
  type: "icon",
2245
2266
  ariaLabel: "Italic",
2246
- action: (C) => {
2247
- C.restoreSelection(), C.toggleInline("em"), C.focus(), C.announce(C.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
2267
+ action: (g) => {
2268
+ g.restoreSelection(), g.toggleInline("em"), g.focus(), g.announce(g.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
2248
2269
  },
2249
- isActive: (C) => C.isInlineActive("em")
2270
+ isActive: (g) => g.isInlineActive("em")
2250
2271
  },
2251
2272
  {
2252
2273
  key: "h1",
2253
2274
  label: "head",
2254
2275
  type: "icon",
2255
2276
  ariaLabel: "Heading 1",
2256
- action: (C) => {
2257
- C.restoreSelection(), C.toggleBlock("h1"), C.focus(), C.announce(C.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled");
2277
+ action: (g) => {
2278
+ g.restoreSelection(), g.toggleBlock("h1"), g.focus(), g.announce(g.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled");
2258
2279
  },
2259
- isActive: (C) => C.isBlockActive("h1")
2280
+ isActive: (g) => g.isBlockActive("h1")
2260
2281
  },
2261
2282
  {
2262
2283
  key: "h4",
@@ -2264,79 +2285,79 @@ const kt = (e) => {
2264
2285
  type: "icon",
2265
2286
  ariaLabel: "Heading 4",
2266
2287
  size: 12,
2267
- action: (C) => {
2268
- C.restoreSelection(), C.toggleBlock("h4"), C.focus(), C.announce(C.isBlockActive("h4") ? "Heading level 4 enabled" : "Heading level 4 disabled");
2288
+ action: (g) => {
2289
+ g.restoreSelection(), g.toggleBlock("h4"), g.focus(), g.announce(g.isBlockActive("h4") ? "Heading level 4 enabled" : "Heading level 4 disabled");
2269
2290
  },
2270
- isActive: (C) => C.isBlockActive("h4")
2291
+ isActive: (g) => g.isBlockActive("h4")
2271
2292
  },
2272
2293
  {
2273
2294
  key: "quote",
2274
2295
  label: "❝",
2275
2296
  type: "text",
2276
2297
  ariaLabel: "Blockquote",
2277
- action: (C) => {
2278
- C.restoreSelection(), C.toggleBlock("blockquote"), C.focus(), C.announce(C.isBlockActive("blockquote") ? "Blockquote enabled" : "Blockquote disabled");
2298
+ action: (g) => {
2299
+ g.restoreSelection(), g.toggleBlock("blockquote"), g.focus(), g.announce(g.isBlockActive("blockquote") ? "Blockquote enabled" : "Blockquote disabled");
2279
2300
  },
2280
- isActive: (C) => C.isBlockActive("blockquote")
2301
+ isActive: (g) => g.isBlockActive("blockquote")
2281
2302
  }
2282
- ]), _ = H(() => [
2283
- ...k.value,
2303
+ ]), S = V(() => [
2304
+ ...M.value,
2284
2305
  ...t.editor?.buttons ?? []
2285
- ]), B = async () => {
2286
- await Me(), u.value[0]?.focus();
2287
- }, M = (C) => {
2288
- const R = u.value, F = R.indexOf(document.activeElement);
2289
- if (C.key === "ArrowRight") {
2290
- C.preventDefault();
2306
+ ]), $ = async () => {
2307
+ await Me(), i.value[0]?.focus();
2308
+ }, k = (g) => {
2309
+ const R = i.value, F = R.indexOf(document.activeElement);
2310
+ if (g.key === "ArrowRight") {
2311
+ g.preventDefault();
2291
2312
  const G = F < R.length - 1 ? F + 1 : 0;
2292
2313
  R[G]?.focus();
2293
2314
  }
2294
- if (C.key === "ArrowLeft") {
2295
- C.preventDefault();
2315
+ if (g.key === "ArrowLeft") {
2316
+ g.preventDefault();
2296
2317
  const G = F > 0 ? F - 1 : R.length - 1;
2297
2318
  R[G]?.focus();
2298
2319
  }
2299
- C.key === "Home" && (C.preventDefault(), R[0]?.focus()), C.key === "End" && (C.preventDefault(), R[R.length - 1]?.focus()), C.key === "Escape" && (C.preventDefault(), t.editor?.restoreSelection(), t.editor?.focus());
2300
- }, I = () => {
2301
- cancelAnimationFrame(l), l = requestAnimationFrame(() => {
2302
- const C = window.getSelection();
2303
- if (!C || C.rangeCount === 0) {
2320
+ g.key === "Home" && (g.preventDefault(), R[0]?.focus()), g.key === "End" && (g.preventDefault(), R[R.length - 1]?.focus()), g.key === "Escape" && (g.preventDefault(), t.editor?.restoreSelection(), t.editor?.focus());
2321
+ }, H = () => {
2322
+ cancelAnimationFrame(u), u = requestAnimationFrame(() => {
2323
+ const g = window.getSelection();
2324
+ if (!g || g.rangeCount === 0) {
2304
2325
  o.value && (o.value = !1);
2305
2326
  return;
2306
2327
  }
2307
2328
  const R = t.editor?.rootElement;
2308
2329
  if (!R) return;
2309
- const F = C.getRangeAt(0), G = F.commonAncestorContainer.nodeType === 3 ? F.commonAncestorContainer.parentNode ?? F.commonAncestorContainer : F.commonAncestorContainer, D = R.contains(G) && !C.isCollapsed;
2330
+ const F = g.getRangeAt(0), G = F.commonAncestorContainer.nodeType === 3 ? F.commonAncestorContainer.parentNode ?? F.commonAncestorContainer : F.commonAncestorContainer, D = R.contains(G) && !g.isCollapsed;
2310
2331
  o.value !== D && (o.value = D);
2311
2332
  });
2312
2333
  };
2313
2334
  return se(() => {
2314
- document.addEventListener("selectionchange", I);
2335
+ document.addEventListener("selectionchange", H);
2315
2336
  }), _e(() => {
2316
- d?.(), s?.disconnect(), s = null, cancelAnimationFrame(l), document.removeEventListener("selectionchange", I);
2337
+ d?.(), s?.disconnect(), s = null, cancelAnimationFrame(u), document.removeEventListener("selectionchange", H);
2317
2338
  }), n({
2318
- focusFirstButton: B
2319
- }), (C, R) => (f(), ee(Ze, { to: "body" }, [
2339
+ focusFirstButton: $
2340
+ }), (g, R) => (f(), ee(Ze, { to: "body" }, [
2320
2341
  j(Se, { name: "tooltip-fade" }, {
2321
2342
  default: Q(() => [
2322
- o.value ? (f(), g("div", {
2343
+ o.value ? (f(), b("div", {
2323
2344
  key: 0,
2324
2345
  ref_key: "toolbarRef",
2325
- ref: r,
2346
+ ref: l,
2326
2347
  class: "toolbar",
2327
2348
  role: "toolbar",
2328
2349
  "aria-label": "Formatting options",
2329
2350
  "aria-controls": e.editorId,
2330
- style: Le(i.value),
2351
+ style: Le(r.value),
2331
2352
  tabindex: "-1",
2332
- onKeydown: M
2353
+ onKeydown: k
2333
2354
  }, [
2334
2355
  R[0] || (R[0] = L("div", { class: "arrow" }, null, -1)),
2335
- (f(!0), g(re, null, ve(_.value, (F, G) => (f(), g("button", {
2356
+ (f(!0), b(re, null, ve(S.value, (F, G) => (f(), b("button", {
2336
2357
  key: F.key ?? G,
2337
2358
  type: "button",
2338
2359
  ref_for: !0,
2339
- ref: (D) => y(D, G),
2360
+ ref: (D) => C(D, G),
2340
2361
  class: ue({ "is-active": F.isActive?.(t.editor) }),
2341
2362
  "aria-pressed": F.isActive?.(t.editor),
2342
2363
  onMousedown: ie((D) => F.action(t.editor), ["prevent"]),
@@ -2346,7 +2367,7 @@ const kt = (e) => {
2346
2367
  key: 0,
2347
2368
  name: F.label,
2348
2369
  size: F.size ?? 14
2349
- }, null, 8, ["name", "size"])) : (f(), g("span", Da, K(F.label), 1))
2370
+ }, null, 8, ["name", "size"])) : (f(), b("span", Da, K(F.label), 1))
2350
2371
  ], 42, Aa))), 128))
2351
2372
  ], 44, Ba)) : N("", !0)
2352
2373
  ]),
@@ -2368,34 +2389,34 @@ const kt = (e) => {
2368
2389
  }),
2369
2390
  emits: ["update:modelValue"],
2370
2391
  setup(e, { expose: n }) {
2371
- const t = he(e, "modelValue"), a = e, o = fe(), u = w(), r = w(null), i = w(null);
2392
+ const t = he(e, "modelValue"), a = e, o = fe(), i = w(), l = w(null), r = w(null);
2372
2393
  return J(
2373
2394
  () => t.value,
2374
2395
  (s) => {
2375
- const d = i.value?.getRoot()?.value;
2376
- d && d.innerHTML !== s && (d.innerHTML = s, r.value?.normalize());
2396
+ const d = r.value?.getRoot()?.value;
2397
+ d && d.innerHTML !== s && (d.innerHTML = s, l.value?.normalize());
2377
2398
  }
2378
2399
  ), se(() => {
2379
- const d = i.value?.getRoot()?.value;
2400
+ const d = r.value?.getRoot()?.value;
2380
2401
  if (!d) return;
2381
- r.value = Qt(d, { buttons: a.buttons ?? [] }), r.value && (r.value.toolbarRef = u);
2382
- const l = () => t.value = d.innerHTML;
2383
- d.addEventListener("input", l), $e(() => d.removeEventListener("input", l));
2384
- }), xe("announce", (s) => r.value?.announce(s)), n({
2385
- editor: r
2386
- }), (s, d) => (f(), g("section", Ta, [
2402
+ l.value = Qt(d, { buttons: a.buttons ?? [] }), l.value && (l.value.toolbarRef = i);
2403
+ const u = () => t.value = d.innerHTML;
2404
+ d.addEventListener("input", u), $e(() => d.removeEventListener("input", u));
2405
+ }), xe("announce", (s) => l.value?.announce(s)), n({
2406
+ editor: l
2407
+ }), (s, d) => (f(), b("section", Ta, [
2387
2408
  j(o1, {
2388
2409
  ref_key: "contentRef",
2389
- ref: i,
2390
- editor: r.value,
2410
+ ref: r,
2411
+ editor: l.value,
2391
2412
  "editor-id": E(o),
2392
2413
  "aria-label": e.ariaLabel,
2393
2414
  "write-here-text": e.writeHereText
2394
2415
  }, null, 8, ["editor", "editor-id", "aria-label", "write-here-text"]),
2395
2416
  j(Ra, {
2396
2417
  ref_key: "toolbarRef",
2397
- ref: u,
2398
- editor: r.value,
2418
+ ref: i,
2419
+ editor: l.value,
2399
2420
  "editor-id": E(o)
2400
2421
  }, null, 8, ["editor", "editor-id"])
2401
2422
  ]));
@@ -2407,7 +2428,7 @@ ct.install = (e) => {
2407
2428
  const Ea = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-disabled", "data-disabled", "data-dragging"], Za = ["multiple", "accept", "disabled"], za = {
2408
2429
  key: 1,
2409
2430
  class: "ui-upload__list"
2410
- }, Oa = { class: "ui-upload__item--default" }, qa = { class: "ui-upload__file-name" }, Fa = { class: "ui-upload__file-size" }, Na = {
2431
+ }, qa = { class: "ui-upload__item--default" }, Oa = { class: "ui-upload__file-name" }, Fa = { class: "ui-upload__file-size" }, Na = {
2411
2432
  key: 0,
2412
2433
  class: "ui-upload__progress-wrapper"
2413
2434
  }, Pa = { class: "ui-upload__progress-text" }, Ka = ["value", "aria-label"], Ua = {
@@ -2445,92 +2466,92 @@ const Ea = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
2445
2466
  }),
2446
2467
  emits: /* @__PURE__ */ oe(["select", "upload", "remove"], ["update:modelValue"]),
2447
2468
  setup(e, { emit: n }) {
2448
- const t = he(e, "modelValue"), a = e, o = n, u = w(0), r = w(""), i = w(!1), s = fe(), d = w(), l = H(() => t.value), p = H(() => a.maxSize === 1 / 0 ? "Unlimited" : D(a.maxSize)), m = H(() => !a.disabled && (a.multiple || t.value.length === 0)), b = H(() => l.value.some(($) => $.status === "uploading")), y = () => m.value && d.value?.click(), k = () => {
2449
- a.disabled || (u.value++, i.value = !0);
2450
- }, _ = () => {
2451
- u.value = Math.max(0, u.value - 1), u.value === 0 && (i.value = !1);
2452
- }, B = ($) => {
2453
- if (!a.disabled && !(!a.multiple && t.value.length > 0) && (u.value = 0, i.value = !1, !!$.dataTransfer)) {
2454
- if (!a.multiple && $.dataTransfer?.files.length) {
2455
- const V = $.dataTransfer.files[0];
2456
- I([V]);
2469
+ const t = he(e, "modelValue"), a = e, o = n, i = w(0), l = w(""), r = w(!1), s = fe(), d = w(), u = V(() => t.value), h = V(() => a.maxSize === 1 / 0 ? "Unlimited" : D(a.maxSize)), p = V(() => !a.disabled && (a.multiple || t.value.length === 0)), m = V(() => u.value.some((I) => I.status === "uploading")), C = () => p.value && d.value?.click(), M = () => {
2470
+ a.disabled || (i.value++, r.value = !0);
2471
+ }, S = () => {
2472
+ i.value = Math.max(0, i.value - 1), i.value === 0 && (r.value = !1);
2473
+ }, $ = (I) => {
2474
+ if (!a.disabled && !(!a.multiple && t.value.length > 0) && (i.value = 0, r.value = !1, !!I.dataTransfer)) {
2475
+ if (!a.multiple && I.dataTransfer?.files.length) {
2476
+ const B = I.dataTransfer.files[0];
2477
+ H([B]);
2457
2478
  return;
2458
2479
  }
2459
- I(Array.from($.dataTransfer.files));
2480
+ H(Array.from(I.dataTransfer.files));
2460
2481
  }
2461
- }, M = ($) => {
2462
- const V = $.target;
2463
- V.files && (I(Array.from(V.files)), V.value = "");
2464
- }, I = ($) => {
2465
- const V = [];
2466
- for (const te of $) {
2467
- if (l.value.length + V.length >= a.maxFiles) break;
2468
- te.size > a.maxSize || V.push({
2482
+ }, k = (I) => {
2483
+ const B = I.target;
2484
+ B.files && (H(Array.from(B.files)), B.value = "");
2485
+ }, H = (I) => {
2486
+ const B = [];
2487
+ for (const te of I) {
2488
+ if (u.value.length + B.length >= a.maxFiles) break;
2489
+ te.size > a.maxSize || B.push({
2469
2490
  id: crypto.randomUUID(),
2470
2491
  file: te,
2471
2492
  progress: 0,
2472
2493
  status: "idle"
2473
2494
  });
2474
2495
  }
2475
- if (!V.length) return;
2476
- o("select", V.map((te) => te.file));
2477
- const O = [...l.value, ...V];
2478
- t.value = O, a.autoUpload && V.forEach(C);
2479
- }, C = ($) => {
2480
- const V = new AbortController();
2481
- $.progress = 0, $.error = void 0, $.status = "uploading", $.controller = V, S(`Started uploading ${$.file.name}`);
2482
- const O = () => {
2483
- V.signal.removeEventListener("abort", O);
2496
+ if (!B.length) return;
2497
+ o("select", B.map((te) => te.file));
2498
+ const q = [...u.value, ...B];
2499
+ t.value = q, a.autoUpload && B.forEach(g);
2500
+ }, g = (I) => {
2501
+ const B = new AbortController();
2502
+ I.progress = 0, I.error = void 0, I.status = "uploading", I.controller = B, _(`Started uploading ${I.file.name}`);
2503
+ const q = () => {
2504
+ B.signal.removeEventListener("abort", q);
2484
2505
  };
2485
- V.signal.addEventListener("abort", O);
2506
+ B.signal.addEventListener("abort", q);
2486
2507
  const te = {
2487
- signal: V.signal,
2508
+ signal: B.signal,
2488
2509
  onProgress: (ae) => {
2489
- $.progress = ae, G();
2510
+ I.progress = ae, G();
2490
2511
  },
2491
2512
  done: () => {
2492
- $.status = "success", $.progress = 100, $.controller = void 0, S(`Finished uploading ${$.file.name}`), G();
2513
+ I.status = "success", I.progress = 100, I.controller = void 0, _(`Finished uploading ${I.file.name}`), G();
2493
2514
  },
2494
2515
  fail: (ae) => {
2495
- $.status = "error", $.error = ae, $.controller = void 0, S(`Failed to upload ${$.file.name}: ${ae}`), G();
2516
+ I.status = "error", I.error = ae, I.controller = void 0, _(`Failed to upload ${I.file.name}: ${ae}`), G();
2496
2517
  }
2497
2518
  };
2498
- o("upload", $, te);
2499
- }, R = ($) => {
2500
- $.controller && ($.controller.abort(), $.status = "canceled", $.controller = void 0, S(`Canceled uploading ${$.file.name}`), G());
2501
- }, F = ($) => {
2502
- $.status !== "error" && $.status !== "canceled" || C($);
2503
- }, G = () => t.value = [...l.value], D = ($) => {
2504
- const V = ["B", "KB", "MB", "GB", "TB"];
2505
- let O = 0;
2506
- for (; $ >= 1024 && O < V.length - 1; )
2507
- $ /= 1024, O++;
2508
- return `${$.toFixed(2)} ${V[O]}`;
2509
- }, S = ($) => {
2510
- r.value = "", requestAnimationFrame(() => {
2511
- r.value = $;
2519
+ o("upload", I, te);
2520
+ }, R = (I) => {
2521
+ I.controller && (I.controller.abort(), I.status = "canceled", I.controller = void 0, _(`Canceled uploading ${I.file.name}`), G());
2522
+ }, F = (I) => {
2523
+ I.status !== "error" && I.status !== "canceled" || g(I);
2524
+ }, G = () => t.value = [...u.value], D = (I) => {
2525
+ const B = ["B", "KB", "MB", "GB", "TB"];
2526
+ let q = 0;
2527
+ for (; I >= 1024 && q < B.length - 1; )
2528
+ I /= 1024, q++;
2529
+ return `${I.toFixed(2)} ${B[q]}`;
2530
+ }, _ = (I) => {
2531
+ l.value = "", requestAnimationFrame(() => {
2532
+ l.value = I;
2512
2533
  });
2513
- }, A = ($) => {
2514
- $.controller && $.controller.abort(), o("remove", $), t.value = l.value.filter((V) => V.id !== $.id);
2534
+ }, A = (I) => {
2535
+ I.controller && I.controller.abort(), o("remove", I), t.value = u.value.filter((B) => B.id !== I.id);
2515
2536
  };
2516
- return ($, V) => (f(), g("div", {
2537
+ return (I, B) => (f(), b("div", {
2517
2538
  role: "button",
2518
2539
  class: "ui-upload",
2519
2540
  tabindex: e.disabled ? -1 : 0,
2520
2541
  "aria-label": e.ariaLabel || "File upload area",
2521
- "aria-describedby": i.value ? E(s) : void 0,
2522
- "aria-busy": b.value ? "true" : void 0,
2542
+ "aria-describedby": r.value ? E(s) : void 0,
2543
+ "aria-busy": m.value ? "true" : void 0,
2523
2544
  "aria-disabled": e.disabled ? "true" : void 0,
2524
2545
  "data-disabled": e.disabled || void 0,
2525
- "data-dragging": i.value || void 0,
2526
- onClick: V[0] || (V[0] = (O) => !e.disabled && y()),
2546
+ "data-dragging": r.value || void 0,
2547
+ onClick: B[0] || (B[0] = (q) => !e.disabled && C()),
2527
2548
  onKeydown: [
2528
- V[1] || (V[1] = Ce(ie((O) => !e.disabled && y(), ["stop", "prevent"]), ["enter"])),
2529
- V[2] || (V[2] = Ce(ie((O) => !e.disabled && y(), ["prevent"]), ["space"]))
2549
+ B[1] || (B[1] = Ce(ie((q) => !e.disabled && C(), ["stop", "prevent"]), ["enter"])),
2550
+ B[2] || (B[2] = Ce(ie((q) => !e.disabled && C(), ["prevent"]), ["space"]))
2530
2551
  ],
2531
- onDragover: V[3] || (V[3] = ie((O) => !e.disabled && k(), ["prevent"])),
2532
- onDragleave: _,
2533
- onDrop: V[4] || (V[4] = ie((O) => !e.disabled && B(O), ["prevent"]))
2552
+ onDragover: B[3] || (B[3] = ie((q) => !e.disabled && M(), ["prevent"])),
2553
+ onDragleave: S,
2554
+ onDrop: B[4] || (B[4] = ie((q) => !e.disabled && $(q), ["prevent"]))
2534
2555
  }, [
2535
2556
  L("input", {
2536
2557
  type: "file",
@@ -2540,87 +2561,87 @@ const Ea = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
2540
2561
  multiple: e.multiple,
2541
2562
  accept: e.accept,
2542
2563
  disabled: e.disabled,
2543
- onChange: M
2564
+ onChange: k
2544
2565
  }, null, 40, Za),
2545
- e.multiple || !e.multiple && t.value.length === 0 ? X($.$slots, "default", {
2566
+ e.multiple || !e.multiple && t.value.length === 0 ? X(I.$slots, "default", {
2546
2567
  key: 0,
2547
- dragging: i.value
2568
+ dragging: r.value
2548
2569
  }, () => [
2549
2570
  j(pe, {
2550
2571
  name: "upload",
2551
2572
  size: 32
2552
2573
  }),
2553
- V[6] || (V[6] = L("p", null, "Drag and Drop files here", -1)),
2554
- V[7] || (V[7] = L("span", null, "or", -1)),
2574
+ B[6] || (B[6] = L("p", null, "Drag and Drop files here", -1)),
2575
+ B[7] || (B[7] = L("span", null, "or", -1)),
2555
2576
  j(ke, {
2556
2577
  type: "button",
2557
2578
  class: "btn btn-outline"
2558
2579
  }, {
2559
- default: Q(() => [...V[5] || (V[5] = [
2580
+ default: Q(() => [...B[5] || (B[5] = [
2560
2581
  be("Choose File", -1)
2561
2582
  ])]),
2562
2583
  _: 1
2563
2584
  }),
2564
- L("span", null, "Maximum size: " + K(p.value), 1)
2585
+ L("span", null, "Maximum size: " + K(h.value), 1)
2565
2586
  ], !0) : N("", !0),
2566
- l.value?.length ? (f(), g("ul", za, [
2567
- (f(!0), g(re, null, ve(l.value, (O) => (f(), g("li", {
2568
- key: O.id,
2587
+ u.value?.length ? (f(), b("ul", za, [
2588
+ (f(!0), b(re, null, ve(u.value, (q) => (f(), b("li", {
2589
+ key: q.id,
2569
2590
  class: "ui-upload__item"
2570
2591
  }, [
2571
- X($.$slots, "file", {
2572
- file: O,
2573
- remove: () => A(O),
2574
- cancel: () => R(O),
2575
- retry: () => F(O)
2592
+ X(I.$slots, "file", {
2593
+ file: q,
2594
+ remove: () => A(q),
2595
+ cancel: () => R(q),
2596
+ retry: () => F(q)
2576
2597
  }, () => [
2577
- L("div", Oa, [
2578
- L("span", qa, K(O.file.name), 1),
2579
- L("span", Fa, K(D(O.file.size)), 1)
2598
+ L("div", qa, [
2599
+ L("span", Oa, K(q.file.name), 1),
2600
+ L("span", Fa, K(D(q.file.size)), 1)
2580
2601
  ]),
2581
- O.status === "uploading" ? (f(), g("div", Na, [
2582
- L("span", Pa, K(O.progress) + "% ", 1),
2602
+ q.status === "uploading" ? (f(), b("div", Na, [
2603
+ L("span", Pa, K(q.progress) + "% ", 1),
2583
2604
  L("progress", {
2584
2605
  class: "ui-upload__progress",
2585
- value: O.progress,
2606
+ value: q.progress,
2586
2607
  max: "100",
2587
- "aria-label": `Upload progress for ${O.file.name}`
2608
+ "aria-label": `Upload progress for ${q.file.name}`
2588
2609
  }, null, 8, Ka)
2589
2610
  ])) : N("", !0),
2590
- O.status === "success" ? (f(), g("span", Ua, " Uploaded successful ")) : N("", !0),
2591
- O.status === "error" ? (f(), g("span", ja, K(O.error || "Upload failed"), 1)) : N("", !0),
2592
- O.status === "canceled" ? (f(), g("span", Wa, " Upload canceled ")) : N("", !0),
2611
+ q.status === "success" ? (f(), b("span", Ua, " Uploaded successful ")) : N("", !0),
2612
+ q.status === "error" ? (f(), b("span", ja, K(q.error || "Upload failed"), 1)) : N("", !0),
2613
+ q.status === "canceled" ? (f(), b("span", Wa, " Upload canceled ")) : N("", !0),
2593
2614
  L("div", Ya, [
2594
- O.status === "uploading" ? (f(), ee(ke, {
2615
+ q.status === "uploading" ? (f(), ee(ke, {
2595
2616
  key: 0,
2596
2617
  type: "button",
2597
2618
  class: "btn-danger btn-xs",
2598
- onClick: ie((te) => R(O), ["stop"])
2619
+ onClick: ie((te) => R(q), ["stop"])
2599
2620
  }, {
2600
- default: Q(() => [...V[8] || (V[8] = [
2621
+ default: Q(() => [...B[8] || (B[8] = [
2601
2622
  be(" Cancel ", -1)
2602
2623
  ])]),
2603
2624
  _: 1
2604
2625
  }, 8, ["onClick"])) : N("", !0),
2605
- O.status === "error" || O.status === "canceled" ? (f(), ee(ke, {
2626
+ q.status === "error" || q.status === "canceled" ? (f(), ee(ke, {
2606
2627
  key: 1,
2607
2628
  type: "button",
2608
2629
  class: "btn-info btn-xs",
2609
- onClick: ie((te) => F(O), ["stop"])
2630
+ onClick: ie((te) => F(q), ["stop"])
2610
2631
  }, {
2611
- default: Q(() => [...V[9] || (V[9] = [
2632
+ default: Q(() => [...B[9] || (B[9] = [
2612
2633
  be(" Retry ", -1)
2613
2634
  ])]),
2614
2635
  _: 1
2615
2636
  }, 8, ["onClick"])) : N("", !0),
2616
- O.status !== "uploading" ? (f(), ee(ke, {
2637
+ q.status !== "uploading" ? (f(), ee(ke, {
2617
2638
  key: 2,
2618
2639
  type: "button",
2619
2640
  class: "btn-outline btn-xs",
2620
- onClick: ie((te) => A(O), ["stop"]),
2641
+ onClick: ie((te) => A(q), ["stop"]),
2621
2642
  "aria-label": "Remove file"
2622
2643
  }, {
2623
- default: Q(() => [...V[10] || (V[10] = [
2644
+ default: Q(() => [...B[10] || (B[10] = [
2624
2645
  be(" Remove ", -1)
2625
2646
  ])]),
2626
2647
  _: 1
@@ -2629,7 +2650,7 @@ const Ea = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
2629
2650
  ], !0)
2630
2651
  ]))), 128))
2631
2652
  ])) : N("", !0),
2632
- L("div", Xa, K(r.value), 1),
2653
+ L("div", Xa, K(l.value), 1),
2633
2654
  L("p", {
2634
2655
  id: E(s),
2635
2656
  class: "sr-only"
@@ -2654,78 +2675,78 @@ const Qa = (e) => {
2654
2675
  disabled: { type: Boolean, default: !1 }
2655
2676
  },
2656
2677
  setup(e) {
2657
- const n = e, t = a2 + n2, a = w(!1), o = `tooltip-${fe()}`, u = w(null), r = w(null), i = w({});
2658
- let s = null, d = null, l = null;
2659
- const p = () => {
2678
+ const n = e, t = a2 + n2, a = w(!1), o = `tooltip-${fe()}`, i = w(null), l = w(null), r = w({});
2679
+ let s = null, d = null, u = null;
2680
+ const h = () => {
2660
2681
  n.disabled || (s && (clearTimeout(s), s = null), n.delay ? s = window.setTimeout(() => {
2661
2682
  a.value = !0, s = null;
2662
2683
  }, n.delay) : a.value = !0);
2663
- }, m = () => {
2684
+ }, p = () => {
2664
2685
  s && (clearTimeout(s), s = null), a.value = !1;
2665
- }, b = () => {
2666
- if (!u.value || !r.value) return {};
2667
- const k = u.value.getBoundingClientRect(), _ = r.value.getBoundingClientRect(), B = {
2686
+ }, m = () => {
2687
+ if (!i.value || !l.value) return {};
2688
+ const M = i.value.getBoundingClientRect(), S = l.value.getBoundingClientRect(), $ = {
2668
2689
  position: "fixed"
2669
2690
  };
2670
2691
  switch (n.placement) {
2671
2692
  case "top":
2672
- B.left = `${k.left + k.width / 2 - _.width / 2}px`, B.top = `${k.top - _.height - t}px`;
2693
+ $.left = `${M.left + M.width / 2 - S.width / 2}px`, $.top = `${M.top - S.height - t}px`;
2673
2694
  break;
2674
2695
  case "bottom":
2675
- B.left = `${k.left + k.width / 2 - _.width / 2}px`, B.top = `${k.bottom + t}px`;
2696
+ $.left = `${M.left + M.width / 2 - S.width / 2}px`, $.top = `${M.bottom + t}px`;
2676
2697
  break;
2677
2698
  case "left":
2678
- B.left = `${k.left - _.width - t}px`, B.top = `${k.top + k.height / 2 - _.height / 2}px`;
2699
+ $.left = `${M.left - S.width - t}px`, $.top = `${M.top + M.height / 2 - S.height / 2}px`;
2679
2700
  break;
2680
2701
  case "right":
2681
- B.left = `${k.right + t}px`, B.top = `${k.top + k.height / 2 - _.height / 2}px`;
2702
+ $.left = `${M.right + t}px`, $.top = `${M.top + M.height / 2 - S.height / 2}px`;
2682
2703
  break;
2683
2704
  }
2684
- return B;
2685
- }, y = () => {
2686
- i.value = b();
2705
+ return $;
2706
+ }, C = () => {
2707
+ r.value = m();
2687
2708
  };
2688
- return J(a, async (k) => {
2689
- if (!k) {
2690
- d?.(), d = null, l?.disconnect(), l = null;
2709
+ return J(a, async (M) => {
2710
+ if (!M) {
2711
+ d?.(), d = null, u?.disconnect(), u = null;
2691
2712
  return;
2692
2713
  }
2693
- await Me(), y(), d = Qa(y), l = new ResizeObserver(y), r.value && l.observe(r.value), u.value && l.observe(u.value);
2714
+ await Me(), C(), d = Qa(C), u = new ResizeObserver(C), l.value && u.observe(l.value), i.value && u.observe(i.value);
2694
2715
  }), _e(() => {
2695
- d?.(), l?.disconnect();
2696
- }), (k, _) => (f(), g(re, null, [
2716
+ d?.(), u?.disconnect();
2717
+ }), (M, S) => (f(), b(re, null, [
2697
2718
  L("span", {
2698
2719
  ref_key: "triggerRef",
2699
- ref: u,
2720
+ ref: i,
2700
2721
  class: "tooltip-trigger",
2701
2722
  "aria-describedby": a.value ? o : void 0,
2702
2723
  "aria-disabled": e.disabled || void 0,
2703
2724
  "aria-expanded": a.value || void 0,
2704
- onMouseenter: p,
2705
- onMouseleave: m,
2706
- onFocus: p,
2707
- onBlur: m,
2708
- onKeydown: Ce(m, ["esc"])
2725
+ onMouseenter: h,
2726
+ onMouseleave: p,
2727
+ onFocus: h,
2728
+ onBlur: p,
2729
+ onKeydown: Ce(p, ["esc"])
2709
2730
  }, [
2710
- X(k.$slots, "default", {}, void 0, !0)
2731
+ X(M.$slots, "default", {}, void 0, !0)
2711
2732
  ], 40, e2),
2712
2733
  (f(), ee(Ze, { to: "body" }, [
2713
2734
  j(Se, { name: "tooltip-fade" }, {
2714
2735
  default: Q(() => [
2715
- a.value ? (f(), g("div", {
2736
+ a.value ? (f(), b("div", {
2716
2737
  key: 0,
2717
2738
  ref_key: "tooltipRef",
2718
- ref: r,
2739
+ ref: l,
2719
2740
  id: o,
2720
2741
  class: "tooltip-content",
2721
2742
  role: "tooltip",
2722
2743
  "aria-live": "polite",
2723
2744
  "aria-hidden": !a.value,
2724
2745
  "data-placement": n.placement,
2725
- style: Le(i.value)
2746
+ style: Le(r.value)
2726
2747
  }, [
2727
- _[0] || (_[0] = L("div", { class: "tooltip-arrow" }, null, -1)),
2728
- X(k.$slots, "content", {}, () => [
2748
+ S[0] || (S[0] = L("div", { class: "tooltip-arrow" }, null, -1)),
2749
+ X(M.$slots, "content", {}, () => [
2729
2750
  be(K(e.content), 1)
2730
2751
  ], !0)
2731
2752
  ], 12, t2)) : N("", !0)
@@ -2755,37 +2776,37 @@ const l2 = {
2755
2776
  },
2756
2777
  emits: ["click", "remove"],
2757
2778
  setup(e, { emit: n }) {
2758
- const t = e, a = n, o = w(), u = H(() => t.clickable || t.as === "button" || t.as === "a"), r = H(() => [
2779
+ const t = e, a = n, o = w(), i = V(() => t.clickable || t.as === "button" || t.as === "a"), l = V(() => [
2759
2780
  `ui-tag--${t.variant}`,
2760
2781
  `ui-tag--${t.size}`,
2761
2782
  {
2762
2783
  "is-clickable": t.clickable,
2763
2784
  "is-removable": t.removable
2764
2785
  }
2765
- ]), i = H(() => t.clickable && t.as !== "button" && t.as !== "a"), s = (l) => {
2766
- t.disabled || !u.value || a("click", l);
2786
+ ]), r = V(() => t.clickable && t.as !== "button" && t.as !== "a"), s = (u) => {
2787
+ t.disabled || !i.value || a("click", u);
2767
2788
  }, d = () => a("remove");
2768
- return (l, p) => (f(), ee(Re(e.as), {
2789
+ return (u, h) => (f(), ee(Re(e.as), {
2769
2790
  ref_key: "rootRef",
2770
2791
  ref: o,
2771
- class: ue(["ui-tag", r.value]),
2792
+ class: ue(["ui-tag", l.value]),
2772
2793
  "aria-disabled": e.disabled || void 0,
2773
- tabindex: e.disabled ? -1 : i.value ? 0 : void 0,
2774
- role: i.value ? "button" : void 0,
2794
+ tabindex: e.disabled ? -1 : r.value ? 0 : void 0,
2795
+ role: r.value ? "button" : void 0,
2775
2796
  onClick: s,
2776
2797
  onKeydown: [
2777
- p[0] || (p[0] = Ce(ie((m) => !e.disabled && u.value && s(m), ["prevent"]), ["enter"])),
2778
- p[1] || (p[1] = Ce(ie((m) => !e.disabled && u.value && s(m), ["prevent"]), ["space"]))
2798
+ h[0] || (h[0] = Ce(ie((p) => !e.disabled && i.value && s(p), ["prevent"]), ["enter"])),
2799
+ h[1] || (h[1] = Ce(ie((p) => !e.disabled && i.value && s(p), ["prevent"]), ["space"]))
2779
2800
  ]
2780
2801
  }, {
2781
2802
  default: Q(() => [
2782
- l.$slots.icon ? (f(), g("span", l2, [
2783
- X(l.$slots, "icon", {}, void 0, !0)
2803
+ u.$slots.icon ? (f(), b("span", l2, [
2804
+ X(u.$slots, "icon", {}, void 0, !0)
2784
2805
  ])) : N("", !0),
2785
2806
  L("span", r2, [
2786
- X(l.$slots, "default", {}, void 0, !0)
2807
+ X(u.$slots, "default", {}, void 0, !0)
2787
2808
  ]),
2788
- e.removable ? (f(), g("button", {
2809
+ e.removable ? (f(), b("button", {
2789
2810
  key: 1,
2790
2811
  class: "ui-tag__remove",
2791
2812
  type: "button",
@@ -2811,14 +2832,14 @@ const l2 = {
2811
2832
  },
2812
2833
  emits: ["click"],
2813
2834
  setup(e, { emit: n }) {
2814
- const t = e, a = n, o = (u) => {
2815
- if (t.disabled || u.button !== 0) {
2816
- u.preventDefault();
2835
+ const t = e, a = n, o = (i) => {
2836
+ if (t.disabled || i.button !== 0) {
2837
+ i.preventDefault();
2817
2838
  return;
2818
2839
  }
2819
- a("click", u);
2840
+ a("click", i);
2820
2841
  };
2821
- return (u, r) => (f(), g("a", {
2842
+ return (i, l) => (f(), b("a", {
2822
2843
  class: "link",
2823
2844
  href: e.disabled ? void 0 : e.href,
2824
2845
  "aria-disabled": e.disabled ? "true" : void 0,
@@ -2828,22 +2849,22 @@ const l2 = {
2828
2849
  "aria-current": e.ariaCurrent,
2829
2850
  rel: e.target === "_blank" ? "noopener noreferrer" : void 0
2830
2851
  }, [
2831
- X(u.$slots, "default", {}, void 0, !0)
2852
+ X(i.$slots, "default", {}, void 0, !0)
2832
2853
  ], 8, c2));
2833
2854
  }
2834
2855
  }), hl = /* @__PURE__ */ W(d2, [["__scopeId", "data-v-0f5d7308"]]), Ee = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ? { type: "letter" } : n === "*" ? { type: "alphanumeric" } : { type: "literal", value: n }), wt = (e, n) => n.type === "digit" ? /\d/.test(e) : n.type === "letter" ? /[a-z]/i.test(e) : n.type === "alphanumeric" ? /[a-z0-9]/i.test(e) : !1, ft = (e, n) => {
2835
2856
  if (!e) return "";
2836
2857
  const t = Ee(n);
2837
2858
  let a = "", o = 0;
2838
- for (const u of t) {
2839
- if (u.type === "literal") {
2840
- o < e.length && (a += u.value);
2859
+ for (const i of t) {
2860
+ if (i.type === "literal") {
2861
+ o < e.length && (a += i.value);
2841
2862
  continue;
2842
2863
  }
2843
2864
  for (; o < e.length; ) {
2844
- const r = e[o++];
2845
- if (r && wt(r, u)) {
2846
- a += r;
2865
+ const l = e[o++];
2866
+ if (l && wt(l, i)) {
2867
+ a += l;
2847
2868
  break;
2848
2869
  }
2849
2870
  }
@@ -2851,11 +2872,11 @@ const l2 = {
2851
2872
  }
2852
2873
  return a;
2853
2874
  }, v2 = (e, n) => {
2854
- const a = Ee(n).filter((i) => i.type !== "literal");
2855
- let o = "", u = 0, r = 0;
2856
- for (; u < e.length && r < a.length; ) {
2857
- const i = e[u], s = a[r];
2858
- s && wt(i, s) && (o += i, r++), u++;
2875
+ const a = Ee(n).filter((r) => r.type !== "literal");
2876
+ let o = "", i = 0, l = 0;
2877
+ for (; i < e.length && l < a.length; ) {
2878
+ const r = e[i], s = a[l];
2879
+ s && wt(r, s) && (o += r, l++), i++;
2859
2880
  }
2860
2881
  return o;
2861
2882
  }, f2 = (e, n) => e.slice(0, n).replace(/\D/g, "").length, p2 = (e, n) => {
@@ -2870,10 +2891,10 @@ const l2 = {
2870
2891
  for (; n > 0 && n < a.length && a[n - 1]?.type === "literal"; )
2871
2892
  n += t;
2872
2893
  return n;
2873
- }, nt = (e, n, t, a) => H(() => {
2894
+ }, nt = (e, n, t, a) => V(() => {
2874
2895
  const o = [];
2875
2896
  return e.invalid && e.errorMessage && o.push(t), n.hint && o.push(a), o.length > 0 ? o.join(" ") : void 0;
2876
- }), Oe = (e) => H(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), C2 = (e) => H(() => e.disabled === !0 ? "true" : void 0), h2 = (e, n, t) => {
2897
+ }), qe = (e) => V(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), C2 = (e) => V(() => e.disabled === !0 ? "true" : void 0), h2 = (e, n, t) => {
2877
2898
  n && (n.classList.add("focused"), t("focus", e));
2878
2899
  }, g2 = (e, n, t, a) => {
2879
2900
  Je(n, t), t && (t?.classList.remove("focused"), a("blur", e));
@@ -2885,7 +2906,7 @@ const l2 = {
2885
2906
  hintId: {}
2886
2907
  },
2887
2908
  setup(e) {
2888
- return (n, t) => n.$slots.default ? (f(), g("p", {
2909
+ return (n, t) => n.$slots.default ? (f(), b("p", {
2889
2910
  key: 0,
2890
2911
  id: e.hintId,
2891
2912
  class: "visually-hidden"
@@ -2900,7 +2921,7 @@ const l2 = {
2900
2921
  isRequired: {}
2901
2922
  },
2902
2923
  setup(e) {
2903
- return (n, t) => e.isRequired ? (f(), g("p", {
2924
+ return (n, t) => e.isRequired ? (f(), b("p", {
2904
2925
  key: 0,
2905
2926
  id: `${e.baseId}-required-hint`,
2906
2927
  class: "visually-hidden"
@@ -2914,7 +2935,7 @@ const l2 = {
2914
2935
  errorMessage: {}
2915
2936
  },
2916
2937
  setup(e) {
2917
- return (n, t) => e.invalid && e.errorMessage ? (f(), g("p", {
2938
+ return (n, t) => e.invalid && e.errorMessage ? (f(), b("p", {
2918
2939
  key: 0,
2919
2940
  id: e.errorId,
2920
2941
  class: "error-text",
@@ -2938,42 +2959,42 @@ const l2 = {
2938
2959
  }),
2939
2960
  emits: /* @__PURE__ */ oe(["focus", "blur"], ["update:modelValue"]),
2940
2961
  setup(e, { emit: n }) {
2941
- const t = he(e, "modelValue"), a = e, o = n, u = tt(), r = w(null), i = fe(), s = `${i}-error`, d = `${i}-hint`, l = Oe(u).value, p = w(!1), m = H(() => t.value !== null && t.value !== void 0 && t.value !== ""), b = H(() => l ? `${d} ${i}-required-hint` : d), y = H(() => a.invalid === !0 && a.errorMessage ? s : void 0), k = H(() => a.type === "password" ? I.value ? "text" : "password" : a.type), _ = H(() => {
2942
- const { type: A, ...$ } = u;
2943
- return $;
2944
- }), B = H(() => a.mask ? ft(String(t.value ?? ""), a.mask) : String(t.value ?? "")), M = H(() => Ee(a.mask ?? "").filter((A) => A.type !== "literal").length), I = w(!1), C = () => I.value = !I.value, R = (A) => {
2962
+ const t = he(e, "modelValue"), a = e, o = n, i = tt(), l = w(null), r = fe(), s = `${r}-error`, d = `${r}-hint`, u = qe(i).value, h = w(!1), p = V(() => t.value !== null && t.value !== void 0 && t.value !== ""), m = V(() => u ? `${d} ${r}-required-hint` : d), C = V(() => a.invalid === !0 && a.errorMessage ? s : void 0), M = V(() => a.type === "password" ? H.value ? "text" : "password" : a.type), S = V(() => {
2963
+ const { type: A, ...I } = i;
2964
+ return I;
2965
+ }), $ = V(() => a.mask ? ft(String(t.value ?? ""), a.mask) : String(t.value ?? "")), k = V(() => Ee(a.mask ?? "").filter((A) => A.type !== "literal").length), H = w(!1), g = () => H.value = !H.value, R = (A) => {
2945
2966
  if (!a.mask) return;
2946
- const $ = A.target, V = $.selectionStart ?? 0;
2947
- r.value = {
2948
- rawCaret: f2($.value, V),
2967
+ const I = A.target, B = I.selectionStart ?? 0;
2968
+ l.value = {
2969
+ rawCaret: f2(I.value, B),
2949
2970
  inputType: A.inputType
2950
2971
  };
2951
2972
  }, F = (A) => {
2952
- const $ = A.target;
2953
- let V = a.mask ? v2($.value, a.mask) : $.value;
2954
- a.mask && (V = V.slice(0, M.value));
2955
- const O = a.mask ? ft(V, a.mask) : V;
2956
- if ($.value = O, t.value = a.type === "number" ? Number(V) : V, a.mask && r.value) {
2957
- let { rawCaret: te, inputType: ae } = r.value;
2973
+ const I = A.target;
2974
+ let B = a.mask ? v2(I.value, a.mask) : I.value;
2975
+ a.mask && (B = B.slice(0, k.value));
2976
+ const q = a.mask ? ft(B, a.mask) : B;
2977
+ if (I.value = q, t.value = a.type === "number" ? Number(B) : B, a.mask && l.value) {
2978
+ let { rawCaret: te, inputType: ae } = l.value;
2958
2979
  ae.startsWith("insert") && te++, ae === "deleteContentBackward" && (te = Math.max(0, te - 1));
2959
- let ce = p2(O, te);
2960
- ce = m2(a.mask, ce, 1), $.setSelectionRange(ce, ce);
2980
+ let ce = p2(q, te);
2981
+ ce = m2(a.mask, ce, 1), I.setSelectionRange(ce, ce);
2961
2982
  }
2962
- r.value = null;
2983
+ l.value = null;
2963
2984
  }, G = (A) => {
2964
2985
  if (!a.mask || A.key !== "Backspace") return;
2965
- const $ = A.target;
2966
- let V = $.selectionStart ?? 0;
2967
- const O = Ee(a.mask);
2968
- for (; V > 0 && O[V - 1]?.type === "literal"; ) V--;
2969
- requestAnimationFrame(() => $.setSelectionRange(V, V));
2986
+ const I = A.target;
2987
+ let B = I.selectionStart ?? 0;
2988
+ const q = Ee(a.mask);
2989
+ for (; B > 0 && q[B - 1]?.type === "literal"; ) B--;
2990
+ requestAnimationFrame(() => I.setSelectionRange(B, B));
2970
2991
  }, D = (A) => {
2971
- p.value = !0, o("focus", A);
2972
- }, S = (A) => {
2973
- p.value = !1, o("blur", A);
2992
+ h.value = !0, o("focus", A);
2993
+ }, _ = (A) => {
2994
+ h.value = !1, o("blur", A);
2974
2995
  };
2975
- return (A, $) => (f(), g("div", {
2976
- class: ue(["input-box", { required: E(l), error: e.invalid, filled: m.value, focused: p.value }])
2996
+ return (A, I) => (f(), b("div", {
2997
+ class: ue(["input-box", { required: E(u), error: e.invalid, filled: p.value, focused: h.value }])
2977
2998
  }, [
2978
2999
  L("label", {
2979
3000
  for: e.id,
@@ -2981,19 +3002,19 @@ const l2 = {
2981
3002
  }, K(e.label), 9, w2),
2982
3003
  L("input", ge({
2983
3004
  id: e.id,
2984
- type: k.value
2985
- }, _.value, {
3005
+ type: M.value
3006
+ }, S.value, {
2986
3007
  class: "input",
2987
3008
  onBeforeinput: R,
2988
3009
  onInput: F,
2989
3010
  onFocus: D,
2990
- onBlur: S,
3011
+ onBlur: _,
2991
3012
  onKeydown: G,
2992
- value: B.value,
2993
- required: E(l),
3013
+ value: $.value,
3014
+ required: E(u),
2994
3015
  "aria-invalid": e.invalid ? "true" : void 0,
2995
- "aria-errormessage": y.value,
2996
- "aria-describedby": E(nt)(A.$props, A.$slots, s, b.value).value
3016
+ "aria-errormessage": C.value,
3017
+ "aria-describedby": E(nt)(A.$props, A.$slots, s, m.value).value
2997
3018
  }), null, 16, M2),
2998
3019
  j(ot, { hintId: d }, {
2999
3020
  default: Q(() => [
@@ -3002,8 +3023,8 @@ const l2 = {
3002
3023
  _: 3
3003
3024
  }),
3004
3025
  j(lt, {
3005
- baseId: E(i),
3006
- isRequired: E(l)
3026
+ baseId: E(r),
3027
+ isRequired: E(u)
3007
3028
  }, null, 8, ["baseId", "isRequired"]),
3008
3029
  j(rt, {
3009
3030
  errorId: s,
@@ -3013,12 +3034,12 @@ const l2 = {
3013
3034
  e.type === "password" ? (f(), ee(ke, ge({ key: 0 }, Object.keys(A.$attrs).includes("disabled") ? { disabled: !0 } : void 0, {
3014
3035
  type: "button",
3015
3036
  class: "btn-icon",
3016
- onClick: C,
3017
- "aria-label": I.value ? "Hide password" : "Show password"
3037
+ onClick: g,
3038
+ "aria-label": H.value ? "Hide password" : "Show password"
3018
3039
  }), {
3019
3040
  default: Q(() => [
3020
3041
  j(pe, {
3021
- name: I.value ? "eyeOff" : "eye"
3042
+ name: H.value ? "eyeOff" : "eye"
3022
3043
  }, null, 8, ["name"])
3023
3044
  ]),
3024
3045
  _: 1
@@ -3042,15 +3063,15 @@ const l2 = {
3042
3063
  shape: { default: "circle" }
3043
3064
  },
3044
3065
  setup(e) {
3045
- const n = e, t = w("loading"), a = H(() => n.src && t.value !== "error"), o = H(() => n.name ? n.name.split(" ").map((s) => s[0]).slice(0, 2).join("").toUpperCase() : ""), u = H(() => n.alt ? n.alt : n.name ? n.name : "Avatar"), r = () => t.value = "loaded", i = () => t.value = "error";
3066
+ const n = e, t = w("loading"), a = V(() => n.src && t.value !== "error"), o = V(() => n.name ? n.name.split(" ").map((s) => s[0]).slice(0, 2).join("").toUpperCase() : ""), i = V(() => n.alt ? n.alt : n.name ? n.name : "Avatar"), l = () => t.value = "loaded", r = () => t.value = "error";
3046
3067
  return J(
3047
3068
  () => n.src,
3048
3069
  () => n.src && (t.value = "loading")
3049
- ), se(() => !n.src && (t.value = "error")), (s, d) => (f(), g("div", {
3070
+ ), se(() => !n.src && (t.value = "error")), (s, d) => (f(), b("div", {
3050
3071
  class: "ui-avatar",
3051
3072
  "data-size": e.size,
3052
3073
  "data-shape": e.shape,
3053
- "aria-label": a.value ? void 0 : u.value,
3074
+ "aria-label": a.value ? void 0 : i.value,
3054
3075
  "aria-busy": t.value === "loading" || void 0
3055
3076
  }, [
3056
3077
  a.value ? (f(), ee(De, {
@@ -3058,9 +3079,9 @@ const l2 = {
3058
3079
  src: e.src,
3059
3080
  alt: e.alt ?? "",
3060
3081
  class: "ui-avatar__img",
3061
- onLoad: r,
3062
- onError: i
3063
- }, null, 8, ["src", "alt"])) : t.value === "loading" ? (f(), g("div", $2)) : (f(), g("div", I2, [
3082
+ onLoad: l,
3083
+ onError: r
3084
+ }, null, 8, ["src", "alt"])) : t.value === "loading" ? (f(), b("div", $2)) : (f(), b("div", I2, [
3064
3085
  X(s.$slots, "default", {}, () => [
3065
3086
  be(K(o.value), 1)
3066
3087
  ], !0)
@@ -3081,11 +3102,11 @@ const l2 = {
3081
3102
  }),
3082
3103
  emits: /* @__PURE__ */ oe(["focus", "blur", "change", "click"], ["update:modelValue"]),
3083
3104
  setup(e, { emit: n }) {
3084
- const t = he(e, "modelValue"), a = e, o = n, u = w(!1);
3085
- J(u, (q) => {
3086
- q ? document.addEventListener("mousedown", ae) : document.removeEventListener("mousedown", ae);
3105
+ const t = he(e, "modelValue"), a = e, o = n, i = w(!1);
3106
+ J(i, (O) => {
3107
+ O ? document.addEventListener("mousedown", ae) : document.removeEventListener("mousedown", ae);
3087
3108
  });
3088
- const r = tt(), i = w(!1), s = w(null), d = H(() => a.id ?? fe()), l = `${d.value}-label`, p = `${d.value}-listbox`, m = `${d.value}-error`, b = `${d.value}-hint`, y = `${d.value}-value`, k = w(null), _ = w(null), B = H(() => t.value !== null && t.value !== void 0 && t.value !== ""), M = H(() => k.value !== null ? `${p}-option-${k.value}` : void 0), I = Oe(r).value, C = H(() => I ? `${b} ${d.value}-required-hint` : b), R = H(() => u.value && M.value ? M.value : void 0), F = H(() => _.value !== null ? a.options[_.value]?.value : "");
3109
+ const l = tt(), r = w(!1), s = w(null), d = V(() => a.id ?? fe()), u = `${d.value}-label`, h = `${d.value}-listbox`, p = `${d.value}-error`, m = `${d.value}-hint`, C = `${d.value}-value`, M = w(null), S = w(null), $ = V(() => t.value !== null && t.value !== void 0 && t.value !== ""), k = V(() => M.value !== null ? `${h}-option-${M.value}` : void 0), H = qe(l).value, g = V(() => H ? `${m} ${d.value}-required-hint` : m), R = V(() => i.value && k.value ? k.value : void 0), F = V(() => S.value !== null ? a.options[S.value]?.value : "");
3089
3110
  J(
3090
3111
  () => t.value,
3091
3112
  () => ce()
@@ -3094,56 +3115,56 @@ const l2 = {
3094
3115
  () => ce(),
3095
3116
  { deep: !0 }
3096
3117
  );
3097
- const G = (q) => {
3098
- i.value = !0, o("focus", q);
3099
- }, D = (q) => {
3100
- const c = q.relatedTarget, v = s.value;
3101
- !v || v?.contains(c) || (i.value = !1, u.value = !1, o("blur", q));
3102
- }, S = (q) => {
3103
- u.value = !u.value, u.value && t.value.toString().length > 0 && (k.value = k.value ?? a.options.findIndex((c) => !c.disabled)), !(!a.options || a.options.length === 0) && o("click", q);
3104
- }, A = (q, c) => {
3118
+ const G = (O) => {
3119
+ r.value = !0, o("focus", O);
3120
+ }, D = (O) => {
3121
+ const c = O.relatedTarget, v = s.value;
3122
+ !v || v?.contains(c) || (r.value = !1, i.value = !1, o("blur", O));
3123
+ }, _ = (O) => {
3124
+ i.value = !i.value, i.value && t.value.toString().length > 0 && (M.value = M.value ?? a.options.findIndex((c) => !c.disabled)), !(!a.options || a.options.length === 0) && o("click", O);
3125
+ }, A = (O, c) => {
3105
3126
  const v = s.value;
3106
- !v || q.disabled || (_.value = c, k.value = c, q && q.key && q.key.toString().length > 0 ? v.classList.add("filled") : v.classList.remove("filled"), t.value = q.key, o("change", q.key));
3107
- }, $ = (q) => {
3108
- if (!u.value && ["ArrowDown", "ArrowUp"].includes(q.key)) {
3109
- u.value = !0, k.value = k.value ?? a.options.findIndex((c) => !c.disabled), q.preventDefault();
3127
+ !v || O.disabled || (S.value = c, M.value = c, O && O.key && O.key.toString().length > 0 ? v.classList.add("filled") : v.classList.remove("filled"), t.value = O.key, o("change", O.key));
3128
+ }, I = (O) => {
3129
+ if (!i.value && ["ArrowDown", "ArrowUp"].includes(O.key)) {
3130
+ i.value = !0, M.value = M.value ?? a.options.findIndex((c) => !c.disabled), O.preventDefault();
3110
3131
  return;
3111
3132
  }
3112
- if (u.value) {
3113
- if (q.key === "ArrowDown" && (V(1), q.preventDefault()), q.key === "ArrowUp" && (V(-1), q.preventDefault()), q.key === "Home") {
3114
- const c = O();
3115
- c >= 0 && (k.value = c), q.preventDefault();
3133
+ if (i.value) {
3134
+ if (O.key === "ArrowDown" && (B(1), O.preventDefault()), O.key === "ArrowUp" && (B(-1), O.preventDefault()), O.key === "Home") {
3135
+ const c = q();
3136
+ c >= 0 && (M.value = c), O.preventDefault();
3116
3137
  }
3117
- if (q.key === "End") {
3138
+ if (O.key === "End") {
3118
3139
  const c = te();
3119
- c >= 0 && (k.value = c), q.preventDefault();
3140
+ c >= 0 && (M.value = c), O.preventDefault();
3120
3141
  }
3121
- if (q.key === "Enter" || q.key === " ") {
3122
- if (k.value === null) return;
3123
- const c = a.options[k.value];
3142
+ if (O.key === "Enter" || O.key === " ") {
3143
+ if (M.value === null) return;
3144
+ const c = a.options[M.value];
3124
3145
  if (!c || c.disabled) return;
3125
- A(c, k.value), u.value = !1, q.preventDefault();
3146
+ A(c, M.value), i.value = !1, O.preventDefault();
3126
3147
  }
3127
- q.key === "Escape" && (u.value = !1);
3148
+ O.key === "Escape" && (i.value = !1);
3128
3149
  }
3129
- }, V = (q) => {
3130
- if (k.value === null) return;
3131
- let c = k.value;
3150
+ }, B = (O) => {
3151
+ if (M.value === null) return;
3152
+ let c = M.value;
3132
3153
  do
3133
- c += q;
3154
+ c += O;
3134
3155
  while (c >= 0 && c < a.options.length && a.options[c]?.disabled);
3135
- c >= 0 && c < a.options.length && (k.value = c);
3136
- }, O = () => a.options.findIndex((q) => !q.disabled), te = () => [...a.options].reverse().findIndex((q) => !q.disabled) >= 0 ? a.options.length - 1 - [...a.options].reverse().findIndex((q) => !q.disabled) : -1, ae = (q) => {
3156
+ c >= 0 && c < a.options.length && (M.value = c);
3157
+ }, q = () => a.options.findIndex((O) => !O.disabled), te = () => [...a.options].reverse().findIndex((O) => !O.disabled) >= 0 ? a.options.length - 1 - [...a.options].reverse().findIndex((O) => !O.disabled) : -1, ae = (O) => {
3137
3158
  const c = s.value;
3138
- !c || c.contains(q.target) || (u.value = !1);
3159
+ !c || c.contains(O.target) || (i.value = !1);
3139
3160
  };
3140
3161
  _e(() => {
3141
3162
  document.removeEventListener("mousedown", ae);
3142
3163
  });
3143
3164
  const ce = () => {
3144
- const q = a.options.findIndex((c) => c.key === t.value);
3145
- if (q > -1) {
3146
- _.value = q, k.value = q;
3165
+ const O = a.options.findIndex((c) => c.key === t.value);
3166
+ if (O > -1) {
3167
+ S.value = O, M.value = O;
3147
3168
  const c = s.value;
3148
3169
  c && c.classList.add("filled");
3149
3170
  }
@@ -3153,38 +3174,38 @@ const l2 = {
3153
3174
  if (!a.options || a.options.length === 0) return;
3154
3175
  ce();
3155
3176
  }
3156
- }), (q, c) => (f(), g("div", {
3177
+ }), (O, c) => (f(), b("div", {
3157
3178
  ref_key: "selectRef",
3158
3179
  ref: s,
3159
- class: ue(["select-box", { required: Object.keys(q.$attrs).includes("required"), error: e.invalid, filled: B.value, focused: i.value }])
3180
+ class: ue(["select-box", { required: Object.keys(O.$attrs).includes("required"), error: e.invalid, filled: $.value, focused: r.value }])
3160
3181
  }, [
3161
3182
  L("button", ge({
3162
3183
  id: d.value,
3163
3184
  class: "select-btn",
3164
3185
  role: "combobox",
3165
3186
  type: "button"
3166
- }, q.$attrs, {
3187
+ }, O.$attrs, {
3167
3188
  "aria-haspopup": "listbox",
3168
- "aria-expanded": u.value,
3169
- "aria-controls": p,
3189
+ "aria-expanded": i.value,
3190
+ "aria-controls": h,
3170
3191
  "aria-invalid": e.invalid ? "true" : void 0,
3171
- "aria-labelledby": `${l} ${y}`,
3172
- "aria-required": E(I),
3173
- "aria-describedby": E(nt)(q.$props, q.$slots, m, C.value).value,
3192
+ "aria-labelledby": `${u} ${C}`,
3193
+ "aria-required": E(H),
3194
+ "aria-describedby": E(nt)(O.$props, O.$slots, p, g.value).value,
3174
3195
  "aria-activedescendant": R.value,
3175
- "aria-disabled": E(r).disabled ? "true" : void 0,
3196
+ "aria-disabled": E(l).disabled ? "true" : void 0,
3176
3197
  onBlur: D,
3177
3198
  onFocus: G,
3178
- onClick: S,
3179
- onKeydown: $,
3199
+ onClick: _,
3200
+ onKeydown: I,
3180
3201
  ref: "buttonRef"
3181
3202
  }), [
3182
3203
  L("span", {
3183
- id: l,
3204
+ id: u,
3184
3205
  class: "label"
3185
3206
  }, K(e.label), 1),
3186
3207
  L("span", {
3187
- id: y,
3208
+ id: C,
3188
3209
  class: "selected-object",
3189
3210
  "aria-live": "polite",
3190
3211
  "aria-atomic": "true",
@@ -3198,18 +3219,18 @@ const l2 = {
3198
3219
  j(Se, { name: "select" }, {
3199
3220
  default: Q(() => [
3200
3221
  Ve(L("ul", {
3201
- id: p,
3222
+ id: h,
3202
3223
  role: "listbox",
3203
3224
  class: "options"
3204
3225
  }, [
3205
- (f(!0), g(re, null, ve(e.options, (v, h) => (f(), g("li", {
3206
- id: `${p}-option-${h}`,
3207
- key: h,
3226
+ (f(!0), b(re, null, ve(e.options, (v, y) => (f(), b("li", {
3227
+ id: `${h}-option-${y}`,
3228
+ key: y,
3208
3229
  role: "option",
3209
- class: ue(["option", { "focus-visible": k.value === h }]),
3230
+ class: ue(["option", { "focus-visible": M.value === y }]),
3210
3231
  "aria-disabled": v.disabled,
3211
- "aria-selected": _.value === h,
3212
- onClick: (x) => !v.disabled && A(v, h)
3232
+ "aria-selected": S.value === y,
3233
+ onClick: (x) => !v.disabled && A(v, y)
3213
3234
  }, [
3214
3235
  L("div", {
3215
3236
  class: "option-value",
@@ -3217,23 +3238,23 @@ const l2 = {
3217
3238
  }, null, 8, D2)
3218
3239
  ], 10, A2))), 128))
3219
3240
  ], 512), [
3220
- [et, u.value]
3241
+ [et, i.value]
3221
3242
  ])
3222
3243
  ]),
3223
3244
  _: 1
3224
3245
  }),
3225
- j(ot, { hintId: b }, {
3246
+ j(ot, { hintId: m }, {
3226
3247
  default: Q(() => [
3227
- X(q.$slots, "hint", {}, void 0, !0)
3248
+ X(O.$slots, "hint", {}, void 0, !0)
3228
3249
  ]),
3229
3250
  _: 3
3230
3251
  }),
3231
3252
  j(lt, {
3232
3253
  baseId: d.value,
3233
- isRequired: E(I)
3254
+ isRequired: E(H)
3234
3255
  }, null, 8, ["baseId", "isRequired"]),
3235
3256
  j(rt, {
3236
- errorId: m,
3257
+ errorId: p,
3237
3258
  invalid: e.invalid,
3238
3259
  errorMessage: e.errorMessage
3239
3260
  }, null, 8, ["invalid", "errorMessage"])
@@ -3263,38 +3284,38 @@ const l2 = {
3263
3284
  }),
3264
3285
  emits: /* @__PURE__ */ oe(["change"], ["update:modelValue"]),
3265
3286
  setup(e, { emit: n }) {
3266
- const t = he(e, "modelValue"), a = e, o = n, u = w([]), r = w("next"), i = w(null), s = `gallery-caption-${fe()}`, d = w(null), l = H(() => t.value), p = H(() => a.images[l.value]), m = (M, I) => {
3267
- M && (u.value[I] = M);
3268
- }, b = (M) => {
3269
- M !== l.value && (r.value = M > l.value ? "next" : "prev", t.value = M, o("change", M));
3270
- }, y = () => {
3271
- if (l.value === a.images.length - 1) {
3272
- a.loop && b(0);
3287
+ const t = he(e, "modelValue"), a = e, o = n, i = w([]), l = w("next"), r = w(null), s = `gallery-caption-${fe()}`, d = w(null), u = V(() => t.value), h = V(() => a.images[u.value]), p = (k, H) => {
3288
+ k && (i.value[H] = k);
3289
+ }, m = (k) => {
3290
+ k !== u.value && (l.value = k > u.value ? "next" : "prev", t.value = k, o("change", k));
3291
+ }, C = () => {
3292
+ if (u.value === a.images.length - 1) {
3293
+ a.loop && m(0);
3273
3294
  return;
3274
3295
  }
3275
- b(l.value + 1);
3276
- }, k = () => {
3277
- if (l.value === 0) {
3278
- a.loop && b(a.images.length - 1);
3296
+ m(u.value + 1);
3297
+ }, M = () => {
3298
+ if (u.value === 0) {
3299
+ a.loop && m(a.images.length - 1);
3279
3300
  return;
3280
3301
  }
3281
- b(l.value - 1);
3282
- }, _ = () => {
3283
- d.value && (i.value = d.value.offsetHeight);
3284
- }, B = () => {
3285
- i.value = null;
3302
+ m(u.value - 1);
3303
+ }, S = () => {
3304
+ d.value && (r.value = d.value.offsetHeight);
3305
+ }, $ = () => {
3306
+ r.value = null;
3286
3307
  };
3287
- return J(l, async (M) => {
3308
+ return J(u, async (k) => {
3288
3309
  await Me();
3289
- const I = u.value[M];
3290
- I && I.scrollIntoView({
3310
+ const H = i.value[k];
3311
+ H && H.scrollIntoView({
3291
3312
  behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
3292
3313
  inline: "center",
3293
3314
  block: "nearest"
3294
3315
  });
3295
3316
  }), J(() => a.images, () => {
3296
- u.value = [];
3297
- }), (M, I) => (f(), g("div", {
3317
+ i.value = [];
3318
+ }), (k, H) => (f(), b("div", {
3298
3319
  role: "region",
3299
3320
  class: "rs-gallery",
3300
3321
  "aria-roledescription": "carousel",
@@ -3307,52 +3328,52 @@ const l2 = {
3307
3328
  ref: d,
3308
3329
  tabindex: "0",
3309
3330
  class: "rs-gallery-review",
3310
- style: Le(i.value ? { height: `${i.value}px` } : void 0),
3331
+ style: Le(r.value ? { height: `${r.value}px` } : void 0),
3311
3332
  onKeydown: [
3312
- Ce(ie(k, ["prevent"]), ["left"]),
3313
- Ce(ie(y, ["prevent"]), ["right"])
3333
+ Ce(ie(M, ["prevent"]), ["left"]),
3334
+ Ce(ie(C, ["prevent"]), ["right"])
3314
3335
  ]
3315
3336
  }, [
3316
3337
  j(Se, {
3317
- name: `rs-gallery-slide-${r.value}`,
3338
+ name: `rs-gallery-slide-${l.value}`,
3318
3339
  mode: "out-in",
3319
- onBeforeLeave: _,
3320
- onAfterEnter: B
3340
+ onBeforeLeave: S,
3341
+ onAfterEnter: $
3321
3342
  }, {
3322
3343
  default: Q(() => [
3323
- p.value ? (f(), ee(De, {
3324
- key: p.value.src,
3325
- src: p.value.src,
3326
- alt: p.value.alt || "",
3344
+ h.value ? (f(), ee(De, {
3345
+ key: h.value.src,
3346
+ src: h.value.src,
3347
+ alt: h.value.alt || "",
3327
3348
  transform: e.transform
3328
3349
  }, null, 8, ["src", "alt", "transform"])) : N("", !0)
3329
3350
  ]),
3330
3351
  _: 1
3331
3352
  }, 8, ["name"]),
3332
- X(M.$slots, "overlay", {
3333
- image: p.value,
3334
- index: l.value
3353
+ X(k.$slots, "overlay", {
3354
+ image: h.value,
3355
+ index: u.value
3335
3356
  }, void 0, !0)
3336
3357
  ], 44, R2),
3337
- p.value?.title ? (f(), g("p", {
3358
+ h.value?.title ? (f(), b("p", {
3338
3359
  key: 0,
3339
3360
  id: s,
3340
3361
  class: "rs-gallery-caption"
3341
- }, K(p.value.title), 1)) : N("", !0),
3342
- e.showThumbnails ? (f(), g("ul", T2, [
3343
- (f(!0), g(re, null, ve(e.images, (C, R) => (f(), g("li", {
3344
- key: C.src,
3362
+ }, K(h.value.title), 1)) : N("", !0),
3363
+ e.showThumbnails ? (f(), b("ul", T2, [
3364
+ (f(!0), b(re, null, ve(e.images, (g, R) => (f(), b("li", {
3365
+ key: g.src,
3345
3366
  ref_for: !0,
3346
- ref: (F) => m(F, R),
3347
- "aria-selected": l.value === R
3367
+ ref: (F) => p(F, R),
3368
+ "aria-selected": u.value === R
3348
3369
  }, [
3349
3370
  L("button", {
3350
3371
  type: "button",
3351
- class: ue(["rs-gallery-thumb", { active: l.value === R }]),
3352
- onClick: (F) => b(R)
3372
+ class: ue(["rs-gallery-thumb", { active: u.value === R }]),
3373
+ onClick: (F) => m(R)
3353
3374
  }, [
3354
3375
  j(De, {
3355
- src: C.src,
3376
+ src: g.src,
3356
3377
  alt: `Select image ${R + 1}`,
3357
3378
  transform: e.transformThumbnails
3358
3379
  }, null, 8, ["src", "alt", "transform"])
@@ -3361,7 +3382,7 @@ const l2 = {
3361
3382
  ])) : N("", !0)
3362
3383
  ], 8, S2));
3363
3384
  }
3364
- }), Mt = /* @__PURE__ */ W(z2, [["__scopeId", "data-v-dcfacff6"]]), O2 = ["aria-label"], q2 = ["onClick"], F2 = /* @__PURE__ */ Z({
3385
+ }), Mt = /* @__PURE__ */ W(z2, [["__scopeId", "data-v-dcfacff6"]]), q2 = ["aria-label"], O2 = ["onClick"], F2 = /* @__PURE__ */ Z({
3365
3386
  __name: "GalleryGrid",
3366
3387
  props: {
3367
3388
  images: {},
@@ -3376,27 +3397,27 @@ const l2 = {
3376
3397
  },
3377
3398
  emits: ["change"],
3378
3399
  setup(e) {
3379
- return (n, t) => (f(), g("div", {
3400
+ return (n, t) => (f(), b("div", {
3380
3401
  class: "rs-gallery-grid",
3381
3402
  style: Le({ "--grid-columns": e.columns, "--grid-gap": e.gap }),
3382
3403
  role: "list",
3383
3404
  "aria-label": e.ariaLabel || "Image grid gallery"
3384
3405
  }, [
3385
- (f(!0), g(re, null, ve(e.images, (a, o) => (f(), g("button", {
3406
+ (f(!0), b(re, null, ve(e.images, (a, o) => (f(), b("button", {
3386
3407
  key: a.src,
3387
3408
  type: "button",
3388
3409
  class: "grid-item",
3389
- onClick: (u) => n.$emit("change", o)
3410
+ onClick: (i) => n.$emit("change", o)
3390
3411
  }, [
3391
3412
  j(De, {
3392
3413
  src: a.src,
3393
3414
  alt: a.alt || "",
3394
3415
  transform: e.transform
3395
3416
  }, null, 8, ["src", "alt", "transform"])
3396
- ], 8, q2))), 128))
3397
- ], 12, O2));
3417
+ ], 8, O2))), 128))
3418
+ ], 12, q2));
3398
3419
  }
3399
- }), Lt = /* @__PURE__ */ W(F2, [["__scopeId", "data-v-17067a4b"]]), qe = /* @__PURE__ */ Symbol("ModalContext");
3420
+ }), Lt = /* @__PURE__ */ W(F2, [["__scopeId", "data-v-17067a4b"]]), Oe = /* @__PURE__ */ Symbol("ModalContext");
3400
3421
  let Ye = 0, pt = 0, Xe = null;
3401
3422
  const Qe = Z({
3402
3423
  name: "Modal",
@@ -3414,46 +3435,46 @@ const Qe = Z({
3414
3435
  },
3415
3436
  emits: ["update:open", "opened", "closed"],
3416
3437
  setup(e, { emit: n, slots: t }) {
3417
- const a = w(!1), o = w(e.open), u = fe(), r = `modal-title-${u}`, i = `modal-desc-${u}`;
3418
- J(() => e.open, (p) => o.value = p), J(o, (p) => {
3419
- n("update:open", p), n(p ? "opened" : "closed");
3438
+ const a = w(!1), o = w(e.open), i = fe(), l = `modal-title-${i}`, r = `modal-desc-${i}`;
3439
+ J(() => e.open, (h) => o.value = h), J(o, (h) => {
3440
+ n("update:open", h), n(h ? "opened" : "closed");
3420
3441
  });
3421
- const s = () => o.value = !1, d = H(() => e.motion), l = H(() => e.size);
3422
- return xe(qe, {
3442
+ const s = () => o.value = !1, d = V(() => e.motion), u = V(() => e.size);
3443
+ return xe(Oe, {
3423
3444
  isOpen: o,
3424
3445
  motion: d,
3425
- size: l,
3446
+ size: u,
3426
3447
  close: s,
3427
3448
  closeOnOverlay: e.closeOnOverlay,
3428
- labelId: r,
3429
- descriptionId: i,
3449
+ labelId: l,
3450
+ descriptionId: r,
3430
3451
  hasTitle: a
3431
3452
  }), () => t.default?.();
3432
3453
  }
3433
3454
  }), xt = Z({
3434
3455
  name: "ModalContent",
3435
3456
  setup(e, { slots: n }) {
3436
- const t = de(qe);
3457
+ const t = de(Oe);
3437
3458
  if (!t) throw new Error("ModalContent components must be used inside <Modal>");
3438
- const a = w(null), o = ++Ye, u = (l) => {
3439
- l.key === "Escape" && o === Ye && t.close();
3459
+ const a = w(null), o = ++Ye, i = (u) => {
3460
+ u.key === "Escape" && o === Ye && t.close();
3440
3461
  };
3441
- let r = null;
3442
- const i = (l) => {
3443
- const p = Array.from(
3444
- l.querySelectorAll(
3462
+ let l = null;
3463
+ const r = (u) => {
3464
+ const h = Array.from(
3465
+ u.querySelectorAll(
3445
3466
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
3446
3467
  )
3447
- ).filter((k) => !k.hasAttribute("disabled"));
3448
- if (p.length === 0) {
3449
- l.setAttribute("tabindex", "-1"), l.focus();
3468
+ ).filter((M) => !M.hasAttribute("disabled"));
3469
+ if (h.length === 0) {
3470
+ u.setAttribute("tabindex", "-1"), u.focus();
3450
3471
  return;
3451
3472
  }
3452
- const m = p[0], b = p[p.length - 1], y = (k) => {
3453
- k.key === "Tab" && (k.shiftKey && document.activeElement === m ? (k.preventDefault(), b?.focus()) : !k.shiftKey && document.activeElement === b && (k.preventDefault(), m?.focus()));
3473
+ const p = h[0], m = h[h.length - 1], C = (M) => {
3474
+ M.key === "Tab" && (M.shiftKey && document.activeElement === p ? (M.preventDefault(), m?.focus()) : !M.shiftKey && document.activeElement === m && (M.preventDefault(), p?.focus()));
3454
3475
  };
3455
- l.addEventListener("keydown", y), m?.focus(), r = () => {
3456
- l.removeEventListener("keydown", y), r = null;
3476
+ u.addEventListener("keydown", C), p?.focus(), l = () => {
3477
+ u.removeEventListener("keydown", C), l = null;
3457
3478
  };
3458
3479
  }, s = () => {
3459
3480
  ++pt === 1 && (document.body.style.overflow = "hidden");
@@ -3472,10 +3493,10 @@ const Qe = Z({
3472
3493
  Xe = document.activeElement, s();
3473
3494
  },
3474
3495
  onAfterEnter: () => {
3475
- a.value && (i(a.value), document.addEventListener("keydown", u));
3496
+ a.value && (r(a.value), document.addEventListener("keydown", i));
3476
3497
  },
3477
3498
  onAfterLeave: () => {
3478
- Ye--, document.removeEventListener("keydown", u), r?.(), d(), Xe?.focus(), Xe = null;
3499
+ Ye--, document.removeEventListener("keydown", i), l?.(), d(), Xe?.focus(), Xe = null;
3479
3500
  }
3480
3501
  },
3481
3502
  {
@@ -3494,7 +3515,7 @@ const Qe = Z({
3494
3515
  "aria-labelledby": t.labelId,
3495
3516
  "aria-describedby": t.descriptionId,
3496
3517
  class: ["modal-content", `modal--${t.size.value}`],
3497
- onClick: (l) => l.stopPropagation()
3518
+ onClick: (u) => u.stopPropagation()
3498
3519
  },
3499
3520
  n.default?.()
3500
3521
  )
@@ -3506,7 +3527,7 @@ const Qe = Z({
3506
3527
  }), $t = Z({
3507
3528
  name: "ModalTitle",
3508
3529
  setup(e, { slots: n }) {
3509
- const t = de(qe);
3530
+ const t = de(Oe);
3510
3531
  if (!t) throw new Error("ModalTitle components must be used inside <Modal>");
3511
3532
  return t.hasTitle.value = !0, () => U("h2", { id: t.labelId }, n.default?.());
3512
3533
  }
@@ -3528,7 +3549,7 @@ const Qe = Z({
3528
3549
  }), Vt = Z({
3529
3550
  name: "ModalClose",
3530
3551
  setup() {
3531
- const e = de(qe);
3552
+ const e = de(Oe);
3532
3553
  if (!e) throw new Error("ModalClose components must be used inside <Modal>");
3533
3554
  return () => U(
3534
3555
  "button",
@@ -3562,10 +3583,10 @@ const N2 = /* @__PURE__ */ Z({
3562
3583
  },
3563
3584
  emits: ["change"],
3564
3585
  setup(e) {
3565
- const n = w(0), t = w(!1), a = (u) => {
3566
- n.value = u, t.value = !0;
3586
+ const n = w(0), t = w(!1), a = (i) => {
3587
+ n.value = i, t.value = !0;
3567
3588
  }, o = () => t.value = !1;
3568
- return (u, r) => (f(), g(re, null, [
3589
+ return (i, l) => (f(), b(re, null, [
3569
3590
  j(Lt, {
3570
3591
  images: e.images,
3571
3592
  onChange: a,
@@ -3574,7 +3595,7 @@ const N2 = /* @__PURE__ */ Z({
3574
3595
  }, null, 8, ["images", "aria-label", "transform"]),
3575
3596
  j(E(Qe), {
3576
3597
  open: t.value,
3577
- "onUpdate:open": r[2] || (r[2] = (i) => t.value = i),
3598
+ "onUpdate:open": l[2] || (l[2] = (r) => t.value = r),
3578
3599
  motion: "fade",
3579
3600
  size: "xl"
3580
3601
  }, {
@@ -3584,7 +3605,7 @@ const N2 = /* @__PURE__ */ Z({
3584
3605
  j(E(It), null, {
3585
3606
  default: Q(() => [
3586
3607
  j(E($t), null, {
3587
- default: Q(() => [...r[3] || (r[3] = [
3608
+ default: Q(() => [...l[3] || (l[3] = [
3588
3609
  be("Image Gallery", -1)
3589
3610
  ])]),
3590
3611
  _: 1
@@ -3597,9 +3618,9 @@ const N2 = /* @__PURE__ */ Z({
3597
3618
  default: Q(() => [
3598
3619
  j(Mt, {
3599
3620
  modelValue: n.value,
3600
- "onUpdate:modelValue": r[0] || (r[0] = (i) => n.value = i),
3621
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => n.value = r),
3601
3622
  images: e.images,
3602
- onChange: r[1] || (r[1] = (i) => u.$emit("change", i)),
3623
+ onChange: l[1] || (l[1] = (r) => i.$emit("change", r)),
3603
3624
  onClose: o,
3604
3625
  "aria-label": e.ariaLabel,
3605
3626
  "transform-thumbnails": e.transform
@@ -3629,8 +3650,8 @@ const N2 = /* @__PURE__ */ Z({
3629
3650
  gap: { default: "1rem" }
3630
3651
  },
3631
3652
  setup(e) {
3632
- return (n, t) => (f(), g("div", P2, [
3633
- (f(!0), g(re, null, ve(e.images, (a) => (f(), g("button", {
3653
+ return (n, t) => (f(), b("div", P2, [
3654
+ (f(!0), b(re, null, ve(e.images, (a) => (f(), b("button", {
3634
3655
  key: a.src,
3635
3656
  class: "masonry-item"
3636
3657
  }, [
@@ -3667,17 +3688,17 @@ const N2 = /* @__PURE__ */ Z({
3667
3688
  }),
3668
3689
  emits: /* @__PURE__ */ oe(["change"], ["update:modelValue"]),
3669
3690
  setup(e, { emit: n }) {
3670
- const t = he(e, "modelValue"), a = n, o = H({
3691
+ const t = he(e, "modelValue"), a = n, o = V({
3671
3692
  get: () => t.value ?? 0,
3672
- set: (r) => {
3673
- t.value = r, a("change", r);
3693
+ set: (l) => {
3694
+ t.value = l, a("change", l);
3674
3695
  }
3675
- }), u = (r) => o.value = r;
3676
- return (r, i) => (f(), g("section", j2, [
3696
+ }), i = (l) => o.value = l;
3697
+ return (l, r) => (f(), b("section", j2, [
3677
3698
  e.layout === "carousel" ? (f(), ee(Mt, {
3678
3699
  key: 0,
3679
3700
  modelValue: o.value,
3680
- "onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
3701
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => o.value = s),
3681
3702
  images: e.images,
3682
3703
  loop: e.loop,
3683
3704
  "aria-label": e.ariaLabel,
@@ -3687,9 +3708,9 @@ const N2 = /* @__PURE__ */ Z({
3687
3708
  }, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (f(), ee(Lt, {
3688
3709
  key: 1,
3689
3710
  modelValue: o.value,
3690
- "onUpdate:modelValue": i[1] || (i[1] = (s) => o.value = s),
3711
+ "onUpdate:modelValue": r[1] || (r[1] = (s) => o.value = s),
3691
3712
  images: e.images,
3692
- onSelect: u,
3713
+ onSelect: i,
3693
3714
  columns: e.columns,
3694
3715
  gap: e.gap,
3695
3716
  transform: e.transform,
@@ -3697,14 +3718,14 @@ const N2 = /* @__PURE__ */ Z({
3697
3718
  }, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (f(), ee(N2, {
3698
3719
  key: 2,
3699
3720
  modelValue: o.value,
3700
- "onUpdate:modelValue": i[2] || (i[2] = (s) => o.value = s),
3721
+ "onUpdate:modelValue": r[2] || (r[2] = (s) => o.value = s),
3701
3722
  images: e.images,
3702
3723
  transform: e.transform,
3703
3724
  "aria-label": e.ariaLabel
3704
3725
  }, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (f(), ee(U2, {
3705
3726
  key: 3,
3706
3727
  modelValue: o.value,
3707
- "onUpdate:modelValue": i[3] || (i[3] = (s) => o.value = s),
3728
+ "onUpdate:modelValue": r[3] || (r[3] = (s) => o.value = s),
3708
3729
  images: e.images,
3709
3730
  transform: e.transform,
3710
3731
  "aria-label": e.ariaLabel
@@ -3726,19 +3747,19 @@ const Y2 = ["aria-busy"], X2 = {
3726
3747
  message: {}
3727
3748
  },
3728
3749
  setup(e) {
3729
- const n = e, t = w(0), a = w(null), o = w(n.message || ""), u = () => {
3750
+ const n = e, t = w(0), a = w(null), o = w(n.message || ""), i = () => {
3730
3751
  !n.message || a.value !== null || o.value.length > 0 && (a.value = window.setInterval(() => {
3731
3752
  t.value = t.value % 3 + 1, o.value = `${n.message}${".".repeat(t.value)}`;
3732
3753
  }, 750));
3733
- }, r = () => {
3754
+ }, l = () => {
3734
3755
  a.value !== null && (clearInterval(a.value), a.value = null);
3735
3756
  };
3736
3757
  return J(
3737
3758
  () => n.message,
3738
- (i, s) => {
3739
- i !== s && (o.value = i || "", r());
3759
+ (r, s) => {
3760
+ r !== s && (o.value = r || "", l());
3740
3761
  }
3741
- ), se(u), $e(r), (i, s) => (f(), g("div", {
3762
+ ), se(i), $e(l), (r, s) => (f(), b("div", {
3742
3763
  class: "spinner-container",
3743
3764
  role: "status",
3744
3765
  "aria-live": "polite",
@@ -3748,7 +3769,7 @@ const Y2 = ["aria-busy"], X2 = {
3748
3769
  class: "spinner",
3749
3770
  "aria-hidden": "true"
3750
3771
  }, null, -1)),
3751
- e.message ? (f(), g("span", X2, K(o.value), 1)) : N("", !0),
3772
+ e.message ? (f(), b("span", X2, K(o.value), 1)) : N("", !0),
3752
3773
  L("span", G2, K(e.message || "Loading"), 1)
3753
3774
  ], 8, Y2));
3754
3775
  }
@@ -3776,29 +3797,29 @@ const Y2 = ["aria-busy"], X2 = {
3776
3797
  }),
3777
3798
  emits: /* @__PURE__ */ oe(["change"], ["update:modelValue"]),
3778
3799
  setup(e, { emit: n }) {
3779
- const t = n, a = he(e, "modelValue"), o = e, u = fe(), r = H(() => o.id ?? `checkbox-${u}`), i = w(null), s = C2(o).value, d = H(() => o.required ? !0 : void 0), l = H(() => o.triState && a.value === void 0 ? "mixed" : void 0);
3800
+ const t = n, a = he(e, "modelValue"), o = e, i = fe(), l = V(() => o.id ?? `checkbox-${i}`), r = w(null), s = C2(o).value, d = V(() => o.required ? !0 : void 0), u = V(() => o.triState && a.value === void 0 ? "mixed" : void 0);
3780
3801
  J(
3781
3802
  () => a.value,
3782
- (m) => {
3783
- i.value && (i.value.indeterminate = m === void 0, i.value.checked = m === !0);
3803
+ (p) => {
3804
+ r.value && (r.value.indeterminate = p === void 0, r.value.checked = p === !0);
3784
3805
  },
3785
3806
  { immediate: !0 }
3786
3807
  );
3787
- const p = (m) => {
3808
+ const h = (p) => {
3788
3809
  if (!o.disabled) {
3789
3810
  if (!o.triState) {
3790
- const b = m.target.checked;
3791
- a.value = b, t("change", a.value);
3811
+ const m = p.target.checked;
3812
+ a.value = m, t("change", a.value);
3792
3813
  return;
3793
3814
  }
3794
3815
  a.value === !1 ? a.value = !0 : a.value === !0 ? a.value = void 0 : a.value = !1, t("change", a.value);
3795
3816
  }
3796
3817
  };
3797
- return (m, b) => (f(), g("label", {
3818
+ return (p, m) => (f(), b("label", {
3798
3819
  class: ue(["checkbox-root", { required: d.value, error: e.invalid }])
3799
3820
  }, [
3800
3821
  L("input", {
3801
- id: r.value,
3822
+ id: l.value,
3802
3823
  type: "checkbox",
3803
3824
  class: "checkbox",
3804
3825
  required: d.value,
@@ -3806,19 +3827,19 @@ const Y2 = ["aria-busy"], X2 = {
3806
3827
  disabled: e.disabled,
3807
3828
  "aria-invalid": e.invalid ? "true" : void 0,
3808
3829
  "aria-disabled": E(s),
3809
- "aria-checked": l.value,
3810
- onClick: b[0] || (b[0] = (y) => e.triState ? p(y) : void 0),
3811
- onChange: b[1] || (b[1] = (y) => e.triState ? void 0 : p(y)),
3830
+ "aria-checked": u.value,
3831
+ onClick: m[0] || (m[0] = (C) => e.triState ? h(C) : void 0),
3832
+ onChange: m[1] || (m[1] = (C) => e.triState ? void 0 : h(C)),
3812
3833
  ref_key: "inputRef",
3813
- ref: i
3834
+ ref: r
3814
3835
  }, null, 40, Q2),
3815
3836
  L("span", en, [
3816
- a.value === !0 ? (f(), g("svg", tn, [...b[2] || (b[2] = [
3837
+ a.value === !0 ? (f(), b("svg", tn, [...m[2] || (m[2] = [
3817
3838
  L("path", {
3818
3839
  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",
3819
3840
  fill: "currentColor"
3820
3841
  }, null, -1)
3821
- ])])) : a.value === void 0 ? (f(), g("svg", an, [...b[3] || (b[3] = [
3842
+ ])])) : a.value === void 0 ? (f(), b("svg", an, [...m[3] || (m[3] = [
3822
3843
  L("path", {
3823
3844
  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",
3824
3845
  fill: "currentColor"
@@ -3826,7 +3847,7 @@ const Y2 = ["aria-busy"], X2 = {
3826
3847
  ])])) : N("", !0)
3827
3848
  ]),
3828
3849
  L("span", nn, [
3829
- X(m.$slots, "default", {}, void 0, !0)
3850
+ X(p.$slots, "default", {}, void 0, !0)
3830
3851
  ])
3831
3852
  ], 2));
3832
3853
  }
@@ -3846,15 +3867,15 @@ const Y2 = ["aria-busy"], X2 = {
3846
3867
  }),
3847
3868
  emits: /* @__PURE__ */ oe(["focus", "blur"], ["update:modelValue"]),
3848
3869
  setup(e, { emit: n }) {
3849
- const t = he(e, "modelValue"), a = tt(), o = at(), u = n, r = e, i = w(null), s = w(null), d = fe(), l = `${d}-error`, p = `${d}-hint`, m = Oe(a).value, b = H(() => m ? `${p} ${d}-required-hint` : p), y = nt(r, o, l, b.value).value, k = (B) => {
3850
- Je(i.value, s.value);
3851
- const M = B.target;
3852
- t.value = r.type === "number" ? Number(M.value) : M.value;
3853
- }, _ = H(() => r.invalid === !0 && r.errorMessage ? l : void 0);
3870
+ const t = he(e, "modelValue"), a = tt(), o = at(), i = n, l = e, r = w(null), s = w(null), d = fe(), u = `${d}-error`, h = `${d}-hint`, p = qe(a).value, m = V(() => p ? `${h} ${d}-required-hint` : h), C = nt(l, o, u, m.value).value, M = ($) => {
3871
+ Je(r.value, s.value);
3872
+ const k = $.target;
3873
+ t.value = l.type === "number" ? Number(k.value) : k.value;
3874
+ }, S = V(() => l.invalid === !0 && l.errorMessage ? u : void 0);
3854
3875
  return se(() => {
3855
- Je(i.value, s.value);
3856
- }), (B, M) => (f(), g("div", {
3857
- class: ue(["textarea-box", { required: E(m), error: e.invalid }]),
3876
+ Je(r.value, s.value);
3877
+ }), ($, k) => (f(), b("div", {
3878
+ class: ue(["textarea-box", { required: E(p), error: e.invalid }]),
3858
3879
  ref_key: "inputBoxRef",
3859
3880
  ref: s
3860
3881
  }, [
@@ -3862,31 +3883,31 @@ const Y2 = ["aria-busy"], X2 = {
3862
3883
  for: e.id,
3863
3884
  class: "label"
3864
3885
  }, K(e.label), 9, ln),
3865
- L("textarea", ge({ id: e.id }, B.$attrs, {
3886
+ L("textarea", ge({ id: e.id }, $.$attrs, {
3866
3887
  class: "custom-textarea",
3867
- onFocus: M[0] || (M[0] = (I) => E(h2)(I, s.value, u)),
3868
- onBlur: M[1] || (M[1] = (I) => E(g2)(I, i.value, s.value, u)),
3869
- onInput: k,
3888
+ onFocus: k[0] || (k[0] = (H) => E(h2)(H, s.value, i)),
3889
+ onBlur: k[1] || (k[1] = (H) => E(g2)(H, r.value, s.value, i)),
3890
+ onInput: M,
3870
3891
  value: t.value,
3871
- required: E(m),
3892
+ required: E(p),
3872
3893
  "aria-invalid": e.invalid ? "true" : void 0,
3873
- "aria-errormessage": _.value,
3874
- "aria-describedby": E(y),
3894
+ "aria-errormessage": S.value,
3895
+ "aria-describedby": E(C),
3875
3896
  ref_key: "textareaRef",
3876
- ref: i
3897
+ ref: r
3877
3898
  }), " ", 16, rn),
3878
- j(ot, { hintId: p }, {
3899
+ j(ot, { hintId: h }, {
3879
3900
  default: Q(() => [
3880
- X(B.$slots, "hint", {}, void 0, !0)
3901
+ X($.$slots, "hint", {}, void 0, !0)
3881
3902
  ]),
3882
3903
  _: 3
3883
3904
  }),
3884
3905
  j(lt, {
3885
3906
  baseId: E(d),
3886
- isRequired: E(m)
3907
+ isRequired: E(p)
3887
3908
  }, null, 8, ["baseId", "isRequired"]),
3888
3909
  j(rt, {
3889
- errorId: l,
3910
+ errorId: u,
3890
3911
  invalid: e.invalid,
3891
3912
  errorMessage: e.errorMessage
3892
3913
  }, null, 8, ["invalid", "errorMessage"])
@@ -3901,12 +3922,12 @@ const Y2 = ["aria-busy"], X2 = {
3901
3922
  setup(e) {
3902
3923
  const n = (t, a) => {
3903
3924
  if (!a) return [{ text: t, match: !1 }];
3904
- const o = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), u = new RegExp(o, "ig"), r = [];
3905
- let i = 0;
3906
- return t.replace(u, (s, d) => (d > i && r.push({ text: t.slice(i, d), match: !1 }), r.push({ text: s, match: !0 }), i = d + s.length, s)), i < t.length && r.push({ text: t.slice(i), match: !1 }), r;
3925
+ const o = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new RegExp(o, "ig"), l = [];
3926
+ let r = 0;
3927
+ return t.replace(i, (s, d) => (d > r && l.push({ text: t.slice(r, d), match: !1 }), l.push({ text: s, match: !0 }), r = d + s.length, s)), r < t.length && l.push({ text: t.slice(r), match: !1 }), l;
3907
3928
  };
3908
- return (t, a) => (f(!0), g(re, null, ve(n(e.text, e.query), (o, u) => (f(), g(re, { key: u }, [
3909
- o.match ? (f(), g("mark", un, K(o.text), 1)) : (f(), g("span", cn, K(o.text), 1))
3929
+ return (t, a) => (f(!0), b(re, null, ve(n(e.text, e.query), (o, i) => (f(), b(re, { key: i }, [
3930
+ o.match ? (f(), b("mark", un, K(o.text), 1)) : (f(), b("span", cn, K(o.text), 1))
3910
3931
  ], 64))), 128));
3911
3932
  }
3912
3933
  }), vn = /* @__PURE__ */ W(dn, [["__scopeId", "data-v-edfa70b3"]]), fn = [
@@ -3947,7 +3968,7 @@ const Y2 = ["aria-busy"], X2 = {
3947
3968
  },
3948
3969
  emits: ["valid"],
3949
3970
  setup(e, { emit: n }) {
3950
- const t = e, a = n, o = w([]), u = w(null), r = w(null), i = (b, y) => b && (o.value[y] = b);
3971
+ const t = e, a = n, o = w([]), i = w(null), l = w(null), r = (m, C) => m && (o.value[C] = m);
3951
3972
  J(
3952
3973
  () => t.password,
3953
3974
  () => {
@@ -3962,45 +3983,45 @@ const Y2 = ["aria-busy"], X2 = {
3962
3983
  const s = {
3963
3984
  "--strength-fill-color": t.strengthFillColor
3964
3985
  }, d = () => {
3965
- const b = l(), y = Object.values(p()).every(Boolean);
3966
- return b && y;
3967
- }, l = () => {
3968
- const b = p(), y = Object.values(b).filter(Boolean).length, k = t.password.length >= 12 ? 1 : 0, _ = Math.min(100, (y + k) * 20), B = Math.min(t.labels.length - 1, Math.floor(_ / 25));
3969
- return u.value && (u.value.style.width = `${_}%`), r.value && (r.value.textContent = t.labels[B] ?? "Very weak"), y === t.rules.length;
3986
+ const m = u(), C = Object.values(h()).every(Boolean);
3987
+ return m && C;
3988
+ }, u = () => {
3989
+ const m = h(), C = Object.values(m).filter(Boolean).length, M = t.password.length >= 12 ? 1 : 0, S = Math.min(100, (C + M) * 20), $ = Math.min(t.labels.length - 1, Math.floor(S / 25));
3990
+ return i.value && (i.value.style.width = `${S}%`), l.value && (l.value.textContent = t.labels[$] ?? "Very weak"), C === t.rules.length;
3991
+ }, h = () => {
3992
+ const m = p();
3993
+ return o.value.forEach((C) => {
3994
+ const M = C.dataset.rule, S = !!m[M];
3995
+ C.classList.toggle("passed", S);
3996
+ }), m;
3970
3997
  }, p = () => {
3971
- const b = m();
3972
- return o.value.forEach((y) => {
3973
- const k = y.dataset.rule, _ = !!b[k];
3974
- y.classList.toggle("passed", _);
3975
- }), b;
3976
- }, m = () => {
3977
- const b = {};
3978
- return t.rules.forEach((y) => {
3979
- b[y.key] = y.validator(
3998
+ const m = {};
3999
+ return t.rules.forEach((C) => {
4000
+ m[C.key] = C.validator(
3980
4001
  t.password,
3981
4002
  t.passwordConfirmation
3982
4003
  );
3983
- }), b;
4004
+ }), m;
3984
4005
  };
3985
- return (b, y) => (f(), g("section", pn, [
4006
+ return (m, C) => (f(), b("section", pn, [
3986
4007
  L("ul", mn, [
3987
- (f(!0), g(re, null, ve(t.rules, (k, _) => (f(), g("li", {
3988
- key: k.key,
4008
+ (f(!0), b(re, null, ve(t.rules, (M, S) => (f(), b("li", {
4009
+ key: M.key,
3989
4010
  class: "password-rule",
3990
- "data-rule": k.key,
4011
+ "data-rule": M.key,
3991
4012
  ref_for: !0,
3992
- ref: (B) => i(B, _)
4013
+ ref: ($) => r($, S)
3993
4014
  }, [
3994
- y[0] || (y[0] = L("span", { class: "rule-icon" }, "•", -1)),
3995
- be(" " + K(k.label), 1)
4015
+ C[0] || (C[0] = L("span", { class: "rule-icon" }, "•", -1)),
4016
+ be(" " + K(M.label), 1)
3996
4017
  ], 8, Cn))), 128))
3997
4018
  ]),
3998
4019
  L("div", hn, [
3999
4020
  L("div", gn, [
4000
- y[1] || (y[1] = L("span", null, "Força da senha", -1)),
4021
+ C[1] || (C[1] = L("span", null, "Força da senha", -1)),
4001
4022
  L("span", {
4002
4023
  ref_key: "strengthLabelRef",
4003
- ref: r
4024
+ ref: l
4004
4025
  }, "Muito fraca", 512)
4005
4026
  ]),
4006
4027
  L("div", {
@@ -4010,7 +4031,7 @@ const Y2 = ["aria-busy"], X2 = {
4010
4031
  L("div", {
4011
4032
  class: "strength-fill",
4012
4033
  ref_key: "strengthFillRef",
4013
- ref: u
4034
+ ref: i
4014
4035
  }, null, 512)
4015
4036
  ])
4016
4037
  ])
@@ -4034,31 +4055,31 @@ const bn = {
4034
4055
  separator: { default: "/" }
4035
4056
  },
4036
4057
  setup(e) {
4037
- const n = e, t = de(Zt), a = (i) => i === n.items.length - 1, o = (i, s) => u(i, s), u = (i, s) => a(s) || i.disabled ? "span" : i.to && t ? Dt("RouterLink") : i.href ? "a" : "span", r = (i, s) => a(s) || i.disabled ? { "data-disabled": i.disabled || void 0 } : i.to ? { to: i.to } : i.href ? {
4038
- href: i.href,
4039
- target: i.external ? "_blank" : void 0,
4040
- rel: i.external ? "noopener noreferrer" : void 0,
4041
- "aria-label": i.external ? `${i.label} (opens in a new tab)` : void 0
4058
+ const n = e, t = de(Zt), a = (r) => r === n.items.length - 1, o = (r, s) => i(r, s), i = (r, s) => a(s) || r.disabled ? "span" : r.to && t ? Dt("RouterLink") : r.href ? "a" : "span", l = (r, s) => a(s) || r.disabled ? { "data-disabled": r.disabled || void 0 } : r.to ? { to: r.to } : r.href ? {
4059
+ href: r.href,
4060
+ target: r.external ? "_blank" : void 0,
4061
+ rel: r.external ? "noopener noreferrer" : void 0,
4062
+ "aria-label": r.external ? `${r.label} (opens in a new tab)` : void 0
4042
4063
  } : {};
4043
- return (i, s) => (f(), g("nav", bn, [
4064
+ return (r, s) => (f(), b("nav", bn, [
4044
4065
  L("ol", kn, [
4045
- (f(!0), g(re, null, ve(e.items, (d, l) => (f(), g("li", {
4046
- key: d.to ?? d.href ?? `${d.label}-${l}`,
4066
+ (f(!0), b(re, null, ve(e.items, (d, u) => (f(), b("li", {
4067
+ key: d.to ?? d.href ?? `${d.label}-${u}`,
4047
4068
  class: "ui-breadcrumb__item"
4048
4069
  }, [
4049
- (f(), ee(Re(o(d, l)), ge({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, r(d, l), {
4050
- "aria-posinset": l + 1,
4070
+ (f(), ee(Re(o(d, u)), ge({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, l(d, u), {
4071
+ "aria-posinset": u + 1,
4051
4072
  "aria-setsize": e.items.length,
4052
- "aria-current": a(l) ? "page" : void 0,
4053
- tabindex: a(l) || o(d, l) === "span" ? -1 : void 0
4073
+ "aria-current": a(u) ? "page" : void 0,
4074
+ tabindex: a(u) || o(d, u) === "span" ? -1 : void 0
4054
4075
  }), {
4055
4076
  default: Q(() => [
4056
4077
  be(K(d.label), 1)
4057
4078
  ]),
4058
4079
  _: 2
4059
4080
  }, 1040, ["aria-posinset", "aria-setsize", "aria-current", "tabindex"])),
4060
- a(l) ? N("", !0) : (f(), g("span", wn, [
4061
- X(i.$slots, "separator", {}, () => [
4081
+ a(u) ? N("", !0) : (f(), b("span", wn, [
4082
+ X(r.$slots, "separator", {}, () => [
4062
4083
  be(K(e.separator), 1)
4063
4084
  ], !0)
4064
4085
  ]))
@@ -4088,15 +4109,15 @@ const bn = {
4088
4109
  }),
4089
4110
  emits: ["update:modelValue"],
4090
4111
  setup(e) {
4091
- const n = e, t = he(e, "modelValue"), a = H(() => n.invalid ? "true" : void 0), o = H(() => n.required && !n.disabled ? "true" : void 0), u = H(() => n.disabled ? !0 : void 0);
4092
- return (r, i) => (f(), g("fieldset", {
4112
+ const n = e, t = he(e, "modelValue"), a = V(() => n.invalid ? "true" : void 0), o = V(() => n.required && !n.disabled ? "true" : void 0), i = V(() => n.disabled ? !0 : void 0);
4113
+ return (l, r) => (f(), b("fieldset", {
4093
4114
  class: ue(["radio-group", { "in-column": e.inColumn, btn: e.mode === "button" }]),
4094
4115
  "aria-invalid": a.value,
4095
4116
  "aria-required": o.value,
4096
- disabled: u.value
4117
+ disabled: i.value
4097
4118
  }, [
4098
4119
  L("legend", xn, K(e.name), 1),
4099
- (f(!0), g(re, null, ve(e.options, (s) => (f(), g("label", {
4120
+ (f(!0), b(re, null, ve(e.options, (s) => (f(), b("label", {
4100
4121
  key: s.key,
4101
4122
  class: ue(["radio", { checked: t.value === s.key, disabled: e.disabled || s.disabled }])
4102
4123
  }, [
@@ -4107,11 +4128,11 @@ const bn = {
4107
4128
  value: s.key,
4108
4129
  disabled: e.disabled || s.disabled,
4109
4130
  required: e.required,
4110
- "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d)
4131
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => t.value = d)
4111
4132
  }, null, 8, $n), [
4112
4133
  [_t, t.value]
4113
4134
  ]),
4114
- e.mode === "standard" ? (f(), g("span", In)) : N("", !0),
4135
+ e.mode === "standard" ? (f(), b("span", In)) : N("", !0),
4115
4136
  L("span", Hn, K(s.label), 1)
4116
4137
  ], 2))), 128))
4117
4138
  ], 10, Ln));
@@ -4132,7 +4153,7 @@ const bn = {
4132
4153
  key: 0,
4133
4154
  class: "start-icon",
4134
4155
  "aria-hidden": "true"
4135
- }, On = /* @__PURE__ */ Z({
4156
+ }, qn = /* @__PURE__ */ Z({
4136
4157
  __name: "Autocomplete",
4137
4158
  props: /* @__PURE__ */ oe({
4138
4159
  id: {},
@@ -4158,13 +4179,13 @@ const bn = {
4158
4179
  }),
4159
4180
  emits: /* @__PURE__ */ oe(["change", "select", "focus", "blur"], ["update:modelValue"]),
4160
4181
  setup(e, { emit: n }) {
4161
- const t = e, a = n, o = he(e, "modelValue"), u = w(null), r = w(""), i = w(!1), s = w([]), d = w(null), l = w(null), p = H(() => t.id ? `${t.id}-search-history` : "search-history"), b = `${fe()}-list`, y = w(!1), k = H(() => o.value !== null && o.value !== void 0 && o.value !== ""), _ = H(() => d.value !== null ? `${b}-option-${d.value}` : void 0), B = H(() => i.value && _.value ? _.value : void 0), M = H(() => s.value.length > 0), I = H(() => {
4182
+ const t = e, a = n, o = he(e, "modelValue"), i = w(null), l = w(""), r = w(!1), s = w([]), d = w(null), u = w(null), h = V(() => t.id ? `${t.id}-search-history` : "search-history"), m = `${fe()}-list`, C = w(!1), M = V(() => o.value !== null && o.value !== void 0 && o.value !== ""), S = V(() => d.value !== null ? `${m}-option-${d.value}` : void 0), $ = V(() => r.value && S.value ? S.value : void 0), k = V(() => s.value.length > 0), H = V(() => {
4162
4183
  if (!t.filterable) return t.options;
4163
- const c = r.value.toLowerCase();
4184
+ const c = l.value.toLowerCase();
4164
4185
  return t.options.filter((v) => t.getValue(v).toLowerCase().includes(c));
4165
- }), C = Oe(t).value;
4186
+ }), g = qe(t).value;
4166
4187
  J(
4167
- () => p.value,
4188
+ () => h.value,
4168
4189
  (c) => {
4169
4190
  if (c)
4170
4191
  try {
@@ -4174,97 +4195,97 @@ const bn = {
4174
4195
  }
4175
4196
  },
4176
4197
  { immediate: !0 }
4177
- ), J(i, async (c) => {
4198
+ ), J(r, async (c) => {
4178
4199
  if (!c) {
4179
4200
  d.value = null;
4180
4201
  return;
4181
4202
  }
4182
- I.value.length !== 0 && (await Me(), ae());
4203
+ H.value.length !== 0 && (await Me(), ae());
4183
4204
  }), J(
4184
4205
  () => t.loading,
4185
4206
  async (c) => {
4186
- c || i.value && I.value.length !== 0 && (await Me(), ae());
4207
+ c || r.value && H.value.length !== 0 && (await Me(), ae());
4187
4208
  }
4188
4209
  ), J(
4189
4210
  () => t.options,
4190
4211
  () => {
4191
- o.value || (l.value = null, d.value = null);
4212
+ o.value || (u.value = null, d.value = null);
4192
4213
  }
4193
4214
  );
4194
4215
  const R = (c) => {
4195
- r.value.length >= t.minChars && !t.filterable && !t.loading && (i.value = !0), y.value = !0, a("focus", c);
4216
+ l.value.length >= t.minChars && !t.filterable && !t.loading && (r.value = !0), C.value = !0, a("focus", c);
4196
4217
  }, F = (c) => {
4197
4218
  const v = c.relatedTarget;
4198
- u.value?.contains(v) || (i.value = !1, o.value ? $() : r.value = "", y.value = !1, a("blur", c));
4219
+ i.value?.contains(v) || (r.value = !1, o.value ? I() : l.value = "", C.value = !1, a("blur", c));
4199
4220
  }, G = (c, v) => {
4200
- const h = u.value;
4201
- if (!h || t.isDisabled(c)) return;
4202
- i.value = !1, O(r.value), l.value = v, d.value = v;
4221
+ const y = i.value;
4222
+ if (!y || t.isDisabled(c)) return;
4223
+ r.value = !1, q(l.value), u.value = v, d.value = v;
4203
4224
  const x = t.getKey(c);
4204
- x && x.toString().length > 0 ? h.classList.add("filled") : h.classList.remove("filled"), r.value = t.getValue(c), o.value = x, a("select", x);
4225
+ x && x.toString().length > 0 ? y.classList.add("filled") : y.classList.remove("filled"), l.value = t.getValue(c), o.value = x, a("select", x);
4205
4226
  }, D = (c) => {
4206
- if (!i.value && ["ArrowDown", "ArrowUp"].includes(c.key)) {
4207
- i.value = !0, d.value = d.value ?? I.value.findIndex((v) => !t.isDisabled(v)), c.preventDefault();
4227
+ if (!r.value && ["ArrowDown", "ArrowUp"].includes(c.key)) {
4228
+ r.value = !0, d.value = d.value ?? H.value.findIndex((v) => !t.isDisabled(v)), c.preventDefault();
4208
4229
  return;
4209
4230
  }
4210
- if (i.value) {
4211
- if (c.key === "ArrowDown" && (S(1), c.preventDefault()), c.key === "ArrowUp" && (S(-1), c.preventDefault()), c.key === "Home") {
4231
+ if (r.value) {
4232
+ if (c.key === "ArrowDown" && (_(1), c.preventDefault()), c.key === "ArrowUp" && (_(-1), c.preventDefault()), c.key === "Home") {
4212
4233
  const v = ce();
4213
4234
  v >= 0 && (d.value = v), c.preventDefault();
4214
4235
  }
4215
4236
  if (c.key === "End") {
4216
- const v = q();
4237
+ const v = O();
4217
4238
  v >= 0 && (d.value = v), c.preventDefault();
4218
4239
  }
4219
4240
  if (c.key === "Enter") {
4220
4241
  if (d.value === null) return;
4221
- const v = I.value[d.value];
4242
+ const v = H.value[d.value];
4222
4243
  if (!v || t.isDisabled(v)) return;
4223
- G(v, d.value), i.value = !1, c.preventDefault();
4244
+ G(v, d.value), r.value = !1, c.preventDefault();
4224
4245
  }
4225
- c.key === "Escape" && (i.value = !1);
4246
+ c.key === "Escape" && (r.value = !1);
4226
4247
  }
4227
- }, S = (c) => {
4248
+ }, _ = (c) => {
4228
4249
  if (d.value === null) return;
4229
4250
  let v = d.value;
4230
4251
  do
4231
4252
  v += c;
4232
- while (v >= 0 && v < I.value.length && t.isDisabled(I.value[v]));
4233
- v >= 0 && v < I.value.length && (d.value = v);
4253
+ while (v >= 0 && v < H.value.length && t.isDisabled(H.value[v]));
4254
+ v >= 0 && v < H.value.length && (d.value = v);
4234
4255
  }, A = () => {
4235
- r.value.length === 0 && (o.value = ""), r.value.length >= t.minChars ? (a("change", r.value), i.value = !0) : i.value = !1;
4236
- }, $ = () => {
4256
+ l.value.length === 0 && (o.value = ""), l.value.length >= t.minChars ? (a("change", l.value), r.value = !0) : r.value = !1;
4257
+ }, I = () => {
4237
4258
  if (o.value.toString().length === 0 || !t.options || t.options.length === 0) return;
4238
4259
  const c = t.options.findIndex((v) => t.getKey(v) === o.value);
4239
- c > -1 && (d.value = c, l.value = c, r.value = t.getValue(t.options[c]));
4260
+ c > -1 && (d.value = c, u.value = c, l.value = t.getValue(t.options[c]));
4240
4261
  };
4241
4262
  J(
4242
4263
  [() => t.options.length, () => o.value],
4243
4264
  async ([c, v]) => {
4244
- v && c !== 0 && (await Me(), $());
4265
+ v && c !== 0 && (await Me(), I());
4245
4266
  },
4246
4267
  { flush: "post", immediate: !0 }
4247
4268
  );
4248
- const V = () => {
4249
- r.value = "", o.value = "";
4250
- }, O = (c) => {
4269
+ const B = () => {
4270
+ l.value = "", o.value = "";
4271
+ }, q = (c) => {
4251
4272
  !c || c.trim().length === 0 || (s.value = [
4252
4273
  c,
4253
4274
  ...s.value.filter((v) => v !== c)
4254
- ].slice(0, t.suggestionsLimit), localStorage.setItem(p.value, JSON.stringify(s.value)));
4275
+ ].slice(0, t.suggestionsLimit), localStorage.setItem(h.value, JSON.stringify(s.value)));
4255
4276
  }, te = (c) => {
4256
- r.value = c, A();
4277
+ l.value = c, A();
4257
4278
  }, ae = () => {
4258
4279
  const c = ce();
4259
4280
  c >= 0 && (d.value = c);
4260
- }, ce = () => I.value.findIndex((c) => !t.isDisabled(c)), q = () => {
4261
- for (let c = I.value.length - 1; c >= 0; c--) if (!t.isDisabled(I.value[c])) return c;
4281
+ }, ce = () => H.value.findIndex((c) => !t.isDisabled(c)), O = () => {
4282
+ for (let c = H.value.length - 1; c >= 0; c--) if (!t.isDisabled(H.value[c])) return c;
4262
4283
  return -1;
4263
4284
  };
4264
- return se(() => $()), (c, v) => (f(), g("div", {
4265
- class: ue(["autocomplete", { required: E(C), error: e.invalid, "has-icon": Object.keys(c.$slots).includes("icon"), filled: k.value, focused: y.value }]),
4285
+ return se(() => I()), (c, v) => (f(), b("div", {
4286
+ class: ue(["autocomplete", { required: E(g), error: e.invalid, "has-icon": Object.keys(c.$slots).includes("icon"), filled: M.value, focused: C.value }]),
4266
4287
  ref_key: "autocompleteRef",
4267
- ref: u
4288
+ ref: i
4268
4289
  }, [
4269
4290
  L("label", {
4270
4291
  for: e.id,
@@ -4276,60 +4297,60 @@ const bn = {
4276
4297
  }, c.$attrs, {
4277
4298
  role: "combobox",
4278
4299
  "aria-autocomplete": "list",
4279
- "aria-expanded": i.value,
4280
- "aria-controls": b,
4281
- "aria-activedescendant": B.value,
4282
- "aria-required": E(C),
4300
+ "aria-expanded": r.value,
4301
+ "aria-controls": m,
4302
+ "aria-activedescendant": $.value,
4303
+ "aria-required": E(g),
4283
4304
  "aria-invalid": e.invalid ? "true" : void 0,
4284
4305
  disabled: e.disabled ? !0 : void 0,
4285
4306
  "aria-disabled": e.disabled ? !0 : void 0,
4286
- "onUpdate:modelValue": v[0] || (v[0] = (h) => r.value = h),
4307
+ "onUpdate:modelValue": v[0] || (v[0] = (y) => l.value = y),
4287
4308
  onFocus: R,
4288
4309
  onBlur: F,
4289
4310
  onInput: A,
4290
4311
  onKeydown: D
4291
4312
  }), null, 16, An), [
4292
- [St, r.value]
4313
+ [St, l.value]
4293
4314
  ]),
4294
4315
  j(Se, { name: "select" }, {
4295
4316
  default: Q(() => [
4296
4317
  Ve(L("ul", {
4297
- id: b,
4318
+ id: m,
4298
4319
  role: "listbox",
4299
4320
  class: "options"
4300
4321
  }, [
4301
- I.value.length > 0 ? (f(!0), g(re, { key: 0 }, ve(I.value, (h, x) => (f(), g("li", {
4302
- id: `${b}-option-${x}`,
4303
- key: e.getKey(h),
4322
+ H.value.length > 0 ? (f(!0), b(re, { key: 0 }, ve(H.value, (y, x) => (f(), b("li", {
4323
+ id: `${m}-option-${x}`,
4324
+ key: e.getKey(y),
4304
4325
  role: "option",
4305
4326
  class: ue(["option", { "focus-visible": d.value === x }]),
4306
- "aria-disabled": t.isDisabled(h) || void 0,
4307
- "aria-selected": x === l.value,
4327
+ "aria-disabled": t.isDisabled(y) || void 0,
4328
+ "aria-selected": x === u.value,
4308
4329
  onMousedown: v[1] || (v[1] = ie(() => {
4309
4330
  }, ["prevent"])),
4310
- onClick: (T) => !t.isDisabled(h) && G(h, x)
4331
+ onClick: (T) => !t.isDisabled(y) && G(y, x)
4311
4332
  }, [
4312
- t.isDisabled(h) ? N("", !0) : (f(), ee(pe, {
4333
+ t.isDisabled(y) ? N("", !0) : (f(), ee(pe, {
4313
4334
  key: 0,
4314
4335
  name: "search",
4315
4336
  size: 22
4316
4337
  })),
4317
4338
  X(c.$slots, "option", {
4318
- option: h,
4319
- value: e.getValue(h),
4320
- query: r.value,
4321
- selected: x === l.value,
4339
+ option: y,
4340
+ value: e.getValue(y),
4341
+ query: l.value,
4342
+ selected: x === u.value,
4322
4343
  active: x === d.value
4323
4344
  }, () => [
4324
4345
  L("div", _n, [
4325
4346
  j(vn, {
4326
- text: e.getValue(h),
4327
- query: r.value
4347
+ text: e.getValue(y),
4348
+ query: l.value
4328
4349
  }, null, 8, ["text", "query"])
4329
4350
  ])
4330
4351
  ], !0),
4331
- L("div", Sn, K(e.getValue(h)), 1)
4332
- ], 42, Dn))), 128)) : I.value.length === 0 && !e.loading ? (f(), g("li", Rn, [...v[3] || (v[3] = [
4352
+ L("div", Sn, K(e.getValue(y)), 1)
4353
+ ], 42, Dn))), 128)) : H.value.length === 0 && !e.loading ? (f(), b("li", Rn, [...v[3] || (v[3] = [
4333
4354
  L("div", { class: "option-value" }, "No results found", -1)
4334
4355
  ])])) : (f(), ee(Bt, {
4335
4356
  key: 2,
@@ -4337,29 +4358,29 @@ const bn = {
4337
4358
  role: "status",
4338
4359
  message: "Loading"
4339
4360
  })),
4340
- M.value ? (f(), g("li", Tn, [...v[4] || (v[4] = [
4361
+ k.value ? (f(), b("li", Tn, [...v[4] || (v[4] = [
4341
4362
  L("div", { class: "option-value" }, " Recents ", -1)
4342
4363
  ])])) : N("", !0),
4343
- (f(!0), g(re, null, ve(s.value, (h) => (f(), g("li", {
4344
- key: h,
4364
+ (f(!0), b(re, null, ve(s.value, (y) => (f(), b("li", {
4365
+ key: y,
4345
4366
  role: "presentation",
4346
4367
  "aria-hidden": "true",
4347
4368
  class: "option recent-item",
4348
- onClick: (x) => te(h)
4369
+ onClick: (x) => te(y)
4349
4370
  }, [
4350
4371
  j(pe, { name: "clock" }),
4351
- L("div", Zn, K(h), 1)
4372
+ L("div", Zn, K(y), 1)
4352
4373
  ], 8, En))), 128))
4353
4374
  ], 512), [
4354
- [et, i.value]
4375
+ [et, r.value]
4355
4376
  ])
4356
4377
  ]),
4357
4378
  _: 3
4358
4379
  }),
4359
- c.$slots.icon ? (f(), g("span", zn, [
4380
+ c.$slots.icon ? (f(), b("span", zn, [
4360
4381
  X(c.$slots, "icon", {}, void 0, !0)
4361
4382
  ])) : N("", !0),
4362
- r.value.length > 0 && !e.disabled ? (f(), ee(ke, {
4383
+ l.value.length > 0 && !e.disabled ? (f(), ee(ke, {
4363
4384
  key: 1,
4364
4385
  type: "button",
4365
4386
  class: "btn btn-icon",
@@ -4368,7 +4389,7 @@ const bn = {
4368
4389
  "\\": "",
4369
4390
  onMousedown: v[2] || (v[2] = ie(() => {
4370
4391
  }, ["prevent"])),
4371
- onClick: V
4392
+ onClick: B
4372
4393
  }, {
4373
4394
  default: Q(() => [
4374
4395
  j(pe, {
@@ -4382,7 +4403,7 @@ const bn = {
4382
4403
  })) : N("", !0)
4383
4404
  ], 2));
4384
4405
  }
4385
- }), $l = /* @__PURE__ */ W(On, [["__scopeId", "data-v-75e8a9a2"]]), qn = 5, ye = bt({
4406
+ }), $l = /* @__PURE__ */ W(qn, [["__scopeId", "data-v-75e8a9a2"]]), On = 5, ye = bt({
4386
4407
  toasts: []
4387
4408
  });
4388
4409
  let Fn = 0;
@@ -4393,7 +4414,7 @@ const Ae = (e, n = "info") => {
4393
4414
  ...typeof e == "string" ? { description: e } : e,
4394
4415
  variant: n
4395
4416
  };
4396
- return ye.toasts.push(t), ye.toasts.length > qn && ye.toasts.shift(), t.id;
4417
+ return ye.toasts.push(t), ye.toasts.length > On && ye.toasts.shift(), t.id;
4397
4418
  }, Nn = (e, n) => ye.toasts = ye.toasts.map((t) => t.id === e ? { ...t, ...n, loading: !1 } : t), Il = Object.assign(
4398
4419
  (e) => Ae(e),
4399
4420
  {
@@ -4423,20 +4444,20 @@ const Ae = (e, n = "info") => {
4423
4444
  },
4424
4445
  setup(e) {
4425
4446
  const n = e, t = w(null), a = w("open"), o = w(100);
4426
- let u = Date.now(), r;
4427
- const i = () => {
4428
- const l = Date.now() - u;
4429
- if (o.value = Math.max(0, 100 - l / n.duration * 100), o.value <= 0) {
4447
+ let i = Date.now(), l;
4448
+ const r = () => {
4449
+ const u = Date.now() - i;
4450
+ if (o.value = Math.max(0, 100 - u / n.duration * 100), o.value <= 0) {
4430
4451
  d();
4431
4452
  return;
4432
4453
  }
4433
- r = requestAnimationFrame(i);
4454
+ l = requestAnimationFrame(r);
4434
4455
  }, s = () => {
4435
- if (cancelAnimationFrame(r), n.duration === 1 / 0) {
4456
+ if (cancelAnimationFrame(l), n.duration === 1 / 0) {
4436
4457
  o.value = 100;
4437
4458
  return;
4438
4459
  }
4439
- u = Date.now(), r = requestAnimationFrame(i);
4460
+ i = Date.now(), l = requestAnimationFrame(r);
4440
4461
  };
4441
4462
  J(
4442
4463
  () => n.duration,
@@ -4444,9 +4465,9 @@ const Ae = (e, n = "info") => {
4444
4465
  { immediate: !0 }
4445
4466
  );
4446
4467
  const d = () => {
4447
- cancelAnimationFrame(r), a.value = "closing", setTimeout(() => ye.toasts = ye.toasts.filter((l) => l.id !== n.id), jn);
4468
+ cancelAnimationFrame(l), a.value = "closing", setTimeout(() => ye.toasts = ye.toasts.filter((u) => u.id !== n.id), jn);
4448
4469
  };
4449
- return se(() => n.variant === "error" && n.focus && t.value?.focus()), _e(() => cancelAnimationFrame(r)), (l, p) => (f(), g("div", {
4470
+ return se(() => n.variant === "error" && n.focus && t.value?.focus()), _e(() => cancelAnimationFrame(l)), (u, h) => (f(), b("div", {
4450
4471
  ref_key: "rootRef",
4451
4472
  ref: t,
4452
4473
  tabindex: "-1",
@@ -4459,7 +4480,7 @@ const Ae = (e, n = "info") => {
4459
4480
  "aria-describedby": e.loading ? void 0 : `toast-desc-${e.id}`
4460
4481
  }, [
4461
4482
  L("div", Kn, [
4462
- X(l.$slots, "default", {}, void 0, !0),
4483
+ X(u.$slots, "default", {}, void 0, !0),
4463
4484
  j(ke, {
4464
4485
  type: "button",
4465
4486
  onClick: d,
@@ -4475,7 +4496,7 @@ const Ae = (e, n = "info") => {
4475
4496
  _: 1
4476
4497
  }, 8, ["aria-label"])
4477
4498
  ]),
4478
- e.duration !== 1 / 0 ? (f(), g("div", Un, [
4499
+ e.duration !== 1 / 0 ? (f(), b("div", Un, [
4479
4500
  L("div", {
4480
4501
  class: "bar",
4481
4502
  style: Le({ width: o.value + "%" })
@@ -4490,7 +4511,7 @@ const Ae = (e, n = "info") => {
4490
4511
  L("div", Xn, [
4491
4512
  j(Rt, { name: "toast-stack" }, {
4492
4513
  default: Q(() => [
4493
- (f(!0), g(re, null, ve(E(ye).toasts, (a) => (f(), ee(Yn, {
4514
+ (f(!0), b(re, null, ve(E(ye).toasts, (a) => (f(), ee(Yn, {
4494
4515
  key: a.id,
4495
4516
  id: a.id,
4496
4517
  duration: a.duration,
@@ -4499,12 +4520,12 @@ const Ae = (e, n = "info") => {
4499
4520
  }, {
4500
4521
  default: Q(() => [
4501
4522
  L("div", Gn, [
4502
- a.title ? (f(), g("strong", Jn, K(a.title), 1)) : N("", !0),
4523
+ a.title ? (f(), b("strong", Jn, K(a.title), 1)) : N("", !0),
4503
4524
  a.loading ? (f(), ee(Bt, {
4504
4525
  key: 1,
4505
4526
  message: a.description,
4506
4527
  "aria-hidden": "true"
4507
- }, null, 8, ["message"])) : (f(), g("p", {
4528
+ }, null, 8, ["message"])) : (f(), b("p", {
4508
4529
  key: 2,
4509
4530
  id: `toast-desc-${a.id}`
4510
4531
  }, K(a.description), 9, Qn))
@@ -4537,20 +4558,20 @@ const Hl = {
4537
4558
  },
4538
4559
  emits: ["click"],
4539
4560
  setup(e, { emit: n }) {
4540
- const t = e, a = n, o = w(), u = w();
4541
- xe("card:labelId", o), xe("card:descriptionId", u);
4542
- const r = H(() => t.clickable && t.as !== "button" && t.as !== "a"), i = () => t.clickable && a("click");
4561
+ const t = e, a = n, o = w(), i = w();
4562
+ xe("card:labelId", o), xe("card:descriptionId", i);
4563
+ const l = V(() => t.clickable && t.as !== "button" && t.as !== "a"), r = () => t.clickable && a("click");
4543
4564
  return (s, d) => (f(), ee(Re(e.as), {
4544
4565
  class: ue(["rs-card", { clickable: e.clickable }]),
4545
- tabindex: r.value ? 0 : void 0,
4546
- role: r.value ? "button" : void 0,
4547
- onClick: i,
4566
+ tabindex: l.value ? 0 : void 0,
4567
+ role: l.value ? "button" : void 0,
4568
+ onClick: r,
4548
4569
  onKeydown: [
4549
- d[0] || (d[0] = Ce(ie((l) => r.value && i(), ["prevent"]), ["enter"])),
4550
- d[1] || (d[1] = Ce(ie((l) => r.value && i(), ["prevent"]), ["space"]))
4570
+ d[0] || (d[0] = Ce(ie((u) => l.value && r(), ["prevent"]), ["enter"])),
4571
+ d[1] || (d[1] = Ce(ie((u) => l.value && r(), ["prevent"]), ["space"]))
4551
4572
  ],
4552
4573
  "aria-labelledby": o.value,
4553
- "aria-describedby": u.value
4574
+ "aria-describedby": i.value
4554
4575
  }, {
4555
4576
  default: Q(() => [
4556
4577
  X(s.$slots, "default", {}, void 0, !0)
@@ -4579,7 +4600,7 @@ const Hl = {
4579
4600
  __name: "CardBody",
4580
4601
  setup(e) {
4581
4602
  const n = de("card:descriptionId", void 0), t = `rs-card-desc-${fe()}`;
4582
- return se(() => n && (n.value = t)), (a, o) => (f(), g("div", {
4603
+ return se(() => n && (n.value = t)), (a, o) => (f(), b("div", {
4583
4604
  id: t,
4584
4605
  class: "rs-card-body"
4585
4606
  }, [
@@ -4626,12 +4647,12 @@ const Hl = {
4626
4647
  setup(e) {
4627
4648
  const n = e, t = de("StepsContext");
4628
4649
  if (!t) throw new Error("Step component must be used inside Steps.");
4629
- const a = at(), o = w(null), u = w(null), r = H(() => t.orientation ?? "horizontal");
4630
- let i = null, s = null;
4650
+ const a = at(), o = w(null), i = w(null), l = V(() => t.orientation ?? "horizontal");
4651
+ let r = null, s = null;
4631
4652
  const d = de("StepIndex");
4632
4653
  if (d == null) throw new Error("StepIndex component must be used inside Steps.");
4633
- const l = H(() => n.status ? n.status : d < t.current.value ? "completed" : d === t.current.value ? "active" : "pending"), p = H(() => t?.icons?.[l.value]), m = H(() => a.icon ? "slot" : n.icon ? n.icon : p.value), b = H(() => {
4634
- switch (l.value) {
4654
+ const u = V(() => n.status ? n.status : d < t.current.value ? "completed" : d === t.current.value ? "active" : "pending"), h = V(() => t?.icons?.[u.value]), p = V(() => a.icon ? "slot" : n.icon ? n.icon : h.value), m = V(() => {
4655
+ switch (u.value) {
4635
4656
  case "completed":
4636
4657
  return "Stage completed";
4637
4658
  case "active":
@@ -4641,8 +4662,8 @@ const Hl = {
4641
4662
  default:
4642
4663
  return "Stage pending";
4643
4664
  }
4644
- }), y = H(() => {
4645
- switch (l.value) {
4665
+ }), C = V(() => {
4666
+ switch (u.value) {
4646
4667
  case "completed":
4647
4668
  return "success";
4648
4669
  case "active":
@@ -4652,8 +4673,8 @@ const Hl = {
4652
4673
  default:
4653
4674
  return "default";
4654
4675
  }
4655
- }), k = H(() => n.size ?? t.size ?? "sm"), _ = H(() => {
4656
- switch (l.value) {
4676
+ }), M = V(() => n.size ?? t.size ?? "sm"), S = V(() => {
4677
+ switch (u.value) {
4657
4678
  case "completed":
4658
4679
  return t.tagTitles.completed;
4659
4680
  case "active":
@@ -4665,21 +4686,21 @@ const Hl = {
4665
4686
  }
4666
4687
  });
4667
4688
  J(
4668
- () => l.value,
4669
- (C) => t.registerStepStatus(d, C),
4689
+ () => u.value,
4690
+ (g) => t.registerStepStatus(d, g),
4670
4691
  { immediate: !0 }
4671
4692
  );
4672
- const B = () => {
4673
- i == null && (i = requestAnimationFrame(() => {
4674
- i = null, M();
4693
+ const $ = () => {
4694
+ r == null && (r = requestAnimationFrame(() => {
4695
+ r = null, k();
4675
4696
  }));
4676
- }, M = () => {
4677
- if (!o.value || !u.value) return;
4678
- const C = u.value.getBoundingClientRect(), R = t.stepsRef.value.getBoundingClientRect(), F = t.orientation === "vertical" ? C.top + C.height / 2 - R.top : C.left + C.width / 2 - R.left;
4697
+ }, k = () => {
4698
+ if (!o.value || !i.value) return;
4699
+ const g = i.value.getBoundingClientRect(), R = t.stepsRef.value.getBoundingClientRect(), F = t.orientation === "vertical" ? g.top + g.height / 2 - R.top : g.left + g.width / 2 - R.left;
4679
4700
  t.registerIndicatorCenter(d, F);
4680
- }, I = (C) => {
4701
+ }, H = (g) => {
4681
4702
  const R = t.orientation === "horizontal", F = t.orientation === "vertical";
4682
- switch (C.key) {
4703
+ switch (g.key) {
4683
4704
  case "ArrowRight":
4684
4705
  R && t.focusNext();
4685
4706
  break;
@@ -4701,79 +4722,79 @@ const Hl = {
4701
4722
  default:
4702
4723
  return;
4703
4724
  }
4704
- C.preventDefault();
4725
+ g.preventDefault();
4705
4726
  };
4706
4727
  return se(() => {
4707
- !o.value || !u.value || (requestAnimationFrame(() => {
4708
- requestAnimationFrame(M);
4728
+ !o.value || !i.value || (requestAnimationFrame(() => {
4729
+ requestAnimationFrame(k);
4709
4730
  }), s = new ResizeObserver(() => {
4710
- B();
4711
- }), s.observe(o.value), s.observe(u.value), t.stepsRef.value && s.observe(t.stepsRef.value), t.registerStep(o.value));
4731
+ $();
4732
+ }), s.observe(o.value), s.observe(i.value), t.stepsRef.value && s.observe(t.stepsRef.value), t.registerStep(o.value));
4712
4733
  }), $e(() => {
4713
- s?.disconnect(), t.unregisterStep(o.value), i != null && cancelAnimationFrame(i);
4714
- }), (C, R) => (f(), g("li", {
4734
+ s?.disconnect(), t.unregisterStep(o.value), r != null && cancelAnimationFrame(r);
4735
+ }), (g, R) => (f(), b("li", {
4715
4736
  ref_key: "stepRef",
4716
4737
  ref: o,
4717
- class: ue(["step", `step__${k.value}`]),
4738
+ class: ue(["step", `step__${M.value}`]),
4718
4739
  role: "listitem",
4719
- "data-status": l.value,
4720
- "data-orientation": r.value,
4721
- "data-active": l.value === "active",
4722
- "data-completed": l.value === "completed",
4740
+ "data-status": u.value,
4741
+ "data-orientation": l.value,
4742
+ "data-active": u.value === "active",
4743
+ "data-completed": u.value === "completed",
4723
4744
  "aria-labelledby": `step-title-${E(d)}`,
4724
- tabindex: l.value === "active" ? 0 : -1,
4725
- "aria-current": l.value === "active" ? "step" : void 0,
4745
+ tabindex: u.value === "active" ? 0 : -1,
4746
+ "aria-current": u.value === "active" ? "step" : void 0,
4726
4747
  "aria-posinset": E(d) + 1,
4727
4748
  "aria-setsize": E(t).stepsCount.value,
4728
4749
  "aria-describedby": `step-status-${E(d)}`,
4729
- onKeydown: I
4750
+ onKeydown: H
4730
4751
  }, [
4731
4752
  L("span", {
4732
4753
  ref_key: "indicatorRef",
4733
- ref: u,
4754
+ ref: i,
4734
4755
  class: "indicator",
4735
4756
  "aria-hidden": "true"
4736
4757
  }, [
4737
- C.$slots.icon ? X(C.$slots, "icon", {
4758
+ g.$slots.icon ? X(g.$slots, "icon", {
4738
4759
  key: 0,
4739
- status: l.value
4740
- }, void 0, !0) : m.value ? (f(), ee(pe, {
4760
+ status: u.value
4761
+ }, void 0, !0) : p.value ? (f(), ee(pe, {
4741
4762
  key: 1,
4742
- name: m.value,
4763
+ name: p.value,
4743
4764
  class: "icon"
4744
4765
  }, null, 8, ["name"])) : N("", !0),
4745
- l.value === "completed" ? (f(), g("svg", ro, [...R[0] || (R[0] = [
4766
+ u.value === "completed" ? (f(), b("svg", ro, [...R[0] || (R[0] = [
4746
4767
  L("path", {
4747
4768
  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",
4748
4769
  fill: "currentColor"
4749
4770
  }, null, -1)
4750
- ])])) : l.value === "error" ? (f(), g("svg", so, [...R[1] || (R[1] = [
4771
+ ])])) : u.value === "error" ? (f(), b("svg", so, [...R[1] || (R[1] = [
4751
4772
  L("path", {
4752
4773
  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",
4753
4774
  fill: "currentColor"
4754
4775
  }, null, -1)
4755
- ])])) : l.value === "active" ? (f(), g("span", io)) : N("", !0)
4776
+ ])])) : u.value === "active" ? (f(), b("span", io)) : N("", !0)
4756
4777
  ], 512),
4757
4778
  L("span", {
4758
4779
  id: `step-status-${E(d)}`,
4759
4780
  class: "sr-only"
4760
- }, K(b.value), 9, uo),
4781
+ }, K(m.value), 9, uo),
4761
4782
  L("div", co, [
4762
4783
  L("span", {
4763
4784
  id: `step-title-${E(d)}`,
4764
4785
  class: "title"
4765
4786
  }, K(e.title), 9, vo),
4766
4787
  j(u2, {
4767
- variant: y.value,
4788
+ variant: C.value,
4768
4789
  size: "sm"
4769
4790
  }, {
4770
4791
  default: Q(() => [
4771
- be(K(_.value), 1)
4792
+ be(K(S.value), 1)
4772
4793
  ]),
4773
4794
  _: 1
4774
4795
  }, 8, ["variant"]),
4775
- C.$slots.default ? (f(), g("span", fo, [
4776
- X(C.$slots, "default", {}, void 0, !0)
4796
+ g.$slots.default ? (f(), b("span", fo, [
4797
+ X(g.$slots, "default", {}, void 0, !0)
4777
4798
  ])) : N("", !0)
4778
4799
  ])
4779
4800
  ], 42, lo));
@@ -4811,13 +4832,13 @@ const Hl = {
4811
4832
  }),
4812
4833
  emits: ["update:modelValue"],
4813
4834
  setup(e) {
4814
- const n = e, t = w(0), a = at(), o = he(e, "modelValue"), u = w([]), r = w(null), i = H(() => o.value ?? 0), s = `steps-description-${fe()}`, d = Et({}), l = bt({});
4815
- let p = null;
4816
- const m = H(() => (a.default?.() ?? [])[i.value]?.props?.title ?? ""), b = H(() => Object.entries(l).filter(([, S]) => S !== "completed").length === 0), y = H(
4817
- () => Object.values(l).includes("error")
4818
- ), k = H(() => {
4819
- const S = i.value, A = d;
4820
- if (A.value[0] == null || A.value[S] == null)
4835
+ const n = e, t = w(0), a = at(), o = he(e, "modelValue"), i = w([]), l = w(null), r = V(() => o.value ?? 0), s = `steps-description-${fe()}`, d = Et({}), u = bt({});
4836
+ let h = null;
4837
+ const p = V(() => (a.default?.() ?? [])[r.value]?.props?.title ?? ""), m = V(() => Object.entries(u).filter(([, _]) => _ !== "completed").length === 0), C = V(
4838
+ () => Object.values(u).includes("error")
4839
+ ), M = V(() => {
4840
+ const _ = r.value, A = d;
4841
+ if (A.value[0] == null || A.value[_] == null)
4821
4842
  return n.orientation === "vertical" ? {
4822
4843
  height: "100%",
4823
4844
  top: "0px"
@@ -4825,74 +4846,74 @@ const Hl = {
4825
4846
  width: "100%",
4826
4847
  left: "0px"
4827
4848
  };
4828
- const $ = A.value[0], V = A.value[S];
4849
+ const I = A.value[0], B = A.value[_];
4829
4850
  return n.orientation === "vertical" ? {
4830
- top: `${$}px`,
4831
- height: `${V - $}px`
4851
+ top: `${I}px`,
4852
+ height: `${B - I}px`
4832
4853
  } : {
4833
- left: `${$}px`,
4834
- width: `${V - $}px`
4854
+ left: `${I}px`,
4855
+ width: `${B - I}px`
4835
4856
  };
4836
- }), _ = H(() => {
4837
- const S = Object.values(d.value).sort((V, O) => V - O);
4838
- if (S.length < 2) return {};
4839
- const A = S[0], $ = S[S.length - 1];
4857
+ }), S = V(() => {
4858
+ const _ = Object.values(d.value).sort((B, q) => B - q);
4859
+ if (_.length < 2) return {};
4860
+ const A = _[0], I = _[_.length - 1];
4840
4861
  return n.orientation === "vertical" ? {
4841
4862
  top: `${A}px`,
4842
- height: `${$ - A}px`
4863
+ height: `${I - A}px`
4843
4864
  } : {
4844
4865
  left: `${A}px`,
4845
- right: `calc(100% - ${$}px)`
4866
+ right: `calc(100% - ${I}px)`
4846
4867
  };
4847
- }), B = (S, A) => d.value = { ...d.value, [S]: A };
4848
- function M(S) {
4849
- u.value.push(S), t.value = u.value.length;
4868
+ }), $ = (_, A) => d.value = { ...d.value, [_]: A };
4869
+ function k(_) {
4870
+ i.value.push(_), t.value = i.value.length;
4850
4871
  }
4851
- function I(S) {
4852
- u.value = u.value.filter((A) => A !== S), t.value = u.value.length;
4872
+ function H(_) {
4873
+ i.value = i.value.filter((A) => A !== _), t.value = i.value.length;
4853
4874
  }
4854
- function C(S) {
4855
- S < 0 || S >= u.value.length || (o.value = S, u.value[S]?.focus());
4875
+ function g(_) {
4876
+ _ < 0 || _ >= i.value.length || (o.value = _, i.value[_]?.focus());
4856
4877
  }
4857
4878
  function R() {
4858
- C(o.value + 1);
4879
+ g(o.value + 1);
4859
4880
  }
4860
4881
  function F() {
4861
- C(o.value - 1);
4882
+ g(o.value - 1);
4862
4883
  }
4863
4884
  function G() {
4864
- C(0);
4885
+ g(0);
4865
4886
  }
4866
4887
  function D() {
4867
- C(t.value - 1);
4888
+ g(t.value - 1);
4868
4889
  }
4869
4890
  return se(() => {
4870
- r.value && (p = new ResizeObserver(() => {
4871
- }), p.observe(r.value));
4872
- }), $e(() => p?.disconnect()), xe("StepsContext", {
4873
- current: H(() => o.value),
4874
- update: (S) => o.value = S,
4891
+ l.value && (h = new ResizeObserver(() => {
4892
+ }), h.observe(l.value));
4893
+ }), $e(() => h?.disconnect()), xe("StepsContext", {
4894
+ current: V(() => o.value),
4895
+ update: (_) => o.value = _,
4875
4896
  stepsCount: t,
4876
4897
  icons: n.icons,
4877
4898
  size: n.size,
4878
4899
  orientation: n.orientation,
4879
- stepStatusMap: l,
4880
- stepsRef: r,
4881
- registerStepStatus: (S, A) => {
4882
- l[S] = A;
4900
+ stepStatusMap: u,
4901
+ stepsRef: l,
4902
+ registerStepStatus: (_, A) => {
4903
+ u[_] = A;
4883
4904
  },
4884
- registerIndicatorCenter: B,
4885
- registerStep: M,
4886
- unregisterStep: I,
4905
+ registerIndicatorCenter: $,
4906
+ registerStep: k,
4907
+ unregisterStep: H,
4887
4908
  focusNext: R,
4888
4909
  focusPrev: F,
4889
4910
  focusFirst: G,
4890
4911
  focusLast: D,
4891
4912
  tagTitles: n.tagTitles
4892
- }), (S, A) => (f(), g(re, null, [
4913
+ }), (_, A) => (f(), b(re, null, [
4893
4914
  L("ol", {
4894
4915
  ref_key: "stepsRef",
4895
- ref: r,
4916
+ ref: l,
4896
4917
  class: "steps",
4897
4918
  role: "list",
4898
4919
  "data-size": e.size,
@@ -4906,26 +4927,26 @@ const Hl = {
4906
4927
  L("div", {
4907
4928
  class: "track",
4908
4929
  "aria-hidden": "true",
4909
- style: Le(_.value)
4930
+ style: Le(S.value)
4910
4931
  }, [
4911
4932
  L("div", {
4912
4933
  class: "track-progress",
4913
- "data-error": y.value,
4914
- "data-completed": b.value,
4915
- style: Le(k.value)
4934
+ "data-error": C.value,
4935
+ "data-completed": m.value,
4936
+ style: Le(M.value)
4916
4937
  }, null, 12, ho)
4917
4938
  ], 4),
4918
- (f(!0), g(re, null, ve(S.$slots.default?.(), ($, V) => (f(), ee(mo, {
4919
- key: V,
4920
- index: V
4939
+ (f(!0), b(re, null, ve(_.$slots.default?.(), (I, B) => (f(), ee(mo, {
4940
+ key: B,
4941
+ index: B
4921
4942
  }, {
4922
4943
  default: Q(() => [
4923
- (f(), ee(Re($)))
4944
+ (f(), ee(Re(I)))
4924
4945
  ]),
4925
4946
  _: 2
4926
4947
  }, 1032, ["index"]))), 128))
4927
4948
  ], 8, Co),
4928
- L("div", go, " Step " + K(i.value + 1) + " of " + K(t.value) + ": " + K(m.value), 1)
4949
+ L("div", go, " Step " + K(r.value + 1) + " of " + K(t.value) + ": " + K(p.value), 1)
4929
4950
  ], 64));
4930
4951
  }
4931
4952
  }), Sl = /* @__PURE__ */ W(yo, [["__scopeId", "data-v-2fa0f578"]]), bo = ["data-align"], ko = /* @__PURE__ */ Z({
@@ -4934,7 +4955,7 @@ const Hl = {
4934
4955
  align: { default: "left" }
4935
4956
  },
4936
4957
  setup(e) {
4937
- return xe("TimelineContext", e), (t, a) => (f(), g("ol", {
4958
+ return xe("TimelineContext", e), (t, a) => (f(), b("ol", {
4938
4959
  role: "list",
4939
4960
  class: "ui-timeline",
4940
4961
  "data-align": e.align
@@ -4955,29 +4976,29 @@ const Hl = {
4955
4976
  setup(e) {
4956
4977
  const n = e, t = de("TimelineContext");
4957
4978
  if (!t) throw new Error("TimelineItem must be used within a Timeline component");
4958
- const a = fe(), o = fe(), u = H(() => t.align === "alternate" ? (n.index ?? 0) % 2 === 0 ? "ui-timeline-item--left" : "ui-timeline-item--right" : `ui-timeline-item--${t.align}`), r = (d) => {
4959
- const l = new Date(d).getDay();
4960
- return l < 10 ? `0${l}` : l;
4961
- }, i = (d) => new Date(d).toLocaleString("default", { month: "short" }), s = (d) => new Date(d).getFullYear();
4962
- return (d, l) => (f(), g("li", {
4979
+ const a = fe(), o = fe(), i = V(() => t.align === "alternate" ? (n.index ?? 0) % 2 === 0 ? "ui-timeline-item--left" : "ui-timeline-item--right" : `ui-timeline-item--${t.align}`), l = (d) => {
4980
+ const u = new Date(d).getDay();
4981
+ return u < 10 ? `0${u}` : u;
4982
+ }, r = (d) => new Date(d).toLocaleString("default", { month: "short" }), s = (d) => new Date(d).getFullYear();
4983
+ return (d, u) => (f(), b("li", {
4963
4984
  tabindex: "0",
4964
- class: ue([u.value, "ui-timeline-item"]),
4985
+ class: ue([i.value, "ui-timeline-item"]),
4965
4986
  "data-align": E(t).align,
4966
4987
  "aria-labelledby": e.title ? E(a) : void 0,
4967
4988
  "aria-describedby": e.description ? E(o) : void 0
4968
4989
  }, [
4969
- l[0] || (l[0] = L("div", {
4990
+ u[0] || (u[0] = L("div", {
4970
4991
  class: "ui-timeline-marker",
4971
4992
  "aria-hidden": "true"
4972
4993
  }, null, -1)),
4973
4994
  L("div", Mo, [
4974
- e.date ? (f(), g("time", {
4995
+ e.date ? (f(), b("time", {
4975
4996
  key: 0,
4976
4997
  class: "ui-timeline-date",
4977
4998
  datetime: e.date
4978
4999
  }, [
4979
- L("span", xo, K(i(e.date)), 1),
4980
- L("span", $o, K(r(e.date)), 1),
5000
+ L("span", xo, K(r(e.date)), 1),
5001
+ L("span", $o, K(l(e.date)), 1),
4981
5002
  L("span", Io, K(s(e.date)), 1)
4982
5003
  ], 8, Lo)) : N("", !0),
4983
5004
  L("div", {
@@ -4997,7 +5018,7 @@ const Hl = {
4997
5018
  }, 8, ["id"]))
4998
5019
  ], !0),
4999
5020
  X(d.$slots, "description", {}, () => [
5000
- e.description ? (f(), g("p", {
5021
+ e.description ? (f(), b("p", {
5001
5022
  key: 0,
5002
5023
  id: E(o),
5003
5024
  class: "ui-timeline-description"
@@ -5018,7 +5039,7 @@ const Hl = {
5018
5039
  key: 0,
5019
5040
  role: "tablist",
5020
5041
  class: "carousel-indicators"
5021
- }, Eo = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], Zo = 0.35, zo = 0.2, Oo = /* @__PURE__ */ Z({
5042
+ }, Eo = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], Zo = 0.35, zo = 0.2, qo = /* @__PURE__ */ Z({
5022
5043
  __name: "Carousel",
5023
5044
  props: /* @__PURE__ */ oe({
5024
5045
  ariaLabel: { default: "Carousel" },
@@ -5040,38 +5061,38 @@ const Hl = {
5040
5061
  }),
5041
5062
  emits: ["update:modelValue"],
5042
5063
  setup(e) {
5043
- const n = he(e, "modelValue"), t = e, a = w(0), o = w(0), u = w(0), r = w(0), i = w(0), s = w(0), d = w(!1), l = w(!1), p = w(0), m = w([]), b = w(1), y = w(n.value), k = w(null), _ = w(null);
5044
- let B = null, M = null;
5064
+ const n = he(e, "modelValue"), t = e, a = w(0), o = w(0), i = w(0), l = w(0), r = w(0), s = w(0), d = w(!1), u = w(!1), h = w(0), p = w([]), m = w(1), C = w(n.value), M = w(null), S = w(null);
5065
+ let $ = null, k = null;
5045
5066
  J(
5046
5067
  () => n.value,
5047
- (x) => y.value = x
5068
+ (x) => C.value = x
5048
5069
  );
5049
- const I = H(() => m.value[y.value] ?? void 0), C = H(() => Math.floor(y.value / b.value)), R = H(() => Math.ceil(te.value / b.value)), F = H(() => Math.max(0, te.value - b.value)), G = H(() => {
5050
- const x = y.value * (100 / b.value), T = l.value && _.value ? u.value / _.value.clientWidth * 100 : 0;
5070
+ const H = V(() => p.value[C.value] ?? void 0), g = V(() => Math.floor(C.value / m.value)), R = V(() => Math.ceil(te.value / m.value)), F = V(() => Math.max(0, te.value - m.value)), G = V(() => {
5071
+ const x = C.value * (100 / m.value), T = u.value && S.value ? i.value / S.value.clientWidth * 100 : 0;
5051
5072
  return {
5052
5073
  transform: `translateX(calc(-${x}% + ${T}%))`,
5053
- transition: l.value ? "none" : "transform 300ms ease"
5074
+ transition: u.value ? "none" : "transform 300ms ease"
5054
5075
  };
5055
5076
  }), D = (x) => {
5056
5077
  let T = x;
5057
5078
  if (t.loop) {
5058
- const Y = Math.round(x / b.value), z = R.value;
5059
- T = (Y % z + z) % z * b.value;
5079
+ const Y = Math.round(x / m.value), z = R.value;
5080
+ T = (Y % z + z) % z * m.value;
5060
5081
  } else
5061
5082
  T = Math.min(
5062
5083
  Math.max(x, 0),
5063
5084
  F.value
5064
5085
  );
5065
- y.value = T, n.value = T;
5066
- }, S = () => D(y.value + b.value), A = () => D(y.value - b.value), $ = (x) => {
5067
- x.key === "ArrowRight" ? S() : x.key === "ArrowLeft" && A();
5068
- }, V = (x) => (m.value.includes(x) || m.value.push(x), m.value.indexOf(x)), O = (x) => m.value = m.value.filter((T) => T !== x), te = H(() => m.value.length), ae = () => {
5069
- !t.autoplay || B !== null || (B = window.setInterval(() => {
5070
- d.value || S();
5086
+ C.value = T, n.value = T;
5087
+ }, _ = () => D(C.value + m.value), A = () => D(C.value - m.value), I = (x) => {
5088
+ x.key === "ArrowRight" ? _() : x.key === "ArrowLeft" && A();
5089
+ }, B = (x) => (p.value.includes(x) || p.value.push(x), p.value.indexOf(x)), q = (x) => p.value = p.value.filter((T) => T !== x), te = V(() => p.value.length), ae = () => {
5090
+ !t.autoplay || $ !== null || ($ = window.setInterval(() => {
5091
+ d.value || _();
5071
5092
  }, t.autoplayDelay));
5072
5093
  }, ce = () => {
5073
- B !== null && (clearInterval(B), B = null);
5074
- }, q = (x) => {
5094
+ $ !== null && (clearInterval($), $ = null);
5095
+ }, O = (x) => {
5075
5096
  if (typeof t.itemsPerView == "number")
5076
5097
  return t.itemsPerView;
5077
5098
  const T = Object.entries(t.itemsPerView).map(([z, P]) => [Number(z), P]).sort((z, P) => z[0] - P[0]);
@@ -5079,48 +5100,48 @@ const Hl = {
5079
5100
  for (const [z, P] of T) x >= z && (Y = P);
5080
5101
  return Y;
5081
5102
  }, c = (x) => {
5082
- x.button === 0 && (l.value = !0, o.value = x.clientX, a.value = x.clientX, s.value = x.clientX, u.value = 0, r.value = performance.now(), i.value = 0, p.value = y.value, _.value?.setPointerCapture(x.pointerId), ce(), _.value.style.userSelect = "");
5103
+ x.button === 0 && (u.value = !0, o.value = x.clientX, a.value = x.clientX, s.value = x.clientX, i.value = 0, l.value = performance.now(), r.value = 0, h.value = C.value, S.value?.setPointerCapture(x.pointerId), ce(), S.value.style.userSelect = "");
5083
5104
  }, v = (x) => {
5084
- if (!l.value) return;
5085
- const T = performance.now(), Y = x.clientX - a.value, z = T - r.value;
5086
- z > 0 && (i.value = Y / z), a.value = x.clientX, r.value = T, s.value = x.clientX, u.value = s.value - o.value;
5087
- }, h = (x) => {
5088
- if (!l.value) return;
5089
- l.value = !1, _.value?.releasePointerCapture(x.pointerId), _.value.style.userSelect = "";
5090
- const T = _.value.clientWidth / b.value, Y = u.value / T;
5091
- Math.abs(i.value) > Zo ? i.value < 0 ? S() : A() : Math.abs(Y) > zo ? Y < 0 ? S() : A() : D(p.value), u.value = 0, i.value = 0, ae();
5105
+ if (!u.value) return;
5106
+ const T = performance.now(), Y = x.clientX - a.value, z = T - l.value;
5107
+ z > 0 && (r.value = Y / z), a.value = x.clientX, l.value = T, s.value = x.clientX, i.value = s.value - o.value;
5108
+ }, y = (x) => {
5109
+ if (!u.value) return;
5110
+ u.value = !1, S.value?.releasePointerCapture(x.pointerId), S.value.style.userSelect = "";
5111
+ const T = S.value.clientWidth / m.value, Y = i.value / T;
5112
+ Math.abs(r.value) > Zo ? r.value < 0 ? _() : A() : Math.abs(Y) > zo ? Y < 0 ? _() : A() : D(h.value), i.value = 0, r.value = 0, ae();
5092
5113
  };
5093
5114
  return se(() => {
5094
- ae(), k.value && (M = new ResizeObserver((x) => {
5115
+ ae(), M.value && (k = new ResizeObserver((x) => {
5095
5116
  const T = x[0]?.contentRect.width;
5096
- T !== void 0 && (b.value = q(T));
5097
- }), M.observe(k.value));
5117
+ T !== void 0 && (m.value = O(T));
5118
+ }), k.observe(M.value));
5098
5119
  }), $e(() => {
5099
- ce(), M?.disconnect();
5120
+ ce(), k?.disconnect();
5100
5121
  }), J(
5101
5122
  () => t.autoplay,
5102
5123
  (x) => {
5103
5124
  x ? ae() : ce();
5104
5125
  },
5105
5126
  { immediate: !0 }
5106
- ), J(b, () => y.value = Math.min(y.value, F.value)), xe("CarouselContext", {
5107
- register: V,
5108
- unregister: O,
5109
- activeIndex: y,
5127
+ ), J(m, () => C.value = Math.min(C.value, F.value)), xe("CarouselContext", {
5128
+ register: B,
5129
+ unregister: q,
5130
+ activeIndex: C,
5110
5131
  slideCount: te,
5111
- deltaX: u,
5112
- itemsPerView: t.itemsPerView instanceof Object ? b : w(t.itemsPerView)
5113
- }), (x, T) => (f(), g("div", {
5132
+ deltaX: i,
5133
+ itemsPerView: t.itemsPerView instanceof Object ? m : w(t.itemsPerView)
5134
+ }), (x, T) => (f(), b("div", {
5114
5135
  ref_key: "rootRef",
5115
- ref: k,
5136
+ ref: M,
5116
5137
  role: "region",
5117
5138
  class: "carousel",
5118
5139
  "aria-roledescription": "carousel",
5119
5140
  "aria-label": e.ariaLabel,
5120
5141
  tabindex: "0",
5121
- "aria-activedescendant": I.value,
5122
- style: Le({ "--items-per-view": b.value }),
5123
- onKeydown: $,
5142
+ "aria-activedescendant": H.value,
5143
+ style: Le({ "--items-per-view": m.value }),
5144
+ onKeydown: I,
5124
5145
  onMouseenter: T[0] || (T[0] = (Y) => d.value = !0),
5125
5146
  onMouseleave: T[1] || (T[1] = (Y) => d.value = !1),
5126
5147
  onFocusin: T[2] || (T[2] = (Y) => d.value = !0),
@@ -5133,18 +5154,18 @@ const Hl = {
5133
5154
  L("div", So, [
5134
5155
  L("div", {
5135
5156
  ref_key: "trackRef",
5136
- ref: _,
5157
+ ref: S,
5137
5158
  class: "carousel-track",
5138
5159
  style: Le(G.value),
5139
5160
  onPointerdown: c,
5140
5161
  onPointermove: v,
5141
- onPointerup: h,
5142
- onPointercancel: h
5162
+ onPointerup: y,
5163
+ onPointercancel: y
5143
5164
  }, [
5144
5165
  X(x.$slots, "default", {}, void 0, !0)
5145
5166
  ], 36)
5146
5167
  ]),
5147
- L("span", Ro, " Slide " + K(Math.floor(y.value / b.value) + 1) + " of " + K(R.value), 1),
5168
+ L("span", Ro, " Slide " + K(Math.floor(C.value / m.value) + 1) + " of " + K(R.value), 1),
5148
5169
  L("button", {
5149
5170
  type: "button",
5150
5171
  class: "carousel-control prev",
@@ -5157,45 +5178,45 @@ const Hl = {
5157
5178
  type: "button",
5158
5179
  class: "carousel-control next",
5159
5180
  "aria-label": "Next slide",
5160
- onClick: S
5181
+ onClick: _
5161
5182
  }, [
5162
5183
  j(pe, { name: "directionDown" })
5163
5184
  ]),
5164
- e.showIndicators ? (f(), g("div", To, [
5165
- (f(!0), g(re, null, ve(R.value, (Y, z) => (f(), g("button", {
5185
+ e.showIndicators ? (f(), b("div", To, [
5186
+ (f(!0), b(re, null, ve(R.value, (Y, z) => (f(), b("button", {
5166
5187
  role: "tab",
5167
5188
  type: "button",
5168
5189
  key: z,
5169
- class: ue(["indicator", { active: z === Math.floor(y.value / b.value) }]),
5190
+ class: ue(["indicator", { active: z === Math.floor(C.value / m.value) }]),
5170
5191
  "aria-label": `Go to slide ${z + 1}`,
5171
- "aria-selected": z === C.value,
5172
- "aria-current": z === C.value,
5173
- onClick: (P) => D(z * b.value),
5192
+ "aria-selected": z === g.value,
5193
+ "aria-current": z === g.value,
5194
+ onClick: (P) => D(z * m.value),
5174
5195
  onKeydown: [
5175
- Ce(ie((P) => D((z - 1 + R.value) % R.value * b.value), ["prevent"]), ["left"]),
5176
- Ce(ie((P) => D((z + 1) % R.value * b.value), ["prevent"]), ["right"])
5196
+ Ce(ie((P) => D((z - 1 + R.value) % R.value * m.value), ["prevent"]), ["left"]),
5197
+ Ce(ie((P) => D((z + 1) % R.value * m.value), ["prevent"]), ["right"])
5177
5198
  ]
5178
5199
  }, null, 42, Eo))), 128))
5179
5200
  ])) : N("", !0)
5180
5201
  ], 44, _o));
5181
5202
  }
5182
- }), El = /* @__PURE__ */ W(Oo, [["__scopeId", "data-v-30cdfc00"]]), qo = ["aria-hidden", "aria-label"], Fo = /* @__PURE__ */ Z({
5203
+ }), El = /* @__PURE__ */ W(qo, [["__scopeId", "data-v-30cdfc00"]]), Oo = ["aria-hidden", "aria-label"], Fo = /* @__PURE__ */ Z({
5183
5204
  __name: "CarouselItem",
5184
5205
  setup(e) {
5185
5206
  const n = de("CarouselContext");
5186
5207
  if (!n) throw new Error("CarouselItem must be used inside a Carousel");
5187
- const t = "carousel-item-" + fe(), a = w(0), o = H(() => Math.abs(n.deltaX.value) > 5), u = H(() => Math.floor(a.value / n.itemsPerView.value) === Math.floor(n.activeIndex.value / n.itemsPerView.value));
5188
- return se(() => a.value = n.register(t)), $e(() => n.unregister(t)), (r, i) => (f(), g("div", {
5208
+ const t = "carousel-item-" + fe(), a = w(0), o = V(() => Math.abs(n.deltaX.value) > 5), i = V(() => Math.floor(a.value / n.itemsPerView.value) === Math.floor(n.activeIndex.value / n.itemsPerView.value));
5209
+ return se(() => a.value = n.register(t)), $e(() => n.unregister(t)), (l, r) => (f(), b("div", {
5189
5210
  role: "group",
5190
5211
  class: "carousel-item",
5191
5212
  id: t,
5192
5213
  "aria-roledescription": "slide",
5193
- "aria-hidden": !u.value,
5214
+ "aria-hidden": !i.value,
5194
5215
  "aria-label": `Slide ${a.value + 1}`,
5195
- onClickCapture: i[0] || (i[0] = (s) => o.value && s.preventDefault())
5216
+ onClickCapture: r[0] || (r[0] = (s) => o.value && s.preventDefault())
5196
5217
  }, [
5197
- X(r.$slots, "default", {}, void 0, !0)
5198
- ], 40, qo));
5218
+ X(l.$slots, "default", {}, void 0, !0)
5219
+ ], 40, Oo));
5199
5220
  }
5200
5221
  }), Zl = /* @__PURE__ */ W(Fo, [["__scopeId", "data-v-a569d055"]]), Fe = /* @__PURE__ */ Symbol("TabsContext"), zl = Z({
5201
5222
  name: "Tabs",
@@ -5213,88 +5234,88 @@ const Hl = {
5213
5234
  },
5214
5235
  emits: ["update:modelValue"],
5215
5236
  setup(e, { emit: n, slots: t }) {
5216
- const a = w(e.modelValue ?? e.defaultValue), o = w(!1), u = w([]), r = w("forward"), i = w();
5217
- J(a, (y) => {
5218
- !y || !o.value || requestAnimationFrame(() => {
5219
- document.getElementById(`tab-${y}`)?.focus(), o.value = !1;
5237
+ const a = w(e.modelValue ?? e.defaultValue), o = w(!1), i = w([]), l = w("forward"), r = w();
5238
+ J(a, (C) => {
5239
+ !C || !o.value || requestAnimationFrame(() => {
5240
+ document.getElementById(`tab-${C}`)?.focus(), o.value = !1;
5220
5241
  });
5221
5242
  }), J(
5222
5243
  () => e.modelValue,
5223
- (y) => {
5224
- y !== void 0 && (a.value = y);
5244
+ (C) => {
5245
+ C !== void 0 && (a.value = C);
5225
5246
  }
5226
- ), J(u, (y) => {
5227
- !a.value && y.length && (a.value = y[0]);
5247
+ ), J(i, (C) => {
5248
+ !a.value && C.length && (a.value = C[0]);
5228
5249
  });
5229
- const s = (y, k) => u.value[k] = y, d = (y) => {
5230
- const k = u.value.filter(Boolean);
5231
- if (!k.length) return;
5232
- const _ = a.value;
5233
- if (!_) {
5234
- a.value = y, n("update:modelValue", y);
5250
+ const s = (C, M) => i.value[M] = C, d = (C) => {
5251
+ const M = i.value.filter(Boolean);
5252
+ if (!M.length) return;
5253
+ const S = a.value;
5254
+ if (!S) {
5255
+ a.value = C, n("update:modelValue", C);
5235
5256
  return;
5236
5257
  }
5237
- const B = k.indexOf(_), M = k.indexOf(y);
5238
- if (B === -1 || M === -1) {
5239
- a.value = y, n("update:modelValue", y);
5258
+ const $ = M.indexOf(S), k = M.indexOf(C);
5259
+ if ($ === -1 || k === -1) {
5260
+ a.value = C, n("update:modelValue", C);
5240
5261
  return;
5241
5262
  }
5242
- B !== -1 && M !== -1 && (r.value = M > B ? "forward" : "backward"), _ !== y && (a.value = y, n("update:modelValue", y));
5243
- }, l = H(() => r.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), p = (y) => {
5244
- y instanceof HTMLElement && i.value && (i.value.style.height = `${y.offsetHeight}px`);
5245
- }, m = (y) => {
5246
- if (y instanceof HTMLElement && i.value) {
5247
- const k = y.offsetHeight;
5263
+ $ !== -1 && k !== -1 && (l.value = k > $ ? "forward" : "backward"), S !== C && (a.value = C, n("update:modelValue", C));
5264
+ }, u = V(() => l.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), h = (C) => {
5265
+ C instanceof HTMLElement && r.value && (r.value.style.height = `${C.offsetHeight}px`);
5266
+ }, p = (C) => {
5267
+ if (C instanceof HTMLElement && r.value) {
5268
+ const M = C.offsetHeight;
5248
5269
  requestAnimationFrame(() => {
5249
- i.value && (i.value.style.height = `${k}px`);
5270
+ r.value && (r.value.style.height = `${M}px`);
5250
5271
  });
5251
5272
  }
5252
- }, b = () => {
5253
- i.value && (i.value.style.height = "");
5273
+ }, m = () => {
5274
+ r.value && (r.value.style.height = "");
5254
5275
  };
5255
5276
  return xe(Fe, {
5256
5277
  activeValue: a,
5257
5278
  setValue: d,
5258
5279
  registerTrigger: s,
5259
- direction: r,
5280
+ direction: l,
5260
5281
  activationMode: w(e.activationMode),
5261
5282
  orientation: w(e.orientation),
5262
- triggers: u,
5263
- contentWrapperRef: i,
5283
+ triggers: i,
5284
+ contentWrapperRef: r,
5264
5285
  focusOnChange: o
5265
5286
  }), () => {
5266
- const y = t.default?.() || [], k = [], _ = [];
5267
- y.forEach((M) => {
5268
- M.type?.name === "TabsContent" ? _.push(M) : k.push(M);
5287
+ const C = t.default?.() || [], M = [], S = [];
5288
+ C.forEach((k) => {
5289
+ k.type?.name === "TabsContent" ? S.push(k) : M.push(k);
5269
5290
  });
5270
- const B = _.find((M) => M.props?.value === a.value);
5291
+ const $ = S.find((k) => k.props?.value === a.value);
5271
5292
  return [
5272
- ...k,
5293
+ ...M,
5273
5294
  U(
5274
5295
  "div",
5275
5296
  {
5276
5297
  class: "tabs-content-wrapper",
5277
- ref: i
5298
+ ref: r
5278
5299
  },
5279
5300
  U(
5280
5301
  Se,
5281
5302
  {
5282
- name: l.value,
5303
+ name: u.value,
5283
5304
  mode: "out-in",
5284
- onBeforeLeave: p,
5285
- onEnter: m,
5286
- onAfterEnter: b
5305
+ onBeforeLeave: h,
5306
+ onEnter: p,
5307
+ onAfterEnter: m
5287
5308
  },
5288
- () => B ? [U(B.type, {
5289
- ...B.props,
5290
- key: B.props.value
5291
- }, B.children)] : []
5309
+ () => $ ? [U($.type, {
5310
+ ...$.props,
5311
+ key: $.props.value
5312
+ }, $.children)] : []
5292
5313
  )
5293
5314
  )
5294
5315
  ];
5295
5316
  };
5296
5317
  }
5297
- }), Ol = Z({
5318
+ }), ql = Z({
5298
5319
  name: "TabsList",
5299
5320
  setup(e, { slots: n }) {
5300
5321
  const t = de(Fe);
@@ -5309,7 +5330,7 @@ const Hl = {
5309
5330
  n.default?.()
5310
5331
  );
5311
5332
  }
5312
- }), ql = Z({
5333
+ }), Ol = Z({
5313
5334
  name: "TabsTrigger",
5314
5335
  props: {
5315
5336
  value: {
@@ -5328,36 +5349,36 @@ const Hl = {
5328
5349
  setup(e, { slots: n }) {
5329
5350
  const t = de(Fe);
5330
5351
  if (!t) throw new Error("TabsTrigger components must be used inside <Tabs>");
5331
- const a = H(() => t.activeValue.value === e.value), o = () => !e.disabled && t.setValue(e.value), u = (r) => {
5332
- if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(r.key)) return;
5333
- r.preventDefault();
5352
+ const a = V(() => t.activeValue.value === e.value), o = () => !e.disabled && t.setValue(e.value), i = (l) => {
5353
+ if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(l.key)) return;
5354
+ l.preventDefault();
5334
5355
  const s = t.triggers.value.filter(Boolean);
5335
- let l = s.indexOf(e.value);
5336
- const p = t.orientation.value === "horizontal";
5337
- switch (r.key) {
5356
+ let u = s.indexOf(e.value);
5357
+ const h = t.orientation.value === "horizontal";
5358
+ switch (l.key) {
5338
5359
  case "ArrowRight":
5339
- p && l++;
5360
+ h && u++;
5340
5361
  break;
5341
5362
  case "ArrowLeft":
5342
- p && l--;
5363
+ h && u--;
5343
5364
  break;
5344
5365
  case "ArrowDown":
5345
- p || l++;
5366
+ h || u++;
5346
5367
  break;
5347
5368
  case "ArrowUp":
5348
- p || l--;
5369
+ h || u--;
5349
5370
  break;
5350
5371
  case "Home":
5351
- l = 0;
5372
+ u = 0;
5352
5373
  break;
5353
5374
  case "End":
5354
- l = s.length - 1;
5375
+ u = s.length - 1;
5355
5376
  break;
5356
5377
  }
5357
- l = (l + s.length) % s.length;
5358
- const m = s[l];
5359
- t.activationMode.value === "auto" && t.setValue(m), requestAnimationFrame(() => {
5360
- document.getElementById(`tab-${m}`)?.focus();
5378
+ u = (u + s.length) % s.length;
5379
+ const p = s[u];
5380
+ t.activationMode.value === "auto" && t.setValue(p), requestAnimationFrame(() => {
5381
+ document.getElementById(`tab-${p}`)?.focus();
5361
5382
  });
5362
5383
  };
5363
5384
  return se(() => !e.disabled && t.registerTrigger(e.value, e.index)), $e(() => t.triggers.value[e.index] = void 0), () => U(
@@ -5372,7 +5393,7 @@ const Hl = {
5372
5393
  disabled: e.disabled ?? void 0,
5373
5394
  class: "tabs-trigger",
5374
5395
  onClick: o,
5375
- onKeydown: u
5396
+ onKeydown: i
5376
5397
  },
5377
5398
  { default: () => n.default?.() }
5378
5399
  );
@@ -5403,43 +5424,43 @@ const Hl = {
5403
5424
  __name: "Dropdown",
5404
5425
  setup(e) {
5405
5426
  let n = 0;
5406
- const t = w(!1), a = w(null), o = w({}), u = `dropdown-${fe()}`, r = `${u}-menu`, i = `${u}-trigger`, s = () => t.value = !0, d = () => {
5427
+ const t = w(!1), a = w(null), o = w({}), i = `dropdown-${fe()}`, l = `${i}-menu`, r = `${i}-trigger`, s = () => t.value = !0, d = () => {
5407
5428
  t.value = !1, o.value = {}, n = 0, a.value?.focus({ preventScroll: !0 });
5408
- }, l = () => t.value = !t.value, p = (M) => {
5409
- const I = `dropdown-item-${n++}`;
5410
- return o.value[I] = M, I;
5411
- }, m = (M) => {
5412
- const I = o.value[M];
5413
- I && I.focus({ preventScroll: !0 });
5414
- }, b = () => {
5415
- const M = Object.keys(o.value)[0];
5416
- M && m(M);
5417
- }, y = () => {
5418
- const M = Object.keys(o.value), I = M[M.length - 1];
5419
- I && m(I);
5420
- }, k = (M) => {
5421
- const I = Object.keys(o.value), C = B(M), R = I[C + 1];
5422
- C >= 0 && C < I.length - 1 && R && m(R);
5423
- }, _ = (M) => {
5424
- const I = Object.keys(o.value), C = B(M), R = I[C - 1];
5425
- C > 0 && R && m(R);
5426
- }, B = (M) => Object.keys(o.value).indexOf(M);
5429
+ }, u = () => t.value = !t.value, h = (k) => {
5430
+ const H = `dropdown-item-${n++}`;
5431
+ return o.value[H] = k, H;
5432
+ }, p = (k) => {
5433
+ const H = o.value[k];
5434
+ H && H.focus({ preventScroll: !0 });
5435
+ }, m = () => {
5436
+ const k = Object.keys(o.value)[0];
5437
+ k && p(k);
5438
+ }, C = () => {
5439
+ const k = Object.keys(o.value), H = k[k.length - 1];
5440
+ H && p(H);
5441
+ }, M = (k) => {
5442
+ const H = Object.keys(o.value), g = $(k), R = H[g + 1];
5443
+ g >= 0 && g < H.length - 1 && R && p(R);
5444
+ }, S = (k) => {
5445
+ const H = Object.keys(o.value), g = $(k), R = H[g - 1];
5446
+ g > 0 && R && p(R);
5447
+ }, $ = (k) => Object.keys(o.value).indexOf(k);
5427
5448
  return xe("DropdownContext", {
5428
5449
  open: s,
5429
5450
  close: d,
5430
- toggle: l,
5451
+ toggle: u,
5431
5452
  isOpen: t,
5432
- registerItem: p,
5433
- focusItem: m,
5434
- focusNextItem: k,
5435
- focusPrevItem: _,
5436
- focusFirstItem: b,
5437
- focusLastItem: y,
5453
+ registerItem: h,
5454
+ focusItem: p,
5455
+ focusNextItem: M,
5456
+ focusPrevItem: S,
5457
+ focusFirstItem: m,
5458
+ focusLastItem: C,
5438
5459
  triggerRef: a,
5439
- menuId: r,
5440
- triggerId: i
5441
- }), (M, I) => (f(), g("div", No, [
5442
- X(M.$slots, "default")
5460
+ menuId: l,
5461
+ triggerId: r
5462
+ }), (k, H) => (f(), b("div", No, [
5463
+ X(k.$slots, "default")
5443
5464
  ]));
5444
5465
  }
5445
5466
  }), Po = /* @__PURE__ */ Z({
@@ -5450,10 +5471,10 @@ const Hl = {
5450
5471
  setup(e) {
5451
5472
  const n = e, t = de("DropdownContext");
5452
5473
  if (!t) throw new Error("DropdownTrigger must be used within a Dropdown");
5453
- const a = w(), o = (u) => {
5454
- u.key === "ArrowDown" && (u.preventDefault(), t.open(), Me(() => t.focusFirstItem())), u.key === "ArrowUp" && (u.preventDefault(), t.open(), Me(() => t.focusLastItem()));
5474
+ const a = w(), o = (i) => {
5475
+ i.key === "ArrowDown" && (i.preventDefault(), t.open(), Me(() => t.focusFirstItem())), i.key === "ArrowUp" && (i.preventDefault(), t.open(), Me(() => t.focusLastItem()));
5455
5476
  };
5456
- return se(() => t.triggerRef.value = a.value?.el), (u, r) => (f(), ee(ke, {
5477
+ return se(() => t.triggerRef.value = a.value?.el), (i, l) => (f(), ee(ke, {
5457
5478
  ref_key: "btn",
5458
5479
  ref: a,
5459
5480
  id: E(t).triggerId,
@@ -5465,7 +5486,7 @@ const Hl = {
5465
5486
  onKeydown: o
5466
5487
  }, {
5467
5488
  default: Q(() => [
5468
- X(u.$slots, "default", {}, void 0, !0),
5489
+ X(i.$slots, "default", {}, void 0, !0),
5469
5490
  n.variant === "button" ? (f(), ee(pe, {
5470
5491
  key: 0,
5471
5492
  name: "directionDown"
@@ -5479,41 +5500,41 @@ const Hl = {
5479
5500
  setup(e) {
5480
5501
  const n = de("DropdownContext");
5481
5502
  if (!n) throw new Error("DropdownMenu must be used within a Dropdown");
5482
- const t = w(), a = w({}), o = (i) => {
5483
- const s = i.target;
5503
+ const t = w(), a = w({}), o = (r) => {
5504
+ const s = r.target;
5484
5505
  t.value?.contains(s) || n.triggerRef.value?.contains(s) || n.close();
5485
- }, u = (i) => i.key === "Escape" && n.close(), r = () => {
5486
- const i = n.triggerRef.value, s = t.value;
5487
- if (!i || !s) return;
5488
- const d = 16, l = i.getBoundingClientRect(), p = s.getBoundingClientRect();
5489
- let m = l.bottom, b = l.left;
5490
- b = Math.min(
5491
- Math.max(d, b),
5492
- window.innerWidth - p.width - d
5493
- );
5494
- const y = window.innerHeight - l.bottom, k = l.top;
5495
- y < p.height && k > p.height && (m = l.top - p.height), m = Math.min(
5506
+ }, i = (r) => r.key === "Escape" && n.close(), l = () => {
5507
+ const r = n.triggerRef.value, s = t.value;
5508
+ if (!r || !s) return;
5509
+ const d = 16, u = r.getBoundingClientRect(), h = s.getBoundingClientRect();
5510
+ let p = u.bottom, m = u.left;
5511
+ m = Math.min(
5496
5512
  Math.max(d, m),
5497
- window.innerHeight - p.height - d
5513
+ window.innerWidth - h.width - d
5514
+ );
5515
+ const C = window.innerHeight - u.bottom, M = u.top;
5516
+ C < h.height && M > h.height && (p = u.top - h.height), p = Math.min(
5517
+ Math.max(d, p),
5518
+ window.innerHeight - h.height - d
5498
5519
  ), a.value = {
5499
5520
  "--dropdown-menu-position": "fixed",
5500
- "--dropdown-menu-top": `${m}px`,
5501
- "--dropdown-menu-left": `${b}px`
5521
+ "--dropdown-menu-top": `${p}px`,
5522
+ "--dropdown-menu-left": `${m}px`
5502
5523
  };
5503
5524
  };
5504
5525
  return J(
5505
5526
  () => n.isOpen.value,
5506
- (i) => {
5507
- i ? (requestAnimationFrame(() => {
5508
- r(), n.focusFirstItem();
5527
+ (r) => {
5528
+ r ? (requestAnimationFrame(() => {
5529
+ l(), n.focusFirstItem();
5509
5530
  }), document.addEventListener("pointerdown", o, !0)) : document.removeEventListener("pointerdown", o, !0);
5510
5531
  }
5511
5532
  ), se(() => {
5512
- window.addEventListener("scroll", r, !0), window.addEventListener("resize", r);
5533
+ window.addEventListener("scroll", l, !0), window.addEventListener("resize", l);
5513
5534
  }), $e(() => {
5514
- window.removeEventListener("scroll", r, !0), window.removeEventListener("resize", r);
5515
- }), (i, s) => (f(), ee(Ze, { to: "body" }, [
5516
- E(n).isOpen.value ? (f(), g("div", {
5535
+ window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
5536
+ }), (r, s) => (f(), ee(Ze, { to: "body" }, [
5537
+ E(n).isOpen.value ? (f(), b("div", {
5517
5538
  key: 0,
5518
5539
  role: "menu",
5519
5540
  ref_key: "menuRef",
@@ -5523,9 +5544,9 @@ const Hl = {
5523
5544
  "aria-orientation": "vertical",
5524
5545
  "aria-labelledby": E(n).triggerId,
5525
5546
  class: "ui-dropdown-menu",
5526
- onKeydown: u
5547
+ onKeydown: i
5527
5548
  }, [
5528
- X(i.$slots, "default", {}, void 0, !0)
5549
+ X(r.$slots, "default", {}, void 0, !0)
5529
5550
  ], 44, Ko)) : N("", !0)
5530
5551
  ]));
5531
5552
  }
@@ -5535,49 +5556,49 @@ const Hl = {
5535
5556
  const n = de("DropdownContext");
5536
5557
  if (!n) throw new Error("DropdownItem must be used within a Dropdown");
5537
5558
  let t;
5538
- const a = w(), o = (u) => {
5539
- u.key === "ArrowDown" && (u.preventDefault(), n.focusNextItem(t)), u.key === "ArrowUp" && (u.preventDefault(), n.focusPrevItem(t)), (u.key === "Enter" || u.key === " ") && (u.preventDefault(), a.value?.click(), n.close());
5559
+ const a = w(), o = (i) => {
5560
+ 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());
5540
5561
  };
5541
- return se(() => t = n.registerItem(a.value)), (u, r) => (f(), g("div", {
5562
+ return se(() => t = n.registerItem(a.value)), (i, l) => (f(), b("div", {
5542
5563
  ref_key: "itemRef",
5543
5564
  ref: a,
5544
5565
  role: "menuitem",
5545
5566
  class: "ui-dropdown-item",
5546
5567
  tabindex: "-1",
5547
5568
  onKeydown: o,
5548
- onClick: r[0] || (r[0] = //@ts-ignore
5549
- (...i) => E(n).close && E(n).close(...i)),
5550
- onPointerenter: r[1] || (r[1] = (i) => a.value?.focus())
5569
+ onClick: l[0] || (l[0] = //@ts-ignore
5570
+ (...r) => E(n).close && E(n).close(...r)),
5571
+ onPointerenter: l[1] || (l[1] = (r) => a.value?.focus())
5551
5572
  }, [
5552
- X(u.$slots, "default", {}, void 0, !0)
5573
+ X(i.$slots, "default", {}, void 0, !0)
5553
5574
  ], 544));
5554
5575
  }
5555
5576
  }), Ul = /* @__PURE__ */ W(jo, [["__scopeId", "data-v-69de3d9c"]]), Wo = (e) => {
5556
- const n = /* @__PURE__ */ new Date(), t = e.locale || "default", a = w(e.modelValue ?? null), o = w(e.modelValue ? new Date(e.modelValue) : n), u = e.firstDayOfWeek ?? 0, r = H(() => {
5557
- const m = new Intl.DateTimeFormat(t, { month: "long", year: "numeric" }).format(o.value);
5558
- return m.charAt(0).toUpperCase() + m.slice(1);
5559
- }), i = H(() => {
5560
- const m = new Date(2021, 5, 6);
5561
- return Array.from({ length: 7 }).map((b, y) => {
5562
- const k = new Date(m);
5563
- return k.setDate(m.getDate() + (y + u) % 7), new Intl.DateTimeFormat(t, { weekday: "short" }).format(k).replace(".", "");
5577
+ 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, l = V(() => {
5578
+ const p = new Intl.DateTimeFormat(t, { month: "long", year: "numeric" }).format(o.value);
5579
+ return p.charAt(0).toUpperCase() + p.slice(1);
5580
+ }), r = V(() => {
5581
+ const p = new Date(2021, 5, 6);
5582
+ return Array.from({ length: 7 }).map((m, C) => {
5583
+ const M = new Date(p);
5584
+ return M.setDate(p.getDate() + (C + i) % 7), new Intl.DateTimeFormat(t, { weekday: "short" }).format(M).replace(".", "");
5564
5585
  });
5565
- }), s = H(() => {
5566
- const m = o.value.getFullYear(), b = o.value.getMonth(), y = new Date(m, b, 1), k = new Date(m, b + 1, 0), _ = (y.getDay() - u + 7) % 7, B = k.getDate(), M = [];
5567
- for (let I = 0; I < _; I++) M.push(null);
5568
- for (let I = 1; I <= B; I++) M.push(new Date(m, b, I));
5569
- return M;
5586
+ }), s = V(() => {
5587
+ const p = o.value.getFullYear(), m = o.value.getMonth(), C = new Date(p, m, 1), M = new Date(p, m + 1, 0), S = (C.getDay() - i + 7) % 7, $ = M.getDate(), k = [];
5588
+ for (let H = 0; H < S; H++) k.push(null);
5589
+ for (let H = 1; H <= $; H++) k.push(new Date(p, m, H));
5590
+ return k;
5570
5591
  });
5571
5592
  return {
5572
5593
  today: n,
5573
5594
  selected: a,
5574
5595
  currentMonth: o,
5575
- monthLabel: r,
5576
- weekDays: i,
5596
+ monthLabel: l,
5597
+ weekDays: r,
5577
5598
  days: s,
5578
5599
  nextMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() + 1, 1),
5579
5600
  prevMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() - 1, 1),
5580
- select: (m) => a.value = m
5601
+ select: (p) => a.value = p
5581
5602
  };
5582
5603
  }, At = /(DD|MM|YYYY|HH|mm|ss)/g, Ge = (e, n) => {
5583
5604
  const t = {
@@ -5592,26 +5613,26 @@ const Hl = {
5592
5613
  }, yt = (e, n) => {
5593
5614
  const t = n.replace("DD", "(?<day>\\d{2})").replace("MM", "(?<month>\\d{2})").replace("YYYY", "(?<year>\\d{4})").replace("HH", "(?<hour>\\d{2})").replace("mm", "(?<minute>\\d{2})").replace("ss", "(?<second>\\d{2})"), a = new RegExp(`^${t}$`), o = e.match(a);
5594
5615
  if (!o?.groups) return null;
5595
- const u = Number(o.groups.day ?? 1), r = Number(o.groups.month ?? 1), i = Number(o.groups.year ?? 1970), s = Number(o.groups.hour ?? 0), d = Number(o.groups.minute ?? 0), l = Number(o.groups.second ?? 0);
5596
- return Yo(u, r, i) ? new Date(i, r - 1, u, s, d, l, 0) : null;
5616
+ const i = Number(o.groups.day ?? 1), l = Number(o.groups.month ?? 1), r = Number(o.groups.year ?? 1970), s = Number(o.groups.hour ?? 0), d = Number(o.groups.minute ?? 0), u = Number(o.groups.second ?? 0);
5617
+ return Yo(i, l, r) ? new Date(r, l - 1, i, s, d, u, 0) : null;
5597
5618
  };
5598
5619
  function Yo(e, n, t, a = 1900, o = 2100) {
5599
5620
  if (!Number.isInteger(e) || !Number.isInteger(n) || !Number.isInteger(t) || n < 1 || n > 12 || t < a || t > o) return !1;
5600
- const u = new Date(t, n, 0).getDate();
5601
- if (e < 1 || e > u) return !1;
5602
- const r = new Date(t, n - 1, e);
5603
- return r.getFullYear() === t && r.getMonth() === n - 1 && r.getDate() === e;
5621
+ const i = new Date(t, n, 0).getDate();
5622
+ if (e < 1 || e > i) return !1;
5623
+ const l = new Date(t, n - 1, e);
5624
+ return l.getFullYear() === t && l.getMonth() === n - 1 && l.getDate() === e;
5604
5625
  }
5605
5626
  const Xo = (e, n) => {
5606
5627
  const t = e.replace(/\D/g, ""), a = n.match(At);
5607
5628
  if (!a) return e;
5608
- let o = "", u = 0;
5609
- for (const r of a) {
5610
- const i = r.length, s = t.slice(u, u + i);
5629
+ let o = "", i = 0;
5630
+ for (const l of a) {
5631
+ const r = l.length, s = t.slice(i, i + r);
5611
5632
  if (!s) break;
5612
- if (o += s, u += s.length, u < t.length) {
5613
- const d = n.indexOf(r) + r.length, l = n[d];
5614
- l && !l.match(/[DMYHms]/) && (o += l);
5633
+ if (o += s, i += s.length, i < t.length) {
5634
+ const d = n.indexOf(l) + l.length, u = n[d];
5635
+ u && !u.match(/[DMYHms]/) && (o += u);
5615
5636
  }
5616
5637
  }
5617
5638
  return o;
@@ -5642,14 +5663,14 @@ const Xo = (e, n) => {
5642
5663
  }),
5643
5664
  emits: /* @__PURE__ */ oe(["update:open"], ["update:modelValue"]),
5644
5665
  setup(e, { emit: n }) {
5645
- const t = he(e, "modelValue"), a = n, o = e, u = w(!1), r = w(""), i = w(null), s = w(null), {
5666
+ const t = he(e, "modelValue"), a = n, o = e, i = w(!1), l = w(""), r = w(null), s = w(null), {
5646
5667
  monthLabel: d,
5647
- weekDays: l,
5648
- currentMonth: p,
5649
- days: m,
5650
- nextMonth: b,
5651
- prevMonth: y,
5652
- select: k
5668
+ weekDays: u,
5669
+ currentMonth: h,
5670
+ days: p,
5671
+ nextMonth: m,
5672
+ prevMonth: C,
5673
+ select: M
5653
5674
  } = Wo({
5654
5675
  modelValue: t.value,
5655
5676
  locale: o.locale,
@@ -5659,57 +5680,57 @@ const Xo = (e, n) => {
5659
5680
  () => t.value,
5660
5681
  (D) => {
5661
5682
  if (!D) {
5662
- r.value = "", s.value = null;
5683
+ l.value = "", s.value = null;
5663
5684
  return;
5664
5685
  }
5665
- k(D), p.value = new Date(D), s.value = D, r.value = Ge(D, o.format);
5686
+ M(D), h.value = new Date(D), s.value = D, l.value = Ge(D, o.format);
5666
5687
  },
5667
5688
  { immediate: !0 }
5668
5689
  ), J(
5669
- u,
5690
+ i,
5670
5691
  async (D) => {
5671
5692
  if (D) {
5672
5693
  await Me();
5673
- let S = i.value?.querySelector('button[data-selected="true"]');
5674
- if (!S) {
5694
+ let _ = r.value?.querySelector('button[data-selected="true"]');
5695
+ if (!_) {
5675
5696
  const A = /* @__PURE__ */ new Date();
5676
- S = Array.from(i.value?.querySelectorAll("button") || []).find(($) => Number($.textContent) === A.getDate() && !$.disabled);
5697
+ _ = Array.from(r.value?.querySelectorAll("button") || []).find((I) => Number(I.textContent) === A.getDate() && !I.disabled);
5677
5698
  }
5678
- S && S.focus(), document.addEventListener("keydown", M);
5679
- } else document.removeEventListener("keydown", M);
5699
+ _ && _.focus(), document.addEventListener("keydown", k);
5700
+ } else document.removeEventListener("keydown", k);
5680
5701
  }
5681
5702
  );
5682
- const _ = (D) => {
5683
- s.value = D, t.value = D, r.value = Ge(D, o.format), k(D), u.value = !1;
5684
- }, B = (D) => !D || !s.value ? "" : D.toDateString() === s.value.toDateString() ? "dp-selected" : "", M = (D) => D.key === "Escape" && (u.value = !1), I = (D) => {
5703
+ const S = (D) => {
5704
+ s.value = D, t.value = D, l.value = Ge(D, o.format), M(D), i.value = !1;
5705
+ }, $ = (D) => !D || !s.value ? "" : D.toDateString() === s.value.toDateString() ? "dp-selected" : "", k = (D) => D.key === "Escape" && (i.value = !1), H = (D) => {
5685
5706
  D.key === "Backspace" || D.key === "Delete" || D.key === "ArrowLeft" || D.key === "ArrowRight" || D.key === "Tab" || /[0-9]/.test(D.key) || D.preventDefault();
5686
- }, C = (D) => {
5687
- const S = D.target, A = S.selectionStart ?? 0, V = S.value.slice(0, A).replace(/\D/g, "").length;
5688
- let O = S.value.replace(/\D/g, "");
5707
+ }, g = (D) => {
5708
+ const _ = D.target, A = _.selectionStart ?? 0, B = _.value.slice(0, A).replace(/\D/g, "").length;
5709
+ let q = _.value.replace(/\D/g, "");
5689
5710
  const te = Go(o.format);
5690
- O = O.slice(0, te);
5691
- const ae = Xo(O, o.format);
5692
- r.value = ae, S.value = ae;
5693
- let ce = 0, q = 0;
5711
+ q = q.slice(0, te);
5712
+ const ae = Xo(q, o.format);
5713
+ l.value = ae, _.value = ae;
5714
+ let ce = 0, O = 0;
5694
5715
  for (let v = 0; v < ae.length; v++)
5695
- if (/\d/.test(ae[v] ?? "") && q++, q >= V) {
5716
+ if (/\d/.test(ae[v] ?? "") && O++, O >= B) {
5696
5717
  ce = v + 1;
5697
5718
  break;
5698
5719
  }
5699
- requestAnimationFrame(() => S.setSelectionRange(ce, ce));
5720
+ requestAnimationFrame(() => _.setSelectionRange(ce, ce));
5700
5721
  const c = yt(ae, o.format);
5701
5722
  c && (s.value = c, t.value = c);
5702
5723
  }, R = () => {
5703
- u.value || (u.value = !0, a("update:open", !0));
5724
+ i.value || (i.value = !0, a("update:open", !0));
5704
5725
  }, F = (D) => {
5705
- i.value && (i.value.contains(D.target) || (u.value = !1, a("update:open", !1)));
5726
+ r.value && (r.value.contains(D.target) || (i.value = !1, a("update:open", !1)));
5706
5727
  }, G = () => {
5707
- const D = yt(r.value, o.format);
5708
- !D && !s.value ? (r.value = "", t.value = null, s.value = null) : D && (s.value = D, t.value = D, r.value = Ge(D, o.format));
5728
+ const D = yt(l.value, o.format);
5729
+ !D && !s.value ? (l.value = "", t.value = null, s.value = null) : D && (s.value = D, t.value = D, l.value = Ge(D, o.format));
5709
5730
  };
5710
- return se(() => document.addEventListener("mousedown", F)), _e(() => document.removeEventListener("mousedown", F)), (D, S) => (f(), g("div", {
5731
+ return se(() => document.addEventListener("mousedown", F)), _e(() => document.removeEventListener("mousedown", F)), (D, _) => (f(), b("div", {
5711
5732
  ref_key: "root",
5712
- ref: i,
5733
+ ref: r,
5713
5734
  class: ue(["dp", { required: Object.keys(D.$attrs).includes("required"), error: e.invalid }])
5714
5735
  }, [
5715
5736
  L("label", {
@@ -5719,13 +5740,13 @@ const Xo = (e, n) => {
5719
5740
  L("input", {
5720
5741
  id: e.id,
5721
5742
  class: "dp-input",
5722
- value: r.value,
5743
+ value: l.value,
5723
5744
  onBlur: G,
5724
- onInput: C,
5725
- onKeydown: I,
5745
+ onInput: g,
5746
+ onKeydown: H,
5726
5747
  onMousedown: R,
5727
5748
  required: Object.keys(D.$attrs).includes("required") || void 0,
5728
- "aria-invalid": !s.value && r.value !== "",
5749
+ "aria-invalid": !s.value && l.value !== "",
5729
5750
  disabled: e.disabled ? !0 : void 0,
5730
5751
  "data-disabled": e.disabled ? !0 : void 0,
5731
5752
  "aria-describedby": "time-help",
@@ -5744,50 +5765,50 @@ const Xo = (e, n) => {
5744
5765
  ]),
5745
5766
  _: 1
5746
5767
  }, 8, ["disabled"]),
5747
- S[3] || (S[3] = L("small", {
5768
+ _[3] || (_[3] = L("small", {
5748
5769
  id: "time-help",
5749
5770
  class: "sr-only"
5750
5771
  }, "After selecting a date, adjust hours and minutes", -1)),
5751
- u.value ? (f(), g("div", el, [
5772
+ i.value ? (f(), b("div", el, [
5752
5773
  L("header", tl, [
5753
5774
  L("button", {
5754
5775
  type: "button",
5755
- onClick: S[0] || (S[0] = //@ts-ignore
5756
- (...A) => E(y) && E(y)(...A)),
5776
+ onClick: _[0] || (_[0] = //@ts-ignore
5777
+ (...A) => E(C) && E(C)(...A)),
5757
5778
  class: "btn__prev_month",
5758
5779
  "aria-label": "Previous month"
5759
5780
  }, "‹"),
5760
5781
  L("span", al, K(E(d)), 1),
5761
5782
  L("button", {
5762
5783
  type: "button",
5763
- onClick: S[1] || (S[1] = //@ts-ignore
5764
- (...A) => E(b) && E(b)(...A)),
5784
+ onClick: _[1] || (_[1] = //@ts-ignore
5785
+ (...A) => E(m) && E(m)(...A)),
5765
5786
  class: "btn__next_month",
5766
5787
  "aria-label": "Next month"
5767
5788
  }, "›")
5768
5789
  ]),
5769
5790
  L("div", nl, [
5770
- (f(!0), g(re, null, ve(E(l), (A) => (f(), g("span", {
5791
+ (f(!0), b(re, null, ve(E(u), (A) => (f(), b("span", {
5771
5792
  class: "week-day__name",
5772
5793
  key: A
5773
5794
  }, K(A), 1))), 128))
5774
5795
  ]),
5775
5796
  L("div", ol, [
5776
- (f(!0), g(re, null, ve(E(m), (A, $) => (f(), g("button", {
5777
- key: $,
5797
+ (f(!0), b(re, null, ve(E(p), (A, I) => (f(), b("button", {
5798
+ key: I,
5778
5799
  type: "button",
5779
5800
  role: "gridcell",
5780
- class: ue(["btn__day", B(A)]),
5801
+ class: ue(["btn__day", $(A)]),
5781
5802
  disabled: !A,
5782
- "aria-pressed": B(A) === "dp-selected",
5783
- "data-selected": A && B(A) === "dp-selected",
5784
- onMousedown: ie((V) => A && _(A), ["prevent"]),
5803
+ "aria-pressed": $(A) === "dp-selected",
5804
+ "data-selected": A && $(A) === "dp-selected",
5805
+ onMousedown: ie((B) => A && S(A), ["prevent"]),
5785
5806
  "aria-label": A ? A.toLocaleDateString(o.locale, { weekday: "long", year: "numeric", month: "long", day: "numeric" }) : ""
5786
5807
  }, K(A?.getDate()), 43, ll))), 128))
5787
5808
  ]),
5788
5809
  j(ke, {
5789
5810
  class: "btn-ghost btn-sm",
5790
- onClick: S[2] || (S[2] = (A) => t.value = /* @__PURE__ */ new Date())
5811
+ onClick: _[2] || (_[2] = (A) => t.value = /* @__PURE__ */ new Date())
5791
5812
  }, {
5792
5813
  default: Q(() => [
5793
5814
  be(K(e.todayLabel), 1)
@@ -5823,51 +5844,51 @@ const Xo = (e, n) => {
5823
5844
  }),
5824
5845
  emits: ["update:modelValue"],
5825
5846
  setup(e) {
5826
- const n = he(e, "modelValue"), t = e, a = fe(), o = w(!1), u = w(null), r = H(() => t.format.includes("HH")), i = H(() => t.format.includes("mm")), s = H(() => t.format.includes("ss")), d = w(n.value ?? null), l = w(n.value?.getHours() ?? (r.value ? 0 : void 0)), p = w(n.value?.getMinutes() ?? (i.value ? 0 : void 0)), m = w(n.value?.getSeconds() ?? (s.value ? 0 : void 0));
5827
- J(n, (B) => {
5828
- if (B) {
5829
- const M = new Date(B);
5830
- d.value = M, l.value = M.getHours(), p.value = M.getMinutes(), m.value = M.getSeconds();
5847
+ const n = he(e, "modelValue"), t = e, a = fe(), o = w(!1), i = w(null), l = V(() => t.format.includes("HH")), r = V(() => t.format.includes("mm")), s = V(() => t.format.includes("ss")), d = w(n.value ?? null), u = w(n.value?.getHours() ?? (l.value ? 0 : void 0)), h = w(n.value?.getMinutes() ?? (r.value ? 0 : void 0)), p = w(n.value?.getSeconds() ?? (s.value ? 0 : void 0));
5848
+ J(n, ($) => {
5849
+ if ($) {
5850
+ const k = new Date($);
5851
+ d.value = k, u.value = k.getHours(), h.value = k.getMinutes(), p.value = k.getSeconds();
5831
5852
  } else
5832
- d.value = null, l.value = 0, p.value = 0, m.value = 0;
5833
- }, { immediate: !0 }), J(d, (B) => {
5834
- if (!B) return;
5835
- const M = B.getHours(), I = B.getMinutes(), C = B.getSeconds();
5836
- M !== l.value && (l.value = M), I !== p.value && (p.value = I), C !== m.value && (m.value = C);
5837
- }, { immediate: !0 }), J([d, l, p, m], () => {
5853
+ d.value = null, u.value = 0, h.value = 0, p.value = 0;
5854
+ }, { immediate: !0 }), J(d, ($) => {
5855
+ if (!$) return;
5856
+ const k = $.getHours(), H = $.getMinutes(), g = $.getSeconds();
5857
+ k !== u.value && (u.value = k), H !== h.value && (h.value = H), g !== p.value && (p.value = g);
5858
+ }, { immediate: !0 }), J([d, u, h, p], () => {
5838
5859
  if (!d.value) {
5839
5860
  n.value = null;
5840
5861
  return;
5841
5862
  }
5842
- const B = Math.min(Math.max(l.value ?? 0, 0), 23), M = Math.min(Math.max(p.value ?? 0, 0), 59), I = Math.min(Math.max(m.value ?? 0, 0), 59), C = new Date(d.value);
5843
- C.setHours(B, M, I, 0), (!n.value || n.value.getTime() !== C.getTime()) && (n.value = C);
5863
+ const $ = Math.min(Math.max(u.value ?? 0, 0), 23), k = Math.min(Math.max(h.value ?? 0, 0), 59), H = Math.min(Math.max(p.value ?? 0, 0), 59), g = new Date(d.value);
5864
+ g.setHours($, k, H, 0), (!n.value || n.value.getTime() !== g.getTime()) && (n.value = g);
5844
5865
  });
5845
- const b = (B) => {
5846
- u.value && (u.value.contains(B.target) || (o.value = !1));
5847
- }, y = (B) => {
5848
- const M = Number(B.target.value);
5849
- isNaN(M) || M < 0 ? l.value = 0 : M > 23 ? l.value = 23 : l.value = M;
5850
- }, k = (B) => {
5851
- const M = Number(B.target.value);
5852
- isNaN(M) || M < 0 ? p.value = 0 : M > 59 ? p.value = 59 : p.value = M;
5853
- }, _ = (B) => {
5854
- const M = Number(B.target.value);
5855
- isNaN(M) || M < 0 ? m.value = 0 : M > 59 ? m.value = 59 : m.value = M;
5866
+ const m = ($) => {
5867
+ i.value && (i.value.contains($.target) || (o.value = !1));
5868
+ }, C = ($) => {
5869
+ const k = Number($.target.value);
5870
+ isNaN(k) || k < 0 ? u.value = 0 : k > 23 ? u.value = 23 : u.value = k;
5871
+ }, M = ($) => {
5872
+ const k = Number($.target.value);
5873
+ isNaN(k) || k < 0 ? h.value = 0 : k > 59 ? h.value = 59 : h.value = k;
5874
+ }, S = ($) => {
5875
+ const k = Number($.target.value);
5876
+ isNaN(k) || k < 0 ? p.value = 0 : k > 59 ? p.value = 59 : p.value = k;
5856
5877
  };
5857
5878
  return se(() => {
5858
- document.addEventListener("mousedown", b);
5879
+ document.addEventListener("mousedown", m);
5859
5880
  }), _e(() => {
5860
- document.removeEventListener("mousedown", b);
5861
- }), (B, M) => (f(), g("div", {
5881
+ document.removeEventListener("mousedown", m);
5882
+ }), ($, k) => (f(), b("div", {
5862
5883
  class: "dtp",
5863
5884
  ref_key: "root",
5864
- ref: u
5885
+ ref: i
5865
5886
  }, [
5866
- j(sl, ge(B.$attrs, {
5887
+ j(sl, ge($.$attrs, {
5867
5888
  modelValue: d.value,
5868
- "onUpdate:modelValue": M[3] || (M[3] = (I) => d.value = I),
5889
+ "onUpdate:modelValue": k[3] || (k[3] = (H) => d.value = H),
5869
5890
  open: o.value,
5870
- "onUpdate:open": M[4] || (M[4] = (I) => o.value = I),
5891
+ "onUpdate:open": k[4] || (k[4] = (H) => o.value = H),
5871
5892
  id: t.id,
5872
5893
  invalid: e.invalid,
5873
5894
  locale: e.locale,
@@ -5877,65 +5898,65 @@ const Xo = (e, n) => {
5877
5898
  placeholder: e.placeholder
5878
5899
  }), {
5879
5900
  time: Q(() => [
5880
- o.value ? (f(), g("div", il, [
5881
- r.value ? Ve((f(), g("input", {
5901
+ o.value ? (f(), b("div", il, [
5902
+ l.value ? Ve((f(), b("input", {
5882
5903
  key: 0,
5883
5904
  id: `hour_${E(a)}`,
5884
5905
  type: "number",
5885
- "onUpdate:modelValue": M[0] || (M[0] = (I) => l.value = I),
5906
+ "onUpdate:modelValue": k[0] || (k[0] = (H) => u.value = H),
5886
5907
  min: "0",
5887
5908
  max: "23",
5888
5909
  "aria-label": "Hour",
5889
5910
  "aria-valuemin": "0",
5890
5911
  "aria-valuemax": "23",
5891
- "aria-valuenow": l.value,
5892
- onInput: y
5912
+ "aria-valuenow": u.value,
5913
+ onInput: C
5893
5914
  }, null, 40, ul)), [
5894
5915
  [
5895
5916
  Ue,
5896
- l.value,
5917
+ u.value,
5897
5918
  void 0,
5898
5919
  { number: !0 }
5899
5920
  ]
5900
5921
  ]) : N("", !0),
5901
- r.value && i.value ? (f(), g("span", cl, ":")) : N("", !0),
5902
- i.value ? Ve((f(), g("input", {
5922
+ l.value && r.value ? (f(), b("span", cl, ":")) : N("", !0),
5923
+ r.value ? Ve((f(), b("input", {
5903
5924
  key: 2,
5904
5925
  id: `minute_${E(a)}`,
5905
5926
  type: "number",
5906
- "onUpdate:modelValue": M[1] || (M[1] = (I) => p.value = I),
5927
+ "onUpdate:modelValue": k[1] || (k[1] = (H) => h.value = H),
5907
5928
  min: "0",
5908
5929
  max: "59",
5909
5930
  "aria-label": "Minute",
5910
5931
  "aria-valuemin": "0",
5911
5932
  "aria-valuemax": "59",
5912
- "aria-valuenow": p.value,
5913
- onInput: k
5933
+ "aria-valuenow": h.value,
5934
+ onInput: M
5914
5935
  }, null, 40, dl)), [
5915
5936
  [
5916
5937
  Ue,
5917
- p.value,
5938
+ h.value,
5918
5939
  void 0,
5919
5940
  { number: !0 }
5920
5941
  ]
5921
5942
  ]) : N("", !0),
5922
- (r.value || i.value) && s.value ? (f(), g("span", vl, ":")) : N("", !0),
5923
- s.value ? Ve((f(), g("input", {
5943
+ (l.value || r.value) && s.value ? (f(), b("span", vl, ":")) : N("", !0),
5944
+ s.value ? Ve((f(), b("input", {
5924
5945
  key: 4,
5925
5946
  id: `second_${E(a)}`,
5926
5947
  type: "number",
5927
- "onUpdate:modelValue": M[2] || (M[2] = (I) => m.value = I),
5948
+ "onUpdate:modelValue": k[2] || (k[2] = (H) => p.value = H),
5928
5949
  min: "0",
5929
5950
  max: "59",
5930
5951
  "aria-label": "Second",
5931
5952
  "aria-valuemin": "0",
5932
5953
  "aria-valuemax": "59",
5933
- "aria-valuenow": m.value,
5934
- onInput: _
5954
+ "aria-valuenow": p.value,
5955
+ onInput: S
5935
5956
  }, null, 40, fl)), [
5936
5957
  [
5937
5958
  Ue,
5938
- m.value,
5959
+ p.value,
5939
5960
  void 0,
5940
5961
  { number: !0 }
5941
5962
  ]
@@ -5977,7 +5998,7 @@ const Xo = (e, n) => {
5977
5998
  if (!s.sortable) return;
5978
5999
  const d = e.sort?.key === s.key && e.sort.direction === "asc" ? "desc" : "asc";
5979
6000
  n("update:sort", { key: s.key, direction: d });
5980
- }, o = () => window.matchMedia("(max-width: 640px)").matches, u = (s, d) => d.split(".").reduce((l, p) => l?.[p], s), r = () => U(
6001
+ }, o = () => window.matchMedia("(max-width: 640px)").matches, i = (s, d) => d.split(".").reduce((u, h) => u?.[h], s), l = () => U(
5981
6002
  "div",
5982
6003
  {
5983
6004
  class: "rs-table-mobile",
@@ -5993,35 +6014,35 @@ const Xo = (e, n) => {
5993
6014
  role: e.rowClickable ? "button" : "listitem",
5994
6015
  tabindex: e.rowClickable ? 0 : void 0,
5995
6016
  onClick: e.rowClickable ? () => n("rowClick", s) : void 0,
5996
- onKeydown: e.rowClickable ? (l) => {
5997
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), n("rowClick", s));
6017
+ onKeydown: e.rowClickable ? (u) => {
6018
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), n("rowClick", s));
5998
6019
  } : void 0
5999
6020
  },
6000
6021
  e.columns.map(
6001
- (l) => U(
6022
+ (u) => U(
6002
6023
  "div",
6003
6024
  { class: "rs-table-card-row" },
6004
6025
  [
6005
6026
  U(
6006
6027
  "span",
6007
6028
  { class: "rs-table-card-label" },
6008
- l.header
6029
+ u.header
6009
6030
  ),
6010
6031
  U(
6011
6032
  "span",
6012
6033
  { class: "rs-table-card-value" },
6013
6034
  t.cell?.({
6014
6035
  row: s,
6015
- column: l,
6016
- value: u(s, l.key)
6017
- }) ?? u(s, l.key)
6036
+ column: u,
6037
+ value: i(s, u.key)
6038
+ }) ?? i(s, u.key)
6018
6039
  )
6019
6040
  ]
6020
6041
  )
6021
6042
  )
6022
6043
  )
6023
6044
  )
6024
- ), i = () => U(
6045
+ ), r = () => U(
6025
6046
  "div",
6026
6047
  { class: "rs-table-container" },
6027
6048
  U(
@@ -6113,25 +6134,25 @@ const Xo = (e, n) => {
6113
6134
  tabindex: e.rowClickable ? 0 : void 0,
6114
6135
  role: e.rowClickable ? "button" : void 0,
6115
6136
  onClick: e.rowClickable ? () => n("rowClick", s) : void 0,
6116
- onKeydown: e.rowClickable ? (l) => {
6117
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), n("rowClick", s));
6137
+ onKeydown: e.rowClickable ? (u) => {
6138
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), n("rowClick", s));
6118
6139
  } : void 0,
6119
6140
  "data-clickable": e.rowClickable || void 0
6120
6141
  },
6121
6142
  e.columns.map(
6122
- (l) => U(
6143
+ (u) => U(
6123
6144
  "td",
6124
6145
  {
6125
- key: l.key,
6146
+ key: u.key,
6126
6147
  style: {
6127
- textAlign: l.align || "left"
6148
+ textAlign: u.align || "left"
6128
6149
  }
6129
6150
  },
6130
6151
  t.cell?.({
6131
6152
  row: s,
6132
- column: l,
6133
- value: u(s, l.key)
6134
- }) ?? u(s, l.key)
6153
+ column: u,
6154
+ value: i(s, u.key)
6155
+ }) ?? i(s, u.key)
6135
6156
  )
6136
6157
  )
6137
6158
  )
@@ -6146,7 +6167,7 @@ const Xo = (e, n) => {
6146
6167
  return U(
6147
6168
  "div",
6148
6169
  { class: "rs-table-container" },
6149
- s ? r() : i()
6170
+ s ? l() : r()
6150
6171
  );
6151
6172
  };
6152
6173
  }
@@ -6160,34 +6181,34 @@ const Xo = (e, n) => {
6160
6181
  }
6161
6182
  },
6162
6183
  setup(e, { slots: n }) {
6163
- const t = w([]), a = w(new Set(e.defaultOpen)), o = (p) => {
6164
- if (a.value.has(p)) {
6165
- a.value.delete(p);
6184
+ const t = w([]), a = w(new Set(e.defaultOpen)), o = (h) => {
6185
+ if (a.value.has(h)) {
6186
+ a.value.delete(h);
6166
6187
  return;
6167
6188
  }
6168
- e.multiple || a.value.clear(), a.value.add(p);
6169
- }, u = (p) => {
6170
- p.disabled || t.value.includes(p) || (t.value.push(p), t.value.sort((m, b) => m.offsetTop - b.offsetTop));
6171
- }, r = (p) => t.value = t.value.filter((m) => m !== p), i = (p) => {
6172
- const m = t.value.indexOf(p);
6173
- t.value[(m + 1) % t.value.length]?.focus();
6174
- }, s = (p) => {
6175
- const m = t.value.indexOf(p);
6176
- t.value[(m - 1 + t.value.length) % t.value.length]?.focus();
6177
- }, d = () => t.value[0]?.focus(), l = () => {
6178
- const p = t.value;
6179
- p.length && p[p.length - 1]?.focus();
6189
+ e.multiple || a.value.clear(), a.value.add(h);
6190
+ }, i = (h) => {
6191
+ h.disabled || t.value.includes(h) || (t.value.push(h), t.value.sort((p, m) => p.offsetTop - m.offsetTop));
6192
+ }, l = (h) => t.value = t.value.filter((p) => p !== h), r = (h) => {
6193
+ const p = t.value.indexOf(h);
6194
+ t.value[(p + 1) % t.value.length]?.focus();
6195
+ }, s = (h) => {
6196
+ const p = t.value.indexOf(h);
6197
+ t.value[(p - 1 + t.value.length) % t.value.length]?.focus();
6198
+ }, d = () => t.value[0]?.focus(), u = () => {
6199
+ const h = t.value;
6200
+ h.length && h[h.length - 1]?.focus();
6180
6201
  };
6181
6202
  return xe(Ne, {
6182
6203
  multiple: e.multiple,
6183
6204
  openItems: a,
6184
6205
  toggle: o,
6185
- registerHeader: u,
6186
- unregisterHeader: r,
6187
- focusNext: i,
6206
+ registerHeader: i,
6207
+ unregisterHeader: l,
6208
+ focusNext: r,
6188
6209
  focusPrev: s,
6189
6210
  focusFirst: d,
6190
- focusLast: l
6211
+ focusLast: u
6191
6212
  }), () => n.default?.();
6192
6213
  }
6193
6214
  }), Xl = Z({
@@ -6199,7 +6220,7 @@ const Xo = (e, n) => {
6199
6220
  setup(e, { slots: n }) {
6200
6221
  const t = de(Ne);
6201
6222
  if (!t) throw new Error("AccordionItem must be used inside Accordion");
6202
- const a = H(() => t.openItems.value.has(e.id));
6223
+ const a = V(() => t.openItems.value.has(e.id));
6203
6224
  return () => U(
6204
6225
  "div",
6205
6226
  {
@@ -6218,22 +6239,22 @@ const Xo = (e, n) => {
6218
6239
  setup(e, { slots: n }) {
6219
6240
  const t = de(Ne), a = w(null);
6220
6241
  if (!t) throw new Error("AccordionHeader must be used inside Accordion");
6221
- const o = H(() => t.openItems.value.has(e.id)), u = () => {
6242
+ const o = V(() => t.openItems.value.has(e.id)), i = () => {
6222
6243
  e.disabled || t.toggle?.(e.id);
6223
- }, r = (i) => {
6244
+ }, l = (r) => {
6224
6245
  if (a.value)
6225
- switch (i.key) {
6246
+ switch (r.key) {
6226
6247
  case "ArrowDown":
6227
- i.preventDefault(), t.focusNext(a.value);
6248
+ r.preventDefault(), t.focusNext(a.value);
6228
6249
  break;
6229
6250
  case "ArrowUp":
6230
- i.preventDefault(), t.focusPrev(a.value);
6251
+ r.preventDefault(), t.focusPrev(a.value);
6231
6252
  break;
6232
6253
  case "Home":
6233
- i.preventDefault(), t.focusFirst();
6254
+ r.preventDefault(), t.focusFirst();
6234
6255
  break;
6235
6256
  case "End":
6236
- i.preventDefault(), t.focusLast();
6257
+ r.preventDefault(), t.focusLast();
6237
6258
  break;
6238
6259
  }
6239
6260
  };
@@ -6252,8 +6273,8 @@ const Xo = (e, n) => {
6252
6273
  "aria-controls": `panel-${e.id}`,
6253
6274
  disabled: e.disabled,
6254
6275
  "data-state": o.value ? "open" : "closed",
6255
- onClick: u,
6256
- onKeydown: r
6276
+ onClick: i,
6277
+ onKeydown: l
6257
6278
  },
6258
6279
  [
6259
6280
  U(
@@ -6277,7 +6298,7 @@ const Xo = (e, n) => {
6277
6298
  setup(e, { slots: n }) {
6278
6299
  const t = de(Ne);
6279
6300
  if (!t) throw new Error("AccordionPanel must be used inside Accordion");
6280
- const a = H(() => t.openItems.value.has(e.id));
6301
+ const a = V(() => t.openItems.value.has(e.id));
6281
6302
  return () => U(
6282
6303
  "div",
6283
6304
  {
@@ -6341,8 +6362,8 @@ export {
6341
6362
  Wl as Table,
6342
6363
  zl as Tabs,
6343
6364
  Fl as TabsContent,
6344
- Ol as TabsList,
6345
- ql as TabsTrigger,
6365
+ ql as TabsList,
6366
+ Ol as TabsTrigger,
6346
6367
  u2 as Tag,
6347
6368
  Ml as Textarea,
6348
6369
  Rl as Timeline,