@hero-design/rn 8.87.2 → 8.89.0-alpha.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/CHANGELOG.md +12 -0
- package/es/index.js +1034 -979
- package/lib/index.js +1034 -978
- package/package.json +3 -2
- package/src/components/AppCue/StyledAppCue.tsx +27 -1
- package/src/components/AppCue/__tests__/StyledAppCue.tsx +4 -0
- package/src/components/AppCue/__tests__/__snapshots__/StyledAppCue.tsx.snap +194 -0
- package/src/components/AppCue/__tests__/__snapshots__/index.spec.tsx.snap +260 -0
- package/src/components/AppCue/__tests__/index.spec.tsx +4 -0
- package/src/components/AppCue/__tests__/utils.spec.ts +57 -4
- package/src/components/AppCue/index.tsx +7 -4
- package/src/components/AppCue/utils.ts +60 -9
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +18 -15
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +6 -5
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +6 -5
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +12 -10
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Empty/index.tsx +1 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +42 -35
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +36 -30
- package/src/components/TextInput/StyledTextInput.tsx +4 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +20 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +446 -432
- package/src/components/TextInput/index.tsx +13 -32
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +12 -10
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +12 -10
- package/src/index.ts +2 -0
- package/src/theme/global/colors/ehWorkDark.ts +60 -0
- package/src/theme/global/index.ts +2 -0
- package/src/theme/index.ts +2 -0
- package/stats/8.88.0/rn-stats.html +4844 -0
- package/types/components/AppCue/StyledAppCue.d.ts +1 -1
- package/types/components/AppCue/utils.d.ts +6 -3
- package/types/components/Calendar/CalendarRange.d.ts +23 -0
- package/types/components/Calendar/CalendarRangeConnector.d.ts +11 -0
- package/types/components/Calendar/CalendarRangeSelectedItem.d.ts +11 -0
- package/types/components/Calendar/Sample.d.ts +13 -0
- package/types/components/Calendar/hooks/useCalendarLayout.d.ts +7 -0
- package/types/components/Calendar/useSetUpCalendar.d.ts +0 -0
- package/types/components/CompoundSearch/CompoundSearchHandler.d.ts +31 -0
- package/types/components/CompoundSearch/CompoundSearchTextInput.d.ts +60 -0
- package/types/components/CompoundSearch/StyledCompoundSearch.d.ts +40 -0
- package/types/components/CompoundSearch/index.d.ts +8 -0
- package/types/components/CompoundSearch/utils.d.ts +8 -0
- package/types/components/FloatingIsland/SingleLine/StyledSingleLine.d.ts +15 -0
- package/types/components/FloatingIsland/SingleLine/index.d.ts +24 -0
- package/types/index.d.ts +2 -2
- package/types/test-utils.d.ts +4 -0
- package/types/theme/components/compoundSearch.d.ts +36 -0
- package/types/theme/global/colors/ehWorkDark.d.ts +48 -0
- package/types/theme/global/index.d.ts +2 -1
- package/types/theme/index.d.ts +2 -2
- package/.turbo/turbo-build.log +0 -13
package/es/index.js
CHANGED
|
@@ -363,14 +363,14 @@ function _regeneratorRuntime() {
|
|
|
363
363
|
}
|
|
364
364
|
}, e;
|
|
365
365
|
}
|
|
366
|
-
function _typeof(o) {
|
|
366
|
+
function _typeof$1(o) {
|
|
367
367
|
"@babel/helpers - typeof";
|
|
368
368
|
|
|
369
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
369
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
370
370
|
return typeof o;
|
|
371
371
|
} : function (o) {
|
|
372
372
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
373
|
-
}, _typeof(o);
|
|
373
|
+
}, _typeof$1(o);
|
|
374
374
|
}
|
|
375
375
|
function _classCallCheck(instance, Constructor) {
|
|
376
376
|
if (!(instance instanceof Constructor)) {
|
|
@@ -2062,6 +2062,62 @@ var eBensBrandSystemPallete = {
|
|
|
2062
2062
|
};
|
|
2063
2063
|
var eBensSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette$1), eBensBrandSystemPallete);
|
|
2064
2064
|
|
|
2065
|
+
var ehWorkDarkPalette = _objectSpread2(_objectSpread2({}, swagLightGlobalPalette), {}, {
|
|
2066
|
+
// Surface
|
|
2067
|
+
defaultGlobalSurface: '#27272A',
|
|
2068
|
+
neutralGlobalSurface: '#121214',
|
|
2069
|
+
darkGlobalSurface: '#fcfbff',
|
|
2070
|
+
overlayGlobalSurface: '#ffffff',
|
|
2071
|
+
// On Surface
|
|
2072
|
+
onDefaultGlobalSurface: '#ffffff',
|
|
2073
|
+
mutedOnDefaultGlobalSurface: '#a9a9b2',
|
|
2074
|
+
inactiveOnDefaultGlobalSurface: '#71717a',
|
|
2075
|
+
disabledOnDefaultGlobalSurface: '#52525b',
|
|
2076
|
+
onOnDarkGlobalSurface: '#121214',
|
|
2077
|
+
// Outline:
|
|
2078
|
+
primaryOutline: '#a9a9b2',
|
|
2079
|
+
secondaryOutline: '#3f3f46',
|
|
2080
|
+
inactiveOutline: '#71717a',
|
|
2081
|
+
disabledOutline: '#52525b',
|
|
2082
|
+
// Archived:
|
|
2083
|
+
archivedSurface: '#52525b',
|
|
2084
|
+
mutedArchived: '#3f3f46',
|
|
2085
|
+
archived: '#71717a',
|
|
2086
|
+
onArchivedSurface: '#a9a9b2',
|
|
2087
|
+
// Error:
|
|
2088
|
+
errorSurface: '#7a1d06',
|
|
2089
|
+
mutedError: '#9b2508',
|
|
2090
|
+
error: '#bd2d09',
|
|
2091
|
+
onErrorSurface: '#fecfca',
|
|
2092
|
+
// Warming:
|
|
2093
|
+
warningSurface: '#963e03',
|
|
2094
|
+
mutedWarning: '#c35004',
|
|
2095
|
+
warning: '#dc6204',
|
|
2096
|
+
onWarningSurface: '#fff0d5',
|
|
2097
|
+
// Success:
|
|
2098
|
+
successSurface: '#00483e',
|
|
2099
|
+
mutedSuccess: '#016256',
|
|
2100
|
+
success: '#017d6d',
|
|
2101
|
+
onSuccessSurface: '#a7f3e9',
|
|
2102
|
+
// Info:
|
|
2103
|
+
infoSurface: '#004a61',
|
|
2104
|
+
mutedInfo: '#006585',
|
|
2105
|
+
info: '#007da3',
|
|
2106
|
+
onInfoSurface: '#a0e8ff',
|
|
2107
|
+
// Brand:
|
|
2108
|
+
primary: '#cdacfe',
|
|
2109
|
+
onPrimary: '#fdfbff',
|
|
2110
|
+
secondary: '#7622d7',
|
|
2111
|
+
onSecondary: '#ffffff',
|
|
2112
|
+
defaultSurface: '#fdfbff',
|
|
2113
|
+
highlightedSurface: '#280541',
|
|
2114
|
+
pressedSurface: '#9a58fc',
|
|
2115
|
+
decorativePrimary: '#fdfbff',
|
|
2116
|
+
decorativePrimarySurface: '#74409a',
|
|
2117
|
+
decorativeSecondary: '#fdfbff',
|
|
2118
|
+
decorativeSecondarySurface: '#f0e6ff'
|
|
2119
|
+
});
|
|
2120
|
+
|
|
2065
2121
|
var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
|
|
2066
2122
|
var horizontalScale = function horizontalScale(size) {
|
|
2067
2123
|
if (Platform.OS === 'web') {
|
|
@@ -5895,7 +5951,7 @@ function requireCamelize() {
|
|
|
5895
5951
|
return walk(obj);
|
|
5896
5952
|
};
|
|
5897
5953
|
function walk(obj) {
|
|
5898
|
-
if (!obj || _typeof(obj) !== 'object') return obj;
|
|
5954
|
+
if (!obj || _typeof$1(obj) !== 'object') return obj;
|
|
5899
5955
|
if (isDate(obj) || isRegex(obj)) return obj;
|
|
5900
5956
|
if (isArray(obj)) return map(obj, walk);
|
|
5901
5957
|
return reduce(objectKeys(obj), function (acc, key) {
|
|
@@ -6258,7 +6314,7 @@ function requireCssToReactNative() {
|
|
|
6258
6314
|
value: true
|
|
6259
6315
|
});
|
|
6260
6316
|
function _interopDefault(ex) {
|
|
6261
|
-
return ex && _typeof(ex) === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
6317
|
+
return ex && _typeof$1(ex) === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
6262
6318
|
}
|
|
6263
6319
|
var parse = requireLib$1();
|
|
6264
6320
|
var parse__default = _interopDefault(parse);
|
|
@@ -6982,7 +7038,7 @@ var generated = {};
|
|
|
6982
7038
|
var buffer = '';
|
|
6983
7039
|
var lastType;
|
|
6984
7040
|
function handleInterpolation(interpolation, i, arr) {
|
|
6985
|
-
var type = _typeof(interpolation);
|
|
7041
|
+
var type = _typeof$1(interpolation);
|
|
6986
7042
|
if (type === 'string') {
|
|
6987
7043
|
// strip comments
|
|
6988
7044
|
interpolation = interpolation.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, '');
|
|
@@ -8358,7 +8414,7 @@ var StyledContainer$9 = index$a(View)(function (_ref2) {
|
|
|
8358
8414
|
var StyledIconContainer$1 = index$a(Animated.View)(function (_ref3) {
|
|
8359
8415
|
var theme = _ref3.theme,
|
|
8360
8416
|
themePlacement = _ref3.themePlacement;
|
|
8361
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
8417
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
8362
8418
|
position: 'absolute',
|
|
8363
8419
|
color: theme.__hd__.appCue.colors.background,
|
|
8364
8420
|
display: 'flex',
|
|
@@ -8385,6 +8441,24 @@ var StyledIconContainer$1 = index$a(Animated.View)(function (_ref3) {
|
|
|
8385
8441
|
rotate: '-90deg'
|
|
8386
8442
|
}],
|
|
8387
8443
|
height: '100%'
|
|
8444
|
+
}), themePlacement === 'top-left' && {
|
|
8445
|
+
bottom: -theme.__hd__.appCue.space.arrowOffset,
|
|
8446
|
+
right: theme.__hd__.appCue.space.arrowOffset
|
|
8447
|
+
}), themePlacement === 'top-right' && {
|
|
8448
|
+
bottom: -theme.__hd__.appCue.space.arrowOffset,
|
|
8449
|
+
left: theme.__hd__.appCue.space.arrowOffset
|
|
8450
|
+
}), themePlacement === 'bottom-left' && {
|
|
8451
|
+
top: -theme.__hd__.appCue.space.arrowOffset,
|
|
8452
|
+
right: theme.__hd__.appCue.space.arrowOffset,
|
|
8453
|
+
transform: [{
|
|
8454
|
+
rotate: '180deg'
|
|
8455
|
+
}]
|
|
8456
|
+
}), themePlacement === 'bottom-right' && {
|
|
8457
|
+
top: -theme.__hd__.appCue.space.arrowOffset,
|
|
8458
|
+
left: theme.__hd__.appCue.space.arrowOffset,
|
|
8459
|
+
transform: [{
|
|
8460
|
+
rotate: '180deg'
|
|
8461
|
+
}]
|
|
8388
8462
|
});
|
|
8389
8463
|
});
|
|
8390
8464
|
|
|
@@ -8411,42 +8485,79 @@ var calculatePosition = function calculatePosition(_ref) {
|
|
|
8411
8485
|
var placement = _ref.placement,
|
|
8412
8486
|
position = _ref.position,
|
|
8413
8487
|
contentSize = _ref.contentSize,
|
|
8414
|
-
offset = _ref.offset
|
|
8488
|
+
offset = _ref.offset,
|
|
8489
|
+
windowWidth = _ref.windowWidth;
|
|
8415
8490
|
switch (placement) {
|
|
8416
8491
|
case 'top':
|
|
8417
8492
|
{
|
|
8418
8493
|
return {
|
|
8419
8494
|
// The X coordinate is calculated by adding the half of the width of the target element to the X coordinate of the target element.
|
|
8420
|
-
|
|
8495
|
+
left: position.pageX + (position.width - contentSize.width) / 2,
|
|
8421
8496
|
// The Y coordinate is calculated by subtracting the height of the content and the offset from the Y coordinate of the target element
|
|
8422
|
-
|
|
8497
|
+
top: position.pageY - contentSize.height - offset
|
|
8423
8498
|
};
|
|
8424
8499
|
}
|
|
8425
8500
|
case 'bottom':
|
|
8426
8501
|
{
|
|
8427
8502
|
return {
|
|
8428
8503
|
// The X coordinate is calculated by adding the half of the width of the target element to the X coordinate of the target element.
|
|
8429
|
-
|
|
8504
|
+
left: position.pageX + (position.width - contentSize.width) / 2,
|
|
8430
8505
|
// The Y coordinate is calculated by adding the height of the target element and the offset to the Y coordinate of the target element.
|
|
8431
|
-
|
|
8506
|
+
top: position.pageY + position.height + offset
|
|
8432
8507
|
};
|
|
8433
8508
|
}
|
|
8434
8509
|
case 'right':
|
|
8435
8510
|
{
|
|
8436
8511
|
return {
|
|
8437
8512
|
// The X coordinate is calculated by adding the width of the target element and the offset to the X coordinate of the target element.
|
|
8438
|
-
|
|
8513
|
+
left: position.pageX + position.width + offset,
|
|
8439
8514
|
// The Y coordinate is calculated by adding half of the height of the target element to the Y coordinate of the target element.
|
|
8440
|
-
|
|
8515
|
+
top: position.pageY + (position.height - contentSize.height) / 2
|
|
8441
8516
|
};
|
|
8442
8517
|
}
|
|
8443
8518
|
case 'left':
|
|
8444
8519
|
{
|
|
8445
8520
|
return {
|
|
8446
8521
|
// The X coordinate is calculated by subtracting the width of the content and the offset from the X coordinate of the target element.
|
|
8447
|
-
|
|
8522
|
+
left: position.pageX - contentSize.width - offset,
|
|
8448
8523
|
// The Y coordinate is calculated by adding half of the height of the target element to the Y coordinate of the target element.
|
|
8449
|
-
|
|
8524
|
+
top: position.pageY + (position.height - contentSize.height) / 2
|
|
8525
|
+
};
|
|
8526
|
+
}
|
|
8527
|
+
case 'top-left':
|
|
8528
|
+
{
|
|
8529
|
+
return {
|
|
8530
|
+
// The X coordinate is calculated by subtracting the width of the content from the X coordinate of the target element.
|
|
8531
|
+
right: windowWidth - position.pageX - position.width,
|
|
8532
|
+
// The Y coordinate is calculated by subtracting the height of the content and the offset from the Y coordinate of the target element
|
|
8533
|
+
top: position.pageY - contentSize.height - offset
|
|
8534
|
+
};
|
|
8535
|
+
}
|
|
8536
|
+
case 'top-right':
|
|
8537
|
+
{
|
|
8538
|
+
return {
|
|
8539
|
+
// The X coordinate is calculated by adding the width of the target element to the X coordinate of the target element.
|
|
8540
|
+
left: position.pageX,
|
|
8541
|
+
// The Y coordinate is calculated by subtracting the height of the content and the offset from the Y coordinate of the target element.
|
|
8542
|
+
top: position.pageY - contentSize.height - offset
|
|
8543
|
+
};
|
|
8544
|
+
}
|
|
8545
|
+
case 'bottom-left':
|
|
8546
|
+
{
|
|
8547
|
+
return {
|
|
8548
|
+
// The X coordinate is calculated by subtracting the width of the content from the X coordinate of the target element.
|
|
8549
|
+
right: windowWidth - position.pageX - position.width,
|
|
8550
|
+
// The Y coordinate is calculated by adding the height of the target element and the offset to the Y coordinate of the target element.
|
|
8551
|
+
top: position.pageY + position.height + offset
|
|
8552
|
+
};
|
|
8553
|
+
}
|
|
8554
|
+
case 'bottom-right':
|
|
8555
|
+
{
|
|
8556
|
+
return {
|
|
8557
|
+
// The X coordinate is calculated by adding the width of the target element to the X coordinate of the target element.
|
|
8558
|
+
left: position.pageX,
|
|
8559
|
+
// The Y coordinate is calculated by adding the height of the target element and the offset to the Y coordinate of the target element.
|
|
8560
|
+
top: position.pageY + position.height + offset
|
|
8450
8561
|
};
|
|
8451
8562
|
}
|
|
8452
8563
|
}
|
|
@@ -8488,6 +8599,22 @@ var calulateContentMaxWidth = function calulateContentMaxWidth(_ref2) {
|
|
|
8488
8599
|
{
|
|
8489
8600
|
return position.pageX - offset;
|
|
8490
8601
|
}
|
|
8602
|
+
case 'top-left':
|
|
8603
|
+
{
|
|
8604
|
+
return position.pageX + position.width;
|
|
8605
|
+
}
|
|
8606
|
+
case 'top-right':
|
|
8607
|
+
{
|
|
8608
|
+
return windowWidth - position.pageX;
|
|
8609
|
+
}
|
|
8610
|
+
case 'bottom-left':
|
|
8611
|
+
{
|
|
8612
|
+
return position.pageX + position.width;
|
|
8613
|
+
}
|
|
8614
|
+
case 'bottom-right':
|
|
8615
|
+
{
|
|
8616
|
+
return windowWidth - position.pageX;
|
|
8617
|
+
}
|
|
8491
8618
|
}
|
|
8492
8619
|
};
|
|
8493
8620
|
|
|
@@ -8554,14 +8681,15 @@ var AppCue = function AppCue(_ref) {
|
|
|
8554
8681
|
height: event.nativeEvent.layout.height
|
|
8555
8682
|
});
|
|
8556
8683
|
};
|
|
8684
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
8685
|
+
windowWidth = _useWindowDimensions.width;
|
|
8557
8686
|
var pos = calculatePosition({
|
|
8558
8687
|
position: position,
|
|
8559
8688
|
contentSize: contentSize,
|
|
8560
8689
|
placement: placement,
|
|
8561
|
-
offset: offset
|
|
8690
|
+
offset: offset,
|
|
8691
|
+
windowWidth: windowWidth
|
|
8562
8692
|
});
|
|
8563
|
-
var _useWindowDimensions = useWindowDimensions(),
|
|
8564
|
-
windowWidth = _useWindowDimensions.width;
|
|
8565
8693
|
var maxWidth = calulateContentMaxWidth({
|
|
8566
8694
|
position: position,
|
|
8567
8695
|
offset: offset,
|
|
@@ -8601,8 +8729,10 @@ var AppCue = function AppCue(_ref) {
|
|
|
8601
8729
|
}, /*#__PURE__*/React__default.createElement(StyledContainer$9, null, /*#__PURE__*/React__default.createElement(View, {
|
|
8602
8730
|
style: StyleSheet$1.flatten([{
|
|
8603
8731
|
position: 'absolute',
|
|
8604
|
-
top: pos.
|
|
8605
|
-
left: pos.
|
|
8732
|
+
top: pos.top,
|
|
8733
|
+
left: pos.left,
|
|
8734
|
+
bottom: pos.bottom,
|
|
8735
|
+
right: pos.right
|
|
8606
8736
|
}, style]),
|
|
8607
8737
|
onLayout: measureContent,
|
|
8608
8738
|
testID: testID
|
|
@@ -10443,12 +10573,59 @@ var BottomSheet$1 = Object.assign(BottomSheet, {
|
|
|
10443
10573
|
ScrollView: BottomSheetScrollView
|
|
10444
10574
|
});
|
|
10445
10575
|
|
|
10576
|
+
function _typeof(o) {
|
|
10577
|
+
"@babel/helpers - typeof";
|
|
10578
|
+
|
|
10579
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
10580
|
+
return typeof o;
|
|
10581
|
+
} : function (o) {
|
|
10582
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10583
|
+
}, _typeof(o);
|
|
10584
|
+
}
|
|
10585
|
+
|
|
10446
10586
|
function requiredArgs(required, args) {
|
|
10447
10587
|
if (args.length < required) {
|
|
10448
10588
|
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
10449
10589
|
}
|
|
10450
10590
|
}
|
|
10451
10591
|
|
|
10592
|
+
/**
|
|
10593
|
+
* @name isDate
|
|
10594
|
+
* @category Common Helpers
|
|
10595
|
+
* @summary Is the given value a date?
|
|
10596
|
+
*
|
|
10597
|
+
* @description
|
|
10598
|
+
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
10599
|
+
*
|
|
10600
|
+
* @param {*} value - the value to check
|
|
10601
|
+
* @returns {boolean} true if the given value is a date
|
|
10602
|
+
* @throws {TypeError} 1 arguments required
|
|
10603
|
+
*
|
|
10604
|
+
* @example
|
|
10605
|
+
* // For a valid date:
|
|
10606
|
+
* const result = isDate(new Date())
|
|
10607
|
+
* //=> true
|
|
10608
|
+
*
|
|
10609
|
+
* @example
|
|
10610
|
+
* // For an invalid date:
|
|
10611
|
+
* const result = isDate(new Date(NaN))
|
|
10612
|
+
* //=> true
|
|
10613
|
+
*
|
|
10614
|
+
* @example
|
|
10615
|
+
* // For some value:
|
|
10616
|
+
* const result = isDate('2014-02-31')
|
|
10617
|
+
* //=> false
|
|
10618
|
+
*
|
|
10619
|
+
* @example
|
|
10620
|
+
* // For an object:
|
|
10621
|
+
* const result = isDate({})
|
|
10622
|
+
* //=> false
|
|
10623
|
+
*/
|
|
10624
|
+
function isDate(value) {
|
|
10625
|
+
requiredArgs(1, arguments);
|
|
10626
|
+
return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
10627
|
+
}
|
|
10628
|
+
|
|
10452
10629
|
/**
|
|
10453
10630
|
* @name toDate
|
|
10454
10631
|
* @category Common Helpers
|
|
@@ -10479,11 +10656,11 @@ function requiredArgs(required, args) {
|
|
|
10479
10656
|
* const result = toDate(1392098430000)
|
|
10480
10657
|
* //=> Tue Feb 11 2014 11:30:30
|
|
10481
10658
|
*/
|
|
10482
|
-
|
|
10483
10659
|
function toDate(argument) {
|
|
10484
10660
|
requiredArgs(1, arguments);
|
|
10485
|
-
var argStr = Object.prototype.toString.call(argument);
|
|
10661
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
10486
10662
|
|
|
10663
|
+
// Clone the date
|
|
10487
10664
|
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
10488
10665
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
10489
10666
|
return new Date(argument.getTime());
|
|
@@ -10492,8 +10669,8 @@ function toDate(argument) {
|
|
|
10492
10669
|
} else {
|
|
10493
10670
|
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
10494
10671
|
// eslint-disable-next-line no-console
|
|
10495
|
-
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://
|
|
10496
|
-
|
|
10672
|
+
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://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
10673
|
+
// eslint-disable-next-line no-console
|
|
10497
10674
|
console.warn(new Error().stack);
|
|
10498
10675
|
}
|
|
10499
10676
|
return new Date(NaN);
|
|
@@ -10512,544 +10689,34 @@ function toDate(argument) {
|
|
|
10512
10689
|
*
|
|
10513
10690
|
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
10514
10691
|
*
|
|
10515
|
-
* ### v2.0.0 breaking changes:
|
|
10516
|
-
*
|
|
10517
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
10518
|
-
*
|
|
10519
|
-
* - Now `isValid` doesn't throw an exception
|
|
10520
|
-
* if the first argument is not an instance of Date.
|
|
10521
|
-
* Instead, argument is converted beforehand using `toDate`.
|
|
10522
|
-
*
|
|
10523
|
-
* Examples:
|
|
10524
|
-
*
|
|
10525
|
-
* | `isValid` argument | Before v2.0.0 | v2.0.0 onward |
|
|
10526
|
-
* |---------------------------|---------------|---------------|
|
|
10527
|
-
* | `new Date()` | `true` | `true` |
|
|
10528
|
-
* | `new Date('2016-01-01')` | `true` | `true` |
|
|
10529
|
-
* | `new Date('')` | `false` | `false` |
|
|
10530
|
-
* | `new Date(1488370835081)` | `true` | `true` |
|
|
10531
|
-
* | `new Date(NaN)` | `false` | `false` |
|
|
10532
|
-
* | `'2016-01-01'` | `TypeError` | `false` |
|
|
10533
|
-
* | `''` | `TypeError` | `false` |
|
|
10534
|
-
* | `1488370835081` | `TypeError` | `true` |
|
|
10535
|
-
* | `NaN` | `TypeError` | `false` |
|
|
10536
|
-
*
|
|
10537
|
-
* We introduce this change to make *date-fns* consistent with ECMAScript behavior
|
|
10538
|
-
* that try to coerce arguments to the expected type
|
|
10539
|
-
* (which is also the case with other *date-fns* functions).
|
|
10540
|
-
*
|
|
10541
10692
|
* @param {*} date - the date to check
|
|
10542
10693
|
* @returns {Boolean} the date is valid
|
|
10543
10694
|
* @throws {TypeError} 1 argument required
|
|
10544
10695
|
*
|
|
10545
10696
|
* @example
|
|
10546
10697
|
* // For the valid date:
|
|
10547
|
-
*
|
|
10698
|
+
* const result = isValid(new Date(2014, 1, 31))
|
|
10548
10699
|
* //=> true
|
|
10549
10700
|
*
|
|
10550
10701
|
* @example
|
|
10551
10702
|
* // For the value, convertable into a date:
|
|
10552
|
-
*
|
|
10703
|
+
* const result = isValid(1393804800000)
|
|
10553
10704
|
* //=> true
|
|
10554
10705
|
*
|
|
10555
10706
|
* @example
|
|
10556
10707
|
* // For the invalid date:
|
|
10557
|
-
*
|
|
10708
|
+
* const result = isValid(new Date(''))
|
|
10558
10709
|
* //=> false
|
|
10559
10710
|
*/
|
|
10560
|
-
|
|
10561
10711
|
function isValid(dirtyDate) {
|
|
10562
10712
|
requiredArgs(1, arguments);
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
}
|
|
10566
|
-
|
|
10567
|
-
var formatDistanceLocale = {
|
|
10568
|
-
lessThanXSeconds: {
|
|
10569
|
-
one: 'less than a second',
|
|
10570
|
-
other: 'less than {{count}} seconds'
|
|
10571
|
-
},
|
|
10572
|
-
xSeconds: {
|
|
10573
|
-
one: '1 second',
|
|
10574
|
-
other: '{{count}} seconds'
|
|
10575
|
-
},
|
|
10576
|
-
halfAMinute: 'half a minute',
|
|
10577
|
-
lessThanXMinutes: {
|
|
10578
|
-
one: 'less than a minute',
|
|
10579
|
-
other: 'less than {{count}} minutes'
|
|
10580
|
-
},
|
|
10581
|
-
xMinutes: {
|
|
10582
|
-
one: '1 minute',
|
|
10583
|
-
other: '{{count}} minutes'
|
|
10584
|
-
},
|
|
10585
|
-
aboutXHours: {
|
|
10586
|
-
one: 'about 1 hour',
|
|
10587
|
-
other: 'about {{count}} hours'
|
|
10588
|
-
},
|
|
10589
|
-
xHours: {
|
|
10590
|
-
one: '1 hour',
|
|
10591
|
-
other: '{{count}} hours'
|
|
10592
|
-
},
|
|
10593
|
-
xDays: {
|
|
10594
|
-
one: '1 day',
|
|
10595
|
-
other: '{{count}} days'
|
|
10596
|
-
},
|
|
10597
|
-
aboutXWeeks: {
|
|
10598
|
-
one: 'about 1 week',
|
|
10599
|
-
other: 'about {{count}} weeks'
|
|
10600
|
-
},
|
|
10601
|
-
xWeeks: {
|
|
10602
|
-
one: '1 week',
|
|
10603
|
-
other: '{{count}} weeks'
|
|
10604
|
-
},
|
|
10605
|
-
aboutXMonths: {
|
|
10606
|
-
one: 'about 1 month',
|
|
10607
|
-
other: 'about {{count}} months'
|
|
10608
|
-
},
|
|
10609
|
-
xMonths: {
|
|
10610
|
-
one: '1 month',
|
|
10611
|
-
other: '{{count}} months'
|
|
10612
|
-
},
|
|
10613
|
-
aboutXYears: {
|
|
10614
|
-
one: 'about 1 year',
|
|
10615
|
-
other: 'about {{count}} years'
|
|
10616
|
-
},
|
|
10617
|
-
xYears: {
|
|
10618
|
-
one: '1 year',
|
|
10619
|
-
other: '{{count}} years'
|
|
10620
|
-
},
|
|
10621
|
-
overXYears: {
|
|
10622
|
-
one: 'over 1 year',
|
|
10623
|
-
other: 'over {{count}} years'
|
|
10624
|
-
},
|
|
10625
|
-
almostXYears: {
|
|
10626
|
-
one: 'almost 1 year',
|
|
10627
|
-
other: 'almost {{count}} years'
|
|
10628
|
-
}
|
|
10629
|
-
};
|
|
10630
|
-
function formatDistance(token, count, options) {
|
|
10631
|
-
options = options || {};
|
|
10632
|
-
var result;
|
|
10633
|
-
if (typeof formatDistanceLocale[token] === 'string') {
|
|
10634
|
-
result = formatDistanceLocale[token];
|
|
10635
|
-
} else if (count === 1) {
|
|
10636
|
-
result = formatDistanceLocale[token].one;
|
|
10637
|
-
} else {
|
|
10638
|
-
result = formatDistanceLocale[token].other.replace('{{count}}', count);
|
|
10639
|
-
}
|
|
10640
|
-
if (options.addSuffix) {
|
|
10641
|
-
if (options.comparison > 0) {
|
|
10642
|
-
return 'in ' + result;
|
|
10643
|
-
} else {
|
|
10644
|
-
return result + ' ago';
|
|
10645
|
-
}
|
|
10646
|
-
}
|
|
10647
|
-
return result;
|
|
10648
|
-
}
|
|
10649
|
-
|
|
10650
|
-
function buildFormatLongFn(args) {
|
|
10651
|
-
return function (dirtyOptions) {
|
|
10652
|
-
var options = dirtyOptions || {};
|
|
10653
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
10654
|
-
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
10655
|
-
return format;
|
|
10656
|
-
};
|
|
10657
|
-
}
|
|
10658
|
-
|
|
10659
|
-
var dateFormats = {
|
|
10660
|
-
full: 'EEEE, MMMM do, y',
|
|
10661
|
-
"long": 'MMMM do, y',
|
|
10662
|
-
medium: 'MMM d, y',
|
|
10663
|
-
"short": 'MM/dd/yyyy'
|
|
10664
|
-
};
|
|
10665
|
-
var timeFormats = {
|
|
10666
|
-
full: 'h:mm:ss a zzzz',
|
|
10667
|
-
"long": 'h:mm:ss a z',
|
|
10668
|
-
medium: 'h:mm:ss a',
|
|
10669
|
-
"short": 'h:mm a'
|
|
10670
|
-
};
|
|
10671
|
-
var dateTimeFormats = {
|
|
10672
|
-
full: "{{date}} 'at' {{time}}",
|
|
10673
|
-
"long": "{{date}} 'at' {{time}}",
|
|
10674
|
-
medium: '{{date}}, {{time}}',
|
|
10675
|
-
"short": '{{date}}, {{time}}'
|
|
10676
|
-
};
|
|
10677
|
-
var formatLong = {
|
|
10678
|
-
date: buildFormatLongFn({
|
|
10679
|
-
formats: dateFormats,
|
|
10680
|
-
defaultWidth: 'full'
|
|
10681
|
-
}),
|
|
10682
|
-
time: buildFormatLongFn({
|
|
10683
|
-
formats: timeFormats,
|
|
10684
|
-
defaultWidth: 'full'
|
|
10685
|
-
}),
|
|
10686
|
-
dateTime: buildFormatLongFn({
|
|
10687
|
-
formats: dateTimeFormats,
|
|
10688
|
-
defaultWidth: 'full'
|
|
10689
|
-
})
|
|
10690
|
-
};
|
|
10691
|
-
|
|
10692
|
-
var formatRelativeLocale = {
|
|
10693
|
-
lastWeek: "'last' eeee 'at' p",
|
|
10694
|
-
yesterday: "'yesterday at' p",
|
|
10695
|
-
today: "'today at' p",
|
|
10696
|
-
tomorrow: "'tomorrow at' p",
|
|
10697
|
-
nextWeek: "eeee 'at' p",
|
|
10698
|
-
other: 'P'
|
|
10699
|
-
};
|
|
10700
|
-
function formatRelative(token, _date, _baseDate, _options) {
|
|
10701
|
-
return formatRelativeLocale[token];
|
|
10702
|
-
}
|
|
10703
|
-
|
|
10704
|
-
function buildLocalizeFn(args) {
|
|
10705
|
-
return function (dirtyIndex, dirtyOptions) {
|
|
10706
|
-
var options = dirtyOptions || {};
|
|
10707
|
-
var context = options.context ? String(options.context) : 'standalone';
|
|
10708
|
-
var valuesArray;
|
|
10709
|
-
if (context === 'formatting' && args.formattingValues) {
|
|
10710
|
-
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
10711
|
-
var width = options.width ? String(options.width) : defaultWidth;
|
|
10712
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
10713
|
-
} else {
|
|
10714
|
-
var _defaultWidth = args.defaultWidth;
|
|
10715
|
-
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
10716
|
-
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
10717
|
-
}
|
|
10718
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
10719
|
-
return valuesArray[index];
|
|
10720
|
-
};
|
|
10721
|
-
}
|
|
10722
|
-
|
|
10723
|
-
var eraValues = {
|
|
10724
|
-
narrow: ['B', 'A'],
|
|
10725
|
-
abbreviated: ['BC', 'AD'],
|
|
10726
|
-
wide: ['Before Christ', 'Anno Domini']
|
|
10727
|
-
};
|
|
10728
|
-
var quarterValues = {
|
|
10729
|
-
narrow: ['1', '2', '3', '4'],
|
|
10730
|
-
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
10731
|
-
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter'] // Note: in English, the names of days of the week and months are capitalized.
|
|
10732
|
-
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
10733
|
-
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
10734
|
-
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
10735
|
-
};
|
|
10736
|
-
|
|
10737
|
-
var monthValues = {
|
|
10738
|
-
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
10739
|
-
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
10740
|
-
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
10741
|
-
};
|
|
10742
|
-
var dayValues = {
|
|
10743
|
-
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
10744
|
-
"short": ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
10745
|
-
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
10746
|
-
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
10747
|
-
};
|
|
10748
|
-
var dayPeriodValues = {
|
|
10749
|
-
narrow: {
|
|
10750
|
-
am: 'a',
|
|
10751
|
-
pm: 'p',
|
|
10752
|
-
midnight: 'mi',
|
|
10753
|
-
noon: 'n',
|
|
10754
|
-
morning: 'morning',
|
|
10755
|
-
afternoon: 'afternoon',
|
|
10756
|
-
evening: 'evening',
|
|
10757
|
-
night: 'night'
|
|
10758
|
-
},
|
|
10759
|
-
abbreviated: {
|
|
10760
|
-
am: 'AM',
|
|
10761
|
-
pm: 'PM',
|
|
10762
|
-
midnight: 'midnight',
|
|
10763
|
-
noon: 'noon',
|
|
10764
|
-
morning: 'morning',
|
|
10765
|
-
afternoon: 'afternoon',
|
|
10766
|
-
evening: 'evening',
|
|
10767
|
-
night: 'night'
|
|
10768
|
-
},
|
|
10769
|
-
wide: {
|
|
10770
|
-
am: 'a.m.',
|
|
10771
|
-
pm: 'p.m.',
|
|
10772
|
-
midnight: 'midnight',
|
|
10773
|
-
noon: 'noon',
|
|
10774
|
-
morning: 'morning',
|
|
10775
|
-
afternoon: 'afternoon',
|
|
10776
|
-
evening: 'evening',
|
|
10777
|
-
night: 'night'
|
|
10778
|
-
}
|
|
10779
|
-
};
|
|
10780
|
-
var formattingDayPeriodValues = {
|
|
10781
|
-
narrow: {
|
|
10782
|
-
am: 'a',
|
|
10783
|
-
pm: 'p',
|
|
10784
|
-
midnight: 'mi',
|
|
10785
|
-
noon: 'n',
|
|
10786
|
-
morning: 'in the morning',
|
|
10787
|
-
afternoon: 'in the afternoon',
|
|
10788
|
-
evening: 'in the evening',
|
|
10789
|
-
night: 'at night'
|
|
10790
|
-
},
|
|
10791
|
-
abbreviated: {
|
|
10792
|
-
am: 'AM',
|
|
10793
|
-
pm: 'PM',
|
|
10794
|
-
midnight: 'midnight',
|
|
10795
|
-
noon: 'noon',
|
|
10796
|
-
morning: 'in the morning',
|
|
10797
|
-
afternoon: 'in the afternoon',
|
|
10798
|
-
evening: 'in the evening',
|
|
10799
|
-
night: 'at night'
|
|
10800
|
-
},
|
|
10801
|
-
wide: {
|
|
10802
|
-
am: 'a.m.',
|
|
10803
|
-
pm: 'p.m.',
|
|
10804
|
-
midnight: 'midnight',
|
|
10805
|
-
noon: 'noon',
|
|
10806
|
-
morning: 'in the morning',
|
|
10807
|
-
afternoon: 'in the afternoon',
|
|
10808
|
-
evening: 'in the evening',
|
|
10809
|
-
night: 'at night'
|
|
10810
|
-
}
|
|
10811
|
-
};
|
|
10812
|
-
function ordinalNumber(dirtyNumber, _dirtyOptions) {
|
|
10813
|
-
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
10814
|
-
// if they are different for different grammatical genders,
|
|
10815
|
-
// use `options.unit`:
|
|
10816
|
-
//
|
|
10817
|
-
// var options = dirtyOptions || {}
|
|
10818
|
-
// var unit = String(options.unit)
|
|
10819
|
-
//
|
|
10820
|
-
// where `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
10821
|
-
// 'day', 'hour', 'minute', 'second'
|
|
10822
|
-
|
|
10823
|
-
var rem100 = number % 100;
|
|
10824
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
10825
|
-
switch (rem100 % 10) {
|
|
10826
|
-
case 1:
|
|
10827
|
-
return number + 'st';
|
|
10828
|
-
case 2:
|
|
10829
|
-
return number + 'nd';
|
|
10830
|
-
case 3:
|
|
10831
|
-
return number + 'rd';
|
|
10832
|
-
}
|
|
10833
|
-
}
|
|
10834
|
-
return number + 'th';
|
|
10835
|
-
}
|
|
10836
|
-
var localize = {
|
|
10837
|
-
ordinalNumber: ordinalNumber,
|
|
10838
|
-
era: buildLocalizeFn({
|
|
10839
|
-
values: eraValues,
|
|
10840
|
-
defaultWidth: 'wide'
|
|
10841
|
-
}),
|
|
10842
|
-
quarter: buildLocalizeFn({
|
|
10843
|
-
values: quarterValues,
|
|
10844
|
-
defaultWidth: 'wide',
|
|
10845
|
-
argumentCallback: function argumentCallback(quarter) {
|
|
10846
|
-
return Number(quarter) - 1;
|
|
10847
|
-
}
|
|
10848
|
-
}),
|
|
10849
|
-
month: buildLocalizeFn({
|
|
10850
|
-
values: monthValues,
|
|
10851
|
-
defaultWidth: 'wide'
|
|
10852
|
-
}),
|
|
10853
|
-
day: buildLocalizeFn({
|
|
10854
|
-
values: dayValues,
|
|
10855
|
-
defaultWidth: 'wide'
|
|
10856
|
-
}),
|
|
10857
|
-
dayPeriod: buildLocalizeFn({
|
|
10858
|
-
values: dayPeriodValues,
|
|
10859
|
-
defaultWidth: 'wide',
|
|
10860
|
-
formattingValues: formattingDayPeriodValues,
|
|
10861
|
-
defaultFormattingWidth: 'wide'
|
|
10862
|
-
})
|
|
10863
|
-
};
|
|
10864
|
-
|
|
10865
|
-
function buildMatchPatternFn(args) {
|
|
10866
|
-
return function (dirtyString, dirtyOptions) {
|
|
10867
|
-
var string = String(dirtyString);
|
|
10868
|
-
var options = dirtyOptions || {};
|
|
10869
|
-
var matchResult = string.match(args.matchPattern);
|
|
10870
|
-
if (!matchResult) {
|
|
10871
|
-
return null;
|
|
10872
|
-
}
|
|
10873
|
-
var matchedString = matchResult[0];
|
|
10874
|
-
var parseResult = string.match(args.parsePattern);
|
|
10875
|
-
if (!parseResult) {
|
|
10876
|
-
return null;
|
|
10877
|
-
}
|
|
10878
|
-
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
10879
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
10880
|
-
return {
|
|
10881
|
-
value: value,
|
|
10882
|
-
rest: string.slice(matchedString.length)
|
|
10883
|
-
};
|
|
10884
|
-
};
|
|
10885
|
-
}
|
|
10886
|
-
|
|
10887
|
-
function buildMatchFn(args) {
|
|
10888
|
-
return function (dirtyString, dirtyOptions) {
|
|
10889
|
-
var string = String(dirtyString);
|
|
10890
|
-
var options = dirtyOptions || {};
|
|
10891
|
-
var width = options.width;
|
|
10892
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
10893
|
-
var matchResult = string.match(matchPattern);
|
|
10894
|
-
if (!matchResult) {
|
|
10895
|
-
return null;
|
|
10896
|
-
}
|
|
10897
|
-
var matchedString = matchResult[0];
|
|
10898
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
10899
|
-
var value;
|
|
10900
|
-
if (Object.prototype.toString.call(parsePatterns) === '[object Array]') {
|
|
10901
|
-
value = findIndex(parsePatterns, function (pattern) {
|
|
10902
|
-
return pattern.test(matchedString);
|
|
10903
|
-
});
|
|
10904
|
-
} else {
|
|
10905
|
-
value = findKey(parsePatterns, function (pattern) {
|
|
10906
|
-
return pattern.test(matchedString);
|
|
10907
|
-
});
|
|
10908
|
-
}
|
|
10909
|
-
value = args.valueCallback ? args.valueCallback(value) : value;
|
|
10910
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
10911
|
-
return {
|
|
10912
|
-
value: value,
|
|
10913
|
-
rest: string.slice(matchedString.length)
|
|
10914
|
-
};
|
|
10915
|
-
};
|
|
10916
|
-
}
|
|
10917
|
-
function findKey(object, predicate) {
|
|
10918
|
-
for (var key in object) {
|
|
10919
|
-
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
10920
|
-
return key;
|
|
10921
|
-
}
|
|
10922
|
-
}
|
|
10923
|
-
}
|
|
10924
|
-
function findIndex(array, predicate) {
|
|
10925
|
-
for (var key = 0; key < array.length; key++) {
|
|
10926
|
-
if (predicate(array[key])) {
|
|
10927
|
-
return key;
|
|
10928
|
-
}
|
|
10713
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
10714
|
+
return false;
|
|
10929
10715
|
}
|
|
10716
|
+
var date = toDate(dirtyDate);
|
|
10717
|
+
return !isNaN(Number(date));
|
|
10930
10718
|
}
|
|
10931
10719
|
|
|
10932
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
10933
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
10934
|
-
var matchEraPatterns = {
|
|
10935
|
-
narrow: /^(b|a)/i,
|
|
10936
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
10937
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
10938
|
-
};
|
|
10939
|
-
var parseEraPatterns = {
|
|
10940
|
-
any: [/^b/i, /^(a|c)/i]
|
|
10941
|
-
};
|
|
10942
|
-
var matchQuarterPatterns = {
|
|
10943
|
-
narrow: /^[1234]/i,
|
|
10944
|
-
abbreviated: /^q[1234]/i,
|
|
10945
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
10946
|
-
};
|
|
10947
|
-
var parseQuarterPatterns = {
|
|
10948
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
10949
|
-
};
|
|
10950
|
-
var matchMonthPatterns = {
|
|
10951
|
-
narrow: /^[jfmasond]/i,
|
|
10952
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
10953
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
10954
|
-
};
|
|
10955
|
-
var parseMonthPatterns = {
|
|
10956
|
-
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],
|
|
10957
|
-
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]
|
|
10958
|
-
};
|
|
10959
|
-
var matchDayPatterns = {
|
|
10960
|
-
narrow: /^[smtwf]/i,
|
|
10961
|
-
"short": /^(su|mo|tu|we|th|fr|sa)/i,
|
|
10962
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
10963
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
10964
|
-
};
|
|
10965
|
-
var parseDayPatterns = {
|
|
10966
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
10967
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
10968
|
-
};
|
|
10969
|
-
var matchDayPeriodPatterns = {
|
|
10970
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
10971
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
10972
|
-
};
|
|
10973
|
-
var parseDayPeriodPatterns = {
|
|
10974
|
-
any: {
|
|
10975
|
-
am: /^a/i,
|
|
10976
|
-
pm: /^p/i,
|
|
10977
|
-
midnight: /^mi/i,
|
|
10978
|
-
noon: /^no/i,
|
|
10979
|
-
morning: /morning/i,
|
|
10980
|
-
afternoon: /afternoon/i,
|
|
10981
|
-
evening: /evening/i,
|
|
10982
|
-
night: /night/i
|
|
10983
|
-
}
|
|
10984
|
-
};
|
|
10985
|
-
var match = {
|
|
10986
|
-
ordinalNumber: buildMatchPatternFn({
|
|
10987
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
10988
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
10989
|
-
valueCallback: function valueCallback(value) {
|
|
10990
|
-
return parseInt(value, 10);
|
|
10991
|
-
}
|
|
10992
|
-
}),
|
|
10993
|
-
era: buildMatchFn({
|
|
10994
|
-
matchPatterns: matchEraPatterns,
|
|
10995
|
-
defaultMatchWidth: 'wide',
|
|
10996
|
-
parsePatterns: parseEraPatterns,
|
|
10997
|
-
defaultParseWidth: 'any'
|
|
10998
|
-
}),
|
|
10999
|
-
quarter: buildMatchFn({
|
|
11000
|
-
matchPatterns: matchQuarterPatterns,
|
|
11001
|
-
defaultMatchWidth: 'wide',
|
|
11002
|
-
parsePatterns: parseQuarterPatterns,
|
|
11003
|
-
defaultParseWidth: 'any',
|
|
11004
|
-
valueCallback: function valueCallback(index) {
|
|
11005
|
-
return index + 1;
|
|
11006
|
-
}
|
|
11007
|
-
}),
|
|
11008
|
-
month: buildMatchFn({
|
|
11009
|
-
matchPatterns: matchMonthPatterns,
|
|
11010
|
-
defaultMatchWidth: 'wide',
|
|
11011
|
-
parsePatterns: parseMonthPatterns,
|
|
11012
|
-
defaultParseWidth: 'any'
|
|
11013
|
-
}),
|
|
11014
|
-
day: buildMatchFn({
|
|
11015
|
-
matchPatterns: matchDayPatterns,
|
|
11016
|
-
defaultMatchWidth: 'wide',
|
|
11017
|
-
parsePatterns: parseDayPatterns,
|
|
11018
|
-
defaultParseWidth: 'any'
|
|
11019
|
-
}),
|
|
11020
|
-
dayPeriod: buildMatchFn({
|
|
11021
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
11022
|
-
defaultMatchWidth: 'any',
|
|
11023
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
11024
|
-
defaultParseWidth: 'any'
|
|
11025
|
-
})
|
|
11026
|
-
};
|
|
11027
|
-
|
|
11028
|
-
/**
|
|
11029
|
-
* @type {Locale}
|
|
11030
|
-
* @category Locales
|
|
11031
|
-
* @summary English locale (United States).
|
|
11032
|
-
* @language English
|
|
11033
|
-
* @iso-639-2 eng
|
|
11034
|
-
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
11035
|
-
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
11036
|
-
*/
|
|
11037
|
-
|
|
11038
|
-
var locale = {
|
|
11039
|
-
code: 'en-US',
|
|
11040
|
-
formatDistance: formatDistance,
|
|
11041
|
-
formatLong: formatLong,
|
|
11042
|
-
formatRelative: formatRelative,
|
|
11043
|
-
localize: localize,
|
|
11044
|
-
match: match,
|
|
11045
|
-
options: {
|
|
11046
|
-
weekStartsOn: 0
|
|
11047
|
-
/* Sunday */,
|
|
11048
|
-
|
|
11049
|
-
firstWeekContainsDate: 1
|
|
11050
|
-
}
|
|
11051
|
-
};
|
|
11052
|
-
|
|
11053
10720
|
function toInteger(dirtyNumber) {
|
|
11054
10721
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
11055
10722
|
return NaN;
|
|
@@ -11069,10 +10736,6 @@ function toInteger(dirtyNumber) {
|
|
|
11069
10736
|
* @description
|
|
11070
10737
|
* Add the specified number of milliseconds to the given date.
|
|
11071
10738
|
*
|
|
11072
|
-
* ### v2.0.0 breaking changes:
|
|
11073
|
-
*
|
|
11074
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
11075
|
-
*
|
|
11076
10739
|
* @param {Date|Number} date - the date to be changed
|
|
11077
10740
|
* @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
11078
10741
|
* @returns {Date} the new date with the milliseconds added
|
|
@@ -11080,10 +10743,9 @@ function toInteger(dirtyNumber) {
|
|
|
11080
10743
|
*
|
|
11081
10744
|
* @example
|
|
11082
10745
|
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
|
|
11083
|
-
*
|
|
10746
|
+
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
11084
10747
|
* //=> Thu Jul 10 2014 12:45:30.750
|
|
11085
10748
|
*/
|
|
11086
|
-
|
|
11087
10749
|
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
11088
10750
|
requiredArgs(2, arguments);
|
|
11089
10751
|
var timestamp = toDate(dirtyDate).getTime();
|
|
@@ -11099,10 +10761,6 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
11099
10761
|
* @description
|
|
11100
10762
|
* Subtract the specified number of milliseconds from the given date.
|
|
11101
10763
|
*
|
|
11102
|
-
* ### v2.0.0 breaking changes:
|
|
11103
|
-
*
|
|
11104
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
11105
|
-
*
|
|
11106
10764
|
* @param {Date|Number} date - the date to be changed
|
|
11107
10765
|
* @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
11108
10766
|
* @returns {Date} the new date with the milliseconds subtracted
|
|
@@ -11110,106 +10768,16 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
11110
10768
|
*
|
|
11111
10769
|
* @example
|
|
11112
10770
|
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
|
11113
|
-
*
|
|
10771
|
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
11114
10772
|
* //=> Thu Jul 10 2014 12:45:29.250
|
|
11115
10773
|
*/
|
|
11116
|
-
|
|
11117
10774
|
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
11118
10775
|
requiredArgs(2, arguments);
|
|
11119
10776
|
var amount = toInteger(dirtyAmount);
|
|
11120
10777
|
return addMilliseconds(dirtyDate, -amount);
|
|
11121
10778
|
}
|
|
11122
10779
|
|
|
11123
|
-
|
|
11124
|
-
var sign = number < 0 ? '-' : '';
|
|
11125
|
-
var output = Math.abs(number).toString();
|
|
11126
|
-
while (output.length < targetLength) {
|
|
11127
|
-
output = '0' + output;
|
|
11128
|
-
}
|
|
11129
|
-
return sign + output;
|
|
11130
|
-
}
|
|
11131
|
-
|
|
11132
|
-
/*
|
|
11133
|
-
* | | Unit | | Unit |
|
|
11134
|
-
* |-----|--------------------------------|-----|--------------------------------|
|
|
11135
|
-
* | a | AM, PM | A* | |
|
|
11136
|
-
* | d | Day of month | D | |
|
|
11137
|
-
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
11138
|
-
* | m | Minute | M | Month |
|
|
11139
|
-
* | s | Second | S | Fraction of second |
|
|
11140
|
-
* | y | Year (abs) | Y | |
|
|
11141
|
-
*
|
|
11142
|
-
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
11143
|
-
*/
|
|
11144
|
-
|
|
11145
|
-
var formatters$1 = {
|
|
11146
|
-
// Year
|
|
11147
|
-
y: function y(date, token) {
|
|
11148
|
-
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
11149
|
-
// | Year | y | yy | yyy | yyyy | yyyyy |
|
|
11150
|
-
// |----------|-------|----|-------|-------|-------|
|
|
11151
|
-
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
|
|
11152
|
-
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
|
|
11153
|
-
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
11154
|
-
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
11155
|
-
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
11156
|
-
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
11157
|
-
|
|
11158
|
-
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
11159
|
-
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
11160
|
-
},
|
|
11161
|
-
// Month
|
|
11162
|
-
M: function M(date, token) {
|
|
11163
|
-
var month = date.getUTCMonth();
|
|
11164
|
-
return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
11165
|
-
},
|
|
11166
|
-
// Day of the month
|
|
11167
|
-
d: function d(date, token) {
|
|
11168
|
-
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
11169
|
-
},
|
|
11170
|
-
// AM or PM
|
|
11171
|
-
a: function a(date, token) {
|
|
11172
|
-
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
11173
|
-
switch (token) {
|
|
11174
|
-
case 'a':
|
|
11175
|
-
case 'aa':
|
|
11176
|
-
case 'aaa':
|
|
11177
|
-
return dayPeriodEnumValue.toUpperCase();
|
|
11178
|
-
case 'aaaaa':
|
|
11179
|
-
return dayPeriodEnumValue[0];
|
|
11180
|
-
case 'aaaa':
|
|
11181
|
-
default:
|
|
11182
|
-
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
11183
|
-
}
|
|
11184
|
-
},
|
|
11185
|
-
// Hour [1-12]
|
|
11186
|
-
h: function h(date, token) {
|
|
11187
|
-
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
11188
|
-
},
|
|
11189
|
-
// Hour [0-23]
|
|
11190
|
-
H: function H(date, token) {
|
|
11191
|
-
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
11192
|
-
},
|
|
11193
|
-
// Minute
|
|
11194
|
-
m: function m(date, token) {
|
|
11195
|
-
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
11196
|
-
},
|
|
11197
|
-
// Second
|
|
11198
|
-
s: function s(date, token) {
|
|
11199
|
-
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
11200
|
-
},
|
|
11201
|
-
// Fraction of second
|
|
11202
|
-
S: function S(date, token) {
|
|
11203
|
-
var numberOfDigits = token.length;
|
|
11204
|
-
var milliseconds = date.getUTCMilliseconds();
|
|
11205
|
-
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
11206
|
-
return addLeadingZeros(fractionalSeconds, token.length);
|
|
11207
|
-
}
|
|
11208
|
-
};
|
|
11209
|
-
|
|
11210
|
-
var MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.
|
|
11211
|
-
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
11212
|
-
|
|
10780
|
+
var MILLISECONDS_IN_DAY = 86400000;
|
|
11213
10781
|
function getUTCDayOfYear(dirtyDate) {
|
|
11214
10782
|
requiredArgs(1, arguments);
|
|
11215
10783
|
var date = toDate(dirtyDate);
|
|
@@ -11221,8 +10789,6 @@ function getUTCDayOfYear(dirtyDate) {
|
|
|
11221
10789
|
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
11222
10790
|
}
|
|
11223
10791
|
|
|
11224
|
-
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
11225
|
-
|
|
11226
10792
|
function startOfUTCISOWeek(dirtyDate) {
|
|
11227
10793
|
requiredArgs(1, arguments);
|
|
11228
10794
|
var weekStartsOn = 1;
|
|
@@ -11234,8 +10800,6 @@ function startOfUTCISOWeek(dirtyDate) {
|
|
|
11234
10800
|
return date;
|
|
11235
10801
|
}
|
|
11236
10802
|
|
|
11237
|
-
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
11238
|
-
|
|
11239
10803
|
function getUTCISOWeekYear(dirtyDate) {
|
|
11240
10804
|
requiredArgs(1, arguments);
|
|
11241
10805
|
var date = toDate(dirtyDate);
|
|
@@ -11257,8 +10821,6 @@ function getUTCISOWeekYear(dirtyDate) {
|
|
|
11257
10821
|
}
|
|
11258
10822
|
}
|
|
11259
10823
|
|
|
11260
|
-
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
11261
|
-
|
|
11262
10824
|
function startOfUTCISOWeekYear(dirtyDate) {
|
|
11263
10825
|
requiredArgs(1, arguments);
|
|
11264
10826
|
var year = getUTCISOWeekYear(dirtyDate);
|
|
@@ -11269,29 +10831,30 @@ function startOfUTCISOWeekYear(dirtyDate) {
|
|
|
11269
10831
|
return date;
|
|
11270
10832
|
}
|
|
11271
10833
|
|
|
11272
|
-
var MILLISECONDS_IN_WEEK$1 = 604800000;
|
|
11273
|
-
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
11274
|
-
|
|
10834
|
+
var MILLISECONDS_IN_WEEK$1 = 604800000;
|
|
11275
10835
|
function getUTCISOWeek(dirtyDate) {
|
|
11276
10836
|
requiredArgs(1, arguments);
|
|
11277
10837
|
var date = toDate(dirtyDate);
|
|
11278
|
-
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
10838
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
10839
|
+
|
|
10840
|
+
// Round the number of days to the nearest integer
|
|
11279
10841
|
// because the number of milliseconds in a week is not constant
|
|
11280
10842
|
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
11281
|
-
|
|
11282
10843
|
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
11283
10844
|
}
|
|
11284
10845
|
|
|
11285
|
-
|
|
10846
|
+
var defaultOptions = {};
|
|
10847
|
+
function getDefaultOptions() {
|
|
10848
|
+
return defaultOptions;
|
|
10849
|
+
}
|
|
11286
10850
|
|
|
11287
|
-
function startOfUTCWeek(dirtyDate,
|
|
10851
|
+
function startOfUTCWeek(dirtyDate, options) {
|
|
10852
|
+
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
11288
10853
|
requiredArgs(1, arguments);
|
|
11289
|
-
var
|
|
11290
|
-
var locale = options.locale;
|
|
11291
|
-
var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;
|
|
11292
|
-
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
11293
|
-
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
10854
|
+
var defaultOptions = getDefaultOptions();
|
|
10855
|
+
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
11294
10856
|
|
|
10857
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
11295
10858
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
11296
10859
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
11297
10860
|
}
|
|
@@ -11303,29 +10866,26 @@ function startOfUTCWeek(dirtyDate, dirtyOptions) {
|
|
|
11303
10866
|
return date;
|
|
11304
10867
|
}
|
|
11305
10868
|
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
10869
|
+
function getUTCWeekYear(dirtyDate, options) {
|
|
10870
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
11309
10871
|
requiredArgs(1, arguments);
|
|
11310
|
-
var date = toDate(dirtyDate
|
|
10872
|
+
var date = toDate(dirtyDate);
|
|
11311
10873
|
var year = date.getUTCFullYear();
|
|
11312
|
-
var
|
|
11313
|
-
var locale = options.locale;
|
|
11314
|
-
var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;
|
|
11315
|
-
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
11316
|
-
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
10874
|
+
var defaultOptions = getDefaultOptions();
|
|
10875
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
11317
10876
|
|
|
10877
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
11318
10878
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
11319
10879
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
11320
10880
|
}
|
|
11321
10881
|
var firstWeekOfNextYear = new Date(0);
|
|
11322
10882
|
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
11323
10883
|
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
11324
|
-
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear,
|
|
10884
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
11325
10885
|
var firstWeekOfThisYear = new Date(0);
|
|
11326
10886
|
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
11327
10887
|
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
11328
|
-
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear,
|
|
10888
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
11329
10889
|
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
11330
10890
|
return year + 1;
|
|
11331
10891
|
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
@@ -11335,36 +10895,119 @@ function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
|
11335
10895
|
}
|
|
11336
10896
|
}
|
|
11337
10897
|
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
10898
|
+
function startOfUTCWeekYear(dirtyDate, options) {
|
|
10899
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
11341
10900
|
requiredArgs(1, arguments);
|
|
11342
|
-
var
|
|
11343
|
-
var locale = options.locale;
|
|
11344
|
-
var
|
|
11345
|
-
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
11346
|
-
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
|
11347
|
-
var year = getUTCWeekYear(dirtyDate, dirtyOptions);
|
|
10901
|
+
var defaultOptions = getDefaultOptions();
|
|
10902
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
10903
|
+
var year = getUTCWeekYear(dirtyDate, options);
|
|
11348
10904
|
var firstWeek = new Date(0);
|
|
11349
10905
|
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
11350
10906
|
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
11351
|
-
var date = startOfUTCWeek(firstWeek,
|
|
10907
|
+
var date = startOfUTCWeek(firstWeek, options);
|
|
11352
10908
|
return date;
|
|
11353
10909
|
}
|
|
11354
10910
|
|
|
11355
|
-
var MILLISECONDS_IN_WEEK = 604800000;
|
|
11356
|
-
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
11357
|
-
|
|
10911
|
+
var MILLISECONDS_IN_WEEK = 604800000;
|
|
11358
10912
|
function getUTCWeek(dirtyDate, options) {
|
|
11359
10913
|
requiredArgs(1, arguments);
|
|
11360
10914
|
var date = toDate(dirtyDate);
|
|
11361
|
-
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
10915
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
10916
|
+
|
|
10917
|
+
// Round the number of days to the nearest integer
|
|
11362
10918
|
// because the number of milliseconds in a week is not constant
|
|
11363
10919
|
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
11364
|
-
|
|
11365
10920
|
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
11366
10921
|
}
|
|
11367
10922
|
|
|
10923
|
+
function addLeadingZeros(number, targetLength) {
|
|
10924
|
+
var sign = number < 0 ? '-' : '';
|
|
10925
|
+
var output = Math.abs(number).toString();
|
|
10926
|
+
while (output.length < targetLength) {
|
|
10927
|
+
output = '0' + output;
|
|
10928
|
+
}
|
|
10929
|
+
return sign + output;
|
|
10930
|
+
}
|
|
10931
|
+
|
|
10932
|
+
/*
|
|
10933
|
+
* | | Unit | | Unit |
|
|
10934
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
10935
|
+
* | a | AM, PM | A* | |
|
|
10936
|
+
* | d | Day of month | D | |
|
|
10937
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
10938
|
+
* | m | Minute | M | Month |
|
|
10939
|
+
* | s | Second | S | Fraction of second |
|
|
10940
|
+
* | y | Year (abs) | Y | |
|
|
10941
|
+
*
|
|
10942
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
10943
|
+
*/
|
|
10944
|
+
var formatters$1 = {
|
|
10945
|
+
// Year
|
|
10946
|
+
y: function y(date, token) {
|
|
10947
|
+
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
10948
|
+
// | Year | y | yy | yyy | yyyy | yyyyy |
|
|
10949
|
+
// |----------|-------|----|-------|-------|-------|
|
|
10950
|
+
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
|
|
10951
|
+
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
|
|
10952
|
+
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
10953
|
+
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
10954
|
+
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
10955
|
+
|
|
10956
|
+
var signedYear = date.getUTCFullYear();
|
|
10957
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
10958
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
10959
|
+
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
10960
|
+
},
|
|
10961
|
+
// Month
|
|
10962
|
+
M: function M(date, token) {
|
|
10963
|
+
var month = date.getUTCMonth();
|
|
10964
|
+
return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
10965
|
+
},
|
|
10966
|
+
// Day of the month
|
|
10967
|
+
d: function d(date, token) {
|
|
10968
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
10969
|
+
},
|
|
10970
|
+
// AM or PM
|
|
10971
|
+
a: function a(date, token) {
|
|
10972
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
10973
|
+
switch (token) {
|
|
10974
|
+
case 'a':
|
|
10975
|
+
case 'aa':
|
|
10976
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
10977
|
+
case 'aaa':
|
|
10978
|
+
return dayPeriodEnumValue;
|
|
10979
|
+
case 'aaaaa':
|
|
10980
|
+
return dayPeriodEnumValue[0];
|
|
10981
|
+
case 'aaaa':
|
|
10982
|
+
default:
|
|
10983
|
+
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
10984
|
+
}
|
|
10985
|
+
},
|
|
10986
|
+
// Hour [1-12]
|
|
10987
|
+
h: function h(date, token) {
|
|
10988
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
10989
|
+
},
|
|
10990
|
+
// Hour [0-23]
|
|
10991
|
+
H: function H(date, token) {
|
|
10992
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
10993
|
+
},
|
|
10994
|
+
// Minute
|
|
10995
|
+
m: function m(date, token) {
|
|
10996
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
10997
|
+
},
|
|
10998
|
+
// Second
|
|
10999
|
+
s: function s(date, token) {
|
|
11000
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
11001
|
+
},
|
|
11002
|
+
// Fraction of second
|
|
11003
|
+
S: function S(date, token) {
|
|
11004
|
+
var numberOfDigits = token.length;
|
|
11005
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
11006
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
11007
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
11008
|
+
}
|
|
11009
|
+
};
|
|
11010
|
+
|
|
11368
11011
|
var dayPeriodEnum = {
|
|
11369
11012
|
am: 'am',
|
|
11370
11013
|
pm: 'pm',
|
|
@@ -11374,52 +11017,52 @@ var dayPeriodEnum = {
|
|
|
11374
11017
|
afternoon: 'afternoon',
|
|
11375
11018
|
evening: 'evening',
|
|
11376
11019
|
night: 'night'
|
|
11377
|
-
/*
|
|
11378
|
-
* | | Unit | | Unit |
|
|
11379
|
-
* |-----|--------------------------------|-----|--------------------------------|
|
|
11380
|
-
* | a | AM, PM | A* | Milliseconds in day |
|
|
11381
|
-
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
11382
|
-
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
11383
|
-
* | d | Day of month | D | Day of year |
|
|
11384
|
-
* | e | Local day of week | E | Day of week |
|
|
11385
|
-
* | f | | F* | Day of week in month |
|
|
11386
|
-
* | g* | Modified Julian day | G | Era |
|
|
11387
|
-
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
11388
|
-
* | i! | ISO day of week | I! | ISO week of year |
|
|
11389
|
-
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
11390
|
-
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
11391
|
-
* | l* | (deprecated) | L | Stand-alone month |
|
|
11392
|
-
* | m | Minute | M | Month |
|
|
11393
|
-
* | n | | N | |
|
|
11394
|
-
* | o! | Ordinal number modifier | O | Timezone (GMT) |
|
|
11395
|
-
* | p! | Long localized time | P! | Long localized date |
|
|
11396
|
-
* | q | Stand-alone quarter | Q | Quarter |
|
|
11397
|
-
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
11398
|
-
* | s | Second | S | Fraction of second |
|
|
11399
|
-
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
11400
|
-
* | u | Extended year | U* | Cyclic year |
|
|
11401
|
-
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
11402
|
-
* | w | Local week of year | W* | Week of month |
|
|
11403
|
-
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
11404
|
-
* | y | Year (abs) | Y | Local week-numbering year |
|
|
11405
|
-
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
11406
|
-
*
|
|
11407
|
-
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
11408
|
-
*
|
|
11409
|
-
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
11410
|
-
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
|
|
11411
|
-
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
11412
|
-
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
11413
|
-
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
11414
|
-
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
11415
|
-
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
11416
|
-
* for universal ISO week-numbering date, whereas
|
|
11417
|
-
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
11418
|
-
* for week-numbering date specific to the locale.
|
|
11419
|
-
* - `P` is long localized date format
|
|
11420
|
-
* - `p` is long localized time format
|
|
11421
|
-
*/
|
|
11422
11020
|
};
|
|
11021
|
+
/*
|
|
11022
|
+
* | | Unit | | Unit |
|
|
11023
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
11024
|
+
* | a | AM, PM | A* | Milliseconds in day |
|
|
11025
|
+
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
11026
|
+
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
11027
|
+
* | d | Day of month | D | Day of year |
|
|
11028
|
+
* | e | Local day of week | E | Day of week |
|
|
11029
|
+
* | f | | F* | Day of week in month |
|
|
11030
|
+
* | g* | Modified Julian day | G | Era |
|
|
11031
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
11032
|
+
* | i! | ISO day of week | I! | ISO week of year |
|
|
11033
|
+
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
11034
|
+
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
11035
|
+
* | l* | (deprecated) | L | Stand-alone month |
|
|
11036
|
+
* | m | Minute | M | Month |
|
|
11037
|
+
* | n | | N | |
|
|
11038
|
+
* | o! | Ordinal number modifier | O | Timezone (GMT) |
|
|
11039
|
+
* | p! | Long localized time | P! | Long localized date |
|
|
11040
|
+
* | q | Stand-alone quarter | Q | Quarter |
|
|
11041
|
+
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
11042
|
+
* | s | Second | S | Fraction of second |
|
|
11043
|
+
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
11044
|
+
* | u | Extended year | U* | Cyclic year |
|
|
11045
|
+
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
11046
|
+
* | w | Local week of year | W* | Week of month |
|
|
11047
|
+
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
11048
|
+
* | y | Year (abs) | Y | Local week-numbering year |
|
|
11049
|
+
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
11050
|
+
*
|
|
11051
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
11052
|
+
*
|
|
11053
|
+
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
11054
|
+
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
|
|
11055
|
+
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
11056
|
+
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
11057
|
+
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
11058
|
+
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
11059
|
+
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
11060
|
+
* for universal ISO week-numbering date, whereas
|
|
11061
|
+
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
11062
|
+
* for week-numbering date specific to the locale.
|
|
11063
|
+
* - `P` is long localized date format
|
|
11064
|
+
* - `p` is long localized time format
|
|
11065
|
+
*/
|
|
11423
11066
|
|
|
11424
11067
|
var formatters = {
|
|
11425
11068
|
// Era
|
|
@@ -11434,13 +11077,11 @@ var formatters = {
|
|
|
11434
11077
|
width: 'abbreviated'
|
|
11435
11078
|
});
|
|
11436
11079
|
// A, B
|
|
11437
|
-
|
|
11438
11080
|
case 'GGGGG':
|
|
11439
11081
|
return localize.era(era, {
|
|
11440
11082
|
width: 'narrow'
|
|
11441
11083
|
});
|
|
11442
11084
|
// Anno Domini, Before Christ
|
|
11443
|
-
|
|
11444
11085
|
case 'GGGG':
|
|
11445
11086
|
default:
|
|
11446
11087
|
return localize.era(era, {
|
|
@@ -11452,8 +11093,8 @@ var formatters = {
|
|
|
11452
11093
|
y: function y(date, token, localize) {
|
|
11453
11094
|
// Ordinal number
|
|
11454
11095
|
if (token === 'yo') {
|
|
11455
|
-
var signedYear = date.getUTCFullYear();
|
|
11456
|
-
|
|
11096
|
+
var signedYear = date.getUTCFullYear();
|
|
11097
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
11457
11098
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
11458
11099
|
return localize.ordinalNumber(year, {
|
|
11459
11100
|
unit: 'year'
|
|
@@ -11463,27 +11104,31 @@ var formatters = {
|
|
|
11463
11104
|
},
|
|
11464
11105
|
// Local week-numbering year
|
|
11465
11106
|
Y: function Y(date, token, localize, options) {
|
|
11466
|
-
var signedWeekYear = getUTCWeekYear(date, options);
|
|
11467
|
-
|
|
11468
|
-
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
11107
|
+
var signedWeekYear = getUTCWeekYear(date, options);
|
|
11108
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
11109
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
11469
11110
|
|
|
11111
|
+
// Two digit year
|
|
11470
11112
|
if (token === 'YY') {
|
|
11471
11113
|
var twoDigitYear = weekYear % 100;
|
|
11472
11114
|
return addLeadingZeros(twoDigitYear, 2);
|
|
11473
|
-
}
|
|
11115
|
+
}
|
|
11474
11116
|
|
|
11117
|
+
// Ordinal number
|
|
11475
11118
|
if (token === 'Yo') {
|
|
11476
11119
|
return localize.ordinalNumber(weekYear, {
|
|
11477
11120
|
unit: 'year'
|
|
11478
11121
|
});
|
|
11479
|
-
}
|
|
11122
|
+
}
|
|
11480
11123
|
|
|
11124
|
+
// Padding
|
|
11481
11125
|
return addLeadingZeros(weekYear, token.length);
|
|
11482
11126
|
},
|
|
11483
11127
|
// ISO week-numbering year
|
|
11484
11128
|
R: function R(date, token) {
|
|
11485
|
-
var isoWeekYear = getUTCISOWeekYear(date);
|
|
11129
|
+
var isoWeekYear = getUTCISOWeekYear(date);
|
|
11486
11130
|
|
|
11131
|
+
// Padding
|
|
11487
11132
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
11488
11133
|
},
|
|
11489
11134
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -11507,31 +11152,26 @@ var formatters = {
|
|
|
11507
11152
|
case 'Q':
|
|
11508
11153
|
return String(quarter);
|
|
11509
11154
|
// 01, 02, 03, 04
|
|
11510
|
-
|
|
11511
11155
|
case 'QQ':
|
|
11512
11156
|
return addLeadingZeros(quarter, 2);
|
|
11513
11157
|
// 1st, 2nd, 3rd, 4th
|
|
11514
|
-
|
|
11515
11158
|
case 'Qo':
|
|
11516
11159
|
return localize.ordinalNumber(quarter, {
|
|
11517
11160
|
unit: 'quarter'
|
|
11518
11161
|
});
|
|
11519
11162
|
// Q1, Q2, Q3, Q4
|
|
11520
|
-
|
|
11521
11163
|
case 'QQQ':
|
|
11522
11164
|
return localize.quarter(quarter, {
|
|
11523
11165
|
width: 'abbreviated',
|
|
11524
11166
|
context: 'formatting'
|
|
11525
11167
|
});
|
|
11526
11168
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
11527
|
-
|
|
11528
11169
|
case 'QQQQQ':
|
|
11529
11170
|
return localize.quarter(quarter, {
|
|
11530
11171
|
width: 'narrow',
|
|
11531
11172
|
context: 'formatting'
|
|
11532
11173
|
});
|
|
11533
11174
|
// 1st quarter, 2nd quarter, ...
|
|
11534
|
-
|
|
11535
11175
|
case 'QQQQ':
|
|
11536
11176
|
default:
|
|
11537
11177
|
return localize.quarter(quarter, {
|
|
@@ -11548,31 +11188,26 @@ var formatters = {
|
|
|
11548
11188
|
case 'q':
|
|
11549
11189
|
return String(quarter);
|
|
11550
11190
|
// 01, 02, 03, 04
|
|
11551
|
-
|
|
11552
11191
|
case 'qq':
|
|
11553
11192
|
return addLeadingZeros(quarter, 2);
|
|
11554
11193
|
// 1st, 2nd, 3rd, 4th
|
|
11555
|
-
|
|
11556
11194
|
case 'qo':
|
|
11557
11195
|
return localize.ordinalNumber(quarter, {
|
|
11558
11196
|
unit: 'quarter'
|
|
11559
11197
|
});
|
|
11560
11198
|
// Q1, Q2, Q3, Q4
|
|
11561
|
-
|
|
11562
11199
|
case 'qqq':
|
|
11563
11200
|
return localize.quarter(quarter, {
|
|
11564
11201
|
width: 'abbreviated',
|
|
11565
11202
|
context: 'standalone'
|
|
11566
11203
|
});
|
|
11567
11204
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
11568
|
-
|
|
11569
11205
|
case 'qqqqq':
|
|
11570
11206
|
return localize.quarter(quarter, {
|
|
11571
11207
|
width: 'narrow',
|
|
11572
11208
|
context: 'standalone'
|
|
11573
11209
|
});
|
|
11574
11210
|
// 1st quarter, 2nd quarter, ...
|
|
11575
|
-
|
|
11576
11211
|
case 'qqqq':
|
|
11577
11212
|
default:
|
|
11578
11213
|
return localize.quarter(quarter, {
|
|
@@ -11589,27 +11224,23 @@ var formatters = {
|
|
|
11589
11224
|
case 'MM':
|
|
11590
11225
|
return formatters$1.M(date, token);
|
|
11591
11226
|
// 1st, 2nd, ..., 12th
|
|
11592
|
-
|
|
11593
11227
|
case 'Mo':
|
|
11594
11228
|
return localize.ordinalNumber(month + 1, {
|
|
11595
11229
|
unit: 'month'
|
|
11596
11230
|
});
|
|
11597
11231
|
// Jan, Feb, ..., Dec
|
|
11598
|
-
|
|
11599
11232
|
case 'MMM':
|
|
11600
11233
|
return localize.month(month, {
|
|
11601
11234
|
width: 'abbreviated',
|
|
11602
11235
|
context: 'formatting'
|
|
11603
11236
|
});
|
|
11604
11237
|
// J, F, ..., D
|
|
11605
|
-
|
|
11606
11238
|
case 'MMMMM':
|
|
11607
11239
|
return localize.month(month, {
|
|
11608
11240
|
width: 'narrow',
|
|
11609
11241
|
context: 'formatting'
|
|
11610
11242
|
});
|
|
11611
11243
|
// January, February, ..., December
|
|
11612
|
-
|
|
11613
11244
|
case 'MMMM':
|
|
11614
11245
|
default:
|
|
11615
11246
|
return localize.month(month, {
|
|
@@ -11626,31 +11257,26 @@ var formatters = {
|
|
|
11626
11257
|
case 'L':
|
|
11627
11258
|
return String(month + 1);
|
|
11628
11259
|
// 01, 02, ..., 12
|
|
11629
|
-
|
|
11630
11260
|
case 'LL':
|
|
11631
11261
|
return addLeadingZeros(month + 1, 2);
|
|
11632
11262
|
// 1st, 2nd, ..., 12th
|
|
11633
|
-
|
|
11634
11263
|
case 'Lo':
|
|
11635
11264
|
return localize.ordinalNumber(month + 1, {
|
|
11636
11265
|
unit: 'month'
|
|
11637
11266
|
});
|
|
11638
11267
|
// Jan, Feb, ..., Dec
|
|
11639
|
-
|
|
11640
11268
|
case 'LLL':
|
|
11641
11269
|
return localize.month(month, {
|
|
11642
11270
|
width: 'abbreviated',
|
|
11643
11271
|
context: 'standalone'
|
|
11644
11272
|
});
|
|
11645
11273
|
// J, F, ..., D
|
|
11646
|
-
|
|
11647
11274
|
case 'LLLLL':
|
|
11648
11275
|
return localize.month(month, {
|
|
11649
11276
|
width: 'narrow',
|
|
11650
11277
|
context: 'standalone'
|
|
11651
11278
|
});
|
|
11652
11279
|
// January, February, ..., December
|
|
11653
|
-
|
|
11654
11280
|
case 'LLLL':
|
|
11655
11281
|
default:
|
|
11656
11282
|
return localize.month(month, {
|
|
@@ -11711,21 +11337,18 @@ var formatters = {
|
|
|
11711
11337
|
context: 'formatting'
|
|
11712
11338
|
});
|
|
11713
11339
|
// T
|
|
11714
|
-
|
|
11715
11340
|
case 'EEEEE':
|
|
11716
11341
|
return localize.day(dayOfWeek, {
|
|
11717
11342
|
width: 'narrow',
|
|
11718
11343
|
context: 'formatting'
|
|
11719
11344
|
});
|
|
11720
11345
|
// Tu
|
|
11721
|
-
|
|
11722
11346
|
case 'EEEEEE':
|
|
11723
11347
|
return localize.day(dayOfWeek, {
|
|
11724
11348
|
width: 'short',
|
|
11725
11349
|
context: 'formatting'
|
|
11726
11350
|
});
|
|
11727
11351
|
// Tuesday
|
|
11728
|
-
|
|
11729
11352
|
case 'EEEE':
|
|
11730
11353
|
default:
|
|
11731
11354
|
return localize.day(dayOfWeek, {
|
|
@@ -11743,11 +11366,9 @@ var formatters = {
|
|
|
11743
11366
|
case 'e':
|
|
11744
11367
|
return String(localDayOfWeek);
|
|
11745
11368
|
// Padded numerical value
|
|
11746
|
-
|
|
11747
11369
|
case 'ee':
|
|
11748
11370
|
return addLeadingZeros(localDayOfWeek, 2);
|
|
11749
11371
|
// 1st, 2nd, ..., 7th
|
|
11750
|
-
|
|
11751
11372
|
case 'eo':
|
|
11752
11373
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
11753
11374
|
unit: 'day'
|
|
@@ -11758,21 +11379,18 @@ var formatters = {
|
|
|
11758
11379
|
context: 'formatting'
|
|
11759
11380
|
});
|
|
11760
11381
|
// T
|
|
11761
|
-
|
|
11762
11382
|
case 'eeeee':
|
|
11763
11383
|
return localize.day(dayOfWeek, {
|
|
11764
11384
|
width: 'narrow',
|
|
11765
11385
|
context: 'formatting'
|
|
11766
11386
|
});
|
|
11767
11387
|
// Tu
|
|
11768
|
-
|
|
11769
11388
|
case 'eeeeee':
|
|
11770
11389
|
return localize.day(dayOfWeek, {
|
|
11771
11390
|
width: 'short',
|
|
11772
11391
|
context: 'formatting'
|
|
11773
11392
|
});
|
|
11774
11393
|
// Tuesday
|
|
11775
|
-
|
|
11776
11394
|
case 'eeee':
|
|
11777
11395
|
default:
|
|
11778
11396
|
return localize.day(dayOfWeek, {
|
|
@@ -11790,11 +11408,9 @@ var formatters = {
|
|
|
11790
11408
|
case 'c':
|
|
11791
11409
|
return String(localDayOfWeek);
|
|
11792
11410
|
// Padded numerical value
|
|
11793
|
-
|
|
11794
11411
|
case 'cc':
|
|
11795
11412
|
return addLeadingZeros(localDayOfWeek, token.length);
|
|
11796
11413
|
// 1st, 2nd, ..., 7th
|
|
11797
|
-
|
|
11798
11414
|
case 'co':
|
|
11799
11415
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
11800
11416
|
unit: 'day'
|
|
@@ -11805,21 +11421,18 @@ var formatters = {
|
|
|
11805
11421
|
context: 'standalone'
|
|
11806
11422
|
});
|
|
11807
11423
|
// T
|
|
11808
|
-
|
|
11809
11424
|
case 'ccccc':
|
|
11810
11425
|
return localize.day(dayOfWeek, {
|
|
11811
11426
|
width: 'narrow',
|
|
11812
11427
|
context: 'standalone'
|
|
11813
11428
|
});
|
|
11814
11429
|
// Tu
|
|
11815
|
-
|
|
11816
11430
|
case 'cccccc':
|
|
11817
11431
|
return localize.day(dayOfWeek, {
|
|
11818
11432
|
width: 'short',
|
|
11819
11433
|
context: 'standalone'
|
|
11820
11434
|
});
|
|
11821
11435
|
// Tuesday
|
|
11822
|
-
|
|
11823
11436
|
case 'cccc':
|
|
11824
11437
|
default:
|
|
11825
11438
|
return localize.day(dayOfWeek, {
|
|
@@ -11837,38 +11450,32 @@ var formatters = {
|
|
|
11837
11450
|
case 'i':
|
|
11838
11451
|
return String(isoDayOfWeek);
|
|
11839
11452
|
// 02
|
|
11840
|
-
|
|
11841
11453
|
case 'ii':
|
|
11842
11454
|
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
11843
11455
|
// 2nd
|
|
11844
|
-
|
|
11845
11456
|
case 'io':
|
|
11846
11457
|
return localize.ordinalNumber(isoDayOfWeek, {
|
|
11847
11458
|
unit: 'day'
|
|
11848
11459
|
});
|
|
11849
11460
|
// Tue
|
|
11850
|
-
|
|
11851
11461
|
case 'iii':
|
|
11852
11462
|
return localize.day(dayOfWeek, {
|
|
11853
11463
|
width: 'abbreviated',
|
|
11854
11464
|
context: 'formatting'
|
|
11855
11465
|
});
|
|
11856
11466
|
// T
|
|
11857
|
-
|
|
11858
11467
|
case 'iiiii':
|
|
11859
11468
|
return localize.day(dayOfWeek, {
|
|
11860
11469
|
width: 'narrow',
|
|
11861
11470
|
context: 'formatting'
|
|
11862
11471
|
});
|
|
11863
11472
|
// Tu
|
|
11864
|
-
|
|
11865
11473
|
case 'iiiiii':
|
|
11866
11474
|
return localize.day(dayOfWeek, {
|
|
11867
11475
|
width: 'short',
|
|
11868
11476
|
context: 'formatting'
|
|
11869
11477
|
});
|
|
11870
11478
|
// Tuesday
|
|
11871
|
-
|
|
11872
11479
|
case 'iiii':
|
|
11873
11480
|
default:
|
|
11874
11481
|
return localize.day(dayOfWeek, {
|
|
@@ -11884,11 +11491,15 @@ var formatters = {
|
|
|
11884
11491
|
switch (token) {
|
|
11885
11492
|
case 'a':
|
|
11886
11493
|
case 'aa':
|
|
11887
|
-
case 'aaa':
|
|
11888
11494
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
11889
11495
|
width: 'abbreviated',
|
|
11890
11496
|
context: 'formatting'
|
|
11891
11497
|
});
|
|
11498
|
+
case 'aaa':
|
|
11499
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
11500
|
+
width: 'abbreviated',
|
|
11501
|
+
context: 'formatting'
|
|
11502
|
+
}).toLowerCase();
|
|
11892
11503
|
case 'aaaaa':
|
|
11893
11504
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
11894
11505
|
width: 'narrow',
|
|
@@ -11916,11 +11527,15 @@ var formatters = {
|
|
|
11916
11527
|
switch (token) {
|
|
11917
11528
|
case 'b':
|
|
11918
11529
|
case 'bb':
|
|
11919
|
-
case 'bbb':
|
|
11920
11530
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
11921
11531
|
width: 'abbreviated',
|
|
11922
11532
|
context: 'formatting'
|
|
11923
11533
|
});
|
|
11534
|
+
case 'bbb':
|
|
11535
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
11536
|
+
width: 'abbreviated',
|
|
11537
|
+
context: 'formatting'
|
|
11538
|
+
}).toLowerCase();
|
|
11924
11539
|
case 'bbbbb':
|
|
11925
11540
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
11926
11541
|
width: 'narrow',
|
|
@@ -12042,21 +11657,20 @@ var formatters = {
|
|
|
12042
11657
|
// Hours and optional minutes
|
|
12043
11658
|
case 'X':
|
|
12044
11659
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
11660
|
+
|
|
12045
11661
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
12046
11662
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12047
11663
|
// so this token always has the same output as `XX`
|
|
12048
|
-
|
|
12049
11664
|
case 'XXXX':
|
|
12050
11665
|
case 'XX':
|
|
12051
11666
|
// Hours and minutes without `:` delimiter
|
|
12052
11667
|
return formatTimezone(timezoneOffset);
|
|
11668
|
+
|
|
12053
11669
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
12054
11670
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12055
11671
|
// so this token always has the same output as `XXX`
|
|
12056
|
-
|
|
12057
11672
|
case 'XXXXX':
|
|
12058
11673
|
case 'XXX': // Hours and minutes with `:` delimiter
|
|
12059
|
-
|
|
12060
11674
|
default:
|
|
12061
11675
|
return formatTimezone(timezoneOffset, ':');
|
|
12062
11676
|
}
|
|
@@ -12069,21 +11683,20 @@ var formatters = {
|
|
|
12069
11683
|
// Hours and optional minutes
|
|
12070
11684
|
case 'x':
|
|
12071
11685
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
11686
|
+
|
|
12072
11687
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
12073
11688
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12074
11689
|
// so this token always has the same output as `xx`
|
|
12075
|
-
|
|
12076
11690
|
case 'xxxx':
|
|
12077
11691
|
case 'xx':
|
|
12078
11692
|
// Hours and minutes without `:` delimiter
|
|
12079
11693
|
return formatTimezone(timezoneOffset);
|
|
11694
|
+
|
|
12080
11695
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
12081
11696
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12082
11697
|
// so this token always has the same output as `xxx`
|
|
12083
|
-
|
|
12084
11698
|
case 'xxxxx':
|
|
12085
11699
|
case 'xxx': // Hours and minutes with `:` delimiter
|
|
12086
|
-
|
|
12087
11700
|
default:
|
|
12088
11701
|
return formatTimezone(timezoneOffset, ':');
|
|
12089
11702
|
}
|
|
@@ -12099,7 +11712,6 @@ var formatters = {
|
|
|
12099
11712
|
case 'OOO':
|
|
12100
11713
|
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
12101
11714
|
// Long
|
|
12102
|
-
|
|
12103
11715
|
case 'OOOO':
|
|
12104
11716
|
default:
|
|
12105
11717
|
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
@@ -12116,7 +11728,6 @@ var formatters = {
|
|
|
12116
11728
|
case 'zzz':
|
|
12117
11729
|
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
12118
11730
|
// Long
|
|
12119
|
-
|
|
12120
11731
|
case 'zzzz':
|
|
12121
11732
|
default:
|
|
12122
11733
|
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
@@ -12162,7 +11773,7 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
12162
11773
|
return sign + hours + delimiter + minutes;
|
|
12163
11774
|
}
|
|
12164
11775
|
|
|
12165
|
-
function dateLongFormatter(pattern, formatLong) {
|
|
11776
|
+
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
12166
11777
|
switch (pattern) {
|
|
12167
11778
|
case 'P':
|
|
12168
11779
|
return formatLong.date({
|
|
@@ -12182,8 +11793,8 @@ function dateLongFormatter(pattern, formatLong) {
|
|
|
12182
11793
|
width: 'full'
|
|
12183
11794
|
});
|
|
12184
11795
|
}
|
|
12185
|
-
}
|
|
12186
|
-
function timeLongFormatter(pattern, formatLong) {
|
|
11796
|
+
};
|
|
11797
|
+
var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
12187
11798
|
switch (pattern) {
|
|
12188
11799
|
case 'p':
|
|
12189
11800
|
return formatLong.time({
|
|
@@ -12203,9 +11814,9 @@ function timeLongFormatter(pattern, formatLong) {
|
|
|
12203
11814
|
width: 'full'
|
|
12204
11815
|
});
|
|
12205
11816
|
}
|
|
12206
|
-
}
|
|
12207
|
-
function dateTimeLongFormatter(pattern, formatLong) {
|
|
12208
|
-
var matchResult = pattern.match(/(P+)(p+)?/);
|
|
11817
|
+
};
|
|
11818
|
+
var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
|
|
11819
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
12209
11820
|
var datePattern = matchResult[1];
|
|
12210
11821
|
var timePattern = matchResult[2];
|
|
12211
11822
|
if (!timePattern) {
|
|
@@ -12236,16 +11847,12 @@ function dateTimeLongFormatter(pattern, formatLong) {
|
|
|
12236
11847
|
break;
|
|
12237
11848
|
}
|
|
12238
11849
|
return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
|
|
12239
|
-
}
|
|
11850
|
+
};
|
|
12240
11851
|
var longFormatters = {
|
|
12241
11852
|
p: timeLongFormatter,
|
|
12242
11853
|
P: dateTimeLongFormatter
|
|
12243
11854
|
};
|
|
12244
11855
|
|
|
12245
|
-
var MILLISECONDS_IN_MINUTE = 60000;
|
|
12246
|
-
function getDateMillisecondsPart(date) {
|
|
12247
|
-
return date.getTime() % MILLISECONDS_IN_MINUTE;
|
|
12248
|
-
}
|
|
12249
11856
|
/**
|
|
12250
11857
|
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
12251
11858
|
* They usually appear for dates that denote time before the timezones were introduced
|
|
@@ -12257,14 +11864,10 @@ function getDateMillisecondsPart(date) {
|
|
|
12257
11864
|
*
|
|
12258
11865
|
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
12259
11866
|
*/
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
date.setSeconds(0, 0);
|
|
12265
|
-
var hasNegativeUTCOffset = baseTimezoneOffset > 0;
|
|
12266
|
-
var millisecondsPartOfTimezoneOffset = hasNegativeUTCOffset ? (MILLISECONDS_IN_MINUTE + getDateMillisecondsPart(date)) % MILLISECONDS_IN_MINUTE : getDateMillisecondsPart(date);
|
|
12267
|
-
return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset;
|
|
11867
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
11868
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
11869
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
11870
|
+
return date.getTime() - utcDate.getTime();
|
|
12268
11871
|
}
|
|
12269
11872
|
|
|
12270
11873
|
var protectedDayOfYearTokens = ['D', 'DD'];
|
|
@@ -12277,16 +11880,494 @@ function isProtectedWeekYearToken(token) {
|
|
|
12277
11880
|
}
|
|
12278
11881
|
function throwProtectedError(token, format, input) {
|
|
12279
11882
|
if (token === 'YYYY') {
|
|
12280
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://
|
|
11883
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
12281
11884
|
} else if (token === 'YY') {
|
|
12282
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://
|
|
11885
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
12283
11886
|
} else if (token === 'D') {
|
|
12284
|
-
throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://
|
|
11887
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
12285
11888
|
} else if (token === 'DD') {
|
|
12286
|
-
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://
|
|
11889
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
11890
|
+
}
|
|
11891
|
+
}
|
|
11892
|
+
|
|
11893
|
+
var formatDistanceLocale = {
|
|
11894
|
+
lessThanXSeconds: {
|
|
11895
|
+
one: 'less than a second',
|
|
11896
|
+
other: 'less than {{count}} seconds'
|
|
11897
|
+
},
|
|
11898
|
+
xSeconds: {
|
|
11899
|
+
one: '1 second',
|
|
11900
|
+
other: '{{count}} seconds'
|
|
11901
|
+
},
|
|
11902
|
+
halfAMinute: 'half a minute',
|
|
11903
|
+
lessThanXMinutes: {
|
|
11904
|
+
one: 'less than a minute',
|
|
11905
|
+
other: 'less than {{count}} minutes'
|
|
11906
|
+
},
|
|
11907
|
+
xMinutes: {
|
|
11908
|
+
one: '1 minute',
|
|
11909
|
+
other: '{{count}} minutes'
|
|
11910
|
+
},
|
|
11911
|
+
aboutXHours: {
|
|
11912
|
+
one: 'about 1 hour',
|
|
11913
|
+
other: 'about {{count}} hours'
|
|
11914
|
+
},
|
|
11915
|
+
xHours: {
|
|
11916
|
+
one: '1 hour',
|
|
11917
|
+
other: '{{count}} hours'
|
|
11918
|
+
},
|
|
11919
|
+
xDays: {
|
|
11920
|
+
one: '1 day',
|
|
11921
|
+
other: '{{count}} days'
|
|
11922
|
+
},
|
|
11923
|
+
aboutXWeeks: {
|
|
11924
|
+
one: 'about 1 week',
|
|
11925
|
+
other: 'about {{count}} weeks'
|
|
11926
|
+
},
|
|
11927
|
+
xWeeks: {
|
|
11928
|
+
one: '1 week',
|
|
11929
|
+
other: '{{count}} weeks'
|
|
11930
|
+
},
|
|
11931
|
+
aboutXMonths: {
|
|
11932
|
+
one: 'about 1 month',
|
|
11933
|
+
other: 'about {{count}} months'
|
|
11934
|
+
},
|
|
11935
|
+
xMonths: {
|
|
11936
|
+
one: '1 month',
|
|
11937
|
+
other: '{{count}} months'
|
|
11938
|
+
},
|
|
11939
|
+
aboutXYears: {
|
|
11940
|
+
one: 'about 1 year',
|
|
11941
|
+
other: 'about {{count}} years'
|
|
11942
|
+
},
|
|
11943
|
+
xYears: {
|
|
11944
|
+
one: '1 year',
|
|
11945
|
+
other: '{{count}} years'
|
|
11946
|
+
},
|
|
11947
|
+
overXYears: {
|
|
11948
|
+
one: 'over 1 year',
|
|
11949
|
+
other: 'over {{count}} years'
|
|
11950
|
+
},
|
|
11951
|
+
almostXYears: {
|
|
11952
|
+
one: 'almost 1 year',
|
|
11953
|
+
other: 'almost {{count}} years'
|
|
11954
|
+
}
|
|
11955
|
+
};
|
|
11956
|
+
var formatDistance = function formatDistance(token, count, options) {
|
|
11957
|
+
var result;
|
|
11958
|
+
var tokenValue = formatDistanceLocale[token];
|
|
11959
|
+
if (typeof tokenValue === 'string') {
|
|
11960
|
+
result = tokenValue;
|
|
11961
|
+
} else if (count === 1) {
|
|
11962
|
+
result = tokenValue.one;
|
|
11963
|
+
} else {
|
|
11964
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
12287
11965
|
}
|
|
11966
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
11967
|
+
if (options.comparison && options.comparison > 0) {
|
|
11968
|
+
return 'in ' + result;
|
|
11969
|
+
} else {
|
|
11970
|
+
return result + ' ago';
|
|
11971
|
+
}
|
|
11972
|
+
}
|
|
11973
|
+
return result;
|
|
11974
|
+
};
|
|
11975
|
+
|
|
11976
|
+
function buildFormatLongFn(args) {
|
|
11977
|
+
return function () {
|
|
11978
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11979
|
+
// TODO: Remove String()
|
|
11980
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
11981
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
11982
|
+
return format;
|
|
11983
|
+
};
|
|
11984
|
+
}
|
|
11985
|
+
|
|
11986
|
+
var dateFormats = {
|
|
11987
|
+
full: 'EEEE, MMMM do, y',
|
|
11988
|
+
"long": 'MMMM do, y',
|
|
11989
|
+
medium: 'MMM d, y',
|
|
11990
|
+
"short": 'MM/dd/yyyy'
|
|
11991
|
+
};
|
|
11992
|
+
var timeFormats = {
|
|
11993
|
+
full: 'h:mm:ss a zzzz',
|
|
11994
|
+
"long": 'h:mm:ss a z',
|
|
11995
|
+
medium: 'h:mm:ss a',
|
|
11996
|
+
"short": 'h:mm a'
|
|
11997
|
+
};
|
|
11998
|
+
var dateTimeFormats = {
|
|
11999
|
+
full: "{{date}} 'at' {{time}}",
|
|
12000
|
+
"long": "{{date}} 'at' {{time}}",
|
|
12001
|
+
medium: '{{date}}, {{time}}',
|
|
12002
|
+
"short": '{{date}}, {{time}}'
|
|
12003
|
+
};
|
|
12004
|
+
var formatLong = {
|
|
12005
|
+
date: buildFormatLongFn({
|
|
12006
|
+
formats: dateFormats,
|
|
12007
|
+
defaultWidth: 'full'
|
|
12008
|
+
}),
|
|
12009
|
+
time: buildFormatLongFn({
|
|
12010
|
+
formats: timeFormats,
|
|
12011
|
+
defaultWidth: 'full'
|
|
12012
|
+
}),
|
|
12013
|
+
dateTime: buildFormatLongFn({
|
|
12014
|
+
formats: dateTimeFormats,
|
|
12015
|
+
defaultWidth: 'full'
|
|
12016
|
+
})
|
|
12017
|
+
};
|
|
12018
|
+
|
|
12019
|
+
var formatRelativeLocale = {
|
|
12020
|
+
lastWeek: "'last' eeee 'at' p",
|
|
12021
|
+
yesterday: "'yesterday at' p",
|
|
12022
|
+
today: "'today at' p",
|
|
12023
|
+
tomorrow: "'tomorrow at' p",
|
|
12024
|
+
nextWeek: "eeee 'at' p",
|
|
12025
|
+
other: 'P'
|
|
12026
|
+
};
|
|
12027
|
+
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
12028
|
+
return formatRelativeLocale[token];
|
|
12029
|
+
};
|
|
12030
|
+
|
|
12031
|
+
function buildLocalizeFn(args) {
|
|
12032
|
+
return function (dirtyIndex, options) {
|
|
12033
|
+
var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
|
|
12034
|
+
var valuesArray;
|
|
12035
|
+
if (context === 'formatting' && args.formattingValues) {
|
|
12036
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
12037
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
12038
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
12039
|
+
} else {
|
|
12040
|
+
var _defaultWidth = args.defaultWidth;
|
|
12041
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
12042
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
12043
|
+
}
|
|
12044
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
12045
|
+
// @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!
|
|
12046
|
+
return valuesArray[index];
|
|
12047
|
+
};
|
|
12288
12048
|
}
|
|
12289
12049
|
|
|
12050
|
+
var eraValues = {
|
|
12051
|
+
narrow: ['B', 'A'],
|
|
12052
|
+
abbreviated: ['BC', 'AD'],
|
|
12053
|
+
wide: ['Before Christ', 'Anno Domini']
|
|
12054
|
+
};
|
|
12055
|
+
var quarterValues = {
|
|
12056
|
+
narrow: ['1', '2', '3', '4'],
|
|
12057
|
+
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
12058
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
12059
|
+
};
|
|
12060
|
+
|
|
12061
|
+
// Note: in English, the names of days of the week and months are capitalized.
|
|
12062
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
12063
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
12064
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
12065
|
+
var monthValues = {
|
|
12066
|
+
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
12067
|
+
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
12068
|
+
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
12069
|
+
};
|
|
12070
|
+
var dayValues = {
|
|
12071
|
+
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
12072
|
+
"short": ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
12073
|
+
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
12074
|
+
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
12075
|
+
};
|
|
12076
|
+
var dayPeriodValues = {
|
|
12077
|
+
narrow: {
|
|
12078
|
+
am: 'a',
|
|
12079
|
+
pm: 'p',
|
|
12080
|
+
midnight: 'mi',
|
|
12081
|
+
noon: 'n',
|
|
12082
|
+
morning: 'morning',
|
|
12083
|
+
afternoon: 'afternoon',
|
|
12084
|
+
evening: 'evening',
|
|
12085
|
+
night: 'night'
|
|
12086
|
+
},
|
|
12087
|
+
abbreviated: {
|
|
12088
|
+
am: 'AM',
|
|
12089
|
+
pm: 'PM',
|
|
12090
|
+
midnight: 'midnight',
|
|
12091
|
+
noon: 'noon',
|
|
12092
|
+
morning: 'morning',
|
|
12093
|
+
afternoon: 'afternoon',
|
|
12094
|
+
evening: 'evening',
|
|
12095
|
+
night: 'night'
|
|
12096
|
+
},
|
|
12097
|
+
wide: {
|
|
12098
|
+
am: 'a.m.',
|
|
12099
|
+
pm: 'p.m.',
|
|
12100
|
+
midnight: 'midnight',
|
|
12101
|
+
noon: 'noon',
|
|
12102
|
+
morning: 'morning',
|
|
12103
|
+
afternoon: 'afternoon',
|
|
12104
|
+
evening: 'evening',
|
|
12105
|
+
night: 'night'
|
|
12106
|
+
}
|
|
12107
|
+
};
|
|
12108
|
+
var formattingDayPeriodValues = {
|
|
12109
|
+
narrow: {
|
|
12110
|
+
am: 'a',
|
|
12111
|
+
pm: 'p',
|
|
12112
|
+
midnight: 'mi',
|
|
12113
|
+
noon: 'n',
|
|
12114
|
+
morning: 'in the morning',
|
|
12115
|
+
afternoon: 'in the afternoon',
|
|
12116
|
+
evening: 'in the evening',
|
|
12117
|
+
night: 'at night'
|
|
12118
|
+
},
|
|
12119
|
+
abbreviated: {
|
|
12120
|
+
am: 'AM',
|
|
12121
|
+
pm: 'PM',
|
|
12122
|
+
midnight: 'midnight',
|
|
12123
|
+
noon: 'noon',
|
|
12124
|
+
morning: 'in the morning',
|
|
12125
|
+
afternoon: 'in the afternoon',
|
|
12126
|
+
evening: 'in the evening',
|
|
12127
|
+
night: 'at night'
|
|
12128
|
+
},
|
|
12129
|
+
wide: {
|
|
12130
|
+
am: 'a.m.',
|
|
12131
|
+
pm: 'p.m.',
|
|
12132
|
+
midnight: 'midnight',
|
|
12133
|
+
noon: 'noon',
|
|
12134
|
+
morning: 'in the morning',
|
|
12135
|
+
afternoon: 'in the afternoon',
|
|
12136
|
+
evening: 'in the evening',
|
|
12137
|
+
night: 'at night'
|
|
12138
|
+
}
|
|
12139
|
+
};
|
|
12140
|
+
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
|
|
12141
|
+
var number = Number(dirtyNumber);
|
|
12142
|
+
|
|
12143
|
+
// If ordinal numbers depend on context, for example,
|
|
12144
|
+
// if they are different for different grammatical genders,
|
|
12145
|
+
// use `options.unit`.
|
|
12146
|
+
//
|
|
12147
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
12148
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
12149
|
+
|
|
12150
|
+
var rem100 = number % 100;
|
|
12151
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
12152
|
+
switch (rem100 % 10) {
|
|
12153
|
+
case 1:
|
|
12154
|
+
return number + 'st';
|
|
12155
|
+
case 2:
|
|
12156
|
+
return number + 'nd';
|
|
12157
|
+
case 3:
|
|
12158
|
+
return number + 'rd';
|
|
12159
|
+
}
|
|
12160
|
+
}
|
|
12161
|
+
return number + 'th';
|
|
12162
|
+
};
|
|
12163
|
+
var localize = {
|
|
12164
|
+
ordinalNumber: ordinalNumber,
|
|
12165
|
+
era: buildLocalizeFn({
|
|
12166
|
+
values: eraValues,
|
|
12167
|
+
defaultWidth: 'wide'
|
|
12168
|
+
}),
|
|
12169
|
+
quarter: buildLocalizeFn({
|
|
12170
|
+
values: quarterValues,
|
|
12171
|
+
defaultWidth: 'wide',
|
|
12172
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
12173
|
+
return quarter - 1;
|
|
12174
|
+
}
|
|
12175
|
+
}),
|
|
12176
|
+
month: buildLocalizeFn({
|
|
12177
|
+
values: monthValues,
|
|
12178
|
+
defaultWidth: 'wide'
|
|
12179
|
+
}),
|
|
12180
|
+
day: buildLocalizeFn({
|
|
12181
|
+
values: dayValues,
|
|
12182
|
+
defaultWidth: 'wide'
|
|
12183
|
+
}),
|
|
12184
|
+
dayPeriod: buildLocalizeFn({
|
|
12185
|
+
values: dayPeriodValues,
|
|
12186
|
+
defaultWidth: 'wide',
|
|
12187
|
+
formattingValues: formattingDayPeriodValues,
|
|
12188
|
+
defaultFormattingWidth: 'wide'
|
|
12189
|
+
})
|
|
12190
|
+
};
|
|
12191
|
+
|
|
12192
|
+
function buildMatchFn(args) {
|
|
12193
|
+
return function (string) {
|
|
12194
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12195
|
+
var width = options.width;
|
|
12196
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
12197
|
+
var matchResult = string.match(matchPattern);
|
|
12198
|
+
if (!matchResult) {
|
|
12199
|
+
return null;
|
|
12200
|
+
}
|
|
12201
|
+
var matchedString = matchResult[0];
|
|
12202
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
12203
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
12204
|
+
return pattern.test(matchedString);
|
|
12205
|
+
}) : findKey(parsePatterns, function (pattern) {
|
|
12206
|
+
return pattern.test(matchedString);
|
|
12207
|
+
});
|
|
12208
|
+
var value;
|
|
12209
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
12210
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
12211
|
+
var rest = string.slice(matchedString.length);
|
|
12212
|
+
return {
|
|
12213
|
+
value: value,
|
|
12214
|
+
rest: rest
|
|
12215
|
+
};
|
|
12216
|
+
};
|
|
12217
|
+
}
|
|
12218
|
+
function findKey(object, predicate) {
|
|
12219
|
+
for (var key in object) {
|
|
12220
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
12221
|
+
return key;
|
|
12222
|
+
}
|
|
12223
|
+
}
|
|
12224
|
+
return undefined;
|
|
12225
|
+
}
|
|
12226
|
+
function findIndex(array, predicate) {
|
|
12227
|
+
for (var key = 0; key < array.length; key++) {
|
|
12228
|
+
if (predicate(array[key])) {
|
|
12229
|
+
return key;
|
|
12230
|
+
}
|
|
12231
|
+
}
|
|
12232
|
+
return undefined;
|
|
12233
|
+
}
|
|
12234
|
+
|
|
12235
|
+
function buildMatchPatternFn(args) {
|
|
12236
|
+
return function (string) {
|
|
12237
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12238
|
+
var matchResult = string.match(args.matchPattern);
|
|
12239
|
+
if (!matchResult) return null;
|
|
12240
|
+
var matchedString = matchResult[0];
|
|
12241
|
+
var parseResult = string.match(args.parsePattern);
|
|
12242
|
+
if (!parseResult) return null;
|
|
12243
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
12244
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
12245
|
+
var rest = string.slice(matchedString.length);
|
|
12246
|
+
return {
|
|
12247
|
+
value: value,
|
|
12248
|
+
rest: rest
|
|
12249
|
+
};
|
|
12250
|
+
};
|
|
12251
|
+
}
|
|
12252
|
+
|
|
12253
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
12254
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
12255
|
+
var matchEraPatterns = {
|
|
12256
|
+
narrow: /^(b|a)/i,
|
|
12257
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
12258
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
12259
|
+
};
|
|
12260
|
+
var parseEraPatterns = {
|
|
12261
|
+
any: [/^b/i, /^(a|c)/i]
|
|
12262
|
+
};
|
|
12263
|
+
var matchQuarterPatterns = {
|
|
12264
|
+
narrow: /^[1234]/i,
|
|
12265
|
+
abbreviated: /^q[1234]/i,
|
|
12266
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
12267
|
+
};
|
|
12268
|
+
var parseQuarterPatterns = {
|
|
12269
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
12270
|
+
};
|
|
12271
|
+
var matchMonthPatterns = {
|
|
12272
|
+
narrow: /^[jfmasond]/i,
|
|
12273
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
12274
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
12275
|
+
};
|
|
12276
|
+
var parseMonthPatterns = {
|
|
12277
|
+
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],
|
|
12278
|
+
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]
|
|
12279
|
+
};
|
|
12280
|
+
var matchDayPatterns = {
|
|
12281
|
+
narrow: /^[smtwf]/i,
|
|
12282
|
+
"short": /^(su|mo|tu|we|th|fr|sa)/i,
|
|
12283
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
12284
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
12285
|
+
};
|
|
12286
|
+
var parseDayPatterns = {
|
|
12287
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
12288
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
12289
|
+
};
|
|
12290
|
+
var matchDayPeriodPatterns = {
|
|
12291
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
12292
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
12293
|
+
};
|
|
12294
|
+
var parseDayPeriodPatterns = {
|
|
12295
|
+
any: {
|
|
12296
|
+
am: /^a/i,
|
|
12297
|
+
pm: /^p/i,
|
|
12298
|
+
midnight: /^mi/i,
|
|
12299
|
+
noon: /^no/i,
|
|
12300
|
+
morning: /morning/i,
|
|
12301
|
+
afternoon: /afternoon/i,
|
|
12302
|
+
evening: /evening/i,
|
|
12303
|
+
night: /night/i
|
|
12304
|
+
}
|
|
12305
|
+
};
|
|
12306
|
+
var match = {
|
|
12307
|
+
ordinalNumber: buildMatchPatternFn({
|
|
12308
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
12309
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
12310
|
+
valueCallback: function valueCallback(value) {
|
|
12311
|
+
return parseInt(value, 10);
|
|
12312
|
+
}
|
|
12313
|
+
}),
|
|
12314
|
+
era: buildMatchFn({
|
|
12315
|
+
matchPatterns: matchEraPatterns,
|
|
12316
|
+
defaultMatchWidth: 'wide',
|
|
12317
|
+
parsePatterns: parseEraPatterns,
|
|
12318
|
+
defaultParseWidth: 'any'
|
|
12319
|
+
}),
|
|
12320
|
+
quarter: buildMatchFn({
|
|
12321
|
+
matchPatterns: matchQuarterPatterns,
|
|
12322
|
+
defaultMatchWidth: 'wide',
|
|
12323
|
+
parsePatterns: parseQuarterPatterns,
|
|
12324
|
+
defaultParseWidth: 'any',
|
|
12325
|
+
valueCallback: function valueCallback(index) {
|
|
12326
|
+
return index + 1;
|
|
12327
|
+
}
|
|
12328
|
+
}),
|
|
12329
|
+
month: buildMatchFn({
|
|
12330
|
+
matchPatterns: matchMonthPatterns,
|
|
12331
|
+
defaultMatchWidth: 'wide',
|
|
12332
|
+
parsePatterns: parseMonthPatterns,
|
|
12333
|
+
defaultParseWidth: 'any'
|
|
12334
|
+
}),
|
|
12335
|
+
day: buildMatchFn({
|
|
12336
|
+
matchPatterns: matchDayPatterns,
|
|
12337
|
+
defaultMatchWidth: 'wide',
|
|
12338
|
+
parsePatterns: parseDayPatterns,
|
|
12339
|
+
defaultParseWidth: 'any'
|
|
12340
|
+
}),
|
|
12341
|
+
dayPeriod: buildMatchFn({
|
|
12342
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
12343
|
+
defaultMatchWidth: 'any',
|
|
12344
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
12345
|
+
defaultParseWidth: 'any'
|
|
12346
|
+
})
|
|
12347
|
+
};
|
|
12348
|
+
|
|
12349
|
+
/**
|
|
12350
|
+
* @type {Locale}
|
|
12351
|
+
* @category Locales
|
|
12352
|
+
* @summary English locale (United States).
|
|
12353
|
+
* @language English
|
|
12354
|
+
* @iso-639-2 eng
|
|
12355
|
+
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
12356
|
+
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
12357
|
+
*/
|
|
12358
|
+
var locale = {
|
|
12359
|
+
code: 'en-US',
|
|
12360
|
+
formatDistance: formatDistance,
|
|
12361
|
+
formatLong: formatLong,
|
|
12362
|
+
formatRelative: formatRelative,
|
|
12363
|
+
localize: localize,
|
|
12364
|
+
match: match,
|
|
12365
|
+
options: {
|
|
12366
|
+
weekStartsOn: 0 /* Sunday */,
|
|
12367
|
+
firstWeekContainsDate: 1
|
|
12368
|
+
}
|
|
12369
|
+
};
|
|
12370
|
+
|
|
12290
12371
|
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
12291
12372
|
// (one of the certain letters followed by `o`)
|
|
12292
12373
|
// - (\w)\1* matches any sequences of the same letter
|
|
@@ -12297,14 +12378,15 @@ function throwProtectedError(token, format, input) {
|
|
|
12297
12378
|
// If there is no matching single quote
|
|
12298
12379
|
// then the sequence will continue until the end of the string.
|
|
12299
12380
|
// - . matches any single character unmatched by previous parts of the RegExps
|
|
12381
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
12300
12382
|
|
|
12301
|
-
|
|
12383
|
+
// This RegExp catches symbols escaped by quotes, and also
|
|
12302
12384
|
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
|
|
12303
|
-
|
|
12304
12385
|
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
12305
12386
|
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
12306
12387
|
var doubleQuoteRegExp = /''/g;
|
|
12307
12388
|
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
12389
|
+
|
|
12308
12390
|
/**
|
|
12309
12391
|
* @name format
|
|
12310
12392
|
* @category Common Helpers
|
|
@@ -12314,7 +12396,7 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
12314
12396
|
* Return the formatted date string in the given format. The result may vary by locale.
|
|
12315
12397
|
*
|
|
12316
12398
|
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
|
|
12317
|
-
* > See: https://
|
|
12399
|
+
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12318
12400
|
*
|
|
12319
12401
|
* The characters wrapped between two single quotes characters (') are escaped.
|
|
12320
12402
|
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
|
|
@@ -12393,32 +12475,34 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
12393
12475
|
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
|
|
12394
12476
|
* | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
|
|
12395
12477
|
* | | EEEEE | M, T, W, T, F, S, S | |
|
|
12396
|
-
* | | EEEEEE | Mo, Tu, We, Th, Fr,
|
|
12478
|
+
* | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
12397
12479
|
* | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
|
|
12398
12480
|
* | | io | 1st, 2nd, ..., 7th | 7 |
|
|
12399
12481
|
* | | ii | 01, 02, ..., 07 | 7 |
|
|
12400
12482
|
* | | iii | Mon, Tue, Wed, ..., Sun | 7 |
|
|
12401
12483
|
* | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
|
|
12402
12484
|
* | | iiiii | M, T, W, T, F, S, S | 7 |
|
|
12403
|
-
* | | iiiiii | Mo, Tu, We, Th, Fr,
|
|
12485
|
+
* | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
|
|
12404
12486
|
* | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
|
|
12405
12487
|
* | | eo | 2nd, 3rd, ..., 1st | 7 |
|
|
12406
12488
|
* | | ee | 02, 03, ..., 01 | |
|
|
12407
12489
|
* | | eee | Mon, Tue, Wed, ..., Sun | |
|
|
12408
12490
|
* | | eeee | Monday, Tuesday, ..., Sunday | 2 |
|
|
12409
12491
|
* | | eeeee | M, T, W, T, F, S, S | |
|
|
12410
|
-
* | | eeeeee | Mo, Tu, We, Th, Fr,
|
|
12492
|
+
* | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
12411
12493
|
* | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
|
|
12412
12494
|
* | | co | 2nd, 3rd, ..., 1st | 7 |
|
|
12413
12495
|
* | | cc | 02, 03, ..., 01 | |
|
|
12414
12496
|
* | | ccc | Mon, Tue, Wed, ..., Sun | |
|
|
12415
12497
|
* | | cccc | Monday, Tuesday, ..., Sunday | 2 |
|
|
12416
12498
|
* | | ccccc | M, T, W, T, F, S, S | |
|
|
12417
|
-
* | | cccccc | Mo, Tu, We, Th, Fr,
|
|
12418
|
-
* | AM, PM | a..
|
|
12499
|
+
* | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
12500
|
+
* | AM, PM | a..aa | AM, PM | |
|
|
12501
|
+
* | | aaa | am, pm | |
|
|
12419
12502
|
* | | aaaa | a.m., p.m. | 2 |
|
|
12420
12503
|
* | | aaaaa | a, p | |
|
|
12421
|
-
* | AM, PM, noon, midnight | b..
|
|
12504
|
+
* | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
|
|
12505
|
+
* | | bbb | am, pm, noon, midnight | |
|
|
12422
12506
|
* | | bbbb | a.m., p.m., noon, midnight | 2 |
|
|
12423
12507
|
* | | bbbbb | a, p, n, mi | |
|
|
12424
12508
|
* | Flexible day period | B..BBB | at night, in the morning, ... | |
|
|
@@ -12444,7 +12528,7 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
12444
12528
|
* | | ss | 00, 01, ..., 59 | |
|
|
12445
12529
|
* | Fraction of second | S | 0, 1, ..., 9 | |
|
|
12446
12530
|
* | | SS | 00, 01, ..., 99 | |
|
|
12447
|
-
* | | SSS | 000,
|
|
12531
|
+
* | | SSS | 000, 001, ..., 999 | |
|
|
12448
12532
|
* | | SSSS | ... | 3 |
|
|
12449
12533
|
* | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
|
|
12450
12534
|
* | | XX | -0800, +0530, Z | |
|
|
@@ -12464,18 +12548,18 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
12464
12548
|
* | | tt | ... | 3,7 |
|
|
12465
12549
|
* | Milliseconds timestamp | T | 512969520900 | 7 |
|
|
12466
12550
|
* | | TT | ... | 3,7 |
|
|
12467
|
-
* | Long localized date | P |
|
|
12468
|
-
* | | PP |
|
|
12469
|
-
* | | PPP |
|
|
12470
|
-
* | | PPPP |
|
|
12551
|
+
* | Long localized date | P | 04/29/1453 | 7 |
|
|
12552
|
+
* | | PP | Apr 29, 1453 | 7 |
|
|
12553
|
+
* | | PPP | April 29th, 1453 | 7 |
|
|
12554
|
+
* | | PPPP | Friday, April 29th, 1453 | 2,7 |
|
|
12471
12555
|
* | Long localized time | p | 12:00 AM | 7 |
|
|
12472
12556
|
* | | pp | 12:00:00 AM | 7 |
|
|
12473
12557
|
* | | ppp | 12:00:00 AM GMT+2 | 7 |
|
|
12474
12558
|
* | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
|
|
12475
|
-
* | Combination of date and time | Pp |
|
|
12476
|
-
* | | PPpp |
|
|
12477
|
-
* | | PPPppp |
|
|
12478
|
-
* | | PPPPpppp|
|
|
12559
|
+
* | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
|
|
12560
|
+
* | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
|
|
12561
|
+
* | | PPPppp | April 29th, 1453 at ... | 7 |
|
|
12562
|
+
* | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
|
|
12479
12563
|
* Notes:
|
|
12480
12564
|
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
|
|
12481
12565
|
* are the same as "stand-alone" units, but are different in some languages.
|
|
@@ -12548,30 +12632,10 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
12548
12632
|
* - `p`: long localized time
|
|
12549
12633
|
*
|
|
12550
12634
|
* 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
|
|
12551
|
-
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://
|
|
12552
|
-
*
|
|
12553
|
-
* 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
|
|
12554
|
-
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr
|
|
12555
|
-
*
|
|
12556
|
-
* ### v2.0.0 breaking changes:
|
|
12557
|
-
*
|
|
12558
|
-
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
12559
|
-
*
|
|
12560
|
-
* - The second argument is now required for the sake of explicitness.
|
|
12561
|
-
*
|
|
12562
|
-
* ```javascript
|
|
12563
|
-
* // Before v2.0.0
|
|
12564
|
-
* format(new Date(2016, 0, 1))
|
|
12565
|
-
*
|
|
12566
|
-
* // v2.0.0 onward
|
|
12567
|
-
* format(new Date(2016, 0, 1), "yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
|
|
12568
|
-
* ```
|
|
12569
|
-
*
|
|
12570
|
-
* - New format string API for `format` function
|
|
12571
|
-
* which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).
|
|
12572
|
-
* See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.
|
|
12635
|
+
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12573
12636
|
*
|
|
12574
|
-
*
|
|
12637
|
+
* 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
|
|
12638
|
+
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12575
12639
|
*
|
|
12576
12640
|
* @param {Date|Number} date - the original date
|
|
12577
12641
|
* @param {String} format - the string of tokens
|
|
@@ -12580,9 +12644,9 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
12580
12644
|
* @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
|
|
12581
12645
|
* @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
|
|
12582
12646
|
* @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
|
|
12583
|
-
* see: https://
|
|
12647
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12584
12648
|
* @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
|
|
12585
|
-
* see: https://
|
|
12649
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12586
12650
|
* @returns {String} the formatted date string
|
|
12587
12651
|
* @throws {TypeError} 2 arguments required
|
|
12588
12652
|
* @throws {RangeError} `date` must not be Invalid Date
|
|
@@ -12590,47 +12654,46 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
12590
12654
|
* @throws {RangeError} `options.locale` must contain `formatLong` property
|
|
12591
12655
|
* @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
|
|
12592
12656
|
* @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
|
|
12593
|
-
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://
|
|
12594
|
-
* @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://
|
|
12595
|
-
* @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://
|
|
12596
|
-
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://
|
|
12657
|
+
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12658
|
+
* @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12659
|
+
* @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12660
|
+
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
12597
12661
|
* @throws {RangeError} format string contains an unescaped latin alphabet character
|
|
12598
12662
|
*
|
|
12599
12663
|
* @example
|
|
12600
12664
|
* // Represent 11 February 2014 in middle-endian format:
|
|
12601
|
-
*
|
|
12665
|
+
* const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
|
|
12602
12666
|
* //=> '02/11/2014'
|
|
12603
12667
|
*
|
|
12604
12668
|
* @example
|
|
12605
12669
|
* // Represent 2 July 2014 in Esperanto:
|
|
12606
12670
|
* import { eoLocale } from 'date-fns/locale/eo'
|
|
12607
|
-
*
|
|
12671
|
+
* const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
|
|
12608
12672
|
* locale: eoLocale
|
|
12609
12673
|
* })
|
|
12610
12674
|
* //=> '2-a de julio 2014'
|
|
12611
12675
|
*
|
|
12612
12676
|
* @example
|
|
12613
12677
|
* // Escape string by single quote characters:
|
|
12614
|
-
*
|
|
12678
|
+
* const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
|
|
12615
12679
|
* //=> "3 o'clock"
|
|
12616
12680
|
*/
|
|
12617
12681
|
|
|
12618
|
-
function format
|
|
12682
|
+
function format(dirtyDate, dirtyFormatStr, options) {
|
|
12683
|
+
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
12619
12684
|
requiredArgs(2, arguments);
|
|
12620
12685
|
var formatStr = String(dirtyFormatStr);
|
|
12621
|
-
var
|
|
12622
|
-
var locale$1 = options.locale
|
|
12623
|
-
var
|
|
12624
|
-
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
12625
|
-
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
12686
|
+
var defaultOptions = getDefaultOptions();
|
|
12687
|
+
var locale$1 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
|
|
12688
|
+
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
12626
12689
|
|
|
12690
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
12627
12691
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
12628
12692
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
12629
12693
|
}
|
|
12630
|
-
var
|
|
12631
|
-
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
12632
|
-
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
12694
|
+
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
12633
12695
|
|
|
12696
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
12634
12697
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
12635
12698
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
12636
12699
|
}
|
|
@@ -12643,10 +12706,11 @@ function format$1(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
12643
12706
|
var originalDate = toDate(dirtyDate);
|
|
12644
12707
|
if (!isValid(originalDate)) {
|
|
12645
12708
|
throw new RangeError('Invalid time value');
|
|
12646
|
-
}
|
|
12709
|
+
}
|
|
12710
|
+
|
|
12711
|
+
// Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
12647
12712
|
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
12648
12713
|
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
12649
|
-
|
|
12650
12714
|
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
12651
12715
|
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
12652
12716
|
var formatterOptions = {
|
|
@@ -12659,7 +12723,7 @@ function format$1(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
12659
12723
|
var firstCharacter = substring[0];
|
|
12660
12724
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
12661
12725
|
var longFormatter = longFormatters[firstCharacter];
|
|
12662
|
-
return longFormatter(substring, locale$1.formatLong
|
|
12726
|
+
return longFormatter(substring, locale$1.formatLong);
|
|
12663
12727
|
}
|
|
12664
12728
|
return substring;
|
|
12665
12729
|
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
@@ -12673,11 +12737,11 @@ function format$1(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
12673
12737
|
}
|
|
12674
12738
|
var formatter = formatters[firstCharacter];
|
|
12675
12739
|
if (formatter) {
|
|
12676
|
-
if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
|
|
12677
|
-
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
12740
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
12741
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
12678
12742
|
}
|
|
12679
|
-
if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
|
|
12680
|
-
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
12743
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
12744
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
12681
12745
|
}
|
|
12682
12746
|
return formatter(utcDate, substring, locale$1.localize, formatterOptions);
|
|
12683
12747
|
}
|
|
@@ -12689,22 +12753,28 @@ function format$1(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
12689
12753
|
return result;
|
|
12690
12754
|
}
|
|
12691
12755
|
function cleanEscapedString(input) {
|
|
12692
|
-
|
|
12756
|
+
var matched = input.match(escapedStringRegExp);
|
|
12757
|
+
if (!matched) {
|
|
12758
|
+
return input;
|
|
12759
|
+
}
|
|
12760
|
+
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
12693
12761
|
}
|
|
12694
12762
|
|
|
12695
|
-
function convertToFP(fn, arity
|
|
12696
|
-
a =
|
|
12763
|
+
function convertToFP(fn, arity) {
|
|
12764
|
+
var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
12697
12765
|
if (a.length >= arity) {
|
|
12698
12766
|
return fn.apply(null, a.slice(0, arity).reverse());
|
|
12699
12767
|
}
|
|
12700
12768
|
return function () {
|
|
12701
|
-
var args = Array
|
|
12769
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12770
|
+
args[_key] = arguments[_key];
|
|
12771
|
+
}
|
|
12702
12772
|
return convertToFP(fn, arity, a.concat(args));
|
|
12703
12773
|
};
|
|
12704
12774
|
}
|
|
12705
12775
|
|
|
12706
|
-
// This file is generated automatically by `scripts/build/fp.
|
|
12707
|
-
var
|
|
12776
|
+
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
|
12777
|
+
var formatTime = convertToFP(format, 2);
|
|
12708
12778
|
|
|
12709
12779
|
var Wrapper = index$a(View)(function () {
|
|
12710
12780
|
return {
|
|
@@ -12975,7 +13045,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
12975
13045
|
return /*#__PURE__*/React__default.createElement(StyledContainer$7, {
|
|
12976
13046
|
testID: testID
|
|
12977
13047
|
}, /*#__PURE__*/React__default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default.createElement(ContentNavigator, {
|
|
12978
|
-
value: !useMonthPicker ?
|
|
13048
|
+
value: !useMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
12979
13049
|
testID: "calendar-month-picker",
|
|
12980
13050
|
onPress: function onPress() {
|
|
12981
13051
|
onToggleMonthPicker === null || onToggleMonthPicker === void 0 || onToggleMonthPicker(!monthPickerVisible);
|
|
@@ -12991,7 +13061,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
12991
13061
|
textAlign: 'center',
|
|
12992
13062
|
marginRight: theme.__hd__.calendar.space.headerMarginRight
|
|
12993
13063
|
}
|
|
12994
|
-
},
|
|
13064
|
+
}, formatTime('MMMM yyyy', visibleDate)), /*#__PURE__*/React__default.createElement(Icon, {
|
|
12995
13065
|
icon: monthPickerVisible ? 'arrow-up' : 'arrow-down',
|
|
12996
13066
|
size: "small"
|
|
12997
13067
|
}))),
|
|
@@ -13504,7 +13574,7 @@ var StyledPageControlWrapper = index$a(View)(function (_ref7) {
|
|
|
13504
13574
|
});
|
|
13505
13575
|
|
|
13506
13576
|
function isCarouselImageProps(image) {
|
|
13507
|
-
return _typeof(image) === 'object';
|
|
13577
|
+
return _typeof$1(image) === 'object';
|
|
13508
13578
|
}
|
|
13509
13579
|
var CarouselItem = function CarouselItem(_ref) {
|
|
13510
13580
|
var width = _ref.width,
|
|
@@ -13970,7 +14040,11 @@ var StyledLabelInsideTextInput = index$a(Typography.Body)(function (_ref3) {
|
|
|
13970
14040
|
alignContent: 'center',
|
|
13971
14041
|
alignItems: 'center',
|
|
13972
14042
|
color: theme.__hd__.textInput.colors.labelsInsideTextInput[themeState],
|
|
13973
|
-
marginTop: theme.__hd__.textInput.space.labelInsideTextInputMarginTop
|
|
14043
|
+
marginTop: theme.__hd__.textInput.space.labelInsideTextInputMarginTop,
|
|
14044
|
+
position: 'absolute',
|
|
14045
|
+
zIndex: 1,
|
|
14046
|
+
left: 0,
|
|
14047
|
+
top: '50%'
|
|
13974
14048
|
};
|
|
13975
14049
|
});
|
|
13976
14050
|
var StyledAsteriskLabelInsideTextInput = index$a(Typography.Body)(function (_ref4) {
|
|
@@ -14191,18 +14265,10 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
14191
14265
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
14192
14266
|
inputSize = _React$useState2[0],
|
|
14193
14267
|
setInputSize = _React$useState2[1];
|
|
14194
|
-
var _React$useState3 = React__default.useState(
|
|
14268
|
+
var _React$useState3 = React__default.useState(false),
|
|
14195
14269
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
var _React$useState5 = React__default.useState(0),
|
|
14199
|
-
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
14200
|
-
prefixWidth = _React$useState6[0],
|
|
14201
|
-
setPrefixWidth = _React$useState6[1];
|
|
14202
|
-
var _React$useState7 = React__default.useState(false),
|
|
14203
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
14204
|
-
isFocused = _React$useState8[0],
|
|
14205
|
-
setIsFocused = _React$useState8[1];
|
|
14270
|
+
isFocused = _React$useState4[0],
|
|
14271
|
+
setIsFocused = _React$useState4[1];
|
|
14206
14272
|
var state = getState$3({
|
|
14207
14273
|
disabled: disabled,
|
|
14208
14274
|
error: error,
|
|
@@ -14232,14 +14298,6 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
14232
14298
|
});
|
|
14233
14299
|
});
|
|
14234
14300
|
}, []);
|
|
14235
|
-
var onPrefixLayout = useCallback(function (event) {
|
|
14236
|
-
var width = event.nativeEvent.layout.width;
|
|
14237
|
-
setPrefixWidth(width);
|
|
14238
|
-
}, []);
|
|
14239
|
-
var onLabelLayout = useCallback(function (event) {
|
|
14240
|
-
var width = event.nativeEvent.layout.width;
|
|
14241
|
-
setLabelWidth(width);
|
|
14242
|
-
}, []);
|
|
14243
14301
|
var innerTextInput = React__default.useRef();
|
|
14244
14302
|
React__default.useImperativeHandle(ref, function () {
|
|
14245
14303
|
return {
|
|
@@ -14346,9 +14404,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
14346
14404
|
style: [{
|
|
14347
14405
|
backgroundColor: backgroundColor
|
|
14348
14406
|
}, borderStyle]
|
|
14349
|
-
}), /*#__PURE__*/React__default.createElement(View, {
|
|
14350
|
-
onLayout: onPrefixLayout
|
|
14351
|
-
}, renderPrefix$1({
|
|
14407
|
+
}), /*#__PURE__*/React__default.createElement(View, null, renderPrefix$1({
|
|
14352
14408
|
state: state,
|
|
14353
14409
|
prefix: prefix
|
|
14354
14410
|
})), /*#__PURE__*/React__default.createElement(StyledLabelContainerInsideTextInput, {
|
|
@@ -14360,12 +14416,12 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
14360
14416
|
transform: [{
|
|
14361
14417
|
translateY: focusAnimation.interpolate({
|
|
14362
14418
|
inputRange: [0, 1],
|
|
14363
|
-
outputRange: [variant !== 'textarea' ? inputSize.height / 2 : theme.space.large,
|
|
14419
|
+
outputRange: [variant !== 'textarea' ? inputSize.height / 2 : theme.space.large, theme.space.xsmall]
|
|
14364
14420
|
})
|
|
14365
14421
|
}, {
|
|
14366
14422
|
translateX: focusAnimation.interpolate({
|
|
14367
14423
|
inputRange: [0, 1],
|
|
14368
|
-
outputRange: [
|
|
14424
|
+
outputRange: [prefix ? theme.space.xxlarge : theme.space.medium, -theme.space.xlarge + theme.space.xsmall]
|
|
14369
14425
|
})
|
|
14370
14426
|
}, {
|
|
14371
14427
|
scale: focusAnimation.interpolate({
|
|
@@ -14374,21 +14430,20 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
14374
14430
|
})
|
|
14375
14431
|
}]
|
|
14376
14432
|
}]
|
|
14377
|
-
},
|
|
14433
|
+
}, !!label && /*#__PURE__*/React__default.createElement(StyledLabelInsideTextInput, {
|
|
14378
14434
|
style: {
|
|
14379
14435
|
backgroundColor: backgroundColor
|
|
14380
14436
|
},
|
|
14381
|
-
|
|
14382
|
-
testID: "input-label
|
|
14383
|
-
|
|
14437
|
+
nativeID: accessibilityLabelledBy,
|
|
14438
|
+
testID: "input-label",
|
|
14439
|
+
themeState: state
|
|
14440
|
+
}, required && /*#__PURE__*/React__default.createElement(StyledAsteriskLabelInsideTextInput, {
|
|
14384
14441
|
style: {
|
|
14385
14442
|
backgroundColor: backgroundColor
|
|
14386
14443
|
},
|
|
14387
|
-
nativeID: accessibilityLabelledBy,
|
|
14388
|
-
testID: "input-label",
|
|
14389
14444
|
themeState: state,
|
|
14390
|
-
|
|
14391
|
-
}, label)), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
|
|
14445
|
+
testID: "input-label-asterisk"
|
|
14446
|
+
}, "*"), label)), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
|
|
14392
14447
|
variant: variant,
|
|
14393
14448
|
nativeInputProps: nativeInputProps,
|
|
14394
14449
|
renderInputValue: renderInputValue,
|
|
@@ -14454,7 +14509,7 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
14454
14509
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14455
14510
|
open = _useState2[0],
|
|
14456
14511
|
setOpen = _useState2[1];
|
|
14457
|
-
var displayValue = value ?
|
|
14512
|
+
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
14458
14513
|
var pickerInitValue = value || new Date();
|
|
14459
14514
|
useCalculateDate({
|
|
14460
14515
|
minDate: minDate,
|
|
@@ -14585,7 +14640,7 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
|
|
|
14585
14640
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
14586
14641
|
selectingDate = _useState10[0],
|
|
14587
14642
|
setSelectingDate = _useState10[1];
|
|
14588
|
-
var displayValue = value ?
|
|
14643
|
+
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
14589
14644
|
useCalculateDate({
|
|
14590
14645
|
minDate: minDate,
|
|
14591
14646
|
maxDate: maxDate,
|
|
@@ -14678,7 +14733,7 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
14678
14733
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
14679
14734
|
open = _useState4[0],
|
|
14680
14735
|
setOpen = _useState4[1];
|
|
14681
|
-
var displayValue = value ?
|
|
14736
|
+
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
14682
14737
|
var theme = useTheme();
|
|
14683
14738
|
useCalculateDate({
|
|
14684
14739
|
minDate: minDate,
|
|
@@ -15111,8 +15166,8 @@ var Empty = function Empty(_ref) {
|
|
|
15111
15166
|
level: "h4",
|
|
15112
15167
|
typeface: "playful"
|
|
15113
15168
|
}, title), !!description && /*#__PURE__*/React__default.createElement(StyledDescription, {
|
|
15114
|
-
|
|
15115
|
-
|
|
15169
|
+
variant: "small",
|
|
15170
|
+
themeVariant: variant
|
|
15116
15171
|
}, description));
|
|
15117
15172
|
};
|
|
15118
15173
|
|
|
@@ -19850,7 +19905,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
19850
19905
|
open = _useState2[0],
|
|
19851
19906
|
setOpen = _useState2[1];
|
|
19852
19907
|
var is12Hour = displayFormat.includes('hh');
|
|
19853
|
-
var displayValue = value ?
|
|
19908
|
+
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
19854
19909
|
var pickerInitValue = value || new Date();
|
|
19855
19910
|
return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
19856
19911
|
onPress: function onPress() {
|
|
@@ -19921,7 +19976,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
19921
19976
|
open = _useState4[0],
|
|
19922
19977
|
setOpen = _useState4[1];
|
|
19923
19978
|
var is12Hour = displayFormat.includes('hh');
|
|
19924
|
-
var displayValue = value ?
|
|
19979
|
+
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
19925
19980
|
var theme = useTheme();
|
|
19926
19981
|
useEffect(function () {
|
|
19927
19982
|
setSelectingDate(value || new Date());
|
|
@@ -20660,7 +20715,7 @@ function requireScheduler_production_min() {
|
|
|
20660
20715
|
var c = a.sortIndex - b.sortIndex;
|
|
20661
20716
|
return 0 !== c ? c : a.id - b.id;
|
|
20662
20717
|
}
|
|
20663
|
-
if ("object" === (typeof performance === "undefined" ? "undefined" : _typeof(performance)) && "function" === typeof performance.now) {
|
|
20718
|
+
if ("object" === (typeof performance === "undefined" ? "undefined" : _typeof$1(performance)) && "function" === typeof performance.now) {
|
|
20664
20719
|
var l = performance;
|
|
20665
20720
|
exports.unstable_now = function () {
|
|
20666
20721
|
return l.now();
|
|
@@ -20831,7 +20886,7 @@ function requireScheduler_production_min() {
|
|
|
20831
20886
|
};
|
|
20832
20887
|
exports.unstable_scheduleCallback = function (a, b, c) {
|
|
20833
20888
|
var d = exports.unstable_now();
|
|
20834
|
-
"object" === _typeof(c) && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d;
|
|
20889
|
+
"object" === _typeof$1(c) && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d;
|
|
20835
20890
|
switch (a) {
|
|
20836
20891
|
case 1:
|
|
20837
20892
|
var e = -1;
|
|
@@ -20921,7 +20976,7 @@ function requireReactDom_production_min() {
|
|
|
20921
20976
|
}
|
|
20922
20977
|
function pa(a, b, c, d) {
|
|
20923
20978
|
if (null !== c && 0 === c.type) return !1;
|
|
20924
|
-
switch (_typeof(b)) {
|
|
20979
|
+
switch (_typeof$1(b)) {
|
|
20925
20980
|
case "function":
|
|
20926
20981
|
case "symbol":
|
|
20927
20982
|
return !0;
|
|
@@ -21031,7 +21086,7 @@ function requireReactDom_production_min() {
|
|
|
21031
21086
|
var Ia = Symbol["for"]("react.offscreen");
|
|
21032
21087
|
var Ja = Symbol.iterator;
|
|
21033
21088
|
function Ka(a) {
|
|
21034
|
-
if (null === a || "object" !== _typeof(a)) return null;
|
|
21089
|
+
if (null === a || "object" !== _typeof$1(a)) return null;
|
|
21035
21090
|
a = Ja && a[Ja] || a["@@iterator"];
|
|
21036
21091
|
return "function" === typeof a ? a : null;
|
|
21037
21092
|
}
|
|
@@ -21060,7 +21115,7 @@ function requireReactDom_production_min() {
|
|
|
21060
21115
|
set: function set() {
|
|
21061
21116
|
throw Error();
|
|
21062
21117
|
}
|
|
21063
|
-
}), "object" === (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && Reflect.construct) {
|
|
21118
|
+
}), "object" === (typeof Reflect === "undefined" ? "undefined" : _typeof$1(Reflect)) && Reflect.construct) {
|
|
21064
21119
|
try {
|
|
21065
21120
|
Reflect.construct(b, []);
|
|
21066
21121
|
} catch (l) {
|
|
@@ -21142,7 +21197,7 @@ function requireReactDom_production_min() {
|
|
|
21142
21197
|
case Fa:
|
|
21143
21198
|
return "SuspenseList";
|
|
21144
21199
|
}
|
|
21145
|
-
if ("object" === _typeof(a)) switch (a.$$typeof) {
|
|
21200
|
+
if ("object" === _typeof$1(a)) switch (a.$$typeof) {
|
|
21146
21201
|
case Ca:
|
|
21147
21202
|
return (a.displayName || "Context") + ".Consumer";
|
|
21148
21203
|
case Ba:
|
|
@@ -21214,7 +21269,7 @@ function requireReactDom_production_min() {
|
|
|
21214
21269
|
return null;
|
|
21215
21270
|
}
|
|
21216
21271
|
function Sa(a) {
|
|
21217
|
-
switch (_typeof(a)) {
|
|
21272
|
+
switch (_typeof$1(a)) {
|
|
21218
21273
|
case "boolean":
|
|
21219
21274
|
case "number":
|
|
21220
21275
|
case "string":
|
|
@@ -21525,9 +21580,9 @@ function requireReactDom_production_min() {
|
|
|
21525
21580
|
if (tb[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(p(137, a));
|
|
21526
21581
|
if (null != b.dangerouslySetInnerHTML) {
|
|
21527
21582
|
if (null != b.children) throw Error(p(60));
|
|
21528
|
-
if ("object" !== _typeof(b.dangerouslySetInnerHTML) || !("__html" in b.dangerouslySetInnerHTML)) throw Error(p(61));
|
|
21583
|
+
if ("object" !== _typeof$1(b.dangerouslySetInnerHTML) || !("__html" in b.dangerouslySetInnerHTML)) throw Error(p(61));
|
|
21529
21584
|
}
|
|
21530
|
-
if (null != b.style && "object" !== _typeof(b.style)) throw Error(p(62));
|
|
21585
|
+
if (null != b.style && "object" !== _typeof$1(b.style)) throw Error(p(62));
|
|
21531
21586
|
}
|
|
21532
21587
|
}
|
|
21533
21588
|
function vb(a, b) {
|
|
@@ -21613,7 +21668,7 @@ function requireReactDom_production_min() {
|
|
|
21613
21668
|
a = !1;
|
|
21614
21669
|
}
|
|
21615
21670
|
if (a) return null;
|
|
21616
|
-
if (c && "function" !== typeof c) throw Error(p(231, b, _typeof(c)));
|
|
21671
|
+
if (c && "function" !== typeof c) throw Error(p(231, b, _typeof$1(c)));
|
|
21617
21672
|
return c;
|
|
21618
21673
|
}
|
|
21619
21674
|
var Lb = !1;
|
|
@@ -22527,7 +22582,7 @@ function requireReactDom_production_min() {
|
|
|
22527
22582
|
}
|
|
22528
22583
|
function he(a) {
|
|
22529
22584
|
a = a.detail;
|
|
22530
|
-
return "object" === _typeof(a) && "data" in a ? a.data : null;
|
|
22585
|
+
return "object" === _typeof$1(a) && "data" in a ? a.data : null;
|
|
22531
22586
|
}
|
|
22532
22587
|
var ie = !1;
|
|
22533
22588
|
function je(a, b) {
|
|
@@ -22644,7 +22699,7 @@ function requireReactDom_production_min() {
|
|
|
22644
22699
|
var He = "function" === typeof Object.is ? Object.is : Ge;
|
|
22645
22700
|
function Ie(a, b) {
|
|
22646
22701
|
if (He(a, b)) return !0;
|
|
22647
|
-
if ("object" !== _typeof(a) || null === a || "object" !== _typeof(b) || null === b) return !1;
|
|
22702
|
+
if ("object" !== _typeof$1(a) || null === a || "object" !== _typeof$1(b) || null === b) return !1;
|
|
22648
22703
|
var c = Object.keys(a),
|
|
22649
22704
|
d = Object.keys(b);
|
|
22650
22705
|
if (c.length !== d.length) return !1;
|
|
@@ -23171,7 +23226,7 @@ function requireReactDom_production_min() {
|
|
|
23171
23226
|
var Cf = null,
|
|
23172
23227
|
Df = null;
|
|
23173
23228
|
function Ef(a, b) {
|
|
23174
|
-
return "textarea" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === _typeof(b.dangerouslySetInnerHTML) && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;
|
|
23229
|
+
return "textarea" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === _typeof$1(b.dangerouslySetInnerHTML) && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;
|
|
23175
23230
|
}
|
|
23176
23231
|
var Ff = "function" === typeof setTimeout ? setTimeout : void 0,
|
|
23177
23232
|
Gf = "function" === typeof clearTimeout ? clearTimeout : void 0,
|
|
@@ -23819,7 +23874,7 @@ function requireReactDom_production_min() {
|
|
|
23819
23874
|
var d = !1,
|
|
23820
23875
|
e = Vf;
|
|
23821
23876
|
var f = b.contextType;
|
|
23822
|
-
"object" === _typeof(f) && null !== f ? f = Vg(f) : (e = Zf(b) ? Xf : H.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? Yf(a, e) : Vf);
|
|
23877
|
+
"object" === _typeof$1(f) && null !== f ? f = Vg(f) : (e = Zf(b) ? Xf : H.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? Yf(a, e) : Vf);
|
|
23823
23878
|
b = new b(c, f);
|
|
23824
23879
|
a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null;
|
|
23825
23880
|
b.updater = nh;
|
|
@@ -23841,7 +23896,7 @@ function requireReactDom_production_min() {
|
|
|
23841
23896
|
e.refs = jh;
|
|
23842
23897
|
ah(a);
|
|
23843
23898
|
var f = b.contextType;
|
|
23844
|
-
"object" === _typeof(f) && null !== f ? e.context = Vg(f) : (f = Zf(b) ? Xf : H.current, e.context = Yf(a, f));
|
|
23899
|
+
"object" === _typeof$1(f) && null !== f ? e.context = Vg(f) : (f = Zf(b) ? Xf : H.current, e.context = Yf(a, f));
|
|
23845
23900
|
e.state = a.memoizedState;
|
|
23846
23901
|
f = b.getDerivedStateFromProps;
|
|
23847
23902
|
"function" === typeof f && (kh(a, b, f, c), e.state = a.memoizedState);
|
|
@@ -23850,7 +23905,7 @@ function requireReactDom_production_min() {
|
|
|
23850
23905
|
}
|
|
23851
23906
|
function sh(a, b, c) {
|
|
23852
23907
|
a = c.ref;
|
|
23853
|
-
if (null !== a && "function" !== typeof a && "object" !== _typeof(a)) {
|
|
23908
|
+
if (null !== a && "function" !== typeof a && "object" !== _typeof$1(a)) {
|
|
23854
23909
|
if (c._owner) {
|
|
23855
23910
|
c = c._owner;
|
|
23856
23911
|
if (c) {
|
|
@@ -23925,7 +23980,7 @@ function requireReactDom_production_min() {
|
|
|
23925
23980
|
function k(a, b, c, d) {
|
|
23926
23981
|
var f = c.type;
|
|
23927
23982
|
if (f === ya) return m(a, b, c.props.children, d, c.key);
|
|
23928
|
-
if (null !== b && (b.elementType === f || "object" === _typeof(f) && null !== f && f.$$typeof === Ha && uh(f) === b.type)) return d = e(b, c.props), d.ref = sh(a, b, c), d["return"] = a, d;
|
|
23983
|
+
if (null !== b && (b.elementType === f || "object" === _typeof$1(f) && null !== f && f.$$typeof === Ha && uh(f) === b.type)) return d = e(b, c.props), d.ref = sh(a, b, c), d["return"] = a, d;
|
|
23929
23984
|
d = yh(c.type, c.key, c.props, null, a.mode, d);
|
|
23930
23985
|
d.ref = sh(a, b, c);
|
|
23931
23986
|
d["return"] = a;
|
|
@@ -23945,7 +24000,7 @@ function requireReactDom_production_min() {
|
|
|
23945
24000
|
}
|
|
23946
24001
|
function q(a, b, c) {
|
|
23947
24002
|
if ("string" === typeof b && "" !== b || "number" === typeof b) return b = xh("" + b, a.mode, c), b["return"] = a, b;
|
|
23948
|
-
if ("object" === _typeof(b) && null !== b) {
|
|
24003
|
+
if ("object" === _typeof$1(b) && null !== b) {
|
|
23949
24004
|
switch (b.$$typeof) {
|
|
23950
24005
|
case va:
|
|
23951
24006
|
return c = yh(b.type, b.key, b.props, null, a.mode, c), c.ref = sh(a, null, b), c["return"] = a, c;
|
|
@@ -23963,7 +24018,7 @@ function requireReactDom_production_min() {
|
|
|
23963
24018
|
function r(a, b, c, d) {
|
|
23964
24019
|
var e = null !== b ? b.key : null;
|
|
23965
24020
|
if ("string" === typeof c && "" !== c || "number" === typeof c) return null !== e ? null : h(a, b, "" + c, d);
|
|
23966
|
-
if ("object" === _typeof(c) && null !== c) {
|
|
24021
|
+
if ("object" === _typeof$1(c) && null !== c) {
|
|
23967
24022
|
switch (c.$$typeof) {
|
|
23968
24023
|
case va:
|
|
23969
24024
|
return c.key === e ? k(a, b, c, d) : null;
|
|
@@ -23979,7 +24034,7 @@ function requireReactDom_production_min() {
|
|
|
23979
24034
|
}
|
|
23980
24035
|
function y(a, b, c, d, e) {
|
|
23981
24036
|
if ("string" === typeof d && "" !== d || "number" === typeof d) return a = a.get(c) || null, h(b, a, "" + d, e);
|
|
23982
|
-
if ("object" === _typeof(d) && null !== d) {
|
|
24037
|
+
if ("object" === _typeof$1(d) && null !== d) {
|
|
23983
24038
|
switch (d.$$typeof) {
|
|
23984
24039
|
case va:
|
|
23985
24040
|
return a = a.get(null === d.key ? c : d.key) || null, k(b, a, d, e);
|
|
@@ -24053,8 +24108,8 @@ function requireReactDom_production_min() {
|
|
|
24053
24108
|
return l;
|
|
24054
24109
|
}
|
|
24055
24110
|
function J(a, d, f, h) {
|
|
24056
|
-
"object" === _typeof(f) && null !== f && f.type === ya && null === f.key && (f = f.props.children);
|
|
24057
|
-
if ("object" === _typeof(f) && null !== f) {
|
|
24111
|
+
"object" === _typeof$1(f) && null !== f && f.type === ya && null === f.key && (f = f.props.children);
|
|
24112
|
+
if ("object" === _typeof$1(f) && null !== f) {
|
|
24058
24113
|
switch (f.$$typeof) {
|
|
24059
24114
|
case va:
|
|
24060
24115
|
a: {
|
|
@@ -24069,7 +24124,7 @@ function requireReactDom_production_min() {
|
|
|
24069
24124
|
a = d;
|
|
24070
24125
|
break a;
|
|
24071
24126
|
}
|
|
24072
|
-
} else if (l.elementType === k || "object" === _typeof(k) && null !== k && k.$$typeof === Ha && uh(k) === l.type) {
|
|
24127
|
+
} else if (l.elementType === k || "object" === _typeof$1(k) && null !== k && k.$$typeof === Ha && uh(k) === l.type) {
|
|
24073
24128
|
c(a, l.sibling);
|
|
24074
24129
|
d = e(l, f.props);
|
|
24075
24130
|
d.ref = sh(a, l, f);
|
|
@@ -24954,7 +25009,7 @@ function requireReactDom_production_min() {
|
|
|
24954
25009
|
g.props = h;
|
|
24955
25010
|
var k = g.context,
|
|
24956
25011
|
l = c.contextType;
|
|
24957
|
-
"object" === _typeof(l) && null !== l ? l = Vg(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));
|
|
25012
|
+
"object" === _typeof$1(l) && null !== l ? l = Vg(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));
|
|
24958
25013
|
var m = c.getDerivedStateFromProps,
|
|
24959
25014
|
q = "function" === typeof m || "function" === typeof g.getSnapshotBeforeUpdate;
|
|
24960
25015
|
q || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && qh(b, g, d, l);
|
|
@@ -24973,7 +25028,7 @@ function requireReactDom_production_min() {
|
|
|
24973
25028
|
q = b.pendingProps;
|
|
24974
25029
|
r = g.context;
|
|
24975
25030
|
k = c.contextType;
|
|
24976
|
-
"object" === _typeof(k) && null !== k ? k = Vg(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));
|
|
25031
|
+
"object" === _typeof$1(k) && null !== k ? k = Vg(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));
|
|
24977
25032
|
var y = c.getDerivedStateFromProps;
|
|
24978
25033
|
(m = "function" === typeof y || "function" === typeof g.getSnapshotBeforeUpdate) || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== q || r !== k) && qh(b, g, d, k);
|
|
24979
25034
|
$g = !1;
|
|
@@ -26886,7 +26941,7 @@ function requireReactDom_production_min() {
|
|
|
26886
26941
|
k = b;
|
|
26887
26942
|
b = Z;
|
|
26888
26943
|
h.flags |= 32768;
|
|
26889
|
-
if (null !== k && "object" === _typeof(k) && "function" === typeof k.then) {
|
|
26944
|
+
if (null !== k && "object" === _typeof$1(k) && "function" === typeof k.then) {
|
|
26890
26945
|
var l = k,
|
|
26891
26946
|
m = h,
|
|
26892
26947
|
q = m.tag;
|
|
@@ -27307,7 +27362,7 @@ function requireReactDom_production_min() {
|
|
|
27307
27362
|
e = Xh(null, b, d, a, e, c);
|
|
27308
27363
|
var f = bi();
|
|
27309
27364
|
b.flags |= 1;
|
|
27310
|
-
"object" === _typeof(e) && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b.tag = 1, b.memoizedState = null, b.updateQueue = null, Zf(d) ? (f = !0, cg(b)) : f = !1, b.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, ah(b), e.updater = nh, b.stateNode = e, e._reactInternals = b, rh(b, d, a, c), b = kj(null, b, d, !0, f, c)) : (b.tag = 0, I && f && vg(b), Yi(null, b, e, c), b = b.child);
|
|
27365
|
+
"object" === _typeof$1(e) && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b.tag = 1, b.memoizedState = null, b.updateQueue = null, Zf(d) ? (f = !0, cg(b)) : f = !1, b.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, ah(b), e.updater = nh, b.stateNode = e, e._reactInternals = b, rh(b, d, a, c), b = kj(null, b, d, !0, f, c)) : (b.tag = 0, I && f && vg(b), Yi(null, b, e, c), b = b.child);
|
|
27311
27366
|
return b;
|
|
27312
27367
|
case 16:
|
|
27313
27368
|
d = b.elementType;
|
|
@@ -27548,7 +27603,7 @@ function requireReactDom_production_min() {
|
|
|
27548
27603
|
case Ia:
|
|
27549
27604
|
return qj(c, e, f, b);
|
|
27550
27605
|
default:
|
|
27551
|
-
if ("object" === _typeof(a) && null !== a) switch (a.$$typeof) {
|
|
27606
|
+
if ("object" === _typeof$1(a) && null !== a) switch (a.$$typeof) {
|
|
27552
27607
|
case Ba:
|
|
27553
27608
|
g = 10;
|
|
27554
27609
|
break a;
|
|
@@ -27566,7 +27621,7 @@ function requireReactDom_production_min() {
|
|
|
27566
27621
|
d = null;
|
|
27567
27622
|
break a;
|
|
27568
27623
|
}
|
|
27569
|
-
throw Error(p(130, null == a ? a : _typeof(a), ""));
|
|
27624
|
+
throw Error(p(130, null == a ? a : _typeof$1(a), ""));
|
|
27570
27625
|
}
|
|
27571
27626
|
b = Bg(g, c, b, e);
|
|
27572
27627
|
b.elementType = a;
|
|
@@ -28214,7 +28269,7 @@ function requireLib() {
|
|
|
28214
28269
|
};
|
|
28215
28270
|
},
|
|
28216
28271
|
380: function _(e, t, r) {
|
|
28217
|
-
var n = "object" == _typeof(r.g) && r.g && r.g.Object === Object && r.g;
|
|
28272
|
+
var n = "object" == _typeof$1(r.g) && r.g && r.g.Object === Object && r.g;
|
|
28218
28273
|
e.exports = n;
|
|
28219
28274
|
},
|
|
28220
28275
|
903: function _(e, t, r) {
|
|
@@ -28242,7 +28297,7 @@ function requireLib() {
|
|
|
28242
28297
|
},
|
|
28243
28298
|
433: function _(e, t, r) {
|
|
28244
28299
|
var n = r(380),
|
|
28245
|
-
u = "object" == (typeof self === "undefined" ? "undefined" : _typeof(self)) && self && self.Object === Object && self,
|
|
28300
|
+
u = "object" == (typeof self === "undefined" ? "undefined" : _typeof$1(self)) && self && self.Object === Object && self,
|
|
28246
28301
|
o = n || u || Function("return this")();
|
|
28247
28302
|
e.exports = o;
|
|
28248
28303
|
},
|
|
@@ -28311,20 +28366,20 @@ function requireLib() {
|
|
|
28311
28366
|
},
|
|
28312
28367
|
953: function _(e) {
|
|
28313
28368
|
e.exports = function (e) {
|
|
28314
|
-
var t = _typeof(e);
|
|
28369
|
+
var t = _typeof$1(e);
|
|
28315
28370
|
return null != e && ("object" == t || "function" == t);
|
|
28316
28371
|
};
|
|
28317
28372
|
},
|
|
28318
28373
|
934: function _(e) {
|
|
28319
28374
|
e.exports = function (e) {
|
|
28320
|
-
return null != e && "object" == _typeof(e);
|
|
28375
|
+
return null != e && "object" == _typeof$1(e);
|
|
28321
28376
|
};
|
|
28322
28377
|
},
|
|
28323
28378
|
414: function _(e, t, r) {
|
|
28324
28379
|
var n = r(148),
|
|
28325
28380
|
u = r(934);
|
|
28326
28381
|
e.exports = function (e) {
|
|
28327
|
-
return "symbol" == _typeof(e) || u(e) && "[object Symbol]" == n(e);
|
|
28382
|
+
return "symbol" == _typeof$1(e) || u(e) && "[object Symbol]" == n(e);
|
|
28328
28383
|
};
|
|
28329
28384
|
},
|
|
28330
28385
|
664: function _(e, t, r) {
|
|
@@ -28401,11 +28456,11 @@ function requireLib() {
|
|
|
28401
28456
|
get: t[r]
|
|
28402
28457
|
});
|
|
28403
28458
|
}, u.g = function () {
|
|
28404
|
-
if ("object" == (typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis))) return globalThis;
|
|
28459
|
+
if ("object" == (typeof globalThis === "undefined" ? "undefined" : _typeof$1(globalThis))) return globalThis;
|
|
28405
28460
|
try {
|
|
28406
28461
|
return this || new Function("return this")();
|
|
28407
28462
|
} catch (e) {
|
|
28408
|
-
if ("object" == (typeof window === "undefined" ? "undefined" : _typeof(window))) return window;
|
|
28463
|
+
if ("object" == (typeof window === "undefined" ? "undefined" : _typeof$1(window))) return window;
|
|
28409
28464
|
}
|
|
28410
28465
|
}(), u.o = function (e, t) {
|
|
28411
28466
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
@@ -28527,7 +28582,7 @@ function requireLib() {
|
|
|
28527
28582
|
}
|
|
28528
28583
|
var h = Object.prototype.constructor.toString();
|
|
28529
28584
|
function p(e) {
|
|
28530
|
-
if (!e || "object" != _typeof(e)) return !1;
|
|
28585
|
+
if (!e || "object" != _typeof$1(e)) return !1;
|
|
28531
28586
|
var t = c(e);
|
|
28532
28587
|
if (null === t) return !0;
|
|
28533
28588
|
var r = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
@@ -28824,7 +28879,7 @@ function requireLib() {
|
|
|
28824
28879
|
}
|
|
28825
28880
|
return k(_u4, r), R(n, _u4);
|
|
28826
28881
|
}
|
|
28827
|
-
if (!e || "object" != _typeof(e)) {
|
|
28882
|
+
if (!e || "object" != _typeof$1(e)) {
|
|
28828
28883
|
if (n = t(e), void 0 === n && (n = e), n === a && (n = void 0), _this.autoFreeze_ && E(n, !0), r) {
|
|
28829
28884
|
var _t6 = [],
|
|
28830
28885
|
_u5 = [];
|
|
@@ -29102,10 +29157,10 @@ function requireLib() {
|
|
|
29102
29157
|
}
|
|
29103
29158
|
};
|
|
29104
29159
|
function se(e) {
|
|
29105
|
-
return se = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
29106
|
-
return _typeof(e);
|
|
29160
|
+
return se = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
29161
|
+
return _typeof$1(e);
|
|
29107
29162
|
} : function (e) {
|
|
29108
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
29163
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
29109
29164
|
}, se(e);
|
|
29110
29165
|
}
|
|
29111
29166
|
function le(e, t, r) {
|
|
@@ -33789,7 +33844,7 @@ function requireLib() {
|
|
|
33789
33844
|
Jt = u(858),
|
|
33790
33845
|
Yt = u.n(Jt);
|
|
33791
33846
|
var Zt = function Zt(e) {
|
|
33792
|
-
return "object" == _typeof(e) && null != e && 1 === e.nodeType;
|
|
33847
|
+
return "object" == _typeof$1(e) && null != e && 1 === e.nodeType;
|
|
33793
33848
|
},
|
|
33794
33849
|
Gt = function Gt(e, t) {
|
|
33795
33850
|
return (!t || "hidden" !== e) && "visible" !== e && "clip" !== e;
|
|
@@ -34009,10 +34064,10 @@ function requireLib() {
|
|
|
34009
34064
|
"undefined" != typeof navigator && /Safari/.test(navigator.userAgent) && /Version\/(\d+)/.test(navigator.userAgent) && null !== (nr = navigator.userAgent.match(/Version\/(\d+)/)) && void 0 !== nr && nr[1] && parseInt(null === (ur = navigator.userAgent.match(/Version\/(\d+)/)) || void 0 === ur ? void 0 : ur[1], 10);
|
|
34010
34065
|
var Tr = (!Or || !xr) && !Ar && "undefined" != typeof globalThis && globalThis.InputEvent && "function" == typeof globalThis.InputEvent.prototype.getTargetRanges;
|
|
34011
34066
|
function Mr(e) {
|
|
34012
|
-
return Mr = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
34013
|
-
return _typeof(e);
|
|
34067
|
+
return Mr = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
34068
|
+
return _typeof$1(e);
|
|
34014
34069
|
} : function (e) {
|
|
34015
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
34070
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
34016
34071
|
}, Mr(e);
|
|
34017
34072
|
}
|
|
34018
34073
|
function Rr(e, t, r) {
|
|
@@ -35085,10 +35140,10 @@ function requireLib() {
|
|
|
35085
35140
|
return u;
|
|
35086
35141
|
}
|
|
35087
35142
|
function mu(e) {
|
|
35088
|
-
return mu = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
35089
|
-
return _typeof(e);
|
|
35143
|
+
return mu = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
35144
|
+
return _typeof$1(e);
|
|
35090
35145
|
} : function (e) {
|
|
35091
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
35146
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
35092
35147
|
}, mu(e);
|
|
35093
35148
|
}
|
|
35094
35149
|
function yu(e, t, r) {
|
|
@@ -36840,7 +36895,7 @@ function requireLib() {
|
|
|
36840
36895
|
};
|
|
36841
36896
|
}(e);
|
|
36842
36897
|
if (function (e) {
|
|
36843
|
-
return "object" == _typeof(e) && "function" == typeof e.behavior;
|
|
36898
|
+
return "object" == _typeof$1(e) && "function" == typeof e.behavior;
|
|
36844
36899
|
}(t)) return t.behavior(rr(e, t));
|
|
36845
36900
|
var n = "boolean" == typeof t || null == t ? void 0 : t.behavior;
|
|
36846
36901
|
var _iterator47 = _createForOfIteratorHelper(rr(e, function (e) {
|
|
@@ -39974,4 +40029,4 @@ var FloatingIsland = function FloatingIsland(_ref2) {
|
|
|
39974
40029
|
}));
|
|
39975
40030
|
};
|
|
39976
40031
|
|
|
39977
|
-
export { Accordion, Alert, AppCue, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Chip, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, ErrorComponent as Error, FAB, FlatListWithFAB, FloatingIsland, HeroDesignProvider, Icon, Image, List, index$6 as MapPin, PageControl, PinInput, Portal$1 as Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionListWithFAB, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette as swagLightSystemPalette, swagSystemPalette$1 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|
|
40032
|
+
export { Accordion, Alert, AppCue, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Chip, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, ErrorComponent as Error, FAB, FlatListWithFAB, FloatingIsland, HeroDesignProvider, Icon, Image, List, index$6 as MapPin, PageControl, PinInput, Portal$1 as Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionListWithFAB, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, ehWorkDarkPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette as swagLightSystemPalette, swagSystemPalette$1 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|