@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
package/atoms/Author/index.js
CHANGED
|
@@ -1,2110 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { Link, ResponsiveImage } from '@quintype/components';
|
|
4
|
-
import 'react-timeago';
|
|
5
|
-
import 'date-fns-tz';
|
|
6
|
-
import { connect } from 'react-redux';
|
|
1
|
+
'use strict';
|
|
7
2
|
|
|
8
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(exports, "__esModule", {
|
|
22
|
-
value: true
|
|
23
|
-
});
|
|
24
|
-
exports["default"] = void 0;
|
|
25
|
-
var optionsDefaults = {
|
|
26
|
-
attributeNames: {
|
|
27
|
-
styleName: 'className'
|
|
28
|
-
},
|
|
29
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
30
|
-
handleMissingStyleName: 'throw'
|
|
31
|
-
};
|
|
32
|
-
var _default = optionsDefaults;
|
|
33
|
-
exports["default"] = _default;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
39
|
-
|
|
40
|
-
Object.defineProperty(exports, "__esModule", {
|
|
41
|
-
value: true
|
|
42
|
-
});
|
|
43
|
-
exports["default"] = void 0;
|
|
44
|
-
|
|
45
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
46
|
-
|
|
47
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
48
|
-
|
|
49
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
50
|
-
return styleName.indexOf('.') !== -1;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
54
|
-
if (handleMissingStyleName === 'throw') {
|
|
55
|
-
throw new Error(message);
|
|
56
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
57
|
-
// eslint-disable-next-line no-console
|
|
58
|
-
console.warn(message);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return null;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
65
|
-
// Note:
|
|
66
|
-
// Do not use the desctructing syntax with Babel.
|
|
67
|
-
// Desctructing adds _slicedToArray helper.
|
|
68
|
-
var styleNameParts = styleName.split('.');
|
|
69
|
-
var importName = styleNameParts[0];
|
|
70
|
-
var moduleName = styleNameParts[1];
|
|
71
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
72
|
-
|
|
73
|
-
if (!moduleName) {
|
|
74
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (!styleModuleImportMap[importName]) {
|
|
78
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
82
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return styleModuleImportMap[importName][moduleName];
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
89
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
90
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
91
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
92
|
-
}).filter(function (importKey) {
|
|
93
|
-
return importKey;
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
if (importKeysWithMatches.length > 1) {
|
|
97
|
-
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');
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (importKeysWithMatches.length === 0) {
|
|
101
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
108
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
109
|
-
|
|
110
|
-
var _ref = options || {},
|
|
111
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
112
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
113
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
114
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
115
|
-
|
|
116
|
-
if (!styleNameValue) {
|
|
117
|
-
return '';
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
121
|
-
return styleName;
|
|
122
|
-
}).map(function (styleName) {
|
|
123
|
-
if (isNamespacedStyleName(styleName)) {
|
|
124
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
128
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
132
|
-
if (!autoResolveMultipleImports) {
|
|
133
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
140
|
-
|
|
141
|
-
if (!styleModuleMap[styleName]) {
|
|
142
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return styleModuleMap[styleName];
|
|
146
|
-
}).filter(function (className) {
|
|
147
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
148
|
-
return className;
|
|
149
|
-
}).join(' ');
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
exports["default"] = _default;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Checks if `value` is classified as an `Array` object.
|
|
161
|
-
*
|
|
162
|
-
* @static
|
|
163
|
-
* @memberOf _
|
|
164
|
-
* @since 0.1.0
|
|
165
|
-
* @category Lang
|
|
166
|
-
* @param {*} value The value to check.
|
|
167
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
168
|
-
* @example
|
|
169
|
-
*
|
|
170
|
-
* _.isArray([1, 2, 3]);
|
|
171
|
-
* // => true
|
|
172
|
-
*
|
|
173
|
-
* _.isArray(document.body.children);
|
|
174
|
-
* // => false
|
|
175
|
-
*
|
|
176
|
-
* _.isArray('abc');
|
|
177
|
-
* // => false
|
|
178
|
-
*
|
|
179
|
-
* _.isArray(_.noop);
|
|
180
|
-
* // => false
|
|
181
|
-
*/
|
|
182
|
-
var isArray = Array.isArray;
|
|
183
|
-
|
|
184
|
-
var isArray_1 = isArray;
|
|
185
|
-
|
|
186
|
-
/** Detect free variable `global` from Node.js. */
|
|
187
|
-
|
|
188
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
189
|
-
|
|
190
|
-
var _freeGlobal = freeGlobal;
|
|
191
|
-
|
|
192
|
-
/** Detect free variable `self`. */
|
|
193
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
194
|
-
|
|
195
|
-
/** Used as a reference to the global object. */
|
|
196
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
197
|
-
|
|
198
|
-
var _root = root;
|
|
199
|
-
|
|
200
|
-
/** Built-in value references. */
|
|
201
|
-
var Symbol$1 = _root.Symbol;
|
|
202
|
-
|
|
203
|
-
var _Symbol = Symbol$1;
|
|
204
|
-
|
|
205
|
-
/** Used for built-in method references. */
|
|
206
|
-
var objectProto$4 = Object.prototype;
|
|
207
|
-
|
|
208
|
-
/** Used to check objects for own properties. */
|
|
209
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Used to resolve the
|
|
213
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
214
|
-
* of values.
|
|
215
|
-
*/
|
|
216
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
217
|
-
|
|
218
|
-
/** Built-in value references. */
|
|
219
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
223
|
-
*
|
|
224
|
-
* @private
|
|
225
|
-
* @param {*} value The value to query.
|
|
226
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
227
|
-
*/
|
|
228
|
-
function getRawTag(value) {
|
|
229
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
230
|
-
tag = value[symToStringTag$1];
|
|
231
|
-
|
|
232
|
-
try {
|
|
233
|
-
value[symToStringTag$1] = undefined;
|
|
234
|
-
var unmasked = true;
|
|
235
|
-
} catch (e) {}
|
|
236
|
-
|
|
237
|
-
var result = nativeObjectToString$1.call(value);
|
|
238
|
-
if (unmasked) {
|
|
239
|
-
if (isOwn) {
|
|
240
|
-
value[symToStringTag$1] = tag;
|
|
241
|
-
} else {
|
|
242
|
-
delete value[symToStringTag$1];
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return result;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
var _getRawTag = getRawTag;
|
|
249
|
-
|
|
250
|
-
/** Used for built-in method references. */
|
|
251
|
-
var objectProto$3 = Object.prototype;
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Used to resolve the
|
|
255
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
256
|
-
* of values.
|
|
257
|
-
*/
|
|
258
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
262
|
-
*
|
|
263
|
-
* @private
|
|
264
|
-
* @param {*} value The value to convert.
|
|
265
|
-
* @returns {string} Returns the converted string.
|
|
266
|
-
*/
|
|
267
|
-
function objectToString(value) {
|
|
268
|
-
return nativeObjectToString.call(value);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
var _objectToString = objectToString;
|
|
272
|
-
|
|
273
|
-
/** `Object#toString` result references. */
|
|
274
|
-
var nullTag = '[object Null]',
|
|
275
|
-
undefinedTag = '[object Undefined]';
|
|
276
|
-
|
|
277
|
-
/** Built-in value references. */
|
|
278
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
282
|
-
*
|
|
283
|
-
* @private
|
|
284
|
-
* @param {*} value The value to query.
|
|
285
|
-
* @returns {string} Returns the `toStringTag`.
|
|
286
|
-
*/
|
|
287
|
-
function baseGetTag(value) {
|
|
288
|
-
if (value == null) {
|
|
289
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
290
|
-
}
|
|
291
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
292
|
-
? _getRawTag(value)
|
|
293
|
-
: _objectToString(value);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
var _baseGetTag = baseGetTag;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
300
|
-
* and has a `typeof` result of "object".
|
|
301
|
-
*
|
|
302
|
-
* @static
|
|
303
|
-
* @memberOf _
|
|
304
|
-
* @since 4.0.0
|
|
305
|
-
* @category Lang
|
|
306
|
-
* @param {*} value The value to check.
|
|
307
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
308
|
-
* @example
|
|
309
|
-
*
|
|
310
|
-
* _.isObjectLike({});
|
|
311
|
-
* // => true
|
|
312
|
-
*
|
|
313
|
-
* _.isObjectLike([1, 2, 3]);
|
|
314
|
-
* // => true
|
|
315
|
-
*
|
|
316
|
-
* _.isObjectLike(_.noop);
|
|
317
|
-
* // => false
|
|
318
|
-
*
|
|
319
|
-
* _.isObjectLike(null);
|
|
320
|
-
* // => false
|
|
321
|
-
*/
|
|
322
|
-
function isObjectLike(value) {
|
|
323
|
-
return value != null && typeof value == 'object';
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
var isObjectLike_1 = isObjectLike;
|
|
327
|
-
|
|
328
|
-
/** `Object#toString` result references. */
|
|
329
|
-
var symbolTag = '[object Symbol]';
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
333
|
-
*
|
|
334
|
-
* @static
|
|
335
|
-
* @memberOf _
|
|
336
|
-
* @since 4.0.0
|
|
337
|
-
* @category Lang
|
|
338
|
-
* @param {*} value The value to check.
|
|
339
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
340
|
-
* @example
|
|
341
|
-
*
|
|
342
|
-
* _.isSymbol(Symbol.iterator);
|
|
343
|
-
* // => true
|
|
344
|
-
*
|
|
345
|
-
* _.isSymbol('abc');
|
|
346
|
-
* // => false
|
|
347
|
-
*/
|
|
348
|
-
function isSymbol(value) {
|
|
349
|
-
return typeof value == 'symbol' ||
|
|
350
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
var isSymbol_1 = isSymbol;
|
|
354
|
-
|
|
355
|
-
/** Used to match property names within property paths. */
|
|
356
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
357
|
-
reIsPlainProp = /^\w*$/;
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Checks if `value` is a property name and not a property path.
|
|
361
|
-
*
|
|
362
|
-
* @private
|
|
363
|
-
* @param {*} value The value to check.
|
|
364
|
-
* @param {Object} [object] The object to query keys on.
|
|
365
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
366
|
-
*/
|
|
367
|
-
function isKey(value, object) {
|
|
368
|
-
if (isArray_1(value)) {
|
|
369
|
-
return false;
|
|
370
|
-
}
|
|
371
|
-
var type = typeof value;
|
|
372
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
373
|
-
value == null || isSymbol_1(value)) {
|
|
374
|
-
return true;
|
|
375
|
-
}
|
|
376
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
377
|
-
(object != null && value in Object(object));
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
var _isKey = isKey;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Checks if `value` is the
|
|
384
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
385
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
386
|
-
*
|
|
387
|
-
* @static
|
|
388
|
-
* @memberOf _
|
|
389
|
-
* @since 0.1.0
|
|
390
|
-
* @category Lang
|
|
391
|
-
* @param {*} value The value to check.
|
|
392
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
393
|
-
* @example
|
|
394
|
-
*
|
|
395
|
-
* _.isObject({});
|
|
396
|
-
* // => true
|
|
397
|
-
*
|
|
398
|
-
* _.isObject([1, 2, 3]);
|
|
399
|
-
* // => true
|
|
400
|
-
*
|
|
401
|
-
* _.isObject(_.noop);
|
|
402
|
-
* // => true
|
|
403
|
-
*
|
|
404
|
-
* _.isObject(null);
|
|
405
|
-
* // => false
|
|
406
|
-
*/
|
|
407
|
-
function isObject(value) {
|
|
408
|
-
var type = typeof value;
|
|
409
|
-
return value != null && (type == 'object' || type == 'function');
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
var isObject_1 = isObject;
|
|
413
|
-
|
|
414
|
-
/** `Object#toString` result references. */
|
|
415
|
-
var asyncTag = '[object AsyncFunction]',
|
|
416
|
-
funcTag = '[object Function]',
|
|
417
|
-
genTag = '[object GeneratorFunction]',
|
|
418
|
-
proxyTag = '[object Proxy]';
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Checks if `value` is classified as a `Function` object.
|
|
422
|
-
*
|
|
423
|
-
* @static
|
|
424
|
-
* @memberOf _
|
|
425
|
-
* @since 0.1.0
|
|
426
|
-
* @category Lang
|
|
427
|
-
* @param {*} value The value to check.
|
|
428
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
429
|
-
* @example
|
|
430
|
-
*
|
|
431
|
-
* _.isFunction(_);
|
|
432
|
-
* // => true
|
|
433
|
-
*
|
|
434
|
-
* _.isFunction(/abc/);
|
|
435
|
-
* // => false
|
|
436
|
-
*/
|
|
437
|
-
function isFunction(value) {
|
|
438
|
-
if (!isObject_1(value)) {
|
|
439
|
-
return false;
|
|
440
|
-
}
|
|
441
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
442
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
443
|
-
var tag = _baseGetTag(value);
|
|
444
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
var isFunction_1 = isFunction;
|
|
448
|
-
|
|
449
|
-
/** Used to detect overreaching core-js shims. */
|
|
450
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
451
|
-
|
|
452
|
-
var _coreJsData = coreJsData;
|
|
453
|
-
|
|
454
|
-
/** Used to detect methods masquerading as native. */
|
|
455
|
-
var maskSrcKey = (function() {
|
|
456
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
457
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
458
|
-
}());
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Checks if `func` has its source masked.
|
|
462
|
-
*
|
|
463
|
-
* @private
|
|
464
|
-
* @param {Function} func The function to check.
|
|
465
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
466
|
-
*/
|
|
467
|
-
function isMasked(func) {
|
|
468
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
var _isMasked = isMasked;
|
|
472
|
-
|
|
473
|
-
/** Used for built-in method references. */
|
|
474
|
-
var funcProto$1 = Function.prototype;
|
|
475
|
-
|
|
476
|
-
/** Used to resolve the decompiled source of functions. */
|
|
477
|
-
var funcToString$1 = funcProto$1.toString;
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* Converts `func` to its source code.
|
|
481
|
-
*
|
|
482
|
-
* @private
|
|
483
|
-
* @param {Function} func The function to convert.
|
|
484
|
-
* @returns {string} Returns the source code.
|
|
485
|
-
*/
|
|
486
|
-
function toSource(func) {
|
|
487
|
-
if (func != null) {
|
|
488
|
-
try {
|
|
489
|
-
return funcToString$1.call(func);
|
|
490
|
-
} catch (e) {}
|
|
491
|
-
try {
|
|
492
|
-
return (func + '');
|
|
493
|
-
} catch (e) {}
|
|
494
|
-
}
|
|
495
|
-
return '';
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
var _toSource = toSource;
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Used to match `RegExp`
|
|
502
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
503
|
-
*/
|
|
504
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
505
|
-
|
|
506
|
-
/** Used to detect host constructors (Safari). */
|
|
507
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
508
|
-
|
|
509
|
-
/** Used for built-in method references. */
|
|
510
|
-
var funcProto = Function.prototype,
|
|
511
|
-
objectProto$2 = Object.prototype;
|
|
512
|
-
|
|
513
|
-
/** Used to resolve the decompiled source of functions. */
|
|
514
|
-
var funcToString = funcProto.toString;
|
|
515
|
-
|
|
516
|
-
/** Used to check objects for own properties. */
|
|
517
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
518
|
-
|
|
519
|
-
/** Used to detect if a method is native. */
|
|
520
|
-
var reIsNative = RegExp('^' +
|
|
521
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
522
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
523
|
-
);
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
527
|
-
*
|
|
528
|
-
* @private
|
|
529
|
-
* @param {*} value The value to check.
|
|
530
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
531
|
-
* else `false`.
|
|
532
|
-
*/
|
|
533
|
-
function baseIsNative(value) {
|
|
534
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
535
|
-
return false;
|
|
536
|
-
}
|
|
537
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
538
|
-
return pattern.test(_toSource(value));
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
var _baseIsNative = baseIsNative;
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Gets the value at `key` of `object`.
|
|
545
|
-
*
|
|
546
|
-
* @private
|
|
547
|
-
* @param {Object} [object] The object to query.
|
|
548
|
-
* @param {string} key The key of the property to get.
|
|
549
|
-
* @returns {*} Returns the property value.
|
|
550
|
-
*/
|
|
551
|
-
function getValue(object, key) {
|
|
552
|
-
return object == null ? undefined : object[key];
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
var _getValue = getValue;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Gets the native function at `key` of `object`.
|
|
559
|
-
*
|
|
560
|
-
* @private
|
|
561
|
-
* @param {Object} object The object to query.
|
|
562
|
-
* @param {string} key The key of the method to get.
|
|
563
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
564
|
-
*/
|
|
565
|
-
function getNative(object, key) {
|
|
566
|
-
var value = _getValue(object, key);
|
|
567
|
-
return _baseIsNative(value) ? value : undefined;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
var _getNative = getNative;
|
|
571
|
-
|
|
572
|
-
/* Built-in method references that are verified to be native. */
|
|
573
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
574
|
-
|
|
575
|
-
var _nativeCreate = nativeCreate;
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Removes all key-value entries from the hash.
|
|
579
|
-
*
|
|
580
|
-
* @private
|
|
581
|
-
* @name clear
|
|
582
|
-
* @memberOf Hash
|
|
583
|
-
*/
|
|
584
|
-
function hashClear() {
|
|
585
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
586
|
-
this.size = 0;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
var _hashClear = hashClear;
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Removes `key` and its value from the hash.
|
|
593
|
-
*
|
|
594
|
-
* @private
|
|
595
|
-
* @name delete
|
|
596
|
-
* @memberOf Hash
|
|
597
|
-
* @param {Object} hash The hash to modify.
|
|
598
|
-
* @param {string} key The key of the value to remove.
|
|
599
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
600
|
-
*/
|
|
601
|
-
function hashDelete(key) {
|
|
602
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
603
|
-
this.size -= result ? 1 : 0;
|
|
604
|
-
return result;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
var _hashDelete = hashDelete;
|
|
608
|
-
|
|
609
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
610
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
611
|
-
|
|
612
|
-
/** Used for built-in method references. */
|
|
613
|
-
var objectProto$1 = Object.prototype;
|
|
614
|
-
|
|
615
|
-
/** Used to check objects for own properties. */
|
|
616
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Gets the hash value for `key`.
|
|
620
|
-
*
|
|
621
|
-
* @private
|
|
622
|
-
* @name get
|
|
623
|
-
* @memberOf Hash
|
|
624
|
-
* @param {string} key The key of the value to get.
|
|
625
|
-
* @returns {*} Returns the entry value.
|
|
626
|
-
*/
|
|
627
|
-
function hashGet(key) {
|
|
628
|
-
var data = this.__data__;
|
|
629
|
-
if (_nativeCreate) {
|
|
630
|
-
var result = data[key];
|
|
631
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
632
|
-
}
|
|
633
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
var _hashGet = hashGet;
|
|
637
|
-
|
|
638
|
-
/** Used for built-in method references. */
|
|
639
|
-
var objectProto = Object.prototype;
|
|
640
|
-
|
|
641
|
-
/** Used to check objects for own properties. */
|
|
642
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* Checks if a hash value for `key` exists.
|
|
646
|
-
*
|
|
647
|
-
* @private
|
|
648
|
-
* @name has
|
|
649
|
-
* @memberOf Hash
|
|
650
|
-
* @param {string} key The key of the entry to check.
|
|
651
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
652
|
-
*/
|
|
653
|
-
function hashHas(key) {
|
|
654
|
-
var data = this.__data__;
|
|
655
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
var _hashHas = hashHas;
|
|
659
|
-
|
|
660
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
661
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Sets the hash `key` to `value`.
|
|
665
|
-
*
|
|
666
|
-
* @private
|
|
667
|
-
* @name set
|
|
668
|
-
* @memberOf Hash
|
|
669
|
-
* @param {string} key The key of the value to set.
|
|
670
|
-
* @param {*} value The value to set.
|
|
671
|
-
* @returns {Object} Returns the hash instance.
|
|
672
|
-
*/
|
|
673
|
-
function hashSet(key, value) {
|
|
674
|
-
var data = this.__data__;
|
|
675
|
-
this.size += this.has(key) ? 0 : 1;
|
|
676
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
677
|
-
return this;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
var _hashSet = hashSet;
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Creates a hash object.
|
|
684
|
-
*
|
|
685
|
-
* @private
|
|
686
|
-
* @constructor
|
|
687
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
688
|
-
*/
|
|
689
|
-
function Hash(entries) {
|
|
690
|
-
var index = -1,
|
|
691
|
-
length = entries == null ? 0 : entries.length;
|
|
692
|
-
|
|
693
|
-
this.clear();
|
|
694
|
-
while (++index < length) {
|
|
695
|
-
var entry = entries[index];
|
|
696
|
-
this.set(entry[0], entry[1]);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
// Add methods to `Hash`.
|
|
701
|
-
Hash.prototype.clear = _hashClear;
|
|
702
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
703
|
-
Hash.prototype.get = _hashGet;
|
|
704
|
-
Hash.prototype.has = _hashHas;
|
|
705
|
-
Hash.prototype.set = _hashSet;
|
|
706
|
-
|
|
707
|
-
var _Hash = Hash;
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* Removes all key-value entries from the list cache.
|
|
711
|
-
*
|
|
712
|
-
* @private
|
|
713
|
-
* @name clear
|
|
714
|
-
* @memberOf ListCache
|
|
715
|
-
*/
|
|
716
|
-
function listCacheClear() {
|
|
717
|
-
this.__data__ = [];
|
|
718
|
-
this.size = 0;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
var _listCacheClear = listCacheClear;
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* Performs a
|
|
725
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
726
|
-
* comparison between two values to determine if they are equivalent.
|
|
727
|
-
*
|
|
728
|
-
* @static
|
|
729
|
-
* @memberOf _
|
|
730
|
-
* @since 4.0.0
|
|
731
|
-
* @category Lang
|
|
732
|
-
* @param {*} value The value to compare.
|
|
733
|
-
* @param {*} other The other value to compare.
|
|
734
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
735
|
-
* @example
|
|
736
|
-
*
|
|
737
|
-
* var object = { 'a': 1 };
|
|
738
|
-
* var other = { 'a': 1 };
|
|
739
|
-
*
|
|
740
|
-
* _.eq(object, object);
|
|
741
|
-
* // => true
|
|
742
|
-
*
|
|
743
|
-
* _.eq(object, other);
|
|
744
|
-
* // => false
|
|
745
|
-
*
|
|
746
|
-
* _.eq('a', 'a');
|
|
747
|
-
* // => true
|
|
748
|
-
*
|
|
749
|
-
* _.eq('a', Object('a'));
|
|
750
|
-
* // => false
|
|
751
|
-
*
|
|
752
|
-
* _.eq(NaN, NaN);
|
|
753
|
-
* // => true
|
|
754
|
-
*/
|
|
755
|
-
function eq(value, other) {
|
|
756
|
-
return value === other || (value !== value && other !== other);
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
var eq_1 = eq;
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
763
|
-
*
|
|
764
|
-
* @private
|
|
765
|
-
* @param {Array} array The array to inspect.
|
|
766
|
-
* @param {*} key The key to search for.
|
|
767
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
768
|
-
*/
|
|
769
|
-
function assocIndexOf(array, key) {
|
|
770
|
-
var length = array.length;
|
|
771
|
-
while (length--) {
|
|
772
|
-
if (eq_1(array[length][0], key)) {
|
|
773
|
-
return length;
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
return -1;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
var _assocIndexOf = assocIndexOf;
|
|
780
|
-
|
|
781
|
-
/** Used for built-in method references. */
|
|
782
|
-
var arrayProto = Array.prototype;
|
|
783
|
-
|
|
784
|
-
/** Built-in value references. */
|
|
785
|
-
var splice = arrayProto.splice;
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* Removes `key` and its value from the list cache.
|
|
789
|
-
*
|
|
790
|
-
* @private
|
|
791
|
-
* @name delete
|
|
792
|
-
* @memberOf ListCache
|
|
793
|
-
* @param {string} key The key of the value to remove.
|
|
794
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
795
|
-
*/
|
|
796
|
-
function listCacheDelete(key) {
|
|
797
|
-
var data = this.__data__,
|
|
798
|
-
index = _assocIndexOf(data, key);
|
|
799
|
-
|
|
800
|
-
if (index < 0) {
|
|
801
|
-
return false;
|
|
802
|
-
}
|
|
803
|
-
var lastIndex = data.length - 1;
|
|
804
|
-
if (index == lastIndex) {
|
|
805
|
-
data.pop();
|
|
806
|
-
} else {
|
|
807
|
-
splice.call(data, index, 1);
|
|
808
|
-
}
|
|
809
|
-
--this.size;
|
|
810
|
-
return true;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
var _listCacheDelete = listCacheDelete;
|
|
814
|
-
|
|
815
|
-
/**
|
|
816
|
-
* Gets the list cache value for `key`.
|
|
817
|
-
*
|
|
818
|
-
* @private
|
|
819
|
-
* @name get
|
|
820
|
-
* @memberOf ListCache
|
|
821
|
-
* @param {string} key The key of the value to get.
|
|
822
|
-
* @returns {*} Returns the entry value.
|
|
823
|
-
*/
|
|
824
|
-
function listCacheGet(key) {
|
|
825
|
-
var data = this.__data__,
|
|
826
|
-
index = _assocIndexOf(data, key);
|
|
827
|
-
|
|
828
|
-
return index < 0 ? undefined : data[index][1];
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
var _listCacheGet = listCacheGet;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Checks if a list cache value for `key` exists.
|
|
835
|
-
*
|
|
836
|
-
* @private
|
|
837
|
-
* @name has
|
|
838
|
-
* @memberOf ListCache
|
|
839
|
-
* @param {string} key The key of the entry to check.
|
|
840
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
841
|
-
*/
|
|
842
|
-
function listCacheHas(key) {
|
|
843
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
var _listCacheHas = listCacheHas;
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* Sets the list cache `key` to `value`.
|
|
850
|
-
*
|
|
851
|
-
* @private
|
|
852
|
-
* @name set
|
|
853
|
-
* @memberOf ListCache
|
|
854
|
-
* @param {string} key The key of the value to set.
|
|
855
|
-
* @param {*} value The value to set.
|
|
856
|
-
* @returns {Object} Returns the list cache instance.
|
|
857
|
-
*/
|
|
858
|
-
function listCacheSet(key, value) {
|
|
859
|
-
var data = this.__data__,
|
|
860
|
-
index = _assocIndexOf(data, key);
|
|
861
|
-
|
|
862
|
-
if (index < 0) {
|
|
863
|
-
++this.size;
|
|
864
|
-
data.push([key, value]);
|
|
865
|
-
} else {
|
|
866
|
-
data[index][1] = value;
|
|
867
|
-
}
|
|
868
|
-
return this;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
var _listCacheSet = listCacheSet;
|
|
872
|
-
|
|
873
|
-
/**
|
|
874
|
-
* Creates an list cache object.
|
|
875
|
-
*
|
|
876
|
-
* @private
|
|
877
|
-
* @constructor
|
|
878
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
879
|
-
*/
|
|
880
|
-
function ListCache(entries) {
|
|
881
|
-
var index = -1,
|
|
882
|
-
length = entries == null ? 0 : entries.length;
|
|
883
|
-
|
|
884
|
-
this.clear();
|
|
885
|
-
while (++index < length) {
|
|
886
|
-
var entry = entries[index];
|
|
887
|
-
this.set(entry[0], entry[1]);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
// Add methods to `ListCache`.
|
|
892
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
893
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
894
|
-
ListCache.prototype.get = _listCacheGet;
|
|
895
|
-
ListCache.prototype.has = _listCacheHas;
|
|
896
|
-
ListCache.prototype.set = _listCacheSet;
|
|
897
|
-
|
|
898
|
-
var _ListCache = ListCache;
|
|
899
|
-
|
|
900
|
-
/* Built-in method references that are verified to be native. */
|
|
901
|
-
var Map = _getNative(_root, 'Map');
|
|
902
|
-
|
|
903
|
-
var _Map = Map;
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Removes all key-value entries from the map.
|
|
907
|
-
*
|
|
908
|
-
* @private
|
|
909
|
-
* @name clear
|
|
910
|
-
* @memberOf MapCache
|
|
911
|
-
*/
|
|
912
|
-
function mapCacheClear() {
|
|
913
|
-
this.size = 0;
|
|
914
|
-
this.__data__ = {
|
|
915
|
-
'hash': new _Hash,
|
|
916
|
-
'map': new (_Map || _ListCache),
|
|
917
|
-
'string': new _Hash
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
var _mapCacheClear = mapCacheClear;
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
925
|
-
*
|
|
926
|
-
* @private
|
|
927
|
-
* @param {*} value The value to check.
|
|
928
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
929
|
-
*/
|
|
930
|
-
function isKeyable(value) {
|
|
931
|
-
var type = typeof value;
|
|
932
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
933
|
-
? (value !== '__proto__')
|
|
934
|
-
: (value === null);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
var _isKeyable = isKeyable;
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* Gets the data for `map`.
|
|
941
|
-
*
|
|
942
|
-
* @private
|
|
943
|
-
* @param {Object} map The map to query.
|
|
944
|
-
* @param {string} key The reference key.
|
|
945
|
-
* @returns {*} Returns the map data.
|
|
946
|
-
*/
|
|
947
|
-
function getMapData(map, key) {
|
|
948
|
-
var data = map.__data__;
|
|
949
|
-
return _isKeyable(key)
|
|
950
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
951
|
-
: data.map;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
var _getMapData = getMapData;
|
|
955
|
-
|
|
956
|
-
/**
|
|
957
|
-
* Removes `key` and its value from the map.
|
|
958
|
-
*
|
|
959
|
-
* @private
|
|
960
|
-
* @name delete
|
|
961
|
-
* @memberOf MapCache
|
|
962
|
-
* @param {string} key The key of the value to remove.
|
|
963
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
964
|
-
*/
|
|
965
|
-
function mapCacheDelete(key) {
|
|
966
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
967
|
-
this.size -= result ? 1 : 0;
|
|
968
|
-
return result;
|
|
969
|
-
}
|
|
5
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
var lodash = require('lodash');
|
|
9
|
+
var components = require('@quintype/components');
|
|
10
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
11
|
+
require('@babel/runtime/helpers/typeof');
|
|
12
|
+
require('@babel/runtime/regenerator');
|
|
13
|
+
require('react-timeago');
|
|
14
|
+
require('date-fns-tz');
|
|
15
|
+
var reactRedux = require('react-redux');
|
|
970
16
|
|
|
971
|
-
|
|
17
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
972
18
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
* @private
|
|
977
|
-
* @name get
|
|
978
|
-
* @memberOf MapCache
|
|
979
|
-
* @param {string} key The key of the value to get.
|
|
980
|
-
* @returns {*} Returns the entry value.
|
|
981
|
-
*/
|
|
982
|
-
function mapCacheGet(key) {
|
|
983
|
-
return _getMapData(this, key).get(key);
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
var _mapCacheGet = mapCacheGet;
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* Checks if a map value for `key` exists.
|
|
990
|
-
*
|
|
991
|
-
* @private
|
|
992
|
-
* @name has
|
|
993
|
-
* @memberOf MapCache
|
|
994
|
-
* @param {string} key The key of the entry to check.
|
|
995
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
996
|
-
*/
|
|
997
|
-
function mapCacheHas(key) {
|
|
998
|
-
return _getMapData(this, key).has(key);
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
var _mapCacheHas = mapCacheHas;
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* Sets the map `key` to `value`.
|
|
1005
|
-
*
|
|
1006
|
-
* @private
|
|
1007
|
-
* @name set
|
|
1008
|
-
* @memberOf MapCache
|
|
1009
|
-
* @param {string} key The key of the value to set.
|
|
1010
|
-
* @param {*} value The value to set.
|
|
1011
|
-
* @returns {Object} Returns the map cache instance.
|
|
1012
|
-
*/
|
|
1013
|
-
function mapCacheSet(key, value) {
|
|
1014
|
-
var data = _getMapData(this, key),
|
|
1015
|
-
size = data.size;
|
|
1016
|
-
|
|
1017
|
-
data.set(key, value);
|
|
1018
|
-
this.size += data.size == size ? 0 : 1;
|
|
1019
|
-
return this;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
var _mapCacheSet = mapCacheSet;
|
|
1023
|
-
|
|
1024
|
-
/**
|
|
1025
|
-
* Creates a map cache object to store key-value pairs.
|
|
1026
|
-
*
|
|
1027
|
-
* @private
|
|
1028
|
-
* @constructor
|
|
1029
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1030
|
-
*/
|
|
1031
|
-
function MapCache(entries) {
|
|
1032
|
-
var index = -1,
|
|
1033
|
-
length = entries == null ? 0 : entries.length;
|
|
1034
|
-
|
|
1035
|
-
this.clear();
|
|
1036
|
-
while (++index < length) {
|
|
1037
|
-
var entry = entries[index];
|
|
1038
|
-
this.set(entry[0], entry[1]);
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
// Add methods to `MapCache`.
|
|
1043
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1044
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1045
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1046
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1047
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1048
|
-
|
|
1049
|
-
var _MapCache = MapCache;
|
|
1050
|
-
|
|
1051
|
-
/** Error message constants. */
|
|
1052
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1053
|
-
|
|
1054
|
-
/**
|
|
1055
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1056
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1057
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1058
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1059
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1060
|
-
*
|
|
1061
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1062
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1063
|
-
* constructor with one whose instances implement the
|
|
1064
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1065
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1066
|
-
*
|
|
1067
|
-
* @static
|
|
1068
|
-
* @memberOf _
|
|
1069
|
-
* @since 0.1.0
|
|
1070
|
-
* @category Function
|
|
1071
|
-
* @param {Function} func The function to have its output memoized.
|
|
1072
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1073
|
-
* @returns {Function} Returns the new memoized function.
|
|
1074
|
-
* @example
|
|
1075
|
-
*
|
|
1076
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1077
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1078
|
-
*
|
|
1079
|
-
* var values = _.memoize(_.values);
|
|
1080
|
-
* values(object);
|
|
1081
|
-
* // => [1, 2]
|
|
1082
|
-
*
|
|
1083
|
-
* values(other);
|
|
1084
|
-
* // => [3, 4]
|
|
1085
|
-
*
|
|
1086
|
-
* object.a = 2;
|
|
1087
|
-
* values(object);
|
|
1088
|
-
* // => [1, 2]
|
|
1089
|
-
*
|
|
1090
|
-
* // Modify the result cache.
|
|
1091
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1092
|
-
* values(object);
|
|
1093
|
-
* // => ['a', 'b']
|
|
1094
|
-
*
|
|
1095
|
-
* // Replace `_.memoize.Cache`.
|
|
1096
|
-
* _.memoize.Cache = WeakMap;
|
|
1097
|
-
*/
|
|
1098
|
-
function memoize(func, resolver) {
|
|
1099
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1100
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1101
|
-
}
|
|
1102
|
-
var memoized = function() {
|
|
1103
|
-
var args = arguments,
|
|
1104
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1105
|
-
cache = memoized.cache;
|
|
1106
|
-
|
|
1107
|
-
if (cache.has(key)) {
|
|
1108
|
-
return cache.get(key);
|
|
1109
|
-
}
|
|
1110
|
-
var result = func.apply(this, args);
|
|
1111
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1112
|
-
return result;
|
|
1113
|
-
};
|
|
1114
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1115
|
-
return memoized;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
// Expose `MapCache`.
|
|
1119
|
-
memoize.Cache = _MapCache;
|
|
1120
|
-
|
|
1121
|
-
var memoize_1 = memoize;
|
|
1122
|
-
|
|
1123
|
-
/** Used as the maximum memoize cache size. */
|
|
1124
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1128
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1129
|
-
*
|
|
1130
|
-
* @private
|
|
1131
|
-
* @param {Function} func The function to have its output memoized.
|
|
1132
|
-
* @returns {Function} Returns the new memoized function.
|
|
1133
|
-
*/
|
|
1134
|
-
function memoizeCapped(func) {
|
|
1135
|
-
var result = memoize_1(func, function(key) {
|
|
1136
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1137
|
-
cache.clear();
|
|
1138
|
-
}
|
|
1139
|
-
return key;
|
|
1140
|
-
});
|
|
1141
|
-
|
|
1142
|
-
var cache = result.cache;
|
|
1143
|
-
return result;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
var _memoizeCapped = memoizeCapped;
|
|
1147
|
-
|
|
1148
|
-
/** Used to match property names within property paths. */
|
|
1149
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1150
|
-
|
|
1151
|
-
/** Used to match backslashes in property paths. */
|
|
1152
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1153
|
-
|
|
1154
|
-
/**
|
|
1155
|
-
* Converts `string` to a property path array.
|
|
1156
|
-
*
|
|
1157
|
-
* @private
|
|
1158
|
-
* @param {string} string The string to convert.
|
|
1159
|
-
* @returns {Array} Returns the property path array.
|
|
1160
|
-
*/
|
|
1161
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1162
|
-
var result = [];
|
|
1163
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1164
|
-
result.push('');
|
|
1165
|
-
}
|
|
1166
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1167
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1168
|
-
});
|
|
1169
|
-
return result;
|
|
1170
|
-
});
|
|
1171
|
-
|
|
1172
|
-
var _stringToPath = stringToPath;
|
|
1173
|
-
|
|
1174
|
-
/**
|
|
1175
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1176
|
-
* shorthands.
|
|
1177
|
-
*
|
|
1178
|
-
* @private
|
|
1179
|
-
* @param {Array} [array] The array to iterate over.
|
|
1180
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1181
|
-
* @returns {Array} Returns the new mapped array.
|
|
1182
|
-
*/
|
|
1183
|
-
function arrayMap(array, iteratee) {
|
|
1184
|
-
var index = -1,
|
|
1185
|
-
length = array == null ? 0 : array.length,
|
|
1186
|
-
result = Array(length);
|
|
1187
|
-
|
|
1188
|
-
while (++index < length) {
|
|
1189
|
-
result[index] = iteratee(array[index], index, array);
|
|
1190
|
-
}
|
|
1191
|
-
return result;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
var _arrayMap = arrayMap;
|
|
1195
|
-
|
|
1196
|
-
/** Used as references for various `Number` constants. */
|
|
1197
|
-
var INFINITY$1 = 1 / 0;
|
|
1198
|
-
|
|
1199
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1200
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1201
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1205
|
-
* values to empty strings.
|
|
1206
|
-
*
|
|
1207
|
-
* @private
|
|
1208
|
-
* @param {*} value The value to process.
|
|
1209
|
-
* @returns {string} Returns the string.
|
|
1210
|
-
*/
|
|
1211
|
-
function baseToString(value) {
|
|
1212
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1213
|
-
if (typeof value == 'string') {
|
|
1214
|
-
return value;
|
|
1215
|
-
}
|
|
1216
|
-
if (isArray_1(value)) {
|
|
1217
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
1218
|
-
return _arrayMap(value, baseToString) + '';
|
|
1219
|
-
}
|
|
1220
|
-
if (isSymbol_1(value)) {
|
|
1221
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
1222
|
-
}
|
|
1223
|
-
var result = (value + '');
|
|
1224
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
var _baseToString = baseToString;
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
1231
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1232
|
-
*
|
|
1233
|
-
* @static
|
|
1234
|
-
* @memberOf _
|
|
1235
|
-
* @since 4.0.0
|
|
1236
|
-
* @category Lang
|
|
1237
|
-
* @param {*} value The value to convert.
|
|
1238
|
-
* @returns {string} Returns the converted string.
|
|
1239
|
-
* @example
|
|
1240
|
-
*
|
|
1241
|
-
* _.toString(null);
|
|
1242
|
-
* // => ''
|
|
1243
|
-
*
|
|
1244
|
-
* _.toString(-0);
|
|
1245
|
-
* // => '-0'
|
|
1246
|
-
*
|
|
1247
|
-
* _.toString([1, 2, 3]);
|
|
1248
|
-
* // => '1,2,3'
|
|
1249
|
-
*/
|
|
1250
|
-
function toString(value) {
|
|
1251
|
-
return value == null ? '' : _baseToString(value);
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
var toString_1 = toString;
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* Casts `value` to a path array if it's not one.
|
|
1258
|
-
*
|
|
1259
|
-
* @private
|
|
1260
|
-
* @param {*} value The value to inspect.
|
|
1261
|
-
* @param {Object} [object] The object to query keys on.
|
|
1262
|
-
* @returns {Array} Returns the cast property path array.
|
|
1263
|
-
*/
|
|
1264
|
-
function castPath(value, object) {
|
|
1265
|
-
if (isArray_1(value)) {
|
|
1266
|
-
return value;
|
|
1267
|
-
}
|
|
1268
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1269
|
-
}
|
|
19
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
20
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
1270
22
|
|
|
1271
|
-
var
|
|
1272
|
-
|
|
1273
|
-
/** Used as references for various `Number` constants. */
|
|
1274
|
-
var INFINITY = 1 / 0;
|
|
1275
|
-
|
|
1276
|
-
/**
|
|
1277
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
1278
|
-
*
|
|
1279
|
-
* @private
|
|
1280
|
-
* @param {*} value The value to inspect.
|
|
1281
|
-
* @returns {string|symbol} Returns the key.
|
|
1282
|
-
*/
|
|
1283
|
-
function toKey(value) {
|
|
1284
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1285
|
-
return value;
|
|
1286
|
-
}
|
|
1287
|
-
var result = (value + '');
|
|
1288
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
var _toKey = toKey;
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
* The base implementation of `_.get` without support for default values.
|
|
1295
|
-
*
|
|
1296
|
-
* @private
|
|
1297
|
-
* @param {Object} object The object to query.
|
|
1298
|
-
* @param {Array|string} path The path of the property to get.
|
|
1299
|
-
* @returns {*} Returns the resolved value.
|
|
1300
|
-
*/
|
|
1301
|
-
function baseGet(object, path) {
|
|
1302
|
-
path = _castPath(path, object);
|
|
1303
|
-
|
|
1304
|
-
var index = 0,
|
|
1305
|
-
length = path.length;
|
|
1306
|
-
|
|
1307
|
-
while (object != null && index < length) {
|
|
1308
|
-
object = object[_toKey(path[index++])];
|
|
1309
|
-
}
|
|
1310
|
-
return (index && index == length) ? object : undefined;
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
var _baseGet = baseGet;
|
|
1314
|
-
|
|
1315
|
-
/**
|
|
1316
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
1317
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
1318
|
-
*
|
|
1319
|
-
* @static
|
|
1320
|
-
* @memberOf _
|
|
1321
|
-
* @since 3.7.0
|
|
1322
|
-
* @category Object
|
|
1323
|
-
* @param {Object} object The object to query.
|
|
1324
|
-
* @param {Array|string} path The path of the property to get.
|
|
1325
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
1326
|
-
* @returns {*} Returns the resolved value.
|
|
1327
|
-
* @example
|
|
1328
|
-
*
|
|
1329
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
1330
|
-
*
|
|
1331
|
-
* _.get(object, 'a[0].b.c');
|
|
1332
|
-
* // => 3
|
|
1333
|
-
*
|
|
1334
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
1335
|
-
* // => 3
|
|
1336
|
-
*
|
|
1337
|
-
* _.get(object, 'a.b.c', 'default');
|
|
1338
|
-
* // => 'default'
|
|
1339
|
-
*/
|
|
1340
|
-
function get(object, path, defaultValue) {
|
|
1341
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
1342
|
-
return result === undefined ? defaultValue : result;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
var get_1 = get;
|
|
1346
|
-
|
|
1347
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
23
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1348
24
|
var useStateValue = function useStateValue() {
|
|
1349
|
-
return useContext(StateContext);
|
|
25
|
+
return React.useContext(StateContext);
|
|
1350
26
|
};
|
|
1351
27
|
|
|
1352
|
-
/**
|
|
1353
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
1354
|
-
*
|
|
1355
|
-
* This source code is licensed under the MIT license found in the
|
|
1356
|
-
* LICENSE file in the root directory of this source tree.
|
|
1357
|
-
*/
|
|
1358
|
-
|
|
1359
|
-
createCommonjsModule(function (module) {
|
|
1360
|
-
var runtime = (function (exports) {
|
|
1361
|
-
|
|
1362
|
-
var Op = Object.prototype;
|
|
1363
|
-
var hasOwn = Op.hasOwnProperty;
|
|
1364
|
-
var undefined$1; // More compressible than void 0.
|
|
1365
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
1366
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
1367
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
1368
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
1369
|
-
|
|
1370
|
-
function define(obj, key, value) {
|
|
1371
|
-
Object.defineProperty(obj, key, {
|
|
1372
|
-
value: value,
|
|
1373
|
-
enumerable: true,
|
|
1374
|
-
configurable: true,
|
|
1375
|
-
writable: true
|
|
1376
|
-
});
|
|
1377
|
-
return obj[key];
|
|
1378
|
-
}
|
|
1379
|
-
try {
|
|
1380
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
1381
|
-
define({}, "");
|
|
1382
|
-
} catch (err) {
|
|
1383
|
-
define = function(obj, key, value) {
|
|
1384
|
-
return obj[key] = value;
|
|
1385
|
-
};
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
1389
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
1390
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
1391
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
1392
|
-
var context = new Context(tryLocsList || []);
|
|
1393
|
-
|
|
1394
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
1395
|
-
// .throw, and .return methods.
|
|
1396
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
1397
|
-
|
|
1398
|
-
return generator;
|
|
1399
|
-
}
|
|
1400
|
-
exports.wrap = wrap;
|
|
1401
|
-
|
|
1402
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
1403
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
1404
|
-
// have been (and was previously) designed to take a closure to be
|
|
1405
|
-
// invoked without arguments, but in all the cases we care about we
|
|
1406
|
-
// already have an existing method we want to call, so there's no need
|
|
1407
|
-
// to create a new function object. We can even get away with assuming
|
|
1408
|
-
// the method takes exactly one argument, since that happens to be true
|
|
1409
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
1410
|
-
// only additional allocation required is the completion record, which
|
|
1411
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
1412
|
-
function tryCatch(fn, obj, arg) {
|
|
1413
|
-
try {
|
|
1414
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
1415
|
-
} catch (err) {
|
|
1416
|
-
return { type: "throw", arg: err };
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
1421
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
1422
|
-
var GenStateExecuting = "executing";
|
|
1423
|
-
var GenStateCompleted = "completed";
|
|
1424
|
-
|
|
1425
|
-
// Returning this object from the innerFn has the same effect as
|
|
1426
|
-
// breaking out of the dispatch switch statement.
|
|
1427
|
-
var ContinueSentinel = {};
|
|
1428
|
-
|
|
1429
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
1430
|
-
// .constructor.prototype properties for functions that return Generator
|
|
1431
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
1432
|
-
// minifier not to mangle the names of these two functions.
|
|
1433
|
-
function Generator() {}
|
|
1434
|
-
function GeneratorFunction() {}
|
|
1435
|
-
function GeneratorFunctionPrototype() {}
|
|
1436
|
-
|
|
1437
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
1438
|
-
// don't natively support it.
|
|
1439
|
-
var IteratorPrototype = {};
|
|
1440
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
1441
|
-
return this;
|
|
1442
|
-
});
|
|
1443
|
-
|
|
1444
|
-
var getProto = Object.getPrototypeOf;
|
|
1445
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
1446
|
-
if (NativeIteratorPrototype &&
|
|
1447
|
-
NativeIteratorPrototype !== Op &&
|
|
1448
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
1449
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
1450
|
-
// of the polyfill.
|
|
1451
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
1455
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
1456
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
1457
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
1458
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
1459
|
-
GeneratorFunction.displayName = define(
|
|
1460
|
-
GeneratorFunctionPrototype,
|
|
1461
|
-
toStringTagSymbol,
|
|
1462
|
-
"GeneratorFunction"
|
|
1463
|
-
);
|
|
1464
|
-
|
|
1465
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
1466
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
1467
|
-
function defineIteratorMethods(prototype) {
|
|
1468
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
1469
|
-
define(prototype, method, function(arg) {
|
|
1470
|
-
return this._invoke(method, arg);
|
|
1471
|
-
});
|
|
1472
|
-
});
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
1476
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
1477
|
-
return ctor
|
|
1478
|
-
? ctor === GeneratorFunction ||
|
|
1479
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
1480
|
-
// do is to check its .name property.
|
|
1481
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
1482
|
-
: false;
|
|
1483
|
-
};
|
|
1484
|
-
|
|
1485
|
-
exports.mark = function(genFun) {
|
|
1486
|
-
if (Object.setPrototypeOf) {
|
|
1487
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
1488
|
-
} else {
|
|
1489
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
1490
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
1491
|
-
}
|
|
1492
|
-
genFun.prototype = Object.create(Gp);
|
|
1493
|
-
return genFun;
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
|
-
// Within the body of any async function, `await x` is transformed to
|
|
1497
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
1498
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
1499
|
-
// meant to be awaited.
|
|
1500
|
-
exports.awrap = function(arg) {
|
|
1501
|
-
return { __await: arg };
|
|
1502
|
-
};
|
|
1503
|
-
|
|
1504
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
1505
|
-
function invoke(method, arg, resolve, reject) {
|
|
1506
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
1507
|
-
if (record.type === "throw") {
|
|
1508
|
-
reject(record.arg);
|
|
1509
|
-
} else {
|
|
1510
|
-
var result = record.arg;
|
|
1511
|
-
var value = result.value;
|
|
1512
|
-
if (value &&
|
|
1513
|
-
typeof value === "object" &&
|
|
1514
|
-
hasOwn.call(value, "__await")) {
|
|
1515
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
1516
|
-
invoke("next", value, resolve, reject);
|
|
1517
|
-
}, function(err) {
|
|
1518
|
-
invoke("throw", err, resolve, reject);
|
|
1519
|
-
});
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
1523
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
1524
|
-
// the .value of the Promise<{value,done}> result for the
|
|
1525
|
-
// current iteration.
|
|
1526
|
-
result.value = unwrapped;
|
|
1527
|
-
resolve(result);
|
|
1528
|
-
}, function(error) {
|
|
1529
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
1530
|
-
// into the async generator function so it can be handled there.
|
|
1531
|
-
return invoke("throw", error, resolve, reject);
|
|
1532
|
-
});
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
var previousPromise;
|
|
1537
|
-
|
|
1538
|
-
function enqueue(method, arg) {
|
|
1539
|
-
function callInvokeWithMethodAndArg() {
|
|
1540
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
1541
|
-
invoke(method, arg, resolve, reject);
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
return previousPromise =
|
|
1546
|
-
// If enqueue has been called before, then we want to wait until
|
|
1547
|
-
// all previous Promises have been resolved before calling invoke,
|
|
1548
|
-
// so that results are always delivered in the correct order. If
|
|
1549
|
-
// enqueue has not been called before, then it is important to
|
|
1550
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
1551
|
-
// so that the async generator function has the opportunity to do
|
|
1552
|
-
// any necessary setup in a predictable way. This predictability
|
|
1553
|
-
// is why the Promise constructor synchronously invokes its
|
|
1554
|
-
// executor callback, and why async functions synchronously
|
|
1555
|
-
// execute code before the first await. Since we implement simple
|
|
1556
|
-
// async functions in terms of async generators, it is especially
|
|
1557
|
-
// important to get this right, even though it requires care.
|
|
1558
|
-
previousPromise ? previousPromise.then(
|
|
1559
|
-
callInvokeWithMethodAndArg,
|
|
1560
|
-
// Avoid propagating failures to Promises returned by later
|
|
1561
|
-
// invocations of the iterator.
|
|
1562
|
-
callInvokeWithMethodAndArg
|
|
1563
|
-
) : callInvokeWithMethodAndArg();
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
// Define the unified helper method that is used to implement .next,
|
|
1567
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
1568
|
-
this._invoke = enqueue;
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
1572
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
1573
|
-
return this;
|
|
1574
|
-
});
|
|
1575
|
-
exports.AsyncIterator = AsyncIterator;
|
|
1576
|
-
|
|
1577
|
-
// Note that simple async functions are implemented on top of
|
|
1578
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
1579
|
-
// the final result produced by the iterator.
|
|
1580
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
1581
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
1582
|
-
|
|
1583
|
-
var iter = new AsyncIterator(
|
|
1584
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
1585
|
-
PromiseImpl
|
|
1586
|
-
);
|
|
1587
|
-
|
|
1588
|
-
return exports.isGeneratorFunction(outerFn)
|
|
1589
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
1590
|
-
: iter.next().then(function(result) {
|
|
1591
|
-
return result.done ? result.value : iter.next();
|
|
1592
|
-
});
|
|
1593
|
-
};
|
|
1594
|
-
|
|
1595
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
1596
|
-
var state = GenStateSuspendedStart;
|
|
1597
|
-
|
|
1598
|
-
return function invoke(method, arg) {
|
|
1599
|
-
if (state === GenStateExecuting) {
|
|
1600
|
-
throw new Error("Generator is already running");
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
if (state === GenStateCompleted) {
|
|
1604
|
-
if (method === "throw") {
|
|
1605
|
-
throw arg;
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
1609
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
1610
|
-
return doneResult();
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
context.method = method;
|
|
1614
|
-
context.arg = arg;
|
|
1615
|
-
|
|
1616
|
-
while (true) {
|
|
1617
|
-
var delegate = context.delegate;
|
|
1618
|
-
if (delegate) {
|
|
1619
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
1620
|
-
if (delegateResult) {
|
|
1621
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
1622
|
-
return delegateResult;
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
if (context.method === "next") {
|
|
1627
|
-
// Setting context._sent for legacy support of Babel's
|
|
1628
|
-
// function.sent implementation.
|
|
1629
|
-
context.sent = context._sent = context.arg;
|
|
1630
|
-
|
|
1631
|
-
} else if (context.method === "throw") {
|
|
1632
|
-
if (state === GenStateSuspendedStart) {
|
|
1633
|
-
state = GenStateCompleted;
|
|
1634
|
-
throw context.arg;
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
context.dispatchException(context.arg);
|
|
1638
|
-
|
|
1639
|
-
} else if (context.method === "return") {
|
|
1640
|
-
context.abrupt("return", context.arg);
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
state = GenStateExecuting;
|
|
1644
|
-
|
|
1645
|
-
var record = tryCatch(innerFn, self, context);
|
|
1646
|
-
if (record.type === "normal") {
|
|
1647
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
1648
|
-
// GenStateExecuting and loop back for another invocation.
|
|
1649
|
-
state = context.done
|
|
1650
|
-
? GenStateCompleted
|
|
1651
|
-
: GenStateSuspendedYield;
|
|
1652
|
-
|
|
1653
|
-
if (record.arg === ContinueSentinel) {
|
|
1654
|
-
continue;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
return {
|
|
1658
|
-
value: record.arg,
|
|
1659
|
-
done: context.done
|
|
1660
|
-
};
|
|
1661
|
-
|
|
1662
|
-
} else if (record.type === "throw") {
|
|
1663
|
-
state = GenStateCompleted;
|
|
1664
|
-
// Dispatch the exception by looping back around to the
|
|
1665
|
-
// context.dispatchException(context.arg) call above.
|
|
1666
|
-
context.method = "throw";
|
|
1667
|
-
context.arg = record.arg;
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
};
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
1674
|
-
// result, either by returning a { value, done } result from the
|
|
1675
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
1676
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
1677
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
1678
|
-
var method = delegate.iterator[context.method];
|
|
1679
|
-
if (method === undefined$1) {
|
|
1680
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
1681
|
-
// method always terminates the yield* loop.
|
|
1682
|
-
context.delegate = null;
|
|
1683
|
-
|
|
1684
|
-
if (context.method === "throw") {
|
|
1685
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
1686
|
-
if (delegate.iterator["return"]) {
|
|
1687
|
-
// If the delegate iterator has a return method, give it a
|
|
1688
|
-
// chance to clean up.
|
|
1689
|
-
context.method = "return";
|
|
1690
|
-
context.arg = undefined$1;
|
|
1691
|
-
maybeInvokeDelegate(delegate, context);
|
|
1692
|
-
|
|
1693
|
-
if (context.method === "throw") {
|
|
1694
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
1695
|
-
// "return" to "throw", let that override the TypeError below.
|
|
1696
|
-
return ContinueSentinel;
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
context.method = "throw";
|
|
1701
|
-
context.arg = new TypeError(
|
|
1702
|
-
"The iterator does not provide a 'throw' method");
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
return ContinueSentinel;
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
1709
|
-
|
|
1710
|
-
if (record.type === "throw") {
|
|
1711
|
-
context.method = "throw";
|
|
1712
|
-
context.arg = record.arg;
|
|
1713
|
-
context.delegate = null;
|
|
1714
|
-
return ContinueSentinel;
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
var info = record.arg;
|
|
1718
|
-
|
|
1719
|
-
if (! info) {
|
|
1720
|
-
context.method = "throw";
|
|
1721
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
1722
|
-
context.delegate = null;
|
|
1723
|
-
return ContinueSentinel;
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
if (info.done) {
|
|
1727
|
-
// Assign the result of the finished delegate to the temporary
|
|
1728
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
1729
|
-
context[delegate.resultName] = info.value;
|
|
1730
|
-
|
|
1731
|
-
// Resume execution at the desired location (see delegateYield).
|
|
1732
|
-
context.next = delegate.nextLoc;
|
|
1733
|
-
|
|
1734
|
-
// If context.method was "throw" but the delegate handled the
|
|
1735
|
-
// exception, let the outer generator proceed normally. If
|
|
1736
|
-
// context.method was "next", forget context.arg since it has been
|
|
1737
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
1738
|
-
// "return", allow the original .return call to continue in the
|
|
1739
|
-
// outer generator.
|
|
1740
|
-
if (context.method !== "return") {
|
|
1741
|
-
context.method = "next";
|
|
1742
|
-
context.arg = undefined$1;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
} else {
|
|
1746
|
-
// Re-yield the result returned by the delegate method.
|
|
1747
|
-
return info;
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
1751
|
-
// the outer generator.
|
|
1752
|
-
context.delegate = null;
|
|
1753
|
-
return ContinueSentinel;
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
1757
|
-
// unified ._invoke helper method.
|
|
1758
|
-
defineIteratorMethods(Gp);
|
|
1759
|
-
|
|
1760
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
1761
|
-
|
|
1762
|
-
// A Generator should always return itself as the iterator object when the
|
|
1763
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
1764
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
1765
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1766
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1767
|
-
define(Gp, iteratorSymbol, function() {
|
|
1768
|
-
return this;
|
|
1769
|
-
});
|
|
1770
|
-
|
|
1771
|
-
define(Gp, "toString", function() {
|
|
1772
|
-
return "[object Generator]";
|
|
1773
|
-
});
|
|
1774
|
-
|
|
1775
|
-
function pushTryEntry(locs) {
|
|
1776
|
-
var entry = { tryLoc: locs[0] };
|
|
1777
|
-
|
|
1778
|
-
if (1 in locs) {
|
|
1779
|
-
entry.catchLoc = locs[1];
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
if (2 in locs) {
|
|
1783
|
-
entry.finallyLoc = locs[2];
|
|
1784
|
-
entry.afterLoc = locs[3];
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
this.tryEntries.push(entry);
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
function resetTryEntry(entry) {
|
|
1791
|
-
var record = entry.completion || {};
|
|
1792
|
-
record.type = "normal";
|
|
1793
|
-
delete record.arg;
|
|
1794
|
-
entry.completion = record;
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
function Context(tryLocsList) {
|
|
1798
|
-
// The root entry object (effectively a try statement without a catch
|
|
1799
|
-
// or a finally block) gives us a place to store values thrown from
|
|
1800
|
-
// locations where there is no enclosing try statement.
|
|
1801
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
1802
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
1803
|
-
this.reset(true);
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
exports.keys = function(object) {
|
|
1807
|
-
var keys = [];
|
|
1808
|
-
for (var key in object) {
|
|
1809
|
-
keys.push(key);
|
|
1810
|
-
}
|
|
1811
|
-
keys.reverse();
|
|
1812
|
-
|
|
1813
|
-
// Rather than returning an object with a next method, we keep
|
|
1814
|
-
// things simple and return the next function itself.
|
|
1815
|
-
return function next() {
|
|
1816
|
-
while (keys.length) {
|
|
1817
|
-
var key = keys.pop();
|
|
1818
|
-
if (key in object) {
|
|
1819
|
-
next.value = key;
|
|
1820
|
-
next.done = false;
|
|
1821
|
-
return next;
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
// To avoid creating an additional object, we just hang the .value
|
|
1826
|
-
// and .done properties off the next function object itself. This
|
|
1827
|
-
// also ensures that the minifier will not anonymize the function.
|
|
1828
|
-
next.done = true;
|
|
1829
|
-
return next;
|
|
1830
|
-
};
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
function values(iterable) {
|
|
1834
|
-
if (iterable) {
|
|
1835
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
1836
|
-
if (iteratorMethod) {
|
|
1837
|
-
return iteratorMethod.call(iterable);
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
if (typeof iterable.next === "function") {
|
|
1841
|
-
return iterable;
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
if (!isNaN(iterable.length)) {
|
|
1845
|
-
var i = -1, next = function next() {
|
|
1846
|
-
while (++i < iterable.length) {
|
|
1847
|
-
if (hasOwn.call(iterable, i)) {
|
|
1848
|
-
next.value = iterable[i];
|
|
1849
|
-
next.done = false;
|
|
1850
|
-
return next;
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
next.value = undefined$1;
|
|
1855
|
-
next.done = true;
|
|
1856
|
-
|
|
1857
|
-
return next;
|
|
1858
|
-
};
|
|
1859
|
-
|
|
1860
|
-
return next.next = next;
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
// Return an iterator with no values.
|
|
1865
|
-
return { next: doneResult };
|
|
1866
|
-
}
|
|
1867
|
-
exports.values = values;
|
|
1868
|
-
|
|
1869
|
-
function doneResult() {
|
|
1870
|
-
return { value: undefined$1, done: true };
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
Context.prototype = {
|
|
1874
|
-
constructor: Context,
|
|
1875
|
-
|
|
1876
|
-
reset: function(skipTempReset) {
|
|
1877
|
-
this.prev = 0;
|
|
1878
|
-
this.next = 0;
|
|
1879
|
-
// Resetting context._sent for legacy support of Babel's
|
|
1880
|
-
// function.sent implementation.
|
|
1881
|
-
this.sent = this._sent = undefined$1;
|
|
1882
|
-
this.done = false;
|
|
1883
|
-
this.delegate = null;
|
|
1884
|
-
|
|
1885
|
-
this.method = "next";
|
|
1886
|
-
this.arg = undefined$1;
|
|
1887
|
-
|
|
1888
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
1889
|
-
|
|
1890
|
-
if (!skipTempReset) {
|
|
1891
|
-
for (var name in this) {
|
|
1892
|
-
// Not sure about the optimal order of these conditions:
|
|
1893
|
-
if (name.charAt(0) === "t" &&
|
|
1894
|
-
hasOwn.call(this, name) &&
|
|
1895
|
-
!isNaN(+name.slice(1))) {
|
|
1896
|
-
this[name] = undefined$1;
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
},
|
|
1901
|
-
|
|
1902
|
-
stop: function() {
|
|
1903
|
-
this.done = true;
|
|
1904
|
-
|
|
1905
|
-
var rootEntry = this.tryEntries[0];
|
|
1906
|
-
var rootRecord = rootEntry.completion;
|
|
1907
|
-
if (rootRecord.type === "throw") {
|
|
1908
|
-
throw rootRecord.arg;
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
return this.rval;
|
|
1912
|
-
},
|
|
1913
|
-
|
|
1914
|
-
dispatchException: function(exception) {
|
|
1915
|
-
if (this.done) {
|
|
1916
|
-
throw exception;
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
var context = this;
|
|
1920
|
-
function handle(loc, caught) {
|
|
1921
|
-
record.type = "throw";
|
|
1922
|
-
record.arg = exception;
|
|
1923
|
-
context.next = loc;
|
|
1924
|
-
|
|
1925
|
-
if (caught) {
|
|
1926
|
-
// If the dispatched exception was caught by a catch block,
|
|
1927
|
-
// then let that catch block handle the exception normally.
|
|
1928
|
-
context.method = "next";
|
|
1929
|
-
context.arg = undefined$1;
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
return !! caught;
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1936
|
-
var entry = this.tryEntries[i];
|
|
1937
|
-
var record = entry.completion;
|
|
1938
|
-
|
|
1939
|
-
if (entry.tryLoc === "root") {
|
|
1940
|
-
// Exception thrown outside of any try block that could handle
|
|
1941
|
-
// it, so set the completion value of the entire function to
|
|
1942
|
-
// throw the exception.
|
|
1943
|
-
return handle("end");
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
if (entry.tryLoc <= this.prev) {
|
|
1947
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
1948
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
1949
|
-
|
|
1950
|
-
if (hasCatch && hasFinally) {
|
|
1951
|
-
if (this.prev < entry.catchLoc) {
|
|
1952
|
-
return handle(entry.catchLoc, true);
|
|
1953
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
1954
|
-
return handle(entry.finallyLoc);
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
} else if (hasCatch) {
|
|
1958
|
-
if (this.prev < entry.catchLoc) {
|
|
1959
|
-
return handle(entry.catchLoc, true);
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
} else if (hasFinally) {
|
|
1963
|
-
if (this.prev < entry.finallyLoc) {
|
|
1964
|
-
return handle(entry.finallyLoc);
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
} else {
|
|
1968
|
-
throw new Error("try statement without catch or finally");
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
},
|
|
1973
|
-
|
|
1974
|
-
abrupt: function(type, arg) {
|
|
1975
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1976
|
-
var entry = this.tryEntries[i];
|
|
1977
|
-
if (entry.tryLoc <= this.prev &&
|
|
1978
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
1979
|
-
this.prev < entry.finallyLoc) {
|
|
1980
|
-
var finallyEntry = entry;
|
|
1981
|
-
break;
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
if (finallyEntry &&
|
|
1986
|
-
(type === "break" ||
|
|
1987
|
-
type === "continue") &&
|
|
1988
|
-
finallyEntry.tryLoc <= arg &&
|
|
1989
|
-
arg <= finallyEntry.finallyLoc) {
|
|
1990
|
-
// Ignore the finally entry if control is not jumping to a
|
|
1991
|
-
// location outside the try/catch block.
|
|
1992
|
-
finallyEntry = null;
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
1996
|
-
record.type = type;
|
|
1997
|
-
record.arg = arg;
|
|
1998
|
-
|
|
1999
|
-
if (finallyEntry) {
|
|
2000
|
-
this.method = "next";
|
|
2001
|
-
this.next = finallyEntry.finallyLoc;
|
|
2002
|
-
return ContinueSentinel;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
return this.complete(record);
|
|
2006
|
-
},
|
|
2007
|
-
|
|
2008
|
-
complete: function(record, afterLoc) {
|
|
2009
|
-
if (record.type === "throw") {
|
|
2010
|
-
throw record.arg;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
if (record.type === "break" ||
|
|
2014
|
-
record.type === "continue") {
|
|
2015
|
-
this.next = record.arg;
|
|
2016
|
-
} else if (record.type === "return") {
|
|
2017
|
-
this.rval = this.arg = record.arg;
|
|
2018
|
-
this.method = "return";
|
|
2019
|
-
this.next = "end";
|
|
2020
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2021
|
-
this.next = afterLoc;
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
return ContinueSentinel;
|
|
2025
|
-
},
|
|
2026
|
-
|
|
2027
|
-
finish: function(finallyLoc) {
|
|
2028
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2029
|
-
var entry = this.tryEntries[i];
|
|
2030
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2031
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2032
|
-
resetTryEntry(entry);
|
|
2033
|
-
return ContinueSentinel;
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
},
|
|
2037
|
-
|
|
2038
|
-
"catch": function(tryLoc) {
|
|
2039
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2040
|
-
var entry = this.tryEntries[i];
|
|
2041
|
-
if (entry.tryLoc === tryLoc) {
|
|
2042
|
-
var record = entry.completion;
|
|
2043
|
-
if (record.type === "throw") {
|
|
2044
|
-
var thrown = record.arg;
|
|
2045
|
-
resetTryEntry(entry);
|
|
2046
|
-
}
|
|
2047
|
-
return thrown;
|
|
2048
|
-
}
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
// The context.catch method must only be called with a location
|
|
2052
|
-
// argument that corresponds to a known catch block.
|
|
2053
|
-
throw new Error("illegal catch attempt");
|
|
2054
|
-
},
|
|
2055
|
-
|
|
2056
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2057
|
-
this.delegate = {
|
|
2058
|
-
iterator: values(iterable),
|
|
2059
|
-
resultName: resultName,
|
|
2060
|
-
nextLoc: nextLoc
|
|
2061
|
-
};
|
|
2062
|
-
|
|
2063
|
-
if (this.method === "next") {
|
|
2064
|
-
// Deliberately forget the last sent value so that we don't
|
|
2065
|
-
// accidentally pass it on to the delegate.
|
|
2066
|
-
this.arg = undefined$1;
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
return ContinueSentinel;
|
|
2070
|
-
}
|
|
2071
|
-
};
|
|
2072
|
-
|
|
2073
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
2074
|
-
// or not, return the runtime object so that we can declare the variable
|
|
2075
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
2076
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
2077
|
-
return exports;
|
|
2078
|
-
|
|
2079
|
-
}(
|
|
2080
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
2081
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
2082
|
-
// object. Either way, the resulting object will be used to initialize
|
|
2083
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
2084
|
-
module.exports
|
|
2085
|
-
));
|
|
2086
|
-
|
|
2087
|
-
try {
|
|
2088
|
-
regeneratorRuntime = runtime;
|
|
2089
|
-
} catch (accidentalStrictMode) {
|
|
2090
|
-
// This module should not be running in strict mode, so the above
|
|
2091
|
-
// assignment should always work unless something is misconfigured. Just
|
|
2092
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
2093
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
2094
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
2095
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
2096
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
2097
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
2098
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
2099
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
2100
|
-
if (typeof globalThis === "object") {
|
|
2101
|
-
globalThis.regeneratorRuntime = runtime;
|
|
2102
|
-
} else {
|
|
2103
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
2104
|
-
}
|
|
2105
|
-
}
|
|
2106
|
-
});
|
|
2107
|
-
|
|
2108
28
|
var hexToRGB = function hexToRGB(hex) {
|
|
2109
29
|
var r = parseInt(hex.slice(1, 3), 16);
|
|
2110
30
|
var g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -2135,15 +55,15 @@ var getTextColor = function getTextColor() {
|
|
|
2135
55
|
var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
|
|
2136
56
|
return textColor;
|
|
2137
57
|
};
|
|
2138
|
-
|
|
2139
|
-
"sketches-host":
|
|
2140
|
-
"cdn-name":
|
|
2141
|
-
"cdn-image":
|
|
58
|
+
PropTypes__default["default"].shape({
|
|
59
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
60
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
61
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2142
62
|
});
|
|
2143
|
-
|
|
2144
|
-
headline:
|
|
2145
|
-
"last-published-at":
|
|
2146
|
-
subheadline:
|
|
63
|
+
PropTypes__default["default"].shape({
|
|
64
|
+
headline: PropTypes__default["default"].string,
|
|
65
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
66
|
+
subheadline: PropTypes__default["default"].string
|
|
2147
67
|
});
|
|
2148
68
|
|
|
2149
69
|
var _styleModuleImportMap = {
|
|
@@ -2169,9 +89,9 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2169
89
|
_ref$config = _ref.config,
|
|
2170
90
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
2171
91
|
var configData = useStateValue() || {};
|
|
2172
|
-
var isAuthor =
|
|
92
|
+
var isAuthor = lodash.get(configData, ["showAuthor"], true);
|
|
2173
93
|
|
|
2174
|
-
var _get =
|
|
94
|
+
var _get = lodash.get(story, ["authors", "0"], ""),
|
|
2175
95
|
avatarUrl = _get["avatar-url"],
|
|
2176
96
|
avatarS3Key = _get["avatar-s3-key"],
|
|
2177
97
|
authorName = _get.name,
|
|
@@ -2179,17 +99,17 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2179
99
|
|
|
2180
100
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
2181
101
|
var textColor = getTextColor(configData.theme);
|
|
2182
|
-
var mountAt =
|
|
102
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
2183
103
|
|
|
2184
104
|
var authorImage = function authorImage(dir) {
|
|
2185
105
|
if (!avatarUrl && !avatarS3Key) {
|
|
2186
106
|
return null;
|
|
2187
107
|
}
|
|
2188
108
|
|
|
2189
|
-
return /*#__PURE__*/
|
|
109
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2190
110
|
"data-test-id": "author-image",
|
|
2191
|
-
className:
|
|
2192
|
-
}, /*#__PURE__*/
|
|
111
|
+
className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap)
|
|
112
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
2193
113
|
slug: avatarS3Key,
|
|
2194
114
|
"aspect-ratio": [1, 1],
|
|
2195
115
|
defaultWidth: 400,
|
|
@@ -2197,49 +117,49 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2197
117
|
auto: ["format", "compress"]
|
|
2198
118
|
},
|
|
2199
119
|
alt: authorName
|
|
2200
|
-
}) : /*#__PURE__*/
|
|
120
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2201
121
|
src: avatarUrl
|
|
2202
122
|
})));
|
|
2203
123
|
};
|
|
2204
124
|
|
|
2205
125
|
var isPrefix = function isPrefix(dir) {
|
|
2206
126
|
if (prefix) {
|
|
2207
|
-
return /*#__PURE__*/
|
|
2208
|
-
className: "arr-author-prefix " +
|
|
127
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
128
|
+
className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap)
|
|
2209
129
|
}, prefix);
|
|
2210
130
|
}
|
|
2211
131
|
|
|
2212
132
|
return !hideAuthorImage && authorImage(dir);
|
|
2213
133
|
};
|
|
2214
134
|
|
|
2215
|
-
return /*#__PURE__*/
|
|
135
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2216
136
|
href: "".concat(mountAt, "/author/") + slug,
|
|
2217
137
|
"aria-label": "author-name",
|
|
2218
|
-
className: "author-name arr-author-name arrow-component " +
|
|
2219
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
138
|
+
className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap)
|
|
139
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2220
140
|
"data-test-id": "author-name",
|
|
2221
|
-
className: "author-name " +
|
|
141
|
+
className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap)
|
|
2222
142
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
2223
143
|
};
|
|
2224
144
|
|
|
2225
145
|
function mapStateToProps(state) {
|
|
2226
146
|
return {
|
|
2227
|
-
config:
|
|
147
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
2228
148
|
};
|
|
2229
149
|
}
|
|
2230
150
|
|
|
2231
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
151
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
2232
152
|
AuthorBase.propTypes = {
|
|
2233
153
|
/** The Story Object from the API response */
|
|
2234
|
-
story:
|
|
154
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
2235
155
|
|
|
2236
156
|
/** Hide Author Avatar Image */
|
|
2237
|
-
hideAuthorImage:
|
|
157
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
2238
158
|
// fix Author bottom of the storyCard
|
|
2239
|
-
isBottom:
|
|
159
|
+
isBottom: PropTypes__default["default"].bool,
|
|
2240
160
|
// fix prefix before the author name
|
|
2241
|
-
prefix:
|
|
2242
|
-
config:
|
|
161
|
+
prefix: PropTypes__default["default"].string,
|
|
162
|
+
config: PropTypes__default["default"].object
|
|
2243
163
|
};
|
|
2244
164
|
AuthorBase.defaultProps = {
|
|
2245
165
|
hideAuthorImage: false,
|
|
@@ -2247,4 +167,4 @@ AuthorBase.defaultProps = {
|
|
|
2247
167
|
prefix: ""
|
|
2248
168
|
};
|
|
2249
169
|
|
|
2250
|
-
|
|
170
|
+
exports.Author = Author;
|