@vc-shell/framework 2.1.0-pr253.0b14b2c → 2.1.0-pr255.4dc5c0d

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