@volverjs/ui-vue 0.0.14 → 0.0.15

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.
Files changed (97) hide show
  1. package/dist/Volver.d.ts +5 -5
  2. package/dist/components/VvAction/VvAction.es.js +26 -26
  3. package/dist/components/VvAction/VvAction.umd.js +1 -1
  4. package/dist/components/VvAction/index.d.ts +1 -44
  5. package/dist/components/VvAlert/VvAlert.es.js +43 -44
  6. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  7. package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
  8. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
  9. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  10. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
  11. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  12. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
  13. package/dist/components/VvButton/VvButton.es.js +186 -187
  14. package/dist/components/VvButton/VvButton.umd.js +1 -1
  15. package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
  16. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  17. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
  18. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  19. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
  20. package/dist/components/VvCheckboxGroup/index.d.ts +1 -78
  21. package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
  22. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  23. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +1 -1
  24. package/dist/components/VvCombobox/index.d.ts +2 -2
  25. package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
  26. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  27. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
  28. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  29. package/dist/components/VvIcon/VvIcon.es.js +30 -31
  30. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  31. package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
  32. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  33. package/dist/components/VvInputText/VvInputText.es.js +595 -588
  34. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  35. package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
  36. package/dist/components/VvInputText/index.d.ts +3 -3
  37. package/dist/components/VvNav/VvNav.es.js +63 -63
  38. package/dist/components/VvNav/VvNav.umd.js +1 -1
  39. package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
  40. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  41. package/dist/components/VvRadio/VvRadio.es.js +222 -224
  42. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  43. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
  44. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  45. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
  46. package/dist/components/VvRadioGroup/index.d.ts +1 -78
  47. package/dist/components/VvSelect/VvSelect.es.js +200 -203
  48. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  49. package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
  50. package/dist/components/VvSelect/index.d.ts +2 -2
  51. package/dist/components/VvTab/VvTab.es.js +35 -35
  52. package/dist/components/VvTab/VvTab.umd.js +1 -1
  53. package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
  54. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  55. package/dist/components/index.es.js +1965 -1958
  56. package/dist/components/index.umd.js +1 -1
  57. package/dist/composables/index.es.js +34 -34
  58. package/dist/composables/index.umd.js +2 -2
  59. package/dist/composables/useModifiers.d.ts +1 -1
  60. package/dist/constants.d.ts +2 -2
  61. package/dist/directives/index.es.js +22 -22
  62. package/dist/directives/index.umd.js +1 -1
  63. package/dist/directives/v-contextmenu.es.js +13 -13
  64. package/dist/directives/v-contextmenu.umd.js +1 -1
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.es.js +19 -19
  67. package/dist/index.umd.js +1 -1
  68. package/dist/json-render/index.es.js +1877 -1870
  69. package/dist/json-render/index.umd.js +1 -1
  70. package/dist/props/index.d.ts +1 -1
  71. package/dist/resolvers/unplugin.es.js +28 -28
  72. package/dist/resolvers/unplugin.umd.js +1 -1
  73. package/dist/types/alert.d.ts +1 -1
  74. package/dist/types/nav.d.ts +1 -1
  75. package/dist/utils/ObjectUtilities.d.ts +0 -6
  76. package/package.json +1 -1
  77. package/src/Volver.ts +8 -6
  78. package/src/components/VvAction/index.ts +1 -3
  79. package/src/components/VvButton/VvButton.vue +1 -1
  80. package/src/components/VvCheckboxGroup/index.ts +1 -3
  81. package/src/components/VvCombobox/VvCombobox.vue +3 -3
  82. package/src/components/VvDropdown/VvDropdown.vue +8 -8
  83. package/src/components/VvIcon/VvIcon.vue +3 -6
  84. package/src/components/VvInputFile/VvInputFile.vue +6 -6
  85. package/src/components/VvInputText/VvInputText.vue +95 -78
  86. package/src/components/VvRadioGroup/index.ts +1 -3
  87. package/src/composables/useBlurhash.ts +1 -1
  88. package/src/composables/useDebouncedInput.ts +1 -1
  89. package/src/composables/useDefaults.ts +55 -44
  90. package/src/composables/useModifiers.ts +1 -1
  91. package/src/index.ts +2 -2
  92. package/src/resolvers/unplugin.ts +6 -6
  93. package/src/types/alert.ts +1 -1
  94. package/src/types/nav.ts +1 -1
  95. package/src/utils/DateUtilities.ts +3 -3
  96. package/src/utils/DomUtilities.ts +7 -1
  97. package/src/utils/ObjectUtilities.ts +60 -59
@@ -1,7 +1,7 @@
1
- import { Fragment as rt, computed as n, createBlock as F, createCommentVNode as A, createElementBlock as k, createElementVNode as K, createSlots as lt, createTextVNode as Ge, createVNode as Se, defineComponent as Y, getCurrentInstance as ot, guardReactiveProps as j, h as ne, inject as se, isRef as nt, mergeDefaults as it, mergeProps as J, normalizeClass as _e, normalizeProps as $, onBeforeUnmount as ut, openBlock as S, ref as z, renderSlot as I, resolveComponent as st, resolveDynamicComponent as dt, toDisplayString as q, toRef as vt, toRefs as Ie, unref as v, useAttrs as ft, useId as ct, useSlots as He, watch as Ke, withCtx as U, withModifiers as E } from "vue";
1
+ import { Fragment as rt, computed as n, createBlock as F, createCommentVNode as A, createElementBlock as $, createElementVNode as K, createSlots as lt, createTextVNode as Ge, createVNode as Se, defineComponent as Y, getCurrentInstance as ot, guardReactiveProps as D, h as ne, inject as se, isRef as nt, mergeDefaults as it, mergeProps as J, normalizeClass as _e, normalizeProps as O, onBeforeUnmount as ut, openBlock as S, ref as z, renderSlot as k, resolveComponent as st, resolveDynamicComponent as vt, toDisplayString as q, toRef as dt, toRefs as Be, unref as s, useAttrs as ft, useId as ct, useSlots as He, watch as Ke, withCtx as U, withModifiers as E } from "vue";
2
2
  import { useVModel as pt } from "@vueuse/core";
3
3
  import gt from "vuedraggable";
4
- import { Icon as mt, addIcon as bt, iconLoaded as Le } from "@iconify/vue";
4
+ import { Icon as mt, addIcon as yt, iconLoaded as Le } from "@iconify/vue";
5
5
  var ie = {
6
6
  showPassword: "eye-on",
7
7
  hidePassword: "eye-off",
@@ -13,11 +13,11 @@ var ie = {
13
13
  remove: "trash",
14
14
  edit: "edit",
15
15
  download: "download"
16
- }, yt = { prefix: "normal" }, je = /* @__PURE__ */ (function(e) {
16
+ }, bt = { prefix: "normal" }, De = /* @__PURE__ */ (function(e) {
17
17
  return e.local = "local", e.session = "session", e;
18
18
  })({}), ht = /* @__PURE__ */ (function(e) {
19
19
  return e.absolute = "absolute", e.fixed = "fixed", e;
20
- })({}), O = /* @__PURE__ */ (function(e) {
20
+ })({}), w = /* @__PURE__ */ (function(e) {
21
21
  return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
22
22
  })({}), St = /* @__PURE__ */ (function(e) {
23
23
  return e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e;
@@ -27,7 +27,7 @@ var ie = {
27
27
  return e.button = "button", e.submit = "submit", e.reset = "reset", e;
28
28
  })({}), R = /* @__PURE__ */ (function(e) {
29
29
  return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
30
- })({}), _t = /* @__PURE__ */ Symbol.for("volver"), Lt = /* @__PURE__ */ Symbol.for("buttonGroup"), At = /* @__PURE__ */ Symbol.for("dropdownTrigger"), Bt = /* @__PURE__ */ Symbol.for("dropdownAction"), It = {
30
+ })({}), _t = /* @__PURE__ */ Symbol.for("volver"), Lt = /* @__PURE__ */ Symbol.for("buttonGroup"), At = /* @__PURE__ */ Symbol.for("dropdownTrigger"), Bt = /* @__PURE__ */ Symbol.for("dropdownAction"), kt = {
31
31
  to: { type: [String, Object] },
32
32
  href: String,
33
33
  target: String,
@@ -35,7 +35,7 @@ var ie = {
35
35
  type: String,
36
36
  default: "noopener noreferrer"
37
37
  }
38
- }, de = {
38
+ }, ve = {
39
39
  valid: {
40
40
  type: Boolean,
41
41
  default: !1
@@ -44,7 +44,7 @@ var ie = {
44
44
  type: [String, Array],
45
45
  default: void 0
46
46
  }
47
- }, ve = {
47
+ }, de = {
48
48
  invalid: {
49
49
  type: Boolean,
50
50
  default: !1
@@ -62,19 +62,19 @@ var ie = {
62
62
  type: String,
63
63
  default: "Loading..."
64
64
  }
65
- }, Q = { disabled: {
65
+ }, x = { disabled: {
66
66
  type: Boolean,
67
67
  default: !1
68
- } }, we = { required: {
68
+ } }, ke = { required: {
69
69
  type: Boolean,
70
70
  default: !1
71
- } }, wt = { active: {
71
+ } }, It = { active: {
72
72
  type: Boolean,
73
73
  default: !1
74
- } }, Ot = { current: {
74
+ } }, wt = { current: {
75
75
  type: Boolean,
76
76
  default: !1
77
- } }, La = {
77
+ } }, Ba = {
78
78
  showClearAction: {
79
79
  type: Boolean,
80
80
  default: !1
@@ -87,22 +87,22 @@ var ie = {
87
87
  type: String,
88
88
  default: "Clear"
89
89
  }
90
- }, $t = { pressed: {
90
+ }, Ot = { pressed: {
91
91
  type: Boolean,
92
92
  default: !1
93
- } }, X = { label: {
93
+ } }, Q = { label: {
94
94
  type: [String, Number],
95
95
  default: void 0
96
96
  } }, fe = { readonly: {
97
97
  type: Boolean,
98
98
  default: !1
99
- } }, x = { modifiers: {
99
+ } }, X = { modifiers: {
100
100
  type: [String, Array],
101
101
  default: void 0
102
102
  } }, ce = { hintLabel: {
103
103
  type: String,
104
104
  default: ""
105
- } }, kt = {
105
+ } }, $t = {
106
106
  options: {
107
107
  type: Array,
108
108
  default: () => []
@@ -131,7 +131,7 @@ var ie = {
131
131
  } }, Ct = { debounce: {
132
132
  type: [Number, String],
133
133
  default: void 0
134
- } }, Oe = {
134
+ } }, Ie = {
135
135
  icon: {
136
136
  type: [String, Object],
137
137
  default: void 0
@@ -150,11 +150,11 @@ var ie = {
150
150
  } }, Et = { unselectable: {
151
151
  type: Boolean,
152
152
  default: !0
153
- } }, Je = { id: [String, Number] }, Aa = {
153
+ } }, Je = { id: [String, Number] }, ka = {
154
154
  placement: {
155
155
  type: String,
156
- default: O.bottom,
157
- validator: (e) => Object.values(O).includes(e) || Object.values(St).includes(e)
156
+ default: w.bottom,
157
+ validator: (e) => Object.values(w).includes(e) || Object.values(St).includes(e)
158
158
  },
159
159
  strategy: {
160
160
  type: String,
@@ -205,7 +205,7 @@ var ie = {
205
205
  type: Boolean,
206
206
  default: !1
207
207
  }
208
- }, $e = {
208
+ }, we = {
209
209
  ...Je,
210
210
  name: {
211
211
  type: String,
@@ -217,23 +217,23 @@ var ie = {
217
217
  } }, Nt = { autocomplete: {
218
218
  type: String,
219
219
  default: "off"
220
- } }, Ba = {
221
- ...$e,
220
+ } }, Ia = {
221
+ ...we,
222
222
  ...Rt,
223
223
  ...Nt,
224
224
  ...ze,
225
- ...Q,
225
+ ...x,
226
226
  ...fe,
227
- ...de,
228
227
  ...ve,
228
+ ...de,
229
229
  ...ce,
230
230
  ...Z,
231
- ...x,
231
+ ...X,
232
232
  ...Pt,
233
233
  ...Ct,
234
- ...Oe,
234
+ ...Ie,
235
235
  ...Vt,
236
- ...X,
236
+ ...Q,
237
237
  minlength: {
238
238
  type: [String, Number],
239
239
  default: void 0
@@ -246,17 +246,17 @@ var ie = {
246
246
  type: String,
247
247
  default: void 0
248
248
  },
249
- ...we
250
- }, Ia = {
251
- ...$e,
249
+ ...ke
250
+ }, wa = {
251
+ ...we,
252
252
  ...ze,
253
- ...de,
254
253
  ...ve,
254
+ ...de,
255
255
  ...ce,
256
- ...Q,
257
- ...fe,
258
256
  ...x,
257
+ ...fe,
259
258
  ...X,
259
+ ...Q,
260
260
  ...Z,
261
261
  value: {
262
262
  type: [
@@ -275,17 +275,17 @@ var ie = {
275
275
  ],
276
276
  default: void 0
277
277
  }
278
- }, wa = {
279
- ...de,
278
+ }, Oa = {
280
279
  ...ve,
281
- ...kt,
280
+ ...de,
281
+ ...$t,
282
282
  ...ce,
283
- ...Q,
284
- ...fe,
285
283
  ...x,
284
+ ...fe,
286
285
  ...X,
286
+ ...Q,
287
287
  ...Z,
288
- ...we,
288
+ ...ke,
289
289
  modelValue: {
290
290
  type: [
291
291
  String,
@@ -305,12 +305,12 @@ var ie = {
305
305
  default: !1
306
306
  }
307
307
  }, We = {
308
+ ...x,
308
309
  ...Q,
309
- ...X,
310
- ...$t,
311
- ...wt,
312
310
  ...Ot,
313
311
  ...It,
312
+ ...wt,
313
+ ...kt,
314
314
  type: {
315
315
  type: String,
316
316
  default: Fe.button,
@@ -324,25 +324,25 @@ var ie = {
324
324
  type: String,
325
325
  default: R.button
326
326
  }
327
- }, Oa = {
327
+ }, $a = {
328
328
  storageType: {
329
329
  type: String,
330
- default: je.local,
331
- validator: (e) => Object.values(je).includes(e)
330
+ default: De.local,
331
+ validator: (e) => Object.values(De).includes(e)
332
332
  },
333
333
  storageKey: String
334
334
  }, Me = {
335
- ...$e,
336
- ...x,
337
- ...de,
335
+ ...we,
336
+ ...X,
338
337
  ...ve,
338
+ ...de,
339
339
  ...ce,
340
- ...X,
340
+ ...Q,
341
341
  ...Z,
342
342
  ...fe,
343
- ...Q,
344
- ...we,
345
- ...Oe,
343
+ ...x,
344
+ ...ke,
345
+ ...Ie,
346
346
  modelValue: { type: Object },
347
347
  progress: {
348
348
  type: [Number, String],
@@ -410,85 +410,85 @@ var ie = {
410
410
  default: "Remove file"
411
411
  }
412
412
  };
413
- function Dt(e) {
414
- const a = [], t = [], l = [], o = e?.split(",").map((i) => i.trim().toLowerCase());
413
+ function jt(e) {
414
+ const a = [], t = [], r = [], o = e?.split(",").map((i) => i.trim().toLowerCase());
415
415
  return o?.length && o.forEach((i) => {
416
- i.startsWith(".") ? t.push(i) : i.includes("/*") ? l.push(i.replace("/*", "")) : a.push(i);
416
+ i.startsWith(".") ? t.push(i) : i.includes("/*") ? r.push(i.replace("/*", "")) : a.push(i);
417
417
  }), {
418
418
  mimeTypes: a,
419
419
  extensions: t,
420
- wildcards: l
420
+ wildcards: r
421
421
  };
422
422
  }
423
- function jt(e, a) {
423
+ function Dt(e, a) {
424
424
  if (!a || a.trim() === "" || a === "*") return [...e];
425
- const { mimeTypes: t, extensions: l, wildcards: o } = Dt(a);
425
+ const { mimeTypes: t, extensions: r, wildcards: o } = jt(a);
426
426
  return [...e].filter((i) => {
427
- const g = i.type.toLowerCase(), c = `.${i.name.split(".").pop()?.toLowerCase()}`, p = t.includes(g), s = o.some((u) => g.startsWith(`${u}/`)), m = l.some((u) => c === u.toLowerCase());
428
- return p || s || m;
427
+ const y = i.type.toLowerCase(), f = `.${i.name.split(".").pop()?.toLowerCase()}`, m = t.includes(y), c = o.some((d) => y.startsWith(`${d}/`)), b = r.some((d) => f === d.toLowerCase());
428
+ return m || c || b;
429
429
  });
430
430
  }
431
431
  function Ye(e, a, t) {
432
- return t ? Te(e, t) === Te(a, t) : Ae(e, a);
432
+ return t ? Te(e, t) === Te(a, t) : Oe(e, a);
433
433
  }
434
- function Ae(e, a) {
435
- if (e === a) return !0;
436
- if (e && a && typeof e == "object" && typeof a == "object") {
437
- const t = Array.isArray(e), l = Array.isArray(a);
438
- let o, i, g;
439
- if (t && l) {
440
- if (i = e.length, i !== a.length) return !1;
441
- for (o = i; o-- !== 0; ) if (!Ae(e[o], a[o])) return !1;
442
- return !0;
443
- }
444
- if (t !== l) return !1;
445
- const c = e instanceof Date, p = a instanceof Date;
446
- if (c !== p) return !1;
447
- if (c && p) return e.getTime() === a.getTime();
448
- const s = e instanceof RegExp, m = a instanceof RegExp;
449
- if (s !== m) return !1;
450
- if (s && m) return e.toString() === a.toString();
451
- const u = Object.keys(e);
452
- if (i = u.length, i !== Object.keys(a).length) return !1;
453
- for (o = i; o-- !== 0; ) if (!Object.hasOwn(a, u[o])) return !1;
454
- for (o = i; o-- !== 0; )
455
- if (g = u[o], !Ae(e[g], a[g])) return !1;
456
- return !0;
434
+ function Ft(e, a) {
435
+ if (e.length !== a.length) return !1;
436
+ for (let t = e.length; t-- !== 0; ) if (!Oe(e[t], a[t])) return !1;
437
+ return !0;
438
+ }
439
+ function Mt(e, a) {
440
+ const t = Object.keys(e), { length: r } = t;
441
+ if (r !== Object.keys(a).length) return !1;
442
+ for (let o = r; o-- !== 0; ) if (!Object.hasOwn(a, t[o])) return !1;
443
+ for (let o = r; o-- !== 0; ) {
444
+ const i = t[o];
445
+ if (!Oe(e[i], a[i])) return !1;
457
446
  }
458
- return Number.isNaN(e) && Number.isNaN(a);
447
+ return !0;
448
+ }
449
+ function Oe(e, a) {
450
+ if (e === a) return !0;
451
+ if (!e || !a || typeof e != "object" || typeof a != "object") return Number.isNaN(e) && Number.isNaN(a);
452
+ const t = Array.isArray(e), r = Array.isArray(a);
453
+ if (t !== r) return !1;
454
+ if (t && r) return Ft(e, a);
455
+ const o = e instanceof Date, i = a instanceof Date;
456
+ if (o !== i) return !1;
457
+ if (o && i) return e.getTime() === a.getTime();
458
+ const y = e instanceof RegExp, f = a instanceof RegExp;
459
+ return y !== f ? !1 : y && f ? e.toString() === a.toString() : Mt(e, a);
459
460
  }
460
461
  function Te(e, a) {
461
- if (e && Object.keys(e).length && a) if (a.includes(".")) {
462
+ if (e && Object.keys(e).length && a) {
463
+ if (!a.includes(".")) return e[a];
462
464
  const t = a.split(".");
463
- let l = e;
465
+ let r = e;
464
466
  for (let o = 0, i = t.length; o < i; ++o) {
465
- if (e == null) return null;
466
- l = l[t[o]];
467
+ if (r == null) return null;
468
+ r = r[t[o]];
467
469
  }
468
- return l;
469
- } else
470
- return e[a];
471
- else return null;
470
+ return r;
471
+ } else return null;
472
472
  }
473
473
  function Ue(e, a) {
474
- if (e != null && a && a.length) {
474
+ if (e != null && a?.length) {
475
475
  for (const t of a) if (Ye(e, t)) return !0;
476
476
  }
477
477
  return !1;
478
478
  }
479
- function Ft(e) {
479
+ function Tt(e) {
480
480
  return typeof e == "string";
481
481
  }
482
482
  function qe(e) {
483
- return Array.isArray(e) ? e.filter((a) => Ft(a)).join(" ") : e;
483
+ return Array.isArray(e) ? e.filter((a) => Tt(a)).join(" ") : e;
484
484
  }
485
- function Mt(e, a) {
486
- const t = n(() => nt(e) ? e.value : e), l = n(() => qe(t.value.invalidLabel)), o = n(() => qe(t.value.validLabel)), i = n(() => t.value.loadingLabel), g = n(() => t.value.hintLabel), c = n(() => !!(t.value.loading && (a.loading || i.value))), p = n(() => !c.value && !!(t.value.invalid && (a.invalid || l.value))), s = n(() => !c.value && !p.value && !!(t.value.valid && (a.valid || o.value))), m = n(() => !c.value && !p.value && !s.value && !!(a.hint || g.value)), u = n(() => p.value || s.value || c.value || m.value);
485
+ function Ut(e, a) {
486
+ const t = n(() => nt(e) ? e.value : e), r = n(() => qe(t.value.invalidLabel)), o = n(() => qe(t.value.validLabel)), i = n(() => t.value.loadingLabel), y = n(() => t.value.hintLabel), f = n(() => !!(t.value.loading && (a.loading || i.value))), m = n(() => !f.value && !!(t.value.invalid && (a.invalid || r.value))), c = n(() => !f.value && !m.value && !!(t.value.valid && (a.valid || o.value))), b = n(() => !f.value && !m.value && !c.value && !!(a.hint || y.value)), d = n(() => m.value || c.value || f.value || b.value);
487
487
  return {
488
- hasInvalidLabelOrSlot: p,
489
- hasHintLabelOrSlot: m,
490
- hasValidLabelOrSlot: s,
491
- hasLoadingLabelOrSlot: c,
488
+ hasInvalidLabelOrSlot: m,
489
+ hasHintLabelOrSlot: b,
490
+ hasValidLabelOrSlot: c,
491
+ hasLoadingLabelOrSlot: f,
492
492
  hintSlotScope: n(() => ({
493
493
  modelValue: t.value.modelValue,
494
494
  valid: t.value.valid,
@@ -503,66 +503,66 @@ function Mt(e, a) {
503
503
  } },
504
504
  setup() {
505
505
  return {
506
- isVisible: u,
507
- invalidLabel: l,
506
+ isVisible: d,
507
+ invalidLabel: r,
508
508
  validLabel: o,
509
509
  loadingLabel: i,
510
- hintLabel: g,
511
- hasInvalidLabelOrSlot: p,
512
- hasValidLabelOrSlot: s,
513
- hasLoadingLabelOrSlot: c,
514
- hasHintLabelOrSlot: m
510
+ hintLabel: y,
511
+ hasInvalidLabelOrSlot: m,
512
+ hasValidLabelOrSlot: c,
513
+ hasLoadingLabelOrSlot: f,
514
+ hasHintLabelOrSlot: b
515
515
  };
516
516
  },
517
517
  render() {
518
518
  if (this.isVisible) {
519
- let f;
520
- return this.hasInvalidLabelOrSlot && (f = "alert"), this.hasValidLabelOrSlot && (f = "status"), this.hasLoadingLabelOrSlot ? ne(this.tag, { role: f }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? ne(this.tag, { role: f }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? ne(this.tag, { role: f }, this.$slots.valid?.() ?? this.validLabel) : ne(this.tag, { role: f }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
519
+ let v;
520
+ return this.hasInvalidLabelOrSlot && (v = "alert"), this.hasValidLabelOrSlot && (v = "status"), this.hasLoadingLabelOrSlot ? ne(this.tag, { role: v }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? ne(this.tag, { role: v }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? ne(this.tag, { role: v }, this.$slots.valid?.() ?? this.validLabel) : ne(this.tag, { role: v }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
521
521
  }
522
522
  return null;
523
523
  }
524
524
  })
525
525
  };
526
526
  }
527
- function Tt(e) {
527
+ function qt(e) {
528
528
  const a = se(e, void 0), t = n(() => a !== void 0);
529
- function l(o, i, g) {
530
- const c = a?.[o];
531
- if (c) return n({
529
+ function r(o, i, y) {
530
+ const f = a?.[o];
531
+ if (f) return n({
532
532
  get() {
533
- return c.value;
533
+ return f.value;
534
534
  },
535
- set(s) {
536
- c.value = s;
535
+ set(c) {
536
+ f.value = c;
537
537
  }
538
538
  });
539
- const p = vt(i, o);
539
+ const m = dt(i, o);
540
540
  return n({
541
541
  get() {
542
- return p.value;
542
+ return m.value;
543
543
  },
544
- set(s) {
545
- g && g(`update:${o}`, s);
544
+ set(c) {
545
+ y && y(`update:${o}`, c);
546
546
  }
547
547
  });
548
548
  }
549
549
  return {
550
550
  group: a,
551
551
  isInGroup: t,
552
- getGroupOrLocalRef: l
552
+ getGroupOrLocalRef: r
553
553
  };
554
554
  }
555
- var Ut = ["update:modelValue"], qt = {
555
+ var Gt = ["update:modelValue"], Ht = {
556
556
  ...We,
557
557
  ...Je,
558
- ...x,
558
+ ...X,
559
559
  ...Et,
560
560
  ...Z,
561
- ...Oe,
561
+ ...Ie,
562
562
  iconPosition: {
563
563
  type: String,
564
- default: O.left,
565
- validator: (e) => Object.values(O).includes(e)
564
+ default: w.left,
565
+ validator: (e) => Object.values(w).includes(e)
566
566
  },
567
567
  loadingIcon: {
568
568
  type: String,
@@ -597,147 +597,147 @@ var Ut = ["update:modelValue"], qt = {
597
597
  default: void 0
598
598
  }
599
599
  };
600
- function Gt(e, a) {
601
- const { group: t, isInGroup: l, getGroupOrLocalRef: o } = Tt(Lt), { id: i, iconPosition: g, icon: c, label: p, pressed: s } = Ie(e);
600
+ function Kt(e, a) {
601
+ const { group: t, isInGroup: r, getGroupOrLocalRef: o } = qt(Lt), { id: i, iconPosition: y, icon: f, label: m, pressed: c } = Be(e);
602
602
  return {
603
603
  group: t,
604
- isInGroup: l,
604
+ isInGroup: r,
605
605
  modelValue: o("modelValue", e, a),
606
606
  toggle: o("toggle", e),
607
607
  unselectable: o("unselectable", e),
608
608
  multiple: n(() => t?.multiple.value ?? !1),
609
609
  modifiers: n(() => {
610
- let m = e.modifiers, u = t?.modifiers.value;
611
- const f = /* @__PURE__ */ new Set();
612
- return m && (Array.isArray(m) || (m = m.split(" ")), m.forEach((_) => f.add(_))), u && (Array.isArray(u) || (u = u.split(" ")), u.forEach((_) => f.add(_))), [...f];
610
+ let b = e.modifiers, d = t?.modifiers.value;
611
+ const v = /* @__PURE__ */ new Set();
612
+ return b && (Array.isArray(b) || (b = b.split(" ")), b.forEach((_) => v.add(_))), d && (Array.isArray(d) || (d = d.split(" ")), d.forEach((_) => v.add(_))), [...v];
613
613
  }),
614
614
  disabled: n(() => !!(e.disabled || t?.disabled.value)),
615
615
  id: i,
616
- pressed: s,
617
- iconPosition: g,
618
- icon: c,
619
- label: p
616
+ pressed: c,
617
+ iconPosition: y,
618
+ icon: f,
619
+ label: m
620
620
  };
621
621
  }
622
- var Ht = [
622
+ var zt = [
623
623
  "click",
624
624
  "mouseover",
625
625
  "mouseleave"
626
- ], Kt = We;
627
- function ke() {
626
+ ];
627
+ function $e() {
628
628
  return se(_t, void 0);
629
629
  }
630
- function zt() {
630
+ function Jt() {
631
631
  return se(At, {});
632
632
  }
633
- function Jt() {
633
+ function Wt() {
634
634
  return se(Bt, {});
635
635
  }
636
- var Wt = { name: "VvAction" }, Yt = /* @__PURE__ */ Y({
637
- ...Wt,
638
- props: Kt,
639
- emits: Ht,
636
+ var Yt = { name: "VvAction" }, Zt = /* @__PURE__ */ Y({
637
+ ...Yt,
638
+ props: We,
639
+ emits: zt,
640
640
  setup(e, { expose: a, emit: t }) {
641
- const l = e, o = t, i = ot(), g = ke(), c = z(null);
642
- a({ $el: c });
643
- const { reference: p, bus: s, aria: m, expanded: u } = zt();
644
- Ke(() => c.value, (b) => {
645
- p && (p.value = b);
641
+ const r = e, o = t, i = ot(), y = $e(), f = z(null);
642
+ a({ $el: f });
643
+ const { reference: m, bus: c, aria: b, expanded: d } = Jt();
644
+ Ke(() => f.value, (p) => {
645
+ m && (m.value = p);
646
646
  });
647
- const f = n(() => l.pressed || u?.value), { role: _ } = Jt(), w = n(() => {
647
+ const v = n(() => r.pressed || d?.value), { role: _ } = Wt(), I = n(() => {
648
648
  switch (!0) {
649
- case l.disabled:
649
+ case r.disabled:
650
650
  return R.button;
651
- case l.to !== void 0:
652
- return g?.nuxt ? st(R.nuxtLink) : R.routerLink;
653
- case l.href !== void 0:
651
+ case r.to !== void 0:
652
+ return y?.nuxt ? st(R.nuxtLink) : R.routerLink;
653
+ case r.href !== void 0:
654
654
  return R.a;
655
655
  default:
656
- return l.defaultTag;
656
+ return r.defaultTag;
657
657
  }
658
658
  }), N = n(() => {
659
- const b = {
660
- ...m?.value,
661
- ariaPressed: f.value ? !0 : void 0,
662
- ariaLabel: l.ariaLabel,
659
+ const p = {
660
+ ...b?.value,
661
+ ariaPressed: v.value ? !0 : void 0,
662
+ ariaLabel: r.ariaLabel,
663
663
  role: _?.value
664
664
  };
665
- switch (w.value) {
665
+ switch (I.value) {
666
666
  case R.a:
667
667
  return {
668
- ...b,
669
- href: l.href,
670
- target: l.target,
671
- rel: l.rel
668
+ ...p,
669
+ href: r.href,
670
+ target: r.target,
671
+ rel: r.rel
672
672
  };
673
673
  case R.routerLink:
674
674
  case R.nuxtLink:
675
675
  return {
676
- ...b,
677
- to: l.to,
678
- target: l.target
676
+ ...p,
677
+ to: r.to,
678
+ target: r.target
679
679
  };
680
680
  case R.button:
681
681
  return {
682
- ...b,
683
- type: l.type,
684
- disabled: l.disabled
682
+ ...p,
683
+ type: r.type,
684
+ disabled: r.disabled
685
685
  };
686
686
  default:
687
- return b;
687
+ return p;
688
688
  }
689
689
  });
690
- function M(b) {
691
- if (l.disabled) {
692
- b.preventDefault();
690
+ function M(p) {
691
+ if (r.disabled) {
692
+ p.preventDefault();
693
693
  return;
694
694
  }
695
695
  if (i?.vnode.props?.onClick) {
696
- o("click", b);
696
+ o("click", p);
697
697
  return;
698
698
  }
699
- s?.emit("click", b);
699
+ c?.emit("click", p);
700
700
  }
701
- function P(b) {
701
+ function P(p) {
702
702
  if (i?.vnode.props?.onMouseover) {
703
- o("mouseover", b);
703
+ o("mouseover", p);
704
704
  return;
705
705
  }
706
- s?.emit("mouseover", b);
706
+ c?.emit("mouseover", p);
707
707
  }
708
- function D(b) {
708
+ function j(p) {
709
709
  if (i?.vnode.props?.onMouseleave) {
710
- o("mouseleave", b);
710
+ o("mouseleave", p);
711
711
  return;
712
712
  }
713
- s?.emit("mouseleave", b);
713
+ c?.emit("mouseleave", p);
714
714
  }
715
- return (b, ee) => (S(), F(dt(v(w)), J(v(N), {
715
+ return (p, ee) => (S(), F(vt(s(I)), J(s(N), {
716
716
  ref_key: "rootEl",
717
- ref: c,
717
+ ref: f,
718
718
  class: {
719
- active: b.active,
720
- pressed: v(f),
721
- disabled: b.disabled,
722
- current: b.current
719
+ active: p.active,
720
+ pressed: s(v),
721
+ disabled: p.disabled,
722
+ current: p.current
723
723
  },
724
724
  onClickPassive: M,
725
725
  onMouseoverPassive: P,
726
- onMouseleavePassive: D
726
+ onMouseleavePassive: j
727
727
  }), {
728
- default: U(() => [I(b.$slots, "default", {}, () => [Ge(q(b.label), 1)])]),
728
+ default: U(() => [k(p.$slots, "default", {}, () => [Ge(q(p.label), 1)])]),
729
729
  _: 3
730
730
  }, 16, ["class"]));
731
731
  }
732
- }), Zt = Yt;
732
+ }), xt = Zt;
733
733
  function Pe(e, a, t) {
734
734
  return n(() => {
735
- const l = { [e]: !0 }, o = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
735
+ const r = { [e]: !0 }, o = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
736
736
  return o && Array.isArray(o) && o.forEach((i) => {
737
- i && (l[`${e}--${i}`] = !0);
737
+ i && (r[`${e}--${i}`] = !0);
738
738
  }), t && Object.keys(t.value).forEach((i) => {
739
- l[`${e}--${i}`] = v(t.value[i]);
740
- }), l;
739
+ r[`${e}--${i}`] = s(t.value[i]);
740
+ }), r;
741
741
  });
742
742
  }
743
743
  var Qt = { name: "VvIcon" }, Xt = /* @__PURE__ */ Y({
@@ -759,33 +759,32 @@ var Qt = { name: "VvIcon" }, Xt = /* @__PURE__ */ Y({
759
759
  onLoad: { type: Function },
760
760
  svg: {},
761
761
  modifiers: {}
762
- }, yt),
762
+ }, bt),
763
763
  setup(e) {
764
- const a = e, t = n(() => typeof a.rotate == "string" ? Number.parseFloat(a.rotate) : a.rotate), l = z(!0), o = ke(), { modifiers: i } = Ie(a), g = Pe("vv-icon", i), c = n(() => a.provider || o?.iconsProvider), p = n(() => {
765
- const u = a.name ?? "", f = `@${c.value}:${a.prefix}:${u}`;
766
- if (Le(f)) return f;
767
- const _ = o?.iconsCollections.find((w) => Le(`@${c.value}:${w.prefix}:${u}`));
768
- return _ ? `@${c.value}:${_.prefix}:${u}` : u;
764
+ const a = e, t = n(() => typeof a.rotate == "string" ? Number.parseFloat(a.rotate) : a.rotate), r = z(!0), o = $e(), { modifiers: i } = Be(a), y = Pe("vv-icon", i), f = n(() => a.provider || o?.iconsProvider), m = n(() => {
765
+ const d = a.name ?? "", v = `@${f.value}:${a.prefix}:${d}`;
766
+ if (Le(v)) return v;
767
+ const _ = o?.iconsCollections.find((I) => Le(`@${f.value}:${I.prefix}:${d}`));
768
+ return _ ? `@${f.value}:${_.prefix}:${d}` : d;
769
769
  });
770
- function s(u) {
771
- const f = typeof window < "u" ? new window.DOMParser() : null;
772
- return f ? f.parseFromString(u, "text/html").querySelector("svg") : null;
770
+ function c(d) {
771
+ return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(d, "text/html").querySelector("svg");
773
772
  }
774
- function m(u) {
775
- const f = s(u), _ = f?.innerHTML.trim() || "";
776
- f && _ && bt(`@${c.value}:${a.prefix}:${a.name}`, {
773
+ function b(d) {
774
+ const v = c(d), _ = v?.innerHTML.trim() || "";
775
+ v && _ && yt(`@${f.value}:${a.prefix}:${a.name}`, {
777
776
  body: _,
778
- height: f.viewBox.baseVal.height,
779
- width: f.viewBox.baseVal.width
777
+ height: v.viewBox.baseVal.height,
778
+ width: v.viewBox.baseVal.width
780
779
  });
781
780
  }
782
- return o && a.src && !Le(`@${c.value}:${a.prefix}:${a.name}`) && (l.value = !1, o.fetchIcon(a.src).then((u) => {
783
- u && m(u), l.value = !0;
784
- }).catch((u) => {
785
- throw l.value = !0, new Error(`Error during fetch icon: ${u?.message}`);
786
- })), a.svg && m(a.svg), (u, f) => v(l) ? (S(), F(v(mt), J({
781
+ return o && a.src && !Le(`@${f.value}:${a.prefix}:${a.name}`) && (r.value = !1, o.fetchIcon(a.src).then((d) => {
782
+ d && b(d), r.value = !0;
783
+ }).catch((d) => {
784
+ throw r.value = !0, new Error(`Error during fetch icon: ${d?.message}`);
785
+ })), a.svg && b(a.svg), (d, v) => s(r) ? (S(), F(s(mt), J({
787
786
  key: 0,
788
- class: v(g)
787
+ class: s(y)
789
788
  }, {
790
789
  inline: e.inline,
791
790
  width: e.width,
@@ -793,129 +792,127 @@ var Qt = { name: "VvIcon" }, Xt = /* @__PURE__ */ Y({
793
792
  horizontalFlip: e.horizontalFlip,
794
793
  verticalFlip: e.verticalFlip,
795
794
  flip: e.flip,
796
- rotate: v(t),
795
+ rotate: s(t),
797
796
  color: e.color,
798
- icon: v(p)
797
+ icon: s(m)
799
798
  }, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : A("v-if", !0);
800
799
  }
801
800
  }), W = Xt;
802
801
  function Ze(e) {
803
802
  return n(() => String(e?.value || ct()));
804
803
  }
805
- function Be(e, a) {
806
- const t = n(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), l = n(() => a?.value === ue.before ? t.value : void 0), o = n(() => a?.value === ue.after ? t.value : void 0);
804
+ function Ae(e, a) {
805
+ const t = n(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = n(() => a?.value === ue.before ? t.value : void 0), o = n(() => a?.value === ue.after ? t.value : void 0);
807
806
  return {
808
807
  hasIcon: t,
809
- hasIconLeft: n(() => a?.value === O.left ? t.value : void 0),
810
- hasIconRight: n(() => a?.value === O.right ? t.value : void 0),
811
- hasIconTop: n(() => a?.value === O.top ? t.value : void 0),
812
- hasIconBottom: n(() => a?.value === O.bottom ? t.value : void 0),
813
- hasIconBefore: l,
808
+ hasIconLeft: n(() => a?.value === w.left ? t.value : void 0),
809
+ hasIconRight: n(() => a?.value === w.right ? t.value : void 0),
810
+ hasIconTop: n(() => a?.value === w.top ? t.value : void 0),
811
+ hasIconBottom: n(() => a?.value === w.bottom ? t.value : void 0),
812
+ hasIconBefore: r,
814
813
  hasIconAfter: o
815
814
  };
816
815
  }
817
- var xt = {
816
+ var ea = {
818
817
  key: 1,
819
818
  class: "vv-button__label"
820
- }, ea = {
819
+ }, ta = {
821
820
  key: 1,
822
821
  class: "vv-button__label"
823
- }, ta = {
822
+ }, aa = {
824
823
  name: "VvButton",
825
824
  inheritAttrs: !1
826
- }, aa = /* @__PURE__ */ Y({
827
- ...ta,
828
- props: qt,
829
- emits: Ut,
825
+ }, ra = /* @__PURE__ */ Y({
826
+ ...aa,
827
+ props: Ht,
828
+ emits: Gt,
830
829
  setup(e, { expose: a, emit: t }) {
831
- const l = e, o = t, i = ft(), g = He(), { id: c, modifiers: p, iconPosition: s, icon: m, label: u, modelValue: f, disabled: _, toggle: w, unselectable: N } = Gt(l, o), M = Ze(c), P = n(() => i?.name || M.value), D = z(null);
832
- a({ $el: n(() => D.value?.$el) });
833
- const b = n(() => w.value ? Array.isArray(f.value) ? Ue(P.value, f.value) : Ye(P.value, f.value) : l.pressed), ee = Pe("vv-button", p, n(() => ({
834
- reverse: [O.right, O.bottom].includes(s.value),
835
- column: [O.top, O.bottom].includes(s.value),
836
- "icon-only": !!(m?.value && !u?.value && !g.default)
837
- }))), { hasIcon: te } = Be(m), T = n(() => l.value !== void 0 ? l.value : P.value), pe = n(() => {
838
- if (w.value)
830
+ const r = e, o = t, i = ft(), y = He(), { id: f, modifiers: m, iconPosition: c, icon: b, label: d, modelValue: v, disabled: _, toggle: I, unselectable: N } = Kt(r, o), M = Ze(f), P = n(() => i?.name || M.value), j = z(null);
831
+ a({ $el: n(() => j.value?.$el) });
832
+ const p = n(() => I.value ? Array.isArray(v.value) ? Ue(P.value, v.value) : Ye(P.value, v.value) : r.pressed), ee = Pe("vv-button", m, n(() => ({
833
+ reverse: [w.right, w.bottom].includes(c.value),
834
+ column: [w.top, w.bottom].includes(c.value),
835
+ "icon-only": !!(b?.value && !d?.value && !y.default)
836
+ }))), { hasIcon: te } = Ae(b), T = n(() => r.value === void 0 ? P.value : r.value), pe = n(() => {
837
+ if (I.value)
839
838
  return { onClick: G };
840
839
  });
841
840
  function G() {
842
- if (w.value) {
843
- if (Array.isArray(f.value)) {
844
- if (Ue(T.value, f.value)) {
845
- N.value && (f.value = f.value.filter((d) => d !== T.value));
841
+ if (I.value) {
842
+ if (Array.isArray(v.value)) {
843
+ if (Ue(T.value, v.value)) {
844
+ N.value && (v.value = v.value.filter((u) => u !== T.value));
846
845
  return;
847
846
  }
848
- f.value.push(T.value);
847
+ v.value.push(T.value);
849
848
  return;
850
849
  }
851
- if (T.value === f.value && N.value) {
852
- f.value = l.uncheckedValue;
850
+ if (T.value === v.value && N.value) {
851
+ v.value = r.uncheckedValue;
853
852
  return;
854
853
  }
855
- f.value = T.value;
854
+ v.value = T.value;
856
855
  }
857
856
  }
858
- return (d, L) => (S(), F(Zt, J({
859
- ...v(i),
860
- ...v(pe),
861
- disabled: v(_),
862
- pressed: v(b),
863
- active: d.active,
864
- type: d.type,
865
- to: d.to,
866
- href: d.href,
867
- target: d.target,
868
- rel: d.rel,
869
- ariaLabel: d.ariaLabel
857
+ return (u, L) => (S(), F(xt, J({
858
+ ...s(i),
859
+ ...s(pe),
860
+ disabled: s(_),
861
+ pressed: s(p),
862
+ active: u.active,
863
+ type: u.type,
864
+ to: u.to,
865
+ href: u.href,
866
+ target: u.target,
867
+ rel: u.rel,
868
+ ariaLabel: u.ariaLabel
870
869
  }, {
871
- id: v(M),
870
+ id: s(M),
872
871
  ref_key: "rootEl",
873
- ref: D,
874
- class: v(ee)
872
+ ref: j,
873
+ class: s(ee)
875
874
  }), {
876
- default: U(() => [I(d.$slots, "default", {}, () => [d.loading ? I(d.$slots, "loading", { key: 0 }, () => [d.loadingIcon ? (S(), F(W, {
875
+ default: U(() => [k(u.$slots, "default", {}, () => [u.loading ? k(u.$slots, "loading", { key: 0 }, () => [u.loadingIcon ? (S(), F(W, {
877
876
  key: 0,
878
877
  class: "vv-button__loading-icon",
879
- name: d.loadingIcon
880
- }, null, 8, ["name"])) : A("v-if", !0), d.loadingLabel ? (S(), k("span", xt, q(d.loadingLabel), 1)) : A("v-if", !0)]) : (S(), k(rt, { key: 1 }, [
881
- I(d.$slots, "before"),
882
- v(te) ? (S(), F(W, J({ key: 0 }, v(te), { class: "vv-button__icon" }), null, 16)) : A("v-if", !0),
883
- v(u) ? (S(), k("span", ea, [I(d.$slots, "label", {}, () => [Ge(q(v(u)), 1)])])) : A("v-if", !0),
884
- I(d.$slots, "after")
878
+ name: u.loadingIcon
879
+ }, null, 8, ["name"])) : A("v-if", !0), u.loadingLabel ? (S(), $("span", ea, q(u.loadingLabel), 1)) : A("v-if", !0)]) : (S(), $(rt, { key: 1 }, [
880
+ k(u.$slots, "before"),
881
+ s(te) ? (S(), F(W, J({ key: 0 }, s(te), { class: "vv-button__icon" }), null, 16)) : A("v-if", !0),
882
+ s(d) ? (S(), $("span", ta, [k(u.$slots, "label", {}, () => [Ge(q(s(d)), 1)])])) : A("v-if", !0),
883
+ k(u.$slots, "after")
885
884
  ], 64))])]),
886
885
  _: 3
887
886
  }, 16, ["id", "class"]));
888
887
  }
889
- }), ra = aa;
890
- function la(e, a, t) {
891
- const l = ke(), o = n(() => {
892
- if (!(!l || !l.defaults.value?.[e]))
893
- return l.defaults.value[e];
888
+ }), la = ra;
889
+ function oa(e, a, t) {
890
+ let r = a;
891
+ if (Array.isArray(e) && e.length) {
892
+ const o = e[0];
893
+ o() === a && (r = t);
894
+ }
895
+ if (typeof e == "function" && e() === a && (r = t), typeof e == "object") {
896
+ let o = e.default;
897
+ typeof o == "function" && (o = o()), (typeof o == "object" ? JSON.stringify(o) === JSON.stringify(a) : o === a) && (r = t);
898
+ }
899
+ return r;
900
+ }
901
+ function na(e, a, t) {
902
+ const r = $e(), o = n(() => {
903
+ if (r?.defaults.value?.[e])
904
+ return r.defaults.value[e];
894
905
  });
895
906
  return n(() => {
896
907
  if (o.value === void 0) return t;
897
- const i = o.value, g = a, c = t;
898
- return Object.keys(g).reduce((p, s) => {
899
- const m = c[s];
900
- if (p[s] = m, s in i) {
901
- if (Array.isArray(g[s])) {
902
- const u = g[s];
903
- u.length && u[0] === m && (p[s] = i[s]);
904
- }
905
- if (typeof g[s] == "function") {
906
- const u = g[s];
907
- u() === m && (p[s] = i[s]);
908
- }
909
- if (typeof g[s] == "object") {
910
- let u = g[s].default;
911
- typeof u == "function" && (u = u()), typeof u == "object" ? JSON.stringify(u) === JSON.stringify(m) && (p[s] = i[s]) : u === m && (p[s] = i[s]);
912
- }
913
- }
914
- return p;
908
+ const i = o.value, y = a, f = t;
909
+ return Object.keys(y).reduce((m, c) => {
910
+ const b = f[c];
911
+ return m[c] = c in i ? oa(y[c], b, i[c]) : b, m;
915
912
  }, {});
916
913
  });
917
914
  }
918
- var oa = ["for"], na = { class: "vv-input-file__preview" }, ia = ["src", "alt"], ua = { class: "vv-input-file__wrapper" }, sa = [
915
+ var ia = ["for"], ua = { class: "vv-input-file__preview" }, sa = ["src", "alt"], va = { class: "vv-input-file__wrapper" }, da = [
919
916
  "id",
920
917
  "readonly",
921
918
  "disabled",
@@ -928,12 +925,12 @@ var oa = ["for"], na = { class: "vv-input-file__preview" }, ia = ["src", "alt"],
928
925
  "accept",
929
926
  "capture",
930
927
  "name"
931
- ], da = ["value"], va = ["onClick"], fa = ["title", "onClick"], ca = { class: "vv-input-file__item-name" }, pa = { class: "vv-input-file__item-info" }, ga = [
928
+ ], fa = ["value"], ca = ["onClick"], pa = ["title", "onClick"], ga = { class: "vv-input-file__item-name" }, ma = { class: "vv-input-file__item-info" }, ya = [
932
929
  "title",
933
930
  "disabled",
934
931
  "onClick"
935
- ], ma = { name: "VvInputFile" }, ba = /* @__PURE__ */ Y({
936
- ...ma,
932
+ ], ba = { name: "VvInputFile" }, ha = /* @__PURE__ */ Y({
933
+ ...ba,
937
934
  props: Me,
938
935
  emits: [
939
936
  "remove",
@@ -941,11 +938,11 @@ var oa = ["for"], na = { class: "vv-input-file__preview" }, ia = ["src", "alt"],
941
938
  "update:modelValue"
942
939
  ],
943
940
  setup(e, { emit: a }) {
944
- const t = e, l = a, o = He(), i = la("VvInputFile", Me, t), { modifiers: g, id: c, readonly: p, disabled: s, icon: m, iconPosition: u, iconDownload: f, sortable: _ } = Ie(t), w = Ze(c), N = n(() => `${w.value}-hint`), M = n(() => {
941
+ const t = e, r = a, o = He(), i = na("VvInputFile", Me, t), { modifiers: y, id: f, readonly: m, disabled: c, icon: b, iconPosition: d, iconDownload: v, sortable: _ } = Be(t), I = Ze(f), N = n(() => `${I.value}-hint`), M = n(() => {
945
942
  if (!t.progress) return !1;
946
- const r = typeof t.progress == "string" ? Number.parseInt(t.progress) : t.progress;
947
- return r > 0 && r < 100;
948
- }), { hasIconBefore: P, hasIconAfter: D } = Be(m, u), { hasIcon: b } = Be(f), ee = Pe("vv-input-file", g, n(() => ({
943
+ const l = typeof t.progress == "string" ? Number.parseInt(t.progress) : t.progress;
944
+ return l > 0 && l < 100;
945
+ }), { hasIconBefore: P, hasIconAfter: j } = Ae(b, d), { hasIcon: p } = Ae(v), ee = Pe("vv-input-file", y, n(() => ({
949
946
  valid: t.valid === !0,
950
947
  invalid: t.invalid === !0,
951
948
  loading: t.loading && !M.value,
@@ -954,82 +951,82 @@ var oa = ["for"], na = { class: "vv-input-file__preview" }, ia = ["src", "alt"],
954
951
  readonly: t.readonly,
955
952
  dragging: le.value,
956
953
  "icon-before": !!P.value,
957
- "icon-after": !!D.value,
954
+ "icon-after": !!j.value,
958
955
  "drop-area": ge.value
959
- }))), { HintSlot: te, hasHintLabelOrSlot: T, hasInvalidLabelOrSlot: pe, hintSlotScope: G } = Mt(i, o), d = pt(t, "modelValue", l), L = n({
960
- get: () => !d.value || !Array.isArray(d.value) && !d.value?.name ? [] : Array.isArray(d.value) ? d.value : [d.value],
961
- set: (r) => {
956
+ }))), { HintSlot: te, hasHintLabelOrSlot: T, hasInvalidLabelOrSlot: pe, hintSlotScope: G } = Ut(i, o), u = pt(t, "modelValue", r), L = n({
957
+ get: () => !u.value || !Array.isArray(u.value) && !u.value?.name ? [] : Array.isArray(u.value) ? u.value : [u.value],
958
+ set: (l) => {
962
959
  if (re.value) {
963
- d.value = r;
960
+ u.value = l;
964
961
  return;
965
962
  }
966
- d.value = r?.[0];
963
+ u.value = l?.[0];
967
964
  }
968
965
  }), Ce = n(() => t.disabled || t.readonly), ae = n(() => typeof t.max == "string" ? Number.parseInt(t.max) : t.max), ge = n(() => t.dropArea && !Ce.value), re = n(() => t.multiple ? ae.value ? ae.value - L.value.length > 1 : !0 : !1), le = z(!1), H = z();
969
- function Qe() {
966
+ function xe() {
970
967
  le.value = !0;
971
968
  }
972
- function Xe() {
969
+ function Qe() {
973
970
  le.value = !1;
974
971
  }
975
- function xe(r) {
976
- r.dataTransfer?.files && (le.value = !1, Ve(r.dataTransfer?.files));
972
+ function Xe(l) {
973
+ l.dataTransfer?.files && (le.value = !1, Ve(l.dataTransfer?.files));
977
974
  }
978
975
  function et() {
979
976
  H.value?.files && (Ve(H.value.files), H.value.value = "");
980
977
  }
981
- function Ve(r) {
982
- const h = jt(r, t.accept);
978
+ function Ve(l) {
979
+ const h = Dt(l, t.accept);
983
980
  if (!t.multiple) {
984
- if (Array.isArray(d.value)) {
985
- d.value = h;
981
+ if (Array.isArray(u.value)) {
982
+ u.value = h;
986
983
  return;
987
984
  }
988
- d.value = h[0];
985
+ u.value = h[0];
989
986
  return;
990
987
  }
991
- let y = [];
992
- !Array.isArray(d.value) && d.value ? y = [d.value] : y = d.value && Array.isArray(d.value) ? [...d.value] : y;
988
+ let g = [];
989
+ !Array.isArray(u.value) && u.value ? g = [u.value] : g = u.value && Array.isArray(u.value) ? [...u.value] : g;
993
990
  for (const V of h) {
994
- if (ae.value && y.length >= ae.value) break;
995
- y.push(V);
991
+ if (ae.value && g.length >= ae.value) break;
992
+ g.push(V);
996
993
  }
997
- d.value = y, B.value = y.length - 1;
994
+ u.value = g, B.value = g.length - 1;
998
995
  }
999
996
  function me() {
1000
997
  H.value && (Ce.value || H.value.click());
1001
998
  }
1002
- function be(r) {
1003
- const h = Array.isArray(d.value) ? d.value[r] : d.value;
999
+ function ye(l) {
1000
+ const h = Array.isArray(u.value) ? u.value[l] : u.value;
1004
1001
  if (!h) return;
1005
- if (l("remove", h), !Array.isArray(d.value)) {
1006
- d.value = void 0;
1002
+ if (r("remove", h), !Array.isArray(u.value)) {
1003
+ u.value = void 0;
1007
1004
  return;
1008
1005
  }
1009
- B.value === r && (B.value = 0);
1010
- const y = [...d.value];
1011
- y.splice(r, 1), d.value = y;
1006
+ B.value === l && (B.value = 0);
1007
+ const g = [...u.value];
1008
+ g.splice(l, 1), u.value = g;
1012
1009
  }
1013
- const B = z(0), Ee = ["image/jpeg", "image/png"], C = n(() => {
1010
+ const B = z(0), Ee = /* @__PURE__ */ new Set(["image/jpeg", "image/png"]), C = n(() => {
1014
1011
  if (t.hidePreview || L.value.length === 0 || !L.value[B.value]) return;
1015
1012
  if (L.value[B.value] instanceof File) {
1016
1013
  const h = L.value[B.value];
1017
- return Ee.includes(h.type) ? URL.createObjectURL(h) : void 0;
1014
+ return Ee.has(h.type) ? URL.createObjectURL(h) : void 0;
1018
1015
  }
1019
- const r = L.value[B.value];
1020
- if (r.thumbnailUrl) return r.thumbnailUrl;
1021
- if (Ee.includes(r.type))
1022
- return r.url;
1016
+ const l = L.value[B.value];
1017
+ if (l.thumbnailUrl) return l.thumbnailUrl;
1018
+ if (Ee.has(l.type))
1019
+ return l.url;
1023
1020
  });
1024
- Ke(C, (r, h) => {
1021
+ Ke(C, (l, h) => {
1025
1022
  h && URL.revokeObjectURL(h);
1026
1023
  }), ut(() => {
1027
1024
  C.value && URL.revokeObjectURL(C.value);
1028
1025
  });
1029
- function ye(r, h) {
1030
- if (!r) return;
1031
- if (r === 0) return "0 Bytes";
1032
- const y = 1024, V = h ? h <= 0 ? 0 : h : 2, oe = [
1026
+ function be(l, h) {
1027
+ if (!l) return;
1028
+ if (l === 0) return "0 Bytes";
1029
+ const g = 1024, V = Math.max(0, h ?? 2), oe = [
1033
1030
  "Bytes",
1034
1031
  "KB",
1035
1032
  "MB",
@@ -1039,50 +1036,50 @@ var oa = ["for"], na = { class: "vv-input-file__preview" }, ia = ["src", "alt"],
1039
1036
  "EB",
1040
1037
  "ZB",
1041
1038
  "YB"
1042
- ], De = Math.floor(Math.log(r) / Math.log(y));
1043
- return `${Number.parseFloat((r / y ** De).toFixed(V))} ${oe[De]}`;
1039
+ ], je = Math.floor(Math.log(l) / Math.log(g));
1040
+ return `${Number.parseFloat((l / g ** je).toFixed(V))} ${oe[je]}`;
1044
1041
  }
1045
- function he(r) {
1046
- l("download", r);
1047
- const h = r instanceof File ? URL.createObjectURL(r) : r.url;
1042
+ function he(l) {
1043
+ r("download", l);
1044
+ const h = l instanceof File ? URL.createObjectURL(l) : l.url;
1048
1045
  if (!h) return;
1049
- const y = document.createElement("a");
1050
- y.href = h, y.setAttribute("download", r.name), document.body.appendChild(y), y.click(), document.body.removeChild(y), URL.revokeObjectURL(y.href);
1046
+ const g = document.createElement("a");
1047
+ g.href = h, g.setAttribute("download", l.name), document.body.appendChild(g), g.click(), g.remove(), URL.revokeObjectURL(g.href);
1051
1048
  }
1052
- function Re(r) {
1053
- B.value = r;
1049
+ function Re(l) {
1050
+ B.value = l;
1054
1051
  }
1055
1052
  const Ne = n(() => L.value.length === 0 || re.value ? t.labelAdd : t.labelReplace), tt = n(() => L.value.length === 0 || re.value ? t.iconAdd : t.iconReplace);
1056
- function at({ newIndex: r }) {
1057
- r !== null && (B.value = r);
1053
+ function at({ newIndex: l }) {
1054
+ l !== null && (B.value = l);
1058
1055
  }
1059
- return (r, h) => (S(), k("div", { class: _e(v(ee)) }, [
1060
- r.label ? (S(), k("label", {
1056
+ return (l, h) => (S(), $("div", { class: _e(s(ee)) }, [
1057
+ l.label ? (S(), $("label", {
1061
1058
  key: 0,
1062
- for: v(w)
1063
- }, q(r.label), 9, oa)) : A("v-if", !0),
1064
- ge.value ? (S(), k("div", {
1059
+ for: s(I)
1060
+ }, q(l.label), 9, ia)) : A("v-if", !0),
1061
+ ge.value ? (S(), $("div", {
1065
1062
  key: 1,
1066
1063
  class: "vv-input-file__drop-area",
1067
- onDragenter: E(Qe, ["prevent", "stop"]),
1068
- onDragleave: E(Xe, ["prevent", "stop"]),
1069
- onDrop: E(xe, ["prevent", "stop"]),
1064
+ onDragenter: E(xe, ["prevent", "stop"]),
1065
+ onDragleave: E(Qe, ["prevent", "stop"]),
1066
+ onDrop: E(Xe, ["prevent", "stop"]),
1070
1067
  onDragover: h[0] || (h[0] = E(() => {
1071
1068
  }, ["prevent", "stop"])),
1072
1069
  onClick: E(me, ["stop"])
1073
- }, [I(r.$slots, "drop-area", $(j({
1070
+ }, [k(l.$slots, "drop-area", O(D({
1074
1071
  previewSrc: C.value,
1075
1072
  onClickDropArea: me
1076
- })), () => [K("picture", na, [C.value ? (S(), k("img", {
1073
+ })), () => [K("picture", ua, [C.value ? (S(), $("img", {
1077
1074
  key: 0,
1078
1075
  src: C.value,
1079
1076
  alt: L.value[B.value].name
1080
- }, null, 8, ia)) : A("v-if", !0)]), v(p) ? A("v-if", !0) : (S(), F(ra, {
1077
+ }, null, 8, sa)) : A("v-if", !0)]), s(m) ? A("v-if", !0) : (S(), F(la, {
1081
1078
  key: 0,
1082
1079
  modifiers: "action",
1083
1080
  label: C.value ? void 0 : Ne.value,
1084
1081
  title: C.value ? Ne.value : void 0,
1085
- disabled: v(s),
1082
+ disabled: s(c),
1086
1083
  class: _e({ "vv-input-file__drop-area-action": C.value }),
1087
1084
  icon: tt.value,
1088
1085
  onClick: E(me, ["stop"])
@@ -1093,112 +1090,112 @@ var oa = ["for"], na = { class: "vv-input-file__preview" }, ia = ["src", "alt"],
1093
1090
  "class",
1094
1091
  "icon"
1095
1092
  ]))])], 32)) : A("v-if", !0),
1096
- K("div", ua, [
1097
- v(P) ? (S(), F(W, $(J({ key: 0 }, v(P))), null, 16)) : A("v-if", !0),
1093
+ K("div", va, [
1094
+ s(P) ? (S(), F(W, O(J({ key: 0 }, s(P))), null, 16)) : A("v-if", !0),
1098
1095
  K("input", {
1099
- id: v(w),
1096
+ id: s(I),
1100
1097
  ref_key: "inputEl",
1101
1098
  ref: H,
1102
1099
  type: "file",
1103
- readonly: v(p),
1104
- disabled: v(s),
1105
- required: r.required,
1106
- placeholder: r.placeholder,
1107
- "aria-describedby": v(T) ? N.value : void 0,
1108
- "aria-invalid": r.invalid,
1109
- "aria-errormessage": v(pe) ? N.value : void 0,
1100
+ readonly: s(m),
1101
+ disabled: s(c),
1102
+ required: l.required,
1103
+ placeholder: l.placeholder,
1104
+ "aria-describedby": s(T) ? N.value : void 0,
1105
+ "aria-invalid": l.invalid,
1106
+ "aria-errormessage": s(pe) ? N.value : void 0,
1110
1107
  multiple: re.value,
1111
- accept: r.accept,
1112
- capture: r.capture,
1113
- name: r.name,
1108
+ accept: l.accept,
1109
+ capture: l.capture,
1110
+ name: l.name,
1114
1111
  onChange: et
1115
- }, null, 40, sa),
1116
- M.value ? (S(), k("progress", {
1112
+ }, null, 40, da),
1113
+ M.value ? (S(), $("progress", {
1117
1114
  key: 1,
1118
1115
  class: "vv-input-file__progress",
1119
- value: r.progress,
1116
+ value: l.progress,
1120
1117
  max: "100"
1121
- }, q(r.progress) + "% ", 9, da)) : A("v-if", !0),
1122
- v(D) ? (S(), F(W, $(J({ key: 2 }, v(D))), null, 16)) : A("v-if", !0)
1118
+ }, q(l.progress) + "% ", 9, fa)) : A("v-if", !0),
1119
+ s(j) ? (S(), F(W, O(J({ key: 2 }, s(j))), null, 16)) : A("v-if", !0)
1123
1120
  ]),
1124
- I(r.$slots, "file-list", $(j({
1121
+ k(l.$slots, "file-list", O(D({
1125
1122
  files: L.value,
1126
1123
  selectedFileIndex: B.value,
1127
1124
  onSelectIndex: Re,
1128
- onRemoveIndex: be,
1125
+ onRemoveIndex: ye,
1129
1126
  onDownloadFile: he,
1130
- formatBytes: ye
1131
- })), () => [Se(v(gt), {
1127
+ formatBytes: be
1128
+ })), () => [Se(s(gt), {
1132
1129
  modelValue: L.value,
1133
- "onUpdate:modelValue": h[1] || (h[1] = (y) => L.value = y),
1130
+ "onUpdate:modelValue": h[1] || (h[1] = (g) => L.value = g),
1134
1131
  tag: "ul",
1135
1132
  class: "vv-input-file__list",
1136
1133
  "item-key": "name",
1137
- move: () => v(_),
1134
+ move: () => s(_),
1138
1135
  onEnd: at
1139
1136
  }, {
1140
- item: U(({ element: y, index: V }) => [K("li", {
1137
+ item: U(({ element: g, index: V }) => [K("li", {
1141
1138
  class: _e(["vv-input-file__item", {
1142
1139
  active: V === B.value && ge.value && L.value.length > 1,
1143
- "cursor-move": v(_)
1140
+ "cursor-move": s(_)
1144
1141
  }]),
1145
1142
  onClick: E((oe) => Re(V), ["stop"])
1146
- }, [I(r.$slots, "file-item", $(j({
1147
- file: y,
1143
+ }, [k(l.$slots, "file-item", O(D({
1144
+ file: g,
1148
1145
  index: V,
1149
1146
  isSelected: V === B.value,
1150
- onRemoveIndex: be,
1147
+ onRemoveIndex: ye,
1151
1148
  onDownloadFile: he,
1152
- formatBytes: ye
1149
+ formatBytes: be
1153
1150
  })), () => [
1154
- v(b) ? (S(), k("button", {
1151
+ s(p) ? (S(), $("button", {
1155
1152
  key: 0,
1156
1153
  type: "button",
1157
1154
  class: "vv-input-file__item-action",
1158
- title: r.labelDownload,
1159
- onClick: E((oe) => he(y), ["stop"])
1160
- }, [Se(W, $(j(v(b))), null, 16)], 8, fa)) : A("v-if", !0),
1161
- K("div", ca, q(y.name), 1),
1162
- K("small", pa, q(ye(y.size)), 1),
1163
- v(p) ? A("v-if", !0) : (S(), k("button", {
1155
+ title: l.labelDownload,
1156
+ onClick: E((oe) => he(g), ["stop"])
1157
+ }, [Se(W, O(D(s(p))), null, 16)], 8, pa)) : A("v-if", !0),
1158
+ K("div", ga, q(g.name), 1),
1159
+ K("small", ma, q(be(g.size)), 1),
1160
+ s(m) ? A("v-if", !0) : (S(), $("button", {
1164
1161
  key: 1,
1165
1162
  type: "button",
1166
1163
  class: "vv-input-file__item-remove",
1167
- title: r.labelRemove,
1168
- disabled: v(s),
1169
- onClick: E((oe) => be(V), ["stop"])
1170
- }, null, 8, ga))
1171
- ])], 10, va)]),
1164
+ title: l.labelRemove,
1165
+ disabled: s(c),
1166
+ onClick: E((oe) => ye(V), ["stop"])
1167
+ }, null, 8, ya))
1168
+ ])], 10, ca)]),
1172
1169
  _: 3
1173
1170
  }, 8, ["modelValue", "move"])]),
1174
- Se(v(te), {
1171
+ Se(s(te), {
1175
1172
  id: N.value,
1176
1173
  class: "vv-input-file__hint"
1177
1174
  }, lt({ _: 2 }, [
1178
- r.$slots.hint ? {
1175
+ l.$slots.hint ? {
1179
1176
  name: "hint",
1180
- fn: U(() => [I(r.$slots, "hint", $(j(v(G))))]),
1177
+ fn: U(() => [k(l.$slots, "hint", O(D(s(G))))]),
1181
1178
  key: "0"
1182
1179
  } : void 0,
1183
- r.$slots.loading ? {
1180
+ l.$slots.loading ? {
1184
1181
  name: "loading",
1185
- fn: U(() => [I(r.$slots, "loading", $(j(v(G))))]),
1182
+ fn: U(() => [k(l.$slots, "loading", O(D(s(G))))]),
1186
1183
  key: "1"
1187
1184
  } : void 0,
1188
- r.$slots.valid ? {
1185
+ l.$slots.valid ? {
1189
1186
  name: "valid",
1190
- fn: U(() => [I(r.$slots, "valid", $(j(v(G))))]),
1187
+ fn: U(() => [k(l.$slots, "valid", O(D(s(G))))]),
1191
1188
  key: "2"
1192
1189
  } : void 0,
1193
- r.$slots.invalid ? {
1190
+ l.$slots.invalid ? {
1194
1191
  name: "invalid",
1195
- fn: U(() => [I(r.$slots, "invalid", $(j(v(G))))]),
1192
+ fn: U(() => [k(l.$slots, "invalid", O(D(s(G))))]),
1196
1193
  key: "3"
1197
1194
  } : void 0
1198
1195
  ]), 1032, ["id"])
1199
1196
  ], 2));
1200
1197
  }
1201
- }), $a = ba;
1198
+ }), Pa = ha;
1202
1199
  export {
1203
- $a as default
1200
+ Pa as default
1204
1201
  };