@wirecore/wirelayer-vue 0.12.2 → 0.13.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 (57) hide show
  1. package/dist/{Button-BpMOPs8b.js → Button-WA6BonwF.js} +1 -1
  2. package/dist/{Checkbox-DS2qfQK1.js → Checkbox-DILwucBG.js} +1 -1
  3. package/dist/{CopyButton-Cv9QfFfS.js → CopyButton-BVRwSCRj.js} +2 -2
  4. package/dist/{Field-Cqe2BG_x.js → Field-DuZfFNFT.js} +3 -3
  5. package/dist/{Highlight-uwptdaUw.js → Highlight-BM-J3Jj0.js} +1 -1
  6. package/dist/{Input-C5dyvZfJ.js → Input-CH-ntEjv.js} +10 -10
  7. package/dist/RecipesProvider-DDJst6Pj.js +2448 -0
  8. package/dist/{Select-q8FUIWLi.js → Select-B5c6Y3mf.js} +4 -4
  9. package/dist/{Slider-Cpv7Vj3B.js → Slider-Z-rsNeI1.js} +2 -2
  10. package/dist/Tree-C8vsEA6K.js +852 -0
  11. package/dist/chart.js +31 -31
  12. package/dist/code.js +7 -7
  13. package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
  14. package/dist/components/Confirm/confirm.d.ts +5 -0
  15. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  16. package/dist/components/Dialog/DialogContent.vue.d.ts +12 -2
  17. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  18. package/dist/components/DialogService/DialogHost.vue.d.ts.map +1 -1
  19. package/dist/components/DialogService/dialogs.d.ts +5 -0
  20. package/dist/components/DialogService/dialogs.d.ts.map +1 -1
  21. package/dist/components/Drawer/DrawerContent.vue.d.ts +10 -1
  22. package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
  23. package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts +1 -0
  24. package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
  25. package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts +8 -1
  26. package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts.map +1 -1
  27. package/dist/data-table/DataTable.vue.d.ts +25 -6
  28. package/dist/data-table/DataTable.vue.d.ts.map +1 -1
  29. package/dist/data-table/FilterMenu.vue.d.ts.map +1 -1
  30. package/dist/data-table/ValueInput.vue.d.ts +4 -0
  31. package/dist/data-table/ValueInput.vue.d.ts.map +1 -1
  32. package/dist/data-table/features.d.ts +10 -0
  33. package/dist/data-table/features.d.ts.map +1 -1
  34. package/dist/data-table/index.d.ts +1 -1
  35. package/dist/data-table/index.d.ts.map +1 -1
  36. package/dist/data-table/inputs.d.ts +5 -0
  37. package/dist/data-table/inputs.d.ts.map +1 -1
  38. package/dist/data-table/types.d.ts +2 -0
  39. package/dist/data-table/types.d.ts.map +1 -1
  40. package/dist/data-table.js +1697 -1575
  41. package/dist/editor.js +4 -4
  42. package/dist/form.js +35 -35
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +4204 -4275
  46. package/dist/pdf.js +6 -6
  47. package/dist/{recipes-BlM9aKyt.js → recipes-CD2Ibsv9.js} +8 -1
  48. package/dist/recipes.d.ts +6 -0
  49. package/dist/recipes.d.ts.map +1 -1
  50. package/dist/sources/dateRangeInput.css +3 -0
  51. package/dist/{useTree-UhG1TMeM.js → useTree-DjkjHeoy.js} +114 -114
  52. package/dist/virtual.js +6 -6
  53. package/llms-full.txt +76 -15
  54. package/llms.txt +1 -0
  55. package/package.json +3 -3
  56. package/dist/ContextMenu-DC--vmIf.js +0 -2321
  57. package/dist/Tree-3o3OJASC.js +0 -840
@@ -0,0 +1,2448 @@
1
+ import { a as e, n as t, o as n, t as r } from "./recipes-CD2Ibsv9.js";
2
+ import { t as i } from "./attrs-KNjeRUCf.js";
3
+ import { i as a, n as o, t as s } from "./InputStatus-Cgarj-yu.js";
4
+ import { t as c } from "./Input-CH-ntEjv.js";
5
+ import { t as l } from "./label-for-eQvYjsM5.js";
6
+ import { n as u, t as d } from "./Select-B5c6Y3mf.js";
7
+ import { a as f, n as p, r as m } from "./Highlight-BM-J3Jj0.js";
8
+ import { Fragment as h, Teleport as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as S, createTextVNode as C, createVNode as w, defineComponent as T, guardReactiveProps as E, inject as D, mergeModels as O, mergeProps as k, nextTick as A, normalizeClass as j, normalizeProps as M, normalizeStyle as ee, onBeforeUnmount as N, onMounted as P, openBlock as F, provide as I, reactive as L, ref as R, renderList as z, renderSlot as B, resolveComponent as V, resolveDynamicComponent as H, shallowRef as te, toDisplayString as U, unref as W, useAttrs as ne, useId as re, useModel as ie, useTemplateRef as G, vModelText as K, watch as q, withCtx as J, withDirectives as Y, withKeys as ae } 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, createContextMenuSource as we, createLongPress as Te, datePicker as Ee, defaultNumberFormat as De, filterMenuEntries as Oe, fromWallIso as ke, highlightFirstMenuItem as Ae, insertIntoTextControl as je, isoWeekday as Me, linkTarget as Ne, localeWeekInfo as Pe, menu as Fe, menuSearchKey as Ie, multiSelect as Le, numberInput as Re, numberInputKey as ze, pageForSize as Be, pagination as Ve, parseLocaleNumber as He, parsePastedDate as Ue, parsePastedRange as We, pluralText as Ge, presetDateRange as Ke, rowWeekNumber as qe, setTextControlValue as Je, skeleton as Ye, textarea as Xe, textareaParts as Ze, timeSlots as Qe, timeZoneLabel as $e, timeZoneLongLabel as et, toNumberInputValue as tt, toOverlayAnchor as nt, toWallIso as rt, todayIso as it, toggleAllListOptions as at, zonedToInstant as ot } from "@wirecore/wirelayer-recipes";
11
+ import { Menu as X } from "@ark-ui/vue/menu";
12
+ import { useFilter as st } from "@ark-ui/vue/locale";
13
+ import { Field as ct, useFieldContext as lt } from "@ark-ui/vue/field";
14
+ import { Pagination as Z, usePagination as ut } from "@ark-ui/vue/pagination";
15
+ import { createListCollection as dt } from "@ark-ui/vue/collection";
16
+ import { Select as Q } from "@ark-ui/vue/select";
17
+ import { DateInput as ft } from "@ark-ui/vue/date-input";
18
+ import { DatePicker as $, useDatePickerContext as pt } from "@ark-ui/vue/date-picker";
19
+ import { CalendarDateTime as mt, DateFormatter as ht, Time as gt, parseDate as _t, parseDateTime as vt, toCalendarDateTime as yt } from "@internationalized/date";
20
+ import { NumberInput as bt, useNumberInput as xt } from "@ark-ui/vue/number-input";
21
+ //#region src/components/Menu/state.ts
22
+ var St = Symbol("wirecore-menu-state");
23
+ function Ct(e) {
24
+ let t = L({
25
+ checked: {},
26
+ radio: {}
27
+ });
28
+ q(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 I(St, n), n;
43
+ }
44
+ var wt = () => D(St, null);
45
+ function Tt(e) {
46
+ q([
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 = R(null);
59
+ return q(e.open, async (n) => {
60
+ t.value = null, n && e.highlightFirst() && (await A(), requestAnimationFrame(() => {
61
+ let n = e.content();
62
+ n && t.value === null && Ae(n, { setHighlightedValue: (e) => t.value = e });
63
+ }));
64
+ }), _(() => 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 Et = /* @__PURE__ */ T({
72
+ name: "MenuEntries",
73
+ __name: "MenuEntries",
74
+ props: { entries: {} },
75
+ emits: ["select"],
76
+ setup(e, { emit: n }) {
77
+ let r = t("menu", Fe), i = n, a = r(), o = {
78
+ placement: "right-start",
79
+ offset: { mainAxis: ye }
80
+ }, s = wt(), 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 = V("MenuEntries", !0);
83
+ return F(!0), b(h, null, z(e.entries, (e, u) => (F(), b(h, { key: c(e, u) }, ["type" in e && e.type === "separator" ? (F(), v(W(X).Separator, {
84
+ key: 0,
85
+ class: j(W(a).separator())
86
+ }, null, 8, ["class"])) : "type" in e && e.type === "group" ? (F(), v(W(X).ItemGroup, { key: 1 }, {
87
+ default: J(() => [w(W(X).ItemGroupLabel, { class: j(W(a).groupLabel()) }, {
88
+ default: J(() => [C(U(e.label), 1)]),
89
+ _: 2
90
+ }, 1032, ["class"]), w(l, {
91
+ entries: e.items,
92
+ onSelect: n[0] ||= (e) => i("select", e)
93
+ }, S({ _: 2 }, [t.$slots.item ? {
94
+ name: "item",
95
+ fn: J((e) => [B(t.$slots, "item", k({ ref_for: !0 }, e))]),
96
+ key: "0"
97
+ } : void 0]), 1032, ["entries"])]),
98
+ _: 2
99
+ }, 1024)) : "type" in e && e.type === "radio" ? (F(), v(W(X).RadioItemGroup, {
100
+ key: 2,
101
+ "model-value": W(s)?.radio(e),
102
+ "onUpdate:modelValue": (t) => W(s)?.setRadio(e, t)
103
+ }, {
104
+ default: J(() => [e.label ? (F(), v(W(X).ItemGroupLabel, {
105
+ key: 0,
106
+ class: j(W(a).groupLabel())
107
+ }, {
108
+ default: J(() => [C(U(e.label), 1)]),
109
+ _: 2
110
+ }, 1032, ["class"])) : y("", !0), (F(!0), b(h, null, z(e.items, (e) => (F(), v(W(X).RadioItem, {
111
+ key: e.value,
112
+ value: e.value,
113
+ disabled: e.disabled,
114
+ "close-on-select": e.closeOnSelect ?? !1,
115
+ class: j(W(a).item())
116
+ }, {
117
+ default: J(() => [x("span", { class: j(W(a).indicator()) }, [w(W(X).ItemIndicator, null, {
118
+ default: J(() => [w(W(me), {
119
+ class: j(W(a).indicatorDot()),
120
+ "aria-hidden": "true"
121
+ }, null, 8, ["class"])]),
122
+ _: 1
123
+ })], 2), B(t.$slots, "item", { item: e }, () => [e.icon ? (F(), v(H(e.icon), {
124
+ key: 0,
125
+ class: j(W(a).icon()),
126
+ "aria-hidden": "true"
127
+ }, null, 8, ["class"])) : y("", !0), x("span", { class: j(W(a).label()) }, U(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" ? (F(), v(W(X).CheckboxItem, {
137
+ key: 3,
138
+ value: e.value,
139
+ checked: W(s)?.checked(e) ?? !!e.checked,
140
+ disabled: e.disabled,
141
+ "close-on-select": e.closeOnSelect ?? !1,
142
+ class: j(W(a).item()),
143
+ "onUpdate:checked": (t) => W(s)?.setChecked(e, t)
144
+ }, {
145
+ default: J(() => [x("span", { class: j(W(a).indicator()) }, [w(W(X).ItemIndicator, null, {
146
+ default: J(() => [w(W(se), {
147
+ class: j(W(a).indicatorIcon()),
148
+ "aria-hidden": "true"
149
+ }, null, 8, ["class"])]),
150
+ _: 1
151
+ })], 2), B(t.$slots, "item", { item: e }, () => [e.icon ? (F(), v(H(e.icon), {
152
+ key: 0,
153
+ class: j(W(a).icon()),
154
+ "aria-hidden": "true"
155
+ }, null, 8, ["class"])) : y("", !0), x("span", { class: j(W(a).label()) }, U(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 ? (F(), v(W(X).Root, {
165
+ key: 4,
166
+ positioning: o,
167
+ onSelect: n[2] ||= (e) => i("select", e.value)
168
+ }, {
169
+ default: J(() => [w(W(X).TriggerItem, { class: j(W(a).item()) }, {
170
+ default: J(() => [
171
+ e.icon ? (F(), v(H(e.icon), {
172
+ key: 0,
173
+ class: j(W(a).icon()),
174
+ "aria-hidden": "true"
175
+ }, null, 8, ["class"])) : y("", !0),
176
+ x("span", { class: j(W(a).label()) }, U(e.label), 3),
177
+ w(W(ue), {
178
+ class: j(W(a).submenuIcon()),
179
+ "aria-hidden": "true"
180
+ }, null, 8, ["class"])
181
+ ]),
182
+ _: 2
183
+ }, 1032, ["class"]), (F(), v(g, { to: "body" }, [w(W(X).Positioner, null, {
184
+ default: J(() => [w(W(X).Content, { class: j(W(a).content()) }, {
185
+ default: J(() => [w(l, {
186
+ entries: e.children,
187
+ onSelect: n[1] ||= (e) => i("select", e)
188
+ }, S({ _: 2 }, [t.$slots.item ? {
189
+ name: "item",
190
+ fn: J((e) => [B(t.$slots, "item", k({ 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) ? (F(), v(W(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: J(() => [(F(), v(H(W(s)?.linkAs() ?? "a"), k({ ref_for: !0 }, W(Ne)(e.href, e.to), { class: W(r)({ danger: e.danger }).item() }), {
206
+ default: J(() => [B(t.$slots, "item", { item: e }, () => [
207
+ e.icon ? (F(), v(H(e.icon), {
208
+ key: 0,
209
+ class: j(W(a).icon()),
210
+ "aria-hidden": "true"
211
+ }, null, 8, ["class"])) : y("", !0),
212
+ x("span", { class: j(W(a).label()) }, U(e.label), 3),
213
+ e.shortcut ? (F(), b("span", {
214
+ key: 1,
215
+ class: j(W(a).shortcut()),
216
+ "aria-hidden": "true"
217
+ }, U(e.shortcut), 3)) : y("", !0)
218
+ ])]),
219
+ _: 2
220
+ }, 1040, ["class"]))]),
221
+ _: 2
222
+ }, 1032, [
223
+ "value",
224
+ "disabled",
225
+ "close-on-select"
226
+ ])) : "type" in e ? y("", !0) : (F(), v(W(X).Item, {
227
+ key: 6,
228
+ value: e.value,
229
+ disabled: e.disabled,
230
+ "close-on-select": e.closeOnSelect,
231
+ class: j(W(r)({ danger: e.danger }).item())
232
+ }, {
233
+ default: J(() => [B(t.$slots, "item", { item: e }, () => [
234
+ e.icon ? (F(), v(H(e.icon), {
235
+ key: 0,
236
+ class: j(W(a).icon()),
237
+ "aria-hidden": "true"
238
+ }, null, 8, ["class"])) : y("", !0),
239
+ x("span", { class: j(W(a).label()) }, U(e.label), 3),
240
+ e.shortcut ? (F(), b("span", {
241
+ key: 1,
242
+ class: j(W(a).shortcut()),
243
+ "aria-hidden": "true"
244
+ }, U(e.shortcut), 3)) : y("", !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 Dt(e) {
259
+ let t = R(e.defaultOpen?.() ?? !1), n = te(null), r = null, i = _(() => e.open() ?? t.value), a = _(() => n.value ?? e.anchor() ?? null);
260
+ q(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 = nt(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: _(() => 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 Ot = ["aria-label"], kt = [
310
+ "placeholder",
311
+ "aria-label",
312
+ "aria-activedescendant",
313
+ "onKeydown",
314
+ "onInput"
315
+ ], At = { role: "status" }, jt = /* @__PURE__ */ T({
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(e, { expose: r, emit: i }) {
346
+ let a = e, o = t("menu", Fe, () => a.classes), s = i, c = o(), l = n();
347
+ Ct({
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 = Dt({
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 = G("content"), f = Tt({
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 = R(""), m = R(), h = st({
370
+ sensitivity: "base",
371
+ usage: "sort"
372
+ }), C = _(() => a.searchable && p.value ? Oe(a.items, (e) => h.value.contains(e, p.value)) : a.items), T = R(null);
373
+ async function D(e, t) {
374
+ let n = e.target;
375
+ await A(), m.value = Ae(n, t);
376
+ }
377
+ q(u.isOpen, async (e) => {
378
+ p.value = "", m.value = void 0, e && a.searchable && (await A(), requestAnimationFrame(() => requestAnimationFrame(() => T.value?.focus())));
379
+ });
380
+ let O = _(() => u.positioning({
381
+ placement: a.placement,
382
+ gutter: a.arrow ? 10 : 8
383
+ }));
384
+ return (t, n) => (F(), v(W(X).Root, k({
385
+ open: W(u).isOpen.value,
386
+ positioning: O.value,
387
+ "anchor-point": W(u).anchorPoint.value
388
+ }, W(f), {
389
+ "lazy-mount": "",
390
+ "unmount-on-exit": "",
391
+ "onUpdate:open": n[2] ||= (e) => W(u).onOpenChange(e),
392
+ onSelect: n[3] ||= (e) => s("select", e.value)
393
+ }), {
394
+ default: J(() => [t.$slots.default ? (F(), v(W(X).Trigger, {
395
+ key: 0,
396
+ "as-child": ""
397
+ }, {
398
+ default: J(() => [B(t.$slots, "default")]),
399
+ _: 3
400
+ })) : y("", !0), (F(), v(g, { to: "body" }, [w(W(X).Positioner, null, {
401
+ default: J(() => [w(W(X).Content, {
402
+ ref_key: "content",
403
+ ref: d,
404
+ class: j(W(c).content())
405
+ }, {
406
+ default: J(() => [
407
+ e.arrow ? (F(), v(W(X).Arrow, {
408
+ key: 0,
409
+ class: j(W(c).arrow())
410
+ }, {
411
+ default: J(() => [w(W(X).ArrowTip, { class: j(W(c).arrowTip()) }, null, 8, ["class"])]),
412
+ _: 1
413
+ }, 8, ["class"])) : y("", !0),
414
+ e.searchable ? (F(), v(W(X).Context, { key: 1 }, {
415
+ default: J((t) => [x("div", {
416
+ role: "group",
417
+ "aria-label": e.searchLabel ?? W(l).menu.search,
418
+ class: j(W(c).search())
419
+ }, [Y(x("input", {
420
+ ref_key: "search",
421
+ ref: T,
422
+ "onUpdate:modelValue": n[0] ||= (e) => p.value = e,
423
+ type: "text",
424
+ autocomplete: "off",
425
+ class: j(W(c).searchInput()),
426
+ placeholder: e.searchLabel ?? W(l).menu.search,
427
+ "aria-label": e.searchLabel ?? W(l).menu.search,
428
+ "aria-activedescendant": m.value,
429
+ onKeydown: (e) => m.value = W(Ie)(e, t) ?? m.value,
430
+ onInput: (e) => D(e, t)
431
+ }, null, 42, kt), [[K, p.value]])], 10, Ot)]),
432
+ _: 1
433
+ })) : y("", !0),
434
+ w(Et, {
435
+ entries: C.value,
436
+ onSelect: n[1] ||= (e) => s("select", e)
437
+ }, S({ _: 2 }, [t.$slots.item ? {
438
+ name: "item",
439
+ fn: J((e) => [B(t.$slots, "item", M(E(e)))]),
440
+ key: "0"
441
+ } : void 0]), 1032, ["entries"]),
442
+ e.searchable && !C.value.length ? (F(), b("div", {
443
+ key: 2,
444
+ role: "group",
445
+ class: j(W(c).empty())
446
+ }, [x("span", At, U(W(l).common.noResults), 1)], 2)) : y("", !0)
447
+ ]),
448
+ _: 3
449
+ }, 8, ["class"])]),
450
+ _: 3
451
+ })]))]),
452
+ _: 3
453
+ }, 16, [
454
+ "open",
455
+ "positioning",
456
+ "anchor-point"
457
+ ]));
458
+ }
459
+ }), Mt = ["id"], Nt = /* @__PURE__ */ T({
460
+ inheritAttrs: !1,
461
+ __name: "Textarea",
462
+ props: /*@__PURE__*/ O({
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(e, { expose: r }) {
483
+ let i = e, c = t("textarea", Xe, () => i.classes), l = t("textareaParts", Ze, () => i.classes), u = n(), d = ie(e, "modelValue"), f = ne(), p = lt(), m = a(), g = _(() => i.invalid || !!p?.value.invalid), S = _(() => !g.value && (i.success || m.value.success)), C = _(() => i.disabled || !!p?.value.disabled), T = _(() => f.readonly !== void 0 && f.readonly !== !1), E = _(() => {
484
+ let e = Number(f.maxlength ?? f.maxLength);
485
+ return Number.isFinite(e) && e > 0 ? e : void 0;
486
+ }), D = _(() => i.showCount && E.value !== void 0), O = _(() => i.loading || i.clearable || S.value), M = _(() => D.value || i.loading || i.clearable), I = _(() => l()), L = R(i.defaultValue ?? ""), z = _(() => (d.value ?? L.value).length), B = _({
487
+ get: () => d.value ?? L.value,
488
+ set: (e) => {
489
+ L.value = e, d.value = e;
490
+ }
491
+ }), V = G("element");
492
+ function H() {
493
+ let e = V.value?.$el;
494
+ if (!i.autoResize || !e) return;
495
+ e.style.height = "auto";
496
+ let t = e.offsetHeight - e.clientHeight, n = e.scrollHeight + t;
497
+ if (i.minRows || i.maxRows) {
498
+ let r = getComputedStyle(e), a = parseFloat(r.lineHeight) || parseFloat(r.fontSize) * 1.5, o = parseFloat(r.paddingTop) + parseFloat(r.paddingBottom) + t, s = i.maxRows ? i.maxRows * a + o : Infinity;
499
+ e.style.overflowY = n > s ? "auto" : "", n = Math.min(Math.max(n, i.minRows ? i.minRows * a + o : 0), s);
500
+ }
501
+ e.style.height = `${n}px`;
502
+ }
503
+ P(H), q(d, () => A(H));
504
+ let te = re(), K = R(""), J;
505
+ function Y(e) {
506
+ L.value = e.target.value, H(), D.value && (clearTimeout(J), J = setTimeout(() => {
507
+ K.value = u.textarea.remaining(E.value - z.value, E.value);
508
+ }, 1e3));
509
+ }
510
+ N(() => clearTimeout(J));
511
+ let ae = _(() => [
512
+ p?.value.ariaDescribedby,
513
+ D.value && te,
514
+ f["aria-describedby"]
515
+ ].filter(Boolean).join(" ") || void 0);
516
+ function oe() {
517
+ let e = V.value?.$el;
518
+ e && (Je(e), e.focus());
519
+ }
520
+ return r(o(() => V.value?.$el)), (t, n) => M.value ? (F(), b("div", {
521
+ key: 1,
522
+ class: j(I.value.base({ class: j(W(f).class) })),
523
+ style: ee(W(f).style)
524
+ }, [
525
+ w(W(ct).Textarea, k({
526
+ ref_key: "element",
527
+ ref: V,
528
+ modelValue: B.value,
529
+ "onUpdate:modelValue": n[1] ||= (e) => B.value = e
530
+ }, {
531
+ ...W(f),
532
+ class: void 0,
533
+ style: void 0
534
+ }, {
535
+ class: W(c)({
536
+ size: e.size,
537
+ invalid: g.value,
538
+ success: S.value,
539
+ disabled: C.value,
540
+ autoResize: e.autoResize,
541
+ hasTrailing: O.value,
542
+ mono: e.mono
543
+ }),
544
+ rows: W(f).rows ?? e.minRows,
545
+ disabled: C.value || void 0,
546
+ "aria-invalid": g.value || void 0,
547
+ "aria-describedby": ae.value,
548
+ "aria-busy": e.loading || void 0,
549
+ onInput: Y
550
+ }), null, 16, [
551
+ "modelValue",
552
+ "class",
553
+ "rows",
554
+ "disabled",
555
+ "aria-invalid",
556
+ "aria-describedby",
557
+ "aria-busy"
558
+ ]),
559
+ O.value ? (F(), b("div", {
560
+ key: 0,
561
+ class: j(I.value.trailing())
562
+ }, [w(s, {
563
+ loading: e.loading,
564
+ clear: e.clearable && z.value > 0 && !C.value && !T.value,
565
+ "clear-label": e.clearLabel ?? W(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: oe
574
+ }, null, 8, [
575
+ "loading",
576
+ "clear",
577
+ "clear-label",
578
+ "success",
579
+ "classes"
580
+ ])], 2)) : y("", !0),
581
+ D.value ? (F(), b(h, { key: 1 }, [x("span", {
582
+ id: W(te),
583
+ class: j(I.value.counter()),
584
+ "aria-hidden": "true"
585
+ }, U(W(u).textarea.counter(z.value, E.value)), 11, Mt), x("span", {
586
+ class: j(I.value.status()),
587
+ role: "status"
588
+ }, U(K.value), 3)], 64)) : y("", !0)
589
+ ], 6)) : (F(), v(W(ct).Textarea, k({
590
+ key: 0,
591
+ ref_key: "element",
592
+ ref: V,
593
+ modelValue: B.value,
594
+ "onUpdate:modelValue": n[0] ||= (e) => B.value = e
595
+ }, {
596
+ ...W(f),
597
+ class: W(c)({
598
+ size: e.size,
599
+ invalid: g.value,
600
+ success: S.value,
601
+ disabled: C.value,
602
+ autoResize: e.autoResize,
603
+ mono: e.mono,
604
+ class: j(W(f).class)
605
+ })
606
+ }, {
607
+ rows: W(f).rows ?? e.minRows,
608
+ disabled: C.value || void 0,
609
+ "aria-invalid": g.value || void 0,
610
+ onInput: Y
611
+ }), null, 16, [
612
+ "modelValue",
613
+ "rows",
614
+ "disabled",
615
+ "aria-invalid"
616
+ ]));
617
+ }
618
+ }), Pt = { "aria-hidden": "true" }, Ft = { "aria-hidden": "true" }, It = /* @__PURE__ */ T({
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(e, { emit: r }) {
644
+ let i = e, a = t("pagination", Ve, () => i.classes), o = r, s = ne(), l = _(() => a({ responsive: i.variant === "auto" })), u = n(), f = _(() => ({
645
+ ...u.pagination,
646
+ ...i.translations
647
+ })), p = R(i.pageSize);
648
+ q(() => i.pageSize, (e) => p.value = e);
649
+ let m = (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
+ }), g = _(() => i.hideSinglePage && i.count <= p.value), S = _(() => i.getPageHref ? "a" : "button"), T = (e) => i.getPageHref && e ? {
654
+ role: "link",
655
+ "aria-disabled": "true"
656
+ } : {}, E = _(() => (i.pageSizes ?? []).map((e) => ({
657
+ value: e,
658
+ label: String(e)
659
+ }))), D = ut(_(() => ({
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 O(e, t) {
672
+ if (!t || t === p.value) return;
673
+ let n = Be(e.page, p.value, t);
674
+ p.value = t, o("update:pageSize", t), await A(), 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 (t, n) => g.value ? y("", !0) : (F(), v(W(Z).RootProvider, k({ key: 0 }, {
681
+ ...W(s),
682
+ class: l.value.base({ class: j(W(s).class) })
683
+ }, { value: W(D) }), {
684
+ default: J(() => [w(W(Z).Context, null, {
685
+ default: J((t) => [
686
+ e.showSummary ? (F(), b("span", {
687
+ key: 0,
688
+ class: j(l.value.summary()),
689
+ "aria-live": "polite"
690
+ }, U((e.summary ?? W(u).pagination.summary)(m(t.page))), 3)) : y("", !0),
691
+ e.pageSizes?.length ? (F(), b("div", {
692
+ key: 1,
693
+ class: j(l.value.pageSize())
694
+ }, [x("span", Pt, U(W(u).pagination.pageSize), 1), w(d, {
695
+ class: j(l.value.pageSizeSelect()),
696
+ size: "sm",
697
+ items: E.value,
698
+ "model-value": p.value,
699
+ "aria-label": W(u).pagination.pageSize,
700
+ "onUpdate:modelValue": (e) => O(t, e)
701
+ }, null, 8, [
702
+ "class",
703
+ "items",
704
+ "model-value",
705
+ "aria-label",
706
+ "onUpdate:modelValue"
707
+ ])], 2)) : y("", !0),
708
+ x("div", { class: j(l.value.list()) }, [
709
+ e.withEdges ? (F(), v(W(Z).FirstTrigger, {
710
+ key: 0,
711
+ "as-child": ""
712
+ }, {
713
+ default: J(() => [(F(), v(H(S.value), k({ class: l.value.trigger() }, T(t.page === 1)), {
714
+ default: J(() => [w(W(fe), {
715
+ class: j(l.value.triggerIcon()),
716
+ "aria-hidden": "true"
717
+ }, null, 8, ["class"])]),
718
+ _: 1
719
+ }, 16, ["class"]))]),
720
+ _: 2
721
+ }, 1024)) : y("", !0),
722
+ w(W(Z).PrevTrigger, { "as-child": "" }, {
723
+ default: J(() => [(F(), v(H(S.value), k({ class: l.value.trigger() }, T(t.page === 1)), {
724
+ default: J(() => [w(W(le), {
725
+ class: j(l.value.triggerIcon()),
726
+ "aria-hidden": "true"
727
+ }, null, 8, ["class"])]),
728
+ _: 1
729
+ }, 16, ["class"]))]),
730
+ _: 2
731
+ }, 1024),
732
+ e.variant === "full" ? y("", !0) : (F(), b("span", {
733
+ key: 1,
734
+ class: j(l.value.compact())
735
+ }, U(W(u).pagination.compact(t.page, t.totalPages)), 3)),
736
+ e.variant === "compact" ? y("", !0) : (F(!0), b(h, { key: 2 }, z(t.pages, (e, t) => (F(), b(h, { key: t }, [e.type === "page" ? (F(), v(W(Z).Item, k({
737
+ key: 0,
738
+ ref_for: !0
739
+ }, e, { "as-child": "" }), {
740
+ default: J(() => [(F(), v(H(S.value), { class: j(l.value.item()) }, {
741
+ default: J(() => [C(U(e.value), 1)]),
742
+ _: 2
743
+ }, 1032, ["class"]))]),
744
+ _: 2
745
+ }, 1040)) : (F(), v(W(Z).Ellipsis, {
746
+ key: 1,
747
+ index: t,
748
+ class: j(l.value.ellipsis()),
749
+ "aria-hidden": "true"
750
+ }, {
751
+ default: J(() => [...n[0] ||= [C(" … ", -1)]]),
752
+ _: 1
753
+ }, 8, ["index", "class"]))], 64))), 128)),
754
+ w(W(Z).NextTrigger, { "as-child": "" }, {
755
+ default: J(() => [(F(), v(H(S.value), k({ class: l.value.trigger() }, T(t.page === t.totalPages)), {
756
+ default: J(() => [w(W(ue), {
757
+ class: j(l.value.triggerIcon()),
758
+ "aria-hidden": "true"
759
+ }, null, 8, ["class"])]),
760
+ _: 1
761
+ }, 16, ["class"]))]),
762
+ _: 2
763
+ }, 1024),
764
+ e.withEdges ? (F(), v(W(Z).LastTrigger, {
765
+ key: 3,
766
+ "as-child": ""
767
+ }, {
768
+ default: J(() => [(F(), v(H(S.value), k({ class: l.value.trigger() }, T(t.page === t.totalPages)), {
769
+ default: J(() => [w(W(pe), {
770
+ class: j(l.value.triggerIcon()),
771
+ "aria-hidden": "true"
772
+ }, null, 8, ["class"])]),
773
+ _: 1
774
+ }, 16, ["class"]))]),
775
+ _: 2
776
+ }, 1024)) : y("", !0)
777
+ ], 2),
778
+ e.jumper ? (F(), b("div", {
779
+ key: 2,
780
+ class: j(l.value.jumper())
781
+ }, [x("span", Ft, U(W(u).pagination.jumper), 1), w(c, {
782
+ class: j(l.value.jumperInput()),
783
+ size: "sm",
784
+ inputmode: "numeric",
785
+ autocomplete: "off",
786
+ "aria-label": W(u).pagination.jumper,
787
+ onKeydown: ae((e) => M(e, t), ["enter"])
788
+ }, null, 8, [
789
+ "class",
790
+ "aria-label",
791
+ "onKeydown"
792
+ ])], 2)) : y("", !0)
793
+ ]),
794
+ _: 1
795
+ })]),
796
+ _: 1
797
+ }, 16, ["value"]));
798
+ }
799
+ }), Lt = /* @__PURE__ */ T({
800
+ inheritAttrs: !1,
801
+ __name: "Skeleton",
802
+ props: {
803
+ shape: {},
804
+ width: {},
805
+ height: {},
806
+ classes: {}
807
+ },
808
+ setup(e) {
809
+ let n = e, r = t("skeleton", Ye, () => n.classes), i = ne(), a = (e) => typeof e == "number" ? `${e}px` : e, o = _(() => [{
810
+ width: a(n.width),
811
+ height: a(n.height)
812
+ }, ee(i.style)]);
813
+ return (t, n) => (F(), b("span", k({ "aria-hidden": "true" }, {
814
+ ...W(i),
815
+ class: W(r)({
816
+ shape: e.shape,
817
+ class: j(W(i).class)
818
+ }),
819
+ style: o.value
820
+ }), null, 16));
821
+ }
822
+ }), Rt = ["title"], zt = ["title"], Bt = ["aria-label"], Vt = /* @__PURE__ */ T({
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(e) {
834
+ let r = n(), i = e, a = t("datePicker", Ee), o = _(() => a({
835
+ plainToday: i.plainToday,
836
+ hideOutsideDays: i.hideOutsideDays
837
+ })), s = pt(), 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) => qe(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(Me(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 }), s.value.setFocusedValue(t));
858
+ }
859
+ function m(e) {
860
+ let t = {};
861
+ return i.weekendDays?.includes(Me(c(e))) && (t["data-weekend"] = ""), i.allowDeselect && (t.onClickCapture = (t) => p(t, e), t.onKeydownCapture = (t) => p(t, e)), t;
862
+ }
863
+ return (t, n) => (F(), v(W($).Table, { class: j(o.value.table()) }, {
864
+ default: J(() => [w(W($).TableHead, null, {
865
+ default: J(() => [w(W($).TableRow, null, {
866
+ default: J(() => [e.showWeekNumbers ? (F(), b("th", {
867
+ key: 0,
868
+ scope: "col",
869
+ class: j(o.value.weekNumberHeader())
870
+ }, [x("abbr", { title: W(r).datePicker.weekColumnHeader }, U(W(r).datePicker.weekColumnShort), 9, Rt)], 2)) : y("", !0), (F(!0), b(h, null, z(W(s).weekDays, (e) => (F(), v(W($).TableHeader, {
871
+ key: e.long,
872
+ class: j(o.value.columnHeader())
873
+ }, {
874
+ default: J(() => [x("abbr", { title: e.long }, U(e.short), 9, zt)]),
875
+ _: 2
876
+ }, 1032, ["class"]))), 128))]),
877
+ _: 1
878
+ })]),
879
+ _: 1
880
+ }), w(W($).TableBody, null, {
881
+ default: J(() => [(F(!0), b(h, null, z(e.weeks, (n) => (F(), v(W($).TableRow, { key: n[0]?.toString() }, {
882
+ default: J(() => [e.showWeekNumbers ? (F(), b("th", {
883
+ key: 0,
884
+ scope: "row",
885
+ class: j(o.value.weekNumber()),
886
+ "aria-label": W(r).datePicker.weekNumberCell(u(n))
887
+ }, U(u(n)), 11, Bt)) : y("", !0), (F(!0), b(h, null, z(n, (n) => (F(), b(h, { key: n.toString() }, [l(n) ? (F(), b("td", {
888
+ key: 0,
889
+ class: j(o.value.cell())
890
+ }, null, 2)) : (F(), v(W($).TableCell, k({
891
+ key: 1,
892
+ value: n,
893
+ "visible-range": e.visibleRange,
894
+ class: o.value.cell()
895
+ }, { ref_for: !0 }, m(n)), {
896
+ default: J(() => [w(W($).TableCellTrigger, { class: j(o.value.day()) }, {
897
+ default: J(() => [t.$slots.day ? (F(), b("span", {
898
+ key: 0,
899
+ class: j(o.value.dayContent())
900
+ }, [B(t.$slots, "day", k({ date: c(n) }, { ref_for: !0 }, d(n)))], 2)) : (F(), b(h, { key: 1 }, [C(U(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
+ }), Ht = /* @__PURE__ */ T({
917
+ __name: "DatePickerHeader",
918
+ setup(e) {
919
+ let r = t("datePicker", Ee), i = n(), 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) => (F(), v(W($).ViewControl, { class: j(W(a).header()) }, {
925
+ default: J(() => [
926
+ w(W($).PrevTrigger, { class: j(W(a).nav()) }, {
927
+ default: J(() => [w(W(le), {
928
+ class: j(W(a).navIcon()),
929
+ "aria-hidden": "true"
930
+ }, null, 8, ["class"])]),
931
+ _: 1
932
+ }, 8, ["class"]),
933
+ w(W($).Context, null, {
934
+ default: J((e) => [w(W($).ViewTrigger, {
935
+ class: j(W(a).viewTrigger()),
936
+ "aria-label": s(e.numOfMonths > 1 && e.view === "day" ? e.visibleRangeText.formatted : e.visibleRangeText.start, e.view)
937
+ }, {
938
+ default: J(() => [w(W($).RangeText)]),
939
+ _: 1
940
+ }, 8, ["class", "aria-label"])]),
941
+ _: 1
942
+ }),
943
+ w(W($).NextTrigger, { class: j(W(a).nav()) }, {
944
+ default: J(() => [w(W(ue), {
945
+ class: j(W(a).navIcon()),
946
+ "aria-hidden": "true"
947
+ }, null, 8, ["class"])]),
948
+ _: 1
949
+ }, 8, ["class"])
950
+ ]),
951
+ _: 1
952
+ }, 8, ["class"]));
953
+ }
954
+ }), Ut = ["onClick"], Wt = ["disabled", "onClick"], Gt = /* @__PURE__ */ T({
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(e) {
968
+ let r = n(), i = e, a = t("datePicker", Ee)(), o = (e) => typeof e == "string" ? r.rangePresets[e] ?? e : e.label, s = _(() => Math.max(1, Math.floor(i.numberOfMonths ?? 1))), c = _(() => ({
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] = it(i.timeZone).split("-").map(Number);
991
+ e.setFocusedValue(e.focusedValue.set({
992
+ year: t,
993
+ month: n,
994
+ day: r
995
+ }));
996
+ }
997
+ return (t, n) => (F(), b(h, null, [
998
+ w(W($).View, { view: "day" }, {
999
+ default: J(() => [w(W($).Context, null, {
1000
+ default: J((e) => [w(Ht), s.value > 1 ? (F(), b("div", {
1001
+ key: 0,
1002
+ class: j(W(a).months())
1003
+ }, [(F(!0), b(h, null, z(l(e), (e) => (F(), b("div", {
1004
+ key: e.title,
1005
+ class: j(W(a).month())
1006
+ }, [x("div", { class: j(W(a).monthTitle()) }, U(e.title), 3), w(Vt, k({
1007
+ weeks: e.weeks,
1008
+ "visible-range": e.visibleRange
1009
+ }, { ref_for: !0 }, c.value), S({ _: 2 }, [t.$slots.day ? {
1010
+ name: "day",
1011
+ fn: J((e) => [B(t.$slots, "day", k({ ref_for: !0 }, e))]),
1012
+ key: "0"
1013
+ } : void 0]), 1040, ["weeks", "visible-range"])], 2))), 128))], 2)) : (F(), v(Vt, k({
1014
+ key: 1,
1015
+ weeks: e.weeks
1016
+ }, c.value), S({ _: 2 }, [t.$slots.day ? {
1017
+ name: "day",
1018
+ fn: J((e) => [B(t.$slots, "day", M(E(e)))]),
1019
+ key: "0"
1020
+ } : void 0]), 1040, ["weeks"]))]),
1021
+ _: 3
1022
+ })]),
1023
+ _: 3
1024
+ }),
1025
+ w(W($).View, { view: "month" }, {
1026
+ default: J(() => [w(W($).Context, null, {
1027
+ default: J((e) => [w(Ht), w(W($).Table, { class: j(W(a).table()) }, {
1028
+ default: J(() => [w(W($).TableBody, null, {
1029
+ default: J(() => [(F(!0), b(h, null, z(e.getMonthsGrid({
1030
+ columns: 4,
1031
+ format: "short"
1032
+ }), (e) => (F(), v(W($).TableRow, { key: e[0]?.value }, {
1033
+ default: J(() => [(F(!0), b(h, null, z(e, (e) => (F(), v(W($).TableCell, {
1034
+ key: e.value,
1035
+ value: e.value,
1036
+ class: j(W(a).cell())
1037
+ }, {
1038
+ default: J(() => [w(W($).TableCellTrigger, { class: j(W(a).period()) }, {
1039
+ default: J(() => [C(U(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
+ w(W($).View, { view: "year" }, {
1055
+ default: J(() => [w(W($).Context, null, {
1056
+ default: J((e) => [w(Ht), w(W($).Table, { class: j(W(a).table()) }, {
1057
+ default: J(() => [w(W($).TableBody, null, {
1058
+ default: J(() => [(F(!0), b(h, null, z(e.getYearsGrid({ columns: 4 }), (e) => (F(), v(W($).TableRow, { key: e[0]?.value }, {
1059
+ default: J(() => [(F(!0), b(h, null, z(e, (e) => (F(), v(W($).TableCell, {
1060
+ key: e.value,
1061
+ value: e.value,
1062
+ class: j(W(a).cell())
1063
+ }, {
1064
+ default: J(() => [w(W($).TableCellTrigger, { class: j(W(a).period()) }, {
1065
+ default: J(() => [C(U(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
+ e.presets?.length ? (F(), b("div", {
1081
+ key: 0,
1082
+ class: j(W(a).presets())
1083
+ }, [(F(!0), b(h, null, z(e.presets, (e) => (F(), v(W($).PresetTrigger, {
1084
+ key: o(e),
1085
+ value: typeof e == "string" ? e : e.value,
1086
+ class: j(W(a).preset()),
1087
+ "aria-label": o(e)
1088
+ }, {
1089
+ default: J(() => [C(U(o(e)), 1)]),
1090
+ _: 2
1091
+ }, 1032, [
1092
+ "value",
1093
+ "class",
1094
+ "aria-label"
1095
+ ]))), 128))], 2)) : y("", !0),
1096
+ e.showButtonBar ? (F(), v(W($).Context, { key: 1 }, {
1097
+ default: J((e) => [x("div", { class: j(W(a).buttonBar()) }, [x("button", {
1098
+ type: "button",
1099
+ class: j(W(a).buttonBarButton()),
1100
+ onClick: (t) => u(e)
1101
+ }, U(W(r).calendar.today), 11, Ut), x("button", {
1102
+ type: "button",
1103
+ class: j(W(a).buttonBarButton()),
1104
+ disabled: !e.value.length,
1105
+ onClick: (t) => e.clearValue({ focus: !1 })
1106
+ }, U(W(r).calendar.clear), 11, Wt)], 2)]),
1107
+ _: 1
1108
+ })) : y("", !0)
1109
+ ], 64));
1110
+ }
1111
+ }), Kt = /* @__PURE__ */ T({
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 n = e, r = t("datePicker", Ee), i = r(), a = _(() => ({
1127
+ presets: n.presets,
1128
+ showWeekNumbers: n.showWeekNumbers,
1129
+ numberOfMonths: n.numberOfMonths,
1130
+ showButtonBar: n.showButtonBar,
1131
+ plainToday: n.plainToday,
1132
+ hideOutsideDays: n.hideOutsideDays,
1133
+ weekendDays: n.weekendDays,
1134
+ allowDeselect: n.allowDeselect,
1135
+ timeZone: n.timeZone
1136
+ })), o = _(() => (n.numberOfMonths ?? 1) > 1), s = R(!1), c, l = () => s.value = !!c?.matches;
1137
+ return P(() => {
1138
+ n.responsive && typeof window.matchMedia == "function" && (c = window.matchMedia("(max-width: 639.98px)"), l(), c.addEventListener("change", l));
1139
+ }), N(() => c?.removeEventListener("change", l)), (e, t) => (F(), v(g, { to: "body" }, [s.value ? (F(), b(h, { key: 0 }, [w(W($).Context, null, {
1140
+ default: J((e) => [e.open ? (F(), b("div", {
1141
+ key: 0,
1142
+ class: j(W(i).backdrop()),
1143
+ "aria-hidden": "true"
1144
+ }, null, 2)) : y("", !0)]),
1145
+ _: 1
1146
+ }), x("div", { class: j(W(i).sheet()) }, [w(W($).Content, { class: j(W(r)({
1147
+ multiMonth: o.value,
1148
+ bottomSheet: !0
1149
+ }).content()) }, {
1150
+ default: J(() => [w(Gt, M(E(a.value)), S({ _: 2 }, [e.$slots.day ? {
1151
+ name: "day",
1152
+ fn: J((t) => [B(e.$slots, "day", M(E(t)))]),
1153
+ key: "0"
1154
+ } : void 0]), 1040)]),
1155
+ _: 3
1156
+ }, 8, ["class"])], 2)], 64)) : (F(), v(W($).Positioner, { key: 1 }, {
1157
+ default: J(() => [w(W($).Content, { class: j(o.value ? W(r)({ multiMonth: o.value }).content() : W(i).content()) }, {
1158
+ default: J(() => [w(Gt, M(E(a.value)), S({ _: 2 }, [e.$slots.day ? {
1159
+ name: "day",
1160
+ fn: J((t) => [B(e.$slots, "day", M(E(t)))]),
1161
+ key: "0"
1162
+ } : void 0]), 1040)]),
1163
+ _: 3
1164
+ }, 8, ["class"])]),
1165
+ _: 3
1166
+ }))]));
1167
+ }
1168
+ }), qt = /* @__PURE__ */ T({
1169
+ __name: "DateSegments",
1170
+ props: {
1171
+ index: {},
1172
+ label: {},
1173
+ describedby: {},
1174
+ paste: { type: Function },
1175
+ size: {}
1176
+ },
1177
+ setup(e) {
1178
+ let r = n(), i = e;
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 = t("datePicker", Ee), s = _(() => o({ size: i.size }));
1184
+ return (t, n) => (F(), v(W(ft).SegmentGroup, k({
1185
+ index: e.index,
1186
+ class: s.value.segments(),
1187
+ "aria-label": e.label,
1188
+ "aria-describedby": e.describedby
1189
+ }, e.paste ? { onPasteCapture: a } : {}), {
1190
+ default: J(() => [w(W(ft).Context, null, {
1191
+ default: J((t) => [(F(!0), b(h, null, z(t.getSegments({ index: e.index }), (e, t) => (F(), v(W(ft).Segment, {
1192
+ key: t,
1193
+ segment: e,
1194
+ class: j(s.value.segment()),
1195
+ "aria-label": W(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
+ }), Jt = (e, t) => e ? e.toString().slice(0, t ? 16 : 10) : null;
1212
+ function Yt(e, t, n) {
1213
+ return t ? e.includes("T") ? vt(e.slice(0, 16)) : vt(`${e}T${n === "max" ? "23:59" : "00:00"}`) : _t(e.slice(0, 10));
1214
+ }
1215
+ function Xt(e, t, n, r) {
1216
+ let i = typeof e == "string" && !e.includes("T"), a = rt(e, t && !i, n);
1217
+ return a ? Yt(a, t, r) : void 0;
1218
+ }
1219
+ var Zt = (e, t, n, r) => ke(Jt(e, t), {
1220
+ valueType: n,
1221
+ timeZone: r,
1222
+ withTime: t
1223
+ }), Qt = (e, t, n) => rt(e, t, n);
1224
+ function $t(e, t) {
1225
+ if (!e && !t?.length) return;
1226
+ let n = new Set(t?.map((e) => rt(e, !1)));
1227
+ return (t) => {
1228
+ let r = Jt(t, !1);
1229
+ return n.has(r) || !!e?.(r);
1230
+ };
1231
+ }
1232
+ function en(e, t) {
1233
+ if ("hour" in e) return e;
1234
+ let n = t && "hour" in t ? new gt(t.hour, t.minute) : new gt();
1235
+ return yt(e, n);
1236
+ }
1237
+ var tn = {
1238
+ year: 2e3,
1239
+ month: 1,
1240
+ day: 1
1241
+ };
1242
+ function nn(e) {
1243
+ let [t = 0, n = 0, r = 0] = e.split(":").map(Number);
1244
+ return new mt(tn.year, tn.month, tn.day, t, n, r);
1245
+ }
1246
+ var rn = (e) => String(e).padStart(2, "0"), an = (e, t = !1) => e && "hour" in e ? `${rn(e.hour)}:${rn(e.minute)}${t ? `:${rn(e.second)}` : ""}` : null, on = (e, t, n, r = !1) => Qe(e, t, n, r), sn = ["id", "data-placeholder"], cn = ["name", "value"], ln = ["id"], un = [
1247
+ "id",
1248
+ "data-hidden",
1249
+ "onClick"
1250
+ ], dn = ["id"], fn = /* @__PURE__ */ T({
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(e, { emit: r }) {
1288
+ let i = n(), a = e, o = t("datePicker", Ee, () => a.classes), s = r, c = _(() => o({ size: a.size })), l = re(), u = lt(), d = _(() => ({
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", m = f ? "range" : "single", g = f ? [0, 1] : [0], C = [i.dateRange.start, i.dateRange.end], T = _(() => {
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, C[e]].filter(Boolean).join(", ") : a.label, O = f ? {
1300
+ ...i.datePicker,
1301
+ clearTrigger: i.dateRange.clearTrigger
1302
+ } : i.datePicker, A = _(() => a.period ? new ht(a.locale, a.period === "month" ? {
1303
+ month: "2-digit",
1304
+ year: "numeric"
1305
+ } : { year: "numeric" }) : void 0), ee = _(() => a.firstDayOfWeek ?? Pe(a.locale).firstDay), N = _(() => {
1306
+ if (!a.showTimeZone || !a.timeZone) return;
1307
+ let e = a.dates[0], t = e ? ot(e.toString().slice(0, 16), a.timeZone) : /* @__PURE__ */ new Date();
1308
+ return {
1309
+ short: $e(a.timeZone, a.locale, t),
1310
+ long: i.calendar.timeZone(et(a.timeZone, a.locale, t))
1311
+ };
1312
+ }), P = _(() => [u?.value.ariaDescribedby, N.value ? `${l}tz` : void 0].filter(Boolean).join(" ") || void 0), I = (e) => g.every((t) => e.getSegments({ index: t }).every((e) => e.type === "literal" || e.isPlaceholder)), L = (e) => !!a.placeholder && I(e) && !e.focused, R = (e) => a.placeholder && I(e) ? [P.value, `${l}ph`].filter(Boolean).join(" ") : P.value, V = _(() => {
1313
+ if (!a.dates.length) return a.placeholder ?? i.calendar.noDates;
1314
+ if (a.dates.length > 3) return Ge(i.calendar.datesSelected, a.dates.length, a.locale);
1315
+ let e = new ht(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
+ }), H = _(() => ({
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 te(e) {
1335
+ s("change", a.withTime ? e.map((e, t) => en(e, a.dates[t])) : e);
1336
+ }
1337
+ function ne(e, t) {
1338
+ if (a.period) return !1;
1339
+ if (f) {
1340
+ let t = We(e, a.locale, a.withTime);
1341
+ if (t) return s("change", [Yt(t.start, a.withTime), Yt(t.end, a.withTime)]), !0;
1342
+ }
1343
+ let n = Ue(e, a.locale, a.withTime);
1344
+ if (!n) return !1;
1345
+ let r = [...a.dates];
1346
+ return r[t] = Yt(n, a.withTime), s("change", r.filter(Boolean)), !0;
1347
+ }
1348
+ let ie = {
1349
+ placement: "bottom-start",
1350
+ gutter: 4
1351
+ };
1352
+ return (t, n) => (F(), v(W($).Root, k({
1353
+ class: c.value.base({ class: e.className }),
1354
+ "model-value": e.dates,
1355
+ "selection-mode": e.mode,
1356
+ min: e.min,
1357
+ max: e.max,
1358
+ "is-date-unavailable": e.isDateUnavailable,
1359
+ locale: e.locale,
1360
+ "start-of-week": ee.value,
1361
+ "min-view": e.period,
1362
+ "default-view": e.period,
1363
+ "num-of-months": e.numberOfMonths,
1364
+ "time-zone": e.timeZone
1365
+ }, d.value, {
1366
+ positioning: ie,
1367
+ translations: W(O),
1368
+ "lazy-mount": "",
1369
+ "unmount-on-exit": "",
1370
+ onValueChange: n[1] ||= (e) => te(e.value)
1371
+ }), {
1372
+ default: J(() => [w(W($).Control, { class: j(c.value.control()) }, {
1373
+ default: J(() => [
1374
+ p ? (F(), b(h, { key: 0 }, [x("span", {
1375
+ id: `${W(l)}v`,
1376
+ class: j(c.value.multiValue()),
1377
+ "data-placeholder": e.dates.length ? void 0 : ""
1378
+ }, U(V.value), 11, sn), e.name ? (F(!0), b(h, { key: 0 }, z(e.dates, (t, n) => (F(), b("input", {
1379
+ key: t.toString(),
1380
+ type: "hidden",
1381
+ name: `${e.name}[${n}]`,
1382
+ value: t.toString()
1383
+ }, null, 8, cn))), 128)) : y("", !0)], 64)) : (F(), v(W(ft).Root, k({
1384
+ key: 1,
1385
+ class: c.value.dateInput(),
1386
+ ids: T.value,
1387
+ "model-value": e.dates,
1388
+ "selection-mode": W(m),
1389
+ granularity: e.withTime ? "minute" : "day",
1390
+ formatter: A.value,
1391
+ min: e.min,
1392
+ max: e.max,
1393
+ "is-date-unavailable": e.isDateUnavailable,
1394
+ locale: e.locale,
1395
+ "should-force-leading-zeros": "",
1396
+ name: e.name
1397
+ }, d.value, {
1398
+ translations: W(i).dateInput,
1399
+ onValueChange: n[0] ||= (e) => s("change", e.value)
1400
+ }), {
1401
+ default: J(() => [w(W(ft).Context, null, {
1402
+ default: J((t) => [w(W(ft).Control, {
1403
+ class: j(c.value.dateControl()),
1404
+ "data-placeholder-shown": L(t) || void 0
1405
+ }, {
1406
+ default: J(() => [(F(!0), b(h, null, z(W(g), (n) => (F(), b(h, { key: n }, [
1407
+ n === 1 ? (F(), b("span", {
1408
+ key: 0,
1409
+ class: j(c.value.rangeSeparator()),
1410
+ "aria-hidden": "true"
1411
+ }, "–", 2)) : y("", !0),
1412
+ f && W(u) ? (F(), b("span", {
1413
+ key: 1,
1414
+ id: `${W(l)}r${n}`,
1415
+ class: j(c.value.rangeLabel())
1416
+ }, U(C[n]), 11, ln)) : y("", !0),
1417
+ w(qt, {
1418
+ index: n,
1419
+ label: D(n),
1420
+ describedby: R(t),
1421
+ paste: e.period ? void 0 : ne,
1422
+ size: e.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"]), e.placeholder && I(t) ? (F(), b("span", {
1433
+ key: 0,
1434
+ id: `${W(l)}ph`,
1435
+ class: j(c.value.placeholder()),
1436
+ "data-hidden": L(t) ? void 0 : "",
1437
+ onClick: (e) => t.focus()
1438
+ }, U(e.placeholder), 11, un)) : y("", !0)]),
1439
+ _: 1
1440
+ }), (F(!0), b(h, null, z(W(g), (e) => (F(), v(W(ft).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 ? (F(), b(h, { key: 2 }, [x("span", {
1460
+ class: j(c.value.timeZone()),
1461
+ "aria-hidden": "true"
1462
+ }, U(N.value.short), 3), x("span", {
1463
+ id: `${W(l)}tz`,
1464
+ hidden: ""
1465
+ }, U(N.value.long), 9, dn)], 64)) : y("", !0),
1466
+ e.hideClear ? y("", !0) : (F(), v(W($).ClearTrigger, {
1467
+ key: 3,
1468
+ class: j(c.value.clear())
1469
+ }, {
1470
+ default: J(() => [w(W(ve), {
1471
+ class: j(c.value.clearIcon()),
1472
+ "aria-hidden": "true"
1473
+ }, null, 8, ["class"])]),
1474
+ _: 1
1475
+ }, 8, ["class"])),
1476
+ w(W($).Trigger, k({ class: c.value.trigger() }, p ? { "aria-describedby": `${W(l)}v` } : {}), {
1477
+ default: J(() => [w(W(oe), {
1478
+ class: j(c.value.triggerIcon()),
1479
+ "aria-hidden": "true"
1480
+ }, null, 8, ["class"])]),
1481
+ _: 1
1482
+ }, 16, ["class"])
1483
+ ]),
1484
+ _: 1
1485
+ }, 8, ["class"]), w(Kt, M(E(H.value)), S({ _: 2 }, [t.$slots.day ? {
1486
+ name: "day",
1487
+ fn: J((e) => [B(t.$slots, "day", M(E(e)))]),
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
+ }), pn = /* @__PURE__ */ T({
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(t, { emit: n }) {
1566
+ let r = e(), a = t, o = _(() => a.locale ?? r.value.locale), s = n, c = ne(), u = _(() => i(c)), d = _(() => u.value.rest["aria-label"]);
1567
+ l("DatePicker", () => a.id);
1568
+ let f = R(a.defaultValue ?? null), p = _(() => a.modelValue === void 0 ? f.value : a.modelValue), m = _(() => Array.isArray(p.value) ? p.value : p.value ? [p.value] : []), h = _(() => m.value.map((e) => Xt(e, a.withTime, a.timeZone)).filter((e) => !!e)), g = (e) => e.map((e) => Qt(e, a.withTime, a.timeZone)).join();
1569
+ function y(e) {
1570
+ let t = e.map((e) => Zt(e, a.withTime, a.valueType, a.timeZone));
1571
+ if (g(t) === g(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 = _(() => ({
1576
+ min: Xt(a.min, a.withTime, a.timeZone, "min"),
1577
+ max: Xt(a.max, a.withTime, a.timeZone, "max")
1578
+ })), x = _(() => $t(a.isDateUnavailable, a.excludeDates));
1579
+ return (e, n) => (F(), v(fn, k({
1580
+ mode: t.selectionMode,
1581
+ dates: h.value,
1582
+ "with-time": t.withTime
1583
+ }, b.value, {
1584
+ "is-date-unavailable": x.value,
1585
+ locale: o.value,
1586
+ disabled: t.disabled,
1587
+ "read-only": t.readOnly,
1588
+ invalid: t.invalid,
1589
+ required: t.required,
1590
+ name: t.name,
1591
+ label: d.value,
1592
+ "own-id": t.id,
1593
+ placeholder: t.placeholder,
1594
+ classes: t.classes,
1595
+ "class-name": u.value.className,
1596
+ style: u.value.style,
1597
+ size: t.size,
1598
+ "hide-clear": !t.clearable,
1599
+ "show-button-bar": t.showButtonBar,
1600
+ "show-week-numbers": t.showWeekNumbers,
1601
+ "number-of-months": t.numberOfMonths,
1602
+ "plain-today": !t.highlightToday,
1603
+ "hide-outside-days": t.hideOutsideDays,
1604
+ "first-day-of-week": t.firstDayOfWeek,
1605
+ "weekend-days": t.weekendDays,
1606
+ "allow-deselect": t.allowDeselect,
1607
+ "time-zone": t.timeZone,
1608
+ "show-time-zone": t.showTimeZone,
1609
+ responsive: t.responsive,
1610
+ onChange: y
1611
+ }), S({ _: 2 }, [e.$slots.day ? {
1612
+ name: "day",
1613
+ fn: J((t) => [B(e.$slots, "day", M(E(t)))]),
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
+ }), mn = ["aria-label", "onClick"], hn = ["data-placeholder-shown"], gn = ["data-placeholder-shown"], _n = ["aria-label", "onClick"], vn = [
1618
+ "aria-controls",
1619
+ "aria-activedescendant",
1620
+ "aria-label",
1621
+ "placeholder",
1622
+ "value",
1623
+ "onInput"
1624
+ ], yn = ["aria-checked"], bn = ["data-state"], xn = /* @__PURE__ */ T({
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(e, { emit: r }) {
1680
+ let a = n(), o = e, s = t("multiSelect", Le, () => o.classes), c = r, l = ne(), d = _(() => i(l)), T = _(() => o.display === "chips"), D = _(() => s({
1681
+ size: o.size,
1682
+ clearable: o.clearable && !T.value
1683
+ })), O = a.select, ee = _(() => ({
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
+ })), N = R(""), I = f({
1691
+ items: () => o.items,
1692
+ source: () => o.dataSource,
1693
+ accessors: () => ee.value,
1694
+ pageSize: () => o.pageSize,
1695
+ minSearchLength: () => o.minSearchLength
1696
+ }), { options: L, visible: V, groups: H, ordered: te } = p(() => I.items.value, () => ee.value, () => o.filter && !o.manualFilter && !o.dataSource ? N.value : ""), ie = _(() => [...L.value, ...I.resolvedOptions.value]), { selected: G, keys: K, commit: Y, commitKeys: ae } = m({
1697
+ multiple: !0,
1698
+ model: () => o.modelValue,
1699
+ defaultValue: o.defaultValue,
1700
+ accessors: () => ee.value,
1701
+ items: ie,
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
+ P(() => I.resolve(K.value, ie.value)), q(K, (e) => I.resolve(e, ie.value));
1709
+ let oe = _(() => o.loading || I.loading.value), le = _(() => o.hasMore || I.hasMore.value);
1710
+ function ue() {
1711
+ o.dataSource ? I.loadMore() : c("loadMore");
1712
+ }
1713
+ let de = _(() => o.max !== void 0 && G.value.length >= o.max), fe = _(() => {
1714
+ let e = new Set(K.value);
1715
+ return dt({
1716
+ items: te.value,
1717
+ itemToString: (e) => e.label,
1718
+ itemToValue: (e) => e.key,
1719
+ isItemDisabled: (t) => t.disabled || de.value && !e.has(t.key)
1720
+ });
1721
+ }), pe = _(() => o.filter || o.selectAll), me = re(), _e = _(() => o.emptyText ?? I.emptyText.value ?? (N.value ? a.common.noResults : a.common.empty)), ye = _(() => ({
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
+ })), xe = _(() => G.value.length ? G.value.length > o.maxShown ? (o.summary ?? a.common.selectedCount)(G.value.length) : G.value.map((e) => e.label).join(", ") : o.placeholder ?? a.common.placeholder), Se = _(() => V.value.filter((e) => !e.disabled)), we = _(() => be(G.value, Se.value)), Te = R("");
1737
+ function Ee(e) {
1738
+ let t = o.max !== void 0 && e.length >= o.max && G.value.length < o.max;
1739
+ Y(e), t && (Te.value = O.maxReached(o.max));
1740
+ }
1741
+ function De(e, t) {
1742
+ let n = o.max !== void 0 && e.length >= o.max && G.value.length < o.max;
1743
+ ae(e, t), n && (Te.value = O.maxReached(o.max));
1744
+ }
1745
+ function Oe(e) {
1746
+ Y(G.value.filter((t) => t.key !== e.key)), Te.value = O.removed(e.label);
1747
+ }
1748
+ function ke(e) {
1749
+ let t = G.value.at(-1);
1750
+ t && (T.value && e.key === "Backspace" ? (e.preventDefault(), Oe(t)) : o.clearable && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), Y([])));
1751
+ }
1752
+ function Ae(e) {
1753
+ Y([]), e.focus();
1754
+ }
1755
+ function je(e, t) {
1756
+ N.value = t.target.value, c("filterChange", N.value), o.dataSource && I.search(N.value), !(o.manualFilter || o.dataSource) && A(() => {
1757
+ let t = te.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 && N.value && (N.value = "", c("filterChange", ""), o.dataSource && I.search(""));
1769
+ }
1770
+ let Fe = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, Ie = {
1771
+ sameWidth: !0,
1772
+ gutter: 4
1773
+ }, Re = lt(), ze = _(() => Ce(o.id, "trigger", {
1774
+ label: Re?.value.ids.label,
1775
+ hiddenSelect: Re?.value.ids.control
1776
+ }));
1777
+ return (t, n) => (F(), v(W(Q).Root, k({
1778
+ class: D.value.base({ class: d.value.className }),
1779
+ style: d.value.style,
1780
+ collection: fe.value,
1781
+ multiple: "",
1782
+ "close-on-select": !1,
1783
+ "model-value": W(K),
1784
+ disabled: e.disabled,
1785
+ invalid: e.invalid,
1786
+ required: e.required,
1787
+ name: e.name,
1788
+ positioning: Ie,
1789
+ composite: !pe.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: J(() => [
1797
+ w(W(Q).Context, null, {
1798
+ default: J((n) => [w(W(Q).Control, M(E(T.value || e.clearable ? { class: T.value ? D.value.chipsControl() : D.value.control() } : {})), {
1799
+ default: J(() => [
1800
+ T.value ? (F(!0), b(h, { key: 0 }, z(W(G), (e) => (F(), b("span", {
1801
+ key: e.key,
1802
+ class: j(D.value.chip())
1803
+ }, [x("span", { class: j(D.value.chipText()) }, U(e.label), 3), n.disabled ? y("", !0) : (F(), b("button", {
1804
+ key: 0,
1805
+ type: "button",
1806
+ tabindex: "-1",
1807
+ class: j(D.value.chipRemove()),
1808
+ "aria-label": W(O).removeItem(e.label),
1809
+ onClick: (t) => Oe(e)
1810
+ }, [w(W(ve), {
1811
+ class: j(D.value.chipRemoveIcon()),
1812
+ "aria-hidden": "true"
1813
+ }, null, 8, ["class"])], 10, mn))], 2))), 128)) : y("", !0),
1814
+ w(W(Q).Trigger, k(d.value.rest, {
1815
+ class: T.value ? D.value.chipsTrigger() : D.value.trigger(),
1816
+ "aria-busy": e.loading || void 0,
1817
+ onKeydown: ke
1818
+ }), {
1819
+ default: J(() => [T.value ? (F(), b("span", {
1820
+ key: 0,
1821
+ class: j(D.value.value()),
1822
+ "data-placeholder-shown": !W(G).length || void 0
1823
+ }, [W(G).length ? (F(), b("span", {
1824
+ key: 0,
1825
+ class: j(D.value.hiddenValue())
1826
+ }, U(W(G).map((e) => e.label).join(", ")), 3)) : (F(), b(h, { key: 1 }, [C(U(e.placeholder ?? W(a).common.placeholder), 1)], 64))], 10, hn)) : (F(), b("span", {
1827
+ key: 1,
1828
+ class: j(D.value.value()),
1829
+ "data-placeholder-shown": !W(G).length || void 0
1830
+ }, [t.$slots.value && W(G).length ? B(t.$slots, "value", { items: W(G).map((e) => e.item) }, void 0, void 0, 0) : (F(), b(h, { key: 1 }, [C(U(xe.value), 1)], 64))], 10, gn)), w(W(Q).Indicator, { class: j(D.value.indicator()) }, {
1831
+ default: J(() => [e.loading ? (F(), v(W(he), {
1832
+ key: 0,
1833
+ class: j(D.value.spinner()),
1834
+ "aria-hidden": "true"
1835
+ }, null, 8, ["class"])) : (F(), v(W(ce), {
1836
+ key: 1,
1837
+ class: j(D.value.indicatorIcon()),
1838
+ "aria-hidden": "true"
1839
+ }, null, 8, ["class"]))]),
1840
+ _: 1
1841
+ }, 8, ["class"])]),
1842
+ _: 3
1843
+ }, 16, ["class", "aria-busy"]),
1844
+ e.clearable && W(G).length && !n.disabled ? (F(), b("button", {
1845
+ key: 1,
1846
+ type: "button",
1847
+ tabindex: "-1",
1848
+ class: j(T.value ? D.value.chipsClear() : D.value.clear()),
1849
+ "aria-label": W(O).clear,
1850
+ onClick: (e) => Ae(n)
1851
+ }, [w(W(ve), {
1852
+ class: j(D.value.clearIcon()),
1853
+ "aria-hidden": "true"
1854
+ }, null, 8, ["class"])], 10, _n)) : y("", !0)
1855
+ ]),
1856
+ _: 2
1857
+ }, 1040)]),
1858
+ _: 3
1859
+ }),
1860
+ T.value || e.max !== void 0 || e.dataSource ? (F(), b("span", {
1861
+ key: 0,
1862
+ role: "status",
1863
+ class: j(D.value.status())
1864
+ }, U(Te.value || W(I).announcement.value), 3)) : y("", !0),
1865
+ (F(), v(g, { to: "body" }, [w(W(Q).Positioner, null, {
1866
+ default: J(() => [w(W(Q).Content, {
1867
+ class: j(D.value.content()),
1868
+ "aria-busy": oe.value || void 0,
1869
+ "aria-label": pe.value ? d.value.rest["aria-label"] : void 0
1870
+ }, {
1871
+ default: J(() => [pe.value ? (F(), b(h, { key: 0 }, [x("div", { class: j(D.value.header()) }, [w(W(Q).Context, null, {
1872
+ default: J((t) => [e.filter ? (F(), b("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": W(me),
1881
+ "aria-activedescendant": Fe(t),
1882
+ "aria-label": W(O).filter,
1883
+ placeholder: W(a).combobox.search,
1884
+ value: N.value,
1885
+ class: j(D.value.search()),
1886
+ onInput: (e) => je(t, e),
1887
+ onKeydown: Me
1888
+ }, null, 42, vn)) : y("", !0)]),
1889
+ _: 1
1890
+ }), e.selectAll && Se.value.length ? (F(), b("button", {
1891
+ key: 0,
1892
+ type: "button",
1893
+ role: "checkbox",
1894
+ "aria-checked": we.value,
1895
+ class: j(D.value.selectAll()),
1896
+ onClick: n[0] ||= (t) => Ee(W(at)(W(G), W(V), e.max)),
1897
+ onKeydown: Ne
1898
+ }, [x("span", {
1899
+ class: j(D.value.check()),
1900
+ "data-state": we.value === "mixed" ? "indeterminate" : we.value ? "checked" : "unchecked",
1901
+ "aria-hidden": "true"
1902
+ }, [we.value === "mixed" ? (F(), v(W(ge), {
1903
+ key: 0,
1904
+ class: j(D.value.checkIcon())
1905
+ }, null, 8, ["class"])) : we.value ? (F(), v(W(se), {
1906
+ key: 1,
1907
+ class: j(D.value.checkIcon())
1908
+ }, null, 8, ["class"])) : y("", !0)], 10, bn), C(" " + U(W(O).selectAll), 1)], 42, yn)) : y("", !0)], 2), w(W(Q).List, {
1909
+ id: W(me),
1910
+ class: j(D.value.list()),
1911
+ "data-autofocus": e.filter ? void 0 : ""
1912
+ }, {
1913
+ default: J(() => [w(u, {
1914
+ parts: W(Q),
1915
+ groups: W(H),
1916
+ classes: ye.value,
1917
+ checkbox: e.checkboxes,
1918
+ loading: oe.value,
1919
+ "loading-text": e.loadingText ?? W(a).common.loading,
1920
+ "has-more": le.value,
1921
+ "empty-text": _e.value,
1922
+ onLoadMore: ue
1923
+ }, S({ _: 2 }, [t.$slots.item ? {
1924
+ name: "item",
1925
+ fn: J((e) => [B(t.$slots, "item", M(E(e)))]),
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)) : (F(), v(u, {
1943
+ key: 1,
1944
+ parts: W(Q),
1945
+ groups: W(H),
1946
+ classes: ye.value,
1947
+ checkbox: e.checkboxes,
1948
+ loading: oe.value,
1949
+ "loading-text": e.loadingText ?? W(a).common.loading,
1950
+ "has-more": le.value,
1951
+ "empty-text": _e.value,
1952
+ onLoadMore: ue
1953
+ }, S({ _: 2 }, [t.$slots.item ? {
1954
+ name: "item",
1955
+ fn: J((e) => [B(t.$slots, "item", M(E(e)))]),
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
+ w(W(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
+ }), Sn = ["id"], Cn = ["id"], wn = /* @__PURE__ */ T({
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: () => De },
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
+ emptyFallback: {},
2041
+ selectOnFocus: { type: Boolean },
2042
+ loading: { type: Boolean },
2043
+ clearable: { type: Boolean },
2044
+ clearLabel: {},
2045
+ id: {},
2046
+ classes: {}
2047
+ },
2048
+ emits: ["update:modelValue"],
2049
+ setup(r, { expose: c, emit: l }) {
2050
+ let u = e(), d = n(), f = r, p = t("numberInput", Re, () => f.classes), m = _(() => f.locale ?? u.value.locale), g = l, x = ne(), S = _(() => i(x)), C = lt(), T = a(), E = _(() => !!f.invalid || !!C?.value.invalid), D = _(() => !E.value && (!!f.success || T.value.success)), O = _(() => p({
2051
+ size: f.size,
2052
+ stacked: f.stepperLayout === "stacked",
2053
+ success: D.value
2054
+ })), A = _(() => f.decimals === void 0 ? f.allowDecimal ? f.formatOptions : {
2055
+ ...f.formatOptions,
2056
+ maximumFractionDigits: 0
2057
+ } : {
2058
+ ...f.formatOptions,
2059
+ minimumFractionDigits: f.decimals,
2060
+ maximumFractionDigits: f.decimals
2061
+ }), M = _(() => f.allowNegative ? f.min : Math.max(f.min ?? 0, 0)), N, P = f.modelValue ?? f.defaultValue ?? null, I = tt(f.modelValue ?? f.defaultValue, m.value, A.value), L = R(I ?? ""), z = xt(_(() => ({
2062
+ defaultValue: I,
2063
+ min: M.value,
2064
+ max: f.max,
2065
+ step: f.step,
2066
+ formatOptions: A.value,
2067
+ locale: m.value,
2068
+ invalid: f.invalid,
2069
+ disabled: f.disabled,
2070
+ readOnly: f.readOnly,
2071
+ required: f.required,
2072
+ name: f.name,
2073
+ clampValueOnBlur: f.clampBehavior !== "none",
2074
+ allowOverflow: f.clampBehavior !== "strict",
2075
+ translations: d.numberInput,
2076
+ ...Ce(f.id, "input", {
2077
+ label: C?.value.ids.label,
2078
+ input: C?.value.ids.control
2079
+ }),
2080
+ onValueChange: (e) => {
2081
+ L.value = e.value;
2082
+ let t = Number.isNaN(e.valueAsNumber) ? null : e.valueAsNumber;
2083
+ t === null && f.emptyFallback || (t !== null && (P = t), N = t, g("update:modelValue", t));
2084
+ },
2085
+ onValueCommit: (e) => {
2086
+ f.emptyFallback && Number.isNaN(e.valueAsNumber) && z.value.setValue(f.emptyFallback === "previous" && P !== null ? P : M.value ?? 0);
2087
+ }
2088
+ })));
2089
+ q(() => f.modelValue, (e) => {
2090
+ e !== void 0 && e !== N && (e !== null && (P = e), e === null ? z.value.clearValue() : z.value.setValue(e));
2091
+ });
2092
+ function B(e) {
2093
+ if (e.ctrlKey || e.metaKey || e.altKey) return;
2094
+ let t = e.currentTarget, n = t.selectionStart ?? t.value.length, r = t.value.slice(0, n) + t.value.slice(t.selectionEnd ?? n), i = ze(e.key, r, m.value, {
2095
+ allowDecimal: f.allowDecimal && f.decimals !== 0,
2096
+ allowNegative: f.allowNegative
2097
+ });
2098
+ i && (e.preventDefault(), i !== "block" && je(t, i.insert));
2099
+ }
2100
+ function V(e) {
2101
+ let t = e.currentTarget, n = (t.selectionStart ?? 0) === 0 && (t.selectionEnd ?? 0) === t.value.length, r = He(e.clipboardData?.getData("text") ?? "", m.value);
2102
+ n && r !== null && (e.preventDefault(), Je(t, tt(r, m.value, A.value)));
2103
+ }
2104
+ function H(e) {
2105
+ if (!f.selectOnFocus) return;
2106
+ let t = e.currentTarget;
2107
+ requestAnimationFrame(() => t.select());
2108
+ }
2109
+ let te = re(), ie = re(), K = _(() => f.prefix || f.suffix ? [
2110
+ C?.value.ariaDescribedby,
2111
+ f.prefix && te,
2112
+ f.suffix && ie,
2113
+ S.value.rest["aria-describedby"]
2114
+ ].filter(Boolean).join(" ") : void 0), Y = _(() => !!f.disabled || !!f.readOnly || !!C?.value.disabled || !!C?.value.readOnly), ae = G("control");
2115
+ function oe() {
2116
+ let e = ae.value?.$el.querySelector("input");
2117
+ e && (Je(e), e.focus());
2118
+ }
2119
+ return c(o(() => ae.value?.$el.querySelector("input"))), (e, t) => (F(), v(W(bt).RootProvider, {
2120
+ value: W(z),
2121
+ class: j(O.value.base({ class: S.value.className })),
2122
+ style: ee(S.value.style)
2123
+ }, {
2124
+ default: J(() => [w(W(bt).Control, {
2125
+ ref_key: "control",
2126
+ ref: ae,
2127
+ class: j(O.value.control())
2128
+ }, {
2129
+ default: J(() => [
2130
+ r.prefix ? (F(), b("span", {
2131
+ key: 0,
2132
+ id: W(te),
2133
+ class: j(O.value.prefix())
2134
+ }, U(r.prefix), 11, Sn)) : y("", !0),
2135
+ w(W(bt).Input, k({
2136
+ ...S.value.rest,
2137
+ ...K.value ? { "aria-describedby": K.value } : {}
2138
+ }, {
2139
+ value: L.value,
2140
+ class: O.value.input(),
2141
+ "aria-busy": r.loading || void 0,
2142
+ onKeydown: B,
2143
+ onPaste: V,
2144
+ onFocus: H
2145
+ }), null, 16, [
2146
+ "value",
2147
+ "class",
2148
+ "aria-busy"
2149
+ ]),
2150
+ r.loading || r.clearable || D.value ? (F(), v(s, {
2151
+ key: 1,
2152
+ loading: r.loading,
2153
+ clear: r.clearable && !!L.value && !Y.value,
2154
+ "clear-label": r.clearLabel ?? W(d).field.clear,
2155
+ success: D.value,
2156
+ classes: {
2157
+ spinner: O.value.spinner(),
2158
+ clear: O.value.clear(),
2159
+ clearIcon: O.value.clearIcon(),
2160
+ statusIcon: O.value.statusIcon()
2161
+ },
2162
+ onClear: oe
2163
+ }, null, 8, [
2164
+ "loading",
2165
+ "clear",
2166
+ "clear-label",
2167
+ "success",
2168
+ "classes"
2169
+ ])) : y("", !0),
2170
+ r.suffix ? (F(), b("span", {
2171
+ key: 2,
2172
+ id: W(ie),
2173
+ class: j(O.value.suffix())
2174
+ }, U(r.suffix), 11, Cn)) : y("", !0),
2175
+ r.stepper && r.stepperLayout === "stacked" ? (F(), b("div", {
2176
+ key: 3,
2177
+ class: j(O.value.stepper())
2178
+ }, [w(W(bt).IncrementTrigger, { class: j(O.value.button()) }, {
2179
+ default: J(() => [w(W(de), {
2180
+ class: j(O.value.buttonIcon()),
2181
+ "aria-hidden": "true"
2182
+ }, null, 8, ["class"])]),
2183
+ _: 1
2184
+ }, 8, ["class"]), w(W(bt).DecrementTrigger, { class: j(O.value.button()) }, {
2185
+ default: J(() => [w(W(ce), {
2186
+ class: j(O.value.buttonIcon()),
2187
+ "aria-hidden": "true"
2188
+ }, null, 8, ["class"])]),
2189
+ _: 1
2190
+ }, 8, ["class"])], 2)) : r.stepper ? (F(), b(h, { key: 4 }, [w(W(bt).DecrementTrigger, { class: j(O.value.button()) }, {
2191
+ default: J(() => [w(W(ge), {
2192
+ class: j(O.value.buttonIcon()),
2193
+ "aria-hidden": "true"
2194
+ }, null, 8, ["class"])]),
2195
+ _: 1
2196
+ }, 8, ["class"]), w(W(bt).IncrementTrigger, { class: j(O.value.button()) }, {
2197
+ default: J(() => [w(W(_e), {
2198
+ class: j(O.value.buttonIcon()),
2199
+ "aria-hidden": "true"
2200
+ }, null, 8, ["class"])]),
2201
+ _: 1
2202
+ }, 8, ["class"])], 64)) : y("", !0)
2203
+ ]),
2204
+ _: 1
2205
+ }, 8, ["class"])]),
2206
+ _: 1
2207
+ }, 8, [
2208
+ "value",
2209
+ "class",
2210
+ "style"
2211
+ ]));
2212
+ }
2213
+ }), Tn = /* @__PURE__ */ T({
2214
+ inheritAttrs: !1,
2215
+ __name: "DateRangePicker",
2216
+ props: {
2217
+ modelValue: { default: void 0 },
2218
+ defaultValue: { default: void 0 },
2219
+ valueType: { default: "string" },
2220
+ withTime: {
2221
+ type: Boolean,
2222
+ default: !1
2223
+ },
2224
+ min: {},
2225
+ max: {},
2226
+ isDateUnavailable: {},
2227
+ excludeDates: {},
2228
+ locale: {},
2229
+ disabled: {
2230
+ type: Boolean,
2231
+ default: void 0
2232
+ },
2233
+ readOnly: {
2234
+ type: Boolean,
2235
+ default: void 0
2236
+ },
2237
+ invalid: {
2238
+ type: Boolean,
2239
+ default: void 0
2240
+ },
2241
+ required: {
2242
+ type: Boolean,
2243
+ default: void 0
2244
+ },
2245
+ name: {},
2246
+ placeholder: {},
2247
+ presets: {},
2248
+ size: {},
2249
+ clearable: {
2250
+ type: Boolean,
2251
+ default: !0
2252
+ },
2253
+ showButtonBar: { type: Boolean },
2254
+ showWeekNumbers: { type: Boolean },
2255
+ numberOfMonths: {},
2256
+ highlightToday: {
2257
+ type: Boolean,
2258
+ default: !0
2259
+ },
2260
+ hideOutsideDays: { type: Boolean },
2261
+ firstDayOfWeek: {},
2262
+ weekendDays: {},
2263
+ timeZone: {},
2264
+ showTimeZone: { type: Boolean },
2265
+ responsive: { type: Boolean },
2266
+ id: {},
2267
+ classes: {}
2268
+ },
2269
+ emits: ["update:modelValue"],
2270
+ setup(t, { emit: r }) {
2271
+ let a = e(), o = n(), s = t, c = _(() => s.locale ?? a.value.locale), u = r, d = ne(), f = _(() => i(d)), p = _(() => f.value.rest["aria-label"]);
2272
+ l("DateRangePicker", () => s.id);
2273
+ let m = R(s.defaultValue ?? null), h = _(() => s.modelValue === void 0 ? m.value : s.modelValue), g = (e) => [e?.start, e?.end].map((e) => Xt(e, s.withTime, s.timeZone)).filter((e) => !!e), y = _(() => g(h.value)), b = (e) => Qt(e, s.withTime, s.timeZone);
2274
+ function x(e) {
2275
+ let t = e.length ? {
2276
+ start: Zt(e[0], s.withTime, s.valueType, s.timeZone),
2277
+ end: Zt(e[1], s.withTime, s.valueType, s.timeZone)
2278
+ } : null;
2279
+ (b(t?.start) !== b(h.value?.start) || b(t?.end) !== b(h.value?.end)) && (m.value = t, u("update:modelValue", t));
2280
+ }
2281
+ let C = _(() => ({
2282
+ min: Xt(s.min, s.withTime, s.timeZone, "min"),
2283
+ max: Xt(s.max, s.withTime, s.timeZone, "max")
2284
+ })), w = _(() => s.presets?.map((e) => {
2285
+ if (typeof e != "string") return {
2286
+ label: e.label,
2287
+ value: g(e.value)
2288
+ };
2289
+ let t = Ke(e);
2290
+ return t ? {
2291
+ label: o.rangePresets[e] ?? e,
2292
+ value: [Yt(t.start, s.withTime), Yt(t.end, s.withTime, "max")]
2293
+ } : e;
2294
+ })), T = _(() => $t(s.isDateUnavailable, s.excludeDates));
2295
+ return (e, n) => (F(), v(fn, k({
2296
+ mode: "range",
2297
+ dates: y.value,
2298
+ "with-time": t.withTime
2299
+ }, C.value, {
2300
+ "is-date-unavailable": T.value,
2301
+ locale: c.value,
2302
+ disabled: t.disabled,
2303
+ "read-only": t.readOnly,
2304
+ invalid: t.invalid,
2305
+ required: t.required,
2306
+ name: t.name,
2307
+ presets: w.value,
2308
+ label: p.value,
2309
+ "own-id": t.id,
2310
+ placeholder: t.placeholder,
2311
+ classes: t.classes,
2312
+ "class-name": f.value.className,
2313
+ style: f.value.style,
2314
+ size: t.size,
2315
+ "hide-clear": !t.clearable,
2316
+ "show-button-bar": t.showButtonBar,
2317
+ "show-week-numbers": t.showWeekNumbers,
2318
+ "number-of-months": t.numberOfMonths,
2319
+ "plain-today": !t.highlightToday,
2320
+ "hide-outside-days": t.hideOutsideDays,
2321
+ "first-day-of-week": t.firstDayOfWeek,
2322
+ "weekend-days": t.weekendDays,
2323
+ "time-zone": t.timeZone,
2324
+ "show-time-zone": t.showTimeZone,
2325
+ responsive: t.responsive,
2326
+ onChange: x
2327
+ }), S({ _: 2 }, [e.$slots.day ? {
2328
+ name: "day",
2329
+ fn: J((t) => [B(e.$slots, "day", M(E(t)))]),
2330
+ key: "0"
2331
+ } : void 0]), 1040, /* @__PURE__ */ "dates.with-time.is-date-unavailable.locale.disabled.read-only.invalid.required.name.presets.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.time-zone.show-time-zone.responsive".split(".")));
2332
+ }
2333
+ }), En = /* @__PURE__ */ T({
2334
+ __name: "ContextMenu",
2335
+ props: {
2336
+ items: {},
2337
+ label: {},
2338
+ linkAs: {},
2339
+ open: {
2340
+ type: Boolean,
2341
+ default: void 0
2342
+ },
2343
+ closeOnScroll: { type: Boolean },
2344
+ closeOnResize: { type: Boolean },
2345
+ closeOnBlur: { type: Boolean },
2346
+ highlightFirst: { type: Boolean },
2347
+ classes: {}
2348
+ },
2349
+ emits: [
2350
+ "select",
2351
+ "checked-change",
2352
+ "value-change",
2353
+ "update:open",
2354
+ "before-open"
2355
+ ],
2356
+ setup(e, { expose: n, emit: r }) {
2357
+ let i = e, a = t("menu", Fe, () => i.classes), o = r, s = a();
2358
+ Ct({
2359
+ items: () => i.items,
2360
+ linkAs: () => i.linkAs,
2361
+ onCheckedChange: (e, t) => o("checked-change", e, t),
2362
+ onValueChange: (e, t) => o("value-change", e, t)
2363
+ });
2364
+ let c = Dt({
2365
+ open: () => i.open,
2366
+ anchor: () => void 0,
2367
+ onOpenChange: (e) => o("update:open", e),
2368
+ restoreFocus: !0
2369
+ });
2370
+ n(c.handle);
2371
+ let l = G("content"), u = Tt({
2372
+ open: () => c.isOpen.value,
2373
+ close: c.handle.close,
2374
+ content: () => l.value?.$el,
2375
+ closeOnScroll: () => i.closeOnScroll,
2376
+ closeOnResize: () => i.closeOnResize,
2377
+ closeOnBlur: () => i.closeOnBlur,
2378
+ highlightFirst: () => i.highlightFirst
2379
+ }), d = null, f = Te((e) => {
2380
+ d && o("before-open", d, {
2381
+ source: "pointer",
2382
+ focused: null
2383
+ }), c.handle.open(e);
2384
+ }), p = we();
2385
+ function m(e) {
2386
+ d = e.target, p.pointerdown(), f.down(e);
2387
+ }
2388
+ N(f.cancel);
2389
+ let h = _(() => c.positioning({}));
2390
+ return (t, n) => (F(), v(W(X).Root, k({
2391
+ open: W(c).isOpen.value,
2392
+ positioning: h.value,
2393
+ "anchor-point": W(c).anchorPoint.value
2394
+ }, W(u), {
2395
+ "lazy-mount": "",
2396
+ "unmount-on-exit": "",
2397
+ "onUpdate:open": n[6] ||= (e) => W(c).onOpenChange(e),
2398
+ onSelect: n[7] ||= (e) => o("select", e.value)
2399
+ }), {
2400
+ default: J(() => [w(W(X).ContextTrigger, {
2401
+ "as-child": "",
2402
+ onPointerdown: m,
2403
+ onKeydown: n[0] ||= (e) => W(p).keydown(e),
2404
+ onContextmenu: n[1] ||= (e) => o("before-open", e.target, W(p).contextmenu()),
2405
+ onPointermove: n[2] ||= (e) => W(f).move(e),
2406
+ onPointerup: n[3] ||= (e) => W(f).cancel(),
2407
+ onPointercancel: n[4] ||= (e) => W(f).cancel()
2408
+ }, {
2409
+ default: J(() => [B(t.$slots, "default")]),
2410
+ _: 3
2411
+ }), (F(), v(g, { to: "body" }, [w(W(X).Positioner, null, {
2412
+ default: J(() => [w(W(X).Content, k({
2413
+ ref_key: "content",
2414
+ ref: l,
2415
+ class: W(s).content()
2416
+ }, e.label ? {
2417
+ "aria-label": e.label,
2418
+ "aria-labelledby": void 0
2419
+ } : {}), {
2420
+ default: J(() => [w(Et, {
2421
+ entries: e.items,
2422
+ onSelect: n[5] ||= (e) => o("select", e)
2423
+ }, S({ _: 2 }, [t.$slots.item ? {
2424
+ name: "item",
2425
+ fn: J((e) => [B(t.$slots, "item", M(E(e)))]),
2426
+ key: "0"
2427
+ } : void 0]), 1032, ["entries"])]),
2428
+ _: 3
2429
+ }, 16, ["class"])]),
2430
+ _: 3
2431
+ })]))]),
2432
+ _: 3
2433
+ }, 16, [
2434
+ "open",
2435
+ "positioning",
2436
+ "anchor-point"
2437
+ ]));
2438
+ }
2439
+ }), Dn = /* @__PURE__ */ T({
2440
+ __name: "RecipesProvider",
2441
+ props: { recipes: {} },
2442
+ setup(e) {
2443
+ let t = e;
2444
+ return r(() => t.recipes), (e, t) => B(e.$slots, "default");
2445
+ }
2446
+ });
2447
+ //#endregion
2448
+ export { Ct as C, Et as S, Lt as _, xn as a, jt as b, Xt as c, Zt as d, an as f, Gt as g, qt as h, wn as i, nn as l, Qt as m, En as n, pn as o, $t as p, Tn as r, fn as s, Dn as t, on as u, It as v, Dt as x, Nt as y };