mediacube-ui-v2 0.0.17 → 0.0.19

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.
Files changed (80) hide show
  1. package/dist/index.cjs +3 -1390
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +1622 -1081
  4. package/dist/index.js.map +1 -1
  5. package/dist/style.css +1 -12275
  6. package/dist/types/src/components/elements/McAvatar/McAvatar.vue.d.ts +2 -2
  7. package/dist/types/src/components/elements/McAvatar/McAvatar.vue.d.ts.map +1 -1
  8. package/dist/types/src/components/elements/McButton/McButton.vue.d.ts +1 -1
  9. package/dist/types/src/components/elements/McDatepicker/McDatepicker.vue.d.ts.map +1 -1
  10. package/dist/types/src/components/elements/McFieldRadio/McFieldRadio.vue.d.ts +2 -2
  11. package/dist/types/src/components/elements/McFieldRadio/McFieldRadio.vue.d.ts.map +1 -1
  12. package/dist/types/src/components/elements/McFieldRadioGroup/McFieldRadioGroup.vue.d.ts.map +1 -1
  13. package/dist/types/src/components/elements/McFieldSelect/McFieldSelect.vue.d.ts +4 -4
  14. package/dist/types/src/components/elements/McFieldSelect/McFieldSelect.vue.d.ts.map +1 -1
  15. package/dist/types/src/components/elements/McFieldText/McFieldText.vue.d.ts +3 -3
  16. package/dist/types/src/components/elements/McFieldText/McFieldText.vue.d.ts.map +1 -1
  17. package/dist/types/src/components/elements/McFieldToggle/McFieldToggle.vue.d.ts +1 -1
  18. package/dist/types/src/components/elements/McFieldToggle/McFieldToggle.vue.d.ts.map +1 -1
  19. package/dist/types/src/components/elements/McNodata/McNoData.vue.d.ts +2 -2
  20. package/dist/types/src/components/elements/McNodata/McNoData.vue.d.ts.map +1 -1
  21. package/dist/types/src/components/elements/McNotification/McNotification.vue.d.ts.map +1 -1
  22. package/dist/types/src/components/elements/McSlideUpDown/McSlideUpDown.vue.d.ts +1 -1
  23. package/dist/types/src/components/elements/McSvgIcon/McSvgIcon.vue.d.ts +3 -3
  24. package/dist/types/src/components/elements/McSvgIcon/McSvgIcon.vue.d.ts.map +1 -1
  25. package/dist/types/src/components/elements/McTitle/McTitle.vue.d.ts +1 -1
  26. package/dist/types/src/components/elements/McTitle/McTitle.vue.d.ts.map +1 -1
  27. package/dist/types/src/components/index.d.ts +69 -61
  28. package/dist/types/src/components/index.d.ts.map +1 -1
  29. package/dist/types/src/components/patterns/McCollapse/McCollapse.vue.d.ts.map +1 -1
  30. package/dist/types/src/components/patterns/McFilter/McFilter.vue.d.ts +2 -2
  31. package/dist/types/src/components/patterns/McFilter/McFilter.vue.d.ts.map +1 -1
  32. package/dist/types/src/components/patterns/McFilter/McFilterChip/McFilterChip.vue.d.ts.map +1 -1
  33. package/dist/types/src/components/patterns/McFilter/McFilterTags/McFilterTags.vue.d.ts.map +1 -1
  34. package/dist/types/src/components/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.d.ts.map +1 -1
  35. package/dist/types/src/components/patterns/McGridRow/McGridRow.vue.d.ts.map +1 -1
  36. package/dist/types/src/components/patterns/McSideBar/McSideBar.vue.d.ts +5 -5
  37. package/dist/types/src/components/patterns/McSideBar/McSideBar.vue.d.ts.map +1 -1
  38. package/dist/types/src/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.d.ts.map +1 -1
  39. package/dist/types/src/components/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.d.ts.map +1 -1
  40. package/dist/types/src/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts +2 -2
  41. package/dist/types/src/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts.map +1 -1
  42. package/dist/types/src/components/patterns/McTab/McTab.vue.d.ts.map +1 -1
  43. package/dist/types/src/components/patterns/McTabs/McTabs.vue.d.ts +1 -1
  44. package/dist/types/src/components/patterns/McTabs/McTabs.vue.d.ts.map +1 -1
  45. package/dist/types/src/components/templates/McDrawer/McDrawer.vue.d.ts +1 -1
  46. package/dist/types/src/components/templates/McDrawer/McDrawerContainer.vue.d.ts +1 -1
  47. package/dist/types/src/components/templates/McDrawer/McDrawerContainer.vue.d.ts.map +1 -1
  48. package/dist/types/src/components/templates/McModal/McModal.vue.d.ts +2 -2
  49. package/dist/types/src/components/templates/McModal/McModalContainer.vue.d.ts +1 -1
  50. package/dist/types/src/components/templates/McModal/McModalContainer.vue.d.ts.map +1 -1
  51. package/dist/types/src/components/templates/McTable/McTable/McTable.vue.d.ts +2 -2
  52. package/dist/types/src/components/templates/McTable/McTable/McTable.vue.d.ts.map +1 -1
  53. package/dist/types/src/components/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.d.ts.map +1 -1
  54. package/dist/types/src/components/templates/McTopBar/McTopBar.vue.d.ts.map +1 -1
  55. package/dist/types/src/composables/index.d.ts +7 -8
  56. package/dist/types/src/composables/index.d.ts.map +1 -1
  57. package/dist/types/src/consts/index.d.ts +2 -0
  58. package/dist/types/src/consts/index.d.ts.map +1 -0
  59. package/dist/types/src/index.d.ts +2 -0
  60. package/dist/types/src/index.d.ts.map +1 -1
  61. package/dist/types/src/mocks/categories.d.ts +9 -0
  62. package/dist/types/src/mocks/categories.d.ts.map +1 -0
  63. package/dist/types/src/utils/dayjs.d.ts +12 -0
  64. package/dist/types/src/utils/dayjs.d.ts.map +1 -0
  65. package/dist/types/src/utils/index.d.ts +3 -0
  66. package/dist/types/src/utils/index.d.ts.map +1 -0
  67. package/dist/vue-C68lofEO.cjs +2 -0
  68. package/dist/vue-C68lofEO.cjs.map +1 -0
  69. package/dist/vue-LDLBiXPq.js +17903 -0
  70. package/dist/vue-LDLBiXPq.js.map +1 -0
  71. package/package.json +1 -1
  72. package/dist/.vite/ssr-manifest.json +0 -879
  73. package/dist/dayjs-CAmwdbhW.js +0 -1665
  74. package/dist/dayjs-CAmwdbhW.js.map +0 -1
  75. package/dist/dayjs-RhyhJ68u.cjs +0 -1668
  76. package/dist/dayjs-RhyhJ68u.cjs.map +0 -1
  77. package/dist/vue-ClUN1lBG.js +0 -12425
  78. package/dist/vue-ClUN1lBG.js.map +0 -1
  79. package/dist/vue-qI5e4HjB.cjs +0 -12486
  80. package/dist/vue-qI5e4HjB.cjs.map +0 -1
@@ -1,1668 +0,0 @@
1
- 'use strict';
2
-
3
- var SECONDS_A_MINUTE = 60;
4
- var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60;
5
- var SECONDS_A_DAY = SECONDS_A_HOUR * 24;
6
- var SECONDS_A_WEEK = SECONDS_A_DAY * 7;
7
- var MILLISECONDS_A_SECOND = 1e3;
8
- var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND;
9
- var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND;
10
- var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND;
11
- var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND; // English locales
12
-
13
- var MS = 'millisecond';
14
- var S = 'second';
15
- var MIN = 'minute';
16
- var H = 'hour';
17
- var D = 'day';
18
- var W = 'week';
19
- var M = 'month';
20
- var Q = 'quarter';
21
- var Y = 'year';
22
- var DATE = 'date';
23
- var FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ssZ';
24
- var INVALID_DATE_STRING = 'Invalid Date'; // regex
25
-
26
- var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
27
- var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
28
-
29
- // English [en]
30
- // We don't need weekdaysShort, weekdaysMin, monthsShort in en.js locale
31
- const en = {
32
- name: 'en',
33
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
34
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
35
- ordinal: function ordinal(n) {
36
- var s = ['th', 'st', 'nd', 'rd'];
37
- var v = n % 100;
38
- return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]";
39
- }
40
- };
41
-
42
- var padStart = function padStart(string, length, pad) {
43
- var s = String(string);
44
- if (!s || s.length >= length) return string;
45
- return "" + Array(length + 1 - s.length).join(pad) + string;
46
- };
47
-
48
- var padZoneStr = function padZoneStr(instance) {
49
- var negMinutes = -instance.utcOffset();
50
- var minutes = Math.abs(negMinutes);
51
- var hourOffset = Math.floor(minutes / 60);
52
- var minuteOffset = minutes % 60;
53
- return "" + (negMinutes <= 0 ? '+' : '-') + padStart(hourOffset, 2, '0') + ":" + padStart(minuteOffset, 2, '0');
54
- };
55
-
56
- var monthDiff = function monthDiff(a, b) {
57
- // function from moment.js in order to keep the same result
58
- if (a.date() < b.date()) return -monthDiff(b, a);
59
- var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month());
60
- var anchor = a.clone().add(wholeMonthDiff, M);
61
- var c = b - anchor < 0;
62
- var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), M);
63
- return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0);
64
- };
65
-
66
- var absFloor = function absFloor(n) {
67
- return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
68
- };
69
-
70
- var prettyUnit = function prettyUnit(u) {
71
- var special = {
72
- M: M,
73
- y: Y,
74
- w: W,
75
- d: D,
76
- D: DATE,
77
- h: H,
78
- m: MIN,
79
- s: S,
80
- ms: MS,
81
- Q: Q
82
- };
83
- return special[u] || String(u || '').toLowerCase().replace(/s$/, '');
84
- };
85
-
86
- var isUndefined = function isUndefined(s) {
87
- return s === undefined;
88
- };
89
-
90
- const U = {
91
- s: padStart,
92
- z: padZoneStr,
93
- m: monthDiff,
94
- a: absFloor,
95
- p: prettyUnit,
96
- u: isUndefined
97
- };
98
-
99
- var L = 'en'; // global locale
100
-
101
- var Ls = {}; // global loaded locale
102
-
103
- Ls[L] = en;
104
- var IS_DAYJS = '$isDayjsObject'; // eslint-disable-next-line no-use-before-define
105
-
106
- var isDayjs = function isDayjs(d) {
107
- return d instanceof Dayjs || !!(d && d[IS_DAYJS]);
108
- };
109
-
110
- var parseLocale = function parseLocale(preset, object, isLocal) {
111
- var l;
112
- if (!preset) return L;
113
-
114
- if (typeof preset === 'string') {
115
- var presetLower = preset.toLowerCase();
116
-
117
- if (Ls[presetLower]) {
118
- l = presetLower;
119
- }
120
-
121
- if (object) {
122
- Ls[presetLower] = object;
123
- l = presetLower;
124
- }
125
-
126
- var presetSplit = preset.split('-');
127
-
128
- if (!l && presetSplit.length > 1) {
129
- return parseLocale(presetSplit[0]);
130
- }
131
- } else {
132
- var name = preset.name;
133
- Ls[name] = preset;
134
- l = name;
135
- }
136
-
137
- if (!isLocal && l) L = l;
138
- return l || !isLocal && L;
139
- };
140
-
141
- var dayjs = function dayjs(date, c) {
142
- if (isDayjs(date)) {
143
- return date.clone();
144
- } // eslint-disable-next-line no-nested-ternary
145
-
146
-
147
- var cfg = typeof c === 'object' ? c : {};
148
- cfg.date = date;
149
- cfg.args = arguments; // eslint-disable-line prefer-rest-params
150
-
151
- return new Dayjs(cfg); // eslint-disable-line no-use-before-define
152
- };
153
-
154
- var wrapper = function wrapper(date, instance) {
155
- return dayjs(date, {
156
- locale: instance.$L,
157
- utc: instance.$u,
158
- x: instance.$x,
159
- $offset: instance.$offset // todo: refactor; do not use this.$offset in you code
160
-
161
- });
162
- };
163
-
164
- var Utils = U; // for plugin use
165
-
166
- Utils.l = parseLocale;
167
- Utils.i = isDayjs;
168
- Utils.w = wrapper;
169
-
170
- var parseDate = function parseDate(cfg) {
171
- var date = cfg.date,
172
- utc = cfg.utc;
173
- if (date === null) return new Date(NaN); // null is invalid
174
-
175
- if (Utils.u(date)) return new Date(); // today
176
-
177
- if (date instanceof Date) return new Date(date);
178
-
179
- if (typeof date === 'string' && !/Z$/i.test(date)) {
180
- var d = date.match(REGEX_PARSE);
181
-
182
- if (d) {
183
- var m = d[2] - 1 || 0;
184
- var ms = (d[7] || '0').substring(0, 3);
185
-
186
- if (utc) {
187
- return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms));
188
- }
189
-
190
- return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
191
- }
192
- }
193
-
194
- return new Date(date); // everything else
195
- };
196
-
197
- var Dayjs = /*#__PURE__*/function () {
198
- function Dayjs(cfg) {
199
- this.$L = parseLocale(cfg.locale, null, true);
200
- this.parse(cfg); // for plugin
201
-
202
- this.$x = this.$x || cfg.x || {};
203
- this[IS_DAYJS] = true;
204
- }
205
-
206
- var _proto = Dayjs.prototype;
207
-
208
- _proto.parse = function parse(cfg) {
209
- this.$d = parseDate(cfg);
210
- this.init();
211
- };
212
-
213
- _proto.init = function init() {
214
- var $d = this.$d;
215
- this.$y = $d.getFullYear();
216
- this.$M = $d.getMonth();
217
- this.$D = $d.getDate();
218
- this.$W = $d.getDay();
219
- this.$H = $d.getHours();
220
- this.$m = $d.getMinutes();
221
- this.$s = $d.getSeconds();
222
- this.$ms = $d.getMilliseconds();
223
- } // eslint-disable-next-line class-methods-use-this
224
- ;
225
-
226
- _proto.$utils = function $utils() {
227
- return Utils;
228
- };
229
-
230
- _proto.isValid = function isValid() {
231
- return !(this.$d.toString() === INVALID_DATE_STRING);
232
- };
233
-
234
- _proto.isSame = function isSame(that, units) {
235
- var other = dayjs(that);
236
- return this.startOf(units) <= other && other <= this.endOf(units);
237
- };
238
-
239
- _proto.isAfter = function isAfter(that, units) {
240
- return dayjs(that) < this.startOf(units);
241
- };
242
-
243
- _proto.isBefore = function isBefore(that, units) {
244
- return this.endOf(units) < dayjs(that);
245
- };
246
-
247
- _proto.$g = function $g(input, get, set) {
248
- if (Utils.u(input)) return this[get];
249
- return this.set(set, input);
250
- };
251
-
252
- _proto.unix = function unix() {
253
- return Math.floor(this.valueOf() / 1000);
254
- };
255
-
256
- _proto.valueOf = function valueOf() {
257
- // timezone(hour) * 60 * 60 * 1000 => ms
258
- return this.$d.getTime();
259
- };
260
-
261
- _proto.startOf = function startOf(units, _startOf) {
262
- var _this = this;
263
-
264
- // startOf -> endOf
265
- var isStartOf = !Utils.u(_startOf) ? _startOf : true;
266
- var unit = Utils.p(units);
267
-
268
- var instanceFactory = function instanceFactory(d, m) {
269
- var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this);
270
- return isStartOf ? ins : ins.endOf(D);
271
- };
272
-
273
- var instanceFactorySet = function instanceFactorySet(method, slice) {
274
- var argumentStart = [0, 0, 0, 0];
275
- var argumentEnd = [23, 59, 59, 999];
276
- return Utils.w(_this.toDate()[method].apply( // eslint-disable-line prefer-spread
277
- _this.toDate('s'), (isStartOf ? argumentStart : argumentEnd).slice(slice)), _this);
278
- };
279
-
280
- var $W = this.$W,
281
- $M = this.$M,
282
- $D = this.$D;
283
- var utcPad = "set" + (this.$u ? 'UTC' : '');
284
-
285
- switch (unit) {
286
- case Y:
287
- return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11);
288
-
289
- case M:
290
- return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1);
291
-
292
- case W:
293
- {
294
- var weekStart = this.$locale().weekStart || 0;
295
- var gap = ($W < weekStart ? $W + 7 : $W) - weekStart;
296
- return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M);
297
- }
298
-
299
- case D:
300
- case DATE:
301
- return instanceFactorySet(utcPad + "Hours", 0);
302
-
303
- case H:
304
- return instanceFactorySet(utcPad + "Minutes", 1);
305
-
306
- case MIN:
307
- return instanceFactorySet(utcPad + "Seconds", 2);
308
-
309
- case S:
310
- return instanceFactorySet(utcPad + "Milliseconds", 3);
311
-
312
- default:
313
- return this.clone();
314
- }
315
- };
316
-
317
- _proto.endOf = function endOf(arg) {
318
- return this.startOf(arg, false);
319
- };
320
-
321
- _proto.$set = function $set(units, _int) {
322
- var _C$D$C$DATE$C$M$C$Y$C;
323
-
324
- // private set
325
- var unit = Utils.p(units);
326
- var utcPad = "set" + (this.$u ? 'UTC' : '');
327
- var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit];
328
- var arg = unit === D ? this.$D + (_int - this.$W) : _int;
329
-
330
- if (unit === M || unit === Y) {
331
- // clone is for badMutable plugin
332
- var date = this.clone().set(DATE, 1);
333
- date.$d[name](arg);
334
- date.init();
335
- this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d;
336
- } else if (name) this.$d[name](arg);
337
-
338
- this.init();
339
- return this;
340
- };
341
-
342
- _proto.set = function set(string, _int2) {
343
- return this.clone().$set(string, _int2);
344
- };
345
-
346
- _proto.get = function get(unit) {
347
- return this[Utils.p(unit)]();
348
- };
349
-
350
- _proto.add = function add(number, units) {
351
- var _this2 = this,
352
- _C$MIN$C$H$C$S$unit;
353
-
354
- number = Number(number); // eslint-disable-line no-param-reassign
355
-
356
- var unit = Utils.p(units);
357
-
358
- var instanceFactorySet = function instanceFactorySet(n) {
359
- var d = dayjs(_this2);
360
- return Utils.w(d.date(d.date() + Math.round(n * number)), _this2);
361
- };
362
-
363
- if (unit === M) {
364
- return this.set(M, this.$M + number);
365
- }
366
-
367
- if (unit === Y) {
368
- return this.set(Y, this.$y + number);
369
- }
370
-
371
- if (unit === D) {
372
- return instanceFactorySet(1);
373
- }
374
-
375
- if (unit === W) {
376
- return instanceFactorySet(7);
377
- }
378
-
379
- var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[MIN] = MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[H] = MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[S] = MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1; // ms
380
-
381
- var nextTimeStamp = this.$d.getTime() + number * step;
382
- return Utils.w(nextTimeStamp, this);
383
- };
384
-
385
- _proto.subtract = function subtract(number, string) {
386
- return this.add(number * -1, string);
387
- };
388
-
389
- _proto.format = function format(formatStr) {
390
- var _this3 = this;
391
-
392
- var locale = this.$locale();
393
- if (!this.isValid()) return locale.invalidDate || INVALID_DATE_STRING;
394
- var str = formatStr || FORMAT_DEFAULT;
395
- var zoneStr = Utils.z(this);
396
- var $H = this.$H,
397
- $m = this.$m,
398
- $M = this.$M;
399
- var weekdays = locale.weekdays,
400
- months = locale.months,
401
- meridiem = locale.meridiem;
402
-
403
- var getShort = function getShort(arr, index, full, length) {
404
- return arr && (arr[index] || arr(_this3, str)) || full[index].slice(0, length);
405
- };
406
-
407
- var get$H = function get$H(num) {
408
- return Utils.s($H % 12 || 12, num, '0');
409
- };
410
-
411
- var meridiemFunc = meridiem || function (hour, minute, isLowercase) {
412
- var m = hour < 12 ? 'AM' : 'PM';
413
- return isLowercase ? m.toLowerCase() : m;
414
- };
415
-
416
- var matches = function matches(match) {
417
- switch (match) {
418
- case 'YY':
419
- return String(_this3.$y).slice(-2);
420
-
421
- case 'YYYY':
422
- return Utils.s(_this3.$y, 4, '0');
423
-
424
- case 'M':
425
- return $M + 1;
426
-
427
- case 'MM':
428
- return Utils.s($M + 1, 2, '0');
429
-
430
- case 'MMM':
431
- return getShort(locale.monthsShort, $M, months, 3);
432
-
433
- case 'MMMM':
434
- return getShort(months, $M);
435
-
436
- case 'D':
437
- return _this3.$D;
438
-
439
- case 'DD':
440
- return Utils.s(_this3.$D, 2, '0');
441
-
442
- case 'd':
443
- return String(_this3.$W);
444
-
445
- case 'dd':
446
- return getShort(locale.weekdaysMin, _this3.$W, weekdays, 2);
447
-
448
- case 'ddd':
449
- return getShort(locale.weekdaysShort, _this3.$W, weekdays, 3);
450
-
451
- case 'dddd':
452
- return weekdays[_this3.$W];
453
-
454
- case 'H':
455
- return String($H);
456
-
457
- case 'HH':
458
- return Utils.s($H, 2, '0');
459
-
460
- case 'h':
461
- return get$H(1);
462
-
463
- case 'hh':
464
- return get$H(2);
465
-
466
- case 'a':
467
- return meridiemFunc($H, $m, true);
468
-
469
- case 'A':
470
- return meridiemFunc($H, $m, false);
471
-
472
- case 'm':
473
- return String($m);
474
-
475
- case 'mm':
476
- return Utils.s($m, 2, '0');
477
-
478
- case 's':
479
- return String(_this3.$s);
480
-
481
- case 'ss':
482
- return Utils.s(_this3.$s, 2, '0');
483
-
484
- case 'SSS':
485
- return Utils.s(_this3.$ms, 3, '0');
486
-
487
- case 'Z':
488
- return zoneStr;
489
- }
490
-
491
- return null;
492
- };
493
-
494
- return str.replace(REGEX_FORMAT, function (match, $1) {
495
- return $1 || matches(match) || zoneStr.replace(':', '');
496
- }); // 'ZZ'
497
- };
498
-
499
- _proto.utcOffset = function utcOffset() {
500
- // Because a bug at FF24, we're rounding the timezone offset around 15 minutes
501
- // https://github.com/moment/moment/pull/1871
502
- return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
503
- };
504
-
505
- _proto.diff = function diff(input, units, _float) {
506
- var _this4 = this;
507
-
508
- var unit = Utils.p(units);
509
- var that = dayjs(input);
510
- var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE;
511
- var diff = this - that;
512
-
513
- var getMonth = function getMonth() {
514
- return Utils.m(_this4, that);
515
- };
516
-
517
- var result;
518
-
519
- switch (unit) {
520
- case Y:
521
- result = getMonth() / 12;
522
- break;
523
-
524
- case M:
525
- result = getMonth();
526
- break;
527
-
528
- case Q:
529
- result = getMonth() / 3;
530
- break;
531
-
532
- case W:
533
- result = (diff - zoneDelta) / MILLISECONDS_A_WEEK;
534
- break;
535
-
536
- case D:
537
- result = (diff - zoneDelta) / MILLISECONDS_A_DAY;
538
- break;
539
-
540
- case H:
541
- result = diff / MILLISECONDS_A_HOUR;
542
- break;
543
-
544
- case MIN:
545
- result = diff / MILLISECONDS_A_MINUTE;
546
- break;
547
-
548
- case S:
549
- result = diff / MILLISECONDS_A_SECOND;
550
- break;
551
-
552
- default:
553
- result = diff; // milliseconds
554
-
555
- break;
556
- }
557
-
558
- return _float ? result : Utils.a(result);
559
- };
560
-
561
- _proto.daysInMonth = function daysInMonth() {
562
- return this.endOf(M).$D;
563
- };
564
-
565
- _proto.$locale = function $locale() {
566
- // get locale object
567
- return Ls[this.$L];
568
- };
569
-
570
- _proto.locale = function locale(preset, object) {
571
- if (!preset) return this.$L;
572
- var that = this.clone();
573
- var nextLocaleName = parseLocale(preset, object, true);
574
- if (nextLocaleName) that.$L = nextLocaleName;
575
- return that;
576
- };
577
-
578
- _proto.clone = function clone() {
579
- return Utils.w(this.$d, this);
580
- };
581
-
582
- _proto.toDate = function toDate() {
583
- return new Date(this.valueOf());
584
- };
585
-
586
- _proto.toJSON = function toJSON() {
587
- return this.isValid() ? this.toISOString() : null;
588
- };
589
-
590
- _proto.toISOString = function toISOString() {
591
- // ie 8 return
592
- // new Dayjs(this.valueOf() + this.$d.getTimezoneOffset() * 60000)
593
- // .format('YYYY-MM-DDTHH:mm:ss.SSS[Z]')
594
- return this.$d.toISOString();
595
- };
596
-
597
- _proto.toString = function toString() {
598
- return this.$d.toUTCString();
599
- };
600
-
601
- return Dayjs;
602
- }();
603
-
604
- var proto = Dayjs.prototype;
605
- dayjs.prototype = proto;
606
- [['$ms', MS], ['$s', S], ['$m', MIN], ['$H', H], ['$W', D], ['$M', M], ['$y', Y], ['$D', DATE]].forEach(function (g) {
607
- proto[g[1]] = function (input) {
608
- return this.$g(input, g[0], g[1]);
609
- };
610
- });
611
-
612
- dayjs.extend = function (plugin, option) {
613
- if (!plugin.$i) {
614
- // install plugin only once
615
- plugin(option, Dayjs, dayjs);
616
- plugin.$i = true;
617
- }
618
-
619
- return dayjs;
620
- };
621
-
622
- dayjs.locale = parseLocale;
623
- dayjs.isDayjs = isDayjs;
624
-
625
- dayjs.unix = function (timestamp) {
626
- return dayjs(timestamp * 1e3);
627
- };
628
-
629
- dayjs.en = Ls[L];
630
- dayjs.Ls = Ls;
631
- dayjs.p = {};
632
-
633
- var typeToPos = {
634
- year: 0,
635
- month: 1,
636
- day: 2,
637
- hour: 3,
638
- minute: 4,
639
- second: 5
640
- }; // Cache time-zone lookups from Intl.DateTimeFormat,
641
- // as it is a *very* slow method.
642
-
643
- var dtfCache = {};
644
-
645
- var getDateTimeFormat = function getDateTimeFormat(timezone, options) {
646
- if (options === void 0) {
647
- options = {};
648
- }
649
-
650
- var timeZoneName = options.timeZoneName || 'short';
651
- var key = timezone + "|" + timeZoneName;
652
- var dtf = dtfCache[key];
653
-
654
- if (!dtf) {
655
- dtf = new Intl.DateTimeFormat('en-US', {
656
- hour12: false,
657
- timeZone: timezone,
658
- year: 'numeric',
659
- month: '2-digit',
660
- day: '2-digit',
661
- hour: '2-digit',
662
- minute: '2-digit',
663
- second: '2-digit',
664
- timeZoneName: timeZoneName
665
- });
666
- dtfCache[key] = dtf;
667
- }
668
-
669
- return dtf;
670
- };
671
-
672
- const timezone = (function (o, c, d) {
673
- var defaultTimezone;
674
-
675
- var makeFormatParts = function makeFormatParts(timestamp, timezone, options) {
676
- if (options === void 0) {
677
- options = {};
678
- }
679
-
680
- var date = new Date(timestamp);
681
- var dtf = getDateTimeFormat(timezone, options);
682
- return dtf.formatToParts(date);
683
- };
684
-
685
- var tzOffset = function tzOffset(timestamp, timezone) {
686
- var formatResult = makeFormatParts(timestamp, timezone);
687
- var filled = [];
688
-
689
- for (var i = 0; i < formatResult.length; i += 1) {
690
- var _formatResult$i = formatResult[i],
691
- type = _formatResult$i.type,
692
- value = _formatResult$i.value;
693
- var pos = typeToPos[type];
694
-
695
- if (pos >= 0) {
696
- filled[pos] = parseInt(value, 10);
697
- }
698
- }
699
-
700
- var hour = filled[3]; // Workaround for the same behavior in different node version
701
- // https://github.com/nodejs/node/issues/33027
702
-
703
- /* istanbul ignore next */
704
-
705
- var fixedHour = hour === 24 ? 0 : hour;
706
- var utcString = filled[0] + "-" + filled[1] + "-" + filled[2] + " " + fixedHour + ":" + filled[4] + ":" + filled[5] + ":000";
707
- var utcTs = d.utc(utcString).valueOf();
708
- var asTS = +timestamp;
709
- var over = asTS % 1000;
710
- asTS -= over;
711
- return (utcTs - asTS) / (60 * 1000);
712
- }; // find the right offset a given local time. The o input is our guess, which determines which
713
- // offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)
714
- // https://github.com/moment/luxon/blob/master/src/datetime.js#L76
715
-
716
-
717
- var fixOffset = function fixOffset(localTS, o0, tz) {
718
- // Our UTC time is just a guess because our offset is just a guess
719
- var utcGuess = localTS - o0 * 60 * 1000; // Test whether the zone matches the offset for this ts
720
-
721
- var o2 = tzOffset(utcGuess, tz); // If so, offset didn't change and we're done
722
-
723
- if (o0 === o2) {
724
- return [utcGuess, o0];
725
- } // If not, change the ts by the difference in the offset
726
-
727
-
728
- utcGuess -= (o2 - o0) * 60 * 1000; // If that gives us the local time we want, we're done
729
-
730
- var o3 = tzOffset(utcGuess, tz);
731
-
732
- if (o2 === o3) {
733
- return [utcGuess, o2];
734
- } // If it's different, we're in a hole time.
735
- // The offset has changed, but the we don't adjust the time
736
-
737
-
738
- return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];
739
- };
740
-
741
- var proto = c.prototype;
742
-
743
- proto.tz = function (timezone, keepLocalTime) {
744
- if (timezone === void 0) {
745
- timezone = defaultTimezone;
746
- }
747
-
748
- var oldOffset = this.utcOffset();
749
- var date = this.toDate();
750
- var target = date.toLocaleString('en-US', {
751
- timeZone: timezone
752
- });
753
- var diff = Math.round((date - new Date(target)) / 1000 / 60);
754
- var offset = -Math.round(date.getTimezoneOffset() / 15) * 15 - diff;
755
- var isUTC = !Number(offset);
756
- var ins;
757
-
758
- if (isUTC) {
759
- // if utcOffset is 0, turn it to UTC mode
760
- ins = this.utcOffset(0, keepLocalTime);
761
- } else {
762
- ins = d(target, {
763
- locale: this.$L
764
- }).$set(MS, this.$ms).utcOffset(offset, true);
765
-
766
- if (keepLocalTime) {
767
- var newOffset = ins.utcOffset();
768
- ins = ins.add(oldOffset - newOffset, MIN);
769
- }
770
- }
771
-
772
- ins.$x.$timezone = timezone;
773
- return ins;
774
- };
775
-
776
- proto.offsetName = function (type) {
777
- // type: short(default) / long
778
- var zone = this.$x.$timezone || d.tz.guess();
779
- var result = makeFormatParts(this.valueOf(), zone, {
780
- timeZoneName: type
781
- }).find(function (m) {
782
- return m.type.toLowerCase() === 'timezonename';
783
- });
784
- return result && result.value;
785
- };
786
-
787
- var oldStartOf = proto.startOf;
788
-
789
- proto.startOf = function (units, startOf) {
790
- if (!this.$x || !this.$x.$timezone) {
791
- return oldStartOf.call(this, units, startOf);
792
- }
793
-
794
- var withoutTz = d(this.format('YYYY-MM-DD HH:mm:ss:SSS'), {
795
- locale: this.$L
796
- });
797
- var startOfWithoutTz = oldStartOf.call(withoutTz, units, startOf);
798
- return startOfWithoutTz.tz(this.$x.$timezone, true);
799
- };
800
-
801
- d.tz = function (input, arg1, arg2) {
802
- var parseFormat = arg2 && arg1;
803
- var timezone = arg2 || arg1 || defaultTimezone;
804
- var previousOffset = tzOffset(+d(), timezone);
805
-
806
- if (typeof input !== 'string') {
807
- // timestamp number || js Date || Day.js
808
- return d(input).tz(timezone);
809
- }
810
-
811
- var localTs = d.utc(input, parseFormat).valueOf();
812
-
813
- var _fixOffset = fixOffset(localTs, previousOffset, timezone),
814
- targetTs = _fixOffset[0],
815
- targetOffset = _fixOffset[1];
816
-
817
- var ins = d(targetTs).utcOffset(targetOffset);
818
- ins.$x.$timezone = timezone;
819
- return ins;
820
- };
821
-
822
- d.tz.guess = function () {
823
- return Intl.DateTimeFormat().resolvedOptions().timeZone;
824
- };
825
-
826
- d.tz.setDefault = function (timezone) {
827
- defaultTimezone = timezone;
828
- };
829
- });
830
-
831
- var REGEX_VALID_OFFSET_FORMAT = /[+-]\d\d(?::?\d\d)?/g;
832
- var REGEX_OFFSET_HOURS_MINUTES_FORMAT = /([+-]|\d\d)/g;
833
-
834
- function offsetFromString$1(value) {
835
- if (value === void 0) {
836
- value = '';
837
- }
838
-
839
- var offset = value.match(REGEX_VALID_OFFSET_FORMAT);
840
-
841
- if (!offset) {
842
- return null;
843
- }
844
-
845
- var _ref = ("" + offset[0]).match(REGEX_OFFSET_HOURS_MINUTES_FORMAT) || ['-', 0, 0],
846
- indicator = _ref[0],
847
- hoursOffset = _ref[1],
848
- minutesOffset = _ref[2];
849
-
850
- var totalOffsetInMinutes = +hoursOffset * 60 + +minutesOffset;
851
-
852
- if (totalOffsetInMinutes === 0) {
853
- return 0;
854
- }
855
-
856
- return indicator === '+' ? totalOffsetInMinutes : -totalOffsetInMinutes;
857
- }
858
-
859
- const utc = (function (option, Dayjs, dayjs) {
860
- var proto = Dayjs.prototype;
861
-
862
- dayjs.utc = function (date) {
863
- var cfg = {
864
- date: date,
865
- utc: true,
866
- args: arguments
867
- }; // eslint-disable-line prefer-rest-params
868
-
869
- return new Dayjs(cfg); // eslint-disable-line no-use-before-define
870
- };
871
-
872
- proto.utc = function (keepLocalTime) {
873
- var ins = dayjs(this.toDate(), {
874
- locale: this.$L,
875
- utc: true
876
- });
877
-
878
- if (keepLocalTime) {
879
- return ins.add(this.utcOffset(), MIN);
880
- }
881
-
882
- return ins;
883
- };
884
-
885
- proto.local = function () {
886
- return dayjs(this.toDate(), {
887
- locale: this.$L,
888
- utc: false
889
- });
890
- };
891
-
892
- var oldParse = proto.parse;
893
-
894
- proto.parse = function (cfg) {
895
- if (cfg.utc) {
896
- this.$u = true;
897
- }
898
-
899
- if (!this.$utils().u(cfg.$offset)) {
900
- this.$offset = cfg.$offset;
901
- }
902
-
903
- oldParse.call(this, cfg);
904
- };
905
-
906
- var oldInit = proto.init;
907
-
908
- proto.init = function () {
909
- if (this.$u) {
910
- var $d = this.$d;
911
- this.$y = $d.getUTCFullYear();
912
- this.$M = $d.getUTCMonth();
913
- this.$D = $d.getUTCDate();
914
- this.$W = $d.getUTCDay();
915
- this.$H = $d.getUTCHours();
916
- this.$m = $d.getUTCMinutes();
917
- this.$s = $d.getUTCSeconds();
918
- this.$ms = $d.getUTCMilliseconds();
919
- } else {
920
- oldInit.call(this);
921
- }
922
- };
923
-
924
- var oldUtcOffset = proto.utcOffset;
925
-
926
- proto.utcOffset = function (input, keepLocalTime) {
927
- var _this$$utils = this.$utils(),
928
- u = _this$$utils.u;
929
-
930
- if (u(input)) {
931
- if (this.$u) {
932
- return 0;
933
- }
934
-
935
- if (!u(this.$offset)) {
936
- return this.$offset;
937
- }
938
-
939
- return oldUtcOffset.call(this);
940
- }
941
-
942
- if (typeof input === 'string') {
943
- input = offsetFromString$1(input);
944
-
945
- if (input === null) {
946
- return this;
947
- }
948
- }
949
-
950
- var offset = Math.abs(input) <= 16 ? input * 60 : input;
951
- var ins = this;
952
-
953
- if (keepLocalTime) {
954
- ins.$offset = offset;
955
- ins.$u = input === 0;
956
- return ins;
957
- }
958
-
959
- if (input !== 0) {
960
- var localTimezoneOffset = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
961
- ins = this.local().add(offset + localTimezoneOffset, MIN);
962
- ins.$offset = offset;
963
- ins.$x.$localOffset = localTimezoneOffset;
964
- } else {
965
- ins = this.utc();
966
- }
967
-
968
- return ins;
969
- };
970
-
971
- var oldFormat = proto.format;
972
- var UTC_FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ss[Z]';
973
-
974
- proto.format = function (formatStr) {
975
- var str = formatStr || (this.$u ? UTC_FORMAT_DEFAULT : '');
976
- return oldFormat.call(this, str);
977
- };
978
-
979
- proto.valueOf = function () {
980
- var addedOffset = !this.$utils().u(this.$offset) ? this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()) : 0;
981
- return this.$d.valueOf() - addedOffset * MILLISECONDS_A_MINUTE;
982
- };
983
-
984
- proto.isUTC = function () {
985
- return !!this.$u;
986
- };
987
-
988
- proto.toISOString = function () {
989
- return this.toDate().toISOString();
990
- };
991
-
992
- proto.toString = function () {
993
- return this.toDate().toUTCString();
994
- };
995
-
996
- var oldToDate = proto.toDate;
997
-
998
- proto.toDate = function (type) {
999
- if (type === 's' && this.$offset) {
1000
- return dayjs(this.format('YYYY-MM-DD HH:mm:ss:SSS')).toDate();
1001
- }
1002
-
1003
- return oldToDate.call(this);
1004
- };
1005
-
1006
- var oldDiff = proto.diff;
1007
-
1008
- proto.diff = function (input, units, _float) {
1009
- if (input && this.$u === input.$u) {
1010
- return oldDiff.call(this, input, units, _float);
1011
- }
1012
-
1013
- var localThis = this.local();
1014
- var localInput = dayjs(input).local();
1015
- return oldDiff.call(localThis, localInput, units, _float);
1016
- };
1017
- });
1018
-
1019
- // eslint-disable-next-line import/prefer-default-export
1020
- var t = function t(format) {
1021
- return format.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function (_, a, b) {
1022
- return a || b.slice(1);
1023
- });
1024
- };
1025
- var englishFormats = {
1026
- LTS: 'h:mm:ss A',
1027
- LT: 'h:mm A',
1028
- L: 'MM/DD/YYYY',
1029
- LL: 'MMMM D, YYYY',
1030
- LLL: 'MMMM D, YYYY h:mm A',
1031
- LLLL: 'dddd, MMMM D, YYYY h:mm A'
1032
- };
1033
- var u = function u(formatStr, formats) {
1034
- return formatStr.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function (_, a, b) {
1035
- var B = b && b.toUpperCase();
1036
- return a || formats[b] || englishFormats[b] || t(formats[B]);
1037
- });
1038
- };
1039
-
1040
- var formattingTokens = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g;
1041
- var match1 = /\d/; // 0 - 9
1042
-
1043
- var match2 = /\d\d/; // 00 - 99
1044
-
1045
- var match3 = /\d{3}/; // 000 - 999
1046
-
1047
- var match4 = /\d{4}/; // 0000 - 9999
1048
-
1049
- var match1to2 = /\d\d?/; // 0 - 99
1050
-
1051
- var matchSigned = /[+-]?\d+/; // -inf - inf
1052
-
1053
- var matchOffset = /[+-]\d\d:?(\d\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z
1054
-
1055
- var matchWord = /\d*[^-_:/,()\s\d]+/; // Word
1056
-
1057
- var locale$5 = {};
1058
-
1059
- var parseTwoDigitYear = function parseTwoDigitYear(input) {
1060
- input = +input;
1061
- return input + (input > 68 ? 1900 : 2000);
1062
- };
1063
-
1064
- function offsetFromString(string) {
1065
- if (!string) return 0;
1066
- if (string === 'Z') return 0;
1067
- var parts = string.match(/([+-]|\d\d)/g);
1068
- var minutes = +(parts[1] * 60) + (+parts[2] || 0);
1069
- return minutes === 0 ? 0 : parts[0] === '+' ? -minutes : minutes; // eslint-disable-line no-nested-ternary
1070
- }
1071
-
1072
- var addInput = function addInput(property) {
1073
- return function (input) {
1074
- this[property] = +input;
1075
- };
1076
- };
1077
-
1078
- var zoneExpressions = [matchOffset, function (input) {
1079
- var zone = this.zone || (this.zone = {});
1080
- zone.offset = offsetFromString(input);
1081
- }];
1082
-
1083
- var getLocalePart = function getLocalePart(name) {
1084
- var part = locale$5[name];
1085
- return part && (part.indexOf ? part : part.s.concat(part.f));
1086
- };
1087
-
1088
- var meridiemMatch = function meridiemMatch(input, isLowerCase) {
1089
- var isAfternoon;
1090
- var _locale = locale$5,
1091
- meridiem = _locale.meridiem;
1092
-
1093
- if (!meridiem) {
1094
- isAfternoon = input === (isLowerCase ? 'pm' : 'PM');
1095
- } else {
1096
- for (var i = 1; i <= 24; i += 1) {
1097
- // todo: fix input === meridiem(i, 0, isLowerCase)
1098
- if (input.indexOf(meridiem(i, 0, isLowerCase)) > -1) {
1099
- isAfternoon = i > 12;
1100
- break;
1101
- }
1102
- }
1103
- }
1104
-
1105
- return isAfternoon;
1106
- };
1107
-
1108
- var expressions = {
1109
- A: [matchWord, function (input) {
1110
- this.afternoon = meridiemMatch(input, false);
1111
- }],
1112
- a: [matchWord, function (input) {
1113
- this.afternoon = meridiemMatch(input, true);
1114
- }],
1115
- Q: [match1, function (input) {
1116
- this.month = (input - 1) * 3 + 1;
1117
- }],
1118
- S: [match1, function (input) {
1119
- this.milliseconds = +input * 100;
1120
- }],
1121
- SS: [match2, function (input) {
1122
- this.milliseconds = +input * 10;
1123
- }],
1124
- SSS: [match3, function (input) {
1125
- this.milliseconds = +input;
1126
- }],
1127
- s: [match1to2, addInput('seconds')],
1128
- ss: [match1to2, addInput('seconds')],
1129
- m: [match1to2, addInput('minutes')],
1130
- mm: [match1to2, addInput('minutes')],
1131
- H: [match1to2, addInput('hours')],
1132
- h: [match1to2, addInput('hours')],
1133
- HH: [match1to2, addInput('hours')],
1134
- hh: [match1to2, addInput('hours')],
1135
- D: [match1to2, addInput('day')],
1136
- DD: [match2, addInput('day')],
1137
- Do: [matchWord, function (input) {
1138
- var _locale2 = locale$5,
1139
- ordinal = _locale2.ordinal;
1140
-
1141
- var _input$match = input.match(/\d+/);
1142
-
1143
- this.day = _input$match[0];
1144
- if (!ordinal) return;
1145
-
1146
- for (var i = 1; i <= 31; i += 1) {
1147
- if (ordinal(i).replace(/\[|\]/g, '') === input) {
1148
- this.day = i;
1149
- }
1150
- }
1151
- }],
1152
- w: [match1to2, addInput('week')],
1153
- ww: [match2, addInput('week')],
1154
- M: [match1to2, addInput('month')],
1155
- MM: [match2, addInput('month')],
1156
- MMM: [matchWord, function (input) {
1157
- var months = getLocalePart('months');
1158
- var monthsShort = getLocalePart('monthsShort');
1159
- var matchIndex = (monthsShort || months.map(function (_) {
1160
- return _.slice(0, 3);
1161
- })).indexOf(input) + 1;
1162
-
1163
- if (matchIndex < 1) {
1164
- throw new Error();
1165
- }
1166
-
1167
- this.month = matchIndex % 12 || matchIndex;
1168
- }],
1169
- MMMM: [matchWord, function (input) {
1170
- var months = getLocalePart('months');
1171
- var matchIndex = months.indexOf(input) + 1;
1172
-
1173
- if (matchIndex < 1) {
1174
- throw new Error();
1175
- }
1176
-
1177
- this.month = matchIndex % 12 || matchIndex;
1178
- }],
1179
- Y: [matchSigned, addInput('year')],
1180
- YY: [match2, function (input) {
1181
- this.year = parseTwoDigitYear(input);
1182
- }],
1183
- YYYY: [match4, addInput('year')],
1184
- Z: zoneExpressions,
1185
- ZZ: zoneExpressions
1186
- };
1187
-
1188
- function correctHours(time) {
1189
- var afternoon = time.afternoon;
1190
-
1191
- if (afternoon !== undefined) {
1192
- var hours = time.hours;
1193
-
1194
- if (afternoon) {
1195
- if (hours < 12) {
1196
- time.hours += 12;
1197
- }
1198
- } else if (hours === 12) {
1199
- time.hours = 0;
1200
- }
1201
-
1202
- delete time.afternoon;
1203
- }
1204
- }
1205
-
1206
- function makeParser(format) {
1207
- format = u(format, locale$5 && locale$5.formats);
1208
- var array = format.match(formattingTokens);
1209
- var length = array.length;
1210
-
1211
- for (var i = 0; i < length; i += 1) {
1212
- var token = array[i];
1213
- var parseTo = expressions[token];
1214
- var regex = parseTo && parseTo[0];
1215
- var parser = parseTo && parseTo[1];
1216
-
1217
- if (parser) {
1218
- array[i] = {
1219
- regex: regex,
1220
- parser: parser
1221
- };
1222
- } else {
1223
- array[i] = token.replace(/^\[|\]$/g, '');
1224
- }
1225
- }
1226
-
1227
- return function (input) {
1228
- var time = {};
1229
-
1230
- for (var _i = 0, start = 0; _i < length; _i += 1) {
1231
- var _token = array[_i];
1232
-
1233
- if (typeof _token === 'string') {
1234
- start += _token.length;
1235
- } else {
1236
- var _regex = _token.regex,
1237
- _parser = _token.parser;
1238
- var part = input.slice(start);
1239
-
1240
- var match = _regex.exec(part);
1241
-
1242
- var value = match[0];
1243
-
1244
- _parser.call(time, value);
1245
-
1246
- input = input.replace(value, '');
1247
- }
1248
- }
1249
-
1250
- correctHours(time);
1251
- return time;
1252
- };
1253
- }
1254
-
1255
- var parseFormattedInput = function parseFormattedInput(input, format, utc, dayjs) {
1256
- try {
1257
- if (['x', 'X'].indexOf(format) > -1) return new Date((format === 'X' ? 1000 : 1) * input);
1258
- var parser = makeParser(format);
1259
-
1260
- var _parser2 = parser(input),
1261
- year = _parser2.year,
1262
- month = _parser2.month,
1263
- day = _parser2.day,
1264
- hours = _parser2.hours,
1265
- minutes = _parser2.minutes,
1266
- seconds = _parser2.seconds,
1267
- milliseconds = _parser2.milliseconds,
1268
- zone = _parser2.zone,
1269
- week = _parser2.week;
1270
-
1271
- var now = new Date();
1272
- var d = day || (!year && !month ? now.getDate() : 1);
1273
- var y = year || now.getFullYear();
1274
- var M = 0;
1275
-
1276
- if (!(year && !month)) {
1277
- M = month > 0 ? month - 1 : now.getMonth();
1278
- }
1279
-
1280
- var h = hours || 0;
1281
- var m = minutes || 0;
1282
- var s = seconds || 0;
1283
- var ms = milliseconds || 0;
1284
-
1285
- if (zone) {
1286
- return new Date(Date.UTC(y, M, d, h, m, s, ms + zone.offset * 60 * 1000));
1287
- }
1288
-
1289
- if (utc) {
1290
- return new Date(Date.UTC(y, M, d, h, m, s, ms));
1291
- }
1292
-
1293
- var newDate;
1294
- newDate = new Date(y, M, d, h, m, s, ms);
1295
-
1296
- if (week) {
1297
- newDate = dayjs(newDate).week(week).toDate();
1298
- }
1299
-
1300
- return newDate;
1301
- } catch (e) {
1302
- return new Date(''); // Invalid Date
1303
- }
1304
- };
1305
-
1306
- const customParseFormat = (function (o, C, d) {
1307
- d.p.customParseFormat = true;
1308
-
1309
- if (o && o.parseTwoDigitYear) {
1310
- parseTwoDigitYear = o.parseTwoDigitYear;
1311
- }
1312
-
1313
- var proto = C.prototype;
1314
- var oldParse = proto.parse;
1315
-
1316
- proto.parse = function (cfg) {
1317
- var date = cfg.date,
1318
- utc = cfg.utc,
1319
- args = cfg.args;
1320
- this.$u = utc;
1321
- var format = args[1];
1322
-
1323
- if (typeof format === 'string') {
1324
- var isStrictWithoutLocale = args[2] === true;
1325
- var isStrictWithLocale = args[3] === true;
1326
- var isStrict = isStrictWithoutLocale || isStrictWithLocale;
1327
- var pl = args[2];
1328
-
1329
- if (isStrictWithLocale) {
1330
- pl = args[2];
1331
- }
1332
-
1333
- locale$5 = this.$locale();
1334
-
1335
- if (!isStrictWithoutLocale && pl) {
1336
- locale$5 = d.Ls[pl];
1337
- }
1338
-
1339
- this.$d = parseFormattedInput(date, format, utc, d);
1340
- this.init();
1341
- if (pl && pl !== true) this.$L = this.locale(pl).$L; // use != to treat
1342
- // input number 1410715640579 and format string '1410715640579' equal
1343
- // eslint-disable-next-line eqeqeq
1344
-
1345
- if (isStrict && date != this.format(format)) {
1346
- this.$d = new Date('');
1347
- } // reset global locale to make parallel unit test
1348
-
1349
-
1350
- locale$5 = {};
1351
- } else if (format instanceof Array) {
1352
- var len = format.length;
1353
-
1354
- for (var i = 1; i <= len; i += 1) {
1355
- args[1] = format[i - 1];
1356
- var result = d.apply(this, args);
1357
-
1358
- if (result.isValid()) {
1359
- this.$d = result.$d;
1360
- this.$L = result.$L;
1361
- this.init();
1362
- break;
1363
- }
1364
-
1365
- if (i === len) this.$d = new Date('');
1366
- }
1367
- } else {
1368
- oldParse.call(this, cfg);
1369
- }
1370
- };
1371
- });
1372
-
1373
- // EN have direct import
1374
- const dayjsLocales = {
1375
- en: () => Promise.resolve(),
1376
- es: () => Promise.resolve().then(() => es),
1377
- pt: () => Promise.resolve().then(() => pt),
1378
- th: () => Promise.resolve().then(() => th),
1379
- ru: () => Promise.resolve().then(() => ru),
1380
- vi: () => Promise.resolve().then(() => vi),
1381
- };
1382
-
1383
- dayjs.extend(timezone);
1384
- dayjs.extend(utc);
1385
- dayjs.extend(customParseFormat);
1386
-
1387
- // Spanish [es]
1388
- var locale$4 = {
1389
- name: 'es',
1390
- monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
1391
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
1392
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
1393
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
1394
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
1395
- weekStart: 1,
1396
- formats: {
1397
- LT: 'H:mm',
1398
- LTS: 'H:mm:ss',
1399
- L: 'DD/MM/YYYY',
1400
- LL: 'D [de] MMMM [de] YYYY',
1401
- LLL: 'D [de] MMMM [de] YYYY H:mm',
1402
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
1403
- },
1404
- relativeTime: {
1405
- future: 'en %s',
1406
- past: 'hace %s',
1407
- s: 'unos segundos',
1408
- m: 'un minuto',
1409
- mm: '%d minutos',
1410
- h: 'una hora',
1411
- hh: '%d horas',
1412
- d: 'un día',
1413
- dd: '%d días',
1414
- M: 'un mes',
1415
- MM: '%d meses',
1416
- y: 'un año',
1417
- yy: '%d años'
1418
- },
1419
- ordinal: function ordinal(n) {
1420
- return n + "\xBA";
1421
- }
1422
- };
1423
- dayjs.locale(locale$4, null, true);
1424
-
1425
- const es = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1426
- __proto__: null,
1427
- default: locale$4
1428
- }, Symbol.toStringTag, { value: 'Module' }));
1429
-
1430
- // Portuguese [pt]
1431
- var locale$3 = {
1432
- name: 'pt',
1433
- weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split('_'),
1434
- weekdaysShort: 'dom_seg_ter_qua_qui_sex_sab'.split('_'),
1435
- weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sa'.split('_'),
1436
- months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
1437
- monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
1438
- ordinal: function ordinal(n) {
1439
- return n + "\xBA";
1440
- },
1441
- weekStart: 1,
1442
- yearStart: 4,
1443
- formats: {
1444
- LT: 'HH:mm',
1445
- LTS: 'HH:mm:ss',
1446
- L: 'DD/MM/YYYY',
1447
- LL: 'D [de] MMMM [de] YYYY',
1448
- LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
1449
- LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
1450
- },
1451
- relativeTime: {
1452
- future: 'em %s',
1453
- past: 'há %s',
1454
- s: 'alguns segundos',
1455
- m: 'um minuto',
1456
- mm: '%d minutos',
1457
- h: 'uma hora',
1458
- hh: '%d horas',
1459
- d: 'um dia',
1460
- dd: '%d dias',
1461
- M: 'um mês',
1462
- MM: '%d meses',
1463
- y: 'um ano',
1464
- yy: '%d anos'
1465
- }
1466
- };
1467
- dayjs.locale(locale$3, null, true);
1468
-
1469
- const pt = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1470
- __proto__: null,
1471
- default: locale$3
1472
- }, Symbol.toStringTag, { value: 'Module' }));
1473
-
1474
- // Thai [th]
1475
- var locale$2 = {
1476
- name: 'th',
1477
- weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
1478
- weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'),
1479
- weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
1480
- months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
1481
- monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
1482
- formats: {
1483
- LT: 'H:mm',
1484
- LTS: 'H:mm:ss',
1485
- L: 'DD/MM/YYYY',
1486
- LL: 'D MMMM YYYY',
1487
- LLL: 'D MMMM YYYY เวลา H:mm',
1488
- LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
1489
- },
1490
- relativeTime: {
1491
- future: 'อีก %s',
1492
- past: '%sที่แล้ว',
1493
- s: 'ไม่กี่วินาที',
1494
- m: '1 นาที',
1495
- mm: '%d นาที',
1496
- h: '1 ชั่วโมง',
1497
- hh: '%d ชั่วโมง',
1498
- d: '1 วัน',
1499
- dd: '%d วัน',
1500
- M: '1 เดือน',
1501
- MM: '%d เดือน',
1502
- y: '1 ปี',
1503
- yy: '%d ปี'
1504
- },
1505
- ordinal: function ordinal(n) {
1506
- return n + ".";
1507
- }
1508
- };
1509
- dayjs.locale(locale$2, null, true);
1510
-
1511
- const th = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1512
- __proto__: null,
1513
- default: locale$2
1514
- }, Symbol.toStringTag, { value: 'Module' }));
1515
-
1516
- // Russian [ru]
1517
- var monthFormat = 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_');
1518
- var monthStandalone = 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_');
1519
- var monthShortFormat = 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_');
1520
- var monthShortStandalone = 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_');
1521
- var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
1522
-
1523
- function plural(word, num) {
1524
- var forms = word.split('_');
1525
- return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]; // eslint-disable-line
1526
- }
1527
-
1528
- function relativeTimeWithPlural(number, withoutSuffix, key) {
1529
- var format = {
1530
- mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
1531
- hh: 'час_часа_часов',
1532
- dd: 'день_дня_дней',
1533
- MM: 'месяц_месяца_месяцев',
1534
- yy: 'год_года_лет'
1535
- };
1536
-
1537
- if (key === 'm') {
1538
- return withoutSuffix ? 'минута' : 'минуту';
1539
- }
1540
-
1541
- return number + " " + plural(format[key], +number);
1542
- }
1543
-
1544
- var months = function months(dayjsInstance, format) {
1545
- if (MONTHS_IN_FORMAT.test(format)) {
1546
- return monthFormat[dayjsInstance.month()];
1547
- }
1548
-
1549
- return monthStandalone[dayjsInstance.month()];
1550
- };
1551
-
1552
- months.s = monthStandalone;
1553
- months.f = monthFormat;
1554
-
1555
- var monthsShort = function monthsShort(dayjsInstance, format) {
1556
- if (MONTHS_IN_FORMAT.test(format)) {
1557
- return monthShortFormat[dayjsInstance.month()];
1558
- }
1559
-
1560
- return monthShortStandalone[dayjsInstance.month()];
1561
- };
1562
-
1563
- monthsShort.s = monthShortStandalone;
1564
- monthsShort.f = monthShortFormat;
1565
- var locale$1 = {
1566
- name: 'ru',
1567
- weekdays: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
1568
- weekdaysShort: 'вск_пнд_втр_срд_чтв_птн_сбт'.split('_'),
1569
- weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
1570
- months: months,
1571
- monthsShort: monthsShort,
1572
- weekStart: 1,
1573
- yearStart: 4,
1574
- formats: {
1575
- LT: 'H:mm',
1576
- LTS: 'H:mm:ss',
1577
- L: 'DD.MM.YYYY',
1578
- LL: 'D MMMM YYYY г.',
1579
- LLL: 'D MMMM YYYY г., H:mm',
1580
- LLLL: 'dddd, D MMMM YYYY г., H:mm'
1581
- },
1582
- relativeTime: {
1583
- future: 'через %s',
1584
- past: '%s назад',
1585
- s: 'несколько секунд',
1586
- m: relativeTimeWithPlural,
1587
- mm: relativeTimeWithPlural,
1588
- h: 'час',
1589
- hh: relativeTimeWithPlural,
1590
- d: 'день',
1591
- dd: relativeTimeWithPlural,
1592
- M: 'месяц',
1593
- MM: relativeTimeWithPlural,
1594
- y: 'год',
1595
- yy: relativeTimeWithPlural
1596
- },
1597
- ordinal: function ordinal(n) {
1598
- return n;
1599
- },
1600
- meridiem: function meridiem(hour) {
1601
- if (hour < 4) {
1602
- return 'ночи';
1603
- } else if (hour < 12) {
1604
- return 'утра';
1605
- } else if (hour < 17) {
1606
- return 'дня';
1607
- }
1608
-
1609
- return 'вечера';
1610
- }
1611
- };
1612
- dayjs.locale(locale$1, null, true);
1613
-
1614
- const ru = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1615
- __proto__: null,
1616
- default: locale$1
1617
- }, Symbol.toStringTag, { value: 'Module' }));
1618
-
1619
- // Vietnamese [vi]
1620
- var locale = {
1621
- name: 'vi',
1622
- weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
1623
- months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
1624
- weekStart: 1,
1625
- weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
1626
- monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
1627
- weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
1628
- ordinal: function ordinal(n) {
1629
- return n;
1630
- },
1631
- formats: {
1632
- LT: 'HH:mm',
1633
- LTS: 'HH:mm:ss',
1634
- L: 'DD/MM/YYYY',
1635
- LL: 'D MMMM [năm] YYYY',
1636
- LLL: 'D MMMM [năm] YYYY HH:mm',
1637
- LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
1638
- l: 'DD/M/YYYY',
1639
- ll: 'D MMM YYYY',
1640
- lll: 'D MMM YYYY HH:mm',
1641
- llll: 'ddd, D MMM YYYY HH:mm'
1642
- },
1643
- relativeTime: {
1644
- future: '%s tới',
1645
- past: '%s trước',
1646
- s: 'vài giây',
1647
- m: 'một phút',
1648
- mm: '%d phút',
1649
- h: 'một giờ',
1650
- hh: '%d giờ',
1651
- d: 'một ngày',
1652
- dd: '%d ngày',
1653
- M: 'một tháng',
1654
- MM: '%d tháng',
1655
- y: 'một năm',
1656
- yy: '%d năm'
1657
- }
1658
- };
1659
- dayjs.locale(locale, null, true);
1660
-
1661
- const vi = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1662
- __proto__: null,
1663
- default: locale
1664
- }, Symbol.toStringTag, { value: 'Module' }));
1665
-
1666
- exports.dayjs = dayjs;
1667
- exports.dayjsLocales = dayjsLocales;
1668
- //# sourceMappingURL=dayjs-RhyhJ68u.cjs.map