@94ai/nf-double-year 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,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 = 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,639 +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 coerceTruthyValueToArray = function(val) {
641
- if (Array.isArray(val)) {
642
- return val;
643
- } else if (val) {
644
- return [val];
645
- } else {
646
- return [];
647
- }
648
- };
649
- const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
650
- function Format(Vue2) {
651
- function template(string, ...args) {
652
- if (args.length === 1 && typeof args[0] === "object") {
653
- args = args[0];
654
- }
655
- if (!args || !args.hasOwnProperty) {
656
- args = {};
657
- }
658
- return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
659
- let result;
660
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
661
- return i;
662
- } else {
663
- result = hasOwn$1(args, i) ? args[i] : null;
664
- if (result === null || result === void 0) {
665
- return "";
666
- }
667
- return result;
668
- }
669
- });
670
- }
671
- return template;
672
- }
673
- const format$2 = Format();
674
- let lang$1 = defaultLang;
675
- let merged$1 = false;
676
- let i18nHandler$1 = function() {
677
- const vuei18n = Object.getPrototypeOf(this || Vue).$t;
678
- if (typeof vuei18n === "function" && !!Vue.locale) {
679
- if (!merged$1) {
680
- merged$1 = true;
681
- Vue.locale(Vue.config.lang, deepmerge$1(lang$1, Vue.locale(Vue.config.lang) || {}, {
682
- clone: true
683
- }));
684
- }
685
- return vuei18n.apply(this, arguments);
686
- }
687
- };
688
- const t$1 = function(path, options) {
689
- let value = i18nHandler$1.apply(this, arguments);
690
- if (value !== null && value !== void 0)
691
- return value;
692
- const array = path.split(".");
693
- let current = lang$1;
694
- for (let i = 0, j = array.length; i < j; i++) {
695
- const property = array[i];
696
- value = current[property];
697
- if (i === j - 1)
698
- return format$2(value, options);
699
- if (!value)
700
- return "";
701
- current = value;
702
- }
703
- return "";
704
- };
705
- const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
706
- const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
707
- const getI18nSettings = () => {
708
- return {
709
- dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
710
- dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
711
- monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
712
- monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
713
- amPm: ["am", "pm"]
714
- };
715
- };
716
- const toDate = function(date2) {
717
- return isDate(date2) ? new Date(date2) : null;
718
- };
719
- const isDate = function(date2) {
720
- if (date2 === null || date2 === void 0)
721
- return false;
722
- if (isNaN(new Date(date2).getTime()))
723
- return false;
724
- if (Array.isArray(date2))
725
- return false;
726
- return true;
727
- };
728
- const isDateObject = function(val) {
729
- return val instanceof Date;
730
- };
731
- const formatDate = function(date2, format2) {
732
- date2 = toDate(date2);
733
- if (!date2)
734
- return "";
735
- return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
736
- };
737
- const parseDate = function(string, format2) {
738
- return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
739
- };
740
- const getDayCountOfYear = function(year) {
741
- const isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
742
- return isLeapYear ? 366 : 365;
743
- };
744
- const nextDate = function(date2, amount = 1) {
745
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
746
- };
747
- const getWeekNumber = function(src) {
748
- if (!isDate(src))
749
- return null;
750
- const date2 = new Date(src.getTime());
751
- date2.setHours(0, 0, 0, 0);
752
- date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
753
- const week1 = new Date(date2.getFullYear(), 0, 4);
754
- return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
755
- };
756
- const range = function(n) {
757
- return Array.apply(null, {
758
- length: n
759
- }).map((_, n2) => n2);
760
- };
761
- const modifyTime = function(date2, h, m, s) {
762
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
763
- };
764
- const modifyWithTimeString = (date2, time) => {
765
- if (date2 == null || !time) {
766
- return date2;
767
- }
768
- time = parseDate(time, "HH:mm:ss");
769
- return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
770
- };
771
140
  function merge(target) {
772
141
  for (let i = 1, j = arguments.length; i < j; i++) {
773
142
  let source = arguments[i] || {};
@@ -949,6 +318,10 @@ if (!Vue.prototype.$isServer) {
949
318
  }
950
319
  });
951
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
+ }
952
325
  var popper$1 = { exports: {} };
953
326
  /**
954
327
  * @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -1237,7 +610,7 @@ var popper$1 = { exports: {} };
1237
610
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1238
611
  }
1239
612
  modifiersToRun.forEach((function(modifier) {
1240
- if (isFunction2(modifier)) {
613
+ if (isFunction(modifier)) {
1241
614
  data = modifier.call(this, data);
1242
615
  }
1243
616
  }).bind(this));
@@ -1549,7 +922,7 @@ var popper$1 = { exports: {} };
1549
922
  element.style[prop] = styles[prop] + unit;
1550
923
  });
1551
924
  }
1552
- function isFunction2(functionToCheck) {
925
+ function isFunction(functionToCheck) {
1553
926
  var getType = {};
1554
927
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
1555
928
  }
@@ -1566,8 +939,8 @@ var popper$1 = { exports: {} };
1566
939
  }
1567
940
  function getBoundingClientRect(element) {
1568
941
  var rect = element.getBoundingClientRect();
1569
- var isIE2 = navigator.userAgent.indexOf("MSIE") != -1;
1570
- 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;
1571
944
  return {
1572
945
  left: rect.left,
1573
946
  top: rectTop,
@@ -1872,34 +1245,34 @@ const DEFAULT_FORMATS = {
1872
1245
  yearrange: "yyyy"
1873
1246
  };
1874
1247
  const HAVE_TRIGGER_TYPES = ["date", "datetime", "time", "time-select", "week", "month", "year", "yearrange", "daterange", "monthrange", "timerange", "datetimerange", "dates"];
1875
- const DATE_FORMATTER = function(value, format2) {
1876
- if (format2 === "timestamp")
1248
+ const DATE_FORMATTER = function(value, format) {
1249
+ if (format === "timestamp")
1877
1250
  return value.getTime();
1878
- return formatDate(value, format2);
1251
+ return dateUtil.formatDate(value, format);
1879
1252
  };
1880
- const DATE_PARSER = function(text, format2) {
1881
- if (format2 === "timestamp")
1253
+ const DATE_PARSER = function(text, format) {
1254
+ if (format === "timestamp")
1882
1255
  return new Date(Number(text));
1883
- return parseDate(text, format2);
1256
+ return dateUtil.parseDate(text, format);
1884
1257
  };
1885
- const RANGE_FORMATTER = function(value, format2) {
1258
+ const RANGE_FORMATTER = function(value, format) {
1886
1259
  if (Array.isArray(value) && value.length === 2) {
1887
1260
  const start = value[0];
1888
1261
  const end = value[1];
1889
1262
  if (start && end) {
1890
- return [DATE_FORMATTER(start, format2), DATE_FORMATTER(end, format2)];
1263
+ return [DATE_FORMATTER(start, format), DATE_FORMATTER(end, format)];
1891
1264
  }
1892
1265
  }
1893
1266
  return "";
1894
1267
  };
1895
- const RANGE_PARSER = function(array, format2, separator) {
1268
+ const RANGE_PARSER = function(array, format, separator) {
1896
1269
  if (!Array.isArray(array)) {
1897
1270
  array = array.split(separator);
1898
1271
  }
1899
1272
  if (array.length === 2) {
1900
1273
  const range1 = array[0];
1901
1274
  const range2 = array[1];
1902
- return [DATE_PARSER(range1, format2), DATE_PARSER(range2, format2)];
1275
+ return [DATE_PARSER(range1, format), DATE_PARSER(range2, format)];
1903
1276
  }
1904
1277
  return [];
1905
1278
  };
@@ -1917,20 +1290,20 @@ const TYPE_VALUE_RESOLVER_MAP = {
1917
1290
  }
1918
1291
  },
1919
1292
  week: {
1920
- formatter(value, format2) {
1921
- let week = getWeekNumber(value);
1293
+ formatter(value, format) {
1294
+ let week = dateUtil.getWeekNumber(value);
1922
1295
  let month = value.getMonth();
1923
1296
  const trueDate = new Date(value);
1924
1297
  if (week === 1 && month === 11) {
1925
1298
  trueDate.setHours(0, 0, 0, 0);
1926
1299
  trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
1927
1300
  }
1928
- let date2 = formatDate(trueDate, format2);
1929
- date2 = /WW/.test(date2) ? date2.replace(/WW/, week < 10 ? "0" + week : week) : date2.replace(/W/, week);
1930
- return date2;
1301
+ let date = dateUtil.formatDate(trueDate, format);
1302
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
1303
+ return date;
1931
1304
  },
1932
- parser(text, format2) {
1933
- return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format2);
1305
+ parser(text, format) {
1306
+ return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
1934
1307
  }
1935
1308
  },
1936
1309
  date: {
@@ -1989,11 +1362,11 @@ const TYPE_VALUE_RESOLVER_MAP = {
1989
1362
  }
1990
1363
  },
1991
1364
  dates: {
1992
- formatter(value, format2) {
1993
- return value.map((date2) => DATE_FORMATTER(date2, format2));
1365
+ formatter(value, format) {
1366
+ return value.map((date) => DATE_FORMATTER(date, format));
1994
1367
  },
1995
- parser(value, format2) {
1996
- return (typeof value === "string" ? value.split(", ") : value).map((date2) => date2 instanceof Date ? date2 : DATE_PARSER(date2, format2));
1368
+ parser(value, format) {
1369
+ return (typeof value === "string" ? value.split(", ") : value).map((date) => date instanceof Date ? date : DATE_PARSER(date, format));
1997
1370
  }
1998
1371
  }
1999
1372
  };
@@ -2006,15 +1379,15 @@ const parseAsFormatAndType = (value, customFormat, type, rangeSeparator = "-") =
2006
1379
  if (!value)
2007
1380
  return null;
2008
1381
  const parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).parser;
2009
- const format2 = customFormat || DEFAULT_FORMATS[type];
2010
- return parser(value, format2, rangeSeparator);
1382
+ const format = customFormat || DEFAULT_FORMATS[type];
1383
+ return parser(value, format, rangeSeparator);
2011
1384
  };
2012
1385
  const formatAsFormatAndType = (value, customFormat, type) => {
2013
1386
  if (!value)
2014
1387
  return null;
2015
1388
  const formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).formatter;
2016
- const format2 = customFormat || DEFAULT_FORMATS[type];
2017
- return formatter(value, format2);
1389
+ const format = customFormat || DEFAULT_FORMATS[type];
1390
+ return formatter(value, format);
2018
1391
  };
2019
1392
  const valueEquals = function(a, b) {
2020
1393
  const dateEquals = function(a2, b2) {
@@ -2041,11 +1414,11 @@ const valueEquals = function(a, b) {
2041
1414
  }
2042
1415
  return false;
2043
1416
  };
2044
- const isString$1 = function(val) {
1417
+ const isString = function(val) {
2045
1418
  return typeof val === "string" || val instanceof String;
2046
1419
  };
2047
1420
  const validator = function(val) {
2048
- return val === null || val === void 0 || isString$1(val) || Array.isArray(val) && val.length === 2 && val.every(isString$1);
1421
+ return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
2049
1422
  };
2050
1423
  const _sfc_main$3 = {
2051
1424
  mixins: [Emitter, NewPopper],
@@ -2232,7 +1605,7 @@ const _sfc_main$3 = {
2232
1605
  return this.value;
2233
1606
  if (this.type === "time-select")
2234
1607
  return this.value;
2235
- const valueIsDateObject = isDateObject(this.value) || Array.isArray(this.value) && this.value.every(isDateObject);
1608
+ const valueIsDateObject = dateUtil.isDateObject(this.value) || Array.isArray(this.value) && this.value.every(dateUtil.isDateObject);
2236
1609
  if (valueIsDateObject) {
2237
1610
  return this.value;
2238
1611
  }
@@ -2294,19 +1667,19 @@ const _sfc_main$3 = {
2294
1667
  },
2295
1668
  // {parse, formatTo} Value deals maps component value with internal Date
2296
1669
  parseValue(value) {
2297
- const isParsed = isDateObject(value) || Array.isArray(value) && value.every(isDateObject);
1670
+ const isParsed = dateUtil.isDateObject(value) || Array.isArray(value) && value.every(dateUtil.isDateObject);
2298
1671
  if (this.valueFormat && !isParsed) {
2299
1672
  return parseAsFormatAndType(value, this.valueFormat, this.type, this.rangeSeparator) || value;
2300
1673
  } else {
2301
1674
  return value;
2302
1675
  }
2303
1676
  },
2304
- formatToValue(date2) {
2305
- const isFormattable = isDateObject(date2) || Array.isArray(date2) && date2.every(isDateObject);
1677
+ formatToValue(date) {
1678
+ const isFormattable = dateUtil.isDateObject(date) || Array.isArray(date) && date.every(dateUtil.isDateObject);
2306
1679
  if (this.valueFormat && isFormattable) {
2307
- return formatAsFormatAndType(date2, this.valueFormat, this.type, this.rangeSeparator);
1680
+ return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
2308
1681
  } else {
2309
- return date2;
1682
+ return date;
2310
1683
  }
2311
1684
  },
2312
1685
  // {parse, formatTo} String deals with user input
@@ -2495,17 +1868,17 @@ const _sfc_main$3 = {
2495
1868
  this.picker.selectionMode = this.selectionMode;
2496
1869
  this.picker.unlinkPanels = this.unlinkPanels;
2497
1870
  this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
2498
- this.$watch("format", (format2) => {
2499
- this.picker.format = format2;
1871
+ this.$watch("format", (format) => {
1872
+ this.picker.format = format;
2500
1873
  });
2501
1874
  const updateOptions = () => {
2502
1875
  const options = this.pickerOptions;
2503
1876
  if (options && options.selectableRange) {
2504
1877
  let ranges = options.selectableRange;
2505
1878
  const parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
2506
- const format2 = DEFAULT_FORMATS.timerange;
1879
+ const format = DEFAULT_FORMATS.timerange;
2507
1880
  ranges = Array.isArray(ranges) ? ranges : [ranges];
2508
- this.picker.selectableRange = ranges.map((range2) => parser(range2, format2, this.rangeSeparator));
1881
+ this.picker.selectableRange = ranges.map((range) => parser(range, format, this.rangeSeparator));
2509
1882
  }
2510
1883
  for (const option in options) {
2511
1884
  if (options.hasOwnProperty(option) && // 忽略 time-picker 的该配置项
@@ -2524,10 +1897,10 @@ const _sfc_main$3 = {
2524
1897
  this.$el.appendChild(this.picker.$el);
2525
1898
  this.picker.resetView && this.picker.resetView();
2526
1899
  this.picker.$on("dodestroy", this.doDestroy);
2527
- this.picker.$on("pick", (date2 = "", visible = false) => {
1900
+ this.picker.$on("pick", (date = "", visible = false) => {
2528
1901
  this.userInput = null;
2529
1902
  this.pickerVisible = this.picker.visible = visible;
2530
- this.emitInput(date2);
1903
+ this.emitInput(date);
2531
1904
  this.picker.resetView && this.picker.resetView();
2532
1905
  });
2533
1906
  this.picker.$on("select-range", (start, end, pos) => {
@@ -2707,274 +2080,15 @@ var _sfc_render$3 = function render() {
2707
2080
  var _sfc_staticRenderFns$3 = [];
2708
2081
  var __component__$3 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$3, _sfc_render$3, _sfc_staticRenderFns$3, false, null, null, null, null);
2709
2082
  const Picker = __component__$3.exports;
2710
- var locale = {};
2711
- var zhCN = {};
2712
- zhCN.__esModule = true;
2713
- zhCN.default = {
2714
- el: {
2715
- colorpicker: {
2716
- confirm: "确定",
2717
- clear: "清空"
2718
- },
2719
- datepicker: {
2720
- now: "此刻",
2721
- today: "今天",
2722
- cancel: "取消",
2723
- clear: "清空",
2724
- confirm: "确定",
2725
- selectDate: "选择日期",
2726
- selectTime: "选择时间",
2727
- startDate: "开始日期",
2728
- startTime: "开始时间",
2729
- endDate: "结束日期",
2730
- endTime: "结束时间",
2731
- prevYear: "前一年",
2732
- nextYear: "后一年",
2733
- prevMonth: "上个月",
2734
- nextMonth: "下个月",
2735
- year: "年",
2736
- month1: "1 月",
2737
- month2: "2 月",
2738
- month3: "3 月",
2739
- month4: "4 月",
2740
- month5: "5 月",
2741
- month6: "6 月",
2742
- month7: "7 月",
2743
- month8: "8 月",
2744
- month9: "9 月",
2745
- month10: "10 月",
2746
- month11: "11 月",
2747
- month12: "12 月",
2748
- // week: '周次',
2749
- weeks: {
2750
- sun: "日",
2751
- mon: "一",
2752
- tue: "二",
2753
- wed: "三",
2754
- thu: "四",
2755
- fri: "五",
2756
- sat: "六"
2757
- },
2758
- months: {
2759
- jan: "一月",
2760
- feb: "二月",
2761
- mar: "三月",
2762
- apr: "四月",
2763
- may: "五月",
2764
- jun: "六月",
2765
- jul: "七月",
2766
- aug: "八月",
2767
- sep: "九月",
2768
- oct: "十月",
2769
- nov: "十一月",
2770
- dec: "十二月"
2771
- }
2772
- },
2773
- select: {
2774
- loading: "加载中",
2775
- noMatch: "无匹配数据",
2776
- noData: "无数据",
2777
- placeholder: "请选择"
2778
- },
2779
- cascader: {
2780
- noMatch: "无匹配数据",
2781
- loading: "加载中",
2782
- placeholder: "请选择",
2783
- noData: "暂无数据"
2784
- },
2785
- pagination: {
2786
- goto: "前往",
2787
- pagesize: "条/页",
2788
- total: "共 {total} 条",
2789
- pageClassifier: "页"
2790
- },
2791
- messagebox: {
2792
- title: "提示",
2793
- confirm: "确定",
2794
- cancel: "取消",
2795
- error: "输入的数据不合法!"
2796
- },
2797
- upload: {
2798
- deleteTip: "按 delete 键可删除",
2799
- delete: "删除",
2800
- preview: "查看图片",
2801
- continue: "继续上传"
2802
- },
2803
- table: {
2804
- emptyText: "暂无数据",
2805
- confirmFilter: "筛选",
2806
- resetFilter: "重置",
2807
- clearFilter: "全部",
2808
- sumText: "合计"
2809
- },
2810
- tree: {
2811
- emptyText: "暂无数据"
2812
- },
2813
- transfer: {
2814
- noMatch: "无匹配数据",
2815
- noData: "无数据",
2816
- titles: ["列表 1", "列表 2"],
2817
- filterPlaceholder: "请输入搜索内容",
2818
- noCheckedFormat: "共 {total} 项",
2819
- hasCheckedFormat: "已选 {checked}/{total} 项"
2820
- },
2821
- image: {
2822
- error: "加载失败"
2823
- },
2824
- pageHeader: {
2825
- title: "返回"
2826
- },
2827
- popconfirm: {
2828
- confirmButtonText: "确定",
2829
- cancelButtonText: "取消"
2830
- }
2831
- }
2832
- };
2833
- var format$1 = {};
2834
- var util = {};
2835
- var types = {};
2836
- types.__esModule = true;
2837
- types.isString = isString;
2838
- types.isObject = isObject;
2839
- types.isHtmlElement = isHtmlElement;
2840
- function isString(obj) {
2841
- return Object.prototype.toString.call(obj) === "[object String]";
2842
- }
2843
- function isObject(obj) {
2844
- return Object.prototype.toString.call(obj) === "[object Object]";
2845
- }
2846
- function isHtmlElement(node) {
2847
- return node && node.nodeType === Node.ELEMENT_NODE;
2848
- }
2849
- types.isFunction = function isFunction(functionToCheck) {
2850
- var getType = {};
2851
- return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
2852
- };
2853
- types.isUndefined = function isUndefined(val) {
2854
- return val === void 0;
2855
- };
2856
- types.isDefined = function isDefined(val) {
2857
- return val !== void 0 && val !== null;
2858
- };
2859
- util.__esModule = true;
2860
- 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;
2861
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
2862
- return typeof obj;
2863
- } : function(obj) {
2864
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2865
- };
2866
- util.noop = noop;
2867
- util.hasOwn = hasOwn;
2868
- util.toObject = toObject;
2869
- util.getPropByPath = getPropByPath;
2870
- util.rafThrottle = rafThrottle;
2871
- util.objToArray = objToArray;
2872
- var _vue$1 = Vue;
2873
- var _vue2$1 = _interopRequireDefault$1(_vue$1);
2874
- var _types = types;
2875
- function _interopRequireDefault$1(obj) {
2876
- return obj && obj.__esModule ? obj : {
2877
- default: obj
2878
- };
2879
- }
2880
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2881
- function noop() {
2882
- }
2883
- function hasOwn(obj, key) {
2884
- return hasOwnProperty.call(obj, key);
2885
- }
2886
- function extend(to, _from) {
2887
- for (var key in _from) {
2888
- to[key] = _from[key];
2889
- }
2890
- return to;
2891
- }
2892
- function toObject(arr) {
2893
- var res = {};
2894
- for (var i = 0; i < arr.length; i++) {
2895
- if (arr[i]) {
2896
- extend(res, arr[i]);
2897
- }
2898
- }
2899
- return res;
2900
- }
2901
- util.getValueByPath = function getValueByPath(object, prop) {
2902
- prop = prop || "";
2903
- var paths = prop.split(".");
2904
- var current = object;
2905
- var result = null;
2906
- for (var i = 0, j = paths.length; i < j; i++) {
2907
- var path = paths[i];
2908
- if (!current)
2909
- break;
2910
- if (i === j - 1) {
2911
- result = current[path];
2912
- break;
2913
- }
2914
- current = current[path];
2915
- }
2916
- return result;
2917
- };
2918
- function getPropByPath(obj, path, strict) {
2919
- var tempObj = obj;
2920
- path = path.replace(/\[(\w+)\]/g, ".$1");
2921
- path = path.replace(/^\./, "");
2922
- var keyArr = path.split(".");
2923
- var i = 0;
2924
- for (var len = keyArr.length; i < len - 1; ++i) {
2925
- if (!tempObj && !strict)
2926
- break;
2927
- var key = keyArr[i];
2928
- if (key in tempObj) {
2929
- tempObj = tempObj[key];
2930
- } else {
2931
- if (strict) {
2932
- throw new Error("please transfer a valid prop path to form item!");
2933
- }
2934
- break;
2935
- }
2936
- }
2937
- return {
2938
- o: tempObj,
2939
- k: keyArr[i],
2940
- v: tempObj ? tempObj[keyArr[i]] : null
2941
- };
2942
- }
2943
- util.generateId = function generateId() {
2944
- return Math.floor(Math.random() * 1e4);
2945
- };
2946
- util.valueEquals = function valueEquals2(a, b) {
2947
- if (a === b)
2948
- return true;
2949
- if (!(a instanceof Array))
2950
- return false;
2951
- if (!(b instanceof Array))
2952
- return false;
2953
- if (a.length !== b.length)
2954
- return false;
2955
- for (var i = 0; i !== a.length; ++i) {
2956
- if (a[i] !== b[i])
2957
- return false;
2958
- }
2959
- return true;
2960
- };
2961
- util.escapeRegexpString = function escapeRegexpString() {
2962
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
2963
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
2964
- };
2965
- var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
2966
- for (var i = 0; i !== arr.length; ++i) {
2083
+ const arrayFindIndex = function(arr, pred) {
2084
+ for (let i = 0; i !== arr.length; ++i) {
2967
2085
  if (pred(arr[i])) {
2968
2086
  return i;
2969
2087
  }
2970
2088
  }
2971
2089
  return -1;
2972
2090
  };
2973
- util.arrayFind = function arrayFind(arr, pred) {
2974
- var idx = arrayFindIndex(arr, pred);
2975
- return idx !== -1 ? arr[idx] : void 0;
2976
- };
2977
- util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2091
+ const coerceTruthyValueToArray = function(val) {
2978
2092
  if (Array.isArray(val)) {
2979
2093
  return val;
2980
2094
  } else if (val) {
@@ -2983,228 +2097,16 @@ util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2983
2097
  return [];
2984
2098
  }
2985
2099
  };
2986
- util.isIE = function isIE() {
2987
- return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
2988
- };
2989
- util.isEdge = function isEdge() {
2990
- return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
2991
- };
2992
- util.isFirefox = function isFirefox() {
2993
- return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
2994
- };
2995
- util.autoprefixer = function autoprefixer(style) {
2996
- if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
2997
- return style;
2998
- var rules = ["transform", "transition", "animation"];
2999
- var prefixes = ["ms-", "webkit-"];
3000
- rules.forEach(function(rule) {
3001
- var value = style[rule];
3002
- if (rule && value) {
3003
- prefixes.forEach(function(prefix) {
3004
- style[prefix + rule] = value;
3005
- });
3006
- }
3007
- });
3008
- return style;
3009
- };
3010
- util.kebabCase = function kebabCase(str) {
3011
- var hyphenateRE = /([^-])([A-Z])/g;
3012
- return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
3013
- };
3014
- util.capitalize = function capitalize(str) {
3015
- if (!(0, _types.isString)(str))
3016
- return str;
3017
- return str.charAt(0).toUpperCase() + str.slice(1);
3018
- };
3019
- var looseEqual = util.looseEqual = function looseEqual2(a, b) {
3020
- var isObjectA = (0, _types.isObject)(a);
3021
- var isObjectB = (0, _types.isObject)(b);
3022
- if (isObjectA && isObjectB) {
3023
- return JSON.stringify(a) === JSON.stringify(b);
3024
- } else if (!isObjectA && !isObjectB) {
3025
- return String(a) === String(b);
3026
- } else {
3027
- return false;
3028
- }
3029
- };
3030
- var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
3031
- arrayA = arrayA || [];
3032
- arrayB = arrayB || [];
3033
- if (arrayA.length !== arrayB.length) {
3034
- return false;
3035
- }
3036
- for (var i = 0; i < arrayA.length; i++) {
3037
- if (!looseEqual(arrayA[i], arrayB[i])) {
3038
- return false;
3039
- }
3040
- }
3041
- return true;
3042
- };
3043
- util.isEqual = function isEqual(value1, value2) {
3044
- if (Array.isArray(value1) && Array.isArray(value2)) {
3045
- return arrayEquals(value1, value2);
3046
- }
3047
- return looseEqual(value1, value2);
3048
- };
3049
- var isEmpty = util.isEmpty = function isEmpty2(val) {
3050
- if (val == null)
3051
- return true;
3052
- if (typeof val === "boolean")
3053
- return false;
3054
- if (typeof val === "number")
3055
- return !val;
3056
- if (val instanceof Error)
3057
- return val.message === "";
3058
- switch (Object.prototype.toString.call(val)) {
3059
- case "[object String]":
3060
- case "[object Array]":
3061
- return !val.length;
3062
- case "[object File]":
3063
- case "[object Map]":
3064
- case "[object Set]": {
3065
- return !val.size;
3066
- }
3067
- case "[object Object]": {
3068
- return !Object.keys(val).length;
3069
- }
3070
- }
3071
- return false;
3072
- };
3073
- function rafThrottle(fn) {
3074
- var locked = false;
3075
- return function() {
3076
- var _this = this;
3077
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3078
- args[_key] = arguments[_key];
3079
- }
3080
- if (locked)
3081
- return;
3082
- locked = true;
3083
- window.requestAnimationFrame(function(_) {
3084
- fn.apply(_this, args);
3085
- locked = false;
3086
- });
3087
- };
3088
- }
3089
- function objToArray(obj) {
3090
- if (Array.isArray(obj)) {
3091
- return obj;
3092
- }
3093
- return isEmpty(obj) ? [] : [obj];
3094
- }
3095
- format$1.__esModule = true;
3096
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
3097
- return typeof obj;
3098
- } : function(obj) {
3099
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3100
- };
3101
- format$1.default = function(Vue2) {
3102
- function template(string) {
3103
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3104
- args[_key - 1] = arguments[_key];
3105
- }
3106
- if (args.length === 1 && _typeof(args[0]) === "object") {
3107
- args = args[0];
3108
- }
3109
- if (!args || !args.hasOwnProperty) {
3110
- args = {};
3111
- }
3112
- return string.replace(RE_NARGS, function(match, prefix, i, index) {
3113
- var result = void 0;
3114
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
3115
- return i;
3116
- } else {
3117
- result = (0, _util.hasOwn)(args, i) ? args[i] : null;
3118
- if (result === null || result === void 0) {
3119
- return "";
3120
- }
3121
- return result;
3122
- }
3123
- });
3124
- }
3125
- return template;
3126
- };
3127
- var _util = util;
3128
- var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
3129
- locale.__esModule = true;
3130
- locale.i18n = locale.use = locale.t = void 0;
3131
- var _zhCN = zhCN;
3132
- var _zhCN2 = _interopRequireDefault(_zhCN);
3133
- var _vue = Vue;
3134
- var _vue2 = _interopRequireDefault(_vue);
3135
- var _deepmerge = cjs;
3136
- var _deepmerge2 = _interopRequireDefault(_deepmerge);
3137
- var _format = format$1;
3138
- var _format2 = _interopRequireDefault(_format);
3139
- function _interopRequireDefault(obj) {
3140
- return obj && obj.__esModule ? obj : {
3141
- default: obj
3142
- };
3143
- }
3144
- var format = (0, _format2.default)(_vue2.default);
3145
- var lang = _zhCN2.default;
3146
- var merged = false;
3147
- var i18nHandler = function i18nHandler2() {
3148
- var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
3149
- if (typeof vuei18n === "function" && !!_vue2.default.locale) {
3150
- if (!merged) {
3151
- merged = true;
3152
- _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
3153
- clone: true
3154
- }));
3155
- }
3156
- return vuei18n.apply(this, arguments);
3157
- }
3158
- };
3159
- var t = locale.t = function t2(path, options) {
3160
- var value = i18nHandler.apply(this, arguments);
3161
- if (value !== null && value !== void 0)
3162
- return value;
3163
- var array = path.split(".");
3164
- var current = lang;
3165
- for (var i = 0, j = array.length; i < j; i++) {
3166
- var property = array[i];
3167
- value = current[property];
3168
- if (i === j - 1)
3169
- return format(value, options);
3170
- if (!value)
3171
- return "";
3172
- current = value;
3173
- }
3174
- return "";
3175
- };
3176
- var use = locale.use = function use2(l) {
3177
- lang = l || lang;
3178
- };
3179
- var i18n = locale.i18n = function i18n2(fn) {
3180
- i18nHandler = fn || i18nHandler;
3181
- };
3182
- locale.default = {
3183
- use,
3184
- t,
3185
- i18n
3186
- };
3187
- var _locale = locale;
3188
- var _default = {
3189
- methods: {
3190
- t: function t3() {
3191
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3192
- args[_key] = arguments[_key];
3193
- }
3194
- return _locale.t.apply(this, args);
3195
- }
3196
- }
3197
- };
3198
2100
  const datesInYear = (year) => {
3199
- const numOfDays = getDayCountOfYear(year);
2101
+ const numOfDays = dateUtil.getDayCountOfYear(year);
3200
2102
  const firstDay = new Date(year, 0, 1);
3201
- return range(numOfDays).map((n) => nextDate(firstDay, n));
2103
+ return dateUtil.range(numOfDays).map((n) => dateUtil.nextDate(firstDay, n));
3202
2104
  };
3203
2105
  const _sfc_main$2 = {
3204
2106
  props: {
3205
2107
  defaultValue: {
3206
2108
  validator(val) {
3207
- return val === null || val instanceof Date && isDate(val);
2109
+ return val === null || val instanceof Date && dateUtil.isDate(val);
3208
2110
  }
3209
2111
  },
3210
2112
  disabledDate: {},
@@ -3245,7 +2147,7 @@ const _sfc_main$2 = {
3245
2147
  style["end-date"] = minYear && year === maxYear;
3246
2148
  style["in-range"] = minYear && year >= minYear && year <= maxYear;
3247
2149
  } else {
3248
- style.current = arrayFindIndex$1(coerceTruthyValueToArray(this.value), (date2) => date2.getFullYear() === year) >= 0;
2150
+ style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year) >= 0;
3249
2151
  }
3250
2152
  return style;
3251
2153
  },
@@ -3399,19 +2301,19 @@ var _sfc_staticRenderFns$2 = [];
3399
2301
  var __component__$2 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, null, null, null);
3400
2302
  const yearTable = __component__$2.exports;
3401
2303
  const calcDefaultValue = (defaultValue) => {
3402
- var date2;
2304
+ var date;
3403
2305
  if (Array.isArray(defaultValue)) {
3404
2306
  return [new Date(defaultValue[0]), new Date(defaultValue[1])];
3405
2307
  } else if (defaultValue) {
3406
- date2 = new Date(defaultValue);
3407
- return [new Date(date2), new Date(date2.setFullYear(date2.getFullYear() + 12))];
2308
+ date = new Date(defaultValue);
2309
+ return [new Date(date), new Date(date.setFullYear(date.getFullYear() + 12))];
3408
2310
  } else {
3409
- date2 = /* @__PURE__ */ new Date();
3410
- return [/* @__PURE__ */ new Date(), new Date(date2.setFullYear(date2.getFullYear() + 12))];
2311
+ date = /* @__PURE__ */ new Date();
2312
+ return [/* @__PURE__ */ new Date(), new Date(date.setFullYear(date.getFullYear() + 12))];
3411
2313
  }
3412
2314
  };
3413
2315
  const _sfc_main$1 = {
3414
- mixins: [_default],
2316
+ mixins: [Locale],
3415
2317
  directives: {
3416
2318
  Clickoutside
3417
2319
  },
@@ -3463,8 +2365,8 @@ const _sfc_main$1 = {
3463
2365
  this.minDate = null;
3464
2366
  this.maxDate = null;
3465
2367
  } else if (Array.isArray(newVal)) {
3466
- this.minDate = newVal[0] ? (_a = toDate(newVal[0])) == null ? void 0 : _a.getFullYear() : null;
3467
- this.maxDate = newVal[1] ? (_b = toDate(newVal[1])) == null ? void 0 : _b.getFullYear() : null;
2368
+ this.minDate = newVal[0] ? (_a = dateUtil.toDate(newVal[0])) == null ? void 0 : _a.getFullYear() : null;
2369
+ this.maxDate = newVal[1] ? (_b = dateUtil.toDate(newVal[1])) == null ? void 0 : _b.getFullYear() : null;
3468
2370
  this.date = new Date(this.minDate, 0, 1);
3469
2371
  this.rangeState.endDate = null;
3470
2372
  }
@@ -3472,9 +2374,9 @@ const _sfc_main$1 = {
3472
2374
  immediate: true
3473
2375
  },
3474
2376
  date(val) {
3475
- const date2 = new Date(val);
3476
- if (!this.unlinkPanels || date2.getFullYear() + 12 > this.rightDate.getFullYear()) {
3477
- this.rightDate = new Date(date2.setFullYear(date2.getFullYear() + 12));
2377
+ const date = new Date(val);
2378
+ if (!this.unlinkPanels || date.getFullYear() + 12 > this.rightDate.getFullYear()) {
2379
+ this.rightDate = new Date(date.setFullYear(date.getFullYear() + 12));
3478
2380
  }
3479
2381
  },
3480
2382
  defaultValue(val) {
@@ -3500,8 +2402,8 @@ const _sfc_main$1 = {
3500
2402
  },
3501
2403
  handleRangePick(val, close = true) {
3502
2404
  const defaultTime = this.defaultTime || [];
3503
- const minDate = modifyWithTimeString(val.minDate, defaultTime[0]);
3504
- const maxDate = modifyWithTimeString(val.maxDate, defaultTime[1]);
2405
+ const minDate = dateUtil.modifyWithTimeString(val.minDate, defaultTime[0]);
2406
+ const maxDate = dateUtil.modifyWithTimeString(val.maxDate, defaultTime[1]);
3505
2407
  if (this.maxDate === maxDate && this.minDate === minDate) {
3506
2408
  return;
3507
2409
  }
@@ -3522,13 +2424,13 @@ const _sfc_main$1 = {
3522
2424
  }
3523
2425
  },
3524
2426
  nextYear(left = false) {
3525
- const date2 = left || !this.unlinkPanels ? this.date : this.rightDate;
3526
- date2.setFullYear(date2.getFullYear() + 12);
2427
+ const date = left || !this.unlinkPanels ? this.date : this.rightDate;
2428
+ date.setFullYear(date.getFullYear() + 12);
3527
2429
  this.resetDate();
3528
2430
  },
3529
2431
  prevYear(left = false) {
3530
- const date2 = left ? this.date : this.rightDate;
3531
- date2.setFullYear(date2.getFullYear() - 12);
2432
+ const date = left ? this.date : this.rightDate;
2433
+ date.setFullYear(date.getFullYear() - 12);
3532
2434
  this.resetDate();
3533
2435
  },
3534
2436
  handleConfirm(visible = false) {