@teammodlr/ui-kit 1.0.2

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 (129) hide show
  1. package/env.d.ts +1 -0
  2. package/lib/__storybook__/argTypes.d.ts +31 -0
  3. package/lib/__storybook__/createStory.d.ts +8 -0
  4. package/lib/__storybook__/index.d.ts +2 -0
  5. package/lib/components/avatar/Avatar.vue.d.ts +70 -0
  6. package/lib/components/avatargroup/AvatarGroup.vue.d.ts +34 -0
  7. package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +25 -0
  8. package/lib/components/breadcrumbitem/BreadcrumbItem.vue.d.ts +18 -0
  9. package/lib/components/breadcrumbitem/index.d.ts +1 -0
  10. package/lib/components/button/Button.vue.d.ts +121 -0
  11. package/lib/components/buttongroup/ButtonGroup.vue.d.ts +29 -0
  12. package/lib/components/checkbox/Checkbox.vue.d.ts +97 -0
  13. package/lib/components/dropdown/Dropdown.vue.d.ts +114 -0
  14. package/lib/components/dropdown/DropdownItem.vue.d.ts +61 -0
  15. package/lib/components/dropdown/DropdownList.vue.d.ts +2 -0
  16. package/lib/components/dropdown/DropdownWrapper.vue.d.ts +2 -0
  17. package/lib/components/dropdown/hooks.d.ts +2 -0
  18. package/lib/components/form/Form.vue.d.ts +67 -0
  19. package/lib/components/image/Image.vue.d.ts +50 -0
  20. package/lib/components/index.d.ts +26 -0
  21. package/lib/components/input/Input.vue.d.ts +126 -0
  22. package/lib/components/link/Link.vue.d.ts +51 -0
  23. package/lib/components/messageprovider/Message.vue.d.ts +61 -0
  24. package/lib/components/messageprovider/MessageProvider.vue.d.ts +51 -0
  25. package/lib/components/messageprovider/types.d.ts +28 -0
  26. package/lib/components/messageprovider/useMessage.d.ts +2 -0
  27. package/lib/components/select/Select.vue.d.ts +180 -0
  28. package/lib/components/skeleton/Skeleton.vue.d.ts +39 -0
  29. package/lib/components/tab/Tab.vue.d.ts +41 -0
  30. package/lib/components/tab/TabGroup.vue.d.ts +43 -0
  31. package/lib/components/table/Table.vue.d.ts +63 -0
  32. package/lib/components/table/TableBody.vue.d.ts +2 -0
  33. package/lib/components/table/TableCell.vue.d.ts +2 -0
  34. package/lib/components/table/TableHead.vue.d.ts +20 -0
  35. package/lib/components/table/TableHeadRow.vue.d.ts +2 -0
  36. package/lib/components/table/TableRow.vue.d.ts +2 -0
  37. package/lib/components/table/types/index.d.ts +5 -0
  38. package/lib/components/tooltip/Tooltip.vue.d.ts +54 -0
  39. package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +43 -0
  40. package/lib/composables/element.d.ts +2 -0
  41. package/lib/composables/useCachedUid.d.ts +13 -0
  42. package/lib/composables/useEventListener.d.ts +1 -0
  43. package/lib/composables/useInput.d.ts +36 -0
  44. package/lib/composables/useIsServer.d.ts +1 -0
  45. package/lib/composables/useMount.d.ts +13 -0
  46. package/lib/composables/usePopper.d.ts +31 -0
  47. package/lib/create.d.ts +9 -0
  48. package/lib/index.cjs.js +5 -0
  49. package/lib/index.d.ts +4 -0
  50. package/lib/index.es.js +3164 -0
  51. package/lib/install.d.ts +4 -0
  52. package/lib/nuxt.js +33 -0
  53. package/lib/nuxt.plugin.js +8 -0
  54. package/lib/style.css +1 -0
  55. package/lib/types/props.d.ts +2 -0
  56. package/package.json +75 -0
  57. package/src/__storybook__/argTypes.ts +42 -0
  58. package/src/__storybook__/createStory.ts +15 -0
  59. package/src/__storybook__/index.ts +2 -0
  60. package/src/components/avatar/Avatar.css +69 -0
  61. package/src/components/avatar/Avatar.vue +102 -0
  62. package/src/components/avatargroup/AvatarGroup.css +8 -0
  63. package/src/components/avatargroup/AvatarGroup.vue +32 -0
  64. package/src/components/breadcrumb/Breadcrumb.css +46 -0
  65. package/src/components/breadcrumb/Breadcrumb.vue +51 -0
  66. package/src/components/breadcrumbitem/BreadcrumbItem.vue +66 -0
  67. package/src/components/breadcrumbitem/index.ts +1 -0
  68. package/src/components/button/Button.css +378 -0
  69. package/src/components/button/Button.vue +108 -0
  70. package/src/components/buttongroup/ButtonGroup.vue +47 -0
  71. package/src/components/checkbox/Checkbox.css +185 -0
  72. package/src/components/checkbox/Checkbox.vue +140 -0
  73. package/src/components/dropdown/Dropdown.css +68 -0
  74. package/src/components/dropdown/Dropdown.vue +237 -0
  75. package/src/components/dropdown/DropdownItem.vue +118 -0
  76. package/src/components/dropdown/DropdownList.vue +20 -0
  77. package/src/components/dropdown/DropdownWrapper.vue +17 -0
  78. package/src/components/dropdown/hooks.ts +30 -0
  79. package/src/components/form/Form.vue +141 -0
  80. package/src/components/image/Image.vue +71 -0
  81. package/src/components/index.ts +27 -0
  82. package/src/components/input/Input.css +173 -0
  83. package/src/components/input/Input.vue +176 -0
  84. package/src/components/link/Link.css +147 -0
  85. package/src/components/link/Link.vue +54 -0
  86. package/src/components/messageprovider/Message.vue +76 -0
  87. package/src/components/messageprovider/MessageProvider.css +36 -0
  88. package/src/components/messageprovider/MessageProvider.vue +142 -0
  89. package/src/components/messageprovider/types.ts +39 -0
  90. package/src/components/messageprovider/useMessage.ts +12 -0
  91. package/src/components/select/Select.css +226 -0
  92. package/src/components/select/Select.vue +474 -0
  93. package/src/components/skeleton/Skeleton.css +73 -0
  94. package/src/components/skeleton/Skeleton.vue +47 -0
  95. package/src/components/tab/Tab.css +113 -0
  96. package/src/components/tab/Tab.vue +98 -0
  97. package/src/components/tab/TabGroup.vue +90 -0
  98. package/src/components/table/Table.css +45 -0
  99. package/src/components/table/Table.vue +108 -0
  100. package/src/components/table/TableBody.vue +13 -0
  101. package/src/components/table/TableCell.vue +13 -0
  102. package/src/components/table/TableHead.vue +22 -0
  103. package/src/components/table/TableHeadRow.vue +15 -0
  104. package/src/components/table/TableRow.vue +13 -0
  105. package/src/components/table/types/index.ts +5 -0
  106. package/src/components/tooltip/Tooltip.css +49 -0
  107. package/src/components/tooltip/Tooltip.vue +85 -0
  108. package/src/components/virtualscroll/VirtualScroll.css +13 -0
  109. package/src/components/virtualscroll/VirtualScroll.vue +61 -0
  110. package/src/composables/element.ts +13 -0
  111. package/src/composables/useCachedUid.ts +48 -0
  112. package/src/composables/useEventListener.ts +14 -0
  113. package/src/composables/useInput.ts +134 -0
  114. package/src/composables/useIsServer.ts +7 -0
  115. package/src/composables/useMount.ts +43 -0
  116. package/src/composables/usePopper.ts +194 -0
  117. package/src/create.ts +34 -0
  118. package/src/css/components.css +14 -0
  119. package/src/css/index.css +4 -0
  120. package/src/css/normalize.css +379 -0
  121. package/src/css/transitions.css +40 -0
  122. package/src/css/variables.css +80 -0
  123. package/src/exports/nuxt.js +33 -0
  124. package/src/exports/nuxt.plugin.js +8 -0
  125. package/src/index.ts +5 -0
  126. package/src/install.ts +8 -0
  127. package/src/shims-vue.d.ts +6 -0
  128. package/src/types/props.ts +3 -0
  129. package/volar.d.ts +16 -0
@@ -0,0 +1,3164 @@
1
+ import { defineComponent as I, inject as le, computed as b, openBlock as y, createBlock as K, resolveDynamicComponent as Ye, normalizeClass as D, withCtx as Y, createElementBlock as _, renderSlot as B, createCommentVNode as q, createElementVNode as V, provide as fe, ref as $, onMounted as pe, watch as W, nextTick as Ee, withModifiers as ut, readonly as _n, onUnmounted as Sn, toRef as $e, toDisplayString as H, mergeProps as Gt, toHandlers as Ut, watchEffect as ct, onBeforeUnmount as Xt, getCurrentScope as Cn, onScopeDispose as kn, unref as En, resolveComponent as de, Fragment as ge, renderList as Ie, createTextVNode as Oe, Teleport as Qe, createVNode as _e, Transition as dt, normalizeStyle as ft, withDirectives as pt, vModelCheckbox as Tn, reactive as Ke, vShow as Yt } from "vue";
2
+ const Mn = I({
3
+ name: "MButton",
4
+ props: {
5
+ type: {
6
+ type: String,
7
+ default: "button"
8
+ },
9
+ color: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ size: {
14
+ type: String,
15
+ default: "md"
16
+ },
17
+ rounded: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ disabled: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ block: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ secondary: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ to: {
34
+ type: [String, Object],
35
+ default: ""
36
+ },
37
+ href: {
38
+ type: String,
39
+ default: ""
40
+ },
41
+ icon: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ strong: {
46
+ type: Boolean,
47
+ default: !1
48
+ }
49
+ },
50
+ setup(e, { slots: t }) {
51
+ const n = le("buttonGroup", {
52
+ groupProps: {},
53
+ isGroup: !1
54
+ }), r = b(() => !!t["icon-left"]), a = b(() => !!t["icon-right"]), o = b(() => [
55
+ "m-button",
56
+ `m-button--${n.groupProps.size || e.size}`,
57
+ {
58
+ [`m-button--${e.color}`]: e.color,
59
+ "m-button--rounded": e.rounded,
60
+ "m-button--block": e.block,
61
+ "m-button--icon": e.icon,
62
+ "m-button--secondary": e.secondary,
63
+ "m-button--disabled": e.disabled,
64
+ "m-button--strong": e.strong,
65
+ "m-button--icon-left": r.value,
66
+ "m-button--icon-right": a.value
67
+ }
68
+ ]), l = b(() => e.to ? "router-link" : e.href ? "a" : "button");
69
+ return {
70
+ computedClasses: o,
71
+ computedTag: l,
72
+ hasIconLeft: r,
73
+ hasIconRight: a
74
+ };
75
+ }
76
+ }), L = (e, t) => {
77
+ const n = e.__vccOpts || e;
78
+ for (const [r, a] of t)
79
+ n[r] = a;
80
+ return n;
81
+ }, An = {
82
+ key: 0,
83
+ class: "m-button__icon"
84
+ }, Bn = { class: "m-button__content" }, Pn = {
85
+ key: 1,
86
+ class: "m-button__icon"
87
+ };
88
+ function Rn(e, t, n, r, a, o) {
89
+ return y(), K(Ye(e.computedTag), {
90
+ to: e.to,
91
+ href: e.href,
92
+ type: e.type,
93
+ class: D(e.computedClasses),
94
+ disabled: e.disabled
95
+ }, {
96
+ default: Y(() => [
97
+ e.hasIconLeft ? (y(), _("div", An, [
98
+ B(e.$slots, "icon-left")
99
+ ])) : q("", !0),
100
+ V("span", Bn, [
101
+ B(e.$slots, "default")
102
+ ]),
103
+ e.hasIconRight ? (y(), _("div", Pn, [
104
+ B(e.$slots, "icon-right")
105
+ ])) : q("", !0)
106
+ ]),
107
+ _: 3
108
+ }, 8, ["to", "href", "type", "class", "disabled"]);
109
+ }
110
+ const Dn = /* @__PURE__ */ L(Mn, [["render", Rn]]), In = I({
111
+ name: "MButtonGroup",
112
+ props: {
113
+ tag: {
114
+ type: String,
115
+ default: "div"
116
+ },
117
+ size: {
118
+ type: String,
119
+ default: "md"
120
+ }
121
+ },
122
+ setup(e) {
123
+ return fe("buttonGroup", {
124
+ groupProps: e,
125
+ isGroup: !0
126
+ }), {
127
+ computedClasses: b(() => [
128
+ "m-button-group",
129
+ {
130
+ [`m-button-group--${e.size}`]: e.size
131
+ }
132
+ ])
133
+ };
134
+ }
135
+ });
136
+ function Ln(e, t, n, r, a, o) {
137
+ return y(), K(Ye(e.tag), {
138
+ class: D(e.computedClasses)
139
+ }, {
140
+ default: Y(() => [
141
+ B(e.$slots, "default")
142
+ ]),
143
+ _: 3
144
+ }, 8, ["class"]);
145
+ }
146
+ const Nn = /* @__PURE__ */ L(In, [["render", Ln]]), Vn = "m-form", jn = I({
147
+ name: "MForm",
148
+ props: {
149
+ disabled: {
150
+ type: Boolean,
151
+ default: !1
152
+ },
153
+ loading: {
154
+ type: Boolean,
155
+ default: !1
156
+ },
157
+ errors: {
158
+ type: [Array, Object],
159
+ default: () => []
160
+ },
161
+ autoValidate: {
162
+ type: Boolean,
163
+ default: !0
164
+ },
165
+ autoFocus: {
166
+ type: Boolean,
167
+ default: !1
168
+ }
169
+ },
170
+ emits: [
171
+ "submit"
172
+ ],
173
+ setup(e, { emit: t }) {
174
+ const n = [];
175
+ fe(Vn, {
176
+ add: (s, i, c, u) => {
177
+ const p = n.find((h) => h.name === s);
178
+ p ? (p.focus = i, p.validate = c, p.setError = u) : n.push({
179
+ name: s,
180
+ focus: i,
181
+ validate: c,
182
+ setError: u
183
+ });
184
+ },
185
+ remove: (s) => {
186
+ const i = n.findIndex((c) => c.name === s);
187
+ n.splice(i, 1);
188
+ },
189
+ insideForm: !0,
190
+ disabled: $(e.disabled),
191
+ loading: $(e.loading)
192
+ }), pe(() => {
193
+ e.autoFocus && n && n.length > 0 && n[0].focus();
194
+ }), W(() => e.errors, (s) => {
195
+ s && Ee(() => {
196
+ if (Array.isArray(s))
197
+ s.forEach((i) => {
198
+ const c = n.find((u) => u.name === i.field);
199
+ c && c.setError(i.message);
200
+ });
201
+ else {
202
+ const i = n.find((c) => c.name === s.field);
203
+ i && i.setError(s.message);
204
+ }
205
+ });
206
+ });
207
+ const r = () => {
208
+ let s = !0;
209
+ return n.forEach((i) => {
210
+ i.validate() || (s = !1);
211
+ }), s;
212
+ }, a = (s) => {
213
+ s.preventDefault(), s.stopPropagation(), t("submit", e.autoValidate ? r() : !0);
214
+ }, o = b(() => []), l = b(() => [
215
+ "m-form"
216
+ ]);
217
+ return {
218
+ submit: a,
219
+ computedStyles: o,
220
+ computedClasses: l
221
+ };
222
+ }
223
+ }), Wn = ["styles"];
224
+ function zn(e, t, n, r, a, o) {
225
+ return y(), _("form", {
226
+ styles: e.computedStyles,
227
+ class: D([
228
+ e.computedClasses
229
+ ]),
230
+ onSubmit: t[0] || (t[0] = ut((...l) => e.submit && e.submit(...l), ["prevent"]))
231
+ }, [
232
+ B(e.$slots, "default")
233
+ ], 42, Wn);
234
+ }
235
+ const xn = /* @__PURE__ */ L(jn, [["render", zn]]);
236
+ function Hn(e) {
237
+ return e === null || e.value === null ? null : "$el" in e.value ? e.value.$el : e.value;
238
+ }
239
+ const rt = "data-modlr-ssr-uid";
240
+ function Fn(e = "") {
241
+ const t = Date.now().toString(36) + Math.random().toString(36).substring(2);
242
+ return e ? `${e}-${t}` : t;
243
+ }
244
+ function qn(e) {
245
+ let t = $(Fn(e));
246
+ const n = $(null);
247
+ return pe(() => {
248
+ if (n.value) {
249
+ const r = Hn(n), a = r == null ? void 0 : r.getAttribute(rt);
250
+ a && (t.value = a), r == null || r.removeAttribute(rt);
251
+ }
252
+ }), {
253
+ id: _n(t),
254
+ cacheAttrs: {
255
+ ref: n,
256
+ [rt]: typeof window === void 0 ? t.value : void 0
257
+ }
258
+ };
259
+ }
260
+ const te = (e, { focus: t, emit: n, withListeners: r = !0 }) => {
261
+ const a = $(!0), o = $(e.error), { id: l } = qn("input"), s = e.name ? e.name : l.value, i = $(s);
262
+ W(() => e.error, (f) => o.value = f), W(() => e.name, (f) => s.value = f);
263
+ const c = le("m-form", {
264
+ add: (f, m) => {
265
+ },
266
+ remove: (f) => {
267
+ },
268
+ insideForm: !1,
269
+ disabled: !1,
270
+ loading: !1
271
+ }), u = () => {
272
+ o.value = "", a.value = !0, n("update:modelValue", "");
273
+ }, p = (f) => {
274
+ o.value = f;
275
+ }, h = (f) => {
276
+ f = f || e.modelValue, a.value = !1;
277
+ for (let m = 0; m < e.rules.length; m++) {
278
+ const w = e.rules[m];
279
+ let g = !0;
280
+ if (typeof w == "function")
281
+ g = w(f);
282
+ else if (Array.isArray(w) && w.length === 2) {
283
+ const { 0: k, 1: T } = w;
284
+ g = k(f, T);
285
+ } else {
286
+ const k = w.fn, { options: T } = w;
287
+ g = k(f, T);
288
+ }
289
+ if (g !== !0)
290
+ return o.value = g, !1;
291
+ }
292
+ return o.value = "", !0;
293
+ }, d = r ? b(() => ({
294
+ blur: (f) => n("blur", f),
295
+ focus: (f) => n("focus", f),
296
+ input: (f) => {
297
+ n("update:modelValue", f.target.value);
298
+ },
299
+ change: (f) => n("change", f)
300
+ })) : {};
301
+ return pe(() => {
302
+ c.add(
303
+ i.value,
304
+ t,
305
+ // @ts-ignore
306
+ h,
307
+ // @ts-ignore
308
+ p
309
+ );
310
+ }), Sn(() => {
311
+ c.remove(i.value);
312
+ }), {
313
+ id: l,
314
+ isFirstValidation: a,
315
+ formError: o,
316
+ insideForm: c.insideForm,
317
+ listeners: d,
318
+ reset: u,
319
+ validate: h,
320
+ setError: p,
321
+ //@ts-ignore
322
+ formDisabled: c.disabled.value,
323
+ //@ts-ignore
324
+ formLoading: c.loading.value
325
+ };
326
+ };
327
+ te.emits = (e = !0) => e ? ["update:modelValue", "blur", "focus", "input", "change"] : ["update:modelValue"];
328
+ te.props = () => ({
329
+ modelValue: [String, Number, Boolean, Object, Array],
330
+ name: String,
331
+ readonly: Boolean,
332
+ required: Boolean,
333
+ error: String,
334
+ rules: {
335
+ type: Array,
336
+ default: () => []
337
+ }
338
+ });
339
+ const Gn = I({
340
+ name: "MInput",
341
+ emits: te.emits(),
342
+ props: {
343
+ ...te.props(),
344
+ label: {
345
+ type: String
346
+ },
347
+ size: {
348
+ type: String,
349
+ default: "md"
350
+ },
351
+ type: {
352
+ type: String,
353
+ default: "text",
354
+ validator: (e) => ["text", "password", "number"].includes(e)
355
+ },
356
+ placeholder: {
357
+ type: String,
358
+ default: ""
359
+ },
360
+ loading: {
361
+ type: Boolean,
362
+ default: !1
363
+ },
364
+ readonly: {
365
+ type: Boolean,
366
+ default: !1
367
+ },
368
+ disabled: {
369
+ type: Boolean,
370
+ default: !1
371
+ },
372
+ help: {
373
+ type: String,
374
+ default: ""
375
+ }
376
+ },
377
+ setup(e, { slots: t, emit: n }) {
378
+ const r = () => {
379
+ }, {
380
+ id: a,
381
+ insideForm: o,
382
+ reset: l,
383
+ listeners: s,
384
+ validate: i,
385
+ setError: c,
386
+ formError: u,
387
+ formDisabled: p,
388
+ formLoading: h
389
+ } = te(e, { focus: r, emit: n });
390
+ $();
391
+ const d = $(!1), f = $(!1), m = $e(e, "name"), w = b(() => !!t.prefix), g = b(() => !!t.suffix), k = b(() => p || e.disabled), T = b(() => h || e.loading), C = b(() => {
392
+ const A = e.type;
393
+ return A === "password" ? f.value ? "text" : "password" : A;
394
+ }), v = b(() => e.loading || e.readonly), O = b(() => [
395
+ "m-input__container",
396
+ {
397
+ "m-form__input": o
398
+ }
399
+ ]), M = b(() => [
400
+ "m-input",
401
+ `m-input--${e.size}`,
402
+ {
403
+ "m-input--disabled": k.value || T.value,
404
+ "m-input--readonly": v.value,
405
+ "m-input--focused": d.value,
406
+ "m-input--error": E.value,
407
+ "m-input--prefix": w.value,
408
+ "m-input--suffix": g.value,
409
+ "m-input--loading": e.loading,
410
+ "m-input--password": e.type === "password"
411
+ }
412
+ ]), E = b(() => u.value || e.error);
413
+ return {
414
+ id: a,
415
+ inputType: C,
416
+ disabled: k,
417
+ loading: T,
418
+ readonly: v,
419
+ inputComputedClasses: M,
420
+ wrapperComputedClasses: O,
421
+ name: m,
422
+ hasPrefix: w,
423
+ hasSuffix: g,
424
+ inputError: E,
425
+ onClear: () => {
426
+ n("update:modelValue", "");
427
+ },
428
+ focus: r,
429
+ validate: i,
430
+ setError: c,
431
+ listeners: s
432
+ };
433
+ }
434
+ }), Un = ["for", "id"], Xn = {
435
+ key: 0,
436
+ class: "m-input__prefix"
437
+ }, Yn = ["id", "type", "placeholder", "name", "value", "readonly", "disabled", "aria-disabled", "aria-labelledby"], Qn = {
438
+ key: 1,
439
+ class: "m-input__suffix"
440
+ }, Kn = {
441
+ key: 1,
442
+ class: "m-input__help"
443
+ }, Jn = {
444
+ key: 2,
445
+ class: "m-input__error"
446
+ };
447
+ function Zn(e, t, n, r, a, o) {
448
+ return y(), _("div", {
449
+ class: D(e.wrapperComputedClasses),
450
+ ref: "container"
451
+ }, [
452
+ e.label ? (y(), _("label", {
453
+ key: 0,
454
+ for: e.id,
455
+ class: "m-input__label",
456
+ id: `${e.id}-label`
457
+ }, H(e.label), 9, Un)) : q("", !0),
458
+ V("div", {
459
+ class: D(e.inputComputedClasses)
460
+ }, [
461
+ e.hasPrefix ? (y(), _("div", Xn, [
462
+ B(e.$slots, "prefix")
463
+ ])) : q("", !0),
464
+ V("input", Gt({
465
+ ref: "input",
466
+ id: e.id,
467
+ type: e.inputType,
468
+ placeholder: e.placeholder,
469
+ name: e.name,
470
+ value: e.modelValue || "",
471
+ readonly: e.readonly
472
+ }, Ut(e.listeners, !0), e.$attrs, {
473
+ disabled: e.disabled || e.loading,
474
+ "aria-disabled": e.disabled ? "true" : "false",
475
+ "aria-labelledby": `${e.id}-label`
476
+ }), null, 16, Yn),
477
+ e.hasSuffix ? (y(), _("div", Qn, [
478
+ B(e.$slots, "suffix")
479
+ ])) : q("", !0)
480
+ ], 2),
481
+ e.help && !e.inputError ? (y(), _("p", Kn, H(e.help), 1)) : e.inputError ? (y(), _("p", Jn, H(e.inputError), 1)) : q("", !0)
482
+ ], 2);
483
+ }
484
+ const er = /* @__PURE__ */ L(Gn, [["render", Zn]]);
485
+ var G = "top", J = "bottom", Z = "right", U = "left", Je = "auto", We = [G, J, Z, U], Te = "start", Ve = "end", tr = "clippingParents", Qt = "viewport", Re = "popper", nr = "reference", At = /* @__PURE__ */ We.reduce(function(e, t) {
486
+ return e.concat([t + "-" + Te, t + "-" + Ve]);
487
+ }, []), Kt = /* @__PURE__ */ [].concat(We, [Je]).reduce(function(e, t) {
488
+ return e.concat([t, t + "-" + Te, t + "-" + Ve]);
489
+ }, []), rr = "beforeRead", ar = "read", or = "afterRead", sr = "beforeMain", ir = "main", lr = "afterMain", ur = "beforeWrite", cr = "write", dr = "afterWrite", at = [rr, ar, or, sr, ir, lr, ur, cr, dr];
490
+ function oe(e) {
491
+ return e ? (e.nodeName || "").toLowerCase() : null;
492
+ }
493
+ function ee(e) {
494
+ if (e == null)
495
+ return window;
496
+ if (e.toString() !== "[object Window]") {
497
+ var t = e.ownerDocument;
498
+ return t && t.defaultView || window;
499
+ }
500
+ return e;
501
+ }
502
+ function Se(e) {
503
+ var t = ee(e).Element;
504
+ return e instanceof t || e instanceof Element;
505
+ }
506
+ function Q(e) {
507
+ var t = ee(e).HTMLElement;
508
+ return e instanceof t || e instanceof HTMLElement;
509
+ }
510
+ function mt(e) {
511
+ if (typeof ShadowRoot > "u")
512
+ return !1;
513
+ var t = ee(e).ShadowRoot;
514
+ return e instanceof t || e instanceof ShadowRoot;
515
+ }
516
+ function fr(e) {
517
+ var t = e.state;
518
+ Object.keys(t.elements).forEach(function(n) {
519
+ var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n];
520
+ !Q(o) || !oe(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(l) {
521
+ var s = a[l];
522
+ s === !1 ? o.removeAttribute(l) : o.setAttribute(l, s === !0 ? "" : s);
523
+ }));
524
+ });
525
+ }
526
+ function pr(e) {
527
+ var t = e.state, n = {
528
+ popper: {
529
+ position: t.options.strategy,
530
+ left: "0",
531
+ top: "0",
532
+ margin: "0"
533
+ },
534
+ arrow: {
535
+ position: "absolute"
536
+ },
537
+ reference: {}
538
+ };
539
+ return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
540
+ Object.keys(t.elements).forEach(function(r) {
541
+ var a = t.elements[r], o = t.attributes[r] || {}, l = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = l.reduce(function(i, c) {
542
+ return i[c] = "", i;
543
+ }, {});
544
+ !Q(a) || !oe(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(i) {
545
+ a.removeAttribute(i);
546
+ }));
547
+ });
548
+ };
549
+ }
550
+ const mr = {
551
+ name: "applyStyles",
552
+ enabled: !0,
553
+ phase: "write",
554
+ fn: fr,
555
+ effect: pr,
556
+ requires: ["computeStyles"]
557
+ };
558
+ function ne(e) {
559
+ return e.split("-")[0];
560
+ }
561
+ var we = Math.max, Xe = Math.min, Me = Math.round;
562
+ function ot() {
563
+ var e = navigator.userAgentData;
564
+ return e != null && e.brands ? e.brands.map(function(t) {
565
+ return t.brand + "/" + t.version;
566
+ }).join(" ") : navigator.userAgent;
567
+ }
568
+ function Jt() {
569
+ return !/^((?!chrome|android).)*safari/i.test(ot());
570
+ }
571
+ function Ae(e, t, n) {
572
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
573
+ var r = e.getBoundingClientRect(), a = 1, o = 1;
574
+ t && Q(e) && (a = e.offsetWidth > 0 && Me(r.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && Me(r.height) / e.offsetHeight || 1);
575
+ var l = Se(e) ? ee(e) : window, s = l.visualViewport, i = !Jt() && n, c = (r.left + (i && s ? s.offsetLeft : 0)) / a, u = (r.top + (i && s ? s.offsetTop : 0)) / o, p = r.width / a, h = r.height / o;
576
+ return {
577
+ width: p,
578
+ height: h,
579
+ top: u,
580
+ right: c + p,
581
+ bottom: u + h,
582
+ left: c,
583
+ x: c,
584
+ y: u
585
+ };
586
+ }
587
+ function vt(e) {
588
+ var t = Ae(e), n = e.offsetWidth, r = e.offsetHeight;
589
+ return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
590
+ x: e.offsetLeft,
591
+ y: e.offsetTop,
592
+ width: n,
593
+ height: r
594
+ };
595
+ }
596
+ function Zt(e, t) {
597
+ var n = t.getRootNode && t.getRootNode();
598
+ if (e.contains(t))
599
+ return !0;
600
+ if (n && mt(n)) {
601
+ var r = t;
602
+ do {
603
+ if (r && e.isSameNode(r))
604
+ return !0;
605
+ r = r.parentNode || r.host;
606
+ } while (r);
607
+ }
608
+ return !1;
609
+ }
610
+ function re(e) {
611
+ return ee(e).getComputedStyle(e);
612
+ }
613
+ function vr(e) {
614
+ return ["table", "td", "th"].indexOf(oe(e)) >= 0;
615
+ }
616
+ function me(e) {
617
+ return ((Se(e) ? e.ownerDocument : (
618
+ // $FlowFixMe[prop-missing]
619
+ e.document
620
+ )) || window.document).documentElement;
621
+ }
622
+ function Ze(e) {
623
+ return oe(e) === "html" ? e : (
624
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
625
+ // $FlowFixMe[incompatible-return]
626
+ // $FlowFixMe[prop-missing]
627
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
628
+ e.parentNode || // DOM Element detected
629
+ (mt(e) ? e.host : null) || // ShadowRoot detected
630
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
631
+ me(e)
632
+ );
633
+ }
634
+ function Bt(e) {
635
+ return !Q(e) || // https://github.com/popperjs/popper-core/issues/837
636
+ re(e).position === "fixed" ? null : e.offsetParent;
637
+ }
638
+ function br(e) {
639
+ var t = /firefox/i.test(ot()), n = /Trident/i.test(ot());
640
+ if (n && Q(e)) {
641
+ var r = re(e);
642
+ if (r.position === "fixed")
643
+ return null;
644
+ }
645
+ var a = Ze(e);
646
+ for (mt(a) && (a = a.host); Q(a) && ["html", "body"].indexOf(oe(a)) < 0; ) {
647
+ var o = re(a);
648
+ if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
649
+ return a;
650
+ a = a.parentNode;
651
+ }
652
+ return null;
653
+ }
654
+ function ze(e) {
655
+ for (var t = ee(e), n = Bt(e); n && vr(n) && re(n).position === "static"; )
656
+ n = Bt(n);
657
+ return n && (oe(n) === "html" || oe(n) === "body" && re(n).position === "static") ? t : n || br(e) || t;
658
+ }
659
+ function bt(e) {
660
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
661
+ }
662
+ function Le(e, t, n) {
663
+ return we(e, Xe(t, n));
664
+ }
665
+ function hr(e, t, n) {
666
+ var r = Le(e, t, n);
667
+ return r > n ? n : r;
668
+ }
669
+ function en() {
670
+ return {
671
+ top: 0,
672
+ right: 0,
673
+ bottom: 0,
674
+ left: 0
675
+ };
676
+ }
677
+ function tn(e) {
678
+ return Object.assign({}, en(), e);
679
+ }
680
+ function nn(e, t) {
681
+ return t.reduce(function(n, r) {
682
+ return n[r] = e, n;
683
+ }, {});
684
+ }
685
+ var yr = function(t, n) {
686
+ return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
687
+ placement: n.placement
688
+ })) : t, tn(typeof t != "number" ? t : nn(t, We));
689
+ };
690
+ function gr(e) {
691
+ var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, l = n.modifiersData.popperOffsets, s = ne(n.placement), i = bt(s), c = [U, Z].indexOf(s) >= 0, u = c ? "height" : "width";
692
+ if (!(!o || !l)) {
693
+ var p = yr(a.padding, n), h = vt(o), d = i === "y" ? G : U, f = i === "y" ? J : Z, m = n.rects.reference[u] + n.rects.reference[i] - l[i] - n.rects.popper[u], w = l[i] - n.rects.reference[i], g = ze(o), k = g ? i === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, T = m / 2 - w / 2, C = p[d], v = k - h[u] - p[f], O = k / 2 - h[u] / 2 + T, M = Le(C, O, v), E = i;
694
+ n.modifiersData[r] = (t = {}, t[E] = M, t.centerOffset = M - O, t);
695
+ }
696
+ }
697
+ function wr(e) {
698
+ var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r;
699
+ if (a != null && !(typeof a == "string" && (a = t.elements.popper.querySelector(a), !a))) {
700
+ if (process.env.NODE_ENV !== "production" && (Q(a) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !Zt(t.elements.popper, a)) {
701
+ process.env.NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
702
+ return;
703
+ }
704
+ t.elements.arrow = a;
705
+ }
706
+ }
707
+ const $r = {
708
+ name: "arrow",
709
+ enabled: !0,
710
+ phase: "main",
711
+ fn: gr,
712
+ effect: wr,
713
+ requires: ["popperOffsets"],
714
+ requiresIfExists: ["preventOverflow"]
715
+ };
716
+ function Be(e) {
717
+ return e.split("-")[1];
718
+ }
719
+ var Or = {
720
+ top: "auto",
721
+ right: "auto",
722
+ bottom: "auto",
723
+ left: "auto"
724
+ };
725
+ function _r(e) {
726
+ var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1;
727
+ return {
728
+ x: Me(t * a) / a || 0,
729
+ y: Me(n * a) / a || 0
730
+ };
731
+ }
732
+ function Pt(e) {
733
+ var t, n = e.popper, r = e.popperRect, a = e.placement, o = e.variation, l = e.offsets, s = e.position, i = e.gpuAcceleration, c = e.adaptive, u = e.roundOffsets, p = e.isFixed, h = l.x, d = h === void 0 ? 0 : h, f = l.y, m = f === void 0 ? 0 : f, w = typeof u == "function" ? u({
734
+ x: d,
735
+ y: m
736
+ }) : {
737
+ x: d,
738
+ y: m
739
+ };
740
+ d = w.x, m = w.y;
741
+ var g = l.hasOwnProperty("x"), k = l.hasOwnProperty("y"), T = U, C = G, v = window;
742
+ if (c) {
743
+ var O = ze(n), M = "clientHeight", E = "clientWidth";
744
+ if (O === ee(n) && (O = me(n), re(O).position !== "static" && s === "absolute" && (M = "scrollHeight", E = "scrollWidth")), O = O, a === G || (a === U || a === Z) && o === Ve) {
745
+ C = J;
746
+ var j = p && O === v && v.visualViewport ? v.visualViewport.height : (
747
+ // $FlowFixMe[prop-missing]
748
+ O[M]
749
+ );
750
+ m -= j - r.height, m *= i ? 1 : -1;
751
+ }
752
+ if (a === U || (a === G || a === J) && o === Ve) {
753
+ T = Z;
754
+ var A = p && O === v && v.visualViewport ? v.visualViewport.width : (
755
+ // $FlowFixMe[prop-missing]
756
+ O[E]
757
+ );
758
+ d -= A - r.width, d *= i ? 1 : -1;
759
+ }
760
+ }
761
+ var R = Object.assign({
762
+ position: s
763
+ }, c && Or), x = u === !0 ? _r({
764
+ x: d,
765
+ y: m
766
+ }) : {
767
+ x: d,
768
+ y: m
769
+ };
770
+ if (d = x.x, m = x.y, i) {
771
+ var z;
772
+ return Object.assign({}, R, (z = {}, z[C] = k ? "0" : "", z[T] = g ? "0" : "", z.transform = (v.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + m + "px)" : "translate3d(" + d + "px, " + m + "px, 0)", z));
773
+ }
774
+ return Object.assign({}, R, (t = {}, t[C] = k ? m + "px" : "", t[T] = g ? d + "px" : "", t.transform = "", t));
775
+ }
776
+ function Sr(e) {
777
+ var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, l = o === void 0 ? !0 : o, s = n.roundOffsets, i = s === void 0 ? !0 : s;
778
+ if (process.env.NODE_ENV !== "production") {
779
+ var c = re(t.elements.popper).transitionProperty || "";
780
+ l && ["transform", "top", "right", "bottom", "left"].some(function(p) {
781
+ return c.indexOf(p) >= 0;
782
+ }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `
783
+
784
+ `, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", `
785
+
786
+ `, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
787
+ }
788
+ var u = {
789
+ placement: ne(t.placement),
790
+ variation: Be(t.placement),
791
+ popper: t.elements.popper,
792
+ popperRect: t.rects.popper,
793
+ gpuAcceleration: a,
794
+ isFixed: t.options.strategy === "fixed"
795
+ };
796
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Pt(Object.assign({}, u, {
797
+ offsets: t.modifiersData.popperOffsets,
798
+ position: t.options.strategy,
799
+ adaptive: l,
800
+ roundOffsets: i
801
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Pt(Object.assign({}, u, {
802
+ offsets: t.modifiersData.arrow,
803
+ position: "absolute",
804
+ adaptive: !1,
805
+ roundOffsets: i
806
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
807
+ "data-popper-placement": t.placement
808
+ });
809
+ }
810
+ const Cr = {
811
+ name: "computeStyles",
812
+ enabled: !0,
813
+ phase: "beforeWrite",
814
+ fn: Sr,
815
+ data: {}
816
+ };
817
+ var Ge = {
818
+ passive: !0
819
+ };
820
+ function kr(e) {
821
+ var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, l = r.resize, s = l === void 0 ? !0 : l, i = ee(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
822
+ return o && c.forEach(function(u) {
823
+ u.addEventListener("scroll", n.update, Ge);
824
+ }), s && i.addEventListener("resize", n.update, Ge), function() {
825
+ o && c.forEach(function(u) {
826
+ u.removeEventListener("scroll", n.update, Ge);
827
+ }), s && i.removeEventListener("resize", n.update, Ge);
828
+ };
829
+ }
830
+ const Er = {
831
+ name: "eventListeners",
832
+ enabled: !0,
833
+ phase: "write",
834
+ fn: function() {
835
+ },
836
+ effect: kr,
837
+ data: {}
838
+ };
839
+ var Tr = {
840
+ left: "right",
841
+ right: "left",
842
+ bottom: "top",
843
+ top: "bottom"
844
+ };
845
+ function Ue(e) {
846
+ return e.replace(/left|right|bottom|top/g, function(t) {
847
+ return Tr[t];
848
+ });
849
+ }
850
+ var Mr = {
851
+ start: "end",
852
+ end: "start"
853
+ };
854
+ function Rt(e) {
855
+ return e.replace(/start|end/g, function(t) {
856
+ return Mr[t];
857
+ });
858
+ }
859
+ function ht(e) {
860
+ var t = ee(e), n = t.pageXOffset, r = t.pageYOffset;
861
+ return {
862
+ scrollLeft: n,
863
+ scrollTop: r
864
+ };
865
+ }
866
+ function yt(e) {
867
+ return Ae(me(e)).left + ht(e).scrollLeft;
868
+ }
869
+ function Ar(e, t) {
870
+ var n = ee(e), r = me(e), a = n.visualViewport, o = r.clientWidth, l = r.clientHeight, s = 0, i = 0;
871
+ if (a) {
872
+ o = a.width, l = a.height;
873
+ var c = Jt();
874
+ (c || !c && t === "fixed") && (s = a.offsetLeft, i = a.offsetTop);
875
+ }
876
+ return {
877
+ width: o,
878
+ height: l,
879
+ x: s + yt(e),
880
+ y: i
881
+ };
882
+ }
883
+ function Br(e) {
884
+ var t, n = me(e), r = ht(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = we(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), l = we(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + yt(e), i = -r.scrollTop;
885
+ return re(a || n).direction === "rtl" && (s += we(n.clientWidth, a ? a.clientWidth : 0) - o), {
886
+ width: o,
887
+ height: l,
888
+ x: s,
889
+ y: i
890
+ };
891
+ }
892
+ function gt(e) {
893
+ var t = re(e), n = t.overflow, r = t.overflowX, a = t.overflowY;
894
+ return /auto|scroll|overlay|hidden/.test(n + a + r);
895
+ }
896
+ function rn(e) {
897
+ return ["html", "body", "#document"].indexOf(oe(e)) >= 0 ? e.ownerDocument.body : Q(e) && gt(e) ? e : rn(Ze(e));
898
+ }
899
+ function Ne(e, t) {
900
+ var n;
901
+ t === void 0 && (t = []);
902
+ var r = rn(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = ee(r), l = a ? [o].concat(o.visualViewport || [], gt(r) ? r : []) : r, s = t.concat(l);
903
+ return a ? s : (
904
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
905
+ s.concat(Ne(Ze(l)))
906
+ );
907
+ }
908
+ function st(e) {
909
+ return Object.assign({}, e, {
910
+ left: e.x,
911
+ top: e.y,
912
+ right: e.x + e.width,
913
+ bottom: e.y + e.height
914
+ });
915
+ }
916
+ function Pr(e, t) {
917
+ var n = Ae(e, !1, t === "fixed");
918
+ return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
919
+ }
920
+ function Dt(e, t, n) {
921
+ return t === Qt ? st(Ar(e, n)) : Se(t) ? Pr(t, n) : st(Br(me(e)));
922
+ }
923
+ function Rr(e) {
924
+ var t = Ne(Ze(e)), n = ["absolute", "fixed"].indexOf(re(e).position) >= 0, r = n && Q(e) ? ze(e) : e;
925
+ return Se(r) ? t.filter(function(a) {
926
+ return Se(a) && Zt(a, r) && oe(a) !== "body";
927
+ }) : [];
928
+ }
929
+ function Dr(e, t, n, r) {
930
+ var a = t === "clippingParents" ? Rr(e) : [].concat(t), o = [].concat(a, [n]), l = o[0], s = o.reduce(function(i, c) {
931
+ var u = Dt(e, c, r);
932
+ return i.top = we(u.top, i.top), i.right = Xe(u.right, i.right), i.bottom = Xe(u.bottom, i.bottom), i.left = we(u.left, i.left), i;
933
+ }, Dt(e, l, r));
934
+ return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
935
+ }
936
+ function an(e) {
937
+ var t = e.reference, n = e.element, r = e.placement, a = r ? ne(r) : null, o = r ? Be(r) : null, l = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, i;
938
+ switch (a) {
939
+ case G:
940
+ i = {
941
+ x: l,
942
+ y: t.y - n.height
943
+ };
944
+ break;
945
+ case J:
946
+ i = {
947
+ x: l,
948
+ y: t.y + t.height
949
+ };
950
+ break;
951
+ case Z:
952
+ i = {
953
+ x: t.x + t.width,
954
+ y: s
955
+ };
956
+ break;
957
+ case U:
958
+ i = {
959
+ x: t.x - n.width,
960
+ y: s
961
+ };
962
+ break;
963
+ default:
964
+ i = {
965
+ x: t.x,
966
+ y: t.y
967
+ };
968
+ }
969
+ var c = a ? bt(a) : null;
970
+ if (c != null) {
971
+ var u = c === "y" ? "height" : "width";
972
+ switch (o) {
973
+ case Te:
974
+ i[c] = i[c] - (t[u] / 2 - n[u] / 2);
975
+ break;
976
+ case Ve:
977
+ i[c] = i[c] + (t[u] / 2 - n[u] / 2);
978
+ break;
979
+ }
980
+ }
981
+ return i;
982
+ }
983
+ function je(e, t) {
984
+ t === void 0 && (t = {});
985
+ var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.strategy, l = o === void 0 ? e.strategy : o, s = n.boundary, i = s === void 0 ? tr : s, c = n.rootBoundary, u = c === void 0 ? Qt : c, p = n.elementContext, h = p === void 0 ? Re : p, d = n.altBoundary, f = d === void 0 ? !1 : d, m = n.padding, w = m === void 0 ? 0 : m, g = tn(typeof w != "number" ? w : nn(w, We)), k = h === Re ? nr : Re, T = e.rects.popper, C = e.elements[f ? k : h], v = Dr(Se(C) ? C : C.contextElement || me(e.elements.popper), i, u, l), O = Ae(e.elements.reference), M = an({
986
+ reference: O,
987
+ element: T,
988
+ strategy: "absolute",
989
+ placement: a
990
+ }), E = st(Object.assign({}, T, M)), j = h === Re ? E : O, A = {
991
+ top: v.top - j.top + g.top,
992
+ bottom: j.bottom - v.bottom + g.bottom,
993
+ left: v.left - j.left + g.left,
994
+ right: j.right - v.right + g.right
995
+ }, R = e.modifiersData.offset;
996
+ if (h === Re && R) {
997
+ var x = R[a];
998
+ Object.keys(A).forEach(function(z) {
999
+ var ae = [Z, J].indexOf(z) >= 0 ? 1 : -1, se = [G, J].indexOf(z) >= 0 ? "y" : "x";
1000
+ A[z] += x[se] * ae;
1001
+ });
1002
+ }
1003
+ return A;
1004
+ }
1005
+ function Ir(e, t) {
1006
+ t === void 0 && (t = {});
1007
+ var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, l = n.padding, s = n.flipVariations, i = n.allowedAutoPlacements, c = i === void 0 ? Kt : i, u = Be(r), p = u ? s ? At : At.filter(function(f) {
1008
+ return Be(f) === u;
1009
+ }) : We, h = p.filter(function(f) {
1010
+ return c.indexOf(f) >= 0;
1011
+ });
1012
+ h.length === 0 && (h = p, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")));
1013
+ var d = h.reduce(function(f, m) {
1014
+ return f[m] = je(e, {
1015
+ placement: m,
1016
+ boundary: a,
1017
+ rootBoundary: o,
1018
+ padding: l
1019
+ })[ne(m)], f;
1020
+ }, {});
1021
+ return Object.keys(d).sort(function(f, m) {
1022
+ return d[f] - d[m];
1023
+ });
1024
+ }
1025
+ function Lr(e) {
1026
+ if (ne(e) === Je)
1027
+ return [];
1028
+ var t = Ue(e);
1029
+ return [Rt(e), t, Rt(t)];
1030
+ }
1031
+ function Nr(e) {
1032
+ var t = e.state, n = e.options, r = e.name;
1033
+ if (!t.modifiersData[r]._skip) {
1034
+ for (var a = n.mainAxis, o = a === void 0 ? !0 : a, l = n.altAxis, s = l === void 0 ? !0 : l, i = n.fallbackPlacements, c = n.padding, u = n.boundary, p = n.rootBoundary, h = n.altBoundary, d = n.flipVariations, f = d === void 0 ? !0 : d, m = n.allowedAutoPlacements, w = t.options.placement, g = ne(w), k = g === w, T = i || (k || !f ? [Ue(w)] : Lr(w)), C = [w].concat(T).reduce(function(ke, ue) {
1035
+ return ke.concat(ne(ue) === Je ? Ir(t, {
1036
+ placement: ue,
1037
+ boundary: u,
1038
+ rootBoundary: p,
1039
+ padding: c,
1040
+ flipVariations: f,
1041
+ allowedAutoPlacements: m
1042
+ }) : ue);
1043
+ }, []), v = t.rects.reference, O = t.rects.popper, M = /* @__PURE__ */ new Map(), E = !0, j = C[0], A = 0; A < C.length; A++) {
1044
+ var R = C[A], x = ne(R), z = Be(R) === Te, ae = [G, J].indexOf(x) >= 0, se = ae ? "width" : "height", F = je(t, {
1045
+ placement: R,
1046
+ boundary: u,
1047
+ rootBoundary: p,
1048
+ altBoundary: h,
1049
+ padding: c
1050
+ }), X = ae ? z ? Z : U : z ? J : G;
1051
+ v[se] > O[se] && (X = Ue(X));
1052
+ var Ce = Ue(X), ie = [];
1053
+ if (o && ie.push(F[x] <= 0), s && ie.push(F[X] <= 0, F[Ce] <= 0), ie.every(function(ke) {
1054
+ return ke;
1055
+ })) {
1056
+ j = R, E = !1;
1057
+ break;
1058
+ }
1059
+ M.set(R, ie);
1060
+ }
1061
+ if (E)
1062
+ for (var S = f ? 3 : 1, N = function(ue) {
1063
+ var Pe = C.find(function(Fe) {
1064
+ var ve = M.get(Fe);
1065
+ if (ve)
1066
+ return ve.slice(0, ue).every(function(et) {
1067
+ return et;
1068
+ });
1069
+ });
1070
+ if (Pe)
1071
+ return j = Pe, "break";
1072
+ }, P = S; P > 0; P--) {
1073
+ var He = N(P);
1074
+ if (He === "break")
1075
+ break;
1076
+ }
1077
+ t.placement !== j && (t.modifiersData[r]._skip = !0, t.placement = j, t.reset = !0);
1078
+ }
1079
+ }
1080
+ const Vr = {
1081
+ name: "flip",
1082
+ enabled: !0,
1083
+ phase: "main",
1084
+ fn: Nr,
1085
+ requiresIfExists: ["offset"],
1086
+ data: {
1087
+ _skip: !1
1088
+ }
1089
+ };
1090
+ function It(e, t, n) {
1091
+ return n === void 0 && (n = {
1092
+ x: 0,
1093
+ y: 0
1094
+ }), {
1095
+ top: e.top - t.height - n.y,
1096
+ right: e.right - t.width + n.x,
1097
+ bottom: e.bottom - t.height + n.y,
1098
+ left: e.left - t.width - n.x
1099
+ };
1100
+ }
1101
+ function Lt(e) {
1102
+ return [G, Z, J, U].some(function(t) {
1103
+ return e[t] >= 0;
1104
+ });
1105
+ }
1106
+ function jr(e) {
1107
+ var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, l = je(t, {
1108
+ elementContext: "reference"
1109
+ }), s = je(t, {
1110
+ altBoundary: !0
1111
+ }), i = It(l, r), c = It(s, a, o), u = Lt(i), p = Lt(c);
1112
+ t.modifiersData[n] = {
1113
+ referenceClippingOffsets: i,
1114
+ popperEscapeOffsets: c,
1115
+ isReferenceHidden: u,
1116
+ hasPopperEscaped: p
1117
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
1118
+ "data-popper-reference-hidden": u,
1119
+ "data-popper-escaped": p
1120
+ });
1121
+ }
1122
+ const Wr = {
1123
+ name: "hide",
1124
+ enabled: !0,
1125
+ phase: "main",
1126
+ requiresIfExists: ["preventOverflow"],
1127
+ fn: jr
1128
+ };
1129
+ function zr(e, t, n) {
1130
+ var r = ne(e), a = [U, G].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, {
1131
+ placement: e
1132
+ })) : n, l = o[0], s = o[1];
1133
+ return l = l || 0, s = (s || 0) * a, [U, Z].indexOf(r) >= 0 ? {
1134
+ x: s,
1135
+ y: l
1136
+ } : {
1137
+ x: l,
1138
+ y: s
1139
+ };
1140
+ }
1141
+ function xr(e) {
1142
+ var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, l = Kt.reduce(function(u, p) {
1143
+ return u[p] = zr(p, t.rects, o), u;
1144
+ }, {}), s = l[t.placement], i = s.x, c = s.y;
1145
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += c), t.modifiersData[r] = l;
1146
+ }
1147
+ const Hr = {
1148
+ name: "offset",
1149
+ enabled: !0,
1150
+ phase: "main",
1151
+ requires: ["popperOffsets"],
1152
+ fn: xr
1153
+ };
1154
+ function Fr(e) {
1155
+ var t = e.state, n = e.name;
1156
+ t.modifiersData[n] = an({
1157
+ reference: t.rects.reference,
1158
+ element: t.rects.popper,
1159
+ strategy: "absolute",
1160
+ placement: t.placement
1161
+ });
1162
+ }
1163
+ const qr = {
1164
+ name: "popperOffsets",
1165
+ enabled: !0,
1166
+ phase: "read",
1167
+ fn: Fr,
1168
+ data: {}
1169
+ };
1170
+ function Gr(e) {
1171
+ return e === "x" ? "y" : "x";
1172
+ }
1173
+ function Ur(e) {
1174
+ var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, l = n.altAxis, s = l === void 0 ? !1 : l, i = n.boundary, c = n.rootBoundary, u = n.altBoundary, p = n.padding, h = n.tether, d = h === void 0 ? !0 : h, f = n.tetherOffset, m = f === void 0 ? 0 : f, w = je(t, {
1175
+ boundary: i,
1176
+ rootBoundary: c,
1177
+ padding: p,
1178
+ altBoundary: u
1179
+ }), g = ne(t.placement), k = Be(t.placement), T = !k, C = bt(g), v = Gr(C), O = t.modifiersData.popperOffsets, M = t.rects.reference, E = t.rects.popper, j = typeof m == "function" ? m(Object.assign({}, t.rects, {
1180
+ placement: t.placement
1181
+ })) : m, A = typeof j == "number" ? {
1182
+ mainAxis: j,
1183
+ altAxis: j
1184
+ } : Object.assign({
1185
+ mainAxis: 0,
1186
+ altAxis: 0
1187
+ }, j), R = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, x = {
1188
+ x: 0,
1189
+ y: 0
1190
+ };
1191
+ if (O) {
1192
+ if (o) {
1193
+ var z, ae = C === "y" ? G : U, se = C === "y" ? J : Z, F = C === "y" ? "height" : "width", X = O[C], Ce = X + w[ae], ie = X - w[se], S = d ? -E[F] / 2 : 0, N = k === Te ? M[F] : E[F], P = k === Te ? -E[F] : -M[F], He = t.elements.arrow, ke = d && He ? vt(He) : {
1194
+ width: 0,
1195
+ height: 0
1196
+ }, ue = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : en(), Pe = ue[ae], Fe = ue[se], ve = Le(0, M[F], ke[F]), et = T ? M[F] / 2 - S - ve - Pe - A.mainAxis : N - ve - Pe - A.mainAxis, hn = T ? -M[F] / 2 + S + ve + Fe + A.mainAxis : P + ve + Fe + A.mainAxis, tt = t.elements.arrow && ze(t.elements.arrow), yn = tt ? C === "y" ? tt.clientTop || 0 : tt.clientLeft || 0 : 0, $t = (z = R == null ? void 0 : R[C]) != null ? z : 0, gn = X + et - $t - yn, wn = X + hn - $t, Ot = Le(d ? Xe(Ce, gn) : Ce, X, d ? we(ie, wn) : ie);
1197
+ O[C] = Ot, x[C] = Ot - X;
1198
+ }
1199
+ if (s) {
1200
+ var _t, $n = C === "x" ? G : U, On = C === "x" ? J : Z, be = O[v], qe = v === "y" ? "height" : "width", St = be + w[$n], Ct = be - w[On], nt = [G, U].indexOf(g) !== -1, kt = (_t = R == null ? void 0 : R[v]) != null ? _t : 0, Et = nt ? St : be - M[qe] - E[qe] - kt + A.altAxis, Tt = nt ? be + M[qe] + E[qe] - kt - A.altAxis : Ct, Mt = d && nt ? hr(Et, be, Tt) : Le(d ? Et : St, be, d ? Tt : Ct);
1201
+ O[v] = Mt, x[v] = Mt - be;
1202
+ }
1203
+ t.modifiersData[r] = x;
1204
+ }
1205
+ }
1206
+ const Xr = {
1207
+ name: "preventOverflow",
1208
+ enabled: !0,
1209
+ phase: "main",
1210
+ fn: Ur,
1211
+ requiresIfExists: ["offset"]
1212
+ };
1213
+ function Yr(e) {
1214
+ return {
1215
+ scrollLeft: e.scrollLeft,
1216
+ scrollTop: e.scrollTop
1217
+ };
1218
+ }
1219
+ function Qr(e) {
1220
+ return e === ee(e) || !Q(e) ? ht(e) : Yr(e);
1221
+ }
1222
+ function Kr(e) {
1223
+ var t = e.getBoundingClientRect(), n = Me(t.width) / e.offsetWidth || 1, r = Me(t.height) / e.offsetHeight || 1;
1224
+ return n !== 1 || r !== 1;
1225
+ }
1226
+ function Jr(e, t, n) {
1227
+ n === void 0 && (n = !1);
1228
+ var r = Q(t), a = Q(t) && Kr(t), o = me(t), l = Ae(e, a, n), s = {
1229
+ scrollLeft: 0,
1230
+ scrollTop: 0
1231
+ }, i = {
1232
+ x: 0,
1233
+ y: 0
1234
+ };
1235
+ return (r || !r && !n) && ((oe(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1236
+ gt(o)) && (s = Qr(t)), Q(t) ? (i = Ae(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : o && (i.x = yt(o))), {
1237
+ x: l.left + s.scrollLeft - i.x,
1238
+ y: l.top + s.scrollTop - i.y,
1239
+ width: l.width,
1240
+ height: l.height
1241
+ };
1242
+ }
1243
+ function Zr(e) {
1244
+ var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
1245
+ e.forEach(function(o) {
1246
+ t.set(o.name, o);
1247
+ });
1248
+ function a(o) {
1249
+ n.add(o.name);
1250
+ var l = [].concat(o.requires || [], o.requiresIfExists || []);
1251
+ l.forEach(function(s) {
1252
+ if (!n.has(s)) {
1253
+ var i = t.get(s);
1254
+ i && a(i);
1255
+ }
1256
+ }), r.push(o);
1257
+ }
1258
+ return e.forEach(function(o) {
1259
+ n.has(o.name) || a(o);
1260
+ }), r;
1261
+ }
1262
+ function ea(e) {
1263
+ var t = Zr(e);
1264
+ return at.reduce(function(n, r) {
1265
+ return n.concat(t.filter(function(a) {
1266
+ return a.phase === r;
1267
+ }));
1268
+ }, []);
1269
+ }
1270
+ function ta(e) {
1271
+ var t;
1272
+ return function() {
1273
+ return t || (t = new Promise(function(n) {
1274
+ Promise.resolve().then(function() {
1275
+ t = void 0, n(e());
1276
+ });
1277
+ })), t;
1278
+ };
1279
+ }
1280
+ function ce(e) {
1281
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
1282
+ n[r - 1] = arguments[r];
1283
+ return [].concat(n).reduce(function(a, o) {
1284
+ return a.replace(/%s/, o);
1285
+ }, e);
1286
+ }
1287
+ var he = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', na = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', Nt = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
1288
+ function ra(e) {
1289
+ e.forEach(function(t) {
1290
+ [].concat(Object.keys(t), Nt).filter(function(n, r, a) {
1291
+ return a.indexOf(n) === r;
1292
+ }).forEach(function(n) {
1293
+ switch (n) {
1294
+ case "name":
1295
+ typeof t.name != "string" && console.error(ce(he, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"'));
1296
+ break;
1297
+ case "enabled":
1298
+ typeof t.enabled != "boolean" && console.error(ce(he, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"'));
1299
+ break;
1300
+ case "phase":
1301
+ at.indexOf(t.phase) < 0 && console.error(ce(he, t.name, '"phase"', "either " + at.join(", "), '"' + String(t.phase) + '"'));
1302
+ break;
1303
+ case "fn":
1304
+ typeof t.fn != "function" && console.error(ce(he, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"'));
1305
+ break;
1306
+ case "effect":
1307
+ t.effect != null && typeof t.effect != "function" && console.error(ce(he, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"'));
1308
+ break;
1309
+ case "requires":
1310
+ t.requires != null && !Array.isArray(t.requires) && console.error(ce(he, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"'));
1311
+ break;
1312
+ case "requiresIfExists":
1313
+ Array.isArray(t.requiresIfExists) || console.error(ce(he, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"'));
1314
+ break;
1315
+ case "options":
1316
+ case "data":
1317
+ break;
1318
+ default:
1319
+ console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' + Nt.map(function(r) {
1320
+ return '"' + r + '"';
1321
+ }).join(", ") + '; but "' + n + '" was provided.');
1322
+ }
1323
+ t.requires && t.requires.forEach(function(r) {
1324
+ e.find(function(a) {
1325
+ return a.name === r;
1326
+ }) == null && console.error(ce(na, String(t.name), r, r));
1327
+ });
1328
+ });
1329
+ });
1330
+ }
1331
+ function aa(e, t) {
1332
+ var n = /* @__PURE__ */ new Set();
1333
+ return e.filter(function(r) {
1334
+ var a = t(r);
1335
+ if (!n.has(a))
1336
+ return n.add(a), !0;
1337
+ });
1338
+ }
1339
+ function oa(e) {
1340
+ var t = e.reduce(function(n, r) {
1341
+ var a = n[r.name];
1342
+ return n[r.name] = a ? Object.assign({}, a, r, {
1343
+ options: Object.assign({}, a.options, r.options),
1344
+ data: Object.assign({}, a.data, r.data)
1345
+ }) : r, n;
1346
+ }, {});
1347
+ return Object.keys(t).map(function(n) {
1348
+ return t[n];
1349
+ });
1350
+ }
1351
+ var Vt = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", sa = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", jt = {
1352
+ placement: "bottom",
1353
+ modifiers: [],
1354
+ strategy: "absolute"
1355
+ };
1356
+ function Wt() {
1357
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
1358
+ t[n] = arguments[n];
1359
+ return !t.some(function(r) {
1360
+ return !(r && typeof r.getBoundingClientRect == "function");
1361
+ });
1362
+ }
1363
+ function ia(e) {
1364
+ e === void 0 && (e = {});
1365
+ var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? jt : a;
1366
+ return function(s, i, c) {
1367
+ c === void 0 && (c = o);
1368
+ var u = {
1369
+ placement: "bottom",
1370
+ orderedModifiers: [],
1371
+ options: Object.assign({}, jt, o),
1372
+ modifiersData: {},
1373
+ elements: {
1374
+ reference: s,
1375
+ popper: i
1376
+ },
1377
+ attributes: {},
1378
+ styles: {}
1379
+ }, p = [], h = !1, d = {
1380
+ state: u,
1381
+ setOptions: function(g) {
1382
+ var k = typeof g == "function" ? g(u.options) : g;
1383
+ m(), u.options = Object.assign({}, o, u.options, k), u.scrollParents = {
1384
+ reference: Se(s) ? Ne(s) : s.contextElement ? Ne(s.contextElement) : [],
1385
+ popper: Ne(i)
1386
+ };
1387
+ var T = ea(oa([].concat(r, u.options.modifiers)));
1388
+ if (u.orderedModifiers = T.filter(function(R) {
1389
+ return R.enabled;
1390
+ }), process.env.NODE_ENV !== "production") {
1391
+ var C = aa([].concat(T, u.options.modifiers), function(R) {
1392
+ var x = R.name;
1393
+ return x;
1394
+ });
1395
+ if (ra(C), ne(u.options.placement) === Je) {
1396
+ var v = u.orderedModifiers.find(function(R) {
1397
+ var x = R.name;
1398
+ return x === "flip";
1399
+ });
1400
+ v || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
1401
+ }
1402
+ var O = re(i), M = O.marginTop, E = O.marginRight, j = O.marginBottom, A = O.marginLeft;
1403
+ [M, E, j, A].some(function(R) {
1404
+ return parseFloat(R);
1405
+ }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
1406
+ }
1407
+ return f(), d.update();
1408
+ },
1409
+ // Sync update – it will always be executed, even if not necessary. This
1410
+ // is useful for low frequency updates where sync behavior simplifies the
1411
+ // logic.
1412
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1413
+ // prefer the async Popper#update method
1414
+ forceUpdate: function() {
1415
+ if (!h) {
1416
+ var g = u.elements, k = g.reference, T = g.popper;
1417
+ if (!Wt(k, T)) {
1418
+ process.env.NODE_ENV !== "production" && console.error(Vt);
1419
+ return;
1420
+ }
1421
+ u.rects = {
1422
+ reference: Jr(k, ze(T), u.options.strategy === "fixed"),
1423
+ popper: vt(T)
1424
+ }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(R) {
1425
+ return u.modifiersData[R.name] = Object.assign({}, R.data);
1426
+ });
1427
+ for (var C = 0, v = 0; v < u.orderedModifiers.length; v++) {
1428
+ if (process.env.NODE_ENV !== "production" && (C += 1, C > 100)) {
1429
+ console.error(sa);
1430
+ break;
1431
+ }
1432
+ if (u.reset === !0) {
1433
+ u.reset = !1, v = -1;
1434
+ continue;
1435
+ }
1436
+ var O = u.orderedModifiers[v], M = O.fn, E = O.options, j = E === void 0 ? {} : E, A = O.name;
1437
+ typeof M == "function" && (u = M({
1438
+ state: u,
1439
+ options: j,
1440
+ name: A,
1441
+ instance: d
1442
+ }) || u);
1443
+ }
1444
+ }
1445
+ },
1446
+ // Async and optimistically optimized update – it will not be executed if
1447
+ // not necessary (debounced to run at most once-per-tick)
1448
+ update: ta(function() {
1449
+ return new Promise(function(w) {
1450
+ d.forceUpdate(), w(u);
1451
+ });
1452
+ }),
1453
+ destroy: function() {
1454
+ m(), h = !0;
1455
+ }
1456
+ };
1457
+ if (!Wt(s, i))
1458
+ return process.env.NODE_ENV !== "production" && console.error(Vt), d;
1459
+ d.setOptions(c).then(function(w) {
1460
+ !h && c.onFirstUpdate && c.onFirstUpdate(w);
1461
+ });
1462
+ function f() {
1463
+ u.orderedModifiers.forEach(function(w) {
1464
+ var g = w.name, k = w.options, T = k === void 0 ? {} : k, C = w.effect;
1465
+ if (typeof C == "function") {
1466
+ var v = C({
1467
+ state: u,
1468
+ name: g,
1469
+ instance: d,
1470
+ options: T
1471
+ }), O = function() {
1472
+ };
1473
+ p.push(v || O);
1474
+ }
1475
+ });
1476
+ }
1477
+ function m() {
1478
+ p.forEach(function(w) {
1479
+ return w();
1480
+ }), p = [];
1481
+ }
1482
+ return d;
1483
+ };
1484
+ }
1485
+ var la = [Er, qr, Cr, mr, Hr, Vr, Xr, $r, Wr], ua = /* @__PURE__ */ ia({
1486
+ defaultModifiers: la
1487
+ });
1488
+ const ca = Object.freeze([
1489
+ "auto",
1490
+ "auto-start",
1491
+ "auto-end",
1492
+ "top",
1493
+ "top-start",
1494
+ "top-end",
1495
+ "bottom",
1496
+ "bottom-start",
1497
+ "bottom-end",
1498
+ "left",
1499
+ "left-start",
1500
+ "left-end",
1501
+ "right",
1502
+ "right-start",
1503
+ "right-end"
1504
+ ]);
1505
+ function wt(e) {
1506
+ const { placement: t, transfer: n, wrapper: r, isDrop: a = !1 } = e, o = e.reference ?? $(null), l = e.popper ?? $(null), s = $(""), i = {
1507
+ placement: t.value,
1508
+ modifiers: [
1509
+ {
1510
+ name: "computeStyles",
1511
+ options: {
1512
+ gpuAcceleration: !1
1513
+ }
1514
+ },
1515
+ {
1516
+ name: "preventOverflow",
1517
+ options: {
1518
+ rootBoundary: "window"
1519
+ }
1520
+ }
1521
+ ]
1522
+ };
1523
+ a && i.modifiers.push({
1524
+ name: "setTransformOrigin",
1525
+ enabled: !0,
1526
+ phase: "afterWrite",
1527
+ fn({ state: g }) {
1528
+ const k = da(g.placement);
1529
+ k && (g.elements.popper.style.transformOrigin = k);
1530
+ }
1531
+ }), e.offset && i.modifiers.push({
1532
+ name: "offset",
1533
+ options: {
1534
+ offset: e.offset
1535
+ }
1536
+ });
1537
+ let c = null;
1538
+ W(t, (g) => {
1539
+ i.placement = g, c && (c == null || c.setOptions({ placement: g }));
1540
+ });
1541
+ let u = $(0);
1542
+ ct(() => {
1543
+ r.value && l.value && (r.value.__transferElement = l.value);
1544
+ });
1545
+ let p = null;
1546
+ n && W(n, (g) => {
1547
+ f(g), h();
1548
+ }), pe(() => {
1549
+ Ee(d);
1550
+ }), Xt(w);
1551
+ function h() {
1552
+ Ee(() => {
1553
+ c && c.forceUpdate(), r.value && (u.value = r.value.clientWidth);
1554
+ });
1555
+ }
1556
+ function d() {
1557
+ w(), c && c.destroy(), m();
1558
+ const g = W(o, m), k = W(l, m);
1559
+ p = () => {
1560
+ g(), k();
1561
+ };
1562
+ }
1563
+ function f(g) {
1564
+ s.value = typeof g == "boolean" ? g ? "body" : "" : g;
1565
+ }
1566
+ function m() {
1567
+ o.value && l.value && (c && c.destroy(), c = ua(o.value, l.value, i), h());
1568
+ }
1569
+ function w() {
1570
+ c && c.destroy(), c = null, typeof p == "function" && (p(), p = null);
1571
+ }
1572
+ return {
1573
+ reference: o,
1574
+ popper: l,
1575
+ transferTo: s,
1576
+ updatePopper: h,
1577
+ createPopper: d,
1578
+ destroyPopper: w,
1579
+ width: u
1580
+ };
1581
+ }
1582
+ function da(e) {
1583
+ if (e !== "left" && e !== "right") {
1584
+ const [t, n] = e.split("-");
1585
+ return t === "bottom" || t !== "top" && n === "start" ? "center top" : "center bottom";
1586
+ }
1587
+ }
1588
+ var zt;
1589
+ const xe = typeof window < "u", fa = (e) => typeof e == "string", pa = () => {
1590
+ };
1591
+ xe && ((zt = window == null ? void 0 : window.navigator) != null && zt.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
1592
+ function ma(e) {
1593
+ return typeof e == "function" ? e() : En(e);
1594
+ }
1595
+ function va(e) {
1596
+ return e;
1597
+ }
1598
+ function ba(e) {
1599
+ return Cn() ? (kn(e), !0) : !1;
1600
+ }
1601
+ function De(e) {
1602
+ var t;
1603
+ const n = ma(e);
1604
+ return (t = n == null ? void 0 : n.$el) != null ? t : n;
1605
+ }
1606
+ const on = xe ? window : void 0;
1607
+ xe && window.document;
1608
+ xe && window.navigator;
1609
+ xe && window.location;
1610
+ function ye(...e) {
1611
+ let t, n, r, a;
1612
+ if (fa(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = on) : [t, n, r, a] = e, !t)
1613
+ return pa;
1614
+ Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
1615
+ const o = [], l = () => {
1616
+ o.forEach((u) => u()), o.length = 0;
1617
+ }, s = (u, p, h) => (u.addEventListener(p, h, a), () => u.removeEventListener(p, h, a)), i = W(() => De(t), (u) => {
1618
+ l(), u && o.push(...n.flatMap((p) => r.map((h) => s(u, p, h))));
1619
+ }, { immediate: !0, flush: "post" }), c = () => {
1620
+ i(), l();
1621
+ };
1622
+ return ba(c), c;
1623
+ }
1624
+ function sn(e, t, n = {}) {
1625
+ const { window: r = on, ignore: a = [], capture: o = !0, detectIframe: l = !1 } = n;
1626
+ if (!r)
1627
+ return;
1628
+ let s = !0, i;
1629
+ const c = (d) => a.some((f) => {
1630
+ if (typeof f == "string")
1631
+ return Array.from(r.document.querySelectorAll(f)).some((m) => m === d.target || d.composedPath().includes(m));
1632
+ {
1633
+ const m = De(f);
1634
+ return m && (d.target === m || d.composedPath().includes(m));
1635
+ }
1636
+ }), u = (d) => {
1637
+ r.clearTimeout(i);
1638
+ const f = De(e);
1639
+ if (!(!f || f === d.target || d.composedPath().includes(f))) {
1640
+ if (d.detail === 0 && (s = !c(d)), !s) {
1641
+ s = !0;
1642
+ return;
1643
+ }
1644
+ t(d);
1645
+ }
1646
+ }, p = [
1647
+ ye(r, "click", u, { passive: !0, capture: o }),
1648
+ ye(r, "pointerdown", (d) => {
1649
+ const f = De(e);
1650
+ f && (s = !d.composedPath().includes(f) && !c(d));
1651
+ }, { passive: !0 }),
1652
+ ye(r, "pointerup", (d) => {
1653
+ if (d.button === 0) {
1654
+ const f = d.composedPath();
1655
+ d.composedPath = () => f, i = r.setTimeout(() => u(d), 50);
1656
+ }
1657
+ }, { passive: !0 }),
1658
+ l && ye(r, "blur", (d) => {
1659
+ var f;
1660
+ const m = De(e);
1661
+ ((f = r.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(m != null && m.contains(r.document.activeElement)) && t(d);
1662
+ })
1663
+ ].filter(Boolean);
1664
+ return () => p.forEach((d) => d());
1665
+ }
1666
+ const it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, lt = "__vueuse_ssr_handlers__";
1667
+ it[lt] = it[lt] || {};
1668
+ it[lt];
1669
+ var xt;
1670
+ (function(e) {
1671
+ e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
1672
+ })(xt || (xt = {}));
1673
+ var ha = Object.defineProperty, Ht = Object.getOwnPropertySymbols, ya = Object.prototype.hasOwnProperty, ga = Object.prototype.propertyIsEnumerable, Ft = (e, t, n) => t in e ? ha(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, wa = (e, t) => {
1674
+ for (var n in t || (t = {}))
1675
+ ya.call(t, n) && Ft(e, n, t[n]);
1676
+ if (Ht)
1677
+ for (var n of Ht(t))
1678
+ ga.call(t, n) && Ft(e, n, t[n]);
1679
+ return e;
1680
+ };
1681
+ const $a = {
1682
+ easeInSine: [0.12, 0, 0.39, 0],
1683
+ easeOutSine: [0.61, 1, 0.88, 1],
1684
+ easeInOutSine: [0.37, 0, 0.63, 1],
1685
+ easeInQuad: [0.11, 0, 0.5, 0],
1686
+ easeOutQuad: [0.5, 1, 0.89, 1],
1687
+ easeInOutQuad: [0.45, 0, 0.55, 1],
1688
+ easeInCubic: [0.32, 0, 0.67, 0],
1689
+ easeOutCubic: [0.33, 1, 0.68, 1],
1690
+ easeInOutCubic: [0.65, 0, 0.35, 1],
1691
+ easeInQuart: [0.5, 0, 0.75, 0],
1692
+ easeOutQuart: [0.25, 1, 0.5, 1],
1693
+ easeInOutQuart: [0.76, 0, 0.24, 1],
1694
+ easeInQuint: [0.64, 0, 0.78, 0],
1695
+ easeOutQuint: [0.22, 1, 0.36, 1],
1696
+ easeInOutQuint: [0.83, 0, 0.17, 1],
1697
+ easeInExpo: [0.7, 0, 0.84, 0],
1698
+ easeOutExpo: [0.16, 1, 0.3, 1],
1699
+ easeInOutExpo: [0.87, 0, 0.13, 1],
1700
+ easeInCirc: [0.55, 0, 1, 0.45],
1701
+ easeOutCirc: [0, 0.55, 0.45, 1],
1702
+ easeInOutCirc: [0.85, 0, 0.15, 1],
1703
+ easeInBack: [0.36, 0, 0.66, -0.56],
1704
+ easeOutBack: [0.34, 1.56, 0.64, 1],
1705
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
1706
+ };
1707
+ wa({
1708
+ linear: va
1709
+ }, $a);
1710
+ const Oa = I({
1711
+ name: "MSelect",
1712
+ emits: te.emits(),
1713
+ props: {
1714
+ ...te.props(),
1715
+ label: {
1716
+ type: String
1717
+ },
1718
+ placeholder: {
1719
+ type: String,
1720
+ default: "Select an option"
1721
+ },
1722
+ options: {
1723
+ type: Array,
1724
+ required: !0
1725
+ },
1726
+ searchable: {
1727
+ type: Boolean,
1728
+ default: !1
1729
+ },
1730
+ multiple: {
1731
+ type: Boolean,
1732
+ default: !1
1733
+ },
1734
+ size: {
1735
+ type: String,
1736
+ default: "md"
1737
+ },
1738
+ help: {
1739
+ type: String,
1740
+ default: ""
1741
+ },
1742
+ optionValue: {
1743
+ type: String,
1744
+ default: "value"
1745
+ },
1746
+ optionLabel: {
1747
+ type: String,
1748
+ default: "label"
1749
+ },
1750
+ transitionName: {
1751
+ type: String,
1752
+ default: "fade"
1753
+ },
1754
+ consistentWidth: {
1755
+ type: Boolean,
1756
+ default: !0
1757
+ },
1758
+ disabled: {
1759
+ type: Boolean,
1760
+ default: !1
1761
+ },
1762
+ loading: {
1763
+ type: Boolean,
1764
+ default: !1
1765
+ }
1766
+ },
1767
+ setup(e, { emit: t }) {
1768
+ const n = $(), r = $(), a = $(), o = $(), l = $(), s = $(0), i = $(!1), c = $(""), u = $("bottom-start"), p = $(!1), h = $(0), d = $(!1), f = () => {
1769
+ }, {
1770
+ id: m,
1771
+ insideForm: w,
1772
+ listeners: g,
1773
+ formError: k,
1774
+ formDisabled: T,
1775
+ formLoading: C
1776
+ } = te(e, { focus: f, emit: t, withListeners: !1 }), { popper: v } = wt({
1777
+ placement: u,
1778
+ transfer: p,
1779
+ reference: n,
1780
+ wrapper: r
1781
+ }), O = b(() => T || e.disabled), M = b(() => C || e.loading), E = b({
1782
+ get() {
1783
+ return e.multiple ? e.modelValue ? Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : [] : e.modelValue || null;
1784
+ },
1785
+ set(S) {
1786
+ t("update:modelValue", S);
1787
+ }
1788
+ }), j = b(() => e.consistentWidth ? {
1789
+ width: h.value + "px"
1790
+ } : {}), A = b(() => !e.options || e.options.length == 0 ? [] : e.searchable && c.value ? e.options.filter((S) => S[e.optionLabel].toLowerCase().includes(c.value.toLowerCase())).map((S) => {
1791
+ if (S[e.optionValue] === void 0)
1792
+ throw new Error("Option value is undefined");
1793
+ if (S[e.optionLabel] === void 0)
1794
+ throw new Error("Option label is undefined");
1795
+ let N = S[e.optionValue], P = !1;
1796
+ return e.multiple && Array.isArray(E.value) ? P = E.value.includes(N) : P = E.value === N, {
1797
+ value: N,
1798
+ label: S[e.optionLabel],
1799
+ active: P,
1800
+ onClick: () => z(N)
1801
+ };
1802
+ }) : e.options.map((S) => {
1803
+ if (S[e.optionValue] === void 0)
1804
+ throw new Error("Option value is undefined");
1805
+ if (S[e.optionLabel] === void 0)
1806
+ throw new Error("Option label is undefined");
1807
+ let N = S[e.optionValue], P = !1;
1808
+ return e.multiple && Array.isArray(E.value) ? P = E.value.includes(N) : P = E.value === N, {
1809
+ value: N,
1810
+ label: S[e.optionLabel],
1811
+ active: P,
1812
+ onClick: () => z(N)
1813
+ };
1814
+ }));
1815
+ function R() {
1816
+ O.value || M.value || (i.value = !i.value);
1817
+ }
1818
+ function x(S, N = "down") {
1819
+ if (typeof S > "u" && (S = N === "down" ? -1 : 1), N === "down") {
1820
+ let P = S + 1;
1821
+ P > A.value.length - 1 && (P = 0), s.value = P;
1822
+ } else {
1823
+ let P = S - 1;
1824
+ P < 0 && (P = A.value.length - 1), s.value = P;
1825
+ }
1826
+ }
1827
+ function z(S) {
1828
+ if (A.value.find((P) => P.value === S))
1829
+ if (e.multiple)
1830
+ if (Array.isArray(E.value)) {
1831
+ const P = E.value.indexOf(S);
1832
+ P !== -1 ? E.value.splice(P, 1) : (E.value.push(S), t("update:modelValue", E.value));
1833
+ } else
1834
+ E.value = [S];
1835
+ else
1836
+ E.value = S, i.value = !1;
1837
+ }
1838
+ function ae(S) {
1839
+ if (A.value.length === 0 || e.disabled)
1840
+ return;
1841
+ switch (d.value = !0, S.code) {
1842
+ case "ArrowDown":
1843
+ if (S.preventDefault(), !i.value) {
1844
+ i.value = !0;
1845
+ return;
1846
+ }
1847
+ x(s.value, "down");
1848
+ break;
1849
+ case "ArrowUp":
1850
+ if (S.preventDefault(), !i.value)
1851
+ return;
1852
+ x(s.value, "up");
1853
+ break;
1854
+ case "Enter":
1855
+ if (S.preventDefault(), S.stopPropagation(), !i.value) {
1856
+ i.value = !0;
1857
+ return;
1858
+ }
1859
+ typeof s.value < "u" && (z(A.value[s.value].value), e.multiple || (i.value = !1));
1860
+ break;
1861
+ case "Escape":
1862
+ if (S.preventDefault(), S.stopPropagation(), !i.value)
1863
+ return;
1864
+ i.value = !1;
1865
+ break;
1866
+ }
1867
+ }
1868
+ const se = b(() => `m-transition__${e.transitionName}`), F = b(() => [
1869
+ "m-select__container",
1870
+ {
1871
+ "m-form__input": w
1872
+ }
1873
+ ]), X = b(() => [
1874
+ "m-select",
1875
+ {
1876
+ [`m-select--${e.size}`]: e.size,
1877
+ "m-select--disabled": O.value || M.value,
1878
+ "m-select--focused": i.value,
1879
+ "m-select--multiple": e.multiple,
1880
+ "m-select--error": k.value
1881
+ }
1882
+ ]);
1883
+ function Ce(S) {
1884
+ const N = e.options.find((P) => P[e.optionValue] === S);
1885
+ return N ? N[e.optionLabel] : null;
1886
+ }
1887
+ ye(l, "keydown", ae), ye(o, "keydown", ae), sn(n, () => {
1888
+ i.value = !1;
1889
+ }, { ignore: [o, v] }), ct(() => {
1890
+ n.value && i.value && (h.value = n.value.offsetWidth);
1891
+ }), W(s, (S) => {
1892
+ d.value && typeof S < "u" && a.value && a.value[S].scrollIntoView({ block: "nearest", inline: "nearest" });
1893
+ }), W(i, (S) => {
1894
+ Ee(() => {
1895
+ if (S && a.value) {
1896
+ const N = A.value.findIndex((P) => P.value === E.value);
1897
+ N !== -1 && (a.value[N].scrollIntoView({ block: "center", inline: "nearest" }), s.value = N);
1898
+ }
1899
+ d.value = !1;
1900
+ });
1901
+ });
1902
+ const ie = b(() => k.value || e.error);
1903
+ return {
1904
+ container: n,
1905
+ optionsRef: a,
1906
+ searchRef: o,
1907
+ selectRef: l,
1908
+ popper: v,
1909
+ id: m,
1910
+ open: i,
1911
+ selected: E,
1912
+ computedOptions: A,
1913
+ selectedIndex: s,
1914
+ search: c,
1915
+ containerComputedClasses: F,
1916
+ selectComputedClasses: X,
1917
+ computedConsistentWidth: j,
1918
+ getSelectedLabel: Ce,
1919
+ openSelect: R,
1920
+ inputError: ie,
1921
+ transitionName: se,
1922
+ listeners: g
1923
+ };
1924
+ }
1925
+ }), _a = ["for", "id"], Sa = ["id", "aria-disabled", "aria-labelledby"], Ca = { class: "m-select__wrapper" }, ka = { class: "m-select__input" }, Ea = { class: "m-select__input-wrapper" }, Ta = {
1926
+ key: 2,
1927
+ class: "m-select__placeholder-text"
1928
+ }, Ma = ["aria-hidden"], Aa = {
1929
+ key: 0,
1930
+ class: "m-select__search"
1931
+ }, Ba = { class: "m-select__options" }, Pa = ["onClick", "onMouseover"], Ra = {
1932
+ key: 1,
1933
+ class: "m-select__error"
1934
+ };
1935
+ function Da(e, t, n, r, a, o) {
1936
+ const l = de("MInput");
1937
+ return y(), _("div", {
1938
+ class: D(e.containerComputedClasses),
1939
+ ref: "selectRef",
1940
+ tabindex: "0"
1941
+ }, [
1942
+ e.label ? (y(), _("label", Gt({
1943
+ key: 0,
1944
+ for: e.id,
1945
+ class: "m-select__label"
1946
+ }, Ut(e.listeners, !0), {
1947
+ id: `${e.id}-label`
1948
+ }), H(e.label), 17, _a)) : q("", !0),
1949
+ V("div", {
1950
+ class: D(e.selectComputedClasses),
1951
+ id: e.id,
1952
+ ref: "container",
1953
+ onClick: t[1] || (t[1] = (...s) => e.openSelect && e.openSelect(...s)),
1954
+ "aria-disabled": e.disabled ? "true" : "false",
1955
+ "aria-labelledby": `${e.id}-label`
1956
+ }, [
1957
+ V("div", Ca, [
1958
+ V("div", ka, [
1959
+ V("div", Ea, [
1960
+ e.multiple && Array.isArray(e.selected) && e.selected.length > 0 ? (y(!0), _(ge, { key: 0 }, Ie(e.selected, (s) => (y(), _("span", {
1961
+ key: s,
1962
+ class: "m-select__tag"
1963
+ }, H(e.getSelectedLabel(s)), 1))), 128)) : !e.multiple && e.selected ? (y(), _(ge, { key: 1 }, [
1964
+ Oe(H(e.getSelectedLabel(e.selected)), 1)
1965
+ ], 64)) : (y(), _("span", Ta, H(e.placeholder), 1))
1966
+ ])
1967
+ ]),
1968
+ (y(), K(Qe, { to: "body" }, [
1969
+ _e(dt, { name: e.transitionName }, {
1970
+ default: Y(() => [
1971
+ e.open ? (y(), _("div", {
1972
+ key: 0,
1973
+ class: "m-select__dropdown",
1974
+ ref: "popper",
1975
+ style: ft(e.computedConsistentWidth),
1976
+ "aria-hidden": e.open ? "false" : "true"
1977
+ }, [
1978
+ e.searchable ? (y(), _("div", Aa, [
1979
+ _e(l, {
1980
+ modelValue: e.search,
1981
+ "onUpdate:modelValue": t[0] || (t[0] = (s) => e.search = s),
1982
+ placeholder: "Search",
1983
+ size: "sm",
1984
+ ref: "searchRef"
1985
+ }, null, 8, ["modelValue"])
1986
+ ])) : q("", !0),
1987
+ V("div", Ba, [
1988
+ (y(!0), _(ge, null, Ie(e.computedOptions, (s, i) => (y(), _("div", {
1989
+ key: i,
1990
+ ref_for: !0,
1991
+ ref: "optionsRef",
1992
+ class: D(["m-select__option", {
1993
+ "m-select__option--selected": s.active,
1994
+ "m-select__option--focused": e.selectedIndex === i
1995
+ }]),
1996
+ onClick: s.onClick,
1997
+ onMouseover: (c) => e.selectedIndex = i
1998
+ }, H(s.label), 43, Pa))), 128))
1999
+ ])
2000
+ ], 12, Ma)) : q("", !0)
2001
+ ]),
2002
+ _: 1
2003
+ }, 8, ["name"])
2004
+ ]))
2005
+ ])
2006
+ ], 10, Sa),
2007
+ e.inputError ? (y(), _("p", Ra, H(e.inputError), 1)) : q("", !0)
2008
+ ], 2);
2009
+ }
2010
+ const Ia = /* @__PURE__ */ L(Oa, [["render", Da]]), La = I({
2011
+ name: "Checkbox",
2012
+ emits: te.emits(),
2013
+ props: {
2014
+ ...te.props(),
2015
+ label: {
2016
+ type: String
2017
+ },
2018
+ size: {
2019
+ type: String,
2020
+ default: "md"
2021
+ },
2022
+ color: {
2023
+ type: String,
2024
+ default: "blue"
2025
+ },
2026
+ disabled: {
2027
+ type: Boolean,
2028
+ default: !1
2029
+ },
2030
+ loading: {
2031
+ type: Boolean,
2032
+ default: !1
2033
+ }
2034
+ },
2035
+ setup(e, { slots: t, emit: n }) {
2036
+ const r = () => {
2037
+ }, {
2038
+ id: a,
2039
+ insideForm: o,
2040
+ reset: l,
2041
+ validate: s,
2042
+ setError: i,
2043
+ formError: c,
2044
+ formDisabled: u,
2045
+ formLoading: p
2046
+ } = te(e, { focus: r, emit: n, withListeners: !1 }), h = b(() => u || e.disabled), d = b(() => p || e.loading), f = $e(e, "name"), m = $(!1), w = $(null), g = b(() => !!t.default), k = b(() => [
2047
+ "m-checkbox__container",
2048
+ {
2049
+ "m-form__input": o
2050
+ }
2051
+ ]), T = b(() => ({
2052
+ "m-checkbox": !0,
2053
+ "m-checkbox--checked": m.value,
2054
+ "m-checkbox--disabled": h.value || d.value,
2055
+ "m-checkbox--error": c.value,
2056
+ [`m-checkbox--${e.size}`]: !0,
2057
+ [`m-checkbox--${e.color}`]: !0
2058
+ })), C = b(() => c.value || e.error);
2059
+ W(() => e.modelValue, (O) => {
2060
+ m.value = !!O;
2061
+ }, { immediate: !0 }), W(() => m.value, (O) => {
2062
+ n("update:modelValue", O);
2063
+ });
2064
+ function v() {
2065
+ h.value || (m.value = !m.value);
2066
+ }
2067
+ return {
2068
+ id: a,
2069
+ formError: c,
2070
+ insideForm: o,
2071
+ reset: l,
2072
+ validate: s,
2073
+ setError: i,
2074
+ disabled: h,
2075
+ loading: d,
2076
+ name: f,
2077
+ checked: m,
2078
+ checkboxRef: w,
2079
+ inputError: C,
2080
+ toggle: v,
2081
+ wrapperComputedClasses: k,
2082
+ checkboxComputedClass: T,
2083
+ hasSlot: g
2084
+ };
2085
+ }
2086
+ }), Na = ["aria-checked", "aria-disabled", "aria-labelledby", "disabled", "name", "id"], Va = /* @__PURE__ */ V("span", null, null, -1), ja = ["id"], Wa = {
2087
+ key: 0,
2088
+ class: "m-input__error"
2089
+ };
2090
+ function za(e, t, n, r, a, o) {
2091
+ return y(), _("div", {
2092
+ ref: "checkboxRef",
2093
+ class: D(e.wrapperComputedClasses)
2094
+ }, [
2095
+ V("div", {
2096
+ class: D(e.checkboxComputedClass),
2097
+ onClick: t[1] || (t[1] = ut((...l) => e.toggle && e.toggle(...l), ["prevent"]))
2098
+ }, [
2099
+ pt(V("input", {
2100
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => e.checked = l),
2101
+ type: "checkbox",
2102
+ "aria-checked": e.checked ? "true" : "false",
2103
+ "aria-disabled": e.disabled || e.loading ? "true" : "false",
2104
+ "aria-labelledby": `${e.id}-label`,
2105
+ disabled: e.disabled || e.loading,
2106
+ name: e.name,
2107
+ id: e.id
2108
+ }, null, 8, Na), [
2109
+ [Tn, e.checked]
2110
+ ]),
2111
+ Va,
2112
+ V("div", {
2113
+ class: "m-checkbox__label",
2114
+ id: `${e.id}-label`
2115
+ }, [
2116
+ e.hasSlot ? B(e.$slots, "default", { key: 0 }) : (y(), _(ge, { key: 1 }, [
2117
+ Oe(H(e.label), 1)
2118
+ ], 64))
2119
+ ], 8, ja)
2120
+ ], 2),
2121
+ e.inputError ? (y(), _("p", Wa, H(e.inputError), 1)) : q("", !0)
2122
+ ], 2);
2123
+ }
2124
+ const xa = /* @__PURE__ */ L(La, [["render", za]]), Ha = I({
2125
+ name: "Breadcrumb",
2126
+ components: {
2127
+ BreadcrumbItem: () => Promise.resolve().then(() => Qa)
2128
+ },
2129
+ props: {
2130
+ seperator: {
2131
+ type: String,
2132
+ default: "/"
2133
+ }
2134
+ },
2135
+ setup(e) {
2136
+ const t = () => {
2137
+ }, n = Ke({
2138
+ separator: $e(e, "seperator"),
2139
+ refreshItems: t
2140
+ }), r = b(() => ({
2141
+ "m-breadcrumbs": !0
2142
+ }));
2143
+ return fe("breadcrumb", n), {
2144
+ props: e,
2145
+ refreshItems: t,
2146
+ classes: r
2147
+ };
2148
+ }
2149
+ });
2150
+ function Fa(e, t, n, r, a, o) {
2151
+ return y(), _("ol", {
2152
+ class: D(e.classes)
2153
+ }, [
2154
+ B(e.$slots, "default")
2155
+ ], 2);
2156
+ }
2157
+ const qa = /* @__PURE__ */ L(Ha, [["render", Fa]]), Ga = I({
2158
+ name: "BreadcrumbItem",
2159
+ props: {
2160
+ label: {
2161
+ type: [String, Number],
2162
+ default: null
2163
+ }
2164
+ },
2165
+ setup(e) {
2166
+ const t = le("breadcrumb"), n = $(e.label), r = $("/");
2167
+ return W(
2168
+ () => e.label,
2169
+ (o) => {
2170
+ n.value = o, t == null || t.refreshItems();
2171
+ }
2172
+ ), t && (Ke({
2173
+ label: n
2174
+ }), W(() => t.separator, (o) => r.value = o, { immediate: !0 }), Xt(() => {
2175
+ })), {
2176
+ label: n,
2177
+ separator: r,
2178
+ handleClick: () => {
2179
+ }
2180
+ };
2181
+ }
2182
+ }), Ua = { class: "m-breadcrumbs__item" }, Xa = {
2183
+ class: "m-breadcrumbs__item-separator",
2184
+ role: "separator"
2185
+ };
2186
+ function Ya(e, t, n, r, a, o) {
2187
+ return y(), _("li", Ua, [
2188
+ V("a", {
2189
+ tabindex: "0",
2190
+ onClick: t[0] || (t[0] = (...l) => e.handleClick && e.handleClick(...l)),
2191
+ class: "m-breadcrumbs__link"
2192
+ }, [
2193
+ B(e.$slots, "default", {}, () => [
2194
+ Oe(H(e.label), 1)
2195
+ ])
2196
+ ]),
2197
+ V("span", Xa, H(e.separator), 1)
2198
+ ]);
2199
+ }
2200
+ const ln = /* @__PURE__ */ L(Ga, [["render", Ya]]), Qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2201
+ __proto__: null,
2202
+ default: ln
2203
+ }, Symbol.toStringTag, { value: "Module" })), Ka = I({
2204
+ name: "MImage",
2205
+ props: {
2206
+ src: {
2207
+ type: String,
2208
+ required: !0
2209
+ },
2210
+ scrSet: {
2211
+ type: String,
2212
+ default: ""
2213
+ },
2214
+ fit: {
2215
+ type: String,
2216
+ default: "cover"
2217
+ },
2218
+ alt: {
2219
+ type: String,
2220
+ default: ""
2221
+ }
2222
+ },
2223
+ emits: {
2224
+ error: (e) => !0
2225
+ },
2226
+ setup(e, { emit: t }) {
2227
+ const n = $("");
2228
+ typeof window < "u" && Image && W(
2229
+ () => e.src,
2230
+ (o) => {
2231
+ if (!o)
2232
+ return;
2233
+ const l = new Image();
2234
+ l.onload = () => {
2235
+ n.value = e.src;
2236
+ }, l.onerror = () => {
2237
+ t("error", new Event("error"));
2238
+ }, l.src = o;
2239
+ },
2240
+ { immediate: !0 }
2241
+ );
2242
+ const r = b(() => ({
2243
+ "m-image": !0
2244
+ })), a = b(() => ({}));
2245
+ return {
2246
+ source: n,
2247
+ computedClasses: r,
2248
+ computedStyles: a
2249
+ };
2250
+ }
2251
+ }), Ja = ["src", "alt"];
2252
+ function Za(e, t, n, r, a, o) {
2253
+ return y(), _("img", {
2254
+ class: D(e.computedClasses),
2255
+ style: ft(e.computedStyles),
2256
+ src: e.source,
2257
+ alt: e.alt
2258
+ }, null, 14, Ja);
2259
+ }
2260
+ const un = /* @__PURE__ */ L(Ka, [["render", Za]]), eo = I({
2261
+ name: "MAvatar",
2262
+ components: {
2263
+ MImage: un
2264
+ },
2265
+ props: {
2266
+ src: {
2267
+ type: String,
2268
+ default: ""
2269
+ },
2270
+ srcSet: {
2271
+ type: String,
2272
+ default: ""
2273
+ },
2274
+ size: {
2275
+ type: [Number, String],
2276
+ default: "md"
2277
+ },
2278
+ fit: {
2279
+ type: String,
2280
+ default: "cover"
2281
+ },
2282
+ variant: {
2283
+ type: String,
2284
+ default: "circle"
2285
+ }
2286
+ },
2287
+ emits: {
2288
+ error: (e) => !0
2289
+ },
2290
+ setup(e, { emit: t }) {
2291
+ const n = le("avatarGroup", void 0), r = $(null), a = $(!0), o = $(""), l = b(() => n == null ? void 0 : n.size), s = b(() => typeof e.size == "number" || e.size.includes("px")), i = b(() => s.value ? {
2292
+ width: e.size,
2293
+ height: e.size
2294
+ } : {}), c = b(() => ({
2295
+ "m-avatar": !0,
2296
+ [`m-avatar--${o.value}`]: !s.value,
2297
+ [`m-avatar--${e.variant}`]: !0
2298
+ })), u = (p) => {
2299
+ a.value = !1, t("error", p);
2300
+ };
2301
+ return pe(() => {
2302
+ o.value = l.value || e.size;
2303
+ }), {
2304
+ avatar: r,
2305
+ avatarGroup: n,
2306
+ classes: c,
2307
+ customSize: i,
2308
+ imageExists: a,
2309
+ handleImageLoadError: u
2310
+ };
2311
+ }
2312
+ });
2313
+ function to(e, t, n, r, a, o) {
2314
+ const l = de("MImage");
2315
+ return y(), _("span", {
2316
+ class: D(e.classes),
2317
+ style: ft(e.customSize),
2318
+ ref: "avatar"
2319
+ }, [
2320
+ (e.src || e.srcSet) && e.imageExists ? (y(), K(l, {
2321
+ key: 0,
2322
+ src: e.src,
2323
+ alt: e.src,
2324
+ srcset: e.srcSet,
2325
+ onError: e.handleImageLoadError
2326
+ }, null, 8, ["src", "alt", "srcset", "onError"])) : B(e.$slots, "default", { key: 1 })
2327
+ ], 6);
2328
+ }
2329
+ const no = /* @__PURE__ */ L(eo, [["render", to]]), ro = I({
2330
+ name: "MAvatarGroup",
2331
+ props: {
2332
+ max: {
2333
+ type: Number,
2334
+ default: 5
2335
+ },
2336
+ size: {
2337
+ type: [Number, String],
2338
+ default: "md"
2339
+ }
2340
+ },
2341
+ setup(e) {
2342
+ return fe("avatarGroup", e), {
2343
+ props: e
2344
+ };
2345
+ }
2346
+ }), ao = { class: "m-avatar-group" };
2347
+ function oo(e, t, n, r, a, o) {
2348
+ return y(), _("div", ao, [
2349
+ B(e.$slots, "default")
2350
+ ]);
2351
+ }
2352
+ const so = /* @__PURE__ */ L(ro, [["render", oo]]), io = I({
2353
+ name: "MSkeleton",
2354
+ props: {
2355
+ tag: {
2356
+ type: String,
2357
+ default: "div"
2358
+ },
2359
+ variant: {
2360
+ type: String,
2361
+ default: "line",
2362
+ validator: (e) => ["block", "thumb", "heading", "line", "circle"].includes(e)
2363
+ },
2364
+ animation: {
2365
+ type: String,
2366
+ default: "pulse"
2367
+ }
2368
+ },
2369
+ setup(e) {
2370
+ return {
2371
+ computedClasses: b(() => ({
2372
+ "m-skeleton": !0,
2373
+ [`m-skeleton--${e.variant}`]: !0,
2374
+ [`m-skeleton--${e.animation}`]: !0
2375
+ }))
2376
+ };
2377
+ }
2378
+ });
2379
+ function lo(e, t, n, r, a, o) {
2380
+ return y(), K(Ye(e.tag), {
2381
+ class: D(e.computedClasses)
2382
+ }, {
2383
+ default: Y(() => [
2384
+ Oe("   ")
2385
+ ]),
2386
+ _: 1
2387
+ }, 8, ["class"]);
2388
+ }
2389
+ const uo = /* @__PURE__ */ L(io, [["render", lo]]), co = I({
2390
+ name: "MLink",
2391
+ props: {
2392
+ color: {
2393
+ type: String
2394
+ },
2395
+ disabled: {
2396
+ type: Boolean,
2397
+ default: !1
2398
+ },
2399
+ block: {
2400
+ type: Boolean,
2401
+ default: !1
2402
+ },
2403
+ underline: {
2404
+ type: Boolean,
2405
+ default: !1
2406
+ },
2407
+ to: [String, Object]
2408
+ },
2409
+ setup(e) {
2410
+ const t = b(() => [
2411
+ "m-link",
2412
+ {
2413
+ [`m-link--${e.color}`]: e.color,
2414
+ "m-link--underline": e.underline,
2415
+ "m-link--block": e.block,
2416
+ "m-link--disabled": e.disabled,
2417
+ "m-link--external": n.value === "a"
2418
+ }
2419
+ ]), n = b(() => e.to ? "router-link" : "a");
2420
+ return {
2421
+ computedClasses: t,
2422
+ tag: n
2423
+ };
2424
+ }
2425
+ });
2426
+ function fo(e, t, n, r, a, o) {
2427
+ return y(), K(Ye(e.tag), {
2428
+ to: e.to,
2429
+ class: D(e.computedClasses),
2430
+ disabled: e.disabled
2431
+ }, {
2432
+ default: Y(() => [
2433
+ B(e.$slots, "default")
2434
+ ]),
2435
+ _: 3
2436
+ }, 8, ["to", "class", "disabled"]);
2437
+ }
2438
+ const po = /* @__PURE__ */ L(co, [["render", fo]]), mo = I({
2439
+ name: "MTooltip",
2440
+ props: {
2441
+ placement: {
2442
+ type: String,
2443
+ default: "top",
2444
+ validator: (e) => ca.includes(e)
2445
+ },
2446
+ transitionName: {
2447
+ type: String,
2448
+ default: "scale"
2449
+ },
2450
+ reverse: {
2451
+ type: Boolean,
2452
+ default: !1
2453
+ },
2454
+ transfer: {
2455
+ type: Boolean,
2456
+ default: !1
2457
+ }
2458
+ },
2459
+ setup(e, { emit: t }) {
2460
+ const n = $(e.placement), r = $e(e, "transfer"), a = $(null), o = $(null), l = $(!1), { popper: s, transferTo: i, updatePopper: c } = wt({
2461
+ placement: n,
2462
+ transfer: r,
2463
+ reference: o,
2464
+ wrapper: a
2465
+ }), u = b(() => `m-transition__${e.transitionName}`), p = b(() => [
2466
+ "m-tooltip",
2467
+ {
2468
+ "m-tooltip--reverse": e.reverse
2469
+ }
2470
+ ]);
2471
+ return W(() => l.value, (h) => {
2472
+ h && c();
2473
+ }), {
2474
+ reference: o,
2475
+ popper: s,
2476
+ transferTo: i,
2477
+ transitionName: u,
2478
+ isOpen: l,
2479
+ computedClasses: p
2480
+ };
2481
+ }
2482
+ }), vo = { class: "m-tooltip--content" };
2483
+ function bo(e, t, n, r, a, o) {
2484
+ return y(), _("span", {
2485
+ onMouseenter: t[0] || (t[0] = (l) => e.isOpen = !0),
2486
+ onMouseleave: t[1] || (t[1] = (l) => e.isOpen = !1),
2487
+ ref: "reference"
2488
+ }, [
2489
+ B(e.$slots, "trigger"),
2490
+ (y(), K(Qe, { to: "body" }, [
2491
+ _e(dt, { name: e.transitionName }, {
2492
+ default: Y(() => [
2493
+ pt(V("div", {
2494
+ ref: "popper",
2495
+ class: D(e.computedClasses)
2496
+ }, [
2497
+ V("span", vo, [
2498
+ B(e.$slots, "default")
2499
+ ])
2500
+ ], 2), [
2501
+ [Yt, e.isOpen]
2502
+ ])
2503
+ ]),
2504
+ _: 3
2505
+ }, 8, ["name"])
2506
+ ]))
2507
+ ], 544);
2508
+ }
2509
+ const ho = /* @__PURE__ */ L(mo, [["render", bo]]), yo = I({
2510
+ name: "TabGroup",
2511
+ props: {
2512
+ modelValue: {
2513
+ type: [String, Number]
2514
+ },
2515
+ size: {
2516
+ type: String,
2517
+ default: "md"
2518
+ },
2519
+ vertical: {
2520
+ type: Boolean,
2521
+ default: !1
2522
+ }
2523
+ },
2524
+ emit: [
2525
+ "update:modelValue"
2526
+ ],
2527
+ setup(e, { emit: t }) {
2528
+ const n = $(), r = $(), a = $(), o = $();
2529
+ ct(() => {
2530
+ o.value = e.modelValue;
2531
+ });
2532
+ const l = Ke({
2533
+ active: b(() => o.value)
2534
+ }), s = b(() => ({
2535
+ "m-tab-group": !0,
2536
+ "m-tab-group--vertical": e.vertical,
2537
+ [`m-tab-group--${e.size}`]: !0
2538
+ })), i = b(() => ({
2539
+ "m-tab-group__tabs": !0
2540
+ }));
2541
+ function c(u) {
2542
+ o.value = u, t("update:modelValue", u);
2543
+ }
2544
+ return fe("tabs", {
2545
+ tabsContentRef: r,
2546
+ selectTab: c,
2547
+ state: l
2548
+ }), {
2549
+ wrapperRef: n,
2550
+ tabsContentRef: r,
2551
+ contentRef: a,
2552
+ computedWrapperClasses: s,
2553
+ computedTabsClasses: i
2554
+ };
2555
+ }
2556
+ }), go = { ref: "wrapperRef" }, wo = {
2557
+ ref: "tabsContentRef",
2558
+ class: "m-tab-group__content"
2559
+ };
2560
+ function $o(e, t, n, r, a, o) {
2561
+ return y(), _("div", {
2562
+ class: D(e.computedWrapperClasses)
2563
+ }, [
2564
+ V("div", go, [
2565
+ V("ul", {
2566
+ ref: "tabsRef",
2567
+ class: D(e.computedTabsClasses)
2568
+ }, [
2569
+ B(e.$slots, "default")
2570
+ ], 2)
2571
+ ], 512),
2572
+ V("div", wo, null, 512)
2573
+ ], 2);
2574
+ }
2575
+ const Oo = /* @__PURE__ */ L(yo, [["render", $o]]), _o = I({
2576
+ name: "Tab",
2577
+ props: {
2578
+ value: {
2579
+ type: [String, Number]
2580
+ },
2581
+ label: {
2582
+ type: String
2583
+ },
2584
+ disabled: {
2585
+ type: Boolean,
2586
+ default: !1
2587
+ }
2588
+ },
2589
+ setup(e, { emit: t }) {
2590
+ const n = b(() => e.value), r = b(() => e.label || e.value), a = $(null), o = $(null), l = le("tabs", {
2591
+ tabsContentRef: $(null),
2592
+ selectTab: (p) => {
2593
+ },
2594
+ state: Ke({
2595
+ active: ""
2596
+ })
2597
+ }), s = b(() => ({
2598
+ "m-tab": !0,
2599
+ "m-tab--active": c.value,
2600
+ "m-tab--disabled": e.disabled
2601
+ })), i = b(() => ({
2602
+ "m-tabs__button": !0
2603
+ })), c = b(() => l.state.active === n.value);
2604
+ function u() {
2605
+ l.selectTab(n.value);
2606
+ }
2607
+ return pe(() => {
2608
+ o.value = l.tabsContentRef.value;
2609
+ }), {
2610
+ computedValue: n,
2611
+ computedLabel: r,
2612
+ tabRef: a,
2613
+ computedTabWrapperClasses: s,
2614
+ computedTabClasses: i,
2615
+ handleClick: u,
2616
+ selected: c,
2617
+ teleportTo: o
2618
+ };
2619
+ }
2620
+ }), So = ["data-value"], Co = ["disabled"];
2621
+ function ko(e, t, n, r, a, o) {
2622
+ return y(), _("li", {
2623
+ "data-value": e.computedValue,
2624
+ class: D(e.computedTabWrapperClasses)
2625
+ }, [
2626
+ V("button", {
2627
+ role: "button",
2628
+ type: "button",
2629
+ ref: "tabRef",
2630
+ class: D(e.computedTabClasses),
2631
+ onClick: t[0] || (t[0] = ut((...l) => e.handleClick && e.handleClick(...l), ["prevent"])),
2632
+ disabled: e.disabled
2633
+ }, [
2634
+ B(e.$slots, "tab", {
2635
+ label: e.label,
2636
+ value: e.value
2637
+ }, () => [
2638
+ Oe(H(e.computedLabel), 1)
2639
+ ]),
2640
+ e.selected && e.teleportTo ? (y(), K(Qe, {
2641
+ key: 0,
2642
+ to: e.teleportTo
2643
+ }, [
2644
+ B(e.$slots, "default")
2645
+ ], 8, ["to"])) : q("", !0)
2646
+ ], 10, Co)
2647
+ ], 10, So);
2648
+ }
2649
+ const Eo = /* @__PURE__ */ L(_o, [["render", ko]]), To = I({
2650
+ name: "TableHeadRow"
2651
+ });
2652
+ function Mo(e, t, n, r, a, o) {
2653
+ return y(), _("thead", null, [
2654
+ V("tr", null, [
2655
+ B(e.$slots, "default")
2656
+ ])
2657
+ ]);
2658
+ }
2659
+ const cn = /* @__PURE__ */ L(To, [["render", Mo]]), Ao = I({
2660
+ name: "TableHead",
2661
+ props: {
2662
+ sort: {
2663
+ type: Number
2664
+ },
2665
+ sortable: {
2666
+ type: Boolean,
2667
+ default: !1
2668
+ }
2669
+ }
2670
+ });
2671
+ function Bo(e, t, n, r, a, o) {
2672
+ return y(), _("th", null, [
2673
+ B(e.$slots, "default")
2674
+ ]);
2675
+ }
2676
+ const dn = /* @__PURE__ */ L(Ao, [["render", Bo]]), Po = I({
2677
+ name: "TableBody"
2678
+ });
2679
+ function Ro(e, t, n, r, a, o) {
2680
+ return y(), _("tbody", null, [
2681
+ B(e.$slots, "default")
2682
+ ]);
2683
+ }
2684
+ const fn = /* @__PURE__ */ L(Po, [["render", Ro]]), Do = I({
2685
+ name: "TableRow"
2686
+ });
2687
+ function Io(e, t, n, r, a, o) {
2688
+ return y(), _("tr", null, [
2689
+ B(e.$slots, "default")
2690
+ ]);
2691
+ }
2692
+ const pn = /* @__PURE__ */ L(Do, [["render", Io]]), Lo = I({
2693
+ name: "TableCell"
2694
+ });
2695
+ function No(e, t, n, r, a, o) {
2696
+ return y(), _("td", null, [
2697
+ B(e.$slots, "default")
2698
+ ]);
2699
+ }
2700
+ const mn = /* @__PURE__ */ L(Lo, [["render", No]]), Vo = I({
2701
+ name: "Table",
2702
+ components: {
2703
+ TableHeadRow: cn,
2704
+ TableHead: dn,
2705
+ TableBody: fn,
2706
+ TableRow: pn,
2707
+ TableCell: mn
2708
+ },
2709
+ emits: [
2710
+ "update:sort"
2711
+ ],
2712
+ props: {
2713
+ headers: {
2714
+ type: Array,
2715
+ default: () => []
2716
+ },
2717
+ items: {
2718
+ type: Array,
2719
+ default: () => []
2720
+ },
2721
+ loading: {
2722
+ type: Boolean,
2723
+ default: !1
2724
+ },
2725
+ striped: {
2726
+ type: Boolean,
2727
+ default: !1
2728
+ },
2729
+ hover: {
2730
+ type: Boolean,
2731
+ default: !1
2732
+ }
2733
+ },
2734
+ setup(e) {
2735
+ const t = b(() => [
2736
+ "m-table__wrapper",
2737
+ {
2738
+ "m-table__wrapper--loading": e.loading
2739
+ }
2740
+ ]), n = b(() => [
2741
+ "m-table",
2742
+ {
2743
+ "m-table--loading": e.loading,
2744
+ "m-table--striped": e.striped,
2745
+ "m-table--hover": e.hover
2746
+ }
2747
+ ]);
2748
+ return {
2749
+ wrapperComputedClasses: t,
2750
+ tableComputedClasses: n
2751
+ };
2752
+ }
2753
+ });
2754
+ function jo(e, t, n, r, a, o) {
2755
+ const l = de("TableHead"), s = de("TableHeadRow"), i = de("TableCell"), c = de("TableRow"), u = de("TableBody");
2756
+ return y(), _("div", {
2757
+ class: D(e.wrapperComputedClasses)
2758
+ }, [
2759
+ V("table", {
2760
+ class: D(e.tableComputedClasses)
2761
+ }, [
2762
+ _e(s, null, {
2763
+ default: Y(() => [
2764
+ (y(!0), _(ge, null, Ie(e.headers, (p, h) => (y(), K(l, {
2765
+ key: h,
2766
+ width: p.width
2767
+ }, {
2768
+ default: Y(() => [
2769
+ Oe(H(p.name), 1)
2770
+ ]),
2771
+ _: 2
2772
+ }, 1032, ["width"]))), 128))
2773
+ ]),
2774
+ _: 1
2775
+ }),
2776
+ _e(u, null, {
2777
+ default: Y(() => [
2778
+ (y(!0), _(ge, null, Ie(e.items, (p, h) => (y(), K(c, { key: h }, {
2779
+ default: Y(() => [
2780
+ (y(!0), _(ge, null, Ie(e.headers, (d, f) => (y(), K(i, { key: f }, {
2781
+ default: Y(() => [
2782
+ B(e.$slots, d.key, { item: p }, () => [
2783
+ Oe(H(
2784
+ //@ts-ignore
2785
+ p[d.key]
2786
+ ), 1)
2787
+ ])
2788
+ ]),
2789
+ _: 2
2790
+ }, 1024))), 128))
2791
+ ]),
2792
+ _: 2
2793
+ }, 1024))), 128))
2794
+ ]),
2795
+ _: 3
2796
+ })
2797
+ ], 2)
2798
+ ], 2);
2799
+ }
2800
+ const Wo = /* @__PURE__ */ L(Vo, [["render", jo]]), zo = I({
2801
+ name: "DropdownWrapper",
2802
+ setup() {
2803
+ const e = le("dropdown", null);
2804
+ fe("dropdown-select", e == null ? void 0 : e.handleSelect);
2805
+ }
2806
+ });
2807
+ function xo(e, t, n, r, a, o) {
2808
+ return B(e.$slots, "default");
2809
+ }
2810
+ const vn = /* @__PURE__ */ L(zo, [["render", xo]]);
2811
+ function bn(e, t) {
2812
+ const n = $(e.value);
2813
+ function r(a) {
2814
+ var o;
2815
+ t.value ? n.value = a ?? ((o = t.value.textContent) == null ? void 0 : o.trim()) ?? null : n.value = a;
2816
+ }
2817
+ return W(e, (a) => {
2818
+ r(a);
2819
+ }), pe(() => {
2820
+ Ee(() => {
2821
+ r(e.value);
2822
+ });
2823
+ }), n;
2824
+ }
2825
+ const Ho = I({
2826
+ name: "Dropdown",
2827
+ components: {
2828
+ DropdownWrapper: vn
2829
+ },
2830
+ props: {
2831
+ open: {
2832
+ type: Boolean,
2833
+ default: !1
2834
+ },
2835
+ placement: {
2836
+ type: String,
2837
+ default: "bottom-start"
2838
+ },
2839
+ transfer: {
2840
+ type: Boolean,
2841
+ default: !1
2842
+ },
2843
+ trigger: {
2844
+ type: String,
2845
+ default: "click"
2846
+ },
2847
+ virtual: {
2848
+ type: [Object],
2849
+ default: null
2850
+ },
2851
+ x: {
2852
+ type: Number,
2853
+ default: 0
2854
+ },
2855
+ y: {
2856
+ type: Number,
2857
+ default: 0
2858
+ },
2859
+ label: {
2860
+ default: null,
2861
+ static: !0
2862
+ },
2863
+ transitionName: {
2864
+ type: String,
2865
+ default: "fade"
2866
+ },
2867
+ onSelect: {
2868
+ type: Function,
2869
+ default: () => {
2870
+ }
2871
+ }
2872
+ },
2873
+ emits: [
2874
+ "update:open"
2875
+ ],
2876
+ setup(e, { emit: t }) {
2877
+ const n = le("dropdown", null), r = !!n, a = $e(e, "label"), o = $(e.open), l = $(e.placement), s = $e(e, "transfer"), i = $(null), c = $(null), u = b(() => {
2878
+ if (e.virtual !== null) {
2879
+ const v = e.virtual.$el ?? e.virtual;
2880
+ if (v) {
2881
+ if ("getBoundingClientRect" in v)
2882
+ return v;
2883
+ if ("x" in v && "y" in v)
2884
+ return {
2885
+ getBoundingClientRect: () => ({
2886
+ x: v.x,
2887
+ y: v.y,
2888
+ left: v.x,
2889
+ top: v.y,
2890
+ width: 0,
2891
+ height: 0
2892
+ })
2893
+ };
2894
+ }
2895
+ }
2896
+ return c.value;
2897
+ }), { popper: p, transferTo: h, updatePopper: d } = wt({
2898
+ reference: u,
2899
+ placement: l,
2900
+ transfer: s,
2901
+ wrapper: i,
2902
+ isDrop: !0,
2903
+ offset: r ? [-2, 2] : void 0
2904
+ }), f = bn(a, c);
2905
+ fe("dropdown-select", null), fe("dropdown", {
2906
+ handleSelect: g,
2907
+ isOpen: o
2908
+ }), W(() => e.open, (v) => {
2909
+ o.value = v;
2910
+ }), W(() => e.placement, (v) => {
2911
+ m(v);
2912
+ }), W(o, (v) => {
2913
+ v && d(), t("update:open", v);
2914
+ }), pe(() => {
2915
+ Ee(() => {
2916
+ m(e.placement);
2917
+ });
2918
+ }), ye("resize", () => {
2919
+ d();
2920
+ }), sn(i, (v) => {
2921
+ let O = v.target, M = 0;
2922
+ for (; O; ) {
2923
+ if (O.classList.contains("m-dropdown-menu"))
2924
+ return;
2925
+ if (O = O.parentElement, M > 10)
2926
+ break;
2927
+ M++;
2928
+ }
2929
+ o.value = !1;
2930
+ });
2931
+ function m(v) {
2932
+ const [O] = v.split("-");
2933
+ r && O !== "right" && O !== "left" ? l.value = "right-start" : l.value = v;
2934
+ }
2935
+ function w() {
2936
+ o.value = !o.value;
2937
+ }
2938
+ function g(v) {
2939
+ o.value = !1, e.onSelect(v), typeof (n == null ? void 0 : n.handleSelect) == "function" && n.handleSelect([f.value, ...v]);
2940
+ }
2941
+ const k = b(() => [
2942
+ "m-dropdown",
2943
+ {
2944
+ "m-dropdown--open": o.value,
2945
+ "m-dropdown--nested": r
2946
+ }
2947
+ ]), T = b(() => {
2948
+ }), C = b(() => `m-transition__${e.transitionName}`);
2949
+ return {
2950
+ wrapper: i,
2951
+ referenceRef: c,
2952
+ popper: p,
2953
+ transferTo: h,
2954
+ isOpen: o,
2955
+ isNested: r,
2956
+ placement: l,
2957
+ computedWrapperClasses: k,
2958
+ computedReferenceClasses: T,
2959
+ transitionName: C,
2960
+ toggleDropdown: w
2961
+ };
2962
+ }
2963
+ });
2964
+ function Fo(e, t, n, r, a, o) {
2965
+ const l = de("DropdownWrapper");
2966
+ return y(), _("div", {
2967
+ ref: "wrapper",
2968
+ class: D(e.computedWrapperClasses)
2969
+ }, [
2970
+ V("div", {
2971
+ ref: "referenceRef",
2972
+ class: D(e.computedReferenceClasses),
2973
+ onClick: t[0] || (t[0] = (...s) => e.toggleDropdown && e.toggleDropdown(...s))
2974
+ }, [
2975
+ B(e.$slots, "default")
2976
+ ], 2),
2977
+ _e(l, null, {
2978
+ default: Y(() => [
2979
+ (y(), K(Qe, {
2980
+ disabled: e.isNested,
2981
+ to: "body"
2982
+ }, [
2983
+ _e(dt, { name: e.transitionName }, {
2984
+ default: Y(() => [
2985
+ pt(V("div", {
2986
+ ref: "popper",
2987
+ class: D([
2988
+ "m-dropdown-menu",
2989
+ `m-dropdown-menu--${e.placement}`
2990
+ ])
2991
+ }, [
2992
+ B(e.$slots, "menu")
2993
+ ], 2), [
2994
+ [Yt, e.isOpen]
2995
+ ])
2996
+ ]),
2997
+ _: 3
2998
+ }, 8, ["name"])
2999
+ ], 8, ["disabled"]))
3000
+ ]),
3001
+ _: 3
3002
+ })
3003
+ ], 2);
3004
+ }
3005
+ const qo = /* @__PURE__ */ L(Ho, [["render", Fo]]), Go = I({
3006
+ name: "DropdownList",
3007
+ setup() {
3008
+ return {};
3009
+ }
3010
+ });
3011
+ function Uo(e, t, n, r, a, o) {
3012
+ return y(), _("ul", null, [
3013
+ B(e.$slots, "default")
3014
+ ]);
3015
+ }
3016
+ const Xo = /* @__PURE__ */ L(Go, [["render", Uo]]), Yo = I({
3017
+ name: "DropdownItem",
3018
+ props: {
3019
+ label: {
3020
+ type: [String, Number],
3021
+ default: null
3022
+ },
3023
+ disabled: {
3024
+ type: Boolean,
3025
+ default: !1
3026
+ },
3027
+ reference: {
3028
+ type: Boolean,
3029
+ default: !1
3030
+ },
3031
+ onSelect: {
3032
+ type: Function,
3033
+ default: () => {
3034
+ }
3035
+ },
3036
+ hotkey: {
3037
+ type: String,
3038
+ default: null
3039
+ }
3040
+ },
3041
+ emits: [],
3042
+ setup(e, { slots: t }) {
3043
+ const n = le("dropdown-select", null);
3044
+ le("dropdown", null);
3045
+ const r = b(() => !!t["icon-left"]), a = b(() => !!t["icon-right"]), o = $(null), l = $e(e, "label"), s = $(e.reference), i = bn(l, o);
3046
+ function c() {
3047
+ e.disabled || s.value || (typeof n == "function" && n([i.value]), e.onSelect(i.value));
3048
+ }
3049
+ const u = b(() => ({
3050
+ "m-dropdown-item": !0,
3051
+ "m-dropdown-item--disabled": e.disabled,
3052
+ "m-dropdown-item--reference": e.reference
3053
+ }));
3054
+ return {
3055
+ wrapper: o,
3056
+ hasIconLeft: r,
3057
+ hasIconRight: a,
3058
+ handleSelect: c,
3059
+ computedWrapperClasses: u
3060
+ };
3061
+ }
3062
+ }), Qo = {
3063
+ key: 0,
3064
+ class: "m-dropdown__icon-left"
3065
+ }, Ko = { class: "m-dropdown__text" }, Jo = {
3066
+ key: 1,
3067
+ class: "m-dropdown__icon-right"
3068
+ };
3069
+ function Zo(e, t, n, r, a, o) {
3070
+ return y(), _("li", {
3071
+ ref: "wrapper",
3072
+ class: D(e.computedWrapperClasses),
3073
+ role: "menuitem",
3074
+ tabindex: "0",
3075
+ onClick: t[0] || (t[0] = (...l) => e.handleSelect && e.handleSelect(...l))
3076
+ }, [
3077
+ e.hasIconLeft ? (y(), _("div", Qo, [
3078
+ B(e.$slots, "icon-left")
3079
+ ])) : q("", !0),
3080
+ V("div", Ko, [
3081
+ B(e.$slots, "default")
3082
+ ]),
3083
+ e.hasIconRight ? (y(), _("div", Jo, [
3084
+ B(e.$slots, "icon-right")
3085
+ ])) : q("", !0)
3086
+ ], 2);
3087
+ }
3088
+ const es = /* @__PURE__ */ L(Yo, [["render", Zo]]), qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3089
+ __proto__: null,
3090
+ MAvatar: no,
3091
+ MAvatarGroup: so,
3092
+ MBreadcrumb: qa,
3093
+ MBreadcrumbItem: ln,
3094
+ MButton: Dn,
3095
+ MButtonGroup: Nn,
3096
+ MCheckbox: xa,
3097
+ MDropdown: qo,
3098
+ MDropdownItem: es,
3099
+ MDropdownList: Xo,
3100
+ MDropdownWrapper: vn,
3101
+ MForm: xn,
3102
+ MImage: un,
3103
+ MInput: er,
3104
+ MLink: po,
3105
+ MSelect: Ia,
3106
+ MSkeleton: uo,
3107
+ MTab: Eo,
3108
+ MTabGroup: Oo,
3109
+ MTable: Wo,
3110
+ MTableBody: fn,
3111
+ MTableCell: mn,
3112
+ MTableHead: dn,
3113
+ MTableHeadRow: cn,
3114
+ MTableRow: pn,
3115
+ MTooltip: ho
3116
+ }, Symbol.toStringTag, { value: "Module" })), ts = {
3117
+ prefix: "M"
3118
+ }, ns = (e = {}) => ({
3119
+ install: (n, r = {}) => {
3120
+ const a = {
3121
+ ...ts,
3122
+ ...e,
3123
+ ...r
3124
+ };
3125
+ a.components && a.components.forEach((o) => {
3126
+ const l = o.name.startsWith("M") ? o.name.slice(1) : o.name;
3127
+ n.component(`${a.prefix}${l}`, o);
3128
+ });
3129
+ }
3130
+ }), as = ns({
3131
+ components: Object.keys(qt).map(
3132
+ (e) => qt[e]
3133
+ )
3134
+ });
3135
+ export {
3136
+ no as MAvatar,
3137
+ so as MAvatarGroup,
3138
+ qa as MBreadcrumb,
3139
+ ln as MBreadcrumbItem,
3140
+ Dn as MButton,
3141
+ Nn as MButtonGroup,
3142
+ xa as MCheckbox,
3143
+ qo as MDropdown,
3144
+ es as MDropdownItem,
3145
+ Xo as MDropdownList,
3146
+ vn as MDropdownWrapper,
3147
+ xn as MForm,
3148
+ un as MImage,
3149
+ er as MInput,
3150
+ po as MLink,
3151
+ Ia as MSelect,
3152
+ uo as MSkeleton,
3153
+ Eo as MTab,
3154
+ Oo as MTabGroup,
3155
+ Wo as MTable,
3156
+ fn as MTableBody,
3157
+ mn as MTableCell,
3158
+ dn as MTableHead,
3159
+ cn as MTableHeadRow,
3160
+ pn as MTableRow,
3161
+ ho as MTooltip,
3162
+ ns as createUI,
3163
+ as as default
3164
+ };