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