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