@ianicdev/datatables2 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{Columns-uuugU4i9.cjs → Columns-YRc6N3N3.cjs} +1 -1
  2. package/dist/{Columns-BVivQbA1.js → Columns-pBvbnYlf.js} +1 -1
  3. package/dist/{Comparison-BNSlLRqf.cjs → Comparison--anN00Qz.cjs} +1 -1
  4. package/dist/{Comparison-D6zByMKH.js → Comparison-DRfZKR1Q.js} +1 -1
  5. package/dist/Datepicker-Bo4pQ0Ky.cjs +2 -0
  6. package/dist/Datepicker-DVl_NGDU.js +1411 -0
  7. package/dist/{Download-BSWYh8Kp.js → Download-BsS86MB6.js} +1 -1
  8. package/dist/{Download-CnCzctX1.cjs → Download-Cn0vLJdo.cjs} +1 -1
  9. package/dist/{Options-CB6BQtI-.cjs → Options-C07MvEiF.cjs} +1 -1
  10. package/dist/{Options-1LMo1jYF.js → Options-DCQAU-J6.js} +1 -1
  11. package/dist/{RefreshTable-DIwWSpaJ.cjs → RefreshTable-A1eCYmwb.cjs} +1 -1
  12. package/dist/{RefreshTable-DEXlcdI0.js → RefreshTable-CJghSR2x.js} +2 -2
  13. package/dist/{Search-BNaYhckX.cjs → Search-Ctr2CVNw.cjs} +1 -1
  14. package/dist/{Search-BsWYytSk.js → Search-btos05iH.js} +2 -2
  15. package/dist/Table-BPOv1XC0.cjs +1 -0
  16. package/dist/{Table-BMwdrPuC.js → Table-BtvvPIo_.js} +23 -21
  17. package/dist/{TableServer-DaBF1vxr.js → TableServer-BPveUKR2.js} +1136 -1137
  18. package/dist/TableServer-LBPwG9Z1.cjs +20 -0
  19. package/dist/cellRender-DM-C_7Lj.cjs +1 -0
  20. package/dist/cellRender-D_-HT--u.js +2351 -0
  21. package/dist/{dataTables-CxEnAUfF.js → dataTables-4_0nZg-y.js} +2409 -2263
  22. package/dist/dataTables-CnvsuROu.cjs +4 -0
  23. package/dist/datatables.cjs +1 -1
  24. package/dist/datatables.js +1 -1
  25. package/dist/datatables2.css +1 -1
  26. package/dist/{index-VkGoAdXo.cjs → index-B0N3w8xu.cjs} +1 -1
  27. package/dist/{index-Bc0AtRk2.js → index-ByfcZypn.js} +1 -1
  28. package/dist/index-CHiQ3XrO.cjs +1 -0
  29. package/dist/index-D-1LWR3S.js +4090 -0
  30. package/package.json +8 -8
  31. package/dist/Datepicker-B8PS_dQ1.cjs +0 -1
  32. package/dist/Datepicker-DXbpHltW.js +0 -1269
  33. package/dist/Table-CGDzgkKx.cjs +0 -1
  34. package/dist/TableServer-ZDSaEYRy.cjs +0 -20
  35. package/dist/cellRender-BuLj_AFK.js +0 -2298
  36. package/dist/cellRender-CYGQmmZC.cjs +0 -1
  37. package/dist/dataTables-P7hOrFAn.cjs +0 -4
  38. package/dist/index-BjcvkMIS.js +0 -4106
  39. package/dist/index-DfTO4Zx6.cjs +0 -1
@@ -0,0 +1,1411 @@
1
+ import { inject as Ke, reactive as Ze, watch as fe, createVNode as g, mergeProps as F, createElementVNode as w, normalizeStyle as Te, normalizeClass as ie, ref as ce, watchEffect as ge, computed as M, Fragment as Q, shallowRef as oe, toRef as z, createTextVNode as qe, withDirectives as Ge, mergeModels as Qe, useModel as Xe, createBlock as et, openBlock as tt, unref as De, isRef as at } from "vue";
2
+ import G from "moment";
3
+ import { T as ue, c as $e, g as Z, p as U, P as Fe, u as q, e as ve, K as L, aY as Ve, J as nt, a7 as $, ax as me, I as se, W as Be, H as lt, N as ee, S as K, aU as We, ay as xe, aZ as rt, a0 as it, al as ot, ae as ut, ah as dt, a1 as st, aD as ct, a2 as ft, an as vt } from "./dataTables-4_0nZg-y.js";
4
+ import { j as Pe, m as mt, l as yt, g as we, n as ht, o as kt } from "./index-D-1LWR3S.js";
5
+ const gt = Symbol.for("vuetify:date-options");
6
+ function Ne(e, a, l) {
7
+ const r = Ee(e, a, l), t = [a];
8
+ for (let i = 1; i < r; i++) {
9
+ const o = e.addDays(a, i);
10
+ t.push(o);
11
+ }
12
+ return l && t.push(e.endOfDay(l)), t;
13
+ }
14
+ function Ee(e, a, l) {
15
+ const r = [`${e.toISO(l ?? a).split("T")[0]}T00:00:00Z`, `${e.toISO(a).split("T")[0]}T00:00:00Z`];
16
+ return typeof e.date() == "string" ? e.getDiff(r[0], r[1], "days") : e.getDiff(e.date(r[0]), e.date(r[1]), "days");
17
+ }
18
+ function bt(e, a) {
19
+ const l = Ze(typeof e.adapter == "function" ? new e.adapter({
20
+ locale: e.locale[a.current.value] ?? a.current.value,
21
+ formats: e.formats
22
+ }) : e.adapter);
23
+ return fe(a.current, (r) => {
24
+ l.locale = e.locale[r] ?? r ?? l.locale;
25
+ }), l;
26
+ }
27
+ function te() {
28
+ const e = Ke(gt);
29
+ if (!e) throw new Error("[Vuetify] Could not find injected date options");
30
+ const a = ue();
31
+ return bt(e, a);
32
+ }
33
+ const Dt = $e("v-picker-title"), Re = U({
34
+ bgColor: String,
35
+ divided: Boolean,
36
+ landscape: Boolean,
37
+ title: String,
38
+ hideHeader: Boolean,
39
+ hideTitle: Boolean,
40
+ ...mt()
41
+ }, "VPicker"), Me = Z()({
42
+ name: "VPicker",
43
+ props: Re(),
44
+ setup(e, a) {
45
+ let {
46
+ slots: l
47
+ } = a;
48
+ const {
49
+ backgroundColorClasses: r,
50
+ backgroundColorStyles: t
51
+ } = Fe(() => e.color);
52
+ return q(() => {
53
+ const i = Pe.filterProps(e), o = !e.hideTitle && !!(e.title || l.title);
54
+ return g(Pe, F(i, {
55
+ color: e.bgColor,
56
+ class: ["v-picker", {
57
+ "v-picker--divided": e.divided,
58
+ "v-picker--landscape": e.landscape,
59
+ "v-picker--with-actions": !!l.actions
60
+ }, e.class],
61
+ style: e.style
62
+ }), {
63
+ default: () => [!e.hideHeader && w("div", {
64
+ key: "header",
65
+ class: ie(["v-picker__header-wrapper", r.value]),
66
+ style: Te([t.value])
67
+ }, [o && g(Dt, {
68
+ key: "picker-title"
69
+ }, {
70
+ default: () => [l.title?.() ?? e.title]
71
+ }), l.header && w("div", {
72
+ class: "v-picker__header"
73
+ }, [l.header()])]), w("div", {
74
+ class: "v-picker__body"
75
+ }, [l.default?.()]), l.actions && g(ve, {
76
+ defaults: {
77
+ VBtn: {
78
+ slim: !0,
79
+ variant: "text"
80
+ }
81
+ }
82
+ }, {
83
+ default: () => [w("div", {
84
+ class: "v-picker__actions"
85
+ }, [l.actions()])]
86
+ })]
87
+ });
88
+ }), {};
89
+ }
90
+ }), Le = U({
91
+ modelValue: null,
92
+ color: String,
93
+ cancelText: {
94
+ type: String,
95
+ default: "$vuetify.confirmEdit.cancel"
96
+ },
97
+ okText: {
98
+ type: String,
99
+ default: "$vuetify.confirmEdit.ok"
100
+ },
101
+ disabled: {
102
+ type: [Boolean, Array],
103
+ default: void 0
104
+ },
105
+ hideActions: Boolean
106
+ }, "VConfirmEdit"), Se = Z()({
107
+ name: "VConfirmEdit",
108
+ props: Le(),
109
+ emits: {
110
+ cancel: () => !0,
111
+ save: (e) => !0,
112
+ "update:modelValue": (e) => !0
113
+ },
114
+ setup(e, a) {
115
+ let {
116
+ emit: l,
117
+ slots: r
118
+ } = a;
119
+ const t = L(e, "modelValue"), i = ce();
120
+ ge(() => {
121
+ i.value = structuredClone(Ve(t.value));
122
+ });
123
+ const {
124
+ t: o
125
+ } = ue(), u = M(() => nt(t.value, i.value));
126
+ function d(n) {
127
+ return typeof e.disabled == "boolean" ? e.disabled : Array.isArray(e.disabled) ? e.disabled.includes(n) : u.value;
128
+ }
129
+ const k = M(() => d("save")), f = M(() => d("cancel"));
130
+ function m() {
131
+ t.value = i.value, l("save", i.value);
132
+ }
133
+ function b() {
134
+ i.value = structuredClone(Ve(t.value)), l("cancel");
135
+ }
136
+ function C(n) {
137
+ return w(Q, null, [g($, F({
138
+ disabled: f.value,
139
+ variant: "text",
140
+ color: e.color,
141
+ onClick: b,
142
+ text: o(e.cancelText)
143
+ }, n), null), g($, F({
144
+ disabled: k.value,
145
+ variant: "text",
146
+ color: e.color,
147
+ onClick: m,
148
+ text: o(e.okText)
149
+ }, n), null)]);
150
+ }
151
+ let Y = !1;
152
+ return q(() => w(Q, null, [r.default?.({
153
+ model: i,
154
+ save: m,
155
+ cancel: b,
156
+ isPristine: u.value,
157
+ get actions() {
158
+ return Y = !0, C;
159
+ }
160
+ }), !e.hideActions && !Y && C()])), {
161
+ save: m,
162
+ cancel: b,
163
+ isPristine: u
164
+ };
165
+ }
166
+ }), Ce = $e("v-spacer", "div", "VSpacer"), Ue = U({
167
+ active: {
168
+ type: [String, Array],
169
+ default: void 0
170
+ },
171
+ controlHeight: [Number, String],
172
+ controlVariant: {
173
+ type: String,
174
+ default: "docked"
175
+ },
176
+ noMonthPicker: Boolean,
177
+ disabled: {
178
+ type: [Boolean, String, Array],
179
+ default: null
180
+ },
181
+ nextIcon: {
182
+ type: se,
183
+ default: "$next"
184
+ },
185
+ prevIcon: {
186
+ type: se,
187
+ default: "$prev"
188
+ },
189
+ modeIcon: {
190
+ type: se,
191
+ default: "$subgroup"
192
+ },
193
+ text: String,
194
+ monthText: String,
195
+ yearText: String,
196
+ viewMode: {
197
+ type: String,
198
+ default: "month"
199
+ }
200
+ }, "VDatePickerControls"), Ae = Z()({
201
+ name: "VDatePickerControls",
202
+ props: Ue(),
203
+ emits: {
204
+ "click:year": () => !0,
205
+ "click:month": () => !0,
206
+ "click:prev": () => !0,
207
+ "click:next": () => !0,
208
+ "click:prev-year": () => !0,
209
+ "click:next-year": () => !0
210
+ },
211
+ setup(e, a) {
212
+ let {
213
+ emit: l,
214
+ slots: r
215
+ } = a;
216
+ const {
217
+ t
218
+ } = ue(), i = M(() => Array.isArray(e.disabled) ? e.disabled.includes("text") : !!e.disabled), o = M(() => Array.isArray(e.disabled) ? e.disabled.includes("mode") : !!e.disabled), u = M(() => Array.isArray(e.disabled) ? e.disabled.includes("prev-month") : !!e.disabled), d = M(() => Array.isArray(e.disabled) ? e.disabled.includes("next-month") : !!e.disabled), k = M(() => Array.isArray(e.disabled) ? e.disabled.includes("prev-year") : !!e.disabled), f = M(() => Array.isArray(e.disabled) ? e.disabled.includes("next-year") : !!e.disabled);
219
+ function m() {
220
+ l("click:prev");
221
+ }
222
+ function b() {
223
+ l("click:next");
224
+ }
225
+ function C() {
226
+ l("click:prev-year");
227
+ }
228
+ function Y() {
229
+ l("click:next-year");
230
+ }
231
+ function n() {
232
+ l("click:year");
233
+ }
234
+ function v() {
235
+ l("click:month");
236
+ }
237
+ return q(() => {
238
+ const s = {
239
+ VBtn: {
240
+ density: "comfortable",
241
+ variant: "text"
242
+ }
243
+ }, D = g($, {
244
+ "data-testid": "prev-month",
245
+ disabled: u.value,
246
+ icon: e.prevIcon,
247
+ "aria-label": t("$vuetify.datePicker.ariaLabel.previousMonth"),
248
+ onClick: m
249
+ }, null), A = g($, {
250
+ "data-testid": "next-month",
251
+ disabled: d.value,
252
+ icon: e.nextIcon,
253
+ "aria-label": t("$vuetify.datePicker.ariaLabel.nextMonth"),
254
+ onClick: b
255
+ }, null), S = g($, {
256
+ "data-testid": "prev-year",
257
+ disabled: k.value,
258
+ icon: e.prevIcon,
259
+ "aria-label": t("$vuetify.datePicker.ariaLabel.previousYear"),
260
+ onClick: C
261
+ }, null), _ = g($, {
262
+ "data-testid": "next-year",
263
+ disabled: f.value,
264
+ icon: e.nextIcon,
265
+ "aria-label": t("$vuetify.datePicker.ariaLabel.nextYear"),
266
+ onClick: Y
267
+ }, null), c = g($, {
268
+ class: "v-date-picker-controls__only-month-btn",
269
+ "data-testid": "month-btn",
270
+ density: "default",
271
+ disabled: i.value,
272
+ text: e.monthText,
273
+ appendIcon: e.modeIcon,
274
+ rounded: !0,
275
+ "aria-label": t("$vuetify.datePicker.ariaLabel.selectMonth"),
276
+ onClick: v
277
+ }, null), x = g($, {
278
+ class: "v-date-picker-controls__only-year-btn",
279
+ "data-testid": "year-btn",
280
+ density: "default",
281
+ disabled: o.value,
282
+ text: e.yearText,
283
+ appendIcon: e.modeIcon,
284
+ rounded: !0,
285
+ "aria-label": t("$vuetify.datePicker.ariaLabel.selectYear"),
286
+ onClick: n
287
+ }, null), P = g($, {
288
+ class: "v-date-picker-controls__year-btn",
289
+ "data-testid": "year-btn",
290
+ density: "default",
291
+ disabled: o.value,
292
+ text: e.text,
293
+ appendIcon: e.modeIcon,
294
+ rounded: !0,
295
+ "aria-label": t("$vuetify.datePicker.ariaLabel.selectYear"),
296
+ onClick: n
297
+ }, null), I = w(Q, null, [g($, {
298
+ class: "v-date-picker-controls__month-btn",
299
+ "data-testid": "month-btn",
300
+ height: "36",
301
+ disabled: i.value,
302
+ text: e.text,
303
+ rounded: !0,
304
+ "aria-label": t("$vuetify.datePicker.ariaLabel.selectMonth"),
305
+ onClick: v
306
+ }, null), g($, {
307
+ class: "v-date-picker-controls__mode-btn",
308
+ "data-testid": "year-btn",
309
+ disabled: o.value,
310
+ icon: e.modeIcon,
311
+ "aria-label": t("$vuetify.datePicker.ariaLabel.selectYear"),
312
+ onClick: n
313
+ }, null)]), B = {
314
+ viewMode: e.viewMode,
315
+ disabled: Array.isArray(e.disabled) ? e.disabled : [],
316
+ monthYearText: e.text ?? "",
317
+ monthText: e.monthText ?? "",
318
+ yearText: e.yearText ?? "",
319
+ openMonths: v,
320
+ openYears: n,
321
+ prevMonth: m,
322
+ nextMonth: b,
323
+ prevYear: C,
324
+ nextYear: Y
325
+ }, H = w(Q, null, [e.noMonthPicker ? P : I, g(Ce, null, null), w("div", {
326
+ class: "v-date-picker-controls__month"
327
+ }, [D, A])]), ae = w(Q, null, [w("div", {
328
+ class: "v-date-picker-controls__month"
329
+ }, [D, c, A]), g(Ce, null, null), w("div", {
330
+ class: "v-date-picker-controls__year"
331
+ }, [S, x, _])]);
332
+ return g(ve, {
333
+ defaults: s
334
+ }, {
335
+ default: () => [w("div", {
336
+ class: ie(["v-date-picker-controls", `v-date-picker-controls--variant-${e.controlVariant}`]),
337
+ style: {
338
+ "--v-date-picker-controls-height": me(e.controlHeight)
339
+ }
340
+ }, [r.default?.(B) ?? w(Q, null, [e.controlVariant === "modal" && H, e.controlVariant === "docked" && ae])])]
341
+ });
342
+ }), {};
343
+ }
344
+ }), Vt = U({
345
+ appendIcon: se,
346
+ color: String,
347
+ header: String,
348
+ transition: String,
349
+ onClick: lt()
350
+ }, "VDatePickerHeader"), Ye = Z()({
351
+ name: "VDatePickerHeader",
352
+ props: Vt(),
353
+ emits: {
354
+ click: () => !0,
355
+ "click:append": () => !0
356
+ },
357
+ setup(e, a) {
358
+ let {
359
+ emit: l,
360
+ slots: r
361
+ } = a;
362
+ const {
363
+ backgroundColorClasses: t,
364
+ backgroundColorStyles: i
365
+ } = Fe(() => e.color);
366
+ function o() {
367
+ l("click");
368
+ }
369
+ function u() {
370
+ l("click:append");
371
+ }
372
+ return q(() => {
373
+ const d = !!(r.default || e.header), k = !!(r.append || e.appendIcon);
374
+ return w("div", {
375
+ class: ie(["v-date-picker-header", {
376
+ "v-date-picker-header--clickable": !!e.onClick
377
+ }, t.value]),
378
+ style: Te(i.value),
379
+ onClick: o
380
+ }, [r.prepend && w("div", {
381
+ key: "prepend",
382
+ class: "v-date-picker-header__prepend"
383
+ }, [r.prepend()]), d && g(Be, {
384
+ key: "content",
385
+ name: e.transition
386
+ }, {
387
+ default: () => [w("div", {
388
+ key: e.header,
389
+ class: "v-date-picker-header__content"
390
+ }, [r.default?.() ?? e.header])]
391
+ }), k && w("div", {
392
+ class: "v-date-picker-header__append"
393
+ }, [r.append ? g(ve, {
394
+ key: "append-defaults",
395
+ disabled: !e.appendIcon,
396
+ defaults: {
397
+ VBtn: {
398
+ icon: e.appendIcon,
399
+ variant: "text"
400
+ }
401
+ }
402
+ }, {
403
+ default: () => [r.append?.()]
404
+ }) : g($, {
405
+ key: "append-btn",
406
+ icon: e.appendIcon,
407
+ variant: "text",
408
+ onClick: u
409
+ }, null)])]);
410
+ }), {};
411
+ }
412
+ }), xt = U({
413
+ allowedDates: [Array, Function],
414
+ disabled: {
415
+ type: Boolean,
416
+ default: null
417
+ },
418
+ displayValue: null,
419
+ modelValue: Array,
420
+ month: [Number, String],
421
+ max: null,
422
+ min: null,
423
+ showAdjacentMonths: Boolean,
424
+ year: [Number, String],
425
+ weekdays: {
426
+ type: Array,
427
+ default: () => [0, 1, 2, 3, 4, 5, 6]
428
+ },
429
+ weeksInMonth: {
430
+ type: String,
431
+ default: "dynamic"
432
+ },
433
+ firstDayOfWeek: {
434
+ type: [Number, String],
435
+ default: void 0
436
+ },
437
+ firstDayOfYear: {
438
+ type: [Number, String],
439
+ default: void 0
440
+ },
441
+ weekdayFormat: String
442
+ }, "calendar");
443
+ function Pt(e) {
444
+ const a = te(), l = L(e, "modelValue", [], (n) => ee(n).map((v) => a.date(v))), r = M(() => e.displayValue ? a.date(e.displayValue) : l.value.length > 0 ? a.date(l.value[0]) : e.min ? a.date(e.min) : Array.isArray(e.allowedDates) ? a.date(e.allowedDates[0]) : a.date()), t = L(e, "year", void 0, (n) => {
445
+ const v = n != null ? Number(n) : a.getYear(r.value);
446
+ return a.startOfYear(a.setYear(a.date(), v));
447
+ }, (n) => a.getYear(n)), i = L(e, "month", void 0, (n) => {
448
+ const v = n != null ? Number(n) : a.getMonth(r.value), s = a.setYear(a.startOfMonth(a.date()), a.getYear(t.value));
449
+ return a.setMonth(s, v);
450
+ }, (n) => a.getMonth(n)), o = M(() => {
451
+ const n = a.toJsDate(a.startOfWeek(a.date(), e.firstDayOfWeek)).getDay();
452
+ return a.getWeekdays(e.firstDayOfWeek, e.weekdayFormat).filter((v, s) => e.weekdays.includes((s + n) % 7));
453
+ }), u = M(() => {
454
+ const n = a.getWeekArray(i.value, e.firstDayOfWeek), v = n.flat(), s = 42;
455
+ if (e.weeksInMonth === "static" && v.length < s) {
456
+ const D = v[v.length - 1];
457
+ let A = [];
458
+ for (let S = 1; S <= s - v.length; S++)
459
+ A.push(a.addDays(D, S)), S % 7 === 0 && (n.push(A), A = []);
460
+ }
461
+ return n;
462
+ });
463
+ function d(n, v) {
464
+ return n.filter((s) => e.weekdays.includes(a.toJsDate(s).getDay())).map((s, D) => {
465
+ const A = a.toISO(s), S = !a.isSameMonth(s, i.value), _ = a.isSameDay(s, a.startOfMonth(i.value)), c = a.isSameDay(s, a.endOfMonth(i.value)), x = a.isSameDay(s, i.value), P = e.weekdays.length;
466
+ return {
467
+ date: s,
468
+ formatted: a.format(s, "keyboardDate"),
469
+ isAdjacent: S,
470
+ isDisabled: Y(s),
471
+ isEnd: c,
472
+ isHidden: S && !e.showAdjacentMonths,
473
+ isSame: x,
474
+ isSelected: l.value.some((I) => a.isSameDay(s, I)),
475
+ isStart: _,
476
+ isToday: a.isSameDay(s, v),
477
+ isWeekEnd: D % P === P - 1,
478
+ isWeekStart: D % P === 0,
479
+ isoDate: A,
480
+ localized: a.format(s, "dayOfMonth"),
481
+ month: a.getMonth(s),
482
+ year: a.getYear(s)
483
+ };
484
+ });
485
+ }
486
+ const k = M(() => {
487
+ const n = a.startOfWeek(r.value, e.firstDayOfWeek), v = [];
488
+ for (let D = 0; D <= 6; D++)
489
+ v.push(a.addDays(n, D));
490
+ const s = a.date();
491
+ return d(v, s);
492
+ }), f = M(() => {
493
+ const n = u.value.flat(), v = a.date();
494
+ return d(n, v);
495
+ }), m = M(() => u.value.map((n) => n.length ? a.getWeek(n[0], e.firstDayOfWeek, e.firstDayOfYear) : null)), {
496
+ minDate: b,
497
+ maxDate: C
498
+ } = be(e);
499
+ function Y(n) {
500
+ if (e.disabled) return !0;
501
+ const v = a.date(n);
502
+ return b.value && a.isBefore(a.endOfDay(v), b.value) || C.value && a.isAfter(v, C.value) ? !0 : Array.isArray(e.allowedDates) && e.allowedDates.length > 0 ? !e.allowedDates.some((s) => a.isSameDay(a.date(s), v)) : typeof e.allowedDates == "function" ? !e.allowedDates(v) : !1;
503
+ }
504
+ return {
505
+ displayValue: r,
506
+ daysInMonth: f,
507
+ daysInWeek: k,
508
+ genDays: d,
509
+ model: l,
510
+ weeksInMonth: u,
511
+ weekdayLabels: o,
512
+ weekNumbers: m
513
+ };
514
+ }
515
+ function be(e) {
516
+ const a = te(), l = M(() => {
517
+ if (!e.min) return null;
518
+ const o = a.date(e.min);
519
+ return a.isValid(o) ? o : null;
520
+ }), r = M(() => {
521
+ if (!e.max) return null;
522
+ const o = a.date(e.max);
523
+ return a.isValid(o) ? o : null;
524
+ });
525
+ function t(o) {
526
+ return l.value && a.isBefore(o, l.value) ? l.value : r.value && a.isAfter(o, r.value) ? r.value : o;
527
+ }
528
+ function i(o) {
529
+ return (!l.value || a.isAfter(o, l.value)) && (!r.value || a.isBefore(o, r.value));
530
+ }
531
+ return {
532
+ minDate: l,
533
+ maxDate: r,
534
+ clampDate: t,
535
+ isInAllowedRange: i
536
+ };
537
+ }
538
+ const je = U({
539
+ color: String,
540
+ hideWeekdays: Boolean,
541
+ multiple: [Boolean, Number, String],
542
+ showWeek: Boolean,
543
+ transition: {
544
+ type: String,
545
+ default: "picker-transition"
546
+ },
547
+ reverseTransition: {
548
+ type: String,
549
+ default: "picker-reverse-transition"
550
+ },
551
+ events: {
552
+ type: [Array, Function, Object],
553
+ default: () => null
554
+ },
555
+ eventColor: {
556
+ type: [Array, Function, Object, String],
557
+ default: () => null
558
+ },
559
+ ...K(xt(), ["displayValue"])
560
+ }, "VDatePickerMonth"), _e = Z()({
561
+ name: "VDatePickerMonth",
562
+ props: je(),
563
+ emits: {
564
+ "update:modelValue": (e) => !0,
565
+ "update:month": (e) => !0,
566
+ "update:year": (e) => !0
567
+ },
568
+ setup(e, a) {
569
+ let {
570
+ emit: l,
571
+ slots: r
572
+ } = a;
573
+ const t = ce(), {
574
+ t: i
575
+ } = ue(), {
576
+ daysInMonth: o,
577
+ model: u,
578
+ weekNumbers: d,
579
+ weekdayLabels: k
580
+ } = Pt(e), f = te(), m = oe(), b = oe(), C = oe(!1), Y = z(() => C.value ? e.reverseTransition : e.transition);
581
+ e.multiple === "range" && u.value.length > 0 && (m.value = u.value[0], u.value.length > 1 && (b.value = u.value[u.value.length - 1]));
582
+ const n = M(() => {
583
+ const c = ["number", "string"].includes(typeof e.multiple) ? Number(e.multiple) : 1 / 0;
584
+ return u.value.length >= c;
585
+ });
586
+ fe(o, (c, x) => {
587
+ x && (C.value = f.isBefore(c[0].date, x[0].date));
588
+ });
589
+ function v(c) {
590
+ const x = f.startOfDay(c);
591
+ if (u.value.length === 0 ? m.value = void 0 : u.value.length === 1 && (m.value = u.value[0], b.value = void 0), !m.value)
592
+ m.value = x, u.value = [m.value];
593
+ else if (b.value)
594
+ m.value = c, b.value = void 0, u.value = [m.value];
595
+ else {
596
+ if (f.isSameDay(x, m.value)) {
597
+ m.value = void 0, u.value = [];
598
+ return;
599
+ } else f.isBefore(x, m.value) ? (b.value = f.endOfDay(m.value), m.value = x) : b.value = f.endOfDay(x);
600
+ u.value = Ne(f, m.value, b.value);
601
+ }
602
+ }
603
+ function s(c) {
604
+ const x = f.format(c.date, "fullDateWithWeekday"), P = c.isToday ? "currentDate" : "selectDate";
605
+ return i(`$vuetify.datePicker.ariaLabel.${P}`, x);
606
+ }
607
+ function D(c) {
608
+ const x = u.value.findIndex((P) => f.isSameDay(P, c));
609
+ if (x === -1)
610
+ u.value = [...u.value, c];
611
+ else {
612
+ const P = [...u.value];
613
+ P.splice(x, 1), u.value = P;
614
+ }
615
+ }
616
+ function A(c) {
617
+ e.multiple === "range" ? v(c) : e.multiple ? D(c) : u.value = [c];
618
+ }
619
+ function S(c) {
620
+ const {
621
+ events: x,
622
+ eventColor: P
623
+ } = e;
624
+ let I, B = [];
625
+ if (Array.isArray(x) ? I = x.includes(c) : x instanceof Function ? I = x(c) || !1 : x ? I = x[c] || !1 : I = !1, I)
626
+ I !== !0 ? B = ee(I) : typeof P == "string" ? B = [P] : typeof P == "function" ? B = ee(P(c)) : Array.isArray(P) ? B = P : typeof P == "object" && P !== null && (B = ee(P[c]));
627
+ else return [];
628
+ return B.length ? B.filter(Boolean).map((H) => typeof H == "string" ? H : "surface-variant") : ["surface-variant"];
629
+ }
630
+ function _(c) {
631
+ const x = S(c);
632
+ return x.length ? w("div", {
633
+ class: "v-date-picker-month__events"
634
+ }, [x.map((P) => g(yt, {
635
+ dot: !0,
636
+ color: P
637
+ }, null))]) : null;
638
+ }
639
+ q(() => w("div", {
640
+ class: "v-date-picker-month",
641
+ style: {
642
+ "--v-date-picker-days-in-week": e.weekdays.length
643
+ }
644
+ }, [e.showWeek && w("div", {
645
+ key: "weeks",
646
+ class: "v-date-picker-month__weeks"
647
+ }, [!e.hideWeekdays && w("div", {
648
+ key: "hide-week-days",
649
+ class: "v-date-picker-month__day"
650
+ }, [qe(" ")]), d.value.map((c) => w("div", {
651
+ class: ie(["v-date-picker-month__day", "v-date-picker-month__day--adjacent"])
652
+ }, [c]))]), g(Be, {
653
+ name: Y.value
654
+ }, {
655
+ default: () => [w("div", {
656
+ ref: t,
657
+ key: o.value[0].date?.toString(),
658
+ class: "v-date-picker-month__days"
659
+ }, [!e.hideWeekdays && k.value.map((c) => w("div", {
660
+ class: ie(["v-date-picker-month__day", "v-date-picker-month__weekday"])
661
+ }, [c])), o.value.map((c, x) => {
662
+ const P = {
663
+ props: {
664
+ class: "v-date-picker-month__day-btn",
665
+ color: c.isSelected || c.isToday ? e.color : void 0,
666
+ disabled: c.isDisabled,
667
+ icon: !0,
668
+ ripple: !1,
669
+ variant: c.isSelected ? "flat" : c.isToday ? "outlined" : "text",
670
+ "aria-label": s(c),
671
+ "aria-current": c.isToday ? "date" : void 0,
672
+ onClick: () => A(c.date)
673
+ },
674
+ item: c,
675
+ i: x
676
+ };
677
+ return n.value && !c.isSelected && (c.isDisabled = !0), w("div", {
678
+ class: ie(["v-date-picker-month__day", {
679
+ "v-date-picker-month__day--adjacent": c.isAdjacent,
680
+ "v-date-picker-month__day--hide-adjacent": c.isHidden,
681
+ "v-date-picker-month__day--selected": c.isSelected,
682
+ "v-date-picker-month__day--week-end": c.isWeekEnd,
683
+ "v-date-picker-month__day--week-start": c.isWeekStart
684
+ }]),
685
+ "data-v-date": c.isDisabled ? void 0 : c.isoDate
686
+ }, [(e.showAdjacentMonths || !c.isAdjacent) && (r.day?.(P) ?? g($, P.props, {
687
+ default: () => [c.localized, _(c.isoDate)]
688
+ }))]);
689
+ })])]
690
+ })]));
691
+ }
692
+ }), He = U({
693
+ color: String,
694
+ height: [String, Number],
695
+ min: null,
696
+ max: null,
697
+ modelValue: Number,
698
+ year: Number,
699
+ allowedMonths: [Array, Function]
700
+ }, "VDatePickerMonths"), Oe = Z()({
701
+ name: "VDatePickerMonths",
702
+ props: He(),
703
+ emits: {
704
+ "update:modelValue": (e) => !0
705
+ },
706
+ setup(e, a) {
707
+ let {
708
+ emit: l,
709
+ slots: r
710
+ } = a;
711
+ const t = te(), i = L(e, "modelValue"), o = M(() => {
712
+ let d = t.startOfYear(t.date());
713
+ return e.year && (d = t.setYear(d, e.year)), We(12).map((k) => {
714
+ const f = t.format(d, "monthShort"), m = t.format(d, "month"), b = !!(!u(k) || e.min && t.isAfter(t.startOfMonth(t.date(e.min)), d) || e.max && t.isAfter(d, t.startOfMonth(t.date(e.max))));
715
+ return d = t.getNextMonth(d), {
716
+ isDisabled: b,
717
+ text: f,
718
+ label: m,
719
+ value: k
720
+ };
721
+ });
722
+ });
723
+ ge(() => {
724
+ i.value = i.value ?? t.getMonth(t.date());
725
+ });
726
+ function u(d) {
727
+ return Array.isArray(e.allowedMonths) && e.allowedMonths.length ? e.allowedMonths.includes(d) : typeof e.allowedMonths == "function" ? e.allowedMonths(d) : !0;
728
+ }
729
+ return q(() => w("div", {
730
+ class: "v-date-picker-months",
731
+ style: {
732
+ height: me(e.height)
733
+ }
734
+ }, [w("div", {
735
+ class: "v-date-picker-months__content"
736
+ }, [o.value.map((d, k) => {
737
+ const f = {
738
+ active: i.value === k,
739
+ ariaLabel: d.label,
740
+ color: i.value === k ? e.color : void 0,
741
+ disabled: d.isDisabled,
742
+ rounded: !0,
743
+ text: d.text,
744
+ variant: i.value === d.value ? "flat" : "text",
745
+ onClick: () => m(k)
746
+ };
747
+ function m(b) {
748
+ if (i.value === b) {
749
+ l("update:modelValue", i.value);
750
+ return;
751
+ }
752
+ i.value = b;
753
+ }
754
+ return r.month?.({
755
+ month: d,
756
+ i: k,
757
+ props: f
758
+ }) ?? g($, F({
759
+ key: "month"
760
+ }, f), null);
761
+ })])])), {};
762
+ }
763
+ }), Je = U({
764
+ color: String,
765
+ height: [String, Number],
766
+ min: null,
767
+ max: null,
768
+ modelValue: Number,
769
+ allowedYears: [Array, Function]
770
+ }, "VDatePickerYears"), pe = Z()({
771
+ name: "VDatePickerYears",
772
+ props: Je(),
773
+ directives: {
774
+ vIntersect: xe
775
+ },
776
+ emits: {
777
+ "update:modelValue": (e) => !0
778
+ },
779
+ setup(e, a) {
780
+ let {
781
+ emit: l,
782
+ slots: r
783
+ } = a;
784
+ const t = te(), i = L(e, "modelValue"), o = M(() => {
785
+ const f = t.getYear(t.date());
786
+ let m = f - 100, b = f + 52;
787
+ e.min && (m = t.getYear(t.date(e.min))), e.max && (b = t.getYear(t.date(e.max)));
788
+ let C = t.startOfYear(t.date());
789
+ return C = t.setYear(C, m), We(b - m + 1, m).map((Y) => {
790
+ const n = t.format(C, "year");
791
+ return C = t.setYear(C, t.getYear(C) + 1), {
792
+ text: n,
793
+ value: Y,
794
+ isDisabled: !k(Y)
795
+ };
796
+ });
797
+ });
798
+ ge(() => {
799
+ i.value = i.value ?? t.getYear(t.date());
800
+ });
801
+ const u = rt();
802
+ function d() {
803
+ u.el?.focus(), u.el?.scrollIntoView({
804
+ block: "center"
805
+ });
806
+ }
807
+ function k(f) {
808
+ return Array.isArray(e.allowedYears) && e.allowedYears.length ? e.allowedYears.includes(f) : typeof e.allowedYears == "function" ? e.allowedYears(f) : !0;
809
+ }
810
+ return q(() => Ge(w("div", {
811
+ class: "v-date-picker-years",
812
+ style: {
813
+ height: me(e.height)
814
+ }
815
+ }, [w("div", {
816
+ class: "v-date-picker-years__content"
817
+ }, [o.value.map((f, m) => {
818
+ const b = {
819
+ ref: i.value === f.value ? u : void 0,
820
+ active: i.value === f.value,
821
+ color: i.value === f.value ? e.color : void 0,
822
+ rounded: !0,
823
+ text: f.text,
824
+ disabled: f.isDisabled,
825
+ variant: i.value === f.value ? "flat" : "text",
826
+ onClick: () => {
827
+ if (i.value === f.value) {
828
+ l("update:modelValue", i.value);
829
+ return;
830
+ }
831
+ i.value = f.value;
832
+ }
833
+ };
834
+ return r.year?.({
835
+ year: f,
836
+ i: m,
837
+ props: b
838
+ }) ?? g($, F({
839
+ key: "month"
840
+ }, b), null);
841
+ })])]), [[xe, {
842
+ handler: d
843
+ }, null, {
844
+ once: !0
845
+ }]])), {};
846
+ }
847
+ }), ze = U({
848
+ // TODO: implement in v3.5
849
+ // calendarIcon: {
850
+ // type: String,
851
+ // default: '$calendar',
852
+ // },
853
+ // keyboardIcon: {
854
+ // type: String,
855
+ // default: '$edit',
856
+ // },
857
+ // inputMode: {
858
+ // type: String as PropType<'calendar' | 'keyboard'>,
859
+ // default: 'calendar',
860
+ // },
861
+ // inputText: {
862
+ // type: String,
863
+ // default: '$vuetify.datePicker.input.placeholder',
864
+ // },
865
+ // inputPlaceholder: {
866
+ // type: String,
867
+ // default: 'dd/mm/yyyy',
868
+ // },
869
+ header: {
870
+ type: String,
871
+ default: "$vuetify.datePicker.header"
872
+ },
873
+ headerColor: String,
874
+ headerDateFormat: {
875
+ type: String,
876
+ default: "normalDateWithWeekday"
877
+ },
878
+ landscapeHeaderWidth: [Number, String],
879
+ ...Ue(),
880
+ ...je({
881
+ weeksInMonth: "static"
882
+ }),
883
+ ...K(He(), ["modelValue"]),
884
+ ...K(Je(), ["modelValue"]),
885
+ ...Re({
886
+ title: "$vuetify.datePicker.title"
887
+ }),
888
+ modelValue: null
889
+ }, "VDatePicker"), Ie = Z()({
890
+ name: "VDatePicker",
891
+ props: ze(),
892
+ emits: {
893
+ "update:modelValue": (e) => !0,
894
+ "update:month": (e) => !0,
895
+ "update:year": (e) => !0,
896
+ // 'update:inputMode': (date: any) => true,
897
+ "update:viewMode": (e) => !0
898
+ },
899
+ setup(e, a) {
900
+ let {
901
+ emit: l,
902
+ slots: r
903
+ } = a;
904
+ const t = te(), {
905
+ t: i
906
+ } = ue(), {
907
+ rtlClasses: o
908
+ } = it(), u = L(e, "modelValue", void 0, (h) => ee(h).map((V) => t.date(V)), (h) => e.multiple ? h : h[0]), d = L(e, "viewMode"), {
909
+ minDate: k,
910
+ maxDate: f,
911
+ clampDate: m
912
+ } = be(e), b = M(() => {
913
+ const h = t.date(), V = u.value?.[0] ? t.date(u.value[0]) : m(h);
914
+ return V && t.isValid(V) ? V : h;
915
+ }), C = z(() => e.headerColor ?? e.color), Y = L(e, "month"), n = M({
916
+ get: () => Number(Y.value ?? t.getMonth(t.startOfMonth(b.value))),
917
+ set: (h) => Y.value = h
918
+ }), v = L(e, "year"), s = M({
919
+ get: () => Number(v.value ?? t.getYear(t.startOfYear(t.setMonth(b.value, n.value)))),
920
+ set: (h) => v.value = h
921
+ }), D = oe(!1), A = M(() => {
922
+ if (e.multiple && u.value.length > 1)
923
+ return i("$vuetify.datePicker.itemsSelected", u.value.length);
924
+ const h = u.value[0] && t.isValid(u.value[0]) ? t.format(t.date(u.value[0]), e.headerDateFormat) : i(e.header);
925
+ return e.landscape && h.split(" ").length === 3 ? h.replace(" ", `
926
+ `) : h;
927
+ }), S = z(() => t.parseISO(`${s.value}-${n.value + 1}-01`)), _ = z(() => t.format(S.value, "monthAndYear")), c = z(() => t.format(S.value, "monthShort")), x = z(() => t.format(S.value, "year")), P = z(() => `date-picker-header${D.value ? "-reverse" : ""}-transition`), I = M(() => {
928
+ if (e.disabled) return !0;
929
+ const h = [];
930
+ if (d.value !== "month")
931
+ h.push("prev-month", "next-month", "prev-year", "next-year");
932
+ else {
933
+ let V = t.date();
934
+ if (V = t.startOfMonth(V), V = t.setMonth(V, n.value), V = t.setYear(V, s.value), k.value) {
935
+ const O = t.addDays(t.startOfMonth(V), -1), W = t.addDays(t.startOfYear(V), -1);
936
+ t.isAfter(k.value, O) && h.push("prev-month"), t.isAfter(k.value, W) && h.push("next-year");
937
+ }
938
+ if (f.value) {
939
+ const O = t.addDays(t.endOfMonth(V), 1), W = t.addDays(t.endOfYear(V), 1);
940
+ t.isAfter(O, f.value) && h.push("next-month"), t.isAfter(W, f.value) && h.push("next-year");
941
+ }
942
+ }
943
+ return h;
944
+ }), B = M(() => e.allowedYears || ye), H = M(() => e.allowedMonths || he);
945
+ function ae(h, V) {
946
+ const O = e.allowedDates;
947
+ if (typeof O != "function") return !0;
948
+ const W = 1 + Ee(t, h, V);
949
+ for (let p = 0; p < W; p++)
950
+ if (O(t.addDays(h, p))) return !0;
951
+ return !1;
952
+ }
953
+ function ye(h) {
954
+ if (typeof e.allowedDates == "function") {
955
+ const V = t.parseISO(`${h}-01-01`);
956
+ return ae(V, t.endOfYear(V));
957
+ }
958
+ if (Array.isArray(e.allowedDates) && e.allowedDates.length) {
959
+ for (const V of e.allowedDates)
960
+ if (t.getYear(t.date(V)) === h) return !0;
961
+ return !1;
962
+ }
963
+ return !0;
964
+ }
965
+ function he(h) {
966
+ if (typeof e.allowedDates == "function") {
967
+ const V = String(h + 1).padStart(2, "0"), O = t.parseISO(`${s.value}-${V}-01`);
968
+ return ae(O, t.endOfMonth(O));
969
+ }
970
+ if (Array.isArray(e.allowedDates) && e.allowedDates.length) {
971
+ for (const V of e.allowedDates)
972
+ if (t.getYear(t.date(V)) === s.value && t.getMonth(t.date(V)) === h) return !0;
973
+ return !1;
974
+ }
975
+ return !0;
976
+ }
977
+ function ke() {
978
+ n.value < 11 ? n.value++ : (s.value++, n.value = 0, E()), J();
979
+ }
980
+ function de() {
981
+ n.value > 0 ? n.value-- : (s.value--, n.value = 11, E()), J();
982
+ }
983
+ function y() {
984
+ if (s.value++, f.value) {
985
+ const h = t.parseISO(`${s.value}-${n.value + 1}-01`);
986
+ t.isAfter(h, f.value) && (n.value = t.getMonth(f.value));
987
+ }
988
+ E();
989
+ }
990
+ function T() {
991
+ if (s.value--, k.value) {
992
+ const h = t.endOfMonth(t.parseISO(`${s.value}-${n.value + 1}-01`));
993
+ t.isAfter(k.value, h) && (n.value = t.getMonth(k.value));
994
+ }
995
+ E();
996
+ }
997
+ function j() {
998
+ d.value = "month";
999
+ }
1000
+ function ne() {
1001
+ d.value = d.value === "months" ? "month" : "months";
1002
+ }
1003
+ function N() {
1004
+ d.value = d.value === "year" ? "month" : "year";
1005
+ }
1006
+ function J() {
1007
+ d.value === "months" && ne();
1008
+ }
1009
+ function E() {
1010
+ d.value === "year" && N();
1011
+ }
1012
+ return fe(u, (h, V) => {
1013
+ const O = ee(V), W = ee(h);
1014
+ if (!W.length) return;
1015
+ const p = t.date(O[O.length - 1]), le = t.date(W[W.length - 1]);
1016
+ if (t.isSameDay(p, le)) return;
1017
+ const re = t.getMonth(le), R = t.getYear(le);
1018
+ re !== n.value && (n.value = re, J()), R !== s.value && (s.value = R, E()), D.value = t.isBefore(p, le);
1019
+ }), q(() => {
1020
+ const h = Me.filterProps(e), V = K(Ae.filterProps(e), ["viewMode"]), O = Ye.filterProps(e), W = _e.filterProps(e), p = K(Oe.filterProps(e), ["modelValue"]), le = K(pe.filterProps(e), ["modelValue"]), re = {
1021
+ color: C.value,
1022
+ header: A.value,
1023
+ transition: P.value
1024
+ };
1025
+ return g(Me, F(h, {
1026
+ color: C.value,
1027
+ class: ["v-date-picker", `v-date-picker--${d.value}`, {
1028
+ "v-date-picker--show-week": e.showWeek
1029
+ }, o.value, e.class],
1030
+ style: [{
1031
+ "--v-date-picker-landscape-header-width": me(e.landscapeHeaderWidth)
1032
+ }, e.style]
1033
+ }), {
1034
+ title: () => r.title?.() ?? w("div", {
1035
+ class: "v-date-picker__title"
1036
+ }, [i(e.title)]),
1037
+ header: () => r.header ? g(ve, {
1038
+ defaults: {
1039
+ VDatePickerHeader: {
1040
+ ...re
1041
+ }
1042
+ }
1043
+ }, {
1044
+ default: () => [r.header?.(re)]
1045
+ }) : g(Ye, F({
1046
+ key: "header"
1047
+ }, O, re, {
1048
+ onClick: d.value !== "month" ? j : void 0
1049
+ }), {
1050
+ prepend: r.prepend,
1051
+ append: r.append
1052
+ }),
1053
+ default: () => w(Q, null, [g(Ae, F(V, {
1054
+ disabled: I.value,
1055
+ viewMode: d.value,
1056
+ text: _.value,
1057
+ monthText: c.value,
1058
+ yearText: x.value,
1059
+ "onClick:next": ke,
1060
+ "onClick:prev": de,
1061
+ "onClick:nextYear": y,
1062
+ "onClick:prevYear": T,
1063
+ "onClick:month": ne,
1064
+ "onClick:year": N
1065
+ }), {
1066
+ default: r.controls
1067
+ }), g(ot, {
1068
+ hideOnLeave: !0
1069
+ }, {
1070
+ default: () => [d.value === "months" ? g(Oe, F({
1071
+ key: "date-picker-months"
1072
+ }, p, {
1073
+ modelValue: n.value,
1074
+ "onUpdate:modelValue": [(R) => n.value = R, J],
1075
+ min: k.value,
1076
+ max: f.value,
1077
+ year: s.value,
1078
+ allowedMonths: H.value
1079
+ }), {
1080
+ month: r.month
1081
+ }) : d.value === "year" ? g(pe, F({
1082
+ key: "date-picker-years"
1083
+ }, le, {
1084
+ modelValue: s.value,
1085
+ "onUpdate:modelValue": [(R) => s.value = R, E],
1086
+ min: k.value,
1087
+ max: f.value,
1088
+ allowedYears: B.value
1089
+ }), {
1090
+ year: r.year
1091
+ }) : g(_e, F({
1092
+ key: "date-picker-month"
1093
+ }, W, {
1094
+ modelValue: u.value,
1095
+ "onUpdate:modelValue": (R) => u.value = R,
1096
+ month: n.value,
1097
+ "onUpdate:month": [(R) => n.value = R, J],
1098
+ year: s.value,
1099
+ "onUpdate:year": [(R) => s.value = R, E],
1100
+ min: k.value,
1101
+ max: f.value
1102
+ }), {
1103
+ day: r.day
1104
+ })]
1105
+ })]),
1106
+ actions: r.actions
1107
+ });
1108
+ }), {};
1109
+ }
1110
+ });
1111
+ class X {
1112
+ constructor(a, l) {
1113
+ this.order = a, this.separator = l;
1114
+ }
1115
+ get format() {
1116
+ return this.order.split("").map((a) => `${a}${a}`).join(this.separator).replace("yy", "yyyy");
1117
+ }
1118
+ static canBeParsed(a) {
1119
+ if (typeof a != "string") return !1;
1120
+ const l = a.toLowerCase();
1121
+ return ["y", "m", "d"].every((r) => l.includes(r)) && ["/", "-", "."].some((r) => a.includes(r));
1122
+ }
1123
+ static parse(a) {
1124
+ if (!X.canBeParsed(a))
1125
+ throw new Error(`[${a}] cannot be parsed into date format specification`);
1126
+ const l = a.toLowerCase().split("").filter((t, i, o) => "dmy".includes(t) && o.indexOf(t) === i).join(""), r = ["/", "-", "."].find((t) => a.includes(t));
1127
+ return new X(l, r);
1128
+ }
1129
+ }
1130
+ const wt = U({
1131
+ inputFormat: {
1132
+ type: String,
1133
+ validator: (e) => !e || X.canBeParsed(e)
1134
+ }
1135
+ }, "date-format");
1136
+ function Mt(e, a) {
1137
+ const l = te();
1138
+ function r() {
1139
+ const d = a.value ?? "en-US", k = Intl.DateTimeFormat(d, {
1140
+ year: "numeric",
1141
+ month: "2-digit",
1142
+ day: "2-digit"
1143
+ }).format(l.toJsDate(l.parseISO("1999-12-07"))).replace(/(07)|(٠٧)|(٢٩)|(۱۶)|(০৭)/, "dd").replace(/(12)|(١٢)|(٠٨)|(۰۹)|(১২)/, "mm").replace(/(1999)|(2542)|(١٩٩٩)|(١٤٢٠)|(۱۳۷۸)|(১৯৯৯)/, "yyyy").replace(/[^ymd\-/.]/g, "").replace(/\.$/, "");
1144
+ return X.canBeParsed(k) ? k : (ut(`Date format inferred from locale [${d}] is invalid: [${k}]`), "mm/dd/yyyy");
1145
+ }
1146
+ const t = z(() => X.canBeParsed(e.inputFormat) ? X.parse(e.inputFormat) : X.parse(r()));
1147
+ function i(d) {
1148
+ function k(D) {
1149
+ const A = D.trim().split(t.value.separator);
1150
+ return {
1151
+ y: Number(A[t.value.order.indexOf("y")]),
1152
+ m: Number(A[t.value.order.indexOf("m")]),
1153
+ d: Number(A[t.value.order.indexOf("d")])
1154
+ };
1155
+ }
1156
+ function f(D) {
1157
+ const {
1158
+ y: A,
1159
+ m: S,
1160
+ d: _
1161
+ } = D;
1162
+ return !A || !S || !_ || S < 1 || S > 12 || _ < 1 || _ > 31 ? null : {
1163
+ year: m(A),
1164
+ month: S,
1165
+ day: _
1166
+ };
1167
+ }
1168
+ function m(D) {
1169
+ const A = l.getYear(l.date());
1170
+ if (D > 100 || A % 100 >= 50)
1171
+ return D;
1172
+ const S = ~~(A / 100) * 100;
1173
+ return D < 50 ? S + D : S - 100 + D;
1174
+ }
1175
+ const b = k(d), C = f(b);
1176
+ if (!C) return null;
1177
+ const {
1178
+ year: Y,
1179
+ month: n,
1180
+ day: v
1181
+ } = C, s = (D) => String(D).padStart(2, "0");
1182
+ return l.parseISO(`${Y}-${s(n)}-${s(v)}`);
1183
+ }
1184
+ function o(d) {
1185
+ return !!i(d);
1186
+ }
1187
+ function u(d) {
1188
+ const k = l.toISO(d).split("T")[0].split("-");
1189
+ return t.value.order.split("").map((f) => k["ymd".indexOf(f)]).join(t.value.separator);
1190
+ }
1191
+ return {
1192
+ isValid: o,
1193
+ parseDate: i,
1194
+ formatDate: u,
1195
+ parserFormat: z(() => t.value.format)
1196
+ };
1197
+ }
1198
+ const St = U({
1199
+ displayFormat: {
1200
+ type: [Function, String],
1201
+ default: void 0
1202
+ },
1203
+ location: {
1204
+ type: String,
1205
+ default: "bottom start"
1206
+ },
1207
+ menu: Boolean,
1208
+ updateOn: {
1209
+ type: Array,
1210
+ default: () => ["blur", "enter"]
1211
+ },
1212
+ ...wt(),
1213
+ ...vt({
1214
+ mobile: null
1215
+ }),
1216
+ ...kt(),
1217
+ ...Le({
1218
+ hideActions: !0
1219
+ }),
1220
+ ...ht({
1221
+ prependIcon: "$calendar"
1222
+ }),
1223
+ ...K(ze({
1224
+ hideHeader: !0,
1225
+ showAdjacentMonths: !0
1226
+ }), ["active", "location", "rounded", "height", "minHeight", "maxHeight"])
1227
+ }, "VDateInput"), Ct = Z()({
1228
+ name: "VDateInput",
1229
+ props: St(),
1230
+ emits: {
1231
+ save: (e) => !0,
1232
+ cancel: () => !0,
1233
+ "update:focused": (e) => !0,
1234
+ "update:modelValue": (e) => !0,
1235
+ "update:menu": (e) => !0
1236
+ },
1237
+ setup(e, a) {
1238
+ let {
1239
+ emit: l,
1240
+ slots: r
1241
+ } = a;
1242
+ const {
1243
+ t,
1244
+ current: i
1245
+ } = ue(), o = te(), {
1246
+ isValid: u,
1247
+ parseDate: d,
1248
+ formatDate: k,
1249
+ parserFormat: f
1250
+ } = Mt(e, i), {
1251
+ mobile: m
1252
+ } = dt(e), {
1253
+ clampDate: b,
1254
+ isInAllowedRange: C
1255
+ } = be(e), Y = () => e.multiple ? [] : null, n = L(e, "modelValue", Y(), (y) => Array.isArray(y) ? y.map((T) => o.toJsDate(T)) : y && o.toJsDate(y), (y) => Array.isArray(y) ? y.map((T) => o.date(T)) : y && o.date(y)), v = L(e, "menu"), s = oe(!1), D = oe(e.focused), A = ce(), S = ce(["save"]);
1256
+ function _(y) {
1257
+ return typeof e.displayFormat == "function" ? e.displayFormat(y) : e.displayFormat ? o.format(y, e.displayFormat ?? "keyboardDate") : k(y);
1258
+ }
1259
+ const c = M(() => {
1260
+ const y = ee(n.value);
1261
+ if (!y.length) return null;
1262
+ if (e.multiple === !0)
1263
+ return t("$vuetify.datePicker.itemsSelected", y.length);
1264
+ if (e.multiple === "range") {
1265
+ const T = y[0], j = y[y.length - 1];
1266
+ return !o.isValid(T) || !o.isValid(j) ? "" : `${_(o.date(T))} - ${_(o.date(j))}`;
1267
+ }
1268
+ return o.isValid(n.value) ? _(o.date(n.value)) : "";
1269
+ }), x = M(() => {
1270
+ if (m.value)
1271
+ return s.value ? "text" : "none";
1272
+ }), P = M(() => !e.disabled && !e.readonly), I = M(() => e.updateOn.length ? !(m.value && s.value) && e.readonly : !0);
1273
+ fe(v, (y) => {
1274
+ y || (s.value = !1, S.value = ["save"]);
1275
+ });
1276
+ function B(y) {
1277
+ y.key === "Enter" && ((!v.value || !D.value) && (v.value = !0), e.updateOn.includes("enter") && !e.readonly && de(y.target));
1278
+ }
1279
+ function H(y) {
1280
+ y.preventDefault(), y.stopPropagation(), v.value && m.value ? s.value = !0 : v.value = !0;
1281
+ }
1282
+ function ae() {
1283
+ l("cancel"), v.value = !1, s.value = !1;
1284
+ }
1285
+ function ye(y) {
1286
+ l("save", y), v.value = !1;
1287
+ }
1288
+ function he(y) {
1289
+ y == null && (n.value = Y());
1290
+ }
1291
+ function ke(y) {
1292
+ e.updateOn.includes("blur") && !e.readonly && de(y.target), m.value && s.value && !D.value && (v.value = !1, s.value = !1);
1293
+ }
1294
+ function de(y) {
1295
+ let {
1296
+ value: T
1297
+ } = y;
1298
+ if (!T.trim())
1299
+ n.value = Y();
1300
+ else if (!e.multiple)
1301
+ u(T) && (n.value = b(d(T)));
1302
+ else {
1303
+ const j = T.trim().split(/\D+-\D+|[^\d\-/.]+/);
1304
+ if (j.every(u))
1305
+ if (e.multiple === "range") {
1306
+ const [ne, N] = j.map(d).map(b).toSorted((J, E) => o.isAfter(J, E) ? 1 : -1);
1307
+ n.value = Ne(o, ne, N);
1308
+ } else
1309
+ n.value = j.map(d).filter(C);
1310
+ }
1311
+ }
1312
+ return q(() => {
1313
+ const y = Se.filterProps(e), T = Ie.filterProps(K(e, ["active", "bgColor", "color", "location", "rounded", "maxWidth", "minWidth", "width"])), j = st(r, ["title", "header", "day", "month", "year"]), ne = we.filterProps(K(e, ["placeholder"]));
1314
+ return g(we, F({
1315
+ ref: A
1316
+ }, ne, {
1317
+ class: e.class,
1318
+ style: e.style,
1319
+ modelValue: c.value,
1320
+ inputmode: x.value,
1321
+ placeholder: e.placeholder ?? f.value,
1322
+ readonly: I.value,
1323
+ onKeydown: P.value ? B : void 0,
1324
+ focused: v.value || D.value,
1325
+ onBlur: ke,
1326
+ validationValue: n.value,
1327
+ "onClick:control": P.value ? H : void 0,
1328
+ "onClick:prepend": P.value ? H : void 0,
1329
+ "onUpdate:modelValue": he,
1330
+ "onUpdate:focused": (N) => D.value = N
1331
+ }), {
1332
+ ...r,
1333
+ default: () => w(Q, null, [g(ct, {
1334
+ modelValue: v.value,
1335
+ "onUpdate:modelValue": (N) => v.value = N,
1336
+ activator: "parent",
1337
+ minWidth: "0",
1338
+ eager: D.value,
1339
+ location: e.location,
1340
+ closeOnContentClick: !1,
1341
+ openOnClick: !1
1342
+ }, {
1343
+ default: () => [g(Se, F(y, {
1344
+ modelValue: n.value,
1345
+ "onUpdate:modelValue": (N) => n.value = N,
1346
+ disabled: S.value,
1347
+ onSave: ye,
1348
+ onCancel: ae
1349
+ }), {
1350
+ default: (N) => {
1351
+ let {
1352
+ actions: J,
1353
+ model: E,
1354
+ save: h,
1355
+ cancel: V,
1356
+ isPristine: O
1357
+ } = N;
1358
+ function W(p) {
1359
+ e.hideActions ? (n.value = p, e.multiple || (v.value = !1)) : E.value = p, l("save", p), S.value = [];
1360
+ }
1361
+ return g(Ie, F(T, {
1362
+ modelValue: e.hideActions ? n.value : E.value,
1363
+ "onUpdate:modelValue": (p) => W(p),
1364
+ onMousedown: (p) => p.preventDefault()
1365
+ }), {
1366
+ ...j,
1367
+ actions: e.hideActions ? void 0 : () => r.actions?.({
1368
+ save: h,
1369
+ cancel: V,
1370
+ isPristine: O
1371
+ }) ?? J()
1372
+ });
1373
+ }
1374
+ })]
1375
+ }), r.default?.()])
1376
+ });
1377
+ }), ft({}, A);
1378
+ }
1379
+ }), pt = {
1380
+ __name: "Datepicker",
1381
+ props: /* @__PURE__ */ Qe({
1382
+ returnFormat: {
1383
+ type: String,
1384
+ default: "DD-MM-YYYY"
1385
+ }
1386
+ }, {
1387
+ modelValue: {},
1388
+ modelModifiers: {}
1389
+ }),
1390
+ emits: ["update:modelValue"],
1391
+ setup(e) {
1392
+ const a = Xe(e, "modelValue"), l = e, r = M({
1393
+ get: () => {
1394
+ const t = l.returnFormat, i = Array.isArray(a.value);
1395
+ let o;
1396
+ return i ? o = a.value.filter((u) => G(u, t).isValid()).map((u) => new Date(G(u, t).format())) : G(a.value, t).isValid() && (o = new Date(G(a.value, t).format())), o;
1397
+ },
1398
+ set: (t) => {
1399
+ const i = l.returnFormat;
1400
+ Array.isArray(t) ? a.value = t.filter((u) => G(u).isValid()).map((u) => G(u).format(i)) : a.value = G(t).isValid() ? G(t).format(i) : void 0;
1401
+ }
1402
+ });
1403
+ return (t, i) => (tt(), et(De(Ct), {
1404
+ modelValue: De(r),
1405
+ "onUpdate:modelValue": i[0] || (i[0] = (o) => at(r) ? r.value = o : null)
1406
+ }, null, 8, ["modelValue"]));
1407
+ }
1408
+ };
1409
+ export {
1410
+ pt as default
1411
+ };