@wirecore/wirelayer-vue 0.6.0 → 0.8.0

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 (158) hide show
  1. package/dist/{Checkbox-D9f77jtl.js → Checkbox-DS2qfQK1.js} +28 -30
  2. package/dist/ContextMenu-B6agwyf_.js +2311 -0
  3. package/dist/{Field-B1EsNF84.js → Field-Cqe2BG_x.js} +1 -1
  4. package/dist/{Highlight-Cg8DvCfq.js → Highlight-uwptdaUw.js} +35 -32
  5. package/dist/Input-C5dyvZfJ.js +183 -0
  6. package/dist/{InputStatus-D7kBGlew.js → InputStatus-Cgarj-yu.js} +16 -3
  7. package/dist/{Select-DAuYpE1c.js → Select-CeZbSy6K.js} +137 -112
  8. package/dist/Slider-Cpv7Vj3B.js +143 -0
  9. package/dist/Tree-DgHt0P5P.js +807 -0
  10. package/dist/chart.js +1 -1
  11. package/dist/components/Alert/Alert.vue.d.ts +5 -3
  12. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  13. package/dist/components/AngleSlider/AngleSlider.vue.d.ts +2 -0
  14. package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.vue.d.ts +2 -0
  16. package/dist/components/Autocomplete/Autocomplete.vue.d.ts.map +1 -1
  17. package/dist/components/Carousel/Carousel.vue.d.ts +2 -0
  18. package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
  19. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -0
  20. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
  21. package/dist/components/Checkbox/Checkbox.vue.d.ts +28 -23
  22. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  23. package/dist/components/ColorInput/ColorInput.vue.d.ts.map +1 -1
  24. package/dist/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
  25. package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
  26. package/dist/components/Combobox/Combobox.vue.d.ts +11 -1
  27. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  28. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
  29. package/dist/components/Confirm/ConfirmDialog.vue.d.ts +5 -0
  30. package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
  31. package/dist/components/Confirm/confirm.d.ts +7 -0
  32. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  33. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +17 -1
  34. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  35. package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -0
  36. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  37. package/dist/components/DatePicker/DatePickerBase.vue.d.ts +2 -0
  38. package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
  39. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +2 -0
  40. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
  41. package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
  42. package/dist/components/Dialog/DialogContent.vue.d.ts +7 -0
  43. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  44. package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
  45. package/dist/components/Drawer/DrawerContent.vue.d.ts +2 -0
  46. package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
  47. package/dist/components/DurationInput/DurationInput.vue.d.ts +2 -0
  48. package/dist/components/DurationInput/DurationInput.vue.d.ts.map +1 -1
  49. package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
  50. package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
  51. package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
  52. package/dist/components/IconButton/IconButton.vue.d.ts +2 -0
  53. package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
  54. package/dist/components/Input/Input.vue.d.ts +3 -1
  55. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  56. package/dist/components/Knob/Knob.vue.d.ts +2 -0
  57. package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
  58. package/dist/components/Listbox/Listbox.vue.d.ts +2 -0
  59. package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
  60. package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
  61. package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
  62. package/dist/components/Menu/Menu.vue.d.ts +9 -1
  63. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  64. package/dist/components/Menu/state.d.ts +22 -0
  65. package/dist/components/Menu/state.d.ts.map +1 -1
  66. package/dist/components/MonthPicker/MonthPicker.vue.d.ts +2 -0
  67. package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
  68. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  69. package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
  70. package/dist/components/NativeSelect/NativeSelect.vue.d.ts +26 -17
  71. package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
  72. package/dist/components/NumberInput/NumberInput.vue.d.ts +3 -1
  73. package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
  74. package/dist/components/Panel/Panel.vue.d.ts +1 -1
  75. package/dist/components/PasswordInput/PasswordInput.vue.d.ts +11 -3
  76. package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
  77. package/dist/components/PinInput/PinInput.vue.d.ts +2 -0
  78. package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
  79. package/dist/components/Popover/Popover.vue.d.ts +1 -1
  80. package/dist/components/Progress/Progress.vue.d.ts +11 -0
  81. package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
  82. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +24 -25
  83. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  84. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
  85. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
  86. package/dist/components/RadioGroup/context.d.ts +4 -0
  87. package/dist/components/RadioGroup/context.d.ts.map +1 -0
  88. package/dist/components/Rating/Rating.vue.d.ts +2 -0
  89. package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
  90. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +23 -22
  91. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  92. package/dist/components/Select/Select.vue.d.ts +11 -1
  93. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  94. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts +2 -0
  95. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts.map +1 -1
  96. package/dist/components/Slider/Slider.vue.d.ts +2 -0
  97. package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
  98. package/dist/components/Switch/Switch.vue.d.ts +2 -0
  99. package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
  100. package/dist/components/TagsInput/TagsInput.vue.d.ts +2 -0
  101. package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
  102. package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
  103. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  104. package/dist/components/TimePicker/TimePicker.vue.d.ts +2 -0
  105. package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
  106. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -0
  107. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
  108. package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
  109. package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
  110. package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -0
  111. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  112. package/dist/components/YearPicker/YearPicker.vue.d.ts +2 -0
  113. package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
  114. package/dist/data-table/DataTable.vue.d.ts +9 -1
  115. package/dist/data-table/DataTable.vue.d.ts.map +1 -1
  116. package/dist/data-table.js +1007 -994
  117. package/dist/editor.js +1 -1
  118. package/dist/form/FormField.vue.d.ts +3 -0
  119. package/dist/form/FormField.vue.d.ts.map +1 -1
  120. package/dist/form.js +8 -5
  121. package/dist/index.d.ts +2 -1
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +5834 -5626
  124. package/dist/label-for-eQvYjsM5.js +8 -0
  125. package/dist/pdf.js +3 -3
  126. package/dist/sources/ActionBar.css +1 -0
  127. package/dist/sources/AppShell.css +1 -0
  128. package/dist/sources/ChatPrompt.css +1 -0
  129. package/dist/sources/Gallery.css +1 -0
  130. package/dist/sources/IconButton.css +1 -0
  131. package/dist/sources/Image.css +1 -0
  132. package/dist/sources/ImageCropper.css +1 -0
  133. package/dist/sources/InlineEdit.css +1 -0
  134. package/dist/sources/Marquee.css +1 -0
  135. package/dist/sources/MegaMenu.css +1 -0
  136. package/dist/sources/Menubar.css +1 -0
  137. package/dist/sources/OrderList.css +1 -0
  138. package/dist/sources/PickList.css +1 -0
  139. package/dist/sources/ScrollTop.css +1 -0
  140. package/dist/{useTree-H8XsFHMk.js → useTree-UhG1TMeM.js} +1 -1
  141. package/dist/utils/label-for.d.ts +3 -0
  142. package/dist/utils/label-for.d.ts.map +1 -0
  143. package/dist/utils/list.d.ts +5 -0
  144. package/dist/utils/list.d.ts.map +1 -1
  145. package/dist/utils/text-field.d.ts +16 -0
  146. package/dist/utils/text-field.d.ts.map +1 -0
  147. package/dist/virtual/VirtualSelect.vue.d.ts +2 -0
  148. package/dist/virtual/VirtualSelect.vue.d.ts.map +1 -1
  149. package/dist/virtual.js +207 -197
  150. package/fonts.css +2 -0
  151. package/llms-full.txt +254 -23
  152. package/llms.txt +9 -5
  153. package/package.json +7 -3
  154. package/theme.css +14 -0
  155. package/dist/ContextMenu-C5JKyNlX.js +0 -2209
  156. package/dist/Input-BhnYMKjE.js +0 -168
  157. package/dist/Slider-CyoZc5A8.js +0 -135
  158. package/dist/Tree-DWxqSrO6.js +0 -789
@@ -0,0 +1,2311 @@
1
+ import { a as e, i as t, n } from "./recipes-BlM9aKyt.js";
2
+ import { t as r } from "./attrs-KNjeRUCf.js";
3
+ import { i, n as a, t as o } from "./InputStatus-Cgarj-yu.js";
4
+ import { t as s } from "./Input-C5dyvZfJ.js";
5
+ import { t as c } from "./label-for-eQvYjsM5.js";
6
+ import { n as l, t as u } from "./Select-CeZbSy6K.js";
7
+ import { a as d, n as f, r as p } from "./Highlight-uwptdaUw.js";
8
+ import { Fragment as m, Teleport as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as x, createTextVNode as S, createVNode as C, defineComponent as w, guardReactiveProps as T, inject as E, mergeModels as D, mergeProps as O, nextTick as k, normalizeClass as A, normalizeProps as j, normalizeStyle as M, onBeforeUnmount as ee, onMounted as N, openBlock as P, provide as F, reactive as I, ref as L, renderList as R, renderSlot as z, resolveComponent as te, resolveDynamicComponent as B, shallowRef as V, toDisplayString as H, unref as U, useAttrs as ne, useId as re, useModel as ie, useTemplateRef as ae, vModelText as W, watch as G, withCtx as K, withDirectives as q, withKeys as J } from "vue";
9
+ import { CalendarDays as oe, Check as se, ChevronDown as ce, ChevronLeft as le, ChevronRight as ue, ChevronUp as de, ChevronsLeft as fe, ChevronsRight as pe, Circle as me, LoaderCircle as he, Minus as ge, Plus as _e, X as ve } from "@lucide/vue";
10
+ import { SUBMENU_GUTTER as ye, allListOptionsState as be, anchorBox as xe, closeMenuOnPageEvents as Se, controlIds as Ce, createLongPress as we, datePicker as Y, defaultNumberFormat as Te, filterMenuEntries as Ee, fromWallIso as De, highlightFirstMenuItem as Oe, insertIntoTextControl as ke, isoWeekday as Ae, linkTarget as je, localeWeekInfo as Me, menu as Ne, menuSearchKey as Pe, multiSelect as Fe, numberInput as Ie, numberInputKey as Le, pageForSize as Re, pagination as ze, parseLocaleNumber as Be, parsePastedDate as Ve, parsePastedRange as He, pluralText as Ue, rowWeekNumber as We, setTextControlValue as Ge, skeleton as Ke, textarea as qe, textareaParts as Je, timeSlots as Ye, timeZoneLabel as Xe, timeZoneLongLabel as Ze, toNumberInputValue as Qe, toOverlayAnchor as $e, toWallIso as et, todayIso as tt, toggleAllListOptions as nt, zonedToInstant as rt } from "@wirecore/wirelayer-recipes";
11
+ import { Menu as X } from "@ark-ui/vue/menu";
12
+ import { useFilter as it } from "@ark-ui/vue/locale";
13
+ import { Field as at, useFieldContext as ot } from "@ark-ui/vue/field";
14
+ import { Pagination as Z, usePagination as st } from "@ark-ui/vue/pagination";
15
+ import { createListCollection as ct } from "@ark-ui/vue/collection";
16
+ import { Select as Q } from "@ark-ui/vue/select";
17
+ import { DateInput as lt } from "@ark-ui/vue/date-input";
18
+ import { DatePicker as $, useDatePickerContext as ut } from "@ark-ui/vue/date-picker";
19
+ import { CalendarDateTime as dt, DateFormatter as ft, Time as pt, parseDate as mt, parseDateTime as ht, toCalendarDateTime as gt } from "@internationalized/date";
20
+ import { NumberInput as _t, useNumberInput as vt } from "@ark-ui/vue/number-input";
21
+ //#region src/components/Menu/state.ts
22
+ var yt = Symbol("wirecore-menu-state");
23
+ function bt(e) {
24
+ let t = I({
25
+ checked: {},
26
+ radio: {}
27
+ });
28
+ G(e.items, () => {
29
+ t.checked = {}, t.radio = {};
30
+ });
31
+ let n = {
32
+ checked: (e) => t.checked[e.value] ?? e.checked ?? !1,
33
+ setChecked: (n, r) => {
34
+ t.checked[n.value] = r, e.onCheckedChange(n.value, r);
35
+ },
36
+ radio: (e) => t.radio[e.name] ?? e.value,
37
+ setRadio: (n, r) => {
38
+ t.radio[n.name] = r, e.onValueChange(n.name, r);
39
+ },
40
+ linkAs: () => e.linkAs() ?? "a"
41
+ };
42
+ return F(yt, n), n;
43
+ }
44
+ var xt = () => E(yt, null);
45
+ function St(e) {
46
+ G([
47
+ e.open,
48
+ e.closeOnScroll,
49
+ e.closeOnResize,
50
+ e.closeOnBlur
51
+ ], ([t, n, r, i], a, o) => {
52
+ t && (n || r || i) && typeof window < "u" && o(Se(e.close, {
53
+ scroll: n,
54
+ resize: r,
55
+ blur: i
56
+ }));
57
+ }, { immediate: !0 });
58
+ let t = L(null);
59
+ return G(e.open, async (n) => {
60
+ t.value = null, n && e.highlightFirst() && (await k(), requestAnimationFrame(() => {
61
+ let n = e.content();
62
+ n && t.value === null && Oe(n, { setHighlightedValue: (e) => t.value = e });
63
+ }));
64
+ }), g(() => e.highlightFirst() ? {
65
+ highlightedValue: t.value,
66
+ onHighlightChange: (e) => t.value = e.highlightedValue
67
+ } : {});
68
+ }
69
+ //#endregion
70
+ //#region src/components/Menu/MenuEntries.vue
71
+ var Ct = /* @__PURE__ */ w({
72
+ name: "MenuEntries",
73
+ __name: "MenuEntries",
74
+ props: { entries: {} },
75
+ emits: ["select"],
76
+ setup(e, { emit: t }) {
77
+ let r = n("menu", Ne), i = t, a = r(), o = {
78
+ placement: "right-start",
79
+ offset: { mainAxis: ye }
80
+ }, s = xt(), c = (e, t) => !("type" in e) || e.type === "checkbox" ? e.value : e.type === "radio" ? `radio-${e.name}` : `${e.type}-${t}`;
81
+ return (t, n) => {
82
+ let l = te("MenuEntries", !0);
83
+ return P(!0), y(m, null, R(e.entries, (e, u) => (P(), y(m, { key: c(e, u) }, ["type" in e && e.type === "separator" ? (P(), _(U(X).Separator, {
84
+ key: 0,
85
+ class: A(U(a).separator())
86
+ }, null, 8, ["class"])) : "type" in e && e.type === "group" ? (P(), _(U(X).ItemGroup, { key: 1 }, {
87
+ default: K(() => [C(U(X).ItemGroupLabel, { class: A(U(a).groupLabel()) }, {
88
+ default: K(() => [S(H(e.label), 1)]),
89
+ _: 2
90
+ }, 1032, ["class"]), C(l, {
91
+ entries: e.items,
92
+ onSelect: n[0] ||= (e) => i("select", e)
93
+ }, x({ _: 2 }, [t.$slots.item ? {
94
+ name: "item",
95
+ fn: K((e) => [z(t.$slots, "item", O({ ref_for: !0 }, e))]),
96
+ key: "0"
97
+ } : void 0]), 1032, ["entries"])]),
98
+ _: 2
99
+ }, 1024)) : "type" in e && e.type === "radio" ? (P(), _(U(X).RadioItemGroup, {
100
+ key: 2,
101
+ "model-value": U(s)?.radio(e),
102
+ "onUpdate:modelValue": (t) => U(s)?.setRadio(e, t)
103
+ }, {
104
+ default: K(() => [e.label ? (P(), _(U(X).ItemGroupLabel, {
105
+ key: 0,
106
+ class: A(U(a).groupLabel())
107
+ }, {
108
+ default: K(() => [S(H(e.label), 1)]),
109
+ _: 2
110
+ }, 1032, ["class"])) : v("", !0), (P(!0), y(m, null, R(e.items, (e) => (P(), _(U(X).RadioItem, {
111
+ key: e.value,
112
+ value: e.value,
113
+ disabled: e.disabled,
114
+ "close-on-select": e.closeOnSelect ?? !1,
115
+ class: A(U(a).item())
116
+ }, {
117
+ default: K(() => [b("span", { class: A(U(a).indicator()) }, [C(U(X).ItemIndicator, null, {
118
+ default: K(() => [C(U(me), {
119
+ class: A(U(a).indicatorDot()),
120
+ "aria-hidden": "true"
121
+ }, null, 8, ["class"])]),
122
+ _: 1
123
+ })], 2), z(t.$slots, "item", { item: e }, () => [e.icon ? (P(), _(B(e.icon), {
124
+ key: 0,
125
+ class: A(U(a).icon()),
126
+ "aria-hidden": "true"
127
+ }, null, 8, ["class"])) : v("", !0), b("span", { class: A(U(a).label()) }, H(e.label), 3)])]),
128
+ _: 2
129
+ }, 1032, [
130
+ "value",
131
+ "disabled",
132
+ "close-on-select",
133
+ "class"
134
+ ]))), 128))]),
135
+ _: 2
136
+ }, 1032, ["model-value", "onUpdate:modelValue"])) : "type" in e && e.type === "checkbox" ? (P(), _(U(X).CheckboxItem, {
137
+ key: 3,
138
+ value: e.value,
139
+ checked: U(s)?.checked(e) ?? !!e.checked,
140
+ disabled: e.disabled,
141
+ "close-on-select": e.closeOnSelect ?? !1,
142
+ class: A(U(a).item()),
143
+ "onUpdate:checked": (t) => U(s)?.setChecked(e, t)
144
+ }, {
145
+ default: K(() => [b("span", { class: A(U(a).indicator()) }, [C(U(X).ItemIndicator, null, {
146
+ default: K(() => [C(U(se), {
147
+ class: A(U(a).indicatorIcon()),
148
+ "aria-hidden": "true"
149
+ }, null, 8, ["class"])]),
150
+ _: 1
151
+ })], 2), z(t.$slots, "item", { item: e }, () => [e.icon ? (P(), _(B(e.icon), {
152
+ key: 0,
153
+ class: A(U(a).icon()),
154
+ "aria-hidden": "true"
155
+ }, null, 8, ["class"])) : v("", !0), b("span", { class: A(U(a).label()) }, H(e.label), 3)])]),
156
+ _: 2
157
+ }, 1032, [
158
+ "value",
159
+ "checked",
160
+ "disabled",
161
+ "close-on-select",
162
+ "class",
163
+ "onUpdate:checked"
164
+ ])) : !("type" in e) && e.children ? (P(), _(U(X).Root, {
165
+ key: 4,
166
+ positioning: o,
167
+ onSelect: n[2] ||= (e) => i("select", e.value)
168
+ }, {
169
+ default: K(() => [C(U(X).TriggerItem, { class: A(U(a).item()) }, {
170
+ default: K(() => [
171
+ e.icon ? (P(), _(B(e.icon), {
172
+ key: 0,
173
+ class: A(U(a).icon()),
174
+ "aria-hidden": "true"
175
+ }, null, 8, ["class"])) : v("", !0),
176
+ b("span", { class: A(U(a).label()) }, H(e.label), 3),
177
+ C(U(ue), {
178
+ class: A(U(a).submenuIcon()),
179
+ "aria-hidden": "true"
180
+ }, null, 8, ["class"])
181
+ ]),
182
+ _: 2
183
+ }, 1032, ["class"]), (P(), _(h, { to: "body" }, [C(U(X).Positioner, null, {
184
+ default: K(() => [C(U(X).Content, { class: A(U(a).content()) }, {
185
+ default: K(() => [C(l, {
186
+ entries: e.children,
187
+ onSelect: n[1] ||= (e) => i("select", e)
188
+ }, x({ _: 2 }, [t.$slots.item ? {
189
+ name: "item",
190
+ fn: K((e) => [z(t.$slots, "item", O({ ref_for: !0 }, e))]),
191
+ key: "0"
192
+ } : void 0]), 1032, ["entries"])]),
193
+ _: 2
194
+ }, 1032, ["class"])]),
195
+ _: 2
196
+ }, 1024)]))]),
197
+ _: 2
198
+ }, 1024)) : !("type" in e) && (e.href || e.to) ? (P(), _(U(X).Item, {
199
+ key: 5,
200
+ value: e.value,
201
+ disabled: e.disabled,
202
+ "close-on-select": e.closeOnSelect,
203
+ "as-child": ""
204
+ }, {
205
+ default: K(() => [(P(), _(B(U(s)?.linkAs() ?? "a"), O({ ref_for: !0 }, U(je)(e.href, e.to), { class: U(r)({ danger: e.danger }).item() }), {
206
+ default: K(() => [z(t.$slots, "item", { item: e }, () => [
207
+ e.icon ? (P(), _(B(e.icon), {
208
+ key: 0,
209
+ class: A(U(a).icon()),
210
+ "aria-hidden": "true"
211
+ }, null, 8, ["class"])) : v("", !0),
212
+ b("span", { class: A(U(a).label()) }, H(e.label), 3),
213
+ e.shortcut ? (P(), y("span", {
214
+ key: 1,
215
+ class: A(U(a).shortcut()),
216
+ "aria-hidden": "true"
217
+ }, H(e.shortcut), 3)) : v("", !0)
218
+ ])]),
219
+ _: 2
220
+ }, 1040, ["class"]))]),
221
+ _: 2
222
+ }, 1032, [
223
+ "value",
224
+ "disabled",
225
+ "close-on-select"
226
+ ])) : "type" in e ? v("", !0) : (P(), _(U(X).Item, {
227
+ key: 6,
228
+ value: e.value,
229
+ disabled: e.disabled,
230
+ "close-on-select": e.closeOnSelect,
231
+ class: A(U(r)({ danger: e.danger }).item())
232
+ }, {
233
+ default: K(() => [z(t.$slots, "item", { item: e }, () => [
234
+ e.icon ? (P(), _(B(e.icon), {
235
+ key: 0,
236
+ class: A(U(a).icon()),
237
+ "aria-hidden": "true"
238
+ }, null, 8, ["class"])) : v("", !0),
239
+ b("span", { class: A(U(a).label()) }, H(e.label), 3),
240
+ e.shortcut ? (P(), y("span", {
241
+ key: 1,
242
+ class: A(U(a).shortcut()),
243
+ "aria-hidden": "true"
244
+ }, H(e.shortcut), 3)) : v("", !0)
245
+ ])]),
246
+ _: 2
247
+ }, 1032, [
248
+ "value",
249
+ "disabled",
250
+ "close-on-select",
251
+ "class"
252
+ ]))], 64))), 128);
253
+ };
254
+ }
255
+ });
256
+ //#endregion
257
+ //#region src/overlay.ts
258
+ function wt(e) {
259
+ let t = L(e.defaultOpen?.() ?? !1), n = V(null), r = null, i = g(() => e.open() ?? t.value), a = g(() => n.value ?? e.anchor() ?? null);
260
+ G(i, (t) => {
261
+ if (typeof document < "u") {
262
+ if (t) r = document.activeElement;
263
+ else if (e.restoreFocus) {
264
+ let e = r, t = () => {
265
+ if (i.value) return;
266
+ let t = document.activeElement;
267
+ (!t || t === document.body || !t.isConnected || t.closest("[data-scope=menu]")) && e?.focus();
268
+ };
269
+ requestAnimationFrame(() => {
270
+ t(), setTimeout(t, 50);
271
+ });
272
+ }
273
+ }
274
+ });
275
+ let o = (n) => {
276
+ t.value = n, e.onOpenChange(n);
277
+ }, s = (e) => {
278
+ e && (n.value = null), o(e);
279
+ }, c = {
280
+ open(e) {
281
+ n.value = $e(e), o(!0);
282
+ },
283
+ close: () => o(!1),
284
+ toggle(e) {
285
+ i.value ? c.close() : c.open(e);
286
+ }
287
+ };
288
+ return {
289
+ isOpen: i,
290
+ anchor: a,
291
+ anchorPoint: g(() => a.value && !("getBoundingClientRect" in a.value) ? a.value : void 0),
292
+ onOpenChange: s,
293
+ handle: c,
294
+ positioning: (e) => {
295
+ let t = a.value;
296
+ return t ? "getBoundingClientRect" in t ? {
297
+ ...e,
298
+ getAnchorElement: () => t
299
+ } : {
300
+ ...e,
301
+ getAnchorRect: () => xe(t)
302
+ } : e;
303
+ },
304
+ finalFocusEl: () => a.value ? r : null
305
+ };
306
+ }
307
+ //#endregion
308
+ //#region src/components/Menu/Menu.vue?vue&type=script&setup=true&lang.ts
309
+ var Tt = ["aria-label"], Et = [
310
+ "placeholder",
311
+ "aria-label",
312
+ "aria-activedescendant",
313
+ "onKeydown",
314
+ "onInput"
315
+ ], Dt = { role: "status" }, Ot = /* @__PURE__ */ w({
316
+ __name: "Menu",
317
+ props: {
318
+ items: {},
319
+ open: {
320
+ type: Boolean,
321
+ default: void 0
322
+ },
323
+ defaultOpen: {
324
+ type: Boolean,
325
+ default: void 0
326
+ },
327
+ anchor: { default: void 0 },
328
+ searchable: { type: Boolean },
329
+ searchLabel: {},
330
+ placement: { default: "bottom-start" },
331
+ arrow: { type: Boolean },
332
+ linkAs: {},
333
+ closeOnScroll: { type: Boolean },
334
+ closeOnResize: { type: Boolean },
335
+ closeOnBlur: { type: Boolean },
336
+ highlightFirst: { type: Boolean },
337
+ classes: {}
338
+ },
339
+ emits: [
340
+ "select",
341
+ "checked-change",
342
+ "value-change",
343
+ "update:open"
344
+ ],
345
+ setup(t, { expose: r, emit: i }) {
346
+ let a = t, o = n("menu", Ne, () => a.classes), s = i, c = o(), l = e();
347
+ bt({
348
+ items: () => a.items,
349
+ linkAs: () => a.linkAs,
350
+ onCheckedChange: (e, t) => s("checked-change", e, t),
351
+ onValueChange: (e, t) => s("value-change", e, t)
352
+ });
353
+ let u = wt({
354
+ open: () => a.open,
355
+ defaultOpen: () => a.defaultOpen,
356
+ anchor: () => a.anchor,
357
+ onOpenChange: (e) => s("update:open", e),
358
+ restoreFocus: !0
359
+ });
360
+ r(u.handle);
361
+ let d = ae("content"), f = St({
362
+ open: () => u.isOpen.value,
363
+ close: u.handle.close,
364
+ content: () => d.value?.$el,
365
+ closeOnScroll: () => a.closeOnScroll,
366
+ closeOnResize: () => a.closeOnResize,
367
+ closeOnBlur: () => a.closeOnBlur,
368
+ highlightFirst: () => a.highlightFirst
369
+ }), p = L(""), m = L(), S = it({
370
+ sensitivity: "base",
371
+ usage: "sort"
372
+ }), w = g(() => a.searchable && p.value ? Ee(a.items, (e) => S.value.contains(e, p.value)) : a.items), E = L(null);
373
+ async function D(e, t) {
374
+ let n = e.target;
375
+ await k(), m.value = Oe(n, t);
376
+ }
377
+ G(u.isOpen, async (e) => {
378
+ p.value = "", m.value = void 0, e && a.searchable && (await k(), requestAnimationFrame(() => requestAnimationFrame(() => E.value?.focus())));
379
+ });
380
+ let M = g(() => u.positioning({
381
+ placement: a.placement,
382
+ gutter: a.arrow ? 10 : 8
383
+ }));
384
+ return (e, n) => (P(), _(U(X).Root, O({
385
+ open: U(u).isOpen.value,
386
+ positioning: M.value,
387
+ "anchor-point": U(u).anchorPoint.value
388
+ }, U(f), {
389
+ "lazy-mount": "",
390
+ "unmount-on-exit": "",
391
+ "onUpdate:open": n[2] ||= (e) => U(u).onOpenChange(e),
392
+ onSelect: n[3] ||= (e) => s("select", e.value)
393
+ }), {
394
+ default: K(() => [e.$slots.default ? (P(), _(U(X).Trigger, {
395
+ key: 0,
396
+ "as-child": ""
397
+ }, {
398
+ default: K(() => [z(e.$slots, "default")]),
399
+ _: 3
400
+ })) : v("", !0), (P(), _(h, { to: "body" }, [C(U(X).Positioner, null, {
401
+ default: K(() => [C(U(X).Content, {
402
+ ref_key: "content",
403
+ ref: d,
404
+ class: A(U(c).content())
405
+ }, {
406
+ default: K(() => [
407
+ t.arrow ? (P(), _(U(X).Arrow, {
408
+ key: 0,
409
+ class: A(U(c).arrow())
410
+ }, {
411
+ default: K(() => [C(U(X).ArrowTip, { class: A(U(c).arrowTip()) }, null, 8, ["class"])]),
412
+ _: 1
413
+ }, 8, ["class"])) : v("", !0),
414
+ t.searchable ? (P(), _(U(X).Context, { key: 1 }, {
415
+ default: K((e) => [b("div", {
416
+ role: "group",
417
+ "aria-label": t.searchLabel ?? U(l).menu.search,
418
+ class: A(U(c).search())
419
+ }, [q(b("input", {
420
+ ref_key: "search",
421
+ ref: E,
422
+ "onUpdate:modelValue": n[0] ||= (e) => p.value = e,
423
+ type: "text",
424
+ autocomplete: "off",
425
+ class: A(U(c).searchInput()),
426
+ placeholder: t.searchLabel ?? U(l).menu.search,
427
+ "aria-label": t.searchLabel ?? U(l).menu.search,
428
+ "aria-activedescendant": m.value,
429
+ onKeydown: (t) => m.value = U(Pe)(t, e) ?? m.value,
430
+ onInput: (t) => D(t, e)
431
+ }, null, 42, Et), [[W, p.value]])], 10, Tt)]),
432
+ _: 1
433
+ })) : v("", !0),
434
+ C(Ct, {
435
+ entries: w.value,
436
+ onSelect: n[1] ||= (e) => s("select", e)
437
+ }, x({ _: 2 }, [e.$slots.item ? {
438
+ name: "item",
439
+ fn: K((t) => [z(e.$slots, "item", j(T(t)))]),
440
+ key: "0"
441
+ } : void 0]), 1032, ["entries"]),
442
+ t.searchable && !w.value.length ? (P(), y("div", {
443
+ key: 2,
444
+ role: "group",
445
+ class: A(U(c).empty())
446
+ }, [b("span", Dt, H(U(l).common.noResults), 1)], 2)) : v("", !0)
447
+ ]),
448
+ _: 3
449
+ }, 8, ["class"])]),
450
+ _: 3
451
+ })]))]),
452
+ _: 3
453
+ }, 16, [
454
+ "open",
455
+ "positioning",
456
+ "anchor-point"
457
+ ]));
458
+ }
459
+ }), kt = ["id"], At = /* @__PURE__ */ w({
460
+ inheritAttrs: !1,
461
+ __name: "Textarea",
462
+ props: /*@__PURE__*/ D({
463
+ defaultValue: {},
464
+ size: {},
465
+ invalid: { type: Boolean },
466
+ success: { type: Boolean },
467
+ disabled: { type: Boolean },
468
+ autoResize: { type: Boolean },
469
+ minRows: {},
470
+ maxRows: {},
471
+ showCount: { type: Boolean },
472
+ loading: { type: Boolean },
473
+ clearable: { type: Boolean },
474
+ clearLabel: {},
475
+ mono: { type: Boolean },
476
+ classes: {}
477
+ }, {
478
+ modelValue: {},
479
+ modelModifiers: {}
480
+ }),
481
+ emits: ["update:modelValue"],
482
+ setup(t, { expose: r }) {
483
+ let s = t, c = n("textarea", qe, () => s.classes), l = n("textareaParts", Je, () => s.classes), u = e(), d = ie(t, "modelValue"), f = ne(), p = ot(), h = i(), x = g(() => s.invalid || !!p?.value.invalid), S = g(() => !x.value && (s.success || h.value.success)), w = g(() => s.disabled || !!p?.value.disabled), T = g(() => f.readonly !== void 0 && f.readonly !== !1), E = g(() => {
484
+ let e = Number(f.maxlength ?? f.maxLength);
485
+ return Number.isFinite(e) && e > 0 ? e : void 0;
486
+ }), D = g(() => s.showCount && E.value !== void 0), j = g(() => s.loading || s.clearable || S.value), F = g(() => D.value || s.loading || s.clearable), I = g(() => l()), R = L(s.defaultValue ?? ""), z = g(() => (d.value ?? R.value).length), te = g({
487
+ get: () => d.value ?? R.value,
488
+ set: (e) => {
489
+ R.value = e, d.value = e;
490
+ }
491
+ }), B = ae("element");
492
+ function V() {
493
+ let e = B.value?.$el;
494
+ if (!s.autoResize || !e) return;
495
+ e.style.height = "auto";
496
+ let t = e.offsetHeight - e.clientHeight, n = e.scrollHeight + t;
497
+ if (s.minRows || s.maxRows) {
498
+ let r = getComputedStyle(e), i = parseFloat(r.lineHeight) || parseFloat(r.fontSize) * 1.5, a = parseFloat(r.paddingTop) + parseFloat(r.paddingBottom) + t, o = s.maxRows ? s.maxRows * i + a : Infinity;
499
+ e.style.overflowY = n > o ? "auto" : "", n = Math.min(Math.max(n, s.minRows ? s.minRows * i + a : 0), o);
500
+ }
501
+ e.style.height = `${n}px`;
502
+ }
503
+ N(V), G(d, () => k(V));
504
+ let W = re(), K = L(""), q;
505
+ function J(e) {
506
+ R.value = e.target.value, V(), D.value && (clearTimeout(q), q = setTimeout(() => {
507
+ K.value = u.textarea.remaining(E.value - z.value, E.value);
508
+ }, 1e3));
509
+ }
510
+ ee(() => clearTimeout(q));
511
+ let oe = g(() => [
512
+ p?.value.ariaDescribedby,
513
+ D.value && W,
514
+ f["aria-describedby"]
515
+ ].filter(Boolean).join(" ") || void 0);
516
+ function se() {
517
+ let e = B.value?.$el;
518
+ e && (Ge(e), e.focus());
519
+ }
520
+ return r(a(() => B.value?.$el)), (e, n) => F.value ? (P(), y("div", {
521
+ key: 1,
522
+ class: A(I.value.base({ class: A(U(f).class) })),
523
+ style: M(U(f).style)
524
+ }, [
525
+ C(U(at).Textarea, O({
526
+ ref_key: "element",
527
+ ref: B,
528
+ modelValue: te.value,
529
+ "onUpdate:modelValue": n[1] ||= (e) => te.value = e
530
+ }, {
531
+ ...U(f),
532
+ class: void 0,
533
+ style: void 0
534
+ }, {
535
+ class: U(c)({
536
+ size: t.size,
537
+ invalid: x.value,
538
+ success: S.value,
539
+ disabled: w.value,
540
+ autoResize: t.autoResize,
541
+ hasTrailing: j.value,
542
+ mono: t.mono
543
+ }),
544
+ rows: U(f).rows ?? t.minRows,
545
+ disabled: w.value || void 0,
546
+ "aria-invalid": x.value || void 0,
547
+ "aria-describedby": oe.value,
548
+ "aria-busy": t.loading || void 0,
549
+ onInput: J
550
+ }), null, 16, [
551
+ "modelValue",
552
+ "class",
553
+ "rows",
554
+ "disabled",
555
+ "aria-invalid",
556
+ "aria-describedby",
557
+ "aria-busy"
558
+ ]),
559
+ j.value ? (P(), y("div", {
560
+ key: 0,
561
+ class: A(I.value.trailing())
562
+ }, [C(o, {
563
+ loading: t.loading,
564
+ clear: t.clearable && z.value > 0 && !w.value && !T.value,
565
+ "clear-label": t.clearLabel ?? U(u).field.clear,
566
+ success: S.value,
567
+ classes: {
568
+ spinner: I.value.spinner(),
569
+ clear: I.value.clear(),
570
+ clearIcon: I.value.clearIcon(),
571
+ statusIcon: I.value.statusIcon()
572
+ },
573
+ onClear: se
574
+ }, null, 8, [
575
+ "loading",
576
+ "clear",
577
+ "clear-label",
578
+ "success",
579
+ "classes"
580
+ ])], 2)) : v("", !0),
581
+ D.value ? (P(), y(m, { key: 1 }, [b("span", {
582
+ id: U(W),
583
+ class: A(I.value.counter()),
584
+ "aria-hidden": "true"
585
+ }, H(U(u).textarea.counter(z.value, E.value)), 11, kt), b("span", {
586
+ class: A(I.value.status()),
587
+ role: "status"
588
+ }, H(K.value), 3)], 64)) : v("", !0)
589
+ ], 6)) : (P(), _(U(at).Textarea, O({
590
+ key: 0,
591
+ ref_key: "element",
592
+ ref: B,
593
+ modelValue: te.value,
594
+ "onUpdate:modelValue": n[0] ||= (e) => te.value = e
595
+ }, {
596
+ ...U(f),
597
+ class: U(c)({
598
+ size: t.size,
599
+ invalid: x.value,
600
+ success: S.value,
601
+ disabled: w.value,
602
+ autoResize: t.autoResize,
603
+ mono: t.mono,
604
+ class: A(U(f).class)
605
+ })
606
+ }, {
607
+ rows: U(f).rows ?? t.minRows,
608
+ disabled: w.value || void 0,
609
+ "aria-invalid": x.value || void 0,
610
+ onInput: J
611
+ }), null, 16, [
612
+ "modelValue",
613
+ "rows",
614
+ "disabled",
615
+ "aria-invalid"
616
+ ]));
617
+ }
618
+ }), jt = { "aria-hidden": "true" }, Mt = { "aria-hidden": "true" }, Nt = /* @__PURE__ */ w({
619
+ inheritAttrs: !1,
620
+ __name: "Pagination",
621
+ props: {
622
+ count: {},
623
+ pageSize: { default: 10 },
624
+ page: { default: void 0 },
625
+ defaultPage: { default: void 0 },
626
+ siblingCount: { default: 1 },
627
+ boundaryCount: {},
628
+ showSummary: {
629
+ type: Boolean,
630
+ default: !0
631
+ },
632
+ summary: {},
633
+ pageSizes: {},
634
+ jumper: { type: Boolean },
635
+ variant: { default: "full" },
636
+ withEdges: { type: Boolean },
637
+ hideSinglePage: { type: Boolean },
638
+ getPageHref: {},
639
+ translations: {},
640
+ classes: {}
641
+ },
642
+ emits: ["update:page", "update:pageSize"],
643
+ setup(t, { emit: r }) {
644
+ let i = t, a = n("pagination", ze, () => i.classes), o = r, c = ne(), l = g(() => a({ responsive: i.variant === "auto" })), d = e(), f = g(() => ({
645
+ ...d.pagination,
646
+ ...i.translations
647
+ })), p = L(i.pageSize);
648
+ G(() => i.pageSize, (e) => p.value = e);
649
+ let h = (e) => ({
650
+ start: Math.min((e - 1) * p.value + 1, i.count),
651
+ end: Math.min(e * p.value, i.count),
652
+ count: i.count
653
+ }), x = g(() => i.hideSinglePage && i.count <= p.value), w = g(() => i.getPageHref ? "a" : "button"), T = (e) => i.getPageHref && e ? {
654
+ role: "link",
655
+ "aria-disabled": "true"
656
+ } : {}, E = g(() => (i.pageSizes ?? []).map((e) => ({
657
+ value: e,
658
+ label: String(e)
659
+ }))), D = st(g(() => ({
660
+ count: i.count,
661
+ pageSize: p.value,
662
+ page: i.page,
663
+ defaultPage: i.defaultPage,
664
+ siblingCount: i.siblingCount,
665
+ boundaryCount: i.boundaryCount,
666
+ type: i.getPageHref ? "link" : "button",
667
+ getPageUrl: i.getPageHref ? ({ page: e }) => i.getPageHref(e) : void 0,
668
+ translations: f.value,
669
+ onPageChange: ({ page: e }) => o("update:page", e)
670
+ })));
671
+ async function j(e, t) {
672
+ if (!t || t === p.value) return;
673
+ let n = Re(e.page, p.value, t);
674
+ p.value = t, o("update:pageSize", t), await k(), e.setPage(n);
675
+ }
676
+ function M(e, t) {
677
+ let n = e.target, r = Number.parseInt(n.value, 10);
678
+ Number.isNaN(r) || (e.preventDefault(), t.setPage(Math.min(Math.max(r, 1), t.totalPages)), n.value = "");
679
+ }
680
+ return (e, n) => x.value ? v("", !0) : (P(), _(U(Z).RootProvider, O({ key: 0 }, {
681
+ ...U(c),
682
+ class: l.value.base({ class: A(U(c).class) })
683
+ }, { value: U(D) }), {
684
+ default: K(() => [C(U(Z).Context, null, {
685
+ default: K((e) => [
686
+ t.showSummary ? (P(), y("span", {
687
+ key: 0,
688
+ class: A(l.value.summary()),
689
+ "aria-live": "polite"
690
+ }, H((t.summary ?? U(d).pagination.summary)(h(e.page))), 3)) : v("", !0),
691
+ t.pageSizes?.length ? (P(), y("div", {
692
+ key: 1,
693
+ class: A(l.value.pageSize())
694
+ }, [b("span", jt, H(U(d).pagination.pageSize), 1), C(u, {
695
+ class: A(l.value.pageSizeSelect()),
696
+ size: "sm",
697
+ items: E.value,
698
+ "model-value": p.value,
699
+ "aria-label": U(d).pagination.pageSize,
700
+ "onUpdate:modelValue": (t) => j(e, t)
701
+ }, null, 8, [
702
+ "class",
703
+ "items",
704
+ "model-value",
705
+ "aria-label",
706
+ "onUpdate:modelValue"
707
+ ])], 2)) : v("", !0),
708
+ b("div", { class: A(l.value.list()) }, [
709
+ t.withEdges ? (P(), _(U(Z).FirstTrigger, {
710
+ key: 0,
711
+ "as-child": ""
712
+ }, {
713
+ default: K(() => [(P(), _(B(w.value), O({ class: l.value.trigger() }, T(e.page === 1)), {
714
+ default: K(() => [C(U(fe), {
715
+ class: A(l.value.triggerIcon()),
716
+ "aria-hidden": "true"
717
+ }, null, 8, ["class"])]),
718
+ _: 1
719
+ }, 16, ["class"]))]),
720
+ _: 2
721
+ }, 1024)) : v("", !0),
722
+ C(U(Z).PrevTrigger, { "as-child": "" }, {
723
+ default: K(() => [(P(), _(B(w.value), O({ class: l.value.trigger() }, T(e.page === 1)), {
724
+ default: K(() => [C(U(le), {
725
+ class: A(l.value.triggerIcon()),
726
+ "aria-hidden": "true"
727
+ }, null, 8, ["class"])]),
728
+ _: 1
729
+ }, 16, ["class"]))]),
730
+ _: 2
731
+ }, 1024),
732
+ t.variant === "full" ? v("", !0) : (P(), y("span", {
733
+ key: 1,
734
+ class: A(l.value.compact())
735
+ }, H(U(d).pagination.compact(e.page, e.totalPages)), 3)),
736
+ t.variant === "compact" ? v("", !0) : (P(!0), y(m, { key: 2 }, R(e.pages, (e, t) => (P(), y(m, { key: t }, [e.type === "page" ? (P(), _(U(Z).Item, O({
737
+ key: 0,
738
+ ref_for: !0
739
+ }, e, { "as-child": "" }), {
740
+ default: K(() => [(P(), _(B(w.value), { class: A(l.value.item()) }, {
741
+ default: K(() => [S(H(e.value), 1)]),
742
+ _: 2
743
+ }, 1032, ["class"]))]),
744
+ _: 2
745
+ }, 1040)) : (P(), _(U(Z).Ellipsis, {
746
+ key: 1,
747
+ index: t,
748
+ class: A(l.value.ellipsis()),
749
+ "aria-hidden": "true"
750
+ }, {
751
+ default: K(() => [...n[0] ||= [S(" … ", -1)]]),
752
+ _: 1
753
+ }, 8, ["index", "class"]))], 64))), 128)),
754
+ C(U(Z).NextTrigger, { "as-child": "" }, {
755
+ default: K(() => [(P(), _(B(w.value), O({ class: l.value.trigger() }, T(e.page === e.totalPages)), {
756
+ default: K(() => [C(U(ue), {
757
+ class: A(l.value.triggerIcon()),
758
+ "aria-hidden": "true"
759
+ }, null, 8, ["class"])]),
760
+ _: 1
761
+ }, 16, ["class"]))]),
762
+ _: 2
763
+ }, 1024),
764
+ t.withEdges ? (P(), _(U(Z).LastTrigger, {
765
+ key: 3,
766
+ "as-child": ""
767
+ }, {
768
+ default: K(() => [(P(), _(B(w.value), O({ class: l.value.trigger() }, T(e.page === e.totalPages)), {
769
+ default: K(() => [C(U(pe), {
770
+ class: A(l.value.triggerIcon()),
771
+ "aria-hidden": "true"
772
+ }, null, 8, ["class"])]),
773
+ _: 1
774
+ }, 16, ["class"]))]),
775
+ _: 2
776
+ }, 1024)) : v("", !0)
777
+ ], 2),
778
+ t.jumper ? (P(), y("div", {
779
+ key: 2,
780
+ class: A(l.value.jumper())
781
+ }, [b("span", Mt, H(U(d).pagination.jumper), 1), C(s, {
782
+ class: A(l.value.jumperInput()),
783
+ size: "sm",
784
+ inputmode: "numeric",
785
+ autocomplete: "off",
786
+ "aria-label": U(d).pagination.jumper,
787
+ onKeydown: J((t) => M(t, e), ["enter"])
788
+ }, null, 8, [
789
+ "class",
790
+ "aria-label",
791
+ "onKeydown"
792
+ ])], 2)) : v("", !0)
793
+ ]),
794
+ _: 1
795
+ })]),
796
+ _: 1
797
+ }, 16, ["value"]));
798
+ }
799
+ }), Pt = /* @__PURE__ */ w({
800
+ inheritAttrs: !1,
801
+ __name: "Skeleton",
802
+ props: {
803
+ shape: {},
804
+ width: {},
805
+ height: {},
806
+ classes: {}
807
+ },
808
+ setup(e) {
809
+ let t = e, r = n("skeleton", Ke, () => t.classes), i = ne(), a = (e) => typeof e == "number" ? `${e}px` : e, o = g(() => [{
810
+ width: a(t.width),
811
+ height: a(t.height)
812
+ }, M(i.style)]);
813
+ return (t, n) => (P(), y("span", O({ "aria-hidden": "true" }, {
814
+ ...U(i),
815
+ class: U(r)({
816
+ shape: e.shape,
817
+ class: A(U(i).class)
818
+ }),
819
+ style: o.value
820
+ }), null, 16));
821
+ }
822
+ }), Ft = ["title"], It = ["title"], Lt = ["aria-label"], Rt = /* @__PURE__ */ w({
823
+ __name: "DatePickerDayTable",
824
+ props: {
825
+ weeks: {},
826
+ visibleRange: {},
827
+ showWeekNumbers: { type: Boolean },
828
+ plainToday: { type: Boolean },
829
+ hideOutsideDays: { type: Boolean },
830
+ weekendDays: {},
831
+ allowDeselect: { type: Boolean }
832
+ },
833
+ setup(t) {
834
+ let r = e(), i = t, a = n("datePicker", Y), o = g(() => a({
835
+ plainToday: i.plainToday,
836
+ hideOutsideDays: i.hideOutsideDays
837
+ })), s = ut(), c = (e) => e.toString().slice(0, 10), l = (e) => !!i.visibleRange && (e.month !== i.visibleRange.start.month || e.year !== i.visibleRange.start.year), u = (e) => We(e.map(c));
838
+ function d(e) {
839
+ let t = s.value.getDayTableCellState({
840
+ value: e,
841
+ visibleRange: i.visibleRange
842
+ });
843
+ return {
844
+ day: e.day,
845
+ today: t.today,
846
+ selected: t.selected,
847
+ outside: t.outsideRange,
848
+ unavailable: t.unavailable || !!t.disabled,
849
+ weekend: i.weekendDays ? i.weekendDays.includes(Ae(c(e))) : t.weekend
850
+ };
851
+ }
852
+ let f = (e) => s.value.selectionMode === "single" && s.value.getDayTableCellState({
853
+ value: e,
854
+ visibleRange: i.visibleRange
855
+ }).selected;
856
+ function p(e, t) {
857
+ e instanceof KeyboardEvent && e.key !== "Enter" && e.key !== " " || f(t) && (e.preventDefault(), s.value.clearValue({ focus: !1 }));
858
+ }
859
+ function h(e) {
860
+ let t = {};
861
+ return i.weekendDays?.includes(Ae(c(e))) && (t["data-weekend"] = ""), i.allowDeselect && (t.onClickCapture = (t) => p(t, e), t.onKeydownCapture = (t) => p(t, e)), t;
862
+ }
863
+ return (e, n) => (P(), _(U($).Table, { class: A(o.value.table()) }, {
864
+ default: K(() => [C(U($).TableHead, null, {
865
+ default: K(() => [C(U($).TableRow, null, {
866
+ default: K(() => [t.showWeekNumbers ? (P(), y("th", {
867
+ key: 0,
868
+ scope: "col",
869
+ class: A(o.value.weekNumberHeader())
870
+ }, [b("abbr", { title: U(r).datePicker.weekColumnHeader }, H(U(r).datePicker.weekColumnShort), 9, Ft)], 2)) : v("", !0), (P(!0), y(m, null, R(U(s).weekDays, (e) => (P(), _(U($).TableHeader, {
871
+ key: e.long,
872
+ class: A(o.value.columnHeader())
873
+ }, {
874
+ default: K(() => [b("abbr", { title: e.long }, H(e.short), 9, It)]),
875
+ _: 2
876
+ }, 1032, ["class"]))), 128))]),
877
+ _: 1
878
+ })]),
879
+ _: 1
880
+ }), C(U($).TableBody, null, {
881
+ default: K(() => [(P(!0), y(m, null, R(t.weeks, (n) => (P(), _(U($).TableRow, { key: n[0]?.toString() }, {
882
+ default: K(() => [t.showWeekNumbers ? (P(), y("th", {
883
+ key: 0,
884
+ scope: "row",
885
+ class: A(o.value.weekNumber()),
886
+ "aria-label": U(r).datePicker.weekNumberCell(u(n))
887
+ }, H(u(n)), 11, Lt)) : v("", !0), (P(!0), y(m, null, R(n, (n) => (P(), y(m, { key: n.toString() }, [l(n) ? (P(), y("td", {
888
+ key: 0,
889
+ class: A(o.value.cell())
890
+ }, null, 2)) : (P(), _(U($).TableCell, O({
891
+ key: 1,
892
+ value: n,
893
+ "visible-range": t.visibleRange,
894
+ class: o.value.cell()
895
+ }, { ref_for: !0 }, h(n)), {
896
+ default: K(() => [C(U($).TableCellTrigger, { class: A(o.value.day()) }, {
897
+ default: K(() => [e.$slots.day ? (P(), y("span", {
898
+ key: 0,
899
+ class: A(o.value.dayContent())
900
+ }, [z(e.$slots, "day", O({ date: c(n) }, { ref_for: !0 }, d(n)))], 2)) : (P(), y(m, { key: 1 }, [S(H(n.day), 1)], 64))]),
901
+ _: 2
902
+ }, 1032, ["class"])]),
903
+ _: 2
904
+ }, 1040, [
905
+ "value",
906
+ "visible-range",
907
+ "class"
908
+ ]))], 64))), 128))]),
909
+ _: 2
910
+ }, 1024))), 128))]),
911
+ _: 3
912
+ })]),
913
+ _: 3
914
+ }, 8, ["class"]));
915
+ }
916
+ }), zt = /* @__PURE__ */ w({
917
+ __name: "DatePickerHeader",
918
+ setup(t) {
919
+ let r = n("datePicker", Y), i = e(), a = r(), o = {
920
+ day: "month",
921
+ month: "year",
922
+ year: void 0
923
+ }, s = (e, t) => `${e}, ${i.datePicker.viewTrigger(t, o[t])}`;
924
+ return (e, t) => (P(), _(U($).ViewControl, { class: A(U(a).header()) }, {
925
+ default: K(() => [
926
+ C(U($).PrevTrigger, { class: A(U(a).nav()) }, {
927
+ default: K(() => [C(U(le), {
928
+ class: A(U(a).navIcon()),
929
+ "aria-hidden": "true"
930
+ }, null, 8, ["class"])]),
931
+ _: 1
932
+ }, 8, ["class"]),
933
+ C(U($).Context, null, {
934
+ default: K((e) => [C(U($).ViewTrigger, {
935
+ class: A(U(a).viewTrigger()),
936
+ "aria-label": s(e.numOfMonths > 1 && e.view === "day" ? e.visibleRangeText.formatted : e.visibleRangeText.start, e.view)
937
+ }, {
938
+ default: K(() => [C(U($).RangeText)]),
939
+ _: 1
940
+ }, 8, ["class", "aria-label"])]),
941
+ _: 1
942
+ }),
943
+ C(U($).NextTrigger, { class: A(U(a).nav()) }, {
944
+ default: K(() => [C(U(ue), {
945
+ class: A(U(a).navIcon()),
946
+ "aria-hidden": "true"
947
+ }, null, 8, ["class"])]),
948
+ _: 1
949
+ }, 8, ["class"])
950
+ ]),
951
+ _: 1
952
+ }, 8, ["class"]));
953
+ }
954
+ }), Bt = ["onClick"], Vt = ["disabled", "onClick"], Ht = /* @__PURE__ */ w({
955
+ __name: "DatePickerViews",
956
+ props: {
957
+ presets: {},
958
+ showWeekNumbers: { type: Boolean },
959
+ numberOfMonths: {},
960
+ showButtonBar: { type: Boolean },
961
+ plainToday: { type: Boolean },
962
+ hideOutsideDays: { type: Boolean },
963
+ weekendDays: {},
964
+ allowDeselect: { type: Boolean },
965
+ timeZone: {}
966
+ },
967
+ setup(t) {
968
+ let r = e(), i = t, a = n("datePicker", Y)(), o = (e) => typeof e == "string" ? r.rangePresets[e] ?? e : e.label, s = g(() => Math.max(1, Math.floor(i.numberOfMonths ?? 1))), c = g(() => ({
969
+ showWeekNumbers: i.showWeekNumbers,
970
+ plainToday: i.plainToday,
971
+ hideOutsideDays: i.hideOutsideDays || s.value > 1,
972
+ weekendDays: i.weekendDays,
973
+ allowDeselect: i.allowDeselect
974
+ }));
975
+ function l(e) {
976
+ return Array.from({ length: s.value }, (t, n) => {
977
+ let r = e.getOffset({ months: n }), i = e.visibleRange.start.add({ months: n });
978
+ return {
979
+ title: r.visibleRangeText.start,
980
+ weeks: r.weeks,
981
+ visibleRange: {
982
+ start: i,
983
+ end: i.add({ months: 1 }).subtract({ days: 1 })
984
+ }
985
+ };
986
+ });
987
+ }
988
+ function u(e) {
989
+ if (e.selectionMode === "single") return e.selectToday();
990
+ let [t = 0, n = 1, r = 1] = tt(i.timeZone).split("-").map(Number);
991
+ e.setFocusedValue(e.focusedValue.set({
992
+ year: t,
993
+ month: n,
994
+ day: r
995
+ }));
996
+ }
997
+ return (e, n) => (P(), y(m, null, [
998
+ C(U($).View, { view: "day" }, {
999
+ default: K(() => [C(U($).Context, null, {
1000
+ default: K((t) => [C(zt), s.value > 1 ? (P(), y("div", {
1001
+ key: 0,
1002
+ class: A(U(a).months())
1003
+ }, [(P(!0), y(m, null, R(l(t), (t) => (P(), y("div", {
1004
+ key: t.title,
1005
+ class: A(U(a).month())
1006
+ }, [b("div", { class: A(U(a).monthTitle()) }, H(t.title), 3), C(Rt, O({
1007
+ weeks: t.weeks,
1008
+ "visible-range": t.visibleRange
1009
+ }, { ref_for: !0 }, c.value), x({ _: 2 }, [e.$slots.day ? {
1010
+ name: "day",
1011
+ fn: K((t) => [z(e.$slots, "day", O({ ref_for: !0 }, t))]),
1012
+ key: "0"
1013
+ } : void 0]), 1040, ["weeks", "visible-range"])], 2))), 128))], 2)) : (P(), _(Rt, O({
1014
+ key: 1,
1015
+ weeks: t.weeks
1016
+ }, c.value), x({ _: 2 }, [e.$slots.day ? {
1017
+ name: "day",
1018
+ fn: K((t) => [z(e.$slots, "day", j(T(t)))]),
1019
+ key: "0"
1020
+ } : void 0]), 1040, ["weeks"]))]),
1021
+ _: 3
1022
+ })]),
1023
+ _: 3
1024
+ }),
1025
+ C(U($).View, { view: "month" }, {
1026
+ default: K(() => [C(U($).Context, null, {
1027
+ default: K((e) => [C(zt), C(U($).Table, { class: A(U(a).table()) }, {
1028
+ default: K(() => [C(U($).TableBody, null, {
1029
+ default: K(() => [(P(!0), y(m, null, R(e.getMonthsGrid({
1030
+ columns: 4,
1031
+ format: "short"
1032
+ }), (e) => (P(), _(U($).TableRow, { key: e[0]?.value }, {
1033
+ default: K(() => [(P(!0), y(m, null, R(e, (e) => (P(), _(U($).TableCell, {
1034
+ key: e.value,
1035
+ value: e.value,
1036
+ class: A(U(a).cell())
1037
+ }, {
1038
+ default: K(() => [C(U($).TableCellTrigger, { class: A(U(a).period()) }, {
1039
+ default: K(() => [S(H(e.label), 1)]),
1040
+ _: 2
1041
+ }, 1032, ["class"])]),
1042
+ _: 2
1043
+ }, 1032, ["value", "class"]))), 128))]),
1044
+ _: 2
1045
+ }, 1024))), 128))]),
1046
+ _: 2
1047
+ }, 1024)]),
1048
+ _: 2
1049
+ }, 1032, ["class"])]),
1050
+ _: 1
1051
+ })]),
1052
+ _: 1
1053
+ }),
1054
+ C(U($).View, { view: "year" }, {
1055
+ default: K(() => [C(U($).Context, null, {
1056
+ default: K((e) => [C(zt), C(U($).Table, { class: A(U(a).table()) }, {
1057
+ default: K(() => [C(U($).TableBody, null, {
1058
+ default: K(() => [(P(!0), y(m, null, R(e.getYearsGrid({ columns: 4 }), (e) => (P(), _(U($).TableRow, { key: e[0]?.value }, {
1059
+ default: K(() => [(P(!0), y(m, null, R(e, (e) => (P(), _(U($).TableCell, {
1060
+ key: e.value,
1061
+ value: e.value,
1062
+ class: A(U(a).cell())
1063
+ }, {
1064
+ default: K(() => [C(U($).TableCellTrigger, { class: A(U(a).period()) }, {
1065
+ default: K(() => [S(H(e.label), 1)]),
1066
+ _: 2
1067
+ }, 1032, ["class"])]),
1068
+ _: 2
1069
+ }, 1032, ["value", "class"]))), 128))]),
1070
+ _: 2
1071
+ }, 1024))), 128))]),
1072
+ _: 2
1073
+ }, 1024)]),
1074
+ _: 2
1075
+ }, 1032, ["class"])]),
1076
+ _: 1
1077
+ })]),
1078
+ _: 1
1079
+ }),
1080
+ t.presets?.length ? (P(), y("div", {
1081
+ key: 0,
1082
+ class: A(U(a).presets())
1083
+ }, [(P(!0), y(m, null, R(t.presets, (e) => (P(), _(U($).PresetTrigger, {
1084
+ key: o(e),
1085
+ value: typeof e == "string" ? e : e.value,
1086
+ class: A(U(a).preset()),
1087
+ "aria-label": o(e)
1088
+ }, {
1089
+ default: K(() => [S(H(o(e)), 1)]),
1090
+ _: 2
1091
+ }, 1032, [
1092
+ "value",
1093
+ "class",
1094
+ "aria-label"
1095
+ ]))), 128))], 2)) : v("", !0),
1096
+ t.showButtonBar ? (P(), _(U($).Context, { key: 1 }, {
1097
+ default: K((e) => [b("div", { class: A(U(a).buttonBar()) }, [b("button", {
1098
+ type: "button",
1099
+ class: A(U(a).buttonBarButton()),
1100
+ onClick: (t) => u(e)
1101
+ }, H(U(r).calendar.today), 11, Bt), b("button", {
1102
+ type: "button",
1103
+ class: A(U(a).buttonBarButton()),
1104
+ disabled: !e.value.length,
1105
+ onClick: (t) => e.clearValue({ focus: !1 })
1106
+ }, H(U(r).calendar.clear), 11, Vt)], 2)]),
1107
+ _: 1
1108
+ })) : v("", !0)
1109
+ ], 64));
1110
+ }
1111
+ }), Ut = /* @__PURE__ */ w({
1112
+ __name: "DatePickerCalendar",
1113
+ props: {
1114
+ presets: {},
1115
+ responsive: { type: Boolean },
1116
+ showWeekNumbers: { type: Boolean },
1117
+ numberOfMonths: {},
1118
+ showButtonBar: { type: Boolean },
1119
+ plainToday: { type: Boolean },
1120
+ hideOutsideDays: { type: Boolean },
1121
+ weekendDays: {},
1122
+ allowDeselect: { type: Boolean },
1123
+ timeZone: {}
1124
+ },
1125
+ setup(e) {
1126
+ let t = e, r = n("datePicker", Y), i = r(), a = g(() => ({
1127
+ presets: t.presets,
1128
+ showWeekNumbers: t.showWeekNumbers,
1129
+ numberOfMonths: t.numberOfMonths,
1130
+ showButtonBar: t.showButtonBar,
1131
+ plainToday: t.plainToday,
1132
+ hideOutsideDays: t.hideOutsideDays,
1133
+ weekendDays: t.weekendDays,
1134
+ allowDeselect: t.allowDeselect,
1135
+ timeZone: t.timeZone
1136
+ })), o = g(() => (t.numberOfMonths ?? 1) > 1), s = L(!1), c, l = () => s.value = !!c?.matches;
1137
+ return N(() => {
1138
+ t.responsive && typeof window.matchMedia == "function" && (c = window.matchMedia("(max-width: 639.98px)"), l(), c.addEventListener("change", l));
1139
+ }), ee(() => c?.removeEventListener("change", l)), (e, t) => (P(), _(h, { to: "body" }, [s.value ? (P(), y(m, { key: 0 }, [C(U($).Context, null, {
1140
+ default: K((e) => [e.open ? (P(), y("div", {
1141
+ key: 0,
1142
+ class: A(U(i).backdrop()),
1143
+ "aria-hidden": "true"
1144
+ }, null, 2)) : v("", !0)]),
1145
+ _: 1
1146
+ }), b("div", { class: A(U(i).sheet()) }, [C(U($).Content, { class: A(U(r)({
1147
+ multiMonth: o.value,
1148
+ bottomSheet: !0
1149
+ }).content()) }, {
1150
+ default: K(() => [C(Ht, j(T(a.value)), x({ _: 2 }, [e.$slots.day ? {
1151
+ name: "day",
1152
+ fn: K((t) => [z(e.$slots, "day", j(T(t)))]),
1153
+ key: "0"
1154
+ } : void 0]), 1040)]),
1155
+ _: 3
1156
+ }, 8, ["class"])], 2)], 64)) : (P(), _(U($).Positioner, { key: 1 }, {
1157
+ default: K(() => [C(U($).Content, { class: A(o.value ? U(r)({ multiMonth: o.value }).content() : U(i).content()) }, {
1158
+ default: K(() => [C(Ht, j(T(a.value)), x({ _: 2 }, [e.$slots.day ? {
1159
+ name: "day",
1160
+ fn: K((t) => [z(e.$slots, "day", j(T(t)))]),
1161
+ key: "0"
1162
+ } : void 0]), 1040)]),
1163
+ _: 3
1164
+ }, 8, ["class"])]),
1165
+ _: 3
1166
+ }))]));
1167
+ }
1168
+ }), Wt = /* @__PURE__ */ w({
1169
+ __name: "DateSegments",
1170
+ props: {
1171
+ index: {},
1172
+ label: {},
1173
+ describedby: {},
1174
+ paste: { type: Function },
1175
+ size: {}
1176
+ },
1177
+ setup(t) {
1178
+ let r = e(), i = t;
1179
+ function a(e) {
1180
+ let t = e.clipboardData?.getData("text/plain") ?? "";
1181
+ i.paste?.(t, i.index) && (e.preventDefault(), e.stopPropagation());
1182
+ }
1183
+ let o = n("datePicker", Y), s = g(() => o({ size: i.size }));
1184
+ return (e, n) => (P(), _(U(lt).SegmentGroup, O({
1185
+ index: t.index,
1186
+ class: s.value.segments(),
1187
+ "aria-label": t.label,
1188
+ "aria-describedby": t.describedby
1189
+ }, t.paste ? { onPasteCapture: a } : {}), {
1190
+ default: K(() => [C(U(lt).Context, null, {
1191
+ default: K((e) => [(P(!0), y(m, null, R(e.getSegments({ index: t.index }), (e, t) => (P(), _(U(lt).Segment, {
1192
+ key: t,
1193
+ segment: e,
1194
+ class: A(s.value.segment()),
1195
+ "aria-label": U(r).dateSegments[e.type]
1196
+ }, null, 8, [
1197
+ "segment",
1198
+ "class",
1199
+ "aria-label"
1200
+ ]))), 128))]),
1201
+ _: 1
1202
+ })]),
1203
+ _: 1
1204
+ }, 16, [
1205
+ "index",
1206
+ "class",
1207
+ "aria-label",
1208
+ "aria-describedby"
1209
+ ]));
1210
+ }
1211
+ }), Gt = (e, t) => e ? e.toString().slice(0, t ? 16 : 10) : null;
1212
+ function Kt(e, t, n) {
1213
+ return t ? e.includes("T") ? ht(e.slice(0, 16)) : ht(`${e}T${n === "max" ? "23:59" : "00:00"}`) : mt(e.slice(0, 10));
1214
+ }
1215
+ function qt(e, t, n, r) {
1216
+ let i = typeof e == "string" && !e.includes("T"), a = et(e, t && !i, n);
1217
+ return a ? Kt(a, t, r) : void 0;
1218
+ }
1219
+ var Jt = (e, t, n, r) => De(Gt(e, t), {
1220
+ valueType: n,
1221
+ timeZone: r,
1222
+ withTime: t
1223
+ }), Yt = (e, t, n) => et(e, t, n);
1224
+ function Xt(e, t) {
1225
+ if (!e && !t?.length) return;
1226
+ let n = new Set(t?.map((e) => et(e, !1)));
1227
+ return (t) => {
1228
+ let r = Gt(t, !1);
1229
+ return n.has(r) || !!e?.(r);
1230
+ };
1231
+ }
1232
+ function Zt(e, t) {
1233
+ if ("hour" in e) return e;
1234
+ let n = t && "hour" in t ? new pt(t.hour, t.minute) : new pt();
1235
+ return gt(e, n);
1236
+ }
1237
+ var Qt = {
1238
+ year: 2e3,
1239
+ month: 1,
1240
+ day: 1
1241
+ };
1242
+ function $t(e) {
1243
+ let [t = 0, n = 0, r = 0] = e.split(":").map(Number);
1244
+ return new dt(Qt.year, Qt.month, Qt.day, t, n, r);
1245
+ }
1246
+ var en = (e) => String(e).padStart(2, "0"), tn = (e, t = !1) => e && "hour" in e ? `${en(e.hour)}:${en(e.minute)}${t ? `:${en(e.second)}` : ""}` : null, nn = (e, t, n, r = !1) => Ye(e, t, n, r), rn = ["id", "data-placeholder"], an = ["name", "value"], on = ["id"], sn = [
1247
+ "id",
1248
+ "data-hidden",
1249
+ "onClick"
1250
+ ], cn = ["id"], ln = /* @__PURE__ */ w({
1251
+ __name: "DatePickerBase",
1252
+ props: {
1253
+ mode: {},
1254
+ dates: {},
1255
+ withTime: { type: Boolean },
1256
+ min: {},
1257
+ max: {},
1258
+ isDateUnavailable: { type: Function },
1259
+ locale: {},
1260
+ disabled: { type: Boolean },
1261
+ readOnly: { type: Boolean },
1262
+ invalid: { type: Boolean },
1263
+ required: { type: Boolean },
1264
+ name: {},
1265
+ label: {},
1266
+ ownId: {},
1267
+ placeholder: {},
1268
+ className: {},
1269
+ period: {},
1270
+ classes: {},
1271
+ presets: {},
1272
+ size: {},
1273
+ hideClear: { type: Boolean },
1274
+ firstDayOfWeek: {},
1275
+ timeZone: {},
1276
+ showTimeZone: { type: Boolean },
1277
+ responsive: { type: Boolean },
1278
+ showWeekNumbers: { type: Boolean },
1279
+ numberOfMonths: {},
1280
+ showButtonBar: { type: Boolean },
1281
+ plainToday: { type: Boolean },
1282
+ hideOutsideDays: { type: Boolean },
1283
+ weekendDays: {},
1284
+ allowDeselect: { type: Boolean }
1285
+ },
1286
+ emits: ["change"],
1287
+ setup(t, { emit: r }) {
1288
+ let i = e(), a = t, o = n("datePicker", Y, () => a.classes), s = r, c = g(() => o({ size: a.size })), l = re(), u = ot(), d = g(() => ({
1289
+ disabled: a.disabled ?? u?.value.disabled,
1290
+ readOnly: a.readOnly ?? u?.value.readOnly,
1291
+ invalid: a.invalid ?? u?.value.invalid,
1292
+ required: a.required ?? u?.value.required
1293
+ })), f = a.mode === "range", p = a.mode === "multiple", h = f ? "range" : "single", S = f ? [0, 1] : [0], w = [i.dateRange.start, i.dateRange.end], E = g(() => {
1294
+ let e = a.ownId, t = u?.value ? { label: (e) => f ? `${u.value.ids.label} ${l}r${e}` : u.value.ids.label } : {}, n = e ? { segmentGroup: (t) => t === 0 ? e : void 0 } : {};
1295
+ return u?.value || e ? {
1296
+ ...t,
1297
+ ...n
1298
+ } : void 0;
1299
+ }), D = (e) => u?.value ? void 0 : f ? [a.label, w[e]].filter(Boolean).join(", ") : a.label, k = f ? {
1300
+ ...i.datePicker,
1301
+ clearTrigger: i.dateRange.clearTrigger
1302
+ } : i.datePicker, M = g(() => a.period ? new ft(a.locale, a.period === "month" ? {
1303
+ month: "2-digit",
1304
+ year: "numeric"
1305
+ } : { year: "numeric" }) : void 0), ee = g(() => a.firstDayOfWeek ?? Me(a.locale).firstDay), N = g(() => {
1306
+ if (!a.showTimeZone || !a.timeZone) return;
1307
+ let e = a.dates[0], t = e ? rt(e.toString().slice(0, 16), a.timeZone) : /* @__PURE__ */ new Date();
1308
+ return {
1309
+ short: Xe(a.timeZone, a.locale, t),
1310
+ long: i.calendar.timeZone(Ze(a.timeZone, a.locale, t))
1311
+ };
1312
+ }), F = g(() => [u?.value.ariaDescribedby, N.value ? `${l}tz` : void 0].filter(Boolean).join(" ") || void 0), I = (e) => S.every((t) => e.getSegments({ index: t }).every((e) => e.type === "literal" || e.isPlaceholder)), L = (e) => !!a.placeholder && I(e) && !e.focused, te = (e) => a.placeholder && I(e) ? [F.value, `${l}ph`].filter(Boolean).join(" ") : F.value, B = g(() => {
1313
+ if (!a.dates.length) return a.placeholder ?? i.calendar.noDates;
1314
+ if (a.dates.length > 3) return Ue(i.calendar.datesSelected, a.dates.length, a.locale);
1315
+ let e = new ft(a.locale, {
1316
+ day: "2-digit",
1317
+ month: "2-digit",
1318
+ year: "numeric",
1319
+ timeZone: "UTC"
1320
+ });
1321
+ return a.dates.map((t) => e.format(t.toDate("UTC"))).join(", ");
1322
+ }), V = g(() => ({
1323
+ presets: a.presets,
1324
+ showWeekNumbers: a.showWeekNumbers,
1325
+ numberOfMonths: a.numberOfMonths,
1326
+ showButtonBar: a.showButtonBar,
1327
+ plainToday: a.plainToday,
1328
+ hideOutsideDays: a.hideOutsideDays,
1329
+ weekendDays: a.weekendDays,
1330
+ allowDeselect: a.allowDeselect,
1331
+ timeZone: a.timeZone,
1332
+ responsive: a.responsive
1333
+ }));
1334
+ function ne(e) {
1335
+ s("change", a.withTime ? e.map((e, t) => Zt(e, a.dates[t])) : e);
1336
+ }
1337
+ function ie(e, t) {
1338
+ if (a.period) return !1;
1339
+ if (f) {
1340
+ let t = He(e, a.locale, a.withTime);
1341
+ if (t) return s("change", [Kt(t.start, a.withTime), Kt(t.end, a.withTime)]), !0;
1342
+ }
1343
+ let n = Ve(e, a.locale, a.withTime);
1344
+ if (!n) return !1;
1345
+ let r = [...a.dates];
1346
+ return r[t] = Kt(n, a.withTime), s("change", r.filter(Boolean)), !0;
1347
+ }
1348
+ let ae = {
1349
+ placement: "bottom-start",
1350
+ gutter: 4
1351
+ };
1352
+ return (e, n) => (P(), _(U($).Root, O({
1353
+ class: c.value.base({ class: t.className }),
1354
+ "model-value": t.dates,
1355
+ "selection-mode": t.mode,
1356
+ min: t.min,
1357
+ max: t.max,
1358
+ "is-date-unavailable": t.isDateUnavailable,
1359
+ locale: t.locale,
1360
+ "start-of-week": ee.value,
1361
+ "min-view": t.period,
1362
+ "default-view": t.period,
1363
+ "num-of-months": t.numberOfMonths,
1364
+ "time-zone": t.timeZone
1365
+ }, d.value, {
1366
+ positioning: ae,
1367
+ translations: U(k),
1368
+ "lazy-mount": "",
1369
+ "unmount-on-exit": "",
1370
+ onValueChange: n[1] ||= (e) => ne(e.value)
1371
+ }), {
1372
+ default: K(() => [C(U($).Control, { class: A(c.value.control()) }, {
1373
+ default: K(() => [
1374
+ p ? (P(), y(m, { key: 0 }, [b("span", {
1375
+ id: `${U(l)}v`,
1376
+ class: A(c.value.multiValue()),
1377
+ "data-placeholder": t.dates.length ? void 0 : ""
1378
+ }, H(B.value), 11, rn), t.name ? (P(!0), y(m, { key: 0 }, R(t.dates, (e, n) => (P(), y("input", {
1379
+ key: e.toString(),
1380
+ type: "hidden",
1381
+ name: `${t.name}[${n}]`,
1382
+ value: e.toString()
1383
+ }, null, 8, an))), 128)) : v("", !0)], 64)) : (P(), _(U(lt).Root, O({
1384
+ key: 1,
1385
+ class: c.value.dateInput(),
1386
+ ids: E.value,
1387
+ "model-value": t.dates,
1388
+ "selection-mode": U(h),
1389
+ granularity: t.withTime ? "minute" : "day",
1390
+ formatter: M.value,
1391
+ min: t.min,
1392
+ max: t.max,
1393
+ "is-date-unavailable": t.isDateUnavailable,
1394
+ locale: t.locale,
1395
+ "should-force-leading-zeros": "",
1396
+ name: t.name
1397
+ }, d.value, {
1398
+ translations: U(i).dateInput,
1399
+ onValueChange: n[0] ||= (e) => s("change", e.value)
1400
+ }), {
1401
+ default: K(() => [C(U(lt).Context, null, {
1402
+ default: K((e) => [C(U(lt).Control, {
1403
+ class: A(c.value.dateControl()),
1404
+ "data-placeholder-shown": L(e) || void 0
1405
+ }, {
1406
+ default: K(() => [(P(!0), y(m, null, R(U(S), (n) => (P(), y(m, { key: n }, [
1407
+ n === 1 ? (P(), y("span", {
1408
+ key: 0,
1409
+ class: A(c.value.rangeSeparator()),
1410
+ "aria-hidden": "true"
1411
+ }, "–", 2)) : v("", !0),
1412
+ f && U(u) ? (P(), y("span", {
1413
+ key: 1,
1414
+ id: `${U(l)}r${n}`,
1415
+ class: A(c.value.rangeLabel())
1416
+ }, H(w[n]), 11, on)) : v("", !0),
1417
+ C(Wt, {
1418
+ index: n,
1419
+ label: D(n),
1420
+ describedby: te(e),
1421
+ paste: t.period ? void 0 : ie,
1422
+ size: t.size
1423
+ }, null, 8, [
1424
+ "index",
1425
+ "label",
1426
+ "describedby",
1427
+ "paste",
1428
+ "size"
1429
+ ])
1430
+ ], 64))), 128))]),
1431
+ _: 2
1432
+ }, 1032, ["class", "data-placeholder-shown"]), t.placeholder && I(e) ? (P(), y("span", {
1433
+ key: 0,
1434
+ id: `${U(l)}ph`,
1435
+ class: A(c.value.placeholder()),
1436
+ "data-hidden": L(e) ? void 0 : "",
1437
+ onClick: (t) => e.focus()
1438
+ }, H(t.placeholder), 11, sn)) : v("", !0)]),
1439
+ _: 1
1440
+ }), (P(!0), y(m, null, R(U(S), (e) => (P(), _(U(lt).HiddenInput, {
1441
+ key: e,
1442
+ index: e
1443
+ }, null, 8, ["index"]))), 128))]),
1444
+ _: 1
1445
+ }, 16, [
1446
+ "class",
1447
+ "ids",
1448
+ "model-value",
1449
+ "selection-mode",
1450
+ "granularity",
1451
+ "formatter",
1452
+ "min",
1453
+ "max",
1454
+ "is-date-unavailable",
1455
+ "locale",
1456
+ "name",
1457
+ "translations"
1458
+ ])),
1459
+ N.value ? (P(), y(m, { key: 2 }, [b("span", {
1460
+ class: A(c.value.timeZone()),
1461
+ "aria-hidden": "true"
1462
+ }, H(N.value.short), 3), b("span", {
1463
+ id: `${U(l)}tz`,
1464
+ hidden: ""
1465
+ }, H(N.value.long), 9, cn)], 64)) : v("", !0),
1466
+ t.hideClear ? v("", !0) : (P(), _(U($).ClearTrigger, {
1467
+ key: 3,
1468
+ class: A(c.value.clear())
1469
+ }, {
1470
+ default: K(() => [C(U(ve), {
1471
+ class: A(c.value.clearIcon()),
1472
+ "aria-hidden": "true"
1473
+ }, null, 8, ["class"])]),
1474
+ _: 1
1475
+ }, 8, ["class"])),
1476
+ C(U($).Trigger, O({ class: c.value.trigger() }, p ? { "aria-describedby": `${U(l)}v` } : {}), {
1477
+ default: K(() => [C(U(oe), {
1478
+ class: A(c.value.triggerIcon()),
1479
+ "aria-hidden": "true"
1480
+ }, null, 8, ["class"])]),
1481
+ _: 1
1482
+ }, 16, ["class"])
1483
+ ]),
1484
+ _: 1
1485
+ }, 8, ["class"]), C(Ut, j(T(V.value)), x({ _: 2 }, [e.$slots.day ? {
1486
+ name: "day",
1487
+ fn: K((t) => [z(e.$slots, "day", j(T(t)))]),
1488
+ key: "0"
1489
+ } : void 0]), 1040)]),
1490
+ _: 3
1491
+ }, 16, [
1492
+ "class",
1493
+ "model-value",
1494
+ "selection-mode",
1495
+ "min",
1496
+ "max",
1497
+ "is-date-unavailable",
1498
+ "locale",
1499
+ "start-of-week",
1500
+ "min-view",
1501
+ "default-view",
1502
+ "num-of-months",
1503
+ "time-zone",
1504
+ "translations"
1505
+ ]));
1506
+ }
1507
+ }), un = /* @__PURE__ */ w({
1508
+ inheritAttrs: !1,
1509
+ __name: "DatePicker",
1510
+ props: {
1511
+ modelValue: { default: void 0 },
1512
+ defaultValue: { default: void 0 },
1513
+ selectionMode: { default: "single" },
1514
+ valueType: { default: "string" },
1515
+ withTime: {
1516
+ type: Boolean,
1517
+ default: !1
1518
+ },
1519
+ min: {},
1520
+ max: {},
1521
+ isDateUnavailable: {},
1522
+ excludeDates: {},
1523
+ locale: {},
1524
+ disabled: {
1525
+ type: Boolean,
1526
+ default: void 0
1527
+ },
1528
+ readOnly: {
1529
+ type: Boolean,
1530
+ default: void 0
1531
+ },
1532
+ invalid: {
1533
+ type: Boolean,
1534
+ default: void 0
1535
+ },
1536
+ required: {
1537
+ type: Boolean,
1538
+ default: void 0
1539
+ },
1540
+ name: {},
1541
+ placeholder: {},
1542
+ size: {},
1543
+ clearable: {
1544
+ type: Boolean,
1545
+ default: !0
1546
+ },
1547
+ showButtonBar: { type: Boolean },
1548
+ showWeekNumbers: { type: Boolean },
1549
+ numberOfMonths: {},
1550
+ highlightToday: {
1551
+ type: Boolean,
1552
+ default: !0
1553
+ },
1554
+ hideOutsideDays: { type: Boolean },
1555
+ firstDayOfWeek: {},
1556
+ weekendDays: {},
1557
+ allowDeselect: { type: Boolean },
1558
+ timeZone: {},
1559
+ showTimeZone: { type: Boolean },
1560
+ responsive: { type: Boolean },
1561
+ id: {},
1562
+ classes: {}
1563
+ },
1564
+ emits: ["update:modelValue"],
1565
+ setup(e, { emit: n }) {
1566
+ let i = t(), a = e, o = g(() => a.locale ?? i.value.locale), s = n, l = ne(), u = g(() => r(l)), d = g(() => u.value.rest["aria-label"]);
1567
+ c("DatePicker", () => a.id);
1568
+ let f = L(a.defaultValue ?? null), p = g(() => a.modelValue === void 0 ? f.value : a.modelValue), m = g(() => Array.isArray(p.value) ? p.value : p.value ? [p.value] : []), h = g(() => m.value.map((e) => qt(e, a.withTime, a.timeZone)).filter((e) => !!e)), v = (e) => e.map((e) => Yt(e, a.withTime, a.timeZone)).join();
1569
+ function y(e) {
1570
+ let t = e.map((e) => Jt(e, a.withTime, a.valueType, a.timeZone));
1571
+ if (v(t) === v(m.value)) return;
1572
+ let n = a.selectionMode === "multiple" ? t : t[0] ?? null;
1573
+ f.value = n, s("update:modelValue", n);
1574
+ }
1575
+ let b = g(() => ({
1576
+ min: qt(a.min, a.withTime, a.timeZone, "min"),
1577
+ max: qt(a.max, a.withTime, a.timeZone, "max")
1578
+ })), S = g(() => Xt(a.isDateUnavailable, a.excludeDates));
1579
+ return (t, n) => (P(), _(ln, O({
1580
+ mode: e.selectionMode,
1581
+ dates: h.value,
1582
+ "with-time": e.withTime
1583
+ }, b.value, {
1584
+ "is-date-unavailable": S.value,
1585
+ locale: o.value,
1586
+ disabled: e.disabled,
1587
+ "read-only": e.readOnly,
1588
+ invalid: e.invalid,
1589
+ required: e.required,
1590
+ name: e.name,
1591
+ label: d.value,
1592
+ "own-id": e.id,
1593
+ placeholder: e.placeholder,
1594
+ classes: e.classes,
1595
+ "class-name": u.value.className,
1596
+ style: u.value.style,
1597
+ size: e.size,
1598
+ "hide-clear": !e.clearable,
1599
+ "show-button-bar": e.showButtonBar,
1600
+ "show-week-numbers": e.showWeekNumbers,
1601
+ "number-of-months": e.numberOfMonths,
1602
+ "plain-today": !e.highlightToday,
1603
+ "hide-outside-days": e.hideOutsideDays,
1604
+ "first-day-of-week": e.firstDayOfWeek,
1605
+ "weekend-days": e.weekendDays,
1606
+ "allow-deselect": e.allowDeselect,
1607
+ "time-zone": e.timeZone,
1608
+ "show-time-zone": e.showTimeZone,
1609
+ responsive: e.responsive,
1610
+ onChange: y
1611
+ }), x({ _: 2 }, [t.$slots.day ? {
1612
+ name: "day",
1613
+ fn: K((e) => [z(t.$slots, "day", j(T(e)))]),
1614
+ key: "0"
1615
+ } : void 0]), 1040, /* @__PURE__ */ "mode.dates.with-time.is-date-unavailable.locale.disabled.read-only.invalid.required.name.label.own-id.placeholder.classes.class-name.style.size.hide-clear.show-button-bar.show-week-numbers.number-of-months.plain-today.hide-outside-days.first-day-of-week.weekend-days.allow-deselect.time-zone.show-time-zone.responsive".split(".")));
1616
+ }
1617
+ }), dn = ["aria-label", "onClick"], fn = ["data-placeholder-shown"], pn = ["data-placeholder-shown"], mn = ["aria-label", "onClick"], hn = [
1618
+ "aria-controls",
1619
+ "aria-activedescendant",
1620
+ "aria-label",
1621
+ "placeholder",
1622
+ "value",
1623
+ "onInput"
1624
+ ], gn = ["aria-checked"], _n = ["data-state"], vn = /* @__PURE__ */ w({
1625
+ inheritAttrs: !1,
1626
+ __name: "MultiSelect",
1627
+ props: {
1628
+ items: {},
1629
+ modelValue: { default: void 0 },
1630
+ defaultValue: { default: void 0 },
1631
+ placeholder: {},
1632
+ summary: {},
1633
+ maxShown: { default: 2 },
1634
+ disabled: {
1635
+ type: Boolean,
1636
+ default: void 0
1637
+ },
1638
+ invalid: {
1639
+ type: Boolean,
1640
+ default: void 0
1641
+ },
1642
+ required: {
1643
+ type: Boolean,
1644
+ default: void 0
1645
+ },
1646
+ name: {},
1647
+ itemValue: {},
1648
+ itemLabel: {},
1649
+ itemDisabled: {},
1650
+ itemGroup: {},
1651
+ itemKeywords: {},
1652
+ valueKey: {},
1653
+ display: { default: "text" },
1654
+ checkboxes: {
1655
+ type: Boolean,
1656
+ default: !0
1657
+ },
1658
+ selectAll: { type: Boolean },
1659
+ max: {},
1660
+ clearable: { type: Boolean },
1661
+ loading: { type: Boolean },
1662
+ loadingText: {},
1663
+ size: {},
1664
+ filter: { type: Boolean },
1665
+ manualFilter: { type: Boolean },
1666
+ emptyText: {},
1667
+ hasMore: { type: Boolean },
1668
+ dataSource: {},
1669
+ minSearchLength: {},
1670
+ pageSize: {},
1671
+ id: {},
1672
+ classes: {}
1673
+ },
1674
+ emits: [
1675
+ "update:modelValue",
1676
+ "filterChange",
1677
+ "loadMore"
1678
+ ],
1679
+ setup(t, { emit: i }) {
1680
+ let a = e(), o = t, s = n("multiSelect", Fe, () => o.classes), c = i, u = ne(), w = g(() => r(u)), E = g(() => o.display === "chips"), D = g(() => s({
1681
+ size: o.size,
1682
+ clearable: o.clearable && !E.value
1683
+ })), M = a.select, ee = g(() => ({
1684
+ itemValue: o.itemValue,
1685
+ itemLabel: o.itemLabel,
1686
+ itemDisabled: o.itemDisabled,
1687
+ itemGroup: o.itemGroup,
1688
+ itemKeywords: o.itemKeywords,
1689
+ valueKey: o.valueKey
1690
+ })), F = L(""), I = d({
1691
+ items: () => o.items,
1692
+ source: () => o.dataSource,
1693
+ accessors: () => ee.value,
1694
+ pageSize: () => o.pageSize,
1695
+ minSearchLength: () => o.minSearchLength
1696
+ }), { options: te, visible: B, groups: V, ordered: ie } = f(() => I.items.value, () => ee.value, () => o.filter && !o.manualFilter && !o.dataSource ? F.value : ""), ae = g(() => [...te.value, ...I.resolvedOptions.value]), { selected: W, keys: q, commit: J, commitKeys: oe } = p({
1697
+ multiple: !0,
1698
+ model: () => o.modelValue,
1699
+ defaultValue: o.defaultValue,
1700
+ accessors: () => ee.value,
1701
+ items: ae,
1702
+ emit: (e) => c("update:modelValue", e),
1703
+ check: {
1704
+ component: "MultiSelect",
1705
+ ready: () => !o.dataSource && !o.loading && o.items.length > 0
1706
+ }
1707
+ });
1708
+ N(() => I.resolve(q.value, ae.value)), G(q, (e) => I.resolve(e, ae.value));
1709
+ let le = g(() => o.loading || I.loading.value), ue = g(() => o.hasMore || I.hasMore.value);
1710
+ function de() {
1711
+ o.dataSource ? I.loadMore() : c("loadMore");
1712
+ }
1713
+ let fe = g(() => o.max !== void 0 && W.value.length >= o.max), pe = g(() => {
1714
+ let e = new Set(q.value);
1715
+ return ct({
1716
+ items: ie.value,
1717
+ itemToString: (e) => e.label,
1718
+ itemToValue: (e) => e.key,
1719
+ isItemDisabled: (t) => t.disabled || fe.value && !e.has(t.key)
1720
+ });
1721
+ }), me = g(() => o.filter || o.selectAll), _e = re(), ye = g(() => o.emptyText ?? I.emptyText.value ?? (F.value ? a.common.noResults : a.common.empty)), xe = g(() => ({
1722
+ item: D.value.item(),
1723
+ itemText: D.value.itemText(),
1724
+ icon: D.value.icon(),
1725
+ itemIndicator: D.value.itemIndicator(),
1726
+ itemBody: D.value.itemBody(),
1727
+ itemDescription: D.value.itemDescription(),
1728
+ group: D.value.group(),
1729
+ groupLabel: D.value.groupLabel(),
1730
+ loading: D.value.loading(),
1731
+ loadingIcon: D.value.loadingIcon(),
1732
+ sentinel: D.value.sentinel(),
1733
+ empty: D.value.empty(),
1734
+ check: D.value.check(),
1735
+ checkIcon: D.value.checkIcon()
1736
+ })), Se = g(() => W.value.length ? W.value.length > o.maxShown ? (o.summary ?? a.common.selectedCount)(W.value.length) : W.value.map((e) => e.label).join(", ") : o.placeholder ?? a.common.placeholder), we = g(() => B.value.filter((e) => !e.disabled)), Y = g(() => be(W.value, we.value)), Te = L("");
1737
+ function Ee(e) {
1738
+ let t = o.max !== void 0 && e.length >= o.max && W.value.length < o.max;
1739
+ J(e), t && (Te.value = M.maxReached(o.max));
1740
+ }
1741
+ function De(e, t) {
1742
+ let n = o.max !== void 0 && e.length >= o.max && W.value.length < o.max;
1743
+ oe(e, t), n && (Te.value = M.maxReached(o.max));
1744
+ }
1745
+ function Oe(e) {
1746
+ J(W.value.filter((t) => t.key !== e.key)), Te.value = M.removed(e.label);
1747
+ }
1748
+ function ke(e) {
1749
+ let t = W.value.at(-1);
1750
+ t && (E.value && e.key === "Backspace" ? (e.preventDefault(), Oe(t)) : o.clearable && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), J([])));
1751
+ }
1752
+ function Ae(e) {
1753
+ J([]), e.focus();
1754
+ }
1755
+ function je(e, t) {
1756
+ F.value = t.target.value, c("filterChange", F.value), o.dataSource && I.search(F.value), !(o.manualFilter || o.dataSource) && k(() => {
1757
+ let t = ie.value.find((e) => !e.disabled);
1758
+ t && e.setHighlightValue(t.key);
1759
+ });
1760
+ }
1761
+ function Me(e) {
1762
+ (e.key === " " || e.key === "Home" || e.key === "End") && e.stopPropagation();
1763
+ }
1764
+ function Ne(e) {
1765
+ (e.key === " " || e.key === "Enter") && e.stopPropagation();
1766
+ }
1767
+ function Pe(e) {
1768
+ e && I.open(), !e && F.value && (F.value = "", c("filterChange", ""), o.dataSource && I.search(""));
1769
+ }
1770
+ let Ie = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, Le = {
1771
+ sameWidth: !0,
1772
+ gutter: 4
1773
+ }, Re = ot(), ze = g(() => Ce(o.id, "trigger", {
1774
+ label: Re?.value.ids.label,
1775
+ hiddenSelect: Re?.value.ids.control
1776
+ }));
1777
+ return (e, n) => (P(), _(U(Q).Root, O({
1778
+ class: D.value.base({ class: w.value.className }),
1779
+ style: w.value.style,
1780
+ collection: pe.value,
1781
+ multiple: "",
1782
+ "close-on-select": !1,
1783
+ "model-value": U(q),
1784
+ disabled: t.disabled,
1785
+ invalid: t.invalid,
1786
+ required: t.required,
1787
+ name: t.name,
1788
+ positioning: Le,
1789
+ composite: !me.value
1790
+ }, ze.value, {
1791
+ "lazy-mount": "",
1792
+ "unmount-on-exit": "",
1793
+ onValueChange: n[1] ||= (e) => De(e.value, e.items),
1794
+ onOpenChange: n[2] ||= (e) => Pe(e.open)
1795
+ }), {
1796
+ default: K(() => [
1797
+ C(U(Q).Context, null, {
1798
+ default: K((n) => [C(U(Q).Control, j(T(E.value || t.clearable ? { class: E.value ? D.value.chipsControl() : D.value.control() } : {})), {
1799
+ default: K(() => [
1800
+ E.value ? (P(!0), y(m, { key: 0 }, R(U(W), (e) => (P(), y("span", {
1801
+ key: e.key,
1802
+ class: A(D.value.chip())
1803
+ }, [b("span", { class: A(D.value.chipText()) }, H(e.label), 3), n.disabled ? v("", !0) : (P(), y("button", {
1804
+ key: 0,
1805
+ type: "button",
1806
+ tabindex: "-1",
1807
+ class: A(D.value.chipRemove()),
1808
+ "aria-label": U(M).removeItem(e.label),
1809
+ onClick: (t) => Oe(e)
1810
+ }, [C(U(ve), {
1811
+ class: A(D.value.chipRemoveIcon()),
1812
+ "aria-hidden": "true"
1813
+ }, null, 8, ["class"])], 10, dn))], 2))), 128)) : v("", !0),
1814
+ C(U(Q).Trigger, O(w.value.rest, {
1815
+ class: E.value ? D.value.chipsTrigger() : D.value.trigger(),
1816
+ "aria-busy": t.loading || void 0,
1817
+ onKeydown: ke
1818
+ }), {
1819
+ default: K(() => [E.value ? (P(), y("span", {
1820
+ key: 0,
1821
+ class: A(D.value.value()),
1822
+ "data-placeholder-shown": !U(W).length || void 0
1823
+ }, [U(W).length ? (P(), y("span", {
1824
+ key: 0,
1825
+ class: A(D.value.hiddenValue())
1826
+ }, H(U(W).map((e) => e.label).join(", ")), 3)) : (P(), y(m, { key: 1 }, [S(H(t.placeholder ?? U(a).common.placeholder), 1)], 64))], 10, fn)) : (P(), y("span", {
1827
+ key: 1,
1828
+ class: A(D.value.value()),
1829
+ "data-placeholder-shown": !U(W).length || void 0
1830
+ }, [e.$slots.value && U(W).length ? z(e.$slots, "value", { items: U(W).map((e) => e.item) }, void 0, void 0, 0) : (P(), y(m, { key: 1 }, [S(H(Se.value), 1)], 64))], 10, pn)), C(U(Q).Indicator, { class: A(D.value.indicator()) }, {
1831
+ default: K(() => [t.loading ? (P(), _(U(he), {
1832
+ key: 0,
1833
+ class: A(D.value.spinner()),
1834
+ "aria-hidden": "true"
1835
+ }, null, 8, ["class"])) : (P(), _(U(ce), {
1836
+ key: 1,
1837
+ class: A(D.value.indicatorIcon()),
1838
+ "aria-hidden": "true"
1839
+ }, null, 8, ["class"]))]),
1840
+ _: 1
1841
+ }, 8, ["class"])]),
1842
+ _: 3
1843
+ }, 16, ["class", "aria-busy"]),
1844
+ t.clearable && U(W).length && !n.disabled ? (P(), y("button", {
1845
+ key: 1,
1846
+ type: "button",
1847
+ tabindex: "-1",
1848
+ class: A(E.value ? D.value.chipsClear() : D.value.clear()),
1849
+ "aria-label": U(M).clear,
1850
+ onClick: (e) => Ae(n)
1851
+ }, [C(U(ve), {
1852
+ class: A(D.value.clearIcon()),
1853
+ "aria-hidden": "true"
1854
+ }, null, 8, ["class"])], 10, mn)) : v("", !0)
1855
+ ]),
1856
+ _: 2
1857
+ }, 1040)]),
1858
+ _: 3
1859
+ }),
1860
+ E.value || t.max !== void 0 || t.dataSource ? (P(), y("span", {
1861
+ key: 0,
1862
+ role: "status",
1863
+ class: A(D.value.status())
1864
+ }, H(Te.value || U(I).announcement.value), 3)) : v("", !0),
1865
+ (P(), _(h, { to: "body" }, [C(U(Q).Positioner, null, {
1866
+ default: K(() => [C(U(Q).Content, {
1867
+ class: A(D.value.content()),
1868
+ "aria-busy": le.value || void 0,
1869
+ "aria-label": me.value ? w.value.rest["aria-label"] : void 0
1870
+ }, {
1871
+ default: K(() => [me.value ? (P(), y(m, { key: 0 }, [b("div", { class: A(D.value.header()) }, [C(U(Q).Context, null, {
1872
+ default: K((e) => [t.filter ? (P(), y("input", {
1873
+ key: 0,
1874
+ type: "text",
1875
+ role: "combobox",
1876
+ autocomplete: "off",
1877
+ "aria-autocomplete": "list",
1878
+ "aria-expanded": "true",
1879
+ "data-autofocus": "",
1880
+ "aria-controls": U(_e),
1881
+ "aria-activedescendant": Ie(e),
1882
+ "aria-label": U(M).filter,
1883
+ placeholder: U(a).combobox.search,
1884
+ value: F.value,
1885
+ class: A(D.value.search()),
1886
+ onInput: (t) => je(e, t),
1887
+ onKeydown: Me
1888
+ }, null, 42, hn)) : v("", !0)]),
1889
+ _: 1
1890
+ }), t.selectAll && we.value.length ? (P(), y("button", {
1891
+ key: 0,
1892
+ type: "button",
1893
+ role: "checkbox",
1894
+ "aria-checked": Y.value,
1895
+ class: A(D.value.selectAll()),
1896
+ onClick: n[0] ||= (e) => Ee(U(nt)(U(W), U(B), t.max)),
1897
+ onKeydown: Ne
1898
+ }, [b("span", {
1899
+ class: A(D.value.check()),
1900
+ "data-state": Y.value === "mixed" ? "indeterminate" : Y.value ? "checked" : "unchecked",
1901
+ "aria-hidden": "true"
1902
+ }, [Y.value === "mixed" ? (P(), _(U(ge), {
1903
+ key: 0,
1904
+ class: A(D.value.checkIcon())
1905
+ }, null, 8, ["class"])) : Y.value ? (P(), _(U(se), {
1906
+ key: 1,
1907
+ class: A(D.value.checkIcon())
1908
+ }, null, 8, ["class"])) : v("", !0)], 10, _n), S(" " + H(U(M).selectAll), 1)], 42, gn)) : v("", !0)], 2), C(U(Q).List, {
1909
+ id: U(_e),
1910
+ class: A(D.value.list()),
1911
+ "data-autofocus": t.filter ? void 0 : ""
1912
+ }, {
1913
+ default: K(() => [C(l, {
1914
+ parts: U(Q),
1915
+ groups: U(V),
1916
+ classes: xe.value,
1917
+ checkbox: t.checkboxes,
1918
+ loading: le.value,
1919
+ "loading-text": t.loadingText ?? U(a).common.loading,
1920
+ "has-more": ue.value,
1921
+ "empty-text": ye.value,
1922
+ onLoadMore: de
1923
+ }, x({ _: 2 }, [e.$slots.item ? {
1924
+ name: "item",
1925
+ fn: K((t) => [z(e.$slots, "item", j(T(t)))]),
1926
+ key: "0"
1927
+ } : void 0]), 1032, [
1928
+ "parts",
1929
+ "groups",
1930
+ "classes",
1931
+ "checkbox",
1932
+ "loading",
1933
+ "loading-text",
1934
+ "has-more",
1935
+ "empty-text"
1936
+ ])]),
1937
+ _: 3
1938
+ }, 8, [
1939
+ "id",
1940
+ "class",
1941
+ "data-autofocus"
1942
+ ])], 64)) : (P(), _(l, {
1943
+ key: 1,
1944
+ parts: U(Q),
1945
+ groups: U(V),
1946
+ classes: xe.value,
1947
+ checkbox: t.checkboxes,
1948
+ loading: le.value,
1949
+ "loading-text": t.loadingText ?? U(a).common.loading,
1950
+ "has-more": ue.value,
1951
+ "empty-text": ye.value,
1952
+ onLoadMore: de
1953
+ }, x({ _: 2 }, [e.$slots.item ? {
1954
+ name: "item",
1955
+ fn: K((t) => [z(e.$slots, "item", j(T(t)))]),
1956
+ key: "0"
1957
+ } : void 0]), 1032, [
1958
+ "parts",
1959
+ "groups",
1960
+ "classes",
1961
+ "checkbox",
1962
+ "loading",
1963
+ "loading-text",
1964
+ "has-more",
1965
+ "empty-text"
1966
+ ]))]),
1967
+ _: 3
1968
+ }, 8, [
1969
+ "class",
1970
+ "aria-busy",
1971
+ "aria-label"
1972
+ ])]),
1973
+ _: 3
1974
+ })])),
1975
+ C(U(Q).HiddenSelect)
1976
+ ]),
1977
+ _: 3
1978
+ }, 16, [
1979
+ "class",
1980
+ "style",
1981
+ "collection",
1982
+ "model-value",
1983
+ "disabled",
1984
+ "invalid",
1985
+ "required",
1986
+ "name",
1987
+ "composite"
1988
+ ]));
1989
+ }
1990
+ }), yn = ["id"], bn = ["id"], xn = /* @__PURE__ */ w({
1991
+ inheritAttrs: !1,
1992
+ __name: "NumberInput",
1993
+ props: {
1994
+ modelValue: { default: void 0 },
1995
+ defaultValue: { default: void 0 },
1996
+ min: {},
1997
+ max: {},
1998
+ step: {},
1999
+ formatOptions: { default: () => Te },
2000
+ locale: {},
2001
+ size: {},
2002
+ invalid: {
2003
+ type: Boolean,
2004
+ default: void 0
2005
+ },
2006
+ success: {
2007
+ type: Boolean,
2008
+ default: void 0
2009
+ },
2010
+ disabled: {
2011
+ type: Boolean,
2012
+ default: void 0
2013
+ },
2014
+ readOnly: {
2015
+ type: Boolean,
2016
+ default: void 0
2017
+ },
2018
+ required: {
2019
+ type: Boolean,
2020
+ default: void 0
2021
+ },
2022
+ name: {},
2023
+ stepper: {
2024
+ type: Boolean,
2025
+ default: !0
2026
+ },
2027
+ stepperLayout: { default: "inline" },
2028
+ prefix: {},
2029
+ suffix: {},
2030
+ allowNegative: {
2031
+ type: Boolean,
2032
+ default: !0
2033
+ },
2034
+ allowDecimal: {
2035
+ type: Boolean,
2036
+ default: !0
2037
+ },
2038
+ decimals: {},
2039
+ clampBehavior: { default: "blur" },
2040
+ selectOnFocus: { type: Boolean },
2041
+ loading: { type: Boolean },
2042
+ clearable: { type: Boolean },
2043
+ clearLabel: {},
2044
+ id: {},
2045
+ classes: {}
2046
+ },
2047
+ emits: ["update:modelValue"],
2048
+ setup(s, { expose: c, emit: l }) {
2049
+ let u = t(), d = e(), f = s, p = n("numberInput", Ie, () => f.classes), h = g(() => f.locale ?? u.value.locale), b = l, x = ne(), S = g(() => r(x)), w = ot(), T = i(), E = g(() => !!f.invalid || !!w?.value.invalid), D = g(() => !E.value && (!!f.success || T.value.success)), k = g(() => p({
2050
+ size: f.size,
2051
+ stacked: f.stepperLayout === "stacked",
2052
+ success: D.value
2053
+ })), j = g(() => f.decimals === void 0 ? f.allowDecimal ? f.formatOptions : {
2054
+ ...f.formatOptions,
2055
+ maximumFractionDigits: 0
2056
+ } : {
2057
+ ...f.formatOptions,
2058
+ minimumFractionDigits: f.decimals,
2059
+ maximumFractionDigits: f.decimals
2060
+ }), ee = g(() => f.allowNegative ? f.min : Math.max(f.min ?? 0, 0)), N, F = Qe(f.modelValue ?? f.defaultValue, h.value, j.value), I = L(F ?? ""), R = vt(g(() => ({
2061
+ defaultValue: F,
2062
+ min: ee.value,
2063
+ max: f.max,
2064
+ step: f.step,
2065
+ formatOptions: j.value,
2066
+ locale: h.value,
2067
+ invalid: f.invalid,
2068
+ disabled: f.disabled,
2069
+ readOnly: f.readOnly,
2070
+ required: f.required,
2071
+ name: f.name,
2072
+ clampValueOnBlur: f.clampBehavior !== "none",
2073
+ allowOverflow: f.clampBehavior !== "strict",
2074
+ translations: d.numberInput,
2075
+ ...Ce(f.id, "input", {
2076
+ label: w?.value.ids.label,
2077
+ input: w?.value.ids.control
2078
+ }),
2079
+ onValueChange: (e) => {
2080
+ I.value = e.value, N = Number.isNaN(e.valueAsNumber) ? null : e.valueAsNumber, b("update:modelValue", N);
2081
+ }
2082
+ })));
2083
+ G(() => f.modelValue, (e) => {
2084
+ e !== void 0 && e !== N && (e === null ? R.value.clearValue() : R.value.setValue(e));
2085
+ });
2086
+ function z(e) {
2087
+ if (e.ctrlKey || e.metaKey || e.altKey) return;
2088
+ let t = e.currentTarget, n = t.selectionStart ?? t.value.length, r = t.value.slice(0, n) + t.value.slice(t.selectionEnd ?? n), i = Le(e.key, r, h.value, {
2089
+ allowDecimal: f.allowDecimal && f.decimals !== 0,
2090
+ allowNegative: f.allowNegative
2091
+ });
2092
+ i && (e.preventDefault(), i !== "block" && ke(t, i.insert));
2093
+ }
2094
+ function te(e) {
2095
+ let t = e.currentTarget, n = (t.selectionStart ?? 0) === 0 && (t.selectionEnd ?? 0) === t.value.length, r = Be(e.clipboardData?.getData("text") ?? "", h.value);
2096
+ n && r !== null && (e.preventDefault(), Ge(t, Qe(r, h.value, j.value)));
2097
+ }
2098
+ function B(e) {
2099
+ if (!f.selectOnFocus) return;
2100
+ let t = e.currentTarget;
2101
+ requestAnimationFrame(() => t.select());
2102
+ }
2103
+ let V = re(), ie = re(), W = g(() => f.prefix || f.suffix ? [
2104
+ w?.value.ariaDescribedby,
2105
+ f.prefix && V,
2106
+ f.suffix && ie,
2107
+ S.value.rest["aria-describedby"]
2108
+ ].filter(Boolean).join(" ") : void 0), q = g(() => !!f.disabled || !!f.readOnly || !!w?.value.disabled || !!w?.value.readOnly), J = ae("control");
2109
+ function oe() {
2110
+ let e = J.value?.$el.querySelector("input");
2111
+ e && (Ge(e), e.focus());
2112
+ }
2113
+ return c(a(() => J.value?.$el.querySelector("input"))), (e, t) => (P(), _(U(_t).RootProvider, {
2114
+ value: U(R),
2115
+ class: A(k.value.base({ class: S.value.className })),
2116
+ style: M(S.value.style)
2117
+ }, {
2118
+ default: K(() => [C(U(_t).Control, {
2119
+ ref_key: "control",
2120
+ ref: J,
2121
+ class: A(k.value.control())
2122
+ }, {
2123
+ default: K(() => [
2124
+ s.prefix ? (P(), y("span", {
2125
+ key: 0,
2126
+ id: U(V),
2127
+ class: A(k.value.prefix())
2128
+ }, H(s.prefix), 11, yn)) : v("", !0),
2129
+ C(U(_t).Input, O({
2130
+ ...S.value.rest,
2131
+ ...W.value ? { "aria-describedby": W.value } : {}
2132
+ }, {
2133
+ value: I.value,
2134
+ class: k.value.input(),
2135
+ "aria-busy": s.loading || void 0,
2136
+ onKeydown: z,
2137
+ onPaste: te,
2138
+ onFocus: B
2139
+ }), null, 16, [
2140
+ "value",
2141
+ "class",
2142
+ "aria-busy"
2143
+ ]),
2144
+ s.loading || s.clearable || D.value ? (P(), _(o, {
2145
+ key: 1,
2146
+ loading: s.loading,
2147
+ clear: s.clearable && !!I.value && !q.value,
2148
+ "clear-label": s.clearLabel ?? U(d).field.clear,
2149
+ success: D.value,
2150
+ classes: {
2151
+ spinner: k.value.spinner(),
2152
+ clear: k.value.clear(),
2153
+ clearIcon: k.value.clearIcon(),
2154
+ statusIcon: k.value.statusIcon()
2155
+ },
2156
+ onClear: oe
2157
+ }, null, 8, [
2158
+ "loading",
2159
+ "clear",
2160
+ "clear-label",
2161
+ "success",
2162
+ "classes"
2163
+ ])) : v("", !0),
2164
+ s.suffix ? (P(), y("span", {
2165
+ key: 2,
2166
+ id: U(ie),
2167
+ class: A(k.value.suffix())
2168
+ }, H(s.suffix), 11, bn)) : v("", !0),
2169
+ s.stepper && s.stepperLayout === "stacked" ? (P(), y("div", {
2170
+ key: 3,
2171
+ class: A(k.value.stepper())
2172
+ }, [C(U(_t).IncrementTrigger, { class: A(k.value.button()) }, {
2173
+ default: K(() => [C(U(de), {
2174
+ class: A(k.value.buttonIcon()),
2175
+ "aria-hidden": "true"
2176
+ }, null, 8, ["class"])]),
2177
+ _: 1
2178
+ }, 8, ["class"]), C(U(_t).DecrementTrigger, { class: A(k.value.button()) }, {
2179
+ default: K(() => [C(U(ce), {
2180
+ class: A(k.value.buttonIcon()),
2181
+ "aria-hidden": "true"
2182
+ }, null, 8, ["class"])]),
2183
+ _: 1
2184
+ }, 8, ["class"])], 2)) : s.stepper ? (P(), y(m, { key: 4 }, [C(U(_t).DecrementTrigger, { class: A(k.value.button()) }, {
2185
+ default: K(() => [C(U(ge), {
2186
+ class: A(k.value.buttonIcon()),
2187
+ "aria-hidden": "true"
2188
+ }, null, 8, ["class"])]),
2189
+ _: 1
2190
+ }, 8, ["class"]), C(U(_t).IncrementTrigger, { class: A(k.value.button()) }, {
2191
+ default: K(() => [C(U(_e), {
2192
+ class: A(k.value.buttonIcon()),
2193
+ "aria-hidden": "true"
2194
+ }, null, 8, ["class"])]),
2195
+ _: 1
2196
+ }, 8, ["class"])], 64)) : v("", !0)
2197
+ ]),
2198
+ _: 1
2199
+ }, 8, ["class"])]),
2200
+ _: 1
2201
+ }, 8, [
2202
+ "value",
2203
+ "class",
2204
+ "style"
2205
+ ]));
2206
+ }
2207
+ }), Sn = /* @__PURE__ */ w({
2208
+ __name: "ContextMenu",
2209
+ props: {
2210
+ items: {},
2211
+ label: {},
2212
+ linkAs: {},
2213
+ open: {
2214
+ type: Boolean,
2215
+ default: void 0
2216
+ },
2217
+ closeOnScroll: { type: Boolean },
2218
+ closeOnResize: { type: Boolean },
2219
+ closeOnBlur: { type: Boolean },
2220
+ highlightFirst: { type: Boolean },
2221
+ classes: {}
2222
+ },
2223
+ emits: [
2224
+ "select",
2225
+ "checked-change",
2226
+ "value-change",
2227
+ "update:open",
2228
+ "before-open"
2229
+ ],
2230
+ setup(e, { expose: t, emit: r }) {
2231
+ let i = e, a = n("menu", Ne, () => i.classes), o = r, s = a();
2232
+ bt({
2233
+ items: () => i.items,
2234
+ linkAs: () => i.linkAs,
2235
+ onCheckedChange: (e, t) => o("checked-change", e, t),
2236
+ onValueChange: (e, t) => o("value-change", e, t)
2237
+ });
2238
+ let c = wt({
2239
+ open: () => i.open,
2240
+ anchor: () => void 0,
2241
+ onOpenChange: (e) => o("update:open", e),
2242
+ restoreFocus: !0
2243
+ });
2244
+ t(c.handle);
2245
+ let l = ae("content"), u = St({
2246
+ open: () => c.isOpen.value,
2247
+ close: c.handle.close,
2248
+ content: () => l.value?.$el,
2249
+ closeOnScroll: () => i.closeOnScroll,
2250
+ closeOnResize: () => i.closeOnResize,
2251
+ closeOnBlur: () => i.closeOnBlur,
2252
+ highlightFirst: () => i.highlightFirst
2253
+ }), d = null, f = we((e) => {
2254
+ d && o("before-open", d), c.handle.open(e);
2255
+ });
2256
+ function p(e) {
2257
+ d = e.target, f.down(e);
2258
+ }
2259
+ ee(f.cancel);
2260
+ let m = g(() => c.positioning({}));
2261
+ return (t, n) => (P(), _(U(X).Root, O({
2262
+ open: U(c).isOpen.value,
2263
+ positioning: m.value,
2264
+ "anchor-point": U(c).anchorPoint.value
2265
+ }, U(u), {
2266
+ "lazy-mount": "",
2267
+ "unmount-on-exit": "",
2268
+ "onUpdate:open": n[5] ||= (e) => U(c).onOpenChange(e),
2269
+ onSelect: n[6] ||= (e) => o("select", e.value)
2270
+ }), {
2271
+ default: K(() => [C(U(X).ContextTrigger, {
2272
+ "as-child": "",
2273
+ onPointerdown: p,
2274
+ onContextmenu: n[0] ||= (e) => o("before-open", e.target),
2275
+ onPointermove: n[1] ||= (e) => U(f).move(e),
2276
+ onPointerup: n[2] ||= (e) => U(f).cancel(),
2277
+ onPointercancel: n[3] ||= (e) => U(f).cancel()
2278
+ }, {
2279
+ default: K(() => [z(t.$slots, "default")]),
2280
+ _: 3
2281
+ }), (P(), _(h, { to: "body" }, [C(U(X).Positioner, null, {
2282
+ default: K(() => [C(U(X).Content, O({
2283
+ ref_key: "content",
2284
+ ref: l,
2285
+ class: U(s).content()
2286
+ }, e.label ? {
2287
+ "aria-label": e.label,
2288
+ "aria-labelledby": void 0
2289
+ } : {}), {
2290
+ default: K(() => [C(Ct, {
2291
+ entries: e.items,
2292
+ onSelect: n[4] ||= (e) => o("select", e)
2293
+ }, x({ _: 2 }, [t.$slots.item ? {
2294
+ name: "item",
2295
+ fn: K((e) => [z(t.$slots, "item", j(T(e)))]),
2296
+ key: "0"
2297
+ } : void 0]), 1032, ["entries"])]),
2298
+ _: 3
2299
+ }, 16, ["class"])]),
2300
+ _: 3
2301
+ })]))]),
2302
+ _: 3
2303
+ }, 16, [
2304
+ "open",
2305
+ "positioning",
2306
+ "anchor-point"
2307
+ ]));
2308
+ }
2309
+ });
2310
+ //#endregion
2311
+ export { bt as S, Nt as _, ln as a, wt as b, $t as c, tn as d, Xt as f, Pt as g, Ht as h, un as i, nn as l, Wt as m, xn as n, qt as o, Yt as p, vn as r, Kt as s, Sn as t, Jt as u, At as v, Ct as x, Ot as y };