@quintype/arrow 3.15.1-perf.1 → 3.15.1-perf.4
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/atoms/Author/index.js +48 -2128
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +116 -2556
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +48 -2127
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-6f8c780e.js → index-0f809dd9.js} +73 -62
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-2d713010.js → index-37a9ccff.js} +63 -47
- package/atoms/ExtendedLoadMore/{index-8345922c.js → index-446679c8.js} +67 -51
- package/atoms/ExtendedLoadMore/{index-6daa674c.js → index-44f97338.js} +86 -68
- package/atoms/ExtendedLoadMore/{index-c8f346d0.js → index-57dd4870.js} +80 -64
- package/atoms/ExtendedLoadMore/{index-7eb05b3d.js → index-66dd4dbd.js} +70 -54
- package/atoms/ExtendedLoadMore/{index-6cb56d1a.js → index-8462c597.js} +93 -80
- package/atoms/ExtendedLoadMore/{index-aa8b8ab8.js → index-93cb06d1.js} +252 -226
- package/atoms/ExtendedLoadMore/index-afd44863.js +95 -0
- package/atoms/ExtendedLoadMore/{index-5a7900ba.js → index-b5754c5d.js} +67 -53
- package/atoms/ExtendedLoadMore/{index-4191a84c.js → index-bbaf526e.js} +78 -62
- package/atoms/ExtendedLoadMore/{index-99af722e.js → index-cfb262ef.js} +65 -48
- package/atoms/ExtendedLoadMore/index.js +20 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +95 -2175
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +91 -2230
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +40 -2133
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +89 -2241
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +40 -2120
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +35 -2115
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +43 -2483
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +95 -2606
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +59 -2487
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +213 -2800
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +308 -2816
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +611 -3352
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +218 -2658
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +438 -2993
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +432 -2987
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +411 -2966
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +183 -2890
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +217 -2936
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +453 -3008
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +439 -2959
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +374 -2872
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +426 -2927
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +430 -2931
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +368 -2894
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +387 -2900
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +443 -2963
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +444 -2964
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +403 -2923
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +422 -2942
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +390 -2910
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +398 -2918
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +189 -2375
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +128 -2580
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +125 -2577
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +408 -2928
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +439 -2940
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +308 -2800
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +405 -2906
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +432 -2987
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +35 -1833
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +421 -2922
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +358 -2871
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +428 -2929
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +406 -2926
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +400 -2920
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +383 -2909
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +395 -2915
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +398 -2924
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +400 -2920
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +398 -2924
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +418 -2938
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +392 -2912
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +92 -2229
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +53 -1899
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +49 -1895
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +79 -2206
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +52 -1957
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +147 -2329
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +135 -2317
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +173 -2355
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +79 -2207
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +52 -1898
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +53 -1899
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +34 -1738
- package/story-elements/Summary/index.js +56 -1902
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +48 -2176
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +35 -1739
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +1182 -4038
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +1377 -4233
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +1162 -4018
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +1277 -4133
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +1231 -4087
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e39b3ca8.js +0 -3023
- package/atoms/ExtendedLoadMore/index-f6e578e3.js +0 -86
|
@@ -1,2528 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function _nonIterableRest() {
|
|
36
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function _toArray(arr) {
|
|
40
|
-
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
44
|
-
|
|
45
|
-
function getDefaultExportFromCjs (x) {
|
|
46
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function createCommonjsModule(fn) {
|
|
50
|
-
var module = { exports: {} };
|
|
51
|
-
return fn(module, module.exports), module.exports;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
|
|
55
|
-
|
|
56
|
-
Object.defineProperty(exports, "__esModule", {
|
|
57
|
-
value: true
|
|
58
|
-
});
|
|
59
|
-
exports["default"] = void 0;
|
|
60
|
-
var optionsDefaults = {
|
|
61
|
-
attributeNames: {
|
|
62
|
-
styleName: 'className'
|
|
63
|
-
},
|
|
64
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
65
|
-
handleMissingStyleName: 'throw'
|
|
66
|
-
};
|
|
67
|
-
var _default = optionsDefaults;
|
|
68
|
-
exports["default"] = _default;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
74
|
-
|
|
75
|
-
Object.defineProperty(exports, "__esModule", {
|
|
76
|
-
value: true
|
|
77
|
-
});
|
|
78
|
-
exports["default"] = void 0;
|
|
79
|
-
|
|
80
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
81
|
-
|
|
82
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
83
|
-
|
|
84
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
85
|
-
return styleName.indexOf('.') !== -1;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
89
|
-
if (handleMissingStyleName === 'throw') {
|
|
90
|
-
throw new Error(message);
|
|
91
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
92
|
-
// eslint-disable-next-line no-console
|
|
93
|
-
console.warn(message);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return null;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
100
|
-
// Note:
|
|
101
|
-
// Do not use the desctructing syntax with Babel.
|
|
102
|
-
// Desctructing adds _slicedToArray helper.
|
|
103
|
-
var styleNameParts = styleName.split('.');
|
|
104
|
-
var importName = styleNameParts[0];
|
|
105
|
-
var moduleName = styleNameParts[1];
|
|
106
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
107
|
-
|
|
108
|
-
if (!moduleName) {
|
|
109
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (!styleModuleImportMap[importName]) {
|
|
113
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
117
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return styleModuleImportMap[importName][moduleName];
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
124
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
125
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
126
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
127
|
-
}).filter(function (importKey) {
|
|
128
|
-
return importKey;
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
if (importKeysWithMatches.length > 1) {
|
|
132
|
-
throw new Error('Cannot resolve styleName "' + styleName + '" because it is present in multiple imports:' + '\n\n\t' + importKeysWithMatches.join('\n\t') + '\n\nYou can resolve this by using a named import, e.g:' + '\n\n\timport foo from "' + importKeysWithMatches[0] + '";' + '\n\t<div styleName="foo.' + styleName + '" />' + '\n\n');
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (importKeysWithMatches.length === 0) {
|
|
136
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
143
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
144
|
-
|
|
145
|
-
var _ref = options || {},
|
|
146
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
147
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
148
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
149
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
150
|
-
|
|
151
|
-
if (!styleNameValue) {
|
|
152
|
-
return '';
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
156
|
-
return styleName;
|
|
157
|
-
}).map(function (styleName) {
|
|
158
|
-
if (isNamespacedStyleName(styleName)) {
|
|
159
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
163
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
167
|
-
if (!autoResolveMultipleImports) {
|
|
168
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
175
|
-
|
|
176
|
-
if (!styleModuleMap[styleName]) {
|
|
177
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return styleModuleMap[styleName];
|
|
181
|
-
}).filter(function (className) {
|
|
182
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
183
|
-
return className;
|
|
184
|
-
}).join(' ');
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
exports["default"] = _default;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
193
|
-
|
|
194
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _toArray = require('@babel/runtime/helpers/toArray');
|
|
6
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var PropTypes = require('prop-types');
|
|
9
|
+
var components = require('@quintype/components');
|
|
10
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
11
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
12
|
+
require('@babel/runtime/regenerator');
|
|
13
|
+
var lodash = require('lodash');
|
|
14
|
+
var Timeago = require('react-timeago');
|
|
15
|
+
var dateFnsTz = require('date-fns-tz');
|
|
16
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
17
|
+
var reactRedux = require('react-redux');
|
|
18
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
19
|
+
|
|
20
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
+
|
|
22
|
+
var _toArray__default = /*#__PURE__*/_interopDefaultLegacy(_toArray);
|
|
23
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
24
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
26
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
27
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
28
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
29
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
30
|
+
|
|
31
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
195
32
|
|
|
196
33
|
var StateProvider = function StateProvider(RowComponent) {
|
|
197
34
|
return function (props) {
|
|
198
35
|
return (
|
|
199
36
|
/*#__PURE__*/
|
|
200
37
|
// eslint-disable-next-line react/prop-types
|
|
201
|
-
|
|
38
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
202
39
|
value: props.config
|
|
203
|
-
}, /*#__PURE__*/
|
|
40
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
204
41
|
);
|
|
205
42
|
};
|
|
206
43
|
};
|
|
207
44
|
var useStateValue = function useStateValue() {
|
|
208
|
-
return useContext(StateContext);
|
|
45
|
+
return React.useContext(StateContext);
|
|
209
46
|
};
|
|
210
47
|
|
|
211
|
-
function _typeof(obj) {
|
|
212
|
-
"@babel/helpers - typeof";
|
|
213
|
-
|
|
214
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
215
|
-
return typeof obj;
|
|
216
|
-
} : function (obj) {
|
|
217
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
218
|
-
}, _typeof(obj);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the MIT license found in the
|
|
225
|
-
* LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/
|
|
227
|
-
|
|
228
|
-
createCommonjsModule(function (module) {
|
|
229
|
-
var runtime = (function (exports) {
|
|
230
|
-
|
|
231
|
-
var Op = Object.prototype;
|
|
232
|
-
var hasOwn = Op.hasOwnProperty;
|
|
233
|
-
var undefined$1; // More compressible than void 0.
|
|
234
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
235
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
236
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
237
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
238
|
-
|
|
239
|
-
function define(obj, key, value) {
|
|
240
|
-
Object.defineProperty(obj, key, {
|
|
241
|
-
value: value,
|
|
242
|
-
enumerable: true,
|
|
243
|
-
configurable: true,
|
|
244
|
-
writable: true
|
|
245
|
-
});
|
|
246
|
-
return obj[key];
|
|
247
|
-
}
|
|
248
|
-
try {
|
|
249
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
250
|
-
define({}, "");
|
|
251
|
-
} catch (err) {
|
|
252
|
-
define = function(obj, key, value) {
|
|
253
|
-
return obj[key] = value;
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
258
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
259
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
260
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
261
|
-
var context = new Context(tryLocsList || []);
|
|
262
|
-
|
|
263
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
264
|
-
// .throw, and .return methods.
|
|
265
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
266
|
-
|
|
267
|
-
return generator;
|
|
268
|
-
}
|
|
269
|
-
exports.wrap = wrap;
|
|
270
|
-
|
|
271
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
272
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
273
|
-
// have been (and was previously) designed to take a closure to be
|
|
274
|
-
// invoked without arguments, but in all the cases we care about we
|
|
275
|
-
// already have an existing method we want to call, so there's no need
|
|
276
|
-
// to create a new function object. We can even get away with assuming
|
|
277
|
-
// the method takes exactly one argument, since that happens to be true
|
|
278
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
279
|
-
// only additional allocation required is the completion record, which
|
|
280
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
281
|
-
function tryCatch(fn, obj, arg) {
|
|
282
|
-
try {
|
|
283
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
284
|
-
} catch (err) {
|
|
285
|
-
return { type: "throw", arg: err };
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
290
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
291
|
-
var GenStateExecuting = "executing";
|
|
292
|
-
var GenStateCompleted = "completed";
|
|
293
|
-
|
|
294
|
-
// Returning this object from the innerFn has the same effect as
|
|
295
|
-
// breaking out of the dispatch switch statement.
|
|
296
|
-
var ContinueSentinel = {};
|
|
297
|
-
|
|
298
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
299
|
-
// .constructor.prototype properties for functions that return Generator
|
|
300
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
301
|
-
// minifier not to mangle the names of these two functions.
|
|
302
|
-
function Generator() {}
|
|
303
|
-
function GeneratorFunction() {}
|
|
304
|
-
function GeneratorFunctionPrototype() {}
|
|
305
|
-
|
|
306
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
307
|
-
// don't natively support it.
|
|
308
|
-
var IteratorPrototype = {};
|
|
309
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
310
|
-
return this;
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
var getProto = Object.getPrototypeOf;
|
|
314
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
315
|
-
if (NativeIteratorPrototype &&
|
|
316
|
-
NativeIteratorPrototype !== Op &&
|
|
317
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
318
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
319
|
-
// of the polyfill.
|
|
320
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
324
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
325
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
326
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
327
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
328
|
-
GeneratorFunction.displayName = define(
|
|
329
|
-
GeneratorFunctionPrototype,
|
|
330
|
-
toStringTagSymbol,
|
|
331
|
-
"GeneratorFunction"
|
|
332
|
-
);
|
|
333
|
-
|
|
334
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
335
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
336
|
-
function defineIteratorMethods(prototype) {
|
|
337
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
338
|
-
define(prototype, method, function(arg) {
|
|
339
|
-
return this._invoke(method, arg);
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
345
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
346
|
-
return ctor
|
|
347
|
-
? ctor === GeneratorFunction ||
|
|
348
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
349
|
-
// do is to check its .name property.
|
|
350
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
351
|
-
: false;
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
exports.mark = function(genFun) {
|
|
355
|
-
if (Object.setPrototypeOf) {
|
|
356
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
357
|
-
} else {
|
|
358
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
359
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
360
|
-
}
|
|
361
|
-
genFun.prototype = Object.create(Gp);
|
|
362
|
-
return genFun;
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
// Within the body of any async function, `await x` is transformed to
|
|
366
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
367
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
368
|
-
// meant to be awaited.
|
|
369
|
-
exports.awrap = function(arg) {
|
|
370
|
-
return { __await: arg };
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
374
|
-
function invoke(method, arg, resolve, reject) {
|
|
375
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
376
|
-
if (record.type === "throw") {
|
|
377
|
-
reject(record.arg);
|
|
378
|
-
} else {
|
|
379
|
-
var result = record.arg;
|
|
380
|
-
var value = result.value;
|
|
381
|
-
if (value &&
|
|
382
|
-
typeof value === "object" &&
|
|
383
|
-
hasOwn.call(value, "__await")) {
|
|
384
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
385
|
-
invoke("next", value, resolve, reject);
|
|
386
|
-
}, function(err) {
|
|
387
|
-
invoke("throw", err, resolve, reject);
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
392
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
393
|
-
// the .value of the Promise<{value,done}> result for the
|
|
394
|
-
// current iteration.
|
|
395
|
-
result.value = unwrapped;
|
|
396
|
-
resolve(result);
|
|
397
|
-
}, function(error) {
|
|
398
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
399
|
-
// into the async generator function so it can be handled there.
|
|
400
|
-
return invoke("throw", error, resolve, reject);
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
var previousPromise;
|
|
406
|
-
|
|
407
|
-
function enqueue(method, arg) {
|
|
408
|
-
function callInvokeWithMethodAndArg() {
|
|
409
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
410
|
-
invoke(method, arg, resolve, reject);
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
return previousPromise =
|
|
415
|
-
// If enqueue has been called before, then we want to wait until
|
|
416
|
-
// all previous Promises have been resolved before calling invoke,
|
|
417
|
-
// so that results are always delivered in the correct order. If
|
|
418
|
-
// enqueue has not been called before, then it is important to
|
|
419
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
420
|
-
// so that the async generator function has the opportunity to do
|
|
421
|
-
// any necessary setup in a predictable way. This predictability
|
|
422
|
-
// is why the Promise constructor synchronously invokes its
|
|
423
|
-
// executor callback, and why async functions synchronously
|
|
424
|
-
// execute code before the first await. Since we implement simple
|
|
425
|
-
// async functions in terms of async generators, it is especially
|
|
426
|
-
// important to get this right, even though it requires care.
|
|
427
|
-
previousPromise ? previousPromise.then(
|
|
428
|
-
callInvokeWithMethodAndArg,
|
|
429
|
-
// Avoid propagating failures to Promises returned by later
|
|
430
|
-
// invocations of the iterator.
|
|
431
|
-
callInvokeWithMethodAndArg
|
|
432
|
-
) : callInvokeWithMethodAndArg();
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
// Define the unified helper method that is used to implement .next,
|
|
436
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
437
|
-
this._invoke = enqueue;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
441
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
442
|
-
return this;
|
|
443
|
-
});
|
|
444
|
-
exports.AsyncIterator = AsyncIterator;
|
|
445
|
-
|
|
446
|
-
// Note that simple async functions are implemented on top of
|
|
447
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
448
|
-
// the final result produced by the iterator.
|
|
449
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
450
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
451
|
-
|
|
452
|
-
var iter = new AsyncIterator(
|
|
453
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
454
|
-
PromiseImpl
|
|
455
|
-
);
|
|
456
|
-
|
|
457
|
-
return exports.isGeneratorFunction(outerFn)
|
|
458
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
459
|
-
: iter.next().then(function(result) {
|
|
460
|
-
return result.done ? result.value : iter.next();
|
|
461
|
-
});
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
465
|
-
var state = GenStateSuspendedStart;
|
|
466
|
-
|
|
467
|
-
return function invoke(method, arg) {
|
|
468
|
-
if (state === GenStateExecuting) {
|
|
469
|
-
throw new Error("Generator is already running");
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
if (state === GenStateCompleted) {
|
|
473
|
-
if (method === "throw") {
|
|
474
|
-
throw arg;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
478
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
479
|
-
return doneResult();
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
context.method = method;
|
|
483
|
-
context.arg = arg;
|
|
484
|
-
|
|
485
|
-
while (true) {
|
|
486
|
-
var delegate = context.delegate;
|
|
487
|
-
if (delegate) {
|
|
488
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
489
|
-
if (delegateResult) {
|
|
490
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
491
|
-
return delegateResult;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
if (context.method === "next") {
|
|
496
|
-
// Setting context._sent for legacy support of Babel's
|
|
497
|
-
// function.sent implementation.
|
|
498
|
-
context.sent = context._sent = context.arg;
|
|
499
|
-
|
|
500
|
-
} else if (context.method === "throw") {
|
|
501
|
-
if (state === GenStateSuspendedStart) {
|
|
502
|
-
state = GenStateCompleted;
|
|
503
|
-
throw context.arg;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
context.dispatchException(context.arg);
|
|
507
|
-
|
|
508
|
-
} else if (context.method === "return") {
|
|
509
|
-
context.abrupt("return", context.arg);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
state = GenStateExecuting;
|
|
513
|
-
|
|
514
|
-
var record = tryCatch(innerFn, self, context);
|
|
515
|
-
if (record.type === "normal") {
|
|
516
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
517
|
-
// GenStateExecuting and loop back for another invocation.
|
|
518
|
-
state = context.done
|
|
519
|
-
? GenStateCompleted
|
|
520
|
-
: GenStateSuspendedYield;
|
|
521
|
-
|
|
522
|
-
if (record.arg === ContinueSentinel) {
|
|
523
|
-
continue;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
return {
|
|
527
|
-
value: record.arg,
|
|
528
|
-
done: context.done
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
} else if (record.type === "throw") {
|
|
532
|
-
state = GenStateCompleted;
|
|
533
|
-
// Dispatch the exception by looping back around to the
|
|
534
|
-
// context.dispatchException(context.arg) call above.
|
|
535
|
-
context.method = "throw";
|
|
536
|
-
context.arg = record.arg;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
543
|
-
// result, either by returning a { value, done } result from the
|
|
544
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
545
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
546
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
547
|
-
var method = delegate.iterator[context.method];
|
|
548
|
-
if (method === undefined$1) {
|
|
549
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
550
|
-
// method always terminates the yield* loop.
|
|
551
|
-
context.delegate = null;
|
|
552
|
-
|
|
553
|
-
if (context.method === "throw") {
|
|
554
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
555
|
-
if (delegate.iterator["return"]) {
|
|
556
|
-
// If the delegate iterator has a return method, give it a
|
|
557
|
-
// chance to clean up.
|
|
558
|
-
context.method = "return";
|
|
559
|
-
context.arg = undefined$1;
|
|
560
|
-
maybeInvokeDelegate(delegate, context);
|
|
561
|
-
|
|
562
|
-
if (context.method === "throw") {
|
|
563
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
564
|
-
// "return" to "throw", let that override the TypeError below.
|
|
565
|
-
return ContinueSentinel;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
context.method = "throw";
|
|
570
|
-
context.arg = new TypeError(
|
|
571
|
-
"The iterator does not provide a 'throw' method");
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
return ContinueSentinel;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
578
|
-
|
|
579
|
-
if (record.type === "throw") {
|
|
580
|
-
context.method = "throw";
|
|
581
|
-
context.arg = record.arg;
|
|
582
|
-
context.delegate = null;
|
|
583
|
-
return ContinueSentinel;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
var info = record.arg;
|
|
587
|
-
|
|
588
|
-
if (! info) {
|
|
589
|
-
context.method = "throw";
|
|
590
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
591
|
-
context.delegate = null;
|
|
592
|
-
return ContinueSentinel;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
if (info.done) {
|
|
596
|
-
// Assign the result of the finished delegate to the temporary
|
|
597
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
598
|
-
context[delegate.resultName] = info.value;
|
|
599
|
-
|
|
600
|
-
// Resume execution at the desired location (see delegateYield).
|
|
601
|
-
context.next = delegate.nextLoc;
|
|
602
|
-
|
|
603
|
-
// If context.method was "throw" but the delegate handled the
|
|
604
|
-
// exception, let the outer generator proceed normally. If
|
|
605
|
-
// context.method was "next", forget context.arg since it has been
|
|
606
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
607
|
-
// "return", allow the original .return call to continue in the
|
|
608
|
-
// outer generator.
|
|
609
|
-
if (context.method !== "return") {
|
|
610
|
-
context.method = "next";
|
|
611
|
-
context.arg = undefined$1;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
} else {
|
|
615
|
-
// Re-yield the result returned by the delegate method.
|
|
616
|
-
return info;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
620
|
-
// the outer generator.
|
|
621
|
-
context.delegate = null;
|
|
622
|
-
return ContinueSentinel;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
626
|
-
// unified ._invoke helper method.
|
|
627
|
-
defineIteratorMethods(Gp);
|
|
628
|
-
|
|
629
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
630
|
-
|
|
631
|
-
// A Generator should always return itself as the iterator object when the
|
|
632
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
633
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
634
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
635
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
636
|
-
define(Gp, iteratorSymbol, function() {
|
|
637
|
-
return this;
|
|
638
|
-
});
|
|
639
|
-
|
|
640
|
-
define(Gp, "toString", function() {
|
|
641
|
-
return "[object Generator]";
|
|
642
|
-
});
|
|
643
|
-
|
|
644
|
-
function pushTryEntry(locs) {
|
|
645
|
-
var entry = { tryLoc: locs[0] };
|
|
646
|
-
|
|
647
|
-
if (1 in locs) {
|
|
648
|
-
entry.catchLoc = locs[1];
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
if (2 in locs) {
|
|
652
|
-
entry.finallyLoc = locs[2];
|
|
653
|
-
entry.afterLoc = locs[3];
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
this.tryEntries.push(entry);
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
function resetTryEntry(entry) {
|
|
660
|
-
var record = entry.completion || {};
|
|
661
|
-
record.type = "normal";
|
|
662
|
-
delete record.arg;
|
|
663
|
-
entry.completion = record;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
function Context(tryLocsList) {
|
|
667
|
-
// The root entry object (effectively a try statement without a catch
|
|
668
|
-
// or a finally block) gives us a place to store values thrown from
|
|
669
|
-
// locations where there is no enclosing try statement.
|
|
670
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
671
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
672
|
-
this.reset(true);
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
exports.keys = function(object) {
|
|
676
|
-
var keys = [];
|
|
677
|
-
for (var key in object) {
|
|
678
|
-
keys.push(key);
|
|
679
|
-
}
|
|
680
|
-
keys.reverse();
|
|
681
|
-
|
|
682
|
-
// Rather than returning an object with a next method, we keep
|
|
683
|
-
// things simple and return the next function itself.
|
|
684
|
-
return function next() {
|
|
685
|
-
while (keys.length) {
|
|
686
|
-
var key = keys.pop();
|
|
687
|
-
if (key in object) {
|
|
688
|
-
next.value = key;
|
|
689
|
-
next.done = false;
|
|
690
|
-
return next;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
// To avoid creating an additional object, we just hang the .value
|
|
695
|
-
// and .done properties off the next function object itself. This
|
|
696
|
-
// also ensures that the minifier will not anonymize the function.
|
|
697
|
-
next.done = true;
|
|
698
|
-
return next;
|
|
699
|
-
};
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
function values(iterable) {
|
|
703
|
-
if (iterable) {
|
|
704
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
705
|
-
if (iteratorMethod) {
|
|
706
|
-
return iteratorMethod.call(iterable);
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
if (typeof iterable.next === "function") {
|
|
710
|
-
return iterable;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
if (!isNaN(iterable.length)) {
|
|
714
|
-
var i = -1, next = function next() {
|
|
715
|
-
while (++i < iterable.length) {
|
|
716
|
-
if (hasOwn.call(iterable, i)) {
|
|
717
|
-
next.value = iterable[i];
|
|
718
|
-
next.done = false;
|
|
719
|
-
return next;
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
next.value = undefined$1;
|
|
724
|
-
next.done = true;
|
|
725
|
-
|
|
726
|
-
return next;
|
|
727
|
-
};
|
|
728
|
-
|
|
729
|
-
return next.next = next;
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
// Return an iterator with no values.
|
|
734
|
-
return { next: doneResult };
|
|
735
|
-
}
|
|
736
|
-
exports.values = values;
|
|
737
|
-
|
|
738
|
-
function doneResult() {
|
|
739
|
-
return { value: undefined$1, done: true };
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
Context.prototype = {
|
|
743
|
-
constructor: Context,
|
|
744
|
-
|
|
745
|
-
reset: function(skipTempReset) {
|
|
746
|
-
this.prev = 0;
|
|
747
|
-
this.next = 0;
|
|
748
|
-
// Resetting context._sent for legacy support of Babel's
|
|
749
|
-
// function.sent implementation.
|
|
750
|
-
this.sent = this._sent = undefined$1;
|
|
751
|
-
this.done = false;
|
|
752
|
-
this.delegate = null;
|
|
753
|
-
|
|
754
|
-
this.method = "next";
|
|
755
|
-
this.arg = undefined$1;
|
|
756
|
-
|
|
757
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
758
|
-
|
|
759
|
-
if (!skipTempReset) {
|
|
760
|
-
for (var name in this) {
|
|
761
|
-
// Not sure about the optimal order of these conditions:
|
|
762
|
-
if (name.charAt(0) === "t" &&
|
|
763
|
-
hasOwn.call(this, name) &&
|
|
764
|
-
!isNaN(+name.slice(1))) {
|
|
765
|
-
this[name] = undefined$1;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
},
|
|
770
|
-
|
|
771
|
-
stop: function() {
|
|
772
|
-
this.done = true;
|
|
773
|
-
|
|
774
|
-
var rootEntry = this.tryEntries[0];
|
|
775
|
-
var rootRecord = rootEntry.completion;
|
|
776
|
-
if (rootRecord.type === "throw") {
|
|
777
|
-
throw rootRecord.arg;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
return this.rval;
|
|
781
|
-
},
|
|
782
|
-
|
|
783
|
-
dispatchException: function(exception) {
|
|
784
|
-
if (this.done) {
|
|
785
|
-
throw exception;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
var context = this;
|
|
789
|
-
function handle(loc, caught) {
|
|
790
|
-
record.type = "throw";
|
|
791
|
-
record.arg = exception;
|
|
792
|
-
context.next = loc;
|
|
793
|
-
|
|
794
|
-
if (caught) {
|
|
795
|
-
// If the dispatched exception was caught by a catch block,
|
|
796
|
-
// then let that catch block handle the exception normally.
|
|
797
|
-
context.method = "next";
|
|
798
|
-
context.arg = undefined$1;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
return !! caught;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
805
|
-
var entry = this.tryEntries[i];
|
|
806
|
-
var record = entry.completion;
|
|
807
|
-
|
|
808
|
-
if (entry.tryLoc === "root") {
|
|
809
|
-
// Exception thrown outside of any try block that could handle
|
|
810
|
-
// it, so set the completion value of the entire function to
|
|
811
|
-
// throw the exception.
|
|
812
|
-
return handle("end");
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
if (entry.tryLoc <= this.prev) {
|
|
816
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
817
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
818
|
-
|
|
819
|
-
if (hasCatch && hasFinally) {
|
|
820
|
-
if (this.prev < entry.catchLoc) {
|
|
821
|
-
return handle(entry.catchLoc, true);
|
|
822
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
823
|
-
return handle(entry.finallyLoc);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
} else if (hasCatch) {
|
|
827
|
-
if (this.prev < entry.catchLoc) {
|
|
828
|
-
return handle(entry.catchLoc, true);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
} else if (hasFinally) {
|
|
832
|
-
if (this.prev < entry.finallyLoc) {
|
|
833
|
-
return handle(entry.finallyLoc);
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
} else {
|
|
837
|
-
throw new Error("try statement without catch or finally");
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
},
|
|
842
|
-
|
|
843
|
-
abrupt: function(type, arg) {
|
|
844
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
845
|
-
var entry = this.tryEntries[i];
|
|
846
|
-
if (entry.tryLoc <= this.prev &&
|
|
847
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
848
|
-
this.prev < entry.finallyLoc) {
|
|
849
|
-
var finallyEntry = entry;
|
|
850
|
-
break;
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
if (finallyEntry &&
|
|
855
|
-
(type === "break" ||
|
|
856
|
-
type === "continue") &&
|
|
857
|
-
finallyEntry.tryLoc <= arg &&
|
|
858
|
-
arg <= finallyEntry.finallyLoc) {
|
|
859
|
-
// Ignore the finally entry if control is not jumping to a
|
|
860
|
-
// location outside the try/catch block.
|
|
861
|
-
finallyEntry = null;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
865
|
-
record.type = type;
|
|
866
|
-
record.arg = arg;
|
|
867
|
-
|
|
868
|
-
if (finallyEntry) {
|
|
869
|
-
this.method = "next";
|
|
870
|
-
this.next = finallyEntry.finallyLoc;
|
|
871
|
-
return ContinueSentinel;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
return this.complete(record);
|
|
875
|
-
},
|
|
876
|
-
|
|
877
|
-
complete: function(record, afterLoc) {
|
|
878
|
-
if (record.type === "throw") {
|
|
879
|
-
throw record.arg;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
if (record.type === "break" ||
|
|
883
|
-
record.type === "continue") {
|
|
884
|
-
this.next = record.arg;
|
|
885
|
-
} else if (record.type === "return") {
|
|
886
|
-
this.rval = this.arg = record.arg;
|
|
887
|
-
this.method = "return";
|
|
888
|
-
this.next = "end";
|
|
889
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
890
|
-
this.next = afterLoc;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
return ContinueSentinel;
|
|
894
|
-
},
|
|
895
|
-
|
|
896
|
-
finish: function(finallyLoc) {
|
|
897
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
898
|
-
var entry = this.tryEntries[i];
|
|
899
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
900
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
901
|
-
resetTryEntry(entry);
|
|
902
|
-
return ContinueSentinel;
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
},
|
|
906
|
-
|
|
907
|
-
"catch": function(tryLoc) {
|
|
908
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
909
|
-
var entry = this.tryEntries[i];
|
|
910
|
-
if (entry.tryLoc === tryLoc) {
|
|
911
|
-
var record = entry.completion;
|
|
912
|
-
if (record.type === "throw") {
|
|
913
|
-
var thrown = record.arg;
|
|
914
|
-
resetTryEntry(entry);
|
|
915
|
-
}
|
|
916
|
-
return thrown;
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
// The context.catch method must only be called with a location
|
|
921
|
-
// argument that corresponds to a known catch block.
|
|
922
|
-
throw new Error("illegal catch attempt");
|
|
923
|
-
},
|
|
924
|
-
|
|
925
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
926
|
-
this.delegate = {
|
|
927
|
-
iterator: values(iterable),
|
|
928
|
-
resultName: resultName,
|
|
929
|
-
nextLoc: nextLoc
|
|
930
|
-
};
|
|
931
|
-
|
|
932
|
-
if (this.method === "next") {
|
|
933
|
-
// Deliberately forget the last sent value so that we don't
|
|
934
|
-
// accidentally pass it on to the delegate.
|
|
935
|
-
this.arg = undefined$1;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
return ContinueSentinel;
|
|
939
|
-
}
|
|
940
|
-
};
|
|
941
|
-
|
|
942
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
943
|
-
// or not, return the runtime object so that we can declare the variable
|
|
944
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
945
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
946
|
-
return exports;
|
|
947
|
-
|
|
948
|
-
}(
|
|
949
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
950
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
951
|
-
// object. Either way, the resulting object will be used to initialize
|
|
952
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
953
|
-
module.exports
|
|
954
|
-
));
|
|
955
|
-
|
|
956
|
-
try {
|
|
957
|
-
regeneratorRuntime = runtime;
|
|
958
|
-
} catch (accidentalStrictMode) {
|
|
959
|
-
// This module should not be running in strict mode, so the above
|
|
960
|
-
// assignment should always work unless something is misconfigured. Just
|
|
961
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
962
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
963
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
964
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
965
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
966
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
967
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
968
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
969
|
-
if (typeof globalThis === "object") {
|
|
970
|
-
globalThis.regeneratorRuntime = runtime;
|
|
971
|
-
} else {
|
|
972
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
});
|
|
976
|
-
|
|
977
|
-
/**
|
|
978
|
-
* Checks if `value` is classified as an `Array` object.
|
|
979
|
-
*
|
|
980
|
-
* @static
|
|
981
|
-
* @memberOf _
|
|
982
|
-
* @since 0.1.0
|
|
983
|
-
* @category Lang
|
|
984
|
-
* @param {*} value The value to check.
|
|
985
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
986
|
-
* @example
|
|
987
|
-
*
|
|
988
|
-
* _.isArray([1, 2, 3]);
|
|
989
|
-
* // => true
|
|
990
|
-
*
|
|
991
|
-
* _.isArray(document.body.children);
|
|
992
|
-
* // => false
|
|
993
|
-
*
|
|
994
|
-
* _.isArray('abc');
|
|
995
|
-
* // => false
|
|
996
|
-
*
|
|
997
|
-
* _.isArray(_.noop);
|
|
998
|
-
* // => false
|
|
999
|
-
*/
|
|
1000
|
-
var isArray = Array.isArray;
|
|
1001
|
-
|
|
1002
|
-
var isArray_1 = isArray;
|
|
1003
|
-
|
|
1004
|
-
/** Detect free variable `global` from Node.js. */
|
|
1005
|
-
|
|
1006
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1007
|
-
|
|
1008
|
-
var _freeGlobal = freeGlobal;
|
|
1009
|
-
|
|
1010
|
-
/** Detect free variable `self`. */
|
|
1011
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
1012
|
-
|
|
1013
|
-
/** Used as a reference to the global object. */
|
|
1014
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
1015
|
-
|
|
1016
|
-
var _root = root;
|
|
1017
|
-
|
|
1018
|
-
/** Built-in value references. */
|
|
1019
|
-
var Symbol$1 = _root.Symbol;
|
|
1020
|
-
|
|
1021
|
-
var _Symbol = Symbol$1;
|
|
1022
|
-
|
|
1023
|
-
/** Used for built-in method references. */
|
|
1024
|
-
var objectProto$4 = Object.prototype;
|
|
1025
|
-
|
|
1026
|
-
/** Used to check objects for own properties. */
|
|
1027
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
1028
|
-
|
|
1029
|
-
/**
|
|
1030
|
-
* Used to resolve the
|
|
1031
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1032
|
-
* of values.
|
|
1033
|
-
*/
|
|
1034
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
1035
|
-
|
|
1036
|
-
/** Built-in value references. */
|
|
1037
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
1041
|
-
*
|
|
1042
|
-
* @private
|
|
1043
|
-
* @param {*} value The value to query.
|
|
1044
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
1045
|
-
*/
|
|
1046
|
-
function getRawTag(value) {
|
|
1047
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
1048
|
-
tag = value[symToStringTag$1];
|
|
1049
|
-
|
|
1050
|
-
try {
|
|
1051
|
-
value[symToStringTag$1] = undefined;
|
|
1052
|
-
var unmasked = true;
|
|
1053
|
-
} catch (e) {}
|
|
1054
|
-
|
|
1055
|
-
var result = nativeObjectToString$1.call(value);
|
|
1056
|
-
if (unmasked) {
|
|
1057
|
-
if (isOwn) {
|
|
1058
|
-
value[symToStringTag$1] = tag;
|
|
1059
|
-
} else {
|
|
1060
|
-
delete value[symToStringTag$1];
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
return result;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
var _getRawTag = getRawTag;
|
|
1067
|
-
|
|
1068
|
-
/** Used for built-in method references. */
|
|
1069
|
-
var objectProto$3 = Object.prototype;
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* Used to resolve the
|
|
1073
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1074
|
-
* of values.
|
|
1075
|
-
*/
|
|
1076
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
1077
|
-
|
|
1078
|
-
/**
|
|
1079
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
1080
|
-
*
|
|
1081
|
-
* @private
|
|
1082
|
-
* @param {*} value The value to convert.
|
|
1083
|
-
* @returns {string} Returns the converted string.
|
|
1084
|
-
*/
|
|
1085
|
-
function objectToString(value) {
|
|
1086
|
-
return nativeObjectToString.call(value);
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
var _objectToString = objectToString;
|
|
1090
|
-
|
|
1091
|
-
/** `Object#toString` result references. */
|
|
1092
|
-
var nullTag = '[object Null]',
|
|
1093
|
-
undefinedTag = '[object Undefined]';
|
|
1094
|
-
|
|
1095
|
-
/** Built-in value references. */
|
|
1096
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
1100
|
-
*
|
|
1101
|
-
* @private
|
|
1102
|
-
* @param {*} value The value to query.
|
|
1103
|
-
* @returns {string} Returns the `toStringTag`.
|
|
1104
|
-
*/
|
|
1105
|
-
function baseGetTag(value) {
|
|
1106
|
-
if (value == null) {
|
|
1107
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
1108
|
-
}
|
|
1109
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
1110
|
-
? _getRawTag(value)
|
|
1111
|
-
: _objectToString(value);
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
var _baseGetTag = baseGetTag;
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1118
|
-
* and has a `typeof` result of "object".
|
|
1119
|
-
*
|
|
1120
|
-
* @static
|
|
1121
|
-
* @memberOf _
|
|
1122
|
-
* @since 4.0.0
|
|
1123
|
-
* @category Lang
|
|
1124
|
-
* @param {*} value The value to check.
|
|
1125
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1126
|
-
* @example
|
|
1127
|
-
*
|
|
1128
|
-
* _.isObjectLike({});
|
|
1129
|
-
* // => true
|
|
1130
|
-
*
|
|
1131
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1132
|
-
* // => true
|
|
1133
|
-
*
|
|
1134
|
-
* _.isObjectLike(_.noop);
|
|
1135
|
-
* // => false
|
|
1136
|
-
*
|
|
1137
|
-
* _.isObjectLike(null);
|
|
1138
|
-
* // => false
|
|
1139
|
-
*/
|
|
1140
|
-
function isObjectLike(value) {
|
|
1141
|
-
return value != null && typeof value == 'object';
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
var isObjectLike_1 = isObjectLike;
|
|
1145
|
-
|
|
1146
|
-
/** `Object#toString` result references. */
|
|
1147
|
-
var symbolTag = '[object Symbol]';
|
|
1148
|
-
|
|
1149
|
-
/**
|
|
1150
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
1151
|
-
*
|
|
1152
|
-
* @static
|
|
1153
|
-
* @memberOf _
|
|
1154
|
-
* @since 4.0.0
|
|
1155
|
-
* @category Lang
|
|
1156
|
-
* @param {*} value The value to check.
|
|
1157
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
1158
|
-
* @example
|
|
1159
|
-
*
|
|
1160
|
-
* _.isSymbol(Symbol.iterator);
|
|
1161
|
-
* // => true
|
|
1162
|
-
*
|
|
1163
|
-
* _.isSymbol('abc');
|
|
1164
|
-
* // => false
|
|
1165
|
-
*/
|
|
1166
|
-
function isSymbol(value) {
|
|
1167
|
-
return typeof value == 'symbol' ||
|
|
1168
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
var isSymbol_1 = isSymbol;
|
|
1172
|
-
|
|
1173
|
-
/** Used to match property names within property paths. */
|
|
1174
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
1175
|
-
reIsPlainProp = /^\w*$/;
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* Checks if `value` is a property name and not a property path.
|
|
1179
|
-
*
|
|
1180
|
-
* @private
|
|
1181
|
-
* @param {*} value The value to check.
|
|
1182
|
-
* @param {Object} [object] The object to query keys on.
|
|
1183
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1184
|
-
*/
|
|
1185
|
-
function isKey(value, object) {
|
|
1186
|
-
if (isArray_1(value)) {
|
|
1187
|
-
return false;
|
|
1188
|
-
}
|
|
1189
|
-
var type = typeof value;
|
|
1190
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
1191
|
-
value == null || isSymbol_1(value)) {
|
|
1192
|
-
return true;
|
|
1193
|
-
}
|
|
1194
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
1195
|
-
(object != null && value in Object(object));
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
var _isKey = isKey;
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
* Checks if `value` is the
|
|
1202
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1203
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1204
|
-
*
|
|
1205
|
-
* @static
|
|
1206
|
-
* @memberOf _
|
|
1207
|
-
* @since 0.1.0
|
|
1208
|
-
* @category Lang
|
|
1209
|
-
* @param {*} value The value to check.
|
|
1210
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1211
|
-
* @example
|
|
1212
|
-
*
|
|
1213
|
-
* _.isObject({});
|
|
1214
|
-
* // => true
|
|
1215
|
-
*
|
|
1216
|
-
* _.isObject([1, 2, 3]);
|
|
1217
|
-
* // => true
|
|
1218
|
-
*
|
|
1219
|
-
* _.isObject(_.noop);
|
|
1220
|
-
* // => true
|
|
1221
|
-
*
|
|
1222
|
-
* _.isObject(null);
|
|
1223
|
-
* // => false
|
|
1224
|
-
*/
|
|
1225
|
-
function isObject(value) {
|
|
1226
|
-
var type = typeof value;
|
|
1227
|
-
return value != null && (type == 'object' || type == 'function');
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
var isObject_1 = isObject;
|
|
1231
|
-
|
|
1232
|
-
/** `Object#toString` result references. */
|
|
1233
|
-
var asyncTag = '[object AsyncFunction]',
|
|
1234
|
-
funcTag = '[object Function]',
|
|
1235
|
-
genTag = '[object GeneratorFunction]',
|
|
1236
|
-
proxyTag = '[object Proxy]';
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* Checks if `value` is classified as a `Function` object.
|
|
1240
|
-
*
|
|
1241
|
-
* @static
|
|
1242
|
-
* @memberOf _
|
|
1243
|
-
* @since 0.1.0
|
|
1244
|
-
* @category Lang
|
|
1245
|
-
* @param {*} value The value to check.
|
|
1246
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1247
|
-
* @example
|
|
1248
|
-
*
|
|
1249
|
-
* _.isFunction(_);
|
|
1250
|
-
* // => true
|
|
1251
|
-
*
|
|
1252
|
-
* _.isFunction(/abc/);
|
|
1253
|
-
* // => false
|
|
1254
|
-
*/
|
|
1255
|
-
function isFunction(value) {
|
|
1256
|
-
if (!isObject_1(value)) {
|
|
1257
|
-
return false;
|
|
1258
|
-
}
|
|
1259
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1260
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1261
|
-
var tag = _baseGetTag(value);
|
|
1262
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
var isFunction_1 = isFunction;
|
|
1266
|
-
|
|
1267
|
-
/** Used to detect overreaching core-js shims. */
|
|
1268
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
1269
|
-
|
|
1270
|
-
var _coreJsData = coreJsData;
|
|
1271
|
-
|
|
1272
|
-
/** Used to detect methods masquerading as native. */
|
|
1273
|
-
var maskSrcKey = (function() {
|
|
1274
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
1275
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1276
|
-
}());
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* Checks if `func` has its source masked.
|
|
1280
|
-
*
|
|
1281
|
-
* @private
|
|
1282
|
-
* @param {Function} func The function to check.
|
|
1283
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1284
|
-
*/
|
|
1285
|
-
function isMasked(func) {
|
|
1286
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
var _isMasked = isMasked;
|
|
1290
|
-
|
|
1291
|
-
/** Used for built-in method references. */
|
|
1292
|
-
var funcProto$1 = Function.prototype;
|
|
1293
|
-
|
|
1294
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1295
|
-
var funcToString$1 = funcProto$1.toString;
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
* Converts `func` to its source code.
|
|
1299
|
-
*
|
|
1300
|
-
* @private
|
|
1301
|
-
* @param {Function} func The function to convert.
|
|
1302
|
-
* @returns {string} Returns the source code.
|
|
1303
|
-
*/
|
|
1304
|
-
function toSource(func) {
|
|
1305
|
-
if (func != null) {
|
|
1306
|
-
try {
|
|
1307
|
-
return funcToString$1.call(func);
|
|
1308
|
-
} catch (e) {}
|
|
1309
|
-
try {
|
|
1310
|
-
return (func + '');
|
|
1311
|
-
} catch (e) {}
|
|
1312
|
-
}
|
|
1313
|
-
return '';
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
var _toSource = toSource;
|
|
1317
|
-
|
|
1318
|
-
/**
|
|
1319
|
-
* Used to match `RegExp`
|
|
1320
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1321
|
-
*/
|
|
1322
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1323
|
-
|
|
1324
|
-
/** Used to detect host constructors (Safari). */
|
|
1325
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1326
|
-
|
|
1327
|
-
/** Used for built-in method references. */
|
|
1328
|
-
var funcProto = Function.prototype,
|
|
1329
|
-
objectProto$2 = Object.prototype;
|
|
1330
|
-
|
|
1331
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1332
|
-
var funcToString = funcProto.toString;
|
|
1333
|
-
|
|
1334
|
-
/** Used to check objects for own properties. */
|
|
1335
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1336
|
-
|
|
1337
|
-
/** Used to detect if a method is native. */
|
|
1338
|
-
var reIsNative = RegExp('^' +
|
|
1339
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
1340
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1341
|
-
);
|
|
1342
|
-
|
|
1343
|
-
/**
|
|
1344
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
1345
|
-
*
|
|
1346
|
-
* @private
|
|
1347
|
-
* @param {*} value The value to check.
|
|
1348
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1349
|
-
* else `false`.
|
|
1350
|
-
*/
|
|
1351
|
-
function baseIsNative(value) {
|
|
1352
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
1353
|
-
return false;
|
|
1354
|
-
}
|
|
1355
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
1356
|
-
return pattern.test(_toSource(value));
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
var _baseIsNative = baseIsNative;
|
|
1360
|
-
|
|
1361
|
-
/**
|
|
1362
|
-
* Gets the value at `key` of `object`.
|
|
1363
|
-
*
|
|
1364
|
-
* @private
|
|
1365
|
-
* @param {Object} [object] The object to query.
|
|
1366
|
-
* @param {string} key The key of the property to get.
|
|
1367
|
-
* @returns {*} Returns the property value.
|
|
1368
|
-
*/
|
|
1369
|
-
function getValue(object, key) {
|
|
1370
|
-
return object == null ? undefined : object[key];
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
var _getValue = getValue;
|
|
1374
|
-
|
|
1375
|
-
/**
|
|
1376
|
-
* Gets the native function at `key` of `object`.
|
|
1377
|
-
*
|
|
1378
|
-
* @private
|
|
1379
|
-
* @param {Object} object The object to query.
|
|
1380
|
-
* @param {string} key The key of the method to get.
|
|
1381
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1382
|
-
*/
|
|
1383
|
-
function getNative(object, key) {
|
|
1384
|
-
var value = _getValue(object, key);
|
|
1385
|
-
return _baseIsNative(value) ? value : undefined;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
var _getNative = getNative;
|
|
1389
|
-
|
|
1390
|
-
/* Built-in method references that are verified to be native. */
|
|
1391
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
1392
|
-
|
|
1393
|
-
var _nativeCreate = nativeCreate;
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* Removes all key-value entries from the hash.
|
|
1397
|
-
*
|
|
1398
|
-
* @private
|
|
1399
|
-
* @name clear
|
|
1400
|
-
* @memberOf Hash
|
|
1401
|
-
*/
|
|
1402
|
-
function hashClear() {
|
|
1403
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1404
|
-
this.size = 0;
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
var _hashClear = hashClear;
|
|
1408
|
-
|
|
1409
|
-
/**
|
|
1410
|
-
* Removes `key` and its value from the hash.
|
|
1411
|
-
*
|
|
1412
|
-
* @private
|
|
1413
|
-
* @name delete
|
|
1414
|
-
* @memberOf Hash
|
|
1415
|
-
* @param {Object} hash The hash to modify.
|
|
1416
|
-
* @param {string} key The key of the value to remove.
|
|
1417
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1418
|
-
*/
|
|
1419
|
-
function hashDelete(key) {
|
|
1420
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
1421
|
-
this.size -= result ? 1 : 0;
|
|
1422
|
-
return result;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
var _hashDelete = hashDelete;
|
|
1426
|
-
|
|
1427
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1428
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
1429
|
-
|
|
1430
|
-
/** Used for built-in method references. */
|
|
1431
|
-
var objectProto$1 = Object.prototype;
|
|
1432
|
-
|
|
1433
|
-
/** Used to check objects for own properties. */
|
|
1434
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1435
|
-
|
|
1436
|
-
/**
|
|
1437
|
-
* Gets the hash value for `key`.
|
|
1438
|
-
*
|
|
1439
|
-
* @private
|
|
1440
|
-
* @name get
|
|
1441
|
-
* @memberOf Hash
|
|
1442
|
-
* @param {string} key The key of the value to get.
|
|
1443
|
-
* @returns {*} Returns the entry value.
|
|
1444
|
-
*/
|
|
1445
|
-
function hashGet(key) {
|
|
1446
|
-
var data = this.__data__;
|
|
1447
|
-
if (_nativeCreate) {
|
|
1448
|
-
var result = data[key];
|
|
1449
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1450
|
-
}
|
|
1451
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
var _hashGet = hashGet;
|
|
1455
|
-
|
|
1456
|
-
/** Used for built-in method references. */
|
|
1457
|
-
var objectProto = Object.prototype;
|
|
1458
|
-
|
|
1459
|
-
/** Used to check objects for own properties. */
|
|
1460
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1461
|
-
|
|
1462
|
-
/**
|
|
1463
|
-
* Checks if a hash value for `key` exists.
|
|
1464
|
-
*
|
|
1465
|
-
* @private
|
|
1466
|
-
* @name has
|
|
1467
|
-
* @memberOf Hash
|
|
1468
|
-
* @param {string} key The key of the entry to check.
|
|
1469
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1470
|
-
*/
|
|
1471
|
-
function hashHas(key) {
|
|
1472
|
-
var data = this.__data__;
|
|
1473
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
var _hashHas = hashHas;
|
|
1477
|
-
|
|
1478
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1479
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1480
|
-
|
|
1481
|
-
/**
|
|
1482
|
-
* Sets the hash `key` to `value`.
|
|
1483
|
-
*
|
|
1484
|
-
* @private
|
|
1485
|
-
* @name set
|
|
1486
|
-
* @memberOf Hash
|
|
1487
|
-
* @param {string} key The key of the value to set.
|
|
1488
|
-
* @param {*} value The value to set.
|
|
1489
|
-
* @returns {Object} Returns the hash instance.
|
|
1490
|
-
*/
|
|
1491
|
-
function hashSet(key, value) {
|
|
1492
|
-
var data = this.__data__;
|
|
1493
|
-
this.size += this.has(key) ? 0 : 1;
|
|
1494
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1495
|
-
return this;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
var _hashSet = hashSet;
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* Creates a hash object.
|
|
1502
|
-
*
|
|
1503
|
-
* @private
|
|
1504
|
-
* @constructor
|
|
1505
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1506
|
-
*/
|
|
1507
|
-
function Hash(entries) {
|
|
1508
|
-
var index = -1,
|
|
1509
|
-
length = entries == null ? 0 : entries.length;
|
|
1510
|
-
|
|
1511
|
-
this.clear();
|
|
1512
|
-
while (++index < length) {
|
|
1513
|
-
var entry = entries[index];
|
|
1514
|
-
this.set(entry[0], entry[1]);
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
// Add methods to `Hash`.
|
|
1519
|
-
Hash.prototype.clear = _hashClear;
|
|
1520
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
1521
|
-
Hash.prototype.get = _hashGet;
|
|
1522
|
-
Hash.prototype.has = _hashHas;
|
|
1523
|
-
Hash.prototype.set = _hashSet;
|
|
1524
|
-
|
|
1525
|
-
var _Hash = Hash;
|
|
1526
|
-
|
|
1527
|
-
/**
|
|
1528
|
-
* Removes all key-value entries from the list cache.
|
|
1529
|
-
*
|
|
1530
|
-
* @private
|
|
1531
|
-
* @name clear
|
|
1532
|
-
* @memberOf ListCache
|
|
1533
|
-
*/
|
|
1534
|
-
function listCacheClear() {
|
|
1535
|
-
this.__data__ = [];
|
|
1536
|
-
this.size = 0;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
var _listCacheClear = listCacheClear;
|
|
1540
|
-
|
|
1541
|
-
/**
|
|
1542
|
-
* Performs a
|
|
1543
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1544
|
-
* comparison between two values to determine if they are equivalent.
|
|
1545
|
-
*
|
|
1546
|
-
* @static
|
|
1547
|
-
* @memberOf _
|
|
1548
|
-
* @since 4.0.0
|
|
1549
|
-
* @category Lang
|
|
1550
|
-
* @param {*} value The value to compare.
|
|
1551
|
-
* @param {*} other The other value to compare.
|
|
1552
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1553
|
-
* @example
|
|
1554
|
-
*
|
|
1555
|
-
* var object = { 'a': 1 };
|
|
1556
|
-
* var other = { 'a': 1 };
|
|
1557
|
-
*
|
|
1558
|
-
* _.eq(object, object);
|
|
1559
|
-
* // => true
|
|
1560
|
-
*
|
|
1561
|
-
* _.eq(object, other);
|
|
1562
|
-
* // => false
|
|
1563
|
-
*
|
|
1564
|
-
* _.eq('a', 'a');
|
|
1565
|
-
* // => true
|
|
1566
|
-
*
|
|
1567
|
-
* _.eq('a', Object('a'));
|
|
1568
|
-
* // => false
|
|
1569
|
-
*
|
|
1570
|
-
* _.eq(NaN, NaN);
|
|
1571
|
-
* // => true
|
|
1572
|
-
*/
|
|
1573
|
-
function eq(value, other) {
|
|
1574
|
-
return value === other || (value !== value && other !== other);
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
var eq_1 = eq;
|
|
1578
|
-
|
|
1579
|
-
/**
|
|
1580
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1581
|
-
*
|
|
1582
|
-
* @private
|
|
1583
|
-
* @param {Array} array The array to inspect.
|
|
1584
|
-
* @param {*} key The key to search for.
|
|
1585
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1586
|
-
*/
|
|
1587
|
-
function assocIndexOf(array, key) {
|
|
1588
|
-
var length = array.length;
|
|
1589
|
-
while (length--) {
|
|
1590
|
-
if (eq_1(array[length][0], key)) {
|
|
1591
|
-
return length;
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
return -1;
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
var _assocIndexOf = assocIndexOf;
|
|
1598
|
-
|
|
1599
|
-
/** Used for built-in method references. */
|
|
1600
|
-
var arrayProto = Array.prototype;
|
|
1601
|
-
|
|
1602
|
-
/** Built-in value references. */
|
|
1603
|
-
var splice = arrayProto.splice;
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
* Removes `key` and its value from the list cache.
|
|
1607
|
-
*
|
|
1608
|
-
* @private
|
|
1609
|
-
* @name delete
|
|
1610
|
-
* @memberOf ListCache
|
|
1611
|
-
* @param {string} key The key of the value to remove.
|
|
1612
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1613
|
-
*/
|
|
1614
|
-
function listCacheDelete(key) {
|
|
1615
|
-
var data = this.__data__,
|
|
1616
|
-
index = _assocIndexOf(data, key);
|
|
1617
|
-
|
|
1618
|
-
if (index < 0) {
|
|
1619
|
-
return false;
|
|
1620
|
-
}
|
|
1621
|
-
var lastIndex = data.length - 1;
|
|
1622
|
-
if (index == lastIndex) {
|
|
1623
|
-
data.pop();
|
|
1624
|
-
} else {
|
|
1625
|
-
splice.call(data, index, 1);
|
|
1626
|
-
}
|
|
1627
|
-
--this.size;
|
|
1628
|
-
return true;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
var _listCacheDelete = listCacheDelete;
|
|
1632
|
-
|
|
1633
|
-
/**
|
|
1634
|
-
* Gets the list cache value for `key`.
|
|
1635
|
-
*
|
|
1636
|
-
* @private
|
|
1637
|
-
* @name get
|
|
1638
|
-
* @memberOf ListCache
|
|
1639
|
-
* @param {string} key The key of the value to get.
|
|
1640
|
-
* @returns {*} Returns the entry value.
|
|
1641
|
-
*/
|
|
1642
|
-
function listCacheGet(key) {
|
|
1643
|
-
var data = this.__data__,
|
|
1644
|
-
index = _assocIndexOf(data, key);
|
|
1645
|
-
|
|
1646
|
-
return index < 0 ? undefined : data[index][1];
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
var _listCacheGet = listCacheGet;
|
|
1650
|
-
|
|
1651
|
-
/**
|
|
1652
|
-
* Checks if a list cache value for `key` exists.
|
|
1653
|
-
*
|
|
1654
|
-
* @private
|
|
1655
|
-
* @name has
|
|
1656
|
-
* @memberOf ListCache
|
|
1657
|
-
* @param {string} key The key of the entry to check.
|
|
1658
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1659
|
-
*/
|
|
1660
|
-
function listCacheHas(key) {
|
|
1661
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
var _listCacheHas = listCacheHas;
|
|
1665
|
-
|
|
1666
|
-
/**
|
|
1667
|
-
* Sets the list cache `key` to `value`.
|
|
1668
|
-
*
|
|
1669
|
-
* @private
|
|
1670
|
-
* @name set
|
|
1671
|
-
* @memberOf ListCache
|
|
1672
|
-
* @param {string} key The key of the value to set.
|
|
1673
|
-
* @param {*} value The value to set.
|
|
1674
|
-
* @returns {Object} Returns the list cache instance.
|
|
1675
|
-
*/
|
|
1676
|
-
function listCacheSet(key, value) {
|
|
1677
|
-
var data = this.__data__,
|
|
1678
|
-
index = _assocIndexOf(data, key);
|
|
1679
|
-
|
|
1680
|
-
if (index < 0) {
|
|
1681
|
-
++this.size;
|
|
1682
|
-
data.push([key, value]);
|
|
1683
|
-
} else {
|
|
1684
|
-
data[index][1] = value;
|
|
1685
|
-
}
|
|
1686
|
-
return this;
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
var _listCacheSet = listCacheSet;
|
|
1690
|
-
|
|
1691
|
-
/**
|
|
1692
|
-
* Creates an list cache object.
|
|
1693
|
-
*
|
|
1694
|
-
* @private
|
|
1695
|
-
* @constructor
|
|
1696
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1697
|
-
*/
|
|
1698
|
-
function ListCache(entries) {
|
|
1699
|
-
var index = -1,
|
|
1700
|
-
length = entries == null ? 0 : entries.length;
|
|
1701
|
-
|
|
1702
|
-
this.clear();
|
|
1703
|
-
while (++index < length) {
|
|
1704
|
-
var entry = entries[index];
|
|
1705
|
-
this.set(entry[0], entry[1]);
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
// Add methods to `ListCache`.
|
|
1710
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
1711
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1712
|
-
ListCache.prototype.get = _listCacheGet;
|
|
1713
|
-
ListCache.prototype.has = _listCacheHas;
|
|
1714
|
-
ListCache.prototype.set = _listCacheSet;
|
|
1715
|
-
|
|
1716
|
-
var _ListCache = ListCache;
|
|
1717
|
-
|
|
1718
|
-
/* Built-in method references that are verified to be native. */
|
|
1719
|
-
var Map = _getNative(_root, 'Map');
|
|
1720
|
-
|
|
1721
|
-
var _Map = Map;
|
|
1722
|
-
|
|
1723
|
-
/**
|
|
1724
|
-
* Removes all key-value entries from the map.
|
|
1725
|
-
*
|
|
1726
|
-
* @private
|
|
1727
|
-
* @name clear
|
|
1728
|
-
* @memberOf MapCache
|
|
1729
|
-
*/
|
|
1730
|
-
function mapCacheClear() {
|
|
1731
|
-
this.size = 0;
|
|
1732
|
-
this.__data__ = {
|
|
1733
|
-
'hash': new _Hash,
|
|
1734
|
-
'map': new (_Map || _ListCache),
|
|
1735
|
-
'string': new _Hash
|
|
1736
|
-
};
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
var _mapCacheClear = mapCacheClear;
|
|
1740
|
-
|
|
1741
|
-
/**
|
|
1742
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
1743
|
-
*
|
|
1744
|
-
* @private
|
|
1745
|
-
* @param {*} value The value to check.
|
|
1746
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1747
|
-
*/
|
|
1748
|
-
function isKeyable(value) {
|
|
1749
|
-
var type = typeof value;
|
|
1750
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1751
|
-
? (value !== '__proto__')
|
|
1752
|
-
: (value === null);
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
var _isKeyable = isKeyable;
|
|
1756
|
-
|
|
1757
|
-
/**
|
|
1758
|
-
* Gets the data for `map`.
|
|
1759
|
-
*
|
|
1760
|
-
* @private
|
|
1761
|
-
* @param {Object} map The map to query.
|
|
1762
|
-
* @param {string} key The reference key.
|
|
1763
|
-
* @returns {*} Returns the map data.
|
|
1764
|
-
*/
|
|
1765
|
-
function getMapData(map, key) {
|
|
1766
|
-
var data = map.__data__;
|
|
1767
|
-
return _isKeyable(key)
|
|
1768
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1769
|
-
: data.map;
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
var _getMapData = getMapData;
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1775
|
-
* Removes `key` and its value from the map.
|
|
1776
|
-
*
|
|
1777
|
-
* @private
|
|
1778
|
-
* @name delete
|
|
1779
|
-
* @memberOf MapCache
|
|
1780
|
-
* @param {string} key The key of the value to remove.
|
|
1781
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1782
|
-
*/
|
|
1783
|
-
function mapCacheDelete(key) {
|
|
1784
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1785
|
-
this.size -= result ? 1 : 0;
|
|
1786
|
-
return result;
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
1790
|
-
|
|
1791
|
-
/**
|
|
1792
|
-
* Gets the map value for `key`.
|
|
1793
|
-
*
|
|
1794
|
-
* @private
|
|
1795
|
-
* @name get
|
|
1796
|
-
* @memberOf MapCache
|
|
1797
|
-
* @param {string} key The key of the value to get.
|
|
1798
|
-
* @returns {*} Returns the entry value.
|
|
1799
|
-
*/
|
|
1800
|
-
function mapCacheGet(key) {
|
|
1801
|
-
return _getMapData(this, key).get(key);
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
var _mapCacheGet = mapCacheGet;
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* Checks if a map value for `key` exists.
|
|
1808
|
-
*
|
|
1809
|
-
* @private
|
|
1810
|
-
* @name has
|
|
1811
|
-
* @memberOf MapCache
|
|
1812
|
-
* @param {string} key The key of the entry to check.
|
|
1813
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1814
|
-
*/
|
|
1815
|
-
function mapCacheHas(key) {
|
|
1816
|
-
return _getMapData(this, key).has(key);
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
var _mapCacheHas = mapCacheHas;
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1822
|
-
* Sets the map `key` to `value`.
|
|
1823
|
-
*
|
|
1824
|
-
* @private
|
|
1825
|
-
* @name set
|
|
1826
|
-
* @memberOf MapCache
|
|
1827
|
-
* @param {string} key The key of the value to set.
|
|
1828
|
-
* @param {*} value The value to set.
|
|
1829
|
-
* @returns {Object} Returns the map cache instance.
|
|
1830
|
-
*/
|
|
1831
|
-
function mapCacheSet(key, value) {
|
|
1832
|
-
var data = _getMapData(this, key),
|
|
1833
|
-
size = data.size;
|
|
1834
|
-
|
|
1835
|
-
data.set(key, value);
|
|
1836
|
-
this.size += data.size == size ? 0 : 1;
|
|
1837
|
-
return this;
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
var _mapCacheSet = mapCacheSet;
|
|
1841
|
-
|
|
1842
|
-
/**
|
|
1843
|
-
* Creates a map cache object to store key-value pairs.
|
|
1844
|
-
*
|
|
1845
|
-
* @private
|
|
1846
|
-
* @constructor
|
|
1847
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1848
|
-
*/
|
|
1849
|
-
function MapCache(entries) {
|
|
1850
|
-
var index = -1,
|
|
1851
|
-
length = entries == null ? 0 : entries.length;
|
|
1852
|
-
|
|
1853
|
-
this.clear();
|
|
1854
|
-
while (++index < length) {
|
|
1855
|
-
var entry = entries[index];
|
|
1856
|
-
this.set(entry[0], entry[1]);
|
|
1857
|
-
}
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
// Add methods to `MapCache`.
|
|
1861
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1862
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1863
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1864
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1865
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1866
|
-
|
|
1867
|
-
var _MapCache = MapCache;
|
|
1868
|
-
|
|
1869
|
-
/** Error message constants. */
|
|
1870
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1871
|
-
|
|
1872
|
-
/**
|
|
1873
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1874
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1875
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1876
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1877
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1878
|
-
*
|
|
1879
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1880
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1881
|
-
* constructor with one whose instances implement the
|
|
1882
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1883
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1884
|
-
*
|
|
1885
|
-
* @static
|
|
1886
|
-
* @memberOf _
|
|
1887
|
-
* @since 0.1.0
|
|
1888
|
-
* @category Function
|
|
1889
|
-
* @param {Function} func The function to have its output memoized.
|
|
1890
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1891
|
-
* @returns {Function} Returns the new memoized function.
|
|
1892
|
-
* @example
|
|
1893
|
-
*
|
|
1894
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1895
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1896
|
-
*
|
|
1897
|
-
* var values = _.memoize(_.values);
|
|
1898
|
-
* values(object);
|
|
1899
|
-
* // => [1, 2]
|
|
1900
|
-
*
|
|
1901
|
-
* values(other);
|
|
1902
|
-
* // => [3, 4]
|
|
1903
|
-
*
|
|
1904
|
-
* object.a = 2;
|
|
1905
|
-
* values(object);
|
|
1906
|
-
* // => [1, 2]
|
|
1907
|
-
*
|
|
1908
|
-
* // Modify the result cache.
|
|
1909
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1910
|
-
* values(object);
|
|
1911
|
-
* // => ['a', 'b']
|
|
1912
|
-
*
|
|
1913
|
-
* // Replace `_.memoize.Cache`.
|
|
1914
|
-
* _.memoize.Cache = WeakMap;
|
|
1915
|
-
*/
|
|
1916
|
-
function memoize(func, resolver) {
|
|
1917
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1918
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1919
|
-
}
|
|
1920
|
-
var memoized = function() {
|
|
1921
|
-
var args = arguments,
|
|
1922
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1923
|
-
cache = memoized.cache;
|
|
1924
|
-
|
|
1925
|
-
if (cache.has(key)) {
|
|
1926
|
-
return cache.get(key);
|
|
1927
|
-
}
|
|
1928
|
-
var result = func.apply(this, args);
|
|
1929
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1930
|
-
return result;
|
|
1931
|
-
};
|
|
1932
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1933
|
-
return memoized;
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
// Expose `MapCache`.
|
|
1937
|
-
memoize.Cache = _MapCache;
|
|
1938
|
-
|
|
1939
|
-
var memoize_1 = memoize;
|
|
1940
|
-
|
|
1941
|
-
/** Used as the maximum memoize cache size. */
|
|
1942
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1943
|
-
|
|
1944
|
-
/**
|
|
1945
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1946
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1947
|
-
*
|
|
1948
|
-
* @private
|
|
1949
|
-
* @param {Function} func The function to have its output memoized.
|
|
1950
|
-
* @returns {Function} Returns the new memoized function.
|
|
1951
|
-
*/
|
|
1952
|
-
function memoizeCapped(func) {
|
|
1953
|
-
var result = memoize_1(func, function(key) {
|
|
1954
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1955
|
-
cache.clear();
|
|
1956
|
-
}
|
|
1957
|
-
return key;
|
|
1958
|
-
});
|
|
1959
|
-
|
|
1960
|
-
var cache = result.cache;
|
|
1961
|
-
return result;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
var _memoizeCapped = memoizeCapped;
|
|
1965
|
-
|
|
1966
|
-
/** Used to match property names within property paths. */
|
|
1967
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1968
|
-
|
|
1969
|
-
/** Used to match backslashes in property paths. */
|
|
1970
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1971
|
-
|
|
1972
|
-
/**
|
|
1973
|
-
* Converts `string` to a property path array.
|
|
1974
|
-
*
|
|
1975
|
-
* @private
|
|
1976
|
-
* @param {string} string The string to convert.
|
|
1977
|
-
* @returns {Array} Returns the property path array.
|
|
1978
|
-
*/
|
|
1979
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1980
|
-
var result = [];
|
|
1981
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1982
|
-
result.push('');
|
|
1983
|
-
}
|
|
1984
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1985
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1986
|
-
});
|
|
1987
|
-
return result;
|
|
1988
|
-
});
|
|
1989
|
-
|
|
1990
|
-
var _stringToPath = stringToPath;
|
|
1991
|
-
|
|
1992
|
-
/**
|
|
1993
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1994
|
-
* shorthands.
|
|
1995
|
-
*
|
|
1996
|
-
* @private
|
|
1997
|
-
* @param {Array} [array] The array to iterate over.
|
|
1998
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1999
|
-
* @returns {Array} Returns the new mapped array.
|
|
2000
|
-
*/
|
|
2001
|
-
function arrayMap(array, iteratee) {
|
|
2002
|
-
var index = -1,
|
|
2003
|
-
length = array == null ? 0 : array.length,
|
|
2004
|
-
result = Array(length);
|
|
2005
|
-
|
|
2006
|
-
while (++index < length) {
|
|
2007
|
-
result[index] = iteratee(array[index], index, array);
|
|
2008
|
-
}
|
|
2009
|
-
return result;
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
|
-
var _arrayMap = arrayMap;
|
|
2013
|
-
|
|
2014
|
-
/** Used as references for various `Number` constants. */
|
|
2015
|
-
var INFINITY$1 = 1 / 0;
|
|
2016
|
-
|
|
2017
|
-
/** Used to convert symbols to primitives and strings. */
|
|
2018
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
2019
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
2020
|
-
|
|
2021
|
-
/**
|
|
2022
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
2023
|
-
* values to empty strings.
|
|
2024
|
-
*
|
|
2025
|
-
* @private
|
|
2026
|
-
* @param {*} value The value to process.
|
|
2027
|
-
* @returns {string} Returns the string.
|
|
2028
|
-
*/
|
|
2029
|
-
function baseToString(value) {
|
|
2030
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
2031
|
-
if (typeof value == 'string') {
|
|
2032
|
-
return value;
|
|
2033
|
-
}
|
|
2034
|
-
if (isArray_1(value)) {
|
|
2035
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
2036
|
-
return _arrayMap(value, baseToString) + '';
|
|
2037
|
-
}
|
|
2038
|
-
if (isSymbol_1(value)) {
|
|
2039
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
2040
|
-
}
|
|
2041
|
-
var result = (value + '');
|
|
2042
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
var _baseToString = baseToString;
|
|
2046
|
-
|
|
2047
|
-
/**
|
|
2048
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
2049
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
2050
|
-
*
|
|
2051
|
-
* @static
|
|
2052
|
-
* @memberOf _
|
|
2053
|
-
* @since 4.0.0
|
|
2054
|
-
* @category Lang
|
|
2055
|
-
* @param {*} value The value to convert.
|
|
2056
|
-
* @returns {string} Returns the converted string.
|
|
2057
|
-
* @example
|
|
2058
|
-
*
|
|
2059
|
-
* _.toString(null);
|
|
2060
|
-
* // => ''
|
|
2061
|
-
*
|
|
2062
|
-
* _.toString(-0);
|
|
2063
|
-
* // => '-0'
|
|
2064
|
-
*
|
|
2065
|
-
* _.toString([1, 2, 3]);
|
|
2066
|
-
* // => '1,2,3'
|
|
2067
|
-
*/
|
|
2068
|
-
function toString(value) {
|
|
2069
|
-
return value == null ? '' : _baseToString(value);
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
var toString_1 = toString;
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
* Casts `value` to a path array if it's not one.
|
|
2076
|
-
*
|
|
2077
|
-
* @private
|
|
2078
|
-
* @param {*} value The value to inspect.
|
|
2079
|
-
* @param {Object} [object] The object to query keys on.
|
|
2080
|
-
* @returns {Array} Returns the cast property path array.
|
|
2081
|
-
*/
|
|
2082
|
-
function castPath(value, object) {
|
|
2083
|
-
if (isArray_1(value)) {
|
|
2084
|
-
return value;
|
|
2085
|
-
}
|
|
2086
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
var _castPath = castPath;
|
|
2090
|
-
|
|
2091
|
-
/** Used as references for various `Number` constants. */
|
|
2092
|
-
var INFINITY = 1 / 0;
|
|
2093
|
-
|
|
2094
|
-
/**
|
|
2095
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
2096
|
-
*
|
|
2097
|
-
* @private
|
|
2098
|
-
* @param {*} value The value to inspect.
|
|
2099
|
-
* @returns {string|symbol} Returns the key.
|
|
2100
|
-
*/
|
|
2101
|
-
function toKey(value) {
|
|
2102
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
2103
|
-
return value;
|
|
2104
|
-
}
|
|
2105
|
-
var result = (value + '');
|
|
2106
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
var _toKey = toKey;
|
|
2110
|
-
|
|
2111
|
-
/**
|
|
2112
|
-
* The base implementation of `_.get` without support for default values.
|
|
2113
|
-
*
|
|
2114
|
-
* @private
|
|
2115
|
-
* @param {Object} object The object to query.
|
|
2116
|
-
* @param {Array|string} path The path of the property to get.
|
|
2117
|
-
* @returns {*} Returns the resolved value.
|
|
2118
|
-
*/
|
|
2119
|
-
function baseGet(object, path) {
|
|
2120
|
-
path = _castPath(path, object);
|
|
2121
|
-
|
|
2122
|
-
var index = 0,
|
|
2123
|
-
length = path.length;
|
|
2124
|
-
|
|
2125
|
-
while (object != null && index < length) {
|
|
2126
|
-
object = object[_toKey(path[index++])];
|
|
2127
|
-
}
|
|
2128
|
-
return (index && index == length) ? object : undefined;
|
|
2129
|
-
}
|
|
2130
|
-
|
|
2131
|
-
var _baseGet = baseGet;
|
|
2132
|
-
|
|
2133
|
-
/**
|
|
2134
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
2135
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
2136
|
-
*
|
|
2137
|
-
* @static
|
|
2138
|
-
* @memberOf _
|
|
2139
|
-
* @since 3.7.0
|
|
2140
|
-
* @category Object
|
|
2141
|
-
* @param {Object} object The object to query.
|
|
2142
|
-
* @param {Array|string} path The path of the property to get.
|
|
2143
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
2144
|
-
* @returns {*} Returns the resolved value.
|
|
2145
|
-
* @example
|
|
2146
|
-
*
|
|
2147
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
2148
|
-
*
|
|
2149
|
-
* _.get(object, 'a[0].b.c');
|
|
2150
|
-
* // => 3
|
|
2151
|
-
*
|
|
2152
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
2153
|
-
* // => 3
|
|
2154
|
-
*
|
|
2155
|
-
* _.get(object, 'a.b.c', 'default');
|
|
2156
|
-
* // => 'default'
|
|
2157
|
-
*/
|
|
2158
|
-
function get(object, path, defaultValue) {
|
|
2159
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
2160
|
-
return result === undefined ? defaultValue : result;
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
var get_1 = get;
|
|
2164
|
-
|
|
2165
|
-
/**
|
|
2166
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
2167
|
-
* iteratee shorthands.
|
|
2168
|
-
*
|
|
2169
|
-
* @private
|
|
2170
|
-
* @param {Array} [array] The array to iterate over.
|
|
2171
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2172
|
-
* @param {*} [accumulator] The initial value.
|
|
2173
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
2174
|
-
* the initial value.
|
|
2175
|
-
* @returns {*} Returns the accumulated value.
|
|
2176
|
-
*/
|
|
2177
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
2178
|
-
var index = -1,
|
|
2179
|
-
length = array == null ? 0 : array.length;
|
|
2180
|
-
|
|
2181
|
-
if (initAccum && length) {
|
|
2182
|
-
accumulator = array[++index];
|
|
2183
|
-
}
|
|
2184
|
-
while (++index < length) {
|
|
2185
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
2186
|
-
}
|
|
2187
|
-
return accumulator;
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
var _arrayReduce = arrayReduce;
|
|
2191
|
-
|
|
2192
|
-
/**
|
|
2193
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
2194
|
-
*
|
|
2195
|
-
* @private
|
|
2196
|
-
* @param {Object} object The object to query.
|
|
2197
|
-
* @returns {Function} Returns the new accessor function.
|
|
2198
|
-
*/
|
|
2199
|
-
function basePropertyOf(object) {
|
|
2200
|
-
return function(key) {
|
|
2201
|
-
return object == null ? undefined : object[key];
|
|
2202
|
-
};
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2205
|
-
var _basePropertyOf = basePropertyOf;
|
|
2206
|
-
|
|
2207
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2208
|
-
var deburredLetters = {
|
|
2209
|
-
// Latin-1 Supplement block.
|
|
2210
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2211
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2212
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2213
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2214
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2215
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2216
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2217
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2218
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2219
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2220
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2221
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2222
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2223
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2224
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2225
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2226
|
-
'\xdf': 'ss',
|
|
2227
|
-
// Latin Extended-A block.
|
|
2228
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2229
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2230
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2231
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2232
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2233
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2234
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2235
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2236
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2237
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2238
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2239
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2240
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2241
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2242
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2243
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2244
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2245
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2246
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2247
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2248
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2249
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2250
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2251
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2252
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2253
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2254
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2255
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2256
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2257
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2258
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2259
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2260
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2261
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2262
|
-
'\u0149': "'n", '\u017f': 's'
|
|
2263
|
-
};
|
|
2264
|
-
|
|
2265
|
-
/**
|
|
2266
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2267
|
-
* letters to basic Latin letters.
|
|
2268
|
-
*
|
|
2269
|
-
* @private
|
|
2270
|
-
* @param {string} letter The matched letter to deburr.
|
|
2271
|
-
* @returns {string} Returns the deburred letter.
|
|
2272
|
-
*/
|
|
2273
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2274
|
-
|
|
2275
|
-
var _deburrLetter = deburrLetter;
|
|
2276
|
-
|
|
2277
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2278
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2279
|
-
|
|
2280
|
-
/** Used to compose unicode character classes. */
|
|
2281
|
-
var rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
2282
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
2283
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
2284
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
|
|
2285
|
-
|
|
2286
|
-
/** Used to compose unicode capture groups. */
|
|
2287
|
-
var rsCombo$1 = '[' + rsComboRange$1 + ']';
|
|
2288
|
-
|
|
2289
|
-
/**
|
|
2290
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2291
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2292
|
-
*/
|
|
2293
|
-
var reComboMark = RegExp(rsCombo$1, 'g');
|
|
2294
|
-
|
|
2295
|
-
/**
|
|
2296
|
-
* Deburrs `string` by converting
|
|
2297
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2298
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2299
|
-
* letters to basic Latin letters and removing
|
|
2300
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2301
|
-
*
|
|
2302
|
-
* @static
|
|
2303
|
-
* @memberOf _
|
|
2304
|
-
* @since 3.0.0
|
|
2305
|
-
* @category String
|
|
2306
|
-
* @param {string} [string=''] The string to deburr.
|
|
2307
|
-
* @returns {string} Returns the deburred string.
|
|
2308
|
-
* @example
|
|
2309
|
-
*
|
|
2310
|
-
* _.deburr('déjà vu');
|
|
2311
|
-
* // => 'deja vu'
|
|
2312
|
-
*/
|
|
2313
|
-
function deburr(string) {
|
|
2314
|
-
string = toString_1(string);
|
|
2315
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
var deburr_1 = deburr;
|
|
2319
|
-
|
|
2320
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2321
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2322
|
-
|
|
2323
|
-
/**
|
|
2324
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2325
|
-
*
|
|
2326
|
-
* @private
|
|
2327
|
-
* @param {string} The string to inspect.
|
|
2328
|
-
* @returns {Array} Returns the words of `string`.
|
|
2329
|
-
*/
|
|
2330
|
-
function asciiWords(string) {
|
|
2331
|
-
return string.match(reAsciiWord) || [];
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
|
-
var _asciiWords = asciiWords;
|
|
2335
|
-
|
|
2336
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2337
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
2338
|
-
|
|
2339
|
-
/**
|
|
2340
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2341
|
-
*
|
|
2342
|
-
* @private
|
|
2343
|
-
* @param {string} string The string to inspect.
|
|
2344
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2345
|
-
*/
|
|
2346
|
-
function hasUnicodeWord(string) {
|
|
2347
|
-
return reHasUnicodeWord.test(string);
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2351
|
-
|
|
2352
|
-
/** Used to compose unicode character classes. */
|
|
2353
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
2354
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
2355
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
2356
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
2357
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
2358
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2359
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2360
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2361
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2362
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2363
|
-
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
2364
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2365
|
-
rsVarRange = '\\ufe0e\\ufe0f',
|
|
2366
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2367
|
-
|
|
2368
|
-
/** Used to compose unicode capture groups. */
|
|
2369
|
-
var rsApos$1 = "['\u2019]",
|
|
2370
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2371
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
2372
|
-
rsDigits = '\\d+',
|
|
2373
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2374
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2375
|
-
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2376
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
2377
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
2378
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
2379
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2380
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2381
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2382
|
-
rsZWJ = '\\u200d';
|
|
2383
|
-
|
|
2384
|
-
/** Used to compose unicode regexes. */
|
|
2385
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2386
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2387
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2388
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2389
|
-
reOptMod = rsModifier + '?',
|
|
2390
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
2391
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
2392
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2393
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2394
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
2395
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
|
2396
|
-
|
|
2397
|
-
/** Used to match complex or compound words. */
|
|
2398
|
-
var reUnicodeWord = RegExp([
|
|
2399
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2400
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2401
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2402
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2403
|
-
rsOrdUpper,
|
|
2404
|
-
rsOrdLower,
|
|
2405
|
-
rsDigits,
|
|
2406
|
-
rsEmoji
|
|
2407
|
-
].join('|'), 'g');
|
|
2408
|
-
|
|
2409
|
-
/**
|
|
2410
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2411
|
-
*
|
|
2412
|
-
* @private
|
|
2413
|
-
* @param {string} The string to inspect.
|
|
2414
|
-
* @returns {Array} Returns the words of `string`.
|
|
2415
|
-
*/
|
|
2416
|
-
function unicodeWords(string) {
|
|
2417
|
-
return string.match(reUnicodeWord) || [];
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
|
-
var _unicodeWords = unicodeWords;
|
|
2421
|
-
|
|
2422
|
-
/**
|
|
2423
|
-
* Splits `string` into an array of its words.
|
|
2424
|
-
*
|
|
2425
|
-
* @static
|
|
2426
|
-
* @memberOf _
|
|
2427
|
-
* @since 3.0.0
|
|
2428
|
-
* @category String
|
|
2429
|
-
* @param {string} [string=''] The string to inspect.
|
|
2430
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2431
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2432
|
-
* @returns {Array} Returns the words of `string`.
|
|
2433
|
-
* @example
|
|
2434
|
-
*
|
|
2435
|
-
* _.words('fred, barney, & pebbles');
|
|
2436
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2437
|
-
*
|
|
2438
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2439
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2440
|
-
*/
|
|
2441
|
-
function words(string, pattern, guard) {
|
|
2442
|
-
string = toString_1(string);
|
|
2443
|
-
pattern = guard ? undefined : pattern;
|
|
2444
|
-
|
|
2445
|
-
if (pattern === undefined) {
|
|
2446
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2447
|
-
}
|
|
2448
|
-
return string.match(pattern) || [];
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
var words_1 = words;
|
|
2452
|
-
|
|
2453
|
-
/** Used to compose unicode capture groups. */
|
|
2454
|
-
var rsApos = "['\u2019]";
|
|
2455
|
-
|
|
2456
|
-
/** Used to match apostrophes. */
|
|
2457
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2458
|
-
|
|
2459
|
-
/**
|
|
2460
|
-
* Creates a function like `_.camelCase`.
|
|
2461
|
-
*
|
|
2462
|
-
* @private
|
|
2463
|
-
* @param {Function} callback The function to combine each word.
|
|
2464
|
-
* @returns {Function} Returns the new compounder function.
|
|
2465
|
-
*/
|
|
2466
|
-
function createCompounder(callback) {
|
|
2467
|
-
return function(string) {
|
|
2468
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2469
|
-
};
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
var _createCompounder = createCompounder;
|
|
2473
|
-
|
|
2474
|
-
/**
|
|
2475
|
-
* Converts `string`, as space separated words, to upper case.
|
|
2476
|
-
*
|
|
2477
|
-
* @static
|
|
2478
|
-
* @memberOf _
|
|
2479
|
-
* @since 4.0.0
|
|
2480
|
-
* @category String
|
|
2481
|
-
* @param {string} [string=''] The string to convert.
|
|
2482
|
-
* @returns {string} Returns the upper cased string.
|
|
2483
|
-
* @example
|
|
2484
|
-
*
|
|
2485
|
-
* _.upperCase('--foo-bar');
|
|
2486
|
-
* // => 'FOO BAR'
|
|
2487
|
-
*
|
|
2488
|
-
* _.upperCase('fooBar');
|
|
2489
|
-
* // => 'FOO BAR'
|
|
2490
|
-
*
|
|
2491
|
-
* _.upperCase('__foo_bar__');
|
|
2492
|
-
* // => 'FOO BAR'
|
|
2493
|
-
*/
|
|
2494
|
-
var upperCase = _createCompounder(function(result, word, index) {
|
|
2495
|
-
return result + (index ? ' ' : '') + word.toUpperCase();
|
|
2496
|
-
});
|
|
2497
|
-
|
|
2498
|
-
var upperCase_1 = upperCase;
|
|
2499
|
-
|
|
2500
|
-
/**
|
|
2501
|
-
* Converts `string`, as space separated words, to lower case.
|
|
2502
|
-
*
|
|
2503
|
-
* @static
|
|
2504
|
-
* @memberOf _
|
|
2505
|
-
* @since 4.0.0
|
|
2506
|
-
* @category String
|
|
2507
|
-
* @param {string} [string=''] The string to convert.
|
|
2508
|
-
* @returns {string} Returns the lower cased string.
|
|
2509
|
-
* @example
|
|
2510
|
-
*
|
|
2511
|
-
* _.lowerCase('--Foo-Bar--');
|
|
2512
|
-
* // => 'foo bar'
|
|
2513
|
-
*
|
|
2514
|
-
* _.lowerCase('fooBar');
|
|
2515
|
-
* // => 'foo bar'
|
|
2516
|
-
*
|
|
2517
|
-
* _.lowerCase('__FOO_BAR__');
|
|
2518
|
-
* // => 'foo bar'
|
|
2519
|
-
*/
|
|
2520
|
-
var lowerCase = _createCompounder(function(result, word, index) {
|
|
2521
|
-
return result + (index ? ' ' : '') + word.toLowerCase();
|
|
2522
|
-
});
|
|
2523
|
-
|
|
2524
|
-
var lowerCase_1 = lowerCase;
|
|
2525
|
-
|
|
2526
48
|
function truncate() {
|
|
2527
49
|
var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
2528
50
|
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
@@ -2549,7 +71,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2549
71
|
var localizedMonth = month;
|
|
2550
72
|
|
|
2551
73
|
if (isUpperCase) {
|
|
2552
|
-
localizedMonth =
|
|
74
|
+
localizedMonth = lodash.upperCase(month);
|
|
2553
75
|
}
|
|
2554
76
|
|
|
2555
77
|
var year = dateTime.getFullYear();
|
|
@@ -2562,7 +84,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2562
84
|
var timetoShow;
|
|
2563
85
|
|
|
2564
86
|
if (localizedMonths) {
|
|
2565
|
-
localizedMonth =
|
|
87
|
+
localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
|
|
2566
88
|
}
|
|
2567
89
|
|
|
2568
90
|
if (localizedMeridiem) {
|
|
@@ -2592,17 +114,17 @@ function formatter(value, unit, suffix, date, config) {
|
|
|
2592
114
|
var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
|
|
2593
115
|
// unit here refers to seconds, minute, minutes,...
|
|
2594
116
|
|
|
2595
|
-
var localizedSuffix =
|
|
117
|
+
var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
|
|
2596
118
|
var localizedUnitOfTime;
|
|
2597
119
|
|
|
2598
120
|
if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
|
|
2599
121
|
return timestampToFormat(value, unit, suffix, date, config);
|
|
2600
122
|
} else if (value > 1) {
|
|
2601
|
-
localizedUnitOfTime =
|
|
123
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
|
|
2602
124
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
|
|
2603
125
|
}
|
|
2604
126
|
|
|
2605
|
-
localizedUnitOfTime =
|
|
127
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
|
|
2606
128
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
|
|
2607
129
|
}
|
|
2608
130
|
|
|
@@ -2655,10 +177,10 @@ var clientWidths = {
|
|
|
2655
177
|
tablet: 1024
|
|
2656
178
|
};
|
|
2657
179
|
var clientWidth = function clientWidth(device) {
|
|
2658
|
-
var foundDeviceWidth =
|
|
180
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2659
181
|
|
|
2660
182
|
if (foundDeviceWidth) {
|
|
2661
|
-
return
|
|
183
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2662
184
|
}
|
|
2663
185
|
|
|
2664
186
|
return false;
|
|
@@ -2688,7 +210,7 @@ var getSlug = function getSlug(collection) {
|
|
|
2688
210
|
var isSection = collection.template === "section";
|
|
2689
211
|
|
|
2690
212
|
if (isSection) {
|
|
2691
|
-
var sectionId =
|
|
213
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
2692
214
|
var sections = config.sections;
|
|
2693
215
|
var section = sections && sections.find(function (section) {
|
|
2694
216
|
return section.id === sectionId;
|
|
@@ -2704,25 +226,25 @@ function isExternalStory() {
|
|
|
2704
226
|
storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
|
|
2705
227
|
_story$metadata = story.metadata,
|
|
2706
228
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2707
|
-
return storyTemplate === "news-elsewhere" ?
|
|
229
|
+
return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
|
|
2708
230
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2709
231
|
var isEmpty = function isEmpty(value) {
|
|
2710
232
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2711
|
-
|
|
233
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2712
234
|
};
|
|
2713
|
-
|
|
2714
|
-
"sketches-host":
|
|
2715
|
-
"cdn-name":
|
|
2716
|
-
"cdn-image":
|
|
235
|
+
PropTypes__default["default"].shape({
|
|
236
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
237
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
238
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2717
239
|
});
|
|
2718
|
-
|
|
2719
|
-
headline:
|
|
2720
|
-
"last-published-at":
|
|
2721
|
-
subheadline:
|
|
240
|
+
PropTypes__default["default"].shape({
|
|
241
|
+
headline: PropTypes__default["default"].string,
|
|
242
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
243
|
+
subheadline: PropTypes__default["default"].string
|
|
2722
244
|
});
|
|
2723
245
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2724
246
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
2725
|
-
return
|
|
247
|
+
return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
|
|
2726
248
|
};
|
|
2727
249
|
var navigateTo = function navigateTo(dispatch) {
|
|
2728
250
|
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2762,17 +284,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2762
284
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2763
285
|
|
|
2764
286
|
if (timezone && template === "story") {
|
|
2765
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2766
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
287
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
288
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2767
289
|
timeZone: timezone
|
|
2768
290
|
});
|
|
2769
291
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2770
|
-
return /*#__PURE__*/
|
|
292
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2771
293
|
dateTime: formatZonedTime
|
|
2772
294
|
}, timeStamp);
|
|
2773
295
|
}
|
|
2774
296
|
|
|
2775
|
-
return /*#__PURE__*/
|
|
297
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2776
298
|
date: date,
|
|
2777
299
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2778
300
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2780,40 +302,6 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2780
302
|
});
|
|
2781
303
|
};
|
|
2782
304
|
|
|
2783
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2784
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2785
|
-
|
|
2786
|
-
if (_i == null) return;
|
|
2787
|
-
var _arr = [];
|
|
2788
|
-
var _n = true;
|
|
2789
|
-
var _d = false;
|
|
2790
|
-
|
|
2791
|
-
var _s, _e;
|
|
2792
|
-
|
|
2793
|
-
try {
|
|
2794
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2795
|
-
_arr.push(_s.value);
|
|
2796
|
-
|
|
2797
|
-
if (i && _arr.length === i) break;
|
|
2798
|
-
}
|
|
2799
|
-
} catch (err) {
|
|
2800
|
-
_d = true;
|
|
2801
|
-
_e = err;
|
|
2802
|
-
} finally {
|
|
2803
|
-
try {
|
|
2804
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
2805
|
-
} finally {
|
|
2806
|
-
if (_d) throw _e;
|
|
2807
|
-
}
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
|
-
return _arr;
|
|
2811
|
-
}
|
|
2812
|
-
|
|
2813
|
-
function _slicedToArray(arr, i) {
|
|
2814
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
2815
|
-
}
|
|
2816
|
-
|
|
2817
305
|
var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
2818
306
|
var _ref$width = _ref.width,
|
|
2819
307
|
width = _ref$width === void 0 ? 40 : _ref$width,
|
|
@@ -2821,27 +309,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2821
309
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
2822
310
|
_ref$iconColor = _ref.iconColor,
|
|
2823
311
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
2824
|
-
return /*#__PURE__*/
|
|
312
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2825
313
|
width: width,
|
|
2826
314
|
height: height,
|
|
2827
315
|
viewBox: "0 0 102 76",
|
|
2828
316
|
version: "1.1"
|
|
2829
|
-
}, /*#__PURE__*/
|
|
317
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2830
318
|
id: "demo-home-copy",
|
|
2831
319
|
stroke: "none",
|
|
2832
320
|
strokeWidth: "1",
|
|
2833
321
|
fill: "none",
|
|
2834
322
|
fillRule: "evenodd",
|
|
2835
323
|
transform: "translate(-377.000000, -314.000000)"
|
|
2836
|
-
}, /*#__PURE__*/
|
|
324
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2837
325
|
id: "Group-13",
|
|
2838
326
|
transform: "translate(377.000000, 314.000000)"
|
|
2839
|
-
}, /*#__PURE__*/
|
|
327
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2840
328
|
d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
|
|
2841
329
|
id: "Combined-Shape",
|
|
2842
330
|
fill: iconColor,
|
|
2843
331
|
fillRule: "nonzero"
|
|
2844
|
-
}), /*#__PURE__*/
|
|
332
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2845
333
|
id: "Rectangle-19",
|
|
2846
334
|
stroke: iconColor,
|
|
2847
335
|
strokeWidth: "3",
|
|
@@ -2853,24 +341,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2853
341
|
}))));
|
|
2854
342
|
};
|
|
2855
343
|
ImageFallbackIcon.propTypes = {
|
|
2856
|
-
width:
|
|
2857
|
-
height:
|
|
2858
|
-
iconColor:
|
|
344
|
+
width: PropTypes__default["default"].object,
|
|
345
|
+
height: PropTypes__default["default"].object,
|
|
346
|
+
iconColor: PropTypes__default["default"].object
|
|
2859
347
|
};
|
|
2860
348
|
|
|
2861
349
|
var imageFallback = function imageFallback() {
|
|
2862
|
-
return /*#__PURE__*/
|
|
350
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2863
351
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
2864
|
-
}, /*#__PURE__*/
|
|
352
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2865
353
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
2866
|
-
}, /*#__PURE__*/
|
|
354
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
2867
355
|
};
|
|
2868
356
|
|
|
2869
357
|
var FallbackImage = function FallbackImage(_ref) {
|
|
2870
358
|
var slug = _ref.slug;
|
|
2871
359
|
|
|
2872
360
|
if (slug) {
|
|
2873
|
-
return /*#__PURE__*/
|
|
361
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2874
362
|
href: slug,
|
|
2875
363
|
"aria-label": "image-fallback"
|
|
2876
364
|
}, imageFallback());
|
|
@@ -2879,23 +367,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
2879
367
|
}
|
|
2880
368
|
};
|
|
2881
369
|
FallbackImage.propTypes = {
|
|
2882
|
-
slug:
|
|
370
|
+
slug: PropTypes__default["default"].string
|
|
2883
371
|
};
|
|
2884
372
|
|
|
2885
373
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
2886
|
-
return /*#__PURE__*/
|
|
374
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2887
375
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2888
376
|
width: "36",
|
|
2889
377
|
height: "28"
|
|
2890
|
-
}, /*#__PURE__*/
|
|
378
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2891
379
|
fill: "none",
|
|
2892
380
|
fillRule: "evenodd"
|
|
2893
|
-
}, /*#__PURE__*/
|
|
381
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2894
382
|
width: "36",
|
|
2895
383
|
height: "28",
|
|
2896
384
|
fill: "#3D6FCF",
|
|
2897
385
|
rx: "4"
|
|
2898
|
-
}), /*#__PURE__*/
|
|
386
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2899
387
|
stroke: "#FFF",
|
|
2900
388
|
strokeLinecap: "round",
|
|
2901
389
|
strokeLinejoin: "round",
|
|
@@ -2908,16 +396,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
2908
396
|
var _ref$hyperLink = _ref.hyperLink,
|
|
2909
397
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
2910
398
|
if (!hyperLink) return null;
|
|
2911
|
-
return /*#__PURE__*/
|
|
399
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2912
400
|
href: hyperLink,
|
|
2913
401
|
"aria-label": "hyperlink-button",
|
|
2914
402
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
2915
403
|
target: "_blank",
|
|
2916
404
|
rel: "noopener noreferrer"
|
|
2917
|
-
}, /*#__PURE__*/
|
|
405
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
2918
406
|
};
|
|
2919
407
|
HyperLink.propTypes = {
|
|
2920
|
-
hyperLink:
|
|
408
|
+
hyperLink: PropTypes__default["default"].string
|
|
2921
409
|
};
|
|
2922
410
|
|
|
2923
411
|
var _styleModuleImportMap$e = {
|
|
@@ -2953,8 +441,8 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2953
441
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
2954
442
|
return null;
|
|
2955
443
|
} : _config$StoryTemplate;
|
|
2956
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
2957
|
-
return
|
|
444
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
445
|
+
return lodash.get(state, ["qt", "config", "showPlaceholder"]);
|
|
2958
446
|
});
|
|
2959
447
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
2960
448
|
var fullBleed = FullBleed ? "" : "with-padding";
|
|
@@ -2963,7 +451,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2963
451
|
var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
|
|
2964
452
|
|
|
2965
453
|
var getPadding = function getPadding(aspectRatio) {
|
|
2966
|
-
var _aspectRatio =
|
|
454
|
+
var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
|
|
2967
455
|
height = _aspectRatio[0],
|
|
2968
456
|
width = _aspectRatio[1];
|
|
2969
457
|
|
|
@@ -2975,7 +463,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2975
463
|
return 0;
|
|
2976
464
|
};
|
|
2977
465
|
|
|
2978
|
-
var _aspectRatio2 =
|
|
466
|
+
var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
|
|
2979
467
|
mobileAspectRatio = _aspectRatio2[0],
|
|
2980
468
|
_aspectRatio2$ = _aspectRatio2[1],
|
|
2981
469
|
desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
|
|
@@ -2983,43 +471,43 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2983
471
|
var isMobile = clientWidth("mobile");
|
|
2984
472
|
var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
|
|
2985
473
|
var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
|
|
2986
|
-
var slug =
|
|
2987
|
-
var hyperLink =
|
|
474
|
+
var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
|
|
475
|
+
var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
|
|
2988
476
|
|
|
2989
477
|
var fallbackImage = function fallbackImage() {
|
|
2990
478
|
if (!slug) {
|
|
2991
479
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
2992
|
-
return /*#__PURE__*/
|
|
480
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2993
481
|
style: {
|
|
2994
482
|
paddingTop: imagePadding + "%"
|
|
2995
483
|
},
|
|
2996
|
-
className: "arr--responsive-hero-image " +
|
|
2997
|
-
}, /*#__PURE__*/
|
|
484
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$e)
|
|
485
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2998
486
|
className: "qt-image",
|
|
2999
487
|
"data-src": "".concat(fallbackImageUrl),
|
|
3000
488
|
alt: "image-fallback"
|
|
3001
489
|
}));
|
|
3002
490
|
}
|
|
3003
491
|
|
|
3004
|
-
return /*#__PURE__*/
|
|
492
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3005
493
|
"data-test-id": "arr--fallback-hero-image",
|
|
3006
494
|
style: {
|
|
3007
495
|
paddingTop: imagePadding + "%"
|
|
3008
496
|
},
|
|
3009
|
-
className: "arr--fallback-hero-image " +
|
|
3010
|
-
}, /*#__PURE__*/
|
|
497
|
+
className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$e)
|
|
498
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3011
499
|
storyTemplate: story["story-template"]
|
|
3012
|
-
}), /*#__PURE__*/
|
|
500
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3013
501
|
}
|
|
3014
502
|
|
|
3015
|
-
return /*#__PURE__*/
|
|
503
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3016
504
|
style: {
|
|
3017
505
|
paddingTop: imagePadding + "%"
|
|
3018
506
|
},
|
|
3019
|
-
className: "arr--responsive-hero-image " +
|
|
3020
|
-
}, /*#__PURE__*/
|
|
507
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$e)
|
|
508
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3021
509
|
storyTemplate: story["story-template"]
|
|
3022
|
-
}), /*#__PURE__*/
|
|
510
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3023
511
|
story: story,
|
|
3024
512
|
aspectRatio: imageAspectRatio,
|
|
3025
513
|
defaultWidth: defaultWidth,
|
|
@@ -3028,48 +516,48 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3028
516
|
auto: ["format", "compress"],
|
|
3029
517
|
fit: "max"
|
|
3030
518
|
}
|
|
3031
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
519
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3032
520
|
hyperLink: hyperLink
|
|
3033
521
|
}));
|
|
3034
522
|
};
|
|
3035
523
|
|
|
3036
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
524
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3037
525
|
"data-test-id": "arr--hero-image",
|
|
3038
|
-
className: "arr--hero-image " +
|
|
3039
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
526
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$e)
|
|
527
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3040
528
|
"data-test-id": "arr--hero-image",
|
|
3041
529
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3042
530
|
externalLink: isExternalStory(story),
|
|
3043
531
|
"aria-label": "fallback-hero-image",
|
|
3044
|
-
className: "arr--hero-image " +
|
|
532
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$e)
|
|
3045
533
|
}, fallbackImage()));
|
|
3046
534
|
};
|
|
3047
535
|
HeroImage.propTypes = {
|
|
3048
536
|
/** The Story Object from the API response */
|
|
3049
|
-
story:
|
|
537
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3050
538
|
|
|
3051
539
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3052
|
-
FullBleed:
|
|
540
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3053
541
|
|
|
3054
542
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3055
|
-
defaultWidth:
|
|
543
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3056
544
|
|
|
3057
545
|
/** The list of available widths */
|
|
3058
|
-
widths:
|
|
546
|
+
widths: PropTypes__default["default"].array,
|
|
3059
547
|
// fatch the correct hero image
|
|
3060
|
-
aspectRatio:
|
|
548
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3061
549
|
// Hints for the browser to choose the best size
|
|
3062
550
|
|
|
3063
551
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3064
|
-
isHorizontal:
|
|
552
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3065
553
|
|
|
3066
554
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3067
|
-
isHorizontalMobile:
|
|
555
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3068
556
|
// this prop is responsive for rendering fallback image on story page
|
|
3069
|
-
defaultFallback:
|
|
3070
|
-
isHorizontalWithImageLast:
|
|
3071
|
-
isStoryPageImage:
|
|
3072
|
-
config:
|
|
557
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
558
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
559
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
560
|
+
config: PropTypes__default["default"].object
|
|
3073
561
|
};
|
|
3074
562
|
HeroImage.defaultProps = {
|
|
3075
563
|
FullBleed: true,
|
|
@@ -3109,7 +597,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3109
597
|
_ref$navigate = _ref.navigate,
|
|
3110
598
|
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
3111
599
|
var collectionTitle = useStateValue() || {};
|
|
3112
|
-
var showRowTitle =
|
|
600
|
+
var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
|
|
3113
601
|
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
3114
602
|
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
3115
603
|
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
@@ -3120,7 +608,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3120
608
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
3121
609
|
|
|
3122
610
|
var borderBottomStyle = function borderBottomStyle() {
|
|
3123
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
611
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3124
612
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
3125
613
|
style: {
|
|
3126
614
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -3180,40 +668,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3180
668
|
}
|
|
3181
669
|
};
|
|
3182
670
|
|
|
3183
|
-
return /*#__PURE__*/
|
|
671
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3184
672
|
style: {
|
|
3185
673
|
borderBottom: borderBottomFullStyle
|
|
3186
674
|
},
|
|
3187
675
|
"data-test-id": "collection-name",
|
|
3188
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") +
|
|
3189
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
676
|
+
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$d)
|
|
677
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3190
678
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
3191
679
|
style: {
|
|
3192
680
|
color: CollectionNameBorderColor,
|
|
3193
681
|
fontSize: getBorderHeight()
|
|
3194
682
|
}
|
|
3195
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
683
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3196
684
|
href: slug,
|
|
3197
685
|
"aria-label": "collection-name"
|
|
3198
|
-
}, /*#__PURE__*/
|
|
686
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
3199
687
|
};
|
|
3200
688
|
CollectionNameBase.propTypes = {
|
|
3201
689
|
/** Collection name border color */
|
|
3202
|
-
collectionNameBorderColor: PropTypes
|
|
690
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
3203
691
|
|
|
3204
692
|
/** The Collection Object from the API response */
|
|
3205
|
-
collection: PropTypes
|
|
693
|
+
collection: PropTypes.PropTypes.object,
|
|
3206
694
|
|
|
3207
695
|
/** The publisher config from the API response */
|
|
3208
|
-
config: PropTypes
|
|
696
|
+
config: PropTypes.PropTypes.object,
|
|
3209
697
|
|
|
3210
698
|
/** The style template for the component */
|
|
3211
|
-
collectionNameTemplate: PropTypes
|
|
699
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
3212
700
|
|
|
3213
701
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3214
|
-
headerLevel: PropTypes
|
|
3215
|
-
customCollectionName: PropTypes
|
|
3216
|
-
navigate: PropTypes
|
|
702
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
703
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
704
|
+
navigate: PropTypes.PropTypes.bool
|
|
3217
705
|
};
|
|
3218
706
|
CollectionNameBase.defaultProps = {
|
|
3219
707
|
collectionNameTemplate: "",
|
|
@@ -3222,11 +710,11 @@ CollectionNameBase.defaultProps = {
|
|
|
3222
710
|
|
|
3223
711
|
function mapStateToProps$1(state) {
|
|
3224
712
|
return {
|
|
3225
|
-
config:
|
|
713
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3226
714
|
};
|
|
3227
715
|
}
|
|
3228
716
|
|
|
3229
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
717
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
3230
718
|
|
|
3231
719
|
var CrownIcon = function CrownIcon(_ref) {
|
|
3232
720
|
var height = _ref.height,
|
|
@@ -3234,7 +722,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3234
722
|
_ref$color = _ref.color,
|
|
3235
723
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3236
724
|
positionTop = _ref.positionTop;
|
|
3237
|
-
return /*#__PURE__*/
|
|
725
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3238
726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3239
727
|
width: width,
|
|
3240
728
|
height: height,
|
|
@@ -3243,28 +731,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3243
731
|
position: "relative",
|
|
3244
732
|
top: positionTop
|
|
3245
733
|
}
|
|
3246
|
-
}, /*#__PURE__*/
|
|
734
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3247
735
|
fill: "none",
|
|
3248
736
|
fillRule: "evenodd",
|
|
3249
737
|
stroke: "none",
|
|
3250
738
|
strokeWidth: "1"
|
|
3251
|
-
}, /*#__PURE__*/
|
|
739
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3252
740
|
transform: "translate(8 8)"
|
|
3253
|
-
}, /*#__PURE__*/
|
|
741
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3254
742
|
d: "M0 0H24V24H0z"
|
|
3255
|
-
}), /*#__PURE__*/
|
|
743
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3256
744
|
fill: color,
|
|
3257
745
|
fillRule: "nonzero",
|
|
3258
746
|
transform: "translate(0 2)"
|
|
3259
|
-
}, /*#__PURE__*/
|
|
747
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3260
748
|
d: "M21.043 19.553c0-.743-.601-1.344-1.344-1.344h-15.4a1.343 1.343 0 100 2.688h15.4c.743 0 1.344-.603 1.344-1.344zM1.598 8.673c.022 0 .042 0 .064-.003l2.131 7.713h16.411l2.132-7.713c.022 0 .041.003.063.003a1.599 1.599 0 10-1.52-1.108L17.025 9.82 12.882 2.95a1.599 1.599 0 10-1.765 0L6.976 9.82 3.121 7.565a1.599 1.599 0 10-1.523 1.107z"
|
|
3261
749
|
}))))));
|
|
3262
750
|
};
|
|
3263
751
|
CrownIcon.propTypes = {
|
|
3264
|
-
height:
|
|
3265
|
-
width:
|
|
3266
|
-
color:
|
|
3267
|
-
positionTop:
|
|
752
|
+
height: PropTypes__default["default"].string,
|
|
753
|
+
width: PropTypes__default["default"].string,
|
|
754
|
+
color: PropTypes__default["default"].string,
|
|
755
|
+
positionTop: PropTypes__default["default"].string
|
|
3268
756
|
};
|
|
3269
757
|
|
|
3270
758
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3273,7 +761,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3273
761
|
_ref$color = _ref.color,
|
|
3274
762
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3275
763
|
positionTop = _ref.positionTop;
|
|
3276
|
-
return /*#__PURE__*/
|
|
764
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3277
765
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3278
766
|
width: width,
|
|
3279
767
|
height: height,
|
|
@@ -3282,16 +770,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3282
770
|
position: "relative",
|
|
3283
771
|
top: positionTop
|
|
3284
772
|
}
|
|
3285
|
-
}, /*#__PURE__*/
|
|
773
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3286
774
|
fill: "none",
|
|
3287
775
|
fillRule: "evenodd",
|
|
3288
776
|
stroke: "none",
|
|
3289
777
|
strokeWidth: "1"
|
|
3290
|
-
}, /*#__PURE__*/
|
|
778
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3291
779
|
transform: "translate(8 8)"
|
|
3292
|
-
}, /*#__PURE__*/
|
|
780
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3293
781
|
d: "M0 0H24V24H0z"
|
|
3294
|
-
}), /*#__PURE__*/
|
|
782
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3295
783
|
fill: color,
|
|
3296
784
|
fillRule: "nonzero",
|
|
3297
785
|
d: "M12.71 4.364A6.54 6.54 0 000 6.545a6.54 6.54 0 0012.71 2.182h4.745v4.364h4.363V8.727H24V4.364H12.71zM6.544 8.727a2.181 2.181 0 110-4.362 2.181 2.181 0 010 4.362z",
|
|
@@ -3299,10 +787,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3299
787
|
})))));
|
|
3300
788
|
};
|
|
3301
789
|
KeyIcon.propTypes = {
|
|
3302
|
-
height:
|
|
3303
|
-
width:
|
|
3304
|
-
color:
|
|
3305
|
-
positionTop:
|
|
790
|
+
height: PropTypes__default["default"].string,
|
|
791
|
+
width: PropTypes__default["default"].string,
|
|
792
|
+
color: PropTypes__default["default"].string,
|
|
793
|
+
positionTop: PropTypes__default["default"].string
|
|
3306
794
|
};
|
|
3307
795
|
|
|
3308
796
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3311,7 +799,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3311
799
|
_ref$color = _ref.color,
|
|
3312
800
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3313
801
|
positionTop = _ref.positionTop;
|
|
3314
|
-
return /*#__PURE__*/
|
|
802
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3315
803
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3316
804
|
width: width,
|
|
3317
805
|
height: height,
|
|
@@ -3320,28 +808,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3320
808
|
position: "relative",
|
|
3321
809
|
top: positionTop
|
|
3322
810
|
}
|
|
3323
|
-
}, /*#__PURE__*/
|
|
811
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3324
812
|
fill: "none",
|
|
3325
813
|
fillRule: "evenodd",
|
|
3326
814
|
stroke: "none",
|
|
3327
815
|
strokeWidth: "1"
|
|
3328
|
-
}, /*#__PURE__*/
|
|
816
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3329
817
|
transform: "translate(8 8)"
|
|
3330
|
-
}, /*#__PURE__*/
|
|
818
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3331
819
|
d: "M0 0H24V24H0z"
|
|
3332
|
-
}), /*#__PURE__*/
|
|
820
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3333
821
|
fill: color,
|
|
3334
822
|
fillRule: "nonzero",
|
|
3335
823
|
transform: "translate(3)"
|
|
3336
|
-
}, /*#__PURE__*/
|
|
824
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3337
825
|
d: "M15.692 9h-.747V6c0-3.31-2.681-6-5.978-6C5.67 0 2.989 2.69 2.989 6v3h-.747A2.249 2.249 0 000 11.25v10.5A2.249 2.249 0 002.242 24h13.45a2.249 2.249 0 002.242-2.25v-10.5A2.249 2.249 0 0015.692 9zM4.982 6c0-2.206 1.787-4 3.985-4s3.985 1.794 3.985 4v3h-7.97V6z"
|
|
3338
826
|
}))))));
|
|
3339
827
|
};
|
|
3340
828
|
LockIcon.propTypes = {
|
|
3341
|
-
height:
|
|
3342
|
-
width:
|
|
3343
|
-
color:
|
|
3344
|
-
positionTop:
|
|
829
|
+
height: PropTypes__default["default"].string,
|
|
830
|
+
width: PropTypes__default["default"].string,
|
|
831
|
+
color: PropTypes__default["default"].string,
|
|
832
|
+
positionTop: PropTypes__default["default"].string
|
|
3345
833
|
};
|
|
3346
834
|
|
|
3347
835
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3351,7 +839,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3351
839
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3352
840
|
_ref$positionTop = _ref.positionTop,
|
|
3353
841
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3354
|
-
return /*#__PURE__*/
|
|
842
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3355
843
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3356
844
|
width: width,
|
|
3357
845
|
height: height,
|
|
@@ -3360,21 +848,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3360
848
|
position: "relative",
|
|
3361
849
|
top: positionTop
|
|
3362
850
|
}
|
|
3363
|
-
}, /*#__PURE__*/
|
|
851
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3364
852
|
fill: "none",
|
|
3365
853
|
fillRule: "evenodd",
|
|
3366
854
|
stroke: "none",
|
|
3367
855
|
strokeWidth: "1"
|
|
3368
|
-
}, /*#__PURE__*/
|
|
856
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3369
857
|
fill: color,
|
|
3370
858
|
d: "M20 26L12.946577 29.7082039 14.2936609 21.854102 8.5873218 16.2917961 16.4732885 15.145898 20 8 23.5267115 15.145898 31.4126782 16.2917961 25.7063391 21.854102 27.053423 29.7082039z"
|
|
3371
859
|
}))));
|
|
3372
860
|
};
|
|
3373
861
|
StarIcon.propTypes = {
|
|
3374
|
-
height:
|
|
3375
|
-
width:
|
|
3376
|
-
color:
|
|
3377
|
-
positionTop:
|
|
862
|
+
height: PropTypes__default["default"].string,
|
|
863
|
+
width: PropTypes__default["default"].string,
|
|
864
|
+
color: PropTypes__default["default"].string,
|
|
865
|
+
positionTop: PropTypes__default["default"].string
|
|
3378
866
|
};
|
|
3379
867
|
|
|
3380
868
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3386,7 +874,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3386
874
|
|
|
3387
875
|
switch (iconType) {
|
|
3388
876
|
case "crown":
|
|
3389
|
-
return /*#__PURE__*/
|
|
877
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3390
878
|
width: width,
|
|
3391
879
|
height: height,
|
|
3392
880
|
color: color,
|
|
@@ -3394,7 +882,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3394
882
|
});
|
|
3395
883
|
|
|
3396
884
|
case "lock":
|
|
3397
|
-
return /*#__PURE__*/
|
|
885
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3398
886
|
width: width,
|
|
3399
887
|
height: height,
|
|
3400
888
|
color: color,
|
|
@@ -3402,7 +890,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3402
890
|
});
|
|
3403
891
|
|
|
3404
892
|
case "key":
|
|
3405
|
-
return /*#__PURE__*/
|
|
893
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3406
894
|
width: width,
|
|
3407
895
|
height: height,
|
|
3408
896
|
color: color,
|
|
@@ -3410,7 +898,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3410
898
|
});
|
|
3411
899
|
|
|
3412
900
|
default:
|
|
3413
|
-
return /*#__PURE__*/
|
|
901
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3414
902
|
width: width,
|
|
3415
903
|
height: height,
|
|
3416
904
|
color: color,
|
|
@@ -3419,21 +907,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3419
907
|
}
|
|
3420
908
|
};
|
|
3421
909
|
PremiumStoryIcon.propTypes = {
|
|
3422
|
-
width:
|
|
3423
|
-
height:
|
|
3424
|
-
color:
|
|
3425
|
-
iconType:
|
|
3426
|
-
positionTop:
|
|
910
|
+
width: PropTypes__default["default"].string,
|
|
911
|
+
height: PropTypes__default["default"].string,
|
|
912
|
+
color: PropTypes__default["default"].string,
|
|
913
|
+
iconType: PropTypes__default["default"].string,
|
|
914
|
+
positionTop: PropTypes__default["default"].string
|
|
3427
915
|
};
|
|
3428
916
|
|
|
3429
917
|
function LiveIcon() {
|
|
3430
|
-
return /*#__PURE__*/
|
|
918
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3431
919
|
className: "live-icon",
|
|
3432
920
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3433
921
|
width: "25",
|
|
3434
922
|
height: "24",
|
|
3435
923
|
viewBox: "0 0 25 24"
|
|
3436
|
-
}, /*#__PURE__*/
|
|
924
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3437
925
|
fill: "#ff5858",
|
|
3438
926
|
d: "M12 18a6 6 0 110-12 6 6 0 010 12zm0 2.5a8.5 8.5 0 110-17 8.5 8.5 0 010 17zm0-1a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"
|
|
3439
927
|
}));
|
|
@@ -3462,8 +950,8 @@ var Headline = function Headline(_ref) {
|
|
|
3462
950
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
|
|
3463
951
|
_premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
|
|
3464
952
|
showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
|
|
3465
|
-
var alternateHeadline =
|
|
3466
|
-
var premiumStory = enablePremiumStoryIcon &&
|
|
953
|
+
var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
|
|
954
|
+
var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
|
|
3467
955
|
var headline = alternateHeadline || story.headline;
|
|
3468
956
|
var HeaderTag = "h" + headerLevel;
|
|
3469
957
|
|
|
@@ -3489,38 +977,38 @@ var Headline = function Headline(_ref) {
|
|
|
3489
977
|
var textColor = getTextColor(configData.theme);
|
|
3490
978
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3491
979
|
var iconSize = "24px";
|
|
3492
|
-
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !
|
|
3493
|
-
return /*#__PURE__*/
|
|
980
|
+
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
|
|
981
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3494
982
|
"data-test-id": "headline",
|
|
3495
|
-
className: "arrow-component arr--headline " +
|
|
3496
|
-
}, premiumStory && /*#__PURE__*/
|
|
983
|
+
className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$c)
|
|
984
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3497
985
|
width: iconSize,
|
|
3498
986
|
height: iconSize,
|
|
3499
987
|
color: iconColor,
|
|
3500
988
|
iconType: iconStyle,
|
|
3501
989
|
positionTop: positionHeadline()
|
|
3502
|
-
}), isLink ? /*#__PURE__*/
|
|
990
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3503
991
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3504
992
|
externalLink: isExternalStory(story),
|
|
3505
993
|
"aria-label": "headline"
|
|
3506
|
-
}, /*#__PURE__*/
|
|
3507
|
-
className:
|
|
3508
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3509
|
-
className:
|
|
3510
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
994
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
995
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
996
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
997
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
998
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3511
999
|
};
|
|
3512
1000
|
Headline.propTypes = {
|
|
3513
1001
|
/** The Story Object from the API response */
|
|
3514
|
-
story:
|
|
1002
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3515
1003
|
|
|
3516
1004
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3517
|
-
headerLevel:
|
|
3518
|
-
premiumStoryIconConfig:
|
|
3519
|
-
iconColor:
|
|
3520
|
-
iconType:
|
|
3521
|
-
enablePremiumStoryIcon:
|
|
1005
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1006
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
1007
|
+
iconColor: PropTypes__default["default"].string,
|
|
1008
|
+
iconType: PropTypes__default["default"].string,
|
|
1009
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3522
1010
|
}),
|
|
3523
|
-
isLink:
|
|
1011
|
+
isLink: PropTypes__default["default"].bool
|
|
3524
1012
|
};
|
|
3525
1013
|
Headline.defaultProps = {
|
|
3526
1014
|
headerLevel: "6",
|
|
@@ -3547,9 +1035,9 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3547
1035
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
|
|
3548
1036
|
isLightTheme = _ref.isLightTheme;
|
|
3549
1037
|
var config = useStateValue() || {};
|
|
3550
|
-
var isSection =
|
|
3551
|
-
var templateFromRowContext =
|
|
3552
|
-
var section =
|
|
1038
|
+
var isSection = lodash.get(config, ["showSection"], true);
|
|
1039
|
+
var templateFromRowContext = lodash.get(config, ["sectionTagTemplate"]);
|
|
1040
|
+
var section = lodash.get(story, ["sections", 0], "");
|
|
3553
1041
|
var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
|
|
3554
1042
|
var getUrl = section ? section["section-url"] : "/";
|
|
3555
1043
|
var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
|
|
@@ -3562,22 +1050,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3562
1050
|
}
|
|
3563
1051
|
|
|
3564
1052
|
if (!isSection) return null;
|
|
3565
|
-
return /*#__PURE__*/
|
|
1053
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3566
1054
|
href: getUrl,
|
|
3567
1055
|
className: "arrow-component arr--section-name",
|
|
3568
1056
|
"aria-label": "section-name"
|
|
3569
|
-
}, /*#__PURE__*/
|
|
1057
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3570
1058
|
"data-test-id": "sectionTag",
|
|
3571
1059
|
style: {
|
|
3572
1060
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3573
1061
|
},
|
|
3574
|
-
className: "section-tag arrow-component " +
|
|
3575
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
1062
|
+
className: "section-tag arrow-component " + _getClassName__default["default"]("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$b)
|
|
1063
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3576
1064
|
className: "section-m_border-left__2oUyp",
|
|
3577
1065
|
style: {
|
|
3578
1066
|
color: sectionTagBorderColor
|
|
3579
1067
|
}
|
|
3580
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
1068
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3581
1069
|
className: "section-m_border-bottom__3cRoD",
|
|
3582
1070
|
style: {
|
|
3583
1071
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -3586,13 +1074,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3586
1074
|
};
|
|
3587
1075
|
SectionTag.propTypes = {
|
|
3588
1076
|
/** The Story Object from the API response */
|
|
3589
|
-
story:
|
|
1077
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3590
1078
|
|
|
3591
1079
|
/** The style template for section tag */
|
|
3592
|
-
template:
|
|
3593
|
-
borderColor:
|
|
3594
|
-
solidBorderColor:
|
|
3595
|
-
isLightTheme:
|
|
1080
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
1081
|
+
borderColor: PropTypes__default["default"].string,
|
|
1082
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
1083
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3596
1084
|
};
|
|
3597
1085
|
SectionTag.defaultProps = {
|
|
3598
1086
|
template: "",
|
|
@@ -3614,22 +1102,22 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3614
1102
|
_ref$config = _ref.config,
|
|
3615
1103
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3616
1104
|
var configState = useStateValue() || {};
|
|
3617
|
-
var isTime =
|
|
1105
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
3618
1106
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3619
1107
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3620
1108
|
var textColor = getTextColor(configState.theme);
|
|
3621
|
-
return /*#__PURE__*/
|
|
1109
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3622
1110
|
"data-test-id": "publish-time",
|
|
3623
|
-
className: "time arr--publish-time " +
|
|
3624
|
-
}, /*#__PURE__*/
|
|
1111
|
+
className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$a)
|
|
1112
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3625
1113
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3626
1114
|
}, getTimeStamp(time, formatter, config))));
|
|
3627
1115
|
};
|
|
3628
1116
|
TimeStamp.propTypes = {
|
|
3629
1117
|
/** The Story Object from the API response */
|
|
3630
|
-
story:
|
|
3631
|
-
isBottom:
|
|
3632
|
-
config:
|
|
1118
|
+
story: PropTypes__default["default"].object,
|
|
1119
|
+
isBottom: PropTypes__default["default"].bool,
|
|
1120
|
+
config: PropTypes__default["default"].object
|
|
3633
1121
|
};
|
|
3634
1122
|
|
|
3635
1123
|
var _styleModuleImportMap$9 = {
|
|
@@ -3655,9 +1143,9 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3655
1143
|
_ref$config = _ref.config,
|
|
3656
1144
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3657
1145
|
var configData = useStateValue() || {};
|
|
3658
|
-
var isAuthor =
|
|
1146
|
+
var isAuthor = lodash.get(configData, ["showAuthor"], true);
|
|
3659
1147
|
|
|
3660
|
-
var _get =
|
|
1148
|
+
var _get = lodash.get(story, ["authors", "0"], ""),
|
|
3661
1149
|
avatarUrl = _get["avatar-url"],
|
|
3662
1150
|
avatarS3Key = _get["avatar-s3-key"],
|
|
3663
1151
|
authorName = _get.name,
|
|
@@ -3665,17 +1153,17 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3665
1153
|
|
|
3666
1154
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3667
1155
|
var textColor = getTextColor(configData.theme);
|
|
3668
|
-
var mountAt =
|
|
1156
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
3669
1157
|
|
|
3670
1158
|
var authorImage = function authorImage(dir) {
|
|
3671
1159
|
if (!avatarUrl && !avatarS3Key) {
|
|
3672
1160
|
return null;
|
|
3673
1161
|
}
|
|
3674
1162
|
|
|
3675
|
-
return /*#__PURE__*/
|
|
1163
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3676
1164
|
"data-test-id": "author-image",
|
|
3677
|
-
className:
|
|
3678
|
-
}, /*#__PURE__*/
|
|
1165
|
+
className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap$9)
|
|
1166
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3679
1167
|
slug: avatarS3Key,
|
|
3680
1168
|
"aspect-ratio": [1, 1],
|
|
3681
1169
|
defaultWidth: 400,
|
|
@@ -3683,49 +1171,49 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3683
1171
|
auto: ["format", "compress"]
|
|
3684
1172
|
},
|
|
3685
1173
|
alt: authorName
|
|
3686
|
-
}) : /*#__PURE__*/
|
|
1174
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3687
1175
|
src: avatarUrl
|
|
3688
1176
|
})));
|
|
3689
1177
|
};
|
|
3690
1178
|
|
|
3691
1179
|
var isPrefix = function isPrefix(dir) {
|
|
3692
1180
|
if (prefix) {
|
|
3693
|
-
return /*#__PURE__*/
|
|
3694
|
-
className: "arr-author-prefix " +
|
|
1181
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1182
|
+
className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap$9)
|
|
3695
1183
|
}, prefix);
|
|
3696
1184
|
}
|
|
3697
1185
|
|
|
3698
1186
|
return !hideAuthorImage && authorImage(dir);
|
|
3699
1187
|
};
|
|
3700
1188
|
|
|
3701
|
-
return /*#__PURE__*/
|
|
1189
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3702
1190
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3703
1191
|
"aria-label": "author-name",
|
|
3704
|
-
className: "author-name arr-author-name arrow-component " +
|
|
3705
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
1192
|
+
className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap$9)
|
|
1193
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3706
1194
|
"data-test-id": "author-name",
|
|
3707
|
-
className: "author-name " +
|
|
1195
|
+
className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap$9)
|
|
3708
1196
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
3709
1197
|
};
|
|
3710
1198
|
|
|
3711
1199
|
function mapStateToProps(state) {
|
|
3712
1200
|
return {
|
|
3713
|
-
config:
|
|
1201
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3714
1202
|
};
|
|
3715
1203
|
}
|
|
3716
1204
|
|
|
3717
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
1205
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3718
1206
|
AuthorBase.propTypes = {
|
|
3719
1207
|
/** The Story Object from the API response */
|
|
3720
|
-
story:
|
|
1208
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3721
1209
|
|
|
3722
1210
|
/** Hide Author Avatar Image */
|
|
3723
|
-
hideAuthorImage:
|
|
1211
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3724
1212
|
// fix Author bottom of the storyCard
|
|
3725
|
-
isBottom:
|
|
1213
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3726
1214
|
// fix prefix before the author name
|
|
3727
|
-
prefix:
|
|
3728
|
-
config:
|
|
1215
|
+
prefix: PropTypes__default["default"].string,
|
|
1216
|
+
config: PropTypes__default["default"].object
|
|
3729
1217
|
};
|
|
3730
1218
|
AuthorBase.defaultProps = {
|
|
3731
1219
|
hideAuthorImage: false,
|
|
@@ -3746,14 +1234,14 @@ var Dot = function Dot(_ref) {
|
|
|
3746
1234
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3747
1235
|
_ref$color = _ref.color,
|
|
3748
1236
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3749
|
-
return /*#__PURE__*/
|
|
3750
|
-
className:
|
|
3751
|
-
}, /*#__PURE__*/
|
|
1237
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1238
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$8)
|
|
1239
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3752
1240
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3753
1241
|
width: width,
|
|
3754
1242
|
height: height,
|
|
3755
1243
|
viewBox: "0 0 3 3"
|
|
3756
|
-
}, /*#__PURE__*/
|
|
1244
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3757
1245
|
cx: "87",
|
|
3758
1246
|
cy: "9",
|
|
3759
1247
|
r: "1",
|
|
@@ -3764,9 +1252,9 @@ var Dot = function Dot(_ref) {
|
|
|
3764
1252
|
};
|
|
3765
1253
|
Dot.propTypes = {
|
|
3766
1254
|
/** height , width and color of the dot icon */
|
|
3767
|
-
color:
|
|
3768
|
-
width:
|
|
3769
|
-
height:
|
|
1255
|
+
color: PropTypes__default["default"].string,
|
|
1256
|
+
width: PropTypes__default["default"].string,
|
|
1257
|
+
height: PropTypes__default["default"].string
|
|
3770
1258
|
};
|
|
3771
1259
|
|
|
3772
1260
|
var _styleModuleImportMap$7 = {
|
|
@@ -3782,22 +1270,22 @@ var Divider = function Divider(_ref) {
|
|
|
3782
1270
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3783
1271
|
_ref$color = _ref.color,
|
|
3784
1272
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3785
|
-
return /*#__PURE__*/
|
|
3786
|
-
className:
|
|
3787
|
-
}, /*#__PURE__*/
|
|
1273
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1274
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$7)
|
|
1275
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3788
1276
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3789
1277
|
width: width,
|
|
3790
1278
|
height: height
|
|
3791
|
-
}, /*#__PURE__*/
|
|
1279
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3792
1280
|
fill: "inherit",
|
|
3793
1281
|
d: "M0 0h1v10H0z"
|
|
3794
1282
|
})));
|
|
3795
1283
|
};
|
|
3796
1284
|
Divider.propTypes = {
|
|
3797
1285
|
/** height , width and color of the dot icon */
|
|
3798
|
-
color:
|
|
3799
|
-
width:
|
|
3800
|
-
height:
|
|
1286
|
+
color: PropTypes__default["default"].string,
|
|
1287
|
+
width: PropTypes__default["default"].string,
|
|
1288
|
+
height: PropTypes__default["default"].string
|
|
3801
1289
|
};
|
|
3802
1290
|
|
|
3803
1291
|
var _styleModuleImportMap$6 = {
|
|
@@ -3815,28 +1303,28 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3815
1303
|
_ref$isLightTheme = _ref.isLightTheme,
|
|
3816
1304
|
isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
|
|
3817
1305
|
var config = useStateValue() || {};
|
|
3818
|
-
var showReadTime =
|
|
3819
|
-
var readTime =
|
|
1306
|
+
var showReadTime = lodash.get(config, ["showReadTime"]) || lodash.get(opts, ["showReadTime"], true);
|
|
1307
|
+
var readTime = lodash.get(story, ["read-time"], 0);
|
|
3820
1308
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3821
1309
|
if (!showReadTime || !readTime) return null;
|
|
3822
|
-
var timeToRead =
|
|
3823
|
-
return /*#__PURE__*/
|
|
1310
|
+
var timeToRead = lodash.get(opts, ["localizedTimeToRead"]) || "min read";
|
|
1311
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3824
1312
|
"data-test-id": "read-time",
|
|
3825
|
-
className: "arrow-component arr--read-time " +
|
|
3826
|
-
}, /*#__PURE__*/
|
|
1313
|
+
className: "arrow-component arr--read-time " + _getClassName__default["default"]("read-time-wrapper ".concat(textColor), _styleModuleImportMap$6)
|
|
1314
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3827
1315
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3828
|
-
}, /*#__PURE__*/
|
|
1316
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3829
1317
|
color: textColor
|
|
3830
|
-
})), /*#__PURE__*/
|
|
1318
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3831
1319
|
};
|
|
3832
1320
|
ReadTime.propTypes = {
|
|
3833
|
-
story:
|
|
3834
|
-
"read-time":
|
|
1321
|
+
story: PropTypes__default["default"].shape({
|
|
1322
|
+
"read-time": PropTypes__default["default"].number
|
|
3835
1323
|
}),
|
|
3836
|
-
opts:
|
|
3837
|
-
showReadTime:
|
|
1324
|
+
opts: PropTypes__default["default"].shape({
|
|
1325
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3838
1326
|
}),
|
|
3839
|
-
isLightTheme:
|
|
1327
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3840
1328
|
};
|
|
3841
1329
|
|
|
3842
1330
|
var _styleModuleImportMap$5 = {
|
|
@@ -3858,42 +1346,42 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3858
1346
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
3859
1347
|
isLightTheme = _ref.isLightTheme;
|
|
3860
1348
|
var configState = useStateValue() || {};
|
|
3861
|
-
var isAuthor =
|
|
3862
|
-
var isTime =
|
|
3863
|
-
var isReadTime =
|
|
1349
|
+
var isAuthor = lodash.get(config, ["showAuthor"], lodash.get(configState, ["showAuthor"], true));
|
|
1350
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
1351
|
+
var isReadTime = lodash.get(configState, ["showReadTime"], true);
|
|
3864
1352
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3865
1353
|
var seperatorStyle = separator === "dot" ? "dot" : "dash";
|
|
3866
1354
|
var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
|
|
3867
1355
|
|
|
3868
1356
|
var getSeparator = function getSeparator() {
|
|
3869
1357
|
if (separator === "divider") {
|
|
3870
|
-
return /*#__PURE__*/
|
|
1358
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3871
1359
|
color: textColor
|
|
3872
1360
|
});
|
|
3873
1361
|
}
|
|
3874
1362
|
|
|
3875
|
-
return /*#__PURE__*/
|
|
1363
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3876
1364
|
color: textColor
|
|
3877
1365
|
});
|
|
3878
1366
|
};
|
|
3879
1367
|
|
|
3880
1368
|
var getTimeStamp = function getTimeStamp() {
|
|
3881
1369
|
if (!isTime) return null;
|
|
3882
|
-
return /*#__PURE__*/
|
|
3883
|
-
className: "arr-separator " +
|
|
3884
|
-
}, getSeparator()), /*#__PURE__*/
|
|
1370
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1371
|
+
className: "arr-separator " + _getClassName__default["default"]("".concat(seperatorStyle), _styleModuleImportMap$5)
|
|
1372
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3885
1373
|
story: story,
|
|
3886
1374
|
config: config
|
|
3887
|
-
}), isReadTime && /*#__PURE__*/
|
|
1375
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3888
1376
|
story: story,
|
|
3889
1377
|
opts: config,
|
|
3890
1378
|
isLightTheme: isLightTheme
|
|
3891
1379
|
}));
|
|
3892
1380
|
};
|
|
3893
1381
|
|
|
3894
|
-
return /*#__PURE__*/
|
|
3895
|
-
className: "arr--author-time " +
|
|
3896
|
-
}, isAuthor ? /*#__PURE__*/
|
|
1382
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1383
|
+
className: "arr--author-time " + _getClassName__default["default"]("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$5)
|
|
1384
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3897
1385
|
story: story,
|
|
3898
1386
|
isBottom: true,
|
|
3899
1387
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3901,19 +1389,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3901
1389
|
}), getTimeStamp()) : getTimeStamp());
|
|
3902
1390
|
};
|
|
3903
1391
|
AuthorWithTime.propTypes = {
|
|
3904
|
-
story:
|
|
1392
|
+
story: PropTypes__default["default"].object,
|
|
3905
1393
|
|
|
3906
1394
|
/** Style of separator between the Author & Timestamp */
|
|
3907
|
-
separator:
|
|
1395
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3908
1396
|
|
|
3909
1397
|
/** hide the author image */
|
|
3910
|
-
hideAuthorImage:
|
|
1398
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3911
1399
|
// fix author and time at the end
|
|
3912
|
-
isBottom:
|
|
1400
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3913
1401
|
// fix prefix before the author name
|
|
3914
|
-
prefix:
|
|
3915
|
-
config:
|
|
3916
|
-
isLightTheme:
|
|
1402
|
+
prefix: PropTypes__default["default"].string,
|
|
1403
|
+
config: PropTypes__default["default"].object,
|
|
1404
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3917
1405
|
};
|
|
3918
1406
|
AuthorWithTime.defaultProps = {
|
|
3919
1407
|
separator: "dot",
|
|
@@ -3944,14 +1432,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
3944
1432
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
3945
1433
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
3946
1434
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
3947
|
-
return /*#__PURE__*/
|
|
1435
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3948
1436
|
"data-test-id": "story-card-content",
|
|
3949
1437
|
style: {
|
|
3950
1438
|
backgroundColor: theme,
|
|
3951
1439
|
color: textColor
|
|
3952
1440
|
},
|
|
3953
|
-
className: "arr--content-wrapper " +
|
|
3954
|
-
}, children || /*#__PURE__*/
|
|
1441
|
+
className: "arr--content-wrapper " + _getClassName__default["default"]("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$4)
|
|
1442
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
3955
1443
|
story: story,
|
|
3956
1444
|
headerLevel: headerLevel,
|
|
3957
1445
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -3969,37 +1457,37 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
3969
1457
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
3970
1458
|
var _config$localizationC = config.localizationConfig,
|
|
3971
1459
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
3972
|
-
return /*#__PURE__*/
|
|
1460
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
3973
1461
|
story: story,
|
|
3974
1462
|
borderColor: SectionTagborderColor
|
|
3975
|
-
}), /*#__PURE__*/
|
|
1463
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
3976
1464
|
story: story,
|
|
3977
1465
|
headerLevel: headerLevel,
|
|
3978
1466
|
premiumStoryIconConfig: config
|
|
3979
|
-
}), /*#__PURE__*/
|
|
1467
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
3980
1468
|
config: localizationConfig,
|
|
3981
1469
|
story: story
|
|
3982
1470
|
}));
|
|
3983
1471
|
};
|
|
3984
1472
|
|
|
3985
1473
|
DefaultStoryCardContent.propTypes = {
|
|
3986
|
-
story:
|
|
3987
|
-
border:
|
|
3988
|
-
theme:
|
|
3989
|
-
isHorizontalMobile:
|
|
3990
|
-
headerLevel:
|
|
3991
|
-
borderColor:
|
|
3992
|
-
config:
|
|
1474
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1475
|
+
border: PropTypes__default["default"].string,
|
|
1476
|
+
theme: PropTypes__default["default"].string,
|
|
1477
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
1478
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1479
|
+
borderColor: PropTypes__default["default"].string,
|
|
1480
|
+
config: PropTypes__default["default"].object
|
|
3993
1481
|
};
|
|
3994
1482
|
StorycardContent.propTypes = {
|
|
3995
|
-
story:
|
|
3996
|
-
children:
|
|
3997
|
-
theme:
|
|
3998
|
-
border:
|
|
3999
|
-
isHorizontalMobile:
|
|
4000
|
-
headerLevel:
|
|
4001
|
-
borderColor:
|
|
4002
|
-
config:
|
|
1483
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1484
|
+
children: PropTypes__default["default"].node,
|
|
1485
|
+
theme: PropTypes__default["default"].string,
|
|
1486
|
+
border: PropTypes__default["default"].string,
|
|
1487
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
1488
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1489
|
+
borderColor: PropTypes__default["default"].string,
|
|
1490
|
+
config: PropTypes__default["default"].object
|
|
4003
1491
|
};
|
|
4004
1492
|
|
|
4005
1493
|
var _styleModuleImportMap$3 = {
|
|
@@ -4019,28 +1507,28 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4019
1507
|
forceShowAtom = _ref.forceShowAtom,
|
|
4020
1508
|
showFullContent = _ref.showFullContent;
|
|
4021
1509
|
var config = useStateValue() || {};
|
|
4022
|
-
var subheadline = forceShowAtom ||
|
|
1510
|
+
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
4023
1511
|
if (!subheadline) return null;
|
|
4024
1512
|
var textColor = getTextColor(config.theme);
|
|
4025
|
-
return /*#__PURE__*/
|
|
1513
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4026
1514
|
style: {
|
|
4027
1515
|
WebkitLineClamp: lineClamp
|
|
4028
1516
|
},
|
|
4029
1517
|
"data-test-id": "subheadline",
|
|
4030
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") +
|
|
1518
|
+
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName__default["default"]("subheadline ".concat(textColor), _styleModuleImportMap$3)
|
|
4031
1519
|
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
4032
1520
|
};
|
|
4033
1521
|
Subheadline.propTypes = {
|
|
4034
1522
|
/** The Story Object from the API response */
|
|
4035
|
-
story:
|
|
1523
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4036
1524
|
// Restricts the number of lines for subheadline.
|
|
4037
|
-
lineClamp:
|
|
1525
|
+
lineClamp: PropTypes__default["default"].number,
|
|
4038
1526
|
|
|
4039
1527
|
/** Number of characters to truncate the subheadline */
|
|
4040
|
-
truncateChars:
|
|
4041
|
-
clazzName:
|
|
4042
|
-
forceShowAtom:
|
|
4043
|
-
showFullContent:
|
|
1528
|
+
truncateChars: PropTypes__default["default"].number,
|
|
1529
|
+
clazzName: PropTypes__default["default"].string,
|
|
1530
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
1531
|
+
showFullContent: PropTypes__default["default"].bool
|
|
4044
1532
|
};
|
|
4045
1533
|
Subheadline.defaultProps = {
|
|
4046
1534
|
forceShowAtom: false,
|
|
@@ -4089,7 +1577,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4089
1577
|
prefix = _ref.prefix,
|
|
4090
1578
|
config = _ref.config,
|
|
4091
1579
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4092
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
1580
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4093
1581
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4094
1582
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4095
1583
|
|
|
@@ -4099,7 +1587,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4099
1587
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4100
1588
|
var textColor = getTextColor(theme);
|
|
4101
1589
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4102
|
-
var defaultStorycard = /*#__PURE__*/
|
|
1590
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4103
1591
|
story: story,
|
|
4104
1592
|
aspectRatio: aspectRatio,
|
|
4105
1593
|
border: border,
|
|
@@ -4113,13 +1601,13 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4113
1601
|
config: config,
|
|
4114
1602
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4115
1603
|
});
|
|
4116
|
-
return /*#__PURE__*/
|
|
1604
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4117
1605
|
"data-test-id": "story-card",
|
|
4118
1606
|
style: {
|
|
4119
1607
|
backgroundColor: theme,
|
|
4120
1608
|
color: textColor
|
|
4121
1609
|
},
|
|
4122
|
-
className: "arr--story-card " +
|
|
1610
|
+
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$2)
|
|
4123
1611
|
}, children || defaultStorycard);
|
|
4124
1612
|
};
|
|
4125
1613
|
|
|
@@ -4142,91 +1630,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4142
1630
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4143
1631
|
var _config$localizationC = config.localizationConfig,
|
|
4144
1632
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4145
|
-
return /*#__PURE__*/
|
|
1633
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4146
1634
|
config: config,
|
|
4147
1635
|
story: story,
|
|
4148
1636
|
isHorizontal: true,
|
|
4149
1637
|
isHorizontalMobile: isHorizontalMobile,
|
|
4150
1638
|
aspectRatio: aspectRatio
|
|
4151
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
1639
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4152
1640
|
config: config,
|
|
4153
1641
|
story: story,
|
|
4154
1642
|
isHorizontalWithImageLast: true,
|
|
4155
1643
|
isHorizontalMobile: isHorizontalMobile,
|
|
4156
1644
|
aspectRatio: aspectRatio
|
|
4157
|
-
}) : /*#__PURE__*/
|
|
1645
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4158
1646
|
story: story,
|
|
4159
1647
|
config: config,
|
|
4160
1648
|
isHorizontalMobile: isHorizontalMobile,
|
|
4161
1649
|
aspectRatio: aspectRatio
|
|
4162
|
-
}), /*#__PURE__*/
|
|
4163
|
-
className: "arr--story-content " +
|
|
4164
|
-
}, /*#__PURE__*/
|
|
1650
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1651
|
+
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap$2)
|
|
1652
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4165
1653
|
story: story,
|
|
4166
1654
|
borderColor: SectionTagborderColor
|
|
4167
|
-
}), /*#__PURE__*/
|
|
1655
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4168
1656
|
story: story,
|
|
4169
1657
|
headerLevel: headerLevel,
|
|
4170
1658
|
premiumStoryIconConfig: config
|
|
4171
|
-
}), /*#__PURE__*/
|
|
1659
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4172
1660
|
config: localizationConfig,
|
|
4173
1661
|
story: story,
|
|
4174
1662
|
isBottom: true,
|
|
4175
1663
|
prefix: prefix,
|
|
4176
1664
|
hideAuthorImage: hideAuthorImage
|
|
4177
|
-
}), /*#__PURE__*/
|
|
1665
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4178
1666
|
story: story
|
|
4179
1667
|
})));
|
|
4180
1668
|
};
|
|
4181
1669
|
|
|
4182
1670
|
DefaultStoryCard.propTypes = {
|
|
4183
|
-
story:
|
|
4184
|
-
border:
|
|
4185
|
-
isBottom:
|
|
4186
|
-
isHorizontal:
|
|
4187
|
-
aspectRatio:
|
|
4188
|
-
isHorizontalMobile:
|
|
4189
|
-
centerAlign:
|
|
4190
|
-
headerLevel:
|
|
4191
|
-
borderColor:
|
|
4192
|
-
hideAuthorImage:
|
|
4193
|
-
prefix:
|
|
4194
|
-
config:
|
|
4195
|
-
isHorizontalWithImageLast:
|
|
1671
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1672
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
1673
|
+
isBottom: PropTypes__default["default"].bool,
|
|
1674
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
1675
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
1676
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
1677
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
1678
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1679
|
+
borderColor: PropTypes__default["default"].string,
|
|
1680
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
1681
|
+
prefix: PropTypes__default["default"].string,
|
|
1682
|
+
config: PropTypes__default["default"].object,
|
|
1683
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4196
1684
|
};
|
|
4197
1685
|
StoryCard.propTypes = {
|
|
4198
1686
|
/** The Story Object from the API response */
|
|
4199
|
-
story:
|
|
4200
|
-
children:
|
|
1687
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1688
|
+
children: PropTypes__default["default"].node,
|
|
4201
1689
|
|
|
4202
1690
|
/** Flip the Story Card to Horizonal mode */
|
|
4203
|
-
isHorizontal:
|
|
1691
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4204
1692
|
|
|
4205
1693
|
/** Add border to the Story Card */
|
|
4206
|
-
border:
|
|
1694
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4207
1695
|
// story card with background image
|
|
4208
|
-
useImageAsBackground:
|
|
1696
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4209
1697
|
// story card content overlap with image
|
|
4210
|
-
bgImgContentOverlap:
|
|
1698
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4211
1699
|
|
|
4212
1700
|
/** add aspect ratio for hero image */
|
|
4213
|
-
aspectRatio:
|
|
1701
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4214
1702
|
|
|
4215
1703
|
/** add theme(dark /light/custom color) for storycard */
|
|
4216
|
-
theme:
|
|
1704
|
+
theme: PropTypes__default["default"].string,
|
|
4217
1705
|
|
|
4218
1706
|
/** flip the story card mobile design horizontal */
|
|
4219
|
-
isHorizontalMobile:
|
|
1707
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4220
1708
|
// make content center align in desktop and left align in mobile
|
|
4221
|
-
centerAlign:
|
|
4222
|
-
headerLevel:
|
|
4223
|
-
borderColor:
|
|
1709
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
1710
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1711
|
+
borderColor: PropTypes__default["default"].string,
|
|
4224
1712
|
// handle author image through storycard
|
|
4225
|
-
hideAuthorImage:
|
|
1713
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4226
1714
|
// handle author prefix through storycard
|
|
4227
|
-
prefix:
|
|
4228
|
-
config:
|
|
4229
|
-
isHorizontalWithImageLast:
|
|
1715
|
+
prefix: PropTypes__default["default"].string,
|
|
1716
|
+
config: PropTypes__default["default"].object,
|
|
1717
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4230
1718
|
};
|
|
4231
1719
|
StoryCard.defaultProps = {
|
|
4232
1720
|
isHorizontal: false,
|
|
@@ -4238,21 +1726,6 @@ StoryCard.defaultProps = {
|
|
|
4238
1726
|
isHorizontalWithImageLast: false
|
|
4239
1727
|
};
|
|
4240
1728
|
|
|
4241
|
-
function _defineProperty(obj, key, value) {
|
|
4242
|
-
if (key in obj) {
|
|
4243
|
-
Object.defineProperty(obj, key, {
|
|
4244
|
-
value: value,
|
|
4245
|
-
enumerable: true,
|
|
4246
|
-
configurable: true,
|
|
4247
|
-
writable: true
|
|
4248
|
-
});
|
|
4249
|
-
} else {
|
|
4250
|
-
obj[key] = value;
|
|
4251
|
-
}
|
|
4252
|
-
|
|
4253
|
-
return obj;
|
|
4254
|
-
}
|
|
4255
|
-
|
|
4256
1729
|
var _styleModuleImportMap$1 = {
|
|
4257
1730
|
"./load-more.m.css": {
|
|
4258
1731
|
"button": "load-more-m_button__1mmf1",
|
|
@@ -4264,7 +1737,7 @@ var _styleModuleImportMap$1 = {
|
|
|
4264
1737
|
|
|
4265
1738
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4266
1739
|
|
|
4267
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
1740
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4268
1741
|
var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
4269
1742
|
var _ref$config = _ref.config,
|
|
4270
1743
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -4285,26 +1758,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4285
1758
|
if (!showButton) return null;
|
|
4286
1759
|
var textColor = getTextColor(theme);
|
|
4287
1760
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
4288
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
1761
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4289
1762
|
onClick: onClick,
|
|
4290
1763
|
"data-test-id": "load-more",
|
|
4291
|
-
className: "arr--button " +
|
|
4292
|
-
}, buttonText) : /*#__PURE__*/
|
|
1764
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
1765
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4293
1766
|
href: slug,
|
|
4294
1767
|
navigateTo: navigate,
|
|
4295
1768
|
"data-test-id": "load-more",
|
|
4296
1769
|
"aria-label": "load-more"
|
|
4297
|
-
}, /*#__PURE__*/
|
|
4298
|
-
className: "arr--button " +
|
|
1770
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1771
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
4299
1772
|
}, buttonText));
|
|
4300
1773
|
};
|
|
4301
1774
|
LoadmoreButton.propTypes = {
|
|
4302
|
-
collection:
|
|
4303
|
-
template:
|
|
4304
|
-
config:
|
|
4305
|
-
onClick:
|
|
4306
|
-
navigate:
|
|
4307
|
-
qtConfig:
|
|
1775
|
+
collection: PropTypes__default["default"].object,
|
|
1776
|
+
template: PropTypes__default["default"].string,
|
|
1777
|
+
config: PropTypes__default["default"].object,
|
|
1778
|
+
onClick: PropTypes__default["default"].func,
|
|
1779
|
+
navigate: PropTypes__default["default"].func,
|
|
1780
|
+
qtConfig: PropTypes__default["default"].object
|
|
4308
1781
|
};
|
|
4309
1782
|
|
|
4310
1783
|
var _styleModuleImportMap = {
|
|
@@ -4327,7 +1800,7 @@ var TwoColFourStoryHighlightBase = function TwoColFourStoryHighlightBase(_ref) {
|
|
|
4327
1800
|
var collection = _ref.collection,
|
|
4328
1801
|
_ref$config = _ref.config,
|
|
4329
1802
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
4330
|
-
var items = collectionToStories(collection);
|
|
1803
|
+
var items = components.collectionToStories(collection);
|
|
4331
1804
|
|
|
4332
1805
|
if (!items.length) {
|
|
4333
1806
|
return null;
|
|
@@ -4353,52 +1826,52 @@ var TwoColFourStoryHighlightBase = function TwoColFourStoryHighlightBase(_ref) {
|
|
|
4353
1826
|
bulletColorType = _config$bulletColorTy === void 0 ? "default" : _config$bulletColorTy;
|
|
4354
1827
|
var textColor = getTextColor(theme);
|
|
4355
1828
|
|
|
4356
|
-
var _items =
|
|
1829
|
+
var _items = _toArray__default["default"](items),
|
|
4357
1830
|
firstStory = _items[0],
|
|
4358
1831
|
restStories = _items.slice(1);
|
|
4359
1832
|
|
|
4360
|
-
var dispatch = useDispatch();
|
|
4361
|
-
var qtConfig = useSelector(function (state) {
|
|
4362
|
-
return
|
|
1833
|
+
var dispatch = reactRedux.useDispatch();
|
|
1834
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
1835
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
4363
1836
|
});
|
|
4364
1837
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4365
1838
|
var SectionTagBorderColor = rgbToHex(borderColor);
|
|
4366
|
-
return /*#__PURE__*/
|
|
1839
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4367
1840
|
"data-test-id": "two-col-four-story-highlight",
|
|
4368
1841
|
style: {
|
|
4369
1842
|
backgroundColor: theme,
|
|
4370
1843
|
color: textColor
|
|
4371
1844
|
},
|
|
4372
|
-
className: "full-width-with-padding arrow-component arr--two-col-four-story-highlight " +
|
|
4373
|
-
}, /*#__PURE__*/
|
|
1845
|
+
className: "full-width-with-padding arrow-component arr--two-col-four-story-highlight " + _getClassName__default["default"]("componentWrapper ".concat(showBullet ? "bulletStyle" : ""), _styleModuleImportMap)
|
|
1846
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4374
1847
|
className: "two-col-four-story-highlight-m_highlightWrapper__1FXMf"
|
|
4375
|
-
}, /*#__PURE__*/
|
|
1848
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4376
1849
|
collection: collection,
|
|
4377
1850
|
collectionNameTemplate: collectionNameTemplate,
|
|
4378
1851
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4379
|
-
}), /*#__PURE__*/
|
|
1852
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4380
1853
|
className: "two-col-four-story-highlight-m_storyHighlightWrapper__1Jl9S"
|
|
4381
1854
|
}, restStories.slice(0, 3).map(function (story, index) {
|
|
4382
|
-
return /*#__PURE__*/
|
|
1855
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4383
1856
|
className: "two-col-four-story-highlight-m_bulletCardWrapper__2GVby",
|
|
4384
1857
|
key: index
|
|
4385
|
-
}, showBullet && /*#__PURE__*/
|
|
1858
|
+
}, showBullet && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4386
1859
|
"data-test-id": "bullet",
|
|
4387
1860
|
style: {
|
|
4388
1861
|
color: customBulletColor
|
|
4389
1862
|
},
|
|
4390
|
-
className:
|
|
4391
|
-
}), /*#__PURE__*/
|
|
1863
|
+
className: _getClassName__default["default"]("bullet ".concat(bulletColorType === "default" ? textColor : ""), _styleModuleImportMap)
|
|
1864
|
+
}), /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4392
1865
|
story: story,
|
|
4393
1866
|
bgImgContentOverlap: true,
|
|
4394
1867
|
config: config,
|
|
4395
1868
|
border: showBorder ? "bottom" : "",
|
|
4396
1869
|
theme: theme
|
|
4397
|
-
}, /*#__PURE__*/
|
|
1870
|
+
}, /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4398
1871
|
story: story,
|
|
4399
1872
|
borderColor: SectionTagBorderColor
|
|
4400
1873
|
})));
|
|
4401
|
-
})), /*#__PURE__*/
|
|
1874
|
+
})), /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4402
1875
|
template: "NavigateToPage",
|
|
4403
1876
|
collection: collection,
|
|
4404
1877
|
config: config,
|
|
@@ -4406,51 +1879,52 @@ var TwoColFourStoryHighlightBase = function TwoColFourStoryHighlightBase(_ref) {
|
|
|
4406
1879
|
return navigateTo(dispatch, url);
|
|
4407
1880
|
},
|
|
4408
1881
|
qtConfig: qtConfig
|
|
4409
|
-
})), /*#__PURE__*/
|
|
1882
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4410
1883
|
className: "two-col-four-story-highlight-m_coverCardWrapper__1vnU8"
|
|
4411
|
-
}, /*#__PURE__*/
|
|
1884
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4412
1885
|
collection: collection,
|
|
4413
1886
|
collectionNameTemplate: collectionNameTemplate,
|
|
4414
1887
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4415
|
-
}), /*#__PURE__*/
|
|
1888
|
+
}), /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4416
1889
|
story: firstStory,
|
|
4417
1890
|
bgImgContentOverlap: true,
|
|
4418
1891
|
config: config,
|
|
4419
1892
|
border: showBorder ? "full" : "",
|
|
4420
1893
|
theme: theme
|
|
4421
|
-
}, /*#__PURE__*/
|
|
1894
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4422
1895
|
story: firstStory
|
|
4423
|
-
}), /*#__PURE__*/
|
|
1896
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4424
1897
|
style: {
|
|
4425
1898
|
backgroundColor: theme,
|
|
4426
1899
|
color: textColor
|
|
4427
1900
|
}
|
|
4428
|
-
}, /*#__PURE__*/
|
|
1901
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4429
1902
|
story: firstStory,
|
|
4430
1903
|
borderColor: SectionTagBorderColor
|
|
4431
|
-
}), /*#__PURE__*/
|
|
1904
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4432
1905
|
story: firstStory,
|
|
4433
1906
|
headerLevel: 4,
|
|
4434
1907
|
premiumStoryIconConfig: config
|
|
4435
|
-
}), /*#__PURE__*/
|
|
1908
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4436
1909
|
story: firstStory
|
|
4437
|
-
}), /*#__PURE__*/
|
|
1910
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4438
1911
|
config: localizationConfig,
|
|
4439
1912
|
story: firstStory
|
|
4440
1913
|
})))));
|
|
4441
1914
|
};
|
|
4442
1915
|
TwoColFourStoryHighlightBase.propTypes = {
|
|
4443
|
-
collection:
|
|
4444
|
-
config:
|
|
4445
|
-
theme:
|
|
4446
|
-
showBorder:
|
|
4447
|
-
collectionNameTemplate:
|
|
4448
|
-
collectionNameBorderColor:
|
|
4449
|
-
borderColor:
|
|
4450
|
-
showBullet:
|
|
4451
|
-
localizationConfig:
|
|
1916
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
1917
|
+
config: PropTypes__default["default"].shape({
|
|
1918
|
+
theme: PropTypes__default["default"].string,
|
|
1919
|
+
showBorder: PropTypes__default["default"].bool,
|
|
1920
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
1921
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
1922
|
+
borderColor: PropTypes__default["default"].string,
|
|
1923
|
+
showBullet: PropTypes__default["default"].bool,
|
|
1924
|
+
localizationConfig: PropTypes__default["default"].object
|
|
4452
1925
|
})
|
|
4453
1926
|
};
|
|
4454
1927
|
var TwoColFourStoryHighlight = StateProvider(TwoColFourStoryHighlightBase);
|
|
4455
1928
|
|
|
4456
|
-
|
|
1929
|
+
exports.TwoColFourStoryHighlight = TwoColFourStoryHighlight;
|
|
1930
|
+
exports.TwoColFourStoryHighlightBase = TwoColFourStoryHighlightBase;
|