@uzum-tech/ui 1.13.2 → 1.14.0
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.
- package/dist/index.js +1559 -1409
- package/dist/index.prod.js +3 -3
- package/es/_mixins/use-css-vars-class.js +5 -3
- package/es/_mixins/use-rtl.js +5 -2
- package/es/_mixins/use-style.js +4 -2
- package/es/_mixins/use-theme.js +4 -2
- package/es/config-provider/src/ConfigProvider.d.ts +3 -0
- package/es/config-provider/src/ConfigProvider.js +4 -1
- package/es/config-provider/src/internal-interface.d.ts +1 -0
- package/es/data-table/src/DataTable.d.ts +2 -0
- package/es/data-table/src/DataTable.js +71 -4
- package/es/data-table/src/TableParts/Body.js +6 -2
- package/es/data-table/src/TableParts/Header.js +17 -5
- package/es/data-table/src/interface.d.ts +13 -0
- package/es/data-table/src/interface.js +1 -1
- package/es/data-table/src/use-resizable.d.ts +1 -0
- package/es/data-table/src/use-resizable.js +2 -1
- package/es/data-table/src/use-sorter.d.ts +1 -0
- package/es/data-table/src/use-sorter.js +2 -1
- package/es/data-table/src/use-table-data.d.ts +3 -2
- package/es/data-table/src/use-table-data.js +5 -1
- package/es/data-table/src/use-table-storage.d.ts +4 -0
- package/es/data-table/src/use-table-storage.js +43 -0
- package/es/data-table/src/utils.js +39 -5
- package/es/locales/date/enUS.js +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_mixins/use-css-vars-class.js +5 -3
- package/lib/_mixins/use-rtl.js +4 -1
- package/lib/_mixins/use-style.js +4 -2
- package/lib/_mixins/use-theme.js +4 -2
- package/lib/config-provider/src/ConfigProvider.d.ts +3 -0
- package/lib/config-provider/src/ConfigProvider.js +4 -1
- package/lib/config-provider/src/internal-interface.d.ts +1 -0
- package/lib/data-table/src/DataTable.d.ts +2 -0
- package/lib/data-table/src/DataTable.js +70 -3
- package/lib/data-table/src/TableParts/Body.js +6 -2
- package/lib/data-table/src/TableParts/Header.js +16 -4
- package/lib/data-table/src/interface.d.ts +13 -0
- package/lib/data-table/src/interface.js +1 -1
- package/lib/data-table/src/use-resizable.d.ts +1 -0
- package/lib/data-table/src/use-resizable.js +2 -1
- package/lib/data-table/src/use-sorter.d.ts +1 -0
- package/lib/data-table/src/use-sorter.js +2 -1
- package/lib/data-table/src/use-table-data.d.ts +3 -2
- package/lib/data-table/src/use-table-data.js +5 -1
- package/lib/data-table/src/use-table-storage.d.ts +4 -0
- package/lib/data-table/src/use-table-storage.js +48 -0
- package/lib/data-table/src/utils.js +39 -5
- package/lib/locales/date/enUS.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +18 -1
package/dist/index.js
CHANGED
|
@@ -15182,14 +15182,16 @@
|
|
|
15182
15182
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
15183
15183
|
},
|
|
15184
15184
|
anchorMetaName: cssrAnchorMetaName,
|
|
15185
|
-
ssr: ssrAdapter
|
|
15185
|
+
ssr: ssrAdapter,
|
|
15186
|
+
parent: UConfigProvider?.styleMountTarget
|
|
15186
15187
|
});
|
|
15187
15188
|
if (!UConfigProvider?.preflightStyleDisabled) {
|
|
15188
15189
|
globalStyle.mount({
|
|
15189
15190
|
id: "u-global",
|
|
15190
15191
|
head: true,
|
|
15191
15192
|
anchorMetaName: cssrAnchorMetaName,
|
|
15192
|
-
ssr: ssrAdapter
|
|
15193
|
+
ssr: ssrAdapter,
|
|
15194
|
+
parent: UConfigProvider?.styleMountTarget
|
|
15193
15195
|
});
|
|
15194
15196
|
}
|
|
15195
15197
|
};
|
|
@@ -15275,7 +15277,7 @@
|
|
|
15275
15277
|
return UConfigProvider ? UConfigProvider.mergedClsPrefixRef : vue.shallowRef(defaultClsPrefix);
|
|
15276
15278
|
}
|
|
15277
15279
|
|
|
15278
|
-
const enUS$
|
|
15280
|
+
const enUS$2 = {
|
|
15279
15281
|
name: "en-US",
|
|
15280
15282
|
global: {
|
|
15281
15283
|
undo: "Undo",
|
|
@@ -15575,487 +15577,650 @@
|
|
|
15575
15577
|
}
|
|
15576
15578
|
};
|
|
15577
15579
|
|
|
15578
|
-
var
|
|
15579
|
-
lessThanXSeconds: {
|
|
15580
|
-
one: 'less than a second',
|
|
15581
|
-
other: 'less than {{count}} seconds'
|
|
15582
|
-
},
|
|
15583
|
-
xSeconds: {
|
|
15584
|
-
one: '1 second',
|
|
15585
|
-
other: '{{count}} seconds'
|
|
15586
|
-
},
|
|
15587
|
-
halfAMinute: 'half a minute',
|
|
15588
|
-
lessThanXMinutes: {
|
|
15589
|
-
one: 'less than a minute',
|
|
15590
|
-
other: 'less than {{count}} minutes'
|
|
15591
|
-
},
|
|
15592
|
-
xMinutes: {
|
|
15593
|
-
one: '1 minute',
|
|
15594
|
-
other: '{{count}} minutes'
|
|
15595
|
-
},
|
|
15596
|
-
aboutXHours: {
|
|
15597
|
-
one: 'about 1 hour',
|
|
15598
|
-
other: 'about {{count}} hours'
|
|
15599
|
-
},
|
|
15600
|
-
xHours: {
|
|
15601
|
-
one: '1 hour',
|
|
15602
|
-
other: '{{count}} hours'
|
|
15603
|
-
},
|
|
15604
|
-
xDays: {
|
|
15605
|
-
one: '1 day',
|
|
15606
|
-
other: '{{count}} days'
|
|
15607
|
-
},
|
|
15608
|
-
aboutXWeeks: {
|
|
15609
|
-
one: 'about 1 week',
|
|
15610
|
-
other: 'about {{count}} weeks'
|
|
15611
|
-
},
|
|
15612
|
-
xWeeks: {
|
|
15613
|
-
one: '1 week',
|
|
15614
|
-
other: '{{count}} weeks'
|
|
15615
|
-
},
|
|
15616
|
-
aboutXMonths: {
|
|
15617
|
-
one: 'about 1 month',
|
|
15618
|
-
other: 'about {{count}} months'
|
|
15619
|
-
},
|
|
15620
|
-
xMonths: {
|
|
15621
|
-
one: '1 month',
|
|
15622
|
-
other: '{{count}} months'
|
|
15623
|
-
},
|
|
15624
|
-
aboutXYears: {
|
|
15625
|
-
one: 'about 1 year',
|
|
15626
|
-
other: 'about {{count}} years'
|
|
15627
|
-
},
|
|
15628
|
-
xYears: {
|
|
15629
|
-
one: '1 year',
|
|
15630
|
-
other: '{{count}} years'
|
|
15631
|
-
},
|
|
15632
|
-
overXYears: {
|
|
15633
|
-
one: 'over 1 year',
|
|
15634
|
-
other: 'over {{count}} years'
|
|
15635
|
-
},
|
|
15636
|
-
almostXYears: {
|
|
15637
|
-
one: 'almost 1 year',
|
|
15638
|
-
other: 'almost {{count}} years'
|
|
15639
|
-
}
|
|
15640
|
-
};
|
|
15641
|
-
var formatDistance$2 = function (token, count, options) {
|
|
15642
|
-
var result;
|
|
15643
|
-
var tokenValue = formatDistanceLocale$1[token];
|
|
15644
|
-
if (typeof tokenValue === 'string') {
|
|
15645
|
-
result = tokenValue;
|
|
15646
|
-
} else if (count === 1) {
|
|
15647
|
-
result = tokenValue.one;
|
|
15648
|
-
} else {
|
|
15649
|
-
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
15650
|
-
}
|
|
15651
|
-
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
15652
|
-
if (options.comparison && options.comparison > 0) {
|
|
15653
|
-
return 'in ' + result;
|
|
15654
|
-
} else {
|
|
15655
|
-
return result + ' ago';
|
|
15656
|
-
}
|
|
15657
|
-
}
|
|
15658
|
-
return result;
|
|
15659
|
-
};
|
|
15580
|
+
var enUS$1 = {exports: {}};
|
|
15660
15581
|
|
|
15661
|
-
|
|
15662
|
-
return function () {
|
|
15663
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15664
|
-
// TODO: Remove String()
|
|
15665
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
15666
|
-
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
15667
|
-
return format;
|
|
15668
|
-
};
|
|
15669
|
-
}
|
|
15582
|
+
var formatDistance$2 = {exports: {}};
|
|
15670
15583
|
|
|
15671
|
-
|
|
15672
|
-
full: 'EEEE, MMMM do, y',
|
|
15673
|
-
long: 'MMMM do, y',
|
|
15674
|
-
medium: 'MMM d, y',
|
|
15675
|
-
short: 'MM/dd/yyyy'
|
|
15676
|
-
};
|
|
15677
|
-
var timeFormats$1 = {
|
|
15678
|
-
full: 'h:mm:ss a zzzz',
|
|
15679
|
-
long: 'h:mm:ss a z',
|
|
15680
|
-
medium: 'h:mm:ss a',
|
|
15681
|
-
short: 'h:mm a'
|
|
15682
|
-
};
|
|
15683
|
-
var dateTimeFormats$1 = {
|
|
15684
|
-
full: "{{date}} 'at' {{time}}",
|
|
15685
|
-
long: "{{date}} 'at' {{time}}",
|
|
15686
|
-
medium: '{{date}}, {{time}}',
|
|
15687
|
-
short: '{{date}}, {{time}}'
|
|
15688
|
-
};
|
|
15689
|
-
var formatLong$2 = {
|
|
15690
|
-
date: buildFormatLongFn$1({
|
|
15691
|
-
formats: dateFormats$1,
|
|
15692
|
-
defaultWidth: 'full'
|
|
15693
|
-
}),
|
|
15694
|
-
time: buildFormatLongFn$1({
|
|
15695
|
-
formats: timeFormats$1,
|
|
15696
|
-
defaultWidth: 'full'
|
|
15697
|
-
}),
|
|
15698
|
-
dateTime: buildFormatLongFn$1({
|
|
15699
|
-
formats: dateTimeFormats$1,
|
|
15700
|
-
defaultWidth: 'full'
|
|
15701
|
-
})
|
|
15702
|
-
};
|
|
15584
|
+
(function (module, exports) {
|
|
15703
15585
|
|
|
15704
|
-
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
|
-
|
|
15711
|
-
|
|
15712
|
-
|
|
15713
|
-
|
|
15714
|
-
|
|
15586
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15587
|
+
value: true
|
|
15588
|
+
});
|
|
15589
|
+
exports.default = void 0;
|
|
15590
|
+
var formatDistanceLocale = {
|
|
15591
|
+
lessThanXSeconds: {
|
|
15592
|
+
one: 'less than a second',
|
|
15593
|
+
other: 'less than {{count}} seconds'
|
|
15594
|
+
},
|
|
15595
|
+
xSeconds: {
|
|
15596
|
+
one: '1 second',
|
|
15597
|
+
other: '{{count}} seconds'
|
|
15598
|
+
},
|
|
15599
|
+
halfAMinute: 'half a minute',
|
|
15600
|
+
lessThanXMinutes: {
|
|
15601
|
+
one: 'less than a minute',
|
|
15602
|
+
other: 'less than {{count}} minutes'
|
|
15603
|
+
},
|
|
15604
|
+
xMinutes: {
|
|
15605
|
+
one: '1 minute',
|
|
15606
|
+
other: '{{count}} minutes'
|
|
15607
|
+
},
|
|
15608
|
+
aboutXHours: {
|
|
15609
|
+
one: 'about 1 hour',
|
|
15610
|
+
other: 'about {{count}} hours'
|
|
15611
|
+
},
|
|
15612
|
+
xHours: {
|
|
15613
|
+
one: '1 hour',
|
|
15614
|
+
other: '{{count}} hours'
|
|
15615
|
+
},
|
|
15616
|
+
xDays: {
|
|
15617
|
+
one: '1 day',
|
|
15618
|
+
other: '{{count}} days'
|
|
15619
|
+
},
|
|
15620
|
+
aboutXWeeks: {
|
|
15621
|
+
one: 'about 1 week',
|
|
15622
|
+
other: 'about {{count}} weeks'
|
|
15623
|
+
},
|
|
15624
|
+
xWeeks: {
|
|
15625
|
+
one: '1 week',
|
|
15626
|
+
other: '{{count}} weeks'
|
|
15627
|
+
},
|
|
15628
|
+
aboutXMonths: {
|
|
15629
|
+
one: 'about 1 month',
|
|
15630
|
+
other: 'about {{count}} months'
|
|
15631
|
+
},
|
|
15632
|
+
xMonths: {
|
|
15633
|
+
one: '1 month',
|
|
15634
|
+
other: '{{count}} months'
|
|
15635
|
+
},
|
|
15636
|
+
aboutXYears: {
|
|
15637
|
+
one: 'about 1 year',
|
|
15638
|
+
other: 'about {{count}} years'
|
|
15639
|
+
},
|
|
15640
|
+
xYears: {
|
|
15641
|
+
one: '1 year',
|
|
15642
|
+
other: '{{count}} years'
|
|
15643
|
+
},
|
|
15644
|
+
overXYears: {
|
|
15645
|
+
one: 'over 1 year',
|
|
15646
|
+
other: 'over {{count}} years'
|
|
15647
|
+
},
|
|
15648
|
+
almostXYears: {
|
|
15649
|
+
one: 'almost 1 year',
|
|
15650
|
+
other: 'almost {{count}} years'
|
|
15651
|
+
}
|
|
15652
|
+
};
|
|
15653
|
+
var formatDistance = function (token, count, options) {
|
|
15654
|
+
var result;
|
|
15655
|
+
var tokenValue = formatDistanceLocale[token];
|
|
15656
|
+
if (typeof tokenValue === 'string') {
|
|
15657
|
+
result = tokenValue;
|
|
15658
|
+
} else if (count === 1) {
|
|
15659
|
+
result = tokenValue.one;
|
|
15660
|
+
} else {
|
|
15661
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
15662
|
+
}
|
|
15663
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
15664
|
+
if (options.comparison && options.comparison > 0) {
|
|
15665
|
+
return 'in ' + result;
|
|
15666
|
+
} else {
|
|
15667
|
+
return result + ' ago';
|
|
15668
|
+
}
|
|
15669
|
+
}
|
|
15670
|
+
return result;
|
|
15671
|
+
};
|
|
15672
|
+
var _default = formatDistance;
|
|
15673
|
+
exports.default = _default;
|
|
15674
|
+
module.exports = exports.default;
|
|
15675
|
+
} (formatDistance$2, formatDistance$2.exports));
|
|
15715
15676
|
|
|
15716
|
-
|
|
15717
|
-
return function (dirtyIndex, dirtyOptions) {
|
|
15718
|
-
var options = dirtyOptions || {};
|
|
15719
|
-
var context = options.context ? String(options.context) : 'standalone';
|
|
15720
|
-
var valuesArray;
|
|
15721
|
-
if (context === 'formatting' && args.formattingValues) {
|
|
15722
|
-
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
15723
|
-
var width = options.width ? String(options.width) : defaultWidth;
|
|
15724
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
15725
|
-
} else {
|
|
15726
|
-
var _defaultWidth = args.defaultWidth;
|
|
15727
|
-
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
15728
|
-
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
15729
|
-
}
|
|
15730
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
15677
|
+
var formatDistanceExports = formatDistance$2.exports;
|
|
15731
15678
|
|
|
15732
|
-
|
|
15733
|
-
};
|
|
15734
|
-
}
|
|
15679
|
+
var formatLong$2 = {exports: {}};
|
|
15735
15680
|
|
|
15736
|
-
var
|
|
15737
|
-
narrow: ['B', 'A'],
|
|
15738
|
-
abbreviated: ['BC', 'AD'],
|
|
15739
|
-
wide: ['Before Christ', 'Anno Domini']
|
|
15740
|
-
};
|
|
15741
|
-
var quarterValues$1 = {
|
|
15742
|
-
narrow: ['1', '2', '3', '4'],
|
|
15743
|
-
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
15744
|
-
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
15745
|
-
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
15746
|
-
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
15747
|
-
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
15748
|
-
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
15681
|
+
var buildFormatLongFn$1 = {exports: {}};
|
|
15749
15682
|
|
|
15750
|
-
|
|
15751
|
-
|
|
15752
|
-
|
|
15753
|
-
|
|
15754
|
-
|
|
15755
|
-
|
|
15756
|
-
|
|
15757
|
-
|
|
15758
|
-
|
|
15759
|
-
|
|
15760
|
-
|
|
15761
|
-
|
|
15762
|
-
|
|
15763
|
-
|
|
15764
|
-
|
|
15765
|
-
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
15785
|
-
|
|
15786
|
-
|
|
15787
|
-
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
|
|
15791
|
-
|
|
15792
|
-
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
|
|
15823
|
-
|
|
15824
|
-
|
|
15825
|
-
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15683
|
+
(function (module, exports) {
|
|
15684
|
+
|
|
15685
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15686
|
+
value: true
|
|
15687
|
+
});
|
|
15688
|
+
exports.default = buildFormatLongFn;
|
|
15689
|
+
function buildFormatLongFn(args) {
|
|
15690
|
+
return function () {
|
|
15691
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15692
|
+
// TODO: Remove String()
|
|
15693
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
15694
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
15695
|
+
return format;
|
|
15696
|
+
};
|
|
15697
|
+
}
|
|
15698
|
+
module.exports = exports.default;
|
|
15699
|
+
} (buildFormatLongFn$1, buildFormatLongFn$1.exports));
|
|
15700
|
+
|
|
15701
|
+
var buildFormatLongFnExports = buildFormatLongFn$1.exports;
|
|
15702
|
+
|
|
15703
|
+
(function (module, exports) {
|
|
15704
|
+
|
|
15705
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15706
|
+
value: true
|
|
15707
|
+
});
|
|
15708
|
+
exports.default = void 0;
|
|
15709
|
+
var _index = _interopRequireDefault(buildFormatLongFnExports);
|
|
15710
|
+
function _interopRequireDefault(obj) {
|
|
15711
|
+
return obj && obj.__esModule ? obj : {
|
|
15712
|
+
default: obj
|
|
15713
|
+
};
|
|
15714
|
+
}
|
|
15715
|
+
var dateFormats = {
|
|
15716
|
+
full: 'EEEE, MMMM do, y',
|
|
15717
|
+
long: 'MMMM do, y',
|
|
15718
|
+
medium: 'MMM d, y',
|
|
15719
|
+
short: 'MM/dd/yyyy'
|
|
15720
|
+
};
|
|
15721
|
+
var timeFormats = {
|
|
15722
|
+
full: 'h:mm:ss a zzzz',
|
|
15723
|
+
long: 'h:mm:ss a z',
|
|
15724
|
+
medium: 'h:mm:ss a',
|
|
15725
|
+
short: 'h:mm a'
|
|
15726
|
+
};
|
|
15727
|
+
var dateTimeFormats = {
|
|
15728
|
+
full: "{{date}} 'at' {{time}}",
|
|
15729
|
+
long: "{{date}} 'at' {{time}}",
|
|
15730
|
+
medium: '{{date}}, {{time}}',
|
|
15731
|
+
short: '{{date}}, {{time}}'
|
|
15732
|
+
};
|
|
15733
|
+
var formatLong = {
|
|
15734
|
+
date: (0, _index.default)({
|
|
15735
|
+
formats: dateFormats,
|
|
15736
|
+
defaultWidth: 'full'
|
|
15737
|
+
}),
|
|
15738
|
+
time: (0, _index.default)({
|
|
15739
|
+
formats: timeFormats,
|
|
15740
|
+
defaultWidth: 'full'
|
|
15741
|
+
}),
|
|
15742
|
+
dateTime: (0, _index.default)({
|
|
15743
|
+
formats: dateTimeFormats,
|
|
15744
|
+
defaultWidth: 'full'
|
|
15745
|
+
})
|
|
15746
|
+
};
|
|
15747
|
+
var _default = formatLong;
|
|
15748
|
+
exports.default = _default;
|
|
15749
|
+
module.exports = exports.default;
|
|
15750
|
+
} (formatLong$2, formatLong$2.exports));
|
|
15751
|
+
|
|
15752
|
+
var formatLongExports = formatLong$2.exports;
|
|
15753
|
+
|
|
15754
|
+
var formatRelative$2 = {exports: {}};
|
|
15755
|
+
|
|
15756
|
+
(function (module, exports) {
|
|
15757
|
+
|
|
15758
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15759
|
+
value: true
|
|
15760
|
+
});
|
|
15761
|
+
exports.default = void 0;
|
|
15762
|
+
var formatRelativeLocale = {
|
|
15763
|
+
lastWeek: "'last' eeee 'at' p",
|
|
15764
|
+
yesterday: "'yesterday at' p",
|
|
15765
|
+
today: "'today at' p",
|
|
15766
|
+
tomorrow: "'tomorrow at' p",
|
|
15767
|
+
nextWeek: "eeee 'at' p",
|
|
15768
|
+
other: 'P'
|
|
15769
|
+
};
|
|
15770
|
+
var formatRelative = function (token, _date, _baseDate, _options) {
|
|
15771
|
+
return formatRelativeLocale[token];
|
|
15772
|
+
};
|
|
15773
|
+
var _default = formatRelative;
|
|
15774
|
+
exports.default = _default;
|
|
15775
|
+
module.exports = exports.default;
|
|
15776
|
+
} (formatRelative$2, formatRelative$2.exports));
|
|
15777
|
+
|
|
15778
|
+
var formatRelativeExports = formatRelative$2.exports;
|
|
15779
|
+
|
|
15780
|
+
var localize$2 = {exports: {}};
|
|
15781
|
+
|
|
15782
|
+
var buildLocalizeFn$1 = {exports: {}};
|
|
15783
|
+
|
|
15784
|
+
(function (module, exports) {
|
|
15785
|
+
|
|
15786
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15787
|
+
value: true
|
|
15788
|
+
});
|
|
15789
|
+
exports.default = buildLocalizeFn;
|
|
15790
|
+
function buildLocalizeFn(args) {
|
|
15791
|
+
return function (dirtyIndex, dirtyOptions) {
|
|
15792
|
+
var options = dirtyOptions || {};
|
|
15793
|
+
var context = options.context ? String(options.context) : 'standalone';
|
|
15794
|
+
var valuesArray;
|
|
15795
|
+
if (context === 'formatting' && args.formattingValues) {
|
|
15796
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
15797
|
+
var width = options.width ? String(options.width) : defaultWidth;
|
|
15798
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
15799
|
+
} else {
|
|
15800
|
+
var _defaultWidth = args.defaultWidth;
|
|
15801
|
+
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
15802
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
15803
|
+
}
|
|
15804
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
15805
|
+
|
|
15806
|
+
return valuesArray[index];
|
|
15807
|
+
};
|
|
15808
|
+
}
|
|
15809
|
+
module.exports = exports.default;
|
|
15810
|
+
} (buildLocalizeFn$1, buildLocalizeFn$1.exports));
|
|
15811
|
+
|
|
15812
|
+
var buildLocalizeFnExports = buildLocalizeFn$1.exports;
|
|
15813
|
+
|
|
15814
|
+
(function (module, exports) {
|
|
15815
|
+
|
|
15816
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15817
|
+
value: true
|
|
15818
|
+
});
|
|
15819
|
+
exports.default = void 0;
|
|
15820
|
+
var _index = _interopRequireDefault(buildLocalizeFnExports);
|
|
15821
|
+
function _interopRequireDefault(obj) {
|
|
15822
|
+
return obj && obj.__esModule ? obj : {
|
|
15823
|
+
default: obj
|
|
15824
|
+
};
|
|
15825
|
+
}
|
|
15826
|
+
var eraValues = {
|
|
15827
|
+
narrow: ['B', 'A'],
|
|
15828
|
+
abbreviated: ['BC', 'AD'],
|
|
15829
|
+
wide: ['Before Christ', 'Anno Domini']
|
|
15830
|
+
};
|
|
15831
|
+
var quarterValues = {
|
|
15832
|
+
narrow: ['1', '2', '3', '4'],
|
|
15833
|
+
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
15834
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
15835
|
+
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
15836
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
15837
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
15838
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
15839
|
+
|
|
15840
|
+
var monthValues = {
|
|
15841
|
+
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
15842
|
+
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
15843
|
+
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
15844
|
+
};
|
|
15845
|
+
var dayValues = {
|
|
15846
|
+
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
15847
|
+
short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
15848
|
+
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
15849
|
+
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
15850
|
+
};
|
|
15851
|
+
var dayPeriodValues = {
|
|
15852
|
+
narrow: {
|
|
15853
|
+
am: 'a',
|
|
15854
|
+
pm: 'p',
|
|
15855
|
+
midnight: 'mi',
|
|
15856
|
+
noon: 'n',
|
|
15857
|
+
morning: 'morning',
|
|
15858
|
+
afternoon: 'afternoon',
|
|
15859
|
+
evening: 'evening',
|
|
15860
|
+
night: 'night'
|
|
15861
|
+
},
|
|
15862
|
+
abbreviated: {
|
|
15863
|
+
am: 'AM',
|
|
15864
|
+
pm: 'PM',
|
|
15865
|
+
midnight: 'midnight',
|
|
15866
|
+
noon: 'noon',
|
|
15867
|
+
morning: 'morning',
|
|
15868
|
+
afternoon: 'afternoon',
|
|
15869
|
+
evening: 'evening',
|
|
15870
|
+
night: 'night'
|
|
15871
|
+
},
|
|
15872
|
+
wide: {
|
|
15873
|
+
am: 'a.m.',
|
|
15874
|
+
pm: 'p.m.',
|
|
15875
|
+
midnight: 'midnight',
|
|
15876
|
+
noon: 'noon',
|
|
15877
|
+
morning: 'morning',
|
|
15878
|
+
afternoon: 'afternoon',
|
|
15879
|
+
evening: 'evening',
|
|
15880
|
+
night: 'night'
|
|
15881
|
+
}
|
|
15882
|
+
};
|
|
15883
|
+
var formattingDayPeriodValues = {
|
|
15884
|
+
narrow: {
|
|
15885
|
+
am: 'a',
|
|
15886
|
+
pm: 'p',
|
|
15887
|
+
midnight: 'mi',
|
|
15888
|
+
noon: 'n',
|
|
15889
|
+
morning: 'in the morning',
|
|
15890
|
+
afternoon: 'in the afternoon',
|
|
15891
|
+
evening: 'in the evening',
|
|
15892
|
+
night: 'at night'
|
|
15893
|
+
},
|
|
15894
|
+
abbreviated: {
|
|
15895
|
+
am: 'AM',
|
|
15896
|
+
pm: 'PM',
|
|
15897
|
+
midnight: 'midnight',
|
|
15898
|
+
noon: 'noon',
|
|
15899
|
+
morning: 'in the morning',
|
|
15900
|
+
afternoon: 'in the afternoon',
|
|
15901
|
+
evening: 'in the evening',
|
|
15902
|
+
night: 'at night'
|
|
15903
|
+
},
|
|
15904
|
+
wide: {
|
|
15905
|
+
am: 'a.m.',
|
|
15906
|
+
pm: 'p.m.',
|
|
15907
|
+
midnight: 'midnight',
|
|
15908
|
+
noon: 'noon',
|
|
15909
|
+
morning: 'in the morning',
|
|
15910
|
+
afternoon: 'in the afternoon',
|
|
15911
|
+
evening: 'in the evening',
|
|
15912
|
+
night: 'at night'
|
|
15913
|
+
}
|
|
15914
|
+
};
|
|
15915
|
+
var ordinalNumber = function (dirtyNumber, _options) {
|
|
15916
|
+
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
15917
|
+
// if they are different for different grammatical genders,
|
|
15918
|
+
// use `options.unit`.
|
|
15919
|
+
//
|
|
15920
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
15921
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
15922
|
+
|
|
15923
|
+
var rem100 = number % 100;
|
|
15924
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
15925
|
+
switch (rem100 % 10) {
|
|
15926
|
+
case 1:
|
|
15927
|
+
return number + 'st';
|
|
15928
|
+
case 2:
|
|
15929
|
+
return number + 'nd';
|
|
15930
|
+
case 3:
|
|
15931
|
+
return number + 'rd';
|
|
15932
|
+
}
|
|
15933
|
+
}
|
|
15934
|
+
return number + 'th';
|
|
15935
|
+
};
|
|
15936
|
+
var localize = {
|
|
15937
|
+
ordinalNumber: ordinalNumber,
|
|
15938
|
+
era: (0, _index.default)({
|
|
15939
|
+
values: eraValues,
|
|
15940
|
+
defaultWidth: 'wide'
|
|
15941
|
+
}),
|
|
15942
|
+
quarter: (0, _index.default)({
|
|
15943
|
+
values: quarterValues,
|
|
15944
|
+
defaultWidth: 'wide',
|
|
15945
|
+
argumentCallback: function (quarter) {
|
|
15946
|
+
return quarter - 1;
|
|
15947
|
+
}
|
|
15948
|
+
}),
|
|
15949
|
+
month: (0, _index.default)({
|
|
15950
|
+
values: monthValues,
|
|
15951
|
+
defaultWidth: 'wide'
|
|
15952
|
+
}),
|
|
15953
|
+
day: (0, _index.default)({
|
|
15954
|
+
values: dayValues,
|
|
15955
|
+
defaultWidth: 'wide'
|
|
15956
|
+
}),
|
|
15957
|
+
dayPeriod: (0, _index.default)({
|
|
15958
|
+
values: dayPeriodValues,
|
|
15959
|
+
defaultWidth: 'wide',
|
|
15960
|
+
formattingValues: formattingDayPeriodValues,
|
|
15961
|
+
defaultFormattingWidth: 'wide'
|
|
15962
|
+
})
|
|
15963
|
+
};
|
|
15964
|
+
var _default = localize;
|
|
15965
|
+
exports.default = _default;
|
|
15966
|
+
module.exports = exports.default;
|
|
15967
|
+
} (localize$2, localize$2.exports));
|
|
15968
|
+
|
|
15969
|
+
var localizeExports = localize$2.exports;
|
|
15970
|
+
|
|
15971
|
+
var match$2 = {exports: {}};
|
|
15972
|
+
|
|
15973
|
+
var buildMatchFn$1 = {exports: {}};
|
|
15974
|
+
|
|
15975
|
+
(function (module, exports) {
|
|
15976
|
+
|
|
15977
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15978
|
+
value: true
|
|
15979
|
+
});
|
|
15980
|
+
exports.default = buildMatchFn;
|
|
15981
|
+
function buildMatchFn(args) {
|
|
15982
|
+
return function (string) {
|
|
15983
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
15984
|
+
var width = options.width;
|
|
15985
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
15986
|
+
var matchResult = string.match(matchPattern);
|
|
15987
|
+
if (!matchResult) {
|
|
15988
|
+
return null;
|
|
15989
|
+
}
|
|
15990
|
+
var matchedString = matchResult[0];
|
|
15991
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
15992
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
15993
|
+
return pattern.test(matchedString);
|
|
15994
|
+
}) : findKey(parsePatterns, function (pattern) {
|
|
15995
|
+
return pattern.test(matchedString);
|
|
15996
|
+
});
|
|
15997
|
+
var value;
|
|
15998
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
15999
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
16000
|
+
var rest = string.slice(matchedString.length);
|
|
16001
|
+
return {
|
|
16002
|
+
value: value,
|
|
16003
|
+
rest: rest
|
|
16004
|
+
};
|
|
16005
|
+
};
|
|
16006
|
+
}
|
|
16007
|
+
function findKey(object, predicate) {
|
|
16008
|
+
for (var key in object) {
|
|
16009
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
16010
|
+
return key;
|
|
16011
|
+
}
|
|
16012
|
+
}
|
|
16013
|
+
return undefined;
|
|
16014
|
+
}
|
|
16015
|
+
function findIndex(array, predicate) {
|
|
16016
|
+
for (var key = 0; key < array.length; key++) {
|
|
16017
|
+
if (predicate(array[key])) {
|
|
16018
|
+
return key;
|
|
16019
|
+
}
|
|
16020
|
+
}
|
|
16021
|
+
return undefined;
|
|
16022
|
+
}
|
|
16023
|
+
module.exports = exports.default;
|
|
16024
|
+
} (buildMatchFn$1, buildMatchFn$1.exports));
|
|
16025
|
+
|
|
16026
|
+
var buildMatchFnExports = buildMatchFn$1.exports;
|
|
16027
|
+
|
|
16028
|
+
var buildMatchPatternFn$1 = {exports: {}};
|
|
16029
|
+
|
|
16030
|
+
(function (module, exports) {
|
|
16031
|
+
|
|
16032
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16033
|
+
value: true
|
|
16034
|
+
});
|
|
16035
|
+
exports.default = buildMatchPatternFn;
|
|
16036
|
+
function buildMatchPatternFn(args) {
|
|
16037
|
+
return function (string) {
|
|
16038
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16039
|
+
var matchResult = string.match(args.matchPattern);
|
|
16040
|
+
if (!matchResult) return null;
|
|
16041
|
+
var matchedString = matchResult[0];
|
|
16042
|
+
var parseResult = string.match(args.parsePattern);
|
|
16043
|
+
if (!parseResult) return null;
|
|
16044
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
16045
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
16046
|
+
var rest = string.slice(matchedString.length);
|
|
16047
|
+
return {
|
|
16048
|
+
value: value,
|
|
16049
|
+
rest: rest
|
|
16050
|
+
};
|
|
16051
|
+
};
|
|
16052
|
+
}
|
|
16053
|
+
module.exports = exports.default;
|
|
16054
|
+
} (buildMatchPatternFn$1, buildMatchPatternFn$1.exports));
|
|
16055
|
+
|
|
16056
|
+
var buildMatchPatternFnExports = buildMatchPatternFn$1.exports;
|
|
16057
|
+
|
|
16058
|
+
(function (module, exports) {
|
|
16059
|
+
|
|
16060
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16061
|
+
value: true
|
|
16062
|
+
});
|
|
16063
|
+
exports.default = void 0;
|
|
16064
|
+
var _index = _interopRequireDefault(buildMatchFnExports);
|
|
16065
|
+
var _index2 = _interopRequireDefault(buildMatchPatternFnExports);
|
|
16066
|
+
function _interopRequireDefault(obj) {
|
|
16067
|
+
return obj && obj.__esModule ? obj : {
|
|
16068
|
+
default: obj
|
|
16069
|
+
};
|
|
16070
|
+
}
|
|
16071
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
16072
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
16073
|
+
var matchEraPatterns = {
|
|
16074
|
+
narrow: /^(b|a)/i,
|
|
16075
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
16076
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
16077
|
+
};
|
|
16078
|
+
var parseEraPatterns = {
|
|
16079
|
+
any: [/^b/i, /^(a|c)/i]
|
|
16080
|
+
};
|
|
16081
|
+
var matchQuarterPatterns = {
|
|
16082
|
+
narrow: /^[1234]/i,
|
|
16083
|
+
abbreviated: /^q[1234]/i,
|
|
16084
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
16085
|
+
};
|
|
16086
|
+
var parseQuarterPatterns = {
|
|
16087
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
16088
|
+
};
|
|
16089
|
+
var matchMonthPatterns = {
|
|
16090
|
+
narrow: /^[jfmasond]/i,
|
|
16091
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
16092
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
16093
|
+
};
|
|
16094
|
+
var parseMonthPatterns = {
|
|
16095
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
16096
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
16097
|
+
};
|
|
16098
|
+
var matchDayPatterns = {
|
|
16099
|
+
narrow: /^[smtwf]/i,
|
|
16100
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
16101
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
16102
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
16103
|
+
};
|
|
16104
|
+
var parseDayPatterns = {
|
|
16105
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
16106
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
16107
|
+
};
|
|
16108
|
+
var matchDayPeriodPatterns = {
|
|
16109
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
16110
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
16111
|
+
};
|
|
16112
|
+
var parseDayPeriodPatterns = {
|
|
16113
|
+
any: {
|
|
16114
|
+
am: /^a/i,
|
|
16115
|
+
pm: /^p/i,
|
|
16116
|
+
midnight: /^mi/i,
|
|
16117
|
+
noon: /^no/i,
|
|
16118
|
+
morning: /morning/i,
|
|
16119
|
+
afternoon: /afternoon/i,
|
|
16120
|
+
evening: /evening/i,
|
|
16121
|
+
night: /night/i
|
|
16122
|
+
}
|
|
16123
|
+
};
|
|
16124
|
+
var match = {
|
|
16125
|
+
ordinalNumber: (0, _index2.default)({
|
|
16126
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
16127
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
16128
|
+
valueCallback: function (value) {
|
|
16129
|
+
return parseInt(value, 10);
|
|
16130
|
+
}
|
|
16131
|
+
}),
|
|
16132
|
+
era: (0, _index.default)({
|
|
16133
|
+
matchPatterns: matchEraPatterns,
|
|
16134
|
+
defaultMatchWidth: 'wide',
|
|
16135
|
+
parsePatterns: parseEraPatterns,
|
|
16136
|
+
defaultParseWidth: 'any'
|
|
16137
|
+
}),
|
|
16138
|
+
quarter: (0, _index.default)({
|
|
16139
|
+
matchPatterns: matchQuarterPatterns,
|
|
16140
|
+
defaultMatchWidth: 'wide',
|
|
16141
|
+
parsePatterns: parseQuarterPatterns,
|
|
16142
|
+
defaultParseWidth: 'any',
|
|
16143
|
+
valueCallback: function (index) {
|
|
16144
|
+
return index + 1;
|
|
16145
|
+
}
|
|
16146
|
+
}),
|
|
16147
|
+
month: (0, _index.default)({
|
|
16148
|
+
matchPatterns: matchMonthPatterns,
|
|
16149
|
+
defaultMatchWidth: 'wide',
|
|
16150
|
+
parsePatterns: parseMonthPatterns,
|
|
16151
|
+
defaultParseWidth: 'any'
|
|
16152
|
+
}),
|
|
16153
|
+
day: (0, _index.default)({
|
|
16154
|
+
matchPatterns: matchDayPatterns,
|
|
16155
|
+
defaultMatchWidth: 'wide',
|
|
16156
|
+
parsePatterns: parseDayPatterns,
|
|
16157
|
+
defaultParseWidth: 'any'
|
|
16158
|
+
}),
|
|
16159
|
+
dayPeriod: (0, _index.default)({
|
|
16160
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
16161
|
+
defaultMatchWidth: 'any',
|
|
16162
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
16163
|
+
defaultParseWidth: 'any'
|
|
16164
|
+
})
|
|
16165
|
+
};
|
|
16166
|
+
var _default = match;
|
|
16167
|
+
exports.default = _default;
|
|
16168
|
+
module.exports = exports.default;
|
|
16169
|
+
} (match$2, match$2.exports));
|
|
15832
16170
|
|
|
15833
|
-
|
|
15834
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
15835
|
-
switch (rem100 % 10) {
|
|
15836
|
-
case 1:
|
|
15837
|
-
return number + 'st';
|
|
15838
|
-
case 2:
|
|
15839
|
-
return number + 'nd';
|
|
15840
|
-
case 3:
|
|
15841
|
-
return number + 'rd';
|
|
15842
|
-
}
|
|
15843
|
-
}
|
|
15844
|
-
return number + 'th';
|
|
15845
|
-
};
|
|
15846
|
-
var localize$2 = {
|
|
15847
|
-
ordinalNumber: ordinalNumber$1,
|
|
15848
|
-
era: buildLocalizeFn$1({
|
|
15849
|
-
values: eraValues$1,
|
|
15850
|
-
defaultWidth: 'wide'
|
|
15851
|
-
}),
|
|
15852
|
-
quarter: buildLocalizeFn$1({
|
|
15853
|
-
values: quarterValues$1,
|
|
15854
|
-
defaultWidth: 'wide',
|
|
15855
|
-
argumentCallback: function (quarter) {
|
|
15856
|
-
return quarter - 1;
|
|
15857
|
-
}
|
|
15858
|
-
}),
|
|
15859
|
-
month: buildLocalizeFn$1({
|
|
15860
|
-
values: monthValues$1,
|
|
15861
|
-
defaultWidth: 'wide'
|
|
15862
|
-
}),
|
|
15863
|
-
day: buildLocalizeFn$1({
|
|
15864
|
-
values: dayValues$1,
|
|
15865
|
-
defaultWidth: 'wide'
|
|
15866
|
-
}),
|
|
15867
|
-
dayPeriod: buildLocalizeFn$1({
|
|
15868
|
-
values: dayPeriodValues$1,
|
|
15869
|
-
defaultWidth: 'wide',
|
|
15870
|
-
formattingValues: formattingDayPeriodValues$1,
|
|
15871
|
-
defaultFormattingWidth: 'wide'
|
|
15872
|
-
})
|
|
15873
|
-
};
|
|
16171
|
+
var matchExports = match$2.exports;
|
|
15874
16172
|
|
|
15875
|
-
function
|
|
15876
|
-
return function (string) {
|
|
15877
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
15878
|
-
var width = options.width;
|
|
15879
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
15880
|
-
var matchResult = string.match(matchPattern);
|
|
15881
|
-
if (!matchResult) {
|
|
15882
|
-
return null;
|
|
15883
|
-
}
|
|
15884
|
-
var matchedString = matchResult[0];
|
|
15885
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
15886
|
-
var key = Array.isArray(parsePatterns) ? findIndex$1(parsePatterns, function (pattern) {
|
|
15887
|
-
return pattern.test(matchedString);
|
|
15888
|
-
}) : findKey$1(parsePatterns, function (pattern) {
|
|
15889
|
-
return pattern.test(matchedString);
|
|
15890
|
-
});
|
|
15891
|
-
var value;
|
|
15892
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
15893
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
15894
|
-
var rest = string.slice(matchedString.length);
|
|
15895
|
-
return {
|
|
15896
|
-
value: value,
|
|
15897
|
-
rest: rest
|
|
15898
|
-
};
|
|
15899
|
-
};
|
|
15900
|
-
}
|
|
15901
|
-
function findKey$1(object, predicate) {
|
|
15902
|
-
for (var key in object) {
|
|
15903
|
-
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
15904
|
-
return key;
|
|
15905
|
-
}
|
|
15906
|
-
}
|
|
15907
|
-
return undefined;
|
|
15908
|
-
}
|
|
15909
|
-
function findIndex$1(array, predicate) {
|
|
15910
|
-
for (var key = 0; key < array.length; key++) {
|
|
15911
|
-
if (predicate(array[key])) {
|
|
15912
|
-
return key;
|
|
15913
|
-
}
|
|
15914
|
-
}
|
|
15915
|
-
return undefined;
|
|
15916
|
-
}
|
|
16173
|
+
(function (module, exports) {
|
|
15917
16174
|
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
};
|
|
15933
|
-
};
|
|
15934
|
-
}
|
|
16175
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16176
|
+
value: true
|
|
16177
|
+
});
|
|
16178
|
+
exports.default = void 0;
|
|
16179
|
+
var _index = _interopRequireDefault(formatDistanceExports);
|
|
16180
|
+
var _index2 = _interopRequireDefault(formatLongExports);
|
|
16181
|
+
var _index3 = _interopRequireDefault(formatRelativeExports);
|
|
16182
|
+
var _index4 = _interopRequireDefault(localizeExports);
|
|
16183
|
+
var _index5 = _interopRequireDefault(matchExports);
|
|
16184
|
+
function _interopRequireDefault(obj) {
|
|
16185
|
+
return obj && obj.__esModule ? obj : {
|
|
16186
|
+
default: obj
|
|
16187
|
+
};
|
|
16188
|
+
}
|
|
15935
16189
|
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
narrow: /^[jfmasond]/i,
|
|
15956
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
15957
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
15958
|
-
};
|
|
15959
|
-
var parseMonthPatterns$1 = {
|
|
15960
|
-
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
15961
|
-
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
15962
|
-
};
|
|
15963
|
-
var matchDayPatterns$1 = {
|
|
15964
|
-
narrow: /^[smtwf]/i,
|
|
15965
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
15966
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
15967
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
15968
|
-
};
|
|
15969
|
-
var parseDayPatterns$1 = {
|
|
15970
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
15971
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
15972
|
-
};
|
|
15973
|
-
var matchDayPeriodPatterns$1 = {
|
|
15974
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
15975
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
15976
|
-
};
|
|
15977
|
-
var parseDayPeriodPatterns$1 = {
|
|
15978
|
-
any: {
|
|
15979
|
-
am: /^a/i,
|
|
15980
|
-
pm: /^p/i,
|
|
15981
|
-
midnight: /^mi/i,
|
|
15982
|
-
noon: /^no/i,
|
|
15983
|
-
morning: /morning/i,
|
|
15984
|
-
afternoon: /afternoon/i,
|
|
15985
|
-
evening: /evening/i,
|
|
15986
|
-
night: /night/i
|
|
15987
|
-
}
|
|
15988
|
-
};
|
|
15989
|
-
var match$2 = {
|
|
15990
|
-
ordinalNumber: buildMatchPatternFn$1({
|
|
15991
|
-
matchPattern: matchOrdinalNumberPattern$1,
|
|
15992
|
-
parsePattern: parseOrdinalNumberPattern$1,
|
|
15993
|
-
valueCallback: function (value) {
|
|
15994
|
-
return parseInt(value, 10);
|
|
15995
|
-
}
|
|
15996
|
-
}),
|
|
15997
|
-
era: buildMatchFn$1({
|
|
15998
|
-
matchPatterns: matchEraPatterns$1,
|
|
15999
|
-
defaultMatchWidth: 'wide',
|
|
16000
|
-
parsePatterns: parseEraPatterns$1,
|
|
16001
|
-
defaultParseWidth: 'any'
|
|
16002
|
-
}),
|
|
16003
|
-
quarter: buildMatchFn$1({
|
|
16004
|
-
matchPatterns: matchQuarterPatterns$1,
|
|
16005
|
-
defaultMatchWidth: 'wide',
|
|
16006
|
-
parsePatterns: parseQuarterPatterns$1,
|
|
16007
|
-
defaultParseWidth: 'any',
|
|
16008
|
-
valueCallback: function (index) {
|
|
16009
|
-
return index + 1;
|
|
16010
|
-
}
|
|
16011
|
-
}),
|
|
16012
|
-
month: buildMatchFn$1({
|
|
16013
|
-
matchPatterns: matchMonthPatterns$1,
|
|
16014
|
-
defaultMatchWidth: 'wide',
|
|
16015
|
-
parsePatterns: parseMonthPatterns$1,
|
|
16016
|
-
defaultParseWidth: 'any'
|
|
16017
|
-
}),
|
|
16018
|
-
day: buildMatchFn$1({
|
|
16019
|
-
matchPatterns: matchDayPatterns$1,
|
|
16020
|
-
defaultMatchWidth: 'wide',
|
|
16021
|
-
parsePatterns: parseDayPatterns$1,
|
|
16022
|
-
defaultParseWidth: 'any'
|
|
16023
|
-
}),
|
|
16024
|
-
dayPeriod: buildMatchFn$1({
|
|
16025
|
-
matchPatterns: matchDayPeriodPatterns$1,
|
|
16026
|
-
defaultMatchWidth: 'any',
|
|
16027
|
-
parsePatterns: parseDayPeriodPatterns$1,
|
|
16028
|
-
defaultParseWidth: 'any'
|
|
16029
|
-
})
|
|
16030
|
-
};
|
|
16190
|
+
/**
|
|
16191
|
+
* @type {Locale}
|
|
16192
|
+
* @category Locales
|
|
16193
|
+
* @summary English locale (United States).
|
|
16194
|
+
* @language English
|
|
16195
|
+
* @iso-639-2 eng
|
|
16196
|
+
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
16197
|
+
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
16198
|
+
*/
|
|
16199
|
+
var locale = {
|
|
16200
|
+
code: 'en-US',
|
|
16201
|
+
formatDistance: _index.default,
|
|
16202
|
+
formatLong: _index2.default,
|
|
16203
|
+
formatRelative: _index3.default,
|
|
16204
|
+
localize: _index4.default,
|
|
16205
|
+
match: _index5.default,
|
|
16206
|
+
options: {
|
|
16207
|
+
weekStartsOn: 0
|
|
16208
|
+
/* Sunday */,
|
|
16031
16209
|
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16036
|
-
|
|
16037
|
-
|
|
16038
|
-
|
|
16039
|
-
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
16040
|
-
*/
|
|
16041
|
-
var locale$1 = {
|
|
16042
|
-
code: 'en-US',
|
|
16043
|
-
formatDistance: formatDistance$2,
|
|
16044
|
-
formatLong: formatLong$2,
|
|
16045
|
-
formatRelative: formatRelative$2,
|
|
16046
|
-
localize: localize$2,
|
|
16047
|
-
match: match$2,
|
|
16048
|
-
options: {
|
|
16049
|
-
weekStartsOn: 0
|
|
16050
|
-
/* Sunday */,
|
|
16210
|
+
firstWeekContainsDate: 1
|
|
16211
|
+
}
|
|
16212
|
+
};
|
|
16213
|
+
var _default = locale;
|
|
16214
|
+
exports.default = _default;
|
|
16215
|
+
module.exports = exports.default;
|
|
16216
|
+
} (enUS$1, enUS$1.exports));
|
|
16051
16217
|
|
|
16052
|
-
|
|
16053
|
-
|
|
16054
|
-
};
|
|
16218
|
+
var enUSExports = enUS$1.exports;
|
|
16219
|
+
var enUS = /*@__PURE__*/getDefaultExportFromCjs(enUSExports);
|
|
16055
16220
|
|
|
16056
16221
|
const dateEnUs = {
|
|
16057
16222
|
name: "en-US",
|
|
16058
|
-
locale:
|
|
16223
|
+
locale: enUS
|
|
16059
16224
|
};
|
|
16060
16225
|
|
|
16061
16226
|
function declension(scheme, count) {
|
|
@@ -16095,7 +16260,7 @@
|
|
|
16095
16260
|
}
|
|
16096
16261
|
};
|
|
16097
16262
|
}
|
|
16098
|
-
var formatDistanceLocale = {
|
|
16263
|
+
var formatDistanceLocale$1 = {
|
|
16099
16264
|
lessThanXSeconds: buildLocalizeTokenFn({
|
|
16100
16265
|
regular: {
|
|
16101
16266
|
one: 'меньше секунды',
|
|
@@ -16278,35 +16443,45 @@
|
|
|
16278
16443
|
};
|
|
16279
16444
|
function formatDistance$1(token, count, options) {
|
|
16280
16445
|
options = options || {};
|
|
16281
|
-
return formatDistanceLocale[token](count, options);
|
|
16446
|
+
return formatDistanceLocale$1[token](count, options);
|
|
16282
16447
|
}
|
|
16283
16448
|
|
|
16284
|
-
|
|
16449
|
+
function buildFormatLongFn(args) {
|
|
16450
|
+
return function () {
|
|
16451
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16452
|
+
// TODO: Remove String()
|
|
16453
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
16454
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
16455
|
+
return format;
|
|
16456
|
+
};
|
|
16457
|
+
}
|
|
16458
|
+
|
|
16459
|
+
var dateFormats$1 = {
|
|
16285
16460
|
full: "EEEE, d MMMM y 'г.'",
|
|
16286
16461
|
long: "d MMMM y 'г.'",
|
|
16287
16462
|
medium: "d MMM y 'г.'",
|
|
16288
16463
|
short: 'dd.MM.y'
|
|
16289
16464
|
};
|
|
16290
|
-
var timeFormats = {
|
|
16465
|
+
var timeFormats$1 = {
|
|
16291
16466
|
full: 'H:mm:ss zzzz',
|
|
16292
16467
|
long: 'H:mm:ss z',
|
|
16293
16468
|
medium: 'H:mm:ss',
|
|
16294
16469
|
short: 'H:mm'
|
|
16295
16470
|
};
|
|
16296
|
-
var dateTimeFormats = {
|
|
16471
|
+
var dateTimeFormats$1 = {
|
|
16297
16472
|
any: '{{date}}, {{time}}'
|
|
16298
16473
|
};
|
|
16299
16474
|
var formatLong$1 = {
|
|
16300
|
-
date: buildFormatLongFn
|
|
16301
|
-
formats: dateFormats,
|
|
16475
|
+
date: buildFormatLongFn({
|
|
16476
|
+
formats: dateFormats$1,
|
|
16302
16477
|
defaultWidth: 'full'
|
|
16303
16478
|
}),
|
|
16304
|
-
time: buildFormatLongFn
|
|
16305
|
-
formats: timeFormats,
|
|
16479
|
+
time: buildFormatLongFn({
|
|
16480
|
+
formats: timeFormats$1,
|
|
16306
16481
|
defaultWidth: 'full'
|
|
16307
16482
|
}),
|
|
16308
|
-
dateTime: buildFormatLongFn
|
|
16309
|
-
formats: dateTimeFormats,
|
|
16483
|
+
dateTime: buildFormatLongFn({
|
|
16484
|
+
formats: dateTimeFormats$1,
|
|
16310
16485
|
defaultWidth: 'any'
|
|
16311
16486
|
})
|
|
16312
16487
|
};
|
|
@@ -16449,7 +16624,7 @@
|
|
|
16449
16624
|
return "'в следующую " + weekday + " в' p";
|
|
16450
16625
|
}
|
|
16451
16626
|
}
|
|
16452
|
-
var formatRelativeLocale = {
|
|
16627
|
+
var formatRelativeLocale$1 = {
|
|
16453
16628
|
lastWeek: function (date, baseDate, options) {
|
|
16454
16629
|
var day = date.getUTCDay();
|
|
16455
16630
|
if (isSameUTCWeek(date, baseDate, options)) {
|
|
@@ -16472,24 +16647,44 @@
|
|
|
16472
16647
|
other: 'P'
|
|
16473
16648
|
};
|
|
16474
16649
|
function formatRelative$1(token, date, baseDate, options) {
|
|
16475
|
-
var format = formatRelativeLocale[token];
|
|
16650
|
+
var format = formatRelativeLocale$1[token];
|
|
16476
16651
|
if (typeof format === 'function') {
|
|
16477
16652
|
return format(date, baseDate, options);
|
|
16478
16653
|
}
|
|
16479
16654
|
return format;
|
|
16480
16655
|
}
|
|
16481
16656
|
|
|
16482
|
-
|
|
16657
|
+
function buildLocalizeFn(args) {
|
|
16658
|
+
return function (dirtyIndex, dirtyOptions) {
|
|
16659
|
+
var options = dirtyOptions || {};
|
|
16660
|
+
var context = options.context ? String(options.context) : 'standalone';
|
|
16661
|
+
var valuesArray;
|
|
16662
|
+
if (context === 'formatting' && args.formattingValues) {
|
|
16663
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
16664
|
+
var width = options.width ? String(options.width) : defaultWidth;
|
|
16665
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
16666
|
+
} else {
|
|
16667
|
+
var _defaultWidth = args.defaultWidth;
|
|
16668
|
+
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
16669
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
16670
|
+
}
|
|
16671
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
16672
|
+
|
|
16673
|
+
return valuesArray[index];
|
|
16674
|
+
};
|
|
16675
|
+
}
|
|
16676
|
+
|
|
16677
|
+
var eraValues$1 = {
|
|
16483
16678
|
narrow: ['до н.э.', 'н.э.'],
|
|
16484
16679
|
abbreviated: ['до н. э.', 'н. э.'],
|
|
16485
16680
|
wide: ['до нашей эры', 'нашей эры']
|
|
16486
16681
|
};
|
|
16487
|
-
var quarterValues = {
|
|
16682
|
+
var quarterValues$1 = {
|
|
16488
16683
|
narrow: ['1', '2', '3', '4'],
|
|
16489
16684
|
abbreviated: ['1-й кв.', '2-й кв.', '3-й кв.', '4-й кв.'],
|
|
16490
16685
|
wide: ['1-й квартал', '2-й квартал', '3-й квартал', '4-й квартал']
|
|
16491
16686
|
};
|
|
16492
|
-
var monthValues = {
|
|
16687
|
+
var monthValues$1 = {
|
|
16493
16688
|
narrow: ['Я', 'Ф', 'М', 'А', 'М', 'И', 'И', 'А', 'С', 'О', 'Н', 'Д'],
|
|
16494
16689
|
abbreviated: ['янв.', 'фев.', 'март', 'апр.', 'май', 'июнь', 'июль', 'авг.', 'сент.', 'окт.', 'нояб.', 'дек.'],
|
|
16495
16690
|
wide: ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь']
|
|
@@ -16499,13 +16694,13 @@
|
|
|
16499
16694
|
abbreviated: ['янв.', 'фев.', 'мар.', 'апр.', 'мая', 'июн.', 'июл.', 'авг.', 'сент.', 'окт.', 'нояб.', 'дек.'],
|
|
16500
16695
|
wide: ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря']
|
|
16501
16696
|
};
|
|
16502
|
-
var dayValues = {
|
|
16697
|
+
var dayValues$1 = {
|
|
16503
16698
|
narrow: ['В', 'П', 'В', 'С', 'Ч', 'П', 'С'],
|
|
16504
16699
|
short: ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
|
16505
16700
|
abbreviated: ['вск', 'пнд', 'втр', 'срд', 'чтв', 'птн', 'суб'],
|
|
16506
16701
|
wide: ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота']
|
|
16507
16702
|
};
|
|
16508
|
-
var dayPeriodValues = {
|
|
16703
|
+
var dayPeriodValues$1 = {
|
|
16509
16704
|
narrow: {
|
|
16510
16705
|
am: 'ДП',
|
|
16511
16706
|
pm: 'ПП',
|
|
@@ -16537,7 +16732,7 @@
|
|
|
16537
16732
|
night: 'ночь'
|
|
16538
16733
|
}
|
|
16539
16734
|
};
|
|
16540
|
-
var formattingDayPeriodValues = {
|
|
16735
|
+
var formattingDayPeriodValues$1 = {
|
|
16541
16736
|
narrow: {
|
|
16542
16737
|
am: 'ДП',
|
|
16543
16738
|
pm: 'ПП',
|
|
@@ -16569,7 +16764,7 @@
|
|
|
16569
16764
|
night: 'ночи'
|
|
16570
16765
|
}
|
|
16571
16766
|
};
|
|
16572
|
-
function ordinalNumber(dirtyNumber, dirtyOptions) {
|
|
16767
|
+
function ordinalNumber$1(dirtyNumber, dirtyOptions) {
|
|
16573
16768
|
var options = dirtyOptions || {};
|
|
16574
16769
|
var unit = String(options.unit);
|
|
16575
16770
|
var suffix;
|
|
@@ -16583,79 +16778,140 @@
|
|
|
16583
16778
|
return dirtyNumber + suffix;
|
|
16584
16779
|
}
|
|
16585
16780
|
var localize$1 = {
|
|
16586
|
-
ordinalNumber: ordinalNumber,
|
|
16587
|
-
era: buildLocalizeFn
|
|
16588
|
-
values: eraValues,
|
|
16781
|
+
ordinalNumber: ordinalNumber$1,
|
|
16782
|
+
era: buildLocalizeFn({
|
|
16783
|
+
values: eraValues$1,
|
|
16589
16784
|
defaultWidth: 'wide'
|
|
16590
16785
|
}),
|
|
16591
|
-
quarter: buildLocalizeFn
|
|
16592
|
-
values: quarterValues,
|
|
16786
|
+
quarter: buildLocalizeFn({
|
|
16787
|
+
values: quarterValues$1,
|
|
16593
16788
|
defaultWidth: 'wide',
|
|
16594
16789
|
argumentCallback: function (quarter) {
|
|
16595
16790
|
return Number(quarter) - 1;
|
|
16596
16791
|
}
|
|
16597
16792
|
}),
|
|
16598
|
-
month: buildLocalizeFn
|
|
16599
|
-
values: monthValues,
|
|
16793
|
+
month: buildLocalizeFn({
|
|
16794
|
+
values: monthValues$1,
|
|
16600
16795
|
defaultWidth: 'wide',
|
|
16601
16796
|
formattingValues: formattingMonthValues,
|
|
16602
16797
|
defaultFormattingWidth: 'wide'
|
|
16603
16798
|
}),
|
|
16604
|
-
day: buildLocalizeFn
|
|
16605
|
-
values: dayValues,
|
|
16799
|
+
day: buildLocalizeFn({
|
|
16800
|
+
values: dayValues$1,
|
|
16606
16801
|
defaultWidth: 'wide'
|
|
16607
16802
|
}),
|
|
16608
|
-
dayPeriod: buildLocalizeFn
|
|
16609
|
-
values: dayPeriodValues,
|
|
16803
|
+
dayPeriod: buildLocalizeFn({
|
|
16804
|
+
values: dayPeriodValues$1,
|
|
16610
16805
|
defaultWidth: 'any',
|
|
16611
|
-
formattingValues: formattingDayPeriodValues,
|
|
16806
|
+
formattingValues: formattingDayPeriodValues$1,
|
|
16612
16807
|
defaultFormattingWidth: 'wide'
|
|
16613
16808
|
})
|
|
16614
16809
|
};
|
|
16615
16810
|
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16811
|
+
function buildMatchPatternFn(args) {
|
|
16812
|
+
return function (string) {
|
|
16813
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16814
|
+
var matchResult = string.match(args.matchPattern);
|
|
16815
|
+
if (!matchResult) return null;
|
|
16816
|
+
var matchedString = matchResult[0];
|
|
16817
|
+
var parseResult = string.match(args.parsePattern);
|
|
16818
|
+
if (!parseResult) return null;
|
|
16819
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
16820
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
16821
|
+
var rest = string.slice(matchedString.length);
|
|
16822
|
+
return {
|
|
16823
|
+
value: value,
|
|
16824
|
+
rest: rest
|
|
16825
|
+
};
|
|
16826
|
+
};
|
|
16827
|
+
}
|
|
16828
|
+
|
|
16829
|
+
function buildMatchFn(args) {
|
|
16830
|
+
return function (string) {
|
|
16831
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16832
|
+
var width = options.width;
|
|
16833
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
16834
|
+
var matchResult = string.match(matchPattern);
|
|
16835
|
+
if (!matchResult) {
|
|
16836
|
+
return null;
|
|
16837
|
+
}
|
|
16838
|
+
var matchedString = matchResult[0];
|
|
16839
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
16840
|
+
var key = Array.isArray(parsePatterns) ? findIndex$1(parsePatterns, function (pattern) {
|
|
16841
|
+
return pattern.test(matchedString);
|
|
16842
|
+
}) : findKey$1(parsePatterns, function (pattern) {
|
|
16843
|
+
return pattern.test(matchedString);
|
|
16844
|
+
});
|
|
16845
|
+
var value;
|
|
16846
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
16847
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
16848
|
+
var rest = string.slice(matchedString.length);
|
|
16849
|
+
return {
|
|
16850
|
+
value: value,
|
|
16851
|
+
rest: rest
|
|
16852
|
+
};
|
|
16853
|
+
};
|
|
16854
|
+
}
|
|
16855
|
+
function findKey$1(object, predicate) {
|
|
16856
|
+
for (var key in object) {
|
|
16857
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
16858
|
+
return key;
|
|
16859
|
+
}
|
|
16860
|
+
}
|
|
16861
|
+
return undefined;
|
|
16862
|
+
}
|
|
16863
|
+
function findIndex$1(array, predicate) {
|
|
16864
|
+
for (var key = 0; key < array.length; key++) {
|
|
16865
|
+
if (predicate(array[key])) {
|
|
16866
|
+
return key;
|
|
16867
|
+
}
|
|
16868
|
+
}
|
|
16869
|
+
return undefined;
|
|
16870
|
+
}
|
|
16871
|
+
|
|
16872
|
+
var matchOrdinalNumberPattern$1 = /^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i;
|
|
16873
|
+
var parseOrdinalNumberPattern$1 = /\d+/i;
|
|
16874
|
+
var matchEraPatterns$1 = {
|
|
16619
16875
|
narrow: /^((до )?н\.?\s?э\.?)/i,
|
|
16620
16876
|
abbreviated: /^((до )?н\.?\s?э\.?)/i,
|
|
16621
16877
|
wide: /^(до нашей эры|нашей эры|наша эра)/i
|
|
16622
16878
|
};
|
|
16623
|
-
var parseEraPatterns = {
|
|
16879
|
+
var parseEraPatterns$1 = {
|
|
16624
16880
|
any: [/^д/i, /^н/i]
|
|
16625
16881
|
};
|
|
16626
|
-
var matchQuarterPatterns = {
|
|
16882
|
+
var matchQuarterPatterns$1 = {
|
|
16627
16883
|
narrow: /^[1234]/i,
|
|
16628
16884
|
abbreviated: /^[1234](-?[ыои]?й?)? кв.?/i,
|
|
16629
16885
|
wide: /^[1234](-?[ыои]?й?)? квартал/i
|
|
16630
16886
|
};
|
|
16631
|
-
var parseQuarterPatterns = {
|
|
16887
|
+
var parseQuarterPatterns$1 = {
|
|
16632
16888
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
16633
16889
|
};
|
|
16634
|
-
var matchMonthPatterns = {
|
|
16890
|
+
var matchMonthPatterns$1 = {
|
|
16635
16891
|
narrow: /^[яфмаисонд]/i,
|
|
16636
16892
|
abbreviated: /^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,
|
|
16637
16893
|
wide: /^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i
|
|
16638
16894
|
};
|
|
16639
|
-
var parseMonthPatterns = {
|
|
16895
|
+
var parseMonthPatterns$1 = {
|
|
16640
16896
|
narrow: [/^я/i, /^ф/i, /^м/i, /^а/i, /^м/i, /^и/i, /^и/i, /^а/i, /^с/i, /^о/i, /^н/i, /^я/i],
|
|
16641
16897
|
any: [/^я/i, /^ф/i, /^мар/i, /^ап/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^ав/i, /^с/i, /^о/i, /^н/i, /^д/i]
|
|
16642
16898
|
};
|
|
16643
|
-
var matchDayPatterns = {
|
|
16899
|
+
var matchDayPatterns$1 = {
|
|
16644
16900
|
narrow: /^[впсч]/i,
|
|
16645
16901
|
short: /^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,
|
|
16646
16902
|
abbreviated: /^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,
|
|
16647
16903
|
wide: /^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i
|
|
16648
16904
|
};
|
|
16649
|
-
var parseDayPatterns = {
|
|
16905
|
+
var parseDayPatterns$1 = {
|
|
16650
16906
|
narrow: [/^в/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i],
|
|
16651
16907
|
any: [/^в[ос]/i, /^п[он]/i, /^в/i, /^ср/i, /^ч/i, /^п[ят]/i, /^с[уб]/i]
|
|
16652
16908
|
};
|
|
16653
|
-
var matchDayPeriodPatterns = {
|
|
16909
|
+
var matchDayPeriodPatterns$1 = {
|
|
16654
16910
|
narrow: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
|
|
16655
16911
|
abbreviated: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
|
|
16656
16912
|
wide: /^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i
|
|
16657
16913
|
};
|
|
16658
|
-
var parseDayPeriodPatterns = {
|
|
16914
|
+
var parseDayPeriodPatterns$1 = {
|
|
16659
16915
|
any: {
|
|
16660
16916
|
am: /^дп/i,
|
|
16661
16917
|
pm: /^пп/i,
|
|
@@ -16668,44 +16924,44 @@
|
|
|
16668
16924
|
}
|
|
16669
16925
|
};
|
|
16670
16926
|
var match$1 = {
|
|
16671
|
-
ordinalNumber: buildMatchPatternFn
|
|
16672
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
16673
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
16927
|
+
ordinalNumber: buildMatchPatternFn({
|
|
16928
|
+
matchPattern: matchOrdinalNumberPattern$1,
|
|
16929
|
+
parsePattern: parseOrdinalNumberPattern$1,
|
|
16674
16930
|
valueCallback: function (value) {
|
|
16675
16931
|
return parseInt(value, 10);
|
|
16676
16932
|
}
|
|
16677
16933
|
}),
|
|
16678
|
-
era: buildMatchFn
|
|
16679
|
-
matchPatterns: matchEraPatterns,
|
|
16934
|
+
era: buildMatchFn({
|
|
16935
|
+
matchPatterns: matchEraPatterns$1,
|
|
16680
16936
|
defaultMatchWidth: 'wide',
|
|
16681
|
-
parsePatterns: parseEraPatterns,
|
|
16937
|
+
parsePatterns: parseEraPatterns$1,
|
|
16682
16938
|
defaultParseWidth: 'any'
|
|
16683
16939
|
}),
|
|
16684
|
-
quarter: buildMatchFn
|
|
16685
|
-
matchPatterns: matchQuarterPatterns,
|
|
16940
|
+
quarter: buildMatchFn({
|
|
16941
|
+
matchPatterns: matchQuarterPatterns$1,
|
|
16686
16942
|
defaultMatchWidth: 'wide',
|
|
16687
|
-
parsePatterns: parseQuarterPatterns,
|
|
16943
|
+
parsePatterns: parseQuarterPatterns$1,
|
|
16688
16944
|
defaultParseWidth: 'any',
|
|
16689
16945
|
valueCallback: function (index) {
|
|
16690
16946
|
return index + 1;
|
|
16691
16947
|
}
|
|
16692
16948
|
}),
|
|
16693
|
-
month: buildMatchFn
|
|
16694
|
-
matchPatterns: matchMonthPatterns,
|
|
16949
|
+
month: buildMatchFn({
|
|
16950
|
+
matchPatterns: matchMonthPatterns$1,
|
|
16695
16951
|
defaultMatchWidth: 'wide',
|
|
16696
|
-
parsePatterns: parseMonthPatterns,
|
|
16952
|
+
parsePatterns: parseMonthPatterns$1,
|
|
16697
16953
|
defaultParseWidth: 'any'
|
|
16698
16954
|
}),
|
|
16699
|
-
day: buildMatchFn
|
|
16700
|
-
matchPatterns: matchDayPatterns,
|
|
16955
|
+
day: buildMatchFn({
|
|
16956
|
+
matchPatterns: matchDayPatterns$1,
|
|
16701
16957
|
defaultMatchWidth: 'wide',
|
|
16702
|
-
parsePatterns: parseDayPatterns,
|
|
16958
|
+
parsePatterns: parseDayPatterns$1,
|
|
16703
16959
|
defaultParseWidth: 'any'
|
|
16704
16960
|
}),
|
|
16705
|
-
dayPeriod: buildMatchFn
|
|
16706
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
16961
|
+
dayPeriod: buildMatchFn({
|
|
16962
|
+
matchPatterns: matchDayPeriodPatterns$1,
|
|
16707
16963
|
defaultMatchWidth: 'wide',
|
|
16708
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
16964
|
+
parsePatterns: parseDayPeriodPatterns$1,
|
|
16709
16965
|
defaultParseWidth: 'any'
|
|
16710
16966
|
})
|
|
16711
16967
|
};
|
|
@@ -16720,7 +16976,7 @@
|
|
|
16720
16976
|
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
16721
16977
|
*/
|
|
16722
16978
|
|
|
16723
|
-
var locale = {
|
|
16979
|
+
var locale$1 = {
|
|
16724
16980
|
code: 'ru',
|
|
16725
16981
|
formatDistance: formatDistance$1,
|
|
16726
16982
|
formatLong: formatLong$1,
|
|
@@ -16737,7 +16993,7 @@
|
|
|
16737
16993
|
|
|
16738
16994
|
const dateRuRU = {
|
|
16739
16995
|
name: "ru-RU",
|
|
16740
|
-
locale: locale
|
|
16996
|
+
locale: locale$1
|
|
16741
16997
|
};
|
|
16742
16998
|
|
|
16743
16999
|
function createLocale(locale, fallbackLocale) {
|
|
@@ -16750,7 +17006,7 @@
|
|
|
16750
17006
|
mergedDateLocaleRef
|
|
16751
17007
|
} = vue.inject(configProviderInjectionKey, null) || {};
|
|
16752
17008
|
const localeRef = vue.computed(() => {
|
|
16753
|
-
return mergedLocaleRef?.value?.[ns] ?? enUS$
|
|
17009
|
+
return mergedLocaleRef?.value?.[ns] ?? enUS$2[ns];
|
|
16754
17010
|
});
|
|
16755
17011
|
const dateLocaleRef = vue.computed(() => {
|
|
16756
17012
|
return mergedDateLocaleRef?.value ?? dateEnUs;
|
|
@@ -16777,14 +17033,16 @@
|
|
|
16777
17033
|
props: {
|
|
16778
17034
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
16779
17035
|
},
|
|
16780
|
-
ssr: ssrAdapter
|
|
17036
|
+
ssr: ssrAdapter,
|
|
17037
|
+
parent: UConfigProvider?.styleMountTarget
|
|
16781
17038
|
});
|
|
16782
17039
|
if (!UConfigProvider?.preflightStyleDisabled) {
|
|
16783
17040
|
globalStyle.mount({
|
|
16784
17041
|
id: "u-global",
|
|
16785
17042
|
head: true,
|
|
16786
17043
|
anchorMetaName: cssrAnchorMetaName,
|
|
16787
|
-
ssr: ssrAdapter
|
|
17044
|
+
ssr: ssrAdapter,
|
|
17045
|
+
parent: UConfigProvider?.styleMountTarget
|
|
16788
17046
|
});
|
|
16789
17047
|
}
|
|
16790
17048
|
};
|
|
@@ -16820,7 +17078,9 @@
|
|
|
16820
17078
|
|
|
16821
17079
|
function useThemeClass(componentName, hashRef, cssVarsRef, props) {
|
|
16822
17080
|
if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
|
|
16823
|
-
const
|
|
17081
|
+
const UConfigProvider = vue.inject(configProviderInjectionKey, null);
|
|
17082
|
+
const mergedThemeHashRef = UConfigProvider?.mergedThemeHashRef;
|
|
17083
|
+
const styleMountTarget = UConfigProvider?.styleMountTarget;
|
|
16824
17084
|
const themeClassRef = vue.ref("");
|
|
16825
17085
|
const ssrAdapter = useSsrAdapter();
|
|
16826
17086
|
let renderCallback;
|
|
@@ -16850,7 +17110,8 @@
|
|
|
16850
17110
|
}
|
|
16851
17111
|
c$1(`.${finalThemeHash}`, style).mount({
|
|
16852
17112
|
id: finalThemeHash,
|
|
16853
|
-
ssr: ssrAdapter
|
|
17113
|
+
ssr: ssrAdapter,
|
|
17114
|
+
parent: styleMountTarget
|
|
16854
17115
|
});
|
|
16855
17116
|
renderCallback = void 0;
|
|
16856
17117
|
};
|
|
@@ -16882,6 +17143,7 @@
|
|
|
16882
17143
|
}
|
|
16883
17144
|
return componentRtlState;
|
|
16884
17145
|
});
|
|
17146
|
+
const UConfigProvider = vue.inject(configProviderInjectionKey, null);
|
|
16885
17147
|
const mountStyle = () => {
|
|
16886
17148
|
vue.watchEffect(() => {
|
|
16887
17149
|
const {
|
|
@@ -16900,7 +17162,8 @@
|
|
|
16900
17162
|
props: {
|
|
16901
17163
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
16902
17164
|
},
|
|
16903
|
-
ssr: ssrAdapter
|
|
17165
|
+
ssr: ssrAdapter,
|
|
17166
|
+
parent: UConfigProvider?.styleMountTarget
|
|
16904
17167
|
});
|
|
16905
17168
|
});
|
|
16906
17169
|
};
|
|
@@ -35468,6 +35731,393 @@
|
|
|
35468
35731
|
return date;
|
|
35469
35732
|
}
|
|
35470
35733
|
|
|
35734
|
+
var formatDistanceLocale = {
|
|
35735
|
+
lessThanXSeconds: {
|
|
35736
|
+
one: 'less than a second',
|
|
35737
|
+
other: 'less than {{count}} seconds'
|
|
35738
|
+
},
|
|
35739
|
+
xSeconds: {
|
|
35740
|
+
one: '1 second',
|
|
35741
|
+
other: '{{count}} seconds'
|
|
35742
|
+
},
|
|
35743
|
+
halfAMinute: 'half a minute',
|
|
35744
|
+
lessThanXMinutes: {
|
|
35745
|
+
one: 'less than a minute',
|
|
35746
|
+
other: 'less than {{count}} minutes'
|
|
35747
|
+
},
|
|
35748
|
+
xMinutes: {
|
|
35749
|
+
one: '1 minute',
|
|
35750
|
+
other: '{{count}} minutes'
|
|
35751
|
+
},
|
|
35752
|
+
aboutXHours: {
|
|
35753
|
+
one: 'about 1 hour',
|
|
35754
|
+
other: 'about {{count}} hours'
|
|
35755
|
+
},
|
|
35756
|
+
xHours: {
|
|
35757
|
+
one: '1 hour',
|
|
35758
|
+
other: '{{count}} hours'
|
|
35759
|
+
},
|
|
35760
|
+
xDays: {
|
|
35761
|
+
one: '1 day',
|
|
35762
|
+
other: '{{count}} days'
|
|
35763
|
+
},
|
|
35764
|
+
aboutXWeeks: {
|
|
35765
|
+
one: 'about 1 week',
|
|
35766
|
+
other: 'about {{count}} weeks'
|
|
35767
|
+
},
|
|
35768
|
+
xWeeks: {
|
|
35769
|
+
one: '1 week',
|
|
35770
|
+
other: '{{count}} weeks'
|
|
35771
|
+
},
|
|
35772
|
+
aboutXMonths: {
|
|
35773
|
+
one: 'about 1 month',
|
|
35774
|
+
other: 'about {{count}} months'
|
|
35775
|
+
},
|
|
35776
|
+
xMonths: {
|
|
35777
|
+
one: '1 month',
|
|
35778
|
+
other: '{{count}} months'
|
|
35779
|
+
},
|
|
35780
|
+
aboutXYears: {
|
|
35781
|
+
one: 'about 1 year',
|
|
35782
|
+
other: 'about {{count}} years'
|
|
35783
|
+
},
|
|
35784
|
+
xYears: {
|
|
35785
|
+
one: '1 year',
|
|
35786
|
+
other: '{{count}} years'
|
|
35787
|
+
},
|
|
35788
|
+
overXYears: {
|
|
35789
|
+
one: 'over 1 year',
|
|
35790
|
+
other: 'over {{count}} years'
|
|
35791
|
+
},
|
|
35792
|
+
almostXYears: {
|
|
35793
|
+
one: 'almost 1 year',
|
|
35794
|
+
other: 'almost {{count}} years'
|
|
35795
|
+
}
|
|
35796
|
+
};
|
|
35797
|
+
var formatDistance = function (token, count, options) {
|
|
35798
|
+
var result;
|
|
35799
|
+
var tokenValue = formatDistanceLocale[token];
|
|
35800
|
+
if (typeof tokenValue === 'string') {
|
|
35801
|
+
result = tokenValue;
|
|
35802
|
+
} else if (count === 1) {
|
|
35803
|
+
result = tokenValue.one;
|
|
35804
|
+
} else {
|
|
35805
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
35806
|
+
}
|
|
35807
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
35808
|
+
if (options.comparison && options.comparison > 0) {
|
|
35809
|
+
return 'in ' + result;
|
|
35810
|
+
} else {
|
|
35811
|
+
return result + ' ago';
|
|
35812
|
+
}
|
|
35813
|
+
}
|
|
35814
|
+
return result;
|
|
35815
|
+
};
|
|
35816
|
+
|
|
35817
|
+
var dateFormats = {
|
|
35818
|
+
full: 'EEEE, MMMM do, y',
|
|
35819
|
+
long: 'MMMM do, y',
|
|
35820
|
+
medium: 'MMM d, y',
|
|
35821
|
+
short: 'MM/dd/yyyy'
|
|
35822
|
+
};
|
|
35823
|
+
var timeFormats = {
|
|
35824
|
+
full: 'h:mm:ss a zzzz',
|
|
35825
|
+
long: 'h:mm:ss a z',
|
|
35826
|
+
medium: 'h:mm:ss a',
|
|
35827
|
+
short: 'h:mm a'
|
|
35828
|
+
};
|
|
35829
|
+
var dateTimeFormats = {
|
|
35830
|
+
full: "{{date}} 'at' {{time}}",
|
|
35831
|
+
long: "{{date}} 'at' {{time}}",
|
|
35832
|
+
medium: '{{date}}, {{time}}',
|
|
35833
|
+
short: '{{date}}, {{time}}'
|
|
35834
|
+
};
|
|
35835
|
+
var formatLong = {
|
|
35836
|
+
date: buildFormatLongFn({
|
|
35837
|
+
formats: dateFormats,
|
|
35838
|
+
defaultWidth: 'full'
|
|
35839
|
+
}),
|
|
35840
|
+
time: buildFormatLongFn({
|
|
35841
|
+
formats: timeFormats,
|
|
35842
|
+
defaultWidth: 'full'
|
|
35843
|
+
}),
|
|
35844
|
+
dateTime: buildFormatLongFn({
|
|
35845
|
+
formats: dateTimeFormats,
|
|
35846
|
+
defaultWidth: 'full'
|
|
35847
|
+
})
|
|
35848
|
+
};
|
|
35849
|
+
|
|
35850
|
+
var formatRelativeLocale = {
|
|
35851
|
+
lastWeek: "'last' eeee 'at' p",
|
|
35852
|
+
yesterday: "'yesterday at' p",
|
|
35853
|
+
today: "'today at' p",
|
|
35854
|
+
tomorrow: "'tomorrow at' p",
|
|
35855
|
+
nextWeek: "eeee 'at' p",
|
|
35856
|
+
other: 'P'
|
|
35857
|
+
};
|
|
35858
|
+
var formatRelative = function (token, _date, _baseDate, _options) {
|
|
35859
|
+
return formatRelativeLocale[token];
|
|
35860
|
+
};
|
|
35861
|
+
|
|
35862
|
+
var eraValues = {
|
|
35863
|
+
narrow: ['B', 'A'],
|
|
35864
|
+
abbreviated: ['BC', 'AD'],
|
|
35865
|
+
wide: ['Before Christ', 'Anno Domini']
|
|
35866
|
+
};
|
|
35867
|
+
var quarterValues = {
|
|
35868
|
+
narrow: ['1', '2', '3', '4'],
|
|
35869
|
+
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
35870
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
35871
|
+
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
35872
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
35873
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
35874
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
35875
|
+
|
|
35876
|
+
var monthValues = {
|
|
35877
|
+
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
35878
|
+
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
35879
|
+
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
35880
|
+
};
|
|
35881
|
+
var dayValues = {
|
|
35882
|
+
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
35883
|
+
short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
35884
|
+
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
35885
|
+
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
35886
|
+
};
|
|
35887
|
+
var dayPeriodValues = {
|
|
35888
|
+
narrow: {
|
|
35889
|
+
am: 'a',
|
|
35890
|
+
pm: 'p',
|
|
35891
|
+
midnight: 'mi',
|
|
35892
|
+
noon: 'n',
|
|
35893
|
+
morning: 'morning',
|
|
35894
|
+
afternoon: 'afternoon',
|
|
35895
|
+
evening: 'evening',
|
|
35896
|
+
night: 'night'
|
|
35897
|
+
},
|
|
35898
|
+
abbreviated: {
|
|
35899
|
+
am: 'AM',
|
|
35900
|
+
pm: 'PM',
|
|
35901
|
+
midnight: 'midnight',
|
|
35902
|
+
noon: 'noon',
|
|
35903
|
+
morning: 'morning',
|
|
35904
|
+
afternoon: 'afternoon',
|
|
35905
|
+
evening: 'evening',
|
|
35906
|
+
night: 'night'
|
|
35907
|
+
},
|
|
35908
|
+
wide: {
|
|
35909
|
+
am: 'a.m.',
|
|
35910
|
+
pm: 'p.m.',
|
|
35911
|
+
midnight: 'midnight',
|
|
35912
|
+
noon: 'noon',
|
|
35913
|
+
morning: 'morning',
|
|
35914
|
+
afternoon: 'afternoon',
|
|
35915
|
+
evening: 'evening',
|
|
35916
|
+
night: 'night'
|
|
35917
|
+
}
|
|
35918
|
+
};
|
|
35919
|
+
var formattingDayPeriodValues = {
|
|
35920
|
+
narrow: {
|
|
35921
|
+
am: 'a',
|
|
35922
|
+
pm: 'p',
|
|
35923
|
+
midnight: 'mi',
|
|
35924
|
+
noon: 'n',
|
|
35925
|
+
morning: 'in the morning',
|
|
35926
|
+
afternoon: 'in the afternoon',
|
|
35927
|
+
evening: 'in the evening',
|
|
35928
|
+
night: 'at night'
|
|
35929
|
+
},
|
|
35930
|
+
abbreviated: {
|
|
35931
|
+
am: 'AM',
|
|
35932
|
+
pm: 'PM',
|
|
35933
|
+
midnight: 'midnight',
|
|
35934
|
+
noon: 'noon',
|
|
35935
|
+
morning: 'in the morning',
|
|
35936
|
+
afternoon: 'in the afternoon',
|
|
35937
|
+
evening: 'in the evening',
|
|
35938
|
+
night: 'at night'
|
|
35939
|
+
},
|
|
35940
|
+
wide: {
|
|
35941
|
+
am: 'a.m.',
|
|
35942
|
+
pm: 'p.m.',
|
|
35943
|
+
midnight: 'midnight',
|
|
35944
|
+
noon: 'noon',
|
|
35945
|
+
morning: 'in the morning',
|
|
35946
|
+
afternoon: 'in the afternoon',
|
|
35947
|
+
evening: 'in the evening',
|
|
35948
|
+
night: 'at night'
|
|
35949
|
+
}
|
|
35950
|
+
};
|
|
35951
|
+
var ordinalNumber = function (dirtyNumber, _options) {
|
|
35952
|
+
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
35953
|
+
// if they are different for different grammatical genders,
|
|
35954
|
+
// use `options.unit`.
|
|
35955
|
+
//
|
|
35956
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
35957
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
35958
|
+
|
|
35959
|
+
var rem100 = number % 100;
|
|
35960
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
35961
|
+
switch (rem100 % 10) {
|
|
35962
|
+
case 1:
|
|
35963
|
+
return number + 'st';
|
|
35964
|
+
case 2:
|
|
35965
|
+
return number + 'nd';
|
|
35966
|
+
case 3:
|
|
35967
|
+
return number + 'rd';
|
|
35968
|
+
}
|
|
35969
|
+
}
|
|
35970
|
+
return number + 'th';
|
|
35971
|
+
};
|
|
35972
|
+
var localize = {
|
|
35973
|
+
ordinalNumber: ordinalNumber,
|
|
35974
|
+
era: buildLocalizeFn({
|
|
35975
|
+
values: eraValues,
|
|
35976
|
+
defaultWidth: 'wide'
|
|
35977
|
+
}),
|
|
35978
|
+
quarter: buildLocalizeFn({
|
|
35979
|
+
values: quarterValues,
|
|
35980
|
+
defaultWidth: 'wide',
|
|
35981
|
+
argumentCallback: function (quarter) {
|
|
35982
|
+
return quarter - 1;
|
|
35983
|
+
}
|
|
35984
|
+
}),
|
|
35985
|
+
month: buildLocalizeFn({
|
|
35986
|
+
values: monthValues,
|
|
35987
|
+
defaultWidth: 'wide'
|
|
35988
|
+
}),
|
|
35989
|
+
day: buildLocalizeFn({
|
|
35990
|
+
values: dayValues,
|
|
35991
|
+
defaultWidth: 'wide'
|
|
35992
|
+
}),
|
|
35993
|
+
dayPeriod: buildLocalizeFn({
|
|
35994
|
+
values: dayPeriodValues,
|
|
35995
|
+
defaultWidth: 'wide',
|
|
35996
|
+
formattingValues: formattingDayPeriodValues,
|
|
35997
|
+
defaultFormattingWidth: 'wide'
|
|
35998
|
+
})
|
|
35999
|
+
};
|
|
36000
|
+
|
|
36001
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
36002
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
36003
|
+
var matchEraPatterns = {
|
|
36004
|
+
narrow: /^(b|a)/i,
|
|
36005
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
36006
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
36007
|
+
};
|
|
36008
|
+
var parseEraPatterns = {
|
|
36009
|
+
any: [/^b/i, /^(a|c)/i]
|
|
36010
|
+
};
|
|
36011
|
+
var matchQuarterPatterns = {
|
|
36012
|
+
narrow: /^[1234]/i,
|
|
36013
|
+
abbreviated: /^q[1234]/i,
|
|
36014
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
36015
|
+
};
|
|
36016
|
+
var parseQuarterPatterns = {
|
|
36017
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
36018
|
+
};
|
|
36019
|
+
var matchMonthPatterns = {
|
|
36020
|
+
narrow: /^[jfmasond]/i,
|
|
36021
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
36022
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
36023
|
+
};
|
|
36024
|
+
var parseMonthPatterns = {
|
|
36025
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
36026
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
36027
|
+
};
|
|
36028
|
+
var matchDayPatterns = {
|
|
36029
|
+
narrow: /^[smtwf]/i,
|
|
36030
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
36031
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
36032
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
36033
|
+
};
|
|
36034
|
+
var parseDayPatterns = {
|
|
36035
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
36036
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
36037
|
+
};
|
|
36038
|
+
var matchDayPeriodPatterns = {
|
|
36039
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
36040
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
36041
|
+
};
|
|
36042
|
+
var parseDayPeriodPatterns = {
|
|
36043
|
+
any: {
|
|
36044
|
+
am: /^a/i,
|
|
36045
|
+
pm: /^p/i,
|
|
36046
|
+
midnight: /^mi/i,
|
|
36047
|
+
noon: /^no/i,
|
|
36048
|
+
morning: /morning/i,
|
|
36049
|
+
afternoon: /afternoon/i,
|
|
36050
|
+
evening: /evening/i,
|
|
36051
|
+
night: /night/i
|
|
36052
|
+
}
|
|
36053
|
+
};
|
|
36054
|
+
var match = {
|
|
36055
|
+
ordinalNumber: buildMatchPatternFn({
|
|
36056
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
36057
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
36058
|
+
valueCallback: function (value) {
|
|
36059
|
+
return parseInt(value, 10);
|
|
36060
|
+
}
|
|
36061
|
+
}),
|
|
36062
|
+
era: buildMatchFn({
|
|
36063
|
+
matchPatterns: matchEraPatterns,
|
|
36064
|
+
defaultMatchWidth: 'wide',
|
|
36065
|
+
parsePatterns: parseEraPatterns,
|
|
36066
|
+
defaultParseWidth: 'any'
|
|
36067
|
+
}),
|
|
36068
|
+
quarter: buildMatchFn({
|
|
36069
|
+
matchPatterns: matchQuarterPatterns,
|
|
36070
|
+
defaultMatchWidth: 'wide',
|
|
36071
|
+
parsePatterns: parseQuarterPatterns,
|
|
36072
|
+
defaultParseWidth: 'any',
|
|
36073
|
+
valueCallback: function (index) {
|
|
36074
|
+
return index + 1;
|
|
36075
|
+
}
|
|
36076
|
+
}),
|
|
36077
|
+
month: buildMatchFn({
|
|
36078
|
+
matchPatterns: matchMonthPatterns,
|
|
36079
|
+
defaultMatchWidth: 'wide',
|
|
36080
|
+
parsePatterns: parseMonthPatterns,
|
|
36081
|
+
defaultParseWidth: 'any'
|
|
36082
|
+
}),
|
|
36083
|
+
day: buildMatchFn({
|
|
36084
|
+
matchPatterns: matchDayPatterns,
|
|
36085
|
+
defaultMatchWidth: 'wide',
|
|
36086
|
+
parsePatterns: parseDayPatterns,
|
|
36087
|
+
defaultParseWidth: 'any'
|
|
36088
|
+
}),
|
|
36089
|
+
dayPeriod: buildMatchFn({
|
|
36090
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
36091
|
+
defaultMatchWidth: 'any',
|
|
36092
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
36093
|
+
defaultParseWidth: 'any'
|
|
36094
|
+
})
|
|
36095
|
+
};
|
|
36096
|
+
|
|
36097
|
+
/**
|
|
36098
|
+
* @type {Locale}
|
|
36099
|
+
* @category Locales
|
|
36100
|
+
* @summary English locale (United States).
|
|
36101
|
+
* @language English
|
|
36102
|
+
* @iso-639-2 eng
|
|
36103
|
+
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
36104
|
+
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
36105
|
+
*/
|
|
36106
|
+
var locale = {
|
|
36107
|
+
code: 'en-US',
|
|
36108
|
+
formatDistance: formatDistance,
|
|
36109
|
+
formatLong: formatLong,
|
|
36110
|
+
formatRelative: formatRelative,
|
|
36111
|
+
localize: localize,
|
|
36112
|
+
match: match,
|
|
36113
|
+
options: {
|
|
36114
|
+
weekStartsOn: 0
|
|
36115
|
+
/* Sunday */,
|
|
36116
|
+
|
|
36117
|
+
firstWeekContainsDate: 1
|
|
36118
|
+
}
|
|
36119
|
+
};
|
|
36120
|
+
|
|
35471
36121
|
/**
|
|
35472
36122
|
* @name subMilliseconds
|
|
35473
36123
|
* @category Millisecond Helpers
|
|
@@ -36961,25 +37611,25 @@
|
|
|
36961
37611
|
requiredArgs$1(2, arguments);
|
|
36962
37612
|
var formatStr = String(dirtyFormatStr);
|
|
36963
37613
|
var options = dirtyOptions || {};
|
|
36964
|
-
var locale = options.locale || locale
|
|
36965
|
-
var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;
|
|
37614
|
+
var locale$1 = options.locale || locale;
|
|
37615
|
+
var localeFirstWeekContainsDate = locale$1.options && locale$1.options.firstWeekContainsDate;
|
|
36966
37616
|
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger$3(localeFirstWeekContainsDate);
|
|
36967
37617
|
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger$3(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
36968
37618
|
|
|
36969
37619
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
36970
37620
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
36971
37621
|
}
|
|
36972
|
-
var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;
|
|
37622
|
+
var localeWeekStartsOn = locale$1.options && locale$1.options.weekStartsOn;
|
|
36973
37623
|
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger$3(localeWeekStartsOn);
|
|
36974
37624
|
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger$3(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
36975
37625
|
|
|
36976
37626
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
36977
37627
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
36978
37628
|
}
|
|
36979
|
-
if (!locale.localize) {
|
|
37629
|
+
if (!locale$1.localize) {
|
|
36980
37630
|
throw new RangeError('locale must contain localize property');
|
|
36981
37631
|
}
|
|
36982
|
-
if (!locale.formatLong) {
|
|
37632
|
+
if (!locale$1.formatLong) {
|
|
36983
37633
|
throw new RangeError('locale must contain formatLong property');
|
|
36984
37634
|
}
|
|
36985
37635
|
var originalDate = toDate$2(dirtyDate);
|
|
@@ -36994,14 +37644,14 @@
|
|
|
36994
37644
|
var formatterOptions = {
|
|
36995
37645
|
firstWeekContainsDate: firstWeekContainsDate,
|
|
36996
37646
|
weekStartsOn: weekStartsOn,
|
|
36997
|
-
locale: locale,
|
|
37647
|
+
locale: locale$1,
|
|
36998
37648
|
_originalDate: originalDate
|
|
36999
37649
|
};
|
|
37000
37650
|
var result = formatStr.match(longFormattingTokensRegExp$1).map(function (substring) {
|
|
37001
37651
|
var firstCharacter = substring[0];
|
|
37002
37652
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
37003
37653
|
var longFormatter = longFormatters$1[firstCharacter];
|
|
37004
|
-
return longFormatter(substring, locale.formatLong, formatterOptions);
|
|
37654
|
+
return longFormatter(substring, locale$1.formatLong, formatterOptions);
|
|
37005
37655
|
}
|
|
37006
37656
|
return substring;
|
|
37007
37657
|
}).join('').match(formattingTokensRegExp$1).map(function (substring) {
|
|
@@ -37021,7 +37671,7 @@
|
|
|
37021
37671
|
if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken$1(substring)) {
|
|
37022
37672
|
throwProtectedError$1(substring, dirtyFormatStr, dirtyDate);
|
|
37023
37673
|
}
|
|
37024
|
-
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
37674
|
+
return formatter(utcDate, substring, locale$1.localize, formatterOptions);
|
|
37025
37675
|
}
|
|
37026
37676
|
if (firstCharacter.match(unescapedLatinCharacterRegExp$1)) {
|
|
37027
37677
|
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
@@ -37209,8 +37859,8 @@
|
|
|
37209
37859
|
function formatDistanceStrict(dirtyDate, dirtyBaseDate) {
|
|
37210
37860
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
37211
37861
|
requiredArgs$1(2, arguments);
|
|
37212
|
-
var locale = options.locale || locale
|
|
37213
|
-
if (!locale.formatDistance) {
|
|
37862
|
+
var locale$1 = options.locale || locale;
|
|
37863
|
+
if (!locale$1.formatDistance) {
|
|
37214
37864
|
throw new RangeError('locale must contain localize.formatDistance property');
|
|
37215
37865
|
}
|
|
37216
37866
|
var comparison = compareAsc(dirtyDate, dirtyBaseDate);
|
|
@@ -37267,22 +37917,22 @@
|
|
|
37267
37917
|
|
|
37268
37918
|
if (unit === 'second') {
|
|
37269
37919
|
var seconds = roundingMethodFn(milliseconds / 1000);
|
|
37270
|
-
return locale.formatDistance('xSeconds', seconds, localizeOptions); // 1 up to 60 mins
|
|
37920
|
+
return locale$1.formatDistance('xSeconds', seconds, localizeOptions); // 1 up to 60 mins
|
|
37271
37921
|
} else if (unit === 'minute') {
|
|
37272
37922
|
var roundedMinutes = roundingMethodFn(minutes);
|
|
37273
|
-
return locale.formatDistance('xMinutes', roundedMinutes, localizeOptions); // 1 up to 24 hours
|
|
37923
|
+
return locale$1.formatDistance('xMinutes', roundedMinutes, localizeOptions); // 1 up to 24 hours
|
|
37274
37924
|
} else if (unit === 'hour') {
|
|
37275
37925
|
var hours = roundingMethodFn(minutes / 60);
|
|
37276
|
-
return locale.formatDistance('xHours', hours, localizeOptions); // 1 up to 30 days
|
|
37926
|
+
return locale$1.formatDistance('xHours', hours, localizeOptions); // 1 up to 30 days
|
|
37277
37927
|
} else if (unit === 'day') {
|
|
37278
37928
|
var days = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_DAY);
|
|
37279
|
-
return locale.formatDistance('xDays', days, localizeOptions); // 1 up to 12 months
|
|
37929
|
+
return locale$1.formatDistance('xDays', days, localizeOptions); // 1 up to 12 months
|
|
37280
37930
|
} else if (unit === 'month') {
|
|
37281
37931
|
var months = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_MONTH);
|
|
37282
|
-
return months === 12 && options.unit !== 'month' ? locale.formatDistance('xYears', 1, localizeOptions) : locale.formatDistance('xMonths', months, localizeOptions); // 1 year up to max Date
|
|
37932
|
+
return months === 12 && options.unit !== 'month' ? locale$1.formatDistance('xYears', 1, localizeOptions) : locale$1.formatDistance('xMonths', months, localizeOptions); // 1 year up to max Date
|
|
37283
37933
|
} else if (unit === 'year') {
|
|
37284
37934
|
var years = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_YEAR);
|
|
37285
|
-
return locale.formatDistance('xYears', years, localizeOptions);
|
|
37935
|
+
return locale$1.formatDistance('xYears', years, localizeOptions);
|
|
37286
37936
|
}
|
|
37287
37937
|
throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
|
|
37288
37938
|
}
|
|
@@ -39392,18 +40042,18 @@
|
|
|
39392
40042
|
var dateString = String(dirtyDateString);
|
|
39393
40043
|
var formatString = String(dirtyFormatString);
|
|
39394
40044
|
var options = dirtyOptions || {};
|
|
39395
|
-
var locale = options.locale || locale
|
|
39396
|
-
if (!locale.match) {
|
|
40045
|
+
var locale$1 = options.locale || locale;
|
|
40046
|
+
if (!locale$1.match) {
|
|
39397
40047
|
throw new RangeError('locale must contain match property');
|
|
39398
40048
|
}
|
|
39399
|
-
var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;
|
|
40049
|
+
var localeFirstWeekContainsDate = locale$1.options && locale$1.options.firstWeekContainsDate;
|
|
39400
40050
|
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger$3(localeFirstWeekContainsDate);
|
|
39401
40051
|
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger$3(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
39402
40052
|
|
|
39403
40053
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
39404
40054
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
39405
40055
|
}
|
|
39406
|
-
var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;
|
|
40056
|
+
var localeWeekStartsOn = locale$1.options && locale$1.options.weekStartsOn;
|
|
39407
40057
|
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger$3(localeWeekStartsOn);
|
|
39408
40058
|
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger$3(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
39409
40059
|
|
|
@@ -39420,7 +40070,7 @@
|
|
|
39420
40070
|
var subFnOptions = {
|
|
39421
40071
|
firstWeekContainsDate: firstWeekContainsDate,
|
|
39422
40072
|
weekStartsOn: weekStartsOn,
|
|
39423
|
-
locale: locale
|
|
40073
|
+
locale: locale$1
|
|
39424
40074
|
}; // If timezone isn't specified, it will be set to the system timezone
|
|
39425
40075
|
|
|
39426
40076
|
var setters = [{
|
|
@@ -39434,7 +40084,7 @@
|
|
|
39434
40084
|
var firstCharacter = substring[0];
|
|
39435
40085
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
39436
40086
|
var longFormatter = longFormatters$1[firstCharacter];
|
|
39437
|
-
return longFormatter(substring, locale.formatLong, subFnOptions);
|
|
40087
|
+
return longFormatter(substring, locale$1.formatLong, subFnOptions);
|
|
39438
40088
|
}
|
|
39439
40089
|
return substring;
|
|
39440
40090
|
}).join('').match(formattingTokensRegExp);
|
|
@@ -39470,7 +40120,7 @@
|
|
|
39470
40120
|
token: firstCharacter,
|
|
39471
40121
|
fullToken: token
|
|
39472
40122
|
});
|
|
39473
|
-
var parseResult = parser.parse(dateString, token, locale.match, subFnOptions);
|
|
40123
|
+
var parseResult = parser.parse(dateString, token, locale$1.match, subFnOptions);
|
|
39474
40124
|
if (!parseResult) {
|
|
39475
40125
|
return new Date(NaN);
|
|
39476
40126
|
}
|
|
@@ -62339,6 +62989,7 @@
|
|
|
62339
62989
|
default: "desktop-first"
|
|
62340
62990
|
},
|
|
62341
62991
|
preflightStyleDisabled: Boolean,
|
|
62992
|
+
styleMountTarget: Object,
|
|
62342
62993
|
inlineThemeDisabled: {
|
|
62343
62994
|
type: Boolean,
|
|
62344
62995
|
default: void 0
|
|
@@ -62540,6 +63191,7 @@
|
|
|
62540
63191
|
});
|
|
62541
63192
|
const inlineThemeDisabled = props.inlineThemeDisabled || UConfigProvider?.inlineThemeDisabled;
|
|
62542
63193
|
const preflightStyleDisabled = props.preflightStyleDisabled || UConfigProvider?.preflightStyleDisabled;
|
|
63194
|
+
const styleMountTarget = props.styleMountTarget || UConfigProvider?.styleMountTarget;
|
|
62543
63195
|
const mergedThemeHashRef = vue.computed(() => {
|
|
62544
63196
|
const {
|
|
62545
63197
|
value: theme
|
|
@@ -62604,7 +63256,8 @@
|
|
|
62604
63256
|
mergedThemeRef,
|
|
62605
63257
|
mergedThemeOverridesRef,
|
|
62606
63258
|
inlineThemeDisabled: inlineThemeDisabled || false,
|
|
62607
|
-
preflightStyleDisabled: preflightStyleDisabled || false
|
|
63259
|
+
preflightStyleDisabled: preflightStyleDisabled || false,
|
|
63260
|
+
styleMountTarget
|
|
62608
63261
|
});
|
|
62609
63262
|
return {
|
|
62610
63263
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -64318,6 +64971,7 @@
|
|
|
64318
64971
|
default: "current"
|
|
64319
64972
|
},
|
|
64320
64973
|
scrollbarProps: Object,
|
|
64974
|
+
localStorageKey: String,
|
|
64321
64975
|
renderCell: Function,
|
|
64322
64976
|
defaultEmptyValue: [String, Function],
|
|
64323
64977
|
renderExpandIcon: Function,
|
|
@@ -65140,17 +65794,26 @@
|
|
|
65140
65794
|
}
|
|
65141
65795
|
function createCustomWidthStyle(column, resizedWidth) {
|
|
65142
65796
|
if (resizedWidth !== void 0) {
|
|
65797
|
+
const numWidth = depx(resizedWidth);
|
|
65798
|
+
const minMaxColumn = column && "minWidth" in column && "maxWidth" in column ? column : null;
|
|
65799
|
+
const clampedNum = minMaxColumn ? clampValueFollowCSSRules(numWidth, minMaxColumn.minWidth, minMaxColumn.maxWidth) : numWidth;
|
|
65800
|
+
const clamped = formatLength(clampedNum);
|
|
65143
65801
|
return {
|
|
65144
|
-
width:
|
|
65145
|
-
minWidth:
|
|
65146
|
-
maxWidth:
|
|
65802
|
+
width: clamped,
|
|
65803
|
+
minWidth: clamped,
|
|
65804
|
+
maxWidth: clamped
|
|
65147
65805
|
};
|
|
65148
65806
|
}
|
|
65149
|
-
const
|
|
65150
|
-
const
|
|
65151
|
-
|
|
65152
|
-
|
|
65153
|
-
|
|
65807
|
+
const explicitNum = getNumberColWidth(column) ?? void 0;
|
|
65808
|
+
const minWidth = column && "minWidth" in column ? column.minWidth : void 0;
|
|
65809
|
+
const maxWidth = column && "maxWidth" in column ? column.maxWidth : void 0;
|
|
65810
|
+
let widthNum = explicitNum;
|
|
65811
|
+
if (widthNum === void 0 && (minWidth !== void 0 || maxWidth !== void 0)) {
|
|
65812
|
+
widthNum = clampValueFollowCSSRules(maxWidth !== void 0 ? typeof maxWidth === "number" ? maxWidth : parseFloat(maxWidth) : minWidth !== void 0 ? typeof minWidth === "number" ? minWidth : parseFloat(minWidth) : 0, minWidth, maxWidth);
|
|
65813
|
+
} else if (widthNum !== void 0 && (minWidth !== void 0 || maxWidth !== void 0)) {
|
|
65814
|
+
widthNum = clampValueFollowCSSRules(widthNum, minWidth, maxWidth);
|
|
65815
|
+
}
|
|
65816
|
+
const width = widthNum !== void 0 ? formatLength(widthNum) : getStringColWidth(column);
|
|
65154
65817
|
return {
|
|
65155
65818
|
width,
|
|
65156
65819
|
minWidth: formatLength(minWidth) || width,
|
|
@@ -65702,6 +66365,7 @@
|
|
|
65702
66365
|
headerCheckboxDisabledRef,
|
|
65703
66366
|
sizeRef,
|
|
65704
66367
|
onUnstableColumnResize,
|
|
66368
|
+
getResizableWidth,
|
|
65705
66369
|
doUpdateResizableWidth,
|
|
65706
66370
|
handleTableHeaderScroll,
|
|
65707
66371
|
deriveNextSorter,
|
|
@@ -65733,13 +66397,22 @@
|
|
|
65733
66397
|
deriveNextSorter(nextSorter);
|
|
65734
66398
|
}
|
|
65735
66399
|
const resizeStartWidthMap = /* @__PURE__ */ new Map();
|
|
66400
|
+
function getColumnStartWidth(column) {
|
|
66401
|
+
const actual = getCellActualWidth(column.key);
|
|
66402
|
+
if (actual !== void 0 && actual > 0) return actual;
|
|
66403
|
+
const resized = getResizableWidth(column.key);
|
|
66404
|
+
if (resized !== void 0 && resized > 0) return resized;
|
|
66405
|
+
return getNumberColWidth(column);
|
|
66406
|
+
}
|
|
65736
66407
|
function handleColumnResizeStart(column) {
|
|
65737
|
-
resizeStartWidthMap.set(column.key,
|
|
66408
|
+
resizeStartWidthMap.set(column.key, getColumnStartWidth(column));
|
|
65738
66409
|
}
|
|
65739
66410
|
function handleColumnResize(column, displacementX) {
|
|
65740
|
-
|
|
66411
|
+
let startWidth = resizeStartWidthMap.get(column.key);
|
|
65741
66412
|
if (startWidth === void 0) {
|
|
65742
|
-
|
|
66413
|
+
startWidth = getColumnStartWidth(column);
|
|
66414
|
+
if (startWidth === void 0) return;
|
|
66415
|
+
resizeStartWidthMap.set(column.key, startWidth);
|
|
65743
66416
|
}
|
|
65744
66417
|
const widthAfterResize = startWidth + displacementX;
|
|
65745
66418
|
const limitWidth = clampValueFollowCSSRules(
|
|
@@ -84370,6 +85043,7 @@
|
|
|
84370
85043
|
emptyPropsRef
|
|
84371
85044
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84372
85045
|
} = vue.inject(dataTableInjectionKey);
|
|
85046
|
+
const UConfigProvider = vue.inject(configProviderInjectionKey, null);
|
|
84373
85047
|
const scrollbarInstRef = vue.ref(null);
|
|
84374
85048
|
const virtualListRef = vue.ref(null);
|
|
84375
85049
|
const emptyElRef = vue.ref(null);
|
|
@@ -84557,13 +85231,15 @@
|
|
|
84557
85231
|
id: `u-${componentId}`,
|
|
84558
85232
|
force: true,
|
|
84559
85233
|
props: cProps,
|
|
84560
|
-
anchorMetaName: cssrAnchorMetaName
|
|
85234
|
+
anchorMetaName: cssrAnchorMetaName,
|
|
85235
|
+
parent: UConfigProvider?.styleMountTarget
|
|
84561
85236
|
});
|
|
84562
85237
|
fixedStyleMounted = true;
|
|
84563
85238
|
});
|
|
84564
85239
|
vue.onUnmounted(() => {
|
|
84565
85240
|
style.unmount({
|
|
84566
|
-
id: `u-${componentId}
|
|
85241
|
+
id: `u-${componentId}`,
|
|
85242
|
+
parent: UConfigProvider?.styleMountTarget
|
|
84567
85243
|
});
|
|
84568
85244
|
});
|
|
84569
85245
|
return {
|
|
@@ -85538,7 +86214,8 @@
|
|
|
85538
86214
|
sort,
|
|
85539
86215
|
sortedDataRef,
|
|
85540
86216
|
mergedSortStateRef,
|
|
85541
|
-
deriveNextSorter
|
|
86217
|
+
deriveNextSorter,
|
|
86218
|
+
doUpdateSorter
|
|
85542
86219
|
};
|
|
85543
86220
|
}
|
|
85544
86221
|
|
|
@@ -85667,7 +86344,8 @@
|
|
|
85667
86344
|
deriveNextSorter,
|
|
85668
86345
|
mergedSortStateRef,
|
|
85669
86346
|
sort,
|
|
85670
|
-
clearSorter
|
|
86347
|
+
clearSorter,
|
|
86348
|
+
doUpdateSorter
|
|
85671
86349
|
} = useSorter(props, {
|
|
85672
86350
|
dataRelatedColsRef,
|
|
85673
86351
|
filteredDataRef
|
|
@@ -85849,6 +86527,9 @@
|
|
|
85849
86527
|
warn$2("data-table", "`filters` is not an object");
|
|
85850
86528
|
}
|
|
85851
86529
|
}
|
|
86530
|
+
function restoreSortState(sortState) {
|
|
86531
|
+
doUpdateSorter(sortState);
|
|
86532
|
+
}
|
|
85852
86533
|
return {
|
|
85853
86534
|
treeMateRef,
|
|
85854
86535
|
mergedCurrentPageRef: boundedMergedCurrentPageRef,
|
|
@@ -85865,6 +86546,7 @@
|
|
|
85865
86546
|
doUpdatePageSize,
|
|
85866
86547
|
doUpdatePage,
|
|
85867
86548
|
onUnstableColumnResize,
|
|
86549
|
+
restoreSortState,
|
|
85868
86550
|
// exported methods
|
|
85869
86551
|
filter,
|
|
85870
86552
|
filters,
|
|
@@ -86110,7 +86792,8 @@
|
|
|
86110
86792
|
return {
|
|
86111
86793
|
getResizableWidth,
|
|
86112
86794
|
doUpdateResizableWidth,
|
|
86113
|
-
clearResizableWidth
|
|
86795
|
+
clearResizableWidth,
|
|
86796
|
+
resizableWidthsRef
|
|
86114
86797
|
};
|
|
86115
86798
|
}
|
|
86116
86799
|
|
|
@@ -86267,6 +86950,42 @@
|
|
|
86267
86950
|
};
|
|
86268
86951
|
}
|
|
86269
86952
|
|
|
86953
|
+
const STORAGE_KEY_PREFIX = "u-data-table:";
|
|
86954
|
+
function getStorageKey(key) {
|
|
86955
|
+
return `${STORAGE_KEY_PREFIX}${key}`;
|
|
86956
|
+
}
|
|
86957
|
+
function loadTableState(localStorageKey) {
|
|
86958
|
+
try {
|
|
86959
|
+
const raw = localStorage.getItem(getStorageKey(localStorageKey));
|
|
86960
|
+
if (!raw) return null;
|
|
86961
|
+
return JSON.parse(raw);
|
|
86962
|
+
} catch {
|
|
86963
|
+
return null;
|
|
86964
|
+
}
|
|
86965
|
+
}
|
|
86966
|
+
function saveTableState(localStorageKey, state) {
|
|
86967
|
+
try {
|
|
86968
|
+
localStorage.setItem(getStorageKey(localStorageKey), JSON.stringify(state));
|
|
86969
|
+
} catch {
|
|
86970
|
+
console.warn(`Could not set localStorage value for ${localStorageKey}`);
|
|
86971
|
+
}
|
|
86972
|
+
}
|
|
86973
|
+
function restoreSortStateFromStored(stored, dataRelatedCols) {
|
|
86974
|
+
if (!stored?.length) return null;
|
|
86975
|
+
const result = [];
|
|
86976
|
+
for (const item of stored) {
|
|
86977
|
+
const column = dataRelatedCols.find(col => col.type !== "selection" && col.type !== "expand" && "key" in col && col.key === item.columnKey && col.sorter !== void 0);
|
|
86978
|
+
if (column?.sorter) {
|
|
86979
|
+
result.push({
|
|
86980
|
+
columnKey: item.columnKey,
|
|
86981
|
+
order: item.order,
|
|
86982
|
+
sorter: column.sorter
|
|
86983
|
+
});
|
|
86984
|
+
}
|
|
86985
|
+
}
|
|
86986
|
+
return result.length ? result : null;
|
|
86987
|
+
}
|
|
86988
|
+
|
|
86270
86989
|
const fixedColumnStyle = createFixedColumnStyle();
|
|
86271
86990
|
var style$P = c$1([cB("data-table", `
|
|
86272
86991
|
width: 100%;
|
|
@@ -86736,7 +87455,12 @@
|
|
|
86736
87455
|
);
|
|
86737
87456
|
const bodyWidthRef = vue.ref(null);
|
|
86738
87457
|
const mainTableInstRef = vue.ref(null);
|
|
86739
|
-
const {
|
|
87458
|
+
const {
|
|
87459
|
+
getResizableWidth,
|
|
87460
|
+
clearResizableWidth,
|
|
87461
|
+
doUpdateResizableWidth,
|
|
87462
|
+
resizableWidthsRef
|
|
87463
|
+
} = useResizable();
|
|
86740
87464
|
const { rowsRef, colsRef, dataRelatedColsRef, hasEllipsisRef } = useGroupHeader(props, getResizableWidth);
|
|
86741
87465
|
const {
|
|
86742
87466
|
treeMateRef,
|
|
@@ -86750,9 +87474,11 @@
|
|
|
86750
87474
|
mergedSortStateRef,
|
|
86751
87475
|
childTriggerColIndexRef,
|
|
86752
87476
|
doUpdatePage,
|
|
87477
|
+
doUpdatePageSize,
|
|
86753
87478
|
doUpdateFilters,
|
|
86754
87479
|
onUnstableColumnResize,
|
|
86755
87480
|
deriveNextSorter,
|
|
87481
|
+
restoreSortState,
|
|
86756
87482
|
filter,
|
|
86757
87483
|
filters,
|
|
86758
87484
|
clearFilter,
|
|
@@ -86766,6 +87492,8 @@
|
|
|
86766
87492
|
doUncheckAll,
|
|
86767
87493
|
doCheck,
|
|
86768
87494
|
doUncheck,
|
|
87495
|
+
doUpdateCheckedRowKeys,
|
|
87496
|
+
mergedCheckedRowKeysRef,
|
|
86769
87497
|
headerCheckboxDisabledRef,
|
|
86770
87498
|
someRowsCheckedRef,
|
|
86771
87499
|
allRowsCheckedRef,
|
|
@@ -86801,6 +87529,68 @@
|
|
|
86801
87529
|
mainTableInstRef,
|
|
86802
87530
|
mergedCurrentPageRef
|
|
86803
87531
|
});
|
|
87532
|
+
vue.onMounted(() => {
|
|
87533
|
+
const key = props.localStorageKey;
|
|
87534
|
+
if (!key) return;
|
|
87535
|
+
const stored = loadTableState(key);
|
|
87536
|
+
if (!stored) return;
|
|
87537
|
+
if (stored.columnWidths && Object.keys(stored.columnWidths).length > 0) {
|
|
87538
|
+
resizableWidthsRef.value = {
|
|
87539
|
+
...resizableWidthsRef.value,
|
|
87540
|
+
...stored.columnWidths
|
|
87541
|
+
};
|
|
87542
|
+
}
|
|
87543
|
+
if (props.pagination && stored.page != null) {
|
|
87544
|
+
doUpdatePage(stored.page);
|
|
87545
|
+
}
|
|
87546
|
+
if (props.pagination && stored.pageSize != null) {
|
|
87547
|
+
doUpdatePageSize(stored.pageSize);
|
|
87548
|
+
}
|
|
87549
|
+
if (stored.filters) {
|
|
87550
|
+
filter(stored.filters);
|
|
87551
|
+
}
|
|
87552
|
+
const sortToRestore = restoreSortStateFromStored(
|
|
87553
|
+
stored.sortState,
|
|
87554
|
+
dataRelatedColsRef.value
|
|
87555
|
+
);
|
|
87556
|
+
if (sortToRestore?.length) {
|
|
87557
|
+
restoreSortState(sortToRestore);
|
|
87558
|
+
}
|
|
87559
|
+
if (stored.checkedRowKeys?.length) {
|
|
87560
|
+
doUpdateCheckedRowKeys(stored.checkedRowKeys, void 0, "check");
|
|
87561
|
+
}
|
|
87562
|
+
if (stored.expandedRowKeys?.length) {
|
|
87563
|
+
doUpdateExpandedRowKeys(stored.expandedRowKeys);
|
|
87564
|
+
}
|
|
87565
|
+
});
|
|
87566
|
+
vue.watch(
|
|
87567
|
+
() => props.localStorageKey ? {
|
|
87568
|
+
key: props.localStorageKey,
|
|
87569
|
+
columnWidths: resizableWidthsRef.value,
|
|
87570
|
+
page: mergedPaginationRef.value?.page,
|
|
87571
|
+
pageSize: mergedPaginationRef.value?.pageSize,
|
|
87572
|
+
filters: mergedFilterStateRef.value,
|
|
87573
|
+
sortState: mergedSortStateRef.value.map((s) => ({
|
|
87574
|
+
columnKey: s.columnKey,
|
|
87575
|
+
order: s.order
|
|
87576
|
+
})),
|
|
87577
|
+
checkedRowKeys: mergedCheckedRowKeysRef.value,
|
|
87578
|
+
expandedRowKeys: mergedExpandedRowKeysRef.value
|
|
87579
|
+
} : null,
|
|
87580
|
+
(state) => {
|
|
87581
|
+
if (!state?.key) return;
|
|
87582
|
+
saveTableState(state.key, {
|
|
87583
|
+
columnWidths: state.columnWidths,
|
|
87584
|
+
page: state.page,
|
|
87585
|
+
pageSize: state.pageSize,
|
|
87586
|
+
filters: state.filters,
|
|
87587
|
+
sortState: state.sortState.length ? state.sortState : void 0,
|
|
87588
|
+
checkedRowKeys: state.checkedRowKeys?.length ? state.checkedRowKeys : void 0,
|
|
87589
|
+
expandedRowKeys: state.expandedRowKeys?.length ? state.expandedRowKeys : void 0
|
|
87590
|
+
});
|
|
87591
|
+
},
|
|
87592
|
+
{ deep: true }
|
|
87593
|
+
);
|
|
86804
87594
|
const { localeRef } = useLocale("DataTable");
|
|
86805
87595
|
const mergedTableLayoutRef = vue.computed(() => {
|
|
86806
87596
|
if (props.virtualScroll || props.flexHeight || props.maxHeight !== void 0 || hasEllipsisRef.value) {
|
|
@@ -87474,855 +88264,175 @@
|
|
|
87474
88264
|
default: obj
|
|
87475
88265
|
};
|
|
87476
88266
|
}
|
|
87477
|
-
function cloneObject(dirtyObject) {
|
|
87478
|
-
return (0, _index.default)({}, dirtyObject);
|
|
87479
|
-
}
|
|
87480
|
-
module.exports = exports.default;
|
|
87481
|
-
} (cloneObject$1, cloneObject$1.exports));
|
|
87482
|
-
|
|
87483
|
-
var cloneObjectExports = cloneObject$1.exports;
|
|
87484
|
-
var cloneObject = /*@__PURE__*/getDefaultExportFromCjs(cloneObjectExports);
|
|
87485
|
-
|
|
87486
|
-
var format$3 = {exports: {}};
|
|
87487
|
-
|
|
87488
|
-
var isValid = {exports: {}};
|
|
87489
|
-
|
|
87490
|
-
var isDate = {exports: {}};
|
|
87491
|
-
|
|
87492
|
-
var requiredArgs = {exports: {}};
|
|
87493
|
-
|
|
87494
|
-
(function (module, exports) {
|
|
87495
|
-
|
|
87496
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87497
|
-
value: true
|
|
87498
|
-
});
|
|
87499
|
-
exports.default = requiredArgs;
|
|
87500
|
-
function requiredArgs(required, args) {
|
|
87501
|
-
if (args.length < required) {
|
|
87502
|
-
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
87503
|
-
}
|
|
87504
|
-
}
|
|
87505
|
-
module.exports = exports.default;
|
|
87506
|
-
} (requiredArgs, requiredArgs.exports));
|
|
87507
|
-
|
|
87508
|
-
var requiredArgsExports = requiredArgs.exports;
|
|
87509
|
-
|
|
87510
|
-
(function (module, exports) {
|
|
87511
|
-
|
|
87512
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87513
|
-
value: true
|
|
87514
|
-
});
|
|
87515
|
-
exports.default = isDate;
|
|
87516
|
-
var _index = _interopRequireDefault(requiredArgsExports);
|
|
87517
|
-
function _interopRequireDefault(obj) {
|
|
87518
|
-
return obj && obj.__esModule ? obj : {
|
|
87519
|
-
default: obj
|
|
87520
|
-
};
|
|
87521
|
-
}
|
|
87522
|
-
|
|
87523
|
-
/**
|
|
87524
|
-
* @name isDate
|
|
87525
|
-
* @category Common Helpers
|
|
87526
|
-
* @summary Is the given value a date?
|
|
87527
|
-
*
|
|
87528
|
-
* @description
|
|
87529
|
-
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
87530
|
-
*
|
|
87531
|
-
* ### v2.0.0 breaking changes:
|
|
87532
|
-
*
|
|
87533
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
87534
|
-
*
|
|
87535
|
-
* @param {*} value - the value to check
|
|
87536
|
-
* @returns {boolean} true if the given value is a date
|
|
87537
|
-
* @throws {TypeError} 1 arguments required
|
|
87538
|
-
*
|
|
87539
|
-
* @example
|
|
87540
|
-
* // For a valid date:
|
|
87541
|
-
* const result = isDate(new Date())
|
|
87542
|
-
* //=> true
|
|
87543
|
-
*
|
|
87544
|
-
* @example
|
|
87545
|
-
* // For an invalid date:
|
|
87546
|
-
* const result = isDate(new Date(NaN))
|
|
87547
|
-
* //=> true
|
|
87548
|
-
*
|
|
87549
|
-
* @example
|
|
87550
|
-
* // For some value:
|
|
87551
|
-
* const result = isDate('2014-02-31')
|
|
87552
|
-
* //=> false
|
|
87553
|
-
*
|
|
87554
|
-
* @example
|
|
87555
|
-
* // For an object:
|
|
87556
|
-
* const result = isDate({})
|
|
87557
|
-
* //=> false
|
|
87558
|
-
*/
|
|
87559
|
-
function isDate(value) {
|
|
87560
|
-
(0, _index.default)(1, arguments);
|
|
87561
|
-
return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
87562
|
-
}
|
|
87563
|
-
module.exports = exports.default;
|
|
87564
|
-
} (isDate, isDate.exports));
|
|
87565
|
-
|
|
87566
|
-
var isDateExports = isDate.exports;
|
|
87567
|
-
|
|
87568
|
-
var toDate$1 = {exports: {}};
|
|
87569
|
-
|
|
87570
|
-
(function (module, exports) {
|
|
87571
|
-
|
|
87572
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87573
|
-
value: true
|
|
87574
|
-
});
|
|
87575
|
-
exports.default = toDate;
|
|
87576
|
-
var _index = _interopRequireDefault(requiredArgsExports);
|
|
87577
|
-
function _interopRequireDefault(obj) {
|
|
87578
|
-
return obj && obj.__esModule ? obj : {
|
|
87579
|
-
default: obj
|
|
87580
|
-
};
|
|
87581
|
-
}
|
|
87582
|
-
|
|
87583
|
-
/**
|
|
87584
|
-
* @name toDate
|
|
87585
|
-
* @category Common Helpers
|
|
87586
|
-
* @summary Convert the given argument to an instance of Date.
|
|
87587
|
-
*
|
|
87588
|
-
* @description
|
|
87589
|
-
* Convert the given argument to an instance of Date.
|
|
87590
|
-
*
|
|
87591
|
-
* If the argument is an instance of Date, the function returns its clone.
|
|
87592
|
-
*
|
|
87593
|
-
* If the argument is a number, it is treated as a timestamp.
|
|
87594
|
-
*
|
|
87595
|
-
* If the argument is none of the above, the function returns Invalid Date.
|
|
87596
|
-
*
|
|
87597
|
-
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
87598
|
-
*
|
|
87599
|
-
* @param {Date|Number} argument - the value to convert
|
|
87600
|
-
* @returns {Date} the parsed date in the local time zone
|
|
87601
|
-
* @throws {TypeError} 1 argument required
|
|
87602
|
-
*
|
|
87603
|
-
* @example
|
|
87604
|
-
* // Clone the date:
|
|
87605
|
-
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
87606
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
87607
|
-
*
|
|
87608
|
-
* @example
|
|
87609
|
-
* // Convert the timestamp to date:
|
|
87610
|
-
* const result = toDate(1392098430000)
|
|
87611
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
87612
|
-
*/
|
|
87613
|
-
function toDate(argument) {
|
|
87614
|
-
(0, _index.default)(1, arguments);
|
|
87615
|
-
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
87616
|
-
|
|
87617
|
-
if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
|
|
87618
|
-
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
87619
|
-
return new Date(argument.getTime());
|
|
87620
|
-
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
87621
|
-
return new Date(argument);
|
|
87622
|
-
} else {
|
|
87623
|
-
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
87624
|
-
// eslint-disable-next-line no-console
|
|
87625
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console
|
|
87626
|
-
|
|
87627
|
-
console.warn(new Error().stack);
|
|
87628
|
-
}
|
|
87629
|
-
return new Date(NaN);
|
|
87630
|
-
}
|
|
87631
|
-
}
|
|
87632
|
-
module.exports = exports.default;
|
|
87633
|
-
} (toDate$1, toDate$1.exports));
|
|
87634
|
-
|
|
87635
|
-
var toDateExports = toDate$1.exports;
|
|
87636
|
-
|
|
87637
|
-
(function (module, exports) {
|
|
87638
|
-
|
|
87639
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87640
|
-
value: true
|
|
87641
|
-
});
|
|
87642
|
-
exports.default = isValid;
|
|
87643
|
-
var _index = _interopRequireDefault(isDateExports);
|
|
87644
|
-
var _index2 = _interopRequireDefault(toDateExports);
|
|
87645
|
-
var _index3 = _interopRequireDefault(requiredArgsExports);
|
|
87646
|
-
function _interopRequireDefault(obj) {
|
|
87647
|
-
return obj && obj.__esModule ? obj : {
|
|
87648
|
-
default: obj
|
|
87649
|
-
};
|
|
87650
|
-
}
|
|
87651
|
-
|
|
87652
|
-
/**
|
|
87653
|
-
* @name isValid
|
|
87654
|
-
* @category Common Helpers
|
|
87655
|
-
* @summary Is the given date valid?
|
|
87656
|
-
*
|
|
87657
|
-
* @description
|
|
87658
|
-
* Returns false if argument is Invalid Date and true otherwise.
|
|
87659
|
-
* Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
|
|
87660
|
-
* Invalid Date is a Date, whose time value is NaN.
|
|
87661
|
-
*
|
|
87662
|
-
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
87663
|
-
*
|
|
87664
|
-
* ### v2.0.0 breaking changes:
|
|
87665
|
-
*
|
|
87666
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
87667
|
-
*
|
|
87668
|
-
* - Now `isValid` doesn't throw an exception
|
|
87669
|
-
* if the first argument is not an instance of Date.
|
|
87670
|
-
* Instead, argument is converted beforehand using `toDate`.
|
|
87671
|
-
*
|
|
87672
|
-
* Examples:
|
|
87673
|
-
*
|
|
87674
|
-
* | `isValid` argument | Before v2.0.0 | v2.0.0 onward |
|
|
87675
|
-
* |---------------------------|---------------|---------------|
|
|
87676
|
-
* | `new Date()` | `true` | `true` |
|
|
87677
|
-
* | `new Date('2016-01-01')` | `true` | `true` |
|
|
87678
|
-
* | `new Date('')` | `false` | `false` |
|
|
87679
|
-
* | `new Date(1488370835081)` | `true` | `true` |
|
|
87680
|
-
* | `new Date(NaN)` | `false` | `false` |
|
|
87681
|
-
* | `'2016-01-01'` | `TypeError` | `false` |
|
|
87682
|
-
* | `''` | `TypeError` | `false` |
|
|
87683
|
-
* | `1488370835081` | `TypeError` | `true` |
|
|
87684
|
-
* | `NaN` | `TypeError` | `false` |
|
|
87685
|
-
*
|
|
87686
|
-
* We introduce this change to make *date-fns* consistent with ECMAScript behavior
|
|
87687
|
-
* that try to coerce arguments to the expected type
|
|
87688
|
-
* (which is also the case with other *date-fns* functions).
|
|
87689
|
-
*
|
|
87690
|
-
* @param {*} date - the date to check
|
|
87691
|
-
* @returns {Boolean} the date is valid
|
|
87692
|
-
* @throws {TypeError} 1 argument required
|
|
87693
|
-
*
|
|
87694
|
-
* @example
|
|
87695
|
-
* // For the valid date:
|
|
87696
|
-
* const result = isValid(new Date(2014, 1, 31))
|
|
87697
|
-
* //=> true
|
|
87698
|
-
*
|
|
87699
|
-
* @example
|
|
87700
|
-
* // For the value, convertable into a date:
|
|
87701
|
-
* const result = isValid(1393804800000)
|
|
87702
|
-
* //=> true
|
|
87703
|
-
*
|
|
87704
|
-
* @example
|
|
87705
|
-
* // For the invalid date:
|
|
87706
|
-
* const result = isValid(new Date(''))
|
|
87707
|
-
* //=> false
|
|
87708
|
-
*/
|
|
87709
|
-
function isValid(dirtyDate) {
|
|
87710
|
-
(0, _index3.default)(1, arguments);
|
|
87711
|
-
if (!(0, _index.default)(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
87712
|
-
return false;
|
|
87713
|
-
}
|
|
87714
|
-
var date = (0, _index2.default)(dirtyDate);
|
|
87715
|
-
return !isNaN(Number(date));
|
|
87716
|
-
}
|
|
87717
|
-
module.exports = exports.default;
|
|
87718
|
-
} (isValid, isValid.exports));
|
|
87719
|
-
|
|
87720
|
-
var isValidExports = isValid.exports;
|
|
87721
|
-
|
|
87722
|
-
var enUS = {exports: {}};
|
|
87723
|
-
|
|
87724
|
-
var formatDistance = {exports: {}};
|
|
87725
|
-
|
|
87726
|
-
(function (module, exports) {
|
|
87727
|
-
|
|
87728
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87729
|
-
value: true
|
|
87730
|
-
});
|
|
87731
|
-
exports.default = void 0;
|
|
87732
|
-
var formatDistanceLocale = {
|
|
87733
|
-
lessThanXSeconds: {
|
|
87734
|
-
one: 'less than a second',
|
|
87735
|
-
other: 'less than {{count}} seconds'
|
|
87736
|
-
},
|
|
87737
|
-
xSeconds: {
|
|
87738
|
-
one: '1 second',
|
|
87739
|
-
other: '{{count}} seconds'
|
|
87740
|
-
},
|
|
87741
|
-
halfAMinute: 'half a minute',
|
|
87742
|
-
lessThanXMinutes: {
|
|
87743
|
-
one: 'less than a minute',
|
|
87744
|
-
other: 'less than {{count}} minutes'
|
|
87745
|
-
},
|
|
87746
|
-
xMinutes: {
|
|
87747
|
-
one: '1 minute',
|
|
87748
|
-
other: '{{count}} minutes'
|
|
87749
|
-
},
|
|
87750
|
-
aboutXHours: {
|
|
87751
|
-
one: 'about 1 hour',
|
|
87752
|
-
other: 'about {{count}} hours'
|
|
87753
|
-
},
|
|
87754
|
-
xHours: {
|
|
87755
|
-
one: '1 hour',
|
|
87756
|
-
other: '{{count}} hours'
|
|
87757
|
-
},
|
|
87758
|
-
xDays: {
|
|
87759
|
-
one: '1 day',
|
|
87760
|
-
other: '{{count}} days'
|
|
87761
|
-
},
|
|
87762
|
-
aboutXWeeks: {
|
|
87763
|
-
one: 'about 1 week',
|
|
87764
|
-
other: 'about {{count}} weeks'
|
|
87765
|
-
},
|
|
87766
|
-
xWeeks: {
|
|
87767
|
-
one: '1 week',
|
|
87768
|
-
other: '{{count}} weeks'
|
|
87769
|
-
},
|
|
87770
|
-
aboutXMonths: {
|
|
87771
|
-
one: 'about 1 month',
|
|
87772
|
-
other: 'about {{count}} months'
|
|
87773
|
-
},
|
|
87774
|
-
xMonths: {
|
|
87775
|
-
one: '1 month',
|
|
87776
|
-
other: '{{count}} months'
|
|
87777
|
-
},
|
|
87778
|
-
aboutXYears: {
|
|
87779
|
-
one: 'about 1 year',
|
|
87780
|
-
other: 'about {{count}} years'
|
|
87781
|
-
},
|
|
87782
|
-
xYears: {
|
|
87783
|
-
one: '1 year',
|
|
87784
|
-
other: '{{count}} years'
|
|
87785
|
-
},
|
|
87786
|
-
overXYears: {
|
|
87787
|
-
one: 'over 1 year',
|
|
87788
|
-
other: 'over {{count}} years'
|
|
87789
|
-
},
|
|
87790
|
-
almostXYears: {
|
|
87791
|
-
one: 'almost 1 year',
|
|
87792
|
-
other: 'almost {{count}} years'
|
|
87793
|
-
}
|
|
87794
|
-
};
|
|
87795
|
-
var formatDistance = function (token, count, options) {
|
|
87796
|
-
var result;
|
|
87797
|
-
var tokenValue = formatDistanceLocale[token];
|
|
87798
|
-
if (typeof tokenValue === 'string') {
|
|
87799
|
-
result = tokenValue;
|
|
87800
|
-
} else if (count === 1) {
|
|
87801
|
-
result = tokenValue.one;
|
|
87802
|
-
} else {
|
|
87803
|
-
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
87804
|
-
}
|
|
87805
|
-
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
87806
|
-
if (options.comparison && options.comparison > 0) {
|
|
87807
|
-
return 'in ' + result;
|
|
87808
|
-
} else {
|
|
87809
|
-
return result + ' ago';
|
|
87810
|
-
}
|
|
87811
|
-
}
|
|
87812
|
-
return result;
|
|
87813
|
-
};
|
|
87814
|
-
var _default = formatDistance;
|
|
87815
|
-
exports.default = _default;
|
|
87816
|
-
module.exports = exports.default;
|
|
87817
|
-
} (formatDistance, formatDistance.exports));
|
|
87818
|
-
|
|
87819
|
-
var formatDistanceExports = formatDistance.exports;
|
|
87820
|
-
|
|
87821
|
-
var formatLong = {exports: {}};
|
|
87822
|
-
|
|
87823
|
-
var buildFormatLongFn = {exports: {}};
|
|
87824
|
-
|
|
87825
|
-
(function (module, exports) {
|
|
87826
|
-
|
|
87827
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87828
|
-
value: true
|
|
87829
|
-
});
|
|
87830
|
-
exports.default = buildFormatLongFn;
|
|
87831
|
-
function buildFormatLongFn(args) {
|
|
87832
|
-
return function () {
|
|
87833
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
87834
|
-
// TODO: Remove String()
|
|
87835
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
87836
|
-
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
87837
|
-
return format;
|
|
87838
|
-
};
|
|
87839
|
-
}
|
|
87840
|
-
module.exports = exports.default;
|
|
87841
|
-
} (buildFormatLongFn, buildFormatLongFn.exports));
|
|
87842
|
-
|
|
87843
|
-
var buildFormatLongFnExports = buildFormatLongFn.exports;
|
|
87844
|
-
|
|
87845
|
-
(function (module, exports) {
|
|
87846
|
-
|
|
87847
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87848
|
-
value: true
|
|
87849
|
-
});
|
|
87850
|
-
exports.default = void 0;
|
|
87851
|
-
var _index = _interopRequireDefault(buildFormatLongFnExports);
|
|
87852
|
-
function _interopRequireDefault(obj) {
|
|
87853
|
-
return obj && obj.__esModule ? obj : {
|
|
87854
|
-
default: obj
|
|
87855
|
-
};
|
|
87856
|
-
}
|
|
87857
|
-
var dateFormats = {
|
|
87858
|
-
full: 'EEEE, MMMM do, y',
|
|
87859
|
-
long: 'MMMM do, y',
|
|
87860
|
-
medium: 'MMM d, y',
|
|
87861
|
-
short: 'MM/dd/yyyy'
|
|
87862
|
-
};
|
|
87863
|
-
var timeFormats = {
|
|
87864
|
-
full: 'h:mm:ss a zzzz',
|
|
87865
|
-
long: 'h:mm:ss a z',
|
|
87866
|
-
medium: 'h:mm:ss a',
|
|
87867
|
-
short: 'h:mm a'
|
|
87868
|
-
};
|
|
87869
|
-
var dateTimeFormats = {
|
|
87870
|
-
full: "{{date}} 'at' {{time}}",
|
|
87871
|
-
long: "{{date}} 'at' {{time}}",
|
|
87872
|
-
medium: '{{date}}, {{time}}',
|
|
87873
|
-
short: '{{date}}, {{time}}'
|
|
87874
|
-
};
|
|
87875
|
-
var formatLong = {
|
|
87876
|
-
date: (0, _index.default)({
|
|
87877
|
-
formats: dateFormats,
|
|
87878
|
-
defaultWidth: 'full'
|
|
87879
|
-
}),
|
|
87880
|
-
time: (0, _index.default)({
|
|
87881
|
-
formats: timeFormats,
|
|
87882
|
-
defaultWidth: 'full'
|
|
87883
|
-
}),
|
|
87884
|
-
dateTime: (0, _index.default)({
|
|
87885
|
-
formats: dateTimeFormats,
|
|
87886
|
-
defaultWidth: 'full'
|
|
87887
|
-
})
|
|
87888
|
-
};
|
|
87889
|
-
var _default = formatLong;
|
|
87890
|
-
exports.default = _default;
|
|
87891
|
-
module.exports = exports.default;
|
|
87892
|
-
} (formatLong, formatLong.exports));
|
|
87893
|
-
|
|
87894
|
-
var formatLongExports = formatLong.exports;
|
|
87895
|
-
|
|
87896
|
-
var formatRelative = {exports: {}};
|
|
87897
|
-
|
|
87898
|
-
(function (module, exports) {
|
|
87899
|
-
|
|
87900
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87901
|
-
value: true
|
|
87902
|
-
});
|
|
87903
|
-
exports.default = void 0;
|
|
87904
|
-
var formatRelativeLocale = {
|
|
87905
|
-
lastWeek: "'last' eeee 'at' p",
|
|
87906
|
-
yesterday: "'yesterday at' p",
|
|
87907
|
-
today: "'today at' p",
|
|
87908
|
-
tomorrow: "'tomorrow at' p",
|
|
87909
|
-
nextWeek: "eeee 'at' p",
|
|
87910
|
-
other: 'P'
|
|
87911
|
-
};
|
|
87912
|
-
var formatRelative = function (token, _date, _baseDate, _options) {
|
|
87913
|
-
return formatRelativeLocale[token];
|
|
87914
|
-
};
|
|
87915
|
-
var _default = formatRelative;
|
|
87916
|
-
exports.default = _default;
|
|
87917
|
-
module.exports = exports.default;
|
|
87918
|
-
} (formatRelative, formatRelative.exports));
|
|
87919
|
-
|
|
87920
|
-
var formatRelativeExports = formatRelative.exports;
|
|
87921
|
-
|
|
87922
|
-
var localize = {exports: {}};
|
|
87923
|
-
|
|
87924
|
-
var buildLocalizeFn = {exports: {}};
|
|
87925
|
-
|
|
87926
|
-
(function (module, exports) {
|
|
87927
|
-
|
|
87928
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87929
|
-
value: true
|
|
87930
|
-
});
|
|
87931
|
-
exports.default = buildLocalizeFn;
|
|
87932
|
-
function buildLocalizeFn(args) {
|
|
87933
|
-
return function (dirtyIndex, dirtyOptions) {
|
|
87934
|
-
var options = dirtyOptions || {};
|
|
87935
|
-
var context = options.context ? String(options.context) : 'standalone';
|
|
87936
|
-
var valuesArray;
|
|
87937
|
-
if (context === 'formatting' && args.formattingValues) {
|
|
87938
|
-
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
87939
|
-
var width = options.width ? String(options.width) : defaultWidth;
|
|
87940
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
87941
|
-
} else {
|
|
87942
|
-
var _defaultWidth = args.defaultWidth;
|
|
87943
|
-
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
87944
|
-
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
87945
|
-
}
|
|
87946
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
87947
|
-
|
|
87948
|
-
return valuesArray[index];
|
|
87949
|
-
};
|
|
87950
|
-
}
|
|
87951
|
-
module.exports = exports.default;
|
|
87952
|
-
} (buildLocalizeFn, buildLocalizeFn.exports));
|
|
87953
|
-
|
|
87954
|
-
var buildLocalizeFnExports = buildLocalizeFn.exports;
|
|
87955
|
-
|
|
87956
|
-
(function (module, exports) {
|
|
87957
|
-
|
|
87958
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87959
|
-
value: true
|
|
87960
|
-
});
|
|
87961
|
-
exports.default = void 0;
|
|
87962
|
-
var _index = _interopRequireDefault(buildLocalizeFnExports);
|
|
87963
|
-
function _interopRequireDefault(obj) {
|
|
87964
|
-
return obj && obj.__esModule ? obj : {
|
|
87965
|
-
default: obj
|
|
87966
|
-
};
|
|
87967
|
-
}
|
|
87968
|
-
var eraValues = {
|
|
87969
|
-
narrow: ['B', 'A'],
|
|
87970
|
-
abbreviated: ['BC', 'AD'],
|
|
87971
|
-
wide: ['Before Christ', 'Anno Domini']
|
|
87972
|
-
};
|
|
87973
|
-
var quarterValues = {
|
|
87974
|
-
narrow: ['1', '2', '3', '4'],
|
|
87975
|
-
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
87976
|
-
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
87977
|
-
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
87978
|
-
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
87979
|
-
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
87980
|
-
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
88267
|
+
function cloneObject(dirtyObject) {
|
|
88268
|
+
return (0, _index.default)({}, dirtyObject);
|
|
88269
|
+
}
|
|
88270
|
+
module.exports = exports.default;
|
|
88271
|
+
} (cloneObject$1, cloneObject$1.exports));
|
|
87981
88272
|
|
|
87982
|
-
|
|
87983
|
-
|
|
87984
|
-
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
87985
|
-
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
87986
|
-
};
|
|
87987
|
-
var dayValues = {
|
|
87988
|
-
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
87989
|
-
short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
87990
|
-
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
87991
|
-
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
87992
|
-
};
|
|
87993
|
-
var dayPeriodValues = {
|
|
87994
|
-
narrow: {
|
|
87995
|
-
am: 'a',
|
|
87996
|
-
pm: 'p',
|
|
87997
|
-
midnight: 'mi',
|
|
87998
|
-
noon: 'n',
|
|
87999
|
-
morning: 'morning',
|
|
88000
|
-
afternoon: 'afternoon',
|
|
88001
|
-
evening: 'evening',
|
|
88002
|
-
night: 'night'
|
|
88003
|
-
},
|
|
88004
|
-
abbreviated: {
|
|
88005
|
-
am: 'AM',
|
|
88006
|
-
pm: 'PM',
|
|
88007
|
-
midnight: 'midnight',
|
|
88008
|
-
noon: 'noon',
|
|
88009
|
-
morning: 'morning',
|
|
88010
|
-
afternoon: 'afternoon',
|
|
88011
|
-
evening: 'evening',
|
|
88012
|
-
night: 'night'
|
|
88013
|
-
},
|
|
88014
|
-
wide: {
|
|
88015
|
-
am: 'a.m.',
|
|
88016
|
-
pm: 'p.m.',
|
|
88017
|
-
midnight: 'midnight',
|
|
88018
|
-
noon: 'noon',
|
|
88019
|
-
morning: 'morning',
|
|
88020
|
-
afternoon: 'afternoon',
|
|
88021
|
-
evening: 'evening',
|
|
88022
|
-
night: 'night'
|
|
88023
|
-
}
|
|
88024
|
-
};
|
|
88025
|
-
var formattingDayPeriodValues = {
|
|
88026
|
-
narrow: {
|
|
88027
|
-
am: 'a',
|
|
88028
|
-
pm: 'p',
|
|
88029
|
-
midnight: 'mi',
|
|
88030
|
-
noon: 'n',
|
|
88031
|
-
morning: 'in the morning',
|
|
88032
|
-
afternoon: 'in the afternoon',
|
|
88033
|
-
evening: 'in the evening',
|
|
88034
|
-
night: 'at night'
|
|
88035
|
-
},
|
|
88036
|
-
abbreviated: {
|
|
88037
|
-
am: 'AM',
|
|
88038
|
-
pm: 'PM',
|
|
88039
|
-
midnight: 'midnight',
|
|
88040
|
-
noon: 'noon',
|
|
88041
|
-
morning: 'in the morning',
|
|
88042
|
-
afternoon: 'in the afternoon',
|
|
88043
|
-
evening: 'in the evening',
|
|
88044
|
-
night: 'at night'
|
|
88045
|
-
},
|
|
88046
|
-
wide: {
|
|
88047
|
-
am: 'a.m.',
|
|
88048
|
-
pm: 'p.m.',
|
|
88049
|
-
midnight: 'midnight',
|
|
88050
|
-
noon: 'noon',
|
|
88051
|
-
morning: 'in the morning',
|
|
88052
|
-
afternoon: 'in the afternoon',
|
|
88053
|
-
evening: 'in the evening',
|
|
88054
|
-
night: 'at night'
|
|
88055
|
-
}
|
|
88056
|
-
};
|
|
88057
|
-
var ordinalNumber = function (dirtyNumber, _options) {
|
|
88058
|
-
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
88059
|
-
// if they are different for different grammatical genders,
|
|
88060
|
-
// use `options.unit`.
|
|
88061
|
-
//
|
|
88062
|
-
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
88063
|
-
// 'day', 'hour', 'minute', 'second'.
|
|
88273
|
+
var cloneObjectExports = cloneObject$1.exports;
|
|
88274
|
+
var cloneObject = /*@__PURE__*/getDefaultExportFromCjs(cloneObjectExports);
|
|
88064
88275
|
|
|
88065
|
-
|
|
88066
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
88067
|
-
switch (rem100 % 10) {
|
|
88068
|
-
case 1:
|
|
88069
|
-
return number + 'st';
|
|
88070
|
-
case 2:
|
|
88071
|
-
return number + 'nd';
|
|
88072
|
-
case 3:
|
|
88073
|
-
return number + 'rd';
|
|
88074
|
-
}
|
|
88075
|
-
}
|
|
88076
|
-
return number + 'th';
|
|
88077
|
-
};
|
|
88078
|
-
var localize = {
|
|
88079
|
-
ordinalNumber: ordinalNumber,
|
|
88080
|
-
era: (0, _index.default)({
|
|
88081
|
-
values: eraValues,
|
|
88082
|
-
defaultWidth: 'wide'
|
|
88083
|
-
}),
|
|
88084
|
-
quarter: (0, _index.default)({
|
|
88085
|
-
values: quarterValues,
|
|
88086
|
-
defaultWidth: 'wide',
|
|
88087
|
-
argumentCallback: function (quarter) {
|
|
88088
|
-
return quarter - 1;
|
|
88089
|
-
}
|
|
88090
|
-
}),
|
|
88091
|
-
month: (0, _index.default)({
|
|
88092
|
-
values: monthValues,
|
|
88093
|
-
defaultWidth: 'wide'
|
|
88094
|
-
}),
|
|
88095
|
-
day: (0, _index.default)({
|
|
88096
|
-
values: dayValues,
|
|
88097
|
-
defaultWidth: 'wide'
|
|
88098
|
-
}),
|
|
88099
|
-
dayPeriod: (0, _index.default)({
|
|
88100
|
-
values: dayPeriodValues,
|
|
88101
|
-
defaultWidth: 'wide',
|
|
88102
|
-
formattingValues: formattingDayPeriodValues,
|
|
88103
|
-
defaultFormattingWidth: 'wide'
|
|
88104
|
-
})
|
|
88105
|
-
};
|
|
88106
|
-
var _default = localize;
|
|
88107
|
-
exports.default = _default;
|
|
88108
|
-
module.exports = exports.default;
|
|
88109
|
-
} (localize, localize.exports));
|
|
88276
|
+
var format$3 = {exports: {}};
|
|
88110
88277
|
|
|
88111
|
-
var
|
|
88278
|
+
var isValid = {exports: {}};
|
|
88112
88279
|
|
|
88113
|
-
var
|
|
88280
|
+
var isDate = {exports: {}};
|
|
88114
88281
|
|
|
88115
|
-
var
|
|
88282
|
+
var requiredArgs = {exports: {}};
|
|
88116
88283
|
|
|
88117
88284
|
(function (module, exports) {
|
|
88118
88285
|
|
|
88119
88286
|
Object.defineProperty(exports, "__esModule", {
|
|
88120
88287
|
value: true
|
|
88121
88288
|
});
|
|
88122
|
-
exports.default =
|
|
88123
|
-
function
|
|
88124
|
-
|
|
88125
|
-
|
|
88126
|
-
var width = options.width;
|
|
88127
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
88128
|
-
var matchResult = string.match(matchPattern);
|
|
88129
|
-
if (!matchResult) {
|
|
88130
|
-
return null;
|
|
88131
|
-
}
|
|
88132
|
-
var matchedString = matchResult[0];
|
|
88133
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
88134
|
-
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
88135
|
-
return pattern.test(matchedString);
|
|
88136
|
-
}) : findKey(parsePatterns, function (pattern) {
|
|
88137
|
-
return pattern.test(matchedString);
|
|
88138
|
-
});
|
|
88139
|
-
var value;
|
|
88140
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
88141
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
88142
|
-
var rest = string.slice(matchedString.length);
|
|
88143
|
-
return {
|
|
88144
|
-
value: value,
|
|
88145
|
-
rest: rest
|
|
88146
|
-
};
|
|
88147
|
-
};
|
|
88148
|
-
}
|
|
88149
|
-
function findKey(object, predicate) {
|
|
88150
|
-
for (var key in object) {
|
|
88151
|
-
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
88152
|
-
return key;
|
|
88153
|
-
}
|
|
88154
|
-
}
|
|
88155
|
-
return undefined;
|
|
88156
|
-
}
|
|
88157
|
-
function findIndex(array, predicate) {
|
|
88158
|
-
for (var key = 0; key < array.length; key++) {
|
|
88159
|
-
if (predicate(array[key])) {
|
|
88160
|
-
return key;
|
|
88161
|
-
}
|
|
88289
|
+
exports.default = requiredArgs;
|
|
88290
|
+
function requiredArgs(required, args) {
|
|
88291
|
+
if (args.length < required) {
|
|
88292
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
88162
88293
|
}
|
|
88163
|
-
return undefined;
|
|
88164
88294
|
}
|
|
88165
88295
|
module.exports = exports.default;
|
|
88166
|
-
} (
|
|
88167
|
-
|
|
88168
|
-
var buildMatchFnExports = buildMatchFn.exports;
|
|
88296
|
+
} (requiredArgs, requiredArgs.exports));
|
|
88169
88297
|
|
|
88170
|
-
var
|
|
88298
|
+
var requiredArgsExports = requiredArgs.exports;
|
|
88171
88299
|
|
|
88172
88300
|
(function (module, exports) {
|
|
88173
88301
|
|
|
88174
88302
|
Object.defineProperty(exports, "__esModule", {
|
|
88175
88303
|
value: true
|
|
88176
88304
|
});
|
|
88177
|
-
exports.default =
|
|
88178
|
-
|
|
88179
|
-
|
|
88180
|
-
|
|
88181
|
-
|
|
88182
|
-
if (!matchResult) return null;
|
|
88183
|
-
var matchedString = matchResult[0];
|
|
88184
|
-
var parseResult = string.match(args.parsePattern);
|
|
88185
|
-
if (!parseResult) return null;
|
|
88186
|
-
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
88187
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
88188
|
-
var rest = string.slice(matchedString.length);
|
|
88189
|
-
return {
|
|
88190
|
-
value: value,
|
|
88191
|
-
rest: rest
|
|
88192
|
-
};
|
|
88305
|
+
exports.default = isDate;
|
|
88306
|
+
var _index = _interopRequireDefault(requiredArgsExports);
|
|
88307
|
+
function _interopRequireDefault(obj) {
|
|
88308
|
+
return obj && obj.__esModule ? obj : {
|
|
88309
|
+
default: obj
|
|
88193
88310
|
};
|
|
88194
88311
|
}
|
|
88312
|
+
|
|
88313
|
+
/**
|
|
88314
|
+
* @name isDate
|
|
88315
|
+
* @category Common Helpers
|
|
88316
|
+
* @summary Is the given value a date?
|
|
88317
|
+
*
|
|
88318
|
+
* @description
|
|
88319
|
+
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
88320
|
+
*
|
|
88321
|
+
* ### v2.0.0 breaking changes:
|
|
88322
|
+
*
|
|
88323
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
88324
|
+
*
|
|
88325
|
+
* @param {*} value - the value to check
|
|
88326
|
+
* @returns {boolean} true if the given value is a date
|
|
88327
|
+
* @throws {TypeError} 1 arguments required
|
|
88328
|
+
*
|
|
88329
|
+
* @example
|
|
88330
|
+
* // For a valid date:
|
|
88331
|
+
* const result = isDate(new Date())
|
|
88332
|
+
* //=> true
|
|
88333
|
+
*
|
|
88334
|
+
* @example
|
|
88335
|
+
* // For an invalid date:
|
|
88336
|
+
* const result = isDate(new Date(NaN))
|
|
88337
|
+
* //=> true
|
|
88338
|
+
*
|
|
88339
|
+
* @example
|
|
88340
|
+
* // For some value:
|
|
88341
|
+
* const result = isDate('2014-02-31')
|
|
88342
|
+
* //=> false
|
|
88343
|
+
*
|
|
88344
|
+
* @example
|
|
88345
|
+
* // For an object:
|
|
88346
|
+
* const result = isDate({})
|
|
88347
|
+
* //=> false
|
|
88348
|
+
*/
|
|
88349
|
+
function isDate(value) {
|
|
88350
|
+
(0, _index.default)(1, arguments);
|
|
88351
|
+
return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
88352
|
+
}
|
|
88195
88353
|
module.exports = exports.default;
|
|
88196
|
-
} (
|
|
88354
|
+
} (isDate, isDate.exports));
|
|
88355
|
+
|
|
88356
|
+
var isDateExports = isDate.exports;
|
|
88197
88357
|
|
|
88198
|
-
var
|
|
88358
|
+
var toDate$1 = {exports: {}};
|
|
88199
88359
|
|
|
88200
88360
|
(function (module, exports) {
|
|
88201
88361
|
|
|
88202
88362
|
Object.defineProperty(exports, "__esModule", {
|
|
88203
88363
|
value: true
|
|
88204
88364
|
});
|
|
88205
|
-
exports.default =
|
|
88206
|
-
var _index = _interopRequireDefault(
|
|
88207
|
-
var _index2 = _interopRequireDefault(buildMatchPatternFnExports);
|
|
88365
|
+
exports.default = toDate;
|
|
88366
|
+
var _index = _interopRequireDefault(requiredArgsExports);
|
|
88208
88367
|
function _interopRequireDefault(obj) {
|
|
88209
88368
|
return obj && obj.__esModule ? obj : {
|
|
88210
88369
|
default: obj
|
|
88211
88370
|
};
|
|
88212
88371
|
}
|
|
88213
|
-
|
|
88214
|
-
|
|
88215
|
-
|
|
88216
|
-
|
|
88217
|
-
|
|
88218
|
-
|
|
88219
|
-
|
|
88220
|
-
|
|
88221
|
-
|
|
88222
|
-
|
|
88223
|
-
|
|
88224
|
-
|
|
88225
|
-
|
|
88226
|
-
|
|
88227
|
-
|
|
88228
|
-
|
|
88229
|
-
|
|
88230
|
-
|
|
88231
|
-
|
|
88232
|
-
|
|
88233
|
-
|
|
88234
|
-
|
|
88235
|
-
|
|
88236
|
-
|
|
88237
|
-
|
|
88238
|
-
|
|
88239
|
-
|
|
88240
|
-
|
|
88241
|
-
|
|
88242
|
-
|
|
88243
|
-
|
|
88244
|
-
|
|
88245
|
-
|
|
88246
|
-
|
|
88247
|
-
|
|
88248
|
-
|
|
88249
|
-
|
|
88250
|
-
|
|
88251
|
-
|
|
88252
|
-
|
|
88253
|
-
|
|
88254
|
-
|
|
88255
|
-
|
|
88256
|
-
|
|
88257
|
-
|
|
88258
|
-
|
|
88259
|
-
noon: /^no/i,
|
|
88260
|
-
morning: /morning/i,
|
|
88261
|
-
afternoon: /afternoon/i,
|
|
88262
|
-
evening: /evening/i,
|
|
88263
|
-
night: /night/i
|
|
88264
|
-
}
|
|
88265
|
-
};
|
|
88266
|
-
var match = {
|
|
88267
|
-
ordinalNumber: (0, _index2.default)({
|
|
88268
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
88269
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
88270
|
-
valueCallback: function (value) {
|
|
88271
|
-
return parseInt(value, 10);
|
|
88272
|
-
}
|
|
88273
|
-
}),
|
|
88274
|
-
era: (0, _index.default)({
|
|
88275
|
-
matchPatterns: matchEraPatterns,
|
|
88276
|
-
defaultMatchWidth: 'wide',
|
|
88277
|
-
parsePatterns: parseEraPatterns,
|
|
88278
|
-
defaultParseWidth: 'any'
|
|
88279
|
-
}),
|
|
88280
|
-
quarter: (0, _index.default)({
|
|
88281
|
-
matchPatterns: matchQuarterPatterns,
|
|
88282
|
-
defaultMatchWidth: 'wide',
|
|
88283
|
-
parsePatterns: parseQuarterPatterns,
|
|
88284
|
-
defaultParseWidth: 'any',
|
|
88285
|
-
valueCallback: function (index) {
|
|
88286
|
-
return index + 1;
|
|
88372
|
+
|
|
88373
|
+
/**
|
|
88374
|
+
* @name toDate
|
|
88375
|
+
* @category Common Helpers
|
|
88376
|
+
* @summary Convert the given argument to an instance of Date.
|
|
88377
|
+
*
|
|
88378
|
+
* @description
|
|
88379
|
+
* Convert the given argument to an instance of Date.
|
|
88380
|
+
*
|
|
88381
|
+
* If the argument is an instance of Date, the function returns its clone.
|
|
88382
|
+
*
|
|
88383
|
+
* If the argument is a number, it is treated as a timestamp.
|
|
88384
|
+
*
|
|
88385
|
+
* If the argument is none of the above, the function returns Invalid Date.
|
|
88386
|
+
*
|
|
88387
|
+
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
88388
|
+
*
|
|
88389
|
+
* @param {Date|Number} argument - the value to convert
|
|
88390
|
+
* @returns {Date} the parsed date in the local time zone
|
|
88391
|
+
* @throws {TypeError} 1 argument required
|
|
88392
|
+
*
|
|
88393
|
+
* @example
|
|
88394
|
+
* // Clone the date:
|
|
88395
|
+
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
88396
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
88397
|
+
*
|
|
88398
|
+
* @example
|
|
88399
|
+
* // Convert the timestamp to date:
|
|
88400
|
+
* const result = toDate(1392098430000)
|
|
88401
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
88402
|
+
*/
|
|
88403
|
+
function toDate(argument) {
|
|
88404
|
+
(0, _index.default)(1, arguments);
|
|
88405
|
+
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
88406
|
+
|
|
88407
|
+
if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
|
|
88408
|
+
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
88409
|
+
return new Date(argument.getTime());
|
|
88410
|
+
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
88411
|
+
return new Date(argument);
|
|
88412
|
+
} else {
|
|
88413
|
+
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
88414
|
+
// eslint-disable-next-line no-console
|
|
88415
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console
|
|
88416
|
+
|
|
88417
|
+
console.warn(new Error().stack);
|
|
88287
88418
|
}
|
|
88288
|
-
|
|
88289
|
-
|
|
88290
|
-
|
|
88291
|
-
defaultMatchWidth: 'wide',
|
|
88292
|
-
parsePatterns: parseMonthPatterns,
|
|
88293
|
-
defaultParseWidth: 'any'
|
|
88294
|
-
}),
|
|
88295
|
-
day: (0, _index.default)({
|
|
88296
|
-
matchPatterns: matchDayPatterns,
|
|
88297
|
-
defaultMatchWidth: 'wide',
|
|
88298
|
-
parsePatterns: parseDayPatterns,
|
|
88299
|
-
defaultParseWidth: 'any'
|
|
88300
|
-
}),
|
|
88301
|
-
dayPeriod: (0, _index.default)({
|
|
88302
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
88303
|
-
defaultMatchWidth: 'any',
|
|
88304
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
88305
|
-
defaultParseWidth: 'any'
|
|
88306
|
-
})
|
|
88307
|
-
};
|
|
88308
|
-
var _default = match;
|
|
88309
|
-
exports.default = _default;
|
|
88419
|
+
return new Date(NaN);
|
|
88420
|
+
}
|
|
88421
|
+
}
|
|
88310
88422
|
module.exports = exports.default;
|
|
88311
|
-
} (
|
|
88423
|
+
} (toDate$1, toDate$1.exports));
|
|
88312
88424
|
|
|
88313
|
-
var
|
|
88425
|
+
var toDateExports = toDate$1.exports;
|
|
88314
88426
|
|
|
88315
88427
|
(function (module, exports) {
|
|
88316
88428
|
|
|
88317
88429
|
Object.defineProperty(exports, "__esModule", {
|
|
88318
88430
|
value: true
|
|
88319
88431
|
});
|
|
88320
|
-
exports.default =
|
|
88321
|
-
var _index = _interopRequireDefault(
|
|
88322
|
-
var _index2 = _interopRequireDefault(
|
|
88323
|
-
var _index3 = _interopRequireDefault(
|
|
88324
|
-
var _index4 = _interopRequireDefault(localizeExports);
|
|
88325
|
-
var _index5 = _interopRequireDefault(matchExports);
|
|
88432
|
+
exports.default = isValid;
|
|
88433
|
+
var _index = _interopRequireDefault(isDateExports);
|
|
88434
|
+
var _index2 = _interopRequireDefault(toDateExports);
|
|
88435
|
+
var _index3 = _interopRequireDefault(requiredArgsExports);
|
|
88326
88436
|
function _interopRequireDefault(obj) {
|
|
88327
88437
|
return obj && obj.__esModule ? obj : {
|
|
88328
88438
|
default: obj
|
|
@@ -88330,34 +88440,74 @@
|
|
|
88330
88440
|
}
|
|
88331
88441
|
|
|
88332
88442
|
/**
|
|
88333
|
-
* @
|
|
88334
|
-
* @category
|
|
88335
|
-
* @summary
|
|
88336
|
-
*
|
|
88337
|
-
* @
|
|
88338
|
-
*
|
|
88339
|
-
*
|
|
88443
|
+
* @name isValid
|
|
88444
|
+
* @category Common Helpers
|
|
88445
|
+
* @summary Is the given date valid?
|
|
88446
|
+
*
|
|
88447
|
+
* @description
|
|
88448
|
+
* Returns false if argument is Invalid Date and true otherwise.
|
|
88449
|
+
* Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
|
|
88450
|
+
* Invalid Date is a Date, whose time value is NaN.
|
|
88451
|
+
*
|
|
88452
|
+
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
88453
|
+
*
|
|
88454
|
+
* ### v2.0.0 breaking changes:
|
|
88455
|
+
*
|
|
88456
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
88457
|
+
*
|
|
88458
|
+
* - Now `isValid` doesn't throw an exception
|
|
88459
|
+
* if the first argument is not an instance of Date.
|
|
88460
|
+
* Instead, argument is converted beforehand using `toDate`.
|
|
88461
|
+
*
|
|
88462
|
+
* Examples:
|
|
88463
|
+
*
|
|
88464
|
+
* | `isValid` argument | Before v2.0.0 | v2.0.0 onward |
|
|
88465
|
+
* |---------------------------|---------------|---------------|
|
|
88466
|
+
* | `new Date()` | `true` | `true` |
|
|
88467
|
+
* | `new Date('2016-01-01')` | `true` | `true` |
|
|
88468
|
+
* | `new Date('')` | `false` | `false` |
|
|
88469
|
+
* | `new Date(1488370835081)` | `true` | `true` |
|
|
88470
|
+
* | `new Date(NaN)` | `false` | `false` |
|
|
88471
|
+
* | `'2016-01-01'` | `TypeError` | `false` |
|
|
88472
|
+
* | `''` | `TypeError` | `false` |
|
|
88473
|
+
* | `1488370835081` | `TypeError` | `true` |
|
|
88474
|
+
* | `NaN` | `TypeError` | `false` |
|
|
88475
|
+
*
|
|
88476
|
+
* We introduce this change to make *date-fns* consistent with ECMAScript behavior
|
|
88477
|
+
* that try to coerce arguments to the expected type
|
|
88478
|
+
* (which is also the case with other *date-fns* functions).
|
|
88479
|
+
*
|
|
88480
|
+
* @param {*} date - the date to check
|
|
88481
|
+
* @returns {Boolean} the date is valid
|
|
88482
|
+
* @throws {TypeError} 1 argument required
|
|
88483
|
+
*
|
|
88484
|
+
* @example
|
|
88485
|
+
* // For the valid date:
|
|
88486
|
+
* const result = isValid(new Date(2014, 1, 31))
|
|
88487
|
+
* //=> true
|
|
88488
|
+
*
|
|
88489
|
+
* @example
|
|
88490
|
+
* // For the value, convertable into a date:
|
|
88491
|
+
* const result = isValid(1393804800000)
|
|
88492
|
+
* //=> true
|
|
88493
|
+
*
|
|
88494
|
+
* @example
|
|
88495
|
+
* // For the invalid date:
|
|
88496
|
+
* const result = isValid(new Date(''))
|
|
88497
|
+
* //=> false
|
|
88340
88498
|
*/
|
|
88341
|
-
|
|
88342
|
-
|
|
88343
|
-
|
|
88344
|
-
|
|
88345
|
-
formatRelative: _index3.default,
|
|
88346
|
-
localize: _index4.default,
|
|
88347
|
-
match: _index5.default,
|
|
88348
|
-
options: {
|
|
88349
|
-
weekStartsOn: 0
|
|
88350
|
-
/* Sunday */,
|
|
88351
|
-
|
|
88352
|
-
firstWeekContainsDate: 1
|
|
88499
|
+
function isValid(dirtyDate) {
|
|
88500
|
+
(0, _index3.default)(1, arguments);
|
|
88501
|
+
if (!(0, _index.default)(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
88502
|
+
return false;
|
|
88353
88503
|
}
|
|
88354
|
-
|
|
88355
|
-
|
|
88356
|
-
|
|
88504
|
+
var date = (0, _index2.default)(dirtyDate);
|
|
88505
|
+
return !isNaN(Number(date));
|
|
88506
|
+
}
|
|
88357
88507
|
module.exports = exports.default;
|
|
88358
|
-
} (
|
|
88508
|
+
} (isValid, isValid.exports));
|
|
88359
88509
|
|
|
88360
|
-
var
|
|
88510
|
+
var isValidExports = isValid.exports;
|
|
88361
88511
|
|
|
88362
88512
|
var subMilliseconds = {exports: {}};
|
|
88363
88513
|
|
|
@@ -131093,7 +131243,7 @@
|
|
|
131093
131243
|
watermarkProps: watermarkProps
|
|
131094
131244
|
});
|
|
131095
131245
|
|
|
131096
|
-
var version = "1.
|
|
131246
|
+
var version = "1.14.0";
|
|
131097
131247
|
|
|
131098
131248
|
function useExposeProxy(targetRef) {
|
|
131099
131249
|
return new Proxy({}, {
|
|
@@ -132245,7 +132395,7 @@
|
|
|
132245
132395
|
exports.ellipsisProps = ellipsisProps;
|
|
132246
132396
|
exports.emptyDark = emptyDark$1;
|
|
132247
132397
|
exports.emptyProps = emptyProps;
|
|
132248
|
-
exports.enUS = enUS$
|
|
132398
|
+
exports.enUS = enUS$2;
|
|
132249
132399
|
exports.equationProps = equationProps;
|
|
132250
132400
|
exports.flexProps = flexProps;
|
|
132251
132401
|
exports.formDark = formItemDark;
|