@94ai/nf-double-week 5.0.32 → 5.0.37

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.
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const Vue = require("vue");
4
+ const dateUtil = require("element-ui/src/utils/date-util");
4
5
  const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
6
+ const Locale$1 = require("element-ui/lib/mixins/locale");
5
7
  function _mergeNamespaces(n, m) {
6
8
  for (var i = 0; i < m.length; i++) {
7
9
  const e = m[i];
@@ -135,694 +137,6 @@ const Clickoutside = {
135
137
  delete el[ctx];
136
138
  }
137
139
  };
138
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
139
- function getDefaultExportFromCjs(x) {
140
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
141
- }
142
- var date = { exports: {} };
143
- (function(module2) {
144
- (function(main) {
145
- var fecha2 = {};
146
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
147
- var twoDigits = "\\d\\d?";
148
- var threeDigits = "\\d{3}";
149
- var fourDigits = "\\d{4}";
150
- var word = "[^\\s]+";
151
- var literal = /\[([^]*?)\]/gm;
152
- var noop2 = function() {
153
- };
154
- function regexEscape(str) {
155
- return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
156
- }
157
- function shorten(arr, sLen) {
158
- var newArr = [];
159
- for (var i = 0, len = arr.length; i < len; i++) {
160
- newArr.push(arr[i].substr(0, sLen));
161
- }
162
- return newArr;
163
- }
164
- function monthUpdate(arrName) {
165
- return function(d, v, i18n3) {
166
- var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
167
- if (~index) {
168
- d.month = index;
169
- }
170
- };
171
- }
172
- function pad(val, len) {
173
- val = String(val);
174
- len = len || 2;
175
- while (val.length < len) {
176
- val = "0" + val;
177
- }
178
- return val;
179
- }
180
- var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
181
- var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
182
- var monthNamesShort = shorten(monthNames, 3);
183
- var dayNamesShort = shorten(dayNames, 3);
184
- fecha2.i18n = {
185
- dayNamesShort,
186
- dayNames,
187
- monthNamesShort,
188
- monthNames,
189
- amPm: ["am", "pm"],
190
- DoFn: function DoFn(D) {
191
- return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
192
- }
193
- };
194
- var formatFlags = {
195
- D: function(dateObj) {
196
- return dateObj.getDay();
197
- },
198
- DD: function(dateObj) {
199
- return pad(dateObj.getDay());
200
- },
201
- Do: function(dateObj, i18n3) {
202
- return i18n3.DoFn(dateObj.getDate());
203
- },
204
- d: function(dateObj) {
205
- return dateObj.getDate();
206
- },
207
- dd: function(dateObj) {
208
- return pad(dateObj.getDate());
209
- },
210
- ddd: function(dateObj, i18n3) {
211
- return i18n3.dayNamesShort[dateObj.getDay()];
212
- },
213
- dddd: function(dateObj, i18n3) {
214
- return i18n3.dayNames[dateObj.getDay()];
215
- },
216
- M: function(dateObj) {
217
- return dateObj.getMonth() + 1;
218
- },
219
- MM: function(dateObj) {
220
- return pad(dateObj.getMonth() + 1);
221
- },
222
- MMM: function(dateObj, i18n3) {
223
- return i18n3.monthNamesShort[dateObj.getMonth()];
224
- },
225
- MMMM: function(dateObj, i18n3) {
226
- return i18n3.monthNames[dateObj.getMonth()];
227
- },
228
- yy: function(dateObj) {
229
- return pad(String(dateObj.getFullYear()), 4).substr(2);
230
- },
231
- yyyy: function(dateObj) {
232
- return pad(dateObj.getFullYear(), 4);
233
- },
234
- h: function(dateObj) {
235
- return dateObj.getHours() % 12 || 12;
236
- },
237
- hh: function(dateObj) {
238
- return pad(dateObj.getHours() % 12 || 12);
239
- },
240
- H: function(dateObj) {
241
- return dateObj.getHours();
242
- },
243
- HH: function(dateObj) {
244
- return pad(dateObj.getHours());
245
- },
246
- m: function(dateObj) {
247
- return dateObj.getMinutes();
248
- },
249
- mm: function(dateObj) {
250
- return pad(dateObj.getMinutes());
251
- },
252
- s: function(dateObj) {
253
- return dateObj.getSeconds();
254
- },
255
- ss: function(dateObj) {
256
- return pad(dateObj.getSeconds());
257
- },
258
- S: function(dateObj) {
259
- return Math.round(dateObj.getMilliseconds() / 100);
260
- },
261
- SS: function(dateObj) {
262
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
263
- },
264
- SSS: function(dateObj) {
265
- return pad(dateObj.getMilliseconds(), 3);
266
- },
267
- a: function(dateObj, i18n3) {
268
- return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
269
- },
270
- A: function(dateObj, i18n3) {
271
- return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
272
- },
273
- ZZ: function(dateObj) {
274
- var o = dateObj.getTimezoneOffset();
275
- return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
276
- }
277
- };
278
- var parseFlags = {
279
- d: [twoDigits, function(d, v) {
280
- d.day = v;
281
- }],
282
- Do: [twoDigits + word, function(d, v) {
283
- d.day = parseInt(v, 10);
284
- }],
285
- M: [twoDigits, function(d, v) {
286
- d.month = v - 1;
287
- }],
288
- yy: [twoDigits, function(d, v) {
289
- var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
290
- d.year = "" + (v > 68 ? cent - 1 : cent) + v;
291
- }],
292
- h: [twoDigits, function(d, v) {
293
- d.hour = v;
294
- }],
295
- m: [twoDigits, function(d, v) {
296
- d.minute = v;
297
- }],
298
- s: [twoDigits, function(d, v) {
299
- d.second = v;
300
- }],
301
- yyyy: [fourDigits, function(d, v) {
302
- d.year = v;
303
- }],
304
- S: ["\\d", function(d, v) {
305
- d.millisecond = v * 100;
306
- }],
307
- SS: ["\\d{2}", function(d, v) {
308
- d.millisecond = v * 10;
309
- }],
310
- SSS: [threeDigits, function(d, v) {
311
- d.millisecond = v;
312
- }],
313
- D: [twoDigits, noop2],
314
- ddd: [word, noop2],
315
- MMM: [word, monthUpdate("monthNamesShort")],
316
- MMMM: [word, monthUpdate("monthNames")],
317
- a: [word, function(d, v, i18n3) {
318
- var val = v.toLowerCase();
319
- if (val === i18n3.amPm[0]) {
320
- d.isPm = false;
321
- } else if (val === i18n3.amPm[1]) {
322
- d.isPm = true;
323
- }
324
- }],
325
- ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
326
- var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
327
- if (parts) {
328
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
329
- d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
330
- }
331
- }]
332
- };
333
- parseFlags.dd = parseFlags.d;
334
- parseFlags.dddd = parseFlags.ddd;
335
- parseFlags.DD = parseFlags.D;
336
- parseFlags.mm = parseFlags.m;
337
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
338
- parseFlags.MM = parseFlags.M;
339
- parseFlags.ss = parseFlags.s;
340
- parseFlags.A = parseFlags.a;
341
- fecha2.masks = {
342
- default: "ddd MMM dd yyyy HH:mm:ss",
343
- shortDate: "M/D/yy",
344
- mediumDate: "MMM d, yyyy",
345
- longDate: "MMMM d, yyyy",
346
- fullDate: "dddd, MMMM d, yyyy",
347
- shortTime: "HH:mm",
348
- mediumTime: "HH:mm:ss",
349
- longTime: "HH:mm:ss.SSS"
350
- };
351
- fecha2.format = function(dateObj, mask, i18nSettings) {
352
- var i18n3 = i18nSettings || fecha2.i18n;
353
- if (typeof dateObj === "number") {
354
- dateObj = new Date(dateObj);
355
- }
356
- if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
357
- throw new Error("Invalid Date in fecha.format");
358
- }
359
- mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
360
- var literals = [];
361
- mask = mask.replace(literal, function($0, $1) {
362
- literals.push($1);
363
- return "@@@";
364
- });
365
- mask = mask.replace(token, function($0) {
366
- return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
367
- });
368
- return mask.replace(/@@@/g, function() {
369
- return literals.shift();
370
- });
371
- };
372
- fecha2.parse = function(dateStr, format2, i18nSettings) {
373
- var i18n3 = i18nSettings || fecha2.i18n;
374
- if (typeof format2 !== "string") {
375
- throw new Error("Invalid format in fecha.parse");
376
- }
377
- format2 = fecha2.masks[format2] || format2;
378
- if (dateStr.length > 1e3) {
379
- return null;
380
- }
381
- var dateInfo = {};
382
- var parseInfo = [];
383
- var literals = [];
384
- format2 = format2.replace(literal, function($0, $1) {
385
- literals.push($1);
386
- return "@@@";
387
- });
388
- var newFormat = regexEscape(format2).replace(token, function($0) {
389
- if (parseFlags[$0]) {
390
- var info = parseFlags[$0];
391
- parseInfo.push(info[1]);
392
- return "(" + info[0] + ")";
393
- }
394
- return $0;
395
- });
396
- newFormat = newFormat.replace(/@@@/g, function() {
397
- return literals.shift();
398
- });
399
- var matches = dateStr.match(new RegExp(newFormat, "i"));
400
- if (!matches) {
401
- return null;
402
- }
403
- for (var i = 1; i < matches.length; i++) {
404
- parseInfo[i - 1](dateInfo, matches[i], i18n3);
405
- }
406
- var today = /* @__PURE__ */ new Date();
407
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
408
- dateInfo.hour = +dateInfo.hour + 12;
409
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
410
- dateInfo.hour = 0;
411
- }
412
- var date2;
413
- if (dateInfo.timezoneOffset != null) {
414
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
415
- 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));
416
- } else {
417
- 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);
418
- }
419
- return date2;
420
- };
421
- if (module2.exports) {
422
- module2.exports = fecha2;
423
- } else {
424
- main.fecha = fecha2;
425
- }
426
- })(commonjsGlobal);
427
- })(date);
428
- var dateExports = date.exports;
429
- const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
430
- const defaultLang = {
431
- el: {
432
- colorpicker: {
433
- confirm: "确定",
434
- clear: "清空"
435
- },
436
- datepicker: {
437
- now: "此刻",
438
- today: "今天",
439
- cancel: "取消",
440
- clear: "清空",
441
- confirm: "确定",
442
- selectDate: "选择日期",
443
- selectTime: "选择时间",
444
- startDate: "开始日期",
445
- startTime: "开始时间",
446
- endDate: "结束日期",
447
- endTime: "结束时间",
448
- prevYear: "前一年",
449
- nextYear: "后一年",
450
- prevMonth: "上个月",
451
- nextMonth: "下个月",
452
- year: "年",
453
- month1: "1 月",
454
- month2: "2 月",
455
- month3: "3 月",
456
- month4: "4 月",
457
- month5: "5 月",
458
- month6: "6 月",
459
- month7: "7 月",
460
- month8: "8 月",
461
- month9: "9 月",
462
- month10: "10 月",
463
- month11: "11 月",
464
- month12: "12 月",
465
- // week: '周次',
466
- weeks: {
467
- sun: "日",
468
- mon: "一",
469
- tue: "二",
470
- wed: "三",
471
- thu: "四",
472
- fri: "五",
473
- sat: "六"
474
- },
475
- months: {
476
- jan: "一月",
477
- feb: "二月",
478
- mar: "三月",
479
- apr: "四月",
480
- may: "五月",
481
- jun: "六月",
482
- jul: "七月",
483
- aug: "八月",
484
- sep: "九月",
485
- oct: "十月",
486
- nov: "十一月",
487
- dec: "十二月"
488
- }
489
- },
490
- select: {
491
- loading: "加载中",
492
- noMatch: "无匹配数据",
493
- noData: "无数据",
494
- placeholder: "请选择"
495
- },
496
- cascader: {
497
- noMatch: "无匹配数据",
498
- loading: "加载中",
499
- placeholder: "请选择",
500
- noData: "暂无数据"
501
- },
502
- pagination: {
503
- goto: "前往",
504
- pagesize: "条/页",
505
- total: "共 {total} 条",
506
- pageClassifier: "页"
507
- },
508
- messagebox: {
509
- title: "提示",
510
- confirm: "确定",
511
- cancel: "取消",
512
- error: "输入的数据不合法!"
513
- },
514
- upload: {
515
- deleteTip: "按 delete 键可删除",
516
- delete: "删除",
517
- preview: "查看图片",
518
- continue: "继续上传"
519
- },
520
- table: {
521
- emptyText: "暂无数据",
522
- confirmFilter: "筛选",
523
- resetFilter: "重置",
524
- clearFilter: "全部",
525
- sumText: "合计"
526
- },
527
- tree: {
528
- emptyText: "暂无数据"
529
- },
530
- transfer: {
531
- noMatch: "无匹配数据",
532
- noData: "无数据",
533
- titles: ["列表 1", "列表 2"],
534
- filterPlaceholder: "请输入搜索内容",
535
- noCheckedFormat: "共 {total} 项",
536
- hasCheckedFormat: "已选 {checked}/{total} 项"
537
- },
538
- image: {
539
- error: "加载失败"
540
- },
541
- pageHeader: {
542
- title: "返回"
543
- },
544
- popconfirm: {
545
- confirmButtonText: "确定",
546
- cancelButtonText: "取消"
547
- }
548
- }
549
- };
550
- var isMergeableObject = function isMergeableObject2(value) {
551
- return isNonNullObject(value) && !isSpecial(value);
552
- };
553
- function isNonNullObject(value) {
554
- return !!value && typeof value === "object";
555
- }
556
- function isSpecial(value) {
557
- var stringValue = Object.prototype.toString.call(value);
558
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
559
- }
560
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
561
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
562
- function isReactElement(value) {
563
- return value.$$typeof === REACT_ELEMENT_TYPE;
564
- }
565
- function emptyTarget(val) {
566
- return Array.isArray(val) ? [] : {};
567
- }
568
- function cloneIfNecessary(value, optionsArgument) {
569
- var clone = optionsArgument && optionsArgument.clone === true;
570
- return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
571
- }
572
- function defaultArrayMerge(target, source, optionsArgument) {
573
- var destination = target.slice();
574
- source.forEach(function(e, i) {
575
- if (typeof destination[i] === "undefined") {
576
- destination[i] = cloneIfNecessary(e, optionsArgument);
577
- } else if (isMergeableObject(e)) {
578
- destination[i] = deepmerge(target[i], e, optionsArgument);
579
- } else if (target.indexOf(e) === -1) {
580
- destination.push(cloneIfNecessary(e, optionsArgument));
581
- }
582
- });
583
- return destination;
584
- }
585
- function mergeObject(target, source, optionsArgument) {
586
- var destination = {};
587
- if (isMergeableObject(target)) {
588
- Object.keys(target).forEach(function(key) {
589
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
590
- });
591
- }
592
- Object.keys(source).forEach(function(key) {
593
- if (!isMergeableObject(source[key]) || !target[key]) {
594
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
595
- } else {
596
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
597
- }
598
- });
599
- return destination;
600
- }
601
- function deepmerge(target, source, optionsArgument) {
602
- var sourceIsArray = Array.isArray(source);
603
- var targetIsArray = Array.isArray(target);
604
- var options = optionsArgument || {
605
- arrayMerge: defaultArrayMerge
606
- };
607
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
608
- if (!sourceAndTargetTypesMatch) {
609
- return cloneIfNecessary(source, optionsArgument);
610
- } else if (sourceIsArray) {
611
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
612
- return arrayMerge(target, source, optionsArgument);
613
- } else {
614
- return mergeObject(target, source, optionsArgument);
615
- }
616
- }
617
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
618
- if (!Array.isArray(array) || array.length < 2) {
619
- throw new Error("first argument should be an array with at least two elements");
620
- }
621
- return array.reduce(function(prev, next) {
622
- return deepmerge(prev, next, optionsArgument);
623
- });
624
- };
625
- var deepmerge_1 = deepmerge;
626
- var cjs = deepmerge_1;
627
- const deepmerge$1 = /* @__PURE__ */ getDefaultExportFromCjs(cjs);
628
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
629
- function hasOwn$1(obj, key) {
630
- return hasOwnProperty$1.call(obj, key);
631
- }
632
- const arrayFindIndex$1 = function(arr, pred) {
633
- for (let i = 0; i !== arr.length; ++i) {
634
- if (pred(arr[i])) {
635
- return i;
636
- }
637
- }
638
- return -1;
639
- };
640
- const arrayFind = function(arr, pred) {
641
- const idx = arrayFindIndex$1(arr, pred);
642
- return idx !== -1 ? arr[idx] : void 0;
643
- };
644
- const coerceTruthyValueToArray = function(val) {
645
- if (Array.isArray(val)) {
646
- return val;
647
- } else if (val) {
648
- return [val];
649
- } else {
650
- return [];
651
- }
652
- };
653
- const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
654
- function Format(Vue2) {
655
- function template(string, ...args) {
656
- if (args.length === 1 && typeof args[0] === "object") {
657
- args = args[0];
658
- }
659
- if (!args || !args.hasOwnProperty) {
660
- args = {};
661
- }
662
- return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
663
- let result;
664
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
665
- return i;
666
- } else {
667
- result = hasOwn$1(args, i) ? args[i] : null;
668
- if (result === null || result === void 0) {
669
- return "";
670
- }
671
- return result;
672
- }
673
- });
674
- }
675
- return template;
676
- }
677
- const format$2 = Format();
678
- let lang$1 = defaultLang;
679
- let merged$1 = false;
680
- let i18nHandler$1 = function() {
681
- const vuei18n = Object.getPrototypeOf(this || Vue).$t;
682
- if (typeof vuei18n === "function" && !!Vue.locale) {
683
- if (!merged$1) {
684
- merged$1 = true;
685
- Vue.locale(Vue.config.lang, deepmerge$1(lang$1, Vue.locale(Vue.config.lang) || {}, {
686
- clone: true
687
- }));
688
- }
689
- return vuei18n.apply(this, arguments);
690
- }
691
- };
692
- const t$1 = function(path, options) {
693
- let value = i18nHandler$1.apply(this, arguments);
694
- if (value !== null && value !== void 0)
695
- return value;
696
- const array = path.split(".");
697
- let current = lang$1;
698
- for (let i = 0, j = array.length; i < j; i++) {
699
- const property = array[i];
700
- value = current[property];
701
- if (i === j - 1)
702
- return format$2(value, options);
703
- if (!value)
704
- return "";
705
- current = value;
706
- }
707
- return "";
708
- };
709
- const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
710
- const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
711
- const getI18nSettings = () => {
712
- return {
713
- dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
714
- dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
715
- monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
716
- monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
717
- amPm: ["am", "pm"]
718
- };
719
- };
720
- const toDate = function(date2) {
721
- return isDate(date2) ? new Date(date2) : null;
722
- };
723
- const isDate = function(date2) {
724
- if (date2 === null || date2 === void 0)
725
- return false;
726
- if (isNaN(new Date(date2).getTime()))
727
- return false;
728
- if (Array.isArray(date2))
729
- return false;
730
- return true;
731
- };
732
- const isDateObject = function(val) {
733
- return val instanceof Date;
734
- };
735
- const formatDate = function(date2, format2) {
736
- date2 = toDate(date2);
737
- if (!date2)
738
- return "";
739
- return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
740
- };
741
- const parseDate = function(string, format2) {
742
- return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
743
- };
744
- const getDayCountOfMonth = function(year, month) {
745
- if (month === 3 || month === 5 || month === 8 || month === 10) {
746
- return 30;
747
- }
748
- if (month === 1) {
749
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
750
- return 29;
751
- } else {
752
- return 28;
753
- }
754
- }
755
- return 31;
756
- };
757
- const getFirstDayOfMonth = function(date2) {
758
- const temp = new Date(date2.getTime());
759
- temp.setDate(1);
760
- return temp.getDay();
761
- };
762
- const prevDate = function(date2, amount = 1) {
763
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() - amount);
764
- };
765
- const nextDate = function(date2, amount = 1) {
766
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
767
- };
768
- const getStartDateOfMonth = function(year, month) {
769
- const result = new Date(year, month, 1);
770
- const day = result.getDay();
771
- if (day === 0) {
772
- return prevDate(result, 7);
773
- } else {
774
- return prevDate(result, day);
775
- }
776
- };
777
- const getWeekNumber = function(src) {
778
- if (!isDate(src))
779
- return null;
780
- const date2 = new Date(src.getTime());
781
- date2.setHours(0, 0, 0, 0);
782
- date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
783
- const week1 = new Date(date2.getFullYear(), 0, 4);
784
- return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
785
- };
786
- const modifyDate = function(date2, y, m, d) {
787
- return new Date(y, m, d, date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
788
- };
789
- const modifyTime = function(date2, h, m, s) {
790
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
791
- };
792
- const modifyWithTimeString = (date2, time) => {
793
- if (date2 == null || !time) {
794
- return date2;
795
- }
796
- time = parseDate(time, "HH:mm:ss");
797
- return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
798
- };
799
- const clearTime = function(date2) {
800
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
801
- };
802
- const changeYearMonthAndClampDate = function(date2, year, month) {
803
- const monthDate = Math.min(date2.getDate(), getDayCountOfMonth(year, month));
804
- return modifyDate(date2, year, month, monthDate);
805
- };
806
- const prevMonth = function(date2) {
807
- const year = date2.getFullYear();
808
- const month = date2.getMonth();
809
- return month === 0 ? changeYearMonthAndClampDate(date2, year - 1, 11) : changeYearMonthAndClampDate(date2, year, month - 1);
810
- };
811
- const nextMonth = function(date2) {
812
- const year = date2.getFullYear();
813
- const month = date2.getMonth();
814
- return month === 11 ? changeYearMonthAndClampDate(date2, year + 1, 0) : changeYearMonthAndClampDate(date2, year, month + 1);
815
- };
816
- const prevYear = function(date2, amount = 1) {
817
- const year = date2.getFullYear();
818
- const month = date2.getMonth();
819
- return changeYearMonthAndClampDate(date2, year - amount, month);
820
- };
821
- const nextYear = function(date2, amount = 1) {
822
- const year = date2.getFullYear();
823
- const month = date2.getMonth();
824
- return changeYearMonthAndClampDate(date2, year + amount, month);
825
- };
826
140
  function merge(target) {
827
141
  for (let i = 1, j = arguments.length; i < j; i++) {
828
142
  let source = arguments[i] || {};
@@ -1004,6 +318,10 @@ if (!Vue.prototype.$isServer) {
1004
318
  }
1005
319
  });
1006
320
  }
321
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
322
+ function getDefaultExportFromCjs(x) {
323
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
324
+ }
1007
325
  var popper$1 = { exports: {} };
1008
326
  /**
1009
327
  * @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -1292,7 +610,7 @@ var popper$1 = { exports: {} };
1292
610
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1293
611
  }
1294
612
  modifiersToRun.forEach((function(modifier) {
1295
- if (isFunction2(modifier)) {
613
+ if (isFunction(modifier)) {
1296
614
  data = modifier.call(this, data);
1297
615
  }
1298
616
  }).bind(this));
@@ -1604,7 +922,7 @@ var popper$1 = { exports: {} };
1604
922
  element.style[prop] = styles[prop] + unit;
1605
923
  });
1606
924
  }
1607
- function isFunction2(functionToCheck) {
925
+ function isFunction(functionToCheck) {
1608
926
  var getType = {};
1609
927
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
1610
928
  }
@@ -1621,8 +939,8 @@ var popper$1 = { exports: {} };
1621
939
  }
1622
940
  function getBoundingClientRect(element) {
1623
941
  var rect = element.getBoundingClientRect();
1624
- var isIE2 = navigator.userAgent.indexOf("MSIE") != -1;
1625
- var rectTop = isIE2 && element.tagName === "HTML" ? -element.scrollTop : rect.top;
942
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
943
+ var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
1626
944
  return {
1627
945
  left: rect.left,
1628
946
  top: rectTop,
@@ -1920,7 +1238,7 @@ const DEFAULT_FORMATS = {
1920
1238
  const DATE_PARSER = function(text, format2) {
1921
1239
  if (format2 === "timestamp")
1922
1240
  return new Date(Number(text));
1923
- return parseDate(text, format2);
1241
+ return dateUtil.parseDate(text, format2);
1924
1242
  };
1925
1243
  const RANGE_PARSER = function(array, format2) {
1926
1244
  if (array.length === 2) {
@@ -1949,10 +1267,10 @@ const TYPE_VALUE_RESOLVER_MAP = {
1949
1267
  function isLeapYear(year) {
1950
1268
  return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
1951
1269
  }
1952
- function getDays(date3) {
1953
- const year = date3.getFullYear();
1954
- const month2 = date3.getMonth() + 1;
1955
- const day = date3.getDate();
1270
+ function getDays(date2) {
1271
+ const year = date2.getFullYear();
1272
+ const month2 = date2.getMonth() + 1;
1273
+ const day = date2.getDate();
1956
1274
  let days2 = day;
1957
1275
  const monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1958
1276
  for (let i = 0; i < month2 - 1; i++) {
@@ -1969,19 +1287,19 @@ const TYPE_VALUE_RESOLVER_MAP = {
1969
1287
  const y = value2.getFullYear();
1970
1288
  const yearOneDateSun = (/* @__PURE__ */ new Date(y + "-01-01")).getDay() || 7;
1971
1289
  const days = getDays(value2);
1972
- const week = getWeekNumber(value2);
1290
+ const week = dateUtil.getWeekNumber(value2);
1973
1291
  const month = value2.getMonth();
1974
1292
  const trueDate = new Date(value2);
1975
1293
  if (week === 1 && month === 11) {
1976
1294
  trueDate.setHours(0, 0, 0, 0);
1977
1295
  trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
1978
1296
  }
1979
- let date2 = formatDate(trueDate, format2);
1297
+ let date = dateUtil.formatDate(trueDate, format2);
1980
1298
  if (7 - yearOneDateSun < 4 && 7 - yearOneDateSun >= days) {
1981
- date2 = date2.replace(new RegExp(y, "ig"), y - 1);
1299
+ date = date.replace(new RegExp(y, "ig"), y - 1);
1982
1300
  }
1983
- date2 = /WW/.test(date2) ? date2.replace(/WW/, week < 10 ? "0" + week : week) : date2.replace(/W/, week);
1984
- return date2;
1301
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
1302
+ return date;
1985
1303
  }
1986
1304
  if (!Array.isArray(value)) {
1987
1305
  return getDate(value);
@@ -2039,11 +1357,11 @@ const valueEquals = function(a, b) {
2039
1357
  }
2040
1358
  return false;
2041
1359
  };
2042
- const isString$1 = function(val) {
1360
+ const isString = function(val) {
2043
1361
  return typeof val === "string" || val instanceof String;
2044
1362
  };
2045
1363
  const validator = function(val) {
2046
- return val === null || val === void 0 || isString$1(val) || Array.isArray(val) && val.length === 2 && val.every(isString$1);
1364
+ return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
2047
1365
  };
2048
1366
  const _sfc_main$4 = {
2049
1367
  directives: {
@@ -2176,7 +1494,7 @@ const _sfc_main$4 = {
2176
1494
  var _a;
2177
1495
  if (!this.value)
2178
1496
  return this.value;
2179
- const valueIsDateObject = isDateObject(this.value) || Array.isArray(this.value) && this.value.every(isDateObject);
1497
+ const valueIsDateObject = dateUtil.isDateObject(this.value) || Array.isArray(this.value) && this.value.every(dateUtil.isDateObject);
2180
1498
  if (valueIsDateObject) {
2181
1499
  return this.value;
2182
1500
  }
@@ -2274,19 +1592,19 @@ const _sfc_main$4 = {
2274
1592
  },
2275
1593
  // {parse, formatTo} Value deals maps component value with internal Date
2276
1594
  parseValue(value) {
2277
- const isParsed = isDateObject(value) || Array.isArray(value) && value.every(isDateObject);
1595
+ const isParsed = dateUtil.isDateObject(value) || Array.isArray(value) && value.every(dateUtil.isDateObject);
2278
1596
  if (this.valueFormat && !isParsed) {
2279
1597
  return parseAsFormatAndType(value, this.valueFormat, this.type) || value;
2280
1598
  } else {
2281
1599
  return value;
2282
1600
  }
2283
1601
  },
2284
- formatToValue(date2) {
2285
- const isFormattable = isDateObject(date2) || Array.isArray(date2) && date2.every(isDateObject);
1602
+ formatToValue(date) {
1603
+ const isFormattable = dateUtil.isDateObject(date) || Array.isArray(date) && date.every(dateUtil.isDateObject);
2286
1604
  if (this.valueFormat && isFormattable) {
2287
- return formatAsFormatAndType(date2, this.valueFormat);
1605
+ return formatAsFormatAndType(date, this.valueFormat);
2288
1606
  } else {
2289
- return date2;
1607
+ return date;
2290
1608
  }
2291
1609
  },
2292
1610
  // {parse, formatTo} String deals with user input
@@ -2456,10 +1774,10 @@ const _sfc_main$4 = {
2456
1774
  this.$el.appendChild(this.picker.$el);
2457
1775
  this.picker.resetView && this.picker.resetView();
2458
1776
  this.picker.$on("dodestroy", this.doDestroy);
2459
- this.picker.$on("pick", (date2 = "", visible = false) => {
1777
+ this.picker.$on("pick", (date = "", visible = false) => {
2460
1778
  this.userInput = null;
2461
1779
  this.pickerVisible = this.picker.visible = visible;
2462
- this.emitInput(date2);
1780
+ this.emitInput(date);
2463
1781
  this.picker.resetView && this.picker.resetView();
2464
1782
  });
2465
1783
  this.picker.$on("select-range", (start, end, pos) => {
@@ -2577,10 +1895,7 @@ var _sfc_render$4 = function render() {
2577
1895
  var _sfc_staticRenderFns$4 = [];
2578
1896
  var __component__$4 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$4, _sfc_render$4, _sfc_staticRenderFns$4, false, null, null, null, null);
2579
1897
  const Picker = __component__$4.exports;
2580
- var locale = {};
2581
- var zhCN = {};
2582
- zhCN.__esModule = true;
2583
- zhCN.default = {
1898
+ const defaultLang = {
2584
1899
  el: {
2585
1900
  colorpicker: {
2586
1901
  confirm: "确定",
@@ -2700,151 +2015,99 @@ zhCN.default = {
2700
2015
  }
2701
2016
  }
2702
2017
  };
2703
- var format$1 = {};
2704
- var util = {};
2705
- var types = {};
2706
- types.__esModule = true;
2707
- types.isString = isString;
2708
- types.isObject = isObject;
2709
- types.isHtmlElement = isHtmlElement;
2710
- function isString(obj) {
2711
- return Object.prototype.toString.call(obj) === "[object String]";
2712
- }
2713
- function isObject(obj) {
2714
- return Object.prototype.toString.call(obj) === "[object Object]";
2715
- }
2716
- function isHtmlElement(node) {
2717
- return node && node.nodeType === Node.ELEMENT_NODE;
2718
- }
2719
- types.isFunction = function isFunction(functionToCheck) {
2720
- var getType = {};
2721
- return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
2722
- };
2723
- types.isUndefined = function isUndefined(val) {
2724
- return val === void 0;
2725
- };
2726
- types.isDefined = function isDefined(val) {
2727
- return val !== void 0 && val !== null;
2728
- };
2729
- util.__esModule = true;
2730
- 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;
2731
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
2732
- return typeof obj;
2733
- } : function(obj) {
2734
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2018
+ var isMergeableObject = function isMergeableObject2(value) {
2019
+ return isNonNullObject(value) && !isSpecial(value);
2735
2020
  };
2736
- util.noop = noop;
2737
- util.hasOwn = hasOwn;
2738
- util.toObject = toObject;
2739
- util.getPropByPath = getPropByPath;
2740
- util.rafThrottle = rafThrottle;
2741
- util.objToArray = objToArray;
2742
- var _vue$1 = Vue;
2743
- var _vue2$1 = _interopRequireDefault$1(_vue$1);
2744
- var _types = types;
2745
- function _interopRequireDefault$1(obj) {
2746
- return obj && obj.__esModule ? obj : {
2747
- default: obj
2748
- };
2021
+ function isNonNullObject(value) {
2022
+ return !!value && typeof value === "object";
2749
2023
  }
2750
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2751
- function noop() {
2024
+ function isSpecial(value) {
2025
+ var stringValue = Object.prototype.toString.call(value);
2026
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
2752
2027
  }
2753
- function hasOwn(obj, key) {
2754
- return hasOwnProperty.call(obj, key);
2028
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
2029
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
2030
+ function isReactElement(value) {
2031
+ return value.$$typeof === REACT_ELEMENT_TYPE;
2755
2032
  }
2756
- function extend(to, _from) {
2757
- for (var key in _from) {
2758
- to[key] = _from[key];
2759
- }
2760
- return to;
2033
+ function emptyTarget(val) {
2034
+ return Array.isArray(val) ? [] : {};
2761
2035
  }
2762
- function toObject(arr) {
2763
- var res = {};
2764
- for (var i = 0; i < arr.length; i++) {
2765
- if (arr[i]) {
2766
- extend(res, arr[i]);
2767
- }
2768
- }
2769
- return res;
2036
+ function cloneIfNecessary(value, optionsArgument) {
2037
+ var clone = optionsArgument && optionsArgument.clone === true;
2038
+ return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
2770
2039
  }
2771
- util.getValueByPath = function getValueByPath(object, prop) {
2772
- prop = prop || "";
2773
- var paths = prop.split(".");
2774
- var current = object;
2775
- var result = null;
2776
- for (var i = 0, j = paths.length; i < j; i++) {
2777
- var path = paths[i];
2778
- if (!current)
2779
- break;
2780
- if (i === j - 1) {
2781
- result = current[path];
2782
- break;
2040
+ function defaultArrayMerge(target, source, optionsArgument) {
2041
+ var destination = target.slice();
2042
+ source.forEach(function(e, i) {
2043
+ if (typeof destination[i] === "undefined") {
2044
+ destination[i] = cloneIfNecessary(e, optionsArgument);
2045
+ } else if (isMergeableObject(e)) {
2046
+ destination[i] = deepmerge(target[i], e, optionsArgument);
2047
+ } else if (target.indexOf(e) === -1) {
2048
+ destination.push(cloneIfNecessary(e, optionsArgument));
2783
2049
  }
2784
- current = current[path];
2050
+ });
2051
+ return destination;
2052
+ }
2053
+ function mergeObject(target, source, optionsArgument) {
2054
+ var destination = {};
2055
+ if (isMergeableObject(target)) {
2056
+ Object.keys(target).forEach(function(key) {
2057
+ destination[key] = cloneIfNecessary(target[key], optionsArgument);
2058
+ });
2785
2059
  }
2786
- return result;
2787
- };
2788
- function getPropByPath(obj, path, strict) {
2789
- var tempObj = obj;
2790
- path = path.replace(/\[(\w+)\]/g, ".$1");
2791
- path = path.replace(/^\./, "");
2792
- var keyArr = path.split(".");
2793
- var i = 0;
2794
- for (var len = keyArr.length; i < len - 1; ++i) {
2795
- if (!tempObj && !strict)
2796
- break;
2797
- var key = keyArr[i];
2798
- if (key in tempObj) {
2799
- tempObj = tempObj[key];
2060
+ Object.keys(source).forEach(function(key) {
2061
+ if (!isMergeableObject(source[key]) || !target[key]) {
2062
+ destination[key] = cloneIfNecessary(source[key], optionsArgument);
2800
2063
  } else {
2801
- if (strict) {
2802
- throw new Error("please transfer a valid prop path to form item!");
2803
- }
2804
- break;
2064
+ destination[key] = deepmerge(target[key], source[key], optionsArgument);
2805
2065
  }
2806
- }
2807
- return {
2808
- o: tempObj,
2809
- k: keyArr[i],
2810
- v: tempObj ? tempObj[keyArr[i]] : null
2066
+ });
2067
+ return destination;
2068
+ }
2069
+ function deepmerge(target, source, optionsArgument) {
2070
+ var sourceIsArray = Array.isArray(source);
2071
+ var targetIsArray = Array.isArray(target);
2072
+ var options = optionsArgument || {
2073
+ arrayMerge: defaultArrayMerge
2811
2074
  };
2075
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
2076
+ if (!sourceAndTargetTypesMatch) {
2077
+ return cloneIfNecessary(source, optionsArgument);
2078
+ } else if (sourceIsArray) {
2079
+ var arrayMerge = options.arrayMerge || defaultArrayMerge;
2080
+ return arrayMerge(target, source, optionsArgument);
2081
+ } else {
2082
+ return mergeObject(target, source, optionsArgument);
2083
+ }
2812
2084
  }
2813
- util.generateId = function generateId() {
2814
- return Math.floor(Math.random() * 1e4);
2815
- };
2816
- util.valueEquals = function valueEquals2(a, b) {
2817
- if (a === b)
2818
- return true;
2819
- if (!(a instanceof Array))
2820
- return false;
2821
- if (!(b instanceof Array))
2822
- return false;
2823
- if (a.length !== b.length)
2824
- return false;
2825
- for (var i = 0; i !== a.length; ++i) {
2826
- if (a[i] !== b[i])
2827
- return false;
2085
+ deepmerge.all = function deepmergeAll(array, optionsArgument) {
2086
+ if (!Array.isArray(array) || array.length < 2) {
2087
+ throw new Error("first argument should be an array with at least two elements");
2828
2088
  }
2829
- return true;
2830
- };
2831
- util.escapeRegexpString = function escapeRegexpString() {
2832
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
2833
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
2089
+ return array.reduce(function(prev, next) {
2090
+ return deepmerge(prev, next, optionsArgument);
2091
+ });
2834
2092
  };
2835
- var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
2836
- for (var i = 0; i !== arr.length; ++i) {
2093
+ var deepmerge_1 = deepmerge;
2094
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
2095
+ function hasOwn(obj, key) {
2096
+ return hasOwnProperty.call(obj, key);
2097
+ }
2098
+ const arrayFindIndex = function(arr, pred) {
2099
+ for (let i = 0; i !== arr.length; ++i) {
2837
2100
  if (pred(arr[i])) {
2838
2101
  return i;
2839
2102
  }
2840
2103
  }
2841
2104
  return -1;
2842
2105
  };
2843
- util.arrayFind = function arrayFind2(arr, pred) {
2844
- var idx = arrayFindIndex(arr, pred);
2106
+ const arrayFind = function(arr, pred) {
2107
+ const idx = arrayFindIndex(arr, pred);
2845
2108
  return idx !== -1 ? arr[idx] : void 0;
2846
2109
  };
2847
- util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2110
+ const coerceTruthyValueToArray = function(val) {
2848
2111
  if (Array.isArray(val)) {
2849
2112
  return val;
2850
2113
  } else if (val) {
@@ -2853,138 +2116,21 @@ util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2853
2116
  return [];
2854
2117
  }
2855
2118
  };
2856
- util.isIE = function isIE() {
2857
- return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
2858
- };
2859
- util.isEdge = function isEdge() {
2860
- return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
2861
- };
2862
- util.isFirefox = function isFirefox() {
2863
- return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
2864
- };
2865
- util.autoprefixer = function autoprefixer(style) {
2866
- if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
2867
- return style;
2868
- var rules = ["transform", "transition", "animation"];
2869
- var prefixes = ["ms-", "webkit-"];
2870
- rules.forEach(function(rule) {
2871
- var value = style[rule];
2872
- if (rule && value) {
2873
- prefixes.forEach(function(prefix) {
2874
- style[prefix + rule] = value;
2875
- });
2876
- }
2877
- });
2878
- return style;
2879
- };
2880
- util.kebabCase = function kebabCase(str) {
2881
- var hyphenateRE = /([^-])([A-Z])/g;
2882
- return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
2883
- };
2884
- util.capitalize = function capitalize(str) {
2885
- if (!(0, _types.isString)(str))
2886
- return str;
2887
- return str.charAt(0).toUpperCase() + str.slice(1);
2888
- };
2889
- var looseEqual = util.looseEqual = function looseEqual2(a, b) {
2890
- var isObjectA = (0, _types.isObject)(a);
2891
- var isObjectB = (0, _types.isObject)(b);
2892
- if (isObjectA && isObjectB) {
2893
- return JSON.stringify(a) === JSON.stringify(b);
2894
- } else if (!isObjectA && !isObjectB) {
2895
- return String(a) === String(b);
2896
- } else {
2897
- return false;
2898
- }
2899
- };
2900
- var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
2901
- arrayA = arrayA || [];
2902
- arrayB = arrayB || [];
2903
- if (arrayA.length !== arrayB.length) {
2904
- return false;
2905
- }
2906
- for (var i = 0; i < arrayA.length; i++) {
2907
- if (!looseEqual(arrayA[i], arrayB[i])) {
2908
- return false;
2909
- }
2910
- }
2911
- return true;
2912
- };
2913
- util.isEqual = function isEqual(value1, value2) {
2914
- if (Array.isArray(value1) && Array.isArray(value2)) {
2915
- return arrayEquals(value1, value2);
2916
- }
2917
- return looseEqual(value1, value2);
2918
- };
2919
- var isEmpty = util.isEmpty = function isEmpty2(val) {
2920
- if (val == null)
2921
- return true;
2922
- if (typeof val === "boolean")
2923
- return false;
2924
- if (typeof val === "number")
2925
- return !val;
2926
- if (val instanceof Error)
2927
- return val.message === "";
2928
- switch (Object.prototype.toString.call(val)) {
2929
- case "[object String]":
2930
- case "[object Array]":
2931
- return !val.length;
2932
- case "[object File]":
2933
- case "[object Map]":
2934
- case "[object Set]": {
2935
- return !val.size;
2936
- }
2937
- case "[object Object]": {
2938
- return !Object.keys(val).length;
2939
- }
2940
- }
2941
- return false;
2942
- };
2943
- function rafThrottle(fn) {
2944
- var locked = false;
2945
- return function() {
2946
- var _this = this;
2947
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
2948
- args[_key] = arguments[_key];
2949
- }
2950
- if (locked)
2951
- return;
2952
- locked = true;
2953
- window.requestAnimationFrame(function(_) {
2954
- fn.apply(_this, args);
2955
- locked = false;
2956
- });
2957
- };
2958
- }
2959
- function objToArray(obj) {
2960
- if (Array.isArray(obj)) {
2961
- return obj;
2962
- }
2963
- return isEmpty(obj) ? [] : [obj];
2964
- }
2965
- format$1.__esModule = true;
2966
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
2967
- return typeof obj;
2968
- } : function(obj) {
2969
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2970
- };
2971
- format$1.default = function(Vue2) {
2972
- function template(string) {
2973
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2974
- args[_key - 1] = arguments[_key];
2975
- }
2976
- if (args.length === 1 && _typeof(args[0]) === "object") {
2119
+ const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
2120
+ function Format(Vue2) {
2121
+ function template(string, ...args) {
2122
+ if (args.length === 1 && typeof args[0] === "object") {
2977
2123
  args = args[0];
2978
2124
  }
2979
2125
  if (!args || !args.hasOwnProperty) {
2980
2126
  args = {};
2981
2127
  }
2982
- return string.replace(RE_NARGS, function(match, prefix, i, index) {
2983
- var result = void 0;
2128
+ return string.replace(RE_NARGS, (match, prefix, i, index) => {
2129
+ let result;
2984
2130
  if (string[index - 1] === "{" && string[index + match.length] === "}") {
2985
2131
  return i;
2986
2132
  } else {
2987
- result = (0, _util.hasOwn)(args, i) ? args[i] : null;
2133
+ result = hasOwn(args, i) ? args[i] : null;
2988
2134
  if (result === null || result === void 0) {
2989
2135
  return "";
2990
2136
  }
@@ -2993,47 +2139,30 @@ format$1.default = function(Vue2) {
2993
2139
  });
2994
2140
  }
2995
2141
  return template;
2996
- };
2997
- var _util = util;
2998
- var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
2999
- locale.__esModule = true;
3000
- locale.i18n = locale.use = locale.t = void 0;
3001
- var _zhCN = zhCN;
3002
- var _zhCN2 = _interopRequireDefault(_zhCN);
3003
- var _vue = Vue;
3004
- var _vue2 = _interopRequireDefault(_vue);
3005
- var _deepmerge = cjs;
3006
- var _deepmerge2 = _interopRequireDefault(_deepmerge);
3007
- var _format = format$1;
3008
- var _format2 = _interopRequireDefault(_format);
3009
- function _interopRequireDefault(obj) {
3010
- return obj && obj.__esModule ? obj : {
3011
- default: obj
3012
- };
3013
2142
  }
3014
- var format = (0, _format2.default)(_vue2.default);
3015
- var lang = _zhCN2.default;
3016
- var merged = false;
3017
- var i18nHandler = function i18nHandler2() {
3018
- var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
3019
- if (typeof vuei18n === "function" && !!_vue2.default.locale) {
2143
+ const format = Format();
2144
+ let lang = defaultLang;
2145
+ let merged = false;
2146
+ let i18nHandler = function() {
2147
+ const vuei18n = Object.getPrototypeOf(this || Vue).$t;
2148
+ if (typeof vuei18n === "function" && !!Vue.locale) {
3020
2149
  if (!merged) {
3021
2150
  merged = true;
3022
- _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
2151
+ Vue.locale(Vue.config.lang, deepmerge_1(lang, Vue.locale(Vue.config.lang) || {}, {
3023
2152
  clone: true
3024
2153
  }));
3025
2154
  }
3026
2155
  return vuei18n.apply(this, arguments);
3027
2156
  }
3028
2157
  };
3029
- var t = locale.t = function t2(path, options) {
3030
- var value = i18nHandler.apply(this, arguments);
2158
+ const t = function(path, options) {
2159
+ let value = i18nHandler.apply(this, arguments);
3031
2160
  if (value !== null && value !== void 0)
3032
2161
  return value;
3033
- var array = path.split(".");
3034
- var current = lang;
3035
- for (var i = 0, j = array.length; i < j; i++) {
3036
- var property = array[i];
2162
+ const array = path.split(".");
2163
+ let current = lang;
2164
+ for (let i = 0, j = array.length; i < j; i++) {
2165
+ const property = array[i];
3037
2166
  value = current[property];
3038
2167
  if (i === j - 1)
3039
2168
  return format(value, options);
@@ -3043,47 +2172,25 @@ var t = locale.t = function t2(path, options) {
3043
2172
  }
3044
2173
  return "";
3045
2174
  };
3046
- var use = locale.use = function use2(l) {
3047
- lang = l || lang;
3048
- };
3049
- var i18n = locale.i18n = function i18n2(fn) {
3050
- i18nHandler = fn || i18nHandler;
3051
- };
3052
- locale.default = {
3053
- use,
3054
- t,
3055
- i18n
3056
- };
3057
- var _locale = locale;
3058
- var _default = {
3059
- methods: {
3060
- t: function t3() {
3061
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3062
- args[_key] = arguments[_key];
3063
- }
3064
- return _locale.t.apply(this, args);
3065
- }
3066
- }
3067
- };
3068
2175
  const Locale = {
3069
2176
  methods: {
3070
2177
  t(...args) {
3071
- return t$1.apply(this, args);
2178
+ return t.apply(this, args);
3072
2179
  }
3073
2180
  }
3074
2181
  };
3075
2182
  const WEEKS = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
3076
2183
  const getDateTimestamp$1 = function(time) {
3077
2184
  if (typeof time === "number" || typeof time === "string") {
3078
- return clearTime(new Date(time)).getTime();
2185
+ return dateUtil.clearTime(new Date(time)).getTime();
3079
2186
  } else if (time instanceof Date) {
3080
- return clearTime(time).getTime();
2187
+ return dateUtil.clearTime(time).getTime();
3081
2188
  } else {
3082
2189
  return NaN;
3083
2190
  }
3084
2191
  };
3085
2192
  const removeFromArray = function(arr, pred) {
3086
- const idx = typeof pred === "function" ? arrayFindIndex$1(arr, pred) : arr.indexOf(pred);
2193
+ const idx = typeof pred === "function" ? arrayFindIndex(arr, pred) : arr.indexOf(pred);
3087
2194
  return idx >= 0 ? [...arr.slice(0, idx), ...arr.slice(idx + 1)] : arr;
3088
2195
  };
3089
2196
  const _sfc_main$3 = {
@@ -3097,7 +2204,7 @@ const _sfc_main$3 = {
3097
2204
  value: {},
3098
2205
  defaultValue: {
3099
2206
  validator(val) {
3100
- return val === null || isDate(val) || Array.isArray(val) && val.every(isDate);
2207
+ return val === null || dateUtil.isDate(val) || Array.isArray(val) && val.every(dateUtil.isDate);
3101
2208
  }
3102
2209
  },
3103
2210
  date: {},
@@ -3137,13 +2244,13 @@ const _sfc_main$3 = {
3137
2244
  return this.date.getMonth();
3138
2245
  },
3139
2246
  startDate() {
3140
- return getStartDateOfMonth(this.year, this.month);
2247
+ return dateUtil.getStartDateOfMonth(this.year, this.month);
3141
2248
  },
3142
2249
  rows() {
3143
- const date2 = new Date(this.year, this.month, 1);
3144
- let day = getFirstDayOfMonth(date2);
3145
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
3146
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
2250
+ const date = new Date(this.year, this.month, 1);
2251
+ let day = dateUtil.getFirstDayOfMonth(date);
2252
+ const dateCountOfMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth());
2253
+ const dateCountOfLastMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
3147
2254
  day = day === 0 ? 7 : day;
3148
2255
  const offset = this.offsetDay;
3149
2256
  const rows = this.tableRows;
@@ -3159,7 +2266,7 @@ const _sfc_main$3 = {
3159
2266
  if (!row[0]) {
3160
2267
  row[0] = {
3161
2268
  type: "week",
3162
- text: getWeekNumber(nextDate(startDate, i * 7 + 1))
2269
+ text: dateUtil.getWeekNumber(dateUtil.nextDate(startDate, i * 7 + 1))
3163
2270
  };
3164
2271
  }
3165
2272
  }
@@ -3177,7 +2284,7 @@ const _sfc_main$3 = {
3177
2284
  }
3178
2285
  cell.type = "normal";
3179
2286
  const index = i * 7 + j;
3180
- const time = nextDate(startDate, index - offset).getTime();
2287
+ const time = dateUtil.nextDate(startDate, index - offset).getTime();
3181
2288
  cell.inRange = time >= getDateTimestamp$1(this.minDate) && time <= getDateTimestamp$1(this.maxDate);
3182
2289
  cell.start = this.minDate && time === getDateTimestamp$1(this.minDate);
3183
2290
  cell.end = this.maxDate && time === getDateTimestamp$1(this.maxDate);
@@ -3203,7 +2310,7 @@ const _sfc_main$3 = {
3203
2310
  }
3204
2311
  let cellDate = new Date(time);
3205
2312
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
3206
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
2313
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
3207
2314
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
3208
2315
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
3209
2316
  }
@@ -3243,8 +2350,8 @@ const _sfc_main$3 = {
3243
2350
  };
3244
2351
  },
3245
2352
  methods: {
3246
- cellMatchesDate(cell, date2) {
3247
- const value = new Date(date2);
2353
+ cellMatchesDate(cell, date) {
2354
+ const value = new Date(date);
3248
2355
  return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
3249
2356
  },
3250
2357
  getCellClasses(cell) {
@@ -3259,7 +2366,7 @@ const _sfc_main$3 = {
3259
2366
  } else {
3260
2367
  classes.push(cell.type);
3261
2368
  }
3262
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
2369
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
3263
2370
  classes.push("default");
3264
2371
  }
3265
2372
  if (selectionMode === "day" && (cell.type === "normal" || cell.type === "today") && this.cellMatchesDate(cell, this.value)) {
@@ -3287,7 +2394,7 @@ const _sfc_main$3 = {
3287
2394
  },
3288
2395
  getDateOfCell(row, column) {
3289
2396
  const offsetFromStart = row * 7 + (column - (this.showWeekNumber ? 1 : 0)) - this.offsetDay;
3290
- return nextDate(this.startDate, offsetFromStart);
2397
+ return dateUtil.nextDate(this.startDate, offsetFromStart);
3291
2398
  },
3292
2399
  isWeekActive(cell) {
3293
2400
  if (this.selectionMode !== "week")
@@ -3304,9 +2411,9 @@ const _sfc_main$3 = {
3304
2411
  newDate.setFullYear(month === 11 ? year + 1 : year);
3305
2412
  }
3306
2413
  newDate.setDate(parseInt(cell.text, 10));
3307
- if (isDate(this.value)) {
2414
+ if (dateUtil.isDate(this.value)) {
3308
2415
  const dayOffset = (this.value.getDay() - this.firstDayOfWeek + 7) % 7 - 1;
3309
- const weekDate = prevDate(this.value, dayOffset);
2416
+ const weekDate = dateUtil.prevDate(this.value, dayOffset);
3310
2417
  return weekDate.getTime() === newDate.getTime();
3311
2418
  }
3312
2419
  return false;
@@ -3324,7 +2431,7 @@ const _sfc_main$3 = {
3324
2431
  continue;
3325
2432
  const cell = row[j];
3326
2433
  const index = i * 7 + j + (this.showWeekNumber ? -1 : 0);
3327
- const time = nextDate(startDate, index - this.offsetDay).getTime();
2434
+ const time = dateUtil.nextDate(startDate, index - this.offsetDay).getTime();
3328
2435
  cell.inRange = minDate && time >= minDate && time <= maxDate;
3329
2436
  cell.start = minDate && time === minDate;
3330
2437
  cell.end = maxDate && time === maxDate;
@@ -3400,7 +2507,7 @@ const _sfc_main$3 = {
3400
2507
  } else if (this.selectionMode === "day") {
3401
2508
  this.$emit("pick", newDate);
3402
2509
  } else if (this.selectionMode === "week") {
3403
- const weekNumber = getWeekNumber(newDate);
2510
+ const weekNumber = dateUtil.getWeekNumber(newDate);
3404
2511
  const value = newDate.getFullYear() + "w" + weekNumber;
3405
2512
  this.$emit("pick", {
3406
2513
  year: newDate.getFullYear(),
@@ -3410,7 +2517,7 @@ const _sfc_main$3 = {
3410
2517
  });
3411
2518
  } else if (this.selectionMode === "dates") {
3412
2519
  const value = this.value || [];
3413
- const newValue = cell.selected ? removeFromArray(value, (date2) => date2.getTime() === newDate.getTime()) : [...value, newDate];
2520
+ const newValue = cell.selected ? removeFromArray(value, (date) => date.getTime() === newDate.getTime()) : [...value, newDate];
3414
2521
  this.$emit("pick", newValue);
3415
2522
  }
3416
2523
  }
@@ -3455,9 +2562,9 @@ var __component__$3 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc
3455
2562
  const DateTable = __component__$3.exports;
3456
2563
  const getDateTimestamp = function(time) {
3457
2564
  if (typeof time === "number" || typeof time === "string") {
3458
- return clearTime(new Date(time)).getTime();
2565
+ return dateUtil.clearTime(new Date(time)).getTime();
3459
2566
  } else if (time instanceof Date) {
3460
- return clearTime(time).getTime();
2567
+ return dateUtil.clearTime(time).getTime();
3461
2568
  } else {
3462
2569
  return NaN;
3463
2570
  }
@@ -3472,10 +2579,10 @@ const _sfc_main$2 = {
3472
2579
  return getDateTimestamp(this.maxDate);
3473
2580
  },
3474
2581
  rows() {
3475
- const date2 = new Date(this.year, this.month, 1);
3476
- let day = getFirstDayOfMonth(date2);
3477
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
3478
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
2582
+ const date = new Date(this.year, this.month, 1);
2583
+ let day = dateUtil.getFirstDayOfMonth(date);
2584
+ const dateCountOfMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth());
2585
+ const dateCountOfLastMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
3479
2586
  day = day === 0 ? 7 : day;
3480
2587
  const offset = this.offsetDay;
3481
2588
  const rows = this.tableRows;
@@ -3491,7 +2598,7 @@ const _sfc_main$2 = {
3491
2598
  if (!row[0]) {
3492
2599
  row[0] = {
3493
2600
  type: "week",
3494
- text: getWeekNumber(nextDate(startDate, i * 7 + 1))
2601
+ text: dateUtil.getWeekNumber(dateUtil.nextDate(startDate, i * 7 + 1))
3495
2602
  };
3496
2603
  }
3497
2604
  }
@@ -3509,7 +2616,7 @@ const _sfc_main$2 = {
3509
2616
  }
3510
2617
  cell.type = "normal";
3511
2618
  const index = i * 7 + j;
3512
- const time = nextDate(startDate, index - offset).getTime();
2619
+ const time = dateUtil.nextDate(startDate, index - offset).getTime();
3513
2620
  cell.inRange = time >= this.minDateTimestamp && time <= this.maxDateTimestamp;
3514
2621
  cell.start = this.minDate && time === this.minDateTimestamp;
3515
2622
  cell.end = this.maxDate && time === this.maxDateTimestamp;
@@ -3535,7 +2642,7 @@ const _sfc_main$2 = {
3535
2642
  }
3536
2643
  const cellDate = new Date(time);
3537
2644
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
3538
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
2645
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
3539
2646
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
3540
2647
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
3541
2648
  }
@@ -3555,11 +2662,11 @@ const _sfc_main$2 = {
3555
2662
  } else {
3556
2663
  classes.push(cell.type);
3557
2664
  }
3558
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
2665
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
3559
2666
  classes.push("default");
3560
2667
  }
3561
2668
  if (cell.inRange && (cell.type === "normal" || cell.type === "today")) {
3562
- if (isDate(this.minDate) && isDate(this.maxDate) || this.rangeState.selecting) {
2669
+ if (dateUtil.isDate(this.minDate) && dateUtil.isDate(this.maxDate) || this.rangeState.selecting) {
3563
2670
  classes.push("in-range");
3564
2671
  }
3565
2672
  if (cell.start) {
@@ -3592,9 +2699,9 @@ const _sfc_main$2 = {
3592
2699
  newDate.setFullYear(month === 11 ? year + 1 : year);
3593
2700
  }
3594
2701
  newDate.setDate(parseInt(cell.text, 10));
3595
- if (isDate(this.value)) {
2702
+ if (dateUtil.isDate(this.value)) {
3596
2703
  const dayOffset = (this.value.getDay() - this.firstDayOfWeek + 7) % 7 - 1;
3597
- const weekDate = prevDate(this.value, dayOffset);
2704
+ const weekDate = dateUtil.prevDate(this.value, dayOffset);
3598
2705
  return weekDate.getTime() === newDate.getTime();
3599
2706
  }
3600
2707
  return false;
@@ -3725,9 +2832,9 @@ const calcDefaultValue = (defaultValue) => {
3725
2832
  if (Array.isArray(defaultValue)) {
3726
2833
  return [new Date(defaultValue[0]), new Date(defaultValue[1])];
3727
2834
  } else if (defaultValue) {
3728
- return [new Date(defaultValue), nextDate(new Date(defaultValue), 1)];
2835
+ return [new Date(defaultValue), dateUtil.nextDate(new Date(defaultValue), 1)];
3729
2836
  } else {
3730
- return [/* @__PURE__ */ new Date(), nextDate(/* @__PURE__ */ new Date(), 1)];
2837
+ return [/* @__PURE__ */ new Date(), dateUtil.nextDate(/* @__PURE__ */ new Date(), 1)];
3731
2838
  }
3732
2839
  };
3733
2840
  const _sfc_main$1 = {
@@ -3737,7 +2844,7 @@ const _sfc_main$1 = {
3737
2844
  components: {
3738
2845
  WeekTable
3739
2846
  },
3740
- mixins: [_default],
2847
+ mixins: [Locale$1],
3741
2848
  data() {
3742
2849
  return {
3743
2850
  popperClass: "",
@@ -3747,7 +2854,7 @@ const _sfc_main$1 = {
3747
2854
  minDate: "",
3748
2855
  maxDate: "",
3749
2856
  leftDate: /* @__PURE__ */ new Date(),
3750
- rightDate: nextMonth(/* @__PURE__ */ new Date()),
2857
+ rightDate: dateUtil.nextMonth(/* @__PURE__ */ new Date()),
3751
2858
  rangeState: {
3752
2859
  endDate: null,
3753
2860
  selecting: false,
@@ -3792,9 +2899,9 @@ const _sfc_main$1 = {
3792
2899
  return this.rightDate.getMonth();
3793
2900
  },
3794
2901
  enableMonthArrow() {
3795
- const nextMonth2 = (this.leftMonth + 1) % 12;
2902
+ const nextMonth = (this.leftMonth + 1) % 12;
3796
2903
  const yearOffset = this.leftMonth + 1 >= 12 ? 1 : 0;
3797
- return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth2) < new Date(this.rightYear, this.rightMonth);
2904
+ return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth) < new Date(this.rightYear, this.rightMonth);
3798
2905
  },
3799
2906
  enableYearArrow() {
3800
2907
  return this.unlinkPanels && this.rightYear * 12 + this.rightMonth - (this.leftYear * 12 + this.leftMonth + 1) >= 12;
@@ -3807,7 +2914,7 @@ const _sfc_main$1 = {
3807
2914
  this.$nextTick(() => {
3808
2915
  if (this.$refs.maxTimePicker && this.maxDate && this.maxDate < this.minDate) {
3809
2916
  const format2 = "HH:mm:ss";
3810
- this.$refs.maxTimePicker.selectableRange = [[parseDate(formatDate(this.minDate, format2), format2), parseDate("23:59:59", format2)]];
2917
+ this.$refs.maxTimePicker.selectableRange = [[dateUtil.parseDate(dateUtil.formatDate(this.minDate, format2), format2), dateUtil.parseDate("23:59:59", format2)]];
3811
2918
  }
3812
2919
  });
3813
2920
  },
@@ -3827,8 +2934,8 @@ const _sfc_main$1 = {
3827
2934
  if ((newVal == null ? void 0 : newVal.length) < 2) {
3828
2935
  return;
3829
2936
  }
3830
- this.minDate = isDate(newVal[0]) ? new Date(newVal[0]) : null;
3831
- this.maxDate = isDate(newVal[1]) ? new Date(newVal[1]) : null;
2937
+ this.minDate = dateUtil.isDate(newVal[0]) ? new Date(newVal[0]) : null;
2938
+ this.maxDate = dateUtil.isDate(newVal[1]) ? new Date(newVal[1]) : null;
3832
2939
  if (this.minDate && this.maxDate) {
3833
2940
  if (this.minDate.getTime() > this.maxDate.getTime()) {
3834
2941
  const maxDate = this.minDate;
@@ -3848,13 +2955,13 @@ const _sfc_main$1 = {
3848
2955
  const minDateMonth = this.minDate.getMonth();
3849
2956
  const maxDateYear = this.maxDate.getFullYear();
3850
2957
  const maxDateMonth = this.maxDate.getMonth();
3851
- this.rightDate = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? nextMonth(this.maxDate) : this.maxDate;
2958
+ this.rightDate = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? dateUtil.nextMonth(this.maxDate) : this.maxDate;
3852
2959
  } else {
3853
- this.rightDate = nextMonth(this.leftDate);
2960
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3854
2961
  }
3855
2962
  } else {
3856
2963
  this.leftDate = calcDefaultValue(this.defaultValue)[0];
3857
- this.rightDate = nextMonth(this.leftDate);
2964
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3858
2965
  }
3859
2966
  }
3860
2967
  },
@@ -3862,7 +2969,7 @@ const _sfc_main$1 = {
3862
2969
  if (!Array.isArray(this.value)) {
3863
2970
  const [left, right] = calcDefaultValue(val);
3864
2971
  this.leftDate = left;
3865
- this.rightDate = val && val[1] && this.unlinkPanels ? right : nextMonth(this.leftDate);
2972
+ this.rightDate = val && val[1] && this.unlinkPanels ? right : dateUtil.nextMonth(this.leftDate);
3866
2973
  }
3867
2974
  }
3868
2975
  },
@@ -3887,8 +2994,8 @@ const _sfc_main$1 = {
3887
2994
  },
3888
2995
  handleRangePick(val, close = true) {
3889
2996
  const defaultTime = this.defaultTime || [];
3890
- const minDate = modifyWithTimeString(val.minDate, defaultTime[0]);
3891
- const maxDate = modifyWithTimeString(val.maxDate, defaultTime[1]);
2997
+ const minDate = dateUtil.modifyWithTimeString(val.minDate, defaultTime[0]);
2998
+ const maxDate = dateUtil.modifyWithTimeString(val.maxDate, defaultTime[1]);
3892
2999
  if (this.maxDate === maxDate && this.minDate === minDate) {
3893
3000
  return;
3894
3001
  }
@@ -3912,45 +3019,45 @@ const _sfc_main$1 = {
3912
3019
  },
3913
3020
  // leftPrev*, rightNext* need to take care of `unlinkPanels`
3914
3021
  leftPrevYear() {
3915
- this.leftDate = prevYear(this.leftDate);
3022
+ this.leftDate = dateUtil.prevYear(this.leftDate);
3916
3023
  if (!this.unlinkPanels) {
3917
- this.rightDate = nextMonth(this.leftDate);
3024
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3918
3025
  }
3919
3026
  },
3920
3027
  leftPrevMonth() {
3921
- this.leftDate = prevMonth(this.leftDate);
3028
+ this.leftDate = dateUtil.prevMonth(this.leftDate);
3922
3029
  if (!this.unlinkPanels) {
3923
- this.rightDate = nextMonth(this.leftDate);
3030
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3924
3031
  }
3925
3032
  },
3926
3033
  rightNextYear() {
3927
3034
  if (!this.unlinkPanels) {
3928
- this.leftDate = nextYear(this.leftDate);
3929
- this.rightDate = nextMonth(this.leftDate);
3035
+ this.leftDate = dateUtil.nextYear(this.leftDate);
3036
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3930
3037
  } else {
3931
- this.rightDate = nextYear(this.rightDate);
3038
+ this.rightDate = dateUtil.nextYear(this.rightDate);
3932
3039
  }
3933
3040
  },
3934
3041
  rightNextMonth() {
3935
3042
  if (!this.unlinkPanels) {
3936
- this.leftDate = nextMonth(this.leftDate);
3937
- this.rightDate = nextMonth(this.leftDate);
3043
+ this.leftDate = dateUtil.nextMonth(this.leftDate);
3044
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3938
3045
  } else {
3939
- this.rightDate = nextMonth(this.rightDate);
3046
+ this.rightDate = dateUtil.nextMonth(this.rightDate);
3940
3047
  }
3941
3048
  },
3942
3049
  // leftNext*, rightPrev* are called when `unlinkPanels` is true
3943
3050
  leftNextYear() {
3944
- this.leftDate = nextYear(this.leftDate);
3051
+ this.leftDate = dateUtil.nextYear(this.leftDate);
3945
3052
  },
3946
3053
  leftNextMonth() {
3947
- this.leftDate = nextMonth(this.leftDate);
3054
+ this.leftDate = dateUtil.nextMonth(this.leftDate);
3948
3055
  },
3949
3056
  rightPrevYear() {
3950
- this.rightDate = prevYear(this.rightDate);
3057
+ this.rightDate = dateUtil.prevYear(this.rightDate);
3951
3058
  },
3952
3059
  rightPrevMonth() {
3953
- this.rightDate = prevMonth(this.rightDate);
3060
+ this.rightDate = dateUtil.prevMonth(this.rightDate);
3954
3061
  },
3955
3062
  handleConfirm(visible = false) {
3956
3063
  if (this.isValidValue([this.minDate, this.maxDate])) {
@@ -3958,13 +3065,13 @@ const _sfc_main$1 = {
3958
3065
  }
3959
3066
  },
3960
3067
  isValidValue(value) {
3961
- return Array.isArray(value) && value && value[0] && value[1] && isDate(value[0]) && isDate(value[1]) && value[0].getTime() <= value[1].getTime() && (typeof this.disabledDate === "function" ? !this.disabledDate(value[0]) && !this.disabledDate(value[1]) : true);
3068
+ return Array.isArray(value) && value && value[0] && value[1] && dateUtil.isDate(value[0]) && dateUtil.isDate(value[1]) && value[0].getTime() <= value[1].getTime() && (typeof this.disabledDate === "function" ? !this.disabledDate(value[0]) && !this.disabledDate(value[1]) : true);
3962
3069
  },
3963
3070
  resetView() {
3964
3071
  if (this.minDate && this.maxDate == null)
3965
3072
  this.rangeState.selecting = false;
3966
- this.minDate = this.value && isDate(this.value[0]) ? new Date(this.value[0]) : null;
3967
- this.maxDate = this.value && isDate(this.value[0]) ? new Date(this.value[1]) : null;
3073
+ this.minDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[0]) : null;
3074
+ this.maxDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[1]) : null;
3968
3075
  this.handleMinMaxDateWeek();
3969
3076
  }
3970
3077
  }