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