@volverjs/ui-vue 0.0.10-beta.67 → 0.0.10-beta.69

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 (79) hide show
  1. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +5 -4
  2. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -2
  3. package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
  4. package/dist/components/VvAlert/VvAlert.es.js +6 -7
  5. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  6. package/dist/components/VvAlert/VvAlert.vue.d.ts +14 -8
  7. package/dist/components/VvAlert/index.d.ts +1 -1
  8. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +6 -7
  9. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  10. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +5 -3
  11. package/dist/components/VvAlertGroup/index.d.ts +1 -1
  12. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +1 -1
  13. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +1 -1
  14. package/dist/components/VvBadge/VvBadge.vue.d.ts +1 -1
  15. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -2
  16. package/dist/components/VvButton/VvButton.es.js +6 -7
  17. package/dist/components/VvButton/VvButton.umd.js +1 -1
  18. package/dist/components/VvButton/VvButton.vue.d.ts +9 -5
  19. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +3 -2
  20. package/dist/components/VvCard/VvCard.vue.d.ts +7 -4
  21. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  22. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +14 -10
  23. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  24. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +13 -9
  25. package/dist/components/VvCombobox/VvCombobox.es.js +301 -182
  26. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  27. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +41 -23
  28. package/dist/components/VvCombobox/index.d.ts +36 -4
  29. package/dist/components/VvDialog/VvDialog.vue.d.ts +5 -3
  30. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +11 -8
  31. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +2 -116
  32. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  33. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -3
  34. package/dist/components/VvIcon/VvIcon.es.js +5 -6
  35. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  36. package/dist/components/VvIcon/index.d.ts +2 -2
  37. package/dist/components/VvInputFile/VvInputFile.es.js +50 -13
  38. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  39. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +13 -9
  40. package/dist/components/VvInputFile/index.d.ts +4 -4
  41. package/dist/components/VvInputText/VvInputText.es.js +43 -18
  42. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  43. package/dist/components/VvInputText/VvInputText.vue.d.ts +37 -20
  44. package/dist/components/VvInputText/index.d.ts +12 -4
  45. package/dist/components/VvNav/VvNav.vue.d.ts +4 -3
  46. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  47. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  48. package/dist/components/VvRadio/VvRadio.vue.d.ts +14 -10
  49. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  50. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +13 -9
  51. package/dist/components/VvSelect/VvSelect.es.js +143 -51
  52. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  53. package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -14
  54. package/dist/components/VvSelect/index.d.ts +34 -2
  55. package/dist/components/VvTab/VvTab.vue.d.ts +3 -2
  56. package/dist/components/VvTextarea/VvTextarea.es.js +10 -9
  57. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  58. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +23 -16
  59. package/dist/components/VvTextarea/index.d.ts +1 -1
  60. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +1 -1
  61. package/dist/components/{VvInputText → common}/VvInputClearAction.d.ts +10 -0
  62. package/dist/components/{VvInputText → common}/VvInputPasswordAction.d.ts +9 -0
  63. package/dist/components/{VvInputText → common}/VvInputStepAction.d.ts +9 -0
  64. package/dist/components/index.es.js +208 -80
  65. package/dist/components/index.umd.js +1 -1
  66. package/dist/composables/alert/useAlert.d.ts +4 -4
  67. package/dist/composables/dropdown/useDropdownContextmenu.d.ts +1 -1
  68. package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +1 -1
  69. package/dist/icons.es.js +3 -3
  70. package/dist/icons.umd.js +1 -1
  71. package/dist/props/index.d.ts +3 -3
  72. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +46 -49
  73. package/dist/stories/Alert/Alert.settings.d.ts +1 -1
  74. package/dist/stories/Button/Button.settings.d.ts +1 -1
  75. package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
  76. package/dist/stories/Nav/Nav.settings.d.ts +1 -1
  77. package/dist/stories/Tab/Tab.settings.d.ts +1 -1
  78. package/dist/utils/FileUtilities.d.ts +14 -0
  79. package/package.json +36 -36
@@ -65,12 +65,13 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
65
65
  focusOnHover: boolean;
66
66
  selected: boolean;
67
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
68
- default?: ((props: {}) => any) | undefined;
69
- hint?: ((props: {
68
+ default?: (props: {}) => any;
69
+ } & {
70
+ hint?: (props: {
70
71
  disabled: boolean;
71
72
  selected: boolean;
72
73
  unselectable: boolean;
73
- }) => any) | undefined;
74
+ }) => any;
74
75
  }>;
75
76
  export default _default;
76
77
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { inject, computed, defineComponent, mergeDefaults, ref, toRefs, createBlock, createCommentVNode, unref, openBlock, mergeProps } from "vue";
2
- import { iconExists, Icon, addIcon } from "@iconify/vue";
2
+ import { iconLoaded, Icon, addIcon } from "@iconify/vue";
3
3
  const VvIconPropsDefaults = {
4
4
  prefix: "normal"
5
5
  /* normal */
@@ -67,13 +67,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
67
67
  const icon = computed(() => {
68
68
  const name = props.name ?? "";
69
69
  const iconName = `@${provider.value}:${props.prefix}:${name}`;
70
- if (iconExists(iconName)) {
70
+ if (iconLoaded(iconName)) {
71
71
  return iconName;
72
72
  }
73
73
  const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
74
74
  (iconsCollection2) => {
75
75
  const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
76
- return iconExists(icon2);
76
+ return iconLoaded(icon2);
77
77
  }
78
78
  );
79
79
  if (iconsCollection) {
@@ -105,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
105
105
  }
106
106
  }
107
107
  if (volver) {
108
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
108
+ if (props.src && !iconLoaded(`@${provider.value}:${props.prefix}:${props.name}`)) {
109
109
  show.value = false;
110
110
  volver.fetchIcon(props.src).then((svg) => {
111
111
  if (svg) {
@@ -133,9 +133,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
133
133
  flip: _ctx.flip,
134
134
  rotate: unref(hasRotate),
135
135
  color: _ctx.color,
136
- onLoad: _ctx.onLoad,
137
136
  icon: unref(icon)
138
- }), null, 16, ["class"])) : createCommentVNode("v-if", true);
137
+ }, { onLoad: _ctx.onLoad }), null, 16, ["class", "onLoad"])) : createCommentVNode("v-if", true);
139
138
  };
140
139
  }
141
140
  });
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";const n={prefix:"normal"},i=Symbol.for("volver");return e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},n),setup(n){const r=n,t=e.computed((()=>"string"==typeof r.rotate?Number.parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i,void 0),{modifiers:c}=e.toRefs(r),a=function(o,n){return e.computed((()=>{const e={[o]:!0},i="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return i&&Array.isArray(i)&&i.forEach((n=>{n&&(e[`${o}--${n}`]=!0)})),e}))}("vv-icon",c),s=e.computed((()=>r.provider||(null==u?void 0:u.iconsProvider))),f=e.computed((()=>{const e=r.name??"",n=`@${s.value}:${r.prefix}:${e}`;if(o.iconExists(n))return n;const i=null==u?void 0:u.iconsCollections.find((n=>{const i=`@${s.value}:${n.prefix}:${e}`;return o.iconExists(i)}));return i?`@${s.value}:${i.prefix}:${e}`:e}));function d(e){const n=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),i=(null==n?void 0:n.innerHTML.trim())||"";n&&i&&o.addIcon(`@${s.value}:${r.prefix}:${r.name}`,{body:i,height:n.viewBox.baseVal.height,width:n.viewBox.baseVal.width})}return u&&r.src&&!o.iconExists(`@${s.value}:${r.prefix}:${r.name}`)&&(l.value=!1,u.fetchIcon(r.src).then((e=>{e&&(d(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),r.svg&&d(r.svg),(n,i)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(a)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:e.unref(t),color:n.color,onLoad:n.onLoad,icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}})}));
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";const n={prefix:"normal"},i=Symbol.for("volver");return e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},n),setup(n){const r=n,t=e.computed((()=>"string"==typeof r.rotate?Number.parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i,void 0),{modifiers:a}=e.toRefs(r),c=function(o,n){return e.computed((()=>{const e={[o]:!0},i="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return i&&Array.isArray(i)&&i.forEach((n=>{n&&(e[`${o}--${n}`]=!0)})),e}))}("vv-icon",a),d=e.computed((()=>r.provider||(null==u?void 0:u.iconsProvider))),f=e.computed((()=>{const e=r.name??"",n=`@${d.value}:${r.prefix}:${e}`;if(o.iconLoaded(n))return n;const i=null==u?void 0:u.iconsCollections.find((n=>{const i=`@${d.value}:${n.prefix}:${e}`;return o.iconLoaded(i)}));return i?`@${d.value}:${i.prefix}:${e}`:e}));function s(e){const n=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),i=(null==n?void 0:n.innerHTML.trim())||"";n&&i&&o.addIcon(`@${d.value}:${r.prefix}:${r.name}`,{body:i,height:n.viewBox.baseVal.height,width:n.viewBox.baseVal.width})}return u&&r.src&&!o.iconLoaded(`@${d.value}:${r.prefix}:${r.name}`)&&(l.value=!1,u.fetchIcon(r.src).then((e=>{e&&(s(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),r.svg&&s(r.svg),(n,i)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(c)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:e.unref(t),color:n.color,icon:e.unref(f)},{onLoad:n.onLoad}),null,16,["class","onLoad"])):e.createCommentVNode("v-if",!0)}})}));
@@ -1,4 +1,4 @@
1
- import type { IconifyIconOnLoad, IconifyRenderMode } from '@iconify/vue';
1
+ import type { IconifyIcon, IconifyRenderMode } from '@iconify/vue';
2
2
  export declare const ACTION_ICONS: {
3
3
  readonly showPassword: "eye-on";
4
4
  readonly hidePassword: "eye-off";
@@ -70,7 +70,7 @@ export type VvIconProps = {
70
70
  /**
71
71
  * A callback that is called when icon data has been loaded
72
72
  */
73
- onLoad?: IconifyIconOnLoad;
73
+ onLoad?: (icon: IconifyIcon) => void;
74
74
  /**
75
75
  * SVG icon string
76
76
  */
@@ -1,7 +1,7 @@
1
1
  import { computed, isRef, defineComponent, h, inject, toRef, toRefs, getCurrentInstance, ref, watch, resolveComponent, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, mergeDefaults, createCommentVNode, useId, useAttrs, useSlots, createElementBlock, Fragment, onBeforeUnmount, normalizeClass, createElementVNode, createVNode, withModifiers, normalizeProps, guardReactiveProps, createSlots } from "vue";
2
2
  import { useVModel } from "@vueuse/core";
3
3
  import Sortable from "vuedraggable";
4
- import { iconExists, Icon, addIcon } from "@iconify/vue";
4
+ import { iconLoaded, Icon, addIcon } from "@iconify/vue";
5
5
  var StorageType = /* @__PURE__ */ ((StorageType2) => {
6
6
  StorageType2["local"] = "local";
7
7
  StorageType2["session"] = "session";
@@ -183,7 +183,7 @@ const HintProps = {
183
183
  const IconProps = {
184
184
  /**
185
185
  * VvIcon name or props
186
- * @see VVIcon
186
+ * @see VvIcon
187
187
  */
188
188
  icon: {
189
189
  type: [String, Object],
@@ -345,7 +345,7 @@ const VvInputFileProps = {
345
345
  },
346
346
  /**
347
347
  * VvIcon name for add button
348
- * @see VVIcon
348
+ * @see VvIcon
349
349
  */
350
350
  iconAdd: {
351
351
  type: [String, Object],
@@ -360,7 +360,7 @@ const VvInputFileProps = {
360
360
  },
361
361
  /**
362
362
  * VvIcon name for replace button
363
- * @see VVIcon
363
+ * @see VvIcon
364
364
  */
365
365
  iconReplace: {
366
366
  type: [String, Object],
@@ -375,7 +375,7 @@ const VvInputFileProps = {
375
375
  },
376
376
  /**
377
377
  * VvIcon name for download button
378
- * @see VVIcon
378
+ * @see VvIcon
379
379
  */
380
380
  iconDownload: {
381
381
  type: [String, Object],
@@ -389,6 +389,43 @@ const VvInputFileProps = {
389
389
  default: "Remove file"
390
390
  }
391
391
  };
392
+ function acceptedMimeTypes(acceptValue) {
393
+ const mimeTypes = [];
394
+ const extensions = [];
395
+ const wildcards = [];
396
+ const acceptedTypes = acceptValue == null ? void 0 : acceptValue.split(",").map((type) => type.trim().toLowerCase());
397
+ if (acceptedTypes == null ? void 0 : acceptedTypes.length) {
398
+ acceptedTypes.forEach((type) => {
399
+ if (type.startsWith(".")) {
400
+ extensions.push(type);
401
+ } else if (type.includes("/*")) {
402
+ wildcards.push(type.replace("/*", ""));
403
+ } else {
404
+ mimeTypes.push(type);
405
+ }
406
+ });
407
+ }
408
+ return {
409
+ mimeTypes,
410
+ extensions,
411
+ wildcards
412
+ };
413
+ }
414
+ function filterFileList(fileList, acceptValue) {
415
+ if (!acceptValue || acceptValue.trim() === "") {
416
+ return Array.from(fileList);
417
+ }
418
+ const { mimeTypes, extensions, wildcards } = acceptedMimeTypes(acceptValue);
419
+ return Array.from(fileList).filter((file) => {
420
+ var _a;
421
+ const fileType = file.type.toLowerCase();
422
+ const fileExtension = `.${(_a = file.name.split(".").pop()) == null ? void 0 : _a.toLowerCase()}`;
423
+ const mimeMatches = mimeTypes.includes(fileType);
424
+ const wildcardMatches = wildcards.some((wildcard) => fileType.startsWith(`${wildcard}/`));
425
+ const extensionMatches = extensions.some((ext) => fileExtension === ext.toLowerCase());
426
+ return mimeMatches || wildcardMatches || extensionMatches;
427
+ });
428
+ }
392
429
  function equals(obj1, obj2, field) {
393
430
  return deepEquals(obj1, obj2);
394
431
  }
@@ -907,13 +944,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
907
944
  const icon = computed(() => {
908
945
  const name = props.name ?? "";
909
946
  const iconName = `@${provider.value}:${props.prefix}:${name}`;
910
- if (iconExists(iconName)) {
947
+ if (iconLoaded(iconName)) {
911
948
  return iconName;
912
949
  }
913
950
  const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
914
951
  (iconsCollection2) => {
915
952
  const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
916
- return iconExists(icon2);
953
+ return iconLoaded(icon2);
917
954
  }
918
955
  );
919
956
  if (iconsCollection) {
@@ -945,7 +982,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
945
982
  }
946
983
  }
947
984
  if (volver) {
948
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
985
+ if (props.src && !iconLoaded(`@${provider.value}:${props.prefix}:${props.name}`)) {
949
986
  show.value = false;
950
987
  volver.fetchIcon(props.src).then((svg) => {
951
988
  if (svg) {
@@ -973,9 +1010,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
973
1010
  flip: _ctx.flip,
974
1011
  rotate: unref(hasRotate),
975
1012
  color: _ctx.color,
976
- onLoad: _ctx.onLoad,
977
1013
  icon: unref(icon)
978
- }), null, 16, ["class"])) : createCommentVNode("v-if", true);
1014
+ }, { onLoad: _ctx.onLoad }), null, 16, ["class", "onLoad"])) : createCommentVNode("v-if", true);
979
1015
  };
980
1016
  }
981
1017
  });
@@ -1354,12 +1390,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1354
1390
  inputEl.value.value = "";
1355
1391
  }
1356
1392
  function addFiles(uploadedFiles) {
1393
+ const filteredFiles = filterFileList(uploadedFiles, props.accept);
1357
1394
  if (!props.multiple) {
1358
1395
  if (Array.isArray(localModelValue.value)) {
1359
- localModelValue.value = [...uploadedFiles];
1396
+ localModelValue.value = filteredFiles;
1360
1397
  return;
1361
1398
  }
1362
- localModelValue.value = uploadedFiles[0];
1399
+ localModelValue.value = filteredFiles[0];
1363
1400
  return;
1364
1401
  }
1365
1402
  let toReturn = [];
@@ -1368,7 +1405,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1368
1405
  } else {
1369
1406
  toReturn = localModelValue.value && Array.isArray(localModelValue.value) ? [...localModelValue.value] : toReturn;
1370
1407
  }
1371
- for (const file of uploadedFiles) {
1408
+ for (const file of filteredFiles) {
1372
1409
  if (hasMax.value && toReturn.length >= hasMax.value) {
1373
1410
  break;
1374
1411
  }
@@ -1 +1 @@
1
- !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@vueuse/core"),require("vuedraggable"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","vuedraggable","@iconify/vue"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputFile=l(e.vue,e.core,e.Sortable,e.vue$1)}(this,(function(e,l,t,o){"use strict";var a=(e=>(e.local="local",e.session="session",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{});const d=Symbol.for("volver"),s=Symbol.for("buttonGroup"),v=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownAction"),f={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},p={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},m={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},g={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},b={disabled:{type:Boolean,default:!1}},y={required:{type:Boolean,default:!1}},h={active:{type:Boolean,default:!1}},k={current:{type:Boolean,default:!1}},S={pressed:{type:Boolean,default:!1}},B={label:{type:[String,Number],default:void 0}},L={readonly:{type:Boolean,default:!1}},V={modifiers:{type:[String,Array],default:void 0}},w={hintLabel:{type:String,default:""}},A={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:r.before,validation:e=>Object.values(r).includes(e)}},$={unselectable:{type:Boolean,default:!0}},C={id:[String,Number]};n.bottom;const N={...C,name:{type:String,required:!0}},x={...b,...B,...S,...h,...k,...f,type:{type:String,default:i.button,validator:e=>Object.values(i).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:u.button}};a.local;const O="add",_="edit",I="download",P={prefix:"normal"},R={...N,...V,...p,...m,...w,...B,...g,...L,...b,...y,...A,modelValue:{type:Object},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},capture:{type:String,default:void 0,validation:e=>void 0===e||["user","environment"].includes(e)},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:O},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:_},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:I},labelRemove:{type:String,default:"Remove file"}};function j(e,l,t){return E(e,l)}function E(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const t=Array.isArray(e),o=Array.isArray(l);let a,n,r;if(t&&o){if(n=e.length,n!==l.length)return!1;for(a=n;0!=a--;)if(!E(e[a],l[a]))return!1;return!0}if(t!==o)return!1;const i=e instanceof Date,u=l instanceof Date;if(i!==u)return!1;if(i&&u)return e.getTime()===l.getTime();const d=e instanceof RegExp,s=l instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===l.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(l).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(l,v[a]))return!1;for(a=n;0!=a--;)if(r=v[a],!E(e[r],l[r]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(l)}function D(e,l){if(null!=e&&l&&l.length)for(const t of l)if(j(e,t))return!0;return!1}function M(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).join(" "):e}const F={...x,...C,...V,...$,...g,...A,iconPosition:{type:String,default:n.left,validator:e=>Object.values(n).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function z(l,t){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(l){const t=e.inject(l,void 0),o=e.computed((()=>void 0!==t));return{group:t,isInGroup:o,getGroupOrLocalRef:function(l,o,a){const n=null==t?void 0:t[l];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const r=e.toRef(o,l);return e.computed({get:()=>r.value,set(e){a&&a(`update:${l}`,e)}})}}}(s),{id:r,iconPosition:i,icon:u,label:d,pressed:v}=e.toRefs(l),c=n("modelValue",l,t),f=n("toggle",l),p=n("unselectable",l),m=e.computed((()=>(null==o?void 0:o.multiple.value)??!1)),g=e.computed((()=>{let e=l.modifiers,t=null==o?void 0:o.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),t&&(Array.isArray(t)||(t=t.split(" ")),t.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>Boolean(l.disabled||(null==o?void 0:o.disabled.value))));return{group:o,isInGroup:a,modelValue:c,toggle:f,unselectable:p,multiple:m,modifiers:g,disabled:b,id:r,pressed:v,iconPosition:i,icon:u,label:d}}const T=x;function U(){return e.inject(d,void 0)}const q=e.defineComponent({name:"VvAction",props:T,emits:["click","mouseover","mouseleave"],setup(l,{expose:t,emit:o}){const a=l,n=o,r=e.getCurrentInstance(),i=U(),d=e.ref(null);t({$el:d});const{reference:s,bus:f,aria:p,expanded:m}=e.inject(v,{});e.watch((()=>d.value),(e=>{s&&(s.value=e)}));const g=e.computed((()=>a.pressed||(null==m?void 0:m.value))),{role:b}=e.inject(c,{}),y=e.computed((()=>{switch(!0){case a.disabled:return u.button;case void 0!==a.to:return(null==i?void 0:i.nuxt)?e.resolveComponent(u.nuxtLink):u.routerLink;case void 0!==a.href:return u.a;default:return a.defaultTag}})),h=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!g.value||void 0,ariaLabel:a.ariaLabel,role:null==b?void 0:b.value};switch(y.value){case u.a:return{...e,href:a.href,target:a.target,rel:a.rel};case u.routerLink:case u.nuxtLink:return{...e,to:a.to,target:a.target};case u.button:return{...e,type:a.type,disabled:a.disabled};default:return e}}));function k(e){var l;a.disabled?e.preventDefault():(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onClick)?n("click",e):null==f||f.emit("click",e)}function S(e){var l;(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onMouseover)?n("mouseover",e):null==f||f.emit("mouseover",e)}function B(e){var l;(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onMouseleave)?n("mouseleave",e):null==f||f.emit("mouseleave",e)}return(l,t)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(h),{ref_key:"element",ref:d,class:{active:l.active,pressed:e.unref(g),disabled:l.disabled,current:l.current},onClickPassive:k,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]))])),_:3},16,["class"]))}});function G(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const H=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},P),setup(l){const t=l,a=e.computed((()=>"string"==typeof t.rotate?Number.parseFloat(t.rotate):t.rotate)),n=e.ref(!0),r=U(),{modifiers:i}=e.toRefs(t),u=G("vv-icon",i),d=e.computed((()=>t.provider||(null==r?void 0:r.iconsProvider))),s=e.computed((()=>{const e=t.name??"",l=`@${d.value}:${t.prefix}:${e}`;if(o.iconExists(l))return l;const a=null==r?void 0:r.iconsCollections.find((l=>{const t=`@${d.value}:${l.prefix}:${e}`;return o.iconExists(t)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const l=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==l?void 0:l.innerHTML.trim())||"";l&&a&&o.addIcon(`@${d.value}:${t.prefix}:${t.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return r&&t.src&&!o.iconExists(`@${d.value}:${t.prefix}:${t.name}`)&&(n.value=!1,r.fetchIcon(t.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),t.svg&&v(t.svg),(l,t)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function J(l){return e.computed((()=>String((null==l?void 0:l.value)||e.useId())))}function K(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===r.before?o.value:void 0)),i=e.computed((()=>(null==t?void 0:t.value)===r.after?o.value:void 0)),u=e.computed((()=>(null==t?void 0:t.value)===n.left?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===n.right?o.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===n.top?o.value:void 0)),v=e.computed((()=>(null==t?void 0:t.value)===n.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:u,hasIconRight:d,hasIconTop:s,hasIconBottom:v,hasIconBefore:a,hasIconAfter:i}}const Y={key:1,class:"vv-button__label"},Z={key:1,class:"vv-button__label"},Q=e.defineComponent({name:"VvButton",inheritAttrs:!1,props:F,emits:["update:modelValue"],setup(l,{expose:t,emit:o}){const a=l,r=o,i=e.useAttrs(),u=e.useSlots(),{id:d,modifiers:s,iconPosition:v,icon:c,label:f,modelValue:p,disabled:m,toggle:g,unselectable:b}=z(a,r),y=J(d),h=e.computed((()=>(null==i?void 0:i.name)||y.value)),k=e.ref(null);t({$el:e.computed((()=>{var e;return null==(e=k.value)?void 0:e.$el}))});const S=e.computed((()=>g.value?Array.isArray(p.value)?D(h.value,p.value):j(h.value,p.value):a.pressed)),B=G("vv-button",s,e.computed((()=>({reverse:[n.right,n.bottom].includes(v.value),column:[n.top,n.bottom].includes(v.value),"icon-only":Boolean((null==c?void 0:c.value)&&!(null==f?void 0:f.value)&&!u.default)})))),{hasIcon:L}=K(c),V=e.computed((()=>void 0!==a.value?a.value:h.value)),w=e.computed((()=>{if(g.value)return{onClick:A}}));function A(){if(g.value){if(Array.isArray(p.value))return D(V.value,p.value)?void(b.value&&(p.value=p.value.filter((e=>e!==V.value)))):void p.value.push(V.value);if(V.value===p.value&&b.value)return void(p.value=a.uncheckedValue);p.value=V.value}}return(l,t)=>(e.openBlock(),e.createBlock(q,e.mergeProps({...e.unref(i),...e.unref(w),disabled:e.unref(m),pressed:e.unref(S),active:l.active,type:l.type,to:l.to,href:l.href,target:l.target,rel:l.rel,ariaLabel:l.ariaLabel},{id:e.unref(y),ref_key:"element",ref:k,class:e.unref(B)}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[l.loading?e.renderSlot(l.$slots,"loading",{key:0},(()=>[l.loadingIcon?(e.openBlock(),e.createBlock(H,{key:0,class:"vv-button__loading-icon",name:l.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),l.loadingLabel?(e.openBlock(),e.createElementBlock("span",Y,e.toDisplayString(l.loadingLabel),1)):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(l.$slots,"before"),e.unref(L)?(e.openBlock(),e.createBlock(H,e.mergeProps({key:0},e.unref(L),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("span",Z,[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(l.$slots,"after")],64))]))])),_:3},16,["id","class"]))}});const W=["for"],X={class:"vv-input-file__preview"},ee=["src","alt"],le={class:"vv-input-file__wrapper"},te=["id","readonly","disabled","required","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","capture","name"],oe=["value"],ae=["onClick"],ne=["title","onClick"],re={class:"vv-input-file__item-name"},ie={class:"vv-input-file__item-info"},ue=["title","disabled","onClick"];return e.defineComponent({name:"VvInputFile",props:R,emits:["remove","download","update:modelValue"],setup(o,{emit:a}){const n=o,r=a,i=e.useSlots(),u=function(l,t,o){const a=U(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvInputFile",R,n),{modifiers:d,id:s,readonly:v,disabled:c,icon:f,iconPosition:p,iconDownload:m}=e.toRefs(n),g=J(s),b=e.computed((()=>`${g.value}-hint`)),y=e.computed((()=>{if(!n.progress)return!1;const e="string"==typeof n.progress?Number.parseInt(n.progress):n.progress;return e>0&&e<100})),{hasIconBefore:h,hasIconAfter:k}=K(f,p),{hasIcon:S}=K(m),B=G("vv-input-file",d,e.computed((()=>({valid:!0===n.valid,invalid:!0===n.invalid,loading:n.loading&&!y.value,disabled:n.disabled,required:n.required,readonly:n.readonly,dragging:I.value,"icon-before":!!h.value,"icon-after":!!k.value,"drop-area":O.value})))),{HintSlot:L,hasHintLabelOrSlot:V,hasInvalidLabelOrSlot:w,hintSlotScope:A}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>M(o.value.invalidLabel))),n=e.computed((()=>M(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),i=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||r.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||i.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var l,t,o,a,n,r,i,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(t=(l=this.$slots).loading)?void 0:t.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(u,i),$=l.useVModel(n,"modelValue",r),C=e.computed({get:()=>{var e;return $.value&&(Array.isArray($.value)||(null==(e=$.value)?void 0:e.name))?Array.isArray($.value)?$.value:[$.value]:[]},set:e=>{_.value?$.value=e:$.value=null==e?void 0:e[0]}}),N=e.computed((()=>n.disabled||n.readonly)),x=e.computed((()=>"string"==typeof n.max?Number.parseInt(n.max):n.max)),O=e.computed((()=>n.dropArea&&!N.value)),_=e.computed((()=>!!n.multiple&&(!x.value||x.value-C.value.length>1))),I=e.ref(!1),P=e.ref();function j(){I.value=!0}function E(){I.value=!1}function D(e){var l,t;(null==(l=e.dataTransfer)?void 0:l.files)&&(I.value=!1,z(null==(t=e.dataTransfer)?void 0:t.files))}function F(){var e;(null==(e=P.value)?void 0:e.files)&&(z(P.value.files),P.value.value="")}function z(e){if(!n.multiple)return Array.isArray($.value)?void($.value=[...e]):void($.value=e[0]);let l=[];l=!Array.isArray($.value)&&$.value?[$.value]:$.value&&Array.isArray($.value)?[...$.value]:l;for(const t of e){if(x.value&&l.length>=x.value)break;l.push(t)}$.value=l,q.value=l.length-1}function T(){P.value&&(N.value||P.value.click())}const q=e.ref(0),Y=["image/jpeg","image/png"],Z=e.computed((()=>{if(0===C.value.length)return;if(!C.value[q.value])return;if(C.value[q.value]instanceof File){const e=C.value[q.value];if(!Y.includes(e.type))return;return URL.createObjectURL(e)}const e=C.value[q.value];return e.thumbnailUrl?e.thumbnailUrl:Y.includes(e.type)?e.url:void 0}));function de(e,l){if(!e)return;if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return`${Number.parseFloat((e/1024**t).toFixed(2))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}`}e.watch(Z,((e,l)=>{l&&URL.revokeObjectURL(l)})),e.onBeforeUnmount((()=>{Z.value&&URL.revokeObjectURL(Z.value)}));const se=e.computed((()=>0===C.value.length||_.value?n.labelAdd:n.labelReplace)),ve=e.computed((()=>0===C.value.length||_.value?n.iconAdd:n.iconReplace));function ce({newIndex:e}){null!==e&&(q.value=e)}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(B))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(g)},e.toDisplayString(l.label),9,W)):e.createCommentVNode("v-if",!0),O.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vv-input-file__drop-area",onDragenter:e.withModifiers(j,["prevent","stop"]),onDragleave:e.withModifiers(E,["prevent","stop"]),onDrop:e.withModifiers(D,["prevent","stop"]),onDragover:o[0]||(o[0]=e.withModifiers((()=>{}),["prevent","stop"])),onClick:e.withModifiers(T,["stop"])},[e.renderSlot(l.$slots,"drop-area",{},(()=>[e.createElementVNode("picture",X,[Z.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:Z.value,alt:C.value[q.value].name},null,8,ee)):e.createCommentVNode("v-if",!0)]),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(Q,{key:0,modifiers:"action",label:Z.value?void 0:se.value,title:Z.value?se.value:void 0,disabled:e.unref(c),class:e.normalizeClass({"vv-input-file__drop-area-action":Z.value}),icon:ve.value,onClick:e.withModifiers(T,["stop"])},null,8,["label","title","disabled","class","icon"]))]))],32)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",le,[e.unref(h)?(e.openBlock(),e.createBlock(H,e.normalizeProps(e.mergeProps({key:0},e.unref(h))),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",{id:e.unref(g),ref_key:"inputEl",ref:P,type:"file",readonly:e.unref(v),disabled:e.unref(c),required:l.required,placeholder:l.placeholder,"aria-describedby":e.unref(V)?b.value:void 0,"aria-invalid":l.invalid,"aria-errormessage":e.unref(w)?b.value:void 0,multiple:_.value,accept:l.accept,capture:l.capture,name:l.name,onChange:F},null,40,te),y.value?(e.openBlock(),e.createElementBlock("progress",{key:1,class:"vv-input-file__progress",value:l.progress,max:"100"},e.toDisplayString(l.progress)+"% ",9,oe)):e.createCommentVNode("v-if",!0),e.unref(k)?(e.openBlock(),e.createBlock(H,e.normalizeProps(e.mergeProps({key:2},e.unref(k))),null,16)):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(t),{modelValue:C.value,"onUpdate:modelValue":o[1]||(o[1]=e=>C.value=e),tag:"ul",class:"vv-input-file__list","item-key":"name",move:()=>l.sortable,onEnd:ce},{item:e.withCtx((({element:t,index:o})=>[e.createElementVNode("li",{class:e.normalizeClass(["vv-input-file__item",{active:o===q.value&&O.value&&C.value.length>1,"cursor-move":l.sortable}]),onClick:e.withModifiers((e=>function(e){q.value=e}(o)),["stop"])},[e.unref(S)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vv-input-file__item-action",title:l.labelDownload,onClick:e.withModifiers((e=>function(e){r("download",e);const l=e instanceof File?URL.createObjectURL(e):e.url;if(!l)return;const t=document.createElement("a");t.href=l,t.setAttribute("download",e.name),document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(t.href)}(t)),["stop"])},[e.createVNode(H,e.normalizeProps(e.guardReactiveProps(e.unref(S))),null,16)],8,ne)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",re,e.toDisplayString(t.name),1),e.createElementVNode("small",ie,e.toDisplayString(de(t.size)),1),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:l.labelRemove,disabled:e.unref(c),onClick:e.withModifiers((e=>function(e){const l=Array.isArray($.value)?$.value[e]:$.value;if(!l)return;if(r("remove",l),!Array.isArray($.value))return void($.value=void 0);q.value===e&&(q.value=0);const t=[...$.value];t.splice(e,1),$.value=t}(o)),["stop"])},null,8,ue))],10,ae)])),_:1},8,["modelValue","move"]),e.createVNode(e.unref(L),{id:b.value,class:"vv-input-file__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@vueuse/core"),require("vuedraggable"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","vuedraggable","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputFile=t(e.vue,e.core,e.Sortable,e.vue$1)}(this,(function(e,t,l,o){"use strict";var a=(e=>(e.local="local",e.session="session",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{});const d=Symbol.for("volver"),s=Symbol.for("buttonGroup"),c=Symbol.for("dropdownTrigger"),v=Symbol.for("dropdownAction"),f={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},p={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},m={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},g={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},b={disabled:{type:Boolean,default:!1}},y={required:{type:Boolean,default:!1}},h={active:{type:Boolean,default:!1}},k={current:{type:Boolean,default:!1}},S={pressed:{type:Boolean,default:!1}},B={label:{type:[String,Number],default:void 0}},L={readonly:{type:Boolean,default:!1}},w={modifiers:{type:[String,Array],default:void 0}},V={hintLabel:{type:String,default:""}},A={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:r.before,validation:e=>Object.values(r).includes(e)}},C={unselectable:{type:Boolean,default:!0}},$={id:[String,Number]};n.bottom;const N={...$,name:{type:String,required:!0}},O={...b,...B,...S,...h,...k,...f,type:{type:String,default:i.button,validator:e=>Object.values(i).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:u.button}};a.local;const x="add",_="edit",I="download",P={prefix:"normal"},R={...N,...w,...p,...m,...V,...B,...g,...L,...b,...y,...A,modelValue:{type:Object},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},capture:{type:String,default:void 0,validation:e=>void 0===e||["user","environment"].includes(e)},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:x},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:_},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:I},labelRemove:{type:String,default:"Remove file"}};function j(e,t,l){return E(e,t)}function E(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),o=Array.isArray(t);let a,n,r;if(l&&o){if(n=e.length,n!==t.length)return!1;for(a=n;0!==a--;)if(!E(e[a],t[a]))return!1;return!0}if(l!==o)return!1;const i=e instanceof Date,u=t instanceof Date;if(i!==u)return!1;if(i&&u)return e.getTime()===t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===t.toString();const c=Object.keys(e);if(n=c.length,n!==Object.keys(t).length)return!1;for(a=n;0!==a--;)if(!Object.prototype.hasOwnProperty.call(t,c[a]))return!1;for(a=n;0!==a--;)if(r=c[a],!E(e[r],t[r]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function D(e,t){if(null!=e&&t&&t.length)for(const l of t)if(j(e,l))return!0;return!1}function M(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).join(" "):e}const F={...O,...$,...w,...C,...g,...A,iconPosition:{type:String,default:n.left,validator:e=>Object.values(n).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function T(t,l){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),o=e.computed((()=>void 0!==l));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const r=e.toRef(o,t);return e.computed({get:()=>r.value,set(e){a&&a(`update:${t}`,e)}})}}}(s),{id:r,iconPosition:i,icon:u,label:d,pressed:c}=e.toRefs(t),v=n("modelValue",t,l),f=n("toggle",t),p=n("unselectable",t),m=e.computed((()=>(null==o?void 0:o.multiple.value)??!1)),g=e.computed((()=>{let e=t.modifiers,l=null==o?void 0:o.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),l&&(Array.isArray(l)||(l=l.split(" ")),l.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>Boolean(t.disabled||(null==o?void 0:o.disabled.value))));return{group:o,isInGroup:a,modelValue:v,toggle:f,unselectable:p,multiple:m,modifiers:g,disabled:b,id:r,pressed:c,iconPosition:i,icon:u,label:d}}const z=O;function U(){return e.inject(d,void 0)}const q=e.defineComponent({name:"VvAction",props:z,emits:["click","mouseover","mouseleave"],setup(t,{expose:l,emit:o}){const a=t,n=o,r=e.getCurrentInstance(),i=U(),d=e.ref(null);l({$el:d});const{reference:s,bus:f,aria:p,expanded:m}=e.inject(c,{});e.watch((()=>d.value),(e=>{s&&(s.value=e)}));const g=e.computed((()=>a.pressed||(null==m?void 0:m.value))),{role:b}=e.inject(v,{}),y=e.computed((()=>{switch(!0){case a.disabled:return u.button;case void 0!==a.to:return(null==i?void 0:i.nuxt)?e.resolveComponent(u.nuxtLink):u.routerLink;case void 0!==a.href:return u.a;default:return a.defaultTag}})),h=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!g.value||void 0,ariaLabel:a.ariaLabel,role:null==b?void 0:b.value};switch(y.value){case u.a:return{...e,href:a.href,target:a.target,rel:a.rel};case u.routerLink:case u.nuxtLink:return{...e,to:a.to,target:a.target};case u.button:return{...e,type:a.type,disabled:a.disabled};default:return e}}));function k(e){var t;a.disabled?e.preventDefault():(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onClick)?n("click",e):null==f||f.emit("click",e)}function S(e){var t;(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onMouseover)?n("mouseover",e):null==f||f.emit("mouseover",e)}function B(e){var t;(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onMouseleave)?n("mouseleave",e):null==f||f.emit("mouseleave",e)}return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(h),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(g),disabled:t.disabled,current:t.current},onClickPassive:k,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});function G(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const H=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},P),setup(t){const l=t,a=e.computed((()=>"string"==typeof l.rotate?Number.parseFloat(l.rotate):l.rotate)),n=e.ref(!0),r=U(),{modifiers:i}=e.toRefs(l),u=G("vv-icon",i),d=e.computed((()=>l.provider||(null==r?void 0:r.iconsProvider))),s=e.computed((()=>{const e=l.name??"",t=`@${d.value}:${l.prefix}:${e}`;if(o.iconLoaded(t))return t;const a=null==r?void 0:r.iconsCollections.find((t=>{const l=`@${d.value}:${t.prefix}:${e}`;return o.iconLoaded(l)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&o.addIcon(`@${d.value}:${l.prefix}:${l.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return r&&l.src&&!o.iconLoaded(`@${d.value}:${l.prefix}:${l.name}`)&&(n.value=!1,r.fetchIcon(l.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&c(l.svg),(t,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,icon:e.unref(s)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):e.createCommentVNode("v-if",!0)}});function J(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}function W(t,l){const o=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==l?void 0:l.value)===r.before?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===r.after?o.value:void 0)),u=e.computed((()=>(null==l?void 0:l.value)===n.left?o.value:void 0)),d=e.computed((()=>(null==l?void 0:l.value)===n.right?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===n.top?o.value:void 0)),c=e.computed((()=>(null==l?void 0:l.value)===n.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:u,hasIconRight:d,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:i}}const K={key:1,class:"vv-button__label"},Y={key:1,class:"vv-button__label"},Z=e.defineComponent({name:"VvButton",inheritAttrs:!1,props:F,emits:["update:modelValue"],setup(t,{expose:l,emit:o}){const a=t,r=o,i=e.useAttrs(),u=e.useSlots(),{id:d,modifiers:s,iconPosition:c,icon:v,label:f,modelValue:p,disabled:m,toggle:g,unselectable:b}=T(a,r),y=J(d),h=e.computed((()=>(null==i?void 0:i.name)||y.value)),k=e.ref(null);l({$el:e.computed((()=>{var e;return null==(e=k.value)?void 0:e.$el}))});const S=e.computed((()=>g.value?Array.isArray(p.value)?D(h.value,p.value):j(h.value,p.value):a.pressed)),B=G("vv-button",s,e.computed((()=>({reverse:[n.right,n.bottom].includes(c.value),column:[n.top,n.bottom].includes(c.value),"icon-only":Boolean((null==v?void 0:v.value)&&!(null==f?void 0:f.value)&&!u.default)})))),{hasIcon:L}=W(v),w=e.computed((()=>void 0!==a.value?a.value:h.value)),V=e.computed((()=>{if(g.value)return{onClick:A}}));function A(){if(g.value){if(Array.isArray(p.value))return D(w.value,p.value)?void(b.value&&(p.value=p.value.filter((e=>e!==w.value)))):void p.value.push(w.value);if(w.value===p.value&&b.value)return void(p.value=a.uncheckedValue);p.value=w.value}}return(t,l)=>(e.openBlock(),e.createBlock(q,e.mergeProps({...e.unref(i),...e.unref(V),disabled:e.unref(m),pressed:e.unref(S),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(y),ref_key:"element",ref:k,class:e.unref(B)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(H,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",K,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(L)?(e.openBlock(),e.createBlock(H,e.mergeProps({key:0},e.unref(L),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("span",Y,[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"after")],64))]))])),_:3},16,["id","class"]))}});const Q=["for"],X={class:"vv-input-file__preview"},ee=["src","alt"],te={class:"vv-input-file__wrapper"},le=["id","readonly","disabled","required","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","capture","name"],oe=["value"],ae=["onClick"],ne=["title","onClick"],re={class:"vv-input-file__item-name"},ie={class:"vv-input-file__item-info"},ue=["title","disabled","onClick"];return e.defineComponent({name:"VvInputFile",props:R,emits:["remove","download","update:modelValue"],setup(o,{emit:a}){const n=o,r=a,i=e.useSlots(),u=function(t,l,o){const a=U(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===n&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===n&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}("VvInputFile",R,n),{modifiers:d,id:s,readonly:c,disabled:v,icon:f,iconPosition:p,iconDownload:m}=e.toRefs(n),g=J(s),b=e.computed((()=>`${g.value}-hint`)),y=e.computed((()=>{if(!n.progress)return!1;const e="string"==typeof n.progress?Number.parseInt(n.progress):n.progress;return e>0&&e<100})),{hasIconBefore:h,hasIconAfter:k}=W(f,p),{hasIcon:S}=W(m),B=G("vv-input-file",d,e.computed((()=>({valid:!0===n.valid,invalid:!0===n.invalid,loading:n.loading&&!y.value,disabled:n.disabled,required:n.required,readonly:n.readonly,dragging:I.value,"icon-before":!!h.value,"icon-after":!!k.value,"drop-area":x.value})))),{HintSlot:L,hasHintLabelOrSlot:w,hasInvalidLabelOrSlot:V,hintSlotScope:A}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>M(o.value.invalidLabel))),n=e.computed((()=>M(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),i=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||i.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,r,i,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(u,i),C=t.useVModel(n,"modelValue",r),$=e.computed({get:()=>{var e;return C.value&&(Array.isArray(C.value)||(null==(e=C.value)?void 0:e.name))?Array.isArray(C.value)?C.value:[C.value]:[]},set:e=>{_.value?C.value=e:C.value=null==e?void 0:e[0]}}),N=e.computed((()=>n.disabled||n.readonly)),O=e.computed((()=>"string"==typeof n.max?Number.parseInt(n.max):n.max)),x=e.computed((()=>n.dropArea&&!N.value)),_=e.computed((()=>!!n.multiple&&(!O.value||O.value-$.value.length>1))),I=e.ref(!1),P=e.ref();function j(){I.value=!0}function E(){I.value=!1}function D(e){var t,l;(null==(t=e.dataTransfer)?void 0:t.files)&&(I.value=!1,T(null==(l=e.dataTransfer)?void 0:l.files))}function F(){var e;(null==(e=P.value)?void 0:e.files)&&(T(P.value.files),P.value.value="")}function T(e){const t=function(e,t){if(!t||""===t.trim())return Array.from(e);const{mimeTypes:l,extensions:o,wildcards:a}=function(e){const t=[],l=[],o=[],a=null==e?void 0:e.split(",").map((e=>e.trim().toLowerCase()));return(null==a?void 0:a.length)&&a.forEach((e=>{e.startsWith(".")?l.push(e):e.includes("/*")?o.push(e.replace("/*","")):t.push(e)})),{mimeTypes:t,extensions:l,wildcards:o}}(t);return Array.from(e).filter((e=>{var t;const n=e.type.toLowerCase(),r=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,i=l.includes(n),u=a.some((e=>n.startsWith(`${e}/`))),d=o.some((e=>r===e.toLowerCase()));return i||u||d}))}(e,n.accept);if(!n.multiple)return Array.isArray(C.value)?void(C.value=t):void(C.value=t[0]);let l=[];l=!Array.isArray(C.value)&&C.value?[C.value]:C.value&&Array.isArray(C.value)?[...C.value]:l;for(const o of t){if(O.value&&l.length>=O.value)break;l.push(o)}C.value=l,q.value=l.length-1}function z(){P.value&&(N.value||P.value.click())}const q=e.ref(0),K=["image/jpeg","image/png"],Y=e.computed((()=>{if(0===$.value.length)return;if(!$.value[q.value])return;if($.value[q.value]instanceof File){const e=$.value[q.value];if(!K.includes(e.type))return;return URL.createObjectURL(e)}const e=$.value[q.value];return e.thumbnailUrl?e.thumbnailUrl:K.includes(e.type)?e.url:void 0}));function de(e,t){if(!e)return;if(0===e)return"0 Bytes";const l=Math.floor(Math.log(e)/Math.log(1024));return`${Number.parseFloat((e/1024**l).toFixed(2))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][l]}`}e.watch(Y,((e,t)=>{t&&URL.revokeObjectURL(t)})),e.onBeforeUnmount((()=>{Y.value&&URL.revokeObjectURL(Y.value)}));const se=e.computed((()=>0===$.value.length||_.value?n.labelAdd:n.labelReplace)),ce=e.computed((()=>0===$.value.length||_.value?n.iconAdd:n.iconReplace));function ve({newIndex:e}){null!==e&&(q.value=e)}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(B))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(g)},e.toDisplayString(t.label),9,Q)):e.createCommentVNode("v-if",!0),x.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vv-input-file__drop-area",onDragenter:e.withModifiers(j,["prevent","stop"]),onDragleave:e.withModifiers(E,["prevent","stop"]),onDrop:e.withModifiers(D,["prevent","stop"]),onDragover:o[0]||(o[0]=e.withModifiers((()=>{}),["prevent","stop"])),onClick:e.withModifiers(z,["stop"])},[e.renderSlot(t.$slots,"drop-area",{},(()=>[e.createElementVNode("picture",X,[Y.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:Y.value,alt:$.value[q.value].name},null,8,ee)):e.createCommentVNode("v-if",!0)]),e.unref(c)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(Z,{key:0,modifiers:"action",label:Y.value?void 0:se.value,title:Y.value?se.value:void 0,disabled:e.unref(v),class:e.normalizeClass({"vv-input-file__drop-area-action":Y.value}),icon:ce.value,onClick:e.withModifiers(z,["stop"])},null,8,["label","title","disabled","class","icon"]))]))],32)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",te,[e.unref(h)?(e.openBlock(),e.createBlock(H,e.normalizeProps(e.mergeProps({key:0},e.unref(h))),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",{id:e.unref(g),ref_key:"inputEl",ref:P,type:"file",readonly:e.unref(c),disabled:e.unref(v),required:t.required,placeholder:t.placeholder,"aria-describedby":e.unref(w)?b.value:void 0,"aria-invalid":t.invalid,"aria-errormessage":e.unref(V)?b.value:void 0,multiple:_.value,accept:t.accept,capture:t.capture,name:t.name,onChange:F},null,40,le),y.value?(e.openBlock(),e.createElementBlock("progress",{key:1,class:"vv-input-file__progress",value:t.progress,max:"100"},e.toDisplayString(t.progress)+"% ",9,oe)):e.createCommentVNode("v-if",!0),e.unref(k)?(e.openBlock(),e.createBlock(H,e.normalizeProps(e.mergeProps({key:2},e.unref(k))),null,16)):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(l),{modelValue:$.value,"onUpdate:modelValue":o[1]||(o[1]=e=>$.value=e),tag:"ul",class:"vv-input-file__list","item-key":"name",move:()=>t.sortable,onEnd:ve},{item:e.withCtx((({element:l,index:o})=>[e.createElementVNode("li",{class:e.normalizeClass(["vv-input-file__item",{active:o===q.value&&x.value&&$.value.length>1,"cursor-move":t.sortable}]),onClick:e.withModifiers((e=>function(e){q.value=e}(o)),["stop"])},[e.unref(S)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vv-input-file__item-action",title:t.labelDownload,onClick:e.withModifiers((e=>function(e){r("download",e);const t=e instanceof File?URL.createObjectURL(e):e.url;if(!t)return;const l=document.createElement("a");l.href=t,l.setAttribute("download",e.name),document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(l.href)}(l)),["stop"])},[e.createVNode(H,e.normalizeProps(e.guardReactiveProps(e.unref(S))),null,16)],8,ne)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",re,e.toDisplayString(l.name),1),e.createElementVNode("small",ie,e.toDisplayString(de(l.size)),1),e.unref(c)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:t.labelRemove,disabled:e.unref(v),onClick:e.withModifiers((e=>function(e){const t=Array.isArray(C.value)?C.value[e]:C.value;if(!t)return;if(r("remove",t),!Array.isArray(C.value))return void(C.value=void 0);q.value===e&&(q.value=0);const l=[...C.value];l.splice(e,1),C.value=l}(o)),["stop"])},null,8,ue))],10,ae)])),_:1},8,["modelValue","move"]),e.createVNode(e.unref(L),{id:b.value,class:"vv-input-file__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
@@ -292,31 +292,35 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
292
292
  iconDownload: string | import("../VvIcon").VvIconProps;
293
293
  labelRemove: string;
294
294
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
295
- 'drop-area'?: ((props: {}) => any) | undefined;
296
- hint?: ((props: {
295
+ 'drop-area'?: (props: {}) => any;
296
+ } & {
297
+ hint?: (props: {
297
298
  modelValue: unknown;
298
299
  valid: boolean;
299
300
  invalid: boolean;
300
301
  loading: boolean;
301
- }) => any) | undefined;
302
- loading?: ((props: {
302
+ }) => any;
303
+ } & {
304
+ loading?: (props: {
303
305
  modelValue: unknown;
304
306
  valid: boolean;
305
307
  invalid: boolean;
306
308
  loading: boolean;
307
- }) => any) | undefined;
308
- valid?: ((props: {
309
+ }) => any;
310
+ } & {
311
+ valid?: (props: {
309
312
  modelValue: unknown;
310
313
  valid: boolean;
311
314
  invalid: boolean;
312
315
  loading: boolean;
313
- }) => any) | undefined;
314
- invalid?: ((props: {
316
+ }) => any;
317
+ } & {
318
+ invalid?: (props: {
315
319
  modelValue: unknown;
316
320
  valid: boolean;
317
321
  invalid: boolean;
318
322
  loading: boolean;
319
- }) => any) | undefined;
323
+ }) => any;
320
324
  }>;
321
325
  export default _default;
322
326
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
- import type { UploadedFile } from '@/types';
2
1
  import type { VvIconProps } from '../VvIcon';
2
+ import type { UploadedFile } from '@/types';
3
3
  export type VvInputFileEvents = {
4
4
  'remove': [
5
5
  File | UploadedFile
@@ -89,7 +89,7 @@ export declare const VvInputFileProps: {
89
89
  };
90
90
  /**
91
91
  * VvIcon name for add button
92
- * @see VVIcon
92
+ * @see VvIcon
93
93
  */
94
94
  iconAdd: {
95
95
  type: PropType<string | VvIconProps>;
@@ -104,7 +104,7 @@ export declare const VvInputFileProps: {
104
104
  };
105
105
  /**
106
106
  * VvIcon name for replace button
107
- * @see VVIcon
107
+ * @see VvIcon
108
108
  */
109
109
  iconReplace: {
110
110
  type: PropType<string | VvIconProps>;
@@ -119,7 +119,7 @@ export declare const VvInputFileProps: {
119
119
  };
120
120
  /**
121
121
  * VvIcon name for download button
122
- * @see VVIcon
122
+ * @see VvIcon
123
123
  */
124
124
  iconDownload: {
125
125
  type: PropType<string | VvIconProps>;
@@ -3,7 +3,7 @@ import { useIMask } from "vue-imask";
3
3
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
4
4
  import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useStorage, useElementVisibility } from "@vueuse/core";
5
5
  import mitt from "mitt";
6
- import { iconExists, Icon, addIcon } from "@iconify/vue";
6
+ import { iconLoaded, Icon, addIcon } from "@iconify/vue";
7
7
  const padTwoDigits = (num) => num.toString().padStart(2, "0");
8
8
  function isDateIsoString(dateString) {
9
9
  if (typeof dateString !== "string") {
@@ -390,7 +390,7 @@ const DebounceProps = {
390
390
  const IconProps = {
391
391
  /**
392
392
  * VvIcon name or props
393
- * @see VVIcon
393
+ * @see VvIcon
394
394
  */
395
395
  icon: {
396
396
  type: [String, Object],
@@ -1341,13 +1341,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1341
1341
  const icon = computed(() => {
1342
1342
  const name = props.name ?? "";
1343
1343
  const iconName = `@${provider.value}:${props.prefix}:${name}`;
1344
- if (iconExists(iconName)) {
1344
+ if (iconLoaded(iconName)) {
1345
1345
  return iconName;
1346
1346
  }
1347
1347
  const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
1348
1348
  (iconsCollection2) => {
1349
1349
  const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
1350
- return iconExists(icon2);
1350
+ return iconLoaded(icon2);
1351
1351
  }
1352
1352
  );
1353
1353
  if (iconsCollection) {
@@ -1379,7 +1379,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1379
1379
  }
1380
1380
  }
1381
1381
  if (volver) {
1382
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
1382
+ if (props.src && !iconLoaded(`@${provider.value}:${props.prefix}:${props.name}`)) {
1383
1383
  show.value = false;
1384
1384
  volver.fetchIcon(props.src).then((svg) => {
1385
1385
  if (svg) {
@@ -1407,9 +1407,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1407
1407
  flip: _ctx.flip,
1408
1408
  rotate: unref(hasRotate),
1409
1409
  color: _ctx.color,
1410
- onLoad: _ctx.onLoad,
1411
1410
  icon: unref(icon)
1412
- }), null, 16, ["class"])) : createCommentVNode("v-if", true);
1411
+ }, { onLoad: _ctx.onLoad }), null, 16, ["class", "onLoad"])) : createCommentVNode("v-if", true);
1413
1412
  };
1414
1413
  }
1415
1414
  });
@@ -1439,6 +1438,8 @@ const VvInputTextEvents = [
1439
1438
  "complete:typed",
1440
1439
  "complete:masked",
1441
1440
  "complete:unmasked",
1441
+ "suggestion:selected",
1442
+ "suggestion:removed",
1442
1443
  "focus",
1443
1444
  "blur",
1444
1445
  "keyup",
@@ -1495,7 +1496,7 @@ const VvInputTextProps = {
1495
1496
  multiple: Boolean,
1496
1497
  /**
1497
1498
  * VvIcon name for show password button
1498
- * @see VVIcon
1499
+ * @see VvIcon
1499
1500
  */
1500
1501
  iconShowPassword: {
1501
1502
  type: [String, Object],
@@ -1503,7 +1504,7 @@ const VvInputTextProps = {
1503
1504
  },
1504
1505
  /**
1505
1506
  * VvIcon name for hide password button
1506
- * @see VVIcon
1507
+ * @see VvIcon
1507
1508
  */
1508
1509
  iconHidePassword: {
1509
1510
  type: [String, Object],
@@ -1511,7 +1512,7 @@ const VvInputTextProps = {
1511
1512
  },
1512
1513
  /**
1513
1514
  * VvIcon name for clear button
1514
- * @see VVIcon
1515
+ * @see VvIcon
1515
1516
  */
1516
1517
  iconClear: {
1517
1518
  type: [String, Object],
@@ -1519,7 +1520,7 @@ const VvInputTextProps = {
1519
1520
  },
1520
1521
  /**
1521
1522
  * VvIcon name for remove suggestion button
1522
- * @see VVIcon
1523
+ * @see VvIcon
1523
1524
  */
1524
1525
  iconRemoveSuggestion: {
1525
1526
  type: [String, Object],
@@ -1615,6 +1616,14 @@ const VvInputTextProps = {
1615
1616
  maxSuggestions: {
1616
1617
  type: Number,
1617
1618
  default: 5
1619
+ },
1620
+ /**
1621
+ * The input mode to use for the input
1622
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
1623
+ */
1624
+ inputMode: {
1625
+ type: String,
1626
+ default: "text"
1618
1627
  }
1619
1628
  };
1620
1629
  function useComponentIcon(icon, iconPosition) {
@@ -1657,6 +1666,10 @@ const VvInputClearAction = defineComponent({
1657
1666
  VvIcon: _sfc_main$1
1658
1667
  },
1659
1668
  props: {
1669
+ inputType: {
1670
+ type: String,
1671
+ default: "input-text"
1672
+ },
1660
1673
  disabled: {
1661
1674
  type: Boolean,
1662
1675
  default: false
@@ -1687,13 +1700,13 @@ const VvInputClearAction = defineComponent({
1687
1700
  render() {
1688
1701
  const icon = this.hasIcon ? h(_sfc_main$1, {
1689
1702
  ...this.hasIcon,
1690
- class: "vv-input-text__icon"
1703
+ class: `vv-${this.inputType}__icon`
1691
1704
  }) : void 0;
1692
1705
  return h(
1693
1706
  "button",
1694
1707
  {
1695
1708
  disabled: this.disabled,
1696
- class: "vv-input-text__action",
1709
+ class: `vv-${this.inputType}__action`,
1697
1710
  ariaLabel: this.label,
1698
1711
  type: "button",
1699
1712
  onClick: this.onClick
@@ -1707,6 +1720,10 @@ const VvInputPasswordAction = defineComponent({
1707
1720
  VvIcon: _sfc_main$1
1708
1721
  },
1709
1722
  props: {
1723
+ inputType: {
1724
+ type: String,
1725
+ default: "input-text"
1726
+ },
1710
1727
  disabled: {
1711
1728
  type: Boolean,
1712
1729
  default: false
@@ -1752,13 +1769,13 @@ const VvInputPasswordAction = defineComponent({
1752
1769
  render() {
1753
1770
  const icon = this.hasIcon ? h(_sfc_main$1, {
1754
1771
  ...this.hasIcon,
1755
- class: "vv-input-text__icon"
1772
+ class: `vv-${this.inputType}__icon`
1756
1773
  }) : void 0;
1757
1774
  return h(
1758
1775
  "button",
1759
1776
  {
1760
1777
  disabled: this.disabled,
1761
- class: "vv-input-text__action",
1778
+ class: `vv-${this.inputType}__action`,
1762
1779
  ariaLabel: this.active ? this.labelHide : this.labelShow,
1763
1780
  type: "button",
1764
1781
  onClick: this.onClick
@@ -1772,6 +1789,10 @@ const VvInputStepAction = defineComponent({
1772
1789
  VvIcon: _sfc_main$1
1773
1790
  },
1774
1791
  props: {
1792
+ inputType: {
1793
+ type: String,
1794
+ default: "input-text"
1795
+ },
1775
1796
  disabled: {
1776
1797
  type: Boolean,
1777
1798
  default: false
@@ -1802,8 +1823,9 @@ const VvInputStepAction = defineComponent({
1802
1823
  render() {
1803
1824
  return h("button", {
1804
1825
  class: [
1805
- "vv-input-text__action vv-input-text__action-chevron",
1806
- this.isUp && "vv-input-text__action-chevron-up"
1826
+ `vv-${this.inputType}__action`,
1827
+ `vv-${this.inputType}__action-chevron`,
1828
+ this.isUp ? `vv-${this.inputType}__action-chevron-up` : void 0
1807
1829
  ],
1808
1830
  disabled: this.disabled,
1809
1831
  ariaLabel: this.label,
@@ -2428,10 +2450,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2428
2450
  var _a;
2429
2451
  localModelValue.value = suggestion;
2430
2452
  (_a = suggestionsDropdownEl.value) == null ? void 0 : _a.hide();
2453
+ emit("suggestion:selected", suggestion);
2431
2454
  }
2432
2455
  function onSuggestionRemove(suggestion) {
2433
2456
  var _a;
2434
2457
  (_a = suggestions.value) == null ? void 0 : _a.delete(suggestion);
2458
+ emit("suggestion:removed", suggestion);
2435
2459
  }
2436
2460
  const { modifiers } = toRefs(props);
2437
2461
  const bemCssClasses = useModifiers(
@@ -2475,7 +2499,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2475
2499
  "autocomplete": props.autocomplete,
2476
2500
  "aria-invalid": isInvalid.value,
2477
2501
  "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
2478
- "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
2502
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0,
2503
+ "inputMode": props.inputMode
2479
2504
  };
2480
2505
  if (type2 === INPUT_TYPES.DATE || type2 === INPUT_TYPES.MONTH || type2 === INPUT_TYPES.WEEK || type2 === INPUT_TYPES.TIME || type2 === INPUT_TYPES.DATETIME_LOCAL || type2 === INPUT_TYPES.NUMBER) {
2481
2506
  let max = props.max;