vue-spear-tip 0.1.21 → 0.2.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/.vite/manifest.json +37 -13
- package/dist/Button-CnxLmWuM.cjs +1 -0
- package/dist/{Button-B5JC_Z3M.js → Button-jDTW2utE.js} +6 -6
- package/dist/CodeHighlight-Byhxopeg.cjs +12 -0
- package/dist/CodeHighlight-cRYe58WO.js +44042 -0
- package/dist/DateField-DFWnFHty.cjs +18 -0
- package/dist/DateField-DeypzFPh.js +1779 -0
- package/dist/Interfaces/IGlobalComponent.d.ts +7 -0
- package/dist/{SelectField-CqIgEXt0.cjs → SelectField-CA-d5mIM.cjs} +1 -1
- package/dist/{SelectField-C-W06YsI.js → SelectField-O0_v8Hhl.js} +1 -1
- package/dist/StringField-Dyt_6I3b.cjs +1 -0
- package/dist/StringField-GNYdeEY4.js +59 -0
- package/dist/components/CodeHighlight/index.d.ts +2 -0
- package/dist/components/Documentation/Guides/guides.routes.d.ts +10 -0
- package/dist/components/Documentation/Kit/kit.routes.d.ts +10 -0
- package/dist/components/Documentation/router.d.ts +19 -0
- package/dist/components/Fields/DateField/index.d.ts +2 -0
- package/dist/components/LazyComponents.d.ts +3 -1
- package/dist/core/DT.d.ts +9 -0
- package/dist/core/EventManager.d.ts +24 -0
- package/dist/grid-style.css +1 -1
- package/dist/index-6ckmdr4W.cjs +1 -0
- package/dist/index-DqCea3It.js +4564 -0
- package/dist/index.d.ts +2 -1
- package/dist/kit/fields/index.d.ts +2 -1
- package/dist/replaceable/BaseComponent.vue +2 -5
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.css +1 -1
- package/dist/vue-spear-tip.es.js +13 -11
- package/docs/index.html +2 -2
- package/docs/static/Button-BYNjxbzy.css +1 -0
- package/docs/static/Button-Cj0SWlj9.js +1 -0
- package/docs/static/CodeHighlight-BcUKYHid.js +12 -0
- package/docs/static/CodeHighlight-CGrGqjhz.css +1 -0
- package/docs/static/DateField-BdXIy9u5.js +18 -0
- package/docs/static/DateField-C4W5EEHZ.css +1 -0
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-BwrX41LK.js → FieldComponent.vue_vue_type_script_lang-C74Z2qOx.js} +1 -1
- package/docs/static/{SelectField-C32fQ45_.css → SelectField-CM692gdJ.css} +1 -1
- package/docs/static/{SelectField-BEvxlKuY.js → SelectField-DyuIqNre.js} +4 -4
- package/docs/static/StringField-B__pgc9Z.css +1 -0
- package/docs/static/StringField-BapMRab1.js +1 -0
- package/docs/static/index-BYmsfhJF.js +2 -0
- package/docs/static/index-BZRwTK7V.js +2 -0
- package/docs/static/index-BlpLaTnO.js +2 -0
- package/docs/static/index-C-tYF7fp.js +2 -0
- package/docs/static/index-j64A2orD.js +2 -0
- package/docs/static/main-DHQAnZD9.js +98 -0
- package/docs/static/main-TZcMwf9S.css +1 -0
- package/package.json +10 -6
- package/dist/Button-BM4dbkA-.cjs +0 -1
- package/dist/StringField-CxzFR0Xg.cjs +0 -1
- package/dist/StringField-hh1z2GxL.js +0 -55
- package/dist/index-BlANuvIl.js +0 -843
- package/dist/index-COcPXtwa.cjs +0 -1
- package/docs/static/Button-CW0489RR.js +0 -1
- package/docs/static/Button-CtZSeU7e.css +0 -1
- package/docs/static/StringField-BHmLwqhr.js +0 -1
- package/docs/static/StringField-T9r0UtfP.css +0 -1
- package/docs/static/Watch-nc5lWXLk.js +0 -1
- package/docs/static/index-DEzBQmYG.js +0 -2
- package/docs/static/index-DRymGyyQ.js +0 -2
- package/docs/static/index-urSlQnTJ.js +0 -2
- package/docs/static/main-brDyF8bF.css +0 -1
- package/docs/static/main-d7PKjD0_.js +0 -22
|
@@ -0,0 +1,1779 @@
|
|
|
1
|
+
var Hn = Object.defineProperty;
|
|
2
|
+
var i = (a, o) => Hn(a, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { F as jn, P as Ye, V as Ln } from "./index-DqCea3It.js";
|
|
4
|
+
import { createElementBlock as ze, openBlock as Ge, normalizeClass as Rn, createCommentVNode as Wn, withDirectives as $n, toDisplayString as Bn, createElementVNode as Ze, withModifiers as Kn, vShow as Vn } from "vue";
|
|
5
|
+
import { _ as qn } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
6
|
+
function Jn(a) {
|
|
7
|
+
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
8
|
+
}
|
|
9
|
+
i(Jn, "getDefaultExportFromCjs");
|
|
10
|
+
var re = { exports: {} }, Un = re.exports, Qe;
|
|
11
|
+
function zn() {
|
|
12
|
+
return Qe || (Qe = 1, (function(a, o) {
|
|
13
|
+
(function(e, d) {
|
|
14
|
+
d(o);
|
|
15
|
+
})(Un, (function(e) {
|
|
16
|
+
var d = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
17
|
+
l10ns: {}
|
|
18
|
+
}, m = {
|
|
19
|
+
weekdays: {
|
|
20
|
+
shorthand: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
|
|
21
|
+
longhand: [
|
|
22
|
+
"Воскресенье",
|
|
23
|
+
"Понедельник",
|
|
24
|
+
"Вторник",
|
|
25
|
+
"Среда",
|
|
26
|
+
"Четверг",
|
|
27
|
+
"Пятница",
|
|
28
|
+
"Суббота"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
months: {
|
|
32
|
+
shorthand: [
|
|
33
|
+
"Янв",
|
|
34
|
+
"Фев",
|
|
35
|
+
"Март",
|
|
36
|
+
"Апр",
|
|
37
|
+
"Май",
|
|
38
|
+
"Июнь",
|
|
39
|
+
"Июль",
|
|
40
|
+
"Авг",
|
|
41
|
+
"Сен",
|
|
42
|
+
"Окт",
|
|
43
|
+
"Ноя",
|
|
44
|
+
"Дек"
|
|
45
|
+
],
|
|
46
|
+
longhand: [
|
|
47
|
+
"Январь",
|
|
48
|
+
"Февраль",
|
|
49
|
+
"Март",
|
|
50
|
+
"Апрель",
|
|
51
|
+
"Май",
|
|
52
|
+
"Июнь",
|
|
53
|
+
"Июль",
|
|
54
|
+
"Август",
|
|
55
|
+
"Сентябрь",
|
|
56
|
+
"Октябрь",
|
|
57
|
+
"Ноябрь",
|
|
58
|
+
"Декабрь"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
firstDayOfWeek: 1,
|
|
62
|
+
ordinal: /* @__PURE__ */ i(function() {
|
|
63
|
+
return "";
|
|
64
|
+
}, "ordinal"),
|
|
65
|
+
rangeSeparator: " — ",
|
|
66
|
+
weekAbbreviation: "Нед.",
|
|
67
|
+
scrollTitle: "Прокрутите для увеличения",
|
|
68
|
+
toggleTitle: "Нажмите для переключения",
|
|
69
|
+
amPM: ["ДП", "ПП"],
|
|
70
|
+
yearAriaLabel: "Год",
|
|
71
|
+
time_24hr: !0
|
|
72
|
+
};
|
|
73
|
+
d.l10ns.ru = m;
|
|
74
|
+
var g = d.l10ns;
|
|
75
|
+
e.Russian = m, e.default = g, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
76
|
+
}));
|
|
77
|
+
})(re, re.exports)), re.exports;
|
|
78
|
+
}
|
|
79
|
+
i(zn, "requireRu");
|
|
80
|
+
var Gn = zn(), _e = [
|
|
81
|
+
"onChange",
|
|
82
|
+
"onClose",
|
|
83
|
+
"onDayCreate",
|
|
84
|
+
"onDestroy",
|
|
85
|
+
"onKeyDown",
|
|
86
|
+
"onMonthChange",
|
|
87
|
+
"onOpen",
|
|
88
|
+
"onParseConfig",
|
|
89
|
+
"onReady",
|
|
90
|
+
"onValueUpdate",
|
|
91
|
+
"onYearChange",
|
|
92
|
+
"onPreCalendarPosition"
|
|
93
|
+
], Q = {
|
|
94
|
+
_disable: [],
|
|
95
|
+
allowInput: !1,
|
|
96
|
+
allowInvalidPreload: !1,
|
|
97
|
+
altFormat: "F j, Y",
|
|
98
|
+
altInput: !1,
|
|
99
|
+
altInputClass: "form-control input",
|
|
100
|
+
animate: typeof window == "object" && window.navigator.userAgent.indexOf("MSIE") === -1,
|
|
101
|
+
ariaDateFormat: "F j, Y",
|
|
102
|
+
autoFillDefaultTime: !0,
|
|
103
|
+
clickOpens: !0,
|
|
104
|
+
closeOnSelect: !0,
|
|
105
|
+
conjunction: ", ",
|
|
106
|
+
dateFormat: "Y-m-d",
|
|
107
|
+
defaultHour: 12,
|
|
108
|
+
defaultMinute: 0,
|
|
109
|
+
defaultSeconds: 0,
|
|
110
|
+
disable: [],
|
|
111
|
+
disableMobile: !1,
|
|
112
|
+
enableSeconds: !1,
|
|
113
|
+
enableTime: !1,
|
|
114
|
+
errorHandler: /* @__PURE__ */ i(function(a) {
|
|
115
|
+
return typeof console < "u" && console.warn(a);
|
|
116
|
+
}, "errorHandler"),
|
|
117
|
+
getWeek: /* @__PURE__ */ i(function(a) {
|
|
118
|
+
var o = new Date(a.getTime());
|
|
119
|
+
o.setHours(0, 0, 0, 0), o.setDate(o.getDate() + 3 - (o.getDay() + 6) % 7);
|
|
120
|
+
var e = new Date(o.getFullYear(), 0, 4);
|
|
121
|
+
return 1 + Math.round(((o.getTime() - e.getTime()) / 864e5 - 3 + (e.getDay() + 6) % 7) / 7);
|
|
122
|
+
}, "getWeek"),
|
|
123
|
+
hourIncrement: 1,
|
|
124
|
+
ignoredFocusElements: [],
|
|
125
|
+
inline: !1,
|
|
126
|
+
locale: "default",
|
|
127
|
+
minuteIncrement: 5,
|
|
128
|
+
mode: "single",
|
|
129
|
+
monthSelectorType: "dropdown",
|
|
130
|
+
nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
|
|
131
|
+
noCalendar: !1,
|
|
132
|
+
now: /* @__PURE__ */ new Date(),
|
|
133
|
+
onChange: [],
|
|
134
|
+
onClose: [],
|
|
135
|
+
onDayCreate: [],
|
|
136
|
+
onDestroy: [],
|
|
137
|
+
onKeyDown: [],
|
|
138
|
+
onMonthChange: [],
|
|
139
|
+
onOpen: [],
|
|
140
|
+
onParseConfig: [],
|
|
141
|
+
onReady: [],
|
|
142
|
+
onValueUpdate: [],
|
|
143
|
+
onYearChange: [],
|
|
144
|
+
onPreCalendarPosition: [],
|
|
145
|
+
plugins: [],
|
|
146
|
+
position: "auto",
|
|
147
|
+
positionElement: void 0,
|
|
148
|
+
prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
|
|
149
|
+
shorthandCurrentMonth: !1,
|
|
150
|
+
showMonths: 1,
|
|
151
|
+
static: !1,
|
|
152
|
+
time_24hr: !1,
|
|
153
|
+
weekNumbers: !1,
|
|
154
|
+
wrap: !1
|
|
155
|
+
}, le = {
|
|
156
|
+
weekdays: {
|
|
157
|
+
shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
158
|
+
longhand: [
|
|
159
|
+
"Sunday",
|
|
160
|
+
"Monday",
|
|
161
|
+
"Tuesday",
|
|
162
|
+
"Wednesday",
|
|
163
|
+
"Thursday",
|
|
164
|
+
"Friday",
|
|
165
|
+
"Saturday"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
months: {
|
|
169
|
+
shorthand: [
|
|
170
|
+
"Jan",
|
|
171
|
+
"Feb",
|
|
172
|
+
"Mar",
|
|
173
|
+
"Apr",
|
|
174
|
+
"May",
|
|
175
|
+
"Jun",
|
|
176
|
+
"Jul",
|
|
177
|
+
"Aug",
|
|
178
|
+
"Sep",
|
|
179
|
+
"Oct",
|
|
180
|
+
"Nov",
|
|
181
|
+
"Dec"
|
|
182
|
+
],
|
|
183
|
+
longhand: [
|
|
184
|
+
"January",
|
|
185
|
+
"February",
|
|
186
|
+
"March",
|
|
187
|
+
"April",
|
|
188
|
+
"May",
|
|
189
|
+
"June",
|
|
190
|
+
"July",
|
|
191
|
+
"August",
|
|
192
|
+
"September",
|
|
193
|
+
"October",
|
|
194
|
+
"November",
|
|
195
|
+
"December"
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
|
199
|
+
firstDayOfWeek: 0,
|
|
200
|
+
ordinal: /* @__PURE__ */ i(function(a) {
|
|
201
|
+
var o = a % 100;
|
|
202
|
+
if (o > 3 && o < 21)
|
|
203
|
+
return "th";
|
|
204
|
+
switch (o % 10) {
|
|
205
|
+
case 1:
|
|
206
|
+
return "st";
|
|
207
|
+
case 2:
|
|
208
|
+
return "nd";
|
|
209
|
+
case 3:
|
|
210
|
+
return "rd";
|
|
211
|
+
default:
|
|
212
|
+
return "th";
|
|
213
|
+
}
|
|
214
|
+
}, "ordinal"),
|
|
215
|
+
rangeSeparator: " to ",
|
|
216
|
+
weekAbbreviation: "Wk",
|
|
217
|
+
scrollTitle: "Scroll to increment",
|
|
218
|
+
toggleTitle: "Click to toggle",
|
|
219
|
+
amPM: ["AM", "PM"],
|
|
220
|
+
yearAriaLabel: "Year",
|
|
221
|
+
monthAriaLabel: "Month",
|
|
222
|
+
hourAriaLabel: "Hour",
|
|
223
|
+
minuteAriaLabel: "Minute",
|
|
224
|
+
time_24hr: !1
|
|
225
|
+
}, F = /* @__PURE__ */ i(function(a, o) {
|
|
226
|
+
return o === void 0 && (o = 2), ("000" + a).slice(o * -1);
|
|
227
|
+
}, "pad"), j = /* @__PURE__ */ i(function(a) {
|
|
228
|
+
return a === !0 ? 1 : 0;
|
|
229
|
+
}, "int");
|
|
230
|
+
function Xe(a, o) {
|
|
231
|
+
var e;
|
|
232
|
+
return function() {
|
|
233
|
+
var d = this, m = arguments;
|
|
234
|
+
clearTimeout(e), e = setTimeout(function() {
|
|
235
|
+
return a.apply(d, m);
|
|
236
|
+
}, o);
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
i(Xe, "debounce");
|
|
240
|
+
var Oe = /* @__PURE__ */ i(function(a) {
|
|
241
|
+
return a instanceof Array ? a : [a];
|
|
242
|
+
}, "arrayify");
|
|
243
|
+
function I(a, o, e) {
|
|
244
|
+
if (e === !0)
|
|
245
|
+
return a.classList.add(o);
|
|
246
|
+
a.classList.remove(o);
|
|
247
|
+
}
|
|
248
|
+
i(I, "toggleClass");
|
|
249
|
+
function C(a, o, e) {
|
|
250
|
+
var d = window.document.createElement(a);
|
|
251
|
+
return o = o || "", e = e || "", d.className = o, e !== void 0 && (d.textContent = e), d;
|
|
252
|
+
}
|
|
253
|
+
i(C, "createElement");
|
|
254
|
+
function pe(a) {
|
|
255
|
+
for (; a.firstChild; )
|
|
256
|
+
a.removeChild(a.firstChild);
|
|
257
|
+
}
|
|
258
|
+
i(pe, "clearNode");
|
|
259
|
+
function tn(a, o) {
|
|
260
|
+
if (o(a))
|
|
261
|
+
return a;
|
|
262
|
+
if (a.parentNode)
|
|
263
|
+
return tn(a.parentNode, o);
|
|
264
|
+
}
|
|
265
|
+
i(tn, "findParent");
|
|
266
|
+
function he(a, o) {
|
|
267
|
+
var e = C("div", "numInputWrapper"), d = C("input", "numInput " + a), m = C("span", "arrowUp"), g = C("span", "arrowDown");
|
|
268
|
+
if (navigator.userAgent.indexOf("MSIE 9.0") === -1 ? d.type = "number" : (d.type = "text", d.pattern = "\\d*"), o !== void 0)
|
|
269
|
+
for (var w in o)
|
|
270
|
+
d.setAttribute(w, o[w]);
|
|
271
|
+
return e.appendChild(d), e.appendChild(m), e.appendChild(g), e;
|
|
272
|
+
}
|
|
273
|
+
i(he, "createNumberInput");
|
|
274
|
+
function A(a) {
|
|
275
|
+
try {
|
|
276
|
+
if (typeof a.composedPath == "function") {
|
|
277
|
+
var o = a.composedPath();
|
|
278
|
+
return o[0];
|
|
279
|
+
}
|
|
280
|
+
return a.target;
|
|
281
|
+
} catch {
|
|
282
|
+
return a.target;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
i(A, "getEventTarget");
|
|
286
|
+
var Fe = /* @__PURE__ */ i(function() {
|
|
287
|
+
}, "doNothing"), De = /* @__PURE__ */ i(function(a, o, e) {
|
|
288
|
+
return e.months[o ? "shorthand" : "longhand"][a];
|
|
289
|
+
}, "monthToStr"), Zn = {
|
|
290
|
+
D: Fe,
|
|
291
|
+
F: /* @__PURE__ */ i(function(a, o, e) {
|
|
292
|
+
a.setMonth(e.months.longhand.indexOf(o));
|
|
293
|
+
}, "F"),
|
|
294
|
+
G: /* @__PURE__ */ i(function(a, o) {
|
|
295
|
+
a.setHours((a.getHours() >= 12 ? 12 : 0) + parseFloat(o));
|
|
296
|
+
}, "G"),
|
|
297
|
+
H: /* @__PURE__ */ i(function(a, o) {
|
|
298
|
+
a.setHours(parseFloat(o));
|
|
299
|
+
}, "H"),
|
|
300
|
+
J: /* @__PURE__ */ i(function(a, o) {
|
|
301
|
+
a.setDate(parseFloat(o));
|
|
302
|
+
}, "J"),
|
|
303
|
+
K: /* @__PURE__ */ i(function(a, o, e) {
|
|
304
|
+
a.setHours(a.getHours() % 12 + 12 * j(new RegExp(e.amPM[1], "i").test(o)));
|
|
305
|
+
}, "K"),
|
|
306
|
+
M: /* @__PURE__ */ i(function(a, o, e) {
|
|
307
|
+
a.setMonth(e.months.shorthand.indexOf(o));
|
|
308
|
+
}, "M"),
|
|
309
|
+
S: /* @__PURE__ */ i(function(a, o) {
|
|
310
|
+
a.setSeconds(parseFloat(o));
|
|
311
|
+
}, "S"),
|
|
312
|
+
U: /* @__PURE__ */ i(function(a, o) {
|
|
313
|
+
return new Date(parseFloat(o) * 1e3);
|
|
314
|
+
}, "U"),
|
|
315
|
+
W: /* @__PURE__ */ i(function(a, o, e) {
|
|
316
|
+
var d = parseInt(o), m = new Date(a.getFullYear(), 0, 2 + (d - 1) * 7, 0, 0, 0, 0);
|
|
317
|
+
return m.setDate(m.getDate() - m.getDay() + e.firstDayOfWeek), m;
|
|
318
|
+
}, "W"),
|
|
319
|
+
Y: /* @__PURE__ */ i(function(a, o) {
|
|
320
|
+
a.setFullYear(parseFloat(o));
|
|
321
|
+
}, "Y"),
|
|
322
|
+
Z: /* @__PURE__ */ i(function(a, o) {
|
|
323
|
+
return new Date(o);
|
|
324
|
+
}, "Z"),
|
|
325
|
+
d: /* @__PURE__ */ i(function(a, o) {
|
|
326
|
+
a.setDate(parseFloat(o));
|
|
327
|
+
}, "d"),
|
|
328
|
+
h: /* @__PURE__ */ i(function(a, o) {
|
|
329
|
+
a.setHours((a.getHours() >= 12 ? 12 : 0) + parseFloat(o));
|
|
330
|
+
}, "h"),
|
|
331
|
+
i: /* @__PURE__ */ i(function(a, o) {
|
|
332
|
+
a.setMinutes(parseFloat(o));
|
|
333
|
+
}, "i"),
|
|
334
|
+
j: /* @__PURE__ */ i(function(a, o) {
|
|
335
|
+
a.setDate(parseFloat(o));
|
|
336
|
+
}, "j"),
|
|
337
|
+
l: Fe,
|
|
338
|
+
m: /* @__PURE__ */ i(function(a, o) {
|
|
339
|
+
a.setMonth(parseFloat(o) - 1);
|
|
340
|
+
}, "m"),
|
|
341
|
+
n: /* @__PURE__ */ i(function(a, o) {
|
|
342
|
+
a.setMonth(parseFloat(o) - 1);
|
|
343
|
+
}, "n"),
|
|
344
|
+
s: /* @__PURE__ */ i(function(a, o) {
|
|
345
|
+
a.setSeconds(parseFloat(o));
|
|
346
|
+
}, "s"),
|
|
347
|
+
u: /* @__PURE__ */ i(function(a, o) {
|
|
348
|
+
return new Date(parseFloat(o));
|
|
349
|
+
}, "u"),
|
|
350
|
+
w: Fe,
|
|
351
|
+
y: /* @__PURE__ */ i(function(a, o) {
|
|
352
|
+
a.setFullYear(2e3 + parseFloat(o));
|
|
353
|
+
}, "y")
|
|
354
|
+
}, q = {
|
|
355
|
+
D: "",
|
|
356
|
+
F: "",
|
|
357
|
+
G: "(\\d\\d|\\d)",
|
|
358
|
+
H: "(\\d\\d|\\d)",
|
|
359
|
+
J: "(\\d\\d|\\d)\\w+",
|
|
360
|
+
K: "",
|
|
361
|
+
M: "",
|
|
362
|
+
S: "(\\d\\d|\\d)",
|
|
363
|
+
U: "(.+)",
|
|
364
|
+
W: "(\\d\\d|\\d)",
|
|
365
|
+
Y: "(\\d{4})",
|
|
366
|
+
Z: "(.+)",
|
|
367
|
+
d: "(\\d\\d|\\d)",
|
|
368
|
+
h: "(\\d\\d|\\d)",
|
|
369
|
+
i: "(\\d\\d|\\d)",
|
|
370
|
+
j: "(\\d\\d|\\d)",
|
|
371
|
+
l: "",
|
|
372
|
+
m: "(\\d\\d|\\d)",
|
|
373
|
+
n: "(\\d\\d|\\d)",
|
|
374
|
+
s: "(\\d\\d|\\d)",
|
|
375
|
+
u: "(.+)",
|
|
376
|
+
w: "(\\d\\d|\\d)",
|
|
377
|
+
y: "(\\d{2})"
|
|
378
|
+
}, oe = {
|
|
379
|
+
Z: /* @__PURE__ */ i(function(a) {
|
|
380
|
+
return a.toISOString();
|
|
381
|
+
}, "Z"),
|
|
382
|
+
D: /* @__PURE__ */ i(function(a, o, e) {
|
|
383
|
+
return o.weekdays.shorthand[oe.w(a, o, e)];
|
|
384
|
+
}, "D"),
|
|
385
|
+
F: /* @__PURE__ */ i(function(a, o, e) {
|
|
386
|
+
return De(oe.n(a, o, e) - 1, !1, o);
|
|
387
|
+
}, "F"),
|
|
388
|
+
G: /* @__PURE__ */ i(function(a, o, e) {
|
|
389
|
+
return F(oe.h(a, o, e));
|
|
390
|
+
}, "G"),
|
|
391
|
+
H: /* @__PURE__ */ i(function(a) {
|
|
392
|
+
return F(a.getHours());
|
|
393
|
+
}, "H"),
|
|
394
|
+
J: /* @__PURE__ */ i(function(a, o) {
|
|
395
|
+
return o.ordinal !== void 0 ? a.getDate() + o.ordinal(a.getDate()) : a.getDate();
|
|
396
|
+
}, "J"),
|
|
397
|
+
K: /* @__PURE__ */ i(function(a, o) {
|
|
398
|
+
return o.amPM[j(a.getHours() > 11)];
|
|
399
|
+
}, "K"),
|
|
400
|
+
M: /* @__PURE__ */ i(function(a, o) {
|
|
401
|
+
return De(a.getMonth(), !0, o);
|
|
402
|
+
}, "M"),
|
|
403
|
+
S: /* @__PURE__ */ i(function(a) {
|
|
404
|
+
return F(a.getSeconds());
|
|
405
|
+
}, "S"),
|
|
406
|
+
U: /* @__PURE__ */ i(function(a) {
|
|
407
|
+
return a.getTime() / 1e3;
|
|
408
|
+
}, "U"),
|
|
409
|
+
W: /* @__PURE__ */ i(function(a, o, e) {
|
|
410
|
+
return e.getWeek(a);
|
|
411
|
+
}, "W"),
|
|
412
|
+
Y: /* @__PURE__ */ i(function(a) {
|
|
413
|
+
return F(a.getFullYear(), 4);
|
|
414
|
+
}, "Y"),
|
|
415
|
+
d: /* @__PURE__ */ i(function(a) {
|
|
416
|
+
return F(a.getDate());
|
|
417
|
+
}, "d"),
|
|
418
|
+
h: /* @__PURE__ */ i(function(a) {
|
|
419
|
+
return a.getHours() % 12 ? a.getHours() % 12 : 12;
|
|
420
|
+
}, "h"),
|
|
421
|
+
i: /* @__PURE__ */ i(function(a) {
|
|
422
|
+
return F(a.getMinutes());
|
|
423
|
+
}, "i"),
|
|
424
|
+
j: /* @__PURE__ */ i(function(a) {
|
|
425
|
+
return a.getDate();
|
|
426
|
+
}, "j"),
|
|
427
|
+
l: /* @__PURE__ */ i(function(a, o) {
|
|
428
|
+
return o.weekdays.longhand[a.getDay()];
|
|
429
|
+
}, "l"),
|
|
430
|
+
m: /* @__PURE__ */ i(function(a) {
|
|
431
|
+
return F(a.getMonth() + 1);
|
|
432
|
+
}, "m"),
|
|
433
|
+
n: /* @__PURE__ */ i(function(a) {
|
|
434
|
+
return a.getMonth() + 1;
|
|
435
|
+
}, "n"),
|
|
436
|
+
s: /* @__PURE__ */ i(function(a) {
|
|
437
|
+
return a.getSeconds();
|
|
438
|
+
}, "s"),
|
|
439
|
+
u: /* @__PURE__ */ i(function(a) {
|
|
440
|
+
return a.getTime();
|
|
441
|
+
}, "u"),
|
|
442
|
+
w: /* @__PURE__ */ i(function(a) {
|
|
443
|
+
return a.getDay();
|
|
444
|
+
}, "w"),
|
|
445
|
+
y: /* @__PURE__ */ i(function(a) {
|
|
446
|
+
return String(a.getFullYear()).substring(2);
|
|
447
|
+
}, "y")
|
|
448
|
+
}, an = /* @__PURE__ */ i(function(a) {
|
|
449
|
+
var o = a.config, e = o === void 0 ? Q : o, d = a.l10n, m = d === void 0 ? le : d, g = a.isMobile, w = g === void 0 ? !1 : g;
|
|
450
|
+
return function(y, M, Y) {
|
|
451
|
+
var h = Y || m;
|
|
452
|
+
return e.formatDate !== void 0 && !w ? e.formatDate(y, M, h) : M.split("").map(function(T, _, H) {
|
|
453
|
+
return oe[T] && H[_ - 1] !== "\\" ? oe[T](y, h, e) : T !== "\\" ? T : "";
|
|
454
|
+
}).join("");
|
|
455
|
+
};
|
|
456
|
+
}, "createDateFormatter"), Ne = /* @__PURE__ */ i(function(a) {
|
|
457
|
+
var o = a.config, e = o === void 0 ? Q : o, d = a.l10n, m = d === void 0 ? le : d;
|
|
458
|
+
return function(g, w, y, M) {
|
|
459
|
+
if (!(g !== 0 && !g)) {
|
|
460
|
+
var Y = M || m, h, T = g;
|
|
461
|
+
if (g instanceof Date)
|
|
462
|
+
h = new Date(g.getTime());
|
|
463
|
+
else if (typeof g != "string" && g.toFixed !== void 0)
|
|
464
|
+
h = new Date(g);
|
|
465
|
+
else if (typeof g == "string") {
|
|
466
|
+
var _ = w || (e || Q).dateFormat, H = String(g).trim();
|
|
467
|
+
if (H === "today")
|
|
468
|
+
h = /* @__PURE__ */ new Date(), y = !0;
|
|
469
|
+
else if (e && e.parseDate)
|
|
470
|
+
h = e.parseDate(g, _);
|
|
471
|
+
else if (/Z$/.test(H) || /GMT$/.test(H))
|
|
472
|
+
h = new Date(g);
|
|
473
|
+
else {
|
|
474
|
+
for (var O = void 0, b = [], R = 0, be = 0, $ = ""; R < _.length; R++) {
|
|
475
|
+
var B = _[R], J = B === "\\", Me = _[R - 1] === "\\" || J;
|
|
476
|
+
if (q[B] && !Me) {
|
|
477
|
+
$ += q[B];
|
|
478
|
+
var K = new RegExp($).exec(g);
|
|
479
|
+
K && (O = !0) && b[B !== "Y" ? "push" : "unshift"]({
|
|
480
|
+
fn: Zn[B],
|
|
481
|
+
val: K[++be]
|
|
482
|
+
});
|
|
483
|
+
} else J || ($ += ".");
|
|
484
|
+
}
|
|
485
|
+
h = !e || !e.noCalendar ? new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1, 0, 0, 0, 0) : new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), b.forEach(function(U) {
|
|
486
|
+
var z = U.fn, Ce = U.val;
|
|
487
|
+
return h = z(h, Ce, Y) || h;
|
|
488
|
+
}), h = O ? h : void 0;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (!(h instanceof Date && !isNaN(h.getTime()))) {
|
|
492
|
+
e.errorHandler(new Error("Invalid date provided: " + T));
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
return y === !0 && h.setHours(0, 0, 0, 0), h;
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
}, "createDateParser");
|
|
499
|
+
function N(a, o, e) {
|
|
500
|
+
return e === void 0 && (e = !0), e !== !1 ? new Date(a.getTime()).setHours(0, 0, 0, 0) - new Date(o.getTime()).setHours(0, 0, 0, 0) : a.getTime() - o.getTime();
|
|
501
|
+
}
|
|
502
|
+
i(N, "compareDates");
|
|
503
|
+
var Qn = /* @__PURE__ */ i(function(a, o, e) {
|
|
504
|
+
return a > Math.min(o, e) && a < Math.max(o, e);
|
|
505
|
+
}, "isBetween"), Pe = /* @__PURE__ */ i(function(a, o, e) {
|
|
506
|
+
return a * 3600 + o * 60 + e;
|
|
507
|
+
}, "calculateSecondsSinceMidnight"), Xn = /* @__PURE__ */ i(function(a) {
|
|
508
|
+
var o = Math.floor(a / 3600), e = (a - o * 3600) / 60;
|
|
509
|
+
return [o, e, a - o * 3600 - e * 60];
|
|
510
|
+
}, "parseSeconds"), et = {
|
|
511
|
+
DAY: 864e5
|
|
512
|
+
};
|
|
513
|
+
function Ae(a) {
|
|
514
|
+
var o = a.defaultHour, e = a.defaultMinute, d = a.defaultSeconds;
|
|
515
|
+
if (a.minDate !== void 0) {
|
|
516
|
+
var m = a.minDate.getHours(), g = a.minDate.getMinutes(), w = a.minDate.getSeconds();
|
|
517
|
+
o < m && (o = m), o === m && e < g && (e = g), o === m && e === g && d < w && (d = a.minDate.getSeconds());
|
|
518
|
+
}
|
|
519
|
+
if (a.maxDate !== void 0) {
|
|
520
|
+
var y = a.maxDate.getHours(), M = a.maxDate.getMinutes();
|
|
521
|
+
o = Math.min(o, y), o === y && (e = Math.min(M, e)), o === y && e === M && (d = a.maxDate.getSeconds());
|
|
522
|
+
}
|
|
523
|
+
return { hours: o, minutes: e, seconds: d };
|
|
524
|
+
}
|
|
525
|
+
i(Ae, "getDefaultHours");
|
|
526
|
+
typeof Object.assign != "function" && (Object.assign = function(a) {
|
|
527
|
+
for (var o = [], e = 1; e < arguments.length; e++)
|
|
528
|
+
o[e - 1] = arguments[e];
|
|
529
|
+
if (!a)
|
|
530
|
+
throw TypeError("Cannot convert undefined or null to object");
|
|
531
|
+
for (var d = /* @__PURE__ */ i(function(y) {
|
|
532
|
+
y && Object.keys(y).forEach(function(M) {
|
|
533
|
+
return a[M] = y[M];
|
|
534
|
+
});
|
|
535
|
+
}, "_loop_1"), m = 0, g = o; m < g.length; m++) {
|
|
536
|
+
var w = g[m];
|
|
537
|
+
d(w);
|
|
538
|
+
}
|
|
539
|
+
return a;
|
|
540
|
+
});
|
|
541
|
+
var S = function() {
|
|
542
|
+
return S = Object.assign || function(a) {
|
|
543
|
+
for (var o, e = 1, d = arguments.length; e < d; e++) {
|
|
544
|
+
o = arguments[e];
|
|
545
|
+
for (var m in o) Object.prototype.hasOwnProperty.call(o, m) && (a[m] = o[m]);
|
|
546
|
+
}
|
|
547
|
+
return a;
|
|
548
|
+
}, S.apply(this, arguments);
|
|
549
|
+
}, en = function() {
|
|
550
|
+
for (var a = 0, o = 0, e = arguments.length; o < e; o++) a += arguments[o].length;
|
|
551
|
+
for (var d = Array(a), m = 0, o = 0; o < e; o++)
|
|
552
|
+
for (var g = arguments[o], w = 0, y = g.length; w < y; w++, m++)
|
|
553
|
+
d[m] = g[w];
|
|
554
|
+
return d;
|
|
555
|
+
}, nt = 300;
|
|
556
|
+
function tt(a, o) {
|
|
557
|
+
var e = {
|
|
558
|
+
config: S(S({}, Q), k.defaultConfig),
|
|
559
|
+
l10n: le
|
|
560
|
+
};
|
|
561
|
+
e.parseDate = Ne({ config: e.config, l10n: e.l10n }), e._handlers = [], e.pluginElements = [], e.loadedPlugins = [], e._bind = b, e._setHoursFromDate = _, e._positionCalendar = de, e.changeMonth = ye, e.changeYear = ue, e.clear = sn, e.close = cn, e.onMouseOver = ce, e._createElement = C, e.createDay = K, e.destroy = dn, e.isEnabled = V, e.jumpToDate = $, e.updateValue = W, e.open = pn, e.redraw = Ke, e.set = wn, e.setDate = bn, e.toggle = xn;
|
|
562
|
+
function d() {
|
|
563
|
+
e.utils = {
|
|
564
|
+
getDaysInMonth: /* @__PURE__ */ i(function(n, t) {
|
|
565
|
+
return n === void 0 && (n = e.currentMonth), t === void 0 && (t = e.currentYear), n === 1 && (t % 4 === 0 && t % 100 !== 0 || t % 400 === 0) ? 29 : e.l10n.daysInMonth[n];
|
|
566
|
+
}, "getDaysInMonth")
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
i(d, "setupHelperFunctions");
|
|
570
|
+
function m() {
|
|
571
|
+
e.element = e.input = a, e.isOpen = !1, hn(), Be(), Cn(), Mn(), d(), e.isMobile || Me(), be(), (e.selectedDates.length || e.config.noCalendar) && (e.config.enableTime && _(e.config.noCalendar ? e.latestSelectedDateObj : void 0), W(!1)), y();
|
|
572
|
+
var n = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
573
|
+
!e.isMobile && n && de(), E("onReady");
|
|
574
|
+
}
|
|
575
|
+
i(m, "init");
|
|
576
|
+
function g() {
|
|
577
|
+
var n;
|
|
578
|
+
return ((n = e.calendarContainer) === null || n === void 0 ? void 0 : n.getRootNode()).activeElement || document.activeElement;
|
|
579
|
+
}
|
|
580
|
+
i(g, "getClosestActiveElement");
|
|
581
|
+
function w(n) {
|
|
582
|
+
return n.bind(e);
|
|
583
|
+
}
|
|
584
|
+
i(w, "bindToInstance");
|
|
585
|
+
function y() {
|
|
586
|
+
var n = e.config;
|
|
587
|
+
n.weekNumbers === !1 && n.showMonths === 1 || n.noCalendar !== !0 && window.requestAnimationFrame(function() {
|
|
588
|
+
if (e.calendarContainer !== void 0 && (e.calendarContainer.style.visibility = "hidden", e.calendarContainer.style.display = "block"), e.daysContainer !== void 0) {
|
|
589
|
+
var t = (e.days.offsetWidth + 1) * n.showMonths;
|
|
590
|
+
e.daysContainer.style.width = t + "px", e.calendarContainer.style.width = t + (e.weekWrapper !== void 0 ? e.weekWrapper.offsetWidth : 0) + "px", e.calendarContainer.style.removeProperty("visibility"), e.calendarContainer.style.removeProperty("display");
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
i(y, "setCalendarWidth");
|
|
595
|
+
function M(n) {
|
|
596
|
+
if (e.selectedDates.length === 0) {
|
|
597
|
+
var t = e.config.minDate === void 0 || N(/* @__PURE__ */ new Date(), e.config.minDate) >= 0 ? /* @__PURE__ */ new Date() : new Date(e.config.minDate.getTime()), r = Ae(e.config);
|
|
598
|
+
t.setHours(r.hours, r.minutes, r.seconds, t.getMilliseconds()), e.selectedDates = [t], e.latestSelectedDateObj = t;
|
|
599
|
+
}
|
|
600
|
+
n !== void 0 && n.type !== "blur" && Tn(n);
|
|
601
|
+
var l = e._input.value;
|
|
602
|
+
T(), W(), e._input.value !== l && e._debouncedChange();
|
|
603
|
+
}
|
|
604
|
+
i(M, "updateTime");
|
|
605
|
+
function Y(n, t) {
|
|
606
|
+
return n % 12 + 12 * j(t === e.l10n.amPM[1]);
|
|
607
|
+
}
|
|
608
|
+
i(Y, "ampm2military");
|
|
609
|
+
function h(n) {
|
|
610
|
+
switch (n % 24) {
|
|
611
|
+
case 0:
|
|
612
|
+
case 12:
|
|
613
|
+
return 12;
|
|
614
|
+
default:
|
|
615
|
+
return n % 12;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
i(h, "military2ampm");
|
|
619
|
+
function T() {
|
|
620
|
+
if (!(e.hourElement === void 0 || e.minuteElement === void 0)) {
|
|
621
|
+
var n = (parseInt(e.hourElement.value.slice(-2), 10) || 0) % 24, t = (parseInt(e.minuteElement.value, 10) || 0) % 60, r = e.secondElement !== void 0 ? (parseInt(e.secondElement.value, 10) || 0) % 60 : 0;
|
|
622
|
+
e.amPM !== void 0 && (n = Y(n, e.amPM.textContent));
|
|
623
|
+
var l = e.config.minTime !== void 0 || e.config.minDate && e.minDateHasTime && e.latestSelectedDateObj && N(e.latestSelectedDateObj, e.config.minDate, !0) === 0, f = e.config.maxTime !== void 0 || e.config.maxDate && e.maxDateHasTime && e.latestSelectedDateObj && N(e.latestSelectedDateObj, e.config.maxDate, !0) === 0;
|
|
624
|
+
if (e.config.maxTime !== void 0 && e.config.minTime !== void 0 && e.config.minTime > e.config.maxTime) {
|
|
625
|
+
var u = Pe(e.config.minTime.getHours(), e.config.minTime.getMinutes(), e.config.minTime.getSeconds()), v = Pe(e.config.maxTime.getHours(), e.config.maxTime.getMinutes(), e.config.maxTime.getSeconds()), c = Pe(n, t, r);
|
|
626
|
+
if (c > v && c < u) {
|
|
627
|
+
var D = Xn(u);
|
|
628
|
+
n = D[0], t = D[1], r = D[2];
|
|
629
|
+
}
|
|
630
|
+
} else {
|
|
631
|
+
if (f) {
|
|
632
|
+
var s = e.config.maxTime !== void 0 ? e.config.maxTime : e.config.maxDate;
|
|
633
|
+
n = Math.min(n, s.getHours()), n === s.getHours() && (t = Math.min(t, s.getMinutes())), t === s.getMinutes() && (r = Math.min(r, s.getSeconds()));
|
|
634
|
+
}
|
|
635
|
+
if (l) {
|
|
636
|
+
var p = e.config.minTime !== void 0 ? e.config.minTime : e.config.minDate;
|
|
637
|
+
n = Math.max(n, p.getHours()), n === p.getHours() && t < p.getMinutes() && (t = p.getMinutes()), t === p.getMinutes() && (r = Math.max(r, p.getSeconds()));
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
H(n, t, r);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
i(T, "setHoursFromInputs");
|
|
644
|
+
function _(n) {
|
|
645
|
+
var t = n || e.latestSelectedDateObj;
|
|
646
|
+
t && t instanceof Date && H(t.getHours(), t.getMinutes(), t.getSeconds());
|
|
647
|
+
}
|
|
648
|
+
i(_, "setHoursFromDate");
|
|
649
|
+
function H(n, t, r) {
|
|
650
|
+
e.latestSelectedDateObj !== void 0 && e.latestSelectedDateObj.setHours(n % 24, t, r || 0, 0), !(!e.hourElement || !e.minuteElement || e.isMobile) && (e.hourElement.value = F(e.config.time_24hr ? n : (12 + n) % 12 + 12 * j(n % 12 === 0)), e.minuteElement.value = F(t), e.amPM !== void 0 && (e.amPM.textContent = e.l10n.amPM[j(n >= 12)]), e.secondElement !== void 0 && (e.secondElement.value = F(r)));
|
|
651
|
+
}
|
|
652
|
+
i(H, "setHours");
|
|
653
|
+
function O(n) {
|
|
654
|
+
var t = A(n), r = parseInt(t.value) + (n.delta || 0);
|
|
655
|
+
(r / 1e3 > 1 || n.key === "Enter" && !/[^\d]/.test(r.toString())) && ue(r);
|
|
656
|
+
}
|
|
657
|
+
i(O, "onYearInput");
|
|
658
|
+
function b(n, t, r, l) {
|
|
659
|
+
if (t instanceof Array)
|
|
660
|
+
return t.forEach(function(f) {
|
|
661
|
+
return b(n, f, r, l);
|
|
662
|
+
});
|
|
663
|
+
if (n instanceof Array)
|
|
664
|
+
return n.forEach(function(f) {
|
|
665
|
+
return b(f, t, r, l);
|
|
666
|
+
});
|
|
667
|
+
n.addEventListener(t, r, l), e._handlers.push({
|
|
668
|
+
remove: /* @__PURE__ */ i(function() {
|
|
669
|
+
return n.removeEventListener(t, r, l);
|
|
670
|
+
}, "remove")
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
i(b, "bind");
|
|
674
|
+
function R() {
|
|
675
|
+
E("onChange");
|
|
676
|
+
}
|
|
677
|
+
i(R, "triggerChange");
|
|
678
|
+
function be() {
|
|
679
|
+
if (e.config.wrap && ["open", "close", "toggle", "clear"].forEach(function(r) {
|
|
680
|
+
Array.prototype.forEach.call(e.element.querySelectorAll("[data-" + r + "]"), function(l) {
|
|
681
|
+
return b(l, "click", e[r]);
|
|
682
|
+
});
|
|
683
|
+
}), e.isMobile) {
|
|
684
|
+
yn();
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
var n = Xe(gn, 50);
|
|
688
|
+
if (e._debouncedChange = Xe(R, nt), e.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent) && b(e.daysContainer, "mouseover", function(r) {
|
|
689
|
+
e.config.mode === "range" && ce(A(r));
|
|
690
|
+
}), b(e._input, "keydown", Re), e.calendarContainer !== void 0 && b(e.calendarContainer, "keydown", Re), !e.config.inline && !e.config.static && b(window, "resize", n), window.ontouchstart !== void 0 ? b(window.document, "touchstart", xe) : b(window.document, "mousedown", xe), b(window.document, "focus", xe, { capture: !0 }), e.config.clickOpens === !0 && (b(e._input, "focus", e.open), b(e._input, "click", e.open)), e.daysContainer !== void 0 && (b(e.monthNav, "click", kn), b(e.monthNav, ["keyup", "increment"], O), b(e.daysContainer, "click", Ve)), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0) {
|
|
691
|
+
var t = /* @__PURE__ */ i(function(r) {
|
|
692
|
+
return A(r).select();
|
|
693
|
+
}, "selText");
|
|
694
|
+
b(e.timeContainer, ["increment"], M), b(e.timeContainer, "blur", M, { capture: !0 }), b(e.timeContainer, "click", B), b([e.hourElement, e.minuteElement], ["focus", "click"], t), e.secondElement !== void 0 && b(e.secondElement, "focus", function() {
|
|
695
|
+
return e.secondElement && e.secondElement.select();
|
|
696
|
+
}), e.amPM !== void 0 && b(e.amPM, "click", function(r) {
|
|
697
|
+
M(r);
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
e.config.allowInput && b(e._input, "blur", mn);
|
|
701
|
+
}
|
|
702
|
+
i(be, "bindEvents");
|
|
703
|
+
function $(n, t) {
|
|
704
|
+
var r = n !== void 0 ? e.parseDate(n) : e.latestSelectedDateObj || (e.config.minDate && e.config.minDate > e.now ? e.config.minDate : e.config.maxDate && e.config.maxDate < e.now ? e.config.maxDate : e.now), l = e.currentYear, f = e.currentMonth;
|
|
705
|
+
try {
|
|
706
|
+
r !== void 0 && (e.currentYear = r.getFullYear(), e.currentMonth = r.getMonth());
|
|
707
|
+
} catch (u) {
|
|
708
|
+
u.message = "Invalid date supplied: " + r, e.config.errorHandler(u);
|
|
709
|
+
}
|
|
710
|
+
t && e.currentYear !== l && (E("onYearChange"), G()), t && (e.currentYear !== l || e.currentMonth !== f) && E("onMonthChange"), e.redraw();
|
|
711
|
+
}
|
|
712
|
+
i($, "jumpToDate");
|
|
713
|
+
function B(n) {
|
|
714
|
+
var t = A(n);
|
|
715
|
+
~t.className.indexOf("arrow") && J(n, t.classList.contains("arrowUp") ? 1 : -1);
|
|
716
|
+
}
|
|
717
|
+
i(B, "timeIncrement");
|
|
718
|
+
function J(n, t, r) {
|
|
719
|
+
var l = n && A(n), f = r || l && l.parentNode && l.parentNode.firstChild, u = ke("increment");
|
|
720
|
+
u.delta = t, f && f.dispatchEvent(u);
|
|
721
|
+
}
|
|
722
|
+
i(J, "incrementNumInput");
|
|
723
|
+
function Me() {
|
|
724
|
+
var n = window.document.createDocumentFragment();
|
|
725
|
+
if (e.calendarContainer = C("div", "flatpickr-calendar"), e.calendarContainer.tabIndex = -1, !e.config.noCalendar) {
|
|
726
|
+
if (n.appendChild(ln()), e.innerContainer = C("div", "flatpickr-innerContainer"), e.config.weekNumbers) {
|
|
727
|
+
var t = un(), r = t.weekWrapper, l = t.weekNumbers;
|
|
728
|
+
e.innerContainer.appendChild(r), e.weekNumbers = l, e.weekWrapper = r;
|
|
729
|
+
}
|
|
730
|
+
e.rContainer = C("div", "flatpickr-rContainer"), e.rContainer.appendChild(je()), e.daysContainer || (e.daysContainer = C("div", "flatpickr-days"), e.daysContainer.tabIndex = -1), fe(), e.rContainer.appendChild(e.daysContainer), e.innerContainer.appendChild(e.rContainer), n.appendChild(e.innerContainer);
|
|
731
|
+
}
|
|
732
|
+
e.config.enableTime && n.appendChild(fn()), I(e.calendarContainer, "rangeMode", e.config.mode === "range"), I(e.calendarContainer, "animate", e.config.animate === !0), I(e.calendarContainer, "multiMonth", e.config.showMonths > 1), e.calendarContainer.appendChild(n);
|
|
733
|
+
var f = e.config.appendTo !== void 0 && e.config.appendTo.nodeType !== void 0;
|
|
734
|
+
if ((e.config.inline || e.config.static) && (e.calendarContainer.classList.add(e.config.inline ? "inline" : "static"), e.config.inline && (!f && e.element.parentNode ? e.element.parentNode.insertBefore(e.calendarContainer, e._input.nextSibling) : e.config.appendTo !== void 0 && e.config.appendTo.appendChild(e.calendarContainer)), e.config.static)) {
|
|
735
|
+
var u = C("div", "flatpickr-wrapper");
|
|
736
|
+
e.element.parentNode && e.element.parentNode.insertBefore(u, e.element), u.appendChild(e.element), e.altInput && u.appendChild(e.altInput), u.appendChild(e.calendarContainer);
|
|
737
|
+
}
|
|
738
|
+
!e.config.static && !e.config.inline && (e.config.appendTo !== void 0 ? e.config.appendTo : window.document.body).appendChild(e.calendarContainer);
|
|
739
|
+
}
|
|
740
|
+
i(Me, "build");
|
|
741
|
+
function K(n, t, r, l) {
|
|
742
|
+
var f = V(t, !0), u = C("span", n, t.getDate().toString());
|
|
743
|
+
return u.dateObj = t, u.$i = l, u.setAttribute("aria-label", e.formatDate(t, e.config.ariaDateFormat)), n.indexOf("hidden") === -1 && N(t, e.now) === 0 && (e.todayDateElem = u, u.classList.add("today"), u.setAttribute("aria-current", "date")), f ? (u.tabIndex = -1, Te(t) && (u.classList.add("selected"), e.selectedDateElem = u, e.config.mode === "range" && (I(u, "startRange", e.selectedDates[0] && N(t, e.selectedDates[0], !0) === 0), I(u, "endRange", e.selectedDates[1] && N(t, e.selectedDates[1], !0) === 0), n === "nextMonthDay" && u.classList.add("inRange")))) : u.classList.add("flatpickr-disabled"), e.config.mode === "range" && En(t) && !Te(t) && u.classList.add("inRange"), e.weekNumbers && e.config.showMonths === 1 && n !== "prevMonthDay" && l % 7 === 6 && e.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + e.config.getWeek(t) + "</span>"), E("onDayCreate", u), u;
|
|
744
|
+
}
|
|
745
|
+
i(K, "createDay");
|
|
746
|
+
function U(n) {
|
|
747
|
+
n.focus(), e.config.mode === "range" && ce(n);
|
|
748
|
+
}
|
|
749
|
+
i(U, "focusOnDayElem");
|
|
750
|
+
function z(n) {
|
|
751
|
+
for (var t = n > 0 ? 0 : e.config.showMonths - 1, r = n > 0 ? e.config.showMonths : -1, l = t; l != r; l += n)
|
|
752
|
+
for (var f = e.daysContainer.children[l], u = n > 0 ? 0 : f.children.length - 1, v = n > 0 ? f.children.length : -1, c = u; c != v; c += n) {
|
|
753
|
+
var D = f.children[c];
|
|
754
|
+
if (D.className.indexOf("hidden") === -1 && V(D.dateObj))
|
|
755
|
+
return D;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
i(z, "getFirstAvailableDay");
|
|
759
|
+
function Ce(n, t) {
|
|
760
|
+
for (var r = n.className.indexOf("Month") === -1 ? n.dateObj.getMonth() : e.currentMonth, l = t > 0 ? e.config.showMonths : -1, f = t > 0 ? 1 : -1, u = r - e.currentMonth; u != l; u += f)
|
|
761
|
+
for (var v = e.daysContainer.children[u], c = r - e.currentMonth === u ? n.$i + t : t < 0 ? v.children.length - 1 : 0, D = v.children.length, s = c; s >= 0 && s < D && s != (t > 0 ? D : -1); s += f) {
|
|
762
|
+
var p = v.children[s];
|
|
763
|
+
if (p.className.indexOf("hidden") === -1 && V(p.dateObj) && Math.abs(n.$i - s) >= Math.abs(t))
|
|
764
|
+
return U(p);
|
|
765
|
+
}
|
|
766
|
+
e.changeMonth(f), te(z(f), 0);
|
|
767
|
+
}
|
|
768
|
+
i(Ce, "getNextAvailableDay");
|
|
769
|
+
function te(n, t) {
|
|
770
|
+
var r = g(), l = se(r || document.body), f = n !== void 0 ? n : l ? r : e.selectedDateElem !== void 0 && se(e.selectedDateElem) ? e.selectedDateElem : e.todayDateElem !== void 0 && se(e.todayDateElem) ? e.todayDateElem : z(t > 0 ? 1 : -1);
|
|
771
|
+
f === void 0 ? e._input.focus() : l ? Ce(f, t) : U(f);
|
|
772
|
+
}
|
|
773
|
+
i(te, "focusOnDay");
|
|
774
|
+
function rn(n, t) {
|
|
775
|
+
for (var r = (new Date(n, t, 1).getDay() - e.l10n.firstDayOfWeek + 7) % 7, l = e.utils.getDaysInMonth((t - 1 + 12) % 12, n), f = e.utils.getDaysInMonth(t, n), u = window.document.createDocumentFragment(), v = e.config.showMonths > 1, c = v ? "prevMonthDay hidden" : "prevMonthDay", D = v ? "nextMonthDay hidden" : "nextMonthDay", s = l + 1 - r, p = 0; s <= l; s++, p++)
|
|
776
|
+
u.appendChild(K("flatpickr-day " + c, new Date(n, t - 1, s), s, p));
|
|
777
|
+
for (s = 1; s <= f; s++, p++)
|
|
778
|
+
u.appendChild(K("flatpickr-day", new Date(n, t, s), s, p));
|
|
779
|
+
for (var x = f + 1; x <= 42 - r && (e.config.showMonths === 1 || p % 7 !== 0); x++, p++)
|
|
780
|
+
u.appendChild(K("flatpickr-day " + D, new Date(n, t + 1, x % f), x, p));
|
|
781
|
+
var L = C("div", "dayContainer");
|
|
782
|
+
return L.appendChild(u), L;
|
|
783
|
+
}
|
|
784
|
+
i(rn, "buildMonthDays");
|
|
785
|
+
function fe() {
|
|
786
|
+
if (e.daysContainer !== void 0) {
|
|
787
|
+
pe(e.daysContainer), e.weekNumbers && pe(e.weekNumbers);
|
|
788
|
+
for (var n = document.createDocumentFragment(), t = 0; t < e.config.showMonths; t++) {
|
|
789
|
+
var r = new Date(e.currentYear, e.currentMonth, 1);
|
|
790
|
+
r.setMonth(e.currentMonth + t), n.appendChild(rn(r.getFullYear(), r.getMonth()));
|
|
791
|
+
}
|
|
792
|
+
e.daysContainer.appendChild(n), e.days = e.daysContainer.firstChild, e.config.mode === "range" && e.selectedDates.length === 1 && ce();
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
i(fe, "buildDays");
|
|
796
|
+
function G() {
|
|
797
|
+
if (!(e.config.showMonths > 1 || e.config.monthSelectorType !== "dropdown")) {
|
|
798
|
+
var n = /* @__PURE__ */ i(function(l) {
|
|
799
|
+
return e.config.minDate !== void 0 && e.currentYear === e.config.minDate.getFullYear() && l < e.config.minDate.getMonth() ? !1 : !(e.config.maxDate !== void 0 && e.currentYear === e.config.maxDate.getFullYear() && l > e.config.maxDate.getMonth());
|
|
800
|
+
}, "shouldBuildMonth");
|
|
801
|
+
e.monthsDropdownContainer.tabIndex = -1, e.monthsDropdownContainer.innerHTML = "";
|
|
802
|
+
for (var t = 0; t < 12; t++)
|
|
803
|
+
if (n(t)) {
|
|
804
|
+
var r = C("option", "flatpickr-monthDropdown-month");
|
|
805
|
+
r.value = new Date(e.currentYear, t).getMonth().toString(), r.textContent = De(t, e.config.shorthandCurrentMonth, e.l10n), r.tabIndex = -1, e.currentMonth === t && (r.selected = !0), e.monthsDropdownContainer.appendChild(r);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
i(G, "buildMonthSwitch");
|
|
810
|
+
function on() {
|
|
811
|
+
var n = C("div", "flatpickr-month"), t = window.document.createDocumentFragment(), r;
|
|
812
|
+
e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? r = C("span", "cur-month") : (e.monthsDropdownContainer = C("select", "flatpickr-monthDropdown-months"), e.monthsDropdownContainer.setAttribute("aria-label", e.l10n.monthAriaLabel), b(e.monthsDropdownContainer, "change", function(v) {
|
|
813
|
+
var c = A(v), D = parseInt(c.value, 10);
|
|
814
|
+
e.changeMonth(D - e.currentMonth), E("onMonthChange");
|
|
815
|
+
}), G(), r = e.monthsDropdownContainer);
|
|
816
|
+
var l = he("cur-year", { tabindex: "-1" }), f = l.getElementsByTagName("input")[0];
|
|
817
|
+
f.setAttribute("aria-label", e.l10n.yearAriaLabel), e.config.minDate && f.setAttribute("min", e.config.minDate.getFullYear().toString()), e.config.maxDate && (f.setAttribute("max", e.config.maxDate.getFullYear().toString()), f.disabled = !!e.config.minDate && e.config.minDate.getFullYear() === e.config.maxDate.getFullYear());
|
|
818
|
+
var u = C("div", "flatpickr-current-month");
|
|
819
|
+
return u.appendChild(r), u.appendChild(l), t.appendChild(u), n.appendChild(t), {
|
|
820
|
+
container: n,
|
|
821
|
+
yearElement: f,
|
|
822
|
+
monthElement: r
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
i(on, "buildMonth");
|
|
826
|
+
function He() {
|
|
827
|
+
pe(e.monthNav), e.monthNav.appendChild(e.prevMonthNav), e.config.showMonths && (e.yearElements = [], e.monthElements = []);
|
|
828
|
+
for (var n = e.config.showMonths; n--; ) {
|
|
829
|
+
var t = on();
|
|
830
|
+
e.yearElements.push(t.yearElement), e.monthElements.push(t.monthElement), e.monthNav.appendChild(t.container);
|
|
831
|
+
}
|
|
832
|
+
e.monthNav.appendChild(e.nextMonthNav);
|
|
833
|
+
}
|
|
834
|
+
i(He, "buildMonths");
|
|
835
|
+
function ln() {
|
|
836
|
+
return e.monthNav = C("div", "flatpickr-months"), e.yearElements = [], e.monthElements = [], e.prevMonthNav = C("span", "flatpickr-prev-month"), e.prevMonthNav.innerHTML = e.config.prevArrow, e.nextMonthNav = C("span", "flatpickr-next-month"), e.nextMonthNav.innerHTML = e.config.nextArrow, He(), Object.defineProperty(e, "_hidePrevMonthArrow", {
|
|
837
|
+
get: /* @__PURE__ */ i(function() {
|
|
838
|
+
return e.__hidePrevMonthArrow;
|
|
839
|
+
}, "get"),
|
|
840
|
+
set: /* @__PURE__ */ i(function(n) {
|
|
841
|
+
e.__hidePrevMonthArrow !== n && (I(e.prevMonthNav, "flatpickr-disabled", n), e.__hidePrevMonthArrow = n);
|
|
842
|
+
}, "set")
|
|
843
|
+
}), Object.defineProperty(e, "_hideNextMonthArrow", {
|
|
844
|
+
get: /* @__PURE__ */ i(function() {
|
|
845
|
+
return e.__hideNextMonthArrow;
|
|
846
|
+
}, "get"),
|
|
847
|
+
set: /* @__PURE__ */ i(function(n) {
|
|
848
|
+
e.__hideNextMonthArrow !== n && (I(e.nextMonthNav, "flatpickr-disabled", n), e.__hideNextMonthArrow = n);
|
|
849
|
+
}, "set")
|
|
850
|
+
}), e.currentYearElement = e.yearElements[0], ge(), e.monthNav;
|
|
851
|
+
}
|
|
852
|
+
i(ln, "buildMonthNav");
|
|
853
|
+
function fn() {
|
|
854
|
+
e.calendarContainer.classList.add("hasTime"), e.config.noCalendar && e.calendarContainer.classList.add("noCalendar");
|
|
855
|
+
var n = Ae(e.config);
|
|
856
|
+
e.timeContainer = C("div", "flatpickr-time"), e.timeContainer.tabIndex = -1;
|
|
857
|
+
var t = C("span", "flatpickr-time-separator", ":"), r = he("flatpickr-hour", {
|
|
858
|
+
"aria-label": e.l10n.hourAriaLabel
|
|
859
|
+
});
|
|
860
|
+
e.hourElement = r.getElementsByTagName("input")[0];
|
|
861
|
+
var l = he("flatpickr-minute", {
|
|
862
|
+
"aria-label": e.l10n.minuteAriaLabel
|
|
863
|
+
});
|
|
864
|
+
if (e.minuteElement = l.getElementsByTagName("input")[0], e.hourElement.tabIndex = e.minuteElement.tabIndex = -1, e.hourElement.value = F(e.latestSelectedDateObj ? e.latestSelectedDateObj.getHours() : e.config.time_24hr ? n.hours : h(n.hours)), e.minuteElement.value = F(e.latestSelectedDateObj ? e.latestSelectedDateObj.getMinutes() : n.minutes), e.hourElement.setAttribute("step", e.config.hourIncrement.toString()), e.minuteElement.setAttribute("step", e.config.minuteIncrement.toString()), e.hourElement.setAttribute("min", e.config.time_24hr ? "0" : "1"), e.hourElement.setAttribute("max", e.config.time_24hr ? "23" : "12"), e.hourElement.setAttribute("maxlength", "2"), e.minuteElement.setAttribute("min", "0"), e.minuteElement.setAttribute("max", "59"), e.minuteElement.setAttribute("maxlength", "2"), e.timeContainer.appendChild(r), e.timeContainer.appendChild(t), e.timeContainer.appendChild(l), e.config.time_24hr && e.timeContainer.classList.add("time24hr"), e.config.enableSeconds) {
|
|
865
|
+
e.timeContainer.classList.add("hasSeconds");
|
|
866
|
+
var f = he("flatpickr-second");
|
|
867
|
+
e.secondElement = f.getElementsByTagName("input")[0], e.secondElement.value = F(e.latestSelectedDateObj ? e.latestSelectedDateObj.getSeconds() : n.seconds), e.secondElement.setAttribute("step", e.minuteElement.getAttribute("step")), e.secondElement.setAttribute("min", "0"), e.secondElement.setAttribute("max", "59"), e.secondElement.setAttribute("maxlength", "2"), e.timeContainer.appendChild(C("span", "flatpickr-time-separator", ":")), e.timeContainer.appendChild(f);
|
|
868
|
+
}
|
|
869
|
+
return e.config.time_24hr || (e.amPM = C("span", "flatpickr-am-pm", e.l10n.amPM[j((e.latestSelectedDateObj ? e.hourElement.value : e.config.defaultHour) > 11)]), e.amPM.title = e.l10n.toggleTitle, e.amPM.tabIndex = -1, e.timeContainer.appendChild(e.amPM)), e.timeContainer;
|
|
870
|
+
}
|
|
871
|
+
i(fn, "buildTime");
|
|
872
|
+
function je() {
|
|
873
|
+
e.weekdayContainer ? pe(e.weekdayContainer) : e.weekdayContainer = C("div", "flatpickr-weekdays");
|
|
874
|
+
for (var n = e.config.showMonths; n--; ) {
|
|
875
|
+
var t = C("div", "flatpickr-weekdaycontainer");
|
|
876
|
+
e.weekdayContainer.appendChild(t);
|
|
877
|
+
}
|
|
878
|
+
return Le(), e.weekdayContainer;
|
|
879
|
+
}
|
|
880
|
+
i(je, "buildWeekdays");
|
|
881
|
+
function Le() {
|
|
882
|
+
if (e.weekdayContainer) {
|
|
883
|
+
var n = e.l10n.firstDayOfWeek, t = en(e.l10n.weekdays.shorthand);
|
|
884
|
+
n > 0 && n < t.length && (t = en(t.splice(n, t.length), t.splice(0, n)));
|
|
885
|
+
for (var r = e.config.showMonths; r--; )
|
|
886
|
+
e.weekdayContainer.children[r].innerHTML = `
|
|
887
|
+
<span class='flatpickr-weekday'>
|
|
888
|
+
` + t.join("</span><span class='flatpickr-weekday'>") + `
|
|
889
|
+
</span>
|
|
890
|
+
`;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
i(Le, "updateWeekdays");
|
|
894
|
+
function un() {
|
|
895
|
+
e.calendarContainer.classList.add("hasWeeks");
|
|
896
|
+
var n = C("div", "flatpickr-weekwrapper");
|
|
897
|
+
n.appendChild(C("span", "flatpickr-weekday", e.l10n.weekAbbreviation));
|
|
898
|
+
var t = C("div", "flatpickr-weeks");
|
|
899
|
+
return n.appendChild(t), {
|
|
900
|
+
weekWrapper: n,
|
|
901
|
+
weekNumbers: t
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
i(un, "buildWeeks");
|
|
905
|
+
function ye(n, t) {
|
|
906
|
+
t === void 0 && (t = !0);
|
|
907
|
+
var r = t ? n : n - e.currentMonth;
|
|
908
|
+
r < 0 && e._hidePrevMonthArrow === !0 || r > 0 && e._hideNextMonthArrow === !0 || (e.currentMonth += r, (e.currentMonth < 0 || e.currentMonth > 11) && (e.currentYear += e.currentMonth > 11 ? 1 : -1, e.currentMonth = (e.currentMonth + 12) % 12, E("onYearChange"), G()), fe(), E("onMonthChange"), ge());
|
|
909
|
+
}
|
|
910
|
+
i(ye, "changeMonth");
|
|
911
|
+
function sn(n, t) {
|
|
912
|
+
if (n === void 0 && (n = !0), t === void 0 && (t = !0), e.input.value = "", e.altInput !== void 0 && (e.altInput.value = ""), e.mobileInput !== void 0 && (e.mobileInput.value = ""), e.selectedDates = [], e.latestSelectedDateObj = void 0, t === !0 && (e.currentYear = e._initialDate.getFullYear(), e.currentMonth = e._initialDate.getMonth()), e.config.enableTime === !0) {
|
|
913
|
+
var r = Ae(e.config), l = r.hours, f = r.minutes, u = r.seconds;
|
|
914
|
+
H(l, f, u);
|
|
915
|
+
}
|
|
916
|
+
e.redraw(), n && E("onChange");
|
|
917
|
+
}
|
|
918
|
+
i(sn, "clear");
|
|
919
|
+
function cn() {
|
|
920
|
+
e.isOpen = !1, e.isMobile || (e.calendarContainer !== void 0 && e.calendarContainer.classList.remove("open"), e._input !== void 0 && e._input.classList.remove("active")), E("onClose");
|
|
921
|
+
}
|
|
922
|
+
i(cn, "close");
|
|
923
|
+
function dn() {
|
|
924
|
+
e.config !== void 0 && E("onDestroy");
|
|
925
|
+
for (var n = e._handlers.length; n--; )
|
|
926
|
+
e._handlers[n].remove();
|
|
927
|
+
if (e._handlers = [], e.mobileInput)
|
|
928
|
+
e.mobileInput.parentNode && e.mobileInput.parentNode.removeChild(e.mobileInput), e.mobileInput = void 0;
|
|
929
|
+
else if (e.calendarContainer && e.calendarContainer.parentNode)
|
|
930
|
+
if (e.config.static && e.calendarContainer.parentNode) {
|
|
931
|
+
var t = e.calendarContainer.parentNode;
|
|
932
|
+
if (t.lastChild && t.removeChild(t.lastChild), t.parentNode) {
|
|
933
|
+
for (; t.firstChild; )
|
|
934
|
+
t.parentNode.insertBefore(t.firstChild, t);
|
|
935
|
+
t.parentNode.removeChild(t);
|
|
936
|
+
}
|
|
937
|
+
} else
|
|
938
|
+
e.calendarContainer.parentNode.removeChild(e.calendarContainer);
|
|
939
|
+
e.altInput && (e.input.type = "text", e.altInput.parentNode && e.altInput.parentNode.removeChild(e.altInput), delete e.altInput), e.input && (e.input.type = e.input._type, e.input.classList.remove("flatpickr-input"), e.input.removeAttribute("readonly")), [
|
|
940
|
+
"_showTimeInput",
|
|
941
|
+
"latestSelectedDateObj",
|
|
942
|
+
"_hideNextMonthArrow",
|
|
943
|
+
"_hidePrevMonthArrow",
|
|
944
|
+
"__hideNextMonthArrow",
|
|
945
|
+
"__hidePrevMonthArrow",
|
|
946
|
+
"isMobile",
|
|
947
|
+
"isOpen",
|
|
948
|
+
"selectedDateElem",
|
|
949
|
+
"minDateHasTime",
|
|
950
|
+
"maxDateHasTime",
|
|
951
|
+
"days",
|
|
952
|
+
"daysContainer",
|
|
953
|
+
"_input",
|
|
954
|
+
"_positionElement",
|
|
955
|
+
"innerContainer",
|
|
956
|
+
"rContainer",
|
|
957
|
+
"monthNav",
|
|
958
|
+
"todayDateElem",
|
|
959
|
+
"calendarContainer",
|
|
960
|
+
"weekdayContainer",
|
|
961
|
+
"prevMonthNav",
|
|
962
|
+
"nextMonthNav",
|
|
963
|
+
"monthsDropdownContainer",
|
|
964
|
+
"currentMonthElement",
|
|
965
|
+
"currentYearElement",
|
|
966
|
+
"navigationCurrentMonth",
|
|
967
|
+
"selectedDateElem",
|
|
968
|
+
"config"
|
|
969
|
+
].forEach(function(r) {
|
|
970
|
+
try {
|
|
971
|
+
delete e[r];
|
|
972
|
+
} catch {
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
i(dn, "destroy");
|
|
977
|
+
function ae(n) {
|
|
978
|
+
return e.calendarContainer.contains(n);
|
|
979
|
+
}
|
|
980
|
+
i(ae, "isCalendarElem");
|
|
981
|
+
function xe(n) {
|
|
982
|
+
if (e.isOpen && !e.config.inline) {
|
|
983
|
+
var t = A(n), r = ae(t), l = t === e.input || t === e.altInput || e.element.contains(t) || n.path && n.path.indexOf && (~n.path.indexOf(e.input) || ~n.path.indexOf(e.altInput)), f = !l && !r && !ae(n.relatedTarget), u = !e.config.ignoredFocusElements.some(function(v) {
|
|
984
|
+
return v.contains(t);
|
|
985
|
+
});
|
|
986
|
+
f && u && (e.config.allowInput && e.setDate(e._input.value, !1, e.config.altInput ? e.config.altFormat : e.config.dateFormat), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0 && e.input.value !== "" && e.input.value !== void 0 && M(), e.close(), e.config && e.config.mode === "range" && e.selectedDates.length === 1 && e.clear(!1));
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
i(xe, "documentClick");
|
|
990
|
+
function ue(n) {
|
|
991
|
+
if (!(!n || e.config.minDate && n < e.config.minDate.getFullYear() || e.config.maxDate && n > e.config.maxDate.getFullYear())) {
|
|
992
|
+
var t = n, r = e.currentYear !== t;
|
|
993
|
+
e.currentYear = t || e.currentYear, e.config.maxDate && e.currentYear === e.config.maxDate.getFullYear() ? e.currentMonth = Math.min(e.config.maxDate.getMonth(), e.currentMonth) : e.config.minDate && e.currentYear === e.config.minDate.getFullYear() && (e.currentMonth = Math.max(e.config.minDate.getMonth(), e.currentMonth)), r && (e.redraw(), E("onYearChange"), G());
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
i(ue, "changeYear");
|
|
997
|
+
function V(n, t) {
|
|
998
|
+
var r;
|
|
999
|
+
t === void 0 && (t = !0);
|
|
1000
|
+
var l = e.parseDate(n, void 0, t);
|
|
1001
|
+
if (e.config.minDate && l && N(l, e.config.minDate, t !== void 0 ? t : !e.minDateHasTime) < 0 || e.config.maxDate && l && N(l, e.config.maxDate, t !== void 0 ? t : !e.maxDateHasTime) > 0)
|
|
1002
|
+
return !1;
|
|
1003
|
+
if (!e.config.enable && e.config.disable.length === 0)
|
|
1004
|
+
return !0;
|
|
1005
|
+
if (l === void 0)
|
|
1006
|
+
return !1;
|
|
1007
|
+
for (var f = !!e.config.enable, u = (r = e.config.enable) !== null && r !== void 0 ? r : e.config.disable, v = 0, c = void 0; v < u.length; v++) {
|
|
1008
|
+
if (c = u[v], typeof c == "function" && c(l))
|
|
1009
|
+
return f;
|
|
1010
|
+
if (c instanceof Date && l !== void 0 && c.getTime() === l.getTime())
|
|
1011
|
+
return f;
|
|
1012
|
+
if (typeof c == "string") {
|
|
1013
|
+
var D = e.parseDate(c, void 0, !0);
|
|
1014
|
+
return D && D.getTime() === l.getTime() ? f : !f;
|
|
1015
|
+
} else if (typeof c == "object" && l !== void 0 && c.from && c.to && l.getTime() >= c.from.getTime() && l.getTime() <= c.to.getTime())
|
|
1016
|
+
return f;
|
|
1017
|
+
}
|
|
1018
|
+
return !f;
|
|
1019
|
+
}
|
|
1020
|
+
i(V, "isEnabled");
|
|
1021
|
+
function se(n) {
|
|
1022
|
+
return e.daysContainer !== void 0 ? n.className.indexOf("hidden") === -1 && n.className.indexOf("flatpickr-disabled") === -1 && e.daysContainer.contains(n) : !1;
|
|
1023
|
+
}
|
|
1024
|
+
i(se, "isInView");
|
|
1025
|
+
function mn(n) {
|
|
1026
|
+
var t = n.target === e._input, r = e._input.value.trimEnd() !== Se();
|
|
1027
|
+
t && r && !(n.relatedTarget && ae(n.relatedTarget)) && e.setDate(e._input.value, !0, n.target === e.altInput ? e.config.altFormat : e.config.dateFormat);
|
|
1028
|
+
}
|
|
1029
|
+
i(mn, "onBlur");
|
|
1030
|
+
function Re(n) {
|
|
1031
|
+
var t = A(n), r = e.config.wrap ? a.contains(t) : t === e._input, l = e.config.allowInput, f = e.isOpen && (!l || !r), u = e.config.inline && r && !l;
|
|
1032
|
+
if (n.keyCode === 13 && r) {
|
|
1033
|
+
if (l)
|
|
1034
|
+
return e.setDate(e._input.value, !0, t === e.altInput ? e.config.altFormat : e.config.dateFormat), e.close(), t.blur();
|
|
1035
|
+
e.open();
|
|
1036
|
+
} else if (ae(t) || f || u) {
|
|
1037
|
+
var v = !!e.timeContainer && e.timeContainer.contains(t);
|
|
1038
|
+
switch (n.keyCode) {
|
|
1039
|
+
case 13:
|
|
1040
|
+
v ? (n.preventDefault(), M(), Ee()) : Ve(n);
|
|
1041
|
+
break;
|
|
1042
|
+
case 27:
|
|
1043
|
+
n.preventDefault(), Ee();
|
|
1044
|
+
break;
|
|
1045
|
+
case 8:
|
|
1046
|
+
case 46:
|
|
1047
|
+
r && !e.config.allowInput && (n.preventDefault(), e.clear());
|
|
1048
|
+
break;
|
|
1049
|
+
case 37:
|
|
1050
|
+
case 39:
|
|
1051
|
+
if (!v && !r) {
|
|
1052
|
+
n.preventDefault();
|
|
1053
|
+
var c = g();
|
|
1054
|
+
if (e.daysContainer !== void 0 && (l === !1 || c && se(c))) {
|
|
1055
|
+
var D = n.keyCode === 39 ? 1 : -1;
|
|
1056
|
+
n.ctrlKey ? (n.stopPropagation(), ye(D), te(z(1), 0)) : te(void 0, D);
|
|
1057
|
+
}
|
|
1058
|
+
} else e.hourElement && e.hourElement.focus();
|
|
1059
|
+
break;
|
|
1060
|
+
case 38:
|
|
1061
|
+
case 40:
|
|
1062
|
+
n.preventDefault();
|
|
1063
|
+
var s = n.keyCode === 40 ? 1 : -1;
|
|
1064
|
+
e.daysContainer && t.$i !== void 0 || t === e.input || t === e.altInput ? n.ctrlKey ? (n.stopPropagation(), ue(e.currentYear - s), te(z(1), 0)) : v || te(void 0, s * 7) : t === e.currentYearElement ? ue(e.currentYear - s) : e.config.enableTime && (!v && e.hourElement && e.hourElement.focus(), M(n), e._debouncedChange());
|
|
1065
|
+
break;
|
|
1066
|
+
case 9:
|
|
1067
|
+
if (v) {
|
|
1068
|
+
var p = [
|
|
1069
|
+
e.hourElement,
|
|
1070
|
+
e.minuteElement,
|
|
1071
|
+
e.secondElement,
|
|
1072
|
+
e.amPM
|
|
1073
|
+
].concat(e.pluginElements).filter(function(P) {
|
|
1074
|
+
return P;
|
|
1075
|
+
}), x = p.indexOf(t);
|
|
1076
|
+
if (x !== -1) {
|
|
1077
|
+
var L = p[x + (n.shiftKey ? -1 : 1)];
|
|
1078
|
+
n.preventDefault(), (L || e._input).focus();
|
|
1079
|
+
}
|
|
1080
|
+
} else !e.config.noCalendar && e.daysContainer && e.daysContainer.contains(t) && n.shiftKey && (n.preventDefault(), e._input.focus());
|
|
1081
|
+
break;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
if (e.amPM !== void 0 && t === e.amPM)
|
|
1085
|
+
switch (n.key) {
|
|
1086
|
+
case e.l10n.amPM[0].charAt(0):
|
|
1087
|
+
case e.l10n.amPM[0].charAt(0).toLowerCase():
|
|
1088
|
+
e.amPM.textContent = e.l10n.amPM[0], T(), W();
|
|
1089
|
+
break;
|
|
1090
|
+
case e.l10n.amPM[1].charAt(0):
|
|
1091
|
+
case e.l10n.amPM[1].charAt(0).toLowerCase():
|
|
1092
|
+
e.amPM.textContent = e.l10n.amPM[1], T(), W();
|
|
1093
|
+
break;
|
|
1094
|
+
}
|
|
1095
|
+
(r || ae(t)) && E("onKeyDown", n);
|
|
1096
|
+
}
|
|
1097
|
+
i(Re, "onKeyDown");
|
|
1098
|
+
function ce(n, t) {
|
|
1099
|
+
if (t === void 0 && (t = "flatpickr-day"), !(e.selectedDates.length !== 1 || n && (!n.classList.contains(t) || n.classList.contains("flatpickr-disabled")))) {
|
|
1100
|
+
for (var r = n ? n.dateObj.getTime() : e.days.firstElementChild.dateObj.getTime(), l = e.parseDate(e.selectedDates[0], void 0, !0).getTime(), f = Math.min(r, e.selectedDates[0].getTime()), u = Math.max(r, e.selectedDates[0].getTime()), v = !1, c = 0, D = 0, s = f; s < u; s += et.DAY)
|
|
1101
|
+
V(new Date(s), !0) || (v = v || s > f && s < u, s < l && (!c || s > c) ? c = s : s > l && (!D || s < D) && (D = s));
|
|
1102
|
+
var p = Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+" + e.config.showMonths + ") > ." + t));
|
|
1103
|
+
p.forEach(function(x) {
|
|
1104
|
+
var L = x.dateObj, P = L.getTime(), ie = c > 0 && P < c || D > 0 && P > D;
|
|
1105
|
+
if (ie) {
|
|
1106
|
+
x.classList.add("notAllowed"), ["inRange", "startRange", "endRange"].forEach(function(Z) {
|
|
1107
|
+
x.classList.remove(Z);
|
|
1108
|
+
});
|
|
1109
|
+
return;
|
|
1110
|
+
} else if (v && !ie)
|
|
1111
|
+
return;
|
|
1112
|
+
["startRange", "inRange", "endRange", "notAllowed"].forEach(function(Z) {
|
|
1113
|
+
x.classList.remove(Z);
|
|
1114
|
+
}), n !== void 0 && (n.classList.add(r <= e.selectedDates[0].getTime() ? "startRange" : "endRange"), l < r && P === l ? x.classList.add("startRange") : l > r && P === l && x.classList.add("endRange"), P >= c && (D === 0 || P <= D) && Qn(P, l, r) && x.classList.add("inRange"));
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
i(ce, "onMouseOver");
|
|
1119
|
+
function gn() {
|
|
1120
|
+
e.isOpen && !e.config.static && !e.config.inline && de();
|
|
1121
|
+
}
|
|
1122
|
+
i(gn, "onResize");
|
|
1123
|
+
function pn(n, t) {
|
|
1124
|
+
if (t === void 0 && (t = e._positionElement), e.isMobile === !0) {
|
|
1125
|
+
if (n) {
|
|
1126
|
+
n.preventDefault();
|
|
1127
|
+
var r = A(n);
|
|
1128
|
+
r && r.blur();
|
|
1129
|
+
}
|
|
1130
|
+
e.mobileInput !== void 0 && (e.mobileInput.focus(), e.mobileInput.click()), E("onOpen");
|
|
1131
|
+
return;
|
|
1132
|
+
} else if (e._input.disabled || e.config.inline)
|
|
1133
|
+
return;
|
|
1134
|
+
var l = e.isOpen;
|
|
1135
|
+
e.isOpen = !0, l || (e.calendarContainer.classList.add("open"), e._input.classList.add("active"), E("onOpen"), de(t)), e.config.enableTime === !0 && e.config.noCalendar === !0 && e.config.allowInput === !1 && (n === void 0 || !e.timeContainer.contains(n.relatedTarget)) && setTimeout(function() {
|
|
1136
|
+
return e.hourElement.select();
|
|
1137
|
+
}, 50);
|
|
1138
|
+
}
|
|
1139
|
+
i(pn, "open");
|
|
1140
|
+
function We(n) {
|
|
1141
|
+
return function(t) {
|
|
1142
|
+
var r = e.config["_" + n + "Date"] = e.parseDate(t, e.config.dateFormat), l = e.config["_" + (n === "min" ? "max" : "min") + "Date"];
|
|
1143
|
+
r !== void 0 && (e[n === "min" ? "minDateHasTime" : "maxDateHasTime"] = r.getHours() > 0 || r.getMinutes() > 0 || r.getSeconds() > 0), e.selectedDates && (e.selectedDates = e.selectedDates.filter(function(f) {
|
|
1144
|
+
return V(f);
|
|
1145
|
+
}), !e.selectedDates.length && n === "min" && _(r), W()), e.daysContainer && (Ke(), r !== void 0 ? e.currentYearElement[n] = r.getFullYear().toString() : e.currentYearElement.removeAttribute(n), e.currentYearElement.disabled = !!l && r !== void 0 && l.getFullYear() === r.getFullYear());
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
i(We, "minMaxDateSetter");
|
|
1149
|
+
function hn() {
|
|
1150
|
+
var n = [
|
|
1151
|
+
"wrap",
|
|
1152
|
+
"weekNumbers",
|
|
1153
|
+
"allowInput",
|
|
1154
|
+
"allowInvalidPreload",
|
|
1155
|
+
"clickOpens",
|
|
1156
|
+
"time_24hr",
|
|
1157
|
+
"enableTime",
|
|
1158
|
+
"noCalendar",
|
|
1159
|
+
"altInput",
|
|
1160
|
+
"shorthandCurrentMonth",
|
|
1161
|
+
"inline",
|
|
1162
|
+
"static",
|
|
1163
|
+
"enableSeconds",
|
|
1164
|
+
"disableMobile"
|
|
1165
|
+
], t = S(S({}, JSON.parse(JSON.stringify(a.dataset || {}))), o), r = {};
|
|
1166
|
+
e.config.parseDate = t.parseDate, e.config.formatDate = t.formatDate, Object.defineProperty(e.config, "enable", {
|
|
1167
|
+
get: /* @__PURE__ */ i(function() {
|
|
1168
|
+
return e.config._enable;
|
|
1169
|
+
}, "get"),
|
|
1170
|
+
set: /* @__PURE__ */ i(function(p) {
|
|
1171
|
+
e.config._enable = Je(p);
|
|
1172
|
+
}, "set")
|
|
1173
|
+
}), Object.defineProperty(e.config, "disable", {
|
|
1174
|
+
get: /* @__PURE__ */ i(function() {
|
|
1175
|
+
return e.config._disable;
|
|
1176
|
+
}, "get"),
|
|
1177
|
+
set: /* @__PURE__ */ i(function(p) {
|
|
1178
|
+
e.config._disable = Je(p);
|
|
1179
|
+
}, "set")
|
|
1180
|
+
});
|
|
1181
|
+
var l = t.mode === "time";
|
|
1182
|
+
if (!t.dateFormat && (t.enableTime || l)) {
|
|
1183
|
+
var f = k.defaultConfig.dateFormat || Q.dateFormat;
|
|
1184
|
+
r.dateFormat = t.noCalendar || l ? "H:i" + (t.enableSeconds ? ":S" : "") : f + " H:i" + (t.enableSeconds ? ":S" : "");
|
|
1185
|
+
}
|
|
1186
|
+
if (t.altInput && (t.enableTime || l) && !t.altFormat) {
|
|
1187
|
+
var u = k.defaultConfig.altFormat || Q.altFormat;
|
|
1188
|
+
r.altFormat = t.noCalendar || l ? "h:i" + (t.enableSeconds ? ":S K" : " K") : u + (" h:i" + (t.enableSeconds ? ":S" : "") + " K");
|
|
1189
|
+
}
|
|
1190
|
+
Object.defineProperty(e.config, "minDate", {
|
|
1191
|
+
get: /* @__PURE__ */ i(function() {
|
|
1192
|
+
return e.config._minDate;
|
|
1193
|
+
}, "get"),
|
|
1194
|
+
set: We("min")
|
|
1195
|
+
}), Object.defineProperty(e.config, "maxDate", {
|
|
1196
|
+
get: /* @__PURE__ */ i(function() {
|
|
1197
|
+
return e.config._maxDate;
|
|
1198
|
+
}, "get"),
|
|
1199
|
+
set: We("max")
|
|
1200
|
+
});
|
|
1201
|
+
var v = /* @__PURE__ */ i(function(p) {
|
|
1202
|
+
return function(x) {
|
|
1203
|
+
e.config[p === "min" ? "_minTime" : "_maxTime"] = e.parseDate(x, "H:i:S");
|
|
1204
|
+
};
|
|
1205
|
+
}, "minMaxTimeSetter");
|
|
1206
|
+
Object.defineProperty(e.config, "minTime", {
|
|
1207
|
+
get: /* @__PURE__ */ i(function() {
|
|
1208
|
+
return e.config._minTime;
|
|
1209
|
+
}, "get"),
|
|
1210
|
+
set: v("min")
|
|
1211
|
+
}), Object.defineProperty(e.config, "maxTime", {
|
|
1212
|
+
get: /* @__PURE__ */ i(function() {
|
|
1213
|
+
return e.config._maxTime;
|
|
1214
|
+
}, "get"),
|
|
1215
|
+
set: v("max")
|
|
1216
|
+
}), t.mode === "time" && (e.config.noCalendar = !0, e.config.enableTime = !0), Object.assign(e.config, r, t);
|
|
1217
|
+
for (var c = 0; c < n.length; c++)
|
|
1218
|
+
e.config[n[c]] = e.config[n[c]] === !0 || e.config[n[c]] === "true";
|
|
1219
|
+
_e.filter(function(p) {
|
|
1220
|
+
return e.config[p] !== void 0;
|
|
1221
|
+
}).forEach(function(p) {
|
|
1222
|
+
e.config[p] = Oe(e.config[p] || []).map(w);
|
|
1223
|
+
}), e.isMobile = !e.config.disableMobile && !e.config.inline && e.config.mode === "single" && !e.config.disable.length && !e.config.enable && !e.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
1224
|
+
for (var c = 0; c < e.config.plugins.length; c++) {
|
|
1225
|
+
var D = e.config.plugins[c](e) || {};
|
|
1226
|
+
for (var s in D)
|
|
1227
|
+
_e.indexOf(s) > -1 ? e.config[s] = Oe(D[s]).map(w).concat(e.config[s]) : typeof t[s] > "u" && (e.config[s] = D[s]);
|
|
1228
|
+
}
|
|
1229
|
+
t.altInputClass || (e.config.altInputClass = $e().className + " " + e.config.altInputClass), E("onParseConfig");
|
|
1230
|
+
}
|
|
1231
|
+
i(hn, "parseConfig");
|
|
1232
|
+
function $e() {
|
|
1233
|
+
return e.config.wrap ? a.querySelector("[data-input]") : a;
|
|
1234
|
+
}
|
|
1235
|
+
i($e, "getInputElem");
|
|
1236
|
+
function Be() {
|
|
1237
|
+
typeof e.config.locale != "object" && typeof k.l10ns[e.config.locale] > "u" && e.config.errorHandler(new Error("flatpickr: invalid locale " + e.config.locale)), e.l10n = S(S({}, k.l10ns.default), typeof e.config.locale == "object" ? e.config.locale : e.config.locale !== "default" ? k.l10ns[e.config.locale] : void 0), q.D = "(" + e.l10n.weekdays.shorthand.join("|") + ")", q.l = "(" + e.l10n.weekdays.longhand.join("|") + ")", q.M = "(" + e.l10n.months.shorthand.join("|") + ")", q.F = "(" + e.l10n.months.longhand.join("|") + ")", q.K = "(" + e.l10n.amPM[0] + "|" + e.l10n.amPM[1] + "|" + e.l10n.amPM[0].toLowerCase() + "|" + e.l10n.amPM[1].toLowerCase() + ")";
|
|
1238
|
+
var n = S(S({}, o), JSON.parse(JSON.stringify(a.dataset || {})));
|
|
1239
|
+
n.time_24hr === void 0 && k.defaultConfig.time_24hr === void 0 && (e.config.time_24hr = e.l10n.time_24hr), e.formatDate = an(e), e.parseDate = Ne({ config: e.config, l10n: e.l10n });
|
|
1240
|
+
}
|
|
1241
|
+
i(Be, "setupLocale");
|
|
1242
|
+
function de(n) {
|
|
1243
|
+
if (typeof e.config.position == "function")
|
|
1244
|
+
return void e.config.position(e, n);
|
|
1245
|
+
if (e.calendarContainer !== void 0) {
|
|
1246
|
+
E("onPreCalendarPosition");
|
|
1247
|
+
var t = n || e._positionElement, r = Array.prototype.reduce.call(e.calendarContainer.children, (function(Nn, Yn) {
|
|
1248
|
+
return Nn + Yn.offsetHeight;
|
|
1249
|
+
}), 0), l = e.calendarContainer.offsetWidth, f = e.config.position.split(" "), u = f[0], v = f.length > 1 ? f[1] : null, c = t.getBoundingClientRect(), D = window.innerHeight - c.bottom, s = u === "above" || u !== "below" && D < r && c.top > r, p = window.pageYOffset + c.top + (s ? -r - 2 : t.offsetHeight + 2);
|
|
1250
|
+
if (I(e.calendarContainer, "arrowTop", !s), I(e.calendarContainer, "arrowBottom", s), !e.config.inline) {
|
|
1251
|
+
var x = window.pageXOffset + c.left, L = !1, P = !1;
|
|
1252
|
+
v === "center" ? (x -= (l - c.width) / 2, L = !0) : v === "right" && (x -= l - c.width, P = !0), I(e.calendarContainer, "arrowLeft", !L && !P), I(e.calendarContainer, "arrowCenter", L), I(e.calendarContainer, "arrowRight", P);
|
|
1253
|
+
var ie = window.document.body.offsetWidth - (window.pageXOffset + c.right), Z = x + l > window.document.body.offsetWidth, Sn = ie + l > window.document.body.offsetWidth;
|
|
1254
|
+
if (I(e.calendarContainer, "rightMost", Z), !e.config.static)
|
|
1255
|
+
if (e.calendarContainer.style.top = p + "px", !Z)
|
|
1256
|
+
e.calendarContainer.style.left = x + "px", e.calendarContainer.style.right = "auto";
|
|
1257
|
+
else if (!Sn)
|
|
1258
|
+
e.calendarContainer.style.left = "auto", e.calendarContainer.style.right = ie + "px";
|
|
1259
|
+
else {
|
|
1260
|
+
var Ie = vn();
|
|
1261
|
+
if (Ie === void 0)
|
|
1262
|
+
return;
|
|
1263
|
+
var In = window.document.body.offsetWidth, _n = Math.max(0, In / 2 - l / 2), On = ".flatpickr-calendar.centerMost:before", Fn = ".flatpickr-calendar.centerMost:after", Pn = Ie.cssRules.length, An = "{left:" + c.left + "px;right:auto;}";
|
|
1264
|
+
I(e.calendarContainer, "rightMost", !1), I(e.calendarContainer, "centerMost", !0), Ie.insertRule(On + "," + Fn + An, Pn), e.calendarContainer.style.left = _n + "px", e.calendarContainer.style.right = "auto";
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
i(de, "positionCalendar");
|
|
1270
|
+
function vn() {
|
|
1271
|
+
for (var n = null, t = 0; t < document.styleSheets.length; t++) {
|
|
1272
|
+
var r = document.styleSheets[t];
|
|
1273
|
+
if (r.cssRules) {
|
|
1274
|
+
try {
|
|
1275
|
+
r.cssRules;
|
|
1276
|
+
} catch {
|
|
1277
|
+
continue;
|
|
1278
|
+
}
|
|
1279
|
+
n = r;
|
|
1280
|
+
break;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
return n ?? Dn();
|
|
1284
|
+
}
|
|
1285
|
+
i(vn, "getDocumentStyleSheet");
|
|
1286
|
+
function Dn() {
|
|
1287
|
+
var n = document.createElement("style");
|
|
1288
|
+
return document.head.appendChild(n), n.sheet;
|
|
1289
|
+
}
|
|
1290
|
+
i(Dn, "createStyleSheet");
|
|
1291
|
+
function Ke() {
|
|
1292
|
+
e.config.noCalendar || e.isMobile || (G(), ge(), fe());
|
|
1293
|
+
}
|
|
1294
|
+
i(Ke, "redraw");
|
|
1295
|
+
function Ee() {
|
|
1296
|
+
e._input.focus(), window.navigator.userAgent.indexOf("MSIE") !== -1 || navigator.msMaxTouchPoints !== void 0 ? setTimeout(e.close, 0) : e.close();
|
|
1297
|
+
}
|
|
1298
|
+
i(Ee, "focusAndClose");
|
|
1299
|
+
function Ve(n) {
|
|
1300
|
+
n.preventDefault(), n.stopPropagation();
|
|
1301
|
+
var t = /* @__PURE__ */ i(function(p) {
|
|
1302
|
+
return p.classList && p.classList.contains("flatpickr-day") && !p.classList.contains("flatpickr-disabled") && !p.classList.contains("notAllowed");
|
|
1303
|
+
}, "isSelectable"), r = tn(A(n), t);
|
|
1304
|
+
if (r !== void 0) {
|
|
1305
|
+
var l = r, f = e.latestSelectedDateObj = new Date(l.dateObj.getTime()), u = (f.getMonth() < e.currentMonth || f.getMonth() > e.currentMonth + e.config.showMonths - 1) && e.config.mode !== "range";
|
|
1306
|
+
if (e.selectedDateElem = l, e.config.mode === "single")
|
|
1307
|
+
e.selectedDates = [f];
|
|
1308
|
+
else if (e.config.mode === "multiple") {
|
|
1309
|
+
var v = Te(f);
|
|
1310
|
+
v ? e.selectedDates.splice(parseInt(v), 1) : e.selectedDates.push(f);
|
|
1311
|
+
} else e.config.mode === "range" && (e.selectedDates.length === 2 && e.clear(!1, !1), e.latestSelectedDateObj = f, e.selectedDates.push(f), N(f, e.selectedDates[0], !0) !== 0 && e.selectedDates.sort(function(p, x) {
|
|
1312
|
+
return p.getTime() - x.getTime();
|
|
1313
|
+
}));
|
|
1314
|
+
if (T(), u) {
|
|
1315
|
+
var c = e.currentYear !== f.getFullYear();
|
|
1316
|
+
e.currentYear = f.getFullYear(), e.currentMonth = f.getMonth(), c && (E("onYearChange"), G()), E("onMonthChange");
|
|
1317
|
+
}
|
|
1318
|
+
if (ge(), fe(), W(), !u && e.config.mode !== "range" && e.config.showMonths === 1 ? U(l) : e.selectedDateElem !== void 0 && e.hourElement === void 0 && e.selectedDateElem && e.selectedDateElem.focus(), e.hourElement !== void 0 && e.hourElement !== void 0 && e.hourElement.focus(), e.config.closeOnSelect) {
|
|
1319
|
+
var D = e.config.mode === "single" && !e.config.enableTime, s = e.config.mode === "range" && e.selectedDates.length === 2 && !e.config.enableTime;
|
|
1320
|
+
(D || s) && Ee();
|
|
1321
|
+
}
|
|
1322
|
+
R();
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
i(Ve, "selectDate");
|
|
1326
|
+
var me = {
|
|
1327
|
+
locale: [Be, Le],
|
|
1328
|
+
showMonths: [He, y, je],
|
|
1329
|
+
minDate: [$],
|
|
1330
|
+
maxDate: [$],
|
|
1331
|
+
positionElement: [Ue],
|
|
1332
|
+
clickOpens: [
|
|
1333
|
+
function() {
|
|
1334
|
+
e.config.clickOpens === !0 ? (b(e._input, "focus", e.open), b(e._input, "click", e.open)) : (e._input.removeEventListener("focus", e.open), e._input.removeEventListener("click", e.open));
|
|
1335
|
+
}
|
|
1336
|
+
]
|
|
1337
|
+
};
|
|
1338
|
+
function wn(n, t) {
|
|
1339
|
+
if (n !== null && typeof n == "object") {
|
|
1340
|
+
Object.assign(e.config, n);
|
|
1341
|
+
for (var r in n)
|
|
1342
|
+
me[r] !== void 0 && me[r].forEach(function(l) {
|
|
1343
|
+
return l();
|
|
1344
|
+
});
|
|
1345
|
+
} else
|
|
1346
|
+
e.config[n] = t, me[n] !== void 0 ? me[n].forEach(function(l) {
|
|
1347
|
+
return l();
|
|
1348
|
+
}) : _e.indexOf(n) > -1 && (e.config[n] = Oe(t));
|
|
1349
|
+
e.redraw(), W(!0);
|
|
1350
|
+
}
|
|
1351
|
+
i(wn, "set");
|
|
1352
|
+
function qe(n, t) {
|
|
1353
|
+
var r = [];
|
|
1354
|
+
if (n instanceof Array)
|
|
1355
|
+
r = n.map(function(l) {
|
|
1356
|
+
return e.parseDate(l, t);
|
|
1357
|
+
});
|
|
1358
|
+
else if (n instanceof Date || typeof n == "number")
|
|
1359
|
+
r = [e.parseDate(n, t)];
|
|
1360
|
+
else if (typeof n == "string")
|
|
1361
|
+
switch (e.config.mode) {
|
|
1362
|
+
case "single":
|
|
1363
|
+
case "time":
|
|
1364
|
+
r = [e.parseDate(n, t)];
|
|
1365
|
+
break;
|
|
1366
|
+
case "multiple":
|
|
1367
|
+
r = n.split(e.config.conjunction).map(function(l) {
|
|
1368
|
+
return e.parseDate(l, t);
|
|
1369
|
+
});
|
|
1370
|
+
break;
|
|
1371
|
+
case "range":
|
|
1372
|
+
r = n.split(e.l10n.rangeSeparator).map(function(l) {
|
|
1373
|
+
return e.parseDate(l, t);
|
|
1374
|
+
});
|
|
1375
|
+
break;
|
|
1376
|
+
}
|
|
1377
|
+
else
|
|
1378
|
+
e.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(n)));
|
|
1379
|
+
e.selectedDates = e.config.allowInvalidPreload ? r : r.filter(function(l) {
|
|
1380
|
+
return l instanceof Date && V(l, !1);
|
|
1381
|
+
}), e.config.mode === "range" && e.selectedDates.sort(function(l, f) {
|
|
1382
|
+
return l.getTime() - f.getTime();
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
i(qe, "setSelectedDate");
|
|
1386
|
+
function bn(n, t, r) {
|
|
1387
|
+
if (t === void 0 && (t = !1), r === void 0 && (r = e.config.dateFormat), n !== 0 && !n || n instanceof Array && n.length === 0)
|
|
1388
|
+
return e.clear(t);
|
|
1389
|
+
qe(n, r), e.latestSelectedDateObj = e.selectedDates[e.selectedDates.length - 1], e.redraw(), $(void 0, t), _(), e.selectedDates.length === 0 && e.clear(!1), W(t), t && E("onChange");
|
|
1390
|
+
}
|
|
1391
|
+
i(bn, "setDate");
|
|
1392
|
+
function Je(n) {
|
|
1393
|
+
return n.slice().map(function(t) {
|
|
1394
|
+
return typeof t == "string" || typeof t == "number" || t instanceof Date ? e.parseDate(t, void 0, !0) : t && typeof t == "object" && t.from && t.to ? {
|
|
1395
|
+
from: e.parseDate(t.from, void 0),
|
|
1396
|
+
to: e.parseDate(t.to, void 0)
|
|
1397
|
+
} : t;
|
|
1398
|
+
}).filter(function(t) {
|
|
1399
|
+
return t;
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
i(Je, "parseDateRules");
|
|
1403
|
+
function Mn() {
|
|
1404
|
+
e.selectedDates = [], e.now = e.parseDate(e.config.now) || /* @__PURE__ */ new Date();
|
|
1405
|
+
var n = e.config.defaultDate || ((e.input.nodeName === "INPUT" || e.input.nodeName === "TEXTAREA") && e.input.placeholder && e.input.value === e.input.placeholder ? null : e.input.value);
|
|
1406
|
+
n && qe(n, e.config.dateFormat), e._initialDate = e.selectedDates.length > 0 ? e.selectedDates[0] : e.config.minDate && e.config.minDate.getTime() > e.now.getTime() ? e.config.minDate : e.config.maxDate && e.config.maxDate.getTime() < e.now.getTime() ? e.config.maxDate : e.now, e.currentYear = e._initialDate.getFullYear(), e.currentMonth = e._initialDate.getMonth(), e.selectedDates.length > 0 && (e.latestSelectedDateObj = e.selectedDates[0]), e.config.minTime !== void 0 && (e.config.minTime = e.parseDate(e.config.minTime, "H:i")), e.config.maxTime !== void 0 && (e.config.maxTime = e.parseDate(e.config.maxTime, "H:i")), e.minDateHasTime = !!e.config.minDate && (e.config.minDate.getHours() > 0 || e.config.minDate.getMinutes() > 0 || e.config.minDate.getSeconds() > 0), e.maxDateHasTime = !!e.config.maxDate && (e.config.maxDate.getHours() > 0 || e.config.maxDate.getMinutes() > 0 || e.config.maxDate.getSeconds() > 0);
|
|
1407
|
+
}
|
|
1408
|
+
i(Mn, "setupDates");
|
|
1409
|
+
function Cn() {
|
|
1410
|
+
if (e.input = $e(), !e.input) {
|
|
1411
|
+
e.config.errorHandler(new Error("Invalid input element specified"));
|
|
1412
|
+
return;
|
|
1413
|
+
}
|
|
1414
|
+
e.input._type = e.input.type, e.input.type = "text", e.input.classList.add("flatpickr-input"), e._input = e.input, e.config.altInput && (e.altInput = C(e.input.nodeName, e.config.altInputClass), e._input = e.altInput, e.altInput.placeholder = e.input.placeholder, e.altInput.disabled = e.input.disabled, e.altInput.required = e.input.required, e.altInput.tabIndex = e.input.tabIndex, e.altInput.type = "text", e.input.setAttribute("type", "hidden"), !e.config.static && e.input.parentNode && e.input.parentNode.insertBefore(e.altInput, e.input.nextSibling)), e.config.allowInput || e._input.setAttribute("readonly", "readonly"), Ue();
|
|
1415
|
+
}
|
|
1416
|
+
i(Cn, "setupInputs");
|
|
1417
|
+
function Ue() {
|
|
1418
|
+
e._positionElement = e.config.positionElement || e._input;
|
|
1419
|
+
}
|
|
1420
|
+
i(Ue, "updatePositionElement");
|
|
1421
|
+
function yn() {
|
|
1422
|
+
var n = e.config.enableTime ? e.config.noCalendar ? "time" : "datetime-local" : "date";
|
|
1423
|
+
e.mobileInput = C("input", e.input.className + " flatpickr-mobile"), e.mobileInput.tabIndex = 1, e.mobileInput.type = n, e.mobileInput.disabled = e.input.disabled, e.mobileInput.required = e.input.required, e.mobileInput.placeholder = e.input.placeholder, e.mobileFormatStr = n === "datetime-local" ? "Y-m-d\\TH:i:S" : n === "date" ? "Y-m-d" : "H:i:S", e.selectedDates.length > 0 && (e.mobileInput.defaultValue = e.mobileInput.value = e.formatDate(e.selectedDates[0], e.mobileFormatStr)), e.config.minDate && (e.mobileInput.min = e.formatDate(e.config.minDate, "Y-m-d")), e.config.maxDate && (e.mobileInput.max = e.formatDate(e.config.maxDate, "Y-m-d")), e.input.getAttribute("step") && (e.mobileInput.step = String(e.input.getAttribute("step"))), e.input.type = "hidden", e.altInput !== void 0 && (e.altInput.type = "hidden");
|
|
1424
|
+
try {
|
|
1425
|
+
e.input.parentNode && e.input.parentNode.insertBefore(e.mobileInput, e.input.nextSibling);
|
|
1426
|
+
} catch {
|
|
1427
|
+
}
|
|
1428
|
+
b(e.mobileInput, "change", function(t) {
|
|
1429
|
+
e.setDate(A(t).value, !1, e.mobileFormatStr), E("onChange"), E("onClose");
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
i(yn, "setupMobile");
|
|
1433
|
+
function xn(n) {
|
|
1434
|
+
if (e.isOpen === !0)
|
|
1435
|
+
return e.close();
|
|
1436
|
+
e.open(n);
|
|
1437
|
+
}
|
|
1438
|
+
i(xn, "toggle");
|
|
1439
|
+
function E(n, t) {
|
|
1440
|
+
if (e.config !== void 0) {
|
|
1441
|
+
var r = e.config[n];
|
|
1442
|
+
if (r !== void 0 && r.length > 0)
|
|
1443
|
+
for (var l = 0; r[l] && l < r.length; l++)
|
|
1444
|
+
r[l](e.selectedDates, e.input.value, e, t);
|
|
1445
|
+
n === "onChange" && (e.input.dispatchEvent(ke("change")), e.input.dispatchEvent(ke("input")));
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
i(E, "triggerEvent");
|
|
1449
|
+
function ke(n) {
|
|
1450
|
+
var t = document.createEvent("Event");
|
|
1451
|
+
return t.initEvent(n, !0, !0), t;
|
|
1452
|
+
}
|
|
1453
|
+
i(ke, "createEvent");
|
|
1454
|
+
function Te(n) {
|
|
1455
|
+
for (var t = 0; t < e.selectedDates.length; t++) {
|
|
1456
|
+
var r = e.selectedDates[t];
|
|
1457
|
+
if (r instanceof Date && N(r, n) === 0)
|
|
1458
|
+
return "" + t;
|
|
1459
|
+
}
|
|
1460
|
+
return !1;
|
|
1461
|
+
}
|
|
1462
|
+
i(Te, "isDateSelected");
|
|
1463
|
+
function En(n) {
|
|
1464
|
+
return e.config.mode !== "range" || e.selectedDates.length < 2 ? !1 : N(n, e.selectedDates[0]) >= 0 && N(n, e.selectedDates[1]) <= 0;
|
|
1465
|
+
}
|
|
1466
|
+
i(En, "isDateInRange");
|
|
1467
|
+
function ge() {
|
|
1468
|
+
e.config.noCalendar || e.isMobile || !e.monthNav || (e.yearElements.forEach(function(n, t) {
|
|
1469
|
+
var r = new Date(e.currentYear, e.currentMonth, 1);
|
|
1470
|
+
r.setMonth(e.currentMonth + t), e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? e.monthElements[t].textContent = De(r.getMonth(), e.config.shorthandCurrentMonth, e.l10n) + " " : e.monthsDropdownContainer.value = r.getMonth().toString(), n.value = r.getFullYear().toString();
|
|
1471
|
+
}), e._hidePrevMonthArrow = e.config.minDate !== void 0 && (e.currentYear === e.config.minDate.getFullYear() ? e.currentMonth <= e.config.minDate.getMonth() : e.currentYear < e.config.minDate.getFullYear()), e._hideNextMonthArrow = e.config.maxDate !== void 0 && (e.currentYear === e.config.maxDate.getFullYear() ? e.currentMonth + 1 > e.config.maxDate.getMonth() : e.currentYear > e.config.maxDate.getFullYear()));
|
|
1472
|
+
}
|
|
1473
|
+
i(ge, "updateNavigationCurrentMonth");
|
|
1474
|
+
function Se(n) {
|
|
1475
|
+
var t = n || (e.config.altInput ? e.config.altFormat : e.config.dateFormat);
|
|
1476
|
+
return e.selectedDates.map(function(r) {
|
|
1477
|
+
return e.formatDate(r, t);
|
|
1478
|
+
}).filter(function(r, l, f) {
|
|
1479
|
+
return e.config.mode !== "range" || e.config.enableTime || f.indexOf(r) === l;
|
|
1480
|
+
}).join(e.config.mode !== "range" ? e.config.conjunction : e.l10n.rangeSeparator);
|
|
1481
|
+
}
|
|
1482
|
+
i(Se, "getDateStr");
|
|
1483
|
+
function W(n) {
|
|
1484
|
+
n === void 0 && (n = !0), e.mobileInput !== void 0 && e.mobileFormatStr && (e.mobileInput.value = e.latestSelectedDateObj !== void 0 ? e.formatDate(e.latestSelectedDateObj, e.mobileFormatStr) : ""), e.input.value = Se(e.config.dateFormat), e.altInput !== void 0 && (e.altInput.value = Se(e.config.altFormat)), n !== !1 && E("onValueUpdate");
|
|
1485
|
+
}
|
|
1486
|
+
i(W, "updateValue");
|
|
1487
|
+
function kn(n) {
|
|
1488
|
+
var t = A(n), r = e.prevMonthNav.contains(t), l = e.nextMonthNav.contains(t);
|
|
1489
|
+
r || l ? ye(r ? -1 : 1) : e.yearElements.indexOf(t) >= 0 ? t.select() : t.classList.contains("arrowUp") ? e.changeYear(e.currentYear + 1) : t.classList.contains("arrowDown") && e.changeYear(e.currentYear - 1);
|
|
1490
|
+
}
|
|
1491
|
+
i(kn, "onMonthNavClick");
|
|
1492
|
+
function Tn(n) {
|
|
1493
|
+
n.preventDefault();
|
|
1494
|
+
var t = n.type === "keydown", r = A(n), l = r;
|
|
1495
|
+
e.amPM !== void 0 && r === e.amPM && (e.amPM.textContent = e.l10n.amPM[j(e.amPM.textContent === e.l10n.amPM[0])]);
|
|
1496
|
+
var f = parseFloat(l.getAttribute("min")), u = parseFloat(l.getAttribute("max")), v = parseFloat(l.getAttribute("step")), c = parseInt(l.value, 10), D = n.delta || (t ? n.which === 38 ? 1 : -1 : 0), s = c + v * D;
|
|
1497
|
+
if (typeof l.value < "u" && l.value.length === 2) {
|
|
1498
|
+
var p = l === e.hourElement, x = l === e.minuteElement;
|
|
1499
|
+
s < f ? (s = u + s + j(!p) + (j(p) && j(!e.amPM)), x && J(void 0, -1, e.hourElement)) : s > u && (s = l === e.hourElement ? s - u - j(!e.amPM) : f, x && J(void 0, 1, e.hourElement)), e.amPM && p && (v === 1 ? s + c === 23 : Math.abs(s - c) > v) && (e.amPM.textContent = e.l10n.amPM[j(e.amPM.textContent === e.l10n.amPM[0])]), l.value = F(s);
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
return i(Tn, "timeWrapper"), m(), e;
|
|
1503
|
+
}
|
|
1504
|
+
i(tt, "FlatpickrInstance");
|
|
1505
|
+
function X(a, o) {
|
|
1506
|
+
for (var e = Array.prototype.slice.call(a).filter(function(w) {
|
|
1507
|
+
return w instanceof HTMLElement;
|
|
1508
|
+
}), d = [], m = 0; m < e.length; m++) {
|
|
1509
|
+
var g = e[m];
|
|
1510
|
+
try {
|
|
1511
|
+
if (g.getAttribute("data-fp-omit") !== null)
|
|
1512
|
+
continue;
|
|
1513
|
+
g._flatpickr !== void 0 && (g._flatpickr.destroy(), g._flatpickr = void 0), g._flatpickr = tt(g, o || {}), d.push(g._flatpickr);
|
|
1514
|
+
} catch (w) {
|
|
1515
|
+
console.error(w);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
return d.length === 1 ? d[0] : d;
|
|
1519
|
+
}
|
|
1520
|
+
i(X, "_flatpickr");
|
|
1521
|
+
typeof HTMLElement < "u" && typeof HTMLCollection < "u" && typeof NodeList < "u" && (HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function(a) {
|
|
1522
|
+
return X(this, a);
|
|
1523
|
+
}, HTMLElement.prototype.flatpickr = function(a) {
|
|
1524
|
+
return X([this], a);
|
|
1525
|
+
});
|
|
1526
|
+
var k = /* @__PURE__ */ i(function(a, o) {
|
|
1527
|
+
return typeof a == "string" ? X(window.document.querySelectorAll(a), o) : a instanceof Node ? X([a], o) : X(a, o);
|
|
1528
|
+
}, "flatpickr");
|
|
1529
|
+
k.defaultConfig = {};
|
|
1530
|
+
k.l10ns = {
|
|
1531
|
+
en: S({}, le),
|
|
1532
|
+
default: S({}, le)
|
|
1533
|
+
};
|
|
1534
|
+
k.localize = function(a) {
|
|
1535
|
+
k.l10ns.default = S(S({}, k.l10ns.default), a);
|
|
1536
|
+
};
|
|
1537
|
+
k.setDefaults = function(a) {
|
|
1538
|
+
k.defaultConfig = S(S({}, k.defaultConfig), a);
|
|
1539
|
+
};
|
|
1540
|
+
k.parseDate = Ne({});
|
|
1541
|
+
k.formatDate = an({});
|
|
1542
|
+
k.compareDates = N;
|
|
1543
|
+
typeof jQuery < "u" && typeof jQuery.fn < "u" && (jQuery.fn.flatpickr = function(a) {
|
|
1544
|
+
return X(this, a);
|
|
1545
|
+
});
|
|
1546
|
+
Date.prototype.fp_incr = function(a) {
|
|
1547
|
+
return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof a == "string" ? parseInt(a, 10) : a));
|
|
1548
|
+
};
|
|
1549
|
+
typeof window < "u" && (window.flatpickr = k);
|
|
1550
|
+
var ve = { exports: {} }, at = ve.exports, nn;
|
|
1551
|
+
function it() {
|
|
1552
|
+
return nn || (nn = 1, (function(a, o) {
|
|
1553
|
+
(function(e, d) {
|
|
1554
|
+
a.exports = d();
|
|
1555
|
+
})(at, (function() {
|
|
1556
|
+
/*! *****************************************************************************
|
|
1557
|
+
Copyright (c) Microsoft Corporation.
|
|
1558
|
+
|
|
1559
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1560
|
+
purpose with or without fee is hereby granted.
|
|
1561
|
+
|
|
1562
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1563
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1564
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1565
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1566
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1567
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1568
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1569
|
+
***************************************************************************** */
|
|
1570
|
+
var e = /* @__PURE__ */ i(function() {
|
|
1571
|
+
return e = Object.assign || /* @__PURE__ */ i(function(y) {
|
|
1572
|
+
for (var M, Y = 1, h = arguments.length; Y < h; Y++) {
|
|
1573
|
+
M = arguments[Y];
|
|
1574
|
+
for (var T in M) Object.prototype.hasOwnProperty.call(M, T) && (y[T] = M[T]);
|
|
1575
|
+
}
|
|
1576
|
+
return y;
|
|
1577
|
+
}, "__assign"), e.apply(this, arguments);
|
|
1578
|
+
}, "__assign");
|
|
1579
|
+
function d(w) {
|
|
1580
|
+
try {
|
|
1581
|
+
if (typeof w.composedPath == "function") {
|
|
1582
|
+
var y = w.composedPath();
|
|
1583
|
+
return y[0];
|
|
1584
|
+
}
|
|
1585
|
+
return w.target;
|
|
1586
|
+
} catch {
|
|
1587
|
+
return w.target;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
i(d, "getEventTarget");
|
|
1591
|
+
var m = {
|
|
1592
|
+
confirmIcon: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='17' height='17' viewBox='0 0 17 17'> <g> </g> <path d='M15.418 1.774l-8.833 13.485-4.918-4.386 0.666-0.746 4.051 3.614 8.198-12.515 0.836 0.548z' fill='#000000' /> </svg>",
|
|
1593
|
+
confirmText: "OK ",
|
|
1594
|
+
showAlways: !1,
|
|
1595
|
+
theme: "light"
|
|
1596
|
+
};
|
|
1597
|
+
function g(w) {
|
|
1598
|
+
var y = e(e({}, m), w), M, Y = "flatpickr-confirm";
|
|
1599
|
+
return function(h) {
|
|
1600
|
+
return h.config.noCalendar || h.isMobile ? {} : e({
|
|
1601
|
+
onKeyDown: /* @__PURE__ */ i(function(T, _, H, O) {
|
|
1602
|
+
var b = d(O), R = !h.config.time_24hr && b === h.amPM || h.config.time_24hr && (h.config.enableSeconds && b === h.secondElement || !h.config.enableSeconds && b === h.minuteElement);
|
|
1603
|
+
h.config.enableTime && O.key === "Tab" && R ? (O.preventDefault(), M.focus()) : O.key === "Enter" && b === M && h.close();
|
|
1604
|
+
}, "onKeyDown"),
|
|
1605
|
+
onReady: /* @__PURE__ */ i(function() {
|
|
1606
|
+
M = h._createElement("div", Y + " " + (y.showAlways ? "visible" : "") + " " + y.theme + "Theme", y.confirmText), M.tabIndex = -1, M.innerHTML += y.confirmIcon, M.addEventListener("click", h.close), h.calendarContainer.appendChild(M), h.loadedPlugins.push("confirmDate");
|
|
1607
|
+
}, "onReady")
|
|
1608
|
+
}, y.showAlways ? {} : {
|
|
1609
|
+
onChange: /* @__PURE__ */ i(function(T, _) {
|
|
1610
|
+
var H = h.config.enableTime || h.config.mode === "multiple" || h.loadedPlugins.indexOf("monthSelect") !== -1, O = h.calendarContainer.querySelector("." + Y);
|
|
1611
|
+
if (O) {
|
|
1612
|
+
if (_ && !h.config.inline && H && O)
|
|
1613
|
+
return O.classList.add("visible");
|
|
1614
|
+
O.classList.remove("visible");
|
|
1615
|
+
}
|
|
1616
|
+
}, "onChange")
|
|
1617
|
+
});
|
|
1618
|
+
};
|
|
1619
|
+
}
|
|
1620
|
+
return i(g, "confirmDatePlugin"), g;
|
|
1621
|
+
}));
|
|
1622
|
+
})(ve)), ve.exports;
|
|
1623
|
+
}
|
|
1624
|
+
i(it, "requireConfirmDate");
|
|
1625
|
+
var rt = it();
|
|
1626
|
+
const ot = /* @__PURE__ */ Jn(rt);
|
|
1627
|
+
var lt = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, we = /* @__PURE__ */ i((a, o, e, d) => {
|
|
1628
|
+
for (var m = d > 1 ? void 0 : d ? ft(o, e) : o, g = a.length - 1, w; g >= 0; g--)
|
|
1629
|
+
(w = a[g]) && (m = (d ? w(o, e, m) : w(m)) || m);
|
|
1630
|
+
return d && m && lt(o, e, m), m;
|
|
1631
|
+
}, "__decorateClass"), ee;
|
|
1632
|
+
let ne = (ee = class extends jn {
|
|
1633
|
+
withTime = !0;
|
|
1634
|
+
withSeconds = !0;
|
|
1635
|
+
asTemporal = !1;
|
|
1636
|
+
emits = ["click"];
|
|
1637
|
+
// value: Temporal.ZonedDateTime|null|string = null
|
|
1638
|
+
maxDateInner = "";
|
|
1639
|
+
minDateInner = "";
|
|
1640
|
+
mounted() {
|
|
1641
|
+
this.nextTick(() => this.initPicker());
|
|
1642
|
+
}
|
|
1643
|
+
/** Библиотека по работе */
|
|
1644
|
+
fp = null;
|
|
1645
|
+
addDate() {
|
|
1646
|
+
const o = $VST.DT();
|
|
1647
|
+
this.$emit(
|
|
1648
|
+
"update:modelValue",
|
|
1649
|
+
this.value = this.asTemporal ? o : this.parseTime(o)
|
|
1650
|
+
), setTimeout(() => {
|
|
1651
|
+
this.fp || this.initPicker(), this.nextTick(() => {
|
|
1652
|
+
this.$refs?.picker && (this.$refs?.picker?.click(), setTimeout(() => {
|
|
1653
|
+
this.$refs.picker.setAttribute("value", this._formatDate(new Date(o.epochMilliseconds))), this.fp?.open();
|
|
1654
|
+
}, 70));
|
|
1655
|
+
});
|
|
1656
|
+
}, 70);
|
|
1657
|
+
}
|
|
1658
|
+
initPicker() {
|
|
1659
|
+
this.$refs.picker && (this.fp = k(this.$refs.picker, {
|
|
1660
|
+
// defaultDate: $E.DT(this.value!).toString?.({ timeZoneName: 'never' })?.split?.('.')?.[0],
|
|
1661
|
+
enableTime: this.withTime,
|
|
1662
|
+
enableSeconds: this.withSeconds,
|
|
1663
|
+
weekNumbers: !0,
|
|
1664
|
+
dateFormat: "Y-m-d H:i:S",
|
|
1665
|
+
// Формат с секундами
|
|
1666
|
+
minDate: this.minDateInner,
|
|
1667
|
+
maxDate: this.maxDateInner,
|
|
1668
|
+
minuteIncrement: 1,
|
|
1669
|
+
secondsIncrement: 1,
|
|
1670
|
+
hoursIncrement: 1,
|
|
1671
|
+
className: "custom-flatpickr-theme",
|
|
1672
|
+
locale: Gn.Russian,
|
|
1673
|
+
// @ts-ignore
|
|
1674
|
+
plugins: [new ot({})],
|
|
1675
|
+
onChange: /* @__PURE__ */ i((o) => {
|
|
1676
|
+
}, "onChange")
|
|
1677
|
+
// fixme сделать подстановку нескольких событий, а отображать их, например, списком над/под календарём,
|
|
1678
|
+
// хотя можно и просто списком в интерактивном tooltip
|
|
1679
|
+
// Кастомизация дней
|
|
1680
|
+
// onDayCreate: (dObj, dStr, fp, dayElem: HTMLElement) => {
|
|
1681
|
+
// const dateStr = this.formatDate(dayElem.dateObj)
|
|
1682
|
+
// const event = this.events.find(e => e.date === dateStr)
|
|
1683
|
+
//
|
|
1684
|
+
// if (event) { // Заготовка для подстановки событий ко дню
|
|
1685
|
+
// Engine.l('dateStr', dayElem.dateObj, dateStr, event, dayElem)
|
|
1686
|
+
// dayElem.style.fontWeight = 'bolder'
|
|
1687
|
+
// dayElem.style.background = '#e3dd6b'
|
|
1688
|
+
// dayElem.title = event.title
|
|
1689
|
+
// // // Создаем элемент с событием
|
|
1690
|
+
// // const eventElement = document.createElement('span')
|
|
1691
|
+
// // eventElement.className = `event-dot event-${event.type}`
|
|
1692
|
+
// // eventElement.title = event.title
|
|
1693
|
+
// // dayElem.appendChild(eventElement)
|
|
1694
|
+
// //
|
|
1695
|
+
// // // Добавляем класс к самому дню
|
|
1696
|
+
// // dayElem.classList.add('has-event')
|
|
1697
|
+
// }
|
|
1698
|
+
// },
|
|
1699
|
+
// parseDate: (datestr, format) => {
|
|
1700
|
+
// Engine.l('datestr', datestr)
|
|
1701
|
+
// return '1'
|
|
1702
|
+
// // const date = Engine.DT(datestr) as Temporal.ZonedDateTime
|
|
1703
|
+
// // const month = date.toLocaleString('ru-RU', { month: 'short', day: 'numeric' })
|
|
1704
|
+
// // .replace(/\d+\s?/, '')
|
|
1705
|
+
// // return `${date.day} ${month} ${date.year}`+
|
|
1706
|
+
// // (this.withTime
|
|
1707
|
+
// // ? ` в ${date.hour.toString().padStart(2, '0')}:${date.minute.toString().padStart(2, '0')}`
|
|
1708
|
+
// // : ''
|
|
1709
|
+
// // )+
|
|
1710
|
+
// // (this.withSeconds ? `:${date.second.toString().padStart(2, '0')}` : '')
|
|
1711
|
+
// },
|
|
1712
|
+
// formatDate: (date: Date, format: any, locale: any) => {
|
|
1713
|
+
// return this._formatDate(date)
|
|
1714
|
+
// }
|
|
1715
|
+
}));
|
|
1716
|
+
}
|
|
1717
|
+
parseTime(o) {
|
|
1718
|
+
return o.toString().split("+")[0].split(".")[0].replace("T", " ").split(
|
|
1719
|
+
this.withTime ? "!" : " "
|
|
1720
|
+
)[0];
|
|
1721
|
+
}
|
|
1722
|
+
_formatDate(o) {
|
|
1723
|
+
const e = new Intl.DateTimeFormat("ru-RU", { month: "short", day: "numeric" }).format(
|
|
1724
|
+
o
|
|
1725
|
+
).replace(/\d+\s?/, ""), d = $VST.DT(o.getTime());
|
|
1726
|
+
return `${d.day} ${e} ${d.year}` + (this.withTime ? ` в ${d.hour.toString().padStart(2, "0")}:${d.minute.toString().padStart(2, "0")}` : "") + (this.withSeconds ? `:${d.second.toString().padStart(2, "0")}` : "");
|
|
1727
|
+
}
|
|
1728
|
+
// // Watch dynamic changes to items prop
|
|
1729
|
+
// @Watch('items', true) _itemsWatch(items: any) {
|
|
1730
|
+
//
|
|
1731
|
+
// }
|
|
1732
|
+
// // Generate computed class prop
|
|
1733
|
+
// declare some: boolean; @Computed('some') _valueComputed(some: boolean): DateField['some'] {
|
|
1734
|
+
// return some
|
|
1735
|
+
// }
|
|
1736
|
+
}, i(ee, "DateField"), ee);
|
|
1737
|
+
we([
|
|
1738
|
+
Ye(Boolean)
|
|
1739
|
+
], ne.prototype, "withTime", 2);
|
|
1740
|
+
we([
|
|
1741
|
+
Ye(Boolean)
|
|
1742
|
+
], ne.prototype, "withSeconds", 2);
|
|
1743
|
+
we([
|
|
1744
|
+
Ye(Boolean)
|
|
1745
|
+
], ne.prototype, "asTemporal", 2);
|
|
1746
|
+
ne = we([
|
|
1747
|
+
Ln
|
|
1748
|
+
], ne);
|
|
1749
|
+
function ut(a, o, e, d, m, g) {
|
|
1750
|
+
return Ge(), ze("div", {
|
|
1751
|
+
class: Rn(["vst-date-field d-inline-block my1px w100%", {
|
|
1752
|
+
// 'vst-select-multi': mode == 'multi' || mode == 'tags',
|
|
1753
|
+
}])
|
|
1754
|
+
}, [
|
|
1755
|
+
a.value ? Wn("", !0) : (Ge(), ze("div", {
|
|
1756
|
+
key: 0,
|
|
1757
|
+
class: "h28px flex items-center min-w240px bg-white rounded-3xl justify-center cursor-pointer text-#c1c7cf italic border-solid border-#c1c7cf border-1px hover:border-gray-300 hover:border-#d6ff63! hover:text-lime-500 mx-auto min-h42px!",
|
|
1758
|
+
tabindex: "5",
|
|
1759
|
+
onFocusin: o[0] || (o[0] = (w) => a.addDate()),
|
|
1760
|
+
onClick: o[1] || (o[1] = (w) => a.addDate())
|
|
1761
|
+
}, Bn(a.placeholder), 33)),
|
|
1762
|
+
$n(Ze("div", null, [
|
|
1763
|
+
Ze("input", {
|
|
1764
|
+
ref: "picker",
|
|
1765
|
+
type: "text",
|
|
1766
|
+
readonly: "",
|
|
1767
|
+
onMousedown: o[2] || (o[2] = Kn(() => {
|
|
1768
|
+
}, ["prevent"]))
|
|
1769
|
+
}, null, 544)
|
|
1770
|
+
], 512), [
|
|
1771
|
+
[Vn, a.value]
|
|
1772
|
+
])
|
|
1773
|
+
]);
|
|
1774
|
+
}
|
|
1775
|
+
i(ut, "render");
|
|
1776
|
+
const gt = /* @__PURE__ */ qn(ne, [["render", ut]]);
|
|
1777
|
+
export {
|
|
1778
|
+
gt as default
|
|
1779
|
+
};
|