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