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