@vc-shell/framework 2.5.0 → 2.6.0-pr371.c384bbc

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 (269) hide show
  1. package/dist/ai-agent/index.js +3 -3
  2. package/dist/charts/index.d.ts.map +1 -1
  3. package/dist/chunks/ExtensionPoint.vue_vue_type_style_index_0_lang-B1R06zHa.js.map +1 -1
  4. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js +1372 -0
  5. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js.map +1 -0
  6. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js} +76 -70
  7. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js.map → VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js.map} +1 -1
  8. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-CS_aEQ84.js +20687 -0
  9. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-CS_aEQ84.js.map +1 -0
  10. package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-Cjmi5lAM.js +4864 -0
  11. package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-Cjmi5lAM.js.map +1 -0
  12. package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-CYq_EvRc.js} +271 -258
  13. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-CYq_EvRc.js.map +1 -0
  14. package/dist/chunks/index-BuTo_Lx8.js.map +1 -1
  15. package/dist/chunks/{index-B7RhGTNx.js → index-DLsURdJp.js} +2 -2
  16. package/dist/chunks/index-DLsURdJp.js.map +1 -0
  17. package/dist/chunks/{vendor-vueuse-components-CoR2FSn3.js → vendor-vueuse-components-B3XvEasa.js} +1 -1
  18. package/dist/chunks/{vendor-vueuse-components-CoR2FSn3.js.map → vendor-vueuse-components-B3XvEasa.js.map} +1 -1
  19. package/dist/chunks/{vendor-vueuse-core-BFa9je5E.js → vendor-vueuse-core-_wFDcFkI.js} +1 -1
  20. package/dist/chunks/{vendor-vueuse-core-BFa9je5E.js.map → vendor-vueuse-core-_wFDcFkI.js.map} +1 -1
  21. package/dist/chunks/{vendor-vueuse-shared-kZH3-Km1.js → vendor-vueuse-shared-CiuC98Kk.js} +28 -44
  22. package/dist/chunks/{vendor-vueuse-shared-kZH3-Km1.js.map → vendor-vueuse-shared-CiuC98Kk.js.map} +1 -1
  23. package/dist/core/blade-navigation/singletons.d.ts +3 -5
  24. package/dist/core/blade-navigation/singletons.d.ts.map +1 -1
  25. package/dist/core/blade-navigation/table-query-state/createBladeQueryState.d.ts.map +1 -1
  26. package/dist/core/blade-navigation/table-query-state/useTableQueryState.d.ts +2 -3
  27. package/dist/core/blade-navigation/table-query-state/useTableQueryState.d.ts.map +1 -1
  28. package/dist/core/blade-navigation/types/index.d.ts +24 -5
  29. package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
  30. package/dist/core/blade-navigation/utils/bladeRouterGuard.d.ts +6 -14
  31. package/dist/core/blade-navigation/utils/bladeRouterGuard.d.ts.map +1 -1
  32. package/dist/core/blade-navigation/utils/navigateToMainRoute.d.ts +9 -2
  33. package/dist/core/blade-navigation/utils/navigateToMainRoute.d.ts.map +1 -1
  34. package/dist/core/blade-navigation/utils/restoreFromUrl.d.ts.map +1 -1
  35. package/dist/core/blade-navigation/utils/urlSync.d.ts +27 -2
  36. package/dist/core/blade-navigation/utils/urlSync.d.ts.map +1 -1
  37. package/dist/core/composables/index.d.ts +0 -1
  38. package/dist/core/composables/index.d.ts.map +1 -1
  39. package/dist/core/composables/useAssets/index.d.ts.map +1 -1
  40. package/dist/core/composables/useAssetsManager/index.d.ts.map +1 -1
  41. package/dist/core/composables/useAssetsManager/uploadAssets.d.ts +33 -0
  42. package/dist/core/composables/useAssetsManager/uploadAssets.d.ts.map +1 -0
  43. package/dist/core/composables/useAsync/index.d.ts +3 -4
  44. package/dist/core/composables/useAsync/index.d.ts.map +1 -1
  45. package/dist/core/composables/useBlade/index.d.ts.map +1 -1
  46. package/dist/core/composables/useBladeForm/index.d.ts +5 -9
  47. package/dist/core/composables/useBladeForm/index.d.ts.map +1 -1
  48. package/dist/core/composables/useBladeNavigationAdapter/index.d.ts.map +1 -1
  49. package/dist/core/composables/useDynamicProperties/resolveControlKind.d.ts +12 -0
  50. package/dist/core/composables/useDynamicProperties/resolveControlKind.d.ts.map +1 -0
  51. package/dist/core/composables/useKeyboardNavigation/index.d.ts.map +1 -1
  52. package/dist/core/composables/useLatestRequest/index.d.ts +25 -18
  53. package/dist/core/composables/useLatestRequest/index.d.ts.map +1 -1
  54. package/dist/core/composables/useModificationTracker/index.d.ts +11 -0
  55. package/dist/core/composables/useModificationTracker/index.d.ts.map +1 -1
  56. package/dist/core/composables/usePlatformLocaleSync/index.d.ts +5 -13
  57. package/dist/core/composables/usePlatformLocaleSync/index.d.ts.map +1 -1
  58. package/dist/core/composables/usePopup/index.d.ts +3 -4
  59. package/dist/core/composables/usePopup/index.d.ts.map +1 -1
  60. package/dist/core/composables/usePopup/types.d.ts +9 -12
  61. package/dist/core/composables/usePopup/types.d.ts.map +1 -1
  62. package/dist/core/composables/useSidebarState/_internal.d.ts +37 -0
  63. package/dist/core/composables/useSidebarState/_internal.d.ts.map +1 -0
  64. package/dist/core/composables/useSidebarState/index.d.ts +4 -27
  65. package/dist/core/composables/useSidebarState/index.d.ts.map +1 -1
  66. package/dist/core/composables/useSlowNetworkDetection/index.d.ts.map +1 -1
  67. package/dist/core/composables/useToolbar/index.d.ts +7 -0
  68. package/dist/core/composables/useToolbar/index.d.ts.map +1 -1
  69. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  70. package/dist/core/interceptors/index.d.ts.map +1 -1
  71. package/dist/core/notifications/composables/useBladeNotifications.d.ts +3 -7
  72. package/dist/core/notifications/composables/useBladeNotifications.d.ts.map +1 -1
  73. package/dist/core/notifications/composables/useNotificationStore.d.ts +3 -6
  74. package/dist/core/notifications/composables/useNotificationStore.d.ts.map +1 -1
  75. package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts.map +1 -1
  76. package/dist/core/plugins/ai-agent/types.d.ts +8 -14
  77. package/dist/core/plugins/ai-agent/types.d.ts.map +1 -1
  78. package/dist/core/plugins/extension-points/store.d.ts +3 -5
  79. package/dist/core/plugins/extension-points/store.d.ts.map +1 -1
  80. package/dist/core/plugins/signalR/index.d.ts.map +1 -1
  81. package/dist/core/services/index.d.ts +0 -1
  82. package/dist/core/services/index.d.ts.map +1 -1
  83. package/dist/core/services/menu-service.d.ts +3 -5
  84. package/dist/core/services/menu-service.d.ts.map +1 -1
  85. package/dist/core/types/index.d.ts +3 -5
  86. package/dist/core/types/index.d.ts.map +1 -1
  87. package/dist/core/types/menu-types.d.ts +2 -3
  88. package/dist/core/types/menu-types.d.ts.map +1 -1
  89. package/dist/core/utilities/backendRegistry.d.ts +3 -5
  90. package/dist/core/utilities/backendRegistry.d.ts.map +1 -1
  91. package/dist/core/utilities/buildInfo.d.ts +4 -6
  92. package/dist/core/utilities/buildInfo.d.ts.map +1 -1
  93. package/dist/core/utilities/error.d.ts.map +1 -1
  94. package/dist/core/utilities/focus.d.ts +7 -21
  95. package/dist/core/utilities/focus.d.ts.map +1 -1
  96. package/dist/core/utilities/pendingErrorNotifications.d.ts +5 -8
  97. package/dist/core/utilities/pendingErrorNotifications.d.ts.map +1 -1
  98. package/dist/core/utilities/sessionExpiration.d.ts +15 -21
  99. package/dist/core/utilities/sessionExpiration.d.ts.map +1 -1
  100. package/dist/dashboard/index.d.ts.map +1 -1
  101. package/dist/dashboard/index.js +1 -1
  102. package/dist/framework.js +1726 -1720
  103. package/dist/framework.js.map +1 -1
  104. package/dist/index.css +1 -1
  105. package/dist/injection-keys.d.ts.map +1 -1
  106. package/dist/locales/de.js +6 -1
  107. package/dist/locales/en.js +6 -1
  108. package/dist/locales/en.json +6 -1
  109. package/dist/locales/types.d.ts +5 -0
  110. package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/focus-target.d.ts +6 -7
  111. package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/focus-target.d.ts.map +1 -1
  112. package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/vc-blade-navigation-new.vue.d.ts.map +1 -1
  113. package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts +1 -0
  114. package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
  115. package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts +5 -10
  116. package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts.map +1 -1
  117. package/dist/shell/_internal/notifications/components/notification-container/computeToastOffsets.d.ts +3 -4
  118. package/dist/shell/_internal/notifications/components/notification-container/computeToastOffsets.d.ts.map +1 -1
  119. package/dist/shell/_internal/notifications/components/notification-container/index.d.ts +2 -2
  120. package/dist/shell/_internal/popup/components/vc-popup-container/PopupInstanceProvider.vue.d.ts +3 -4
  121. package/dist/shell/_internal/popup/components/vc-popup-container/PopupInstanceProvider.vue.d.ts.map +1 -1
  122. package/dist/shell/_internal/popup/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
  123. package/dist/shell/components/notification-template/notification-template.vue.d.ts.map +1 -1
  124. package/dist/shell/components/user-dropdown-button/_internal/user-info.vue.d.ts.map +1 -1
  125. package/dist/shell/dashboard/dashboard-widget-card/dashboard-stat-item.vue.d.ts.map +1 -1
  126. package/dist/shell/dashboard/draggable-dashboard/DraggableDashboard.vue.d.ts +5 -2
  127. package/dist/shell/dashboard/draggable-dashboard/DraggableDashboard.vue.d.ts.map +1 -1
  128. package/dist/shell/dashboard/draggable-dashboard/GridstackDashboard.vue.d.ts.map +1 -1
  129. package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts +2 -0
  130. package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts.map +1 -1
  131. package/dist/shell/dashboard/draggable-dashboard/types.d.ts +3 -6
  132. package/dist/shell/dashboard/draggable-dashboard/types.d.ts.map +1 -1
  133. package/dist/test-helpers.d.ts.map +1 -1
  134. package/dist/test-mock-factories.d.ts.map +1 -1
  135. package/dist/tsconfig.tsbuildinfo +1 -1
  136. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
  137. package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts.map +1 -1
  138. package/dist/ui/components/atoms/vc-environment-banner/vc-environment-banner.vue.d.ts.map +1 -1
  139. package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
  140. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +6 -8
  141. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
  142. package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +4 -6
  143. package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
  144. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts +2 -0
  145. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts.map +1 -1
  146. package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts +7 -0
  147. package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts.map +1 -1
  148. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  149. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +8 -2
  150. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  151. package/dist/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue.d.ts +4 -0
  152. package/dist/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue.d.ts.map +1 -1
  153. package/dist/ui/components/molecules/vc-multivalue/composables/useMultivalueInput.d.ts +3 -6
  154. package/dist/ui/components/molecules/vc-multivalue/composables/useMultivalueInput.d.ts.map +1 -1
  155. package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts +7 -0
  156. package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts.map +1 -1
  157. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -0
  158. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
  159. package/dist/ui/components/molecules/vc-select/composables/useSelectDataSource.d.ts.map +1 -1
  160. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +2 -0
  161. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
  162. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubPopover.vue.d.ts +2 -0
  163. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubPopover.vue.d.ts.map +1 -1
  164. package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts +3 -5
  165. package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts.map +1 -1
  166. package/dist/ui/components/organisms/vc-app/_internal/menu/VcAppMenu.vue.d.ts.map +1 -1
  167. package/dist/ui/components/organisms/vc-auth-layout/vc-auth-layout.vue.d.ts.map +1 -1
  168. package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts.map +1 -1
  169. package/dist/ui/components/organisms/vc-blade/_internal/composables/useToolbarRegistration.d.ts +4 -5
  170. package/dist/ui/components/organisms/vc-blade/_internal/composables/useToolbarRegistration.d.ts.map +1 -1
  171. package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarBaseButton.vue.d.ts.map +1 -1
  172. package/dist/ui/components/organisms/vc-blade/utils.d.ts +2 -5
  173. package/dist/ui/components/organisms/vc-blade/utils.d.ts.map +1 -1
  174. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  175. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts +3 -3
  176. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
  177. package/dist/ui/components/organisms/vc-data-table/VcTableAdapter.vue.d.ts.map +1 -1
  178. package/dist/ui/components/organisms/vc-data-table/components/ColumnFilter.vue.d.ts.map +1 -1
  179. package/dist/ui/components/organisms/vc-data-table/components/DataTableBody.vue.d.ts +3 -4
  180. package/dist/ui/components/organisms/vc-data-table/components/DataTableBody.vue.d.ts.map +1 -1
  181. package/dist/ui/components/organisms/vc-data-table/components/DataTableCellRenderer.vue.d.ts.map +1 -1
  182. package/dist/ui/components/organisms/vc-data-table/components/DataTableHeader.vue.d.ts.map +1 -1
  183. package/dist/ui/components/organisms/vc-data-table/components/DataTableRow.vue.d.ts.map +1 -1
  184. package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts.map +1 -1
  185. package/dist/ui/components/organisms/vc-data-table/components/HeaderTitle.vue.d.ts.map +1 -1
  186. package/dist/ui/components/organisms/vc-data-table/components/Table.vue.d.ts.map +1 -1
  187. package/dist/ui/components/organisms/vc-data-table/components/TableHead.vue.d.ts.map +1 -1
  188. package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts +5 -4
  189. package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts.map +1 -1
  190. package/dist/ui/components/organisms/vc-data-table/components/_internal/SlotProxy.d.ts +3 -4
  191. package/dist/ui/components/organisms/vc-data-table/components/_internal/SlotProxy.d.ts.map +1 -1
  192. package/dist/ui/components/organisms/vc-data-table/components/cells/CellDateAgo.vue.d.ts.map +1 -1
  193. package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts +30 -6
  194. package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts.map +1 -1
  195. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileCard.vue.d.ts.map +1 -1
  196. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileView.vue.d.ts.map +1 -1
  197. package/dist/ui/components/organisms/vc-data-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -1
  198. package/dist/ui/components/organisms/vc-data-table/composables/builtinCells.d.ts +11 -0
  199. package/dist/ui/components/organisms/vc-data-table/composables/builtinCells.d.ts.map +1 -0
  200. package/dist/ui/components/organisms/vc-data-table/composables/createTableSelectionFacade.d.ts +3 -5
  201. package/dist/ui/components/organisms/vc-data-table/composables/createTableSelectionFacade.d.ts.map +1 -1
  202. package/dist/ui/components/organisms/vc-data-table/composables/useCellRegistry.d.ts +10 -4
  203. package/dist/ui/components/organisms/vc-data-table/composables/useCellRegistry.d.ts.map +1 -1
  204. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts +4 -11
  205. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -1
  206. package/dist/ui/components/organisms/vc-data-table/composables/useMobileCardLayout.d.ts.map +1 -1
  207. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts +2 -5
  208. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts.map +1 -1
  209. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsReorder.d.ts +4 -6
  210. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsReorder.d.ts.map +1 -1
  211. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts +3 -6
  212. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts.map +1 -1
  213. package/dist/ui/components/organisms/vc-data-table/composables/useTableEditing.d.ts +2 -10
  214. package/dist/ui/components/organisms/vc-data-table/composables/useTableEditing.d.ts.map +1 -1
  215. package/dist/ui/components/organisms/vc-data-table/composables/useTableInlineEdit.d.ts.map +1 -1
  216. package/dist/ui/components/organisms/vc-data-table/composables/useTableRowReorder.d.ts +5 -11
  217. package/dist/ui/components/organisms/vc-data-table/composables/useTableRowReorder.d.ts.map +1 -1
  218. package/dist/ui/components/organisms/vc-data-table/composables/useTableSelectionV2.d.ts +3 -11
  219. package/dist/ui/components/organisms/vc-data-table/composables/useTableSelectionV2.d.ts.map +1 -1
  220. package/dist/ui/components/organisms/vc-data-table/composables/useTableSort.d.ts.map +1 -1
  221. package/dist/ui/components/organisms/vc-data-table/index.d.ts +2 -0
  222. package/dist/ui/components/organisms/vc-data-table/index.d.ts.map +1 -1
  223. package/dist/ui/components/organisms/vc-data-table/keys.d.ts +0 -10
  224. package/dist/ui/components/organisms/vc-data-table/keys.d.ts.map +1 -1
  225. package/dist/ui/components/organisms/vc-data-table/types.d.ts +20 -16
  226. package/dist/ui/components/organisms/vc-data-table/types.d.ts.map +1 -1
  227. package/dist/ui/components/organisms/vc-data-table/utils/ColumnCollector.d.ts +3 -6
  228. package/dist/ui/components/organisms/vc-data-table/utils/ColumnCollector.d.ts.map +1 -1
  229. package/dist/ui/components/organisms/vc-data-table/utils/columnHelpers.d.ts +3 -4
  230. package/dist/ui/components/organisms/vc-data-table/utils/columnHelpers.d.ts.map +1 -1
  231. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +9 -0
  232. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
  233. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  234. package/dist/ui/components/organisms/vc-scheduler/VcScheduler.vue.d.ts +1 -1
  235. package/dist/ui/components/organisms/vc-scheduler/VcScheduler.vue.d.ts.map +1 -1
  236. package/dist/ui/components/organisms/vc-scheduler/_internal/editor/SchedulerEventEditor.vue.d.ts.map +1 -1
  237. package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthEventPopover.vue.d.ts +2 -2
  238. package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthEventPopover.vue.d.ts.map +1 -1
  239. package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthMorePopover.vue.d.ts.map +1 -1
  240. package/dist/ui/components/organisms/vc-scheduler/_internal/quick-create/QuickCreatePopover.vue.d.ts.map +1 -1
  241. package/dist/ui/components/organisms/vc-scheduler/composables/useAnchoredPanelFocus.d.ts +20 -0
  242. package/dist/ui/components/organisms/vc-scheduler/composables/useAnchoredPanelFocus.d.ts.map +1 -0
  243. package/dist/ui/components/organisms/vc-scheduler/composables/useEventColor.d.ts +5 -7
  244. package/dist/ui/components/organisms/vc-scheduler/composables/useEventColor.d.ts.map +1 -1
  245. package/dist/ui/components/organisms/vc-scheduler/composables/useEventInteraction.d.ts +7 -12
  246. package/dist/ui/components/organisms/vc-scheduler/composables/useEventInteraction.d.ts.map +1 -1
  247. package/dist/ui/components/organisms/vc-scheduler/composables/useRecurrence.d.ts +6 -7
  248. package/dist/ui/components/organisms/vc-scheduler/composables/useRecurrence.d.ts.map +1 -1
  249. package/dist/ui/composables/useDataTablePagination.d.ts +4 -8
  250. package/dist/ui/composables/useDataTablePagination.d.ts.map +1 -1
  251. package/dist/ui/index.js +153 -150
  252. package/globals-augments.d.ts +3 -5
  253. package/globals.d.ts +5 -12
  254. package/package.json +4 -4
  255. package/shims-vue.d.ts +3 -5
  256. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js +0 -1402
  257. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js.map +0 -1
  258. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js +0 -21212
  259. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js.map +0 -1
  260. package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js +0 -4125
  261. package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js.map +0 -1
  262. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js.map +0 -1
  263. package/dist/chunks/index-B7RhGTNx.js.map +0 -1
  264. package/dist/core/composables/useMenuExpanded/index.d.ts +0 -9
  265. package/dist/core/composables/useMenuExpanded/index.d.ts.map +0 -1
  266. package/dist/core/services/global-search-service/index.d.ts +0 -10
  267. package/dist/core/services/global-search-service/index.d.ts.map +0 -1
  268. package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts +0 -16
  269. package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts.map +0 -1
@@ -0,0 +1,4864 @@
1
+ import { mergeProps as ee, computed as $, toValue as be, inject as Y, useId as an, ref as I, onBeforeUnmount as rt, reactive as Ze, provide as Et, getCurrentScope as ln, onScopeDispose as on, getCurrentInstance as We, onErrorCaptured as rn, nextTick as Se, defineComponent as z, watch as j, unref as r, openBlock as f, createElementBlock as y, normalizeClass as W, createBlock as P, createCommentVNode as w, renderSlot as T, createElementVNode as x, toDisplayString as A, Fragment as Le, renderList as st, normalizeStyle as Ve, resolveDynamicComponent as ut, withCtx as O, withKeys as X, withModifiers as G, createVNode as M, watchEffect as tt, shallowReactive as nt, markRaw as at, createSlots as oe, createTextVNode as Z, Transition as Pe, withDirectives as ct, vModelText as sn, useAttrs as Lt, vModelDynamic as un, onMounted as je, onUnmounted as Bt, Teleport as cn, normalizeProps as Ae, guardReactiveProps as Ne } from "vue";
2
+ import { c as ge, ai as dn, O as fn, v as vn, r as gn, o as mn, I as pn, q as bn, p as yn, B as Ct, b as hn, i as kn, _ as U, T as xt, a as Tt, V as In, w as Sn, u as $n } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js";
3
+ import { defineRule as Be, Field as wn } from "vee-validate";
4
+ import { a as kt } from "./vendor-vee-validate-rules-4oWUZPpG.js";
5
+ import { a as Rt, s as On, c as En, b as Qe, e as De } from "./vendor-lodash-es-D2n90GJy.js";
6
+ import { X as Ln } from "./vendor-microsoft-applicationinsights-core-js-CR3vyuZc.js";
7
+ import { d as Mt, e as Bn, f as Cn, g as xn } from "./vendor-vueuse-core-_wFDcFkI.js";
8
+ import { c as Tn, u as we } from "./vendor-vue-i18n-LO-EJStU.js";
9
+ import { j as Rn } from "./vendor-vueuse-shared-CiuC98Kk.js";
10
+ import { k as Mn } from "./vendor-tiptap-core-CZbeo7XQ.js";
11
+ import "./vendor-tiptap-extension-text-style-Bc6nvmn0.js";
12
+ import { q as An } from "./vendor-vuepic-vue-datepicker-D0bvbIbh.js";
13
+ import { C as Nn, u as Dn } from "./vendor-vue-currency-input-CckB4kjx.js";
14
+ import { u as Vn } from "./vendor-floating-ui-vue-sCrhit51.js";
15
+ import { f as At, s as Nt, o as lt, b as Pn } from "./vendor-floating-ui-dom-BvVXFZ4B.js";
16
+ import { v as Fn } from "./vendor-vueuse-components-B3XvEasa.js";
17
+ import { p as Dt } from "./vendor-dompurify-DpIUMBYC.js";
18
+ import { S as Ie, h as zn, T as qn } from "./vendor-date-fns-C-55OMpS.js";
19
+ import { t as Un } from "./vendor-truncate-html-ChA1T5zy.js";
20
+ const $e = Tn({
21
+ legacy: !1,
22
+ globalInjection: !0,
23
+ locale: "en",
24
+ fallbackLocale: "en",
25
+ formatFallbackMessages: !0
26
+ });
27
+ function ot() {
28
+ return Math.random().toString(36).substring(2, 9);
29
+ }
30
+ class ie extends Error {
31
+ constructor(t, n, a) {
32
+ super(t), this.code = n, this.context = a, this.name = "FrameworkError", Error.captureStackTrace && Error.captureStackTrace(this, ie);
33
+ }
34
+ toJSON() {
35
+ return {
36
+ name: this.name,
37
+ code: this.code,
38
+ message: this.message,
39
+ context: this.context,
40
+ stack: this.stack
41
+ };
42
+ }
43
+ }
44
+ class Pi extends ie {
45
+ constructor(t, n) {
46
+ super(t, "VALIDATION_ERROR", n), this.name = "ValidationError";
47
+ }
48
+ }
49
+ class Fi extends ie {
50
+ constructor(t, n) {
51
+ super(t, "SERVICE_ERROR", n), this.name = "ServiceError";
52
+ }
53
+ }
54
+ class Kn extends ie {
55
+ constructor(t, n) {
56
+ super(`${t} not provided. Make sure to call the corresponding 'provide' function.`, "INJECTION_ERROR", {
57
+ serviceName: t,
58
+ ...n
59
+ }), this.name = "InjectionError";
60
+ }
61
+ }
62
+ class zi extends ie {
63
+ constructor(t, n, a) {
64
+ super(`Failed to register '${t}': ${n}`, "REGISTRATION_ERROR", {
65
+ componentName: t,
66
+ ...a
67
+ }), this.name = "RegistrationError";
68
+ }
69
+ }
70
+ class qi extends ie {
71
+ constructor(t, n, a) {
72
+ super(t, "BLADE_ERROR", {
73
+ bladeId: n,
74
+ ...a
75
+ }), this.name = "BladeError";
76
+ }
77
+ }
78
+ class Ui extends ie {
79
+ constructor(t, n, a) {
80
+ super(`Failed to load module '${t}': ${n}`, "MODULE_LOAD_ERROR", {
81
+ moduleId: t,
82
+ ...a
83
+ }), this.name = "ModuleLoadError";
84
+ }
85
+ }
86
+ function Wn(e) {
87
+ return e instanceof ie;
88
+ }
89
+ function Ki(e, t = "UNKNOWN_ERROR") {
90
+ return Wn(e) ? e : e instanceof Error ? new ie(e.message, t, {
91
+ originalError: e.name,
92
+ stack: e.stack
93
+ }) : new ie(String(e), t);
94
+ }
95
+ class ye extends Error {
96
+ details;
97
+ originalError;
98
+ constructor(t, n, a) {
99
+ super(t), this.name = "DisplayableError", this.details = n, this.originalError = a;
100
+ }
101
+ }
102
+ function jn(e) {
103
+ return e instanceof Error && typeof e.status == "number" && typeof e.response == "string";
104
+ }
105
+ function qe(e) {
106
+ if (e instanceof ye)
107
+ return e;
108
+ if (jn(e)) {
109
+ const { status: t, response: n } = e;
110
+ try {
111
+ return qe(JSON.parse(n));
112
+ } catch {
113
+ const a = `${t}: ${e.message || "Error"}`;
114
+ return new ye(a, n || e.message, e);
115
+ }
116
+ }
117
+ if (e instanceof Error && "response" in e && e.response)
118
+ return qe(e.response);
119
+ if (e instanceof Error)
120
+ return new ye(e.message, e.stack || String(e), e);
121
+ if (typeof e == "string")
122
+ try {
123
+ const t = JSON.parse(e);
124
+ return qe(t);
125
+ } catch {
126
+ return new ye(e, e, e);
127
+ }
128
+ if (typeof e == "object" && e !== null) {
129
+ const t = e;
130
+ if ("status" in t && "data" in t) {
131
+ const o = t.status, i = t.statusText || "Error", l = `${o}: ${i}`, s = t.data;
132
+ let u = "";
133
+ return s ? typeof s.exceptionMessage == "string" ? u = s.exceptionMessage : typeof s.message == "string" ? u = s.message : Array.isArray(s.errors) ? u = s.errors.join(`
134
+ `) : typeof s == "string" ? u = s : u = JSON.stringify(s, null, 2) : u = JSON.stringify(t, null, 2), new ye(l, u, e);
135
+ }
136
+ const n = t.message || "An unexpected error occurred.", a = t.stack || JSON.stringify(t, null, 2);
137
+ return new ye(n, a, e);
138
+ }
139
+ return new ye("An unknown error occurred.", String(e), e);
140
+ }
141
+ const Hn = [
142
+ ["LLLL", "PPPp"],
143
+ ["LLL", "PPp"],
144
+ ["LTS", "pp"],
145
+ ["LT", "p"],
146
+ ["LL", "PP"],
147
+ ["L", "P"]
148
+ ], Gn = [
149
+ [/YYYY/g, "yyyy"],
150
+ [/YY/g, "yy"],
151
+ [/dddd/g, "EEEE"],
152
+ [/ddd/g, "EEE"],
153
+ [/DD/g, "dd"],
154
+ [/Do/g, "do"],
155
+ [/D(?![\w])/g, "d"],
156
+ [/A/g, "a"]
157
+ ];
158
+ function Yn(e) {
159
+ let t = e;
160
+ for (const [n, a] of Hn)
161
+ t = t.split(n).join(a);
162
+ for (const [n, a] of Gn)
163
+ t = t.replace(n, a);
164
+ return t;
165
+ }
166
+ const fe = /* @__PURE__ */ new Map();
167
+ fe.set("en-US", Ie);
168
+ fe.set("en", Ie);
169
+ async function Jn(e) {
170
+ if (fe.has(e))
171
+ return fe.get(e);
172
+ try {
173
+ const t = await import(
174
+ /* @vite-ignore */
175
+ `date-fns/locale/${e}`
176
+ ), n = e.replace("-", ""), a = t.default ?? t[n] ?? Ie;
177
+ return fe.set(e, a), a;
178
+ } catch {
179
+ const t = e.split("-")[0];
180
+ if (t !== e)
181
+ try {
182
+ const n = await import(
183
+ /* @vite-ignore */
184
+ `date-fns/locale/${t}`
185
+ ), a = n.default ?? n[t] ?? Ie;
186
+ return fe.set(e, a), a;
187
+ } catch {
188
+ }
189
+ return fe.set(e, Ie), Ie;
190
+ }
191
+ }
192
+ function Vt(e) {
193
+ return fe.has(e) ? fe.get(e) : (Jn(e), Ie);
194
+ }
195
+ function Pt(e) {
196
+ if (e == null || e === "") return null;
197
+ if (e instanceof Date) return isNaN(e.getTime()) ? null : e;
198
+ const t = new Date(e);
199
+ return isNaN(t.getTime()) ? null : t;
200
+ }
201
+ function Xn(e, t) {
202
+ const n = Pt(e);
203
+ if (!n) return "";
204
+ const a = t ? Vt(t) : void 0;
205
+ return qn(n, { addSuffix: !0, locale: a });
206
+ }
207
+ function Zn(e, t, n) {
208
+ const a = Pt(e);
209
+ if (!a) return "";
210
+ const o = Yn(t), i = n ? Vt(n) : void 0;
211
+ return zn(a, o, { locale: i });
212
+ }
213
+ const Qn = ge("color-utils");
214
+ function _n(e) {
215
+ if (!e || typeof e != "string")
216
+ return null;
217
+ try {
218
+ const t = document.createElement("canvas");
219
+ t.width = 1, t.height = 1;
220
+ const n = t.getContext("2d");
221
+ return !n || (n.fillStyle = e.trim(), n.fillStyle === "#000000" && e.trim().toLowerCase() !== "black") ? null : n.fillStyle;
222
+ } catch (t) {
223
+ return Qn.warn("Error converting color name to hex:", t), null;
224
+ }
225
+ }
226
+ function ea(e) {
227
+ if (!e || typeof e != "string")
228
+ return !1;
229
+ const t = e.startsWith("#") ? e : `#${e}`;
230
+ return /^#[0-9A-Fa-f]{6}$/.test(t);
231
+ }
232
+ function It(e) {
233
+ return !e || typeof e != "string" ? "" : e.startsWith("#") ? e : `#${e}`;
234
+ }
235
+ function ta(e, t) {
236
+ if (!e || !t || e.includes(`_${t}`)) return e;
237
+ const n = e.lastIndexOf("/"), a = e.indexOf("?", n), i = (a > -1 ? e.slice(n + 1, a) : e.slice(n + 1)).lastIndexOf(".");
238
+ if (i <= 0)
239
+ return e;
240
+ const l = n + 1 + i, s = e.slice(0, l), u = e.slice(l);
241
+ return `${s}_${t}${u}`;
242
+ }
243
+ function Wi(e) {
244
+ return e <= 64 ? "64x64" : e <= 128 ? "128x128" : e <= 168 ? "168x168" : e <= 216 ? "216x216" : e <= 348 ? "348x348" : "lg";
245
+ }
246
+ function na(e) {
247
+ let t = null;
248
+ return {
249
+ register(n) {
250
+ t = n, e?.(t);
251
+ },
252
+ get() {
253
+ return t;
254
+ },
255
+ reset() {
256
+ t = null, e?.(t);
257
+ }
258
+ };
259
+ }
260
+ function ji() {
261
+ const e = /* @__PURE__ */ new Map();
262
+ return {
263
+ register(t, n) {
264
+ e.set(t, n);
265
+ },
266
+ get(t) {
267
+ return e.get(t);
268
+ },
269
+ reset() {
270
+ e.clear();
271
+ }
272
+ };
273
+ }
274
+ const dt = () => {
275
+ const e = dn();
276
+ return {
277
+ user: e.user,
278
+ loading: e.loading,
279
+ isAdministrator: e.isAdministrator,
280
+ isAuthenticated: e.isAuthenticated,
281
+ validateToken: e.validateToken,
282
+ validatePassword: e.validatePassword,
283
+ resetPasswordByToken: e.resetPasswordByToken,
284
+ getLoginType: e.getLoginType,
285
+ loadUser: e.loadUser,
286
+ requestPasswordReset: e.requestPasswordReset,
287
+ changeUserPassword: e.changeUserPassword,
288
+ signIn: e.signIn,
289
+ signOut: e.signOut
290
+ };
291
+ };
292
+ function aa() {
293
+ const { user: e } = dt();
294
+ function t(n) {
295
+ const a = e.value?.permissions ?? [];
296
+ if (!n || Array.isArray(n) && n.length === 0 || e.value?.isAdministrator)
297
+ return !0;
298
+ if (Array.isArray(n))
299
+ return n.some((o) => a.includes(o));
300
+ if (typeof n == "string")
301
+ return a.includes(n);
302
+ throw new Error("Permissions must be a string or an array of strings");
303
+ }
304
+ return {
305
+ hasAccess: t
306
+ };
307
+ }
308
+ const ke = ge("notification"), pe = na();
309
+ function la(e) {
310
+ pe.register(e);
311
+ }
312
+ function Fe(e, t) {
313
+ const n = pe.get();
314
+ if (!n) {
315
+ ke.debug("Backend not yet registered — notification call ignored.");
316
+ return;
317
+ }
318
+ return t = ee(
319
+ n.defaultOptions,
320
+ t
321
+ ), (!t.notificationId || typeof t.notificationId != "string" && typeof t.notificationId != "number") && (t.notificationId = ot()), t = {
322
+ ...t,
323
+ content: e
324
+ }, n.appendInstance(t), t.notificationId;
325
+ }
326
+ const ue = (e, t) => Fe(e, { ...t, type: "default" });
327
+ ue.error = (e, t) => Fe(e, { ...t, type: "error" });
328
+ ue.warning = (e, t) => Fe(e, { ...t, type: "warning" });
329
+ ue.success = (e, t) => Fe(e, { ...t, type: "success" });
330
+ ue.clearAll = () => {
331
+ pe.get()?.actions.clear();
332
+ };
333
+ ue.remove = (e) => {
334
+ const t = pe.get();
335
+ t && (e ? t.actions.dismiss(e) : t.actions.clear());
336
+ };
337
+ ue.update = (e, t) => {
338
+ const n = pe.get();
339
+ if (!n) return e;
340
+ if (!n.hasNotification(e))
341
+ return ke.warn(`Cannot update: notification with ID ${e} not found`), e;
342
+ const a = n.getNotification(String(e));
343
+ if (a)
344
+ if (t.position && t.position !== a.position) {
345
+ const o = {
346
+ ...a,
347
+ ...t,
348
+ updateId: ot(),
349
+ notificationId: e
350
+ };
351
+ let i;
352
+ if (t.content !== void 0 ? (i = t.content, delete o.content) : a.content && (i = a.content, delete o.content), i)
353
+ return n.actions.remove(e), Fe(i, o);
354
+ } else {
355
+ const o = {
356
+ ...t,
357
+ updateId: ot(),
358
+ notificationId: e
359
+ };
360
+ return n.actions.update(o), e;
361
+ }
362
+ return e;
363
+ };
364
+ ue.setPosition = (e) => {
365
+ const t = pe.get();
366
+ t && (t.defaultOptions.position = e);
367
+ };
368
+ ue.clearPosition = (e) => {
369
+ const t = pe.get();
370
+ if (!t) return;
371
+ t.getAllNotifications().filter((a) => (a.position || t.defaultOptions.position) === e).forEach((a) => {
372
+ a.notificationId && t.actions.dismiss(a.notificationId);
373
+ });
374
+ };
375
+ ue.debug = () => {
376
+ const e = pe.get();
377
+ if (!e)
378
+ return ke.debug("Backend not registered"), { active: [], defaultOptions: {} };
379
+ Object.entries(e.defaultOptions).forEach(([n, a]) => {
380
+ ke.debug(`Default option ${n}: `, a);
381
+ }), Object.entries(e.actions).forEach(([n]) => {
382
+ ke.debug(`Available action: ${n}`);
383
+ });
384
+ const t = e.getAllNotifications().reduce((n, a) => {
385
+ const o = a.position || e.defaultOptions.position;
386
+ return n[o] || (n[o] = []), n[o].push({
387
+ id: a.notificationId || "unknown",
388
+ type: a.type,
389
+ content: typeof a.content == "string" ? a.content : "[Component]"
390
+ }), n;
391
+ }, {});
392
+ return Object.entries(t).forEach(([n, a]) => {
393
+ ke.debug(`Position ${n}: ${a.length} notifications`), a.forEach((o) => ke.debug(` - ${o.id} (${o.type}): ${o.content}`));
394
+ }), {
395
+ active: e.getAllNotifications(),
396
+ defaultOptions: e.defaultOptions
397
+ };
398
+ };
399
+ const oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
400
+ __proto__: null,
401
+ notification: ue,
402
+ setNotificationBackend: la
403
+ }, Symbol.toStringTag, { value: "Module" }));
404
+ function ia(e, t, n = {}) {
405
+ const a = $(() => be(n.placement) ?? "bottom"), o = $(() => be(n.strategy) ?? "absolute"), i = $(() => {
406
+ const u = be(n.middleware);
407
+ if (u?.length)
408
+ return u;
409
+ const v = [];
410
+ be(n.enableFlip) !== !1 && v.push(At({ padding: n.shiftPadding ?? 8 })), be(n.enableShift) !== !1 && v.push(Nt({ padding: n.shiftPadding ?? 8 }));
411
+ const m = be(n.offset);
412
+ return typeof m == "number" ? v.push(lt(m)) : v.push(
413
+ lt({
414
+ mainAxis: m?.mainAxis ?? 0,
415
+ crossAxis: m?.crossAxis ?? 0,
416
+ alignmentAxis: m?.alignmentAxis
417
+ })
418
+ ), v;
419
+ }), l = Vn(e, t, {
420
+ placement: a,
421
+ strategy: o,
422
+ whileElementsMounted: be(n.autoUpdate) === !1 ? void 0 : Pn,
423
+ middleware: i
424
+ }), s = $(() => ({
425
+ position: o.value,
426
+ top: `${l.y.value ?? 0}px`,
427
+ left: `${l.x.value ?? 0}px`
428
+ }));
429
+ return {
430
+ ...l,
431
+ floatingStyle: s,
432
+ resolvedPlacement: a,
433
+ resolvedStrategy: o
434
+ };
435
+ }
436
+ const ra = Symbol("vc-input-group-context");
437
+ function He(e) {
438
+ const t = Y(ra, null), n = an(), a = $(() => `vc-field-${n}`), o = $(() => `${a.value}-label`), i = $(() => `${a.value}-error`), l = $(() => `${a.value}-hint`), s = $(() => !!e.error || !!e.errorMessage || !!t?.invalid.value), u = $(() => !!e.disabled || !!t?.disabled.value), v = $(() => t?.name.value || e.name), m = $(() => e.required ? !0 : void 0), g = $(() => {
439
+ const d = /* @__PURE__ */ new Set();
440
+ return t?.describedBy.value && t.describedBy.value.split(/\s+/).forEach((c) => d.add(c)), e.errorMessage && d.add(i.value), e.hint && d.add(l.value), d.size ? Array.from(d).join(" ") : void 0;
441
+ });
442
+ return {
443
+ fieldId: a,
444
+ labelId: o,
445
+ errorId: i,
446
+ hintId: l,
447
+ invalid: s,
448
+ resolvedDisabled: u,
449
+ resolvedName: v,
450
+ ariaRequired: m,
451
+ ariaDescribedBy: g,
452
+ groupContext: t
453
+ };
454
+ }
455
+ function sa(e, t = {}) {
456
+ const { speed: n = 2 } = t, a = I(!1), o = I(!1);
457
+ let i = null;
458
+ function l() {
459
+ const v = e.value;
460
+ if (!v) {
461
+ a.value = !1, o.value = !1;
462
+ return;
463
+ }
464
+ a.value = v.scrollTop > 0, o.value = Math.ceil(v.scrollTop) < v.scrollHeight - v.clientHeight;
465
+ }
466
+ function s(v) {
467
+ u();
468
+ const m = e.value;
469
+ if (!m) return;
470
+ function g() {
471
+ m && (m.scrollTop += v === "up" ? -n : n, l(), i = requestAnimationFrame(g));
472
+ }
473
+ i = requestAnimationFrame(g);
474
+ }
475
+ function u() {
476
+ i !== null && (cancelAnimationFrame(i), i = null);
477
+ }
478
+ return Mt(e, l), rt(() => {
479
+ u();
480
+ }), {
481
+ canScrollUp: a,
482
+ canScrollDown: o,
483
+ startScroll: s,
484
+ stopScroll: u,
485
+ updateScrollState: l
486
+ };
487
+ }
488
+ function Oe() {
489
+ return Y(fn, I(!1));
490
+ }
491
+ Object.keys(kt).forEach((e) => {
492
+ Be(e, kt[e]);
493
+ });
494
+ const ua = (e, [t, n]) => {
495
+ if (!e?.files || !e.files?.length)
496
+ return !0;
497
+ const a = (l, s, u) => {
498
+ const v = window.URL || window.webkitURL;
499
+ return new Promise((m) => {
500
+ const g = new Image(), d = v.createObjectURL(l);
501
+ g.onerror = () => {
502
+ v.revokeObjectURL(d), m(!1);
503
+ }, g.onload = () => {
504
+ v.revokeObjectURL(d);
505
+ const c = g.width >= Number(s) && g.height >= Number(u);
506
+ m(c ? !0 : $e.global.t("messages.min_dimensions.error", { width: s, height: u }));
507
+ }, g.src = d;
508
+ });
509
+ }, o = [], i = e.files;
510
+ for (let l = 0; l < i.length; l++) {
511
+ if (!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(i[l].name))
512
+ return Promise.resolve($e.global.t("messages.min_dimensions.not_image_error"));
513
+ o.push(i[l]);
514
+ }
515
+ return Promise.all(o.map((l) => a(l, t, n))).then((l) => {
516
+ const s = l.find((u) => u !== !0);
517
+ return s === !1 || typeof s == "string" ? s : !0;
518
+ });
519
+ };
520
+ Be("mindimensions", ua);
521
+ const ca = (e, [t]) => {
522
+ if (!e?.files || !e.files?.length)
523
+ return !0;
524
+ const n = t * 1e3, a = (s) => s.size > n, o = [];
525
+ for (let s = 0; s < e.files.length; s++)
526
+ o.push(e.files[s]);
527
+ return o.map((s) => a(s)).find((s) => s === !0) ? $e.global.t("messages.file_weight", { size: t }) : !0;
528
+ };
529
+ Be("fileWeight", ca);
530
+ const Ft = (e, [t], n, a) => {
531
+ if (!e || typeof e == "string" && !e.length)
532
+ return !0;
533
+ let o, i;
534
+ return e instanceof Date && (o = e), t instanceof Date && (i = t), typeof e == "string" && (o = new Date(e)), typeof t == "string" && (i = new Date(t)), o?.getTime && o?.getTime() > 0 && i?.getTime && i?.getTime() > 0 && n(i.getTime(), o.getTime()) ? a : !0;
535
+ }, da = (e, [t]) => Ft(e, [t], (n, a) => n < a, $e.global.t("messages.before"));
536
+ Be("before", da);
537
+ const fa = (e, [t]) => Ft(e, [t], (n, a) => n > a, $e.global.t("messages.after"));
538
+ Be("after", fa);
539
+ const va = (e) => Number.isSafeInteger(parseInt(e)) ? !0 : $e.global.t("messages.bigint");
540
+ Be("bigint", va);
541
+ function Ce(e) {
542
+ const t = ge(`${e.name}-bus`), n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
543
+ function o(d) {
544
+ const c = e.getKey(d);
545
+ n.set(c, d), a.size > 0 && m((b) => {
546
+ try {
547
+ e.registerIntoService(b, d);
548
+ } catch (h) {
549
+ t.warn(`Failed to live-register item (key=${c}):`, h);
550
+ }
551
+ });
552
+ }
553
+ function i(d) {
554
+ n.delete(d), e.unregisterFromService && a.size > 0 && a.forEach((c) => {
555
+ try {
556
+ e.unregisterFromService(c, d);
557
+ } catch (b) {
558
+ t.warn(`Failed to live-unregister item (id=${d}):`, b);
559
+ }
560
+ });
561
+ }
562
+ function l(d) {
563
+ for (const [c, b] of n)
564
+ d(b) && n.delete(c);
565
+ }
566
+ function s() {
567
+ return Array.from(n.values());
568
+ }
569
+ function u(d) {
570
+ a.add(d), n.forEach((c, b) => {
571
+ try {
572
+ e.registerIntoService(d, c);
573
+ } catch (h) {
574
+ t.warn(`Failed to replay item (key=${b}):`, h);
575
+ }
576
+ });
577
+ }
578
+ function v(d) {
579
+ a.delete(d);
580
+ }
581
+ function m(d) {
582
+ a.forEach((c) => d(c));
583
+ }
584
+ function g() {
585
+ return a.values().next().value;
586
+ }
587
+ return {
588
+ preregister: o,
589
+ unregister: i,
590
+ removePreregistered: l,
591
+ getPreregistered: s,
592
+ replayInto: u,
593
+ dispose: v,
594
+ broadcast: m,
595
+ getFirstInstance: g,
596
+ get instanceCount() {
597
+ return a.size;
598
+ }
599
+ };
600
+ }
601
+ function zt(e) {
602
+ const t = Ze({}), n = Ze([]), a = Ze(/* @__PURE__ */ new Map());
603
+ function o(d) {
604
+ a.set(d, (a.get(d) ?? 0) + 1);
605
+ }
606
+ function i(d) {
607
+ const c = a.get(d);
608
+ if (!c || c <= 1) {
609
+ a.delete(d);
610
+ return;
611
+ }
612
+ a.set(d, c - 1);
613
+ }
614
+ function l(d, c) {
615
+ const b = c.toLowerCase();
616
+ t[b] || (t[b] = []);
617
+ const h = t[b].find((p) => p.id === d.id);
618
+ if (h) {
619
+ Object.assign(h, d, { bladeId: b });
620
+ return;
621
+ }
622
+ const E = { ...d, bladeId: b };
623
+ t[b].push(E), n.push(e.createRegistration(b, E)), o(d.id);
624
+ }
625
+ function s(d, c) {
626
+ const b = c.toLowerCase(), h = t[b];
627
+ if (h) {
628
+ const p = h.findIndex((S) => S.id === d);
629
+ if (p !== -1) {
630
+ const [S] = h.splice(p, 1);
631
+ S && i(S.id);
632
+ }
633
+ }
634
+ const E = n.findIndex(
635
+ (p) => e.getRegistrationBladeId(p) === b && e.getRegistrationItemId(p) === d
636
+ );
637
+ E !== -1 && n.splice(E, 1);
638
+ }
639
+ function u(d) {
640
+ const c = d ? d.toLowerCase() : "";
641
+ return [...t[c] || []];
642
+ }
643
+ function v(d) {
644
+ const c = d.toLowerCase(), b = t[c];
645
+ b && (b.forEach((E) => i(E.id)), delete t[c]), n.map((E, p) => e.getRegistrationBladeId(E) === c ? p : -1).filter((E) => E !== -1).reverse().forEach((E) => {
646
+ n.splice(E, 1);
647
+ });
648
+ }
649
+ function m(d, c, b) {
650
+ const h = c.toLowerCase(), E = t[h]?.find((p) => p.id === d);
651
+ E && Object.assign(E, b, { bladeId: h });
652
+ }
653
+ function g(d) {
654
+ return a.has(d);
655
+ }
656
+ return {
657
+ registry: t,
658
+ registrations: n,
659
+ register: l,
660
+ unregister: s,
661
+ get: u,
662
+ clear: v,
663
+ update: m,
664
+ isRegistered: g
665
+ };
666
+ }
667
+ function ga(e) {
668
+ const t = I(/* @__PURE__ */ new Map()), n = $(() => Array.from(t.value.values()).sort((i, l) => (i.order ?? 0) - (l.order ?? 0)));
669
+ function a(i) {
670
+ const l = e.getId(i) || crypto.randomUUID(), s = e.createItem(i, t.value.size);
671
+ return t.value.set(l, { ...s, id: l }), l;
672
+ }
673
+ function o(i) {
674
+ t.value.delete(i);
675
+ }
676
+ return {
677
+ itemsMap: t,
678
+ sortedItems: n,
679
+ register: a,
680
+ unregister: o
681
+ };
682
+ }
683
+ function qt(e) {
684
+ const t = ga({
685
+ createItem: e.createItem,
686
+ getId: e.getId
687
+ }), n = {
688
+ register: (a) => t.register(a),
689
+ unregister: (a) => t.unregister(a),
690
+ items: t.sortedItems
691
+ };
692
+ return e.bus.replayInto(n), n;
693
+ }
694
+ function Ke(e) {
695
+ return e.id !== void 0 ? `id:${String(e.id)}` : e.routeId ? `route:${e.routeId}` : e.url ? `url:${e.url}` : e.groupConfig?.id ? `gc:${e.groupConfig.id}:${e.title}` : e.group ? `g:${e.group}:${e.title}` : `hash:${JSON.stringify(Rt(e, "title"))}`;
696
+ }
697
+ const ze = I(/* @__PURE__ */ new Map()), ve = Ce({
698
+ name: "menu-service",
699
+ getKey: Ke,
700
+ registerIntoService: (e, t) => e.addMenuItem(t)
701
+ });
702
+ function Hi(e) {
703
+ ve.preregister(e);
704
+ }
705
+ function Gi(e) {
706
+ ve.removePreregistered((t) => ft(t, e)), ve.broadcast((t) => t.removeMenuItem(e));
707
+ }
708
+ function Yi(e, t) {
709
+ ze.value.set(e, t), ve.broadcast((n) => {
710
+ n.menuBadges.value.set(e, t);
711
+ });
712
+ }
713
+ function Ji(e) {
714
+ const t = ve.getFirstInstance();
715
+ return t ? t.menuBadges.value.get(e) : ze.value.get(e);
716
+ }
717
+ function Xi(e) {
718
+ ze.value.delete(e), ve.broadcast((t) => {
719
+ t.menuBadges.value.delete(e);
720
+ });
721
+ }
722
+ function Zi() {
723
+ return ve.getFirstInstance()?.menuBadges ?? ze;
724
+ }
725
+ const it = 1 / 0, ma = 1 / 0;
726
+ function ft(e, t) {
727
+ return Ke(e) === Ke(t);
728
+ }
729
+ function pa(e) {
730
+ return e.groupConfig ? {
731
+ groupId: e.groupConfig.id,
732
+ groupTitle: e.groupConfig.title || e.groupConfig.id,
733
+ groupIcon: e.groupConfig.icon,
734
+ groupPriority: e.groupConfig.priority,
735
+ groupPermissions: e.groupConfig.permissions
736
+ } : {
737
+ groupId: "group_" + On(e.group),
738
+ groupTitle: e.group,
739
+ groupIcon: e.groupIcon,
740
+ groupPriority: e.priority,
741
+ groupPermissions: void 0
742
+ };
743
+ }
744
+ function ba(e, t) {
745
+ return (e.priority ?? it) - (t.priority ?? it);
746
+ }
747
+ function ya(e, t) {
748
+ const n = (a) => a.inGroupPriority ?? a.priority ?? ma;
749
+ return n(e) - n(t);
750
+ }
751
+ function ha(e, t) {
752
+ const n = pa(e), a = {
753
+ ...Rt(e, ["group", "groupIcon", "groupPriority", "groupConfig"])
754
+ }, o = t.get(n.groupId);
755
+ if (o) {
756
+ const i = [...o.children ?? []], l = i.findIndex((s) => ft(s, a));
757
+ l > -1 ? i[l] = a : i.push(a), t.set(n.groupId, {
758
+ ...o,
759
+ children: i,
760
+ ...e.groupConfig?.title && { title: e.groupConfig.title },
761
+ ...e.groupConfig?.icon !== void 0 && { groupIcon: e.groupConfig.icon },
762
+ ...e.groupConfig?.priority !== void 0 && { priority: e.groupConfig.priority },
763
+ ...e.groupConfig?.permissions !== void 0 && { permissions: e.groupConfig.permissions }
764
+ });
765
+ } else
766
+ t.set(n.groupId, {
767
+ groupId: n.groupId,
768
+ groupIcon: n.groupIcon ?? "",
769
+ title: n.groupTitle,
770
+ children: [a],
771
+ priority: n.groupPriority ?? e.priority ?? it,
772
+ permissions: n.groupPermissions
773
+ });
774
+ }
775
+ function St(e) {
776
+ const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
777
+ for (const a of e)
778
+ a.group || a.groupConfig ? ha(a, t) : a.title && n.set(Ke(a), { ...a });
779
+ return ka([...t.values(), ...n.values()]);
780
+ }
781
+ function ka(e) {
782
+ return e.map(
783
+ (t) => ({
784
+ ...t,
785
+ children: t.children ? [...t.children].sort(ya) : void 0
786
+ })
787
+ ).sort(ba);
788
+ }
789
+ function Ia() {
790
+ const e = I([]);
791
+ let t = [];
792
+ const n = I(new Map(ze.value));
793
+ function a(l) {
794
+ t.push(l), e.value = St(t);
795
+ }
796
+ function o(l) {
797
+ const s = t.length;
798
+ t = t.filter((u) => !ft(u, l)), t.length !== s && (e.value = St(t));
799
+ }
800
+ const i = {
801
+ addMenuItem: a,
802
+ menuItems: e,
803
+ removeMenuItem: o,
804
+ menuBadges: n
805
+ };
806
+ return ve.replayInto(i), i;
807
+ }
808
+ function Ge(e) {
809
+ const { key: t, create: n, bus: a, name: o, onMissing: i } = e;
810
+ function l() {
811
+ const u = Y(t, null);
812
+ if (u)
813
+ return u;
814
+ const v = n();
815
+ return Et(t, v), ln() && on(() => a.dispose(v)), v;
816
+ }
817
+ function s() {
818
+ const u = Y(t, null);
819
+ if (!u)
820
+ throw i?.(), new Kn(o);
821
+ return u;
822
+ }
823
+ return {
824
+ provide: l,
825
+ use: s
826
+ };
827
+ }
828
+ const Sa = ge("use-menu-service"), Ut = Ge({
829
+ key: vn,
830
+ create: Ia,
831
+ bus: ve,
832
+ name: "MenuService",
833
+ onMissing: () => Sa.error("Menu service not found in current context. Injection chain:", We())
834
+ });
835
+ function Qi() {
836
+ return Ut.provide();
837
+ }
838
+ function _i() {
839
+ return Ut.use();
840
+ }
841
+ function Ye() {
842
+ return {
843
+ isMobile: Y(yn, I(!1)),
844
+ isDesktop: Y(bn, I(!0)),
845
+ isPhone: Y(pn, I(!1)),
846
+ isTablet: Y(mn, I(!1)),
847
+ isTouch: Y(gn, !1)
848
+ };
849
+ }
850
+ const $a = Symbol("AppInsightsOptions"), wa = Symbol("AppInsightsInstance");
851
+ function Oa() {
852
+ const e = Y(wa, null), { user: t } = dt(), n = Y($a, void 0);
853
+ function a() {
854
+ const o = n?.appName ? `[${n.appName}] ` : "", i = (u) => `${o}${u.name}`;
855
+ function l(u) {
856
+ if (!e) return;
857
+ const v = i(u);
858
+ e.context.telemetryTrace.traceID = Ln(), e.context.telemetryTrace.name = u.name, e.startTrackPage(v);
859
+ }
860
+ function s(u) {
861
+ if (!e) return;
862
+ const v = i(u), m = location.protocol + "//" + location.host + u.fullPath;
863
+ e.stopTrackPage(v, m, {
864
+ userId: t.value?.id ?? "",
865
+ userName: t.value?.userName ?? ""
866
+ });
867
+ }
868
+ return {
869
+ beforeEach: l,
870
+ afterEach: s
871
+ };
872
+ }
873
+ return {
874
+ setupPageTracking: a(),
875
+ appInsights: e
876
+ };
877
+ }
878
+ const Ea = ge("use-error-handler");
879
+ function La(e) {
880
+ const t = I(null), n = We(), { appInsights: a } = Oa(), { user: o } = dt(), i = I(!1);
881
+ function l() {
882
+ t.value = null, n && n.emit("reset");
883
+ }
884
+ return rn((s) => {
885
+ if (i.value)
886
+ return !e;
887
+ i.value = !0;
888
+ const u = qe(s);
889
+ return t.value = u, a && a.trackException({
890
+ exception: u,
891
+ properties: {
892
+ userId: o.value?.id ?? "",
893
+ userName: o.value?.userName ?? ""
894
+ }
895
+ }), Ea.error("Captured Error:", u.originalError), n && n.emit("error", u), Se(() => {
896
+ i.value = !1;
897
+ }), !e;
898
+ }), {
899
+ error: t,
900
+ reset: l
901
+ };
902
+ }
903
+ const Ue = /* @__PURE__ */ new WeakMap();
904
+ function er(e, t, n) {
905
+ Ue.set(e, { timerId: t, notifId: n });
906
+ }
907
+ function Ba(e) {
908
+ if (e && typeof e == "object") {
909
+ const t = Ue.get(e), n = "originalError" in e && e.originalError && typeof e.originalError == "object" ? e.originalError : void 0, a = t ?? (n ? Ue.get(n) : void 0), o = t ? e : n;
910
+ if (a && o)
911
+ return clearTimeout(a.timerId), Promise.resolve().then(() => oa).then(({ notification: i }) => {
912
+ i.remove(a.notifId);
913
+ }), Ue.delete(o), !0;
914
+ }
915
+ return !1;
916
+ }
917
+ const tr = z({
918
+ name: "ErrorInterceptor",
919
+ props: {
920
+ capture: {
921
+ default: !1,
922
+ type: Boolean
923
+ }
924
+ },
925
+ emits: {
926
+ error(e) {
927
+ return e && e instanceof Error || typeof e == "string";
928
+ },
929
+ reset() {
930
+ return !0;
931
+ }
932
+ },
933
+ setup(e, { slots: t }) {
934
+ const n = Y(Ct, void 0), a = Y(hn, void 0), o = !!(n && a), { error: i, reset: l } = La(o || e.capture);
935
+ return o && j(i, (s) => {
936
+ const u = n.value.id;
937
+ if (s) {
938
+ if (Ba(s), kn())
939
+ return;
940
+ a.setBladeError(u, s);
941
+ } else
942
+ a.clearBladeError(u);
943
+ }), () => t.default?.({
944
+ error: i.value,
945
+ reset: l
946
+ });
947
+ }
948
+ }), Ca = Symbol("vc-button-group"), xa = ["type", "disabled", "aria-disabled", "aria-label", "aria-busy", "aria-pressed"], Ta = {
949
+ key: 2,
950
+ class: "vc-button__title"
951
+ }, Ra = /* @__PURE__ */ z({
952
+ __name: "vc-button",
953
+ props: {
954
+ icon: {},
955
+ iconClass: {},
956
+ iconSize: { default: "s" },
957
+ variant: { default: "primary" },
958
+ disabled: { type: Boolean },
959
+ size: { default: "default" },
960
+ selected: { type: Boolean },
961
+ text: { type: Boolean },
962
+ type: { default: "button" },
963
+ loading: { type: Boolean, default: !1 },
964
+ ariaLabel: {}
965
+ },
966
+ emits: ["click"],
967
+ setup(e, { emit: t }) {
968
+ const n = {
969
+ base: "default",
970
+ xs: "sm"
971
+ }, a = e, o = Oe(), i = t, l = Y(Ca, null), s = $(() => {
972
+ const c = l?.size?.value ?? a.size;
973
+ return n[c] ?? c;
974
+ }), u = I(null), v = $(() => a.disabled || a.loading), m = I(!1);
975
+ j(v, (c) => {
976
+ m.value = c && u.value === document.activeElement;
977
+ });
978
+ const g = $(() => [
979
+ "vc-button",
980
+ {
981
+ [`vc-button-${a.variant}`]: a.variant,
982
+ [`vc-button--${s.value}`]: s.value,
983
+ "vc-button--selected": a.selected,
984
+ "vc-button--text": a.text,
985
+ "vc-button--disabled": v.value,
986
+ "vc-button--loading": a.loading
987
+ }
988
+ ]);
989
+ function d(c) {
990
+ c.preventDefault(), !v.value && i("click", c);
991
+ }
992
+ return (c, b) => r(o) ? w("", !0) : (f(), y("button", {
993
+ key: 0,
994
+ ref_key: "buttonRef",
995
+ ref: u,
996
+ class: W(g.value),
997
+ type: e.type,
998
+ disabled: v.value && !m.value,
999
+ "aria-disabled": m.value || void 0,
1000
+ "aria-label": e.ariaLabel,
1001
+ "aria-busy": e.loading || void 0,
1002
+ "aria-pressed": e.selected || void 0,
1003
+ onBlur: b[0] || (b[0] = (h) => m.value = !1),
1004
+ onClick: d
1005
+ }, [
1006
+ e.loading ? (f(), P(r(U), {
1007
+ key: 0,
1008
+ icon: "lucide-loader-2",
1009
+ class: "vc-button__icon tw-animate-spin",
1010
+ size: e.iconSize
1011
+ }, null, 8, ["size"])) : e.icon ? (f(), P(r(U), {
1012
+ key: 1,
1013
+ class: W(["vc-button--icon", e.iconClass]),
1014
+ icon: e.icon,
1015
+ size: e.iconSize
1016
+ }, null, 8, ["class", "icon", "size"])) : w("", !0),
1017
+ c.$slots.default ? (f(), y("span", Ta, [
1018
+ T(c.$slots, "default")
1019
+ ])) : w("", !0)
1020
+ ], 42, xa));
1021
+ }
1022
+ }), vt = Ce({
1023
+ name: "toolbar-service",
1024
+ getKey: (e) => `${e.bladeId.toLowerCase()}::${e.toolbarItem.id}`,
1025
+ registerIntoService: (e, t) => e.registerToolbarItem(t.toolbarItem, t.bladeId)
1026
+ });
1027
+ function nr(e, t) {
1028
+ const n = t.toLowerCase();
1029
+ vt.preregister({
1030
+ bladeId: n,
1031
+ toolbarItem: e
1032
+ });
1033
+ }
1034
+ function Kt() {
1035
+ const e = zt({
1036
+ createRegistration: (s, u) => ({ bladeId: s, toolbarItem: u }),
1037
+ getRegistrationBladeId: (s) => s.bladeId,
1038
+ getRegistrationItemId: (s) => s.toolbarItem.id
1039
+ }), t = (s, u) => {
1040
+ e.register(s, u);
1041
+ }, n = (s, u) => {
1042
+ e.unregister(s, u);
1043
+ }, a = (s) => {
1044
+ const u = s ? s.toLowerCase() : "", v = e.get(u), m = e.get("*"), g = [...v], d = new Set(g.map((c) => c.id));
1045
+ return m.forEach((c) => {
1046
+ d.has(c.id) || g.push(c);
1047
+ }), [...g];
1048
+ }, o = (s) => {
1049
+ e.clear(s);
1050
+ }, i = ({
1051
+ id: s,
1052
+ bladeId: u,
1053
+ toolbarItem: v
1054
+ }) => {
1055
+ e.update(s, u, v);
1056
+ }, l = {
1057
+ registerToolbarItem: t,
1058
+ unregisterToolbarItem: n,
1059
+ getToolbarItems: a,
1060
+ clearBladeToolbarItems: o,
1061
+ registeredToolbarItems: e.registrations,
1062
+ isToolbarItemRegistered: (s) => e.isRegistered(s),
1063
+ updateToolbarItem: i
1064
+ };
1065
+ return vt.replayInto(l), l;
1066
+ }
1067
+ const Ma = "fallback-blade-id";
1068
+ let _e = null;
1069
+ const Aa = Ge({
1070
+ key: xt,
1071
+ create: Kt,
1072
+ bus: vt,
1073
+ name: "ToolbarService"
1074
+ });
1075
+ function ar() {
1076
+ return Aa.provide();
1077
+ }
1078
+ function lr(e = {}) {
1079
+ const { autoCleanup: t = !0 } = e, n = Y(xt, null);
1080
+ !n && !_e && (_e = Kt());
1081
+ const a = n || _e;
1082
+ if (!a)
1083
+ throw new Error("Toolbar service is not available");
1084
+ const o = Y(Ct, void 0), i = $(() => o?.value?.id ?? Ma), l = (c) => c ?? i.value, s = (c, b) => {
1085
+ a.registerToolbarItem(c, l(b));
1086
+ }, u = (c, b) => {
1087
+ a.unregisterToolbarItem(c, l(b));
1088
+ }, v = (c, b, h) => {
1089
+ a.updateToolbarItem({ id: c, bladeId: l(h), toolbarItem: b });
1090
+ }, m = (c) => a.getToolbarItems(l(c)), g = (c) => {
1091
+ a.clearBladeToolbarItems(l(c));
1092
+ };
1093
+ return We() && t && rt(() => {
1094
+ g();
1095
+ }), {
1096
+ registerToolbarItem: s,
1097
+ unregisterToolbarItem: u,
1098
+ updateToolbarItem: v,
1099
+ getToolbarItems: m,
1100
+ clearBladeToolbarItems: g,
1101
+ isToolbarItemRegistered: a.isToolbarItemRegistered,
1102
+ registeredToolbarItems: a.registeredToolbarItems
1103
+ };
1104
+ }
1105
+ const Na = ["aria-label"], Da = { class: "tw-sr-only" }, Va = ["aria-label"], Pa = { class: "tw-sr-only" }, ne = /* @__PURE__ */ z({
1106
+ __name: "vc-skeleton",
1107
+ props: {
1108
+ variant: { default: "text" },
1109
+ rows: { default: 1 },
1110
+ width: {},
1111
+ height: {},
1112
+ animated: { type: Boolean, default: !0 },
1113
+ ariaLabel: { default: "Loading..." }
1114
+ },
1115
+ setup(e) {
1116
+ const t = e;
1117
+ function n(o) {
1118
+ return o === t.rows ? "60%" : "100%";
1119
+ }
1120
+ function a(o) {
1121
+ if (o !== void 0)
1122
+ return typeof o == "number" ? `${o}px` : o;
1123
+ }
1124
+ return (o, i) => e.variant === "text" ? (f(), y("div", {
1125
+ key: 0,
1126
+ class: W(["vc-skeleton", {
1127
+ "vc-skeleton--animated": e.animated
1128
+ }]),
1129
+ role: "status",
1130
+ "aria-busy": "true",
1131
+ "aria-label": e.ariaLabel
1132
+ }, [
1133
+ x("span", Da, A(e.ariaLabel), 1),
1134
+ (f(!0), y(Le, null, st(e.rows, (l) => (f(), y("div", {
1135
+ key: l,
1136
+ class: "vc-skeleton__row",
1137
+ style: Ve({
1138
+ width: n(l)
1139
+ }),
1140
+ "aria-hidden": "true"
1141
+ }, null, 4))), 128))
1142
+ ], 10, Na)) : (f(), y("div", {
1143
+ key: 1,
1144
+ class: W(["vc-skeleton__shape", [`vc-skeleton__shape--${e.variant}`, { "tw-animate-pulse": e.animated }]]),
1145
+ style: Ve({
1146
+ width: a(e.width),
1147
+ height: a(e.height)
1148
+ }),
1149
+ role: "status",
1150
+ "aria-busy": "true",
1151
+ "aria-label": e.ariaLabel
1152
+ }, [
1153
+ x("span", Pa, A(e.ariaLabel), 1)
1154
+ ], 14, Va));
1155
+ }
1156
+ }), or = /* @__PURE__ */ z({
1157
+ __name: "vc-container",
1158
+ props: {
1159
+ shadow: { type: Boolean },
1160
+ noPadding: { type: Boolean },
1161
+ ariaLabel: {}
1162
+ },
1163
+ emits: ["scroll"],
1164
+ setup(e, { expose: t, emit: n }) {
1165
+ const a = n, o = I(), i = I(!1), l = () => {
1166
+ o.value && o.value.scroll(0, 0);
1167
+ };
1168
+ function s(u) {
1169
+ a("scroll", u);
1170
+ }
1171
+ return Mt(o, () => {
1172
+ i.value = !!(o.value && o.value.clientHeight < o.value.scrollHeight);
1173
+ }), t({
1174
+ scrollTop: l,
1175
+ component: o
1176
+ }), (u, v) => (f(), P(ut(e.ariaLabel ? "section" : "div"), {
1177
+ class: W([
1178
+ "vc-container",
1179
+ {
1180
+ "vc-container--shadow": e.shadow && i.value,
1181
+ "vc-container--nopadding": e.noPadding
1182
+ }
1183
+ ]),
1184
+ "aria-label": e.ariaLabel
1185
+ }, {
1186
+ default: O(() => [
1187
+ x("div", {
1188
+ ref_key: "component",
1189
+ ref: o,
1190
+ class: "vc-container__inner",
1191
+ tabindex: "0",
1192
+ onScroll: s
1193
+ }, [
1194
+ T(u.$slots, "default")
1195
+ ], 544)
1196
+ ]),
1197
+ _: 3
1198
+ }, 8, ["class", "aria-label"]));
1199
+ }
1200
+ }), Fa = ["id", "role"], za = /* @__PURE__ */ z({
1201
+ __name: "vc-hint",
1202
+ props: {
1203
+ id: {},
1204
+ error: { type: Boolean }
1205
+ },
1206
+ setup(e) {
1207
+ return (t, n) => (f(), y("div", {
1208
+ id: e.id,
1209
+ class: W(["vc-hint", {
1210
+ "vc-hint--error": e.error
1211
+ }]),
1212
+ role: e.error ? "alert" : void 0
1213
+ }, [
1214
+ T(t.$slots, "default")
1215
+ ], 10, Fa));
1216
+ }
1217
+ }), me = za, qa = ["role", "tabindex", "aria-label", "onKeydown"], Ua = {
1218
+ key: 0,
1219
+ class: "vc-image__placeholder",
1220
+ "aria-hidden": "true"
1221
+ }, Ka = /* @__PURE__ */ z({
1222
+ __name: "vc-image",
1223
+ props: {
1224
+ aspect: { default: "1x1" },
1225
+ rounded: { type: Boolean },
1226
+ bordered: { type: Boolean },
1227
+ clickable: { type: Boolean },
1228
+ src: {},
1229
+ size: { default: "auto" },
1230
+ background: { default: "cover" },
1231
+ emptyIcon: { default: "lucide-image" },
1232
+ alt: {},
1233
+ thumbnailSize: {}
1234
+ },
1235
+ emits: ["click"],
1236
+ setup(e, { emit: t }) {
1237
+ const n = ge("vc-image"), a = e, o = t;
1238
+ function i(g) {
1239
+ if (!g) return g;
1240
+ try {
1241
+ const d = new URL(g);
1242
+ if (d.protocol === "http:" && window.location.protocol === "https:")
1243
+ return d.protocol = "https:", d.href;
1244
+ } catch {
1245
+ n.warn("Invalid URL:", g);
1246
+ }
1247
+ return g;
1248
+ }
1249
+ const l = $(() => ta(a.src, a.thumbnailSize) ?? a.src), s = I(!1), u = $(() => s.value ? a.src : l.value);
1250
+ j(
1251
+ () => [a.src, a.thumbnailSize],
1252
+ () => {
1253
+ s.value = !1;
1254
+ }
1255
+ ), j(
1256
+ u,
1257
+ (g) => {
1258
+ if (!g || !a.thumbnailSize || s.value || g === a.src) return;
1259
+ const d = new Image();
1260
+ d.src = i(g), d.onerror = () => {
1261
+ s.value = !0;
1262
+ };
1263
+ },
1264
+ { immediate: !0 }
1265
+ );
1266
+ const v = $(() => {
1267
+ if (u.value) {
1268
+ const g = i(u.value);
1269
+ return `background: url(${CSS.escape(g)}) center / ${a.background} no-repeat`;
1270
+ }
1271
+ });
1272
+ function m() {
1273
+ a.clickable && o("click");
1274
+ }
1275
+ return (g, d) => (f(), y("div", {
1276
+ class: W(["vc-image", [`vc-image_${e.size}`]])
1277
+ }, [
1278
+ x("div", {
1279
+ class: W([
1280
+ "vc-image__container",
1281
+ `vc-image_${e.aspect}`,
1282
+ {
1283
+ "vc-image__container--rounded": e.rounded,
1284
+ "vc-image__container--bordered": e.bordered,
1285
+ "vc-image__container--clickable": e.clickable
1286
+ }
1287
+ ]),
1288
+ style: Ve(v.value),
1289
+ role: e.clickable ? "button" : e.src && e.alt ? "img" : void 0,
1290
+ tabindex: e.clickable ? 0 : void 0,
1291
+ "aria-label": e.alt || (e.clickable ? g.$t("COMPONENTS.ATOMS.VC_IMAGE.LABEL") : void 0),
1292
+ onClick: m,
1293
+ onKeydown: [
1294
+ X(G(m, ["prevent"]), ["enter"]),
1295
+ X(G(m, ["prevent"]), ["space"])
1296
+ ]
1297
+ }, [
1298
+ e.src ? w("", !0) : (f(), y("div", Ua, [
1299
+ M(r(U), {
1300
+ icon: e.emptyIcon,
1301
+ size: "xl"
1302
+ }, null, 8, ["icon"])
1303
+ ]))
1304
+ ], 46, qa)
1305
+ ], 2));
1306
+ }
1307
+ }), Wa = { class: "vc-label__text" }, ja = { class: "vc-label__content" }, Ha = {
1308
+ key: 0,
1309
+ class: "vc-label__required",
1310
+ "aria-hidden": "true"
1311
+ }, Ga = {
1312
+ key: 0,
1313
+ class: "vc-label__tooltip"
1314
+ }, Ya = {
1315
+ key: 1,
1316
+ class: "vc-label__language"
1317
+ }, Je = /* @__PURE__ */ z({
1318
+ __name: "vc-label",
1319
+ props: {
1320
+ required: { type: Boolean },
1321
+ tooltipIcon: { default: "lucide-info" },
1322
+ multilanguage: { type: Boolean },
1323
+ currentLanguage: {},
1324
+ error: { type: Boolean },
1325
+ htmlFor: {}
1326
+ },
1327
+ setup(e) {
1328
+ return (t, n) => (f(), P(ut(e.htmlFor ? "label" : "div"), {
1329
+ class: W(["vc-label", {
1330
+ "vc-label--error": e.error
1331
+ }]),
1332
+ for: e.htmlFor || void 0
1333
+ }, {
1334
+ default: O(() => [
1335
+ x("div", Wa, [
1336
+ x("span", ja, [
1337
+ T(t.$slots, "default")
1338
+ ]),
1339
+ e.required ? (f(), y("span", Ha, "*")) : w("", !0)
1340
+ ]),
1341
+ t.$slots.tooltip ? (f(), y("span", Ga, [
1342
+ M(r(Tt), { placement: "top-start" }, {
1343
+ tooltip: O(() => [
1344
+ T(t.$slots, "tooltip")
1345
+ ]),
1346
+ default: O(() => [
1347
+ M(r(U), {
1348
+ class: "vc-label__tooltip-icon",
1349
+ icon: e.tooltipIcon,
1350
+ size: "s"
1351
+ }, null, 8, ["icon"])
1352
+ ]),
1353
+ _: 3
1354
+ })
1355
+ ])) : w("", !0),
1356
+ e.multilanguage ? (f(), y("div", Ya, A(e.currentLanguage), 1)) : w("", !0)
1357
+ ]),
1358
+ _: 3
1359
+ }, 8, ["class", "for"]));
1360
+ }
1361
+ }), Ja = ["disabled", "aria-disabled"], Xa = { class: "vc-link__text" }, Za = /* @__PURE__ */ z({
1362
+ __name: "vc-link",
1363
+ props: {
1364
+ active: { type: Boolean },
1365
+ disabled: { type: Boolean },
1366
+ onClick: { type: Function }
1367
+ },
1368
+ emits: ["click"],
1369
+ setup(e, { emit: t }) {
1370
+ const n = e, a = t;
1371
+ function o() {
1372
+ n.disabled || a("click");
1373
+ }
1374
+ return (i, l) => (f(), y("button", {
1375
+ type: "button",
1376
+ class: W(["vc-link", {
1377
+ "vc-link--active": e.active,
1378
+ "vc-link--disabled": e.disabled
1379
+ }]),
1380
+ disabled: e.disabled,
1381
+ "aria-disabled": e.disabled,
1382
+ onClick: o
1383
+ }, [
1384
+ x("span", Xa, [
1385
+ T(i.$slots, "default")
1386
+ ])
1387
+ ], 10, Ja));
1388
+ }
1389
+ }), Qa = Za, _a = ["aria-label"], el = { class: "vc-status__content" }, tl = /* @__PURE__ */ z({
1390
+ __name: "vc-status",
1391
+ props: {
1392
+ variant: { default: "info" },
1393
+ extend: { type: Boolean },
1394
+ dot: { type: Boolean, default: !1 }
1395
+ },
1396
+ setup(e) {
1397
+ return (t, n) => (f(), y("div", {
1398
+ class: W(["vc-status", [
1399
+ `vc-status--${e.variant}`,
1400
+ {
1401
+ "vc-status--extended": e.extend,
1402
+ "vc-status--dot": e.dot
1403
+ }
1404
+ ]]),
1405
+ role: "status",
1406
+ "aria-label": e.dot ? e.variant : void 0
1407
+ }, [
1408
+ x("div", el, [
1409
+ T(t.$slots, "default")
1410
+ ])
1411
+ ], 10, _a));
1412
+ }
1413
+ }), nl = ["aria-label"], al = /* @__PURE__ */ z({
1414
+ __name: "vc-status-icon",
1415
+ props: {
1416
+ status: { type: Boolean }
1417
+ },
1418
+ setup(e) {
1419
+ return (t, n) => (f(), y("div", {
1420
+ class: "vc-status-icon",
1421
+ role: "img",
1422
+ "aria-label": e.status ? "Active" : "Inactive"
1423
+ }, [
1424
+ e.status ? (f(), P(r(U), {
1425
+ key: 0,
1426
+ icon: "lucide-circle-check",
1427
+ class: "vc-status-icon__icon vc-status-icon__icon--success",
1428
+ "aria-hidden": "true"
1429
+ })) : (f(), P(r(U), {
1430
+ key: 1,
1431
+ icon: "lucide-circle-x",
1432
+ class: "vc-status-icon__icon vc-status-icon__icon--inactive",
1433
+ "aria-hidden": "true"
1434
+ }))
1435
+ ], 8, nl));
1436
+ }
1437
+ }), ll = ["aria-label"], $t = 40, ol = /* @__PURE__ */ z({
1438
+ __name: "vc-scrollable-container",
1439
+ props: {
1440
+ speed: { default: void 0 }
1441
+ },
1442
+ setup(e, { expose: t }) {
1443
+ const n = e, a = I(null), o = {};
1444
+ n.speed !== void 0 && (o.speed = n.speed);
1445
+ const { canScrollUp: i, canScrollDown: l, startScroll: s, stopScroll: u, updateScrollState: v } = sa(
1446
+ a,
1447
+ o
1448
+ );
1449
+ function m(g) {
1450
+ if (!a.value) return;
1451
+ const d = g === "up" ? -$t : $t;
1452
+ a.value.scrollBy({ top: d, behavior: "smooth" });
1453
+ }
1454
+ return t({
1455
+ viewportRef: a,
1456
+ updateScrollState: v
1457
+ }), (g, d) => (f(), y("div", {
1458
+ class: "vc-scrollable-container",
1459
+ role: "region",
1460
+ "aria-label": g.$t("COMPONENTS.ATOMS.VC_SCROLLABLE_CONTAINER.LABEL")
1461
+ }, [
1462
+ x("div", {
1463
+ class: W(["vc-scrollable-container__arrow", { "vc-scrollable-container__arrow--hidden": !r(i) }]),
1464
+ "aria-hidden": "true",
1465
+ onPointerenter: d[0] || (d[0] = (c) => r(s)("up")),
1466
+ onPointerleave: d[1] || (d[1] = //@ts-ignore
1467
+ (...c) => r(u) && r(u)(...c))
1468
+ }, [
1469
+ T(g.$slots, "arrow-up", {}, () => [
1470
+ M(r(U), {
1471
+ icon: "lucide-chevron-up",
1472
+ size: "xs"
1473
+ })
1474
+ ])
1475
+ ], 34),
1476
+ x("div", {
1477
+ ref_key: "viewportRef",
1478
+ ref: a,
1479
+ class: "vc-scrollable-container__viewport",
1480
+ tabindex: "0",
1481
+ onScroll: d[2] || (d[2] = //@ts-ignore
1482
+ (...c) => r(v) && r(v)(...c)),
1483
+ onKeydown: [
1484
+ d[3] || (d[3] = X(G((c) => m("up"), ["prevent"]), ["up"])),
1485
+ d[4] || (d[4] = X(G((c) => m("down"), ["prevent"]), ["down"]))
1486
+ ]
1487
+ }, [
1488
+ T(g.$slots, "default")
1489
+ ], 544),
1490
+ x("div", {
1491
+ class: W(["vc-scrollable-container__arrow", { "vc-scrollable-container__arrow--hidden": !r(l) }]),
1492
+ "aria-hidden": "true",
1493
+ onPointerenter: d[5] || (d[5] = (c) => r(s)("down")),
1494
+ onPointerleave: d[6] || (d[6] = //@ts-ignore
1495
+ (...c) => r(u) && r(u)(...c))
1496
+ }, [
1497
+ T(g.$slots, "arrow-down", {}, () => [
1498
+ M(r(U), {
1499
+ icon: "lucide-chevron-down",
1500
+ size: "xs"
1501
+ })
1502
+ ])
1503
+ ], 34)
1504
+ ], 8, ll));
1505
+ }
1506
+ }), gt = /* @__PURE__ */ new Map();
1507
+ function il(e) {
1508
+ return e?.map((t) => t.toLowerCase());
1509
+ }
1510
+ function ir(e) {
1511
+ gt.set(e.id, {
1512
+ ...e,
1513
+ targetBlades: il(e.targetBlades)
1514
+ });
1515
+ }
1516
+ function rl(e) {
1517
+ const t = e.toLowerCase();
1518
+ return Array.from(gt.values()).filter((n) => !n.targetBlades || n.targetBlades.includes(t)).map((n) => ({ ...n, targetBlades: n.targetBlades ? [...n.targetBlades] : void 0 }));
1519
+ }
1520
+ function sl() {
1521
+ return Array.from(gt.values()).map((e) => ({
1522
+ ...e,
1523
+ targetBlades: e.targetBlades ? [...e.targetBlades] : void 0
1524
+ }));
1525
+ }
1526
+ function ul(e) {
1527
+ return En(e);
1528
+ }
1529
+ const Wt = Ce({
1530
+ name: "widget-service",
1531
+ getKey: (e) => `${e.bladeId.toLowerCase()}::${e.widget.id}`,
1532
+ registerIntoService: (e, t) => e.registerWidget(t.widget, t.bladeId)
1533
+ });
1534
+ function rr(e, t) {
1535
+ const n = t.toLowerCase();
1536
+ Wt.preregister({
1537
+ bladeId: n,
1538
+ widget: e
1539
+ });
1540
+ }
1541
+ function sr() {
1542
+ const e = zt({
1543
+ createRegistration: (a, o) => ({ bladeId: a, widget: o }),
1544
+ getRegistrationBladeId: (a) => a.bladeId,
1545
+ getRegistrationItemId: (a) => a.widget.id
1546
+ }), n = {
1547
+ registerWidget: (a, o) => e.register(a, o),
1548
+ unregisterWidget: (a, o) => e.unregister(a, o),
1549
+ getWidgets: (a) => e.get(a),
1550
+ updateWidget: ({ id: a, bladeId: o, widget: i }) => e.update(a, o, i),
1551
+ getExternalWidgetsForBlade: (a) => rl(a.toLowerCase()),
1552
+ getAllExternalWidgets: sl,
1553
+ cloneWidget: ul
1554
+ };
1555
+ return Wt.replayInto(n), n;
1556
+ }
1557
+ const cl = ge("use-theme"), he = I([
1558
+ { key: "light", localizationKey: "CORE.THEMES.LIGHT" },
1559
+ { key: "dark", localizationKey: "CORE.THEMES.DARK" }
1560
+ ]), ur = Rn(() => {
1561
+ const { t: e } = $e.global;
1562
+ function t(v) {
1563
+ (Array.isArray(v) ? v : [v]).forEach((m) => {
1564
+ he.value.some((g) => g.key === m.key) || he.value.push(m);
1565
+ });
1566
+ }
1567
+ function n(v) {
1568
+ (Array.isArray(v) ? v : [v]).forEach((m) => {
1569
+ const g = he.value.findIndex((d) => d.key === m);
1570
+ g >= 0 && he.value.splice(g, 1);
1571
+ });
1572
+ }
1573
+ const a = $(() => he.value.map((v) => v.key)), o = Bn({
1574
+ attribute: "data-theme",
1575
+ emitAuto: !0,
1576
+ initialValue: "light",
1577
+ // Should align with a default theme in _themeRegistry
1578
+ modes: {
1579
+ // Dynamically build modes from registered theme keys
1580
+ ...a.value.reduce(
1581
+ (v, m) => (v[m] = m, v),
1582
+ {}
1583
+ )
1584
+ }
1585
+ }), { state: i, next: l } = Cn(a, { initialValue: o });
1586
+ tt(() => {
1587
+ i.value && (o.value = i.value);
1588
+ });
1589
+ function s(v) {
1590
+ a.value.includes(v) ? i.value = v : cl.warn(`Attempted to set an unregistered theme: ${v}`);
1591
+ }
1592
+ const u = $(() => {
1593
+ const v = he.value.find((m) => m.key === i.value);
1594
+ return v ? v.localizationKey ? e(v.localizationKey) : Qe(v.key) : i.value ? Qe(i.value) : "";
1595
+ });
1596
+ return {
1597
+ themes: $(
1598
+ () => he.value.map((v) => ({
1599
+ key: v.key,
1600
+ name: v.localizationKey ? e(v.localizationKey) : Qe(v.key)
1601
+ }))
1602
+ ),
1603
+ currentThemeKey: i,
1604
+ currentLocalizedName: u,
1605
+ next: l,
1606
+ register: t,
1607
+ unregister: n,
1608
+ setTheme: s
1609
+ };
1610
+ }), mt = Ce({
1611
+ name: "dashboard-service",
1612
+ getKey: (e) => e.id,
1613
+ registerIntoService: (e, t) => e.registerWidget(t)
1614
+ });
1615
+ function cr(e) {
1616
+ mt.preregister(e);
1617
+ }
1618
+ const dl = () => ({
1619
+ widgets: nt(/* @__PURE__ */ new Map()),
1620
+ layout: nt(/* @__PURE__ */ new Map())
1621
+ });
1622
+ function fl(e = {}) {
1623
+ const t = dl(), n = e.hasAccess ?? (() => !0), s = {
1624
+ registerWidget: (u) => {
1625
+ if (t.widgets.has(u.id))
1626
+ throw new Error(`Widget with id ${u.id} already registered`);
1627
+ t.widgets.set(u.id, {
1628
+ ...u,
1629
+ permissions: u.permissions ? [...u.permissions] : void 0,
1630
+ position: u.position ? { ...u.position } : void 0,
1631
+ props: u.props ? { ...u.props } : void 0
1632
+ }), u.position && t.layout.set(u.id, { ...u.position });
1633
+ },
1634
+ getWidgets: () => Array.from(t.widgets.values()).filter((u) => !u.permissions || u.permissions.length === 0 || n(u.permissions)).map((u) => ({
1635
+ ...u,
1636
+ permissions: u.permissions ? [...u.permissions] : void 0,
1637
+ position: u.position ? { ...u.position } : void 0,
1638
+ props: u.props ? { ...u.props } : void 0
1639
+ })),
1640
+ updateWidgetPosition: (u, v) => {
1641
+ if (!t.widgets.has(u))
1642
+ throw new Error(`Widget with id ${u} not found`);
1643
+ t.layout.set(u, { ...v });
1644
+ },
1645
+ getLayout: () => new Map(t.layout)
1646
+ };
1647
+ return mt.replayInto(s), s;
1648
+ }
1649
+ const wt = ge("use-dashboard"), jt = Ge({
1650
+ key: In,
1651
+ bus: mt,
1652
+ name: "DashboardService",
1653
+ create: () => {
1654
+ let e = () => !0;
1655
+ try {
1656
+ const { hasAccess: t } = aa();
1657
+ e = (n) => t(n);
1658
+ } catch (t) {
1659
+ wt.warn("Permissions composable unavailable, dashboard falls back to allow-all access check", t);
1660
+ }
1661
+ return fl({
1662
+ hasAccess: e
1663
+ });
1664
+ },
1665
+ onMissing: () => wt.error("Dashboard service not found")
1666
+ });
1667
+ function dr() {
1668
+ return jt.provide();
1669
+ }
1670
+ function fr() {
1671
+ return jt.use();
1672
+ }
1673
+ const Ht = Ce({
1674
+ name: "app-bar-menu-service",
1675
+ getKey: (e) => e.id || crypto.randomUUID(),
1676
+ registerIntoService: (e, t) => e.register(t),
1677
+ unregisterFromService: (e, t) => e.unregister(t)
1678
+ });
1679
+ function vr(e) {
1680
+ Ht.preregister(e);
1681
+ }
1682
+ function gr() {
1683
+ return qt({
1684
+ bus: Ht,
1685
+ createItem: (e, t) => ({
1686
+ id: e.id || "",
1687
+ order: e.order ?? t,
1688
+ title: e.title,
1689
+ icon: typeof e.icon == "object" ? at(e.icon) : e.icon,
1690
+ component: e.component ? at(e.component) : void 0,
1691
+ props: e.props,
1692
+ onClick: e.onClick,
1693
+ slot: e.slot,
1694
+ badge: e.badge,
1695
+ searchTerms: e.searchTerms
1696
+ }),
1697
+ getId: (e) => e.id || ""
1698
+ });
1699
+ }
1700
+ const pt = Ce({
1701
+ name: "settings-menu-service",
1702
+ getKey: (e) => e.id || crypto.randomUUID(),
1703
+ registerIntoService: (e, t) => e.register(t),
1704
+ unregisterFromService: (e, t) => e.unregister(t)
1705
+ });
1706
+ function mr(e) {
1707
+ pt.preregister(e);
1708
+ }
1709
+ function vl() {
1710
+ return qt({
1711
+ bus: pt,
1712
+ createItem: (e, t) => ({
1713
+ id: e.id || "",
1714
+ order: e.order ?? t,
1715
+ group: e.group,
1716
+ component: at(e.component),
1717
+ props: e.props
1718
+ }),
1719
+ getId: (e) => e.id || ""
1720
+ });
1721
+ }
1722
+ const gl = ge("use-settings-menu"), Gt = Ge({
1723
+ key: Sn,
1724
+ create: vl,
1725
+ bus: pt,
1726
+ name: "SettingsMenuService",
1727
+ onMissing: () => gl.error("Settings menu service not found")
1728
+ });
1729
+ function pr() {
1730
+ return Gt.provide();
1731
+ }
1732
+ function br() {
1733
+ return Gt.use();
1734
+ }
1735
+ const ml = {
1736
+ key: 0,
1737
+ class: "vc-date-picker vc-date-picker--skeleton"
1738
+ }, pl = { class: "vc-date-picker__field-container" }, bl = { class: "vc-date-picker__field" }, yl = ["aria-label"], hl = {
1739
+ key: 0,
1740
+ class: "vc-date-picker__loading"
1741
+ }, kl = { key: 0 }, Il = { key: 1 }, Sl = /* @__PURE__ */ z({
1742
+ __name: "vc-date-picker",
1743
+ props: {
1744
+ modelValue: {},
1745
+ type: { default: "date" },
1746
+ ariaLabel: {},
1747
+ datePickerOptions: {},
1748
+ placeholder: {},
1749
+ hint: {},
1750
+ clearable: { type: Boolean },
1751
+ loading: { type: Boolean },
1752
+ autofocus: { type: Boolean },
1753
+ size: { default: "default" },
1754
+ multilanguage: { type: Boolean },
1755
+ currentLanguage: {},
1756
+ label: {},
1757
+ tooltip: {},
1758
+ disabled: { type: Boolean },
1759
+ required: { type: Boolean },
1760
+ name: { default: "Field" },
1761
+ error: { type: Boolean },
1762
+ errorMessage: {}
1763
+ },
1764
+ emits: ["update:modelValue", "blur", "focus"],
1765
+ setup(e, { emit: t }) {
1766
+ const n = e, a = t, o = Oe(), { isMobile: i, isDesktop: l } = Ye(), { labelId: s, errorId: u, hintId: v, invalid: m, resolvedDisabled: g, ariaRequired: d, ariaDescribedBy: c } = He(n), b = I(!1), h = window.navigator.language, E = I(n.modelValue), p = I(null), S = $(() => n.type === "date" && "9999-12-31" || void 0), F = (() => {
1767
+ const C = new Intl.DateTimeFormat(h, { hour: "numeric" }).format();
1768
+ return Number.isInteger(Number(C));
1769
+ })(), K = $(() => {
1770
+ const C = n.type === "datetime-local", B = new Intl.DateTimeFormat(h, {
1771
+ year: "numeric",
1772
+ month: "2-digit",
1773
+ day: "2-digit",
1774
+ ...C ? { hour: "2-digit", minute: "2-digit", hour12: !F } : {}
1775
+ }).formatToParts(new Date(2e3, 0, 15, 13, 30)), D = {
1776
+ year: "yyyy",
1777
+ month: "MM",
1778
+ day: "dd",
1779
+ hour: F ? "HH" : "hh",
1780
+ minute: "mm",
1781
+ dayPeriod: "aa"
1782
+ };
1783
+ return B.map((V) => D[V.type] ?? V.value).join("");
1784
+ }), _ = $(() => {
1785
+ if (!n.datePickerOptions?.textInput) return n.datePickerOptions;
1786
+ const C = { ...n.datePickerOptions }, B = typeof C.textInput == "object" ? C.textInput : {};
1787
+ return C.textInput = {
1788
+ format: K.value,
1789
+ rangeSeparator: " - ",
1790
+ ...B
1791
+ }, C;
1792
+ }), J = $(() => {
1793
+ const C = n.datePickerOptions?.ariaLabels;
1794
+ return n.label || !n.ariaLabel ? C : { ...C, input: n.ariaLabel };
1795
+ }), re = (C) => {
1796
+ const B = {
1797
+ year: "numeric",
1798
+ month: "numeric",
1799
+ day: "numeric"
1800
+ };
1801
+ n.type === "datetime-local" && (B.hour = "numeric", B.minute = "numeric", B.hour12 = !F);
1802
+ const D = (V) => new Intl.DateTimeFormat(h, B).format(V);
1803
+ return Array.isArray(C) ? C.map((V) => V != null ? D(V) : "").join(" - ") : D(C);
1804
+ };
1805
+ j(
1806
+ () => n.modelValue,
1807
+ (C) => {
1808
+ E.value !== C && (E.value = C);
1809
+ }
1810
+ ), j(E, (C, B) => {
1811
+ C !== B && C !== n.modelValue && (p.value = null, a("update:modelValue", C));
1812
+ });
1813
+ function ae() {
1814
+ E.value = null, a("update:modelValue", null);
1815
+ }
1816
+ function te(C) {
1817
+ p.value = C;
1818
+ }
1819
+ function ce() {
1820
+ p.value = null;
1821
+ }
1822
+ function se(C) {
1823
+ p.value != null && (E.value = [p.value, null], p.value = null), b.value = !1, a("blur", C);
1824
+ }
1825
+ function q() {
1826
+ b.value = !0, a("focus");
1827
+ }
1828
+ return (C, B) => r(o) ? (f(), y("div", ml, [
1829
+ e.label ? (f(), P(r(ne), {
1830
+ key: 0,
1831
+ variant: "block",
1832
+ width: 60 + (e.label?.length || 0) * 4,
1833
+ height: 11
1834
+ }, null, 8, ["width"])) : w("", !0),
1835
+ M(r(ne), {
1836
+ variant: "block",
1837
+ width: "100%",
1838
+ height: 36
1839
+ })
1840
+ ])) : (f(), y("div", {
1841
+ key: 1,
1842
+ class: W(["vc-date-picker", [
1843
+ {
1844
+ "vc-date-picker--error": r(m),
1845
+ "vc-date-picker--disabled": r(g),
1846
+ "vc-date-picker--focused": b.value
1847
+ }
1848
+ ]])
1849
+ }, [
1850
+ e.label ? (f(), P(r(Je), {
1851
+ key: 0,
1852
+ id: r(s),
1853
+ class: "vc-date-picker__label",
1854
+ required: e.required,
1855
+ multilanguage: e.multilanguage,
1856
+ "current-language": e.currentLanguage,
1857
+ error: r(m)
1858
+ }, oe({
1859
+ default: O(() => [
1860
+ x("span", null, A(e.label), 1)
1861
+ ]),
1862
+ _: 2
1863
+ }, [
1864
+ e.tooltip ? {
1865
+ name: "tooltip",
1866
+ fn: O(() => [
1867
+ Z(A(e.tooltip), 1)
1868
+ ]),
1869
+ key: "0"
1870
+ } : void 0
1871
+ ]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) : w("", !0),
1872
+ x("div", {
1873
+ class: W(["vc-date-picker__field-wrapper", {
1874
+ "vc-date-picker__field-wrapper--default": e.size === "default",
1875
+ "vc-date-picker__field-wrapper--small": e.size === "small"
1876
+ }])
1877
+ }, [
1878
+ x("div", pl, [
1879
+ x("div", bl, [
1880
+ M(r(An), ee({
1881
+ modelValue: E.value,
1882
+ "onUpdate:modelValue": B[0] || (B[0] = (D) => E.value = D),
1883
+ placeholder: e.placeholder || (e.type === "datetime-local" ? C.$t("COMPONENTS.MOLECULES.VC_INPUT.DATE_TIME_PLACEHOLDER") : C.$t("COMPONENTS.MOLECULES.VC_INPUT.DATE_PLACEHOLDER")),
1884
+ disabled: r(g),
1885
+ name: e.name,
1886
+ autofocus: e.autofocus,
1887
+ "max-date": S.value,
1888
+ "time-picker-inline": "",
1889
+ "enable-time-picker": e.type === "datetime-local",
1890
+ format: re,
1891
+ locale: r(h),
1892
+ "start-time": { hours: 0, minutes: 0 },
1893
+ clearable: !1,
1894
+ config: { closeOnAutoApply: !1 },
1895
+ "auto-apply": "",
1896
+ "teleport-center": r(i),
1897
+ is24: r(F)
1898
+ }, _.value, {
1899
+ "aria-labels": J.value,
1900
+ teleport: r(l) ? "body" : void 0,
1901
+ "aria-invalid": r(m) || void 0,
1902
+ "aria-required": r(d),
1903
+ "aria-describedby": r(c),
1904
+ "aria-labelledby": e.label ? r(s) : void 0,
1905
+ class: "vc-date-picker__input",
1906
+ tabindex: "0",
1907
+ onFocus: q,
1908
+ onClosed: se,
1909
+ onRangeStart: te,
1910
+ onRangeEnd: ce,
1911
+ onTooltipOpen: q,
1912
+ onTooltipClose: se
1913
+ }), null, 16, ["modelValue", "placeholder", "disabled", "name", "autofocus", "max-date", "enable-time-picker", "locale", "teleport-center", "is24", "aria-labels", "teleport", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby"]),
1914
+ e.clearable && E.value && !e.disabled ? (f(), y("button", {
1915
+ key: 0,
1916
+ type: "button",
1917
+ class: "vc-date-picker__clear",
1918
+ "aria-label": C.$t("COMPONENTS.MOLECULES.VC_DATE_PICKER.CLEAR"),
1919
+ onClick: ae
1920
+ }, [
1921
+ M(r(U), {
1922
+ size: "xs",
1923
+ icon: "lucide-x"
1924
+ })
1925
+ ], 8, yl)) : w("", !0)
1926
+ ]),
1927
+ e.loading ? (f(), y("div", hl, [
1928
+ M(r(U), {
1929
+ icon: "lucide-loader-2",
1930
+ class: "vc-date-picker__loading-icon",
1931
+ size: "m"
1932
+ })
1933
+ ])) : w("", !0)
1934
+ ])
1935
+ ], 2),
1936
+ M(Pe, {
1937
+ name: "slide-up",
1938
+ mode: "out-in"
1939
+ }, {
1940
+ default: O(() => [
1941
+ r(m) && e.errorMessage ? (f(), y("div", kl, [
1942
+ M(r(me), {
1943
+ id: r(u),
1944
+ class: "vc-date-picker__hint-error",
1945
+ error: !0
1946
+ }, {
1947
+ default: O(() => [
1948
+ Z(A(e.errorMessage), 1)
1949
+ ]),
1950
+ _: 1
1951
+ }, 8, ["id"])
1952
+ ])) : (f(), y("div", Il, [
1953
+ e.hint ? (f(), P(r(me), {
1954
+ key: 0,
1955
+ id: r(v),
1956
+ class: "vc-date-picker__desc"
1957
+ }, {
1958
+ default: O(() => [
1959
+ Z(A(e.hint), 1)
1960
+ ]),
1961
+ _: 1
1962
+ }, 8, ["id"])) : w("", !0)
1963
+ ]))
1964
+ ]),
1965
+ _: 1
1966
+ })
1967
+ ], 2));
1968
+ }
1969
+ }), $l = {
1970
+ key: 0,
1971
+ class: "vc-color-input vc-color-input--skeleton"
1972
+ }, wl = { class: "vc-color-input__field-container" }, Ol = { class: "vc-color-input__field" }, El = ["id", "placeholder", "disabled", "name", "autofocus", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby", "aria-label"], Ll = { class: "vc-color-input__color-container" }, Bl = ["aria-label"], Cl = ["value"], xl = ["aria-label"], Tl = {
1973
+ key: 0,
1974
+ class: "vc-color-input__loading"
1975
+ }, Rl = { key: 0 }, Ml = { key: 1 }, Al = /* @__PURE__ */ z({
1976
+ __name: "vc-color-input",
1977
+ props: {
1978
+ modelValue: {},
1979
+ ariaLabel: {},
1980
+ placeholder: {},
1981
+ hint: {},
1982
+ clearable: { type: Boolean },
1983
+ loading: { type: Boolean },
1984
+ autofocus: { type: Boolean },
1985
+ size: { default: "default" },
1986
+ multilanguage: { type: Boolean },
1987
+ currentLanguage: {},
1988
+ label: {},
1989
+ tooltip: {},
1990
+ disabled: { type: Boolean },
1991
+ required: { type: Boolean },
1992
+ name: { default: "Field" },
1993
+ error: { type: Boolean },
1994
+ errorMessage: {}
1995
+ },
1996
+ emits: ["update:modelValue", "blur", "focus"],
1997
+ setup(e, { expose: t, emit: n }) {
1998
+ const a = Oe(), o = e, i = n, {
1999
+ fieldId: l,
2000
+ labelId: s,
2001
+ errorId: u,
2002
+ hintId: v,
2003
+ invalid: m,
2004
+ resolvedDisabled: g,
2005
+ ariaRequired: d,
2006
+ ariaDescribedBy: c
2007
+ } = He(o), b = I(!1), h = I(!1), E = I(), p = I(), S = I(o.modelValue ?? ""), F = I("");
2008
+ function K(q) {
2009
+ if (!q || typeof q != "string") {
2010
+ F.value = "";
2011
+ return;
2012
+ }
2013
+ const C = q.trim();
2014
+ if (ea(C)) {
2015
+ F.value = It(C);
2016
+ return;
2017
+ }
2018
+ const B = _n(C);
2019
+ B && (F.value = B);
2020
+ }
2021
+ j(
2022
+ () => o.modelValue,
2023
+ (q) => {
2024
+ h.value || (h.value = !0, S.value = q ?? "", Se(() => {
2025
+ K(q ?? ""), h.value = !1;
2026
+ }));
2027
+ },
2028
+ { immediate: !0 }
2029
+ ), j(F, (q) => {
2030
+ q && p.value && (p.value.value = q);
2031
+ });
2032
+ function _() {
2033
+ h.value || (h.value = !0, i("update:modelValue", S.value || null), Se(() => {
2034
+ K(S.value), h.value = !1;
2035
+ }));
2036
+ }
2037
+ function J(q) {
2038
+ const C = q.target;
2039
+ if (C?.value) {
2040
+ const B = It(C.value);
2041
+ F.value = B, S.value = B, i("update:modelValue", B);
2042
+ }
2043
+ }
2044
+ function re() {
2045
+ p.value?.click();
2046
+ }
2047
+ function ae() {
2048
+ S.value = "", F.value = "", i("update:modelValue", null);
2049
+ }
2050
+ function te(q) {
2051
+ b.value = !1, i("blur", q);
2052
+ }
2053
+ function ce() {
2054
+ b.value = !0, i("focus");
2055
+ }
2056
+ function se() {
2057
+ E.value?.focus();
2058
+ }
2059
+ return t({ focus: se }), (q, C) => r(a) ? (f(), y("div", $l, [
2060
+ e.label ? (f(), P(r(ne), {
2061
+ key: 0,
2062
+ variant: "block",
2063
+ width: 60 + (e.label?.length || 0) * 4,
2064
+ height: 11
2065
+ }, null, 8, ["width"])) : w("", !0),
2066
+ M(r(ne), {
2067
+ variant: "block",
2068
+ width: "100%",
2069
+ height: 36
2070
+ })
2071
+ ])) : (f(), y("div", {
2072
+ key: 1,
2073
+ class: W(["vc-color-input", [
2074
+ {
2075
+ "vc-color-input--error": r(m),
2076
+ "vc-color-input--disabled": r(g),
2077
+ "vc-color-input--focused": b.value
2078
+ }
2079
+ ]])
2080
+ }, [
2081
+ e.label ? (f(), P(r(Je), {
2082
+ key: 0,
2083
+ id: r(s),
2084
+ "html-for": r(l),
2085
+ class: "vc-color-input__label",
2086
+ required: e.required,
2087
+ multilanguage: e.multilanguage,
2088
+ "current-language": e.currentLanguage,
2089
+ error: r(m)
2090
+ }, oe({
2091
+ default: O(() => [
2092
+ x("span", null, A(e.label), 1)
2093
+ ]),
2094
+ _: 2
2095
+ }, [
2096
+ e.tooltip ? {
2097
+ name: "tooltip",
2098
+ fn: O(() => [
2099
+ Z(A(e.tooltip), 1)
2100
+ ]),
2101
+ key: "0"
2102
+ } : void 0
2103
+ ]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) : w("", !0),
2104
+ x("div", {
2105
+ class: W(["vc-color-input__field-wrapper", {
2106
+ "vc-color-input__field-wrapper--default": e.size === "default",
2107
+ "vc-color-input__field-wrapper--small": e.size === "small"
2108
+ }])
2109
+ }, [
2110
+ x("div", wl, [
2111
+ x("div", Ol, [
2112
+ ct(x("input", {
2113
+ id: r(l),
2114
+ ref_key: "inputRef",
2115
+ ref: E,
2116
+ "onUpdate:modelValue": C[0] || (C[0] = (B) => S.value = B),
2117
+ placeholder: e.placeholder,
2118
+ type: "text",
2119
+ disabled: r(g),
2120
+ name: e.name,
2121
+ autofocus: e.autofocus,
2122
+ "aria-invalid": r(m) || void 0,
2123
+ "aria-required": r(d),
2124
+ "aria-describedby": r(c),
2125
+ "aria-labelledby": e.label ? r(s) : void 0,
2126
+ "aria-label": e.label ? void 0 : e.ariaLabel,
2127
+ class: "vc-color-input__input",
2128
+ tabindex: "0",
2129
+ onBlur: te,
2130
+ onFocus: ce,
2131
+ onInput: _
2132
+ }, null, 40, El), [
2133
+ [sn, S.value]
2134
+ ]),
2135
+ x("div", Ll, [
2136
+ x("button", {
2137
+ type: "button",
2138
+ class: "vc-color-input__color-square",
2139
+ style: Ve({ backgroundColor: F.value || "#ffffff" }),
2140
+ "aria-label": `Pick color${F.value ? ": " + F.value : ""}`,
2141
+ onClick: re
2142
+ }, null, 12, Bl),
2143
+ x("input", {
2144
+ ref_key: "colorPickerRef",
2145
+ ref: p,
2146
+ type: "color",
2147
+ value: F.value,
2148
+ class: "vc-color-input__color-picker-hidden",
2149
+ tabindex: "-1",
2150
+ "aria-hidden": "true",
2151
+ onChange: J
2152
+ }, null, 40, Cl)
2153
+ ]),
2154
+ e.clearable && S.value && !e.disabled ? (f(), y("button", {
2155
+ key: 0,
2156
+ type: "button",
2157
+ class: "vc-color-input__clear",
2158
+ "aria-label": q.$t("COMPONENTS.MOLECULES.VC_COLOR_INPUT.CLEAR"),
2159
+ onClick: ae
2160
+ }, [
2161
+ M(r(U), {
2162
+ size: "xs",
2163
+ icon: "lucide-x"
2164
+ })
2165
+ ], 8, xl)) : w("", !0)
2166
+ ]),
2167
+ e.loading ? (f(), y("div", Tl, [
2168
+ M(r(U), {
2169
+ icon: "lucide-loader-2",
2170
+ class: "vc-color-input__loading-icon",
2171
+ size: "m"
2172
+ })
2173
+ ])) : w("", !0)
2174
+ ])
2175
+ ], 2),
2176
+ M(Pe, {
2177
+ name: "slide-up",
2178
+ mode: "out-in"
2179
+ }, {
2180
+ default: O(() => [
2181
+ r(m) && e.errorMessage ? (f(), y("div", Rl, [
2182
+ M(r(me), {
2183
+ id: r(u),
2184
+ class: "vc-color-input__hint-error",
2185
+ error: !0
2186
+ }, {
2187
+ default: O(() => [
2188
+ Z(A(e.errorMessage), 1)
2189
+ ]),
2190
+ _: 1
2191
+ }, 8, ["id"])
2192
+ ])) : (f(), y("div", Ml, [
2193
+ e.hint ? (f(), P(r(me), {
2194
+ key: 0,
2195
+ id: r(v),
2196
+ class: "vc-color-input__desc"
2197
+ }, {
2198
+ default: O(() => [
2199
+ Z(A(e.hint), 1)
2200
+ ]),
2201
+ _: 1
2202
+ }, 8, ["id"])) : w("", !0)
2203
+ ]))
2204
+ ]),
2205
+ _: 1
2206
+ })
2207
+ ], 2));
2208
+ }
2209
+ }), Nl = { class: "vc-input__container" }, Dl = {
2210
+ key: 0,
2211
+ class: "vc-input__prepend"
2212
+ }, Vl = { class: "vc-input__field-container" }, Pl = {
2213
+ key: 0,
2214
+ class: "vc-input__prepend-inner"
2215
+ }, Fl = { class: "vc-input__field" }, zl = {
2216
+ key: 0,
2217
+ class: "vc-input__prefix"
2218
+ }, ql = ["id", "placeholder", "type", "disabled", "name", "maxlength", "autofocus", "autocomplete", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby", "aria-label"], Ul = {
2219
+ key: 1,
2220
+ class: "vc-input__suffix"
2221
+ }, Kl = ["aria-label"], Wl = ["aria-label"], jl = {
2222
+ key: 1,
2223
+ class: "vc-input__append-inner"
2224
+ }, Hl = {
2225
+ key: 2,
2226
+ class: "vc-input__loading"
2227
+ }, Gl = {
2228
+ key: 1,
2229
+ class: "vc-input__append"
2230
+ }, Yl = { key: 0 }, Jl = { key: 1 }, bt = /* @__PURE__ */ z({
2231
+ inheritAttrs: !1,
2232
+ __name: "vc-input",
2233
+ props: {
2234
+ modelValue: {},
2235
+ type: { default: "text" },
2236
+ prefix: {},
2237
+ suffix: {},
2238
+ debounce: {},
2239
+ maxlength: { default: "1024" },
2240
+ step: { default: "1" },
2241
+ autocomplete: {},
2242
+ ariaLabel: {},
2243
+ datePickerOptions: {},
2244
+ placeholder: {},
2245
+ hint: {},
2246
+ clearable: { type: Boolean },
2247
+ loading: { type: Boolean },
2248
+ autofocus: { type: Boolean },
2249
+ size: { default: "default" },
2250
+ multilanguage: { type: Boolean },
2251
+ currentLanguage: {},
2252
+ label: {},
2253
+ tooltip: {},
2254
+ disabled: { type: Boolean },
2255
+ required: { type: Boolean },
2256
+ name: { default: "Field" },
2257
+ error: { type: Boolean },
2258
+ errorMessage: {}
2259
+ },
2260
+ emits: ["update:modelValue", "blur", "focus"],
2261
+ setup(e, { emit: t }) {
2262
+ const n = e, a = Lt(), o = $(() => {
2263
+ const { class: k, ...R } = a;
2264
+ return R;
2265
+ }), i = t, l = Oe(), {
2266
+ fieldId: s,
2267
+ labelId: u,
2268
+ errorId: v,
2269
+ hintId: m,
2270
+ invalid: g,
2271
+ resolvedDisabled: d,
2272
+ resolvedName: c,
2273
+ ariaRequired: b,
2274
+ ariaDescribedBy: h
2275
+ } = He(n);
2276
+ let E, p;
2277
+ const S = I(), F = I(), K = I(r(n.type)), _ = I(!1), J = I(), re = $({
2278
+ get() {
2279
+ return K.value === "integer" ? "number" : K.value;
2280
+ },
2281
+ set(k) {
2282
+ K.value = k;
2283
+ }
2284
+ }), ae = $(() => r(n.modelValue)), te = $({
2285
+ get() {
2286
+ return (n.type === "integer" || n.type === "number") && isNaN(S.value) ? "" : S.value;
2287
+ },
2288
+ set(k) {
2289
+ (n.type === "number" || n.type === "integer") && k < 0 ? S.value = Math.abs(k) : S.value = k, se(S.value);
2290
+ }
2291
+ });
2292
+ j(
2293
+ ae,
2294
+ (k) => {
2295
+ n.type === "number" && k !== null ? J.value = parseFloat(k) : n.type === "integer" && k !== null ? J.value = Math.trunc(k) : J.value = k, S.value !== J.value && (S.value = J.value);
2296
+ },
2297
+ { immediate: !0 }
2298
+ );
2299
+ function ce(k) {
2300
+ const R = ["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], L = k.key;
2301
+ if ((n.type === "number" || n.type === "integer") && (L === "-" || L === "e" || L === "+") && k.preventDefault(), n.type === "integer" && !/^\d$/.test(L) && !R.includes(L)) {
2302
+ k.preventDefault();
2303
+ return;
2304
+ }
2305
+ }
2306
+ function se(k) {
2307
+ q(k);
2308
+ }
2309
+ function q(k) {
2310
+ p = () => {
2311
+ if (J.value !== k) {
2312
+ let R;
2313
+ n.type === "number" && k !== null && k !== void 0 ? R = k !== "" ? parseFloat(k) : null : n.type === "integer" && k !== null && k !== void 0 ? R = k !== "" ? Math.trunc(parseInt(k)) : null : R = k, i("update:modelValue", R);
2314
+ }
2315
+ p = void 0;
2316
+ }, n.debounce !== void 0 ? (clearTimeout(E), E = setTimeout(p, +n.debounce)) : p();
2317
+ }
2318
+ function C() {
2319
+ S.value = null, i("update:modelValue", null);
2320
+ }
2321
+ function B(k) {
2322
+ _.value = !1, i("blur", k);
2323
+ }
2324
+ function D() {
2325
+ F.value?.focus();
2326
+ }
2327
+ function V() {
2328
+ _.value = !0, i("focus");
2329
+ }
2330
+ return (k, R) => r(l) ? (f(), y("div", ee({ key: 0 }, o.value, {
2331
+ class: ["vc-input vc-input--skeleton", k.$attrs.class]
2332
+ }), [
2333
+ e.label ? (f(), P(r(ne), {
2334
+ key: 0,
2335
+ variant: "block",
2336
+ width: 60 + (e.label?.length || 0) * 4,
2337
+ height: 11
2338
+ }, null, 8, ["width"])) : w("", !0),
2339
+ M(r(ne), {
2340
+ variant: "block",
2341
+ width: "100%",
2342
+ height: 36
2343
+ })
2344
+ ], 16)) : e.type === "date" || e.type === "datetime-local" ? (f(), P(r(Sl), ee({ key: 1 }, r(a), {
2345
+ "model-value": e.modelValue,
2346
+ type: e.type,
2347
+ "date-picker-options": e.datePickerOptions,
2348
+ label: e.label,
2349
+ placeholder: e.placeholder,
2350
+ hint: e.hint,
2351
+ disabled: e.disabled,
2352
+ error: e.error,
2353
+ "error-message": e.errorMessage,
2354
+ required: e.required,
2355
+ clearable: e.clearable,
2356
+ loading: e.loading,
2357
+ autofocus: e.autofocus,
2358
+ size: e.size,
2359
+ tooltip: e.tooltip,
2360
+ multilanguage: e.multilanguage,
2361
+ "current-language": e.currentLanguage,
2362
+ name: e.name,
2363
+ "aria-label": e.ariaLabel,
2364
+ "onUpdate:modelValue": R[0] || (R[0] = (L) => i("update:modelValue", L ?? null)),
2365
+ onBlur: R[1] || (R[1] = (L) => i("blur", L)),
2366
+ onFocus: R[2] || (R[2] = (L) => i("focus"))
2367
+ }), null, 16, ["model-value", "type", "date-picker-options", "label", "placeholder", "hint", "disabled", "error", "error-message", "required", "clearable", "loading", "autofocus", "size", "tooltip", "multilanguage", "current-language", "name", "aria-label"])) : e.type === "color" ? (f(), P(r(Al), ee({ key: 2 }, r(a), {
2368
+ "model-value": e.modelValue ?? null,
2369
+ label: e.label,
2370
+ placeholder: e.placeholder,
2371
+ hint: e.hint,
2372
+ disabled: e.disabled,
2373
+ error: e.error,
2374
+ "error-message": e.errorMessage,
2375
+ required: e.required,
2376
+ clearable: e.clearable,
2377
+ loading: e.loading,
2378
+ autofocus: e.autofocus,
2379
+ size: e.size,
2380
+ tooltip: e.tooltip,
2381
+ multilanguage: e.multilanguage,
2382
+ "current-language": e.currentLanguage,
2383
+ name: e.name,
2384
+ "aria-label": e.ariaLabel,
2385
+ "onUpdate:modelValue": R[3] || (R[3] = (L) => i("update:modelValue", L)),
2386
+ onBlur: R[4] || (R[4] = (L) => i("blur", L)),
2387
+ onFocus: R[5] || (R[5] = (L) => i("focus"))
2388
+ }), null, 16, ["model-value", "label", "placeholder", "hint", "disabled", "error", "error-message", "required", "clearable", "loading", "autofocus", "size", "tooltip", "multilanguage", "current-language", "name", "aria-label"])) : (f(), y("div", ee({ key: 3 }, o.value, {
2389
+ class: ["vc-input", [
2390
+ k.$attrs.class,
2391
+ `vc-input--${e.type}`,
2392
+ {
2393
+ "vc-input--clearable": e.clearable,
2394
+ "vc-input--error": r(g),
2395
+ "vc-input--disabled": r(d),
2396
+ "vc-input--focused": _.value
2397
+ }
2398
+ ]]
2399
+ }), [
2400
+ e.label ? (f(), P(r(Je), {
2401
+ key: 0,
2402
+ id: r(u),
2403
+ "html-for": r(s),
2404
+ class: "vc-input__label",
2405
+ required: e.required,
2406
+ multilanguage: e.multilanguage,
2407
+ "current-language": e.currentLanguage,
2408
+ error: r(g)
2409
+ }, oe({
2410
+ default: O(() => [
2411
+ x("span", null, A(e.label), 1)
2412
+ ]),
2413
+ _: 2
2414
+ }, [
2415
+ e.tooltip ? {
2416
+ name: "tooltip",
2417
+ fn: O(() => [
2418
+ Z(A(e.tooltip), 1)
2419
+ ]),
2420
+ key: "0"
2421
+ } : void 0
2422
+ ]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) : w("", !0),
2423
+ x("div", Nl, [
2424
+ k.$slots.prepend ? (f(), y("div", Dl, [
2425
+ T(k.$slots, "prepend", { focus: D })
2426
+ ])) : w("", !0),
2427
+ x("div", {
2428
+ class: W(["vc-input__field-wrapper", {
2429
+ "vc-input__field-wrapper--default": e.size === "default",
2430
+ "vc-input__field-wrapper--small": e.size === "small"
2431
+ }])
2432
+ }, [
2433
+ x("div", Vl, [
2434
+ k.$slots["prepend-inner"] ? (f(), y("div", Pl, [
2435
+ T(k.$slots, "prepend-inner", { focus: D })
2436
+ ])) : w("", !0),
2437
+ x("div", Fl, [
2438
+ e.prefix ? (f(), y("div", zl, A(e.prefix), 1)) : w("", !0),
2439
+ T(k.$slots, "control", {
2440
+ editable: r(d),
2441
+ focused: e.autofocus,
2442
+ modelValue: te.value,
2443
+ emitValue: q,
2444
+ placeholder: e.placeholder
2445
+ }, () => [
2446
+ ct(x("input", {
2447
+ id: r(s),
2448
+ ref_key: "inputRef",
2449
+ ref: F,
2450
+ "onUpdate:modelValue": R[6] || (R[6] = (L) => te.value = L),
2451
+ placeholder: e.placeholder,
2452
+ type: re.value,
2453
+ disabled: r(d),
2454
+ name: r(c),
2455
+ maxlength: e.maxlength,
2456
+ autofocus: e.autofocus,
2457
+ autocomplete: e.autocomplete,
2458
+ "aria-invalid": r(g) || void 0,
2459
+ "aria-required": r(b),
2460
+ "aria-describedby": r(h),
2461
+ "aria-labelledby": e.label ? r(u) : void 0,
2462
+ "aria-label": e.label ? void 0 : e.ariaLabel,
2463
+ class: "vc-input__input",
2464
+ tabindex: "0",
2465
+ onKeydown: ce,
2466
+ onBlur: B,
2467
+ onFocus: V
2468
+ }, null, 40, ql), [
2469
+ [un, te.value]
2470
+ ])
2471
+ ]),
2472
+ e.suffix ? (f(), y("div", Ul, A(e.suffix), 1)) : w("", !0),
2473
+ e.clearable && J.value && !r(d) && e.type !== "password" ? (f(), y("button", {
2474
+ key: 2,
2475
+ type: "button",
2476
+ class: "vc-input__clear",
2477
+ "aria-label": k.$t("COMPONENTS.CONTROLS.CLEAR"),
2478
+ onClick: C
2479
+ }, [
2480
+ M(r(U), {
2481
+ size: "xs",
2482
+ icon: "lucide-x"
2483
+ })
2484
+ ], 8, Kl)) : w("", !0),
2485
+ e.type === "password" ? (f(), y("button", {
2486
+ key: 3,
2487
+ type: "button",
2488
+ class: "vc-input__showhide",
2489
+ "aria-label": K.value === "password" ? k.$t("COMPONENTS.CONTROLS.SHOW_PASSWORD") : k.$t("COMPONENTS.CONTROLS.HIDE_PASSWORD"),
2490
+ onClick: R[7] || (R[7] = (L) => K.value = K.value === "password" ? "text" : "password")
2491
+ }, [
2492
+ M(r(U), {
2493
+ size: "s",
2494
+ icon: K.value === "password" ? "lucide-eye-off" : "lucide-eye"
2495
+ }, null, 8, ["icon"])
2496
+ ], 8, Wl)) : w("", !0)
2497
+ ]),
2498
+ k.$slots["append-inner"] ? (f(), y("div", jl, [
2499
+ T(k.$slots, "append-inner", { focus: D })
2500
+ ])) : w("", !0),
2501
+ e.loading ? (f(), y("div", Hl, [
2502
+ M(r(U), {
2503
+ icon: "lucide-loader-2",
2504
+ class: "vc-input__loading-icon",
2505
+ size: "m"
2506
+ })
2507
+ ])) : w("", !0)
2508
+ ])
2509
+ ], 2),
2510
+ k.$slots.append ? (f(), y("div", Gl, [
2511
+ T(k.$slots, "append", { focus: D })
2512
+ ])) : w("", !0)
2513
+ ]),
2514
+ M(Pe, {
2515
+ name: "slide-up",
2516
+ mode: "out-in"
2517
+ }, {
2518
+ default: O(() => [
2519
+ r(g) && e.errorMessage ? (f(), y("div", Yl, [
2520
+ T(k.$slots, "error", {}, () => [
2521
+ M(r(me), {
2522
+ id: r(v),
2523
+ class: "vc-input__hint-error",
2524
+ error: !0
2525
+ }, {
2526
+ default: O(() => [
2527
+ Z(A(e.errorMessage), 1)
2528
+ ]),
2529
+ _: 1
2530
+ }, 8, ["id"])
2531
+ ])
2532
+ ])) : (f(), y("div", Jl, [
2533
+ T(k.$slots, "hint", {}, () => [
2534
+ e.hint ? (f(), P(r(me), {
2535
+ key: 0,
2536
+ id: r(m),
2537
+ class: "vc-input__desc"
2538
+ }, {
2539
+ default: O(() => [
2540
+ Z(A(e.hint), 1)
2541
+ ]),
2542
+ _: 1
2543
+ }, 8, ["id"])) : w("", !0)
2544
+ ])
2545
+ ]))
2546
+ ]),
2547
+ _: 3
2548
+ })
2549
+ ], 16));
2550
+ }
2551
+ }), yr = Mn.create({
2552
+ name: "fontSize",
2553
+ addOptions() {
2554
+ return {
2555
+ types: ["textStyle"]
2556
+ };
2557
+ },
2558
+ addGlobalAttributes() {
2559
+ return [
2560
+ {
2561
+ types: this.options.types,
2562
+ attributes: {
2563
+ fontSize: {
2564
+ default: null,
2565
+ parseHTML: (e) => e.style.fontSize?.replace(/['"]+/g, ""),
2566
+ renderHTML: (e) => e.fontSize ? {
2567
+ style: `font-size: ${e.fontSize}`
2568
+ } : {}
2569
+ }
2570
+ }
2571
+ }
2572
+ ];
2573
+ },
2574
+ addCommands() {
2575
+ return {
2576
+ setFontSize: (e) => ({ chain: t }) => t().setMark("textStyle", { fontSize: e }).run(),
2577
+ unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).run()
2578
+ };
2579
+ }
2580
+ });
2581
+ function Xl(e = {}) {
2582
+ const {
2583
+ containerSelector: t = '[role="menu"]',
2584
+ itemSelector: n = '[tabindex="0"]',
2585
+ onEnter: a,
2586
+ onEscape: o,
2587
+ loop: i = !0
2588
+ } = e, l = I(null), s = I(-1), u = (p) => {
2589
+ (s.value >= p.length || s.value < 0) && (s.value = p.length > 0 ? 0 : -1);
2590
+ }, v = (p) => {
2591
+ if (!l.value) return;
2592
+ const S = Array.from(l.value.querySelectorAll(n));
2593
+ if (S.length)
2594
+ switch (u(S), p.key) {
2595
+ case "Tab":
2596
+ m(p, S);
2597
+ break;
2598
+ case "ArrowDown":
2599
+ p.preventDefault(), g(S);
2600
+ break;
2601
+ case "ArrowUp":
2602
+ p.preventDefault(), d(S);
2603
+ break;
2604
+ case "Enter":
2605
+ case " ":
2606
+ if (s.value >= 0 && s.value < S.length) {
2607
+ const F = S[s.value];
2608
+ F && (p.preventDefault(), a ? a(F) : typeof F.click == "function" && F.click());
2609
+ }
2610
+ break;
2611
+ case "Escape":
2612
+ o && (p.preventDefault(), p.stopPropagation(), o());
2613
+ break;
2614
+ }
2615
+ }, m = (p, S) => {
2616
+ p.shiftKey ? d(S) : g(S);
2617
+ }, g = (p) => {
2618
+ if (!p.length) return;
2619
+ if (u(p), s.value < p.length - 1)
2620
+ s.value++;
2621
+ else if (i)
2622
+ s.value = 0;
2623
+ else
2624
+ return;
2625
+ const S = p[s.value];
2626
+ S && typeof S.focus == "function" && S.focus();
2627
+ }, d = (p) => {
2628
+ if (!p.length) return;
2629
+ if (u(p), s.value > 0)
2630
+ s.value--;
2631
+ else if (i)
2632
+ s.value = p.length - 1;
2633
+ else
2634
+ return;
2635
+ const S = p[s.value];
2636
+ S && typeof S.focus == "function" && S.focus();
2637
+ }, c = (p) => {
2638
+ if (!p.length) return;
2639
+ s.value = 0;
2640
+ const S = p[0];
2641
+ S && typeof S.focus == "function" && S.focus();
2642
+ }, b = (p) => {
2643
+ if (!p.length) return;
2644
+ s.value = p.length - 1;
2645
+ const S = p[p.length - 1];
2646
+ S && typeof S.focus == "function" && S.focus();
2647
+ }, h = (p) => {
2648
+ l.value && l.value.removeEventListener("keydown", v), l.value = p, p.addEventListener("keydown", v);
2649
+ }, E = () => {
2650
+ l.value && (l.value.removeEventListener("keydown", v), l.value = null);
2651
+ };
2652
+ return je(() => {
2653
+ if (typeof document < "u" && t) {
2654
+ const p = document.querySelector(t);
2655
+ p && h(p);
2656
+ }
2657
+ }), rt(() => {
2658
+ E();
2659
+ }), {
2660
+ initKeyboardNavigation: h,
2661
+ cleanupKeyboardNavigation: E,
2662
+ focusNextElement: () => {
2663
+ if (l.value) {
2664
+ const p = Array.from(l.value.querySelectorAll(n));
2665
+ g(p);
2666
+ }
2667
+ },
2668
+ focusPreviousElement: () => {
2669
+ if (l.value) {
2670
+ const p = Array.from(l.value.querySelectorAll(n));
2671
+ d(p);
2672
+ }
2673
+ },
2674
+ focusFirstElement: () => {
2675
+ if (l.value) {
2676
+ const p = Array.from(l.value.querySelectorAll(n));
2677
+ c(p);
2678
+ }
2679
+ },
2680
+ focusLastElement: () => {
2681
+ if (l.value) {
2682
+ const p = Array.from(l.value.querySelectorAll(n));
2683
+ b(p);
2684
+ }
2685
+ },
2686
+ setFocusedIndex: (p) => {
2687
+ if (l.value) {
2688
+ const S = Array.from(l.value.querySelectorAll(n));
2689
+ p >= 0 && p < S.length && (s.value = p);
2690
+ }
2691
+ },
2692
+ getFocusedIndex: () => s.value
2693
+ };
2694
+ }
2695
+ function Ot(e, t) {
2696
+ const n = e !== void 0 ? e : t;
2697
+ return typeof n == "function" ? n : (a) => a === null || typeof a != "object" ? a : n && n in a ? a[n] : a;
2698
+ }
2699
+ function Zl(e) {
2700
+ const t = $(() => Ot(e.optionValue(), "id")), n = $(() => Ot(e.optionLabel(), "title"));
2701
+ function a(l, s, u, v) {
2702
+ const m = (g) => De(t.value(g), l);
2703
+ return u.find(m) || v.find(m) || s.find(m) || l;
2704
+ }
2705
+ function o(l) {
2706
+ return n.value(l);
2707
+ }
2708
+ function i(l) {
2709
+ return l != null && ("" + l).length > 0;
2710
+ }
2711
+ return {
2712
+ getOptionValue: t,
2713
+ getOptionLabel: n,
2714
+ getOption: a,
2715
+ getEmittingOptionValue: o,
2716
+ fieldValueIsFilled: i
2717
+ };
2718
+ }
2719
+ function Ql() {
2720
+ const e = I(null), t = I(!1);
2721
+ let n = null, a = null;
2722
+ function o() {
2723
+ if (e.value && !t.value) {
2724
+ const l = e.value.getBoundingClientRect();
2725
+ l.top < window.innerHeight && l.bottom > 0 && l.left < window.innerWidth && l.right > 0 && (t.value = !0);
2726
+ }
2727
+ }
2728
+ function i() {
2729
+ if (!t.value && e.value) {
2730
+ const l = e.value.getBoundingClientRect();
2731
+ l.top < window.innerHeight && l.bottom > 0 && l.left < window.innerWidth && l.right > 0 && (t.value = !0);
2732
+ }
2733
+ }
2734
+ return je(() => {
2735
+ e.value && (n = new IntersectionObserver(
2736
+ ([l]) => {
2737
+ t.value = l.isIntersecting;
2738
+ },
2739
+ { threshold: 0.1 }
2740
+ ), n.observe(e.value), a = setTimeout(o, 100));
2741
+ }), Bt(() => {
2742
+ a !== null && (clearTimeout(a), a = null), n && e.value && n.unobserve(e.value), n && n.disconnect();
2743
+ }), {
2744
+ selectRootRef: e,
2745
+ isSelectVisible: t,
2746
+ ensureVisibility: i
2747
+ };
2748
+ }
2749
+ function _l(e) {
2750
+ const t = I(!1), n = I(!1), a = I(null), o = I(null);
2751
+ function i() {
2752
+ return {
2753
+ name: "sameWidth",
2754
+ fn({ rects: v }) {
2755
+ return {
2756
+ data: {
2757
+ width: e.outline() ? `${v.reference.width}px` : "max-content"
2758
+ }
2759
+ };
2760
+ }
2761
+ };
2762
+ }
2763
+ const l = ia(a, o, {
2764
+ placement: $(() => e.placement),
2765
+ middleware: $(() => [
2766
+ At({ fallbackPlacements: ["top", "bottom"] }),
2767
+ Nt({ mainAxis: !1 }),
2768
+ i(),
2769
+ lt({ mainAxis: 4 })
2770
+ ])
2771
+ }), s = $(() => ({
2772
+ top: `${l.y.value ?? 0}px`,
2773
+ left: `${l.x.value ?? 0}px`,
2774
+ width: l.middlewareData.value.sameWidth?.width
2775
+ }));
2776
+ j(
2777
+ () => l.isPositioned.value,
2778
+ (v) => {
2779
+ v && l.update();
2780
+ }
2781
+ );
2782
+ function u() {
2783
+ e.disabled() || (!t.value && !e.isSelectVisible.value && e.ensureVisibility(), t.value = !t.value);
2784
+ }
2785
+ return {
2786
+ isOpened: t,
2787
+ isFocused: n,
2788
+ dropdownToggleRef: a,
2789
+ dropdownRef: o,
2790
+ popper: l,
2791
+ dropdownStyle: s,
2792
+ toggleDropdown: u
2793
+ };
2794
+ }
2795
+ function eo(e) {
2796
+ const t = I([]), n = I(null), a = I(0), o = I(0), i = I(!1), l = I(!1), s = I(!1), u = I(!1), v = I(), m = I([]), g = I(!1), d = /* @__PURE__ */ new Map();
2797
+ let c = !1, b = 0, h = 0, E = 0, p;
2798
+ const S = $(() => n.value ?? t.value), F = $(() => n.value !== null ? !l.value && n.value.length < o.value : !i.value && t.value.length < a.value);
2799
+ function K(B) {
2800
+ for (const D of B) {
2801
+ const V = String(e.getOptionValue.value(D));
2802
+ d.set(V, D);
2803
+ }
2804
+ }
2805
+ function _() {
2806
+ n.value = null, u.value = !1, v.value = void 0, o.value = 0, h = 0, l.value = !1, E++, p && (clearTimeout(p), p = void 0);
2807
+ }
2808
+ async function J() {
2809
+ if (c)
2810
+ return;
2811
+ const B = e.options();
2812
+ if (typeof B == "function")
2813
+ try {
2814
+ s.value = !0;
2815
+ const D = await B(void 0, 0), V = D?.results ?? [];
2816
+ t.value = V, a.value = D?.totalCount ?? 0, b = V.length, i.value = V.length === 0 || b >= a.value, K(t.value), c = !0;
2817
+ } catch (D) {
2818
+ console.error("useSelectDataSource: error loading options", D), t.value = [], a.value = 0, b = 0, i.value = !0;
2819
+ } finally {
2820
+ s.value = !1;
2821
+ }
2822
+ else Array.isArray(B) && (t.value = [...B], a.value = t.value.length, b = t.value.length, i.value = !0, K(t.value), c = !0);
2823
+ }
2824
+ function re() {
2825
+ _();
2826
+ }
2827
+ async function ae() {
2828
+ const B = e.options();
2829
+ if (typeof B != "function" || s.value || !F.value) return;
2830
+ const D = n.value !== null, V = E, k = n.value;
2831
+ try {
2832
+ s.value = !0;
2833
+ const R = await B(v.value, D ? h : b);
2834
+ if (D && (n.value !== k || V !== E)) return;
2835
+ const L = R?.results ?? [];
2836
+ if (D ? h += L.length : b += L.length, L.length === 0) {
2837
+ D ? l.value = !0 : i.value = !0;
2838
+ return;
2839
+ }
2840
+ const H = D ? n.value : t.value, xe = new Set(H.map((Te) => String(e.getOptionValue.value(Te)))), de = L.filter((Te) => !xe.has(String(e.getOptionValue.value(Te))));
2841
+ D ? (n.value = [...H, ...de], o.value = R?.totalCount ?? o.value, h >= o.value && (l.value = !0)) : (t.value = [...H, ...de], a.value = R?.totalCount ?? a.value, b >= a.value && (i.value = !0)), K(de);
2842
+ } catch (R) {
2843
+ console.error("useSelectDataSource: error loading more", R);
2844
+ } finally {
2845
+ s.value = !1;
2846
+ }
2847
+ }
2848
+ async function te(B) {
2849
+ v.value = B;
2850
+ const D = e.options();
2851
+ if (typeof D == "function") {
2852
+ const V = ++E;
2853
+ try {
2854
+ u.value = !0;
2855
+ const k = await D(B);
2856
+ if (V !== E) return;
2857
+ const R = k?.results ?? [];
2858
+ n.value = R, o.value = k?.totalCount ?? 0, h = R.length, l.value = R.length === 0 || h >= o.value, K(R);
2859
+ } catch (k) {
2860
+ if (V !== E) return;
2861
+ console.error("useSelectDataSource: error searching", k), n.value = [], o.value = 0, h = 0, l.value = !0;
2862
+ } finally {
2863
+ V === E && (u.value = !1);
2864
+ }
2865
+ } else {
2866
+ const V = t.value.filter((k) => {
2867
+ const R = e.getOptionLabel.value(k);
2868
+ return String(R).toLowerCase().includes(B.toLowerCase());
2869
+ });
2870
+ n.value = V, o.value = V.length, h = V.length, l.value = !0;
2871
+ }
2872
+ }
2873
+ function ce(B) {
2874
+ if (!B?.target) return;
2875
+ const D = B.target.value, V = Number(e.debounce());
2876
+ p && clearTimeout(p), V > 0 ? p = setTimeout(() => {
2877
+ e.emit.search(D), te(D);
2878
+ }, V) : (e.emit.search(D), te(D));
2879
+ }
2880
+ function se() {
2881
+ _();
2882
+ }
2883
+ async function q(B) {
2884
+ if (B.length === 0) return [];
2885
+ const V = B.filter((L) => !d.has(String(L))).filter((L) => {
2886
+ const H = t.value.find((xe) => De(e.getOptionValue.value(xe), L));
2887
+ return H ? (d.set(String(L), H), !1) : !0;
2888
+ }), k = e.options();
2889
+ if (V.length > 0 && typeof k == "function") {
2890
+ try {
2891
+ g.value = !0;
2892
+ const H = await k(void 0, void 0, V);
2893
+ H?.results && K(H.results);
2894
+ } catch (H) {
2895
+ console.error("useSelectDataSource: error resolving", H);
2896
+ } finally {
2897
+ g.value = !1;
2898
+ }
2899
+ V.filter((H) => !d.has(String(H))).length > 0 && !c && await J();
2900
+ } else if (V.length > 0 && Array.isArray(k))
2901
+ for (const L of k) {
2902
+ const H = String(e.getOptionValue.value(L));
2903
+ V.includes(H) && d.set(H, L);
2904
+ }
2905
+ const R = B.map((L) => d.get(String(L))).filter(Boolean);
2906
+ return m.value = R, R;
2907
+ }
2908
+ async function C() {
2909
+ t.value = [], a.value = 0, b = 0, i.value = !1, _(), d.clear(), m.value = [], c = !1, await J();
2910
+ }
2911
+ return j(
2912
+ e.options,
2913
+ async () => {
2914
+ t.value = [], a.value = 0, b = 0, i.value = !1, _(), d.clear(), c = !1;
2915
+ const B = e.options();
2916
+ if (Array.isArray(B) && (t.value = [...B], a.value = t.value.length, b = t.value.length, i.value = !0, K(t.value), c = !0, m.value.length === 0)) {
2917
+ const D = m.value;
2918
+ (D.length === 0 ? t.value.filter((k) => {
2919
+ const R = String(e.getOptionValue.value(k));
2920
+ return d.has(R);
2921
+ }) : D).length;
2922
+ }
2923
+ },
2924
+ { deep: !1 }
2925
+ ), {
2926
+ displayItems: S,
2927
+ loading: s,
2928
+ searchLoading: u,
2929
+ hasMore: F,
2930
+ filterString: v,
2931
+ resolvedDefaults: m,
2932
+ defaultOptionLoading: g,
2933
+ cachedItems: t,
2934
+ open: J,
2935
+ close: re,
2936
+ onInput: ce,
2937
+ clearSearch: se,
2938
+ loadMore: ae,
2939
+ resolve: q,
2940
+ refresh: C
2941
+ };
2942
+ }
2943
+ function to(e) {
2944
+ let t = [];
2945
+ const n = $(() => {
2946
+ const g = e.mapOptions() === !0 && e.multiple() !== !0, d = e.modelValue() !== void 0 && (e.modelValue() !== null || g === !0) ? e.multiple() === !0 && Array.isArray(e.modelValue()) ? e.modelValue() : [e.modelValue()] : [];
2947
+ if (e.mapOptions() === !0 && Array.isArray(e.displayItems.value) === !0) {
2948
+ const c = e.mapOptions() === !0 && t !== void 0 ? t : [], b = d.map((h) => {
2949
+ const E = e.getOption(h, c, e.resolvedDefaults.value, e.displayItems.value);
2950
+ if (E === h && e.cachedItems.value.length > 0) {
2951
+ const p = e.getOption(h, c, e.resolvedDefaults.value, e.cachedItems.value);
2952
+ if (p !== h) return p;
2953
+ }
2954
+ return E;
2955
+ });
2956
+ return e.modelValue() === null && g === !0 ? b.filter((h) => h !== null) : b;
2957
+ }
2958
+ return d;
2959
+ });
2960
+ j(
2961
+ n,
2962
+ (g) => {
2963
+ t = g;
2964
+ },
2965
+ { immediate: !0 }
2966
+ );
2967
+ const a = $(() => n.value.map((g) => e.getOptionValue.value(g)));
2968
+ function o(g) {
2969
+ const d = e.getOptionValue.value(g);
2970
+ return a.value.find((c) => De(c, d)) !== void 0;
2971
+ }
2972
+ const i = $(
2973
+ () => n.value.map((g, d) => ({
2974
+ index: d,
2975
+ opt: g,
2976
+ selected: !0,
2977
+ toggleOption: u,
2978
+ removeAtIndex: v
2979
+ }))
2980
+ ), l = $(() => e.fieldValueIsFilled(n.value)), s = $(() => e.displayItems.value.map((g, d) => ({
2981
+ index: d,
2982
+ opt: g,
2983
+ selected: o(g) === !0,
2984
+ label: e.getOptionLabel.value(g),
2985
+ toggleOption: u
2986
+ })));
2987
+ function u(g) {
2988
+ if (g === void 0)
2989
+ return;
2990
+ const d = e.getOptionValue.value(g);
2991
+ if (e.multiple() !== !0) {
2992
+ (n.value.length === 0 || De(e.getOptionValue.value(n.value[0]), d) !== !0) && e.emit.updateModelValue(e.emitValue() === !0 ? d : g), e.isOpened.value = !1, e.emit.close();
2993
+ return;
2994
+ }
2995
+ if (n.value.length === 0) {
2996
+ const h = e.emitValue() === !0 ? d : g;
2997
+ e.emit.updateModelValue(e.multiple() === !0 ? [h] : h);
2998
+ return;
2999
+ }
3000
+ const c = e.modelValue().slice(), b = a.value.findIndex((h) => De(h, d));
3001
+ if (b > -1)
3002
+ c.splice(b, 1);
3003
+ else {
3004
+ const h = e.emitValue() === !0 ? d : g;
3005
+ c.push(h);
3006
+ }
3007
+ e.emit.updateModelValue(c), e.isOpened.value && e.popperUpdate();
3008
+ }
3009
+ function v(g) {
3010
+ if (g > -1 && g < n.value.length)
3011
+ if (e.multiple() === !0) {
3012
+ const d = e.modelValue().slice();
3013
+ d.splice(g, 1), e.emit.updateModelValue(d);
3014
+ } else
3015
+ e.emit.updateModelValue(null);
3016
+ }
3017
+ function m() {
3018
+ if (e.multiple()) {
3019
+ e.emit.updateModelValue([]);
3020
+ return;
3021
+ }
3022
+ e.emit.updateModelValue(null);
3023
+ }
3024
+ return {
3025
+ innerValue: n,
3026
+ selectedScope: i,
3027
+ hasValue: l,
3028
+ innerOptionsValue: a,
3029
+ optionScope: s,
3030
+ toggleOption: u,
3031
+ removeAtIndex: v,
3032
+ isOptionSelected: o,
3033
+ onReset: m
3034
+ };
3035
+ }
3036
+ const no = { class: "vc-select__control" }, ao = {
3037
+ key: 0,
3038
+ class: "vc-select__prepend"
3039
+ }, lo = { class: "vc-select__field" }, oo = { class: "vc-select__field-inner" }, io = { class: "vc-select__field-content" }, ro = {
3040
+ key: 0,
3041
+ class: "vc-select__prepend-inner"
3042
+ }, so = { class: "vc-select__field-main" }, uo = {
3043
+ key: 0,
3044
+ class: "vc-select__prefix"
3045
+ }, co = ["aria-expanded", "aria-controls", "aria-labelledby", "aria-describedby", "aria-required", "aria-invalid"], fo = {
3046
+ key: 0,
3047
+ class: "vc-select__placeholder"
3048
+ }, vo = {
3049
+ key: 1,
3050
+ class: "vc-select__selected"
3051
+ }, go = { class: "vc-select__multiple-item" }, mo = {
3052
+ key: 0,
3053
+ class: "vc-select__loading"
3054
+ }, po = { key: 1 }, bo = ["aria-label", "onClick", "onKeydown"], yo = {
3055
+ key: 0,
3056
+ class: "vc-select__loading"
3057
+ }, ho = {
3058
+ key: 1,
3059
+ class: "vc-select__suffix"
3060
+ }, ko = ["aria-label"], Io = {
3061
+ key: 1,
3062
+ class: "vc-select__append-inner"
3063
+ }, So = {
3064
+ key: 2,
3065
+ class: "vc-select__loading-icon"
3066
+ }, $o = ["aria-label"], wo = { class: "vc-select__chevron" }, Oo = { class: "vc-select__hint-error" }, Eo = { key: 0 }, Lo = { key: 1 }, Bo = {
3067
+ key: 1,
3068
+ class: "vc-select__append"
3069
+ }, Co = /* @__PURE__ */ z({
3070
+ __name: "SelectTrigger",
3071
+ props: {
3072
+ isOpened: { type: Boolean },
3073
+ hasValue: { type: Boolean },
3074
+ selectedScope: {},
3075
+ multiple: { type: Boolean },
3076
+ loading: { type: Boolean },
3077
+ disabled: { type: Boolean },
3078
+ clearable: { type: Boolean },
3079
+ placeholder: {},
3080
+ prefix: {},
3081
+ suffix: {},
3082
+ size: {},
3083
+ error: { type: Boolean },
3084
+ errorMessage: {},
3085
+ hint: {},
3086
+ listLoading: { type: Boolean },
3087
+ defaultOptionLoading: { type: Boolean },
3088
+ listboxId: {},
3089
+ labelId: {},
3090
+ label: {},
3091
+ ariaDescribedBy: {},
3092
+ ariaRequired: { type: Boolean },
3093
+ errorId: {},
3094
+ hintId: {},
3095
+ toggleDropdown: { type: Function },
3096
+ getOptionLabel: { type: Function },
3097
+ getEmittingOptionValue: { type: Function }
3098
+ },
3099
+ emits: ["focus", "blur", "reset", "removeAtIndex"],
3100
+ setup(e, { expose: t }) {
3101
+ const { t: n } = we({ useScope: "global" }), a = I(null);
3102
+ return t({
3103
+ toggleRef: a
3104
+ }), (o, i) => (f(), y("div", {
3105
+ ref_key: "toggleRef",
3106
+ ref: a,
3107
+ class: "vc-select__dropdown-toggle"
3108
+ }, [
3109
+ T(o.$slots, "control", {
3110
+ toggleHandler: e.toggleDropdown,
3111
+ isOpened: e.isOpened
3112
+ }, () => [
3113
+ x("div", no, [
3114
+ o.$slots.prepend ? (f(), y("div", ao, [
3115
+ T(o.$slots, "prepend")
3116
+ ])) : w("", !0),
3117
+ x("div", {
3118
+ class: W(["vc-select__field-wrapper", {
3119
+ "vc-select__field-wrapper--default": e.size === "default",
3120
+ "vc-select__field-wrapper--small": e.size === "small"
3121
+ }])
3122
+ }, [
3123
+ x("div", lo, [
3124
+ x("div", oo, [
3125
+ x("div", io, [
3126
+ o.$slots["prepend-inner"] ? (f(), y("div", ro, [
3127
+ T(o.$slots, "prepend-inner")
3128
+ ])) : w("", !0),
3129
+ x("div", so, [
3130
+ e.prefix ? (f(), y("div", uo, A(e.prefix), 1)) : w("", !0),
3131
+ x("div", {
3132
+ "data-test-id": "dropdown-toggle",
3133
+ class: "vc-select__input",
3134
+ role: "combobox",
3135
+ tabindex: "0",
3136
+ "aria-expanded": e.isOpened,
3137
+ "aria-haspopup": "listbox",
3138
+ "aria-controls": e.isOpened ? e.listboxId : void 0,
3139
+ "aria-labelledby": e.label ? e.labelId : void 0,
3140
+ "aria-describedby": e.ariaDescribedBy,
3141
+ "aria-required": e.ariaRequired,
3142
+ "aria-invalid": e.error || void 0,
3143
+ onClick: i[0] || (i[0] = G(
3144
+ //@ts-ignore
3145
+ (...l) => e.toggleDropdown && e.toggleDropdown(...l),
3146
+ ["stop"]
3147
+ )),
3148
+ onKeydown: [
3149
+ i[1] || (i[1] = X(G(
3150
+ //@ts-ignore
3151
+ (...l) => e.toggleDropdown && e.toggleDropdown(...l),
3152
+ ["stop"]
3153
+ ), ["enter"])),
3154
+ i[2] || (i[2] = X(G(
3155
+ //@ts-ignore
3156
+ (...l) => e.toggleDropdown && e.toggleDropdown(...l),
3157
+ ["stop"]
3158
+ ), ["space"]))
3159
+ ],
3160
+ onFocus: i[3] || (i[3] = (l) => o.$emit("focus")),
3161
+ onBlur: i[4] || (i[4] = (l) => o.$emit("blur"))
3162
+ }, [
3163
+ e.hasValue ? e.selectedScope && e.selectedScope.length && e.hasValue ? (f(), y("div", vo, [
3164
+ (f(!0), y(Le, null, st(e.selectedScope, (l, s) => (f(), y("div", {
3165
+ key: s,
3166
+ class: "vc-select__selected-item"
3167
+ }, [
3168
+ e.multiple ? T(o.$slots, "selected-item", ee({
3169
+ key: 0,
3170
+ ref_for: !0
3171
+ }, l), () => [
3172
+ x("div", go, [
3173
+ e.loading ? (f(), y("span", mo, A(r(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)) : (f(), y("span", po, A(e.getOptionLabel(l.opt)), 1)),
3174
+ e.disabled ? w("", !0) : (f(), y("button", {
3175
+ key: 2,
3176
+ type: "button",
3177
+ class: "vc-select__chip-remove",
3178
+ "aria-label": `Remove ${e.getOptionLabel(l.opt) || ""}`,
3179
+ tabindex: "0",
3180
+ onClick: G((u) => o.$emit("removeAtIndex", l.index), ["stop"]),
3181
+ onKeydown: X(G((u) => o.$emit("removeAtIndex", l.index), ["stop", "prevent"]), ["enter"])
3182
+ }, [
3183
+ M(r(U), {
3184
+ class: "vc-select__icon-remove",
3185
+ icon: "lucide-x",
3186
+ size: "xs"
3187
+ })
3188
+ ], 40, bo))
3189
+ ])
3190
+ ]) : e.multiple ? w("", !0) : (f(), y(Le, { key: 1 }, [
3191
+ e.loading ? (f(), y("span", yo, A(r(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)) : T(o.$slots, "selected-item", ee({
3192
+ key: 1,
3193
+ ref_for: !0
3194
+ }, l), () => [
3195
+ Z(A(e.loading ? r(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING") : e.getEmittingOptionValue(l.opt)), 1)
3196
+ ])
3197
+ ], 64))
3198
+ ]))), 128))
3199
+ ])) : w("", !0) : (f(), y("div", fo, [
3200
+ e.placeholder ? (f(), y(Le, { key: 0 }, [
3201
+ Z(A(e.placeholder), 1)
3202
+ ], 64)) : (f(), y(Le, { key: 1 }, [
3203
+ Z(A(r(n)("COMPONENTS.MOLECULES.VC_SELECT.CLICK_TO_SELECT")), 1)
3204
+ ], 64))
3205
+ ]))
3206
+ ], 40, co),
3207
+ e.suffix ? (f(), y("div", ho, A(e.suffix), 1)) : w("", !0),
3208
+ e.clearable && e.hasValue && !e.disabled ? (f(), y("div", {
3209
+ key: 2,
3210
+ class: "vc-select__clear",
3211
+ role: "button",
3212
+ "aria-label": o.$t("COMPONENTS.CONTROLS.CLEAR_SELECTION"),
3213
+ tabindex: "0",
3214
+ onClick: i[5] || (i[5] = (l) => o.$emit("reset")),
3215
+ onKeydown: [
3216
+ i[6] || (i[6] = X((l) => o.$emit("reset"), ["enter"])),
3217
+ i[7] || (i[7] = X((l) => o.$emit("reset"), ["space"]))
3218
+ ]
3219
+ }, [
3220
+ M(r(U), {
3221
+ size: "xs",
3222
+ icon: "lucide-x"
3223
+ })
3224
+ ], 40, ko)) : w("", !0)
3225
+ ]),
3226
+ o.$slots["append-inner"] ? (f(), y("div", Io, [
3227
+ T(o.$slots, "append-inner")
3228
+ ])) : w("", !0),
3229
+ e.loading || e.listLoading || e.defaultOptionLoading ? (f(), y("div", So, [
3230
+ M(r(U), {
3231
+ icon: "lucide-loader-2",
3232
+ class: "tw-animate-spin",
3233
+ size: "m"
3234
+ })
3235
+ ])) : w("", !0),
3236
+ e.disabled ? w("", !0) : (f(), y("div", {
3237
+ key: 3,
3238
+ class: "vc-select__chevron-container",
3239
+ role: "button",
3240
+ "aria-label": o.$t("COMPONENTS.CONTROLS.TOGGLE_DROPDOWN"),
3241
+ tabindex: "0",
3242
+ onClick: i[8] || (i[8] = G(
3243
+ //@ts-ignore
3244
+ (...l) => e.toggleDropdown && e.toggleDropdown(...l),
3245
+ ["stop"]
3246
+ )),
3247
+ onKeydown: [
3248
+ i[9] || (i[9] = X(G(
3249
+ //@ts-ignore
3250
+ (...l) => e.toggleDropdown && e.toggleDropdown(...l),
3251
+ ["stop"]
3252
+ ), ["enter"])),
3253
+ i[10] || (i[10] = X(G(
3254
+ //@ts-ignore
3255
+ (...l) => e.toggleDropdown && e.toggleDropdown(...l),
3256
+ ["stop"]
3257
+ ), ["space"]))
3258
+ ]
3259
+ }, [
3260
+ x("div", wo, [
3261
+ M(r(U), {
3262
+ size: "s",
3263
+ icon: "lucide-chevron-down"
3264
+ })
3265
+ ])
3266
+ ], 40, $o))
3267
+ ])
3268
+ ])
3269
+ ]),
3270
+ x("div", Oo, [
3271
+ M(Pe, {
3272
+ name: "slide-up",
3273
+ mode: "out-in"
3274
+ }, {
3275
+ default: O(() => [
3276
+ e.error && e.errorMessage ? (f(), y("div", Eo, [
3277
+ T(o.$slots, "error", {}, () => [
3278
+ M(r(me), {
3279
+ id: e.errorId,
3280
+ class: "vc-select__error-message",
3281
+ error: !0
3282
+ }, {
3283
+ default: O(() => [
3284
+ Z(A(e.errorMessage), 1)
3285
+ ]),
3286
+ _: 1
3287
+ }, 8, ["id"])
3288
+ ])
3289
+ ])) : (f(), y("div", Lo, [
3290
+ T(o.$slots, "hint", {}, () => [
3291
+ e.hint ? (f(), P(r(me), {
3292
+ key: 0,
3293
+ id: e.hintId,
3294
+ class: "vc-select__hint"
3295
+ }, {
3296
+ default: O(() => [
3297
+ Z(A(e.hint), 1)
3298
+ ]),
3299
+ _: 1
3300
+ }, 8, ["id"])) : w("", !0)
3301
+ ])
3302
+ ]))
3303
+ ]),
3304
+ _: 3
3305
+ })
3306
+ ])
3307
+ ], 2),
3308
+ o.$slots.append ? (f(), y("div", Bo, [
3309
+ T(o.$slots, "append")
3310
+ ])) : w("", !0)
3311
+ ])
3312
+ ])
3313
+ ], 512));
3314
+ }
3315
+ }), xo = ["id", "aria-label"], To = ["aria-label"], Ro = ["aria-selected", "data-index", "onClick", "onKeydown"], Mo = {
3316
+ key: 0,
3317
+ class: "vc-select__check-icon"
3318
+ }, Ao = {
3319
+ key: 0,
3320
+ class: "vc-select__list-loading-indicator"
3321
+ }, No = { class: "tw-ml-1" }, Do = {
3322
+ key: 1,
3323
+ class: "vc-select__no-options"
3324
+ }, Vo = { class: "vc-select__no-options-text" }, Po = /* @__PURE__ */ z({
3325
+ __name: "SelectDropdown",
3326
+ props: {
3327
+ isOpened: { type: Boolean },
3328
+ listboxId: {},
3329
+ ariaLabel: {},
3330
+ dropdownStyle: {},
3331
+ searchable: { type: Boolean },
3332
+ optionScope: {},
3333
+ listLoading: { type: Boolean },
3334
+ optionsListLength: {},
3335
+ hasNextPage: { type: Boolean },
3336
+ dropdownToggleRef: {}
3337
+ },
3338
+ emits: ["input", "clickOutside"],
3339
+ setup(e, { expose: t, emit: n }) {
3340
+ const a = e, o = n, { t: i } = we({ useScope: "global" }), { teleportTarget: l } = $n(), s = I(null), u = I(null), v = I(null), m = I(null), g = $(() => v.value?.viewportRef ?? null);
3341
+ function d(c) {
3342
+ const b = g.value;
3343
+ if (!b) return;
3344
+ if (b.contains(c.target)) {
3345
+ const E = b.scrollTop <= 0 && c.deltaY < 0, p = Math.ceil(b.scrollTop) >= b.scrollHeight - b.clientHeight && c.deltaY > 0;
3346
+ (E || p) && c.preventDefault();
3347
+ } else
3348
+ c.preventDefault(), b.scrollTop += c.deltaY;
3349
+ v.value?.updateScrollState();
3350
+ }
3351
+ return j(
3352
+ () => a.isOpened,
3353
+ (c) => {
3354
+ c && Se(() => v.value?.updateScrollState());
3355
+ }
3356
+ ), j(
3357
+ () => a.optionScope.length,
3358
+ () => {
3359
+ a.isOpened && Se(() => v.value?.updateScrollState());
3360
+ }
3361
+ ), t({
3362
+ dropdownElRef: s,
3363
+ searchInputRef: u,
3364
+ viewportRef: g,
3365
+ loadMoreRef: m
3366
+ }), (c, b) => (f(), P(cn, { to: r(l) }, [
3367
+ M(Pe, { name: "select-dropdown" }, {
3368
+ default: O(() => [
3369
+ e.isOpened ? ct((f(), y("div", {
3370
+ key: 0,
3371
+ id: e.listboxId,
3372
+ ref_key: "dropdownElRef",
3373
+ ref: s,
3374
+ "data-test-id": "dropdown",
3375
+ class: "vc-select__dropdown",
3376
+ role: "listbox",
3377
+ "aria-label": e.ariaLabel,
3378
+ style: Ve(e.dropdownStyle),
3379
+ onWheel: d
3380
+ }, [
3381
+ e.searchable ? (f(), y("input", {
3382
+ key: 0,
3383
+ ref_key: "searchInputRef",
3384
+ ref: u,
3385
+ class: "vc-select__search-input",
3386
+ tabindex: "0",
3387
+ "aria-label": c.$t("COMPONENTS.CONTROLS.SEARCH_OPTIONS"),
3388
+ autocomplete: "off",
3389
+ onInput: b[0] || (b[0] = (h) => o("input", h)),
3390
+ onKeydown: [
3391
+ b[1] || (b[1] = X(G(() => {
3392
+ }, ["stop"]), ["space"])),
3393
+ b[2] || (b[2] = X(G(() => {
3394
+ }, ["stop"]), ["enter"]))
3395
+ ]
3396
+ }, null, 40, To)) : w("", !0),
3397
+ M(r(ol), {
3398
+ ref_key: "scrollContainerRef",
3399
+ ref: v,
3400
+ class: "vc-select__scroll-container"
3401
+ }, {
3402
+ default: O(() => [
3403
+ (f(!0), y(Le, null, st(e.optionScope, (h, E) => (f(), y("div", {
3404
+ key: E,
3405
+ class: W(["vc-select__option", { "vc-select__option--selected": h.selected }]),
3406
+ "data-test-id": "option",
3407
+ role: "option",
3408
+ "aria-selected": h.selected,
3409
+ tabindex: "0",
3410
+ "data-index": E,
3411
+ onClick: (p) => h.toggleOption(h.opt),
3412
+ onKeydown: [
3413
+ X((p) => h.toggleOption(h.opt), ["enter"]),
3414
+ X((p) => h.toggleOption(h.opt), ["space"])
3415
+ ]
3416
+ }, [
3417
+ T(c.$slots, "option", ee({ ref_for: !0 }, h), () => [
3418
+ Z(A(h.label), 1)
3419
+ ]),
3420
+ h.selected ? (f(), y("span", Mo, [
3421
+ M(r(U), {
3422
+ icon: "lucide-check",
3423
+ size: "xs"
3424
+ })
3425
+ ])) : w("", !0)
3426
+ ], 42, Ro))), 128)),
3427
+ e.listLoading ? (f(), y("div", Ao, [
3428
+ M(r(U), {
3429
+ icon: "lucide-loader-2",
3430
+ class: "tw-animate-spin",
3431
+ size: "m"
3432
+ }),
3433
+ x("span", No, A(e.optionsListLength > 0 ? r(i)("COMPONENTS.MOLECULES.VC_SELECT.LOADING_MORE") : r(i)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)
3434
+ ])) : w("", !0),
3435
+ !e.listLoading && !e.optionsListLength ? (f(), y("div", Do, [
3436
+ T(c.$slots, "no-options", {}, () => [
3437
+ x("span", Vo, A(r(i)("COMPONENTS.MOLECULES.VC_SELECT.NO_OPTIONS")), 1)
3438
+ ])
3439
+ ])) : w("", !0),
3440
+ e.hasNextPage && !e.listLoading ? (f(), y("span", {
3441
+ key: 2,
3442
+ ref_key: "loadMoreRef",
3443
+ ref: m,
3444
+ class: "vc-select__load-more-trigger"
3445
+ }, null, 512)) : w("", !0)
3446
+ ]),
3447
+ _: 3
3448
+ }, 512)
3449
+ ], 44, xo)), [
3450
+ [r(Fn), [() => o("clickOutside"), { ignore: [e.dropdownToggleRef] }]]
3451
+ ]) : w("", !0)
3452
+ ]),
3453
+ _: 3
3454
+ })
3455
+ ], 8, ["to"]));
3456
+ }
3457
+ }), Fo = ["innerHTML"], zo = { class: "vc-select__field-container" }, qo = /* @__PURE__ */ z({
3458
+ inheritAttrs: !1,
3459
+ __name: "vc-select",
3460
+ props: {
3461
+ label: {},
3462
+ tooltip: {},
3463
+ disabled: { type: Boolean },
3464
+ required: { type: Boolean },
3465
+ name: { default: "Field" },
3466
+ error: { type: Boolean },
3467
+ errorMessage: {},
3468
+ mapOptions: { type: Boolean, default: !0 },
3469
+ hint: {},
3470
+ prefix: {},
3471
+ suffix: {},
3472
+ loading: { type: Boolean },
3473
+ clearable: { type: Boolean, default: !0 },
3474
+ multiple: { type: Boolean },
3475
+ options: { type: [Function, Array], default: () => [] },
3476
+ optionValue: { type: [Function, String], default: "id" },
3477
+ optionLabel: { type: [Function, String], default: "title" },
3478
+ debounce: { default: 500 },
3479
+ placeholder: {},
3480
+ searchable: { type: Boolean },
3481
+ multilanguage: { type: Boolean },
3482
+ currentLanguage: {},
3483
+ size: { default: "default" },
3484
+ outline: { type: Boolean, default: !0 },
3485
+ placement: { default: "bottom" },
3486
+ modelValue: {},
3487
+ emitValue: { type: Boolean, default: !0 }
3488
+ },
3489
+ emits: ["update:modelValue", "search", "close"],
3490
+ setup(e, { emit: t }) {
3491
+ const n = e, a = Lt(), o = $(() => {
3492
+ const { class: N, ...Q } = a;
3493
+ return Q;
3494
+ }), i = t, { t: l } = we({ useScope: "global" }), s = Oe(), {
3495
+ fieldId: u,
3496
+ labelId: v,
3497
+ errorId: m,
3498
+ hintId: g,
3499
+ invalid: d,
3500
+ resolvedDisabled: c,
3501
+ resolvedName: b,
3502
+ ariaRequired: h,
3503
+ ariaDescribedBy: E
3504
+ } = He(n), p = $(() => `${u.value}-listbox`), S = I(null), F = I(null), { selectRootRef: K, isSelectVisible: _, ensureVisibility: J } = Ql(), { getOptionValue: re, getOptionLabel: ae, getOption: te, getEmittingOptionValue: ce, fieldValueIsFilled: se } = Zl({
3505
+ optionValue: () => n.optionValue,
3506
+ optionLabel: () => n.optionLabel
3507
+ }), { isOpened: q, isFocused: C, dropdownToggleRef: B, dropdownRef: D, popper: V, dropdownStyle: k, toggleDropdown: R } = _l({
3508
+ placement: n.placement,
3509
+ outline: () => n.outline,
3510
+ isSelectVisible: _,
3511
+ selectRootRef: K,
3512
+ disabled: () => n.disabled ?? !1,
3513
+ ensureVisibility: J
3514
+ });
3515
+ tt(() => {
3516
+ B.value = S.value?.toggleRef ?? null;
3517
+ }), tt(() => {
3518
+ D.value = F.value?.dropdownElRef ?? null;
3519
+ });
3520
+ const L = eo({
3521
+ options: () => n.options,
3522
+ getOptionValue: re,
3523
+ getOptionLabel: ae,
3524
+ isSelectVisible: _,
3525
+ debounce: () => n.debounce ?? 500,
3526
+ emit: {
3527
+ search: (N) => i("search", N)
3528
+ }
3529
+ }), { selectedScope: H, hasValue: xe, optionScope: de, removeAtIndex: Te, onReset: Qt } = to({
3530
+ modelValue: () => n.modelValue,
3531
+ multiple: () => n.multiple,
3532
+ emitValue: () => n.emitValue ?? !0,
3533
+ mapOptions: () => n.mapOptions ?? !0,
3534
+ displayItems: L.displayItems,
3535
+ resolvedDefaults: L.resolvedDefaults,
3536
+ cachedItems: L.cachedItems,
3537
+ getOptionValue: re,
3538
+ getOptionLabel: ae,
3539
+ getOption: te,
3540
+ fieldValueIsFilled: se,
3541
+ isOpened: q,
3542
+ popperUpdate: () => V.update(),
3543
+ emit: {
3544
+ updateModelValue: (N) => i("update:modelValue", N),
3545
+ close: () => i("close")
3546
+ }
3547
+ }), _t = $(() => F.value?.loadMoreRef ?? null), en = $(() => F.value?.viewportRef ?? null);
3548
+ xn(
3549
+ _t,
3550
+ ([{ isIntersecting: N }]) => {
3551
+ N && L.hasMore.value && L.loadMore();
3552
+ },
3553
+ { threshold: 1, root: en }
3554
+ );
3555
+ const Xe = Xl({
3556
+ onEnter: (N) => {
3557
+ const Q = parseInt(N.getAttribute("data-index") || "0", 10);
3558
+ de.value && de.value[Q] && de.value[Q].toggleOption(de.value[Q].opt);
3559
+ },
3560
+ onEscape: () => {
3561
+ q.value = !1, i("close"), Se(() => {
3562
+ S.value?.toggleRef?.querySelector('[role="combobox"]')?.focus();
3563
+ });
3564
+ }
3565
+ });
3566
+ function tn() {
3567
+ q.value = !1, i("close");
3568
+ }
3569
+ return j(q, async (N) => {
3570
+ N ? (await L.open(), Se(() => {
3571
+ V.update();
3572
+ const Q = F.value?.dropdownElRef, le = F.value?.searchInputRef;
3573
+ if (Q)
3574
+ if (Xe.initKeyboardNavigation(Q), n.searchable && le)
3575
+ le.focus();
3576
+ else {
3577
+ const Re = Q.querySelector(
3578
+ '.vc-select__option[tabindex="0"], .vc-select__search-input[tabindex="0"]'
3579
+ );
3580
+ Re ? Re.focus() : Xe.focusFirstElement();
3581
+ }
3582
+ })) : (Xe.cleanupKeyboardNavigation(), L.close());
3583
+ }), j(
3584
+ () => n.modelValue,
3585
+ async (N) => {
3586
+ if (N == null || Array.isArray(N) && N.length === 0) {
3587
+ L.resolvedDefaults.value = [];
3588
+ return;
3589
+ }
3590
+ const Q = n.emitValue ?? !0;
3591
+ if (n.mapOptions ?? !0) {
3592
+ const Re = Array.isArray(N) ? N : [N], ht = Q ? Re : Re.filter((Me) => Me != null && typeof Me != "object");
3593
+ if (ht.length > 0) {
3594
+ const Me = ht.filter((nn) => nn != null).map(String);
3595
+ Me.length > 0 && await L.resolve(Me);
3596
+ }
3597
+ }
3598
+ },
3599
+ { immediate: !0 }
3600
+ ), (N, Q) => r(s) ? (f(), y("div", ee({ key: 0 }, o.value, {
3601
+ class: ["vc-select vc-select--skeleton", N.$attrs.class]
3602
+ }), [
3603
+ e.label ? (f(), P(r(ne), {
3604
+ key: 0,
3605
+ variant: "block",
3606
+ width: 60 + (e.label?.length || 0) * 4,
3607
+ height: 11
3608
+ }, null, 8, ["width"])) : w("", !0),
3609
+ M(r(ne), {
3610
+ variant: "block",
3611
+ width: "100%",
3612
+ height: 36
3613
+ })
3614
+ ], 16)) : (f(), y("div", ee({
3615
+ key: 1,
3616
+ ref_key: "selectRootRef",
3617
+ ref: K
3618
+ }, o.value, {
3619
+ class: ["vc-select", [
3620
+ N.$attrs.class,
3621
+ {
3622
+ "vc-select--opened": r(q),
3623
+ "vc-select--error": r(d),
3624
+ "vc-select--disabled": r(c),
3625
+ "vc-select--has-hint-or-error": r(d) || e.hint,
3626
+ "vc-select--no-outline": !e.outline,
3627
+ "vc-select--focused": r(C)
3628
+ }
3629
+ ]]
3630
+ }), [
3631
+ e.label ? (f(), P(r(Je), {
3632
+ key: 0,
3633
+ id: r(v),
3634
+ class: "vc-select__label",
3635
+ required: e.required,
3636
+ multilanguage: e.multilanguage,
3637
+ "current-language": e.currentLanguage,
3638
+ error: r(d)
3639
+ }, oe({
3640
+ default: O(() => [
3641
+ x("span", null, A(e.label), 1)
3642
+ ]),
3643
+ _: 2
3644
+ }, [
3645
+ e.tooltip ? {
3646
+ name: "tooltip",
3647
+ fn: O(() => [
3648
+ x("span", {
3649
+ innerHTML: r(Dt).sanitize(e.tooltip)
3650
+ }, null, 8, Fo)
3651
+ ]),
3652
+ key: "0"
3653
+ } : void 0
3654
+ ]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) : w("", !0),
3655
+ x("div", zo, [
3656
+ M(Co, {
3657
+ ref_key: "selectTriggerRef",
3658
+ ref: S,
3659
+ "is-opened": r(q),
3660
+ "has-value": r(xe),
3661
+ "selected-scope": r(H),
3662
+ multiple: e.multiple,
3663
+ loading: e.loading,
3664
+ disabled: r(c),
3665
+ clearable: e.clearable,
3666
+ placeholder: e.placeholder,
3667
+ prefix: e.prefix,
3668
+ suffix: e.suffix,
3669
+ size: e.size,
3670
+ error: r(d),
3671
+ "error-message": e.errorMessage,
3672
+ hint: e.hint,
3673
+ "list-loading": r(L).loading.value || r(L).searchLoading.value,
3674
+ "default-option-loading": r(L).defaultOptionLoading.value,
3675
+ "listbox-id": p.value,
3676
+ "label-id": r(v),
3677
+ label: e.label,
3678
+ "aria-described-by": r(E),
3679
+ "aria-required": r(h),
3680
+ "error-id": r(m),
3681
+ "hint-id": r(g),
3682
+ "toggle-dropdown": r(R),
3683
+ "get-option-label": r(ae),
3684
+ "get-emitting-option-value": r(ce),
3685
+ onFocus: Q[0] || (Q[0] = (le) => C.value = !0),
3686
+ onBlur: Q[1] || (Q[1] = (le) => C.value = !1),
3687
+ onReset: r(Qt),
3688
+ onRemoveAtIndex: r(Te)
3689
+ }, oe({ _: 2 }, [
3690
+ N.$slots.control ? {
3691
+ name: "control",
3692
+ fn: O((le) => [
3693
+ T(N.$slots, "control", Ae(Ne(le)))
3694
+ ]),
3695
+ key: "0"
3696
+ } : void 0,
3697
+ N.$slots.prepend ? {
3698
+ name: "prepend",
3699
+ fn: O(() => [
3700
+ T(N.$slots, "prepend")
3701
+ ]),
3702
+ key: "1"
3703
+ } : void 0,
3704
+ N.$slots.append ? {
3705
+ name: "append",
3706
+ fn: O(() => [
3707
+ T(N.$slots, "append")
3708
+ ]),
3709
+ key: "2"
3710
+ } : void 0,
3711
+ N.$slots["prepend-inner"] ? {
3712
+ name: "prepend-inner",
3713
+ fn: O(() => [
3714
+ T(N.$slots, "prepend-inner")
3715
+ ]),
3716
+ key: "3"
3717
+ } : void 0,
3718
+ N.$slots["append-inner"] ? {
3719
+ name: "append-inner",
3720
+ fn: O(() => [
3721
+ T(N.$slots, "append-inner")
3722
+ ]),
3723
+ key: "4"
3724
+ } : void 0,
3725
+ N.$slots["selected-item"] ? {
3726
+ name: "selected-item",
3727
+ fn: O((le) => [
3728
+ T(N.$slots, "selected-item", Ae(Ne(le)))
3729
+ ]),
3730
+ key: "5"
3731
+ } : void 0,
3732
+ N.$slots.error ? {
3733
+ name: "error",
3734
+ fn: O(() => [
3735
+ T(N.$slots, "error")
3736
+ ]),
3737
+ key: "6"
3738
+ } : void 0,
3739
+ N.$slots.hint ? {
3740
+ name: "hint",
3741
+ fn: O(() => [
3742
+ T(N.$slots, "hint")
3743
+ ]),
3744
+ key: "7"
3745
+ } : void 0
3746
+ ]), 1032, ["is-opened", "has-value", "selected-scope", "multiple", "loading", "disabled", "clearable", "placeholder", "prefix", "suffix", "size", "error", "error-message", "hint", "list-loading", "default-option-loading", "listbox-id", "label-id", "label", "aria-described-by", "aria-required", "error-id", "hint-id", "toggle-dropdown", "get-option-label", "get-emitting-option-value", "onReset", "onRemoveAtIndex"]),
3747
+ M(Po, ee({
3748
+ ref_key: "selectDropdownRef",
3749
+ ref: F,
3750
+ "is-opened": r(q),
3751
+ "listbox-id": p.value
3752
+ }, { ariaLabel: e.label || e.name }, {
3753
+ "dropdown-style": r(k),
3754
+ searchable: e.searchable,
3755
+ "option-scope": r(de),
3756
+ "list-loading": r(L).loading.value || r(L).searchLoading.value,
3757
+ "options-list-length": r(L).displayItems.value.length,
3758
+ "has-next-page": r(L).hasMore.value,
3759
+ "dropdown-toggle-ref": S.value?.toggleRef ?? null,
3760
+ onInput: r(L).onInput,
3761
+ onClickOutside: tn
3762
+ }), oe({ _: 2 }, [
3763
+ N.$slots.option ? {
3764
+ name: "option",
3765
+ fn: O((le) => [
3766
+ T(N.$slots, "option", Ae(Ne(le)))
3767
+ ]),
3768
+ key: "0"
3769
+ } : void 0,
3770
+ N.$slots["no-options"] ? {
3771
+ name: "no-options",
3772
+ fn: O(() => [
3773
+ T(N.$slots, "no-options")
3774
+ ]),
3775
+ key: "1"
3776
+ } : void 0
3777
+ ]), 1040, ["is-opened", "listbox-id", "dropdown-style", "searchable", "option-scope", "list-loading", "options-list-length", "has-next-page", "dropdown-toggle-ref", "onInput"])
3778
+ ])
3779
+ ], 16));
3780
+ }
3781
+ }), Uo = {
3782
+ key: 0,
3783
+ class: "vc-input-dropdown vc-input-dropdown--skeleton"
3784
+ }, Ko = { class: "tw-flex tw-items-center" }, Wo = ["aria-label", "aria-expanded", "onClick", "onKeydown"], jo = /* @__PURE__ */ z({
3785
+ __name: "vc-input-dropdown",
3786
+ props: {
3787
+ modelValue: {},
3788
+ prefix: {},
3789
+ suffix: {},
3790
+ debounce: { default: 0 },
3791
+ maxlength: {},
3792
+ option: {},
3793
+ options: {},
3794
+ optionValue: {},
3795
+ optionLabel: {},
3796
+ searchable: { type: Boolean, default: !1 },
3797
+ inputType: { default: "text" },
3798
+ ariaLabel: {},
3799
+ placeholder: {},
3800
+ hint: {},
3801
+ clearable: { type: Boolean },
3802
+ loading: { type: Boolean },
3803
+ autofocus: { type: Boolean },
3804
+ size: {},
3805
+ multilanguage: { type: Boolean },
3806
+ currentLanguage: {},
3807
+ label: {},
3808
+ tooltip: {},
3809
+ disabled: { type: Boolean },
3810
+ required: { type: Boolean },
3811
+ name: {},
3812
+ error: { type: Boolean },
3813
+ errorMessage: {}
3814
+ },
3815
+ emits: ["update:model-value", "update:option", "change", "blur"],
3816
+ setup(e) {
3817
+ const t = Oe();
3818
+ return (n, a) => r(t) ? (f(), y("div", Uo, [
3819
+ e.label ? (f(), P(r(ne), {
3820
+ key: 0,
3821
+ variant: "block",
3822
+ width: 60 + (e.label?.length || 0) * 4,
3823
+ height: 11
3824
+ }, null, 8, ["width"])) : w("", !0),
3825
+ M(r(ne), {
3826
+ variant: "block",
3827
+ width: "100%",
3828
+ height: 36
3829
+ })
3830
+ ])) : (f(), P(r(qo), {
3831
+ key: 1,
3832
+ class: "vc-input-dropdown",
3833
+ options: e.options,
3834
+ "option-label": e.optionLabel,
3835
+ "option-value": e.optionValue,
3836
+ searchable: e.searchable,
3837
+ debounce: e.debounce,
3838
+ disabled: e.disabled,
3839
+ label: e.label,
3840
+ required: e.required,
3841
+ "model-value": e.option,
3842
+ tooltip: e.tooltip,
3843
+ multilanguage: e.multilanguage,
3844
+ "current-language": e.currentLanguage,
3845
+ "onUpdate:modelValue": a[2] || (a[2] = (o) => n.$emit("update:option", o))
3846
+ }, {
3847
+ option: O((o) => [
3848
+ T(n.$slots, "option", Ae(Ne(o)))
3849
+ ]),
3850
+ control: O(({ toggleHandler: o, isOpened: i }) => [
3851
+ M(r(bt), {
3852
+ placeholder: e.placeholder,
3853
+ hint: e.hint,
3854
+ clearable: e.clearable,
3855
+ prefix: e.prefix,
3856
+ suffix: e.suffix,
3857
+ name: e.name,
3858
+ "model-value": e.modelValue,
3859
+ loading: e.loading,
3860
+ disabled: e.disabled,
3861
+ autofocus: e.autofocus,
3862
+ error: e.error,
3863
+ "error-message": e.errorMessage,
3864
+ maxlength: e.maxlength,
3865
+ type: e.inputType,
3866
+ "aria-label": e.label ? void 0 : e.ariaLabel,
3867
+ class: "vc-input-dropdown__input",
3868
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => n.$emit("update:model-value", l)),
3869
+ onBlur: a[1] || (a[1] = (l) => n.$emit("blur", l))
3870
+ }, oe({
3871
+ "append-inner": O(() => [
3872
+ x("div", Ko, [
3873
+ T(n.$slots, "button", { toggleHandler: o }, () => [
3874
+ e.options && e.options.length ? (f(), y("button", {
3875
+ key: 0,
3876
+ type: "button",
3877
+ class: "vc-input-dropdown__toggle-button",
3878
+ tabindex: "0",
3879
+ "aria-label": n.$t("COMPONENTS.CONTROLS.SELECT_OPTION"),
3880
+ "aria-expanded": i,
3881
+ "aria-haspopup": "listbox",
3882
+ onClick: G(o, ["stop", "prevent"]),
3883
+ onKeydown: [
3884
+ X(G(o, ["stop", "prevent"]), ["enter"]),
3885
+ X(G(o, ["stop", "prevent"]), ["space"])
3886
+ ]
3887
+ }, A(r(e.option)), 41, Wo)) : w("", !0)
3888
+ ]),
3889
+ e.options && e.options.length ? (f(), P(r(Ra), {
3890
+ key: 0,
3891
+ icon: i ? "lucide-chevron-up" : "lucide-chevron-down",
3892
+ "icon-size": "s",
3893
+ text: "",
3894
+ "aria-label": n.$t("COMPONENTS.CONTROLS.TOGGLE_DROPDOWN"),
3895
+ "icon-class": "vc-input-dropdown__toggle-button-icon",
3896
+ onClick: G(o, ["stop", "prevent"])
3897
+ }, null, 8, ["icon", "aria-label", "onClick"])) : w("", !0)
3898
+ ]),
3899
+ n.$slots["append-inner"] ? T(n.$slots, "append-inner", { key: 0 }) : w("", !0)
3900
+ ]),
3901
+ _: 2
3902
+ }, [
3903
+ n.$slots.control ? {
3904
+ name: "control",
3905
+ fn: O((l) => [
3906
+ T(n.$slots, "control", Ae(Ne(l)))
3907
+ ]),
3908
+ key: "0"
3909
+ } : void 0,
3910
+ n.$slots["prepend-inner"] ? {
3911
+ name: "prepend-inner",
3912
+ fn: O(() => [
3913
+ T(n.$slots, "prepend-inner")
3914
+ ]),
3915
+ key: "1"
3916
+ } : void 0,
3917
+ n.$slots.append ? {
3918
+ name: "append",
3919
+ fn: O(() => [
3920
+ T(n.$slots, "append")
3921
+ ]),
3922
+ key: "2"
3923
+ } : void 0,
3924
+ n.$slots.prepend ? {
3925
+ name: "prepend",
3926
+ fn: O(() => [
3927
+ T(n.$slots, "prepend")
3928
+ ]),
3929
+ key: "3"
3930
+ } : void 0
3931
+ ]), 1032, ["placeholder", "hint", "clearable", "prefix", "suffix", "name", "model-value", "loading", "disabled", "autofocus", "error", "error-message", "maxlength", "type", "aria-label"])
3932
+ ]),
3933
+ _: 3
3934
+ }, 8, ["options", "option-label", "option-value", "searchable", "debounce", "disabled", "label", "required", "model-value", "tooltip", "multilanguage", "current-language"]));
3935
+ }
3936
+ }), Ho = {
3937
+ key: 0,
3938
+ class: "vc-input-currency vc-input-currency--skeleton"
3939
+ }, Go = ["disabled", "placeholder", "aria-label"], Yo = /* @__PURE__ */ z({
3940
+ __name: "vc-input-currency",
3941
+ props: {
3942
+ modelValue: {},
3943
+ placeholder: {},
3944
+ hint: {},
3945
+ clearable: { type: Boolean },
3946
+ prefix: {},
3947
+ suffix: {},
3948
+ loading: { type: Boolean },
3949
+ debounce: { default: 0 },
3950
+ autofocus: { type: Boolean },
3951
+ maxlength: {},
3952
+ option: {},
3953
+ options: {},
3954
+ optionValue: {},
3955
+ optionLabel: {},
3956
+ currencyDisplay: { default: Nn.hidden },
3957
+ precision: { default: 2 },
3958
+ searchable: { type: Boolean, default: !1 },
3959
+ label: {},
3960
+ tooltip: {},
3961
+ disabled: { type: Boolean },
3962
+ required: { type: Boolean },
3963
+ name: {},
3964
+ error: { type: Boolean },
3965
+ errorMessage: {}
3966
+ },
3967
+ emits: ["update:model-value", "update:option", "change", "blur"],
3968
+ setup(e, { emit: t }) {
3969
+ const n = e, a = t, o = Oe(), { inputRef: i, setOptions: l, numberValue: s, setValue: u } = Dn(
3970
+ {
3971
+ locale: navigator.language,
3972
+ currency: n.option || "USD",
3973
+ currencyDisplay: n.currencyDisplay,
3974
+ hideGroupingSeparatorOnFocus: !1,
3975
+ precision: n.precision,
3976
+ hideCurrencySymbolOnFocus: !1,
3977
+ hideNegligibleDecimalDigitsOnFocus: !1
3978
+ }
3979
+ );
3980
+ j(
3981
+ () => n.option,
3982
+ (c) => {
3983
+ c && l({
3984
+ locale: navigator.language,
3985
+ currency: c,
3986
+ currencyDisplay: n.currencyDisplay,
3987
+ hideGroupingSeparatorOnFocus: !1,
3988
+ precision: n.precision,
3989
+ hideCurrencySymbolOnFocus: !1,
3990
+ hideNegligibleDecimalDigitsOnFocus: !1
3991
+ });
3992
+ }
3993
+ ), j(
3994
+ () => n.modelValue,
3995
+ (c) => {
3996
+ u(c);
3997
+ }
3998
+ ), j(s, (c) => {
3999
+ a("update:model-value", c);
4000
+ });
4001
+ function v(c) {
4002
+ i.value && (i.value.value = c), s.value = typeof c == "number" ? c : c === null ? null : parseFloat(String(c)) || null, a("update:model-value", s.value);
4003
+ }
4004
+ function m(c) {
4005
+ a("blur", c);
4006
+ }
4007
+ function g(c) {
4008
+ if ((c.key === "-" || c.key === "e") && c.preventDefault(), c.key !== "Tab") {
4009
+ if (c.key === "Enter") {
4010
+ c.target && c.target.blur();
4011
+ const b = Array.from(document.querySelectorAll('[tabindex="0"]:not(:disabled)')), h = b.indexOf(c.target);
4012
+ h >= 0 && h < b.length - 1 && b[h + 1].focus();
4013
+ }
4014
+ }
4015
+ }
4016
+ function d(c) {
4017
+ const b = c.clipboardData?.getData("text/plain");
4018
+ typeof b < "u" && parseInt(b) < 0 && c.preventDefault();
4019
+ }
4020
+ return (c, b) => r(o) ? (f(), y("div", Ho, [
4021
+ e.label ? (f(), P(r(ne), {
4022
+ key: 0,
4023
+ variant: "block",
4024
+ width: 60 + (e.label?.length || 0) * 4,
4025
+ height: 11
4026
+ }, null, 8, ["width"])) : w("", !0),
4027
+ M(r(ne), {
4028
+ variant: "block",
4029
+ width: "100%",
4030
+ height: 36
4031
+ })
4032
+ ])) : (f(), P(r(jo), {
4033
+ key: 1,
4034
+ class: "vc-input-currency",
4035
+ options: e.options,
4036
+ "option-label": e.optionLabel,
4037
+ "option-value": e.optionValue,
4038
+ searchable: e.searchable,
4039
+ debounce: e.debounce,
4040
+ disabled: e.disabled,
4041
+ label: e.label,
4042
+ required: e.required,
4043
+ option: e.option,
4044
+ "model-value": r(s),
4045
+ tooltip: e.tooltip,
4046
+ placeholder: e.placeholder,
4047
+ hint: e.hint,
4048
+ clearable: e.clearable,
4049
+ prefix: e.prefix,
4050
+ suffix: e.suffix,
4051
+ name: e.name,
4052
+ loading: e.loading,
4053
+ autofocus: e.autofocus,
4054
+ error: e.error,
4055
+ "error-message": e.errorMessage,
4056
+ maxlength: e.maxlength,
4057
+ "input-type": "number",
4058
+ "onUpdate:modelValue": v,
4059
+ "onUpdate:option": b[0] || (b[0] = (h) => c.$emit("update:option", h)),
4060
+ onBlur: m
4061
+ }, {
4062
+ control: O(({ placeholder: h }) => [
4063
+ x("input", {
4064
+ ref_key: "inputRef",
4065
+ ref: i,
4066
+ type: "text",
4067
+ disabled: e.disabled,
4068
+ placeholder: h,
4069
+ "aria-label": e.label || void 0,
4070
+ class: "vc-input-currency__control",
4071
+ tabindex: "0",
4072
+ onBlur: m,
4073
+ onKeydown: g,
4074
+ onPaste: d
4075
+ }, null, 40, Go)
4076
+ ]),
4077
+ _: 1
4078
+ }, 8, ["options", "option-label", "option-value", "searchable", "debounce", "disabled", "label", "required", "option", "model-value", "tooltip", "placeholder", "hint", "clearable", "prefix", "suffix", "name", "loading", "autofocus", "error", "error-message", "maxlength"]));
4079
+ }
4080
+ }), Yt = Symbol("VcAppBarState"), Jo = {
4081
+ activeWidgetId: I(null),
4082
+ activeMobileActionId: I(null)
4083
+ };
4084
+ function hr() {
4085
+ const e = {
4086
+ activeWidgetId: I(null),
4087
+ activeMobileActionId: I(null)
4088
+ };
4089
+ return Et(Yt, e), e;
4090
+ }
4091
+ function kr() {
4092
+ return Y(Yt, Jo);
4093
+ }
4094
+ const Ir = Symbol("TableContext"), Xo = Symbol("ColumnCollector"), Sr = Symbol("FillerWidth"), $r = Symbol("IsColumnReordering"), wr = (e, t) => {
4095
+ const n = e.__vccOpts || e;
4096
+ for (const [a, o] of t)
4097
+ n[a] = o;
4098
+ return n;
4099
+ }, Or = z({
4100
+ name: "VcColumn",
4101
+ inheritAttrs: !1,
4102
+ props: {
4103
+ // === Identity ===
4104
+ /** Unique column identifier (must be unique within the table) */
4105
+ id: {
4106
+ type: String,
4107
+ required: !0
4108
+ },
4109
+ /** Data field path to read from each item (default: same as `id`) */
4110
+ field: {
4111
+ type: String,
4112
+ default: void 0
4113
+ },
4114
+ // === Display ===
4115
+ /** Column header title text */
4116
+ title: {
4117
+ type: String,
4118
+ default: void 0
4119
+ },
4120
+ /** Cell formatter type — determines how cell value is rendered */
4121
+ type: {
4122
+ type: String,
4123
+ default: "text"
4124
+ },
4125
+ /** Field name to read currency code from (used with `type="money"`, default: `"currency"`) */
4126
+ currencyField: {
4127
+ type: String,
4128
+ default: "currency"
4129
+ },
4130
+ /** Date/number format string (e.g. `"DD.MM.YYYY"`) */
4131
+ format: {
4132
+ type: String,
4133
+ default: void 0
4134
+ },
4135
+ // === Sizing ===
4136
+ /** Column width in px or CSS string (e.g. `200`, `"150px"`) */
4137
+ width: {
4138
+ type: [String, Number],
4139
+ default: void 0
4140
+ },
4141
+ /** Minimum column width (default: `60px`) */
4142
+ minWidth: {
4143
+ type: [String, Number],
4144
+ default: void 0
4145
+ },
4146
+ /** Maximum column width */
4147
+ maxWidth: {
4148
+ type: [String, Number],
4149
+ default: void 0
4150
+ },
4151
+ // === Alignment ===
4152
+ /** Cell text alignment */
4153
+ align: {
4154
+ type: String,
4155
+ default: void 0
4156
+ },
4157
+ /** Header text alignment (default: same as `align`) */
4158
+ headerAlign: {
4159
+ type: String,
4160
+ default: void 0
4161
+ },
4162
+ // === Sorting ===
4163
+ /** Whether the column is sortable (shows sort icon on hover) */
4164
+ sortable: {
4165
+ type: Boolean,
4166
+ default: !1
4167
+ },
4168
+ /** Override backend field name for sorting (default: column `id`) */
4169
+ sortField: {
4170
+ type: String,
4171
+ default: void 0
4172
+ },
4173
+ // === Filtering ===
4174
+ /** Declarative filter config: `true` for text, `"field"` for text with custom field, or object for select/dateRange */
4175
+ filter: {
4176
+ type: [Boolean, String, Object],
4177
+ default: void 0
4178
+ },
4179
+ /** Override backend field name for filtering (default: column `id`) */
4180
+ filterField: {
4181
+ type: String,
4182
+ default: void 0
4183
+ },
4184
+ /** Placeholder text for the filter input */
4185
+ filterPlaceholder: {
4186
+ type: String,
4187
+ default: void 0
4188
+ },
4189
+ // === Visibility ===
4190
+ /** Whether the column is visible (default: `true`). Hidden columns can be toggled via column switcher */
4191
+ visible: {
4192
+ type: Boolean,
4193
+ default: !0
4194
+ },
4195
+ /** If `true`, column stays visible even when `showAllColumns=false` (e.g. when blade narrows) */
4196
+ alwaysVisible: {
4197
+ type: Boolean,
4198
+ default: !1
4199
+ },
4200
+ // === Editing ===
4201
+ /** Whether the cell is editable (enables inline edit on click) */
4202
+ editable: {
4203
+ type: Boolean,
4204
+ default: !1
4205
+ },
4206
+ /** Validation rules for the editable cell (field name → validator) */
4207
+ rules: {
4208
+ type: Object,
4209
+ default: void 0
4210
+ },
4211
+ // === Styling ===
4212
+ /** Custom CSS class applied to the entire column (header + body cells) */
4213
+ class: {
4214
+ type: String,
4215
+ default: void 0
4216
+ },
4217
+ /** Custom CSS class applied only to the header cell */
4218
+ headerClass: {
4219
+ type: String,
4220
+ default: void 0
4221
+ },
4222
+ /** Custom CSS class applied only to body cells */
4223
+ bodyClass: {
4224
+ type: String,
4225
+ default: void 0
4226
+ },
4227
+ /** Number of lines to clamp cell text to (`0` = no clamp, default: `2`) */
4228
+ lineClamp: {
4229
+ type: Number,
4230
+ default: 2
4231
+ },
4232
+ // === Special modes ===
4233
+ /** Renders a selection checkbox column (`"single"` = radio, `"multiple"` = checkbox) */
4234
+ selectionMode: {
4235
+ type: String,
4236
+ default: void 0
4237
+ },
4238
+ /** Renders row edit save/cancel buttons in this column */
4239
+ rowEditor: {
4240
+ type: Boolean,
4241
+ default: !1
4242
+ },
4243
+ /** Renders a drag handle for row reordering */
4244
+ rowReorder: {
4245
+ type: Boolean,
4246
+ default: !1
4247
+ },
4248
+ /** Renders an expand/collapse toggle for row expansion */
4249
+ expander: {
4250
+ type: Boolean,
4251
+ default: !1
4252
+ },
4253
+ // === Mobile ===
4254
+ /**
4255
+ * Mobile card role — determines how column is displayed on mobile.
4256
+ * - `"title"`: Primary identifier, displayed at top (full width, bold)
4257
+ * - `"image"`: Visual element, displayed on left side
4258
+ * - `"field"`: Data with label, auto-distributed in 2x2 grid (max 4)
4259
+ * - `"status"`: Status badge, displayed at bottom (multiple allowed)
4260
+ */
4261
+ mobileRole: {
4262
+ type: String,
4263
+ default: void 0
4264
+ },
4265
+ /** Explicit grid position for mobile card layout */
4266
+ mobilePosition: {
4267
+ type: String,
4268
+ default: void 0
4269
+ },
4270
+ /** Whether column is visible on mobile (default: `true` — hidden unless `mobileRole` is specified) */
4271
+ mobileVisible: {
4272
+ type: Boolean,
4273
+ default: !0
4274
+ }
4275
+ },
4276
+ setup(e, { slots: t }) {
4277
+ const n = Y(Xo, null), a = We();
4278
+ return je(() => {
4279
+ n && a && n.add({
4280
+ instance: a,
4281
+ props: e,
4282
+ slots: t
4283
+ });
4284
+ }), Bt(() => {
4285
+ n && a && n.delete(a);
4286
+ }), () => null;
4287
+ }
4288
+ }), Ee = nt(/* @__PURE__ */ new Map());
4289
+ function Jt() {
4290
+ return {
4291
+ register: (l) => {
4292
+ Ee.set(l.type, l);
4293
+ },
4294
+ get: (l) => Ee.get(l),
4295
+ has: (l) => Ee.has(l),
4296
+ getRegisteredTypes: () => Array.from(Ee.keys()),
4297
+ unregister: (l) => Ee.delete(l),
4298
+ clear: () => {
4299
+ Ee.clear();
4300
+ }
4301
+ };
4302
+ }
4303
+ const Zo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__ */ z({
4304
+ __name: "CellEditableWrapper",
4305
+ props: {
4306
+ label: {},
4307
+ fieldName: {},
4308
+ modelValue: {},
4309
+ rules: {},
4310
+ validateOnMount: { type: Boolean }
4311
+ },
4312
+ setup(e) {
4313
+ const t = e, n = I(null);
4314
+ return je(() => {
4315
+ const a = t.modelValue === void 0 || t.modelValue === null || t.modelValue === "";
4316
+ (t.validateOnMount || a && t.rules) && n.value?.validate();
4317
+ }), (a, o) => (f(), P(r(wn), {
4318
+ ref_key: "fieldRef",
4319
+ ref: n,
4320
+ label: e.label,
4321
+ name: e.fieldName,
4322
+ "model-value": e.modelValue,
4323
+ rules: e.rules
4324
+ }, {
4325
+ default: O(({ errors: i, errorMessage: l }) => [
4326
+ M(Tt, { placement: "bottom" }, oe({
4327
+ default: O(() => [
4328
+ T(a.$slots, "default", {
4329
+ errors: i,
4330
+ errorMessage: l
4331
+ })
4332
+ ]),
4333
+ _: 2
4334
+ }, [
4335
+ l ? {
4336
+ name: "tooltip",
4337
+ fn: O(() => [
4338
+ x("div", Zo, A(l), 1)
4339
+ ]),
4340
+ key: "0"
4341
+ } : void 0
4342
+ ]), 1024)
4343
+ ]),
4344
+ _: 3
4345
+ }, 8, ["label", "name", "model-value", "rules"]));
4346
+ }
4347
+ }), Qo = {
4348
+ key: 1,
4349
+ class: "vc-table-cell-default"
4350
+ }, Xt = /* @__PURE__ */ z({
4351
+ __name: "CellDefault",
4352
+ props: {
4353
+ value: {},
4354
+ editable: { type: Boolean },
4355
+ label: {},
4356
+ fieldName: {},
4357
+ fieldId: {},
4358
+ rules: {},
4359
+ rowIndex: {},
4360
+ validateOnMount: { type: Boolean }
4361
+ },
4362
+ emits: ["update", "blur"],
4363
+ setup(e, { emit: t }) {
4364
+ const n = e, a = t, { isMobile: o, isDesktop: i } = Ye(), l = (s) => {
4365
+ s && s.length > 0 || a("blur", { row: n.rowIndex, field: n.fieldId || "" });
4366
+ };
4367
+ return (s, u) => e.editable ? (f(), P(yt, {
4368
+ key: 0,
4369
+ label: e.label || "",
4370
+ "field-name": e.fieldName || "",
4371
+ "model-value": e.value,
4372
+ rules: e.rules,
4373
+ "validate-on-mount": e.validateOnMount
4374
+ }, {
4375
+ default: O(({ errors: v, errorMessage: m }) => [
4376
+ M(bt, {
4377
+ "model-value": e.value,
4378
+ class: "vc-table-cell-default__input",
4379
+ error: v.length > 0,
4380
+ "error-message": r(o) ? m : void 0,
4381
+ "onUpdate:modelValue": u[0] || (u[0] = (g) => s.$emit("update", { field: e.fieldId || "", value: g })),
4382
+ onBlur: (g) => l(v)
4383
+ }, oe({ _: 2 }, [
4384
+ r(i) && v.length > 0 ? {
4385
+ name: "append-inner",
4386
+ fn: O(() => [
4387
+ M(r(U), {
4388
+ icon: "lucide-circle-alert",
4389
+ class: "vc-table-cell-default__error-icon"
4390
+ })
4391
+ ]),
4392
+ key: "0"
4393
+ } : void 0
4394
+ ]), 1032, ["model-value", "error", "error-message", "onBlur"])
4395
+ ]),
4396
+ _: 1
4397
+ }, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : (f(), y("span", Qo, A(e.value), 1));
4398
+ }
4399
+ }), _o = {
4400
+ key: 1,
4401
+ class: "vc-table-cell-money"
4402
+ }, ei = {
4403
+ key: 2,
4404
+ class: "vc-table-cell-money vc-table-cell-money--not-set"
4405
+ }, ti = /* @__PURE__ */ z({
4406
+ __name: "CellMoney",
4407
+ props: {
4408
+ value: {},
4409
+ currency: {},
4410
+ editable: { type: Boolean },
4411
+ label: {},
4412
+ fieldName: {},
4413
+ fieldId: {},
4414
+ rules: {},
4415
+ rowIndex: {},
4416
+ validateOnMount: { type: Boolean }
4417
+ },
4418
+ emits: ["update", "blur"],
4419
+ setup(e, { emit: t }) {
4420
+ const n = e, a = t, { t: o } = we({ useScope: "global" }), i = window.navigator.language, { isMobile: l, isDesktop: s } = Ye(), u = $(() => typeof n.value > "u" || n.value === null || Number(n.value) === 0), v = $(() => {
4421
+ const g = Number(n.value);
4422
+ return isNaN(g) ? String(n.value) : new Intl.NumberFormat(i, {
4423
+ style: "currency",
4424
+ currency: n.currency || "USD"
4425
+ }).format(g);
4426
+ }), m = (g) => {
4427
+ g && g.length > 0 || a("blur", { row: n.rowIndex, field: n.fieldId || "" });
4428
+ };
4429
+ return (g, d) => e.editable ? (f(), P(yt, {
4430
+ key: 0,
4431
+ label: e.label || "",
4432
+ "field-name": e.fieldName || "",
4433
+ "model-value": e.value,
4434
+ rules: e.rules,
4435
+ "validate-on-mount": e.validateOnMount
4436
+ }, {
4437
+ default: O(({ errors: c, errorMessage: b }) => [
4438
+ M(Yo, {
4439
+ "model-value": e.value,
4440
+ options: [],
4441
+ option: e.currency || "USD",
4442
+ "currency-display": "symbol",
4443
+ class: "vc-table-cell-money__input",
4444
+ error: c.length > 0,
4445
+ "error-message": r(l) ? b : void 0,
4446
+ "onUpdate:modelValue": d[0] || (d[0] = (h) => g.$emit("update", { field: e.fieldId || "", value: h })),
4447
+ onBlur: (h) => m(c)
4448
+ }, oe({ _: 2 }, [
4449
+ r(s) && c.length > 0 ? {
4450
+ name: "append-inner",
4451
+ fn: O(() => [
4452
+ M(r(U), {
4453
+ icon: "lucide-circle-alert",
4454
+ class: "vc-table-cell-money__error-icon"
4455
+ })
4456
+ ]),
4457
+ key: "0"
4458
+ } : void 0
4459
+ ]), 1032, ["model-value", "option", "error", "error-message", "onBlur"])
4460
+ ]),
4461
+ _: 1
4462
+ }, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : u.value ? (f(), y("span", ei, A(r(o)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1)) : (f(), y("span", _o, A(v.value), 1));
4463
+ }
4464
+ }), ni = {
4465
+ key: 1,
4466
+ class: "vc-table-cell-number"
4467
+ }, ai = {
4468
+ key: 2,
4469
+ class: "vc-table-cell-number vc-table-cell-number--not-set"
4470
+ }, li = /* @__PURE__ */ z({
4471
+ __name: "CellNumber",
4472
+ props: {
4473
+ value: {},
4474
+ editable: { type: Boolean },
4475
+ label: {},
4476
+ fieldName: {},
4477
+ fieldId: {},
4478
+ rules: {},
4479
+ rowIndex: {},
4480
+ validateOnMount: { type: Boolean }
4481
+ },
4482
+ emits: ["update", "blur"],
4483
+ setup(e, { emit: t }) {
4484
+ const n = e, a = t, { t: o } = we({ useScope: "global" }), { isMobile: i, isDesktop: l } = Ye(), s = $(() => {
4485
+ if (n.value === null || n.value === void 0) return !0;
4486
+ const m = Number(n.value);
4487
+ return isNaN(m) || m < 0;
4488
+ }), u = $(() => {
4489
+ const m = Number(n.value);
4490
+ return isNaN(m) ? String(n.value) : m.toFixed(0);
4491
+ }), v = (m) => {
4492
+ m && m.length > 0 || a("blur", { row: n.rowIndex, field: n.fieldId || "" });
4493
+ };
4494
+ return (m, g) => e.editable ? (f(), P(yt, {
4495
+ key: 0,
4496
+ label: e.label || "",
4497
+ "field-name": e.fieldName || "",
4498
+ "model-value": e.value,
4499
+ rules: e.rules,
4500
+ "validate-on-mount": e.validateOnMount
4501
+ }, {
4502
+ default: O(({ errors: d, errorMessage: c }) => [
4503
+ M(bt, {
4504
+ "model-value": e.value,
4505
+ class: "vc-table-cell-number__input",
4506
+ type: "number",
4507
+ error: d.length > 0,
4508
+ "error-message": r(i) ? c : void 0,
4509
+ "onUpdate:modelValue": g[0] || (g[0] = (b) => m.$emit("update", { field: e.fieldId || "", value: b })),
4510
+ onBlur: (b) => v(d)
4511
+ }, oe({ _: 2 }, [
4512
+ r(l) && d.length > 0 ? {
4513
+ name: "append-inner",
4514
+ fn: O(() => [
4515
+ M(r(U), {
4516
+ icon: "lucide-circle-alert",
4517
+ class: "vc-table-cell-number__error-icon"
4518
+ })
4519
+ ]),
4520
+ key: "0"
4521
+ } : void 0
4522
+ ]), 1032, ["model-value", "error", "error-message", "onBlur"])
4523
+ ]),
4524
+ _: 1
4525
+ }, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : s.value ? (f(), y("span", ai, A(r(o)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1)) : (f(), y("span", ni, A(u.value), 1));
4526
+ }
4527
+ }), oi = {
4528
+ key: 0,
4529
+ class: "vc-table-cell-date"
4530
+ }, ii = {
4531
+ key: 1,
4532
+ class: "vc-table-cell-date vc-table-cell-date--not-set"
4533
+ }, et = /* @__PURE__ */ z({
4534
+ __name: "CellDate",
4535
+ props: {
4536
+ value: {},
4537
+ variant: {},
4538
+ format: {}
4539
+ },
4540
+ setup(e) {
4541
+ const t = e, { t: n } = we({ useScope: "global" }), a = window.navigator.language, o = $(() => {
4542
+ if (!t.value) return "";
4543
+ if (t.format)
4544
+ return Zn(t.value, t.format, a);
4545
+ const i = t.value instanceof Date ? t.value : new Date(t.value), l = t.variant || "date";
4546
+ return l === "time" ? i.toLocaleTimeString(a) : l === "date-time" ? i.toLocaleString(a) : i.toLocaleDateString(a);
4547
+ });
4548
+ return (i, l) => e.value ? (f(), y("span", oi, A(o.value), 1)) : (f(), y("span", ii, A(r(n)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1));
4549
+ }
4550
+ }), ri = ["title"], si = {
4551
+ key: 1,
4552
+ class: "vc-table-cell-date-ago vc-table-cell-date-ago--not-set"
4553
+ }, ui = /* @__PURE__ */ z({
4554
+ __name: "CellDateAgo",
4555
+ props: {
4556
+ value: {}
4557
+ },
4558
+ setup(e) {
4559
+ const t = e, { t: n } = we({ useScope: "global" }), a = window.navigator.language, o = $(() => t.value ? (t.value instanceof Date ? t.value : new Date(t.value)).toLocaleString(a) : ""), i = $(() => t.value ? Xn(t.value) : "");
4560
+ return (l, s) => e.value ? (f(), y("span", {
4561
+ key: 0,
4562
+ class: "vc-table-cell-date-ago",
4563
+ title: o.value
4564
+ }, A(i.value), 9, ri)) : (f(), y("span", si, A(r(n)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1));
4565
+ }
4566
+ }), ci = /* @__PURE__ */ z({
4567
+ __name: "CellImage",
4568
+ props: {
4569
+ value: {},
4570
+ emptyIcon: {}
4571
+ },
4572
+ setup(e) {
4573
+ return (t, n) => (f(), P(r(Ka), {
4574
+ class: "vc-table-cell-image",
4575
+ bordered: !0,
4576
+ size: "s",
4577
+ aspect: "1x1",
4578
+ src: e.value,
4579
+ "empty-icon": e.emptyIcon,
4580
+ background: "contain",
4581
+ "thumbnail-size": "sm"
4582
+ }, null, 8, ["src", "empty-icon"]));
4583
+ }
4584
+ }), di = /* @__PURE__ */ z({
4585
+ __name: "CellStatus",
4586
+ props: {
4587
+ value: {}
4588
+ },
4589
+ setup(e) {
4590
+ return (t, n) => (f(), P(r(tl), { class: "vc-table-cell-status" }, {
4591
+ default: O(() => [
4592
+ Z(A(e.value), 1)
4593
+ ]),
4594
+ _: 1
4595
+ }));
4596
+ }
4597
+ }), fi = { class: "vc-table-cell-status-icon" }, vi = /* @__PURE__ */ z({
4598
+ __name: "CellStatusIcon",
4599
+ props: {
4600
+ value: {}
4601
+ },
4602
+ setup(e) {
4603
+ return (t, n) => (f(), y("div", fi, [
4604
+ typeof e.value == "boolean" ? (f(), P(r(al), {
4605
+ key: 0,
4606
+ status: e.value
4607
+ }, null, 8, ["status"])) : w("", !0)
4608
+ ]));
4609
+ }
4610
+ }), gi = /* @__PURE__ */ z({
4611
+ __name: "CellLink",
4612
+ props: {
4613
+ value: {}
4614
+ },
4615
+ setup(e) {
4616
+ return (t, n) => (f(), P(r(Qa), { class: "vc-table-cell-link" }, {
4617
+ default: O(() => [
4618
+ Z(A(e.value), 1)
4619
+ ]),
4620
+ _: 1
4621
+ }));
4622
+ }
4623
+ }), mi = ["innerHTML"], pi = 500, bi = /* @__PURE__ */ z({
4624
+ __name: "CellHtml",
4625
+ props: {
4626
+ value: {},
4627
+ maxLength: {}
4628
+ },
4629
+ setup(e) {
4630
+ const t = e, n = /* @__PURE__ */ new Map();
4631
+ function a(l) {
4632
+ if (n.has(l))
4633
+ return n.get(l);
4634
+ const s = Dt.sanitize(l, {
4635
+ ALLOWED_TAGS: [
4636
+ "p",
4637
+ "br",
4638
+ "strong",
4639
+ "em",
4640
+ "u",
4641
+ "s",
4642
+ "h1",
4643
+ "h2",
4644
+ "h3",
4645
+ "h4",
4646
+ "h5",
4647
+ "h6",
4648
+ "ul",
4649
+ "ol",
4650
+ "li",
4651
+ "blockquote",
4652
+ "pre",
4653
+ "code",
4654
+ "a",
4655
+ "img",
4656
+ "table",
4657
+ "thead",
4658
+ "tbody",
4659
+ "tr",
4660
+ "th",
4661
+ "td",
4662
+ "hr",
4663
+ "div",
4664
+ "span"
4665
+ ],
4666
+ ALLOWED_ATTR: ["href", "src", "alt", "title", "class", "id", "colspan", "rowspan", "align", "valign"],
4667
+ FORBID_TAGS: ["script", "object", "embed", "form", "input"],
4668
+ FORBID_ATTR: ["onerror", "onload", "onclick", "onmouseover", "onfocus", "onblur", "style"]
4669
+ });
4670
+ if (n.size >= pi) {
4671
+ const u = n.keys().next().value;
4672
+ u !== void 0 && n.delete(u);
4673
+ }
4674
+ return n.set(l, s), s;
4675
+ }
4676
+ const o = $(() => t.value ? a(String(t.value)) : ""), i = $(() => Un(o.value, t.maxLength || 30));
4677
+ return (l, s) => (f(), y("div", {
4678
+ class: "vc-table-cell-html",
4679
+ innerHTML: i.value
4680
+ }, null, 8, mi));
4681
+ }
4682
+ }), Zt = [
4683
+ { type: "text", component: Xt, config: { editable: !0 } },
4684
+ { type: "number", component: li, config: { editable: !0 } },
4685
+ { type: "money", component: ti, config: { editable: !0 } },
4686
+ { type: "date", component: et, config: { editable: !1 } },
4687
+ { type: "time", component: et, config: { editable: !1 } },
4688
+ { type: "datetime", component: et, config: { editable: !1 } },
4689
+ { type: "date-ago", component: ui, config: { editable: !1 } },
4690
+ { type: "image", component: ci, config: { editable: !1 } },
4691
+ { type: "status", component: di, config: { editable: !1 } },
4692
+ { type: "status-icon", component: vi, config: { editable: !1 } },
4693
+ { type: "link", component: gi, config: { editable: !1 } },
4694
+ { type: "html", component: bi, config: { editable: !1 } }
4695
+ ], Er = Object.freeze(Zt.map((e) => e.type));
4696
+ function yi() {
4697
+ const { register: e, has: t } = Jt();
4698
+ for (const n of Zt)
4699
+ t(n.type) || e(n);
4700
+ }
4701
+ yi();
4702
+ const Lr = /* @__PURE__ */ z({
4703
+ __name: "DynamicCellRenderer",
4704
+ props: {
4705
+ type: {},
4706
+ value: {},
4707
+ editable: { type: Boolean },
4708
+ label: {},
4709
+ fieldName: {},
4710
+ fieldId: {},
4711
+ rules: {},
4712
+ rowIndex: {},
4713
+ currency: {},
4714
+ format: {},
4715
+ variant: {},
4716
+ validateOnMount: { type: Boolean }
4717
+ },
4718
+ emits: ["update", "blur"],
4719
+ setup(e) {
4720
+ const { get: t } = Jt(), n = e, a = $(() => t(n.type)?.component || Xt), o = $(() => {
4721
+ const l = t(n.type)?.config?.editable ?? !1, s = {
4722
+ value: n.value
4723
+ };
4724
+ return l && n.editable && (s.editable = n.editable, s.label = n.label, s.fieldName = n.fieldName, s.fieldId = n.fieldId, s.rules = n.rules, s.rowIndex = n.rowIndex, n.validateOnMount && (s.validateOnMount = !0)), n.type === "money" && n.currency && (s.currency = n.currency), (n.type === "date" || n.type === "time" || n.type === "datetime") && n.variant && (s.variant = n.variant), n.format && (s.format = n.format), s;
4725
+ });
4726
+ return (i, l) => (f(), P(ut(a.value), ee(o.value, {
4727
+ onUpdate: l[0] || (l[0] = (s) => i.$emit("update", s)),
4728
+ onBlur: l[1] || (l[1] = (s) => i.$emit("blur", s))
4729
+ }), null, 16));
4730
+ }
4731
+ }), Br = z({
4732
+ name: "SlotProxy",
4733
+ props: {
4734
+ slotFn: { type: Function, required: !0 },
4735
+ scope: { type: Object, default: () => ({}) }
4736
+ },
4737
+ setup(e) {
4738
+ return () => e.slotFn(e.scope);
4739
+ }
4740
+ }), Cr = (e, t) => {
4741
+ const n = t.arg ? parseInt(t.arg, 10) : 9e3, a = typeof t.value == "object" ? t.value : { blur: !0 };
4742
+ t.value ? (e.classList.add("v-loading"), a.size && e.setAttribute("data-loading-size", a.size), a.color && e.style.setProperty("--v-loading-spinner-color", a.color), a.blur === !1 && e.classList.add("v-loading--no-blur"), a.fullscreen && e.classList.add("v-loading--fullscreen"), e.style.setProperty("--v-loading-z-index", `${n}`)) : (e.classList.remove("v-loading", "v-loading--no-blur", "v-loading--fullscreen"), e.removeAttribute("data-loading-size"), e.style.removeProperty("--v-loading-z-index"), e.style.removeProperty("--v-loading-spinner-color"));
4743
+ };
4744
+ export {
4745
+ Kt as $,
4746
+ Cr as A,
4747
+ Er as B,
4748
+ hr as C,
4749
+ yi as D,
4750
+ kr as E,
4751
+ Oe as F,
4752
+ Jt as G,
4753
+ ia as H,
4754
+ He as I,
4755
+ sa as J,
4756
+ wr as K,
4757
+ fr as L,
4758
+ or as M,
4759
+ aa as N,
4760
+ dt as O,
4761
+ ue as P,
4762
+ $e as Q,
4763
+ qe as R,
4764
+ er as S,
4765
+ Kn as T,
4766
+ ot as U,
4767
+ me as V,
4768
+ la as W,
4769
+ Ye as X,
4770
+ ur as Y,
4771
+ sr as Z,
4772
+ et as _,
4773
+ Ca as a,
4774
+ Xo as a$,
4775
+ gr as a0,
4776
+ Ia as a1,
4777
+ vl as a2,
4778
+ $a as a3,
4779
+ wa as a4,
4780
+ Oa as a5,
4781
+ qi as a6,
4782
+ ye as a7,
4783
+ Ma as a8,
4784
+ ie as a9,
4785
+ Qi as aA,
4786
+ pr as aB,
4787
+ ar as aC,
4788
+ cr as aD,
4789
+ ir as aE,
4790
+ nr as aF,
4791
+ rr as aG,
4792
+ Xi as aH,
4793
+ Gi as aI,
4794
+ Jn as aJ,
4795
+ Vt as aK,
4796
+ Yi as aL,
4797
+ La as aM,
4798
+ _i as aN,
4799
+ br as aO,
4800
+ lr as aP,
4801
+ Ki as aQ,
4802
+ tr as aR,
4803
+ Ht as aS,
4804
+ yr as aT,
4805
+ Xl as aU,
4806
+ ra as aV,
4807
+ Ir as aW,
4808
+ Sr as aX,
4809
+ $r as aY,
4810
+ Br as aZ,
4811
+ Lr as a_,
4812
+ Ui as aa,
4813
+ zi as ab,
4814
+ Fi as ac,
4815
+ Pi as ad,
4816
+ vr as ae,
4817
+ Hi as af,
4818
+ mr as ag,
4819
+ fa as ah,
4820
+ da as ai,
4821
+ va as aj,
4822
+ _n as ak,
4823
+ Yn as al,
4824
+ na as am,
4825
+ ji as an,
4826
+ ca as ao,
4827
+ Xn as ap,
4828
+ Zn as aq,
4829
+ Wi as ar,
4830
+ Ji as as,
4831
+ Zi as at,
4832
+ ta as au,
4833
+ Wn as av,
4834
+ ea as aw,
4835
+ ua as ax,
4836
+ It as ay,
4837
+ dr as az,
4838
+ ui as b,
4839
+ oa as b0,
4840
+ Xt as c,
4841
+ yt as d,
4842
+ bi as e,
4843
+ ci as f,
4844
+ gi as g,
4845
+ ti as h,
4846
+ li as i,
4847
+ di as j,
4848
+ vi as k,
4849
+ Ra as l,
4850
+ Al as m,
4851
+ Or as n,
4852
+ Sl as o,
4853
+ Ka as p,
4854
+ bt as q,
4855
+ Yo as r,
4856
+ jo as s,
4857
+ Je as t,
4858
+ Qa as u,
4859
+ ol as v,
4860
+ qo as w,
4861
+ ne as x,
4862
+ tl as y,
4863
+ al as z
4864
+ };