-
Notifications
You must be signed in to change notification settings - Fork 1
/
moment-with-locales.min.js
9509 lines (9289 loc) · 384 KB
/
moment-with-locales.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
! function(a, b) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define(b) : a.moment = b()
}(this, function() {
"use strict";
function a() {
return le.apply(null, arguments)
}
// This is done to register the method called with moment()
// without creating circular dependencies.
function b(a) {
le = a
}
function c(a) {
return a instanceof Array || "[object Array]" === Object.prototype.toString.call(a)
}
function d(a) {
// IE8 will treat undefined and null as object if it wasn't for
// input != null
return null != a && "[object Object]" === Object.prototype.toString.call(a)
}
function e(a) {
var b;
for (b in a)
// even if its not own property I'd still call it non-empty
return !1;
return !0
}
function f(a) {
return "number" == typeof a || "[object Number]" === Object.prototype.toString.call(a)
}
function g(a) {
return a instanceof Date || "[object Date]" === Object.prototype.toString.call(a)
}
function h(a, b) {
var c, d = [];
for (c = 0; c < a.length; ++c) d.push(b(a[c], c));
return d
}
function i(a, b) {
return Object.prototype.hasOwnProperty.call(a, b)
}
function j(a, b) {
for (var c in b) i(b, c) && (a[c] = b[c]);
return i(b, "toString") && (a.toString = b.toString), i(b, "valueOf") && (a.valueOf = b.valueOf), a
}
function k(a, b, c, d) {
return rb(a, b, c, d, !0).utc()
}
function l() {
// We need to deep clone this object.
return {
empty: !1,
unusedTokens: [],
unusedInput: [],
overflow: -2,
charsLeftOver: 0,
nullInput: !1,
invalidMonth: null,
invalidFormat: !1,
userInvalidated: !1,
iso: !1,
parsedDateParts: [],
meridiem: null
}
}
function m(a) {
return null == a._pf && (a._pf = l()), a._pf
}
function n(a) {
if (null == a._isValid) {
var b = m(a),
c = ne.call(b.parsedDateParts, function(a) {
return null != a
}),
d = !isNaN(a._d.getTime()) && b.overflow < 0 && !b.empty && !b.invalidMonth && !b.invalidWeekday && !b.nullInput && !b.invalidFormat && !b.userInvalidated && (!b.meridiem || b.meridiem && c);
if (a._strict && (d = d && 0 === b.charsLeftOver && 0 === b.unusedTokens.length && void 0 === b.bigHour), null != Object.isFrozen && Object.isFrozen(a)) return d;
a._isValid = d
}
return a._isValid
}
function o(a) {
var b = k(NaN);
return null != a ? j(m(b), a) : m(b).userInvalidated = !0, b
}
function p(a) {
return void 0 === a
}
function q(a, b) {
var c, d, e;
if (p(b._isAMomentObject) || (a._isAMomentObject = b._isAMomentObject), p(b._i) || (a._i = b._i), p(b._f) || (a._f = b._f), p(b._l) || (a._l = b._l), p(b._strict) || (a._strict = b._strict), p(b._tzm) || (a._tzm = b._tzm), p(b._isUTC) || (a._isUTC = b._isUTC), p(b._offset) || (a._offset = b._offset), p(b._pf) || (a._pf = m(b)), p(b._locale) || (a._locale = b._locale), oe.length > 0)
for (c in oe) d = oe[c], e = b[d], p(e) || (a[d] = e);
return a
}
// Moment prototype object
function r(b) {
q(this, b), this._d = new Date(null != b._d ? b._d.getTime() : NaN), this.isValid() || (this._d = new Date(NaN)),
// Prevent infinite loop in case updateOffset creates new moment
// objects.
pe === !1 && (pe = !0, a.updateOffset(this), pe = !1)
}
function s(a) {
return a instanceof r || null != a && null != a._isAMomentObject
}
function t(a) {
return a < 0 ? Math.ceil(a) || 0 : Math.floor(a)
}
function u(a) {
var b = +a,
c = 0;
return 0 !== b && isFinite(b) && (c = t(b)), c
}
// compare two arrays, return the number of differences
function v(a, b, c) {
var d, e = Math.min(a.length, b.length),
f = Math.abs(a.length - b.length),
g = 0;
for (d = 0; d < e; d++)(c && a[d] !== b[d] || !c && u(a[d]) !== u(b[d])) && g++;
return g + f
}
function w(b) {
a.suppressDeprecationWarnings === !1 && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + b)
}
function x(b, c) {
var d = !0;
return j(function() {
if (null != a.deprecationHandler && a.deprecationHandler(null, b), d) {
for (var e, f = [], g = 0; g < arguments.length; g++) {
if (e = "", "object" == typeof arguments[g]) {
e += "\n[" + g + "] ";
for (var h in arguments[0]) e += h + ": " + arguments[0][h] + ", ";
e = e.slice(0, -2)
} else e = arguments[g];
f.push(e)
}
w(b + "\nArguments: " + Array.prototype.slice.call(f).join("") + "\n" + (new Error).stack), d = !1
}
return c.apply(this, arguments)
}, c)
}
function y(b, c) {
null != a.deprecationHandler && a.deprecationHandler(b, c), qe[b] || (w(c), qe[b] = !0)
}
function z(a) {
return a instanceof Function || "[object Function]" === Object.prototype.toString.call(a)
}
function A(a) {
var b, c;
for (c in a) b = a[c], z(b) ? this[c] = b : this["_" + c] = b;
this._config = a,
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _ordinalParseLenient.
this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source)
}
function B(a, b) {
var c, e = j({}, a);
for (c in b) i(b, c) && (d(a[c]) && d(b[c]) ? (e[c] = {}, j(e[c], a[c]), j(e[c], b[c])) : null != b[c] ? e[c] = b[c] : delete e[c]);
for (c in a) i(a, c) && !i(b, c) && d(a[c]) && (
// make sure changes to properties don't modify parent config
e[c] = j({}, e[c]));
return e
}
function C(a) {
null != a && this.set(a)
}
function D(a, b, c) {
var d = this._calendar[a] || this._calendar.sameElse;
return z(d) ? d.call(b, c) : d
}
function E(a) {
var b = this._longDateFormat[a],
c = this._longDateFormat[a.toUpperCase()];
return b || !c ? b : (this._longDateFormat[a] = c.replace(/MMMM|MM|DD|dddd/g, function(a) {
return a.slice(1)
}), this._longDateFormat[a])
}
function F() {
return this._invalidDate
}
function G(a) {
return this._ordinal.replace("%d", a)
}
function H(a, b, c, d) {
var e = this._relativeTime[c];
return z(e) ? e(a, b, c, d) : e.replace(/%d/i, a)
}
function I(a, b) {
var c = this._relativeTime[a > 0 ? "future" : "past"];
return z(c) ? c(b) : c.replace(/%s/i, b)
}
function J(a, b) {
var c = a.toLowerCase();
Ae[c] = Ae[c + "s"] = Ae[b] = a
}
function K(a) {
return "string" == typeof a ? Ae[a] || Ae[a.toLowerCase()] : void 0
}
function L(a) {
var b, c, d = {};
for (c in a) i(a, c) && (b = K(c), b && (d[b] = a[c]));
return d
}
function M(a, b) {
Be[a] = b
}
function N(a) {
var b = [];
for (var c in a) b.push({
unit: c,
priority: Be[c]
});
return b.sort(function(a, b) {
return a.priority - b.priority
}), b
}
function O(b, c) {
return function(d) {
return null != d ? (Q(this, b, d), a.updateOffset(this, c), this) : P(this, b)
}
}
function P(a, b) {
return a.isValid() ? a._d["get" + (a._isUTC ? "UTC" : "") + b]() : NaN
}
function Q(a, b, c) {
a.isValid() && a._d["set" + (a._isUTC ? "UTC" : "") + b](c)
}
// MOMENTS
function R(a) {
return a = K(a), z(this[a]) ? this[a]() : this
}
function S(a, b) {
if ("object" == typeof a) {
a = L(a);
for (var c = N(a), d = 0; d < c.length; d++) this[c[d].unit](a[c[d].unit])
} else if (a = K(a), z(this[a])) return this[a](b);
return this
}
function T(a, b, c) {
var d = "" + Math.abs(a),
e = b - d.length,
f = a >= 0;
return (f ? c ? "+" : "" : "-") + Math.pow(10, Math.max(0, e)).toString().substr(1) + d
}
// token: 'M'
// padded: ['MM', 2]
// ordinal: 'Mo'
// callback: function () { this.month() + 1 }
function U(a, b, c, d) {
var e = d;
"string" == typeof d && (e = function() {
return this[d]()
}), a && (Fe[a] = e), b && (Fe[b[0]] = function() {
return T(e.apply(this, arguments), b[1], b[2])
}), c && (Fe[c] = function() {
return this.localeData().ordinal(e.apply(this, arguments), a)
})
}
function V(a) {
return a.match(/\[[\s\S]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "")
}
function W(a) {
var b, c, d = a.match(Ce);
for (b = 0, c = d.length; b < c; b++) Fe[d[b]] ? d[b] = Fe[d[b]] : d[b] = V(d[b]);
return function(b) {
var e, f = "";
for (e = 0; e < c; e++) f += d[e] instanceof Function ? d[e].call(b, a) : d[e];
return f
}
}
// format date using native date object
function X(a, b) {
return a.isValid() ? (b = Y(b, a.localeData()), Ee[b] = Ee[b] || W(b), Ee[b](a)) : a.localeData().invalidDate()
}
function Y(a, b) {
function c(a) {
return b.longDateFormat(a) || a
}
var d = 5;
for (De.lastIndex = 0; d >= 0 && De.test(a);) a = a.replace(De, c), De.lastIndex = 0, d -= 1;
return a
}
function Z(a, b, c) {
Xe[a] = z(b) ? b : function(a, d) {
return a && c ? c : b
}
}
function $(a, b) {
return i(Xe, a) ? Xe[a](b._strict, b._locale) : new RegExp(_(a))
}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function _(a) {
return aa(a.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(a, b, c, d, e) {
return b || c || d || e
}))
}
function aa(a) {
return a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
}
function ba(a, b) {
var c, d = b;
for ("string" == typeof a && (a = [a]), f(b) && (d = function(a, c) {
c[b] = u(a)
}), c = 0; c < a.length; c++) Ye[a[c]] = d
}
function ca(a, b) {
ba(a, function(a, c, d, e) {
d._w = d._w || {}, b(a, d._w, d, e)
})
}
function da(a, b, c) {
null != b && i(Ye, a) && Ye[a](b, c._a, c, a)
}
function ea(a, b) {
return new Date(Date.UTC(a, b + 1, 0)).getUTCDate()
}
function fa(a, b) {
return a ? c(this._months) ? this._months[a.month()] : this._months[(this._months.isFormat || hf).test(b) ? "format" : "standalone"][a.month()] : this._months
}
function ga(a, b) {
return a ? c(this._monthsShort) ? this._monthsShort[a.month()] : this._monthsShort[hf.test(b) ? "format" : "standalone"][a.month()] : this._monthsShort
}
function ha(a, b, c) {
var d, e, f, g = a.toLocaleLowerCase();
if (!this._monthsParse)
for (
// this is not used
this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], d = 0; d < 12; ++d) f = k([2e3, d]), this._shortMonthsParse[d] = this.monthsShort(f, "").toLocaleLowerCase(), this._longMonthsParse[d] = this.months(f, "").toLocaleLowerCase();
return c ? "MMM" === b ? (e = gf.call(this._shortMonthsParse, g), e !== -1 ? e : null) : (e = gf.call(this._longMonthsParse, g), e !== -1 ? e : null) : "MMM" === b ? (e = gf.call(this._shortMonthsParse, g), e !== -1 ? e : (e = gf.call(this._longMonthsParse, g), e !== -1 ? e : null)) : (e = gf.call(this._longMonthsParse, g), e !== -1 ? e : (e = gf.call(this._shortMonthsParse, g), e !== -1 ? e : null))
}
function ia(a, b, c) {
var d, e, f;
if (this._monthsParseExact) return ha.call(this, a, b, c);
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), d = 0; d < 12; d++) {
// test the regex
if (
// make the regex if we don't have it already
e = k([2e3, d]), c && !this._longMonthsParse[d] && (this._longMonthsParse[d] = new RegExp("^" + this.months(e, "").replace(".", "") + "$", "i"), this._shortMonthsParse[d] = new RegExp("^" + this.monthsShort(e, "").replace(".", "") + "$", "i")), c || this._monthsParse[d] || (f = "^" + this.months(e, "") + "|^" + this.monthsShort(e, ""), this._monthsParse[d] = new RegExp(f.replace(".", ""), "i")), c && "MMMM" === b && this._longMonthsParse[d].test(a)) return d;
if (c && "MMM" === b && this._shortMonthsParse[d].test(a)) return d;
if (!c && this._monthsParse[d].test(a)) return d
}
}
// MOMENTS
function ja(a, b) {
var c;
if (!a.isValid())
// No op
return a;
if ("string" == typeof b)
if (/^\d+$/.test(b)) b = u(b);
else
// TODO: Another silent failure?
if (b = a.localeData().monthsParse(b), !f(b)) return a;
return c = Math.min(a.date(), ea(a.year(), b)), a._d["set" + (a._isUTC ? "UTC" : "") + "Month"](b, c), a
}
function ka(b) {
return null != b ? (ja(this, b), a.updateOffset(this, !0), this) : P(this, "Month")
}
function la() {
return ea(this.year(), this.month())
}
function ma(a) {
return this._monthsParseExact ? (i(this, "_monthsRegex") || oa.call(this), a ? this._monthsShortStrictRegex : this._monthsShortRegex) : (i(this, "_monthsShortRegex") || (this._monthsShortRegex = lf), this._monthsShortStrictRegex && a ? this._monthsShortStrictRegex : this._monthsShortRegex)
}
function na(a) {
return this._monthsParseExact ? (i(this, "_monthsRegex") || oa.call(this), a ? this._monthsStrictRegex : this._monthsRegex) : (i(this, "_monthsRegex") || (this._monthsRegex = mf), this._monthsStrictRegex && a ? this._monthsStrictRegex : this._monthsRegex)
}
function oa() {
function a(a, b) {
return b.length - a.length
}
var b, c, d = [],
e = [],
f = [];
for (b = 0; b < 12; b++)
// make the regex if we don't have it already
c = k([2e3, b]), d.push(this.monthsShort(c, "")), e.push(this.months(c, "")), f.push(this.months(c, "")), f.push(this.monthsShort(c, ""));
for (
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
d.sort(a), e.sort(a), f.sort(a), b = 0; b < 12; b++) d[b] = aa(d[b]), e[b] = aa(e[b]);
for (b = 0; b < 24; b++) f[b] = aa(f[b]);
this._monthsRegex = new RegExp("^(" + f.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + d.join("|") + ")", "i")
}
// HELPERS
function pa(a) {
return qa(a) ? 366 : 365
}
function qa(a) {
return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0
}
function ra() {
return qa(this.year())
}
function sa(a, b, c, d, e, f, g) {
//can't just apply() to create a date:
//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
var h = new Date(a, b, c, d, e, f, g);
//the date constructor remaps years 0-99 to 1900-1999
return a < 100 && a >= 0 && isFinite(h.getFullYear()) && h.setFullYear(a), h
}
function ta(a) {
var b = new Date(Date.UTC.apply(null, arguments));
//the Date.UTC function remaps years 0-99 to 1900-1999
return a < 100 && a >= 0 && isFinite(b.getUTCFullYear()) && b.setUTCFullYear(a), b
}
// start-of-first-week - start-of-year
function ua(a, b, c) {
var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
d = 7 + b - c,
// first-week day local weekday -- which local weekday is fwd
e = (7 + ta(a, 0, d).getUTCDay() - b) % 7;
return -e + d - 1
}
//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function va(a, b, c, d, e) {
var f, g, h = (7 + c - d) % 7,
i = ua(a, d, e),
j = 1 + 7 * (b - 1) + h + i;
return j <= 0 ? (f = a - 1, g = pa(f) + j) : j > pa(a) ? (f = a + 1, g = j - pa(a)) : (f = a, g = j), {
year: f,
dayOfYear: g
}
}
function wa(a, b, c) {
var d, e, f = ua(a.year(), b, c),
g = Math.floor((a.dayOfYear() - f - 1) / 7) + 1;
return g < 1 ? (e = a.year() - 1, d = g + xa(e, b, c)) : g > xa(a.year(), b, c) ? (d = g - xa(a.year(), b, c), e = a.year() + 1) : (e = a.year(), d = g), {
week: d,
year: e
}
}
function xa(a, b, c) {
var d = ua(a, b, c),
e = ua(a + 1, b, c);
return (pa(a) - d + e) / 7
}
// HELPERS
// LOCALES
function ya(a) {
return wa(a, this._week.dow, this._week.doy).week
}
function za() {
return this._week.dow
}
function Aa() {
return this._week.doy
}
// MOMENTS
function Ba(a) {
var b = this.localeData().week(this);
return null == a ? b : this.add(7 * (a - b), "d")
}
function Ca(a) {
var b = wa(this, 1, 4).week;
return null == a ? b : this.add(7 * (a - b), "d")
}
// HELPERS
function Da(a, b) {
return "string" != typeof a ? a : isNaN(a) ? (a = b.weekdaysParse(a), "number" == typeof a ? a : null) : parseInt(a, 10)
}
function Ea(a, b) {
return "string" == typeof a ? b.weekdaysParse(a) % 7 || 7 : isNaN(a) ? null : a
}
function Fa(a, b) {
return a ? c(this._weekdays) ? this._weekdays[a.day()] : this._weekdays[this._weekdays.isFormat.test(b) ? "format" : "standalone"][a.day()] : this._weekdays
}
function Ga(a) {
return a ? this._weekdaysShort[a.day()] : this._weekdaysShort
}
function Ha(a) {
return a ? this._weekdaysMin[a.day()] : this._weekdaysMin
}
function Ia(a, b, c) {
var d, e, f, g = a.toLocaleLowerCase();
if (!this._weekdaysParse)
for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], d = 0; d < 7; ++d) f = k([2e3, 1]).day(d), this._minWeekdaysParse[d] = this.weekdaysMin(f, "").toLocaleLowerCase(), this._shortWeekdaysParse[d] = this.weekdaysShort(f, "").toLocaleLowerCase(), this._weekdaysParse[d] = this.weekdays(f, "").toLocaleLowerCase();
return c ? "dddd" === b ? (e = gf.call(this._weekdaysParse, g), e !== -1 ? e : null) : "ddd" === b ? (e = gf.call(this._shortWeekdaysParse, g), e !== -1 ? e : null) : (e = gf.call(this._minWeekdaysParse, g), e !== -1 ? e : null) : "dddd" === b ? (e = gf.call(this._weekdaysParse, g), e !== -1 ? e : (e = gf.call(this._shortWeekdaysParse, g), e !== -1 ? e : (e = gf.call(this._minWeekdaysParse, g), e !== -1 ? e : null))) : "ddd" === b ? (e = gf.call(this._shortWeekdaysParse, g), e !== -1 ? e : (e = gf.call(this._weekdaysParse, g), e !== -1 ? e : (e = gf.call(this._minWeekdaysParse, g), e !== -1 ? e : null))) : (e = gf.call(this._minWeekdaysParse, g), e !== -1 ? e : (e = gf.call(this._weekdaysParse, g), e !== -1 ? e : (e = gf.call(this._shortWeekdaysParse, g), e !== -1 ? e : null)))
}
function Ja(a, b, c) {
var d, e, f;
if (this._weekdaysParseExact) return Ia.call(this, a, b, c);
for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), d = 0; d < 7; d++) {
// test the regex
if (
// make the regex if we don't have it already
e = k([2e3, 1]).day(d), c && !this._fullWeekdaysParse[d] && (this._fullWeekdaysParse[d] = new RegExp("^" + this.weekdays(e, "").replace(".", ".?") + "$", "i"), this._shortWeekdaysParse[d] = new RegExp("^" + this.weekdaysShort(e, "").replace(".", ".?") + "$", "i"), this._minWeekdaysParse[d] = new RegExp("^" + this.weekdaysMin(e, "").replace(".", ".?") + "$", "i")), this._weekdaysParse[d] || (f = "^" + this.weekdays(e, "") + "|^" + this.weekdaysShort(e, "") + "|^" + this.weekdaysMin(e, ""), this._weekdaysParse[d] = new RegExp(f.replace(".", ""), "i")), c && "dddd" === b && this._fullWeekdaysParse[d].test(a)) return d;
if (c && "ddd" === b && this._shortWeekdaysParse[d].test(a)) return d;
if (c && "dd" === b && this._minWeekdaysParse[d].test(a)) return d;
if (!c && this._weekdaysParse[d].test(a)) return d
}
}
// MOMENTS
function Ka(a) {
if (!this.isValid()) return null != a ? this : NaN;
var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
return null != a ? (a = Da(a, this.localeData()), this.add(a - b, "d")) : b
}
function La(a) {
if (!this.isValid()) return null != a ? this : NaN;
var b = (this.day() + 7 - this.localeData()._week.dow) % 7;
return null == a ? b : this.add(a - b, "d")
}
function Ma(a) {
if (!this.isValid()) return null != a ? this : NaN;
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
if (null != a) {
var b = Ea(a, this.localeData());
return this.day(this.day() % 7 ? b : b - 7)
}
return this.day() || 7
}
function Na(a) {
return this._weekdaysParseExact ? (i(this, "_weekdaysRegex") || Qa.call(this), a ? this._weekdaysStrictRegex : this._weekdaysRegex) : (i(this, "_weekdaysRegex") || (this._weekdaysRegex = sf), this._weekdaysStrictRegex && a ? this._weekdaysStrictRegex : this._weekdaysRegex)
}
function Oa(a) {
return this._weekdaysParseExact ? (i(this, "_weekdaysRegex") || Qa.call(this), a ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (i(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = tf), this._weekdaysShortStrictRegex && a ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex)
}
function Pa(a) {
return this._weekdaysParseExact ? (i(this, "_weekdaysRegex") || Qa.call(this), a ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (i(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = uf), this._weekdaysMinStrictRegex && a ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex)
}
function Qa() {
function a(a, b) {
return b.length - a.length
}
var b, c, d, e, f, g = [],
h = [],
i = [],
j = [];
for (b = 0; b < 7; b++)
// make the regex if we don't have it already
c = k([2e3, 1]).day(b), d = this.weekdaysMin(c, ""), e = this.weekdaysShort(c, ""), f = this.weekdays(c, ""), g.push(d), h.push(e), i.push(f), j.push(d), j.push(e), j.push(f);
for (
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
g.sort(a), h.sort(a), i.sort(a), j.sort(a), b = 0; b < 7; b++) h[b] = aa(h[b]), i[b] = aa(i[b]), j[b] = aa(j[b]);
this._weekdaysRegex = new RegExp("^(" + j.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + i.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + h.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + g.join("|") + ")", "i")
}
// FORMATTING
function Ra() {
return this.hours() % 12 || 12
}
function Sa() {
return this.hours() || 24
}
function Ta(a, b) {
U(a, 0, 0, function() {
return this.localeData().meridiem(this.hours(), this.minutes(), b)
})
}
// PARSING
function Ua(a, b) {
return b._meridiemParse
}
// LOCALES
function Va(a) {
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return "p" === (a + "").toLowerCase().charAt(0)
}
function Wa(a, b, c) {
return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM"
}
function Xa(a) {
return a ? a.toLowerCase().replace("_", "-") : a
}
// pick the locale from the array
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function Ya(a) {
for (var b, c, d, e, f = 0; f < a.length;) {
for (e = Xa(a[f]).split("-"), b = e.length, c = Xa(a[f + 1]), c = c ? c.split("-") : null; b > 0;) {
if (d = Za(e.slice(0, b).join("-"))) return d;
if (c && c.length >= b && v(e, c, !0) >= b - 1)
//the next array item is better than a shallower substring of this one
break;
b--
}
f++
}
return null
}
function Za(a) {
var b = null;
// TODO: Find a better way to register and load all the locales in Node
if (!zf[a] && "undefined" != typeof module && module && module.exports) try {
b = vf._abbr, require("./locale/" + a),
// because defineLocale currently also sets the global locale, we
// want to undo that for lazy loaded locales
$a(b)
} catch (a) {}
return zf[a]
}
// This function will load locale and then set the global locale. If
// no arguments are passed in, it will simply return the current global
// locale key.
function $a(a, b) {
var c;
// moment.duration._locale = moment._locale = data;
return a && (c = p(b) ? bb(a) : _a(a, b), c && (vf = c)), vf._abbr
}
function _a(a, b) {
if (null !== b) {
var c = yf;
if (b.abbr = a, null != zf[a]) y("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), c = zf[a]._config;
else if (null != b.parentLocale) {
if (null == zf[b.parentLocale]) return Af[b.parentLocale] || (Af[b.parentLocale] = []), Af[b.parentLocale].push({
name: a,
config: b
}), null;
c = zf[b.parentLocale]._config
}
// backwards compat for now: also set the locale
// make sure we set the locale AFTER all child locales have been
// created, so we won't end up with the child locale set.
return zf[a] = new C(B(c, b)), Af[a] && Af[a].forEach(function(a) {
_a(a.name, a.config)
}), $a(a), zf[a]
}
// useful for testing
return delete zf[a], null
}
function ab(a, b) {
if (null != b) {
var c, d = yf;
// MERGE
null != zf[a] && (d = zf[a]._config), b = B(d, b), c = new C(b), c.parentLocale = zf[a], zf[a] = c,
// backwards compat for now: also set the locale
$a(a)
} else
// pass null for config to unupdate, useful for tests
null != zf[a] && (null != zf[a].parentLocale ? zf[a] = zf[a].parentLocale : null != zf[a] && delete zf[a]);
return zf[a]
}
// returns locale data
function bb(a) {
var b;
if (a && a._locale && a._locale._abbr && (a = a._locale._abbr), !a) return vf;
if (!c(a)) {
if (
//short-circuit everything else
b = Za(a)) return b;
a = [a]
}
return Ya(a)
}
function cb() {
return te(zf)
}
function db(a) {
var b, c = a._a;
return c && m(a).overflow === -2 && (b = c[$e] < 0 || c[$e] > 11 ? $e : c[_e] < 1 || c[_e] > ea(c[Ze], c[$e]) ? _e : c[af] < 0 || c[af] > 24 || 24 === c[af] && (0 !== c[bf] || 0 !== c[cf] || 0 !== c[df]) ? af : c[bf] < 0 || c[bf] > 59 ? bf : c[cf] < 0 || c[cf] > 59 ? cf : c[df] < 0 || c[df] > 999 ? df : -1, m(a)._overflowDayOfYear && (b < Ze || b > _e) && (b = _e), m(a)._overflowWeeks && b === -1 && (b = ef), m(a)._overflowWeekday && b === -1 && (b = ff), m(a).overflow = b), a
}
// date from iso format
function eb(a) {
var b, c, d, e, f, g, h = a._i,
i = Bf.exec(h) || Cf.exec(h);
if (i) {
for (m(a).iso = !0, b = 0, c = Ef.length; b < c; b++)
if (Ef[b][1].exec(i[1])) {
e = Ef[b][0], d = Ef[b][2] !== !1;
break
}
if (null == e) return void(a._isValid = !1);
if (i[3]) {
for (b = 0, c = Ff.length; b < c; b++)
if (Ff[b][1].exec(i[3])) {
// match[2] should be 'T' or space
f = (i[2] || " ") + Ff[b][0];
break
}
if (null == f) return void(a._isValid = !1)
}
if (!d && null != f) return void(a._isValid = !1);
if (i[4]) {
if (!Df.exec(i[4])) return void(a._isValid = !1);
g = "Z"
}
a._f = e + (f || "") + (g || ""), kb(a)
} else a._isValid = !1
}
// date from iso format or fallback
function fb(b) {
var c = Gf.exec(b._i);
return null !== c ? void(b._d = new Date(+c[1])) : (eb(b), void(b._isValid === !1 && (delete b._isValid, a.createFromInputFallback(b))))
}
// Pick the first defined of two or three arguments.
function gb(a, b, c) {
return null != a ? a : null != b ? b : c
}
function hb(b) {
// hooks is actually the exported moment object
var c = new Date(a.now());
return b._useUTC ? [c.getUTCFullYear(), c.getUTCMonth(), c.getUTCDate()] : [c.getFullYear(), c.getMonth(), c.getDate()]
}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function ib(a) {
var b, c, d, e, f = [];
if (!a._d) {
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for (d = hb(a),
//compute day of the year from weeks and weekdays
a._w && null == a._a[_e] && null == a._a[$e] && jb(a),
//if the day of the year is set, figure out what it is
a._dayOfYear && (e = gb(a._a[Ze], d[Ze]), a._dayOfYear > pa(e) && (m(a)._overflowDayOfYear = !0), c = ta(e, 0, a._dayOfYear), a._a[$e] = c.getUTCMonth(), a._a[_e] = c.getUTCDate()), b = 0; b < 3 && null == a._a[b]; ++b) a._a[b] = f[b] = d[b];
// Zero out whatever was not defaulted, including time
for (; b < 7; b++) a._a[b] = f[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b];
// Check for 24:00:00.000
24 === a._a[af] && 0 === a._a[bf] && 0 === a._a[cf] && 0 === a._a[df] && (a._nextDay = !0, a._a[af] = 0), a._d = (a._useUTC ? ta : sa).apply(null, f),
// Apply timezone offset from input. The actual utcOffset can be changed
// with parseZone.
null != a._tzm && a._d.setUTCMinutes(a._d.getUTCMinutes() - a._tzm), a._nextDay && (a._a[af] = 24)
}
}
function jb(a) {
var b, c, d, e, f, g, h, i;
if (b = a._w, null != b.GG || null != b.W || null != b.E) f = 1, g = 4,
// TODO: We need to take the current isoWeekYear, but that depends on
// how we interpret now (local, utc, fixed offset). So create
// a now version of current config (take local/utc/offset flags, and
// create now).
c = gb(b.GG, a._a[Ze], wa(sb(), 1, 4).year), d = gb(b.W, 1), e = gb(b.E, 1), (e < 1 || e > 7) && (i = !0);
else {
f = a._locale._week.dow, g = a._locale._week.doy;
var j = wa(sb(), f, g);
c = gb(b.gg, a._a[Ze], j.year),
// Default to current week.
d = gb(b.w, j.week), null != b.d ? (
// weekday -- low day numbers are considered next week
e = b.d, (e < 0 || e > 6) && (i = !0)) : null != b.e ? (
// local weekday -- counting starts from begining of week
e = b.e + f, (b.e < 0 || b.e > 6) && (i = !0)) :
// default to begining of week
e = f
}
d < 1 || d > xa(c, f, g) ? m(a)._overflowWeeks = !0 : null != i ? m(a)._overflowWeekday = !0 : (h = va(c, d, e, f, g), a._a[Ze] = h.year, a._dayOfYear = h.dayOfYear)
}
// date from string and format string
function kb(b) {
// TODO: Move this to another part of the creation flow to prevent circular deps
if (b._f === a.ISO_8601) return void eb(b);
b._a = [], m(b).empty = !0;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var c, d, e, f, g, h = "" + b._i,
i = h.length,
j = 0;
for (e = Y(b._f, b._locale).match(Ce) || [], c = 0; c < e.length; c++) f = e[c], d = (h.match($(f, b)) || [])[0],
// console.log('token', token, 'parsedInput', parsedInput,
// 'regex', getParseRegexForToken(token, config));
d && (g = h.substr(0, h.indexOf(d)), g.length > 0 && m(b).unusedInput.push(g), h = h.slice(h.indexOf(d) + d.length), j += d.length),
// don't parse if it's not a known token
Fe[f] ? (d ? m(b).empty = !1 : m(b).unusedTokens.push(f), da(f, d, b)) : b._strict && !d && m(b).unusedTokens.push(f);
// add remaining unparsed input length to the string
m(b).charsLeftOver = i - j, h.length > 0 && m(b).unusedInput.push(h),
// clear _12h flag if hour is <= 12
b._a[af] <= 12 && m(b).bigHour === !0 && b._a[af] > 0 && (m(b).bigHour = void 0), m(b).parsedDateParts = b._a.slice(0), m(b).meridiem = b._meridiem,
// handle meridiem
b._a[af] = lb(b._locale, b._a[af], b._meridiem), ib(b), db(b)
}
function lb(a, b, c) {
var d;
// Fallback
return null == c ? b : null != a.meridiemHour ? a.meridiemHour(b, c) : null != a.isPM ? (d = a.isPM(c), d && b < 12 && (b += 12), d || 12 !== b || (b = 0), b) : b
}
// date from string and array of format strings
function mb(a) {
var b, c, d, e, f;
if (0 === a._f.length) return m(a).invalidFormat = !0, void(a._d = new Date(NaN));
for (e = 0; e < a._f.length; e++) f = 0, b = q({}, a), null != a._useUTC && (b._useUTC = a._useUTC), b._f = a._f[e], kb(b), n(b) && (
// if there is any input that was not parsed add a penalty for that format
f += m(b).charsLeftOver,
//or tokens
f += 10 * m(b).unusedTokens.length, m(b).score = f, (null == d || f < d) && (d = f, c = b));
j(a, c || b)
}
function nb(a) {
if (!a._d) {
var b = L(a._i);
a._a = h([b.year, b.month, b.day || b.date, b.hour, b.minute, b.second, b.millisecond], function(a) {
return a && parseInt(a, 10)
}), ib(a)
}
}
function ob(a) {
var b = new r(db(pb(a)));
// Adding is smart enough around DST
return b._nextDay && (b.add(1, "d"), b._nextDay = void 0), b
}
function pb(a) {
var b = a._i,
d = a._f;
return a._locale = a._locale || bb(a._l), null === b || void 0 === d && "" === b ? o({
nullInput: !0
}) : ("string" == typeof b && (a._i = b = a._locale.preparse(b)), s(b) ? new r(db(b)) : (g(b) ? a._d = b : c(d) ? mb(a) : d ? kb(a) : qb(a), n(a) || (a._d = null), a))
}
function qb(b) {
var d = b._i;
void 0 === d ? b._d = new Date(a.now()) : g(d) ? b._d = new Date(d.valueOf()) : "string" == typeof d ? fb(b) : c(d) ? (b._a = h(d.slice(0), function(a) {
return parseInt(a, 10)
}), ib(b)) : "object" == typeof d ? nb(b) : f(d) ?
// from milliseconds
b._d = new Date(d) : a.createFromInputFallback(b)
}
function rb(a, b, f, g, h) {
var i = {};
// object construction must be done this way.
// https://github.com/moment/moment/issues/1423
return f !== !0 && f !== !1 || (g = f, f = void 0), (d(a) && e(a) || c(a) && 0 === a.length) && (a = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = h, i._l = f, i._i = a, i._f = b, i._strict = g, ob(i)
}
function sb(a, b, c, d) {
return rb(a, b, c, d, !1)
}
// Pick a moment m from moments so that m[fn](other) is true for all
// other. This relies on the function fn to be transitive.
//
// moments should either be an array of moment objects or an array, whose
// first element is an array of moment objects.
function tb(a, b) {
var d, e;
if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return sb();
for (d = b[0], e = 1; e < b.length; ++e) b[e].isValid() && !b[e][a](d) || (d = b[e]);
return d
}
// TODO: Use [].sort instead?
function ub() {
var a = [].slice.call(arguments, 0);
return tb("isBefore", a)
}
function vb() {
var a = [].slice.call(arguments, 0);
return tb("isAfter", a)
}
function wb(a) {
var b = L(a),
c = b.year || 0,
d = b.quarter || 0,
e = b.month || 0,
f = b.week || 0,
g = b.day || 0,
h = b.hour || 0,
i = b.minute || 0,
j = b.second || 0,
k = b.millisecond || 0;
// representation for dateAddRemove
this._milliseconds = +k + 1e3 * j + // 1000
6e4 * i + // 1000 * 60
1e3 * h * 60 * 60, //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days = +g + 7 * f,
// It is impossible translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months = +e + 3 * d + 12 * c, this._data = {}, this._locale = bb(), this._bubble()
}
function xb(a) {
return a instanceof wb
}
function yb(a) {
return a < 0 ? Math.round(-1 * a) * -1 : Math.round(a)
}
// FORMATTING
function zb(a, b) {
U(a, 0, 0, function() {
var a = this.utcOffset(),
c = "+";
return a < 0 && (a = -a, c = "-"), c + T(~~(a / 60), 2) + b + T(~~a % 60, 2)
})
}
function Ab(a, b) {
var c = (b || "").match(a);
if (null === c) return null;
var d = c[c.length - 1] || [],
e = (d + "").match(Kf) || ["-", 0, 0],
f = +(60 * e[1]) + u(e[2]);
return 0 === f ? 0 : "+" === e[0] ? f : -f
}
// Return a moment from input, that is local/utc/zone equivalent to model.
function Bb(b, c) {
var d, e;
// Use low-level api, because this fn is low-level api.
return c._isUTC ? (d = c.clone(), e = (s(b) || g(b) ? b.valueOf() : sb(b).valueOf()) - d.valueOf(), d._d.setTime(d._d.valueOf() + e), a.updateOffset(d, !1), d) : sb(b).local()
}
function Cb(a) {