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