@94ai/nf-double-week 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.
@@ -1,5 +1,7 @@
1
1
  import Vue from "vue";
2
+ import { isDateObject, getWeekNumber, formatDate, parseDate, isDate, getStartDateOfMonth, getFirstDayOfMonth, getDayCountOfMonth, nextDate, prevDate, clearTime, nextMonth, modifyWithTimeString, prevYear, prevMonth, nextYear } from "element-ui/src/utils/date-util";
2
3
  import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
4
+ import Locale$1 from "element-ui/lib/mixins/locale";
3
5
  function _mergeNamespaces(n, m) {
4
6
  for (var i = 0; i < m.length; i++) {
5
7
  const e = m[i];
@@ -133,724 +135,6 @@ const Clickoutside = {
133
135
  delete el[ctx];
134
136
  }
135
137
  };
136
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
137
- function getDefaultExportFromCjs(x) {
138
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
139
- }
140
- function getAugmentedNamespace(n) {
141
- if (n.__esModule)
142
- return n;
143
- var f = n.default;
144
- if (typeof f == "function") {
145
- var a = function a2() {
146
- if (this instanceof a2) {
147
- return Reflect.construct(f, arguments, this.constructor);
148
- }
149
- return f.apply(this, arguments);
150
- };
151
- a.prototype = f.prototype;
152
- } else
153
- a = {};
154
- Object.defineProperty(a, "__esModule", {
155
- value: true
156
- });
157
- Object.keys(n).forEach(function(k) {
158
- var d = Object.getOwnPropertyDescriptor(n, k);
159
- Object.defineProperty(a, k, d.get ? d : {
160
- enumerable: true,
161
- get: function() {
162
- return n[k];
163
- }
164
- });
165
- });
166
- return a;
167
- }
168
- var date = { exports: {} };
169
- (function(module) {
170
- (function(main) {
171
- var fecha2 = {};
172
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
173
- var twoDigits = "\\d\\d?";
174
- var threeDigits = "\\d{3}";
175
- var fourDigits = "\\d{4}";
176
- var word = "[^\\s]+";
177
- var literal = /\[([^]*?)\]/gm;
178
- var noop2 = function() {
179
- };
180
- function regexEscape(str) {
181
- return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
182
- }
183
- function shorten(arr, sLen) {
184
- var newArr = [];
185
- for (var i = 0, len = arr.length; i < len; i++) {
186
- newArr.push(arr[i].substr(0, sLen));
187
- }
188
- return newArr;
189
- }
190
- function monthUpdate(arrName) {
191
- return function(d, v, i18n3) {
192
- var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
193
- if (~index) {
194
- d.month = index;
195
- }
196
- };
197
- }
198
- function pad(val, len) {
199
- val = String(val);
200
- len = len || 2;
201
- while (val.length < len) {
202
- val = "0" + val;
203
- }
204
- return val;
205
- }
206
- var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
207
- var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
208
- var monthNamesShort = shorten(monthNames, 3);
209
- var dayNamesShort = shorten(dayNames, 3);
210
- fecha2.i18n = {
211
- dayNamesShort,
212
- dayNames,
213
- monthNamesShort,
214
- monthNames,
215
- amPm: ["am", "pm"],
216
- DoFn: function DoFn(D) {
217
- return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
218
- }
219
- };
220
- var formatFlags = {
221
- D: function(dateObj) {
222
- return dateObj.getDay();
223
- },
224
- DD: function(dateObj) {
225
- return pad(dateObj.getDay());
226
- },
227
- Do: function(dateObj, i18n3) {
228
- return i18n3.DoFn(dateObj.getDate());
229
- },
230
- d: function(dateObj) {
231
- return dateObj.getDate();
232
- },
233
- dd: function(dateObj) {
234
- return pad(dateObj.getDate());
235
- },
236
- ddd: function(dateObj, i18n3) {
237
- return i18n3.dayNamesShort[dateObj.getDay()];
238
- },
239
- dddd: function(dateObj, i18n3) {
240
- return i18n3.dayNames[dateObj.getDay()];
241
- },
242
- M: function(dateObj) {
243
- return dateObj.getMonth() + 1;
244
- },
245
- MM: function(dateObj) {
246
- return pad(dateObj.getMonth() + 1);
247
- },
248
- MMM: function(dateObj, i18n3) {
249
- return i18n3.monthNamesShort[dateObj.getMonth()];
250
- },
251
- MMMM: function(dateObj, i18n3) {
252
- return i18n3.monthNames[dateObj.getMonth()];
253
- },
254
- yy: function(dateObj) {
255
- return pad(String(dateObj.getFullYear()), 4).substr(2);
256
- },
257
- yyyy: function(dateObj) {
258
- return pad(dateObj.getFullYear(), 4);
259
- },
260
- h: function(dateObj) {
261
- return dateObj.getHours() % 12 || 12;
262
- },
263
- hh: function(dateObj) {
264
- return pad(dateObj.getHours() % 12 || 12);
265
- },
266
- H: function(dateObj) {
267
- return dateObj.getHours();
268
- },
269
- HH: function(dateObj) {
270
- return pad(dateObj.getHours());
271
- },
272
- m: function(dateObj) {
273
- return dateObj.getMinutes();
274
- },
275
- mm: function(dateObj) {
276
- return pad(dateObj.getMinutes());
277
- },
278
- s: function(dateObj) {
279
- return dateObj.getSeconds();
280
- },
281
- ss: function(dateObj) {
282
- return pad(dateObj.getSeconds());
283
- },
284
- S: function(dateObj) {
285
- return Math.round(dateObj.getMilliseconds() / 100);
286
- },
287
- SS: function(dateObj) {
288
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
289
- },
290
- SSS: function(dateObj) {
291
- return pad(dateObj.getMilliseconds(), 3);
292
- },
293
- a: function(dateObj, i18n3) {
294
- return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
295
- },
296
- A: function(dateObj, i18n3) {
297
- return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
298
- },
299
- ZZ: function(dateObj) {
300
- var o = dateObj.getTimezoneOffset();
301
- return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
302
- }
303
- };
304
- var parseFlags = {
305
- d: [twoDigits, function(d, v) {
306
- d.day = v;
307
- }],
308
- Do: [twoDigits + word, function(d, v) {
309
- d.day = parseInt(v, 10);
310
- }],
311
- M: [twoDigits, function(d, v) {
312
- d.month = v - 1;
313
- }],
314
- yy: [twoDigits, function(d, v) {
315
- var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
316
- d.year = "" + (v > 68 ? cent - 1 : cent) + v;
317
- }],
318
- h: [twoDigits, function(d, v) {
319
- d.hour = v;
320
- }],
321
- m: [twoDigits, function(d, v) {
322
- d.minute = v;
323
- }],
324
- s: [twoDigits, function(d, v) {
325
- d.second = v;
326
- }],
327
- yyyy: [fourDigits, function(d, v) {
328
- d.year = v;
329
- }],
330
- S: ["\\d", function(d, v) {
331
- d.millisecond = v * 100;
332
- }],
333
- SS: ["\\d{2}", function(d, v) {
334
- d.millisecond = v * 10;
335
- }],
336
- SSS: [threeDigits, function(d, v) {
337
- d.millisecond = v;
338
- }],
339
- D: [twoDigits, noop2],
340
- ddd: [word, noop2],
341
- MMM: [word, monthUpdate("monthNamesShort")],
342
- MMMM: [word, monthUpdate("monthNames")],
343
- a: [word, function(d, v, i18n3) {
344
- var val = v.toLowerCase();
345
- if (val === i18n3.amPm[0]) {
346
- d.isPm = false;
347
- } else if (val === i18n3.amPm[1]) {
348
- d.isPm = true;
349
- }
350
- }],
351
- ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
352
- var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
353
- if (parts) {
354
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
355
- d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
356
- }
357
- }]
358
- };
359
- parseFlags.dd = parseFlags.d;
360
- parseFlags.dddd = parseFlags.ddd;
361
- parseFlags.DD = parseFlags.D;
362
- parseFlags.mm = parseFlags.m;
363
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
364
- parseFlags.MM = parseFlags.M;
365
- parseFlags.ss = parseFlags.s;
366
- parseFlags.A = parseFlags.a;
367
- fecha2.masks = {
368
- default: "ddd MMM dd yyyy HH:mm:ss",
369
- shortDate: "M/D/yy",
370
- mediumDate: "MMM d, yyyy",
371
- longDate: "MMMM d, yyyy",
372
- fullDate: "dddd, MMMM d, yyyy",
373
- shortTime: "HH:mm",
374
- mediumTime: "HH:mm:ss",
375
- longTime: "HH:mm:ss.SSS"
376
- };
377
- fecha2.format = function(dateObj, mask, i18nSettings) {
378
- var i18n3 = i18nSettings || fecha2.i18n;
379
- if (typeof dateObj === "number") {
380
- dateObj = new Date(dateObj);
381
- }
382
- if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
383
- throw new Error("Invalid Date in fecha.format");
384
- }
385
- mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
386
- var literals = [];
387
- mask = mask.replace(literal, function($0, $1) {
388
- literals.push($1);
389
- return "@@@";
390
- });
391
- mask = mask.replace(token, function($0) {
392
- return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
393
- });
394
- return mask.replace(/@@@/g, function() {
395
- return literals.shift();
396
- });
397
- };
398
- fecha2.parse = function(dateStr, format2, i18nSettings) {
399
- var i18n3 = i18nSettings || fecha2.i18n;
400
- if (typeof format2 !== "string") {
401
- throw new Error("Invalid format in fecha.parse");
402
- }
403
- format2 = fecha2.masks[format2] || format2;
404
- if (dateStr.length > 1e3) {
405
- return null;
406
- }
407
- var dateInfo = {};
408
- var parseInfo = [];
409
- var literals = [];
410
- format2 = format2.replace(literal, function($0, $1) {
411
- literals.push($1);
412
- return "@@@";
413
- });
414
- var newFormat = regexEscape(format2).replace(token, function($0) {
415
- if (parseFlags[$0]) {
416
- var info = parseFlags[$0];
417
- parseInfo.push(info[1]);
418
- return "(" + info[0] + ")";
419
- }
420
- return $0;
421
- });
422
- newFormat = newFormat.replace(/@@@/g, function() {
423
- return literals.shift();
424
- });
425
- var matches = dateStr.match(new RegExp(newFormat, "i"));
426
- if (!matches) {
427
- return null;
428
- }
429
- for (var i = 1; i < matches.length; i++) {
430
- parseInfo[i - 1](dateInfo, matches[i], i18n3);
431
- }
432
- var today = /* @__PURE__ */ new Date();
433
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
434
- dateInfo.hour = +dateInfo.hour + 12;
435
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
436
- dateInfo.hour = 0;
437
- }
438
- var date2;
439
- if (dateInfo.timezoneOffset != null) {
440
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
441
- 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));
442
- } else {
443
- 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);
444
- }
445
- return date2;
446
- };
447
- if (module.exports) {
448
- module.exports = fecha2;
449
- } else {
450
- main.fecha = fecha2;
451
- }
452
- })(commonjsGlobal);
453
- })(date);
454
- var dateExports = date.exports;
455
- const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
456
- const defaultLang = {
457
- el: {
458
- colorpicker: {
459
- confirm: "确定",
460
- clear: "清空"
461
- },
462
- datepicker: {
463
- now: "此刻",
464
- today: "今天",
465
- cancel: "取消",
466
- clear: "清空",
467
- confirm: "确定",
468
- selectDate: "选择日期",
469
- selectTime: "选择时间",
470
- startDate: "开始日期",
471
- startTime: "开始时间",
472
- endDate: "结束日期",
473
- endTime: "结束时间",
474
- prevYear: "前一年",
475
- nextYear: "后一年",
476
- prevMonth: "上个月",
477
- nextMonth: "下个月",
478
- year: "年",
479
- month1: "1 月",
480
- month2: "2 月",
481
- month3: "3 月",
482
- month4: "4 月",
483
- month5: "5 月",
484
- month6: "6 月",
485
- month7: "7 月",
486
- month8: "8 月",
487
- month9: "9 月",
488
- month10: "10 月",
489
- month11: "11 月",
490
- month12: "12 月",
491
- // week: '周次',
492
- weeks: {
493
- sun: "日",
494
- mon: "一",
495
- tue: "二",
496
- wed: "三",
497
- thu: "四",
498
- fri: "五",
499
- sat: "六"
500
- },
501
- months: {
502
- jan: "一月",
503
- feb: "二月",
504
- mar: "三月",
505
- apr: "四月",
506
- may: "五月",
507
- jun: "六月",
508
- jul: "七月",
509
- aug: "八月",
510
- sep: "九月",
511
- oct: "十月",
512
- nov: "十一月",
513
- dec: "十二月"
514
- }
515
- },
516
- select: {
517
- loading: "加载中",
518
- noMatch: "无匹配数据",
519
- noData: "无数据",
520
- placeholder: "请选择"
521
- },
522
- cascader: {
523
- noMatch: "无匹配数据",
524
- loading: "加载中",
525
- placeholder: "请选择",
526
- noData: "暂无数据"
527
- },
528
- pagination: {
529
- goto: "前往",
530
- pagesize: "条/页",
531
- total: "共 {total} 条",
532
- pageClassifier: "页"
533
- },
534
- messagebox: {
535
- title: "提示",
536
- confirm: "确定",
537
- cancel: "取消",
538
- error: "输入的数据不合法!"
539
- },
540
- upload: {
541
- deleteTip: "按 delete 键可删除",
542
- delete: "删除",
543
- preview: "查看图片",
544
- continue: "继续上传"
545
- },
546
- table: {
547
- emptyText: "暂无数据",
548
- confirmFilter: "筛选",
549
- resetFilter: "重置",
550
- clearFilter: "全部",
551
- sumText: "合计"
552
- },
553
- tree: {
554
- emptyText: "暂无数据"
555
- },
556
- transfer: {
557
- noMatch: "无匹配数据",
558
- noData: "无数据",
559
- titles: ["列表 1", "列表 2"],
560
- filterPlaceholder: "请输入搜索内容",
561
- noCheckedFormat: "共 {total} 项",
562
- hasCheckedFormat: "已选 {checked}/{total} 项"
563
- },
564
- image: {
565
- error: "加载失败"
566
- },
567
- pageHeader: {
568
- title: "返回"
569
- },
570
- popconfirm: {
571
- confirmButtonText: "确定",
572
- cancelButtonText: "取消"
573
- }
574
- }
575
- };
576
- var isMergeableObject = function isMergeableObject2(value) {
577
- return isNonNullObject(value) && !isSpecial(value);
578
- };
579
- function isNonNullObject(value) {
580
- return !!value && typeof value === "object";
581
- }
582
- function isSpecial(value) {
583
- var stringValue = Object.prototype.toString.call(value);
584
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
585
- }
586
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
587
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
588
- function isReactElement(value) {
589
- return value.$$typeof === REACT_ELEMENT_TYPE;
590
- }
591
- function emptyTarget(val) {
592
- return Array.isArray(val) ? [] : {};
593
- }
594
- function cloneIfNecessary(value, optionsArgument) {
595
- var clone = optionsArgument && optionsArgument.clone === true;
596
- return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
597
- }
598
- function defaultArrayMerge(target, source, optionsArgument) {
599
- var destination = target.slice();
600
- source.forEach(function(e, i) {
601
- if (typeof destination[i] === "undefined") {
602
- destination[i] = cloneIfNecessary(e, optionsArgument);
603
- } else if (isMergeableObject(e)) {
604
- destination[i] = deepmerge(target[i], e, optionsArgument);
605
- } else if (target.indexOf(e) === -1) {
606
- destination.push(cloneIfNecessary(e, optionsArgument));
607
- }
608
- });
609
- return destination;
610
- }
611
- function mergeObject(target, source, optionsArgument) {
612
- var destination = {};
613
- if (isMergeableObject(target)) {
614
- Object.keys(target).forEach(function(key) {
615
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
616
- });
617
- }
618
- Object.keys(source).forEach(function(key) {
619
- if (!isMergeableObject(source[key]) || !target[key]) {
620
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
621
- } else {
622
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
623
- }
624
- });
625
- return destination;
626
- }
627
- function deepmerge(target, source, optionsArgument) {
628
- var sourceIsArray = Array.isArray(source);
629
- var targetIsArray = Array.isArray(target);
630
- var options = optionsArgument || {
631
- arrayMerge: defaultArrayMerge
632
- };
633
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
634
- if (!sourceAndTargetTypesMatch) {
635
- return cloneIfNecessary(source, optionsArgument);
636
- } else if (sourceIsArray) {
637
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
638
- return arrayMerge(target, source, optionsArgument);
639
- } else {
640
- return mergeObject(target, source, optionsArgument);
641
- }
642
- }
643
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
644
- if (!Array.isArray(array) || array.length < 2) {
645
- throw new Error("first argument should be an array with at least two elements");
646
- }
647
- return array.reduce(function(prev, next) {
648
- return deepmerge(prev, next, optionsArgument);
649
- });
650
- };
651
- var deepmerge_1 = deepmerge;
652
- const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
653
- __proto__: null,
654
- default: deepmerge_1
655
- }, Symbol.toStringTag, { value: "Module" }));
656
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
657
- function hasOwn$1(obj, key) {
658
- return hasOwnProperty$1.call(obj, key);
659
- }
660
- const arrayFindIndex$1 = function(arr, pred) {
661
- for (let i = 0; i !== arr.length; ++i) {
662
- if (pred(arr[i])) {
663
- return i;
664
- }
665
- }
666
- return -1;
667
- };
668
- const arrayFind = function(arr, pred) {
669
- const idx = arrayFindIndex$1(arr, pred);
670
- return idx !== -1 ? arr[idx] : void 0;
671
- };
672
- const coerceTruthyValueToArray = function(val) {
673
- if (Array.isArray(val)) {
674
- return val;
675
- } else if (val) {
676
- return [val];
677
- } else {
678
- return [];
679
- }
680
- };
681
- const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
682
- function Format(Vue2) {
683
- function template(string, ...args) {
684
- if (args.length === 1 && typeof args[0] === "object") {
685
- args = args[0];
686
- }
687
- if (!args || !args.hasOwnProperty) {
688
- args = {};
689
- }
690
- return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
691
- let result;
692
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
693
- return i;
694
- } else {
695
- result = hasOwn$1(args, i) ? args[i] : null;
696
- if (result === null || result === void 0) {
697
- return "";
698
- }
699
- return result;
700
- }
701
- });
702
- }
703
- return template;
704
- }
705
- const format$2 = Format();
706
- let lang$1 = defaultLang;
707
- let merged$1 = false;
708
- let i18nHandler$1 = function() {
709
- const vuei18n = Object.getPrototypeOf(this || Vue).$t;
710
- if (typeof vuei18n === "function" && !!Vue.locale) {
711
- if (!merged$1) {
712
- merged$1 = true;
713
- Vue.locale(Vue.config.lang, deepmerge_1(lang$1, Vue.locale(Vue.config.lang) || {}, {
714
- clone: true
715
- }));
716
- }
717
- return vuei18n.apply(this, arguments);
718
- }
719
- };
720
- const t$1 = function(path, options) {
721
- let value = i18nHandler$1.apply(this, arguments);
722
- if (value !== null && value !== void 0)
723
- return value;
724
- const array = path.split(".");
725
- let current = lang$1;
726
- for (let i = 0, j = array.length; i < j; i++) {
727
- const property = array[i];
728
- value = current[property];
729
- if (i === j - 1)
730
- return format$2(value, options);
731
- if (!value)
732
- return "";
733
- current = value;
734
- }
735
- return "";
736
- };
737
- const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
738
- const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
739
- const getI18nSettings = () => {
740
- return {
741
- dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
742
- dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
743
- monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
744
- monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
745
- amPm: ["am", "pm"]
746
- };
747
- };
748
- const toDate = function(date2) {
749
- return isDate(date2) ? new Date(date2) : null;
750
- };
751
- const isDate = function(date2) {
752
- if (date2 === null || date2 === void 0)
753
- return false;
754
- if (isNaN(new Date(date2).getTime()))
755
- return false;
756
- if (Array.isArray(date2))
757
- return false;
758
- return true;
759
- };
760
- const isDateObject = function(val) {
761
- return val instanceof Date;
762
- };
763
- const formatDate = function(date2, format2) {
764
- date2 = toDate(date2);
765
- if (!date2)
766
- return "";
767
- return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
768
- };
769
- const parseDate = function(string, format2) {
770
- return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
771
- };
772
- const getDayCountOfMonth = function(year, month) {
773
- if (month === 3 || month === 5 || month === 8 || month === 10) {
774
- return 30;
775
- }
776
- if (month === 1) {
777
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
778
- return 29;
779
- } else {
780
- return 28;
781
- }
782
- }
783
- return 31;
784
- };
785
- const getFirstDayOfMonth = function(date2) {
786
- const temp = new Date(date2.getTime());
787
- temp.setDate(1);
788
- return temp.getDay();
789
- };
790
- const prevDate = function(date2, amount = 1) {
791
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() - amount);
792
- };
793
- const nextDate = function(date2, amount = 1) {
794
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
795
- };
796
- const getStartDateOfMonth = function(year, month) {
797
- const result = new Date(year, month, 1);
798
- const day = result.getDay();
799
- if (day === 0) {
800
- return prevDate(result, 7);
801
- } else {
802
- return prevDate(result, day);
803
- }
804
- };
805
- const getWeekNumber = function(src) {
806
- if (!isDate(src))
807
- return null;
808
- const date2 = new Date(src.getTime());
809
- date2.setHours(0, 0, 0, 0);
810
- date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
811
- const week1 = new Date(date2.getFullYear(), 0, 4);
812
- return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
813
- };
814
- const modifyDate = function(date2, y, m, d) {
815
- return new Date(y, m, d, date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
816
- };
817
- const modifyTime = function(date2, h, m, s) {
818
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
819
- };
820
- const modifyWithTimeString = (date2, time) => {
821
- if (date2 == null || !time) {
822
- return date2;
823
- }
824
- time = parseDate(time, "HH:mm:ss");
825
- return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
826
- };
827
- const clearTime = function(date2) {
828
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
829
- };
830
- const changeYearMonthAndClampDate = function(date2, year, month) {
831
- const monthDate = Math.min(date2.getDate(), getDayCountOfMonth(year, month));
832
- return modifyDate(date2, year, month, monthDate);
833
- };
834
- const prevMonth = function(date2) {
835
- const year = date2.getFullYear();
836
- const month = date2.getMonth();
837
- return month === 0 ? changeYearMonthAndClampDate(date2, year - 1, 11) : changeYearMonthAndClampDate(date2, year, month - 1);
838
- };
839
- const nextMonth = function(date2) {
840
- const year = date2.getFullYear();
841
- const month = date2.getMonth();
842
- return month === 11 ? changeYearMonthAndClampDate(date2, year + 1, 0) : changeYearMonthAndClampDate(date2, year, month + 1);
843
- };
844
- const prevYear = function(date2, amount = 1) {
845
- const year = date2.getFullYear();
846
- const month = date2.getMonth();
847
- return changeYearMonthAndClampDate(date2, year - amount, month);
848
- };
849
- const nextYear = function(date2, amount = 1) {
850
- const year = date2.getFullYear();
851
- const month = date2.getMonth();
852
- return changeYearMonthAndClampDate(date2, year + amount, month);
853
- };
854
138
  function merge(target) {
855
139
  for (let i = 1, j = arguments.length; i < j; i++) {
856
140
  let source = arguments[i] || {};
@@ -1032,6 +316,10 @@ if (!Vue.prototype.$isServer) {
1032
316
  }
1033
317
  });
1034
318
  }
319
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
320
+ function getDefaultExportFromCjs(x) {
321
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
322
+ }
1035
323
  var popper$1 = { exports: {} };
1036
324
  /**
1037
325
  * @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -1320,7 +608,7 @@ var popper$1 = { exports: {} };
1320
608
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1321
609
  }
1322
610
  modifiersToRun.forEach((function(modifier) {
1323
- if (isFunction2(modifier)) {
611
+ if (isFunction(modifier)) {
1324
612
  data = modifier.call(this, data);
1325
613
  }
1326
614
  }).bind(this));
@@ -1632,7 +920,7 @@ var popper$1 = { exports: {} };
1632
920
  element.style[prop] = styles[prop] + unit;
1633
921
  });
1634
922
  }
1635
- function isFunction2(functionToCheck) {
923
+ function isFunction(functionToCheck) {
1636
924
  var getType = {};
1637
925
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
1638
926
  }
@@ -1649,8 +937,8 @@ var popper$1 = { exports: {} };
1649
937
  }
1650
938
  function getBoundingClientRect(element) {
1651
939
  var rect = element.getBoundingClientRect();
1652
- var isIE2 = navigator.userAgent.indexOf("MSIE") != -1;
1653
- var rectTop = isIE2 && element.tagName === "HTML" ? -element.scrollTop : rect.top;
940
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
941
+ var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
1654
942
  return {
1655
943
  left: rect.left,
1656
944
  top: rectTop,
@@ -1977,10 +1265,10 @@ const TYPE_VALUE_RESOLVER_MAP = {
1977
1265
  function isLeapYear(year) {
1978
1266
  return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
1979
1267
  }
1980
- function getDays(date3) {
1981
- const year = date3.getFullYear();
1982
- const month2 = date3.getMonth() + 1;
1983
- const day = date3.getDate();
1268
+ function getDays(date2) {
1269
+ const year = date2.getFullYear();
1270
+ const month2 = date2.getMonth() + 1;
1271
+ const day = date2.getDate();
1984
1272
  let days2 = day;
1985
1273
  const monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1986
1274
  for (let i = 0; i < month2 - 1; i++) {
@@ -2004,12 +1292,12 @@ const TYPE_VALUE_RESOLVER_MAP = {
2004
1292
  trueDate.setHours(0, 0, 0, 0);
2005
1293
  trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
2006
1294
  }
2007
- let date2 = formatDate(trueDate, format2);
1295
+ let date = formatDate(trueDate, format2);
2008
1296
  if (7 - yearOneDateSun < 4 && 7 - yearOneDateSun >= days) {
2009
- date2 = date2.replace(new RegExp(y, "ig"), y - 1);
1297
+ date = date.replace(new RegExp(y, "ig"), y - 1);
2010
1298
  }
2011
- date2 = /WW/.test(date2) ? date2.replace(/WW/, week < 10 ? "0" + week : week) : date2.replace(/W/, week);
2012
- return date2;
1299
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
1300
+ return date;
2013
1301
  }
2014
1302
  if (!Array.isArray(value)) {
2015
1303
  return getDate(value);
@@ -2067,11 +1355,11 @@ const valueEquals = function(a, b) {
2067
1355
  }
2068
1356
  return false;
2069
1357
  };
2070
- const isString$1 = function(val) {
1358
+ const isString = function(val) {
2071
1359
  return typeof val === "string" || val instanceof String;
2072
1360
  };
2073
1361
  const validator = function(val) {
2074
- return val === null || val === void 0 || isString$1(val) || Array.isArray(val) && val.length === 2 && val.every(isString$1);
1362
+ return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
2075
1363
  };
2076
1364
  const _sfc_main$4 = {
2077
1365
  directives: {
@@ -2309,12 +1597,12 @@ const _sfc_main$4 = {
2309
1597
  return value;
2310
1598
  }
2311
1599
  },
2312
- formatToValue(date2) {
2313
- const isFormattable = isDateObject(date2) || Array.isArray(date2) && date2.every(isDateObject);
1600
+ formatToValue(date) {
1601
+ const isFormattable = isDateObject(date) || Array.isArray(date) && date.every(isDateObject);
2314
1602
  if (this.valueFormat && isFormattable) {
2315
- return formatAsFormatAndType(date2, this.valueFormat);
1603
+ return formatAsFormatAndType(date, this.valueFormat);
2316
1604
  } else {
2317
- return date2;
1605
+ return date;
2318
1606
  }
2319
1607
  },
2320
1608
  // {parse, formatTo} String deals with user input
@@ -2484,10 +1772,10 @@ const _sfc_main$4 = {
2484
1772
  this.$el.appendChild(this.picker.$el);
2485
1773
  this.picker.resetView && this.picker.resetView();
2486
1774
  this.picker.$on("dodestroy", this.doDestroy);
2487
- this.picker.$on("pick", (date2 = "", visible = false) => {
1775
+ this.picker.$on("pick", (date = "", visible = false) => {
2488
1776
  this.userInput = null;
2489
1777
  this.pickerVisible = this.picker.visible = visible;
2490
- this.emitInput(date2);
1778
+ this.emitInput(date);
2491
1779
  this.picker.resetView && this.picker.resetView();
2492
1780
  });
2493
1781
  this.picker.$on("select-range", (start, end, pos) => {
@@ -2605,10 +1893,7 @@ var _sfc_render$4 = function render() {
2605
1893
  var _sfc_staticRenderFns$4 = [];
2606
1894
  var __component__$4 = /* @__PURE__ */ normalizeComponent(_sfc_main$4, _sfc_render$4, _sfc_staticRenderFns$4, false, null, null, null, null);
2607
1895
  const Picker = __component__$4.exports;
2608
- var locale = {};
2609
- var zhCN = {};
2610
- zhCN.__esModule = true;
2611
- zhCN.default = {
1896
+ const defaultLang = {
2612
1897
  el: {
2613
1898
  colorpicker: {
2614
1899
  confirm: "确定",
@@ -2728,152 +2013,99 @@ zhCN.default = {
2728
2013
  }
2729
2014
  }
2730
2015
  };
2731
- const require$$2 = /* @__PURE__ */ getAugmentedNamespace(es);
2732
- var format$1 = {};
2733
- var util = {};
2734
- var types = {};
2735
- types.__esModule = true;
2736
- types.isString = isString;
2737
- types.isObject = isObject;
2738
- types.isHtmlElement = isHtmlElement;
2739
- function isString(obj) {
2740
- return Object.prototype.toString.call(obj) === "[object String]";
2741
- }
2742
- function isObject(obj) {
2743
- return Object.prototype.toString.call(obj) === "[object Object]";
2744
- }
2745
- function isHtmlElement(node) {
2746
- return node && node.nodeType === Node.ELEMENT_NODE;
2747
- }
2748
- types.isFunction = function isFunction(functionToCheck) {
2749
- var getType = {};
2750
- return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
2751
- };
2752
- types.isUndefined = function isUndefined(val) {
2753
- return val === void 0;
2754
- };
2755
- types.isDefined = function isDefined(val) {
2756
- return val !== void 0 && val !== null;
2757
- };
2758
- util.__esModule = true;
2759
- 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;
2760
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
2761
- return typeof obj;
2762
- } : function(obj) {
2763
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2016
+ var isMergeableObject = function isMergeableObject2(value) {
2017
+ return isNonNullObject(value) && !isSpecial(value);
2764
2018
  };
2765
- util.noop = noop;
2766
- util.hasOwn = hasOwn;
2767
- util.toObject = toObject;
2768
- util.getPropByPath = getPropByPath;
2769
- util.rafThrottle = rafThrottle;
2770
- util.objToArray = objToArray;
2771
- var _vue$1 = Vue;
2772
- var _vue2$1 = _interopRequireDefault$1(_vue$1);
2773
- var _types = types;
2774
- function _interopRequireDefault$1(obj) {
2775
- return obj && obj.__esModule ? obj : {
2776
- default: obj
2777
- };
2019
+ function isNonNullObject(value) {
2020
+ return !!value && typeof value === "object";
2778
2021
  }
2779
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2780
- function noop() {
2022
+ function isSpecial(value) {
2023
+ var stringValue = Object.prototype.toString.call(value);
2024
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
2781
2025
  }
2782
- function hasOwn(obj, key) {
2783
- return hasOwnProperty.call(obj, key);
2026
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
2027
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
2028
+ function isReactElement(value) {
2029
+ return value.$$typeof === REACT_ELEMENT_TYPE;
2784
2030
  }
2785
- function extend(to, _from) {
2786
- for (var key in _from) {
2787
- to[key] = _from[key];
2788
- }
2789
- return to;
2031
+ function emptyTarget(val) {
2032
+ return Array.isArray(val) ? [] : {};
2790
2033
  }
2791
- function toObject(arr) {
2792
- var res = {};
2793
- for (var i = 0; i < arr.length; i++) {
2794
- if (arr[i]) {
2795
- extend(res, arr[i]);
2796
- }
2797
- }
2798
- return res;
2034
+ function cloneIfNecessary(value, optionsArgument) {
2035
+ var clone = optionsArgument && optionsArgument.clone === true;
2036
+ return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
2799
2037
  }
2800
- util.getValueByPath = function getValueByPath(object, prop) {
2801
- prop = prop || "";
2802
- var paths = prop.split(".");
2803
- var current = object;
2804
- var result = null;
2805
- for (var i = 0, j = paths.length; i < j; i++) {
2806
- var path = paths[i];
2807
- if (!current)
2808
- break;
2809
- if (i === j - 1) {
2810
- result = current[path];
2811
- break;
2038
+ function defaultArrayMerge(target, source, optionsArgument) {
2039
+ var destination = target.slice();
2040
+ source.forEach(function(e, i) {
2041
+ if (typeof destination[i] === "undefined") {
2042
+ destination[i] = cloneIfNecessary(e, optionsArgument);
2043
+ } else if (isMergeableObject(e)) {
2044
+ destination[i] = deepmerge(target[i], e, optionsArgument);
2045
+ } else if (target.indexOf(e) === -1) {
2046
+ destination.push(cloneIfNecessary(e, optionsArgument));
2812
2047
  }
2813
- current = current[path];
2048
+ });
2049
+ return destination;
2050
+ }
2051
+ function mergeObject(target, source, optionsArgument) {
2052
+ var destination = {};
2053
+ if (isMergeableObject(target)) {
2054
+ Object.keys(target).forEach(function(key) {
2055
+ destination[key] = cloneIfNecessary(target[key], optionsArgument);
2056
+ });
2814
2057
  }
2815
- return result;
2816
- };
2817
- function getPropByPath(obj, path, strict) {
2818
- var tempObj = obj;
2819
- path = path.replace(/\[(\w+)\]/g, ".$1");
2820
- path = path.replace(/^\./, "");
2821
- var keyArr = path.split(".");
2822
- var i = 0;
2823
- for (var len = keyArr.length; i < len - 1; ++i) {
2824
- if (!tempObj && !strict)
2825
- break;
2826
- var key = keyArr[i];
2827
- if (key in tempObj) {
2828
- tempObj = tempObj[key];
2058
+ Object.keys(source).forEach(function(key) {
2059
+ if (!isMergeableObject(source[key]) || !target[key]) {
2060
+ destination[key] = cloneIfNecessary(source[key], optionsArgument);
2829
2061
  } else {
2830
- if (strict) {
2831
- throw new Error("please transfer a valid prop path to form item!");
2832
- }
2833
- break;
2062
+ destination[key] = deepmerge(target[key], source[key], optionsArgument);
2834
2063
  }
2835
- }
2836
- return {
2837
- o: tempObj,
2838
- k: keyArr[i],
2839
- v: tempObj ? tempObj[keyArr[i]] : null
2064
+ });
2065
+ return destination;
2066
+ }
2067
+ function deepmerge(target, source, optionsArgument) {
2068
+ var sourceIsArray = Array.isArray(source);
2069
+ var targetIsArray = Array.isArray(target);
2070
+ var options = optionsArgument || {
2071
+ arrayMerge: defaultArrayMerge
2840
2072
  };
2073
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
2074
+ if (!sourceAndTargetTypesMatch) {
2075
+ return cloneIfNecessary(source, optionsArgument);
2076
+ } else if (sourceIsArray) {
2077
+ var arrayMerge = options.arrayMerge || defaultArrayMerge;
2078
+ return arrayMerge(target, source, optionsArgument);
2079
+ } else {
2080
+ return mergeObject(target, source, optionsArgument);
2081
+ }
2841
2082
  }
2842
- util.generateId = function generateId() {
2843
- return Math.floor(Math.random() * 1e4);
2844
- };
2845
- util.valueEquals = function valueEquals2(a, b) {
2846
- if (a === b)
2847
- return true;
2848
- if (!(a instanceof Array))
2849
- return false;
2850
- if (!(b instanceof Array))
2851
- return false;
2852
- if (a.length !== b.length)
2853
- return false;
2854
- for (var i = 0; i !== a.length; ++i) {
2855
- if (a[i] !== b[i])
2856
- return false;
2083
+ deepmerge.all = function deepmergeAll(array, optionsArgument) {
2084
+ if (!Array.isArray(array) || array.length < 2) {
2085
+ throw new Error("first argument should be an array with at least two elements");
2857
2086
  }
2858
- return true;
2859
- };
2860
- util.escapeRegexpString = function escapeRegexpString() {
2861
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
2862
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
2087
+ return array.reduce(function(prev, next) {
2088
+ return deepmerge(prev, next, optionsArgument);
2089
+ });
2863
2090
  };
2864
- var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
2865
- for (var i = 0; i !== arr.length; ++i) {
2091
+ var deepmerge_1 = deepmerge;
2092
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
2093
+ function hasOwn(obj, key) {
2094
+ return hasOwnProperty.call(obj, key);
2095
+ }
2096
+ const arrayFindIndex = function(arr, pred) {
2097
+ for (let i = 0; i !== arr.length; ++i) {
2866
2098
  if (pred(arr[i])) {
2867
2099
  return i;
2868
2100
  }
2869
2101
  }
2870
2102
  return -1;
2871
2103
  };
2872
- util.arrayFind = function arrayFind2(arr, pred) {
2873
- var idx = arrayFindIndex(arr, pred);
2104
+ const arrayFind = function(arr, pred) {
2105
+ const idx = arrayFindIndex(arr, pred);
2874
2106
  return idx !== -1 ? arr[idx] : void 0;
2875
2107
  };
2876
- util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2108
+ const coerceTruthyValueToArray = function(val) {
2877
2109
  if (Array.isArray(val)) {
2878
2110
  return val;
2879
2111
  } else if (val) {
@@ -2882,138 +2114,21 @@ util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2882
2114
  return [];
2883
2115
  }
2884
2116
  };
2885
- util.isIE = function isIE() {
2886
- return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
2887
- };
2888
- util.isEdge = function isEdge() {
2889
- return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
2890
- };
2891
- util.isFirefox = function isFirefox() {
2892
- return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
2893
- };
2894
- util.autoprefixer = function autoprefixer(style) {
2895
- if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
2896
- return style;
2897
- var rules = ["transform", "transition", "animation"];
2898
- var prefixes = ["ms-", "webkit-"];
2899
- rules.forEach(function(rule) {
2900
- var value = style[rule];
2901
- if (rule && value) {
2902
- prefixes.forEach(function(prefix) {
2903
- style[prefix + rule] = value;
2904
- });
2905
- }
2906
- });
2907
- return style;
2908
- };
2909
- util.kebabCase = function kebabCase(str) {
2910
- var hyphenateRE = /([^-])([A-Z])/g;
2911
- return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
2912
- };
2913
- util.capitalize = function capitalize(str) {
2914
- if (!(0, _types.isString)(str))
2915
- return str;
2916
- return str.charAt(0).toUpperCase() + str.slice(1);
2917
- };
2918
- var looseEqual = util.looseEqual = function looseEqual2(a, b) {
2919
- var isObjectA = (0, _types.isObject)(a);
2920
- var isObjectB = (0, _types.isObject)(b);
2921
- if (isObjectA && isObjectB) {
2922
- return JSON.stringify(a) === JSON.stringify(b);
2923
- } else if (!isObjectA && !isObjectB) {
2924
- return String(a) === String(b);
2925
- } else {
2926
- return false;
2927
- }
2928
- };
2929
- var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
2930
- arrayA = arrayA || [];
2931
- arrayB = arrayB || [];
2932
- if (arrayA.length !== arrayB.length) {
2933
- return false;
2934
- }
2935
- for (var i = 0; i < arrayA.length; i++) {
2936
- if (!looseEqual(arrayA[i], arrayB[i])) {
2937
- return false;
2938
- }
2939
- }
2940
- return true;
2941
- };
2942
- util.isEqual = function isEqual(value1, value2) {
2943
- if (Array.isArray(value1) && Array.isArray(value2)) {
2944
- return arrayEquals(value1, value2);
2945
- }
2946
- return looseEqual(value1, value2);
2947
- };
2948
- var isEmpty = util.isEmpty = function isEmpty2(val) {
2949
- if (val == null)
2950
- return true;
2951
- if (typeof val === "boolean")
2952
- return false;
2953
- if (typeof val === "number")
2954
- return !val;
2955
- if (val instanceof Error)
2956
- return val.message === "";
2957
- switch (Object.prototype.toString.call(val)) {
2958
- case "[object String]":
2959
- case "[object Array]":
2960
- return !val.length;
2961
- case "[object File]":
2962
- case "[object Map]":
2963
- case "[object Set]": {
2964
- return !val.size;
2965
- }
2966
- case "[object Object]": {
2967
- return !Object.keys(val).length;
2968
- }
2969
- }
2970
- return false;
2971
- };
2972
- function rafThrottle(fn) {
2973
- var locked = false;
2974
- return function() {
2975
- var _this = this;
2976
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
2977
- args[_key] = arguments[_key];
2978
- }
2979
- if (locked)
2980
- return;
2981
- locked = true;
2982
- window.requestAnimationFrame(function(_) {
2983
- fn.apply(_this, args);
2984
- locked = false;
2985
- });
2986
- };
2987
- }
2988
- function objToArray(obj) {
2989
- if (Array.isArray(obj)) {
2990
- return obj;
2991
- }
2992
- return isEmpty(obj) ? [] : [obj];
2993
- }
2994
- format$1.__esModule = true;
2995
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
2996
- return typeof obj;
2997
- } : function(obj) {
2998
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2999
- };
3000
- format$1.default = function(Vue2) {
3001
- function template(string) {
3002
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3003
- args[_key - 1] = arguments[_key];
3004
- }
3005
- if (args.length === 1 && _typeof(args[0]) === "object") {
2117
+ const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
2118
+ function Format(Vue2) {
2119
+ function template(string, ...args) {
2120
+ if (args.length === 1 && typeof args[0] === "object") {
3006
2121
  args = args[0];
3007
2122
  }
3008
2123
  if (!args || !args.hasOwnProperty) {
3009
2124
  args = {};
3010
2125
  }
3011
- return string.replace(RE_NARGS, function(match, prefix, i, index) {
3012
- var result = void 0;
2126
+ return string.replace(RE_NARGS, (match, prefix, i, index) => {
2127
+ let result;
3013
2128
  if (string[index - 1] === "{" && string[index + match.length] === "}") {
3014
2129
  return i;
3015
2130
  } else {
3016
- result = (0, _util.hasOwn)(args, i) ? args[i] : null;
2131
+ result = hasOwn(args, i) ? args[i] : null;
3017
2132
  if (result === null || result === void 0) {
3018
2133
  return "";
3019
2134
  }
@@ -3022,47 +2137,30 @@ format$1.default = function(Vue2) {
3022
2137
  });
3023
2138
  }
3024
2139
  return template;
3025
- };
3026
- var _util = util;
3027
- var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
3028
- locale.__esModule = true;
3029
- locale.i18n = locale.use = locale.t = void 0;
3030
- var _zhCN = zhCN;
3031
- var _zhCN2 = _interopRequireDefault(_zhCN);
3032
- var _vue = Vue;
3033
- var _vue2 = _interopRequireDefault(_vue);
3034
- var _deepmerge = require$$2;
3035
- var _deepmerge2 = _interopRequireDefault(_deepmerge);
3036
- var _format = format$1;
3037
- var _format2 = _interopRequireDefault(_format);
3038
- function _interopRequireDefault(obj) {
3039
- return obj && obj.__esModule ? obj : {
3040
- default: obj
3041
- };
3042
2140
  }
3043
- var format = (0, _format2.default)(_vue2.default);
3044
- var lang = _zhCN2.default;
3045
- var merged = false;
3046
- var i18nHandler = function i18nHandler2() {
3047
- var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
3048
- if (typeof vuei18n === "function" && !!_vue2.default.locale) {
2141
+ const format = Format();
2142
+ let lang = defaultLang;
2143
+ let merged = false;
2144
+ let i18nHandler = function() {
2145
+ const vuei18n = Object.getPrototypeOf(this || Vue).$t;
2146
+ if (typeof vuei18n === "function" && !!Vue.locale) {
3049
2147
  if (!merged) {
3050
2148
  merged = true;
3051
- _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
2149
+ Vue.locale(Vue.config.lang, deepmerge_1(lang, Vue.locale(Vue.config.lang) || {}, {
3052
2150
  clone: true
3053
2151
  }));
3054
2152
  }
3055
2153
  return vuei18n.apply(this, arguments);
3056
2154
  }
3057
2155
  };
3058
- var t = locale.t = function t2(path, options) {
3059
- var value = i18nHandler.apply(this, arguments);
2156
+ const t = function(path, options) {
2157
+ let value = i18nHandler.apply(this, arguments);
3060
2158
  if (value !== null && value !== void 0)
3061
2159
  return value;
3062
- var array = path.split(".");
3063
- var current = lang;
3064
- for (var i = 0, j = array.length; i < j; i++) {
3065
- var property = array[i];
2160
+ const array = path.split(".");
2161
+ let current = lang;
2162
+ for (let i = 0, j = array.length; i < j; i++) {
2163
+ const property = array[i];
3066
2164
  value = current[property];
3067
2165
  if (i === j - 1)
3068
2166
  return format(value, options);
@@ -3072,32 +2170,10 @@ var t = locale.t = function t2(path, options) {
3072
2170
  }
3073
2171
  return "";
3074
2172
  };
3075
- var use = locale.use = function use2(l) {
3076
- lang = l || lang;
3077
- };
3078
- var i18n = locale.i18n = function i18n2(fn) {
3079
- i18nHandler = fn || i18nHandler;
3080
- };
3081
- locale.default = {
3082
- use,
3083
- t,
3084
- i18n
3085
- };
3086
- var _locale = locale;
3087
- var _default = {
3088
- methods: {
3089
- t: function t3() {
3090
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3091
- args[_key] = arguments[_key];
3092
- }
3093
- return _locale.t.apply(this, args);
3094
- }
3095
- }
3096
- };
3097
2173
  const Locale = {
3098
2174
  methods: {
3099
2175
  t(...args) {
3100
- return t$1.apply(this, args);
2176
+ return t.apply(this, args);
3101
2177
  }
3102
2178
  }
3103
2179
  };
@@ -3112,7 +2188,7 @@ const getDateTimestamp$1 = function(time) {
3112
2188
  }
3113
2189
  };
3114
2190
  const removeFromArray = function(arr, pred) {
3115
- const idx = typeof pred === "function" ? arrayFindIndex$1(arr, pred) : arr.indexOf(pred);
2191
+ const idx = typeof pred === "function" ? arrayFindIndex(arr, pred) : arr.indexOf(pred);
3116
2192
  return idx >= 0 ? [...arr.slice(0, idx), ...arr.slice(idx + 1)] : arr;
3117
2193
  };
3118
2194
  const _sfc_main$3 = {
@@ -3169,10 +2245,10 @@ const _sfc_main$3 = {
3169
2245
  return getStartDateOfMonth(this.year, this.month);
3170
2246
  },
3171
2247
  rows() {
3172
- const date2 = new Date(this.year, this.month, 1);
3173
- let day = getFirstDayOfMonth(date2);
3174
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
3175
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
2248
+ const date = new Date(this.year, this.month, 1);
2249
+ let day = getFirstDayOfMonth(date);
2250
+ const dateCountOfMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth());
2251
+ const dateCountOfLastMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
3176
2252
  day = day === 0 ? 7 : day;
3177
2253
  const offset = this.offsetDay;
3178
2254
  const rows = this.tableRows;
@@ -3232,7 +2308,7 @@ const _sfc_main$3 = {
3232
2308
  }
3233
2309
  let cellDate = new Date(time);
3234
2310
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
3235
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
2311
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
3236
2312
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
3237
2313
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
3238
2314
  }
@@ -3272,8 +2348,8 @@ const _sfc_main$3 = {
3272
2348
  };
3273
2349
  },
3274
2350
  methods: {
3275
- cellMatchesDate(cell, date2) {
3276
- const value = new Date(date2);
2351
+ cellMatchesDate(cell, date) {
2352
+ const value = new Date(date);
3277
2353
  return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
3278
2354
  },
3279
2355
  getCellClasses(cell) {
@@ -3288,7 +2364,7 @@ const _sfc_main$3 = {
3288
2364
  } else {
3289
2365
  classes.push(cell.type);
3290
2366
  }
3291
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
2367
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
3292
2368
  classes.push("default");
3293
2369
  }
3294
2370
  if (selectionMode === "day" && (cell.type === "normal" || cell.type === "today") && this.cellMatchesDate(cell, this.value)) {
@@ -3439,7 +2515,7 @@ const _sfc_main$3 = {
3439
2515
  });
3440
2516
  } else if (this.selectionMode === "dates") {
3441
2517
  const value = this.value || [];
3442
- const newValue = cell.selected ? removeFromArray(value, (date2) => date2.getTime() === newDate.getTime()) : [...value, newDate];
2518
+ const newValue = cell.selected ? removeFromArray(value, (date) => date.getTime() === newDate.getTime()) : [...value, newDate];
3443
2519
  this.$emit("pick", newValue);
3444
2520
  }
3445
2521
  }
@@ -3501,10 +2577,10 @@ const _sfc_main$2 = {
3501
2577
  return getDateTimestamp(this.maxDate);
3502
2578
  },
3503
2579
  rows() {
3504
- const date2 = new Date(this.year, this.month, 1);
3505
- let day = getFirstDayOfMonth(date2);
3506
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
3507
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
2580
+ const date = new Date(this.year, this.month, 1);
2581
+ let day = getFirstDayOfMonth(date);
2582
+ const dateCountOfMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth());
2583
+ const dateCountOfLastMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
3508
2584
  day = day === 0 ? 7 : day;
3509
2585
  const offset = this.offsetDay;
3510
2586
  const rows = this.tableRows;
@@ -3564,7 +2640,7 @@ const _sfc_main$2 = {
3564
2640
  }
3565
2641
  const cellDate = new Date(time);
3566
2642
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
3567
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
2643
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
3568
2644
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
3569
2645
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
3570
2646
  }
@@ -3584,7 +2660,7 @@ const _sfc_main$2 = {
3584
2660
  } else {
3585
2661
  classes.push(cell.type);
3586
2662
  }
3587
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
2663
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
3588
2664
  classes.push("default");
3589
2665
  }
3590
2666
  if (cell.inRange && (cell.type === "normal" || cell.type === "today")) {
@@ -3766,7 +2842,7 @@ const _sfc_main$1 = {
3766
2842
  components: {
3767
2843
  WeekTable
3768
2844
  },
3769
- mixins: [_default],
2845
+ mixins: [Locale$1],
3770
2846
  data() {
3771
2847
  return {
3772
2848
  popperClass: "",