@94ai/nf-timezone-picker 5.0.29 → 5.0.36

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.
@@ -11,7 +11,9 @@
11
11
  }
12
12
  })();
13
13
  import Vue from "vue";
14
+ import { isDateObject, getWeekNumber, formatDate, parseDate, getRangeHours, getRangeMinutes, modifyTime, limitTimeRange, isDate, clearMilliseconds, timeWithinRange, getDayCountOfYear, range, nextDate, getDayCountOfMonth, getStartDateOfMonth, getFirstDayOfMonth, prevDate, clearTime, extractTimeFormat, extractDateFormat, prevMonth, nextMonth, prevYear, nextYear, modifyWithTimeString, modifyDate, changeYearMonthAndClampDate } from "element-ui/src/utils/date-util";
14
15
  import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
16
+ import Locale from "element-ui/lib/mixins/locale";
15
17
  import "fs";
16
18
  import "path";
17
19
  import "vue-demi";
@@ -172,818 +174,6 @@ const Clickoutside = {
172
174
  delete el[ctx];
173
175
  }
174
176
  };
175
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
176
- function getDefaultExportFromCjs(x) {
177
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
178
- }
179
- function getAugmentedNamespace(n) {
180
- if (n.__esModule)
181
- return n;
182
- var f = n.default;
183
- if (typeof f == "function") {
184
- var a = function a2() {
185
- if (this instanceof a2) {
186
- return Reflect.construct(f, arguments, this.constructor);
187
- }
188
- return f.apply(this, arguments);
189
- };
190
- a.prototype = f.prototype;
191
- } else
192
- a = {};
193
- Object.defineProperty(a, "__esModule", {
194
- value: true
195
- });
196
- Object.keys(n).forEach(function(k) {
197
- var d = Object.getOwnPropertyDescriptor(n, k);
198
- Object.defineProperty(a, k, d.get ? d : {
199
- enumerable: true,
200
- get: function() {
201
- return n[k];
202
- }
203
- });
204
- });
205
- return a;
206
- }
207
- var date = { exports: {} };
208
- (function(module) {
209
- (function(main) {
210
- var fecha2 = {};
211
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
212
- var twoDigits = "\\d\\d?";
213
- var threeDigits = "\\d{3}";
214
- var fourDigits = "\\d{4}";
215
- var word = "[^\\s]+";
216
- var literal = /\[([^]*?)\]/gm;
217
- var noop2 = function() {
218
- };
219
- function regexEscape(str) {
220
- return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
221
- }
222
- function shorten(arr, sLen) {
223
- var newArr = [];
224
- for (var i = 0, len = arr.length; i < len; i++) {
225
- newArr.push(arr[i].substr(0, sLen));
226
- }
227
- return newArr;
228
- }
229
- function monthUpdate(arrName) {
230
- return function(d, v, i18n3) {
231
- var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
232
- if (~index) {
233
- d.month = index;
234
- }
235
- };
236
- }
237
- function pad(val, len) {
238
- val = String(val);
239
- len = len || 2;
240
- while (val.length < len) {
241
- val = "0" + val;
242
- }
243
- return val;
244
- }
245
- var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
246
- var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
247
- var monthNamesShort = shorten(monthNames, 3);
248
- var dayNamesShort = shorten(dayNames, 3);
249
- fecha2.i18n = {
250
- dayNamesShort,
251
- dayNames,
252
- monthNamesShort,
253
- monthNames,
254
- amPm: ["am", "pm"],
255
- DoFn: function DoFn(D) {
256
- return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
257
- }
258
- };
259
- var formatFlags = {
260
- D: function(dateObj) {
261
- return dateObj.getDay();
262
- },
263
- DD: function(dateObj) {
264
- return pad(dateObj.getDay());
265
- },
266
- Do: function(dateObj, i18n3) {
267
- return i18n3.DoFn(dateObj.getDate());
268
- },
269
- d: function(dateObj) {
270
- return dateObj.getDate();
271
- },
272
- dd: function(dateObj) {
273
- return pad(dateObj.getDate());
274
- },
275
- ddd: function(dateObj, i18n3) {
276
- return i18n3.dayNamesShort[dateObj.getDay()];
277
- },
278
- dddd: function(dateObj, i18n3) {
279
- return i18n3.dayNames[dateObj.getDay()];
280
- },
281
- M: function(dateObj) {
282
- return dateObj.getMonth() + 1;
283
- },
284
- MM: function(dateObj) {
285
- return pad(dateObj.getMonth() + 1);
286
- },
287
- MMM: function(dateObj, i18n3) {
288
- return i18n3.monthNamesShort[dateObj.getMonth()];
289
- },
290
- MMMM: function(dateObj, i18n3) {
291
- return i18n3.monthNames[dateObj.getMonth()];
292
- },
293
- yy: function(dateObj) {
294
- return pad(String(dateObj.getFullYear()), 4).substr(2);
295
- },
296
- yyyy: function(dateObj) {
297
- return pad(dateObj.getFullYear(), 4);
298
- },
299
- h: function(dateObj) {
300
- return dateObj.getHours() % 12 || 12;
301
- },
302
- hh: function(dateObj) {
303
- return pad(dateObj.getHours() % 12 || 12);
304
- },
305
- H: function(dateObj) {
306
- return dateObj.getHours();
307
- },
308
- HH: function(dateObj) {
309
- return pad(dateObj.getHours());
310
- },
311
- m: function(dateObj) {
312
- return dateObj.getMinutes();
313
- },
314
- mm: function(dateObj) {
315
- return pad(dateObj.getMinutes());
316
- },
317
- s: function(dateObj) {
318
- return dateObj.getSeconds();
319
- },
320
- ss: function(dateObj) {
321
- return pad(dateObj.getSeconds());
322
- },
323
- S: function(dateObj) {
324
- return Math.round(dateObj.getMilliseconds() / 100);
325
- },
326
- SS: function(dateObj) {
327
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
328
- },
329
- SSS: function(dateObj) {
330
- return pad(dateObj.getMilliseconds(), 3);
331
- },
332
- a: function(dateObj, i18n3) {
333
- return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
334
- },
335
- A: function(dateObj, i18n3) {
336
- return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
337
- },
338
- ZZ: function(dateObj) {
339
- var o = dateObj.getTimezoneOffset();
340
- return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
341
- }
342
- };
343
- var parseFlags = {
344
- d: [twoDigits, function(d, v) {
345
- d.day = v;
346
- }],
347
- Do: [twoDigits + word, function(d, v) {
348
- d.day = parseInt(v, 10);
349
- }],
350
- M: [twoDigits, function(d, v) {
351
- d.month = v - 1;
352
- }],
353
- yy: [twoDigits, function(d, v) {
354
- var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
355
- d.year = "" + (v > 68 ? cent - 1 : cent) + v;
356
- }],
357
- h: [twoDigits, function(d, v) {
358
- d.hour = v;
359
- }],
360
- m: [twoDigits, function(d, v) {
361
- d.minute = v;
362
- }],
363
- s: [twoDigits, function(d, v) {
364
- d.second = v;
365
- }],
366
- yyyy: [fourDigits, function(d, v) {
367
- d.year = v;
368
- }],
369
- S: ["\\d", function(d, v) {
370
- d.millisecond = v * 100;
371
- }],
372
- SS: ["\\d{2}", function(d, v) {
373
- d.millisecond = v * 10;
374
- }],
375
- SSS: [threeDigits, function(d, v) {
376
- d.millisecond = v;
377
- }],
378
- D: [twoDigits, noop2],
379
- ddd: [word, noop2],
380
- MMM: [word, monthUpdate("monthNamesShort")],
381
- MMMM: [word, monthUpdate("monthNames")],
382
- a: [word, function(d, v, i18n3) {
383
- var val = v.toLowerCase();
384
- if (val === i18n3.amPm[0]) {
385
- d.isPm = false;
386
- } else if (val === i18n3.amPm[1]) {
387
- d.isPm = true;
388
- }
389
- }],
390
- ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
391
- var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
392
- if (parts) {
393
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
394
- d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
395
- }
396
- }]
397
- };
398
- parseFlags.dd = parseFlags.d;
399
- parseFlags.dddd = parseFlags.ddd;
400
- parseFlags.DD = parseFlags.D;
401
- parseFlags.mm = parseFlags.m;
402
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
403
- parseFlags.MM = parseFlags.M;
404
- parseFlags.ss = parseFlags.s;
405
- parseFlags.A = parseFlags.a;
406
- fecha2.masks = {
407
- default: "ddd MMM dd yyyy HH:mm:ss",
408
- shortDate: "M/D/yy",
409
- mediumDate: "MMM d, yyyy",
410
- longDate: "MMMM d, yyyy",
411
- fullDate: "dddd, MMMM d, yyyy",
412
- shortTime: "HH:mm",
413
- mediumTime: "HH:mm:ss",
414
- longTime: "HH:mm:ss.SSS"
415
- };
416
- fecha2.format = function(dateObj, mask, i18nSettings) {
417
- var i18n3 = i18nSettings || fecha2.i18n;
418
- if (typeof dateObj === "number") {
419
- dateObj = new Date(dateObj);
420
- }
421
- if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
422
- throw new Error("Invalid Date in fecha.format");
423
- }
424
- mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
425
- var literals = [];
426
- mask = mask.replace(literal, function($0, $1) {
427
- literals.push($1);
428
- return "@@@";
429
- });
430
- mask = mask.replace(token, function($0) {
431
- return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
432
- });
433
- return mask.replace(/@@@/g, function() {
434
- return literals.shift();
435
- });
436
- };
437
- fecha2.parse = function(dateStr, format2, i18nSettings) {
438
- var i18n3 = i18nSettings || fecha2.i18n;
439
- if (typeof format2 !== "string") {
440
- throw new Error("Invalid format in fecha.parse");
441
- }
442
- format2 = fecha2.masks[format2] || format2;
443
- if (dateStr.length > 1e3) {
444
- return null;
445
- }
446
- var dateInfo = {};
447
- var parseInfo = [];
448
- var literals = [];
449
- format2 = format2.replace(literal, function($0, $1) {
450
- literals.push($1);
451
- return "@@@";
452
- });
453
- var newFormat = regexEscape(format2).replace(token, function($0) {
454
- if (parseFlags[$0]) {
455
- var info = parseFlags[$0];
456
- parseInfo.push(info[1]);
457
- return "(" + info[0] + ")";
458
- }
459
- return $0;
460
- });
461
- newFormat = newFormat.replace(/@@@/g, function() {
462
- return literals.shift();
463
- });
464
- var matches = dateStr.match(new RegExp(newFormat, "i"));
465
- if (!matches) {
466
- return null;
467
- }
468
- for (var i = 1; i < matches.length; i++) {
469
- parseInfo[i - 1](dateInfo, matches[i], i18n3);
470
- }
471
- var today = /* @__PURE__ */ new Date();
472
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
473
- dateInfo.hour = +dateInfo.hour + 12;
474
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
475
- dateInfo.hour = 0;
476
- }
477
- var date2;
478
- if (dateInfo.timezoneOffset != null) {
479
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
480
- date2 = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
481
- } else {
482
- date2 = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
483
- }
484
- return date2;
485
- };
486
- if (module.exports) {
487
- module.exports = fecha2;
488
- } else {
489
- main.fecha = fecha2;
490
- }
491
- })(commonjsGlobal);
492
- })(date);
493
- var dateExports = date.exports;
494
- const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
495
- const defaultLang = {
496
- el: {
497
- colorpicker: {
498
- confirm: "确定",
499
- clear: "清空"
500
- },
501
- datepicker: {
502
- now: "此刻",
503
- today: "今天",
504
- cancel: "取消",
505
- clear: "清空",
506
- confirm: "确定",
507
- selectDate: "选择日期",
508
- selectTime: "选择时间",
509
- startDate: "开始日期",
510
- startTime: "开始时间",
511
- endDate: "结束日期",
512
- endTime: "结束时间",
513
- prevYear: "前一年",
514
- nextYear: "后一年",
515
- prevMonth: "上个月",
516
- nextMonth: "下个月",
517
- year: "年",
518
- month1: "1 月",
519
- month2: "2 月",
520
- month3: "3 月",
521
- month4: "4 月",
522
- month5: "5 月",
523
- month6: "6 月",
524
- month7: "7 月",
525
- month8: "8 月",
526
- month9: "9 月",
527
- month10: "10 月",
528
- month11: "11 月",
529
- month12: "12 月",
530
- // week: '周次',
531
- weeks: {
532
- sun: "日",
533
- mon: "一",
534
- tue: "二",
535
- wed: "三",
536
- thu: "四",
537
- fri: "五",
538
- sat: "六"
539
- },
540
- months: {
541
- jan: "一月",
542
- feb: "二月",
543
- mar: "三月",
544
- apr: "四月",
545
- may: "五月",
546
- jun: "六月",
547
- jul: "七月",
548
- aug: "八月",
549
- sep: "九月",
550
- oct: "十月",
551
- nov: "十一月",
552
- dec: "十二月"
553
- }
554
- },
555
- select: {
556
- loading: "加载中",
557
- noMatch: "无匹配数据",
558
- noData: "无数据",
559
- placeholder: "请选择"
560
- },
561
- cascader: {
562
- noMatch: "无匹配数据",
563
- loading: "加载中",
564
- placeholder: "请选择",
565
- noData: "暂无数据"
566
- },
567
- pagination: {
568
- goto: "前往",
569
- pagesize: "条/页",
570
- total: "共 {total} 条",
571
- pageClassifier: "页"
572
- },
573
- messagebox: {
574
- title: "提示",
575
- confirm: "确定",
576
- cancel: "取消",
577
- error: "输入的数据不合法!"
578
- },
579
- upload: {
580
- deleteTip: "按 delete 键可删除",
581
- delete: "删除",
582
- preview: "查看图片",
583
- continue: "继续上传"
584
- },
585
- table: {
586
- emptyText: "暂无数据",
587
- confirmFilter: "筛选",
588
- resetFilter: "重置",
589
- clearFilter: "全部",
590
- sumText: "合计"
591
- },
592
- tree: {
593
- emptyText: "暂无数据"
594
- },
595
- transfer: {
596
- noMatch: "无匹配数据",
597
- noData: "无数据",
598
- titles: ["列表 1", "列表 2"],
599
- filterPlaceholder: "请输入搜索内容",
600
- noCheckedFormat: "共 {total} 项",
601
- hasCheckedFormat: "已选 {checked}/{total} 项"
602
- },
603
- image: {
604
- error: "加载失败"
605
- },
606
- pageHeader: {
607
- title: "返回"
608
- },
609
- popconfirm: {
610
- confirmButtonText: "确定",
611
- cancelButtonText: "取消"
612
- }
613
- }
614
- };
615
- var isMergeableObject = function isMergeableObject2(value) {
616
- return isNonNullObject(value) && !isSpecial(value);
617
- };
618
- function isNonNullObject(value) {
619
- return !!value && typeof value === "object";
620
- }
621
- function isSpecial(value) {
622
- var stringValue = Object.prototype.toString.call(value);
623
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
624
- }
625
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
626
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
627
- function isReactElement(value) {
628
- return value.$$typeof === REACT_ELEMENT_TYPE;
629
- }
630
- function emptyTarget(val) {
631
- return Array.isArray(val) ? [] : {};
632
- }
633
- function cloneIfNecessary(value, optionsArgument) {
634
- var clone = optionsArgument && optionsArgument.clone === true;
635
- return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
636
- }
637
- function defaultArrayMerge(target, source, optionsArgument) {
638
- var destination = target.slice();
639
- source.forEach(function(e, i) {
640
- if (typeof destination[i] === "undefined") {
641
- destination[i] = cloneIfNecessary(e, optionsArgument);
642
- } else if (isMergeableObject(e)) {
643
- destination[i] = deepmerge(target[i], e, optionsArgument);
644
- } else if (target.indexOf(e) === -1) {
645
- destination.push(cloneIfNecessary(e, optionsArgument));
646
- }
647
- });
648
- return destination;
649
- }
650
- function mergeObject(target, source, optionsArgument) {
651
- var destination = {};
652
- if (isMergeableObject(target)) {
653
- Object.keys(target).forEach(function(key) {
654
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
655
- });
656
- }
657
- Object.keys(source).forEach(function(key) {
658
- if (!isMergeableObject(source[key]) || !target[key]) {
659
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
660
- } else {
661
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
662
- }
663
- });
664
- return destination;
665
- }
666
- function deepmerge(target, source, optionsArgument) {
667
- var sourceIsArray = Array.isArray(source);
668
- var targetIsArray = Array.isArray(target);
669
- var options = optionsArgument || {
670
- arrayMerge: defaultArrayMerge
671
- };
672
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
673
- if (!sourceAndTargetTypesMatch) {
674
- return cloneIfNecessary(source, optionsArgument);
675
- } else if (sourceIsArray) {
676
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
677
- return arrayMerge(target, source, optionsArgument);
678
- } else {
679
- return mergeObject(target, source, optionsArgument);
680
- }
681
- }
682
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
683
- if (!Array.isArray(array) || array.length < 2) {
684
- throw new Error("first argument should be an array with at least two elements");
685
- }
686
- return array.reduce(function(prev, next) {
687
- return deepmerge(prev, next, optionsArgument);
688
- });
689
- };
690
- var deepmerge_1 = deepmerge;
691
- const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
692
- __proto__: null,
693
- default: deepmerge_1
694
- }, Symbol.toStringTag, { value: "Module" }));
695
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
696
- function hasOwn$1(obj, key) {
697
- return hasOwnProperty$1.call(obj, key);
698
- }
699
- const arrayFindIndex$1 = function(arr, pred) {
700
- for (let i = 0; i !== arr.length; ++i) {
701
- if (pred(arr[i])) {
702
- return i;
703
- }
704
- }
705
- return -1;
706
- };
707
- const arrayFind = function(arr, pred) {
708
- const idx = arrayFindIndex$1(arr, pred);
709
- return idx !== -1 ? arr[idx] : void 0;
710
- };
711
- const coerceTruthyValueToArray = function(val) {
712
- if (Array.isArray(val)) {
713
- return val;
714
- } else if (val) {
715
- return [val];
716
- } else {
717
- return [];
718
- }
719
- };
720
- const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
721
- function Format(Vue2) {
722
- function template(string, ...args) {
723
- if (args.length === 1 && typeof args[0] === "object") {
724
- args = args[0];
725
- }
726
- if (!args || !args.hasOwnProperty) {
727
- args = {};
728
- }
729
- return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
730
- let result;
731
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
732
- return i;
733
- } else {
734
- result = hasOwn$1(args, i) ? args[i] : null;
735
- if (result === null || result === void 0) {
736
- return "";
737
- }
738
- return result;
739
- }
740
- });
741
- }
742
- return template;
743
- }
744
- const format$2 = Format();
745
- let lang$1 = defaultLang;
746
- let merged$1 = false;
747
- let i18nHandler$1 = function() {
748
- const vuei18n = Object.getPrototypeOf(this || Vue).$t;
749
- if (typeof vuei18n === "function" && !!Vue.locale) {
750
- if (!merged$1) {
751
- merged$1 = true;
752
- Vue.locale(Vue.config.lang, deepmerge_1(lang$1, Vue.locale(Vue.config.lang) || {}, {
753
- clone: true
754
- }));
755
- }
756
- return vuei18n.apply(this, arguments);
757
- }
758
- };
759
- const t$1 = function(path, options) {
760
- let value = i18nHandler$1.apply(this, arguments);
761
- if (value !== null && value !== void 0)
762
- return value;
763
- const array = path.split(".");
764
- let current = lang$1;
765
- for (let i = 0, j = array.length; i < j; i++) {
766
- const property = array[i];
767
- value = current[property];
768
- if (i === j - 1)
769
- return format$2(value, options);
770
- if (!value)
771
- return "";
772
- current = value;
773
- }
774
- return "";
775
- };
776
- const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
777
- const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
778
- const newArray = function(start, end) {
779
- let result = [];
780
- for (let i = start; i <= end; i++) {
781
- result.push(i);
782
- }
783
- return result;
784
- };
785
- const getI18nSettings = () => {
786
- return {
787
- dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
788
- dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
789
- monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
790
- monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
791
- amPm: ["am", "pm"]
792
- };
793
- };
794
- const toDate = function(date2) {
795
- return isDate(date2) ? new Date(date2) : null;
796
- };
797
- const isDate = function(date2) {
798
- if (date2 === null || date2 === void 0)
799
- return false;
800
- if (isNaN(new Date(date2).getTime()))
801
- return false;
802
- if (Array.isArray(date2))
803
- return false;
804
- return true;
805
- };
806
- const isDateObject = function(val) {
807
- return val instanceof Date;
808
- };
809
- const formatDate = function(date2, format2) {
810
- date2 = toDate(date2);
811
- if (!date2)
812
- return "";
813
- return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
814
- };
815
- const parseDate = function(string, format2) {
816
- return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
817
- };
818
- const getDayCountOfMonth = function(year, month) {
819
- if (month === 3 || month === 5 || month === 8 || month === 10) {
820
- return 30;
821
- }
822
- if (month === 1) {
823
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
824
- return 29;
825
- } else {
826
- return 28;
827
- }
828
- }
829
- return 31;
830
- };
831
- const getDayCountOfYear = function(year) {
832
- const isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
833
- return isLeapYear ? 366 : 365;
834
- };
835
- const getFirstDayOfMonth = function(date2) {
836
- const temp = new Date(date2.getTime());
837
- temp.setDate(1);
838
- return temp.getDay();
839
- };
840
- const prevDate = function(date2, amount = 1) {
841
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() - amount);
842
- };
843
- const nextDate = function(date2, amount = 1) {
844
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
845
- };
846
- const getStartDateOfMonth = function(year, month) {
847
- const result = new Date(year, month, 1);
848
- const day = result.getDay();
849
- if (day === 0) {
850
- return prevDate(result, 7);
851
- } else {
852
- return prevDate(result, day);
853
- }
854
- };
855
- const getWeekNumber = function(src) {
856
- if (!isDate(src))
857
- return null;
858
- const date2 = new Date(src.getTime());
859
- date2.setHours(0, 0, 0, 0);
860
- date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
861
- const week1 = new Date(date2.getFullYear(), 0, 4);
862
- return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
863
- };
864
- const getRangeHours = function(ranges) {
865
- const hours = [];
866
- let disabledHours = [];
867
- (ranges || []).forEach((range2) => {
868
- const value = range2.map((date2) => date2.getHours());
869
- disabledHours = disabledHours.concat(newArray(value[0], value[1]));
870
- });
871
- if (disabledHours.length) {
872
- for (let i = 0; i < 24; i++) {
873
- hours[i] = disabledHours.indexOf(i) === -1;
874
- }
875
- } else {
876
- for (let i = 0; i < 24; i++) {
877
- hours[i] = false;
878
- }
879
- }
880
- return hours;
881
- };
882
- function setRangeData(arr, start, end, value) {
883
- for (let i = start; i < end; i++) {
884
- arr[i] = value;
885
- }
886
- }
887
- const getRangeMinutes = function(ranges, hour) {
888
- const minutes = new Array(60);
889
- if (ranges.length > 0) {
890
- ranges.forEach((range2) => {
891
- const start = range2[0];
892
- const end = range2[1];
893
- const startHour = start.getHours();
894
- const startMinute = start.getMinutes();
895
- const endHour = end.getHours();
896
- const endMinute = end.getMinutes();
897
- if (startHour === hour && endHour !== hour) {
898
- setRangeData(minutes, startMinute, 60, true);
899
- } else if (startHour === hour && endHour === hour) {
900
- setRangeData(minutes, startMinute, endMinute + 1, true);
901
- } else if (startHour !== hour && endHour === hour) {
902
- setRangeData(minutes, 0, endMinute + 1, true);
903
- } else if (startHour < hour && endHour > hour) {
904
- setRangeData(minutes, 0, 60, true);
905
- }
906
- });
907
- } else {
908
- setRangeData(minutes, 0, 60, true);
909
- }
910
- return minutes;
911
- };
912
- const range = function(n) {
913
- return Array.apply(null, {
914
- length: n
915
- }).map((_, n2) => n2);
916
- };
917
- const modifyDate = function(date2, y, m, d) {
918
- return new Date(y, m, d, date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
919
- };
920
- const modifyTime = function(date2, h, m, s) {
921
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
922
- };
923
- const modifyWithTimeString = (date2, time) => {
924
- if (date2 == null || !time) {
925
- return date2;
926
- }
927
- time = parseDate(time, "HH:mm:ss");
928
- return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
929
- };
930
- const clearTime = function(date2) {
931
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
932
- };
933
- const clearMilliseconds = function(date2) {
934
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes(), date2.getSeconds(), 0);
935
- };
936
- const limitTimeRange = function(date2, ranges, format2 = "HH:mm:ss") {
937
- if (ranges.length === 0)
938
- return date2;
939
- const normalizeDate = (date3) => fecha.parse(fecha.format(date3, format2), format2);
940
- const ndate = normalizeDate(date2);
941
- const nranges = ranges.map((range2) => range2.map(normalizeDate));
942
- if (nranges.some((nrange) => ndate >= nrange[0] && ndate <= nrange[1]))
943
- return date2;
944
- let minDate = nranges[0][0];
945
- let maxDate = nranges[0][0];
946
- nranges.forEach((nrange) => {
947
- minDate = new Date(Math.min(nrange[0], minDate));
948
- maxDate = new Date(Math.max(nrange[1], minDate));
949
- });
950
- const ret = ndate < minDate ? minDate : maxDate;
951
- return modifyDate(ret, date2.getFullYear(), date2.getMonth(), date2.getDate());
952
- };
953
- const timeWithinRange = function(date2, selectableRange, format2) {
954
- const limitedDate = limitTimeRange(date2, selectableRange, format2);
955
- return limitedDate.getTime() === date2.getTime();
956
- };
957
- const changeYearMonthAndClampDate = function(date2, year, month) {
958
- const monthDate = Math.min(date2.getDate(), getDayCountOfMonth(year, month));
959
- return modifyDate(date2, year, month, monthDate);
960
- };
961
- const prevMonth = function(date2) {
962
- const year = date2.getFullYear();
963
- const month = date2.getMonth();
964
- return month === 0 ? changeYearMonthAndClampDate(date2, year - 1, 11) : changeYearMonthAndClampDate(date2, year, month - 1);
965
- };
966
- const nextMonth = function(date2) {
967
- const year = date2.getFullYear();
968
- const month = date2.getMonth();
969
- return month === 11 ? changeYearMonthAndClampDate(date2, year + 1, 0) : changeYearMonthAndClampDate(date2, year, month + 1);
970
- };
971
- const prevYear = function(date2, amount = 1) {
972
- const year = date2.getFullYear();
973
- const month = date2.getMonth();
974
- return changeYearMonthAndClampDate(date2, year - amount, month);
975
- };
976
- const nextYear = function(date2, amount = 1) {
977
- const year = date2.getFullYear();
978
- const month = date2.getMonth();
979
- return changeYearMonthAndClampDate(date2, year + amount, month);
980
- };
981
- const extractDateFormat = function(format2) {
982
- return format2.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim();
983
- };
984
- const extractTimeFormat = function(format2) {
985
- return format2.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, "").trim();
986
- };
987
177
  function merge(target) {
988
178
  for (let i = 1, j = arguments.length; i < j; i++) {
989
179
  let source = arguments[i] || {};
@@ -1165,6 +355,10 @@ if (!Vue.prototype.$isServer) {
1165
355
  }
1166
356
  });
1167
357
  }
358
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
359
+ function getDefaultExportFromCjs(x) {
360
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
361
+ }
1168
362
  var popper$1 = { exports: {} };
1169
363
  /**
1170
364
  * @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -1453,7 +647,7 @@ var popper$1 = { exports: {} };
1453
647
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1454
648
  }
1455
649
  modifiersToRun.forEach((function(modifier) {
1456
- if (isFunction2(modifier)) {
650
+ if (isFunction(modifier)) {
1457
651
  data = modifier.call(this, data);
1458
652
  }
1459
653
  }).bind(this));
@@ -1765,7 +959,7 @@ var popper$1 = { exports: {} };
1765
959
  element.style[prop] = styles[prop] + unit;
1766
960
  });
1767
961
  }
1768
- function isFunction2(functionToCheck) {
962
+ function isFunction(functionToCheck) {
1769
963
  var getType = {};
1770
964
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
1771
965
  }
@@ -1782,8 +976,8 @@ var popper$1 = { exports: {} };
1782
976
  }
1783
977
  function getBoundingClientRect(element) {
1784
978
  var rect = element.getBoundingClientRect();
1785
- var isIE2 = navigator.userAgent.indexOf("MSIE") != -1;
1786
- var rectTop = isIE2 && element.tagName === "HTML" ? -element.scrollTop : rect.top;
979
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
980
+ var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
1787
981
  return {
1788
982
  left: rect.left,
1789
983
  top: rectTop,
@@ -2087,34 +1281,34 @@ const DEFAULT_FORMATS = {
2087
1281
  year: "yyyy"
2088
1282
  };
2089
1283
  const HAVE_TRIGGER_TYPES = ["date", "datetime", "time", "time-select", "week", "month", "year", "daterange", "monthrange", "timerange", "datetimerange", "dates"];
2090
- const DATE_FORMATTER = function(value, format2) {
2091
- if (format2 === "timestamp")
1284
+ const DATE_FORMATTER = function(value, format) {
1285
+ if (format === "timestamp")
2092
1286
  return value.getTime();
2093
- return formatDate(value, format2);
1287
+ return formatDate(value, format);
2094
1288
  };
2095
- const DATE_PARSER = function(text, format2) {
2096
- if (format2 === "timestamp")
1289
+ const DATE_PARSER = function(text, format) {
1290
+ if (format === "timestamp")
2097
1291
  return new Date(Number(text));
2098
- return parseDate(text, format2);
1292
+ return parseDate(text, format);
2099
1293
  };
2100
- const RANGE_FORMATTER = function(value, format2) {
1294
+ const RANGE_FORMATTER = function(value, format) {
2101
1295
  if (Array.isArray(value) && value.length === 2) {
2102
1296
  const start = value[0];
2103
1297
  const end = value[1];
2104
1298
  if (start && end) {
2105
- return [DATE_FORMATTER(start, format2), DATE_FORMATTER(end, format2)];
1299
+ return [DATE_FORMATTER(start, format), DATE_FORMATTER(end, format)];
2106
1300
  }
2107
1301
  }
2108
1302
  return "";
2109
1303
  };
2110
- const RANGE_PARSER = function(array, format2, separator) {
1304
+ const RANGE_PARSER = function(array, format, separator) {
2111
1305
  if (!Array.isArray(array)) {
2112
1306
  array = array.split(separator);
2113
1307
  }
2114
1308
  if (array.length === 2) {
2115
1309
  const range1 = array[0];
2116
1310
  const range2 = array[1];
2117
- return [DATE_PARSER(range1, format2), DATE_PARSER(range2, format2)];
1311
+ return [DATE_PARSER(range1, format), DATE_PARSER(range2, format)];
2118
1312
  }
2119
1313
  return [];
2120
1314
  };
@@ -2132,7 +1326,7 @@ const TYPE_VALUE_RESOLVER_MAP = {
2132
1326
  }
2133
1327
  },
2134
1328
  week: {
2135
- formatter(value, format2) {
1329
+ formatter(value, format) {
2136
1330
  const week = getWeekNumber(value);
2137
1331
  const month = value.getMonth();
2138
1332
  const trueDate = new Date(value);
@@ -2140,12 +1334,12 @@ const TYPE_VALUE_RESOLVER_MAP = {
2140
1334
  trueDate.setHours(0, 0, 0, 0);
2141
1335
  trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
2142
1336
  }
2143
- let date2 = formatDate(trueDate, format2);
2144
- date2 = /WW/.test(date2) ? date2.replace(/WW/, week < 10 ? "0" + week : week) : date2.replace(/W/, week);
2145
- return date2;
1337
+ let date = formatDate(trueDate, format);
1338
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
1339
+ return date;
2146
1340
  },
2147
- parser(text, format2) {
2148
- return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format2);
1341
+ parser(text, format) {
1342
+ return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
2149
1343
  }
2150
1344
  },
2151
1345
  date: {
@@ -2200,11 +1394,11 @@ const TYPE_VALUE_RESOLVER_MAP = {
2200
1394
  }
2201
1395
  },
2202
1396
  dates: {
2203
- formatter(value, format2) {
2204
- return value.map((date2) => DATE_FORMATTER(date2, format2));
1397
+ formatter(value, format) {
1398
+ return value.map((date) => DATE_FORMATTER(date, format));
2205
1399
  },
2206
- parser(value, format2) {
2207
- return (typeof value === "string" ? value.split(", ") : value).map((date2) => date2 instanceof Date ? date2 : DATE_PARSER(date2, format2));
1400
+ parser(value, format) {
1401
+ return (typeof value === "string" ? value.split(", ") : value).map((date) => date instanceof Date ? date : DATE_PARSER(date, format));
2208
1402
  }
2209
1403
  }
2210
1404
  };
@@ -2217,15 +1411,15 @@ const parseAsFormatAndType = (value, customFormat, type, rangeSeparator = "-") =
2217
1411
  if (!value)
2218
1412
  return null;
2219
1413
  const parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).parser;
2220
- const format2 = customFormat || DEFAULT_FORMATS[type];
2221
- return parser(value, format2, rangeSeparator);
1414
+ const format = customFormat || DEFAULT_FORMATS[type];
1415
+ return parser(value, format, rangeSeparator);
2222
1416
  };
2223
1417
  const formatAsFormatAndType = (value, customFormat, type) => {
2224
1418
  if (!value)
2225
1419
  return null;
2226
1420
  const formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).formatter;
2227
- const format2 = customFormat || DEFAULT_FORMATS[type];
2228
- return formatter(value, format2);
1421
+ const format = customFormat || DEFAULT_FORMATS[type];
1422
+ return formatter(value, format);
2229
1423
  };
2230
1424
  const valueEquals = function(a, b) {
2231
1425
  const dateEquals = function(a2, b2) {
@@ -2252,11 +1446,11 @@ const valueEquals = function(a, b) {
2252
1446
  }
2253
1447
  return false;
2254
1448
  };
2255
- const isString$1 = function(val) {
1449
+ const isString = function(val) {
2256
1450
  return typeof val === "string" || val instanceof String;
2257
1451
  };
2258
1452
  const validator = function(val) {
2259
- return val === null || val === void 0 || isString$1(val) || Array.isArray(val) && val.length === 2 && val.every(isString$1);
1453
+ return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
2260
1454
  };
2261
1455
  const _sfc_main$9 = {
2262
1456
  directives: {
@@ -2508,12 +1702,12 @@ const _sfc_main$9 = {
2508
1702
  return value;
2509
1703
  }
2510
1704
  },
2511
- formatToValue(date2) {
2512
- const isFormattable = isDateObject(date2) || Array.isArray(date2) && date2.every(isDateObject);
1705
+ formatToValue(date) {
1706
+ const isFormattable = isDateObject(date) || Array.isArray(date) && date.every(isDateObject);
2513
1707
  if (this.valueFormat && isFormattable) {
2514
- return formatAsFormatAndType(date2, this.valueFormat, this.type, this.rangeSeparator);
1708
+ return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
2515
1709
  } else {
2516
- return date2;
1710
+ return date;
2517
1711
  }
2518
1712
  },
2519
1713
  // {parse, formatTo} String deals with user input
@@ -2710,17 +1904,17 @@ const _sfc_main$9 = {
2710
1904
  this.picker.selectionMode = this.selectionMode;
2711
1905
  this.picker.unlinkPanels = this.unlinkPanels;
2712
1906
  this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
2713
- this.$watch("format", (format2) => {
2714
- this.picker.format = format2;
1907
+ this.$watch("format", (format) => {
1908
+ this.picker.format = format;
2715
1909
  });
2716
1910
  const updateOptions = () => {
2717
1911
  const options = this.pickerOptions;
2718
1912
  if (options && options.selectableRange) {
2719
1913
  let ranges = options.selectableRange;
2720
1914
  const parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
2721
- const format2 = DEFAULT_FORMATS.timerange;
1915
+ const format = DEFAULT_FORMATS.timerange;
2722
1916
  ranges = Array.isArray(ranges) ? ranges : [ranges];
2723
- this.picker.selectableRange = ranges.map((range2) => parser(range2, format2, this.rangeSeparator));
1917
+ this.picker.selectableRange = ranges.map((range2) => parser(range2, format, this.rangeSeparator));
2724
1918
  }
2725
1919
  for (const option in options) {
2726
1920
  if (options.hasOwnProperty(option) && // 忽略 time-picker 的该配置项
@@ -2739,10 +1933,10 @@ const _sfc_main$9 = {
2739
1933
  this.$el.appendChild(this.picker.$el);
2740
1934
  this.picker.resetView && this.picker.resetView();
2741
1935
  this.picker.$on("dodestroy", this.doDestroy);
2742
- this.picker.$on("pick", (date2 = "", visible = false) => {
1936
+ this.picker.$on("pick", (date = "", visible = false) => {
2743
1937
  this.userInput = null;
2744
1938
  this.pickerVisible = this.picker.visible = visible;
2745
- this.emitInput(date2);
1939
+ this.emitInput(date);
2746
1940
  this.picker.resetView && this.picker.resetView();
2747
1941
  });
2748
1942
  this.picker.$on("select-range", (start, end, pos) => {
@@ -2920,495 +2114,6 @@ var _sfc_render$9 = function render() {
2920
2114
  var _sfc_staticRenderFns$9 = [];
2921
2115
  var __component__$9 = /* @__PURE__ */ normalizeComponent(_sfc_main$9, _sfc_render$9, _sfc_staticRenderFns$9, false, null, null, null, null);
2922
2116
  const Picker = __component__$9.exports;
2923
- var locale = {};
2924
- var zhCN = {};
2925
- zhCN.__esModule = true;
2926
- zhCN.default = {
2927
- el: {
2928
- colorpicker: {
2929
- confirm: "确定",
2930
- clear: "清空"
2931
- },
2932
- datepicker: {
2933
- now: "此刻",
2934
- today: "今天",
2935
- cancel: "取消",
2936
- clear: "清空",
2937
- confirm: "确定",
2938
- selectDate: "选择日期",
2939
- selectTime: "选择时间",
2940
- startDate: "开始日期",
2941
- startTime: "开始时间",
2942
- endDate: "结束日期",
2943
- endTime: "结束时间",
2944
- prevYear: "前一年",
2945
- nextYear: "后一年",
2946
- prevMonth: "上个月",
2947
- nextMonth: "下个月",
2948
- year: "年",
2949
- month1: "1 月",
2950
- month2: "2 月",
2951
- month3: "3 月",
2952
- month4: "4 月",
2953
- month5: "5 月",
2954
- month6: "6 月",
2955
- month7: "7 月",
2956
- month8: "8 月",
2957
- month9: "9 月",
2958
- month10: "10 月",
2959
- month11: "11 月",
2960
- month12: "12 月",
2961
- // week: '周次',
2962
- weeks: {
2963
- sun: "日",
2964
- mon: "一",
2965
- tue: "二",
2966
- wed: "三",
2967
- thu: "四",
2968
- fri: "五",
2969
- sat: "六"
2970
- },
2971
- months: {
2972
- jan: "一月",
2973
- feb: "二月",
2974
- mar: "三月",
2975
- apr: "四月",
2976
- may: "五月",
2977
- jun: "六月",
2978
- jul: "七月",
2979
- aug: "八月",
2980
- sep: "九月",
2981
- oct: "十月",
2982
- nov: "十一月",
2983
- dec: "十二月"
2984
- }
2985
- },
2986
- select: {
2987
- loading: "加载中",
2988
- noMatch: "无匹配数据",
2989
- noData: "无数据",
2990
- placeholder: "请选择"
2991
- },
2992
- cascader: {
2993
- noMatch: "无匹配数据",
2994
- loading: "加载中",
2995
- placeholder: "请选择",
2996
- noData: "暂无数据"
2997
- },
2998
- pagination: {
2999
- goto: "前往",
3000
- pagesize: "条/页",
3001
- total: "共 {total} 条",
3002
- pageClassifier: "页"
3003
- },
3004
- messagebox: {
3005
- title: "提示",
3006
- confirm: "确定",
3007
- cancel: "取消",
3008
- error: "输入的数据不合法!"
3009
- },
3010
- upload: {
3011
- deleteTip: "按 delete 键可删除",
3012
- delete: "删除",
3013
- preview: "查看图片",
3014
- continue: "继续上传"
3015
- },
3016
- table: {
3017
- emptyText: "暂无数据",
3018
- confirmFilter: "筛选",
3019
- resetFilter: "重置",
3020
- clearFilter: "全部",
3021
- sumText: "合计"
3022
- },
3023
- tree: {
3024
- emptyText: "暂无数据"
3025
- },
3026
- transfer: {
3027
- noMatch: "无匹配数据",
3028
- noData: "无数据",
3029
- titles: ["列表 1", "列表 2"],
3030
- filterPlaceholder: "请输入搜索内容",
3031
- noCheckedFormat: "共 {total} 项",
3032
- hasCheckedFormat: "已选 {checked}/{total} 项"
3033
- },
3034
- image: {
3035
- error: "加载失败"
3036
- },
3037
- pageHeader: {
3038
- title: "返回"
3039
- },
3040
- popconfirm: {
3041
- confirmButtonText: "确定",
3042
- cancelButtonText: "取消"
3043
- }
3044
- }
3045
- };
3046
- const require$$2 = /* @__PURE__ */ getAugmentedNamespace(es);
3047
- var format$1 = {};
3048
- var util = {};
3049
- var types = {};
3050
- types.__esModule = true;
3051
- types.isString = isString;
3052
- types.isObject = isObject;
3053
- types.isHtmlElement = isHtmlElement;
3054
- function isString(obj) {
3055
- return Object.prototype.toString.call(obj) === "[object String]";
3056
- }
3057
- function isObject(obj) {
3058
- return Object.prototype.toString.call(obj) === "[object Object]";
3059
- }
3060
- function isHtmlElement(node) {
3061
- return node && node.nodeType === Node.ELEMENT_NODE;
3062
- }
3063
- types.isFunction = function isFunction(functionToCheck) {
3064
- var getType = {};
3065
- return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
3066
- };
3067
- types.isUndefined = function isUndefined(val) {
3068
- return val === void 0;
3069
- };
3070
- types.isDefined = function isDefined(val) {
3071
- return val !== void 0 && val !== null;
3072
- };
3073
- util.__esModule = true;
3074
- util.isEmpty = util.isEqual = util.arrayEquals = util.looseEqual = util.capitalize = util.kebabCase = util.autoprefixer = util.isFirefox = util.isEdge = util.isIE = util.coerceTruthyValueToArray = util.arrayFind = util.arrayFindIndex = util.escapeRegexpString = util.valueEquals = util.generateId = util.getValueByPath = void 0;
3075
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
3076
- return typeof obj;
3077
- } : function(obj) {
3078
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3079
- };
3080
- util.noop = noop;
3081
- util.hasOwn = hasOwn;
3082
- util.toObject = toObject;
3083
- util.getPropByPath = getPropByPath;
3084
- util.rafThrottle = rafThrottle;
3085
- util.objToArray = objToArray;
3086
- var _vue$1 = Vue;
3087
- var _vue2$1 = _interopRequireDefault$1(_vue$1);
3088
- var _types = types;
3089
- function _interopRequireDefault$1(obj) {
3090
- return obj && obj.__esModule ? obj : {
3091
- default: obj
3092
- };
3093
- }
3094
- var hasOwnProperty = Object.prototype.hasOwnProperty;
3095
- function noop() {
3096
- }
3097
- function hasOwn(obj, key) {
3098
- return hasOwnProperty.call(obj, key);
3099
- }
3100
- function extend(to, _from) {
3101
- for (var key in _from) {
3102
- to[key] = _from[key];
3103
- }
3104
- return to;
3105
- }
3106
- function toObject(arr) {
3107
- var res = {};
3108
- for (var i = 0; i < arr.length; i++) {
3109
- if (arr[i]) {
3110
- extend(res, arr[i]);
3111
- }
3112
- }
3113
- return res;
3114
- }
3115
- util.getValueByPath = function getValueByPath(object, prop) {
3116
- prop = prop || "";
3117
- var paths = prop.split(".");
3118
- var current = object;
3119
- var result = null;
3120
- for (var i = 0, j = paths.length; i < j; i++) {
3121
- var path = paths[i];
3122
- if (!current)
3123
- break;
3124
- if (i === j - 1) {
3125
- result = current[path];
3126
- break;
3127
- }
3128
- current = current[path];
3129
- }
3130
- return result;
3131
- };
3132
- function getPropByPath(obj, path, strict) {
3133
- var tempObj = obj;
3134
- path = path.replace(/\[(\w+)\]/g, ".$1");
3135
- path = path.replace(/^\./, "");
3136
- var keyArr = path.split(".");
3137
- var i = 0;
3138
- for (var len = keyArr.length; i < len - 1; ++i) {
3139
- if (!tempObj && !strict)
3140
- break;
3141
- var key = keyArr[i];
3142
- if (key in tempObj) {
3143
- tempObj = tempObj[key];
3144
- } else {
3145
- if (strict) {
3146
- throw new Error("please transfer a valid prop path to form item!");
3147
- }
3148
- break;
3149
- }
3150
- }
3151
- return {
3152
- o: tempObj,
3153
- k: keyArr[i],
3154
- v: tempObj ? tempObj[keyArr[i]] : null
3155
- };
3156
- }
3157
- util.generateId = function generateId() {
3158
- return Math.floor(Math.random() * 1e4);
3159
- };
3160
- util.valueEquals = function valueEquals2(a, b) {
3161
- if (a === b)
3162
- return true;
3163
- if (!(a instanceof Array))
3164
- return false;
3165
- if (!(b instanceof Array))
3166
- return false;
3167
- if (a.length !== b.length)
3168
- return false;
3169
- for (var i = 0; i !== a.length; ++i) {
3170
- if (a[i] !== b[i])
3171
- return false;
3172
- }
3173
- return true;
3174
- };
3175
- util.escapeRegexpString = function escapeRegexpString() {
3176
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
3177
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
3178
- };
3179
- var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
3180
- for (var i = 0; i !== arr.length; ++i) {
3181
- if (pred(arr[i])) {
3182
- return i;
3183
- }
3184
- }
3185
- return -1;
3186
- };
3187
- util.arrayFind = function arrayFind2(arr, pred) {
3188
- var idx = arrayFindIndex(arr, pred);
3189
- return idx !== -1 ? arr[idx] : void 0;
3190
- };
3191
- util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
3192
- if (Array.isArray(val)) {
3193
- return val;
3194
- } else if (val) {
3195
- return [val];
3196
- } else {
3197
- return [];
3198
- }
3199
- };
3200
- util.isIE = function isIE() {
3201
- return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
3202
- };
3203
- util.isEdge = function isEdge() {
3204
- return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
3205
- };
3206
- util.isFirefox = function isFirefox() {
3207
- return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
3208
- };
3209
- util.autoprefixer = function autoprefixer(style) {
3210
- if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
3211
- return style;
3212
- var rules = ["transform", "transition", "animation"];
3213
- var prefixes = ["ms-", "webkit-"];
3214
- rules.forEach(function(rule) {
3215
- var value = style[rule];
3216
- if (rule && value) {
3217
- prefixes.forEach(function(prefix) {
3218
- style[prefix + rule] = value;
3219
- });
3220
- }
3221
- });
3222
- return style;
3223
- };
3224
- util.kebabCase = function kebabCase(str) {
3225
- var hyphenateRE = /([^-])([A-Z])/g;
3226
- return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
3227
- };
3228
- util.capitalize = function capitalize(str) {
3229
- if (!(0, _types.isString)(str))
3230
- return str;
3231
- return str.charAt(0).toUpperCase() + str.slice(1);
3232
- };
3233
- var looseEqual = util.looseEqual = function looseEqual2(a, b) {
3234
- var isObjectA = (0, _types.isObject)(a);
3235
- var isObjectB = (0, _types.isObject)(b);
3236
- if (isObjectA && isObjectB) {
3237
- return JSON.stringify(a) === JSON.stringify(b);
3238
- } else if (!isObjectA && !isObjectB) {
3239
- return String(a) === String(b);
3240
- } else {
3241
- return false;
3242
- }
3243
- };
3244
- var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
3245
- arrayA = arrayA || [];
3246
- arrayB = arrayB || [];
3247
- if (arrayA.length !== arrayB.length) {
3248
- return false;
3249
- }
3250
- for (var i = 0; i < arrayA.length; i++) {
3251
- if (!looseEqual(arrayA[i], arrayB[i])) {
3252
- return false;
3253
- }
3254
- }
3255
- return true;
3256
- };
3257
- util.isEqual = function isEqual(value1, value2) {
3258
- if (Array.isArray(value1) && Array.isArray(value2)) {
3259
- return arrayEquals(value1, value2);
3260
- }
3261
- return looseEqual(value1, value2);
3262
- };
3263
- var isEmpty = util.isEmpty = function isEmpty2(val) {
3264
- if (val == null)
3265
- return true;
3266
- if (typeof val === "boolean")
3267
- return false;
3268
- if (typeof val === "number")
3269
- return !val;
3270
- if (val instanceof Error)
3271
- return val.message === "";
3272
- switch (Object.prototype.toString.call(val)) {
3273
- case "[object String]":
3274
- case "[object Array]":
3275
- return !val.length;
3276
- case "[object File]":
3277
- case "[object Map]":
3278
- case "[object Set]": {
3279
- return !val.size;
3280
- }
3281
- case "[object Object]": {
3282
- return !Object.keys(val).length;
3283
- }
3284
- }
3285
- return false;
3286
- };
3287
- function rafThrottle(fn) {
3288
- var locked = false;
3289
- return function() {
3290
- var _this = this;
3291
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3292
- args[_key] = arguments[_key];
3293
- }
3294
- if (locked)
3295
- return;
3296
- locked = true;
3297
- window.requestAnimationFrame(function(_) {
3298
- fn.apply(_this, args);
3299
- locked = false;
3300
- });
3301
- };
3302
- }
3303
- function objToArray(obj) {
3304
- if (Array.isArray(obj)) {
3305
- return obj;
3306
- }
3307
- return isEmpty(obj) ? [] : [obj];
3308
- }
3309
- format$1.__esModule = true;
3310
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
3311
- return typeof obj;
3312
- } : function(obj) {
3313
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3314
- };
3315
- format$1.default = function(Vue2) {
3316
- function template(string) {
3317
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3318
- args[_key - 1] = arguments[_key];
3319
- }
3320
- if (args.length === 1 && _typeof(args[0]) === "object") {
3321
- args = args[0];
3322
- }
3323
- if (!args || !args.hasOwnProperty) {
3324
- args = {};
3325
- }
3326
- return string.replace(RE_NARGS, function(match, prefix, i, index) {
3327
- var result = void 0;
3328
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
3329
- return i;
3330
- } else {
3331
- result = (0, _util.hasOwn)(args, i) ? args[i] : null;
3332
- if (result === null || result === void 0) {
3333
- return "";
3334
- }
3335
- return result;
3336
- }
3337
- });
3338
- }
3339
- return template;
3340
- };
3341
- var _util = util;
3342
- var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
3343
- locale.__esModule = true;
3344
- locale.i18n = locale.use = locale.t = void 0;
3345
- var _zhCN = zhCN;
3346
- var _zhCN2 = _interopRequireDefault(_zhCN);
3347
- var _vue = Vue;
3348
- var _vue2 = _interopRequireDefault(_vue);
3349
- var _deepmerge = require$$2;
3350
- var _deepmerge2 = _interopRequireDefault(_deepmerge);
3351
- var _format = format$1;
3352
- var _format2 = _interopRequireDefault(_format);
3353
- function _interopRequireDefault(obj) {
3354
- return obj && obj.__esModule ? obj : {
3355
- default: obj
3356
- };
3357
- }
3358
- var format = (0, _format2.default)(_vue2.default);
3359
- var lang = _zhCN2.default;
3360
- var merged = false;
3361
- var i18nHandler = function i18nHandler2() {
3362
- var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
3363
- if (typeof vuei18n === "function" && !!_vue2.default.locale) {
3364
- if (!merged) {
3365
- merged = true;
3366
- _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
3367
- clone: true
3368
- }));
3369
- }
3370
- return vuei18n.apply(this, arguments);
3371
- }
3372
- };
3373
- var t = locale.t = function t2(path, options) {
3374
- var value = i18nHandler.apply(this, arguments);
3375
- if (value !== null && value !== void 0)
3376
- return value;
3377
- var array = path.split(".");
3378
- var current = lang;
3379
- for (var i = 0, j = array.length; i < j; i++) {
3380
- var property = array[i];
3381
- value = current[property];
3382
- if (i === j - 1)
3383
- return format(value, options);
3384
- if (!value)
3385
- return "";
3386
- current = value;
3387
- }
3388
- return "";
3389
- };
3390
- var use = locale.use = function use2(l) {
3391
- lang = l || lang;
3392
- };
3393
- var i18n = locale.i18n = function i18n2(fn) {
3394
- i18nHandler = fn || i18nHandler;
3395
- };
3396
- locale.default = {
3397
- use,
3398
- t,
3399
- i18n
3400
- };
3401
- var _locale = locale;
3402
- var _default = {
3403
- methods: {
3404
- t: function t3() {
3405
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3406
- args[_key] = arguments[_key];
3407
- }
3408
- return _locale.t.apply(this, args);
3409
- }
3410
- }
3411
- };
3412
2117
  const RepeatClick = {
3413
2118
  bind(el, binding, vnode) {
3414
2119
  let interval = null;
@@ -3835,7 +2540,7 @@ const _sfc_main$7 = {
3835
2540
  components: {
3836
2541
  TimeSpinner
3837
2542
  },
3838
- mixins: [_default],
2543
+ mixins: [Locale],
3839
2544
  props: {
3840
2545
  visible: Boolean,
3841
2546
  timeArrowControl: Boolean
@@ -3880,13 +2585,13 @@ const _sfc_main$7 = {
3880
2585
  }
3881
2586
  },
3882
2587
  value(newVal) {
3883
- let date2;
2588
+ let date;
3884
2589
  if (newVal instanceof Date) {
3885
- date2 = limitTimeRange(newVal, this.selectableRange, this.format);
2590
+ date = limitTimeRange(newVal, this.selectableRange, this.format);
3886
2591
  } else if (!newVal) {
3887
- date2 = this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
2592
+ date = this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
3888
2593
  }
3889
- this.date = date2;
2594
+ this.date = date;
3890
2595
  if (this.visible && this.needInitAdjust) {
3891
2596
  this.$nextTick((_) => this.adjustSpinners());
3892
2597
  this.needInitAdjust = false;
@@ -3909,9 +2614,9 @@ const _sfc_main$7 = {
3909
2614
  handleCancel() {
3910
2615
  this.$emit("pick", this.oldValue, false);
3911
2616
  },
3912
- handleChange(date2) {
2617
+ handleChange(date) {
3913
2618
  if (this.visible) {
3914
- this.date = clearMilliseconds(date2);
2619
+ this.date = clearMilliseconds(date);
3915
2620
  if (this.isValidValue(this.date)) {
3916
2621
  this.$emit("pick", this.date, true);
3917
2622
  }
@@ -3924,8 +2629,8 @@ const _sfc_main$7 = {
3924
2629
  handleConfirm(visible = false, first) {
3925
2630
  if (first)
3926
2631
  return;
3927
- const date2 = clearMilliseconds(limitTimeRange(this.date, this.selectableRange, this.format));
3928
- this.$emit("pick", date2, visible, first);
2632
+ const date = clearMilliseconds(limitTimeRange(this.date, this.selectableRange, this.format));
2633
+ this.$emit("pick", date, visible, first);
3929
2634
  },
3930
2635
  handleKeydown(event) {
3931
2636
  const keyCode = event.keyCode;
@@ -3948,8 +2653,8 @@ const _sfc_main$7 = {
3948
2653
  return;
3949
2654
  }
3950
2655
  },
3951
- isValidValue(date2) {
3952
- return timeWithinRange(date2, this.selectableRange, this.format);
2656
+ isValidValue(date) {
2657
+ return timeWithinRange(date, this.selectableRange, this.format);
3953
2658
  },
3954
2659
  adjustSpinners() {
3955
2660
  return this.$refs.spinner.adjustSpinners();
@@ -4028,6 +2733,27 @@ var _sfc_render$7 = function render3() {
4028
2733
  var _sfc_staticRenderFns$7 = [];
4029
2734
  var __component__$7 = /* @__PURE__ */ normalizeComponent(_sfc_main$7, _sfc_render$7, _sfc_staticRenderFns$7, false, null, null, null, null);
4030
2735
  const TimePicker = __component__$7.exports;
2736
+ const arrayFindIndex = function(arr, pred) {
2737
+ for (let i = 0; i !== arr.length; ++i) {
2738
+ if (pred(arr[i])) {
2739
+ return i;
2740
+ }
2741
+ }
2742
+ return -1;
2743
+ };
2744
+ const arrayFind = function(arr, pred) {
2745
+ const idx = arrayFindIndex(arr, pred);
2746
+ return idx !== -1 ? arr[idx] : void 0;
2747
+ };
2748
+ const coerceTruthyValueToArray = function(val) {
2749
+ if (Array.isArray(val)) {
2750
+ return val;
2751
+ } else if (val) {
2752
+ return [val];
2753
+ } else {
2754
+ return [];
2755
+ }
2756
+ };
4031
2757
  const datesInYear = (year) => {
4032
2758
  const numOfDays = getDayCountOfYear(year);
4033
2759
  const firstDay = new Date(year, 0, 1);
@@ -4054,7 +2780,7 @@ const _sfc_main$6 = {
4054
2780
  const style = {};
4055
2781
  const today = /* @__PURE__ */ new Date();
4056
2782
  style.disabled = typeof this.disabledDate === "function" ? datesInYear(year).every(this.disabledDate) : false;
4057
- style.current = arrayFindIndex$1(coerceTruthyValueToArray(this.value), (date2) => date2.getFullYear() === year) >= 0;
2783
+ style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year) >= 0;
4058
2784
  style.today = today.getFullYear() === year;
4059
2785
  style.default = this.defaultValue && this.defaultValue.getFullYear() === year;
4060
2786
  return style;
@@ -4137,8 +2863,8 @@ const datesInMonth = (year, month) => {
4137
2863
  const firstDay = new Date(year, month, 1);
4138
2864
  return range(numOfDays).map((n) => nextDate(firstDay, n));
4139
2865
  };
4140
- const clearDate = (date2) => {
4141
- return new Date(date2.getFullYear(), date2.getMonth());
2866
+ const clearDate = (date) => {
2867
+ return new Date(date.getFullYear(), date.getMonth());
4142
2868
  };
4143
2869
  const getMonthTimestamp = function(time) {
4144
2870
  if (typeof time === "number" || typeof time === "string") {
@@ -4150,7 +2876,7 @@ const getMonthTimestamp = function(time) {
4150
2876
  }
4151
2877
  };
4152
2878
  const _sfc_main$5 = {
4153
- mixins: [_default],
2879
+ mixins: [Locale],
4154
2880
  props: {
4155
2881
  disabledDate: {},
4156
2882
  value: {},
@@ -4215,7 +2941,7 @@ const _sfc_main$5 = {
4215
2941
  cell.text = index;
4216
2942
  const cellDate = new Date(time);
4217
2943
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
4218
- cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
2944
+ cell.selected = arrayFind(selectedDate, (date) => date.getTime() === cellDate.getTime());
4219
2945
  this.$set(row, j, cell);
4220
2946
  }
4221
2947
  }
@@ -4238,8 +2964,8 @@ const _sfc_main$5 = {
4238
2964
  }
4239
2965
  },
4240
2966
  methods: {
4241
- cellMatchesDate(cell, date2) {
4242
- const value = new Date(date2);
2967
+ cellMatchesDate(cell, date) {
2968
+ const value = new Date(date);
4243
2969
  return this.date.getFullYear() === value.getFullYear() && Number(cell.text) === value.getMonth();
4244
2970
  },
4245
2971
  getCellStyle(cell) {
@@ -4249,9 +2975,9 @@ const _sfc_main$5 = {
4249
2975
  const month = cell.text;
4250
2976
  const defaultValue = this.defaultValue ? Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue] : [];
4251
2977
  style.disabled = typeof this.disabledDate === "function" ? datesInMonth(year, month).every(this.disabledDate) : false;
4252
- style.current = arrayFindIndex$1(coerceTruthyValueToArray(this.value), (date2) => date2.getFullYear() === year && date2.getMonth() === month) >= 0;
2978
+ style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year && date.getMonth() === month) >= 0;
4253
2979
  style.today = today.getFullYear() === year && today.getMonth() === month;
4254
- style.default = defaultValue.some((date2) => this.cellMatchesDate(cell, date2));
2980
+ style.default = defaultValue.some((date) => this.cellMatchesDate(cell, date));
4255
2981
  if (cell.inRange) {
4256
2982
  style["in-range"] = true;
4257
2983
  if (cell.start) {
@@ -4405,10 +3131,10 @@ const mul = (arg1, arg2) => {
4405
3131
  };
4406
3132
  const div = (arg1, arg2) => {
4407
3133
  const t1 = (arg1.toString().split(".")[1] || "").length;
4408
- const t22 = (arg2.toString().split(".")[1] || "").length;
3134
+ const t2 = (arg2.toString().split(".")[1] || "").length;
4409
3135
  const r1 = Number(arg1.toString().replace(".", ""));
4410
3136
  const r2 = Number(arg2.toString().replace(".", ""));
4411
- return r1 / r2 * Math.pow(10, t22 - t1);
3137
+ return r1 / r2 * Math.pow(10, t2 - t1);
4412
3138
  };
4413
3139
  function getLocalTime(i) {
4414
3140
  let time = i;
@@ -4439,11 +3165,11 @@ const getDateTimestamp = function(time) {
4439
3165
  }
4440
3166
  };
4441
3167
  const removeFromArray = function(arr, pred) {
4442
- const idx = typeof pred === "function" ? arrayFindIndex$1(arr, pred) : arr.indexOf(pred);
3168
+ const idx = typeof pred === "function" ? arrayFindIndex(arr, pred) : arr.indexOf(pred);
4443
3169
  return idx >= 0 ? [...arr.slice(0, idx), ...arr.slice(idx + 1)] : arr;
4444
3170
  };
4445
3171
  const _sfc_main$4 = {
4446
- mixins: [_default],
3172
+ mixins: [Locale],
4447
3173
  props: {
4448
3174
  firstDayOfWeek: {
4449
3175
  default: 7,
@@ -4508,10 +3234,10 @@ const _sfc_main$4 = {
4508
3234
  return getStartDateOfMonth(this.year, this.month);
4509
3235
  },
4510
3236
  rows() {
4511
- const date2 = new Date(this.year, this.month, 1);
4512
- let day = getFirstDayOfMonth(date2);
4513
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
4514
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
3237
+ const date = new Date(this.year, this.month, 1);
3238
+ let day = getFirstDayOfMonth(date);
3239
+ const dateCountOfMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth());
3240
+ const dateCountOfLastMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
4515
3241
  day = day === 0 ? 7 : day;
4516
3242
  const offset = this.offsetDay;
4517
3243
  const rows = this.tableRows;
@@ -4571,7 +3297,7 @@ const _sfc_main$4 = {
4571
3297
  }
4572
3298
  const cellDate = new Date(time);
4573
3299
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
4574
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
3300
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
4575
3301
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
4576
3302
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
4577
3303
  }
@@ -4604,8 +3330,8 @@ const _sfc_main$4 = {
4604
3330
  }
4605
3331
  },
4606
3332
  methods: {
4607
- cellMatchesDate(cell, date2) {
4608
- const value = new Date(date2);
3333
+ cellMatchesDate(cell, date) {
3334
+ const value = new Date(date);
4609
3335
  return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
4610
3336
  },
4611
3337
  getCellClasses(cell) {
@@ -4620,7 +3346,7 @@ const _sfc_main$4 = {
4620
3346
  } else {
4621
3347
  classes.push(cell.type);
4622
3348
  }
4623
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
3349
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
4624
3350
  classes.push("default");
4625
3351
  }
4626
3352
  if (selectionMode === "day" && (cell.type === "normal" || cell.type === "today") && this.cellMatchesDate(cell, this.value)) {
@@ -4771,7 +3497,7 @@ const _sfc_main$4 = {
4771
3497
  });
4772
3498
  } else if (this.selectionMode === "dates") {
4773
3499
  const value = this.value || [];
4774
- const newValue = cell.selected ? removeFromArray(value, (date2) => date2.getTime() === newDate.getTime()) : [...value, newDate];
3500
+ const newValue = cell.selected ? removeFromArray(value, (date) => date.getTime() === newDate.getTime()) : [...value, newDate];
4775
3501
  this.$emit("pick", newValue);
4776
3502
  }
4777
3503
  }
@@ -4824,7 +3550,7 @@ const _sfc_main$3 = {
4824
3550
  MonthTable,
4825
3551
  DateTable
4826
3552
  },
4827
- mixins: [_default],
3553
+ mixins: [Locale],
4828
3554
  data() {
4829
3555
  return {
4830
3556
  timezone: "",
@@ -4948,24 +3674,24 @@ const _sfc_main$3 = {
4948
3674
  },
4949
3675
  methods: {
4950
3676
  proxyTimePickerDataProperties() {
4951
- const format2 = (timeFormat) => {
3677
+ const format = (timeFormat) => {
4952
3678
  this.$refs.timepicker.format = timeFormat;
4953
3679
  };
4954
3680
  const value = (value2) => {
4955
3681
  this.$refs.timepicker.value = value2;
4956
3682
  };
4957
- const date2 = (date3) => {
4958
- this.$refs.timepicker.date = date3;
3683
+ const date = (date2) => {
3684
+ this.$refs.timepicker.date = date2;
4959
3685
  };
4960
3686
  const selectableRange = (selectableRange2) => {
4961
3687
  this.$refs.timepicker.selectableRange = selectableRange2;
4962
3688
  };
4963
3689
  this.$watch("value", value);
4964
- this.$watch("date", date2);
3690
+ this.$watch("date", date);
4965
3691
  this.$watch("selectableRange", selectableRange);
4966
- format2(this.timeFormat);
3692
+ format(this.timeFormat);
4967
3693
  value(this.value);
4968
- date2(this.date);
3694
+ date(this.date);
4969
3695
  selectableRange(this.selectableRange);
4970
3696
  },
4971
3697
  handleClear() {
@@ -4976,7 +3702,7 @@ const _sfc_main$3 = {
4976
3702
  if (!value) {
4977
3703
  this.$emit("pick", value, ...args);
4978
3704
  } else if (Array.isArray(value)) {
4979
- const dates = value.map((date2) => this.showTime ? clearMilliseconds(date2) : clearTime(date2));
3705
+ const dates = value.map((date) => this.showTime ? clearMilliseconds(date) : clearTime(date));
4980
3706
  this.$emit("pick", dates, ...args);
4981
3707
  } else {
4982
3708
  this.$emit("pick", this.showTime ? clearMilliseconds(value) : clearTime(value), ...args);
@@ -5125,28 +3851,28 @@ const _sfc_main$3 = {
5125
3851
  40: 4,
5126
3852
  37: -1,
5127
3853
  39: 1,
5128
- offset: (date2, step) => date2.setFullYear(date2.getFullYear() + step)
3854
+ offset: (date, step) => date.setFullYear(date.getFullYear() + step)
5129
3855
  },
5130
3856
  "month": {
5131
3857
  38: -4,
5132
3858
  40: 4,
5133
3859
  37: -1,
5134
3860
  39: 1,
5135
- offset: (date2, step) => date2.setMonth(date2.getMonth() + step)
3861
+ offset: (date, step) => date.setMonth(date.getMonth() + step)
5136
3862
  },
5137
3863
  "week": {
5138
3864
  38: -1,
5139
3865
  40: 1,
5140
3866
  37: -1,
5141
3867
  39: 1,
5142
- offset: (date2, step) => date2.setDate(date2.getDate() + step * 7)
3868
+ offset: (date, step) => date.setDate(date.getDate() + step * 7)
5143
3869
  },
5144
3870
  "day": {
5145
3871
  38: -7,
5146
3872
  40: 7,
5147
3873
  37: -1,
5148
3874
  39: 1,
5149
- offset: (date2, step) => date2.setDate(date2.getDate() + step)
3875
+ offset: (date, step) => date.setDate(date.getDate() + step)
5150
3876
  }
5151
3877
  };
5152
3878
  const mode = this.selectionMode;
@@ -5175,12 +3901,12 @@ const _sfc_main$3 = {
5175
3901
  }
5176
3902
  },
5177
3903
  handleVisibleDateChange(value) {
5178
- const date2 = parseDate(value, this.dateFormat);
5179
- if (date2) {
5180
- if (typeof this.disabledDate === "function" && this.disabledDate(date2)) {
3904
+ const date = parseDate(value, this.dateFormat);
3905
+ if (date) {
3906
+ if (typeof this.disabledDate === "function" && this.disabledDate(date)) {
5181
3907
  return;
5182
3908
  }
5183
- this.date = modifyTime(date2, this.date.getHours(), this.date.getMinutes(), this.date.getSeconds());
3909
+ this.date = modifyTime(date, this.date.getHours(), this.date.getMinutes(), this.date.getSeconds());
5184
3910
  this.userInputDate = null;
5185
3911
  this.resetView();
5186
3912
  this.emit(this.date, true);
@@ -5192,8 +3918,8 @@ const _sfc_main$3 = {
5192
3918
  getDefaultValue() {
5193
3919
  return this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
5194
3920
  },
5195
- checkDateWithinRange(date2) {
5196
- return this.selectableRange.length > 0 ? timeWithinRange(date2, this.selectableRange, this.format || "HH:mm:ss") : true;
3921
+ checkDateWithinRange(date) {
3922
+ return this.selectableRange.length > 0 ? timeWithinRange(date, this.selectableRange, this.format || "HH:mm:ss") : true;
5197
3923
  }
5198
3924
  }
5199
3925
  };
@@ -5477,7 +4203,7 @@ const _sfc_main$2 = {
5477
4203
  TimePicker,
5478
4204
  DateTable
5479
4205
  },
5480
- mixins: [_default],
4206
+ mixins: [Locale],
5481
4207
  data() {
5482
4208
  return {
5483
4209
  timezone: "",
@@ -5601,8 +4327,8 @@ const _sfc_main$2 = {
5601
4327
  this.timeUserInput.min = null;
5602
4328
  this.$nextTick(() => {
5603
4329
  if (this.$refs.maxTimePicker && this.maxDate && this.maxDate < this.minDate) {
5604
- const format2 = "HH:mm:ss";
5605
- this.$refs.maxTimePicker.selectableRange = [[parseDate(formatDate(this.minDate, format2), format2), parseDate("23:59:59", format2)]];
4330
+ const format = "HH:mm:ss";
4331
+ this.$refs.maxTimePicker.selectableRange = [[parseDate(formatDate(this.minDate, format), format), parseDate("23:59:59", format)]];
5606
4332
  }
5607
4333
  });
5608
4334
  if (val && this.$refs.minTimePicker) {
@@ -6183,7 +4909,7 @@ const _sfc_main$1 = {
6183
4909
  components: {
6184
4910
  MonthTable
6185
4911
  },
6186
- mixins: [_default],
4912
+ mixins: [Locale],
6187
4913
  data() {
6188
4914
  return {
6189
4915
  popperClass: "",