@keenmate/web-daterangepicker 1.2.0 → 1.3.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.
- package/dist/style.css +1 -1
- package/dist/web-daterangepicker.js +1025 -1025
- package/dist/web-daterangepicker.umd.js +11 -11
- package/package.json +1 -1
- package/src/scss/_badges.scss +6 -6
- package/src/scss/_base.scss +198 -2
- package/src/scss/_calendar-grid.scss +20 -20
- package/src/scss/_header-navigation.scss +30 -30
- package/src/scss/_summary-actions.scss +15 -15
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var Kt = Object.defineProperty;
|
|
2
2
|
var Gt = (e, a, t) => a in e ? Kt(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
3
|
-
var
|
|
3
|
+
var b = (e, a, t) => Gt(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
4
|
function Xt(e) {
|
|
5
5
|
if (e !== "auto")
|
|
6
6
|
return e;
|
|
7
7
|
try {
|
|
8
8
|
const n = new Intl.Locale(navigator.language);
|
|
9
9
|
if ("weekInfo" in n && n.weekInfo && "firstDay" in n.weekInfo) {
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const r = n.weekInfo.firstDay;
|
|
11
|
+
return r === 7 ? 0 : r;
|
|
12
12
|
}
|
|
13
13
|
} catch {
|
|
14
14
|
}
|
|
@@ -31,7 +31,7 @@ function Xt(e) {
|
|
|
31
31
|
// South Korea
|
|
32
32
|
].some((n) => a.startsWith(n)) ? 0 : 1;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function he(e) {
|
|
35
35
|
if (!e) return null;
|
|
36
36
|
let a;
|
|
37
37
|
return typeof e == "string" ? a = /* @__PURE__ */ new Date(e + "T00:00:00") : a = new Date(e), a.setHours(0, 0, 0, 0), isNaN(a.getTime()) ? null : a;
|
|
@@ -40,111 +40,111 @@ function me(e) {
|
|
|
40
40
|
const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
41
41
|
return `${a}-${t}-${n}`;
|
|
42
42
|
}
|
|
43
|
-
function Jt(e, a, t, n,
|
|
44
|
-
const
|
|
45
|
-
return !!(a && e < a || t && e > t ||
|
|
43
|
+
function Jt(e, a, t, n, r) {
|
|
44
|
+
const i = me(e), o = e.getDay();
|
|
45
|
+
return !!(a && e < a || t && e > t || r && r.includes(o) || n.has(i));
|
|
46
46
|
}
|
|
47
47
|
function ct(e, a) {
|
|
48
48
|
for (let t = 0; t < 12; t++) {
|
|
49
49
|
const n = new Date(a, t + 1, 0).getDate();
|
|
50
|
-
for (let
|
|
51
|
-
const
|
|
52
|
-
if (!e.isDateDisabledInternal(
|
|
50
|
+
for (let r = 1; r <= n; r++) {
|
|
51
|
+
const i = new Date(a, t, r);
|
|
52
|
+
if (!e.isDateDisabledInternal(i))
|
|
53
53
|
return !0;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
58
|
function Qt(e, a, t) {
|
|
59
|
-
const n = new Date(e),
|
|
60
|
-
n.setHours(0, 0, 0, 0),
|
|
61
|
-
const
|
|
62
|
-
for (;
|
|
63
|
-
if (t(
|
|
59
|
+
const n = new Date(e), r = new Date(a);
|
|
60
|
+
n.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0);
|
|
61
|
+
const i = new Date(n);
|
|
62
|
+
for (; i <= r; ) {
|
|
63
|
+
if (t(i))
|
|
64
64
|
return !0;
|
|
65
|
-
|
|
65
|
+
i.setDate(i.getDate() + 1);
|
|
66
66
|
}
|
|
67
67
|
return !1;
|
|
68
68
|
}
|
|
69
69
|
function Zt(e, a, t) {
|
|
70
|
-
const n = [],
|
|
71
|
-
|
|
72
|
-
const o = new Date(
|
|
73
|
-
for (; o <=
|
|
70
|
+
const n = [], r = new Date(e), i = new Date(a);
|
|
71
|
+
r.setHours(0, 0, 0, 0), i.setHours(0, 0, 0, 0);
|
|
72
|
+
const o = new Date(r);
|
|
73
|
+
for (; o <= i; )
|
|
74
74
|
t(o) || n.push(new Date(o)), o.setDate(o.getDate() + 1);
|
|
75
75
|
return n;
|
|
76
76
|
}
|
|
77
77
|
function ea(e, a, t) {
|
|
78
|
-
const n = [],
|
|
79
|
-
|
|
80
|
-
const o = new Date(
|
|
81
|
-
for (; o <=
|
|
78
|
+
const n = [], r = new Date(e), i = new Date(a);
|
|
79
|
+
r.setHours(0, 0, 0, 0), i.setHours(0, 0, 0, 0);
|
|
80
|
+
const o = new Date(r);
|
|
81
|
+
for (; o <= i; )
|
|
82
82
|
t(o) && n.push(new Date(o)), o.setDate(o.getDate() + 1);
|
|
83
83
|
return n;
|
|
84
84
|
}
|
|
85
85
|
function ta(e, a, t) {
|
|
86
|
-
const n = new Date(e),
|
|
87
|
-
n.setHours(0, 0, 0, 0),
|
|
88
|
-
let
|
|
86
|
+
const n = new Date(e), r = new Date(a);
|
|
87
|
+
n.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0);
|
|
88
|
+
let i = new Date(n);
|
|
89
89
|
const o = new Date(n);
|
|
90
|
-
for (o.setDate(o.getDate() + 1); o <=
|
|
90
|
+
for (o.setDate(o.getDate() + 1); o <= r; ) {
|
|
91
91
|
if (t(o))
|
|
92
|
-
return
|
|
93
|
-
|
|
92
|
+
return i;
|
|
93
|
+
i = new Date(o), o.setDate(o.getDate() + 1);
|
|
94
94
|
}
|
|
95
|
-
return
|
|
95
|
+
return r;
|
|
96
96
|
}
|
|
97
97
|
function aa(e, a, t) {
|
|
98
|
-
const n = [],
|
|
99
|
-
|
|
98
|
+
const n = [], r = new Date(e), i = new Date(a);
|
|
99
|
+
r.setHours(0, 0, 0, 0), i.setHours(0, 0, 0, 0);
|
|
100
100
|
let o = null;
|
|
101
|
-
const
|
|
102
|
-
for (;
|
|
103
|
-
if (!t(
|
|
104
|
-
o || (o = new Date(
|
|
101
|
+
const s = new Date(r);
|
|
102
|
+
for (; s <= i; ) {
|
|
103
|
+
if (!t(s))
|
|
104
|
+
o || (o = new Date(s));
|
|
105
105
|
else if (o) {
|
|
106
|
-
const d = new Date(
|
|
106
|
+
const d = new Date(s);
|
|
107
107
|
d.setDate(d.getDate() - 1), n.push({ start: o, end: d }), o = null;
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
s.setDate(s.getDate() + 1);
|
|
110
110
|
}
|
|
111
|
-
return o && n.push({ start: o, end: new Date(
|
|
111
|
+
return o && n.push({ start: o, end: new Date(i) }), n;
|
|
112
112
|
}
|
|
113
113
|
function ut(e) {
|
|
114
|
-
return
|
|
114
|
+
return pt(e, /* @__PURE__ */ new Date());
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function pt(e, a) {
|
|
117
117
|
return !e || !a ? !1 : e.getFullYear() === a.getFullYear() && e.getMonth() === a.getMonth() && e.getDate() === a.getDate();
|
|
118
118
|
}
|
|
119
119
|
function na(e, a, t) {
|
|
120
120
|
return !a || !t ? !1 : e > a && e < t;
|
|
121
121
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
122
|
+
var ra = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
123
|
+
function ia(e) {
|
|
124
124
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
125
125
|
}
|
|
126
|
-
var
|
|
126
|
+
var gt = { exports: {} };
|
|
127
127
|
(function(e) {
|
|
128
128
|
(function(a, t) {
|
|
129
129
|
e.exports ? e.exports = t() : a.log = t();
|
|
130
|
-
})(
|
|
130
|
+
})(ra, function() {
|
|
131
131
|
var a = function() {
|
|
132
|
-
}, t = "undefined", n = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent),
|
|
132
|
+
}, t = "undefined", n = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent), r = [
|
|
133
133
|
"trace",
|
|
134
134
|
"debug",
|
|
135
135
|
"info",
|
|
136
136
|
"warn",
|
|
137
137
|
"error"
|
|
138
|
-
],
|
|
139
|
-
function
|
|
140
|
-
var
|
|
141
|
-
if (typeof
|
|
142
|
-
return
|
|
138
|
+
], i = {}, o = null;
|
|
139
|
+
function s(f, y) {
|
|
140
|
+
var h = f[y];
|
|
141
|
+
if (typeof h.bind == "function")
|
|
142
|
+
return h.bind(f);
|
|
143
143
|
try {
|
|
144
|
-
return Function.prototype.bind.call(
|
|
144
|
+
return Function.prototype.bind.call(h, f);
|
|
145
145
|
} catch {
|
|
146
146
|
return function() {
|
|
147
|
-
return Function.prototype.apply.apply(
|
|
147
|
+
return Function.prototype.apply.apply(h, [f, arguments]);
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -152,29 +152,29 @@ var ht = { exports: {} };
|
|
|
152
152
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
153
153
|
}
|
|
154
154
|
function l(f) {
|
|
155
|
-
return f === "debug" && (f = "log"), typeof console === t ? !1 : f === "trace" && n ? d : console[f] !== void 0 ?
|
|
155
|
+
return f === "debug" && (f = "log"), typeof console === t ? !1 : f === "trace" && n ? d : console[f] !== void 0 ? s(console, f) : console.log !== void 0 ? s(console, "log") : a;
|
|
156
156
|
}
|
|
157
157
|
function c() {
|
|
158
|
-
for (var f = this.getLevel(),
|
|
159
|
-
var
|
|
160
|
-
this[
|
|
158
|
+
for (var f = this.getLevel(), y = 0; y < r.length; y++) {
|
|
159
|
+
var h = r[y];
|
|
160
|
+
this[h] = y < f ? a : this.methodFactory(h, f, this.name);
|
|
161
161
|
}
|
|
162
162
|
if (this.log = this.debug, typeof console === t && f < this.levels.SILENT)
|
|
163
163
|
return "No console available for logging";
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function p(f) {
|
|
166
166
|
return function() {
|
|
167
167
|
typeof console !== t && (c.call(this), this[f].apply(this, arguments));
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function u(f,
|
|
171
|
-
return l(f) ||
|
|
170
|
+
function u(f, y, h) {
|
|
171
|
+
return l(f) || p.apply(this, arguments);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
var
|
|
173
|
+
function g(f, y) {
|
|
174
|
+
var h = this, M, C, E, _ = "loglevel";
|
|
175
175
|
typeof f == "string" ? _ += ":" + f : typeof f == "symbol" && (_ = void 0);
|
|
176
176
|
function v(S) {
|
|
177
|
-
var R = (
|
|
177
|
+
var R = (r[S] || "silent").toUpperCase();
|
|
178
178
|
if (!(typeof window === t || !_)) {
|
|
179
179
|
try {
|
|
180
180
|
window.localStorage[_] = R;
|
|
@@ -202,7 +202,7 @@ var ht = { exports: {} };
|
|
|
202
202
|
)[1]);
|
|
203
203
|
} catch {
|
|
204
204
|
}
|
|
205
|
-
return
|
|
205
|
+
return h.levels[S] === void 0 && (S = void 0), S;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
function A() {
|
|
@@ -219,58 +219,58 @@ var ht = { exports: {} };
|
|
|
219
219
|
}
|
|
220
220
|
function D(S) {
|
|
221
221
|
var R = S;
|
|
222
|
-
if (typeof R == "string" &&
|
|
222
|
+
if (typeof R == "string" && h.levels[R.toUpperCase()] !== void 0 && (R = h.levels[R.toUpperCase()]), typeof R == "number" && R >= 0 && R <= h.levels.SILENT)
|
|
223
223
|
return R;
|
|
224
224
|
throw new TypeError("log.setLevel() called with invalid level: " + S);
|
|
225
225
|
}
|
|
226
|
-
|
|
226
|
+
h.name = f, h.levels = {
|
|
227
227
|
TRACE: 0,
|
|
228
228
|
DEBUG: 1,
|
|
229
229
|
INFO: 2,
|
|
230
230
|
WARN: 3,
|
|
231
231
|
ERROR: 4,
|
|
232
232
|
SILENT: 5
|
|
233
|
-
},
|
|
233
|
+
}, h.methodFactory = y || u, h.getLevel = function() {
|
|
234
234
|
return E ?? C ?? M;
|
|
235
|
-
},
|
|
236
|
-
return E = D(S), R !== !1 && v(E), c.call(
|
|
237
|
-
},
|
|
238
|
-
C = D(S), I() ||
|
|
239
|
-
},
|
|
240
|
-
E = null, A(), c.call(
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
},
|
|
246
|
-
if (o !==
|
|
247
|
-
for (var S in
|
|
248
|
-
|
|
235
|
+
}, h.setLevel = function(S, R) {
|
|
236
|
+
return E = D(S), R !== !1 && v(E), c.call(h);
|
|
237
|
+
}, h.setDefaultLevel = function(S) {
|
|
238
|
+
C = D(S), I() || h.setLevel(S, !1);
|
|
239
|
+
}, h.resetLevel = function() {
|
|
240
|
+
E = null, A(), c.call(h);
|
|
241
|
+
}, h.enableAll = function(S) {
|
|
242
|
+
h.setLevel(h.levels.TRACE, S);
|
|
243
|
+
}, h.disableAll = function(S) {
|
|
244
|
+
h.setLevel(h.levels.SILENT, S);
|
|
245
|
+
}, h.rebuild = function() {
|
|
246
|
+
if (o !== h && (M = D(o.getLevel())), c.call(h), o === h)
|
|
247
|
+
for (var S in i)
|
|
248
|
+
i[S].rebuild();
|
|
249
249
|
}, M = D(
|
|
250
250
|
o ? o.getLevel() : "WARN"
|
|
251
251
|
);
|
|
252
252
|
var x = I();
|
|
253
|
-
x != null && (E = D(x)), c.call(
|
|
253
|
+
x != null && (E = D(x)), c.call(h);
|
|
254
254
|
}
|
|
255
|
-
o = new
|
|
256
|
-
if (typeof
|
|
255
|
+
o = new g(), o.getLogger = function(y) {
|
|
256
|
+
if (typeof y != "symbol" && typeof y != "string" || y === "")
|
|
257
257
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
258
|
-
var
|
|
259
|
-
return
|
|
260
|
-
|
|
258
|
+
var h = i[y];
|
|
259
|
+
return h || (h = i[y] = new g(
|
|
260
|
+
y,
|
|
261
261
|
o.methodFactory
|
|
262
|
-
)),
|
|
262
|
+
)), h;
|
|
263
263
|
};
|
|
264
264
|
var m = typeof window !== t ? window.log : void 0;
|
|
265
265
|
return o.noConflict = function() {
|
|
266
266
|
return typeof window !== t && window.log === o && (window.log = m), o;
|
|
267
267
|
}, o.getLoggers = function() {
|
|
268
|
-
return
|
|
268
|
+
return i;
|
|
269
269
|
}, o.default = o, o;
|
|
270
270
|
});
|
|
271
|
-
})(
|
|
272
|
-
var oa =
|
|
273
|
-
const Y = /* @__PURE__ */
|
|
271
|
+
})(gt);
|
|
272
|
+
var oa = gt.exports;
|
|
273
|
+
const Y = /* @__PURE__ */ ia(oa), sa = [
|
|
274
274
|
"DRP",
|
|
275
275
|
"DRP:RENDERING",
|
|
276
276
|
"DRP:INTERACTION",
|
|
@@ -292,25 +292,25 @@ const Y = /* @__PURE__ */ sa(oa), ra = [
|
|
|
292
292
|
// Red
|
|
293
293
|
}, la = Y.methodFactory, ca = (e, a, t) => {
|
|
294
294
|
const n = la.call(Y, e, a, t);
|
|
295
|
-
return (...
|
|
296
|
-
const
|
|
295
|
+
return (...r) => {
|
|
296
|
+
const i = da[e] || "#6b7280", s = `%c[${(/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", {
|
|
297
297
|
hour12: !1,
|
|
298
298
|
hour: "2-digit",
|
|
299
299
|
minute: "2-digit",
|
|
300
300
|
second: "2-digit",
|
|
301
301
|
fractionalSecondDigits: 3
|
|
302
302
|
})}] [${e.toUpperCase()}] ${t ? `[${t}]` : ""}`;
|
|
303
|
-
n(
|
|
303
|
+
n(s, `color: ${i}`, ...r);
|
|
304
304
|
};
|
|
305
|
-
},
|
|
305
|
+
}, ht = [];
|
|
306
306
|
function Q(e) {
|
|
307
307
|
const a = Y.getLogger(e);
|
|
308
|
-
return a.methodFactory = ca, a.setLevel("silent"),
|
|
308
|
+
return a.methodFactory = ca, a.setLevel("silent"), ht.push(a), a;
|
|
309
309
|
}
|
|
310
|
-
const T = Q("DRP"), de = Q("DRP:RENDERING"), oe = Q("DRP:INTERACTION"),
|
|
310
|
+
const T = Q("DRP"), de = Q("DRP:RENDERING"), oe = Q("DRP:INTERACTION"), ie = Q("DRP:SELECTION"), w = Q("DRP:NAVIGATION"), O = Q("DRP:UI"), ee = Q("DRP:VALIDATION"), U = Q("DRP:DRAG");
|
|
311
311
|
Y.setLevel("silent");
|
|
312
312
|
const We = (e) => {
|
|
313
|
-
Y.setLevel(e),
|
|
313
|
+
Y.setLevel(e), ht.forEach((a) => a.setLevel(e));
|
|
314
314
|
}, ft = () => {
|
|
315
315
|
We("debug");
|
|
316
316
|
}, mt = () => {
|
|
@@ -320,22 +320,22 @@ const We = (e) => {
|
|
|
320
320
|
DRP: T,
|
|
321
321
|
"DRP:RENDERING": de,
|
|
322
322
|
"DRP:INTERACTION": oe,
|
|
323
|
-
"DRP:SELECTION":
|
|
323
|
+
"DRP:SELECTION": ie,
|
|
324
324
|
"DRP:NAVIGATION": w,
|
|
325
|
-
"DRP:UI":
|
|
325
|
+
"DRP:UI": O,
|
|
326
326
|
"DRP:VALIDATION": ee,
|
|
327
327
|
"DRP:DRAG": U
|
|
328
328
|
}[e];
|
|
329
329
|
n && n.setLevel(a);
|
|
330
|
-
},
|
|
330
|
+
}, pa = () => [...sa], le = Math.min, te = Math.max, Ie = Math.round, Me = Math.floor, W = (e) => ({
|
|
331
331
|
x: e,
|
|
332
332
|
y: e
|
|
333
|
-
}),
|
|
333
|
+
}), ga = {
|
|
334
334
|
left: "right",
|
|
335
335
|
right: "left",
|
|
336
336
|
bottom: "top",
|
|
337
337
|
top: "bottom"
|
|
338
|
-
},
|
|
338
|
+
}, ha = {
|
|
339
339
|
start: "end",
|
|
340
340
|
end: "start"
|
|
341
341
|
};
|
|
@@ -351,7 +351,7 @@ function ne(e) {
|
|
|
351
351
|
function we(e) {
|
|
352
352
|
return e.split("-")[1];
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function bt(e) {
|
|
355
355
|
return e === "x" ? "y" : "x";
|
|
356
356
|
}
|
|
357
357
|
function Ke(e) {
|
|
@@ -362,41 +362,41 @@ function X(e) {
|
|
|
362
362
|
return fa.has(ne(e)) ? "y" : "x";
|
|
363
363
|
}
|
|
364
364
|
function Ge(e) {
|
|
365
|
-
return
|
|
365
|
+
return bt(X(e));
|
|
366
366
|
}
|
|
367
367
|
function ma(e, a, t) {
|
|
368
368
|
t === void 0 && (t = !1);
|
|
369
|
-
const n = we(e),
|
|
370
|
-
let o =
|
|
371
|
-
return a.reference[
|
|
369
|
+
const n = we(e), r = Ge(e), i = Ke(r);
|
|
370
|
+
let o = r === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
371
|
+
return a.reference[i] > a.floating[i] && (o = Ee(o)), [o, Ee(o)];
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function ba(e) {
|
|
374
374
|
const a = Ee(e);
|
|
375
375
|
return [He(e), a, He(a)];
|
|
376
376
|
}
|
|
377
377
|
function He(e) {
|
|
378
|
-
return e.replace(/start|end/g, (a) =>
|
|
378
|
+
return e.replace(/start|end/g, (a) => ha[a]);
|
|
379
379
|
}
|
|
380
|
-
const nt = ["left", "right"],
|
|
380
|
+
const nt = ["left", "right"], rt = ["right", "left"], ya = ["top", "bottom"], va = ["bottom", "top"];
|
|
381
381
|
function Da(e, a, t) {
|
|
382
382
|
switch (e) {
|
|
383
383
|
case "top":
|
|
384
384
|
case "bottom":
|
|
385
|
-
return t ? a ?
|
|
385
|
+
return t ? a ? rt : nt : a ? nt : rt;
|
|
386
386
|
case "left":
|
|
387
387
|
case "right":
|
|
388
|
-
return a ?
|
|
388
|
+
return a ? ya : va;
|
|
389
389
|
default:
|
|
390
390
|
return [];
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
function _a(e, a, t, n) {
|
|
394
|
-
const
|
|
395
|
-
let
|
|
396
|
-
return
|
|
394
|
+
const r = we(e);
|
|
395
|
+
let i = Da(ne(e), t === "start", n);
|
|
396
|
+
return r && (i = i.map((o) => o + "-" + r), a && (i = i.concat(i.map(He)))), i;
|
|
397
397
|
}
|
|
398
398
|
function Ee(e) {
|
|
399
|
-
return e.replace(/left|right|bottom|top/g, (a) =>
|
|
399
|
+
return e.replace(/left|right|bottom|top/g, (a) => ga[a]);
|
|
400
400
|
}
|
|
401
401
|
function wa(e) {
|
|
402
402
|
return {
|
|
@@ -407,7 +407,7 @@ function wa(e) {
|
|
|
407
407
|
...e
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function yt(e) {
|
|
411
411
|
return typeof e != "number" ? wa(e) : {
|
|
412
412
|
top: e,
|
|
413
413
|
right: e,
|
|
@@ -420,98 +420,98 @@ function Re(e) {
|
|
|
420
420
|
x: a,
|
|
421
421
|
y: t,
|
|
422
422
|
width: n,
|
|
423
|
-
height:
|
|
423
|
+
height: r
|
|
424
424
|
} = e;
|
|
425
425
|
return {
|
|
426
426
|
width: n,
|
|
427
|
-
height:
|
|
427
|
+
height: r,
|
|
428
428
|
top: t,
|
|
429
429
|
left: a,
|
|
430
430
|
right: a + n,
|
|
431
|
-
bottom: t +
|
|
431
|
+
bottom: t + r,
|
|
432
432
|
x: a,
|
|
433
433
|
y: t
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function it(e, a, t) {
|
|
437
437
|
let {
|
|
438
438
|
reference: n,
|
|
439
|
-
floating:
|
|
439
|
+
floating: r
|
|
440
440
|
} = e;
|
|
441
|
-
const
|
|
442
|
-
let
|
|
441
|
+
const i = X(a), o = Ge(a), s = Ke(o), d = ne(a), l = i === "y", c = n.x + n.width / 2 - r.width / 2, p = n.y + n.height / 2 - r.height / 2, u = n[s] / 2 - r[s] / 2;
|
|
442
|
+
let g;
|
|
443
443
|
switch (d) {
|
|
444
444
|
case "top":
|
|
445
|
-
|
|
445
|
+
g = {
|
|
446
446
|
x: c,
|
|
447
|
-
y: n.y -
|
|
447
|
+
y: n.y - r.height
|
|
448
448
|
};
|
|
449
449
|
break;
|
|
450
450
|
case "bottom":
|
|
451
|
-
|
|
451
|
+
g = {
|
|
452
452
|
x: c,
|
|
453
453
|
y: n.y + n.height
|
|
454
454
|
};
|
|
455
455
|
break;
|
|
456
456
|
case "right":
|
|
457
|
-
|
|
457
|
+
g = {
|
|
458
458
|
x: n.x + n.width,
|
|
459
|
-
y:
|
|
459
|
+
y: p
|
|
460
460
|
};
|
|
461
461
|
break;
|
|
462
462
|
case "left":
|
|
463
|
-
|
|
464
|
-
x: n.x -
|
|
465
|
-
y:
|
|
463
|
+
g = {
|
|
464
|
+
x: n.x - r.width,
|
|
465
|
+
y: p
|
|
466
466
|
};
|
|
467
467
|
break;
|
|
468
468
|
default:
|
|
469
|
-
|
|
469
|
+
g = {
|
|
470
470
|
x: n.x,
|
|
471
471
|
y: n.y
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
switch (we(a)) {
|
|
475
475
|
case "start":
|
|
476
|
-
|
|
476
|
+
g[o] -= u * (t && l ? -1 : 1);
|
|
477
477
|
break;
|
|
478
478
|
case "end":
|
|
479
|
-
|
|
479
|
+
g[o] += u * (t && l ? -1 : 1);
|
|
480
480
|
break;
|
|
481
481
|
}
|
|
482
|
-
return
|
|
482
|
+
return g;
|
|
483
483
|
}
|
|
484
484
|
const xa = async (e, a, t) => {
|
|
485
485
|
const {
|
|
486
486
|
placement: n = "bottom",
|
|
487
|
-
strategy:
|
|
488
|
-
middleware:
|
|
487
|
+
strategy: r = "absolute",
|
|
488
|
+
middleware: i = [],
|
|
489
489
|
platform: o
|
|
490
|
-
} = t,
|
|
490
|
+
} = t, s = i.filter(Boolean), d = await (o.isRTL == null ? void 0 : o.isRTL(a));
|
|
491
491
|
let l = await o.getElementRects({
|
|
492
492
|
reference: e,
|
|
493
493
|
floating: a,
|
|
494
|
-
strategy:
|
|
494
|
+
strategy: r
|
|
495
495
|
}), {
|
|
496
496
|
x: c,
|
|
497
|
-
y:
|
|
498
|
-
} =
|
|
499
|
-
for (let f = 0; f <
|
|
497
|
+
y: p
|
|
498
|
+
} = it(l, n, d), u = n, g = {}, m = 0;
|
|
499
|
+
for (let f = 0; f < s.length; f++) {
|
|
500
500
|
const {
|
|
501
|
-
name:
|
|
502
|
-
fn:
|
|
503
|
-
} =
|
|
501
|
+
name: y,
|
|
502
|
+
fn: h
|
|
503
|
+
} = s[f], {
|
|
504
504
|
x: M,
|
|
505
505
|
y: C,
|
|
506
506
|
data: E,
|
|
507
507
|
reset: _
|
|
508
|
-
} = await
|
|
508
|
+
} = await h({
|
|
509
509
|
x: c,
|
|
510
|
-
y:
|
|
510
|
+
y: p,
|
|
511
511
|
initialPlacement: n,
|
|
512
512
|
placement: u,
|
|
513
|
-
strategy:
|
|
514
|
-
middlewareData:
|
|
513
|
+
strategy: r,
|
|
514
|
+
middlewareData: g,
|
|
515
515
|
rects: l,
|
|
516
516
|
platform: o,
|
|
517
517
|
elements: {
|
|
@@ -519,27 +519,27 @@ const xa = async (e, a, t) => {
|
|
|
519
519
|
floating: a
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
|
-
c = M ?? c,
|
|
523
|
-
...
|
|
524
|
-
[
|
|
525
|
-
...
|
|
522
|
+
c = M ?? c, p = C ?? p, g = {
|
|
523
|
+
...g,
|
|
524
|
+
[y]: {
|
|
525
|
+
...g[y],
|
|
526
526
|
...E
|
|
527
527
|
}
|
|
528
528
|
}, _ && m <= 50 && (m++, typeof _ == "object" && (_.placement && (u = _.placement), _.rects && (l = _.rects === !0 ? await o.getElementRects({
|
|
529
529
|
reference: e,
|
|
530
530
|
floating: a,
|
|
531
|
-
strategy:
|
|
531
|
+
strategy: r
|
|
532
532
|
}) : _.rects), {
|
|
533
533
|
x: c,
|
|
534
|
-
y:
|
|
535
|
-
} =
|
|
534
|
+
y: p
|
|
535
|
+
} = it(l, u, d)), f = -1);
|
|
536
536
|
}
|
|
537
537
|
return {
|
|
538
538
|
x: c,
|
|
539
|
-
y:
|
|
539
|
+
y: p,
|
|
540
540
|
placement: u,
|
|
541
|
-
strategy:
|
|
542
|
-
middlewareData:
|
|
541
|
+
strategy: r,
|
|
542
|
+
middlewareData: g
|
|
543
543
|
};
|
|
544
544
|
};
|
|
545
545
|
async function vt(e, a) {
|
|
@@ -547,44 +547,44 @@ async function vt(e, a) {
|
|
|
547
547
|
a === void 0 && (a = {});
|
|
548
548
|
const {
|
|
549
549
|
x: n,
|
|
550
|
-
y:
|
|
551
|
-
platform:
|
|
550
|
+
y: r,
|
|
551
|
+
platform: i,
|
|
552
552
|
rects: o,
|
|
553
|
-
elements:
|
|
553
|
+
elements: s,
|
|
554
554
|
strategy: d
|
|
555
555
|
} = e, {
|
|
556
556
|
boundary: l = "clippingAncestors",
|
|
557
557
|
rootBoundary: c = "viewport",
|
|
558
|
-
elementContext:
|
|
558
|
+
elementContext: p = "floating",
|
|
559
559
|
altBoundary: u = !1,
|
|
560
|
-
padding:
|
|
561
|
-
} = _e(a, e), m =
|
|
562
|
-
element: (t = await (
|
|
560
|
+
padding: g = 0
|
|
561
|
+
} = _e(a, e), m = yt(g), y = s[u ? p === "floating" ? "reference" : "floating" : p], h = Re(await i.getClippingRect({
|
|
562
|
+
element: (t = await (i.isElement == null ? void 0 : i.isElement(y))) == null || t ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(s.floating)),
|
|
563
563
|
boundary: l,
|
|
564
564
|
rootBoundary: c,
|
|
565
565
|
strategy: d
|
|
566
|
-
})), M =
|
|
566
|
+
})), M = p === "floating" ? {
|
|
567
567
|
x: n,
|
|
568
|
-
y:
|
|
568
|
+
y: r,
|
|
569
569
|
width: o.floating.width,
|
|
570
570
|
height: o.floating.height
|
|
571
|
-
} : o.reference, C = await (
|
|
571
|
+
} : o.reference, C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(s.floating)), E = await (i.isElement == null ? void 0 : i.isElement(C)) ? await (i.getScale == null ? void 0 : i.getScale(C)) || {
|
|
572
572
|
x: 1,
|
|
573
573
|
y: 1
|
|
574
574
|
} : {
|
|
575
575
|
x: 1,
|
|
576
576
|
y: 1
|
|
577
|
-
}, _ = Re(
|
|
578
|
-
elements:
|
|
577
|
+
}, _ = Re(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
578
|
+
elements: s,
|
|
579
579
|
rect: M,
|
|
580
580
|
offsetParent: C,
|
|
581
581
|
strategy: d
|
|
582
582
|
}) : M);
|
|
583
583
|
return {
|
|
584
|
-
top: (
|
|
585
|
-
bottom: (_.bottom -
|
|
586
|
-
left: (
|
|
587
|
-
right: (_.right -
|
|
584
|
+
top: (h.top - _.top + m.top) / E.y,
|
|
585
|
+
bottom: (_.bottom - h.bottom + m.bottom) / E.y,
|
|
586
|
+
left: (h.left - _.left + m.left) / E.x,
|
|
587
|
+
right: (_.right - h.right + m.right) / E.x
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
590
|
const Ma = (e) => ({
|
|
@@ -594,10 +594,10 @@ const Ma = (e) => ({
|
|
|
594
594
|
const {
|
|
595
595
|
x: t,
|
|
596
596
|
y: n,
|
|
597
|
-
placement:
|
|
598
|
-
rects:
|
|
597
|
+
placement: r,
|
|
598
|
+
rects: i,
|
|
599
599
|
platform: o,
|
|
600
|
-
elements:
|
|
600
|
+
elements: s,
|
|
601
601
|
middlewareData: d
|
|
602
602
|
} = a, {
|
|
603
603
|
element: l,
|
|
@@ -605,23 +605,23 @@ const Ma = (e) => ({
|
|
|
605
605
|
} = _e(e, a) || {};
|
|
606
606
|
if (l == null)
|
|
607
607
|
return {};
|
|
608
|
-
const
|
|
608
|
+
const p = yt(c), u = {
|
|
609
609
|
x: t,
|
|
610
610
|
y: n
|
|
611
|
-
},
|
|
611
|
+
}, g = Ge(r), m = Ke(g), f = await o.getDimensions(l), y = g === "y", h = y ? "top" : "left", M = y ? "bottom" : "right", C = y ? "clientHeight" : "clientWidth", E = i.reference[m] + i.reference[g] - u[g] - i.floating[m], _ = u[g] - i.reference[g], v = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l));
|
|
612
612
|
let I = v ? v[C] : 0;
|
|
613
|
-
(!I || !await (o.isElement == null ? void 0 : o.isElement(v))) && (I =
|
|
614
|
-
const A = E / 2 - _ / 2, D = I / 2 - f[m] / 2 - 1, x = le(
|
|
613
|
+
(!I || !await (o.isElement == null ? void 0 : o.isElement(v))) && (I = s.floating[C] || i.floating[m]);
|
|
614
|
+
const A = E / 2 - _ / 2, D = I / 2 - f[m] / 2 - 1, x = le(p[h], D), S = le(p[M], D), R = x, k = I - f[m] - S, L = I / 2 - f[m] / 2 + A, N = Be(R, L, k), z = !d.arrow && we(r) != null && L !== N && i.reference[m] / 2 - (L < R ? x : S) - f[m] / 2 < 0, $ = z ? L < R ? L - R : L - k : 0;
|
|
615
615
|
return {
|
|
616
|
-
[
|
|
616
|
+
[g]: u[g] + $,
|
|
617
617
|
data: {
|
|
618
|
-
[
|
|
618
|
+
[g]: N,
|
|
619
619
|
centerOffset: L - N - $,
|
|
620
|
-
...
|
|
620
|
+
...z && {
|
|
621
621
|
alignmentOffset: $
|
|
622
622
|
}
|
|
623
623
|
},
|
|
624
|
-
reset:
|
|
624
|
+
reset: z
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
}), Sa = function(e) {
|
|
@@ -631,38 +631,38 @@ const Ma = (e) => ({
|
|
|
631
631
|
async fn(a) {
|
|
632
632
|
var t, n;
|
|
633
633
|
const {
|
|
634
|
-
placement:
|
|
635
|
-
middlewareData:
|
|
634
|
+
placement: r,
|
|
635
|
+
middlewareData: i,
|
|
636
636
|
rects: o,
|
|
637
|
-
initialPlacement:
|
|
637
|
+
initialPlacement: s,
|
|
638
638
|
platform: d,
|
|
639
639
|
elements: l
|
|
640
640
|
} = a, {
|
|
641
641
|
mainAxis: c = !0,
|
|
642
|
-
crossAxis:
|
|
642
|
+
crossAxis: p = !0,
|
|
643
643
|
fallbackPlacements: u,
|
|
644
|
-
fallbackStrategy:
|
|
644
|
+
fallbackStrategy: g = "bestFit",
|
|
645
645
|
fallbackAxisSideDirection: m = "none",
|
|
646
646
|
flipAlignment: f = !0,
|
|
647
|
-
...
|
|
647
|
+
...y
|
|
648
648
|
} = _e(e, a);
|
|
649
|
-
if ((t =
|
|
649
|
+
if ((t = i.arrow) != null && t.alignmentOffset)
|
|
650
650
|
return {};
|
|
651
|
-
const
|
|
652
|
-
!u && v && _.push(..._a(
|
|
653
|
-
const I = [
|
|
654
|
-
let x = ((n =
|
|
655
|
-
if (c && D.push(A[
|
|
656
|
-
const L = ma(
|
|
651
|
+
const h = ne(r), M = X(s), C = ne(s) === s, E = await (d.isRTL == null ? void 0 : d.isRTL(l.floating)), _ = u || (C || !f ? [Ee(s)] : ba(s)), v = m !== "none";
|
|
652
|
+
!u && v && _.push(..._a(s, f, m, E));
|
|
653
|
+
const I = [s, ..._], A = await vt(a, y), D = [];
|
|
654
|
+
let x = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
655
|
+
if (c && D.push(A[h]), p) {
|
|
656
|
+
const L = ma(r, o, E);
|
|
657
657
|
D.push(A[L[0]], A[L[1]]);
|
|
658
658
|
}
|
|
659
659
|
if (x = [...x, {
|
|
660
|
-
placement:
|
|
660
|
+
placement: r,
|
|
661
661
|
overflows: D
|
|
662
662
|
}], !D.every((L) => L <= 0)) {
|
|
663
663
|
var S, R;
|
|
664
|
-
const L = (((S =
|
|
665
|
-
if (N && (!(
|
|
664
|
+
const L = (((S = i.flip) == null ? void 0 : S.index) || 0) + 1, N = I[L];
|
|
665
|
+
if (N && (!(p === "alignment" ? M !== X(N) : !1) || // We leave the current main axis only if every placement on that axis
|
|
666
666
|
// overflows the main axis.
|
|
667
667
|
x.every((P) => X(P.placement) === M ? P.overflows[0] > 0 : !0)))
|
|
668
668
|
return {
|
|
@@ -674,9 +674,9 @@ const Ma = (e) => ({
|
|
|
674
674
|
placement: N
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
|
-
let
|
|
678
|
-
if (!
|
|
679
|
-
switch (
|
|
677
|
+
let z = (R = x.filter(($) => $.overflows[0] <= 0).sort(($, P) => $.overflows[1] - P.overflows[1])[0]) == null ? void 0 : R.placement;
|
|
678
|
+
if (!z)
|
|
679
|
+
switch (g) {
|
|
680
680
|
case "bestFit": {
|
|
681
681
|
var k;
|
|
682
682
|
const $ = (k = x.filter((P) => {
|
|
@@ -688,17 +688,17 @@ const Ma = (e) => ({
|
|
|
688
688
|
}
|
|
689
689
|
return !0;
|
|
690
690
|
}).map((P) => [P.placement, P.overflows.filter((V) => V > 0).reduce((V, q) => V + q, 0)]).sort((P, V) => P[1] - V[1])[0]) == null ? void 0 : k[0];
|
|
691
|
-
$ && (
|
|
691
|
+
$ && (z = $);
|
|
692
692
|
break;
|
|
693
693
|
}
|
|
694
694
|
case "initialPlacement":
|
|
695
|
-
|
|
695
|
+
z = s;
|
|
696
696
|
break;
|
|
697
697
|
}
|
|
698
|
-
if (
|
|
698
|
+
if (r !== z)
|
|
699
699
|
return {
|
|
700
700
|
reset: {
|
|
701
|
-
placement:
|
|
701
|
+
placement: z
|
|
702
702
|
}
|
|
703
703
|
};
|
|
704
704
|
}
|
|
@@ -710,27 +710,27 @@ async function Ia(e, a) {
|
|
|
710
710
|
const {
|
|
711
711
|
placement: t,
|
|
712
712
|
platform: n,
|
|
713
|
-
elements:
|
|
714
|
-
} = e,
|
|
713
|
+
elements: r
|
|
714
|
+
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), o = ne(t), s = we(t), d = X(t) === "y", l = Ca.has(o) ? -1 : 1, c = i && d ? -1 : 1, p = _e(a, e);
|
|
715
715
|
let {
|
|
716
716
|
mainAxis: u,
|
|
717
|
-
crossAxis:
|
|
717
|
+
crossAxis: g,
|
|
718
718
|
alignmentAxis: m
|
|
719
|
-
} = typeof
|
|
720
|
-
mainAxis:
|
|
719
|
+
} = typeof p == "number" ? {
|
|
720
|
+
mainAxis: p,
|
|
721
721
|
crossAxis: 0,
|
|
722
722
|
alignmentAxis: null
|
|
723
723
|
} : {
|
|
724
|
-
mainAxis:
|
|
725
|
-
crossAxis:
|
|
726
|
-
alignmentAxis:
|
|
724
|
+
mainAxis: p.mainAxis || 0,
|
|
725
|
+
crossAxis: p.crossAxis || 0,
|
|
726
|
+
alignmentAxis: p.alignmentAxis
|
|
727
727
|
};
|
|
728
|
-
return
|
|
729
|
-
x:
|
|
728
|
+
return s && typeof m == "number" && (g = s === "end" ? m * -1 : m), d ? {
|
|
729
|
+
x: g * c,
|
|
730
730
|
y: u * l
|
|
731
731
|
} : {
|
|
732
732
|
x: u * l,
|
|
733
|
-
y:
|
|
733
|
+
y: g * c
|
|
734
734
|
};
|
|
735
735
|
}
|
|
736
736
|
const Ea = function(e) {
|
|
@@ -740,14 +740,14 @@ const Ea = function(e) {
|
|
|
740
740
|
async fn(a) {
|
|
741
741
|
var t, n;
|
|
742
742
|
const {
|
|
743
|
-
x:
|
|
744
|
-
y:
|
|
743
|
+
x: r,
|
|
744
|
+
y: i,
|
|
745
745
|
placement: o,
|
|
746
|
-
middlewareData:
|
|
746
|
+
middlewareData: s
|
|
747
747
|
} = a, d = await Ia(a, e);
|
|
748
|
-
return o === ((t =
|
|
749
|
-
x:
|
|
750
|
-
y:
|
|
748
|
+
return o === ((t = s.offset) == null ? void 0 : t.placement) && (n = s.arrow) != null && n.alignmentOffset ? {} : {
|
|
749
|
+
x: r + d.x,
|
|
750
|
+
y: i + d.y,
|
|
751
751
|
data: {
|
|
752
752
|
...d,
|
|
753
753
|
placement: o
|
|
@@ -763,18 +763,18 @@ const Ea = function(e) {
|
|
|
763
763
|
const {
|
|
764
764
|
x: t,
|
|
765
765
|
y: n,
|
|
766
|
-
placement:
|
|
766
|
+
placement: r
|
|
767
767
|
} = a, {
|
|
768
|
-
mainAxis:
|
|
768
|
+
mainAxis: i = !0,
|
|
769
769
|
crossAxis: o = !1,
|
|
770
|
-
limiter:
|
|
771
|
-
fn: (
|
|
770
|
+
limiter: s = {
|
|
771
|
+
fn: (y) => {
|
|
772
772
|
let {
|
|
773
|
-
x:
|
|
773
|
+
x: h,
|
|
774
774
|
y: M
|
|
775
|
-
} =
|
|
775
|
+
} = y;
|
|
776
776
|
return {
|
|
777
|
-
x:
|
|
777
|
+
x: h,
|
|
778
778
|
y: M
|
|
779
779
|
};
|
|
780
780
|
}
|
|
@@ -783,20 +783,20 @@ const Ea = function(e) {
|
|
|
783
783
|
} = _e(e, a), l = {
|
|
784
784
|
x: t,
|
|
785
785
|
y: n
|
|
786
|
-
}, c = await vt(a, d),
|
|
787
|
-
let
|
|
788
|
-
if (
|
|
789
|
-
const
|
|
790
|
-
|
|
786
|
+
}, c = await vt(a, d), p = X(ne(r)), u = bt(p);
|
|
787
|
+
let g = l[u], m = l[p];
|
|
788
|
+
if (i) {
|
|
789
|
+
const y = u === "y" ? "top" : "left", h = u === "y" ? "bottom" : "right", M = g + c[y], C = g - c[h];
|
|
790
|
+
g = Be(M, g, C);
|
|
791
791
|
}
|
|
792
792
|
if (o) {
|
|
793
|
-
const
|
|
793
|
+
const y = p === "y" ? "top" : "left", h = p === "y" ? "bottom" : "right", M = m + c[y], C = m - c[h];
|
|
794
794
|
m = Be(M, m, C);
|
|
795
795
|
}
|
|
796
|
-
const f =
|
|
796
|
+
const f = s.fn({
|
|
797
797
|
...a,
|
|
798
|
-
[u]:
|
|
799
|
-
[
|
|
798
|
+
[u]: g,
|
|
799
|
+
[p]: m
|
|
800
800
|
});
|
|
801
801
|
return {
|
|
802
802
|
...f,
|
|
@@ -804,8 +804,8 @@ const Ea = function(e) {
|
|
|
804
804
|
x: f.x - t,
|
|
805
805
|
y: f.y - n,
|
|
806
806
|
enabled: {
|
|
807
|
-
[u]:
|
|
808
|
-
[
|
|
807
|
+
[u]: i,
|
|
808
|
+
[p]: o
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
811
|
};
|
|
@@ -815,10 +815,10 @@ const Ea = function(e) {
|
|
|
815
815
|
function Pe() {
|
|
816
816
|
return typeof window < "u";
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function ge(e) {
|
|
819
819
|
return Dt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function F(e) {
|
|
822
822
|
var a;
|
|
823
823
|
return (e == null || (a = e.ownerDocument) == null ? void 0 : a.defaultView) || window;
|
|
824
824
|
}
|
|
@@ -827,16 +827,16 @@ function G(e) {
|
|
|
827
827
|
return (a = (Dt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : a.documentElement;
|
|
828
828
|
}
|
|
829
829
|
function Dt(e) {
|
|
830
|
-
return Pe() ? e instanceof Node || e instanceof
|
|
830
|
+
return Pe() ? e instanceof Node || e instanceof F(e).Node : !1;
|
|
831
831
|
}
|
|
832
832
|
function B(e) {
|
|
833
|
-
return Pe() ? e instanceof Element || e instanceof
|
|
833
|
+
return Pe() ? e instanceof Element || e instanceof F(e).Element : !1;
|
|
834
834
|
}
|
|
835
835
|
function K(e) {
|
|
836
|
-
return Pe() ? e instanceof HTMLElement || e instanceof
|
|
836
|
+
return Pe() ? e instanceof HTMLElement || e instanceof F(e).HTMLElement : !1;
|
|
837
837
|
}
|
|
838
838
|
function ot(e) {
|
|
839
|
-
return !Pe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
839
|
+
return !Pe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
|
|
840
840
|
}
|
|
841
841
|
const Aa = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
842
842
|
function xe(e) {
|
|
@@ -844,13 +844,13 @@ function xe(e) {
|
|
|
844
844
|
overflow: a,
|
|
845
845
|
overflowX: t,
|
|
846
846
|
overflowY: n,
|
|
847
|
-
display:
|
|
847
|
+
display: r
|
|
848
848
|
} = H(e);
|
|
849
|
-
return /auto|scroll|overlay|hidden|clip/.test(a + n + t) && !Aa.has(
|
|
849
|
+
return /auto|scroll|overlay|hidden|clip/.test(a + n + t) && !Aa.has(r);
|
|
850
850
|
}
|
|
851
851
|
const La = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
852
852
|
function Ta(e) {
|
|
853
|
-
return La.has(
|
|
853
|
+
return La.has(ge(e));
|
|
854
854
|
}
|
|
855
855
|
const ka = [":popover-open", ":modal"];
|
|
856
856
|
function Ne(e) {
|
|
@@ -867,7 +867,7 @@ function Xe(e) {
|
|
|
867
867
|
const a = Je(), t = B(e) ? H(e) : e;
|
|
868
868
|
return $a.some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !a && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !a && (t.filter ? t.filter !== "none" : !1) || Pa.some((n) => (t.willChange || "").includes(n)) || Na.some((n) => (t.contain || "").includes(n));
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function za(e) {
|
|
871
871
|
let a = J(e);
|
|
872
872
|
for (; K(a) && !ce(a); ) {
|
|
873
873
|
if (Xe(a))
|
|
@@ -881,14 +881,14 @@ function Fa(e) {
|
|
|
881
881
|
function Je() {
|
|
882
882
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
883
883
|
}
|
|
884
|
-
const
|
|
884
|
+
const Fa = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
885
885
|
function ce(e) {
|
|
886
|
-
return
|
|
886
|
+
return Fa.has(ge(e));
|
|
887
887
|
}
|
|
888
888
|
function H(e) {
|
|
889
|
-
return
|
|
889
|
+
return F(e).getComputedStyle(e);
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function ze(e) {
|
|
892
892
|
return B(e) ? {
|
|
893
893
|
scrollLeft: e.scrollLeft,
|
|
894
894
|
scrollTop: e.scrollTop
|
|
@@ -898,7 +898,7 @@ function Fe(e) {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
function J(e) {
|
|
901
|
-
if (
|
|
901
|
+
if (ge(e) === "html")
|
|
902
902
|
return e;
|
|
903
903
|
const a = (
|
|
904
904
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
@@ -916,12 +916,12 @@ function _t(e) {
|
|
|
916
916
|
function ue(e, a, t) {
|
|
917
917
|
var n;
|
|
918
918
|
a === void 0 && (a = []), t === void 0 && (t = !0);
|
|
919
|
-
const
|
|
920
|
-
if (
|
|
921
|
-
const
|
|
922
|
-
return a.concat(o, o.visualViewport || [], xe(
|
|
919
|
+
const r = _t(e), i = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = F(r);
|
|
920
|
+
if (i) {
|
|
921
|
+
const s = Ve(o);
|
|
922
|
+
return a.concat(o, o.visualViewport || [], xe(r) ? r : [], s && t ? ue(s) : []);
|
|
923
923
|
}
|
|
924
|
-
return a.concat(
|
|
924
|
+
return a.concat(r, ue(r, [], t));
|
|
925
925
|
}
|
|
926
926
|
function Ve(e) {
|
|
927
927
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
@@ -929,73 +929,73 @@ function Ve(e) {
|
|
|
929
929
|
function wt(e) {
|
|
930
930
|
const a = H(e);
|
|
931
931
|
let t = parseFloat(a.width) || 0, n = parseFloat(a.height) || 0;
|
|
932
|
-
const
|
|
933
|
-
return
|
|
932
|
+
const r = K(e), i = r ? e.offsetWidth : t, o = r ? e.offsetHeight : n, s = Ie(t) !== i || Ie(n) !== o;
|
|
933
|
+
return s && (t = i, n = o), {
|
|
934
934
|
width: t,
|
|
935
935
|
height: n,
|
|
936
|
-
$:
|
|
936
|
+
$: s
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
939
|
function Qe(e) {
|
|
940
940
|
return B(e) ? e : e.contextElement;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function se(e) {
|
|
943
943
|
const a = Qe(e);
|
|
944
944
|
if (!K(a))
|
|
945
945
|
return W(1);
|
|
946
946
|
const t = a.getBoundingClientRect(), {
|
|
947
947
|
width: n,
|
|
948
|
-
height:
|
|
949
|
-
$:
|
|
948
|
+
height: r,
|
|
949
|
+
$: i
|
|
950
950
|
} = wt(a);
|
|
951
|
-
let o = (
|
|
952
|
-
return (!o || !Number.isFinite(o)) && (o = 1), (!
|
|
951
|
+
let o = (i ? Ie(t.width) : t.width) / n, s = (i ? Ie(t.height) : t.height) / r;
|
|
952
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
953
953
|
x: o,
|
|
954
|
-
y:
|
|
954
|
+
y: s
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
|
-
const
|
|
957
|
+
const Oa = /* @__PURE__ */ W(0);
|
|
958
958
|
function xt(e) {
|
|
959
|
-
const a =
|
|
960
|
-
return !Je() || !a.visualViewport ?
|
|
959
|
+
const a = F(e);
|
|
960
|
+
return !Je() || !a.visualViewport ? Oa : {
|
|
961
961
|
x: a.visualViewport.offsetLeft,
|
|
962
962
|
y: a.visualViewport.offsetTop
|
|
963
963
|
};
|
|
964
964
|
}
|
|
965
965
|
function Ya(e, a, t) {
|
|
966
|
-
return a === void 0 && (a = !1), !t || a && t !==
|
|
966
|
+
return a === void 0 && (a = !1), !t || a && t !== F(e) ? !1 : a;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function re(e, a, t, n) {
|
|
969
969
|
a === void 0 && (a = !1), t === void 0 && (t = !1);
|
|
970
|
-
const
|
|
970
|
+
const r = e.getBoundingClientRect(), i = Qe(e);
|
|
971
971
|
let o = W(1);
|
|
972
|
-
a && (n ? B(n) && (o =
|
|
973
|
-
const
|
|
974
|
-
let d = (
|
|
975
|
-
if (
|
|
976
|
-
const u =
|
|
972
|
+
a && (n ? B(n) && (o = se(n)) : o = se(e));
|
|
973
|
+
const s = Ya(i, t, n) ? xt(i) : W(0);
|
|
974
|
+
let d = (r.left + s.x) / o.x, l = (r.top + s.y) / o.y, c = r.width / o.x, p = r.height / o.y;
|
|
975
|
+
if (i) {
|
|
976
|
+
const u = F(i), g = n && B(n) ? F(n) : n;
|
|
977
977
|
let m = u, f = Ve(m);
|
|
978
|
-
for (; f && n &&
|
|
979
|
-
const
|
|
980
|
-
d *=
|
|
978
|
+
for (; f && n && g !== m; ) {
|
|
979
|
+
const y = se(f), h = f.getBoundingClientRect(), M = H(f), C = h.left + (f.clientLeft + parseFloat(M.paddingLeft)) * y.x, E = h.top + (f.clientTop + parseFloat(M.paddingTop)) * y.y;
|
|
980
|
+
d *= y.x, l *= y.y, c *= y.x, p *= y.y, d += C, l += E, m = F(f), f = Ve(m);
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
983
|
return Re({
|
|
984
984
|
width: c,
|
|
985
|
-
height:
|
|
985
|
+
height: p,
|
|
986
986
|
x: d,
|
|
987
987
|
y: l
|
|
988
988
|
});
|
|
989
989
|
}
|
|
990
|
-
function
|
|
991
|
-
const t =
|
|
992
|
-
return a ? a.left + t :
|
|
990
|
+
function Fe(e, a) {
|
|
991
|
+
const t = ze(e).scrollLeft;
|
|
992
|
+
return a ? a.left + t : re(G(e)).left + t;
|
|
993
993
|
}
|
|
994
994
|
function Mt(e, a) {
|
|
995
|
-
const t = e.getBoundingClientRect(), n = t.left + a.scrollLeft -
|
|
995
|
+
const t = e.getBoundingClientRect(), n = t.left + a.scrollLeft - Fe(e, t), r = t.top + a.scrollTop;
|
|
996
996
|
return {
|
|
997
997
|
x: n,
|
|
998
|
-
y:
|
|
998
|
+
y: r
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
1001
|
function Ba(e) {
|
|
@@ -1003,21 +1003,21 @@ function Ba(e) {
|
|
|
1003
1003
|
elements: a,
|
|
1004
1004
|
rect: t,
|
|
1005
1005
|
offsetParent: n,
|
|
1006
|
-
strategy:
|
|
1006
|
+
strategy: r
|
|
1007
1007
|
} = e;
|
|
1008
|
-
const
|
|
1009
|
-
if (n === o ||
|
|
1008
|
+
const i = r === "fixed", o = G(n), s = a ? Ne(a.floating) : !1;
|
|
1009
|
+
if (n === o || s && i)
|
|
1010
1010
|
return t;
|
|
1011
1011
|
let d = {
|
|
1012
1012
|
scrollLeft: 0,
|
|
1013
1013
|
scrollTop: 0
|
|
1014
1014
|
}, l = W(1);
|
|
1015
|
-
const c = W(0),
|
|
1016
|
-
if ((
|
|
1017
|
-
const
|
|
1018
|
-
l =
|
|
1015
|
+
const c = W(0), p = K(n);
|
|
1016
|
+
if ((p || !p && !i) && ((ge(n) !== "body" || xe(o)) && (d = ze(n)), K(n))) {
|
|
1017
|
+
const g = re(n);
|
|
1018
|
+
l = se(n), c.x = g.x + n.clientLeft, c.y = g.y + n.clientTop;
|
|
1019
1019
|
}
|
|
1020
|
-
const u = o && !
|
|
1020
|
+
const u = o && !p && !i ? Mt(o, d) : W(0);
|
|
1021
1021
|
return {
|
|
1022
1022
|
width: t.width * l.x,
|
|
1023
1023
|
height: t.height * l.y,
|
|
@@ -1029,43 +1029,43 @@ function Ha(e) {
|
|
|
1029
1029
|
return Array.from(e.getClientRects());
|
|
1030
1030
|
}
|
|
1031
1031
|
function Va(e) {
|
|
1032
|
-
const a = G(e), t =
|
|
1033
|
-
let o = -t.scrollLeft +
|
|
1034
|
-
const
|
|
1035
|
-
return H(n).direction === "rtl" && (o += te(a.clientWidth, n.clientWidth) -
|
|
1036
|
-
width:
|
|
1037
|
-
height:
|
|
1032
|
+
const a = G(e), t = ze(e), n = e.ownerDocument.body, r = te(a.scrollWidth, a.clientWidth, n.scrollWidth, n.clientWidth), i = te(a.scrollHeight, a.clientHeight, n.scrollHeight, n.clientHeight);
|
|
1033
|
+
let o = -t.scrollLeft + Fe(e);
|
|
1034
|
+
const s = -t.scrollTop;
|
|
1035
|
+
return H(n).direction === "rtl" && (o += te(a.clientWidth, n.clientWidth) - r), {
|
|
1036
|
+
width: r,
|
|
1037
|
+
height: i,
|
|
1038
1038
|
x: o,
|
|
1039
|
-
y:
|
|
1039
|
+
y: s
|
|
1040
1040
|
};
|
|
1041
1041
|
}
|
|
1042
|
-
const
|
|
1042
|
+
const st = 25;
|
|
1043
1043
|
function qa(e, a) {
|
|
1044
|
-
const t =
|
|
1045
|
-
let
|
|
1046
|
-
if (
|
|
1047
|
-
|
|
1044
|
+
const t = F(e), n = G(e), r = t.visualViewport;
|
|
1045
|
+
let i = n.clientWidth, o = n.clientHeight, s = 0, d = 0;
|
|
1046
|
+
if (r) {
|
|
1047
|
+
i = r.width, o = r.height;
|
|
1048
1048
|
const c = Je();
|
|
1049
|
-
(!c || c && a === "fixed") && (
|
|
1049
|
+
(!c || c && a === "fixed") && (s = r.offsetLeft, d = r.offsetTop);
|
|
1050
1050
|
}
|
|
1051
|
-
const l =
|
|
1051
|
+
const l = Fe(n);
|
|
1052
1052
|
if (l <= 0) {
|
|
1053
|
-
const c = n.ownerDocument,
|
|
1054
|
-
m <=
|
|
1055
|
-
} else l <=
|
|
1053
|
+
const c = n.ownerDocument, p = c.body, u = getComputedStyle(p), g = c.compatMode === "CSS1Compat" && parseFloat(u.marginLeft) + parseFloat(u.marginRight) || 0, m = Math.abs(n.clientWidth - p.clientWidth - g);
|
|
1054
|
+
m <= st && (i -= m);
|
|
1055
|
+
} else l <= st && (i += l);
|
|
1056
1056
|
return {
|
|
1057
|
-
width:
|
|
1057
|
+
width: i,
|
|
1058
1058
|
height: o,
|
|
1059
|
-
x:
|
|
1059
|
+
x: s,
|
|
1060
1060
|
y: d
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
const Ua = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1064
1064
|
function ja(e, a) {
|
|
1065
|
-
const t =
|
|
1065
|
+
const t = re(e, !0, a === "fixed"), n = t.top + e.clientTop, r = t.left + e.clientLeft, i = K(e) ? se(e) : W(1), o = e.clientWidth * i.x, s = e.clientHeight * i.y, d = r * i.x, l = n * i.y;
|
|
1066
1066
|
return {
|
|
1067
1067
|
width: o,
|
|
1068
|
-
height:
|
|
1068
|
+
height: s,
|
|
1069
1069
|
x: d,
|
|
1070
1070
|
y: l
|
|
1071
1071
|
};
|
|
@@ -1079,10 +1079,10 @@ function dt(e, a, t) {
|
|
|
1079
1079
|
else if (B(a))
|
|
1080
1080
|
n = ja(a, t);
|
|
1081
1081
|
else {
|
|
1082
|
-
const
|
|
1082
|
+
const r = xt(e);
|
|
1083
1083
|
n = {
|
|
1084
|
-
x: a.x -
|
|
1085
|
-
y: a.y -
|
|
1084
|
+
x: a.x - r.x,
|
|
1085
|
+
y: a.y - r.y,
|
|
1086
1086
|
width: a.width,
|
|
1087
1087
|
height: a.height
|
|
1088
1088
|
};
|
|
@@ -1097,12 +1097,12 @@ function Wa(e, a) {
|
|
|
1097
1097
|
const t = a.get(e);
|
|
1098
1098
|
if (t)
|
|
1099
1099
|
return t;
|
|
1100
|
-
let n = ue(e, [], !1).filter((
|
|
1101
|
-
const
|
|
1102
|
-
let o =
|
|
1100
|
+
let n = ue(e, [], !1).filter((s) => B(s) && ge(s) !== "body"), r = null;
|
|
1101
|
+
const i = H(e).position === "fixed";
|
|
1102
|
+
let o = i ? J(e) : e;
|
|
1103
1103
|
for (; B(o) && !ce(o); ) {
|
|
1104
|
-
const
|
|
1105
|
-
!d &&
|
|
1104
|
+
const s = H(o), d = Xe(o);
|
|
1105
|
+
!d && s.position === "fixed" && (r = null), (i ? !d && !r : !d && s.position === "static" && !!r && Ua.has(r.position) || xe(o) && !d && St(e, o)) ? n = n.filter((c) => c !== o) : r = s, o = J(o);
|
|
1106
1106
|
}
|
|
1107
1107
|
return a.set(e, n), n;
|
|
1108
1108
|
}
|
|
@@ -1111,12 +1111,12 @@ function Ka(e) {
|
|
|
1111
1111
|
element: a,
|
|
1112
1112
|
boundary: t,
|
|
1113
1113
|
rootBoundary: n,
|
|
1114
|
-
strategy:
|
|
1114
|
+
strategy: r
|
|
1115
1115
|
} = e;
|
|
1116
|
-
const o = [...t === "clippingAncestors" ? Ne(a) ? [] : Wa(a, this._c) : [].concat(t), n],
|
|
1117
|
-
const
|
|
1118
|
-
return l.top = te(
|
|
1119
|
-
}, dt(a,
|
|
1116
|
+
const o = [...t === "clippingAncestors" ? Ne(a) ? [] : Wa(a, this._c) : [].concat(t), n], s = o[0], d = o.reduce((l, c) => {
|
|
1117
|
+
const p = dt(a, c, r);
|
|
1118
|
+
return l.top = te(p.top, l.top), l.right = le(p.right, l.right), l.bottom = le(p.bottom, l.bottom), l.left = te(p.left, l.left), l;
|
|
1119
|
+
}, dt(a, s, r));
|
|
1120
1120
|
return {
|
|
1121
1121
|
width: d.right - d.left,
|
|
1122
1122
|
height: d.bottom - d.top,
|
|
@@ -1135,24 +1135,24 @@ function Ga(e) {
|
|
|
1135
1135
|
};
|
|
1136
1136
|
}
|
|
1137
1137
|
function Xa(e, a, t) {
|
|
1138
|
-
const n = K(a),
|
|
1139
|
-
let
|
|
1138
|
+
const n = K(a), r = G(a), i = t === "fixed", o = re(e, !0, i, a);
|
|
1139
|
+
let s = {
|
|
1140
1140
|
scrollLeft: 0,
|
|
1141
1141
|
scrollTop: 0
|
|
1142
1142
|
};
|
|
1143
1143
|
const d = W(0);
|
|
1144
1144
|
function l() {
|
|
1145
|
-
d.x =
|
|
1146
|
-
}
|
|
1147
|
-
if (n || !n && !
|
|
1148
|
-
if ((
|
|
1149
|
-
const
|
|
1150
|
-
d.x =
|
|
1151
|
-
} else
|
|
1152
|
-
|
|
1153
|
-
const c =
|
|
1145
|
+
d.x = Fe(r);
|
|
1146
|
+
}
|
|
1147
|
+
if (n || !n && !i)
|
|
1148
|
+
if ((ge(a) !== "body" || xe(r)) && (s = ze(a)), n) {
|
|
1149
|
+
const g = re(a, !0, i, a);
|
|
1150
|
+
d.x = g.x + a.clientLeft, d.y = g.y + a.clientTop;
|
|
1151
|
+
} else r && l();
|
|
1152
|
+
i && !n && r && l();
|
|
1153
|
+
const c = r && !n && !i ? Mt(r, s) : W(0), p = o.left + s.scrollLeft - d.x - c.x, u = o.top + s.scrollTop - d.y - c.y;
|
|
1154
1154
|
return {
|
|
1155
|
-
x:
|
|
1155
|
+
x: p,
|
|
1156
1156
|
y: u,
|
|
1157
1157
|
width: o.width,
|
|
1158
1158
|
height: o.height
|
|
@@ -1170,22 +1170,22 @@ function lt(e, a) {
|
|
|
1170
1170
|
return G(e) === t && (t = t.ownerDocument.body), t;
|
|
1171
1171
|
}
|
|
1172
1172
|
function Ct(e, a) {
|
|
1173
|
-
const t =
|
|
1173
|
+
const t = F(e);
|
|
1174
1174
|
if (Ne(e))
|
|
1175
1175
|
return t;
|
|
1176
1176
|
if (!K(e)) {
|
|
1177
|
-
let
|
|
1178
|
-
for (;
|
|
1179
|
-
if (B(
|
|
1180
|
-
return
|
|
1181
|
-
|
|
1177
|
+
let r = J(e);
|
|
1178
|
+
for (; r && !ce(r); ) {
|
|
1179
|
+
if (B(r) && !Ye(r))
|
|
1180
|
+
return r;
|
|
1181
|
+
r = J(r);
|
|
1182
1182
|
}
|
|
1183
1183
|
return t;
|
|
1184
1184
|
}
|
|
1185
1185
|
let n = lt(e, a);
|
|
1186
1186
|
for (; n && Ta(n) && Ye(n); )
|
|
1187
1187
|
n = lt(n, a);
|
|
1188
|
-
return n && ce(n) && Ye(n) && !Xe(n) ? t : n ||
|
|
1188
|
+
return n && ce(n) && Ye(n) && !Xe(n) ? t : n || za(e) || t;
|
|
1189
1189
|
}
|
|
1190
1190
|
const Ja = async function(e) {
|
|
1191
1191
|
const a = this.getOffsetParent || Ct, t = this.getDimensions, n = await t(e.floating);
|
|
@@ -1210,7 +1210,7 @@ const It = {
|
|
|
1210
1210
|
getElementRects: Ja,
|
|
1211
1211
|
getClientRects: Ha,
|
|
1212
1212
|
getDimensions: Ga,
|
|
1213
|
-
getScale:
|
|
1213
|
+
getScale: se,
|
|
1214
1214
|
isElement: B,
|
|
1215
1215
|
isRTL: Qa
|
|
1216
1216
|
};
|
|
@@ -1219,23 +1219,23 @@ function Et(e, a) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
function Za(e, a) {
|
|
1221
1221
|
let t = null, n;
|
|
1222
|
-
const
|
|
1223
|
-
function
|
|
1224
|
-
var
|
|
1225
|
-
clearTimeout(n), (
|
|
1222
|
+
const r = G(e);
|
|
1223
|
+
function i() {
|
|
1224
|
+
var s;
|
|
1225
|
+
clearTimeout(n), (s = t) == null || s.disconnect(), t = null;
|
|
1226
1226
|
}
|
|
1227
|
-
function o(
|
|
1228
|
-
|
|
1227
|
+
function o(s, d) {
|
|
1228
|
+
s === void 0 && (s = !1), d === void 0 && (d = 1), i();
|
|
1229
1229
|
const l = e.getBoundingClientRect(), {
|
|
1230
1230
|
left: c,
|
|
1231
|
-
top:
|
|
1231
|
+
top: p,
|
|
1232
1232
|
width: u,
|
|
1233
|
-
height:
|
|
1233
|
+
height: g
|
|
1234
1234
|
} = l;
|
|
1235
|
-
if (
|
|
1235
|
+
if (s || a(), !u || !g)
|
|
1236
1236
|
return;
|
|
1237
|
-
const m = Me(
|
|
1238
|
-
rootMargin: -m + "px " + -f + "px " + -
|
|
1237
|
+
const m = Me(p), f = Me(r.clientWidth - (c + u)), y = Me(r.clientHeight - (p + g)), h = Me(c), C = {
|
|
1238
|
+
rootMargin: -m + "px " + -f + "px " + -y + "px " + -h + "px",
|
|
1239
1239
|
threshold: te(0, le(1, d)) || 1
|
|
1240
1240
|
};
|
|
1241
1241
|
let E = !0;
|
|
@@ -1254,62 +1254,62 @@ function Za(e, a) {
|
|
|
1254
1254
|
t = new IntersectionObserver(_, {
|
|
1255
1255
|
...C,
|
|
1256
1256
|
// Handle <iframe>s
|
|
1257
|
-
root:
|
|
1257
|
+
root: r.ownerDocument
|
|
1258
1258
|
});
|
|
1259
1259
|
} catch {
|
|
1260
1260
|
t = new IntersectionObserver(_, C);
|
|
1261
1261
|
}
|
|
1262
1262
|
t.observe(e);
|
|
1263
1263
|
}
|
|
1264
|
-
return o(!0),
|
|
1264
|
+
return o(!0), i;
|
|
1265
1265
|
}
|
|
1266
1266
|
function Rt(e, a, t, n) {
|
|
1267
1267
|
n === void 0 && (n = {});
|
|
1268
1268
|
const {
|
|
1269
|
-
ancestorScroll:
|
|
1270
|
-
ancestorResize:
|
|
1269
|
+
ancestorScroll: r = !0,
|
|
1270
|
+
ancestorResize: i = !0,
|
|
1271
1271
|
elementResize: o = typeof ResizeObserver == "function",
|
|
1272
|
-
layoutShift:
|
|
1272
|
+
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1273
1273
|
animationFrame: d = !1
|
|
1274
|
-
} = n, l = Qe(e), c =
|
|
1275
|
-
c.forEach((
|
|
1276
|
-
|
|
1274
|
+
} = n, l = Qe(e), c = r || i ? [...l ? ue(l) : [], ...ue(a)] : [];
|
|
1275
|
+
c.forEach((h) => {
|
|
1276
|
+
r && h.addEventListener("scroll", t, {
|
|
1277
1277
|
passive: !0
|
|
1278
|
-
}),
|
|
1278
|
+
}), i && h.addEventListener("resize", t);
|
|
1279
1279
|
});
|
|
1280
|
-
const
|
|
1281
|
-
let u = -1,
|
|
1282
|
-
o && (
|
|
1283
|
-
let [M] =
|
|
1284
|
-
M && M.target === l &&
|
|
1280
|
+
const p = l && s ? Za(l, t) : null;
|
|
1281
|
+
let u = -1, g = null;
|
|
1282
|
+
o && (g = new ResizeObserver((h) => {
|
|
1283
|
+
let [M] = h;
|
|
1284
|
+
M && M.target === l && g && (g.unobserve(a), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
1285
1285
|
var C;
|
|
1286
|
-
(C =
|
|
1286
|
+
(C = g) == null || C.observe(a);
|
|
1287
1287
|
})), t();
|
|
1288
|
-
}), l && !d &&
|
|
1289
|
-
let m, f = d ?
|
|
1290
|
-
d &&
|
|
1291
|
-
function
|
|
1292
|
-
const
|
|
1293
|
-
f && !Et(f,
|
|
1288
|
+
}), l && !d && g.observe(l), g.observe(a));
|
|
1289
|
+
let m, f = d ? re(e) : null;
|
|
1290
|
+
d && y();
|
|
1291
|
+
function y() {
|
|
1292
|
+
const h = re(e);
|
|
1293
|
+
f && !Et(f, h) && t(), f = h, m = requestAnimationFrame(y);
|
|
1294
1294
|
}
|
|
1295
1295
|
return t(), () => {
|
|
1296
|
-
var
|
|
1296
|
+
var h;
|
|
1297
1297
|
c.forEach((M) => {
|
|
1298
|
-
|
|
1299
|
-
}),
|
|
1298
|
+
r && M.removeEventListener("scroll", t), i && M.removeEventListener("resize", t);
|
|
1299
|
+
}), p == null || p(), (h = g) == null || h.disconnect(), g = null, d && cancelAnimationFrame(m);
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
1302
|
const Ae = Ea, Le = Ra, Ze = Sa, At = Ma, et = (e, a, t) => {
|
|
1303
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1303
|
+
const n = /* @__PURE__ */ new Map(), r = {
|
|
1304
1304
|
platform: It,
|
|
1305
1305
|
...t
|
|
1306
|
-
},
|
|
1307
|
-
...
|
|
1306
|
+
}, i = {
|
|
1307
|
+
...r.platform,
|
|
1308
1308
|
_c: n
|
|
1309
1309
|
};
|
|
1310
1310
|
return xa(e, a, {
|
|
1311
|
-
...
|
|
1312
|
-
platform:
|
|
1311
|
+
...r,
|
|
1312
|
+
platform: i
|
|
1313
1313
|
});
|
|
1314
1314
|
}, en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1315
1315
|
__proto__: null,
|
|
@@ -1324,18 +1324,18 @@ const Ae = Ea, Le = Ra, Ze = Sa, At = Ma, et = (e, a, t) => {
|
|
|
1324
1324
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1325
1325
|
let Se = null;
|
|
1326
1326
|
function Lt(e) {
|
|
1327
|
-
e.options.positioningMode !== "inline" && (
|
|
1327
|
+
e.options.positioningMode !== "inline" && (O.debug("show() - adding visible class"), e.requiresApplyButton() && e.input && (e.originalInputValue = e.input.value, O.debug("show() - stored original input value:", e.originalInputValue)), e.isFirstRender && (e.renderCalendar(), e.isFirstRender = !1, kt(e)), e.calendar.classList.add("drp-date-picker--visible"), e.isCalendarActive = !0, O.debug("show() - calendar classes:", e.calendar.className), qe(e), Se = Rt(e.input, e.calendar, () => {
|
|
1328
1328
|
qe(e);
|
|
1329
1329
|
}), e.clickOutsideHandler && setTimeout(() => {
|
|
1330
1330
|
document.addEventListener("click", e.clickOutsideHandler);
|
|
1331
1331
|
}, 0), setTimeout(() => {
|
|
1332
1332
|
const a = window.getComputedStyle(e.calendar);
|
|
1333
|
-
|
|
1333
|
+
O.debug("show() - computed styles - display:", a.display, "position:", a.position, "left:", a.left, "top:", a.top, "z-index:", a.zIndex);
|
|
1334
1334
|
}, 100));
|
|
1335
1335
|
}
|
|
1336
1336
|
function Tt(e) {
|
|
1337
1337
|
if (e.options.positioningMode !== "inline" && e.calendar.classList.contains("drp-date-picker--visible")) {
|
|
1338
|
-
Se && (Se(), Se = null), e.clickOutsideHandler && document.removeEventListener("click", e.clickOutsideHandler), e.calendar.classList.remove("drp-date-picker--visible"), e.isCalendarActive = !1, e.requiresApplyButton() && e.pendingSelection && e.input && (
|
|
1338
|
+
Se && (Se(), Se = null), e.clickOutsideHandler && document.removeEventListener("click", e.clickOutsideHandler), e.calendar.classList.remove("drp-date-picker--visible"), e.isCalendarActive = !1, e.requiresApplyButton() && e.pendingSelection && e.input && (O.debug("hide() - restoring original input value:", e.originalInputValue), e.originalInputValue !== null && (e.input.value = e.originalInputValue), e.options.selectionMode === "range" ? (e.selectedStartDate = e.committedStartDate, e.selectedEndDate = e.committedEndDate) : e.options.selectionMode === "single" && (e.selectedDate = e.committedDate), O.debug("hide() - reverted selection state")), e.pendingSelection = null;
|
|
1339
1339
|
for (let a = 0; a < e.showingRollingSelector.length; a++)
|
|
1340
1340
|
e.showingRollingSelector[a] = !1;
|
|
1341
1341
|
e.isFirstRender || e.renderCalendar(), e.lockedPlacement = void 0;
|
|
@@ -1345,18 +1345,18 @@ function tn(e) {
|
|
|
1345
1345
|
e.calendar.classList.contains("drp-date-picker--visible") ? Tt(e) : Lt(e);
|
|
1346
1346
|
}
|
|
1347
1347
|
async function qe(e) {
|
|
1348
|
-
if (
|
|
1348
|
+
if (O.debug("position() - locked placement:", e.lockedPlacement), !e.input)
|
|
1349
1349
|
return;
|
|
1350
1350
|
const a = e.lockedPlacement ? [Ae(8), Le({ padding: 8 })] : [Ae(8), Ze(), Le({ padding: 8 })], t = await et(e.input, e.calendar, {
|
|
1351
1351
|
placement: e.lockedPlacement || e.options.calendarPlacement,
|
|
1352
1352
|
middleware: a
|
|
1353
1353
|
});
|
|
1354
|
-
|
|
1354
|
+
O.debug("position() - FloatingUI computed - x:", t.x, "y:", t.y, "placement:", t.placement), e.lockedPlacement || (e.lockedPlacement = t.placement, O.debug("position() - locked placement to:", e.lockedPlacement)), e.calendar.style.left = `${t.x}px`, e.calendar.style.top = `${t.y}px`, O.debug("position() - applied styles to calendar");
|
|
1355
1355
|
}
|
|
1356
1356
|
async function an(e, a, t) {
|
|
1357
1357
|
if (!e.tooltip || !e.tooltipArrow) return;
|
|
1358
1358
|
e.currentTooltipTarget = a, e.tooltip.innerHTML = t, e.tooltip.appendChild(e.tooltipArrow), e.tooltip.classList.add("drp-date-picker__tooltip--visible");
|
|
1359
|
-
const { x: n, y:
|
|
1359
|
+
const { x: n, y: r, placement: i, middlewareData: o } = await et(a, e.tooltip, {
|
|
1360
1360
|
placement: "top",
|
|
1361
1361
|
middleware: [
|
|
1362
1362
|
Ae(6),
|
|
@@ -1367,16 +1367,16 @@ async function an(e, a, t) {
|
|
|
1367
1367
|
});
|
|
1368
1368
|
if (Object.assign(e.tooltip.style, {
|
|
1369
1369
|
left: `${n}px`,
|
|
1370
|
-
top: `${
|
|
1370
|
+
top: `${r}px`
|
|
1371
1371
|
}), o.arrow) {
|
|
1372
|
-
const { x:
|
|
1372
|
+
const { x: s, y: d } = o.arrow, l = {
|
|
1373
1373
|
top: "bottom",
|
|
1374
1374
|
right: "left",
|
|
1375
1375
|
bottom: "top",
|
|
1376
1376
|
left: "right"
|
|
1377
|
-
}[
|
|
1377
|
+
}[i.split("-")[0]];
|
|
1378
1378
|
Object.assign(e.tooltipArrow.style, {
|
|
1379
|
-
left:
|
|
1379
|
+
left: s != null ? `${s}px` : "",
|
|
1380
1380
|
top: d != null ? `${d}px` : "",
|
|
1381
1381
|
right: "",
|
|
1382
1382
|
bottom: "",
|
|
@@ -1399,8 +1399,8 @@ function ae(e) {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
function j(e, a, t) {
|
|
1401
1401
|
for (let n = 1; n <= 31; n++) {
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1402
|
+
const r = new Date(a, t, n);
|
|
1403
|
+
if (r.getMonth() === t && !e.isDateDisabledInternal(r))
|
|
1404
1404
|
return !0;
|
|
1405
1405
|
}
|
|
1406
1406
|
return !1;
|
|
@@ -1414,20 +1414,20 @@ async function kt(e) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
try {
|
|
1416
1416
|
if (e.isMonthChanging = !0, e.options.unifiedNavigation) {
|
|
1417
|
-
const n = e.options.unifiedNavigationAnchorIndex ?? 0,
|
|
1418
|
-
let
|
|
1417
|
+
const n = e.options.unifiedNavigationAnchorIndex ?? 0, r = e.monthDates[n], i = r.getFullYear(), o = r.getMonth();
|
|
1418
|
+
let s = 1 / 0, d = 1 / 0, l = -1 / 0, c = -1 / 0;
|
|
1419
1419
|
for (let A = 0; A < e.monthDates.length; A++) {
|
|
1420
1420
|
const D = e.monthDates[A], x = D.getFullYear(), S = D.getMonth();
|
|
1421
|
-
(x <
|
|
1421
|
+
(x < s || x === s && S < d) && (s = x, d = S), (x > l || x === l && S > c) && (l = x, c = S);
|
|
1422
1422
|
}
|
|
1423
|
-
const
|
|
1424
|
-
year:
|
|
1423
|
+
const g = (new Date(s, d, 1).getDay() - e.weekStartDay + 7) % 7, m = new Date(s, d, 1 - g), f = new Date(l, c + 1, 0).getDate(), h = new Date(l, c, f).getDay(), M = (e.weekStartDay + 6 - h) % 7, C = new Date(l, c, f + M), E = {
|
|
1424
|
+
year: i,
|
|
1425
1425
|
month: o,
|
|
1426
1426
|
monthIndex: n,
|
|
1427
1427
|
firstVisibleDate: m,
|
|
1428
1428
|
lastVisibleDate: C
|
|
1429
1429
|
};
|
|
1430
|
-
w.debug(`handleInitialMonthLoad() [UNIFIED] - calling callback for ${
|
|
1430
|
+
w.debug(`handleInitialMonthLoad() [UNIFIED] - calling callback for ${i}-${o + 1}, range: ${m.toISOString().split("T")[0]} to ${C.toISOString().split("T")[0]}`);
|
|
1431
1431
|
const _ = e.options.beforeMonthChangedCallback(E), v = _ instanceof Promise;
|
|
1432
1432
|
v && Te(e);
|
|
1433
1433
|
const I = await Promise.resolve(_);
|
|
@@ -1435,26 +1435,26 @@ async function kt(e) {
|
|
|
1435
1435
|
} else {
|
|
1436
1436
|
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] - calling callback for ${e.monthDates.length} months`);
|
|
1437
1437
|
const n = /* @__PURE__ */ new Map();
|
|
1438
|
-
let
|
|
1439
|
-
for (let
|
|
1440
|
-
const o = e.monthDates[
|
|
1441
|
-
|
|
1438
|
+
let r = !1;
|
|
1439
|
+
for (let i = 0; i < e.monthDates.length; i++) {
|
|
1440
|
+
const o = e.monthDates[i], s = o.getFullYear(), d = o.getMonth(), p = (new Date(s, d, 1).getDay() - e.weekStartDay + 7) % 7, u = new Date(s, d, 1 - p), g = new Date(u);
|
|
1441
|
+
g.setDate(u.getDate() + 41);
|
|
1442
1442
|
const m = {
|
|
1443
|
-
year:
|
|
1443
|
+
year: s,
|
|
1444
1444
|
month: d,
|
|
1445
|
-
monthIndex:
|
|
1445
|
+
monthIndex: i,
|
|
1446
1446
|
firstVisibleDate: u,
|
|
1447
|
-
lastVisibleDate:
|
|
1447
|
+
lastVisibleDate: g
|
|
1448
1448
|
};
|
|
1449
|
-
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${
|
|
1449
|
+
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${i} - calling callback for ${s}-${d + 1}, range: ${u.toISOString().split("T")[0]} to ${g.toISOString().split("T")[0]}`);
|
|
1450
1450
|
const f = e.options.beforeMonthChangedCallback(m);
|
|
1451
|
-
f instanceof Promise && !
|
|
1452
|
-
const
|
|
1453
|
-
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${
|
|
1451
|
+
f instanceof Promise && !r && (r = !0, Te(e));
|
|
1452
|
+
const h = await Promise.resolve(f);
|
|
1453
|
+
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${i} - callback completed, metadata items: ${((t = h.metadata) == null ? void 0 : t.size) || 0}`), h.metadata && h.metadata.forEach((M, C) => {
|
|
1454
1454
|
n.set(C, M);
|
|
1455
1455
|
});
|
|
1456
1456
|
}
|
|
1457
|
-
|
|
1457
|
+
r && ae(e), n.size > 0 && (e.bulkMetadataCache = n, w.debug(`handleInitialMonthLoad() [NON-UNIFIED] - combined metadata cache updated with ${n.size} entries`), e.renderCalendar());
|
|
1458
1458
|
}
|
|
1459
1459
|
} catch (n) {
|
|
1460
1460
|
ae(e), w.debug("handleInitialMonthLoad() - error in callback:", n), console.error("[DateRangePicker] Error in beforeMonthChangedCallback (initial load):", n);
|
|
@@ -1464,49 +1464,49 @@ async function kt(e) {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
1466
1466
|
async function Z(e, a, t, n) {
|
|
1467
|
-
var
|
|
1467
|
+
var r;
|
|
1468
1468
|
if (!e.options.beforeMonthChangedCallback)
|
|
1469
1469
|
return !0;
|
|
1470
1470
|
if (e.isMonthChanging)
|
|
1471
1471
|
return w.debug("handleBeforeMonthChange() - already changing month, ignoring"), !1;
|
|
1472
1472
|
try {
|
|
1473
1473
|
e.isMonthChanging = !0;
|
|
1474
|
-
let
|
|
1474
|
+
let i, o;
|
|
1475
1475
|
if (e.options.unifiedNavigation) {
|
|
1476
|
-
let
|
|
1476
|
+
let p = 1 / 0, u = 1 / 0, g = -1 / 0, m = -1 / 0;
|
|
1477
1477
|
for (let v = 0; v < e.monthDates.length; v++) {
|
|
1478
1478
|
const I = e.monthDates[v], A = I.getFullYear(), D = I.getMonth();
|
|
1479
|
-
(A <
|
|
1479
|
+
(A < p || A === p && D < u) && (p = A, u = D), (A > g || A === g && D > m) && (g = A, m = D);
|
|
1480
1480
|
}
|
|
1481
|
-
const
|
|
1482
|
-
|
|
1483
|
-
const M = new Date(
|
|
1484
|
-
o = new Date(
|
|
1481
|
+
const h = (new Date(p, u, 1).getDay() - e.weekStartDay + 7) % 7;
|
|
1482
|
+
i = new Date(p, u, 1 - h);
|
|
1483
|
+
const M = new Date(g, m + 1, 0).getDate(), E = new Date(g, m, M).getDay(), _ = (e.weekStartDay + 6 - E) % 7;
|
|
1484
|
+
o = new Date(g, m, M + _);
|
|
1485
1485
|
} else {
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1486
|
+
const g = (new Date(a, t, 1).getDay() - e.weekStartDay + 7) % 7;
|
|
1487
|
+
i = new Date(a, t, 1 - g), o = new Date(i), o.setDate(i.getDate() + 41);
|
|
1488
1488
|
}
|
|
1489
|
-
const
|
|
1489
|
+
const s = {
|
|
1490
1490
|
year: a,
|
|
1491
1491
|
month: t,
|
|
1492
1492
|
monthIndex: n,
|
|
1493
|
-
firstVisibleDate:
|
|
1493
|
+
firstVisibleDate: i,
|
|
1494
1494
|
lastVisibleDate: o
|
|
1495
1495
|
};
|
|
1496
|
-
w.debug(`handleBeforeMonthChange() - calling callback for ${a}-${t + 1}, range: ${
|
|
1497
|
-
const d = e.options.beforeMonthChangedCallback(
|
|
1496
|
+
w.debug(`handleBeforeMonthChange() - calling callback for ${a}-${t + 1}, range: ${i.toISOString().split("T")[0]} to ${o.toISOString().split("T")[0]}`);
|
|
1497
|
+
const d = e.options.beforeMonthChangedCallback(s), l = d instanceof Promise;
|
|
1498
1498
|
l && Te(e);
|
|
1499
1499
|
const c = await Promise.resolve(d);
|
|
1500
|
-
return l && ae(e), c.action === "block" ? (w.debug(`handleBeforeMonthChange() - navigation blocked: ${c.message || "no reason provided"}`), c.message && console.warn(`[DateRangePicker] Month navigation blocked: ${c.message}`), !1) : (w.debug(`handleBeforeMonthChange() - navigation accepted, metadata items: ${((
|
|
1501
|
-
e.bulkMetadataCache.set(u,
|
|
1500
|
+
return l && ae(e), c.action === "block" ? (w.debug(`handleBeforeMonthChange() - navigation blocked: ${c.message || "no reason provided"}`), c.message && console.warn(`[DateRangePicker] Month navigation blocked: ${c.message}`), !1) : (w.debug(`handleBeforeMonthChange() - navigation accepted, metadata items: ${((r = c.metadata) == null ? void 0 : r.size) || 0}`), c.metadata ? e.bulkMetadataCache ? (c.metadata.forEach((p, u) => {
|
|
1501
|
+
e.bulkMetadataCache.set(u, p);
|
|
1502
1502
|
}), w.debug(`handleBeforeMonthChange() - merged ${c.metadata.size} entries into cache (total: ${e.bulkMetadataCache.size})`)) : (e.bulkMetadataCache = c.metadata, w.debug(`handleBeforeMonthChange() - bulk metadata cache created with ${c.metadata.size} entries`)) : e.bulkMetadataCache = null, !0);
|
|
1503
|
-
} catch (
|
|
1504
|
-
return ae(e), w.debug("handleBeforeMonthChange() - error in callback:",
|
|
1503
|
+
} catch (i) {
|
|
1504
|
+
return ae(e), w.debug("handleBeforeMonthChange() - error in callback:", i), console.error("[DateRangePicker] Error in beforeMonthChangedCallback:", i), !1;
|
|
1505
1505
|
} finally {
|
|
1506
1506
|
e.isMonthChanging = !1;
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function rn(e, a) {
|
|
1510
1510
|
e.showingRollingSelector[a] = !e.showingRollingSelector[a], e.renderCalendar();
|
|
1511
1511
|
}
|
|
1512
1512
|
async function on(e, a, t) {
|
|
@@ -1515,17 +1515,17 @@ async function on(e, a, t) {
|
|
|
1515
1515
|
w.debug(`selectYear() Col${t} - navigation blocked by callback`);
|
|
1516
1516
|
return;
|
|
1517
1517
|
}
|
|
1518
|
-
const
|
|
1519
|
-
e.monthDates[t].setFullYear(a), w.debug(`selectYear() Col${t} - changed from ${
|
|
1518
|
+
const i = e.monthDates[t].getFullYear();
|
|
1519
|
+
e.monthDates[t].setFullYear(a), w.debug(`selectYear() Col${t} - changed from ${i} to ${a}`), De(e, t), e.showingRollingSelector[t] = !1, e.renderCalendar();
|
|
1520
1520
|
}
|
|
1521
|
-
async function
|
|
1521
|
+
async function sn(e, a, t) {
|
|
1522
1522
|
const n = e.monthDates[t].getFullYear();
|
|
1523
1523
|
if (!await Z(e, n, a, t)) {
|
|
1524
1524
|
w.debug(`selectMonth() Col${t} - navigation blocked by callback`);
|
|
1525
1525
|
return;
|
|
1526
1526
|
}
|
|
1527
|
-
const
|
|
1528
|
-
e.monthDates[t].setMonth(a), w.debug(`selectMonth() Col${t} - changed from ${
|
|
1527
|
+
const i = e.monthDates[t].getMonth();
|
|
1528
|
+
e.monthDates[t].setMonth(a), w.debug(`selectMonth() Col${t} - changed from ${i + 1} to ${a + 1}`), De(e, t), e.showingRollingSelector[t] = !1, e.renderCalendar();
|
|
1529
1529
|
}
|
|
1530
1530
|
function De(e, a) {
|
|
1531
1531
|
const t = e.monthDates[a];
|
|
@@ -1533,78 +1533,78 @@ function De(e, a) {
|
|
|
1533
1533
|
const n = e.monthDates[a + 1];
|
|
1534
1534
|
if (ke(t, n)) {
|
|
1535
1535
|
w.debug(`checkAndResolveCollisions() Col${a} - collision with Col${a + 1}, shifting forward`);
|
|
1536
|
-
const
|
|
1537
|
-
e.monthDates[a + 1] =
|
|
1536
|
+
const r = new Date(t.getFullYear(), t.getMonth() + 1, 1);
|
|
1537
|
+
e.monthDates[a + 1] = r, De(e, a + 1);
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
1540
1540
|
if (a > 0) {
|
|
1541
1541
|
const n = e.monthDates[a - 1];
|
|
1542
1542
|
if (ke(n, t)) {
|
|
1543
1543
|
w.debug(`checkAndResolveCollisions() Col${a} - collision with Col${a - 1}, shifting backward`);
|
|
1544
|
-
const
|
|
1545
|
-
e.monthDates[a - 1] =
|
|
1544
|
+
const r = new Date(t.getFullYear(), t.getMonth() - 1, 1);
|
|
1545
|
+
e.monthDates[a - 1] = r, De(e, a - 1);
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
1549
|
function ke(e, a) {
|
|
1550
|
-
const t = e.getFullYear(), n = e.getMonth(),
|
|
1551
|
-
return t >
|
|
1550
|
+
const t = e.getFullYear(), n = e.getMonth(), r = a.getFullYear(), i = a.getMonth();
|
|
1551
|
+
return t > r || t === r && n >= i;
|
|
1552
1552
|
}
|
|
1553
|
-
async function
|
|
1553
|
+
async function be(e, a) {
|
|
1554
1554
|
const t = isNaN(a) ? e.activeMonthIndex : a;
|
|
1555
1555
|
e.showingRollingSelector[t] && (e.showingRollingSelector[t] = !1);
|
|
1556
|
-
const n = e.monthDates[t],
|
|
1557
|
-
if (!j(e,
|
|
1556
|
+
const n = e.monthDates[t], r = new Date(n.getFullYear(), n.getMonth() - 1, 1);
|
|
1557
|
+
if (!j(e, r.getFullYear(), r.getMonth())) {
|
|
1558
1558
|
w.debug(`prevMonth() Col${t} - navigation blocked: target month has no enabled days`);
|
|
1559
1559
|
return;
|
|
1560
1560
|
}
|
|
1561
|
-
if (!await Z(e,
|
|
1561
|
+
if (!await Z(e, r.getFullYear(), r.getMonth(), t)) {
|
|
1562
1562
|
w.debug(`prevMonth() Col${t} - navigation blocked by callback`);
|
|
1563
1563
|
return;
|
|
1564
1564
|
}
|
|
1565
|
-
if (e.monthDates[t] =
|
|
1565
|
+
if (e.monthDates[t] = r, w.debug(`prevMonth() Col${t} - changed from ${n.getFullYear()}-${n.getMonth() + 1} to ${r.getFullYear()}-${r.getMonth() + 1}`), t > 0) {
|
|
1566
1566
|
const o = e.monthDates[t - 1];
|
|
1567
|
-
ke(o,
|
|
1567
|
+
ke(o, r) && (w.debug(`prevMonth() Col${t} - collision detected with Col${t - 1}, shifting previous columns back`), await be(e, t - 1));
|
|
1568
1568
|
}
|
|
1569
1569
|
e.renderCalendar();
|
|
1570
1570
|
}
|
|
1571
|
-
async function
|
|
1571
|
+
async function ye(e, a) {
|
|
1572
1572
|
const t = isNaN(a) ? e.activeMonthIndex : a;
|
|
1573
1573
|
e.showingRollingSelector[t] && (e.showingRollingSelector[t] = !1);
|
|
1574
|
-
const n = e.monthDates[t],
|
|
1575
|
-
if (!j(e,
|
|
1574
|
+
const n = e.monthDates[t], r = new Date(n.getFullYear(), n.getMonth() + 1, 1);
|
|
1575
|
+
if (!j(e, r.getFullYear(), r.getMonth())) {
|
|
1576
1576
|
w.debug(`nextMonth() Col${t} - navigation blocked: target month has no enabled days`);
|
|
1577
1577
|
return;
|
|
1578
1578
|
}
|
|
1579
|
-
if (!await Z(e,
|
|
1579
|
+
if (!await Z(e, r.getFullYear(), r.getMonth(), t)) {
|
|
1580
1580
|
w.debug(`nextMonth() Col${t} - navigation blocked by callback`);
|
|
1581
1581
|
return;
|
|
1582
1582
|
}
|
|
1583
|
-
if (e.monthDates[t] =
|
|
1583
|
+
if (e.monthDates[t] = r, w.debug(`nextMonth() Col${t} - changed from ${n.getFullYear()}-${n.getMonth() + 1} to ${r.getFullYear()}-${r.getMonth() + 1}`), t < e.monthDates.length - 1) {
|
|
1584
1584
|
const o = e.monthDates[t + 1];
|
|
1585
|
-
ke(
|
|
1585
|
+
ke(r, o) && (w.debug(`nextMonth() Col${t} - collision detected with Col${t + 1}, shifting next columns forward`), await ye(e, t + 1));
|
|
1586
1586
|
}
|
|
1587
1587
|
e.renderCalendar();
|
|
1588
1588
|
}
|
|
1589
|
-
function fe(e, a, t, n,
|
|
1590
|
-
let
|
|
1591
|
-
const
|
|
1592
|
-
for (; o <
|
|
1593
|
-
if (
|
|
1594
|
-
const l = n[
|
|
1589
|
+
function fe(e, a, t, n, r) {
|
|
1590
|
+
let i = a, o = 0;
|
|
1591
|
+
const s = 60;
|
|
1592
|
+
for (; o < s; ) {
|
|
1593
|
+
if (i >= 0 && i < n.length) {
|
|
1594
|
+
const l = n[i].dataset.date;
|
|
1595
1595
|
if (l) {
|
|
1596
|
-
const [c,
|
|
1597
|
-
if (!e.isDateDisabledInternal(
|
|
1598
|
-
return { index:
|
|
1596
|
+
const [c, p, u] = l.split("-").map(Number), g = new Date(c, p - 1, u);
|
|
1597
|
+
if (!e.isDateDisabledInternal(g))
|
|
1598
|
+
return { index: i, monthChanged: !1 };
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
|
-
if (
|
|
1601
|
+
if (i += t, o++, i < 0 || i >= n.length)
|
|
1602
1602
|
return { index: null, monthChanged: !0, direction: t > 0 ? "next" : "prev" };
|
|
1603
1603
|
}
|
|
1604
1604
|
return { index: null, monthChanged: !1 };
|
|
1605
1605
|
}
|
|
1606
1606
|
function dn(e, a) {
|
|
1607
|
-
var o,
|
|
1607
|
+
var o, s, d, l;
|
|
1608
1608
|
w.debug(`moveFocus(${a}) Col${e.activeMonthIndex} - focusedDayIndex:`, e.focusedDayIndex);
|
|
1609
1609
|
const t = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${e.activeMonthIndex}"]`);
|
|
1610
1610
|
if (!t) {
|
|
@@ -1614,84 +1614,84 @@ function dn(e, a) {
|
|
|
1614
1614
|
const n = t.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
1615
1615
|
if (w.debug(`moveFocus() Col${e.activeMonthIndex} - found ${n.length} days in column`), n.length === 0) return;
|
|
1616
1616
|
if (e.focusedDayIndex === null) {
|
|
1617
|
-
const c = Array.from(n).findIndex((
|
|
1617
|
+
const c = Array.from(n).findIndex((p) => p.classList.contains("drp-date-picker__day--today"));
|
|
1618
1618
|
e.focusedDayIndex = c !== -1 ? c : 0, w.debug(`moveFocus() Col${e.activeMonthIndex} - initialized focusedDayIndex to ${e.focusedDayIndex} (today or first day), will move by offset ${a}`);
|
|
1619
1619
|
}
|
|
1620
1620
|
(o = n[e.focusedDayIndex]) == null || o.classList.remove("drp-date-picker__day--focused");
|
|
1621
|
-
const
|
|
1622
|
-
if (
|
|
1621
|
+
const r = e.focusedDayIndex + a;
|
|
1622
|
+
if (r < 0) {
|
|
1623
1623
|
const c = e.activeMonthIndex;
|
|
1624
1624
|
if (a === -1)
|
|
1625
|
-
w.debug(`moveFocus() Col${c} - edge navigation LEFT: going to last enabled day of prev month`),
|
|
1625
|
+
w.debug(`moveFocus() Col${c} - edge navigation LEFT: going to last enabled day of prev month`), be(e, e.activeMonthIndex), setTimeout(() => {
|
|
1626
1626
|
var m, f;
|
|
1627
|
-
const
|
|
1628
|
-
if (!
|
|
1629
|
-
const u =
|
|
1630
|
-
|
|
1627
|
+
const p = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1628
|
+
if (!p) return;
|
|
1629
|
+
const u = p.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = fe(e, u.length - 1, -1, u);
|
|
1630
|
+
g.index !== null && (e.focusedDayIndex = g.index, (m = u[e.focusedDayIndex]) == null || m.classList.add("drp-date-picker__day--focused"), (f = u[e.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
1631
1631
|
}, 0);
|
|
1632
1632
|
else {
|
|
1633
1633
|
const u = n[e.focusedDayIndex].dataset.date;
|
|
1634
1634
|
if (u) {
|
|
1635
|
-
const [
|
|
1636
|
-
w.debug(`moveFocus() Col${c} - edge navigation UP: current day ${f} is weekday ${
|
|
1635
|
+
const [g, m, f] = u.split("-").map(Number), h = new Date(g, m - 1, f).getDay();
|
|
1636
|
+
w.debug(`moveFocus() Col${c} - edge navigation UP: current day ${f} is weekday ${h}, going to prev month`), be(e, e.activeMonthIndex), setTimeout(() => {
|
|
1637
1637
|
var v, I;
|
|
1638
1638
|
const M = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1639
1639
|
if (!M) return;
|
|
1640
1640
|
const C = M.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), _ = C[C.length - 1].dataset.date;
|
|
1641
1641
|
if (_) {
|
|
1642
|
-
const [A, D, x] = _.split("-").map(Number), R = new Date(A, D - 1, x).getDay(), k = (R -
|
|
1643
|
-
e.focusedDayIndex = C.length - 1 - k, w.debug(`moveFocus() Col${c} - last day weekday ${R}, target ${
|
|
1642
|
+
const [A, D, x] = _.split("-").map(Number), R = new Date(A, D - 1, x).getDay(), k = (R - h + 7) % 7;
|
|
1643
|
+
e.focusedDayIndex = C.length - 1 - k, w.debug(`moveFocus() Col${c} - last day weekday ${R}, target ${h}, focusing on day ${e.focusedDayIndex + 1}`), (v = C[e.focusedDayIndex]) == null || v.classList.add("drp-date-picker__day--focused"), (I = C[e.focusedDayIndex]) == null || I.scrollIntoView({ block: "nearest" });
|
|
1644
1644
|
}
|
|
1645
1645
|
}, 0);
|
|
1646
1646
|
}
|
|
1647
1647
|
}
|
|
1648
1648
|
return;
|
|
1649
|
-
} else if (
|
|
1649
|
+
} else if (r >= n.length) {
|
|
1650
1650
|
const c = e.activeMonthIndex;
|
|
1651
1651
|
if (a === 1)
|
|
1652
|
-
w.debug(`moveFocus() Col${c} - edge navigation RIGHT: going to first enabled day of next month`),
|
|
1652
|
+
w.debug(`moveFocus() Col${c} - edge navigation RIGHT: going to first enabled day of next month`), ye(e, e.activeMonthIndex), setTimeout(() => {
|
|
1653
1653
|
var m, f;
|
|
1654
|
-
const
|
|
1655
|
-
if (!
|
|
1656
|
-
const u =
|
|
1657
|
-
|
|
1654
|
+
const p = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1655
|
+
if (!p) return;
|
|
1656
|
+
const u = p.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = fe(e, 0, 1, u);
|
|
1657
|
+
g.index !== null && (e.focusedDayIndex = g.index, (m = u[e.focusedDayIndex]) == null || m.classList.add("drp-date-picker__day--focused"), (f = u[e.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
1658
1658
|
}, 0);
|
|
1659
1659
|
else {
|
|
1660
1660
|
const u = n[e.focusedDayIndex].dataset.date;
|
|
1661
1661
|
if (u) {
|
|
1662
|
-
const [
|
|
1663
|
-
w.debug(`moveFocus() Col${c} - edge navigation DOWN: current day ${f} is weekday ${
|
|
1662
|
+
const [g, m, f] = u.split("-").map(Number), h = new Date(g, m - 1, f).getDay();
|
|
1663
|
+
w.debug(`moveFocus() Col${c} - edge navigation DOWN: current day ${f} is weekday ${h}, going to next month`), ye(e, e.activeMonthIndex), setTimeout(() => {
|
|
1664
1664
|
var v, I;
|
|
1665
1665
|
const M = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1666
1666
|
if (!M) return;
|
|
1667
1667
|
const C = M.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), _ = C[0].dataset.date;
|
|
1668
1668
|
if (_) {
|
|
1669
|
-
const [A, D, x] = _.split("-").map(Number), R = new Date(A, D - 1, x).getDay(), k = (
|
|
1670
|
-
e.focusedDayIndex = k, w.debug(`moveFocus() Col${c} - first day weekday ${R}, target ${
|
|
1669
|
+
const [A, D, x] = _.split("-").map(Number), R = new Date(A, D - 1, x).getDay(), k = (h - R + 7) % 7;
|
|
1670
|
+
e.focusedDayIndex = k, w.debug(`moveFocus() Col${c} - first day weekday ${R}, target ${h}, focusing on day ${e.focusedDayIndex + 1}`), (v = C[e.focusedDayIndex]) == null || v.classList.add("drp-date-picker__day--focused"), (I = C[e.focusedDayIndex]) == null || I.scrollIntoView({ block: "nearest" });
|
|
1671
1671
|
}
|
|
1672
1672
|
}, 0);
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
1675
|
return;
|
|
1676
1676
|
}
|
|
1677
|
-
const
|
|
1678
|
-
if (
|
|
1677
|
+
const i = fe(e, r, a, n, e.activeMonthIndex);
|
|
1678
|
+
if (i.monthChanged) {
|
|
1679
1679
|
const c = e.activeMonthIndex;
|
|
1680
|
-
|
|
1680
|
+
i.direction === "next" ? ye(e, e.activeMonthIndex) : be(e, e.activeMonthIndex), setTimeout(() => {
|
|
1681
1681
|
var m, f;
|
|
1682
|
-
const
|
|
1683
|
-
if (!
|
|
1684
|
-
const u =
|
|
1682
|
+
const p = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1683
|
+
if (!p) return;
|
|
1684
|
+
const u = p.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = fe(
|
|
1685
1685
|
e,
|
|
1686
|
-
|
|
1686
|
+
i.direction === "next" ? 0 : u.length - 1,
|
|
1687
1687
|
a,
|
|
1688
1688
|
u
|
|
1689
1689
|
);
|
|
1690
|
-
|
|
1690
|
+
g.index !== null && (e.focusedDayIndex = g.index, (m = u[e.focusedDayIndex]) == null || m.classList.add("drp-date-picker__day--focused"), (f = u[e.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
1691
1691
|
}, 0);
|
|
1692
1692
|
return;
|
|
1693
1693
|
}
|
|
1694
|
-
|
|
1694
|
+
i.index !== null ? (e.focusedDayIndex = i.index, (s = n[e.focusedDayIndex]) == null || s.classList.add("drp-date-picker__day--focused"), (d = n[e.focusedDayIndex]) == null || d.scrollIntoView({ block: "nearest" })) : (w.debug("moveFocus() - no enabled day found in search range"), (l = n[e.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"));
|
|
1695
1695
|
}
|
|
1696
1696
|
async function ln(e) {
|
|
1697
1697
|
if (!e.options.unifiedNavigation) return;
|
|
@@ -1701,9 +1701,9 @@ async function ln(e) {
|
|
|
1701
1701
|
return;
|
|
1702
1702
|
}
|
|
1703
1703
|
if (await Z(e, n.getFullYear(), n.getMonth(), a)) {
|
|
1704
|
-
for (let
|
|
1705
|
-
const o =
|
|
1706
|
-
e.monthDates[
|
|
1704
|
+
for (let i = 0; i < e.monthDates.length; i++) {
|
|
1705
|
+
const o = i - a;
|
|
1706
|
+
e.monthDates[i] = new Date(n.getFullYear(), n.getMonth() + o, 1);
|
|
1707
1707
|
}
|
|
1708
1708
|
e.renderCalendar();
|
|
1709
1709
|
}
|
|
@@ -1716,9 +1716,9 @@ async function cn(e) {
|
|
|
1716
1716
|
return;
|
|
1717
1717
|
}
|
|
1718
1718
|
if (await Z(e, n.getFullYear(), n.getMonth(), a)) {
|
|
1719
|
-
for (let
|
|
1720
|
-
const o =
|
|
1721
|
-
e.monthDates[
|
|
1719
|
+
for (let i = 0; i < e.monthDates.length; i++) {
|
|
1720
|
+
const o = i - a;
|
|
1721
|
+
e.monthDates[i] = new Date(n.getFullYear(), n.getMonth() + o, 1);
|
|
1722
1722
|
}
|
|
1723
1723
|
e.renderCalendar();
|
|
1724
1724
|
}
|
|
@@ -1727,23 +1727,23 @@ async function un(e, a) {
|
|
|
1727
1727
|
if (!e.options.unifiedNavigation) return;
|
|
1728
1728
|
const t = e.options.unifiedNavigationAnchorIndex ?? 0, n = e.monthDates[t].getFullYear();
|
|
1729
1729
|
if (w.debug(`setUnifiedMonth(${a}) - anchor index: ${t}, year: ${n}`), !!await Z(e, n, a, t)) {
|
|
1730
|
-
for (let
|
|
1731
|
-
const o =
|
|
1732
|
-
e.monthDates[
|
|
1730
|
+
for (let i = 0; i < e.monthDates.length; i++) {
|
|
1731
|
+
const o = i - t;
|
|
1732
|
+
e.monthDates[i] = new Date(n, a + o, 1);
|
|
1733
1733
|
}
|
|
1734
1734
|
e.showingUnifiedRollingSelector = !1, e.renderCalendar();
|
|
1735
1735
|
}
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function pn(e) {
|
|
1738
1738
|
e.options.unifiedNavigation && (e.showingUnifiedRollingSelector = !e.showingUnifiedRollingSelector, w.debug(`toggleUnifiedRollingSelector() - now ${e.showingUnifiedRollingSelector ? "visible" : "hidden"}`), e.renderCalendar());
|
|
1739
1739
|
}
|
|
1740
|
-
async function
|
|
1740
|
+
async function gn(e, a) {
|
|
1741
1741
|
if (!e.options.unifiedNavigation) return;
|
|
1742
1742
|
const t = e.options.unifiedNavigationAnchorIndex ?? 0, n = e.monthDates[t].getMonth();
|
|
1743
1743
|
if (w.debug(`setUnifiedYear(${a}) - anchor index: ${t}, month: ${n}`), !!await Z(e, a, n, t)) {
|
|
1744
|
-
for (let
|
|
1745
|
-
const o =
|
|
1746
|
-
e.monthDates[
|
|
1744
|
+
for (let i = 0; i < e.monthDates.length; i++) {
|
|
1745
|
+
const o = i - t;
|
|
1746
|
+
e.monthDates[i] = new Date(a, n + o, 1);
|
|
1747
1747
|
}
|
|
1748
1748
|
e.showingUnifiedRollingSelector = !1, e.renderCalendar();
|
|
1749
1749
|
}
|
|
@@ -1751,14 +1751,14 @@ async function hn(e, a) {
|
|
|
1751
1751
|
function $t(e, a, t) {
|
|
1752
1752
|
if (!e) {
|
|
1753
1753
|
if (t != null && t.normalizedMinDate || t != null && t.normalizedMaxDate) {
|
|
1754
|
-
const n = t.normalizedMinDate ? t.normalizedMinDate.getFullYear() : a - 1,
|
|
1755
|
-
return { min: n, max:
|
|
1754
|
+
const n = t.normalizedMinDate ? t.normalizedMinDate.getFullYear() : a - 1, r = t.normalizedMaxDate ? t.normalizedMaxDate.getFullYear() : a + 1;
|
|
1755
|
+
return { min: n, max: r };
|
|
1756
1756
|
}
|
|
1757
1757
|
return { min: a - 1, max: a + 1 };
|
|
1758
1758
|
}
|
|
1759
1759
|
if (e.includes("-")) {
|
|
1760
|
-
const [n,
|
|
1761
|
-
return { min: parseInt(n, 10), max: parseInt(
|
|
1760
|
+
const [n, r] = e.split("-");
|
|
1761
|
+
return { min: parseInt(n, 10), max: parseInt(r, 10) };
|
|
1762
1762
|
} else {
|
|
1763
1763
|
const n = parseInt(e, 10);
|
|
1764
1764
|
return { min: n, max: n };
|
|
@@ -1770,10 +1770,10 @@ function Pt(e) {
|
|
|
1770
1770
|
const [a, t] = e.split("-");
|
|
1771
1771
|
return { min: parseInt(a, 10), max: parseInt(t, 10) };
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1773
|
+
function hn(e) {
|
|
1774
1774
|
de.debug("[DatePicker 18] renderCalendar called, showingRollingSelector:", e.showingRollingSelector, `activeCol: ${e.activeMonthIndex}`), de.debug("[DatePicker 18] monthDates array:", e.monthDates.map((a, t) => `Col${t}: ${a.getFullYear()}-${a.getMonth() + 1}`).join(", ")), e.options.unifiedNavigation && e.showingUnifiedRollingSelector && mn(e);
|
|
1775
1775
|
for (let a = 0; a < e.options.visibleMonthsCount; a++)
|
|
1776
|
-
e.showingRollingSelector[a] ?
|
|
1776
|
+
e.showingRollingSelector[a] ? Ft(e, a) : Nt(e, a);
|
|
1777
1777
|
if (e.focusedDayIndex !== null) {
|
|
1778
1778
|
const a = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${e.activeMonthIndex}"]`);
|
|
1779
1779
|
if (a) {
|
|
@@ -1789,62 +1789,62 @@ function Nt(e, a) {
|
|
|
1789
1789
|
if (!t) return;
|
|
1790
1790
|
const n = t.querySelector(".drp-date-picker__rolling-selector");
|
|
1791
1791
|
n == null || n.classList.remove("drp-date-picker__rolling-selector--visible");
|
|
1792
|
-
const
|
|
1793
|
-
if (
|
|
1792
|
+
const r = e.monthDates[a], i = t.querySelector(".drp-date-picker__month-year");
|
|
1793
|
+
if (i && (i.textContent = `${e.monthNames[r.getMonth()]} ${r.getFullYear()}`), e.options.unifiedNavigation && a === 0 && e.unifiedRangeDisplay) {
|
|
1794
1794
|
e.unifiedRollingSelector && !e.showingUnifiedRollingSelector && e.unifiedRollingSelector.classList.remove("drp-date-picker__unified-rolling-selector--visible");
|
|
1795
|
-
const
|
|
1795
|
+
const y = e.monthDates[0], h = e.monthDates[e.monthDates.length - 1], M = e.options.unifiedNavigationAnchorIndex ?? 0, C = e.monthDates[M];
|
|
1796
1796
|
if (e.options.getUnifiedHeaderCallback) {
|
|
1797
1797
|
const _ = e.options.getUnifiedHeaderCallback({
|
|
1798
|
-
firstMonth:
|
|
1799
|
-
lastMonth:
|
|
1798
|
+
firstMonth: y,
|
|
1799
|
+
lastMonth: h,
|
|
1800
1800
|
anchorMonth: C,
|
|
1801
1801
|
monthNames: e.monthNames
|
|
1802
1802
|
});
|
|
1803
1803
|
e.unifiedRangeDisplay.textContent = _;
|
|
1804
1804
|
} else {
|
|
1805
|
-
const _ = e.monthNames[
|
|
1805
|
+
const _ = e.monthNames[y.getMonth()], v = e.monthNames[h.getMonth()], I = y.getFullYear(), A = h.getFullYear();
|
|
1806
1806
|
I === A ? e.unifiedRangeDisplay.textContent = `${_} ${I} - ${v} ${A}` : e.unifiedRangeDisplay.textContent = `${_} ${I} - ${v} ${A}`;
|
|
1807
1807
|
}
|
|
1808
1808
|
const E = e.unifiedHeader;
|
|
1809
1809
|
if (E) {
|
|
1810
|
-
const _ =
|
|
1810
|
+
const _ = y.getMonth() === 0 ? y.getFullYear() - 1 : y.getFullYear(), v = y.getMonth() === 0 ? 11 : y.getMonth() - 1, I = E.querySelector(".drp-date-picker__nav--prev");
|
|
1811
1811
|
I && (j(e, _, v) ? (I.removeAttribute("disabled"), I.classList.remove("drp-date-picker__nav--disabled")) : (I.setAttribute("disabled", "true"), I.classList.add("drp-date-picker__nav--disabled")));
|
|
1812
|
-
const A =
|
|
1812
|
+
const A = h.getMonth() === 11 ? h.getFullYear() + 1 : h.getFullYear(), D = h.getMonth() === 11 ? 0 : h.getMonth() + 1, x = E.querySelector(".drp-date-picker__nav--next");
|
|
1813
1813
|
x && (j(e, A, D) ? (x.removeAttribute("disabled"), x.classList.remove("drp-date-picker__nav--disabled")) : (x.setAttribute("disabled", "true"), x.classList.add("drp-date-picker__nav--disabled")));
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
const o =
|
|
1816
|
+
const o = r.getFullYear(), s = r.getMonth(), d = s === 0 ? 11 : s - 1, l = s === 0 ? o - 1 : o, c = t.querySelector(".drp-date-picker__nav--prev");
|
|
1817
1817
|
c && (j(e, l, d) ? (c.removeAttribute("disabled"), c.classList.remove("drp-date-picker__nav--disabled")) : (c.setAttribute("disabled", "true"), c.classList.add("drp-date-picker__nav--disabled")));
|
|
1818
|
-
const
|
|
1819
|
-
|
|
1818
|
+
const p = s === 11 ? 0 : s + 1, u = s === 11 ? o + 1 : o, g = t.querySelector(".drp-date-picker__nav--next");
|
|
1819
|
+
g && (j(e, u, p) ? (g.removeAttribute("disabled"), g.classList.remove("drp-date-picker__nav--disabled")) : (g.setAttribute("disabled", "true"), g.classList.add("drp-date-picker__nav--disabled")));
|
|
1820
1820
|
const m = t.querySelector(".drp-date-picker__weekdays"), f = [
|
|
1821
1821
|
...e.weekdayNames.slice(e.weekStartDay),
|
|
1822
1822
|
...e.weekdayNames.slice(0, e.weekStartDay)
|
|
1823
1823
|
];
|
|
1824
|
-
m && (m.innerHTML = f.map((
|
|
1824
|
+
m && (m.innerHTML = f.map((y) => `<div class="drp-date-picker__weekday">${y}</div>`).join("")), zt(e, a, r);
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function zt(e, a, t) {
|
|
1827
1827
|
de.debug(`[DatePicker Col${a} 20] renderDays called for month`, a);
|
|
1828
1828
|
const n = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${a}"]`);
|
|
1829
1829
|
if (!n) return;
|
|
1830
|
-
const
|
|
1831
|
-
de.debug(`[DatePicker Col${a} 21] Rendering days for:`,
|
|
1832
|
-
const d = (new Date(
|
|
1830
|
+
const r = n.querySelector(".drp-date-picker__days"), i = t.getFullYear(), o = t.getMonth();
|
|
1831
|
+
de.debug(`[DatePicker Col${a} 21] Rendering days for:`, i, o + 1);
|
|
1832
|
+
const d = (new Date(i, o, 1).getDay() - e.weekStartDay + 7) % 7, l = new Date(i, o + 1, 0).getDate(), c = new Date(i, o, 0).getDate(), p = new Date(i, o - 1, 1), u = p.getFullYear(), g = p.getMonth(), m = new Date(i, o + 1, 1), f = m.getFullYear(), y = m.getMonth(), h = [];
|
|
1833
1833
|
for (let v = d - 1; v >= 0; v--) {
|
|
1834
|
-
const I = c - v, A = new Date(u,
|
|
1835
|
-
|
|
1834
|
+
const I = c - v, A = new Date(u, g, I);
|
|
1835
|
+
h.push({
|
|
1836
1836
|
date: A,
|
|
1837
1837
|
year: u,
|
|
1838
|
-
month:
|
|
1838
|
+
month: g,
|
|
1839
1839
|
day: I,
|
|
1840
1840
|
isOtherMonth: !0
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
1843
|
for (let v = 1; v <= l; v++) {
|
|
1844
|
-
const I = new Date(
|
|
1845
|
-
|
|
1844
|
+
const I = new Date(i, o, v);
|
|
1845
|
+
h.push({
|
|
1846
1846
|
date: I,
|
|
1847
|
-
year:
|
|
1847
|
+
year: i,
|
|
1848
1848
|
month: o,
|
|
1849
1849
|
day: v,
|
|
1850
1850
|
isOtherMonth: !1
|
|
@@ -1852,18 +1852,18 @@ function Ft(e, a, t) {
|
|
|
1852
1852
|
}
|
|
1853
1853
|
const C = Math.ceil((d + l) / 7) * 7 - (d + l);
|
|
1854
1854
|
for (let v = 1; v <= C; v++) {
|
|
1855
|
-
const I = new Date(f,
|
|
1856
|
-
|
|
1855
|
+
const I = new Date(f, y, v);
|
|
1856
|
+
h.push({
|
|
1857
1857
|
date: I,
|
|
1858
1858
|
year: f,
|
|
1859
|
-
month:
|
|
1859
|
+
month: y,
|
|
1860
1860
|
day: v,
|
|
1861
1861
|
isOtherMonth: !0
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
1864
|
const E = [];
|
|
1865
|
-
for (let v = 0; v <
|
|
1866
|
-
E.push(
|
|
1865
|
+
for (let v = 0; v < h.length; v += 7)
|
|
1866
|
+
E.push(h.slice(v, v + 7));
|
|
1867
1867
|
let _ = "";
|
|
1868
1868
|
for (const v of E) {
|
|
1869
1869
|
const I = v.map((D) => {
|
|
@@ -1913,12 +1913,12 @@ function Ft(e, a, t) {
|
|
|
1913
1913
|
R && x.push("drp-date-picker__day--disabled"), S && S.dayClass && x.push(S.dayClass), e.isToday(D.date) && x.push("drp-date-picker__day--today");
|
|
1914
1914
|
let k = !1;
|
|
1915
1915
|
e.options.selectionMode === "single" ? k = e.isSameDay(D.date, e.selectedDate) : e.options.selectionMode === "multiple" && (k = e.selectedDates.some((q) => e.isSameDay(D.date, q))), k && x.push("drp-date-picker__day--selected");
|
|
1916
|
-
let L = !1, N = !1,
|
|
1916
|
+
let L = !1, N = !1, z = !1;
|
|
1917
1917
|
if (e.options.selectionMode === "range")
|
|
1918
|
-
L = e.isSameDay(D.date, e.selectedStartDate), N = e.isSameDay(D.date, e.selectedEndDate),
|
|
1918
|
+
L = e.isSameDay(D.date, e.selectedStartDate), N = e.isSameDay(D.date, e.selectedEndDate), z = e.isInRange(D.date), L && x.push("drp-date-picker__day--range-start"), N && x.push("drp-date-picker__day--range-end"), z && (!R || e.options.highlightDisabledInRange) && x.push("drp-date-picker__day--in-range");
|
|
1919
1919
|
else if (e.options.selectionMode === "multiple")
|
|
1920
1920
|
for (const q of e.selectedRanges)
|
|
1921
|
-
e.isSameDay(D.date, q.start) && (L = !0, x.push("drp-date-picker__day--range-start")), e.isSameDay(D.date, q.end) && (N = !0, x.push("drp-date-picker__day--range-end")), D.date >= q.start && D.date <= q.end && (
|
|
1921
|
+
e.isSameDay(D.date, q.start) && (L = !0, x.push("drp-date-picker__day--range-start")), e.isSameDay(D.date, q.end) && (N = !0, x.push("drp-date-picker__day--range-end")), D.date >= q.start && D.date <= q.end && (z = !0, (!R || e.options.highlightDisabledInRange) && x.push("drp-date-picker__day--in-range"));
|
|
1922
1922
|
const $ = `${D.year}-${String(D.month + 1).padStart(2, "0")}-${String(D.day).padStart(2, "0")}`;
|
|
1923
1923
|
let P = (S == null ? void 0 : S.dayTooltip) || "";
|
|
1924
1924
|
if (e.options.dayTooltipCallback) {
|
|
@@ -1930,7 +1930,7 @@ function Ft(e, a, t) {
|
|
|
1930
1930
|
isSelected: k,
|
|
1931
1931
|
isStartDate: L,
|
|
1932
1932
|
isEndDate: N,
|
|
1933
|
-
isInRange:
|
|
1933
|
+
isInRange: z,
|
|
1934
1934
|
isToday: e.isToday(D.date),
|
|
1935
1935
|
isWeekend: D.date.getDay() === 0 || D.date.getDay() === 6,
|
|
1936
1936
|
monthIndex: a,
|
|
@@ -1945,30 +1945,30 @@ function Ft(e, a, t) {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
_ += "</div>";
|
|
1947
1947
|
}
|
|
1948
|
-
|
|
1948
|
+
r && (r.innerHTML = _, fn(e, a, r));
|
|
1949
1949
|
}
|
|
1950
1950
|
function fn(e, a, t) {
|
|
1951
1951
|
if (!e.options.renderDayCallback && !e.options.renderDayContentCallback)
|
|
1952
1952
|
return;
|
|
1953
|
-
t.querySelectorAll(".drp-date-picker__day").forEach((
|
|
1954
|
-
const
|
|
1953
|
+
t.querySelectorAll(".drp-date-picker__day").forEach((r) => {
|
|
1954
|
+
const i = r, o = i.getAttribute("data-date"), s = parseInt(i.getAttribute("data-day-number") || "0", 10);
|
|
1955
1955
|
if (!o) return;
|
|
1956
|
-
const [d, l, c] = o.split("-"),
|
|
1956
|
+
const [d, l, c] = o.split("-"), p = new Date(parseInt(d), parseInt(l) - 1, parseInt(c)), u = i.querySelector(`slot[name="day-${o}"]`);
|
|
1957
1957
|
if (u && u.assignedNodes().length > 0)
|
|
1958
1958
|
return;
|
|
1959
|
-
const m = e.isDateDisabledInternal(
|
|
1960
|
-
date:
|
|
1959
|
+
const m = e.isDateDisabledInternal(p), f = e.isToday(p), y = p.getDay() === 0 || p.getDay() === 6, h = e.options.selectionMode === "single" && e.isSameDay(p, e.selectedDate), M = e.options.selectionMode === "range" && e.isSameDay(p, e.selectedStartDate), C = e.options.selectionMode === "range" && e.isSameDay(p, e.selectedEndDate), E = e.options.selectionMode === "range" && e.isInRange(p), _ = {
|
|
1960
|
+
date: p,
|
|
1961
1961
|
dateString: o,
|
|
1962
|
-
dayNumber:
|
|
1962
|
+
dayNumber: s,
|
|
1963
1963
|
isDisabled: m,
|
|
1964
|
-
isSelected:
|
|
1964
|
+
isSelected: h || M || C,
|
|
1965
1965
|
isStartDate: M,
|
|
1966
1966
|
isEndDate: C,
|
|
1967
1967
|
isInRange: E,
|
|
1968
1968
|
isToday: f,
|
|
1969
|
-
isWeekend:
|
|
1969
|
+
isWeekend: y,
|
|
1970
1970
|
monthIndex: a,
|
|
1971
|
-
element:
|
|
1971
|
+
element: i,
|
|
1972
1972
|
picker: e
|
|
1973
1973
|
};
|
|
1974
1974
|
if (e.options.renderDayCallback)
|
|
@@ -1987,59 +1987,59 @@ function fn(e, a, t) {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
});
|
|
1989
1989
|
}
|
|
1990
|
-
function
|
|
1990
|
+
function Ft(e, a) {
|
|
1991
1991
|
const t = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${a}"]`);
|
|
1992
1992
|
if (!t) return;
|
|
1993
1993
|
const n = t.querySelector(".drp-date-picker__rolling-selector");
|
|
1994
1994
|
n == null || n.classList.add("drp-date-picker__rolling-selector--visible");
|
|
1995
|
-
const
|
|
1995
|
+
const r = e.monthDates[a], i = r.getFullYear(), o = r.getMonth(), s = $t(e.options.rollingYearRange, i, e), d = Pt(e.options.rollingMonthRange), l = n == null ? void 0 : n.querySelector('[data-list="years"]');
|
|
1996
1996
|
let c = "";
|
|
1997
|
-
for (let u =
|
|
1998
|
-
const
|
|
1999
|
-
c += `<div class="drp-date-picker__rolling-item ${
|
|
1997
|
+
for (let u = s.min; u <= s.max; u++) {
|
|
1998
|
+
const g = u === i ? "drp-date-picker__rolling-item--selected" : "", f = ct(e, u) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
1999
|
+
c += `<div class="drp-date-picker__rolling-item ${g} ${f}" data-year="${u}" data-month-index="${a}"><span class="drp-date-picker__rolling-item-text">${u}</span></div>`;
|
|
2000
2000
|
}
|
|
2001
2001
|
l && (l.innerHTML = c);
|
|
2002
|
-
const
|
|
2003
|
-
if (
|
|
2002
|
+
const p = n == null ? void 0 : n.querySelector('[data-list="months"]');
|
|
2003
|
+
if (p) {
|
|
2004
2004
|
let u = "";
|
|
2005
|
-
for (let
|
|
2006
|
-
const m = e.monthNames[
|
|
2007
|
-
u += `<div class="drp-date-picker__rolling-item ${f} ${
|
|
2005
|
+
for (let g = d.min - 1; g <= d.max - 1; g++) {
|
|
2006
|
+
const m = e.monthNames[g], f = g === o ? "drp-date-picker__rolling-item--selected" : "", h = j(e, i, g) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
2007
|
+
u += `<div class="drp-date-picker__rolling-item ${f} ${h}" data-month="${g}" data-month-index="${a}"><span class="drp-date-picker__rolling-item-text">${m}</span></div>`;
|
|
2008
2008
|
}
|
|
2009
|
-
|
|
2009
|
+
p.innerHTML = u;
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
2012
|
function mn(e) {
|
|
2013
2013
|
if (!e.options.unifiedNavigation || !e.unifiedRollingSelector) return;
|
|
2014
2014
|
e.unifiedRollingSelector.classList.add("drp-date-picker__unified-rolling-selector--visible");
|
|
2015
|
-
const a = e.options.unifiedNavigationAnchorIndex ?? 0, t = e.monthDates[a], n = t.getFullYear(),
|
|
2015
|
+
const a = e.options.unifiedNavigationAnchorIndex ?? 0, t = e.monthDates[a], n = t.getFullYear(), r = t.getMonth(), i = e.getEffectiveYearRange(), o = e.getEffectiveMonthRange(), s = e.unifiedRollingSelector.querySelector('[data-list="years"]');
|
|
2016
2016
|
let d = "";
|
|
2017
|
-
for (let c =
|
|
2018
|
-
const
|
|
2019
|
-
d += `<div class="drp-date-picker__rolling-item ${
|
|
2017
|
+
for (let c = i.min; c <= i.max; c++) {
|
|
2018
|
+
const p = c === n ? "drp-date-picker__rolling-item--selected" : "", g = ct(e, c) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
2019
|
+
d += `<div class="drp-date-picker__rolling-item ${p} ${g}" data-year="${c}" data-unified="true"><span class="drp-date-picker__rolling-item-text">${c}</span></div>`;
|
|
2020
2020
|
}
|
|
2021
|
-
|
|
2021
|
+
s && (s.innerHTML = d);
|
|
2022
2022
|
const l = e.unifiedRollingSelector.querySelector('[data-list="months"]');
|
|
2023
2023
|
if (l) {
|
|
2024
2024
|
let c = "";
|
|
2025
|
-
for (let
|
|
2026
|
-
const u = e.monthNames[
|
|
2027
|
-
c += `<div class="drp-date-picker__rolling-item ${
|
|
2025
|
+
for (let p = o.min - 1; p <= o.max - 1; p++) {
|
|
2026
|
+
const u = e.monthNames[p], g = p === r ? "drp-date-picker__rolling-item--selected" : "", f = j(e, n, p) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
2027
|
+
c += `<div class="drp-date-picker__rolling-item ${g} ${f}" data-month="${p}" data-unified="true"><span class="drp-date-picker__rolling-item-text">${u}</span></div>`;
|
|
2028
2028
|
}
|
|
2029
2029
|
l.innerHTML = c;
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
|
-
function
|
|
2032
|
+
function bn(e) {
|
|
2033
2033
|
if (e.options.selectionMode !== "range") return;
|
|
2034
2034
|
const a = e.calendar.querySelector(".drp-date-picker__summary");
|
|
2035
2035
|
if (a)
|
|
2036
2036
|
if (e.selectedStartDate && e.selectedEndDate) {
|
|
2037
|
-
let t, n,
|
|
2037
|
+
let t, n, r, i, o;
|
|
2038
2038
|
if (e.options.disabledDatesHandling === "individual" || e.options.disabledDatesHandling === "split")
|
|
2039
2039
|
n = e.getEnabledDatesInRange(
|
|
2040
2040
|
e.selectedStartDate,
|
|
2041
2041
|
e.selectedEndDate
|
|
2042
|
-
), t = n.length,
|
|
2042
|
+
), t = n.length, i = n, e.options.disabledDatesHandling === "split" && (o = e.splitRangeByDisabled(
|
|
2043
2043
|
e.selectedStartDate,
|
|
2044
2044
|
e.selectedEndDate
|
|
2045
2045
|
));
|
|
@@ -2047,7 +2047,7 @@ function yn(e) {
|
|
|
2047
2047
|
n = e.getEnabledDatesInRange(
|
|
2048
2048
|
e.selectedStartDate,
|
|
2049
2049
|
e.selectedEndDate
|
|
2050
|
-
),
|
|
2050
|
+
), r = e.getDisabledDatesInRange(
|
|
2051
2051
|
e.selectedStartDate,
|
|
2052
2052
|
e.selectedEndDate
|
|
2053
2053
|
);
|
|
@@ -2057,11 +2057,11 @@ function yn(e) {
|
|
|
2057
2057
|
const l = e.selectedEndDate.getTime() - e.selectedStartDate.getTime();
|
|
2058
2058
|
t = Math.floor(l / 864e5) + 1;
|
|
2059
2059
|
}
|
|
2060
|
-
const
|
|
2060
|
+
const s = t > 0 ? t - 1 : 0;
|
|
2061
2061
|
if (a.className = "drp-date-picker__summary drp-date-picker__summary--visible", e.options.formatSummaryCallback) {
|
|
2062
2062
|
const d = {
|
|
2063
2063
|
days: t,
|
|
2064
|
-
nights:
|
|
2064
|
+
nights: s,
|
|
2065
2065
|
startDate: e.selectedStartDate,
|
|
2066
2066
|
endDate: e.selectedEndDate,
|
|
2067
2067
|
selectionMode: e.options.selectionMode,
|
|
@@ -2069,26 +2069,26 @@ function yn(e) {
|
|
|
2069
2069
|
localeStrings: e.localeStrings,
|
|
2070
2070
|
isPreview: !1
|
|
2071
2071
|
};
|
|
2072
|
-
n && (d.enabledDates = n),
|
|
2072
|
+
n && (d.enabledDates = n), r && (d.disabledDates = r), i && (d.dates = i), o && (d.dateRanges = o), a.innerHTML = e.options.formatSummaryCallback(d);
|
|
2073
2073
|
} else
|
|
2074
2074
|
a.innerHTML = `
|
|
2075
2075
|
<span class="drp-date-picker__summary-count">${t} ${t === 1 ? e.localeStrings.day : e.localeStrings.days}</span>
|
|
2076
2076
|
<span>, </span>
|
|
2077
|
-
<span class="drp-date-picker__summary-count">${
|
|
2077
|
+
<span class="drp-date-picker__summary-count">${s} ${s === 1 ? e.localeStrings.night : e.localeStrings.nights}</span>
|
|
2078
2078
|
`;
|
|
2079
2079
|
} else
|
|
2080
2080
|
a.className = "drp-date-picker__summary drp-date-picker__summary--hidden", a.innerHTML = "";
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function Ot(e) {
|
|
2083
2083
|
if (e.options.selectionMode !== "range") return;
|
|
2084
2084
|
const a = e.calendar.querySelector(".drp-date-picker__summary");
|
|
2085
2085
|
if (a && e.dragPreviewStart && e.dragPreviewEnd) {
|
|
2086
|
-
let t, n,
|
|
2086
|
+
let t, n, r, i, o;
|
|
2087
2087
|
if (e.options.disabledDatesHandling === "individual" || e.options.disabledDatesHandling === "split")
|
|
2088
2088
|
n = e.getEnabledDatesInRange(
|
|
2089
2089
|
e.dragPreviewStart,
|
|
2090
2090
|
e.dragPreviewEnd
|
|
2091
|
-
), t = n.length,
|
|
2091
|
+
), t = n.length, i = n, e.options.disabledDatesHandling === "split" && (o = e.splitRangeByDisabled(
|
|
2092
2092
|
e.dragPreviewStart,
|
|
2093
2093
|
e.dragPreviewEnd
|
|
2094
2094
|
));
|
|
@@ -2096,7 +2096,7 @@ function zt(e) {
|
|
|
2096
2096
|
n = e.getEnabledDatesInRange(
|
|
2097
2097
|
e.dragPreviewStart,
|
|
2098
2098
|
e.dragPreviewEnd
|
|
2099
|
-
),
|
|
2099
|
+
), r = e.getDisabledDatesInRange(
|
|
2100
2100
|
e.dragPreviewStart,
|
|
2101
2101
|
e.dragPreviewEnd
|
|
2102
2102
|
);
|
|
@@ -2106,11 +2106,11 @@ function zt(e) {
|
|
|
2106
2106
|
const l = e.dragPreviewEnd.getTime() - e.dragPreviewStart.getTime();
|
|
2107
2107
|
t = Math.floor(l / 864e5) + 1;
|
|
2108
2108
|
}
|
|
2109
|
-
const
|
|
2109
|
+
const s = t > 0 ? t - 1 : 0;
|
|
2110
2110
|
if (a.className = "drp-date-picker__summary drp-date-picker__summary--visible", e.options.formatSummaryCallback) {
|
|
2111
2111
|
const d = {
|
|
2112
2112
|
days: t,
|
|
2113
|
-
nights:
|
|
2113
|
+
nights: s,
|
|
2114
2114
|
startDate: e.dragPreviewStart,
|
|
2115
2115
|
endDate: e.dragPreviewEnd,
|
|
2116
2116
|
selectionMode: e.options.selectionMode,
|
|
@@ -2118,27 +2118,27 @@ function zt(e) {
|
|
|
2118
2118
|
localeStrings: e.localeStrings,
|
|
2119
2119
|
isPreview: !0
|
|
2120
2120
|
};
|
|
2121
|
-
n && (d.enabledDates = n),
|
|
2121
|
+
n && (d.enabledDates = n), r && (d.disabledDates = r), i && (d.dates = i), o && (d.dateRanges = o), a.innerHTML = e.options.formatSummaryCallback(d);
|
|
2122
2122
|
} else
|
|
2123
2123
|
a.innerHTML = `
|
|
2124
2124
|
<span style="opacity: 0.7;">${e.localeStrings.preview}: </span>
|
|
2125
2125
|
<span class="drp-date-picker__summary-count">${t} ${t === 1 ? e.localeStrings.day : e.localeStrings.days}</span>
|
|
2126
2126
|
<span>, </span>
|
|
2127
|
-
<span class="drp-date-picker__summary-count">${
|
|
2127
|
+
<span class="drp-date-picker__summary-count">${s} ${s === 1 ? e.localeStrings.night : e.localeStrings.nights}</span>
|
|
2128
2128
|
`;
|
|
2129
2129
|
}
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2132
|
-
if (e.calendar.querySelectorAll(".drp-date-picker__day--drag-preview, .drp-date-picker__day--drag-invalid").forEach((
|
|
2133
|
-
|
|
2131
|
+
function yn(e) {
|
|
2132
|
+
if (e.calendar.querySelectorAll(".drp-date-picker__day--drag-preview, .drp-date-picker__day--drag-invalid").forEach((r) => {
|
|
2133
|
+
r.classList.remove("drp-date-picker__day--drag-preview", "drp-date-picker__day--drag-invalid");
|
|
2134
2134
|
}), !e.dragPreviewStart || !e.dragPreviewEnd) return;
|
|
2135
2135
|
const t = e.options.disabledDatesHandling === "block" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd);
|
|
2136
|
-
e.calendar.querySelectorAll(".drp-date-picker__day").forEach((
|
|
2137
|
-
const
|
|
2138
|
-
if (!
|
|
2139
|
-
const [o,
|
|
2140
|
-
l >= e.dragPreviewStart && l <= e.dragPreviewEnd && (
|
|
2141
|
-
}),
|
|
2136
|
+
e.calendar.querySelectorAll(".drp-date-picker__day").forEach((r) => {
|
|
2137
|
+
const i = r.dataset.date;
|
|
2138
|
+
if (!i) return;
|
|
2139
|
+
const [o, s, d] = i.split("-").map(Number), l = new Date(o, s - 1, d);
|
|
2140
|
+
l >= e.dragPreviewStart && l <= e.dragPreviewEnd && (r.classList.add("drp-date-picker__day--drag-preview"), t && r.classList.add("drp-date-picker__day--drag-invalid"));
|
|
2141
|
+
}), Ot(e);
|
|
2142
2142
|
}
|
|
2143
2143
|
async function Yt(e, a) {
|
|
2144
2144
|
if (!e.options.beforeDateSelectCallback)
|
|
@@ -2173,8 +2173,8 @@ async function Bt(e, a, t) {
|
|
|
2173
2173
|
return ee.debug(" PREVENT mode - range contains disabled dates"), { isValid: !1, message: "Range contains disabled dates" };
|
|
2174
2174
|
} else if (e.options.disabledDatesHandling === "block" && (ee.debug(" Checking BLOCK mode"), e.hasDisabledDatesInRange(a, t))) {
|
|
2175
2175
|
ee.debug(" BLOCK mode - range contains disabled dates, adjusting");
|
|
2176
|
-
const
|
|
2177
|
-
return ee.debug(" BLOCK mode - adjusted end:",
|
|
2176
|
+
const r = e.findLastEnabledBeforeGap(a, t);
|
|
2177
|
+
return ee.debug(" BLOCK mode - adjusted end:", r), { isValid: !0, adjustedStart: a, adjustedEnd: r };
|
|
2178
2178
|
}
|
|
2179
2179
|
const n = await Yt(e, { start: a, end: t });
|
|
2180
2180
|
return n.isValid ? n.adjustedStart || n.adjustedEnd ? {
|
|
@@ -2190,58 +2190,58 @@ async function vn(e, a) {
|
|
|
2190
2190
|
Y.warn("selectDay() - called with invalid element:", a);
|
|
2191
2191
|
return;
|
|
2192
2192
|
}
|
|
2193
|
-
const [t, n,
|
|
2193
|
+
const [t, n, r] = a.dataset.date.split("-").map(Number), i = new Date(t, n - 1, r);
|
|
2194
2194
|
a.classList.contains("drp-date-picker__day--other-month");
|
|
2195
2195
|
const o = a.closest(".drp-date-picker__days");
|
|
2196
2196
|
if (o && o instanceof HTMLElement) {
|
|
2197
|
-
e.activeMonthIndex = parseInt(o.dataset.monthIndex || "0") || 0,
|
|
2198
|
-
const
|
|
2199
|
-
e.focusedDayIndex = Array.from(
|
|
2197
|
+
e.activeMonthIndex = parseInt(o.dataset.monthIndex || "0") || 0, ie.debug(`Col${e.activeMonthIndex} selectDay - activeMonthIndex:`, e.activeMonthIndex);
|
|
2198
|
+
const s = o.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
2199
|
+
e.focusedDayIndex = Array.from(s).indexOf(a), ie.debug(`Col${e.activeMonthIndex} selectDay - set focusedDayIndex to:`, e.focusedDayIndex);
|
|
2200
2200
|
}
|
|
2201
2201
|
if (e.options.selectionMode === "single") {
|
|
2202
|
-
const
|
|
2203
|
-
if (!
|
|
2204
|
-
|
|
2202
|
+
const s = await Yt(e, i);
|
|
2203
|
+
if (!s.isValid) {
|
|
2204
|
+
ie.debug("Single mode selection prevented by beforeDateSelectCallback");
|
|
2205
2205
|
return;
|
|
2206
2206
|
}
|
|
2207
|
-
const d =
|
|
2207
|
+
const d = s.adjustedDate || i;
|
|
2208
2208
|
e.selectedDate = d, e.input && (e.requiresApplyButton() || (e.input.value = e.formatDate(d))), e.requiresApplyButton() ? e.pendingSelection = d : e.options.onSelect && e.options.onSelect(d), e.options.positioningMode === "floating" && e.shouldAutoClose() && e.hide();
|
|
2209
2209
|
} else if (e.options.selectionMode === "multiple") {
|
|
2210
|
-
const
|
|
2211
|
-
if (d !== -1 ? e.selectedDates.splice(d, 1) : e.selectedDates.push(new Date(
|
|
2210
|
+
const s = `${i.getFullYear()}-${String(i.getMonth() + 1).padStart(2, "0")}-${String(i.getDate()).padStart(2, "0")}`, d = e.selectedDates.findIndex((l) => `${l.getFullYear()}-${String(l.getMonth() + 1).padStart(2, "0")}-${String(l.getDate()).padStart(2, "0")}` === s);
|
|
2211
|
+
if (d !== -1 ? e.selectedDates.splice(d, 1) : e.selectedDates.push(new Date(i)), e.input && !e.requiresApplyButton()) {
|
|
2212
2212
|
const l = e.selectedDates.length + e.selectedRanges.length;
|
|
2213
2213
|
e.input.value = l > 0 ? `${l} selection(s)` : "";
|
|
2214
2214
|
}
|
|
2215
2215
|
e.selectedRanges.length > 0 && e.selectedDates.length > 0 ? e.pendingSelection = [...e.selectedRanges, ...e.selectedDates] : e.selectedRanges.length > 0 ? e.pendingSelection = e.selectedRanges : e.pendingSelection = e.selectedDates;
|
|
2216
2216
|
} else if (!e.selectedStartDate || e.selectedEndDate)
|
|
2217
|
-
e.selectedStartDate =
|
|
2217
|
+
e.selectedStartDate = i, e.selectedEndDate = null, e.input && (e.requiresApplyButton() || (e.input.value = `${e.formatDate(e.selectedStartDate)} - ...`));
|
|
2218
2218
|
else {
|
|
2219
|
-
let
|
|
2220
|
-
|
|
2221
|
-
const l = await Bt(e,
|
|
2222
|
-
if (
|
|
2219
|
+
let s = e.selectedStartDate, d = i;
|
|
2220
|
+
i < e.selectedStartDate && (d = e.selectedStartDate, s = i), ie.debug(" selectDay - calling validateRangeAsync with:", s, d);
|
|
2221
|
+
const l = await Bt(e, s, d);
|
|
2222
|
+
if (ie.debug(" selectDay - validation result:", l), !l.isValid) {
|
|
2223
2223
|
l.message && Y.warn("selectDay() - range validation failed:", l.message), e.renderCalendar(), e.updateSummary();
|
|
2224
2224
|
return;
|
|
2225
2225
|
}
|
|
2226
|
-
e.selectedStartDate = l.adjustedStart ||
|
|
2226
|
+
e.selectedStartDate = l.adjustedStart || s, e.selectedEndDate = l.adjustedEnd || d, e.input && (e.requiresApplyButton() || (e.input.value = `${e.formatDate(e.selectedStartDate)} - ${e.formatDate(e.selectedEndDate)}`));
|
|
2227
2227
|
const c = { start: e.selectedStartDate, end: e.selectedEndDate };
|
|
2228
2228
|
e.requiresApplyButton() ? e.pendingSelection = c : e.options.onSelect && e.options.onSelect(c), e.options.positioningMode === "floating" && e.shouldAutoClose() && e.hide();
|
|
2229
2229
|
}
|
|
2230
2230
|
if (e.renderCalendar(), e.updateSummary(), e.options.selectionMode === "range" && e.selectedEndDate) {
|
|
2231
|
-
const
|
|
2231
|
+
const s = e.selectedEndDate;
|
|
2232
2232
|
for (let d = 0; d < e.monthDates.length; d++) {
|
|
2233
2233
|
const l = e.monthDates[d];
|
|
2234
|
-
if (
|
|
2234
|
+
if (s.getFullYear() === l.getFullYear() && s.getMonth() === l.getMonth()) {
|
|
2235
2235
|
e.activeMonthIndex = d;
|
|
2236
2236
|
const c = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${d}"]`);
|
|
2237
2237
|
if (c) {
|
|
2238
|
-
const
|
|
2239
|
-
const m =
|
|
2238
|
+
const p = c.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), u = Array.from(p).findIndex((g) => {
|
|
2239
|
+
const m = g.dataset.date;
|
|
2240
2240
|
if (!m) return !1;
|
|
2241
|
-
const [f,
|
|
2242
|
-
return e.isSameDay(M,
|
|
2241
|
+
const [f, y, h] = m.split("-").map(Number), M = new Date(f, y - 1, h);
|
|
2242
|
+
return e.isSameDay(M, s);
|
|
2243
2243
|
});
|
|
2244
|
-
u !== -1 && (e.focusedDayIndex = u,
|
|
2244
|
+
u !== -1 && (e.focusedDayIndex = u, p.forEach((g) => g.classList.remove("drp-date-picker__day--focused")), p[u] && p[u].classList.add("drp-date-picker__day--focused"));
|
|
2245
2245
|
}
|
|
2246
2246
|
break;
|
|
2247
2247
|
}
|
|
@@ -2273,14 +2273,14 @@ function wn(e) {
|
|
|
2273
2273
|
function xn(e) {
|
|
2274
2274
|
e.options.selectionMode === "range" && e.calendar.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--disabled)").forEach((t) => {
|
|
2275
2275
|
t.addEventListener("mousedown", (n) => {
|
|
2276
|
-
const
|
|
2276
|
+
const r = n, i = t, o = r.clientX, s = r.clientY, d = 5;
|
|
2277
2277
|
let l = !1, c = !1;
|
|
2278
|
-
const
|
|
2279
|
-
let
|
|
2280
|
-
|
|
2281
|
-
const m = (
|
|
2282
|
-
const
|
|
2283
|
-
!l && (
|
|
2278
|
+
const p = i.classList.contains("drp-date-picker__day--range-start"), u = i.classList.contains("drp-date-picker__day--range-end");
|
|
2279
|
+
let g;
|
|
2280
|
+
p && e.selectedStartDate && e.selectedEndDate ? g = "start" : u && e.selectedStartDate && e.selectedEndDate ? g = "end" : g = "start";
|
|
2281
|
+
const m = (y) => {
|
|
2282
|
+
const h = Math.abs(y.clientX - o), M = Math.abs(y.clientY - s);
|
|
2283
|
+
!l && (h > d || M > d) && (l = !0), l && !c && (c = !0, Ht(e, r, g, i), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", f));
|
|
2284
2284
|
}, f = () => {
|
|
2285
2285
|
document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", f);
|
|
2286
2286
|
};
|
|
@@ -2290,50 +2290,50 @@ function xn(e) {
|
|
|
2290
2290
|
}
|
|
2291
2291
|
function Ht(e, a, t, n) {
|
|
2292
2292
|
a.preventDefault(), a.stopPropagation(), e.isDragging = !0, e.draggingType = t;
|
|
2293
|
-
const
|
|
2293
|
+
const r = n, i = r.dataset.date;
|
|
2294
2294
|
let o = null;
|
|
2295
|
-
if (
|
|
2296
|
-
const [
|
|
2297
|
-
o = new Date(
|
|
2295
|
+
if (i) {
|
|
2296
|
+
const [s, d, l] = i.split("-").map(Number);
|
|
2297
|
+
o = new Date(s, d - 1, l);
|
|
2298
2298
|
}
|
|
2299
2299
|
!e.selectedStartDate && !e.selectedEndDate ? o && (e.originalStartDate = o, e.originalEndDate = null, e.draggingType = "end") : o && e.selectedStartDate && !e.selectedEndDate ? o.getTime() === e.selectedStartDate.getTime() ? (e.originalStartDate = new Date(e.selectedStartDate), e.originalEndDate = null) : (e.selectedStartDate = null, e.selectedEndDate = null, e.focusedDayIndex = null, e.calendar.querySelectorAll(".drp-date-picker__day--range-start, .drp-date-picker__day--range-end, .drp-date-picker__day--selected, .drp-date-picker__day--focused").forEach((d) => {
|
|
2300
2300
|
d.classList.remove("drp-date-picker__day--range-start", "drp-date-picker__day--range-end", "drp-date-picker__day--selected", "drp-date-picker__day--focused");
|
|
2301
|
-
}), e.originalStartDate = o, e.originalEndDate = null, e.draggingType = "end") : (e.selectedStartDate && (e.originalStartDate = new Date(e.selectedStartDate)), e.selectedEndDate && (e.originalEndDate = new Date(e.selectedEndDate))),
|
|
2301
|
+
}), e.originalStartDate = o, e.originalEndDate = null, e.draggingType = "end") : (e.selectedStartDate && (e.originalStartDate = new Date(e.selectedStartDate)), e.selectedEndDate && (e.originalEndDate = new Date(e.selectedEndDate))), r.classList.add("drp-date-picker__day--dragging"), U.debug(`Started dragging ${t} date`), e.onDragMoveBound = (s) => Vt(e, s), e.onDragEndBound = async (s) => await qt(e), document.addEventListener("mousemove", e.onDragMoveBound), document.addEventListener("mouseup", e.onDragEndBound), document.body.style.cursor = "grabbing";
|
|
2302
2302
|
}
|
|
2303
2303
|
function Vt(e, a) {
|
|
2304
2304
|
if (!e.isDragging) return;
|
|
2305
2305
|
let t = null;
|
|
2306
2306
|
e.containerElement instanceof ShadowRoot && "elementsFromPoint" in e.containerElement ? t = e.containerElement.elementsFromPoint(a.clientX, a.clientY)[0] || null : t = document.elementFromPoint(a.clientX, a.clientY);
|
|
2307
|
-
const n = t == null ? void 0 : t.closest(".drp-date-picker__nav--prev"),
|
|
2308
|
-
if (n ||
|
|
2307
|
+
const n = t == null ? void 0 : t.closest(".drp-date-picker__nav--prev"), r = t == null ? void 0 : t.closest(".drp-date-picker__nav--next");
|
|
2308
|
+
if (n || r) {
|
|
2309
2309
|
if (!e.navInterval) {
|
|
2310
|
-
const u = (n ||
|
|
2310
|
+
const u = (n || r).closest(".drp-date-picker__month");
|
|
2311
2311
|
if (u && u instanceof HTMLElement) {
|
|
2312
|
-
const
|
|
2313
|
-
m ? e.prevMonth(
|
|
2314
|
-
m ? e.prevMonth(
|
|
2312
|
+
const g = parseInt(u.dataset.monthIndex || "0"), m = !!n;
|
|
2313
|
+
m ? e.prevMonth(g) : e.nextMonth(g), e.navInterval = window.setInterval(() => {
|
|
2314
|
+
m ? e.prevMonth(g) : e.nextMonth(g);
|
|
2315
2315
|
}, 1e3);
|
|
2316
2316
|
}
|
|
2317
2317
|
}
|
|
2318
2318
|
return;
|
|
2319
2319
|
} else
|
|
2320
2320
|
e.navInterval && (clearInterval(e.navInterval), e.navInterval = null);
|
|
2321
|
-
const
|
|
2322
|
-
if (!
|
|
2323
|
-
const o =
|
|
2321
|
+
const i = t;
|
|
2322
|
+
if (!i || !i.classList.contains("drp-date-picker__day")) return;
|
|
2323
|
+
const o = i.dataset.date;
|
|
2324
2324
|
if (!o) return;
|
|
2325
|
-
const [
|
|
2326
|
-
let c = new Date(
|
|
2327
|
-
if (
|
|
2328
|
-
const
|
|
2329
|
-
c = $e(e, c,
|
|
2325
|
+
const [s, d, l] = o.split("-").map(Number);
|
|
2326
|
+
let c = new Date(s, d - 1, l);
|
|
2327
|
+
if (i.classList.contains("drp-date-picker__day--disabled")) {
|
|
2328
|
+
const p = e.draggingType === "start" ? e.originalEndDate && c > e.originalEndDate ? "backward" : "forward" : e.originalStartDate && c < e.originalStartDate ? "forward" : "backward";
|
|
2329
|
+
c = $e(e, c, p);
|
|
2330
2330
|
}
|
|
2331
2331
|
if (e.draggingType === "start" && e.originalEndDate ? (e.dragPreviewStart = c, e.dragPreviewEnd = e.originalEndDate, e.dragPreviewStart > e.dragPreviewEnd && ([e.dragPreviewStart, e.dragPreviewEnd] = [e.dragPreviewEnd, e.dragPreviewStart], e.draggingType = "end")) : e.originalStartDate && (e.dragPreviewStart = e.originalStartDate, e.dragPreviewEnd = c, e.dragPreviewEnd < e.dragPreviewStart && ([e.dragPreviewStart, e.dragPreviewEnd] = [e.dragPreviewEnd, e.dragPreviewStart], e.draggingType = "start")), e.dragPreviewStart && e.dragPreviewEnd) {
|
|
2332
|
-
const
|
|
2333
|
-
if (U.debug("onDragMove - mode:",
|
|
2332
|
+
const p = e.options.disabledDatesHandling;
|
|
2333
|
+
if (U.debug("onDragMove - mode:", p, "start:", e.dragPreviewStart, "end:", e.dragPreviewEnd), p === "prevent" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd)) {
|
|
2334
2334
|
U.debug("PREVENT mode - range contains disabled dates, blocking preview update");
|
|
2335
2335
|
return;
|
|
2336
|
-
} else if (
|
|
2336
|
+
} else if (p === "block" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd)) {
|
|
2337
2337
|
if (U.debug("BLOCK mode - range contains disabled dates, adjusting preview"), e.draggingType === "start" && e.originalEndDate) {
|
|
2338
2338
|
const u = e.findLastEnabledBeforeGap(e.dragPreviewStart, e.originalEndDate);
|
|
2339
2339
|
U.debug("BLOCK mode - adjusted end (dragging start):", u), e.dragPreviewEnd = u;
|
|
@@ -2350,13 +2350,13 @@ async function qt(e, a) {
|
|
|
2350
2350
|
if (U.debug("Ended dragging, finalizing selection"), e.dragPreviewStart && e.dragPreviewEnd) {
|
|
2351
2351
|
let t = $e(e, e.dragPreviewStart, "forward"), n = $e(e, e.dragPreviewEnd, "backward");
|
|
2352
2352
|
t > n && ([t, n] = [n, t]), U.debug("onDragEnd - calling validateRangeAsync with:", t, n);
|
|
2353
|
-
const
|
|
2354
|
-
if (U.debug("onDragEnd - validation result:",
|
|
2355
|
-
|
|
2353
|
+
const r = await Bt(e, t, n);
|
|
2354
|
+
if (U.debug("onDragEnd - validation result:", r), !r.isValid)
|
|
2355
|
+
r.message && Y.warn("onDragEnd() - drag validation failed:", r.message);
|
|
2356
2356
|
else {
|
|
2357
|
-
e.selectedStartDate =
|
|
2358
|
-
const
|
|
2359
|
-
e.requiresApplyButton() ? e.pendingSelection =
|
|
2357
|
+
e.selectedStartDate = r.adjustedStart || t, e.selectedEndDate = r.adjustedEnd || n, e.input && (e.requiresApplyButton() || (e.input.value = `${e.formatDate(e.selectedStartDate)} - ${e.formatDate(e.selectedEndDate)}`));
|
|
2358
|
+
const i = { start: e.selectedStartDate, end: e.selectedEndDate };
|
|
2359
|
+
e.requiresApplyButton() ? e.pendingSelection = i : e.options.onSelect && e.options.onSelect(i);
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
2362
|
if (e.isDragging = !1, e.draggingType = null, e.dragPreviewStart = null, e.dragPreviewEnd = null, e.calendar.querySelectorAll(".drp-date-picker__day--dragging").forEach((t) => {
|
|
@@ -2364,18 +2364,18 @@ async function qt(e, a) {
|
|
|
2364
2364
|
}), e.onDragMoveBound && document.removeEventListener("mousemove", e.onDragMoveBound), e.onDragEndBound && document.removeEventListener("mouseup", e.onDragEndBound), e.navInterval && (clearInterval(e.navInterval), e.navInterval = null), document.body.style.cursor = "", e.renderCalendar(), e.updateSummary(), e.selectedEndDate) {
|
|
2365
2365
|
const t = e.selectedEndDate;
|
|
2366
2366
|
for (let n = 0; n < e.monthDates.length; n++) {
|
|
2367
|
-
const
|
|
2368
|
-
if (t.getFullYear() ===
|
|
2367
|
+
const r = e.monthDates[n];
|
|
2368
|
+
if (t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth()) {
|
|
2369
2369
|
e.activeMonthIndex = n;
|
|
2370
|
-
const
|
|
2371
|
-
if (
|
|
2372
|
-
const o =
|
|
2370
|
+
const i = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${n}"]`);
|
|
2371
|
+
if (i) {
|
|
2372
|
+
const o = i.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), s = Array.from(o).findIndex((d) => {
|
|
2373
2373
|
const l = d.dataset.date;
|
|
2374
2374
|
if (!l) return !1;
|
|
2375
|
-
const [c,
|
|
2376
|
-
return e.isSameDay(
|
|
2375
|
+
const [c, p, u] = l.split("-").map(Number), g = new Date(c, p - 1, u);
|
|
2376
|
+
return e.isSameDay(g, t);
|
|
2377
2377
|
});
|
|
2378
|
-
|
|
2378
|
+
s !== -1 && (e.focusedDayIndex = s, o.forEach((d) => d.classList.remove("drp-date-picker__day--focused")), o[s] && o[s].classList.add("drp-date-picker__day--focused"));
|
|
2379
2379
|
}
|
|
2380
2380
|
break;
|
|
2381
2381
|
}
|
|
@@ -2385,93 +2385,93 @@ async function qt(e, a) {
|
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
2387
|
function $e(e, a, t = "forward") {
|
|
2388
|
-
let
|
|
2389
|
-
if (
|
|
2390
|
-
return
|
|
2391
|
-
const
|
|
2392
|
-
for (let
|
|
2388
|
+
let r = new Date(a);
|
|
2389
|
+
if (r.setHours(0, 0, 0, 0), !e.isDateDisabledInternal(r))
|
|
2390
|
+
return r;
|
|
2391
|
+
const i = t === "forward" ? 1 : -1;
|
|
2392
|
+
for (let s = 1; s <= 60; s++) {
|
|
2393
2393
|
const d = new Date(a);
|
|
2394
|
-
if (d.setDate(d.getDate() +
|
|
2394
|
+
if (d.setDate(d.getDate() + s * i), d.setHours(0, 0, 0, 0), !e.isDateDisabledInternal(d))
|
|
2395
2395
|
return d;
|
|
2396
2396
|
}
|
|
2397
|
-
const o = -
|
|
2398
|
-
for (let
|
|
2397
|
+
const o = -i;
|
|
2398
|
+
for (let s = 1; s <= 60; s++) {
|
|
2399
2399
|
const d = new Date(a);
|
|
2400
|
-
if (d.setDate(d.getDate() +
|
|
2400
|
+
if (d.setDate(d.getDate() + s * o), d.setHours(0, 0, 0, 0), !e.isDateDisabledInternal(d))
|
|
2401
2401
|
return d;
|
|
2402
2402
|
}
|
|
2403
2403
|
return a;
|
|
2404
2404
|
}
|
|
2405
2405
|
function Mn(e, a) {
|
|
2406
|
-
const t = a.target, n = t.value,
|
|
2406
|
+
const t = a.target, n = t.value, r = t.selectionStart || 0, i = e._previousInputValue || "", o = n.length < i.length, { separator: s } = e.formatInfo;
|
|
2407
2407
|
if (e.options.selectionMode === "range") {
|
|
2408
|
-
const d = n.replace(new RegExp(`[^0-9${
|
|
2408
|
+
const d = n.replace(new RegExp(`[^0-9${s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}to ]`, "gi"), ""), l = Ut(e, d);
|
|
2409
2409
|
if (l !== n) {
|
|
2410
2410
|
t.value = l;
|
|
2411
|
-
let c =
|
|
2411
|
+
let c = r;
|
|
2412
2412
|
if (o)
|
|
2413
|
-
c =
|
|
2413
|
+
c = r;
|
|
2414
2414
|
else if (l.length > n.length)
|
|
2415
2415
|
if (l.includes(" to ") && !n.includes(" to ")) {
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2416
|
+
const p = l.indexOf(" to ");
|
|
2417
|
+
r >= p && r <= p + 4 ? c = p + 4 : c = r + (l.length - n.length);
|
|
2418
2418
|
} else
|
|
2419
|
-
c =
|
|
2419
|
+
c = r + (l.length - n.length);
|
|
2420
2420
|
t.setSelectionRange(c, c);
|
|
2421
2421
|
}
|
|
2422
2422
|
} else {
|
|
2423
|
-
const d = n.replace(new RegExp(`[^0-9${
|
|
2423
|
+
const d = n.replace(new RegExp(`[^0-9${s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}]`, "g"), ""), l = pe(e, d);
|
|
2424
2424
|
if (l !== n) {
|
|
2425
2425
|
t.value = l;
|
|
2426
|
-
let c =
|
|
2426
|
+
let c = r;
|
|
2427
2427
|
if (o)
|
|
2428
|
-
c =
|
|
2429
|
-
else if (l.length > n.length && l[
|
|
2430
|
-
c =
|
|
2428
|
+
c = r;
|
|
2429
|
+
else if (l.length > n.length && l[r] === s)
|
|
2430
|
+
c = r + 1;
|
|
2431
2431
|
else if (l.length > n.length) {
|
|
2432
|
-
const
|
|
2433
|
-
c =
|
|
2432
|
+
const p = (n.substring(0, r).match(new RegExp(s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g")) || []).length, g = (l.substring(0, r).match(new RegExp(s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g")) || []).length - p;
|
|
2433
|
+
c = r + g;
|
|
2434
2434
|
}
|
|
2435
2435
|
t.setSelectionRange(c, c);
|
|
2436
2436
|
}
|
|
2437
2437
|
}
|
|
2438
2438
|
e._previousInputValue = t.value, tt(e);
|
|
2439
2439
|
}
|
|
2440
|
-
function
|
|
2441
|
-
var c,
|
|
2442
|
-
const { separator: t, parts: n, maxLength:
|
|
2440
|
+
function pe(e, a) {
|
|
2441
|
+
var c, p, u;
|
|
2442
|
+
const { separator: t, parts: n, maxLength: r } = e.formatInfo, i = a.replace(new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), ""), o = n.year ? n.year.length : 4, s = [
|
|
2443
2443
|
{ type: "year", pos: ((c = n.year) == null ? void 0 : c.index) ?? 0, length: o },
|
|
2444
|
-
{ type: "month", pos: ((
|
|
2444
|
+
{ type: "month", pos: ((p = n.month) == null ? void 0 : p.index) ?? 1, length: 2 },
|
|
2445
2445
|
{ type: "day", pos: ((u = n.day) == null ? void 0 : u.index) ?? 2, length: 2 }
|
|
2446
|
-
].sort((
|
|
2446
|
+
].sort((g, m) => g.pos - m.pos);
|
|
2447
2447
|
let d = "", l = 0;
|
|
2448
|
-
for (let
|
|
2449
|
-
const m =
|
|
2448
|
+
for (let g = 0; g < s.length; g++) {
|
|
2449
|
+
const m = s[g], f = i.substring(l, l + m.length);
|
|
2450
2450
|
if (!f) break;
|
|
2451
|
-
d += f, l += f.length,
|
|
2451
|
+
d += f, l += f.length, g < s.length - 1 && f.length === m.length && (d += t);
|
|
2452
2452
|
}
|
|
2453
|
-
return d.substring(0,
|
|
2453
|
+
return d.substring(0, r);
|
|
2454
2454
|
}
|
|
2455
2455
|
function Ut(e, a) {
|
|
2456
|
-
const { separator: t, maxLength: n } = e.formatInfo,
|
|
2457
|
-
let
|
|
2458
|
-
if (a.includes(
|
|
2459
|
-
const d = a.split(
|
|
2460
|
-
|
|
2456
|
+
const { separator: t, maxLength: n } = e.formatInfo, r = " to ";
|
|
2457
|
+
let i = "", o = "";
|
|
2458
|
+
if (a.includes(r)) {
|
|
2459
|
+
const d = a.split(r);
|
|
2460
|
+
i = d[0], o = d.slice(1).join(r);
|
|
2461
2461
|
} else
|
|
2462
|
-
|
|
2463
|
-
const
|
|
2464
|
-
if (
|
|
2465
|
-
if (a.includes(
|
|
2466
|
-
const d =
|
|
2467
|
-
return
|
|
2462
|
+
i = a;
|
|
2463
|
+
const s = pe(e, i);
|
|
2464
|
+
if (s.length === n)
|
|
2465
|
+
if (a.includes(r)) {
|
|
2466
|
+
const d = pe(e, o);
|
|
2467
|
+
return s + r + d;
|
|
2468
2468
|
} else
|
|
2469
|
-
return
|
|
2469
|
+
return s + r;
|
|
2470
2470
|
else
|
|
2471
|
-
return
|
|
2471
|
+
return s;
|
|
2472
2472
|
}
|
|
2473
2473
|
function Sn(e, a) {
|
|
2474
|
-
const { key: t, ctrlKey: n, metaKey:
|
|
2474
|
+
const { key: t, ctrlKey: n, metaKey: r } = a, { separator: i } = e.formatInfo;
|
|
2475
2475
|
if (e.calendar.classList.contains("drp-date-picker--visible") && ["ArrowUp", "ArrowDown", "Home", "End", "PageUp", "PageDown"].includes(t)) {
|
|
2476
2476
|
a.preventDefault();
|
|
2477
2477
|
return;
|
|
@@ -2488,78 +2488,78 @@ function Sn(e, a) {
|
|
|
2488
2488
|
"ArrowDown",
|
|
2489
2489
|
"Home",
|
|
2490
2490
|
"End"
|
|
2491
|
-
].includes(t) || n ||
|
|
2492
|
-
if (t ===
|
|
2493
|
-
const
|
|
2491
|
+
].includes(t) || n || r)) {
|
|
2492
|
+
if (t === i) {
|
|
2493
|
+
const s = a.target, d = s.selectionStart || 0, l = s.value;
|
|
2494
2494
|
let c = 0;
|
|
2495
2495
|
for (let u = d - 1; u >= 0; u--)
|
|
2496
|
-
if (l[u] ===
|
|
2496
|
+
if (l[u] === i || l[u] === " ") {
|
|
2497
2497
|
c = u + 1;
|
|
2498
2498
|
break;
|
|
2499
2499
|
}
|
|
2500
|
-
const
|
|
2501
|
-
if (/^\d$/.test(
|
|
2500
|
+
const p = l.substring(c, d);
|
|
2501
|
+
if (/^\d$/.test(p)) {
|
|
2502
2502
|
a.preventDefault();
|
|
2503
|
-
const u = l.substring(0, c) + "0" +
|
|
2504
|
-
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2503
|
+
const u = l.substring(0, c) + "0" + p + i + l.substring(d);
|
|
2504
|
+
s.value = u;
|
|
2505
|
+
const g = c + 2 + i.length;
|
|
2506
|
+
s.setSelectionRange(g, g), e._previousInputValue = u, s.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
2507
2507
|
return;
|
|
2508
2508
|
}
|
|
2509
2509
|
}
|
|
2510
|
-
e.options.selectionMode === "range" ? !/^\d$/.test(t) && t !==
|
|
2510
|
+
e.options.selectionMode === "range" ? !/^\d$/.test(t) && t !== i && t !== " " && t.toLowerCase() !== "t" && t.toLowerCase() !== "o" && a.preventDefault() : !/^\d$/.test(t) && t !== i && a.preventDefault();
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
2513
|
function Cn(e, a) {
|
|
2514
2514
|
var u;
|
|
2515
2515
|
a.preventDefault();
|
|
2516
|
-
const t = ((u = a.clipboardData) == null ? void 0 : u.getData("text")) || "", { separator: n } = e.formatInfo,
|
|
2517
|
-
o.value =
|
|
2518
|
-
const
|
|
2519
|
-
o.setSelectionRange(
|
|
2516
|
+
const t = ((u = a.clipboardData) == null ? void 0 : u.getData("text")) || "", { separator: n } = e.formatInfo, r = t.replace(new RegExp(`[^0-9${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}]`, "g"), ""), i = pe(e, r), o = a.target, s = o.selectionStart || 0, d = o.selectionEnd || 0, l = o.value, c = l.substring(0, s) + i + l.substring(d);
|
|
2517
|
+
o.value = pe(e, c);
|
|
2518
|
+
const p = s + i.length;
|
|
2519
|
+
o.setSelectionRange(p, p), o.dispatchEvent(new Event("input", { bubbles: !0 })), tt(e);
|
|
2520
2520
|
}
|
|
2521
2521
|
function tt(e) {
|
|
2522
2522
|
if (!e.input) return;
|
|
2523
2523
|
const a = e.input.value;
|
|
2524
2524
|
if (oe.debug("updateCalendarFromInput - value:", a), !a) return;
|
|
2525
|
-
const { separator: t, parts: n, maxLength:
|
|
2526
|
-
if (oe.debug("Format info:", { separator: t, parts: n, maxLength:
|
|
2527
|
-
const o = a.split(" to "),
|
|
2528
|
-
oe.debug("Range parts - start:",
|
|
2525
|
+
const { separator: t, parts: n, maxLength: r } = e.formatInfo;
|
|
2526
|
+
if (oe.debug("Format info:", { separator: t, parts: n, maxLength: r }), e.options.selectionMode === "range" && a.includes(" to ")) {
|
|
2527
|
+
const o = a.split(" to "), s = o[0], d = o[1];
|
|
2528
|
+
oe.debug("Range parts - start:", s, "end:", d), Ce(e, s, "start"), d && Ce(e, d, "end");
|
|
2529
2529
|
return;
|
|
2530
2530
|
}
|
|
2531
|
-
const
|
|
2532
|
-
Ce(e, a,
|
|
2531
|
+
const i = e.options.selectionMode === "range" ? "start" : "single";
|
|
2532
|
+
Ce(e, a, i);
|
|
2533
2533
|
}
|
|
2534
2534
|
function Ce(e, a, t = "single") {
|
|
2535
|
-
const { separator: n, parts:
|
|
2536
|
-
let
|
|
2537
|
-
if (o.forEach((c,
|
|
2535
|
+
const { separator: n, parts: r, maxLength: i } = e.formatInfo, o = a.split(n);
|
|
2536
|
+
let s = null, d = null, l = null;
|
|
2537
|
+
if (o.forEach((c, p) => {
|
|
2538
2538
|
if (c) {
|
|
2539
|
-
if (
|
|
2539
|
+
if (r.year && r.year.index === p) {
|
|
2540
2540
|
const u = parseInt(c, 10);
|
|
2541
|
-
|
|
2542
|
-
} else if (
|
|
2541
|
+
r.year.length === 4 && c.length === 4 ? s = u : r.year.length === 2 && c.length === 2 && (s = u < 100 ? u + 2e3 : u);
|
|
2542
|
+
} else if (r.month && r.month.index === p) {
|
|
2543
2543
|
const u = parseInt(c, 10);
|
|
2544
2544
|
c.length === 2 && u >= 1 && u <= 12 && (d = u);
|
|
2545
|
-
} else if (
|
|
2545
|
+
} else if (r.day && r.day.index === p) {
|
|
2546
2546
|
const u = parseInt(c, 10);
|
|
2547
2547
|
c.length === 2 && u >= 1 && u <= 31 && (l = u);
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
|
-
}), oe.debug(`parseAndUpdateSingleDate(${t}) - year:`,
|
|
2551
|
-
const c =
|
|
2550
|
+
}), oe.debug(`parseAndUpdateSingleDate(${t}) - year:`, s, "month:", d, "day:", l), s !== null || d !== null) {
|
|
2551
|
+
const c = s || (/* @__PURE__ */ new Date()).getFullYear(), p = d !== null ? d - 1 : (/* @__PURE__ */ new Date()).getMonth();
|
|
2552
2552
|
if (e.options.selectionMode === "single") {
|
|
2553
2553
|
e.monthDates = [];
|
|
2554
2554
|
for (let u = 0; u < e.options.visibleMonthsCount; u++) {
|
|
2555
|
-
const
|
|
2556
|
-
e.monthDates.push(
|
|
2555
|
+
const g = new Date(c, p + u, 1);
|
|
2556
|
+
e.monthDates.push(g);
|
|
2557
2557
|
}
|
|
2558
2558
|
} else if (e.options.selectionMode === "range" && (t === "start" || !e.selectedStartDate)) {
|
|
2559
2559
|
if (e.displayMonths = [
|
|
2560
|
-
{ month:
|
|
2560
|
+
{ month: p, year: c }
|
|
2561
2561
|
], e.options.visibleMonthsCount > 1) {
|
|
2562
|
-
const u = new Date(c,
|
|
2562
|
+
const u = new Date(c, p + 1, 1);
|
|
2563
2563
|
e.displayMonths.push({
|
|
2564
2564
|
month: u.getMonth(),
|
|
2565
2565
|
year: u.getFullYear()
|
|
@@ -2567,14 +2567,14 @@ function Ce(e, a, t = "single") {
|
|
|
2567
2567
|
}
|
|
2568
2568
|
e.monthDates = [];
|
|
2569
2569
|
for (let u = 0; u < e.options.visibleMonthsCount; u++) {
|
|
2570
|
-
const
|
|
2570
|
+
const g = e.displayMonths[u], m = new Date(g.year, g.month, 1);
|
|
2571
2571
|
e.monthDates.push(m);
|
|
2572
2572
|
}
|
|
2573
2573
|
}
|
|
2574
2574
|
e.renderCalendar();
|
|
2575
2575
|
}
|
|
2576
|
-
if (
|
|
2577
|
-
const c = new Date(
|
|
2576
|
+
if (s !== null && d !== null && l !== null) {
|
|
2577
|
+
const c = new Date(s, d - 1, l);
|
|
2578
2578
|
c.getMonth() === d - 1 && (t === "single" ? e.selectedDate = c : t === "start" ? e.selectedStartDate = c : t === "end" && (e.selectedEndDate = c), e.renderCalendar(), e.options.selectionMode === "range" && e.updateSummary(), oe.debug(`Set ${t} date:`, c));
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
@@ -2620,7 +2620,7 @@ const Ue = {
|
|
|
2620
2620
|
nights: "noches"
|
|
2621
2621
|
}
|
|
2622
2622
|
};
|
|
2623
|
-
function
|
|
2623
|
+
function Oe(e) {
|
|
2624
2624
|
if (e !== "auto")
|
|
2625
2625
|
return e;
|
|
2626
2626
|
if (typeof navigator < "u" && navigator.language) {
|
|
@@ -2630,16 +2630,16 @@ function ze(e) {
|
|
|
2630
2630
|
return "en";
|
|
2631
2631
|
}
|
|
2632
2632
|
function In(e, a) {
|
|
2633
|
-
const t =
|
|
2633
|
+
const t = Oe(e), n = Ue[t] || Ue.en;
|
|
2634
2634
|
return a ? { ...n, ...a } : n;
|
|
2635
2635
|
}
|
|
2636
2636
|
function En(e) {
|
|
2637
|
-
const a =
|
|
2637
|
+
const a = Oe(e);
|
|
2638
2638
|
try {
|
|
2639
2639
|
const t = new Intl.DateTimeFormat(a, { weekday: "short" }), n = [];
|
|
2640
|
-
for (let
|
|
2641
|
-
const
|
|
2642
|
-
n.push(t.format(
|
|
2640
|
+
for (let r = 0; r < 7; r++) {
|
|
2641
|
+
const i = new Date(2017, 0, r + 1);
|
|
2642
|
+
n.push(t.format(i));
|
|
2643
2643
|
}
|
|
2644
2644
|
return n;
|
|
2645
2645
|
} catch (t) {
|
|
@@ -2647,12 +2647,12 @@ function En(e) {
|
|
|
2647
2647
|
}
|
|
2648
2648
|
}
|
|
2649
2649
|
function Rn(e) {
|
|
2650
|
-
const a =
|
|
2650
|
+
const a = Oe(e);
|
|
2651
2651
|
try {
|
|
2652
2652
|
const t = new Intl.DateTimeFormat(a, { month: "long" }), n = [];
|
|
2653
|
-
for (let
|
|
2654
|
-
const
|
|
2655
|
-
n.push(t.format(
|
|
2653
|
+
for (let r = 0; r < 12; r++) {
|
|
2654
|
+
const i = new Date(2017, r, 1);
|
|
2655
|
+
n.push(t.format(i));
|
|
2656
2656
|
}
|
|
2657
2657
|
return n;
|
|
2658
2658
|
} catch (t) {
|
|
@@ -2672,90 +2672,90 @@ function Rn(e) {
|
|
|
2672
2672
|
];
|
|
2673
2673
|
}
|
|
2674
2674
|
}
|
|
2675
|
-
const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale: 1;--drp-cell-scale: 1;--drp-spacing-xs-base: .25rem;--drp-spacing-sm-base: .5rem;--drp-spacing-md-base: 1rem;--drp-spacing-lg-base: 1.5rem;--drp-spacing-xl-base: 2rem;--drp-spacing-xs: calc(var(--drp-spacing-xs-base) * var(--drp-spacing-scale));--drp-spacing-sm: calc(var(--drp-spacing-sm-base) * var(--drp-spacing-scale));--drp-spacing-md: calc(var(--drp-spacing-md-base) * var(--drp-spacing-scale));--drp-spacing-lg: calc(var(--drp-spacing-lg-base) * var(--drp-spacing-scale));--drp-spacing-xl: calc(var(--drp-spacing-xl-base) * var(--drp-spacing-scale));--drp-font-size-2xs-base: .625rem;--drp-font-size-xs-base: .75rem;--drp-font-size-sm-base: .875rem;--drp-font-size-base-base: 1rem;--drp-font-size-lg-base: 1.125rem;--drp-font-size-xl-base: 1.25rem;--drp-font-size-2xl-base: 1.5rem;--drp-font-weight-medium: 500;--drp-font-weight-semibold: 600;--drp-card-bg: #ffffff;--drp-border-color: #e5e7eb;--drp-primary-bg: #f3f4f6;--drp-primary-bg-hover: #e5e7eb;--drp-accent-color: #3b82f6;--drp-accent-color-hover: #2563eb;--drp-text-primary: #111827;--drp-text-secondary: #6b7280;--drp-accent-text-color: #ffffff;--drp-button-text-color: #ffffff;--drp-tooltip-bg: #111827;--drp-tooltip-color: #ffffff;--drp-border-width-base: 1px;--drp-border-radius: .375rem;--drp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);--drp-transition-fast: .15s;--drp-easing-snappy: cubic-bezier(.4, 0, .2, 1);--drp-input-padding-h: .75rem;--drp-grid-columns: 3;--drp-grid-rows: 2}.drp-date-picker-input{position:relative;cursor:pointer}.drp-date-picker-input:after{content:"📅";position:absolute;right:var(--drp-input-padding-h);top:50%;transform:translateY(-50%);pointer-events:none;opacity:.6}.drp-date-picker{position:absolute;z-index:9500;background:var(--drp-card-bg);border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);box-shadow:var(--drp-shadow-xl);padding:var(--drp-spacing-md);min-width:280px;max-width:calc(100vw - 2rem);box-sizing:border-box;-webkit-user-select:none;user-select:none;--drp-font-size-2xs: calc(var(--drp-font-size-2xs-base) * var(--drp-font-scale));--drp-font-size-xs: calc(var(--drp-font-size-xs-base) * var(--drp-font-scale));--drp-font-size-sm: calc(var(--drp-font-size-sm-base) * var(--drp-font-scale));--drp-font-size-base: calc(var(--drp-font-size-base-base) * var(--drp-font-scale));--drp-font-size-lg: calc(var(--drp-font-size-lg-base) * var(--drp-font-scale));--drp-font-size-xl: calc(var(--drp-font-size-xl-base) * var(--drp-font-scale));--drp-font-size-2xl: calc(var(--drp-font-size-2xl-base) * var(--drp-font-scale))}.drp-date-picker:not(.drp-date-picker--visible){display:none}.drp-date-picker--inline{position:relative!important;display:block!important;z-index:auto;min-width:0;max-width:100%;width:fit-content;box-sizing:border-box}.drp-date-picker__months{display:flex;gap:var(--drp-spacing-lg)}.drp-date-picker--inline .drp-date-picker__months{flex-wrap:wrap}.drp-date-picker__months--grid{display:grid;grid-template-columns:repeat(var(--drp-grid-columns, 3),minmax(0,1fr));grid-template-rows:repeat(var(--drp-grid-rows, 2),auto);gap:var(--drp-spacing-lg);width:100%}@media (max-width: 1200px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),3),minmax(0,1fr))}}@media (max-width: 768px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),2),minmax(0,1fr))}}@media (max-width: 480px){.drp-date-picker__months--grid{grid-template-columns:minmax(0,1fr)}}.drp-date-picker__month{flex:1;min-width:calc(280px * var(--drp-cell-scale));display:flex;flex-direction:column}.drp-date-picker--inline .drp-date-picker__month{min-width:calc(250px * var(--drp-cell-scale))}.drp-date-picker__months--grid .drp-date-picker__month{min-width:0;width:100%}.drp-date-picker__calendar-container{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.drp-date-picker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-md);gap:var(--drp-spacing-sm)}.drp-date-picker__header--static{justify-content:center}.drp-date-picker__header--static .drp-date-picker__month-year{cursor:default}.drp-date-picker__header--static .drp-date-picker__month-year:hover{background-color:transparent}.drp-date-picker__month-year{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-base);color:var(--drp-text-primary);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__month-year:hover{background-color:var(--drp-primary-bg)}.drp-date-picker__month-year:active{background-color:var(--drp-primary-bg-hover)}.drp-date-picker__nav{width:calc(2rem * var(--drp-cell-scale));height:calc(2rem * var(--drp-cell-scale));display:flex;align-items:center;justify-content:center;border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-lg);color:var(--drp-text-primary)}.drp-date-picker__nav:hover{background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__nav:active{background-color:var(--drp-primary-bg-hover)}.drp-date-picker__nav--disabled,.drp-date-picker__nav[disabled]{opacity:.6;cursor:not-allowed;pointer-events:none}.drp-date-picker__nav--disabled:hover,.drp-date-picker__nav[disabled]:hover{background-color:transparent;border-color:var(--drp-border-color)}.drp-date-picker__nav--prev:before{content:"‹"}.drp-date-picker__nav--next:before{content:"›"}.drp-date-picker__rolling-selector{position:absolute;top:0;right:0;bottom:0;left:0;display:none;z-index:10}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible{display:flex}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__weekdays,.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__days{visibility:hidden}.drp-date-picker__rolling-selector{gap:var(--drp-spacing-xs)}.drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-primary-bg)}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-border-color);border-radius:3px}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-accent-color)}.drp-date-picker__rolling-item{padding:.25rem 1rem;cursor:pointer;font-size:.875rem;min-height:calc(2rem * var(--drp-cell-scale));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__rolling-item:hover{background-color:#f3f4f6}.drp-date-picker__rolling-item--selected{background-color:#3b82f6;color:#fff;font-weight:600}.drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker__unified-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-lg);gap:var(--drp-spacing-sm);padding:0 var(--drp-spacing-sm)}.drp-date-picker__unified-range{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-lg);color:var(--drp-text-primary);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__unified-range:hover{background-color:var(--drp-primary-bg)}.drp-date-picker__unified-range:active{background-color:var(--drp-primary-bg-hover)}.drp-date-picker__unified-range--static{cursor:default!important}.drp-date-picker__unified-range--static:hover,.drp-date-picker__unified-range--static:active{background-color:transparent}.drp-date-picker__unified-rolling-selector{position:absolute;top:calc(var(--drp-spacing-lg) + var(--drp-spacing-lg) * 2);left:50%;transform:translate(-50%);width:min(90%,450px);height:350px;max-height:350px;display:none;z-index:100;background:var(--drp-card-bg);gap:var(--drp-spacing-xs)}.drp-date-picker__unified-rolling-selector--visible{display:flex}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-primary-bg)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-border-color);border-radius:3px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-accent-color)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item{padding:.25rem 1rem;cursor:pointer;font-size:.875rem;min-height:calc(2rem * var(--drp-cell-scale));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item:hover{background-color:#f3f4f6}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected{background-color:#3b82f6;color:#fff;font-weight:600}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--disabled{color:var(--drp-text-secondary);opacity:.4;cursor:not-allowed}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__nav{display:none}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year{cursor:default;font-size:var(--drp-font-size-base);font-weight:var(--drp-font-weight-normal);color:var(--drp-text-secondary)}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year:hover{background-color:transparent}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__rolling-selector{display:none!important}.drp-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-sm)}.drp-date-picker__weekday{text-align:center;font-size:var(--drp-font-size-xs);font-weight:var(--drp-font-weight-semibold);color:var(--drp-text-secondary);padding:var(--drp-spacing-xs);text-transform:uppercase}.drp-date-picker__days{display:flex;flex-direction:column;gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-md)}.drp-date-picker__date-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs)}.drp-date-picker__day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-sm);color:var(--drp-text-primary);border-radius:var(--drp-border-radius);cursor:pointer;border:calc(2px * var(--drp-cell-scale)) solid transparent;position:relative}.drp-date-picker__day:hover:not(.drp-date-picker__day--disabled):not(.drp-date-picker__day--other-month){background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__day--today{border-color:var(--drp-accent-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__day--focused{outline:calc(2px * var(--drp-cell-scale)) solid var(--drp-accent-color);outline-offset:calc(2px * var(--drp-cell-scale))}.drp-date-picker__day--disabled{color:var(--drp-text-secondary);opacity:.6;cursor:not-allowed;position:relative}.drp-date-picker__day--disabled:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(45deg,rgba(0,0,0,.1) 0px,rgba(0,0,0,.1) 1px,transparent 1px,transparent 6px);border-radius:var(--drp-border-radius);pointer-events:none}.drp-date-picker__day--disabled:hover{background-color:transparent;border-color:transparent}.drp-date-picker__day--other-month{color:var(--drp-text-secondary);opacity:.5}.drp-date-picker__day--other-month.drp-date-picker__day--range-start,.drp-date-picker__day--other-month.drp-date-picker__day--range-end,.drp-date-picker__day--other-month.drp-date-picker__day--in-range,.drp-date-picker__day--other-month.drp-date-picker__day--drag-preview{opacity:1}.drp-date-picker__day--range-start,.drp-date-picker__day--range-end{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold);cursor:grab;-webkit-user-select:none;user-select:none}.drp-date-picker__day--range-start:active,.drp-date-picker__day--range-end:active{cursor:grabbing}.drp-date-picker__day--in-range{background-color:color-mix(in srgb,var(--drp-accent-color) 15%,transparent)}.drp-date-picker__day--in-range:hover{background-color:color-mix(in srgb,var(--drp-accent-color) 25%,transparent)}.drp-date-picker__day--dragging{cursor:grabbing!important;opacity:.7;transform:scale(1.1);transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__day--drag-preview{background-color:color-mix(in srgb,var(--drp-accent-color) 30%,transparent);border:calc(2px * var(--drp-cell-scale)) dashed var(--drp-accent-color)}.drp-date-picker__day--drag-preview.drp-date-picker__day--range-start,.drp-date-picker__day--drag-preview.drp-date-picker__day--range-end{background-color:color-mix(in srgb,var(--drp-accent-color) 60%,transparent);color:var(--drp-accent-text-color)}.drp-date-picker__day--drag-invalid{background-color:color-mix(in srgb,#ef4444 20%,transparent)!important;border-color:#ef4444!important;border-style:dashed!important}.drp-date-picker__day.holiday{background-color:color-mix(in srgb,#ef4444 10%,transparent)}.drp-date-picker__day.holiday:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#ef4444 20%,transparent)}.drp-date-picker__day.event{background-color:color-mix(in srgb,#10b981 10%,transparent)}.drp-date-picker__day.event:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#10b981 20%,transparent)}.drp-date-picker__rolling-item--disabled{color:var(--drp-text-secondary);opacity:.4;cursor:not-allowed;pointer-events:none;text-decoration:line-through}.drp-date-picker__rolling-item--disabled:hover{background-color:transparent}.drp-date-picker__badge-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-xs);max-height:calc(1rem * var(--drp-cell-scale));min-height:calc(1rem * var(--drp-cell-scale))}.drp-date-picker__badge-cell{display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-2xs);padding:calc(1px * var(--drp-cell-scale)) calc(2px * var(--drp-cell-scale));border-radius:2px;cursor:pointer;height:100%;max-height:calc(1rem * var(--drp-cell-scale))}.drp-date-picker__badge-cell:empty{visibility:hidden}.drp-date-picker__badge-cell:hover:not(:empty){transform:scale(1.05)}.drp-date-picker__badge-cell.badge-number{background-color:#10b981;color:#fff;font-size:.7rem;font-weight:600}.drp-date-picker__badge-cell.badge-count{background-color:#ef4444;color:#fff;font-size:.7rem;font-weight:700}.drp-date-picker__badge-cell.badge-text{background-color:#6b7280;color:#fff;font-size:.65rem;font-weight:700;text-transform:uppercase}.drp-date-picker__summary{text-align:center;padding:var(--drp-spacing-md);border-top:var(--drp-border-width-base) solid var(--drp-border-color);font-size:var(--drp-font-size-sm);color:var(--drp-text-secondary)}.drp-date-picker__summary--visible{display:block}.drp-date-picker__summary--hidden{display:none}.drp-date-picker__summary-count{font-weight:var(--drp-font-weight-semibold);color:var(--drp-accent-color);font-size:var(--drp-font-size-base)}.drp-date-picker__actions{display:flex;gap:var(--drp-spacing-sm);justify-content:space-between;padding-top:var(--drp-spacing-sm);border-top:var(--drp-border-width-base) solid var(--drp-border-color)}.drp-date-picker__button{flex:1;padding:var(--drp-spacing-sm) var(--drp-spacing-md);border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-sm);font-weight:var(--drp-font-weight-medium)}.drp-date-picker__button:hover{background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__button:disabled,.drp-date-picker__button[disabled]{opacity:var(--drp-disabled-opacity, .6);cursor:not-allowed;pointer-events:none}.drp-date-picker__button:disabled:hover,.drp-date-picker__button[disabled]:hover{background-color:transparent;border-color:var(--drp-border-color)}.drp-date-picker__button--today{color:var(--drp-accent-color)}.drp-date-picker__button--clear{color:var(--drp-text-secondary)}.drp-date-picker__button--apply{background-color:var(--drp-accent-color);color:var(--drp-button-text-color);border-color:var(--drp-accent-color)}.drp-date-picker__button--apply:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__button--cancel{color:var(--drp-text-secondary)}.drp-date-picker__tooltip{position:absolute;z-index:9999;background-color:var(--drp-tooltip-bg);color:var(--drp-tooltip-color);padding:var(--drp-spacing-xs) var(--drp-spacing-sm);border-radius:var(--drp-border-radius);font-size:var(--drp-font-size-xs);line-height:1.4;max-width:200px;word-wrap:break-word;pointer-events:none;opacity:0;transition:opacity var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__tooltip--visible{opacity:1}.drp-date-picker__tooltip-arrow{position:absolute;background-color:var(--drp-tooltip-bg);width:8px;height:8px;transform:rotate(45deg)}.drp-date-picker__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fffc;display:flex;align-items:center;justify-content:center;z-index:9500;border-radius:.375rem}.drp-date-picker__loading-spinner{width:40px;height:40px;border:4px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:drp-spin .8s linear infinite}@keyframes drp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drp-date-picker.drp-font-xs{--drp-font-scale: .6}.drp-date-picker.drp-font-sm{--drp-font-scale: .8}.drp-date-picker.drp-font-md{--drp-font-scale: 1}.drp-date-picker.drp-font-lg{--drp-font-scale: 1.5}.drp-date-picker.drp-font-xl{--drp-font-scale: 2}.drp-date-picker.drp-spacing-xs{--drp-spacing-scale: .6}.drp-date-picker.drp-spacing-sm{--drp-spacing-scale: .8}.drp-date-picker.drp-spacing-md{--drp-spacing-scale: 1}.drp-date-picker.drp-spacing-lg{--drp-spacing-scale: 1.5}.drp-date-picker.drp-spacing-xl{--drp-spacing-scale: 2}.drp-date-picker.drp-cell-xs{--drp-cell-scale: .6}.drp-date-picker.drp-cell-sm{--drp-cell-scale: .8}.drp-date-picker.drp-cell-md{--drp-cell-scale: 1}.drp-date-picker.drp-cell-lg{--drp-cell-scale: 1.5}.drp-date-picker.drp-cell-xl{--drp-cell-scale: 2}@media (max-width: 1200px){.drp-responsive.drp-font-xl{--drp-font-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-font-xl{--drp-font-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-font-lg{--drp-font-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-font-lg{--drp-font-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-font-md{--drp-font-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-font-sm{--drp-font-scale: .6}}@media (max-width: 1200px){.drp-responsive.drp-spacing-xl{--drp-spacing-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-spacing-xl{--drp-spacing-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-spacing-lg{--drp-spacing-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-spacing-lg{--drp-spacing-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-spacing-md{--drp-spacing-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-spacing-sm{--drp-spacing-scale: .6}}@media (max-width: 1200px){.drp-responsive.drp-cell-xl{--drp-cell-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-cell-xl{--drp-cell-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-cell-lg{--drp-cell-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-cell-lg{--drp-cell-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-cell-md{--drp-cell-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-cell-sm{--drp-cell-scale: .6}}.drp-date-picker--xs{--drp-font-scale: .6;--drp-spacing-scale: .6;--drp-cell-scale: .6;min-width:168px}.drp-date-picker--sm{--drp-font-scale: .8;--drp-spacing-scale: .8;--drp-cell-scale: .8;min-width:224px}.drp-date-picker--lg{--drp-font-scale: 1.5;--drp-spacing-scale: 1.5;--drp-cell-scale: 1.5;min-width:420px}.drp-date-picker--xl{--drp-font-scale: 2;--drp-spacing-scale: 2;--drp-cell-scale: 2;min-width:560px}.drp-date-picker.drp-transitions-enabled .drp-date-picker__badge-cell{transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__nav,.drp-date-picker.drp-transitions-enabled .drp-date-picker__action-btn{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy),border-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__month-year,.drp-date-picker.drp-transitions-enabled .drp-date-picker__rolling-item{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker--inline{position:static;display:block;box-shadow:none}', ve = class ve {
|
|
2675
|
+
const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale: 1;--drp-cell-scale: 1;--drp-spacing-xs-base: .25rem;--drp-spacing-sm-base: .5rem;--drp-spacing-md-base: 1rem;--drp-spacing-lg-base: 1.5rem;--drp-spacing-xl-base: 2rem;--drp-spacing-xs: calc(var(--drp-spacing-xs-base) * var(--drp-spacing-scale));--drp-spacing-sm: calc(var(--drp-spacing-sm-base) * var(--drp-spacing-scale));--drp-spacing-md: calc(var(--drp-spacing-md-base) * var(--drp-spacing-scale));--drp-spacing-lg: calc(var(--drp-spacing-lg-base) * var(--drp-spacing-scale));--drp-spacing-xl: calc(var(--drp-spacing-xl-base) * var(--drp-spacing-scale));--drp-font-size-2xs-base: .625rem;--drp-font-size-xs-base: .75rem;--drp-font-size-sm-base: .875rem;--drp-font-size-base-base: 1rem;--drp-font-size-lg-base: 1.125rem;--drp-font-size-xl-base: 1.25rem;--drp-font-size-2xl-base: 1.5rem;--drp-font-weight-medium: 500;--drp-font-weight-semibold: 600;--drp-card-bg: #ffffff;--drp-border-color: #e5e7eb;--drp-primary-bg: #f3f4f6;--drp-primary-bg-hover: #e5e7eb;--drp-accent-color: #3b82f6;--drp-accent-color-hover: #2563eb;--drp-text-primary: #111827;--drp-text-secondary: #6b7280;--drp-accent-text-color: #ffffff;--drp-button-text-color: #ffffff;--drp-tooltip-bg: #111827;--drp-tooltip-color: #ffffff;--drp-border-width-base: 1px;--drp-border-radius: .375rem;--drp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);--drp-transition-fast: .15s;--drp-easing-snappy: cubic-bezier(.4, 0, .2, 1);--drp-input-padding-h: .75rem;--drp-grid-columns: 3;--drp-grid-rows: 2;--drp-input-background: var(--drp-card-bg);--drp-input-color: var(--drp-text-primary);--drp-input-border-color: var(--drp-border-color);--drp-input-border-color-hover: var(--drp-accent-color);--drp-input-border-color-focus: var(--drp-accent-color);--drp-input-placeholder-color: var(--drp-text-secondary);--drp-input-disabled-background: var(--drp-primary-bg);--drp-input-focus-shadow-color: rgba(59, 130, 246, .1);--drp-input-focus-shadow-size: 3px;--drp-input-icon-opacity: .6;--drp-input-size-sm-font: .875rem;--drp-input-size-sm-padding-v: .25rem;--drp-input-size-sm-padding-h: .5rem;--drp-input-size-sm-height: 2rem;--drp-input-size-sm-icon-size: .875em;--drp-input-size-md-font: 1rem;--drp-input-size-md-padding-v: .5rem;--drp-input-size-md-padding-h: .75rem;--drp-input-size-md-height: 2.5rem;--drp-input-size-md-icon-size: 1em;--drp-input-size-lg-font: 1.125rem;--drp-input-size-lg-padding-v: 1rem;--drp-input-size-lg-padding-h: 1rem;--drp-input-size-lg-height: 3rem;--drp-input-size-lg-icon-size: 1.125em;--drp-header-text-color: var(--drp-text-primary);--drp-header-bg-hover: var(--drp-primary-bg);--drp-header-bg-active: var(--drp-primary-bg-hover);--drp-nav-text-color: var(--drp-text-primary);--drp-nav-border-color: var(--drp-border-color);--drp-nav-bg-hover: var(--drp-primary-bg);--drp-nav-bg-active: var(--drp-primary-bg-hover);--drp-nav-border-hover: var(--drp-accent-color);--drp-rolling-bg: var(--drp-primary-bg);--drp-rolling-border-color: var(--drp-border-color);--drp-rolling-scrollbar-thumb: var(--drp-border-color);--drp-rolling-scrollbar-thumb-hover: var(--drp-accent-color);--drp-rolling-item-bg-hover: var(--drp-primary-bg);--drp-rolling-item-bg-selected: var(--drp-accent-color);--drp-rolling-item-color-selected: var(--drp-accent-text-color);--drp-rolling-item-bg-selected-hover: var(--drp-accent-color-hover);--drp-weekday-color: var(--drp-text-secondary);--drp-day-text-color: var(--drp-text-primary);--drp-day-bg-hover: var(--drp-primary-bg);--drp-day-border-hover: var(--drp-accent-color);--drp-day-today-border: var(--drp-accent-color);--drp-day-selected-bg: var(--drp-accent-color);--drp-day-selected-color: var(--drp-accent-text-color);--drp-day-selected-bg-hover: var(--drp-accent-color-hover);--drp-day-focused-outline: var(--drp-accent-color);--drp-day-disabled-color: var(--drp-text-secondary);--drp-day-other-month-color: var(--drp-text-secondary);--drp-day-range-bg: var(--drp-accent-color);--drp-day-range-color: var(--drp-accent-text-color);--drp-summary-text-color: var(--drp-text-secondary);--drp-summary-border-color: var(--drp-border-color);--drp-summary-count-color: var(--drp-accent-color);--drp-button-border-color: var(--drp-border-color);--drp-button-bg-hover: var(--drp-primary-bg);--drp-button-border-hover: var(--drp-accent-color);--drp-button-today-color: var(--drp-accent-color);--drp-button-clear-color: var(--drp-text-secondary);--drp-button-cancel-color: var(--drp-text-secondary);--drp-button-apply-bg: var(--drp-accent-color);--drp-button-apply-color: var(--drp-button-text-color);--drp-button-apply-border: var(--drp-accent-color);--drp-button-apply-bg-hover: var(--drp-accent-color-hover);--drp-badge-number-bg: var(--drp-accent-color);--drp-badge-number-color: var(--drp-accent-text-color);--drp-badge-count-bg: #ef4444;--drp-badge-count-color: #ffffff;--drp-badge-text-bg: var(--drp-text-secondary);--drp-badge-text-color: #ffffff;--drp-unified-range-text-color: var(--drp-text-primary);--drp-unified-range-bg-hover: var(--drp-primary-bg);--drp-unified-range-bg-active: var(--drp-primary-bg-hover);--drp-unified-month-color: var(--drp-text-secondary);--drp-unified-rolling-disabled-color: var(--drp-text-secondary)}.drp-input{width:100%;font-family:inherit;font-size:var(--drp-input-size-md-font);line-height:1.5;color:var(--drp-input-color);background-color:var(--drp-input-background);border:var(--drp-border-width-base) solid var(--drp-input-border-color);border-radius:var(--drp-border-radius);padding:var(--drp-input-size-md-padding-v) var(--drp-input-size-md-padding-h);padding-right:calc(var(--drp-input-size-md-padding-h) * 2.5);height:var(--drp-input-size-md-height);box-sizing:border-box;transition:border-color var(--drp-transition-fast) var(--drp-easing-snappy),box-shadow var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-input::placeholder{color:var(--drp-input-placeholder-color);opacity:.6}.drp-input:hover:not(:disabled){border-color:var(--drp-input-border-color-hover)}.drp-input:focus{outline:none;border-color:var(--drp-input-border-color-focus);box-shadow:0 0 0 var(--drp-input-focus-shadow-size) var(--drp-input-focus-shadow-color)}.drp-input:disabled{opacity:.6;cursor:not-allowed;background-color:var(--drp-input-disabled-background)}.drp-input.drp-input--sm{font-size:var(--drp-input-size-sm-font);padding:var(--drp-input-size-sm-padding-v) var(--drp-input-size-sm-padding-h);padding-right:calc(var(--drp-input-size-sm-padding-h) * 2.5);height:var(--drp-input-size-sm-height)}.drp-input.drp-input--lg{font-size:var(--drp-input-size-lg-font);padding:var(--drp-input-size-lg-padding-v) var(--drp-input-size-lg-padding-h);padding-right:calc(var(--drp-input-size-lg-padding-h) * 2.5);height:var(--drp-input-size-lg-height)}.drp-date-picker-input{position:relative;cursor:pointer;display:inline-block;width:100%}.drp-date-picker-input:after{content:"📅";position:absolute;right:var(--drp-input-size-md-padding-h);top:50%;transform:translateY(-50%);pointer-events:none;opacity:var(--drp-input-icon-opacity);font-size:var(--drp-input-size-md-icon-size)}.drp-date-picker-input.drp-date-picker-input--sm:after{right:var(--drp-input-size-sm-padding-h);font-size:var(--drp-input-size-sm-icon-size)}.drp-date-picker-input.drp-date-picker-input--lg:after{right:var(--drp-input-size-lg-padding-h);font-size:var(--drp-input-size-lg-icon-size)}.drp-date-picker{position:absolute;z-index:9500;background:var(--drp-card-bg);border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);box-shadow:var(--drp-shadow-xl);padding:var(--drp-spacing-md);min-width:280px;max-width:calc(100vw - 2rem);box-sizing:border-box;-webkit-user-select:none;user-select:none;--drp-font-size-2xs: calc(var(--drp-font-size-2xs-base) * var(--drp-font-scale));--drp-font-size-xs: calc(var(--drp-font-size-xs-base) * var(--drp-font-scale));--drp-font-size-sm: calc(var(--drp-font-size-sm-base) * var(--drp-font-scale));--drp-font-size-base: calc(var(--drp-font-size-base-base) * var(--drp-font-scale));--drp-font-size-lg: calc(var(--drp-font-size-lg-base) * var(--drp-font-scale));--drp-font-size-xl: calc(var(--drp-font-size-xl-base) * var(--drp-font-scale));--drp-font-size-2xl: calc(var(--drp-font-size-2xl-base) * var(--drp-font-scale))}.drp-date-picker:not(.drp-date-picker--visible){display:none}.drp-date-picker--inline{position:relative!important;display:block!important;z-index:auto;min-width:0;max-width:100%;width:fit-content;box-sizing:border-box}.drp-date-picker__months{display:flex;gap:var(--drp-spacing-lg)}.drp-date-picker--inline .drp-date-picker__months{flex-wrap:wrap}.drp-date-picker__months--grid{display:grid;grid-template-columns:repeat(var(--drp-grid-columns, 3),minmax(0,1fr));grid-template-rows:repeat(var(--drp-grid-rows, 2),auto);gap:var(--drp-spacing-lg);width:100%}@media (max-width: 1200px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),3),minmax(0,1fr))}}@media (max-width: 768px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),2),minmax(0,1fr))}}@media (max-width: 480px){.drp-date-picker__months--grid{grid-template-columns:minmax(0,1fr)}}.drp-date-picker__month{flex:1;min-width:calc(280px * var(--drp-cell-scale));display:flex;flex-direction:column}.drp-date-picker--inline .drp-date-picker__month{min-width:calc(250px * var(--drp-cell-scale))}.drp-date-picker__months--grid .drp-date-picker__month{min-width:0;width:100%}.drp-date-picker__calendar-container{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.drp-date-picker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-md);gap:var(--drp-spacing-sm)}.drp-date-picker__header--static{justify-content:center}.drp-date-picker__header--static .drp-date-picker__month-year{cursor:default}.drp-date-picker__header--static .drp-date-picker__month-year:hover{background-color:transparent}.drp-date-picker__month-year{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-base);color:var(--drp-header-text-color);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__month-year:hover{background-color:var(--drp-header-bg-hover)}.drp-date-picker__month-year:active{background-color:var(--drp-header-bg-active)}.drp-date-picker__nav{width:calc(2rem * var(--drp-cell-scale));height:calc(2rem * var(--drp-cell-scale));display:flex;align-items:center;justify-content:center;border:var(--drp-border-width-base) solid var(--drp-nav-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-lg);color:var(--drp-nav-text-color)}.drp-date-picker__nav:hover{background-color:var(--drp-nav-bg-hover);border-color:var(--drp-nav-border-hover)}.drp-date-picker__nav:active{background-color:var(--drp-nav-bg-active)}.drp-date-picker__nav--disabled,.drp-date-picker__nav[disabled]{opacity:.6;cursor:not-allowed;pointer-events:none}.drp-date-picker__nav--disabled:hover,.drp-date-picker__nav[disabled]:hover{background-color:transparent;border-color:var(--drp-nav-border-color)}.drp-date-picker__nav--prev:before{content:"‹"}.drp-date-picker__nav--next:before{content:"›"}.drp-date-picker__rolling-selector{position:absolute;top:0;right:0;bottom:0;left:0;display:none;z-index:10}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible{display:flex}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__weekdays,.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__days{visibility:hidden}.drp-date-picker__rolling-selector{gap:var(--drp-spacing-xs)}.drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-rolling-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-rolling-bg)}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-rolling-scrollbar-thumb);border-radius:3px}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-rolling-scrollbar-thumb-hover)}.drp-date-picker__rolling-item{padding:.25rem 1rem;cursor:pointer;font-size:.875rem;min-height:calc(2rem * var(--drp-cell-scale));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__rolling-item:hover{background-color:var(--drp-rolling-item-bg-hover)}.drp-date-picker__rolling-item--selected{background-color:var(--drp-rolling-item-bg-selected);color:var(--drp-rolling-item-color-selected);font-weight:600}.drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-rolling-item-bg-selected-hover)}.drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker__unified-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-lg);gap:var(--drp-spacing-sm);padding:0 var(--drp-spacing-sm)}.drp-date-picker__unified-range{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-lg);color:var(--drp-unified-range-text-color);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__unified-range:hover{background-color:var(--drp-unified-range-bg-hover)}.drp-date-picker__unified-range:active{background-color:var(--drp-unified-range-bg-active)}.drp-date-picker__unified-range--static{cursor:default!important}.drp-date-picker__unified-range--static:hover,.drp-date-picker__unified-range--static:active{background-color:transparent}.drp-date-picker__unified-rolling-selector{position:absolute;top:calc(var(--drp-spacing-lg) + var(--drp-spacing-lg) * 2);left:50%;transform:translate(-50%);width:min(90%,450px);height:350px;max-height:350px;display:none;z-index:100;background:var(--drp-card-bg);gap:var(--drp-spacing-xs)}.drp-date-picker__unified-rolling-selector--visible{display:flex}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-rolling-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-rolling-bg)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-rolling-scrollbar-thumb);border-radius:3px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-rolling-scrollbar-thumb-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item{padding:.25rem 1rem;cursor:pointer;font-size:.875rem;min-height:calc(2rem * var(--drp-cell-scale));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item:hover{background-color:var(--drp-rolling-item-bg-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected{background-color:var(--drp-rolling-item-bg-selected);color:var(--drp-rolling-item-color-selected);font-weight:600}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-rolling-item-bg-selected-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--disabled{color:var(--drp-unified-rolling-disabled-color);opacity:.4;cursor:not-allowed}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__nav{display:none}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year{cursor:default;font-size:var(--drp-font-size-base);font-weight:var(--drp-font-weight-normal);color:var(--drp-unified-month-color)}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year:hover{background-color:transparent}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__rolling-selector{display:none!important}.drp-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-sm)}.drp-date-picker__weekday{text-align:center;font-size:var(--drp-font-size-xs);font-weight:var(--drp-font-weight-semibold);color:var(--drp-weekday-color);padding:var(--drp-spacing-xs);text-transform:uppercase}.drp-date-picker__days{display:flex;flex-direction:column;gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-md)}.drp-date-picker__date-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs)}.drp-date-picker__day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-sm);color:var(--drp-day-text-color);border-radius:var(--drp-border-radius);cursor:pointer;border:calc(2px * var(--drp-cell-scale)) solid transparent;position:relative}.drp-date-picker__day:hover:not(.drp-date-picker__day--disabled):not(.drp-date-picker__day--other-month){background-color:var(--drp-day-bg-hover);border-color:var(--drp-day-border-hover)}.drp-date-picker__day--today{border-color:var(--drp-day-today-border);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected{background-color:var(--drp-day-selected-bg);color:var(--drp-day-selected-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected:hover{background-color:var(--drp-day-selected-bg-hover)}.drp-date-picker__day--focused{outline:calc(2px * var(--drp-cell-scale)) solid var(--drp-day-focused-outline);outline-offset:calc(2px * var(--drp-cell-scale))}.drp-date-picker__day--disabled{color:var(--drp-day-disabled-color);opacity:.6;cursor:not-allowed;position:relative}.drp-date-picker__day--disabled:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(45deg,rgba(0,0,0,.1) 0px,rgba(0,0,0,.1) 1px,transparent 1px,transparent 6px);border-radius:var(--drp-border-radius);pointer-events:none}.drp-date-picker__day--disabled:hover{background-color:transparent;border-color:transparent}.drp-date-picker__day--other-month{color:var(--drp-day-other-month-color);opacity:.5}.drp-date-picker__day--other-month.drp-date-picker__day--range-start,.drp-date-picker__day--other-month.drp-date-picker__day--range-end,.drp-date-picker__day--other-month.drp-date-picker__day--in-range,.drp-date-picker__day--other-month.drp-date-picker__day--drag-preview{opacity:1}.drp-date-picker__day--range-start,.drp-date-picker__day--range-end{background-color:var(--drp-day-range-bg);color:var(--drp-day-range-color);font-weight:var(--drp-font-weight-semibold);cursor:grab;-webkit-user-select:none;user-select:none}.drp-date-picker__day--range-start:active,.drp-date-picker__day--range-end:active{cursor:grabbing}.drp-date-picker__day--in-range{background-color:color-mix(in srgb,var(--drp-day-range-bg) 15%,transparent)}.drp-date-picker__day--in-range:hover{background-color:color-mix(in srgb,var(--drp-day-range-bg) 25%,transparent)}.drp-date-picker__day--dragging{cursor:grabbing!important;opacity:.7;transform:scale(1.1);transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__day--drag-preview{background-color:color-mix(in srgb,var(--drp-day-range-bg) 30%,transparent);border:calc(2px * var(--drp-cell-scale)) dashed var(--drp-day-range-bg)}.drp-date-picker__day--drag-preview.drp-date-picker__day--range-start,.drp-date-picker__day--drag-preview.drp-date-picker__day--range-end{background-color:color-mix(in srgb,var(--drp-day-range-bg) 60%,transparent);color:var(--drp-day-range-color)}.drp-date-picker__day--drag-invalid{background-color:color-mix(in srgb,#ef4444 20%,transparent)!important;border-color:#ef4444!important;border-style:dashed!important}.drp-date-picker__day.holiday{background-color:color-mix(in srgb,#ef4444 10%,transparent)}.drp-date-picker__day.holiday:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#ef4444 20%,transparent)}.drp-date-picker__day.event{background-color:color-mix(in srgb,#10b981 10%,transparent)}.drp-date-picker__day.event:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#10b981 20%,transparent)}.drp-date-picker__rolling-item--disabled{color:var(--drp-unified-rolling-disabled-color);opacity:.4;cursor:not-allowed;pointer-events:none;text-decoration:line-through}.drp-date-picker__rolling-item--disabled:hover{background-color:transparent}.drp-date-picker__badge-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-xs);max-height:calc(1rem * var(--drp-cell-scale));min-height:calc(1rem * var(--drp-cell-scale))}.drp-date-picker__badge-cell{display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-2xs);padding:calc(1px * var(--drp-cell-scale)) calc(2px * var(--drp-cell-scale));border-radius:2px;cursor:pointer;height:100%;max-height:calc(1rem * var(--drp-cell-scale))}.drp-date-picker__badge-cell:empty{visibility:hidden}.drp-date-picker__badge-cell:hover:not(:empty){transform:scale(1.05)}.drp-date-picker__badge-cell.badge-number{background-color:var(--drp-badge-number-bg);color:var(--drp-badge-number-color);font-size:.7rem;font-weight:600}.drp-date-picker__badge-cell.badge-count{background-color:var(--drp-badge-count-bg);color:var(--drp-badge-count-color);font-size:.7rem;font-weight:700}.drp-date-picker__badge-cell.badge-text{background-color:var(--drp-badge-text-bg);color:var(--drp-badge-text-color);font-size:.65rem;font-weight:700;text-transform:uppercase}.drp-date-picker__summary{text-align:center;padding:var(--drp-spacing-md);border-top:var(--drp-border-width-base) solid var(--drp-summary-border-color);font-size:var(--drp-font-size-sm);color:var(--drp-summary-text-color)}.drp-date-picker__summary--visible{display:block}.drp-date-picker__summary--hidden{display:none}.drp-date-picker__summary-count{font-weight:var(--drp-font-weight-semibold);color:var(--drp-summary-count-color);font-size:var(--drp-font-size-base)}.drp-date-picker__actions{display:flex;gap:var(--drp-spacing-sm);justify-content:space-between;padding-top:var(--drp-spacing-sm);border-top:var(--drp-border-width-base) solid var(--drp-summary-border-color)}.drp-date-picker__button{flex:1;padding:var(--drp-spacing-sm) var(--drp-spacing-md);border:var(--drp-border-width-base) solid var(--drp-button-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-sm);font-weight:var(--drp-font-weight-medium)}.drp-date-picker__button:hover{background-color:var(--drp-button-bg-hover);border-color:var(--drp-button-border-hover)}.drp-date-picker__button:disabled,.drp-date-picker__button[disabled]{opacity:var(--drp-disabled-opacity, .6);cursor:not-allowed;pointer-events:none}.drp-date-picker__button:disabled:hover,.drp-date-picker__button[disabled]:hover{background-color:transparent;border-color:var(--drp-button-border-color)}.drp-date-picker__button--today{color:var(--drp-button-today-color)}.drp-date-picker__button--clear{color:var(--drp-button-clear-color)}.drp-date-picker__button--apply{background-color:var(--drp-button-apply-bg);color:var(--drp-button-apply-color);border-color:var(--drp-button-apply-border)}.drp-date-picker__button--apply:hover{background-color:var(--drp-button-apply-bg-hover)}.drp-date-picker__button--cancel{color:var(--drp-button-cancel-color)}.drp-date-picker__tooltip{position:absolute;z-index:9999;background-color:var(--drp-tooltip-bg);color:var(--drp-tooltip-color);padding:var(--drp-spacing-xs) var(--drp-spacing-sm);border-radius:var(--drp-border-radius);font-size:var(--drp-font-size-xs);line-height:1.4;max-width:200px;word-wrap:break-word;pointer-events:none;opacity:0;transition:opacity var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__tooltip--visible{opacity:1}.drp-date-picker__tooltip-arrow{position:absolute;background-color:var(--drp-tooltip-bg);width:8px;height:8px;transform:rotate(45deg)}.drp-date-picker__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fffc;display:flex;align-items:center;justify-content:center;z-index:9500;border-radius:.375rem}.drp-date-picker__loading-spinner{width:40px;height:40px;border:4px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:drp-spin .8s linear infinite}@keyframes drp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drp-date-picker.drp-font-xs{--drp-font-scale: .6}.drp-date-picker.drp-font-sm{--drp-font-scale: .8}.drp-date-picker.drp-font-md{--drp-font-scale: 1}.drp-date-picker.drp-font-lg{--drp-font-scale: 1.5}.drp-date-picker.drp-font-xl{--drp-font-scale: 2}.drp-date-picker.drp-spacing-xs{--drp-spacing-scale: .6}.drp-date-picker.drp-spacing-sm{--drp-spacing-scale: .8}.drp-date-picker.drp-spacing-md{--drp-spacing-scale: 1}.drp-date-picker.drp-spacing-lg{--drp-spacing-scale: 1.5}.drp-date-picker.drp-spacing-xl{--drp-spacing-scale: 2}.drp-date-picker.drp-cell-xs{--drp-cell-scale: .6}.drp-date-picker.drp-cell-sm{--drp-cell-scale: .8}.drp-date-picker.drp-cell-md{--drp-cell-scale: 1}.drp-date-picker.drp-cell-lg{--drp-cell-scale: 1.5}.drp-date-picker.drp-cell-xl{--drp-cell-scale: 2}@media (max-width: 1200px){.drp-responsive.drp-font-xl{--drp-font-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-font-xl{--drp-font-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-font-lg{--drp-font-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-font-lg{--drp-font-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-font-md{--drp-font-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-font-sm{--drp-font-scale: .6}}@media (max-width: 1200px){.drp-responsive.drp-spacing-xl{--drp-spacing-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-spacing-xl{--drp-spacing-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-spacing-lg{--drp-spacing-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-spacing-lg{--drp-spacing-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-spacing-md{--drp-spacing-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-spacing-sm{--drp-spacing-scale: .6}}@media (max-width: 1200px){.drp-responsive.drp-cell-xl{--drp-cell-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-cell-xl{--drp-cell-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-cell-lg{--drp-cell-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-cell-lg{--drp-cell-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-cell-md{--drp-cell-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-cell-sm{--drp-cell-scale: .6}}.drp-date-picker--xs{--drp-font-scale: .6;--drp-spacing-scale: .6;--drp-cell-scale: .6;min-width:168px}.drp-date-picker--sm{--drp-font-scale: .8;--drp-spacing-scale: .8;--drp-cell-scale: .8;min-width:224px}.drp-date-picker--lg{--drp-font-scale: 1.5;--drp-spacing-scale: 1.5;--drp-cell-scale: 1.5;min-width:420px}.drp-date-picker--xl{--drp-font-scale: 2;--drp-spacing-scale: 2;--drp-cell-scale: 2;min-width:560px}.drp-date-picker.drp-transitions-enabled .drp-date-picker__badge-cell{transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__nav,.drp-date-picker.drp-transitions-enabled .drp-date-picker__action-btn{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy),border-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__month-year,.drp-date-picker.drp-transitions-enabled .drp-date-picker__rolling-item{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker--inline{position:static;display:block;box-shadow:none}', ve = class ve {
|
|
2676
2676
|
constructor(a, t = {}) {
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2677
|
+
b(this, "input");
|
|
2678
|
+
b(this, "options");
|
|
2679
|
+
b(this, "formatInfo");
|
|
2680
|
+
b(this, "_previousInputValue");
|
|
2681
|
+
b(this, "currentDate");
|
|
2682
|
+
b(this, "monthDates");
|
|
2683
|
+
b(this, "displayMonths");
|
|
2684
|
+
b(this, "selectedDate");
|
|
2685
|
+
b(this, "selectedStartDate");
|
|
2686
|
+
b(this, "selectedEndDate");
|
|
2687
|
+
b(this, "selectedRanges");
|
|
2688
|
+
b(this, "selectedDates");
|
|
2689
|
+
b(this, "pendingSelection");
|
|
2690
2690
|
// Stores uncommitted selection when Apply button is required
|
|
2691
2691
|
// State for deferred commit when Apply button is required
|
|
2692
|
-
|
|
2692
|
+
b(this, "originalInputValue", null);
|
|
2693
2693
|
// Stores input value when calendar opens (for restore on close without Apply)
|
|
2694
|
-
|
|
2694
|
+
b(this, "committedDate", null);
|
|
2695
2695
|
// Last committed single date
|
|
2696
|
-
|
|
2696
|
+
b(this, "committedStartDate", null);
|
|
2697
2697
|
// Last committed range start
|
|
2698
|
-
|
|
2698
|
+
b(this, "committedEndDate", null);
|
|
2699
2699
|
// Last committed range end
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2700
|
+
b(this, "focusedDayIndex");
|
|
2701
|
+
b(this, "activeMonthIndex");
|
|
2702
|
+
b(this, "showingRollingSelector");
|
|
2703
|
+
b(this, "draggingType");
|
|
2704
|
+
b(this, "isDragging");
|
|
2705
|
+
b(this, "dragStartDate");
|
|
2706
|
+
b(this, "originalStartDate");
|
|
2707
|
+
b(this, "originalEndDate");
|
|
2708
|
+
b(this, "dragPreviewStart");
|
|
2709
|
+
b(this, "dragPreviewEnd");
|
|
2710
|
+
b(this, "autoScrollInterval");
|
|
2711
|
+
b(this, "navInterval");
|
|
2712
|
+
b(this, "calendar");
|
|
2713
|
+
b(this, "containerElement");
|
|
2714
|
+
b(this, "onDragMoveBound");
|
|
2715
|
+
b(this, "onDragEndBound");
|
|
2716
|
+
b(this, "clickOutsideHandler");
|
|
2717
|
+
b(this, "isFirstRender", !0);
|
|
2718
|
+
b(this, "lockedPlacement");
|
|
2719
2719
|
// Store the initial placement to prevent jumping
|
|
2720
|
-
|
|
2720
|
+
b(this, "calendarContentHeight");
|
|
2721
2721
|
// Store calendar height for rolling selector
|
|
2722
|
-
|
|
2722
|
+
b(this, "calendarContentWidth");
|
|
2723
2723
|
// Store calendar width for rolling selector
|
|
2724
|
-
|
|
2724
|
+
b(this, "isCalendarActive", !1);
|
|
2725
2725
|
// Track if this calendar is actively focused (for inline mode)
|
|
2726
2726
|
// Async validation state
|
|
2727
|
-
|
|
2728
|
-
|
|
2727
|
+
b(this, "isValidating", !1);
|
|
2728
|
+
b(this, "loadingOverlay");
|
|
2729
2729
|
// Month change callback state
|
|
2730
|
-
|
|
2731
|
-
|
|
2730
|
+
b(this, "isMonthChanging", !1);
|
|
2731
|
+
b(this, "bulkMetadataCache", null);
|
|
2732
2732
|
// Unified navigation state
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2733
|
+
b(this, "unifiedHeader");
|
|
2734
|
+
b(this, "unifiedRangeDisplay");
|
|
2735
|
+
b(this, "unifiedRollingSelector");
|
|
2736
|
+
b(this, "showingUnifiedRollingSelector", !1);
|
|
2737
2737
|
// Floating UI tooltips
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2738
|
+
b(this, "tooltip");
|
|
2739
|
+
b(this, "tooltipArrow");
|
|
2740
|
+
b(this, "currentTooltipTarget");
|
|
2741
2741
|
// Action button tooltips
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2742
|
+
b(this, "actionButtonTooltips", /* @__PURE__ */ new Map());
|
|
2743
|
+
b(this, "actionButtonTooltipCleanups", /* @__PURE__ */ new Map());
|
|
2744
|
+
b(this, "actionsContainer", null);
|
|
2745
2745
|
// Week start and date restrictions
|
|
2746
|
-
|
|
2746
|
+
b(this, "weekStartDay", 0);
|
|
2747
2747
|
// 0 = Sunday, 1 = Monday, etc.
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2748
|
+
b(this, "normalizedMinDate", null);
|
|
2749
|
+
b(this, "normalizedMaxDate", null);
|
|
2750
|
+
b(this, "normalizedDisabledDates", /* @__PURE__ */ new Set());
|
|
2751
2751
|
// Store as 'YYYY-MM-DD' strings
|
|
2752
|
-
|
|
2752
|
+
b(this, "normalizedSpecialDates", /* @__PURE__ */ new Map());
|
|
2753
2753
|
// Store as 'YYYY-MM-DD' -> DecoratedDate
|
|
2754
2754
|
// Internationalization
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2755
|
+
b(this, "locale", "en");
|
|
2756
|
+
b(this, "localeStrings");
|
|
2757
|
+
b(this, "weekdayNames", []);
|
|
2758
|
+
b(this, "monthNames", []);
|
|
2759
2759
|
if (this.input = a, this.containerElement = t.container || document.body, this.options = {
|
|
2760
2760
|
selectionMode: t.selectionMode || "single",
|
|
2761
2761
|
calendarPlacement: t.calendarPlacement || (t.monthLayout === "grid" ? "bottom" : "bottom-start"),
|
|
@@ -2810,34 +2810,34 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
2810
2810
|
showClearButton: t.showClearButton !== void 0 ? t.showClearButton : !0,
|
|
2811
2811
|
showApplyButton: t.showApplyButton !== void 0 ? t.showApplyButton : t.selectionMode === "range" || t.selectionMode === "multiple"
|
|
2812
2812
|
}, this.options.showDebugInfo ? ft() : mt(), this.options.unifiedNavigation && this.options.unifiedNavigationAnchorIndex !== void 0) {
|
|
2813
|
-
const
|
|
2814
|
-
(this.options.unifiedNavigationAnchorIndex < 0 || this.options.unifiedNavigationAnchorIndex >
|
|
2813
|
+
const r = this.options.visibleMonthsCount - 1;
|
|
2814
|
+
(this.options.unifiedNavigationAnchorIndex < 0 || this.options.unifiedNavigationAnchorIndex > r) && (console.warn(`unifiedNavigationAnchorIndex (${this.options.unifiedNavigationAnchorIndex}) out of bounds. Using 0.`), this.options.unifiedNavigationAnchorIndex = 0);
|
|
2815
2815
|
}
|
|
2816
|
-
this.weekStartDay = Xt(this.options.weekStartDay), T.debug("Week starts on day:", this.weekStartDay), T.debug("disabledDatesHandling:", this.options.disabledDatesHandling), this.locale =
|
|
2816
|
+
this.weekStartDay = Xt(this.options.weekStartDay), T.debug("Week starts on day:", this.weekStartDay), T.debug("disabledDatesHandling:", this.options.disabledDatesHandling), this.locale = Oe(this.options.locale), this.localeStrings = In(this.locale, this.options.customStrings), this.weekdayNames = En(this.locale), this.monthNames = this.options.monthNames || Rn(this.locale), T.debug("Locale:", this.locale, "Weekdays:", this.weekdayNames, "Months:", this.monthNames), this.initializeDateRestrictions(), this.formatInfo = this.parseFormat(this.options.dateFormatMask), T.debug("Format info:", this.formatInfo), this._previousInputValue = "", this.currentDate = /* @__PURE__ */ new Date();
|
|
2817
2817
|
let n;
|
|
2818
2818
|
if (this.options.initialDate)
|
|
2819
|
-
n =
|
|
2819
|
+
n = he(this.options.initialDate) || /* @__PURE__ */ new Date(), T.debug(`Using initialDate: ${n.toISOString()}`);
|
|
2820
2820
|
else if (this.options.rollingYearRange || this.options.rollingMonthRange) {
|
|
2821
|
-
const
|
|
2822
|
-
n = new Date(o,
|
|
2821
|
+
const r = this.getEffectiveYearRange(), i = this.getEffectiveMonthRange(), o = r.min, s = i.min - 1;
|
|
2822
|
+
n = new Date(o, s, 1), T.debug(`Using first allowed year/month as initial: ${n.toISOString()}`);
|
|
2823
2823
|
} else this.normalizedMinDate && this.normalizedMinDate > /* @__PURE__ */ new Date() ? (n = new Date(this.normalizedMinDate), T.debug(`Using minDate as initial: ${n.toISOString()}`)) : this.normalizedMaxDate && this.normalizedMaxDate < /* @__PURE__ */ new Date() ? (n = new Date(this.normalizedMaxDate), T.debug(`Using maxDate as initial: ${n.toISOString()}`)) : (n = /* @__PURE__ */ new Date(), T.debug(`Using current date as initial: ${n.toISOString()}`));
|
|
2824
2824
|
this.monthDates = [];
|
|
2825
|
-
for (let
|
|
2826
|
-
const
|
|
2827
|
-
this.monthDates.push(
|
|
2825
|
+
for (let r = 0; r < this.options.visibleMonthsCount; r++) {
|
|
2826
|
+
const i = new Date(n.getFullYear(), n.getMonth() + r, 1);
|
|
2827
|
+
this.monthDates.push(i), T.debug(`monthDates[${r}] = ${i.getFullYear()}-${i.getMonth() + 1}`);
|
|
2828
2828
|
}
|
|
2829
2829
|
if (this.options.selectionMode === "range") {
|
|
2830
2830
|
this.displayMonths = [];
|
|
2831
|
-
for (let
|
|
2832
|
-
const
|
|
2831
|
+
for (let r = 0; r < this.options.visibleMonthsCount; r++) {
|
|
2832
|
+
const i = new Date(n.getFullYear(), n.getMonth() + r, 1);
|
|
2833
2833
|
this.displayMonths.push({
|
|
2834
|
-
month:
|
|
2835
|
-
year:
|
|
2834
|
+
month: i.getMonth(),
|
|
2835
|
+
year: i.getFullYear()
|
|
2836
2836
|
});
|
|
2837
2837
|
}
|
|
2838
2838
|
}
|
|
2839
2839
|
this.selectedDate = null, this.selectedStartDate = null, this.selectedEndDate = null, this.selectedRanges = [], this.selectedDates = [], this.pendingSelection = null, this.focusedDayIndex = null, this.activeMonthIndex = 0, this.showingRollingSelector = [];
|
|
2840
|
-
for (let
|
|
2840
|
+
for (let r = 0; r < this.options.visibleMonthsCount; r++)
|
|
2841
2841
|
this.showingRollingSelector.push(!1);
|
|
2842
2842
|
this.draggingType = null, this.isDragging = !1, this.dragStartDate = null, this.originalStartDate = null, this.originalEndDate = null, this.dragPreviewStart = null, this.dragPreviewEnd = null, this.autoScrollInterval = null, this.init();
|
|
2843
2843
|
}
|
|
@@ -2848,8 +2848,8 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
2848
2848
|
* Initialize and normalize date restrictions
|
|
2849
2849
|
*/
|
|
2850
2850
|
initializeDateRestrictions() {
|
|
2851
|
-
if (this.options.minDate && (this.normalizedMinDate =
|
|
2852
|
-
const t =
|
|
2851
|
+
if (this.options.minDate && (this.normalizedMinDate = he(this.options.minDate)), this.options.maxDate && (this.normalizedMaxDate = he(this.options.maxDate)), this.options.disabledDates && this.options.disabledDates.length > 0 && this.options.disabledDates.forEach((a) => {
|
|
2852
|
+
const t = he(a);
|
|
2853
2853
|
if (t) {
|
|
2854
2854
|
const n = me(t);
|
|
2855
2855
|
this.normalizedDisabledDates.add(n);
|
|
@@ -2857,10 +2857,10 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
2857
2857
|
}), this.options.specialDates && this.options.specialDates.length > 0) {
|
|
2858
2858
|
const a = this.options.dateMember || "date";
|
|
2859
2859
|
this.options.specialDates.forEach((t) => {
|
|
2860
|
-
const n =
|
|
2860
|
+
const n = he(t[a]);
|
|
2861
2861
|
if (n) {
|
|
2862
|
-
const
|
|
2863
|
-
this.normalizedSpecialDates.set(
|
|
2862
|
+
const r = me(n);
|
|
2863
|
+
this.normalizedSpecialDates.set(r, t);
|
|
2864
2864
|
} else
|
|
2865
2865
|
console.warn("[Special Dates] Failed to normalize date:", t[a]);
|
|
2866
2866
|
});
|
|
@@ -2899,12 +2899,12 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
2899
2899
|
return;
|
|
2900
2900
|
} else if (n.isVisible !== void 0 && !n.isVisible)
|
|
2901
2901
|
return;
|
|
2902
|
-
const
|
|
2903
|
-
|
|
2904
|
-
const
|
|
2905
|
-
|
|
2902
|
+
const r = document.createElement("button");
|
|
2903
|
+
r.className = `drp-date-picker__button drp-date-picker__button--${n.action}`;
|
|
2904
|
+
const i = n.getClassCallback ? n.getClassCallback(this) : n.cssClass;
|
|
2905
|
+
i && (Array.isArray(i) ? r.classList.add(...i) : r.classList.add(i));
|
|
2906
2906
|
const o = n.getTextCallback ? n.getTextCallback(this) : n.text;
|
|
2907
|
-
|
|
2907
|
+
r.innerHTML = o, (n.isDisabledCallback ? n.isDisabledCallback(this) : n.isDisabled ?? !1) && (r.disabled = !0), r.dataset.action = n.action, n.onClick && (r._customOnClick = n.onClick), a.appendChild(r);
|
|
2908
2908
|
}), this.attachActionButtonTooltips();
|
|
2909
2909
|
}
|
|
2910
2910
|
/**
|
|
@@ -2929,30 +2929,30 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
2929
2929
|
attachActionButtonTooltips() {
|
|
2930
2930
|
if (!this.actionsContainer) return;
|
|
2931
2931
|
this.actionsContainer.querySelectorAll(".drp-date-picker__action").forEach((t) => {
|
|
2932
|
-
const n = t,
|
|
2933
|
-
if (!
|
|
2934
|
-
const o = (this.options.actionButtons || this.getDefaultButtons()).find((l) => l.action ===
|
|
2932
|
+
const n = t, r = n.dataset.action;
|
|
2933
|
+
if (!r) return;
|
|
2934
|
+
const o = (this.options.actionButtons || this.getDefaultButtons()).find((l) => l.action === r);
|
|
2935
2935
|
if (!o) return;
|
|
2936
|
-
let
|
|
2937
|
-
if (o.getTooltipCallback ?
|
|
2938
|
-
const d = `action-${
|
|
2939
|
-
this.createActionButtonTooltip(n,
|
|
2936
|
+
let s;
|
|
2937
|
+
if (o.getTooltipCallback ? s = o.getTooltipCallback(this) : s = o.tooltip, !s) return;
|
|
2938
|
+
const d = `action-${r}-${Date.now()}-${Math.random()}`;
|
|
2939
|
+
this.createActionButtonTooltip(n, s, d);
|
|
2940
2940
|
});
|
|
2941
2941
|
}
|
|
2942
2942
|
/**
|
|
2943
2943
|
* Create a Floating UI tooltip for an action button
|
|
2944
2944
|
*/
|
|
2945
2945
|
createActionButtonTooltip(a, t, n) {
|
|
2946
|
-
const
|
|
2947
|
-
|
|
2948
|
-
let o,
|
|
2946
|
+
const r = document.createElement("div");
|
|
2947
|
+
r.className = "drp-date-picker__tooltip", r.textContent = t, (this.options.container || document.body).appendChild(r), this.actionButtonTooltips.set(n, r);
|
|
2948
|
+
let o, s;
|
|
2949
2949
|
const d = () => {
|
|
2950
|
-
clearTimeout(
|
|
2951
|
-
|
|
2950
|
+
clearTimeout(s), o = window.setTimeout(() => {
|
|
2951
|
+
r.classList.add("drp-date-picker__tooltip--visible"), this.positionActionButtonTooltip(a, r, n);
|
|
2952
2952
|
}, 300);
|
|
2953
2953
|
}, l = () => {
|
|
2954
|
-
clearTimeout(o),
|
|
2955
|
-
|
|
2954
|
+
clearTimeout(o), s = window.setTimeout(() => {
|
|
2955
|
+
r.classList.remove("drp-date-picker__tooltip--visible");
|
|
2956
2956
|
const c = this.actionButtonTooltipCleanups.get(n);
|
|
2957
2957
|
c && (c(), this.actionButtonTooltipCleanups.delete(n));
|
|
2958
2958
|
}, 100);
|
|
@@ -2963,19 +2963,19 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
2963
2963
|
* Position action button tooltip using Floating UI
|
|
2964
2964
|
*/
|
|
2965
2965
|
async positionActionButtonTooltip(a, t, n) {
|
|
2966
|
-
const { computePosition:
|
|
2967
|
-
|
|
2966
|
+
const { computePosition: r, flip: i, shift: o, offset: s, autoUpdate: d } = await Promise.resolve().then(() => en), l = d(a, t, () => {
|
|
2967
|
+
r(a, t, {
|
|
2968
2968
|
placement: "top",
|
|
2969
2969
|
strategy: "fixed",
|
|
2970
2970
|
middleware: [
|
|
2971
|
-
|
|
2972
|
-
|
|
2971
|
+
s(8),
|
|
2972
|
+
i(),
|
|
2973
2973
|
o({ padding: 8 })
|
|
2974
2974
|
]
|
|
2975
|
-
}).then(({ x: c, y:
|
|
2975
|
+
}).then(({ x: c, y: p }) => {
|
|
2976
2976
|
Object.assign(t.style, {
|
|
2977
2977
|
left: `${c}px`,
|
|
2978
|
-
top: `${
|
|
2978
|
+
top: `${p}px`
|
|
2979
2979
|
});
|
|
2980
2980
|
});
|
|
2981
2981
|
});
|
|
@@ -2998,8 +2998,8 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
2998
2998
|
const t = this.getEffectiveYearRange(), n = a.getFullYear();
|
|
2999
2999
|
if (n < t.min || n > t.max)
|
|
3000
3000
|
return !0;
|
|
3001
|
-
const
|
|
3002
|
-
return
|
|
3001
|
+
const r = this.getEffectiveMonthRange(), i = a.getMonth() + 1;
|
|
3002
|
+
return i < r.min || i > r.max ? !0 : Jt(
|
|
3003
3003
|
a,
|
|
3004
3004
|
this.normalizedMinDate,
|
|
3005
3005
|
this.normalizedMaxDate,
|
|
@@ -3029,13 +3029,13 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3029
3029
|
};
|
|
3030
3030
|
}
|
|
3031
3031
|
if (this.normalizedSpecialDates.has(t)) {
|
|
3032
|
-
const n = this.normalizedSpecialDates.get(t),
|
|
3032
|
+
const n = this.normalizedSpecialDates.get(t), r = this.options.badgeTextMember || "badgeText", i = this.options.badgeClassMember || "badgeClass", o = this.options.dayClassMember || "dayClass", s = this.options.badgeTooltipMember || "badgeTooltip", d = this.options.dayTooltipMember || "dayTooltip", l = this.options.isDisabledMember || "isDisabled";
|
|
3033
3033
|
return {
|
|
3034
3034
|
isDisabled: n[l] !== void 0 ? n[l] : this.isDateDisabledInternal(a),
|
|
3035
|
-
badgeClass: n[
|
|
3035
|
+
badgeClass: n[i],
|
|
3036
3036
|
dayClass: n[o],
|
|
3037
|
-
badgeText: n[
|
|
3038
|
-
badgeTooltip: n[
|
|
3037
|
+
badgeText: n[r],
|
|
3038
|
+
badgeTooltip: n[s],
|
|
3039
3039
|
dayTooltip: n[d]
|
|
3040
3040
|
};
|
|
3041
3041
|
}
|
|
@@ -3075,7 +3075,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3075
3075
|
return ut(a);
|
|
3076
3076
|
}
|
|
3077
3077
|
isSameDay(a, t) {
|
|
3078
|
-
return
|
|
3078
|
+
return pt(a, t);
|
|
3079
3079
|
}
|
|
3080
3080
|
isInRange(a) {
|
|
3081
3081
|
return na(a, this.selectedStartDate, this.selectedEndDate);
|
|
@@ -3097,10 +3097,10 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3097
3097
|
createCalendar() {
|
|
3098
3098
|
if (T.debug("Creating calendar"), this.calendar = document.createElement("div"), this.calendar.className = "drp-date-picker", this.options.unifiedNavigation && this.calendar.classList.add("drp-date-picker--unified-nav"), this.options.unifiedNavigation) {
|
|
3099
3099
|
this.unifiedHeader = document.createElement("div"), this.unifiedHeader.className = "drp-date-picker__unified-header";
|
|
3100
|
-
const n = this.options.unifiedHeaderInteractive ? "" : " drp-date-picker__unified-range--static",
|
|
3100
|
+
const n = this.options.unifiedHeaderInteractive ? "" : " drp-date-picker__unified-range--static", r = this.options.unifiedHeaderInteractive ? ' data-action="toggle-unified-rolling"' : "";
|
|
3101
3101
|
this.unifiedHeader.innerHTML = `
|
|
3102
3102
|
<button class="drp-date-picker__nav drp-date-picker__nav--prev" data-action="unified-prev"></button>
|
|
3103
|
-
<div class="drp-date-picker__unified-range${n}"${
|
|
3103
|
+
<div class="drp-date-picker__unified-range${n}"${r}></div>
|
|
3104
3104
|
<button class="drp-date-picker__nav drp-date-picker__nav--next" data-action="unified-next"></button>
|
|
3105
3105
|
`, this.unifiedRollingSelector = document.createElement("div"), this.unifiedRollingSelector.className = "drp-date-picker__unified-rolling-selector", this.unifiedRollingSelector.innerHTML = `
|
|
3106
3106
|
<div class="drp-date-picker__rolling-list" data-list="years" data-unified="true"></div>
|
|
@@ -3110,17 +3110,17 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3110
3110
|
const a = document.createElement("div");
|
|
3111
3111
|
this.options.monthLayout === "grid" ? (a.className = "drp-date-picker__months drp-date-picker__months--grid", this.options.gridRows && a.style.setProperty("--drp-grid-rows", String(this.options.gridRows)), this.options.gridColumns && a.style.setProperty("--drp-grid-columns", String(this.options.gridColumns))) : a.className = "drp-date-picker__months drp-date-picker__months--horizontal";
|
|
3112
3112
|
for (let n = 0; n < this.options.visibleMonthsCount; n++) {
|
|
3113
|
-
const
|
|
3114
|
-
|
|
3115
|
-
const
|
|
3113
|
+
const r = document.createElement("div");
|
|
3114
|
+
r.className = "drp-date-picker__month", r.dataset.monthIndex = String(n);
|
|
3115
|
+
const i = this.options.unifiedNavigation ? `<div class="drp-date-picker__header drp-date-picker__header--static">
|
|
3116
3116
|
<div class="drp-date-picker__month-year"></div>
|
|
3117
3117
|
</div>` : `<div class="drp-date-picker__header">
|
|
3118
3118
|
<button class="drp-date-picker__nav drp-date-picker__nav--prev" data-action="prev" data-month-index="${n}"></button>
|
|
3119
3119
|
<div class="drp-date-picker__month-year" data-action="toggle-rolling" data-month-index="${n}"></div>
|
|
3120
3120
|
<button class="drp-date-picker__nav drp-date-picker__nav--next" data-action="next" data-month-index="${n}"></button>
|
|
3121
3121
|
</div>`;
|
|
3122
|
-
|
|
3123
|
-
${
|
|
3122
|
+
r.innerHTML = `
|
|
3123
|
+
${i}
|
|
3124
3124
|
<div class="drp-date-picker__calendar-container">
|
|
3125
3125
|
<div class="drp-date-picker__rolling-selector" data-month-index="${n}">
|
|
3126
3126
|
<div class="drp-date-picker__rolling-list" data-list="years" data-month-index="${n}"></div>
|
|
@@ -3129,7 +3129,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3129
3129
|
<div class="drp-date-picker__weekdays"></div>
|
|
3130
3130
|
<div class="drp-date-picker__days" data-month-index="${n}"></div>
|
|
3131
3131
|
</div>
|
|
3132
|
-
`, a.appendChild(
|
|
3132
|
+
`, a.appendChild(r);
|
|
3133
3133
|
}
|
|
3134
3134
|
if (this.calendar.appendChild(a), this.options.selectionMode === "range") {
|
|
3135
3135
|
const n = document.createElement("div");
|
|
@@ -3152,17 +3152,17 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3152
3152
|
this.calendar.addEventListener("click", async (a) => {
|
|
3153
3153
|
const t = a.target;
|
|
3154
3154
|
a.stopPropagation();
|
|
3155
|
-
const n = t.dataset.action,
|
|
3155
|
+
const n = t.dataset.action, r = t.dataset.monthIndex, i = r ? parseInt(r) : 0;
|
|
3156
3156
|
if (n === "prev" || n === "next" || n === "unified-prev" || n === "unified-next") {
|
|
3157
3157
|
const o = t;
|
|
3158
3158
|
if (o.disabled || o.classList.contains("drp-date-picker__nav--disabled"))
|
|
3159
3159
|
return;
|
|
3160
3160
|
}
|
|
3161
|
-
if (n === "prev") this.prevMonth(
|
|
3162
|
-
else if (n === "next") this.nextMonth(
|
|
3161
|
+
if (n === "prev") this.prevMonth(i);
|
|
3162
|
+
else if (n === "next") this.nextMonth(i);
|
|
3163
3163
|
else if (n === "unified-prev") this.unifiedPrevMonth();
|
|
3164
3164
|
else if (n === "unified-next") this.unifiedNextMonth();
|
|
3165
|
-
else if (n === "toggle-rolling") this.toggleRollingSelector(
|
|
3165
|
+
else if (n === "toggle-rolling") this.toggleRollingSelector(i);
|
|
3166
3166
|
else if (n === "toggle-unified-rolling") this.toggleUnifiedRollingSelector();
|
|
3167
3167
|
else if (n === "today") this.selectToday();
|
|
3168
3168
|
else if (n === "clear") this.clearSelection();
|
|
@@ -3176,39 +3176,39 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3176
3176
|
const o = t.closest("[data-year]");
|
|
3177
3177
|
if (o.classList.contains("drp-date-picker__rolling-item--disabled"))
|
|
3178
3178
|
return;
|
|
3179
|
-
const
|
|
3179
|
+
const s = o.dataset.year;
|
|
3180
3180
|
if (o.dataset.unified === "true")
|
|
3181
|
-
|
|
3181
|
+
s && this.setUnifiedYear(parseInt(s));
|
|
3182
3182
|
else {
|
|
3183
3183
|
const d = o.dataset.monthIndex;
|
|
3184
|
-
|
|
3184
|
+
s && d && this.selectYear(parseInt(s), parseInt(d));
|
|
3185
3185
|
}
|
|
3186
3186
|
} else if (t.closest("[data-month]")) {
|
|
3187
3187
|
const o = t.closest("[data-month]");
|
|
3188
3188
|
if (o.classList.contains("drp-date-picker__rolling-item--disabled"))
|
|
3189
3189
|
return;
|
|
3190
|
-
const
|
|
3190
|
+
const s = o.dataset.month;
|
|
3191
3191
|
if (o.dataset.unified === "true")
|
|
3192
|
-
|
|
3192
|
+
s && this.setUnifiedMonth(parseInt(s));
|
|
3193
3193
|
else {
|
|
3194
3194
|
const d = o.dataset.monthIndex;
|
|
3195
|
-
|
|
3195
|
+
s && d && this.selectMonth(parseInt(s), parseInt(d));
|
|
3196
3196
|
}
|
|
3197
3197
|
} else if (!t.closest(".drp-date-picker__rolling-selector") && !t.closest(".drp-date-picker__unified-rolling-selector")) {
|
|
3198
3198
|
let o = !1;
|
|
3199
|
-
for (let
|
|
3200
|
-
this.showingRollingSelector[
|
|
3199
|
+
for (let s = 0; s < this.showingRollingSelector.length; s++)
|
|
3200
|
+
this.showingRollingSelector[s] && (this.showingRollingSelector[s] = !1, o = !0);
|
|
3201
3201
|
this.showingUnifiedRollingSelector && (this.showingUnifiedRollingSelector = !1, o = !0), o && this.renderCalendar();
|
|
3202
3202
|
}
|
|
3203
3203
|
}), this.calendar.addEventListener("mouseenter", (a) => {
|
|
3204
|
-
const t = a.target, n = t.closest(".drp-date-picker__day"),
|
|
3205
|
-
if (
|
|
3206
|
-
const o =
|
|
3207
|
-
o && this.showTooltip(
|
|
3204
|
+
const t = a.target, n = t.closest(".drp-date-picker__day"), r = t.closest(".drp-date-picker__badge-cell"), i = n || r;
|
|
3205
|
+
if (i && i instanceof HTMLElement) {
|
|
3206
|
+
const o = i.dataset.tooltip;
|
|
3207
|
+
o && this.showTooltip(i, o);
|
|
3208
3208
|
}
|
|
3209
3209
|
}, !0), this.calendar.addEventListener("mouseleave", (a) => {
|
|
3210
|
-
const t = a.target, n = t.closest(".drp-date-picker__day"),
|
|
3211
|
-
|
|
3210
|
+
const t = a.target, n = t.closest(".drp-date-picker__day"), r = t.closest(".drp-date-picker__badge-cell"), i = n || r;
|
|
3211
|
+
i && this.currentTooltipTarget === i && this.hideTooltip();
|
|
3212
3212
|
}, !0), this.calendar.addEventListener("mousedown", (a) => {
|
|
3213
3213
|
this.isCalendarActive = !0, a.stopPropagation();
|
|
3214
3214
|
}), this.calendar.addEventListener("focusin", () => {
|
|
@@ -3216,7 +3216,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3216
3216
|
}), document.addEventListener("mousedown", (a) => {
|
|
3217
3217
|
this.calendar.contains(a.target) || (this.isCalendarActive = !1);
|
|
3218
3218
|
}, !0), document.addEventListener("keydown", (a) => {
|
|
3219
|
-
var t, n,
|
|
3219
|
+
var t, n, r, i;
|
|
3220
3220
|
if (this.calendar.classList.contains("drp-date-picker--visible") && this.isCalendarActive) {
|
|
3221
3221
|
if (T.debug("Keydown", a.key, "Ctrl:", a.ctrlKey, "Meta:", a.metaKey, "Shift:", a.shiftKey, "Alt:", a.altKey), a.key === "Escape")
|
|
3222
3222
|
this.hide(), a.preventDefault();
|
|
@@ -3230,7 +3230,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3230
3230
|
const o = this.focusedDayIndex;
|
|
3231
3231
|
this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3232
3232
|
var l, c;
|
|
3233
|
-
const
|
|
3233
|
+
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3234
3234
|
d && (this.focusedDayIndex = Math.min(o !== null ? o : 0, d.length - 1), (l = d[this.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"), (c = d[this.focusedDayIndex]) == null || c.scrollIntoView({ block: "nearest" }));
|
|
3235
3235
|
}, 0);
|
|
3236
3236
|
} else
|
|
@@ -3242,7 +3242,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3242
3242
|
const o = this.focusedDayIndex;
|
|
3243
3243
|
this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3244
3244
|
var l, c;
|
|
3245
|
-
const
|
|
3245
|
+
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3246
3246
|
d && (this.focusedDayIndex = Math.min(o !== null ? o : 0, d.length - 1), (l = d[this.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"), (c = d[this.focusedDayIndex]) == null || c.scrollIntoView({ block: "nearest" }));
|
|
3247
3247
|
}, 0);
|
|
3248
3248
|
} else
|
|
@@ -3250,18 +3250,18 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3250
3250
|
a.preventDefault();
|
|
3251
3251
|
} else if (a.key === "Enter") {
|
|
3252
3252
|
if (this.focusedDayIndex !== null) {
|
|
3253
|
-
const o = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`),
|
|
3253
|
+
const o = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), s = o == null ? void 0 : o.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), d = s == null ? void 0 : s[this.focusedDayIndex];
|
|
3254
3254
|
d && d.click();
|
|
3255
3255
|
} else
|
|
3256
3256
|
this.hide();
|
|
3257
3257
|
a.preventDefault();
|
|
3258
3258
|
} else if (a.key === "Tab") {
|
|
3259
3259
|
if (this.options.visibleMonthsCount > 1) {
|
|
3260
|
-
const o = a.shiftKey ? -1 : 1,
|
|
3261
|
-
if (
|
|
3262
|
-
w.debug(`Tab: switching from Col${this.activeMonthIndex} to Col${
|
|
3260
|
+
const o = a.shiftKey ? -1 : 1, s = this.activeMonthIndex + o;
|
|
3261
|
+
if (s >= 0 && s < this.monthDates.length) {
|
|
3262
|
+
w.debug(`Tab: switching from Col${this.activeMonthIndex} to Col${s}`);
|
|
3263
3263
|
const d = this.focusedDayIndex ?? 0;
|
|
3264
|
-
this.activeMonthIndex =
|
|
3264
|
+
this.activeMonthIndex = s;
|
|
3265
3265
|
const l = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`);
|
|
3266
3266
|
if (l) {
|
|
3267
3267
|
const c = l.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
@@ -3273,77 +3273,77 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3273
3273
|
}
|
|
3274
3274
|
} else if (a.key === "t" || a.key === "T")
|
|
3275
3275
|
this.monthDates[this.activeMonthIndex] = /* @__PURE__ */ new Date(), this.renderCalendar(), setTimeout(() => {
|
|
3276
|
-
const o = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`),
|
|
3277
|
-
if (
|
|
3278
|
-
const d = Array.from(
|
|
3279
|
-
d !== -1 && (this.focusedDayIndex = d,
|
|
3276
|
+
const o = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), s = o == null ? void 0 : o.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3277
|
+
if (s) {
|
|
3278
|
+
const d = Array.from(s).findIndex((l) => l.classList.contains("drp-date-picker__day--today"));
|
|
3279
|
+
d !== -1 && (this.focusedDayIndex = d, s[d].classList.add("drp-date-picker__day--focused"), s[d].scrollIntoView({ block: "nearest" }));
|
|
3280
3280
|
}
|
|
3281
3281
|
}, 0), a.preventDefault();
|
|
3282
3282
|
else if (a.key === "PageUp") {
|
|
3283
3283
|
const o = this.focusedDayIndex;
|
|
3284
3284
|
this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3285
3285
|
var l, c;
|
|
3286
|
-
const
|
|
3286
|
+
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3287
3287
|
d && (this.focusedDayIndex = Math.min(o !== null ? o : 0, d.length - 1), (l = d[this.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"), (c = d[this.focusedDayIndex]) == null || c.scrollIntoView({ block: "nearest" }));
|
|
3288
3288
|
}, 0), a.preventDefault();
|
|
3289
3289
|
} else if (a.key === "PageDown") {
|
|
3290
3290
|
const o = this.focusedDayIndex;
|
|
3291
3291
|
this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3292
3292
|
var l, c;
|
|
3293
|
-
const
|
|
3293
|
+
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3294
3294
|
d && (this.focusedDayIndex = Math.min(o !== null ? o : 0, d.length - 1), (l = d[this.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"), (c = d[this.focusedDayIndex]) == null || c.scrollIntoView({ block: "nearest" }));
|
|
3295
3295
|
}, 0), a.preventDefault();
|
|
3296
3296
|
} else if (a.key === "Home") {
|
|
3297
3297
|
w.debug("Home key pressed, Ctrl:", a.ctrlKey, "Meta:", a.metaKey);
|
|
3298
|
-
const o = this.monthDates[this.activeMonthIndex].getFullYear(),
|
|
3298
|
+
const o = this.monthDates[this.activeMonthIndex].getFullYear(), s = this.monthDates[this.activeMonthIndex].getMonth();
|
|
3299
3299
|
if (a.ctrlKey || a.metaKey) {
|
|
3300
3300
|
w.debug("Ctrl+Home: Navigate to year start");
|
|
3301
|
-
const d =
|
|
3301
|
+
const d = s === 0, l = this.focusedDayIndex === 0;
|
|
3302
3302
|
d && l ? (w.debug("Already at Jan 1, going to previous year"), this.monthDates[this.activeMonthIndex] = new Date(o - 1, 0, 1)) : (w.debug("Going to Jan 1 of current year"), this.monthDates[this.activeMonthIndex] = new Date(o, 0, 1)), this.renderCalendar(), setTimeout(() => {
|
|
3303
|
-
var u,
|
|
3304
|
-
const c = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`),
|
|
3305
|
-
|
|
3303
|
+
var u, g;
|
|
3304
|
+
const c = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), p = c == null ? void 0 : c.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3305
|
+
p && (this.focusedDayIndex = 0, (u = p[0]) == null || u.classList.add("drp-date-picker__day--focused"), (g = p[0]) == null || g.scrollIntoView({ block: "nearest" }));
|
|
3306
3306
|
}, 0);
|
|
3307
3307
|
} else if (w.debug("Home: Navigate to first day (cycles to previous month if already there)"), this.focusedDayIndex === 0)
|
|
3308
3308
|
w.debug("Already on first day, going to previous month"), this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3309
|
-
var
|
|
3309
|
+
var p, u;
|
|
3310
3310
|
const l = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), c = l == null ? void 0 : l.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3311
|
-
c && (this.focusedDayIndex = 0, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((
|
|
3311
|
+
c && (this.focusedDayIndex = 0, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((g) => g.classList.remove("drp-date-picker__day--focused")), (p = c[0]) == null || p.classList.add("drp-date-picker__day--focused"), (u = c[0]) == null || u.scrollIntoView({ block: "nearest" }));
|
|
3312
3312
|
}, 0);
|
|
3313
3313
|
else {
|
|
3314
3314
|
this.focusedDayIndex = 0;
|
|
3315
3315
|
const l = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), c = l == null ? void 0 : l.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3316
|
-
c && (this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((
|
|
3316
|
+
c && (this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((p) => p.classList.remove("drp-date-picker__day--focused")), (t = c[0]) == null || t.classList.add("drp-date-picker__day--focused"), (n = c[0]) == null || n.scrollIntoView({ block: "nearest" }));
|
|
3317
3317
|
}
|
|
3318
3318
|
a.preventDefault();
|
|
3319
3319
|
} else if (a.key === "End") {
|
|
3320
3320
|
w.debug("End key pressed, Ctrl:", a.ctrlKey, "Meta:", a.metaKey);
|
|
3321
|
-
const o = this.monthDates[this.activeMonthIndex].getFullYear(),
|
|
3321
|
+
const o = this.monthDates[this.activeMonthIndex].getFullYear(), s = this.monthDates[this.activeMonthIndex].getMonth();
|
|
3322
3322
|
if (a.ctrlKey || a.metaKey) {
|
|
3323
3323
|
w.debug("Ctrl+End: Navigate to year end");
|
|
3324
|
-
const d =
|
|
3325
|
-
d &&
|
|
3324
|
+
const d = s === 11, l = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), c = l == null ? void 0 : l.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), p = c && this.focusedDayIndex === c.length - 1;
|
|
3325
|
+
d && p ? this.monthDates[this.activeMonthIndex] = new Date(o + 1, 11, 31) : this.monthDates[this.activeMonthIndex] = new Date(o, 11, 31), this.renderCalendar(), setTimeout(() => {
|
|
3326
3326
|
var m, f;
|
|
3327
|
-
const u = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`),
|
|
3328
|
-
|
|
3327
|
+
const u = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), g = u == null ? void 0 : u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3328
|
+
g && (this.focusedDayIndex = g.length - 1, (m = g[this.focusedDayIndex]) == null || m.classList.add("drp-date-picker__day--focused"), (f = g[this.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
3329
3329
|
}, 0);
|
|
3330
3330
|
} else {
|
|
3331
3331
|
w.debug("End: Navigate to last day (cycles to next month if already there)");
|
|
3332
3332
|
const d = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), l = d == null ? void 0 : d.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3333
3333
|
if (!l) return;
|
|
3334
3334
|
this.focusedDayIndex === l.length - 1 ? (w.debug("Already on last day, going to next month"), this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3335
|
-
var
|
|
3336
|
-
const
|
|
3337
|
-
u && (this.focusedDayIndex = u.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((f) => f.classList.remove("drp-date-picker__day--focused")), (
|
|
3338
|
-
}, 0)) : (this.focusedDayIndex = l.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((
|
|
3335
|
+
var g, m;
|
|
3336
|
+
const p = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), u = p == null ? void 0 : p.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3337
|
+
u && (this.focusedDayIndex = u.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((f) => f.classList.remove("drp-date-picker__day--focused")), (g = u[this.focusedDayIndex]) == null || g.classList.add("drp-date-picker__day--focused"), (m = u[this.focusedDayIndex]) == null || m.scrollIntoView({ block: "nearest" }));
|
|
3338
|
+
}, 0)) : (this.focusedDayIndex = l.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((p) => p.classList.remove("drp-date-picker__day--focused")), (r = l[this.focusedDayIndex]) == null || r.classList.add("drp-date-picker__day--focused"), (i = l[this.focusedDayIndex]) == null || i.scrollIntoView({ block: "nearest" }));
|
|
3339
3339
|
}
|
|
3340
3340
|
a.preventDefault();
|
|
3341
3341
|
}
|
|
3342
3342
|
}
|
|
3343
3343
|
}), this.clickOutsideHandler = (a) => {
|
|
3344
|
-
var
|
|
3345
|
-
const t = a.composedPath(), n = t[0],
|
|
3346
|
-
if (!
|
|
3344
|
+
var s;
|
|
3345
|
+
const t = a.composedPath(), n = t[0], r = t.includes(this.calendar), i = this.input && t.includes(this.input), o = (s = n.closest) == null ? void 0 : s.call(n, "[data-calendar-button]");
|
|
3346
|
+
if (!r && !i && !o)
|
|
3347
3347
|
if (this.options.positioningMode === "floating")
|
|
3348
3348
|
this.hide();
|
|
3349
3349
|
else {
|
|
@@ -3358,8 +3358,8 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3358
3358
|
parseFormat(a) {
|
|
3359
3359
|
const t = {};
|
|
3360
3360
|
let n = "";
|
|
3361
|
-
return a.includes("-") ? n = "-" : a.includes("/") ? n = "/" : a.includes(".") && (n = "."), a.split(n).forEach((
|
|
3362
|
-
|
|
3361
|
+
return a.includes("-") ? n = "-" : a.includes("/") ? n = "/" : a.includes(".") && (n = "."), a.split(n).forEach((i, o) => {
|
|
3362
|
+
i === "YYYY" || i === "YY" ? t.year = { index: o, length: i.length } : i === "MM" || i === "M" ? t.month = { index: o, length: 2 } : (i === "DD" || i === "D") && (t.day = { index: o, length: 2 });
|
|
3363
3363
|
}), {
|
|
3364
3364
|
format: a,
|
|
3365
3365
|
separator: n,
|
|
@@ -3369,9 +3369,9 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3369
3369
|
}
|
|
3370
3370
|
formatDate(a) {
|
|
3371
3371
|
if (!a) return "";
|
|
3372
|
-
const t = a.getFullYear(), n = String(a.getMonth() + 1).padStart(2, "0"),
|
|
3372
|
+
const t = a.getFullYear(), n = String(a.getMonth() + 1).padStart(2, "0"), r = String(a.getDate()).padStart(2, "0"), { format: i, separator: o, parts: s } = this.formatInfo, d = [];
|
|
3373
3373
|
for (let l = 0; l < 3; l++)
|
|
3374
|
-
|
|
3374
|
+
s.year && s.year.index === l ? d.push(s.year.length === 2 ? String(t).slice(-2) : t) : s.month && s.month.index === l ? d.push(n) : s.day && s.day.index === l && d.push(r);
|
|
3375
3375
|
return d.join(o);
|
|
3376
3376
|
}
|
|
3377
3377
|
// Reactive getters/setters for programmatic control
|
|
@@ -3445,44 +3445,44 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3445
3445
|
}
|
|
3446
3446
|
// Rendering methods - wrappers for pure functions
|
|
3447
3447
|
renderCalendar() {
|
|
3448
|
-
return
|
|
3448
|
+
return hn(this);
|
|
3449
3449
|
}
|
|
3450
3450
|
renderNormalView(a) {
|
|
3451
3451
|
return Nt(this, a);
|
|
3452
3452
|
}
|
|
3453
3453
|
renderDays(a, t) {
|
|
3454
|
-
return
|
|
3454
|
+
return zt(this, a, t);
|
|
3455
3455
|
}
|
|
3456
3456
|
renderRollingSelector(a) {
|
|
3457
|
-
return
|
|
3457
|
+
return Ft(this, a);
|
|
3458
3458
|
}
|
|
3459
3459
|
updateSummary() {
|
|
3460
|
-
return
|
|
3460
|
+
return bn(this);
|
|
3461
3461
|
}
|
|
3462
3462
|
updateSummaryWithPreview() {
|
|
3463
|
-
return
|
|
3463
|
+
return Ot(this);
|
|
3464
3464
|
}
|
|
3465
3465
|
updateDragPreview() {
|
|
3466
|
-
return
|
|
3466
|
+
return yn(this);
|
|
3467
3467
|
}
|
|
3468
3468
|
// Navigation methods - wrappers for pure functions
|
|
3469
3469
|
toggleRollingSelector(a) {
|
|
3470
|
-
return
|
|
3470
|
+
return rn(this, a);
|
|
3471
3471
|
}
|
|
3472
3472
|
selectYear(a, t) {
|
|
3473
3473
|
return on(this, a, t);
|
|
3474
3474
|
}
|
|
3475
3475
|
selectMonth(a, t) {
|
|
3476
|
-
return
|
|
3476
|
+
return sn(this, a, t);
|
|
3477
3477
|
}
|
|
3478
3478
|
checkAndResolveCollisions(a) {
|
|
3479
3479
|
return De(this, a);
|
|
3480
3480
|
}
|
|
3481
3481
|
prevMonth(a) {
|
|
3482
|
-
return
|
|
3482
|
+
return be(this, a);
|
|
3483
3483
|
}
|
|
3484
3484
|
nextMonth(a) {
|
|
3485
|
-
return
|
|
3485
|
+
return ye(this, a);
|
|
3486
3486
|
}
|
|
3487
3487
|
// Unified navigation methods
|
|
3488
3488
|
unifiedPrevMonth() {
|
|
@@ -3492,15 +3492,15 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3492
3492
|
return ln(this);
|
|
3493
3493
|
}
|
|
3494
3494
|
toggleUnifiedRollingSelector() {
|
|
3495
|
-
return
|
|
3495
|
+
return pn(this);
|
|
3496
3496
|
}
|
|
3497
3497
|
setUnifiedMonth(a) {
|
|
3498
3498
|
return un(this, a);
|
|
3499
3499
|
}
|
|
3500
3500
|
setUnifiedYear(a) {
|
|
3501
|
-
return
|
|
3501
|
+
return gn(this, a);
|
|
3502
3502
|
}
|
|
3503
|
-
findNextEnabledDayIndex(a, t, n,
|
|
3503
|
+
findNextEnabledDayIndex(a, t, n, r) {
|
|
3504
3504
|
return fe(this, a, t, n);
|
|
3505
3505
|
}
|
|
3506
3506
|
moveFocus(a) {
|
|
@@ -3539,7 +3539,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3539
3539
|
return Mn(this, a);
|
|
3540
3540
|
}
|
|
3541
3541
|
applyMask(a) {
|
|
3542
|
-
return
|
|
3542
|
+
return pe(this, a);
|
|
3543
3543
|
}
|
|
3544
3544
|
applyRangeMask(a) {
|
|
3545
3545
|
return Ut(this, a);
|
|
@@ -3605,39 +3605,39 @@ const jt = '@charset "UTF-8";:host,:root{--drp-font-scale: 1;--drp-spacing-scale
|
|
|
3605
3605
|
}
|
|
3606
3606
|
};
|
|
3607
3607
|
// Static flag to track if styles have been injected
|
|
3608
|
-
|
|
3608
|
+
b(ve, "stylesInjected", !1);
|
|
3609
3609
|
let je = ve;
|
|
3610
3610
|
class Wt extends HTMLElement {
|
|
3611
3611
|
constructor() {
|
|
3612
3612
|
super();
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3613
|
+
b(this, "picker");
|
|
3614
|
+
b(this, "inputElement");
|
|
3615
|
+
b(this, "shadow");
|
|
3616
3616
|
// Properties for complex data (not attributes)
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3617
|
+
b(this, "_specialDates");
|
|
3618
|
+
b(this, "_disabledDates");
|
|
3619
|
+
b(this, "_getDateMetadataCallback");
|
|
3620
|
+
b(this, "_badgeTooltipCallback");
|
|
3621
|
+
b(this, "_dayTooltipCallback");
|
|
3622
|
+
b(this, "_customStylesCallback");
|
|
3623
|
+
b(this, "_renderDayCallback");
|
|
3624
|
+
b(this, "_renderDayContentCallback");
|
|
3625
|
+
b(this, "_beforeDateSelectCallback");
|
|
3626
|
+
b(this, "_beforeMonthChangedCallback");
|
|
3627
|
+
b(this, "_formatSummaryCallback");
|
|
3628
|
+
b(this, "_getUnifiedHeaderCallback");
|
|
3629
3629
|
// Member mapping properties for specialDates array
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3630
|
+
b(this, "_dateMember");
|
|
3631
|
+
b(this, "_badgeTextMember");
|
|
3632
|
+
b(this, "_badgeClassMember");
|
|
3633
|
+
b(this, "_dayClassMember");
|
|
3634
|
+
b(this, "_badgeTooltipMember");
|
|
3635
|
+
b(this, "_dayTooltipMember");
|
|
3636
|
+
b(this, "_isDisabledMember");
|
|
3637
3637
|
// Action button configuration
|
|
3638
|
-
|
|
3638
|
+
b(this, "_actionButtons");
|
|
3639
3639
|
// Deferred re-initialization flag
|
|
3640
|
-
|
|
3640
|
+
b(this, "_pendingReinit", !1);
|
|
3641
3641
|
this.shadow = this.attachShadow({ mode: "open" });
|
|
3642
3642
|
}
|
|
3643
3643
|
static get observedAttributes() {
|
|
@@ -3682,8 +3682,8 @@ class Wt extends HTMLElement {
|
|
|
3682
3682
|
applySizeStyles() {
|
|
3683
3683
|
const t = this.shadow.querySelector(".drp-date-picker");
|
|
3684
3684
|
if (!t) return;
|
|
3685
|
-
const n = this.getAttribute("spacing"),
|
|
3686
|
-
t.classList.remove("drp-spacing-xs", "drp-spacing-sm", "drp-spacing-lg", "drp-spacing-xl"), t.classList.remove("drp-font-xs", "drp-font-sm", "drp-font-lg", "drp-font-xl"), t.classList.remove("drp-cell-xs", "drp-cell-sm", "drp-cell-lg", "drp-cell-xl"), n && n !== "md" && t.classList.add(`drp-spacing-${n}`),
|
|
3685
|
+
const n = this.getAttribute("spacing"), r = this.getAttribute("font-size"), i = this.getAttribute("cell-size"), o = this.hasAttribute("enable-transitions");
|
|
3686
|
+
t.classList.remove("drp-spacing-xs", "drp-spacing-sm", "drp-spacing-lg", "drp-spacing-xl"), t.classList.remove("drp-font-xs", "drp-font-sm", "drp-font-lg", "drp-font-xl"), t.classList.remove("drp-cell-xs", "drp-cell-sm", "drp-cell-lg", "drp-cell-xl"), n && n !== "md" && t.classList.add(`drp-spacing-${n}`), r && r !== "md" && t.classList.add(`drp-font-${r}`), i && i !== "md" && t.classList.add(`drp-cell-${i}`), o ? t.classList.add("drp-transitions-enabled") : t.classList.remove("drp-transitions-enabled");
|
|
3687
3687
|
}
|
|
3688
3688
|
connectedCallback() {
|
|
3689
3689
|
this.render(), this.initializePicker();
|
|
@@ -3691,41 +3691,41 @@ class Wt extends HTMLElement {
|
|
|
3691
3691
|
disconnectedCallback() {
|
|
3692
3692
|
this.picker && this.picker.destroy();
|
|
3693
3693
|
}
|
|
3694
|
-
attributeChangedCallback(t, n,
|
|
3695
|
-
if (n !==
|
|
3694
|
+
attributeChangedCallback(t, n, r) {
|
|
3695
|
+
if (n !== r) {
|
|
3696
3696
|
if (t === "spacing" || t === "font-size" || t === "cell-size" || t === "enable-transitions") {
|
|
3697
3697
|
this.applySizeStyles(), this.picker && t === "cell-size" && this.picker.renderCalendar();
|
|
3698
3698
|
return;
|
|
3699
3699
|
}
|
|
3700
|
-
this.picker && t !== "value" && t !== "placeholder" && (this.picker.destroy(), this.initializePicker()), t === "value" && this.inputElement &&
|
|
3700
|
+
this.picker && t !== "value" && t !== "placeholder" && (this.picker.destroy(), this.initializePicker()), t === "value" && this.inputElement && r !== null && (this.inputElement.value = r), t === "placeholder" && this.inputElement && r !== null && (this.inputElement.placeholder = r), t === "disabled" && this.inputElement && (r !== null ? this.inputElement.disabled = !0 : this.inputElement.disabled = !1);
|
|
3701
3701
|
}
|
|
3702
3702
|
}
|
|
3703
3703
|
render() {
|
|
3704
3704
|
const t = document.createElement("style");
|
|
3705
3705
|
if (t.textContent = jt, this.shadow.appendChild(t), (this.getAttribute("positioning-mode") || "floating") === "floating") {
|
|
3706
3706
|
this.inputElement = document.createElement("input"), this.inputElement.type = "text", this.inputElement.classList.add("drp-input", "drp-date-picker-input");
|
|
3707
|
-
const
|
|
3708
|
-
|
|
3709
|
-
const
|
|
3710
|
-
|
|
3707
|
+
const r = this.getAttribute("placeholder");
|
|
3708
|
+
r && (this.inputElement.placeholder = r);
|
|
3709
|
+
const i = this.getAttribute("value");
|
|
3710
|
+
i && (this.inputElement.value = i), this.hasAttribute("disabled") && (this.inputElement.disabled = !0), this.shadow.appendChild(this.inputElement);
|
|
3711
3711
|
}
|
|
3712
3712
|
}
|
|
3713
3713
|
initializePicker() {
|
|
3714
3714
|
const t = this.getAttribute("positioning-mode") || "floating";
|
|
3715
3715
|
if (t === "floating" && !this.inputElement) return;
|
|
3716
3716
|
let n;
|
|
3717
|
-
const
|
|
3718
|
-
|
|
3719
|
-
let
|
|
3717
|
+
const r = this.getAttribute("disabled-weekdays");
|
|
3718
|
+
r && (n = r.split(",").map((l) => parseInt(l.trim())).filter((l) => !isNaN(l) && l >= 0 && l <= 6));
|
|
3719
|
+
let i;
|
|
3720
3720
|
const o = this.getAttribute("week-start-day");
|
|
3721
3721
|
if (o)
|
|
3722
3722
|
if (o === "auto")
|
|
3723
|
-
|
|
3723
|
+
i = "auto";
|
|
3724
3724
|
else {
|
|
3725
3725
|
const l = parseInt(o);
|
|
3726
|
-
!isNaN(l) && l >= 0 && l <= 6 && (
|
|
3726
|
+
!isNaN(l) && l >= 0 && l <= 6 && (i = l);
|
|
3727
3727
|
}
|
|
3728
|
-
const
|
|
3728
|
+
const s = {
|
|
3729
3729
|
selectionMode: this.getAttribute("selection-mode") || "single",
|
|
3730
3730
|
dateFormatMask: this.getAttribute("date-format-mask") || "YYYY-MM-DD",
|
|
3731
3731
|
visibleMonthsCount: parseInt(this.getAttribute("visible-months-count") || "0") || void 0,
|
|
@@ -3744,7 +3744,7 @@ class Wt extends HTMLElement {
|
|
|
3744
3744
|
// Positioning
|
|
3745
3745
|
calendarPlacement: this.getAttribute("calendar-placement") || void 0,
|
|
3746
3746
|
// New options
|
|
3747
|
-
weekStartDay:
|
|
3747
|
+
weekStartDay: i,
|
|
3748
3748
|
minDate: this.getAttribute("min-date") || void 0,
|
|
3749
3749
|
maxDate: this.getAttribute("max-date") || void 0,
|
|
3750
3750
|
initialDate: this.getAttribute("initial-date") || void 0,
|
|
@@ -3786,7 +3786,7 @@ class Wt extends HTMLElement {
|
|
|
3786
3786
|
showClearButton: this.hasAttribute("show-clear-button") ? this.getAttribute("show-clear-button") === "true" : void 0,
|
|
3787
3787
|
showApplyButton: this.hasAttribute("show-apply-button") ? this.getAttribute("show-apply-button") === "true" : void 0
|
|
3788
3788
|
}, d = t === "inline" ? null : this.inputElement;
|
|
3789
|
-
if (this.picker = new je(d,
|
|
3789
|
+
if (this.picker = new je(d, s), this._customStylesCallback) {
|
|
3790
3790
|
const l = this._customStylesCallback();
|
|
3791
3791
|
if (l) {
|
|
3792
3792
|
const c = document.createElement("style");
|
|
@@ -3805,11 +3805,11 @@ class Wt extends HTMLElement {
|
|
|
3805
3805
|
}));
|
|
3806
3806
|
}
|
|
3807
3807
|
handleDateSelect(t) {
|
|
3808
|
-
var
|
|
3808
|
+
var i;
|
|
3809
3809
|
const n = {
|
|
3810
3810
|
date: t instanceof Date ? t : void 0,
|
|
3811
3811
|
dateRange: t instanceof Date || Array.isArray(t) ? void 0 : t,
|
|
3812
|
-
formattedValue: ((
|
|
3812
|
+
formattedValue: ((i = this.inputElement) == null ? void 0 : i.value) || ""
|
|
3813
3813
|
};
|
|
3814
3814
|
if (!this.picker) {
|
|
3815
3815
|
this.dispatchEvent(new CustomEvent("date-select", { detail: n, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: n, bubbles: !0, composed: !0 }));
|
|
@@ -3817,21 +3817,21 @@ class Wt extends HTMLElement {
|
|
|
3817
3817
|
}
|
|
3818
3818
|
if (this.picker.requiresApplyButton() && this.picker.pendingSelection)
|
|
3819
3819
|
return;
|
|
3820
|
-
const
|
|
3820
|
+
const r = this.picker.options.disabledDatesHandling;
|
|
3821
3821
|
if (!(t instanceof Date) && !Array.isArray(t) && "start" in t && "end" in t) {
|
|
3822
|
-
const o = t.start,
|
|
3823
|
-
switch (
|
|
3822
|
+
const o = t.start, s = t.end;
|
|
3823
|
+
switch (r) {
|
|
3824
3824
|
case "allow":
|
|
3825
|
-
n.enabledDates = this.picker.getEnabledDatesInRange(o,
|
|
3825
|
+
n.enabledDates = this.picker.getEnabledDatesInRange(o, s), n.disabledDates = this.picker.getDisabledDatesInRange(o, s), n.getEnabledDateCount = () => n.enabledDates.length, n.getTotalDays = () => Math.floor((s.getTime() - o.getTime()) / 864e5) + 1;
|
|
3826
3826
|
break;
|
|
3827
3827
|
case "split":
|
|
3828
|
-
n.dateRanges = this.picker.splitRangeByDisabled(o,
|
|
3828
|
+
n.dateRanges = this.picker.splitRangeByDisabled(o, s), n.dates = this.picker.getEnabledDatesInRange(o, s), n.dateRanges.length > 0 && (n.formattedValue = n.dateRanges.map((d) => `${this.picker.formatDate(d.start)} - ${this.picker.formatDate(d.end)}`).join(", "));
|
|
3829
3829
|
break;
|
|
3830
3830
|
case "individual":
|
|
3831
|
-
n.dates = this.picker.getEnabledDatesInRange(o,
|
|
3831
|
+
n.dates = this.picker.getEnabledDatesInRange(o, s), n.dateRange = null, n.dates.length > 0 && (n.formattedValue = n.dates.map((d) => this.picker.formatDate(d)).join(", "));
|
|
3832
3832
|
break;
|
|
3833
3833
|
case "block":
|
|
3834
|
-
n.dates = this.picker.getEnabledDatesInRange(o,
|
|
3834
|
+
n.dates = this.picker.getEnabledDatesInRange(o, s);
|
|
3835
3835
|
break;
|
|
3836
3836
|
}
|
|
3837
3837
|
}
|
|
@@ -4129,10 +4129,10 @@ function An() {
|
|
|
4129
4129
|
return Array.from(document.querySelectorAll("web-daterangepicker"));
|
|
4130
4130
|
}
|
|
4131
4131
|
typeof window < "u" && (window.components = window.components || {}, window.components["web-daterangepicker"] = {
|
|
4132
|
-
version: () => "1.
|
|
4132
|
+
version: () => "1.3.0",
|
|
4133
4133
|
config: {
|
|
4134
4134
|
name: "@keenmate/web-daterangepicker",
|
|
4135
|
-
version: "1.
|
|
4135
|
+
version: "1.3.0",
|
|
4136
4136
|
author: "Keenmate",
|
|
4137
4137
|
license: "MIT",
|
|
4138
4138
|
repository: "git+https://github.com/keenmate/web-daterangepicker.git",
|
|
@@ -4147,7 +4147,7 @@ typeof window < "u" && (window.components = window.components || {}, window.comp
|
|
|
4147
4147
|
disableLogging: mt,
|
|
4148
4148
|
setLogLevel: We,
|
|
4149
4149
|
setCategoryLevel: ua,
|
|
4150
|
-
getCategories:
|
|
4150
|
+
getCategories: pa
|
|
4151
4151
|
}
|
|
4152
4152
|
}, window.components["web-daterangepicker"].register());
|
|
4153
4153
|
export {
|