@quintype/arrow 3.15.1-perf.1 → 3.15.1-perf.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +48 -2128
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +116 -2556
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +48 -2127
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-6f8c780e.js → index-0f809dd9.js} +73 -62
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-2d713010.js → index-37a9ccff.js} +63 -47
- package/atoms/ExtendedLoadMore/{index-8345922c.js → index-446679c8.js} +67 -51
- package/atoms/ExtendedLoadMore/{index-6daa674c.js → index-44f97338.js} +86 -68
- package/atoms/ExtendedLoadMore/{index-c8f346d0.js → index-57dd4870.js} +80 -64
- package/atoms/ExtendedLoadMore/{index-7eb05b3d.js → index-66dd4dbd.js} +70 -54
- package/atoms/ExtendedLoadMore/{index-6cb56d1a.js → index-8462c597.js} +93 -80
- package/atoms/ExtendedLoadMore/{index-aa8b8ab8.js → index-93cb06d1.js} +252 -226
- package/atoms/ExtendedLoadMore/index-afd44863.js +95 -0
- package/atoms/ExtendedLoadMore/{index-5a7900ba.js → index-b5754c5d.js} +67 -53
- package/atoms/ExtendedLoadMore/{index-4191a84c.js → index-bbaf526e.js} +78 -62
- package/atoms/ExtendedLoadMore/{index-99af722e.js → index-cfb262ef.js} +65 -48
- package/atoms/ExtendedLoadMore/index.js +20 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +95 -2175
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +91 -2230
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +40 -2133
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +89 -2241
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +40 -2120
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +35 -2115
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +43 -2483
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +95 -2606
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +59 -2487
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +213 -2800
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +308 -2816
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +611 -3352
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +218 -2658
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +438 -2993
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +432 -2987
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +411 -2966
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +183 -2890
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +217 -2936
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +453 -3008
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +439 -2959
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +374 -2872
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +426 -2927
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +430 -2931
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +368 -2894
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +387 -2900
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +443 -2963
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +444 -2964
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +403 -2923
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +422 -2942
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +390 -2910
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +398 -2918
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +189 -2375
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +128 -2580
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +125 -2577
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +408 -2928
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +439 -2940
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +308 -2800
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +405 -2906
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +432 -2987
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +35 -1833
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +421 -2922
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +358 -2871
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +428 -2929
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +406 -2926
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +400 -2920
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +383 -2909
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +395 -2915
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +398 -2924
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +400 -2920
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +398 -2924
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +418 -2938
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +392 -2912
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +92 -2229
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +53 -1899
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +49 -1895
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +79 -2206
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +52 -1957
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +147 -2329
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +135 -2317
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +173 -2355
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +79 -2207
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +52 -1898
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +53 -1899
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +34 -1738
- package/story-elements/Summary/index.js +56 -1902
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +48 -2176
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +35 -1739
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +1182 -4038
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +1377 -4233
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +1162 -4018
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +1277 -4133
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +1231 -4087
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e39b3ca8.js +0 -3023
- package/atoms/ExtendedLoadMore/index-f6e578e3.js +0 -86
|
@@ -1,2412 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
attributeNames: {
|
|
26
|
-
styleName: 'className'
|
|
27
|
-
},
|
|
28
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
29
|
-
handleMissingStyleName: 'throw'
|
|
30
|
-
};
|
|
31
|
-
var _default = optionsDefaults;
|
|
32
|
-
exports["default"] = _default;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
38
|
-
|
|
39
|
-
Object.defineProperty(exports, "__esModule", {
|
|
40
|
-
value: true
|
|
41
|
-
});
|
|
42
|
-
exports["default"] = void 0;
|
|
43
|
-
|
|
44
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
45
|
-
|
|
46
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
47
|
-
|
|
48
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
49
|
-
return styleName.indexOf('.') !== -1;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
53
|
-
if (handleMissingStyleName === 'throw') {
|
|
54
|
-
throw new Error(message);
|
|
55
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
56
|
-
// eslint-disable-next-line no-console
|
|
57
|
-
console.warn(message);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return null;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
64
|
-
// Note:
|
|
65
|
-
// Do not use the desctructing syntax with Babel.
|
|
66
|
-
// Desctructing adds _slicedToArray helper.
|
|
67
|
-
var styleNameParts = styleName.split('.');
|
|
68
|
-
var importName = styleNameParts[0];
|
|
69
|
-
var moduleName = styleNameParts[1];
|
|
70
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
71
|
-
|
|
72
|
-
if (!moduleName) {
|
|
73
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (!styleModuleImportMap[importName]) {
|
|
77
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
81
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return styleModuleImportMap[importName][moduleName];
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
88
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
89
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
90
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
91
|
-
}).filter(function (importKey) {
|
|
92
|
-
return importKey;
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
if (importKeysWithMatches.length > 1) {
|
|
96
|
-
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');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (importKeysWithMatches.length === 0) {
|
|
100
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
107
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
108
|
-
|
|
109
|
-
var _ref = options || {},
|
|
110
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
111
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
112
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
113
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
114
|
-
|
|
115
|
-
if (!styleNameValue) {
|
|
116
|
-
return '';
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
120
|
-
return styleName;
|
|
121
|
-
}).map(function (styleName) {
|
|
122
|
-
if (isNamespacedStyleName(styleName)) {
|
|
123
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
127
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
131
|
-
if (!autoResolveMultipleImports) {
|
|
132
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
139
|
-
|
|
140
|
-
if (!styleModuleMap[styleName]) {
|
|
141
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return styleModuleMap[styleName];
|
|
145
|
-
}).filter(function (className) {
|
|
146
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
147
|
-
return className;
|
|
148
|
-
}).join(' ');
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
exports["default"] = _default;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the MIT license found in the
|
|
162
|
-
* LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
createCommonjsModule(function (module) {
|
|
166
|
-
var runtime = (function (exports) {
|
|
167
|
-
|
|
168
|
-
var Op = Object.prototype;
|
|
169
|
-
var hasOwn = Op.hasOwnProperty;
|
|
170
|
-
var undefined$1; // More compressible than void 0.
|
|
171
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
172
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
173
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
174
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
175
|
-
|
|
176
|
-
function define(obj, key, value) {
|
|
177
|
-
Object.defineProperty(obj, key, {
|
|
178
|
-
value: value,
|
|
179
|
-
enumerable: true,
|
|
180
|
-
configurable: true,
|
|
181
|
-
writable: true
|
|
182
|
-
});
|
|
183
|
-
return obj[key];
|
|
184
|
-
}
|
|
185
|
-
try {
|
|
186
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
187
|
-
define({}, "");
|
|
188
|
-
} catch (err) {
|
|
189
|
-
define = function(obj, key, value) {
|
|
190
|
-
return obj[key] = value;
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
195
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
196
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
197
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
198
|
-
var context = new Context(tryLocsList || []);
|
|
199
|
-
|
|
200
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
201
|
-
// .throw, and .return methods.
|
|
202
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
203
|
-
|
|
204
|
-
return generator;
|
|
205
|
-
}
|
|
206
|
-
exports.wrap = wrap;
|
|
207
|
-
|
|
208
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
209
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
210
|
-
// have been (and was previously) designed to take a closure to be
|
|
211
|
-
// invoked without arguments, but in all the cases we care about we
|
|
212
|
-
// already have an existing method we want to call, so there's no need
|
|
213
|
-
// to create a new function object. We can even get away with assuming
|
|
214
|
-
// the method takes exactly one argument, since that happens to be true
|
|
215
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
216
|
-
// only additional allocation required is the completion record, which
|
|
217
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
218
|
-
function tryCatch(fn, obj, arg) {
|
|
219
|
-
try {
|
|
220
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
221
|
-
} catch (err) {
|
|
222
|
-
return { type: "throw", arg: err };
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
227
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
228
|
-
var GenStateExecuting = "executing";
|
|
229
|
-
var GenStateCompleted = "completed";
|
|
230
|
-
|
|
231
|
-
// Returning this object from the innerFn has the same effect as
|
|
232
|
-
// breaking out of the dispatch switch statement.
|
|
233
|
-
var ContinueSentinel = {};
|
|
234
|
-
|
|
235
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
236
|
-
// .constructor.prototype properties for functions that return Generator
|
|
237
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
238
|
-
// minifier not to mangle the names of these two functions.
|
|
239
|
-
function Generator() {}
|
|
240
|
-
function GeneratorFunction() {}
|
|
241
|
-
function GeneratorFunctionPrototype() {}
|
|
242
|
-
|
|
243
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
244
|
-
// don't natively support it.
|
|
245
|
-
var IteratorPrototype = {};
|
|
246
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
247
|
-
return this;
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
var getProto = Object.getPrototypeOf;
|
|
251
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
252
|
-
if (NativeIteratorPrototype &&
|
|
253
|
-
NativeIteratorPrototype !== Op &&
|
|
254
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
255
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
256
|
-
// of the polyfill.
|
|
257
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
261
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
262
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
263
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
264
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
265
|
-
GeneratorFunction.displayName = define(
|
|
266
|
-
GeneratorFunctionPrototype,
|
|
267
|
-
toStringTagSymbol,
|
|
268
|
-
"GeneratorFunction"
|
|
269
|
-
);
|
|
270
|
-
|
|
271
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
272
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
273
|
-
function defineIteratorMethods(prototype) {
|
|
274
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
275
|
-
define(prototype, method, function(arg) {
|
|
276
|
-
return this._invoke(method, arg);
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
282
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
283
|
-
return ctor
|
|
284
|
-
? ctor === GeneratorFunction ||
|
|
285
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
286
|
-
// do is to check its .name property.
|
|
287
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
288
|
-
: false;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
exports.mark = function(genFun) {
|
|
292
|
-
if (Object.setPrototypeOf) {
|
|
293
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
294
|
-
} else {
|
|
295
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
296
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
297
|
-
}
|
|
298
|
-
genFun.prototype = Object.create(Gp);
|
|
299
|
-
return genFun;
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
// Within the body of any async function, `await x` is transformed to
|
|
303
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
304
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
305
|
-
// meant to be awaited.
|
|
306
|
-
exports.awrap = function(arg) {
|
|
307
|
-
return { __await: arg };
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
311
|
-
function invoke(method, arg, resolve, reject) {
|
|
312
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
313
|
-
if (record.type === "throw") {
|
|
314
|
-
reject(record.arg);
|
|
315
|
-
} else {
|
|
316
|
-
var result = record.arg;
|
|
317
|
-
var value = result.value;
|
|
318
|
-
if (value &&
|
|
319
|
-
typeof value === "object" &&
|
|
320
|
-
hasOwn.call(value, "__await")) {
|
|
321
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
322
|
-
invoke("next", value, resolve, reject);
|
|
323
|
-
}, function(err) {
|
|
324
|
-
invoke("throw", err, resolve, reject);
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
329
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
330
|
-
// the .value of the Promise<{value,done}> result for the
|
|
331
|
-
// current iteration.
|
|
332
|
-
result.value = unwrapped;
|
|
333
|
-
resolve(result);
|
|
334
|
-
}, function(error) {
|
|
335
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
336
|
-
// into the async generator function so it can be handled there.
|
|
337
|
-
return invoke("throw", error, resolve, reject);
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
var previousPromise;
|
|
343
|
-
|
|
344
|
-
function enqueue(method, arg) {
|
|
345
|
-
function callInvokeWithMethodAndArg() {
|
|
346
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
347
|
-
invoke(method, arg, resolve, reject);
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
return previousPromise =
|
|
352
|
-
// If enqueue has been called before, then we want to wait until
|
|
353
|
-
// all previous Promises have been resolved before calling invoke,
|
|
354
|
-
// so that results are always delivered in the correct order. If
|
|
355
|
-
// enqueue has not been called before, then it is important to
|
|
356
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
357
|
-
// so that the async generator function has the opportunity to do
|
|
358
|
-
// any necessary setup in a predictable way. This predictability
|
|
359
|
-
// is why the Promise constructor synchronously invokes its
|
|
360
|
-
// executor callback, and why async functions synchronously
|
|
361
|
-
// execute code before the first await. Since we implement simple
|
|
362
|
-
// async functions in terms of async generators, it is especially
|
|
363
|
-
// important to get this right, even though it requires care.
|
|
364
|
-
previousPromise ? previousPromise.then(
|
|
365
|
-
callInvokeWithMethodAndArg,
|
|
366
|
-
// Avoid propagating failures to Promises returned by later
|
|
367
|
-
// invocations of the iterator.
|
|
368
|
-
callInvokeWithMethodAndArg
|
|
369
|
-
) : callInvokeWithMethodAndArg();
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
// Define the unified helper method that is used to implement .next,
|
|
373
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
374
|
-
this._invoke = enqueue;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
378
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
379
|
-
return this;
|
|
380
|
-
});
|
|
381
|
-
exports.AsyncIterator = AsyncIterator;
|
|
382
|
-
|
|
383
|
-
// Note that simple async functions are implemented on top of
|
|
384
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
385
|
-
// the final result produced by the iterator.
|
|
386
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
387
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
388
|
-
|
|
389
|
-
var iter = new AsyncIterator(
|
|
390
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
391
|
-
PromiseImpl
|
|
392
|
-
);
|
|
393
|
-
|
|
394
|
-
return exports.isGeneratorFunction(outerFn)
|
|
395
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
396
|
-
: iter.next().then(function(result) {
|
|
397
|
-
return result.done ? result.value : iter.next();
|
|
398
|
-
});
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
402
|
-
var state = GenStateSuspendedStart;
|
|
403
|
-
|
|
404
|
-
return function invoke(method, arg) {
|
|
405
|
-
if (state === GenStateExecuting) {
|
|
406
|
-
throw new Error("Generator is already running");
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
if (state === GenStateCompleted) {
|
|
410
|
-
if (method === "throw") {
|
|
411
|
-
throw arg;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
415
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
416
|
-
return doneResult();
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
context.method = method;
|
|
420
|
-
context.arg = arg;
|
|
421
|
-
|
|
422
|
-
while (true) {
|
|
423
|
-
var delegate = context.delegate;
|
|
424
|
-
if (delegate) {
|
|
425
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
426
|
-
if (delegateResult) {
|
|
427
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
428
|
-
return delegateResult;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
if (context.method === "next") {
|
|
433
|
-
// Setting context._sent for legacy support of Babel's
|
|
434
|
-
// function.sent implementation.
|
|
435
|
-
context.sent = context._sent = context.arg;
|
|
436
|
-
|
|
437
|
-
} else if (context.method === "throw") {
|
|
438
|
-
if (state === GenStateSuspendedStart) {
|
|
439
|
-
state = GenStateCompleted;
|
|
440
|
-
throw context.arg;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
context.dispatchException(context.arg);
|
|
444
|
-
|
|
445
|
-
} else if (context.method === "return") {
|
|
446
|
-
context.abrupt("return", context.arg);
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
state = GenStateExecuting;
|
|
450
|
-
|
|
451
|
-
var record = tryCatch(innerFn, self, context);
|
|
452
|
-
if (record.type === "normal") {
|
|
453
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
454
|
-
// GenStateExecuting and loop back for another invocation.
|
|
455
|
-
state = context.done
|
|
456
|
-
? GenStateCompleted
|
|
457
|
-
: GenStateSuspendedYield;
|
|
458
|
-
|
|
459
|
-
if (record.arg === ContinueSentinel) {
|
|
460
|
-
continue;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
return {
|
|
464
|
-
value: record.arg,
|
|
465
|
-
done: context.done
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
} else if (record.type === "throw") {
|
|
469
|
-
state = GenStateCompleted;
|
|
470
|
-
// Dispatch the exception by looping back around to the
|
|
471
|
-
// context.dispatchException(context.arg) call above.
|
|
472
|
-
context.method = "throw";
|
|
473
|
-
context.arg = record.arg;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
480
|
-
// result, either by returning a { value, done } result from the
|
|
481
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
482
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
483
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
484
|
-
var method = delegate.iterator[context.method];
|
|
485
|
-
if (method === undefined$1) {
|
|
486
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
487
|
-
// method always terminates the yield* loop.
|
|
488
|
-
context.delegate = null;
|
|
489
|
-
|
|
490
|
-
if (context.method === "throw") {
|
|
491
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
492
|
-
if (delegate.iterator["return"]) {
|
|
493
|
-
// If the delegate iterator has a return method, give it a
|
|
494
|
-
// chance to clean up.
|
|
495
|
-
context.method = "return";
|
|
496
|
-
context.arg = undefined$1;
|
|
497
|
-
maybeInvokeDelegate(delegate, context);
|
|
498
|
-
|
|
499
|
-
if (context.method === "throw") {
|
|
500
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
501
|
-
// "return" to "throw", let that override the TypeError below.
|
|
502
|
-
return ContinueSentinel;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
context.method = "throw";
|
|
507
|
-
context.arg = new TypeError(
|
|
508
|
-
"The iterator does not provide a 'throw' method");
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
return ContinueSentinel;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
515
|
-
|
|
516
|
-
if (record.type === "throw") {
|
|
517
|
-
context.method = "throw";
|
|
518
|
-
context.arg = record.arg;
|
|
519
|
-
context.delegate = null;
|
|
520
|
-
return ContinueSentinel;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
var info = record.arg;
|
|
524
|
-
|
|
525
|
-
if (! info) {
|
|
526
|
-
context.method = "throw";
|
|
527
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
528
|
-
context.delegate = null;
|
|
529
|
-
return ContinueSentinel;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
if (info.done) {
|
|
533
|
-
// Assign the result of the finished delegate to the temporary
|
|
534
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
535
|
-
context[delegate.resultName] = info.value;
|
|
536
|
-
|
|
537
|
-
// Resume execution at the desired location (see delegateYield).
|
|
538
|
-
context.next = delegate.nextLoc;
|
|
539
|
-
|
|
540
|
-
// If context.method was "throw" but the delegate handled the
|
|
541
|
-
// exception, let the outer generator proceed normally. If
|
|
542
|
-
// context.method was "next", forget context.arg since it has been
|
|
543
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
544
|
-
// "return", allow the original .return call to continue in the
|
|
545
|
-
// outer generator.
|
|
546
|
-
if (context.method !== "return") {
|
|
547
|
-
context.method = "next";
|
|
548
|
-
context.arg = undefined$1;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
} else {
|
|
552
|
-
// Re-yield the result returned by the delegate method.
|
|
553
|
-
return info;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
557
|
-
// the outer generator.
|
|
558
|
-
context.delegate = null;
|
|
559
|
-
return ContinueSentinel;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
563
|
-
// unified ._invoke helper method.
|
|
564
|
-
defineIteratorMethods(Gp);
|
|
565
|
-
|
|
566
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
567
|
-
|
|
568
|
-
// A Generator should always return itself as the iterator object when the
|
|
569
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
570
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
571
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
572
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
573
|
-
define(Gp, iteratorSymbol, function() {
|
|
574
|
-
return this;
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
define(Gp, "toString", function() {
|
|
578
|
-
return "[object Generator]";
|
|
579
|
-
});
|
|
580
|
-
|
|
581
|
-
function pushTryEntry(locs) {
|
|
582
|
-
var entry = { tryLoc: locs[0] };
|
|
583
|
-
|
|
584
|
-
if (1 in locs) {
|
|
585
|
-
entry.catchLoc = locs[1];
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
if (2 in locs) {
|
|
589
|
-
entry.finallyLoc = locs[2];
|
|
590
|
-
entry.afterLoc = locs[3];
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
this.tryEntries.push(entry);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
function resetTryEntry(entry) {
|
|
597
|
-
var record = entry.completion || {};
|
|
598
|
-
record.type = "normal";
|
|
599
|
-
delete record.arg;
|
|
600
|
-
entry.completion = record;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
function Context(tryLocsList) {
|
|
604
|
-
// The root entry object (effectively a try statement without a catch
|
|
605
|
-
// or a finally block) gives us a place to store values thrown from
|
|
606
|
-
// locations where there is no enclosing try statement.
|
|
607
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
608
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
609
|
-
this.reset(true);
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
exports.keys = function(object) {
|
|
613
|
-
var keys = [];
|
|
614
|
-
for (var key in object) {
|
|
615
|
-
keys.push(key);
|
|
616
|
-
}
|
|
617
|
-
keys.reverse();
|
|
618
|
-
|
|
619
|
-
// Rather than returning an object with a next method, we keep
|
|
620
|
-
// things simple and return the next function itself.
|
|
621
|
-
return function next() {
|
|
622
|
-
while (keys.length) {
|
|
623
|
-
var key = keys.pop();
|
|
624
|
-
if (key in object) {
|
|
625
|
-
next.value = key;
|
|
626
|
-
next.done = false;
|
|
627
|
-
return next;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
// To avoid creating an additional object, we just hang the .value
|
|
632
|
-
// and .done properties off the next function object itself. This
|
|
633
|
-
// also ensures that the minifier will not anonymize the function.
|
|
634
|
-
next.done = true;
|
|
635
|
-
return next;
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
function values(iterable) {
|
|
640
|
-
if (iterable) {
|
|
641
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
642
|
-
if (iteratorMethod) {
|
|
643
|
-
return iteratorMethod.call(iterable);
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
if (typeof iterable.next === "function") {
|
|
647
|
-
return iterable;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
if (!isNaN(iterable.length)) {
|
|
651
|
-
var i = -1, next = function next() {
|
|
652
|
-
while (++i < iterable.length) {
|
|
653
|
-
if (hasOwn.call(iterable, i)) {
|
|
654
|
-
next.value = iterable[i];
|
|
655
|
-
next.done = false;
|
|
656
|
-
return next;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
next.value = undefined$1;
|
|
661
|
-
next.done = true;
|
|
662
|
-
|
|
663
|
-
return next;
|
|
664
|
-
};
|
|
665
|
-
|
|
666
|
-
return next.next = next;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
// Return an iterator with no values.
|
|
671
|
-
return { next: doneResult };
|
|
672
|
-
}
|
|
673
|
-
exports.values = values;
|
|
674
|
-
|
|
675
|
-
function doneResult() {
|
|
676
|
-
return { value: undefined$1, done: true };
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
Context.prototype = {
|
|
680
|
-
constructor: Context,
|
|
681
|
-
|
|
682
|
-
reset: function(skipTempReset) {
|
|
683
|
-
this.prev = 0;
|
|
684
|
-
this.next = 0;
|
|
685
|
-
// Resetting context._sent for legacy support of Babel's
|
|
686
|
-
// function.sent implementation.
|
|
687
|
-
this.sent = this._sent = undefined$1;
|
|
688
|
-
this.done = false;
|
|
689
|
-
this.delegate = null;
|
|
690
|
-
|
|
691
|
-
this.method = "next";
|
|
692
|
-
this.arg = undefined$1;
|
|
693
|
-
|
|
694
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
695
|
-
|
|
696
|
-
if (!skipTempReset) {
|
|
697
|
-
for (var name in this) {
|
|
698
|
-
// Not sure about the optimal order of these conditions:
|
|
699
|
-
if (name.charAt(0) === "t" &&
|
|
700
|
-
hasOwn.call(this, name) &&
|
|
701
|
-
!isNaN(+name.slice(1))) {
|
|
702
|
-
this[name] = undefined$1;
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
},
|
|
707
|
-
|
|
708
|
-
stop: function() {
|
|
709
|
-
this.done = true;
|
|
710
|
-
|
|
711
|
-
var rootEntry = this.tryEntries[0];
|
|
712
|
-
var rootRecord = rootEntry.completion;
|
|
713
|
-
if (rootRecord.type === "throw") {
|
|
714
|
-
throw rootRecord.arg;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
return this.rval;
|
|
718
|
-
},
|
|
719
|
-
|
|
720
|
-
dispatchException: function(exception) {
|
|
721
|
-
if (this.done) {
|
|
722
|
-
throw exception;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
var context = this;
|
|
726
|
-
function handle(loc, caught) {
|
|
727
|
-
record.type = "throw";
|
|
728
|
-
record.arg = exception;
|
|
729
|
-
context.next = loc;
|
|
730
|
-
|
|
731
|
-
if (caught) {
|
|
732
|
-
// If the dispatched exception was caught by a catch block,
|
|
733
|
-
// then let that catch block handle the exception normally.
|
|
734
|
-
context.method = "next";
|
|
735
|
-
context.arg = undefined$1;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
return !! caught;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
742
|
-
var entry = this.tryEntries[i];
|
|
743
|
-
var record = entry.completion;
|
|
744
|
-
|
|
745
|
-
if (entry.tryLoc === "root") {
|
|
746
|
-
// Exception thrown outside of any try block that could handle
|
|
747
|
-
// it, so set the completion value of the entire function to
|
|
748
|
-
// throw the exception.
|
|
749
|
-
return handle("end");
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
if (entry.tryLoc <= this.prev) {
|
|
753
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
754
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
755
|
-
|
|
756
|
-
if (hasCatch && hasFinally) {
|
|
757
|
-
if (this.prev < entry.catchLoc) {
|
|
758
|
-
return handle(entry.catchLoc, true);
|
|
759
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
760
|
-
return handle(entry.finallyLoc);
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
} else if (hasCatch) {
|
|
764
|
-
if (this.prev < entry.catchLoc) {
|
|
765
|
-
return handle(entry.catchLoc, true);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
} else if (hasFinally) {
|
|
769
|
-
if (this.prev < entry.finallyLoc) {
|
|
770
|
-
return handle(entry.finallyLoc);
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
} else {
|
|
774
|
-
throw new Error("try statement without catch or finally");
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
},
|
|
779
|
-
|
|
780
|
-
abrupt: function(type, arg) {
|
|
781
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
782
|
-
var entry = this.tryEntries[i];
|
|
783
|
-
if (entry.tryLoc <= this.prev &&
|
|
784
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
785
|
-
this.prev < entry.finallyLoc) {
|
|
786
|
-
var finallyEntry = entry;
|
|
787
|
-
break;
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
if (finallyEntry &&
|
|
792
|
-
(type === "break" ||
|
|
793
|
-
type === "continue") &&
|
|
794
|
-
finallyEntry.tryLoc <= arg &&
|
|
795
|
-
arg <= finallyEntry.finallyLoc) {
|
|
796
|
-
// Ignore the finally entry if control is not jumping to a
|
|
797
|
-
// location outside the try/catch block.
|
|
798
|
-
finallyEntry = null;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
802
|
-
record.type = type;
|
|
803
|
-
record.arg = arg;
|
|
804
|
-
|
|
805
|
-
if (finallyEntry) {
|
|
806
|
-
this.method = "next";
|
|
807
|
-
this.next = finallyEntry.finallyLoc;
|
|
808
|
-
return ContinueSentinel;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
return this.complete(record);
|
|
812
|
-
},
|
|
813
|
-
|
|
814
|
-
complete: function(record, afterLoc) {
|
|
815
|
-
if (record.type === "throw") {
|
|
816
|
-
throw record.arg;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
if (record.type === "break" ||
|
|
820
|
-
record.type === "continue") {
|
|
821
|
-
this.next = record.arg;
|
|
822
|
-
} else if (record.type === "return") {
|
|
823
|
-
this.rval = this.arg = record.arg;
|
|
824
|
-
this.method = "return";
|
|
825
|
-
this.next = "end";
|
|
826
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
827
|
-
this.next = afterLoc;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
return ContinueSentinel;
|
|
831
|
-
},
|
|
832
|
-
|
|
833
|
-
finish: function(finallyLoc) {
|
|
834
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
835
|
-
var entry = this.tryEntries[i];
|
|
836
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
837
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
838
|
-
resetTryEntry(entry);
|
|
839
|
-
return ContinueSentinel;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
},
|
|
843
|
-
|
|
844
|
-
"catch": function(tryLoc) {
|
|
845
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
846
|
-
var entry = this.tryEntries[i];
|
|
847
|
-
if (entry.tryLoc === tryLoc) {
|
|
848
|
-
var record = entry.completion;
|
|
849
|
-
if (record.type === "throw") {
|
|
850
|
-
var thrown = record.arg;
|
|
851
|
-
resetTryEntry(entry);
|
|
852
|
-
}
|
|
853
|
-
return thrown;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
// The context.catch method must only be called with a location
|
|
858
|
-
// argument that corresponds to a known catch block.
|
|
859
|
-
throw new Error("illegal catch attempt");
|
|
860
|
-
},
|
|
861
|
-
|
|
862
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
863
|
-
this.delegate = {
|
|
864
|
-
iterator: values(iterable),
|
|
865
|
-
resultName: resultName,
|
|
866
|
-
nextLoc: nextLoc
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
if (this.method === "next") {
|
|
870
|
-
// Deliberately forget the last sent value so that we don't
|
|
871
|
-
// accidentally pass it on to the delegate.
|
|
872
|
-
this.arg = undefined$1;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
return ContinueSentinel;
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
|
|
879
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
880
|
-
// or not, return the runtime object so that we can declare the variable
|
|
881
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
882
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
883
|
-
return exports;
|
|
884
|
-
|
|
885
|
-
}(
|
|
886
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
887
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
888
|
-
// object. Either way, the resulting object will be used to initialize
|
|
889
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
890
|
-
module.exports
|
|
891
|
-
));
|
|
892
|
-
|
|
893
|
-
try {
|
|
894
|
-
regeneratorRuntime = runtime;
|
|
895
|
-
} catch (accidentalStrictMode) {
|
|
896
|
-
// This module should not be running in strict mode, so the above
|
|
897
|
-
// assignment should always work unless something is misconfigured. Just
|
|
898
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
899
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
900
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
901
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
902
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
903
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
904
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
905
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
906
|
-
if (typeof globalThis === "object") {
|
|
907
|
-
globalThis.regeneratorRuntime = runtime;
|
|
908
|
-
} else {
|
|
909
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
});
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* Checks if `value` is classified as an `Array` object.
|
|
916
|
-
*
|
|
917
|
-
* @static
|
|
918
|
-
* @memberOf _
|
|
919
|
-
* @since 0.1.0
|
|
920
|
-
* @category Lang
|
|
921
|
-
* @param {*} value The value to check.
|
|
922
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
923
|
-
* @example
|
|
924
|
-
*
|
|
925
|
-
* _.isArray([1, 2, 3]);
|
|
926
|
-
* // => true
|
|
927
|
-
*
|
|
928
|
-
* _.isArray(document.body.children);
|
|
929
|
-
* // => false
|
|
930
|
-
*
|
|
931
|
-
* _.isArray('abc');
|
|
932
|
-
* // => false
|
|
933
|
-
*
|
|
934
|
-
* _.isArray(_.noop);
|
|
935
|
-
* // => false
|
|
936
|
-
*/
|
|
937
|
-
var isArray = Array.isArray;
|
|
938
|
-
|
|
939
|
-
var isArray_1 = isArray;
|
|
940
|
-
|
|
941
|
-
/** Detect free variable `global` from Node.js. */
|
|
942
|
-
|
|
943
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
944
|
-
|
|
945
|
-
var _freeGlobal = freeGlobal;
|
|
946
|
-
|
|
947
|
-
/** Detect free variable `self`. */
|
|
948
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
949
|
-
|
|
950
|
-
/** Used as a reference to the global object. */
|
|
951
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
952
|
-
|
|
953
|
-
var _root = root;
|
|
954
|
-
|
|
955
|
-
/** Built-in value references. */
|
|
956
|
-
var Symbol$1 = _root.Symbol;
|
|
957
|
-
|
|
958
|
-
var _Symbol = Symbol$1;
|
|
959
|
-
|
|
960
|
-
/** Used for built-in method references. */
|
|
961
|
-
var objectProto$4 = Object.prototype;
|
|
962
|
-
|
|
963
|
-
/** Used to check objects for own properties. */
|
|
964
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* Used to resolve the
|
|
968
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
969
|
-
* of values.
|
|
970
|
-
*/
|
|
971
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
972
|
-
|
|
973
|
-
/** Built-in value references. */
|
|
974
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
975
|
-
|
|
976
|
-
/**
|
|
977
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
978
|
-
*
|
|
979
|
-
* @private
|
|
980
|
-
* @param {*} value The value to query.
|
|
981
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
982
|
-
*/
|
|
983
|
-
function getRawTag(value) {
|
|
984
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
985
|
-
tag = value[symToStringTag$1];
|
|
986
|
-
|
|
987
|
-
try {
|
|
988
|
-
value[symToStringTag$1] = undefined;
|
|
989
|
-
var unmasked = true;
|
|
990
|
-
} catch (e) {}
|
|
991
|
-
|
|
992
|
-
var result = nativeObjectToString$1.call(value);
|
|
993
|
-
if (unmasked) {
|
|
994
|
-
if (isOwn) {
|
|
995
|
-
value[symToStringTag$1] = tag;
|
|
996
|
-
} else {
|
|
997
|
-
delete value[symToStringTag$1];
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
return result;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
var _getRawTag = getRawTag;
|
|
1004
|
-
|
|
1005
|
-
/** Used for built-in method references. */
|
|
1006
|
-
var objectProto$3 = Object.prototype;
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* Used to resolve the
|
|
1010
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1011
|
-
* of values.
|
|
1012
|
-
*/
|
|
1013
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
1017
|
-
*
|
|
1018
|
-
* @private
|
|
1019
|
-
* @param {*} value The value to convert.
|
|
1020
|
-
* @returns {string} Returns the converted string.
|
|
1021
|
-
*/
|
|
1022
|
-
function objectToString(value) {
|
|
1023
|
-
return nativeObjectToString.call(value);
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
var _objectToString = objectToString;
|
|
1027
|
-
|
|
1028
|
-
/** `Object#toString` result references. */
|
|
1029
|
-
var nullTag = '[object Null]',
|
|
1030
|
-
undefinedTag = '[object Undefined]';
|
|
1031
|
-
|
|
1032
|
-
/** Built-in value references. */
|
|
1033
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
1037
|
-
*
|
|
1038
|
-
* @private
|
|
1039
|
-
* @param {*} value The value to query.
|
|
1040
|
-
* @returns {string} Returns the `toStringTag`.
|
|
1041
|
-
*/
|
|
1042
|
-
function baseGetTag(value) {
|
|
1043
|
-
if (value == null) {
|
|
1044
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
1045
|
-
}
|
|
1046
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
1047
|
-
? _getRawTag(value)
|
|
1048
|
-
: _objectToString(value);
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
var _baseGetTag = baseGetTag;
|
|
1052
|
-
|
|
1053
|
-
/**
|
|
1054
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1055
|
-
* and has a `typeof` result of "object".
|
|
1056
|
-
*
|
|
1057
|
-
* @static
|
|
1058
|
-
* @memberOf _
|
|
1059
|
-
* @since 4.0.0
|
|
1060
|
-
* @category Lang
|
|
1061
|
-
* @param {*} value The value to check.
|
|
1062
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1063
|
-
* @example
|
|
1064
|
-
*
|
|
1065
|
-
* _.isObjectLike({});
|
|
1066
|
-
* // => true
|
|
1067
|
-
*
|
|
1068
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1069
|
-
* // => true
|
|
1070
|
-
*
|
|
1071
|
-
* _.isObjectLike(_.noop);
|
|
1072
|
-
* // => false
|
|
1073
|
-
*
|
|
1074
|
-
* _.isObjectLike(null);
|
|
1075
|
-
* // => false
|
|
1076
|
-
*/
|
|
1077
|
-
function isObjectLike(value) {
|
|
1078
|
-
return value != null && typeof value == 'object';
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
var isObjectLike_1 = isObjectLike;
|
|
1082
|
-
|
|
1083
|
-
/** `Object#toString` result references. */
|
|
1084
|
-
var symbolTag = '[object Symbol]';
|
|
1085
|
-
|
|
1086
|
-
/**
|
|
1087
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
1088
|
-
*
|
|
1089
|
-
* @static
|
|
1090
|
-
* @memberOf _
|
|
1091
|
-
* @since 4.0.0
|
|
1092
|
-
* @category Lang
|
|
1093
|
-
* @param {*} value The value to check.
|
|
1094
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
1095
|
-
* @example
|
|
1096
|
-
*
|
|
1097
|
-
* _.isSymbol(Symbol.iterator);
|
|
1098
|
-
* // => true
|
|
1099
|
-
*
|
|
1100
|
-
* _.isSymbol('abc');
|
|
1101
|
-
* // => false
|
|
1102
|
-
*/
|
|
1103
|
-
function isSymbol(value) {
|
|
1104
|
-
return typeof value == 'symbol' ||
|
|
1105
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
var isSymbol_1 = isSymbol;
|
|
1109
|
-
|
|
1110
|
-
/** Used to match property names within property paths. */
|
|
1111
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
1112
|
-
reIsPlainProp = /^\w*$/;
|
|
1113
|
-
|
|
1114
|
-
/**
|
|
1115
|
-
* Checks if `value` is a property name and not a property path.
|
|
1116
|
-
*
|
|
1117
|
-
* @private
|
|
1118
|
-
* @param {*} value The value to check.
|
|
1119
|
-
* @param {Object} [object] The object to query keys on.
|
|
1120
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1121
|
-
*/
|
|
1122
|
-
function isKey(value, object) {
|
|
1123
|
-
if (isArray_1(value)) {
|
|
1124
|
-
return false;
|
|
1125
|
-
}
|
|
1126
|
-
var type = typeof value;
|
|
1127
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
1128
|
-
value == null || isSymbol_1(value)) {
|
|
1129
|
-
return true;
|
|
1130
|
-
}
|
|
1131
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
1132
|
-
(object != null && value in Object(object));
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
var _isKey = isKey;
|
|
1136
|
-
|
|
1137
|
-
/**
|
|
1138
|
-
* Checks if `value` is the
|
|
1139
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1140
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1141
|
-
*
|
|
1142
|
-
* @static
|
|
1143
|
-
* @memberOf _
|
|
1144
|
-
* @since 0.1.0
|
|
1145
|
-
* @category Lang
|
|
1146
|
-
* @param {*} value The value to check.
|
|
1147
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1148
|
-
* @example
|
|
1149
|
-
*
|
|
1150
|
-
* _.isObject({});
|
|
1151
|
-
* // => true
|
|
1152
|
-
*
|
|
1153
|
-
* _.isObject([1, 2, 3]);
|
|
1154
|
-
* // => true
|
|
1155
|
-
*
|
|
1156
|
-
* _.isObject(_.noop);
|
|
1157
|
-
* // => true
|
|
1158
|
-
*
|
|
1159
|
-
* _.isObject(null);
|
|
1160
|
-
* // => false
|
|
1161
|
-
*/
|
|
1162
|
-
function isObject(value) {
|
|
1163
|
-
var type = typeof value;
|
|
1164
|
-
return value != null && (type == 'object' || type == 'function');
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
var isObject_1 = isObject;
|
|
1168
|
-
|
|
1169
|
-
/** `Object#toString` result references. */
|
|
1170
|
-
var asyncTag = '[object AsyncFunction]',
|
|
1171
|
-
funcTag = '[object Function]',
|
|
1172
|
-
genTag = '[object GeneratorFunction]',
|
|
1173
|
-
proxyTag = '[object Proxy]';
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* Checks if `value` is classified as a `Function` object.
|
|
1177
|
-
*
|
|
1178
|
-
* @static
|
|
1179
|
-
* @memberOf _
|
|
1180
|
-
* @since 0.1.0
|
|
1181
|
-
* @category Lang
|
|
1182
|
-
* @param {*} value The value to check.
|
|
1183
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1184
|
-
* @example
|
|
1185
|
-
*
|
|
1186
|
-
* _.isFunction(_);
|
|
1187
|
-
* // => true
|
|
1188
|
-
*
|
|
1189
|
-
* _.isFunction(/abc/);
|
|
1190
|
-
* // => false
|
|
1191
|
-
*/
|
|
1192
|
-
function isFunction(value) {
|
|
1193
|
-
if (!isObject_1(value)) {
|
|
1194
|
-
return false;
|
|
1195
|
-
}
|
|
1196
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1197
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1198
|
-
var tag = _baseGetTag(value);
|
|
1199
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
var isFunction_1 = isFunction;
|
|
1203
|
-
|
|
1204
|
-
/** Used to detect overreaching core-js shims. */
|
|
1205
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
1206
|
-
|
|
1207
|
-
var _coreJsData = coreJsData;
|
|
1208
|
-
|
|
1209
|
-
/** Used to detect methods masquerading as native. */
|
|
1210
|
-
var maskSrcKey = (function() {
|
|
1211
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
1212
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1213
|
-
}());
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
* Checks if `func` has its source masked.
|
|
1217
|
-
*
|
|
1218
|
-
* @private
|
|
1219
|
-
* @param {Function} func The function to check.
|
|
1220
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1221
|
-
*/
|
|
1222
|
-
function isMasked(func) {
|
|
1223
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
var _isMasked = isMasked;
|
|
1227
|
-
|
|
1228
|
-
/** Used for built-in method references. */
|
|
1229
|
-
var funcProto$1 = Function.prototype;
|
|
1230
|
-
|
|
1231
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1232
|
-
var funcToString$1 = funcProto$1.toString;
|
|
1233
|
-
|
|
1234
|
-
/**
|
|
1235
|
-
* Converts `func` to its source code.
|
|
1236
|
-
*
|
|
1237
|
-
* @private
|
|
1238
|
-
* @param {Function} func The function to convert.
|
|
1239
|
-
* @returns {string} Returns the source code.
|
|
1240
|
-
*/
|
|
1241
|
-
function toSource(func) {
|
|
1242
|
-
if (func != null) {
|
|
1243
|
-
try {
|
|
1244
|
-
return funcToString$1.call(func);
|
|
1245
|
-
} catch (e) {}
|
|
1246
|
-
try {
|
|
1247
|
-
return (func + '');
|
|
1248
|
-
} catch (e) {}
|
|
1249
|
-
}
|
|
1250
|
-
return '';
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
var _toSource = toSource;
|
|
1254
|
-
|
|
1255
|
-
/**
|
|
1256
|
-
* Used to match `RegExp`
|
|
1257
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1258
|
-
*/
|
|
1259
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1260
|
-
|
|
1261
|
-
/** Used to detect host constructors (Safari). */
|
|
1262
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1263
|
-
|
|
1264
|
-
/** Used for built-in method references. */
|
|
1265
|
-
var funcProto = Function.prototype,
|
|
1266
|
-
objectProto$2 = Object.prototype;
|
|
1267
|
-
|
|
1268
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1269
|
-
var funcToString = funcProto.toString;
|
|
1270
|
-
|
|
1271
|
-
/** Used to check objects for own properties. */
|
|
1272
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1273
|
-
|
|
1274
|
-
/** Used to detect if a method is native. */
|
|
1275
|
-
var reIsNative = RegExp('^' +
|
|
1276
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
1277
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1278
|
-
);
|
|
1279
|
-
|
|
1280
|
-
/**
|
|
1281
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
1282
|
-
*
|
|
1283
|
-
* @private
|
|
1284
|
-
* @param {*} value The value to check.
|
|
1285
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1286
|
-
* else `false`.
|
|
1287
|
-
*/
|
|
1288
|
-
function baseIsNative(value) {
|
|
1289
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
1290
|
-
return false;
|
|
1291
|
-
}
|
|
1292
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
1293
|
-
return pattern.test(_toSource(value));
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
var _baseIsNative = baseIsNative;
|
|
1297
|
-
|
|
1298
|
-
/**
|
|
1299
|
-
* Gets the value at `key` of `object`.
|
|
1300
|
-
*
|
|
1301
|
-
* @private
|
|
1302
|
-
* @param {Object} [object] The object to query.
|
|
1303
|
-
* @param {string} key The key of the property to get.
|
|
1304
|
-
* @returns {*} Returns the property value.
|
|
1305
|
-
*/
|
|
1306
|
-
function getValue(object, key) {
|
|
1307
|
-
return object == null ? undefined : object[key];
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
var _getValue = getValue;
|
|
1311
|
-
|
|
1312
|
-
/**
|
|
1313
|
-
* Gets the native function at `key` of `object`.
|
|
1314
|
-
*
|
|
1315
|
-
* @private
|
|
1316
|
-
* @param {Object} object The object to query.
|
|
1317
|
-
* @param {string} key The key of the method to get.
|
|
1318
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1319
|
-
*/
|
|
1320
|
-
function getNative(object, key) {
|
|
1321
|
-
var value = _getValue(object, key);
|
|
1322
|
-
return _baseIsNative(value) ? value : undefined;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
var _getNative = getNative;
|
|
1326
|
-
|
|
1327
|
-
/* Built-in method references that are verified to be native. */
|
|
1328
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
1329
|
-
|
|
1330
|
-
var _nativeCreate = nativeCreate;
|
|
1331
|
-
|
|
1332
|
-
/**
|
|
1333
|
-
* Removes all key-value entries from the hash.
|
|
1334
|
-
*
|
|
1335
|
-
* @private
|
|
1336
|
-
* @name clear
|
|
1337
|
-
* @memberOf Hash
|
|
1338
|
-
*/
|
|
1339
|
-
function hashClear() {
|
|
1340
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1341
|
-
this.size = 0;
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
var _hashClear = hashClear;
|
|
1345
|
-
|
|
1346
|
-
/**
|
|
1347
|
-
* Removes `key` and its value from the hash.
|
|
1348
|
-
*
|
|
1349
|
-
* @private
|
|
1350
|
-
* @name delete
|
|
1351
|
-
* @memberOf Hash
|
|
1352
|
-
* @param {Object} hash The hash to modify.
|
|
1353
|
-
* @param {string} key The key of the value to remove.
|
|
1354
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1355
|
-
*/
|
|
1356
|
-
function hashDelete(key) {
|
|
1357
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
1358
|
-
this.size -= result ? 1 : 0;
|
|
1359
|
-
return result;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
var _hashDelete = hashDelete;
|
|
1363
|
-
|
|
1364
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1365
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
1366
|
-
|
|
1367
|
-
/** Used for built-in method references. */
|
|
1368
|
-
var objectProto$1 = Object.prototype;
|
|
1369
|
-
|
|
1370
|
-
/** Used to check objects for own properties. */
|
|
1371
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1372
|
-
|
|
1373
|
-
/**
|
|
1374
|
-
* Gets the hash value for `key`.
|
|
1375
|
-
*
|
|
1376
|
-
* @private
|
|
1377
|
-
* @name get
|
|
1378
|
-
* @memberOf Hash
|
|
1379
|
-
* @param {string} key The key of the value to get.
|
|
1380
|
-
* @returns {*} Returns the entry value.
|
|
1381
|
-
*/
|
|
1382
|
-
function hashGet(key) {
|
|
1383
|
-
var data = this.__data__;
|
|
1384
|
-
if (_nativeCreate) {
|
|
1385
|
-
var result = data[key];
|
|
1386
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1387
|
-
}
|
|
1388
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
var _hashGet = hashGet;
|
|
1392
|
-
|
|
1393
|
-
/** Used for built-in method references. */
|
|
1394
|
-
var objectProto = Object.prototype;
|
|
1395
|
-
|
|
1396
|
-
/** Used to check objects for own properties. */
|
|
1397
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1398
|
-
|
|
1399
|
-
/**
|
|
1400
|
-
* Checks if a hash value for `key` exists.
|
|
1401
|
-
*
|
|
1402
|
-
* @private
|
|
1403
|
-
* @name has
|
|
1404
|
-
* @memberOf Hash
|
|
1405
|
-
* @param {string} key The key of the entry to check.
|
|
1406
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1407
|
-
*/
|
|
1408
|
-
function hashHas(key) {
|
|
1409
|
-
var data = this.__data__;
|
|
1410
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
var _hashHas = hashHas;
|
|
1414
|
-
|
|
1415
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1416
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1417
|
-
|
|
1418
|
-
/**
|
|
1419
|
-
* Sets the hash `key` to `value`.
|
|
1420
|
-
*
|
|
1421
|
-
* @private
|
|
1422
|
-
* @name set
|
|
1423
|
-
* @memberOf Hash
|
|
1424
|
-
* @param {string} key The key of the value to set.
|
|
1425
|
-
* @param {*} value The value to set.
|
|
1426
|
-
* @returns {Object} Returns the hash instance.
|
|
1427
|
-
*/
|
|
1428
|
-
function hashSet(key, value) {
|
|
1429
|
-
var data = this.__data__;
|
|
1430
|
-
this.size += this.has(key) ? 0 : 1;
|
|
1431
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1432
|
-
return this;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
var _hashSet = hashSet;
|
|
1436
|
-
|
|
1437
|
-
/**
|
|
1438
|
-
* Creates a hash object.
|
|
1439
|
-
*
|
|
1440
|
-
* @private
|
|
1441
|
-
* @constructor
|
|
1442
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1443
|
-
*/
|
|
1444
|
-
function Hash(entries) {
|
|
1445
|
-
var index = -1,
|
|
1446
|
-
length = entries == null ? 0 : entries.length;
|
|
1447
|
-
|
|
1448
|
-
this.clear();
|
|
1449
|
-
while (++index < length) {
|
|
1450
|
-
var entry = entries[index];
|
|
1451
|
-
this.set(entry[0], entry[1]);
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
// Add methods to `Hash`.
|
|
1456
|
-
Hash.prototype.clear = _hashClear;
|
|
1457
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
1458
|
-
Hash.prototype.get = _hashGet;
|
|
1459
|
-
Hash.prototype.has = _hashHas;
|
|
1460
|
-
Hash.prototype.set = _hashSet;
|
|
1461
|
-
|
|
1462
|
-
var _Hash = Hash;
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* Removes all key-value entries from the list cache.
|
|
1466
|
-
*
|
|
1467
|
-
* @private
|
|
1468
|
-
* @name clear
|
|
1469
|
-
* @memberOf ListCache
|
|
1470
|
-
*/
|
|
1471
|
-
function listCacheClear() {
|
|
1472
|
-
this.__data__ = [];
|
|
1473
|
-
this.size = 0;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
var _listCacheClear = listCacheClear;
|
|
1477
|
-
|
|
1478
|
-
/**
|
|
1479
|
-
* Performs a
|
|
1480
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1481
|
-
* comparison between two values to determine if they are equivalent.
|
|
1482
|
-
*
|
|
1483
|
-
* @static
|
|
1484
|
-
* @memberOf _
|
|
1485
|
-
* @since 4.0.0
|
|
1486
|
-
* @category Lang
|
|
1487
|
-
* @param {*} value The value to compare.
|
|
1488
|
-
* @param {*} other The other value to compare.
|
|
1489
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1490
|
-
* @example
|
|
1491
|
-
*
|
|
1492
|
-
* var object = { 'a': 1 };
|
|
1493
|
-
* var other = { 'a': 1 };
|
|
1494
|
-
*
|
|
1495
|
-
* _.eq(object, object);
|
|
1496
|
-
* // => true
|
|
1497
|
-
*
|
|
1498
|
-
* _.eq(object, other);
|
|
1499
|
-
* // => false
|
|
1500
|
-
*
|
|
1501
|
-
* _.eq('a', 'a');
|
|
1502
|
-
* // => true
|
|
1503
|
-
*
|
|
1504
|
-
* _.eq('a', Object('a'));
|
|
1505
|
-
* // => false
|
|
1506
|
-
*
|
|
1507
|
-
* _.eq(NaN, NaN);
|
|
1508
|
-
* // => true
|
|
1509
|
-
*/
|
|
1510
|
-
function eq(value, other) {
|
|
1511
|
-
return value === other || (value !== value && other !== other);
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
var eq_1 = eq;
|
|
1515
|
-
|
|
1516
|
-
/**
|
|
1517
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1518
|
-
*
|
|
1519
|
-
* @private
|
|
1520
|
-
* @param {Array} array The array to inspect.
|
|
1521
|
-
* @param {*} key The key to search for.
|
|
1522
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1523
|
-
*/
|
|
1524
|
-
function assocIndexOf(array, key) {
|
|
1525
|
-
var length = array.length;
|
|
1526
|
-
while (length--) {
|
|
1527
|
-
if (eq_1(array[length][0], key)) {
|
|
1528
|
-
return length;
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
return -1;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
var _assocIndexOf = assocIndexOf;
|
|
1535
|
-
|
|
1536
|
-
/** Used for built-in method references. */
|
|
1537
|
-
var arrayProto = Array.prototype;
|
|
1538
|
-
|
|
1539
|
-
/** Built-in value references. */
|
|
1540
|
-
var splice = arrayProto.splice;
|
|
1541
|
-
|
|
1542
|
-
/**
|
|
1543
|
-
* Removes `key` and its value from the list cache.
|
|
1544
|
-
*
|
|
1545
|
-
* @private
|
|
1546
|
-
* @name delete
|
|
1547
|
-
* @memberOf ListCache
|
|
1548
|
-
* @param {string} key The key of the value to remove.
|
|
1549
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1550
|
-
*/
|
|
1551
|
-
function listCacheDelete(key) {
|
|
1552
|
-
var data = this.__data__,
|
|
1553
|
-
index = _assocIndexOf(data, key);
|
|
1554
|
-
|
|
1555
|
-
if (index < 0) {
|
|
1556
|
-
return false;
|
|
1557
|
-
}
|
|
1558
|
-
var lastIndex = data.length - 1;
|
|
1559
|
-
if (index == lastIndex) {
|
|
1560
|
-
data.pop();
|
|
1561
|
-
} else {
|
|
1562
|
-
splice.call(data, index, 1);
|
|
1563
|
-
}
|
|
1564
|
-
--this.size;
|
|
1565
|
-
return true;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
var _listCacheDelete = listCacheDelete;
|
|
1569
|
-
|
|
1570
|
-
/**
|
|
1571
|
-
* Gets the list cache value for `key`.
|
|
1572
|
-
*
|
|
1573
|
-
* @private
|
|
1574
|
-
* @name get
|
|
1575
|
-
* @memberOf ListCache
|
|
1576
|
-
* @param {string} key The key of the value to get.
|
|
1577
|
-
* @returns {*} Returns the entry value.
|
|
1578
|
-
*/
|
|
1579
|
-
function listCacheGet(key) {
|
|
1580
|
-
var data = this.__data__,
|
|
1581
|
-
index = _assocIndexOf(data, key);
|
|
1582
|
-
|
|
1583
|
-
return index < 0 ? undefined : data[index][1];
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
var _listCacheGet = listCacheGet;
|
|
1587
|
-
|
|
1588
|
-
/**
|
|
1589
|
-
* Checks if a list cache value for `key` exists.
|
|
1590
|
-
*
|
|
1591
|
-
* @private
|
|
1592
|
-
* @name has
|
|
1593
|
-
* @memberOf ListCache
|
|
1594
|
-
* @param {string} key The key of the entry to check.
|
|
1595
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1596
|
-
*/
|
|
1597
|
-
function listCacheHas(key) {
|
|
1598
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
var _listCacheHas = listCacheHas;
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* Sets the list cache `key` to `value`.
|
|
1605
|
-
*
|
|
1606
|
-
* @private
|
|
1607
|
-
* @name set
|
|
1608
|
-
* @memberOf ListCache
|
|
1609
|
-
* @param {string} key The key of the value to set.
|
|
1610
|
-
* @param {*} value The value to set.
|
|
1611
|
-
* @returns {Object} Returns the list cache instance.
|
|
1612
|
-
*/
|
|
1613
|
-
function listCacheSet(key, value) {
|
|
1614
|
-
var data = this.__data__,
|
|
1615
|
-
index = _assocIndexOf(data, key);
|
|
1616
|
-
|
|
1617
|
-
if (index < 0) {
|
|
1618
|
-
++this.size;
|
|
1619
|
-
data.push([key, value]);
|
|
1620
|
-
} else {
|
|
1621
|
-
data[index][1] = value;
|
|
1622
|
-
}
|
|
1623
|
-
return this;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
var _listCacheSet = listCacheSet;
|
|
1627
|
-
|
|
1628
|
-
/**
|
|
1629
|
-
* Creates an list cache object.
|
|
1630
|
-
*
|
|
1631
|
-
* @private
|
|
1632
|
-
* @constructor
|
|
1633
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1634
|
-
*/
|
|
1635
|
-
function ListCache(entries) {
|
|
1636
|
-
var index = -1,
|
|
1637
|
-
length = entries == null ? 0 : entries.length;
|
|
1638
|
-
|
|
1639
|
-
this.clear();
|
|
1640
|
-
while (++index < length) {
|
|
1641
|
-
var entry = entries[index];
|
|
1642
|
-
this.set(entry[0], entry[1]);
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
// Add methods to `ListCache`.
|
|
1647
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
1648
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1649
|
-
ListCache.prototype.get = _listCacheGet;
|
|
1650
|
-
ListCache.prototype.has = _listCacheHas;
|
|
1651
|
-
ListCache.prototype.set = _listCacheSet;
|
|
1652
|
-
|
|
1653
|
-
var _ListCache = ListCache;
|
|
1654
|
-
|
|
1655
|
-
/* Built-in method references that are verified to be native. */
|
|
1656
|
-
var Map = _getNative(_root, 'Map');
|
|
1657
|
-
|
|
1658
|
-
var _Map = Map;
|
|
1659
|
-
|
|
1660
|
-
/**
|
|
1661
|
-
* Removes all key-value entries from the map.
|
|
1662
|
-
*
|
|
1663
|
-
* @private
|
|
1664
|
-
* @name clear
|
|
1665
|
-
* @memberOf MapCache
|
|
1666
|
-
*/
|
|
1667
|
-
function mapCacheClear() {
|
|
1668
|
-
this.size = 0;
|
|
1669
|
-
this.__data__ = {
|
|
1670
|
-
'hash': new _Hash,
|
|
1671
|
-
'map': new (_Map || _ListCache),
|
|
1672
|
-
'string': new _Hash
|
|
1673
|
-
};
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
var _mapCacheClear = mapCacheClear;
|
|
1677
|
-
|
|
1678
|
-
/**
|
|
1679
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
1680
|
-
*
|
|
1681
|
-
* @private
|
|
1682
|
-
* @param {*} value The value to check.
|
|
1683
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1684
|
-
*/
|
|
1685
|
-
function isKeyable(value) {
|
|
1686
|
-
var type = typeof value;
|
|
1687
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1688
|
-
? (value !== '__proto__')
|
|
1689
|
-
: (value === null);
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
var _isKeyable = isKeyable;
|
|
1693
|
-
|
|
1694
|
-
/**
|
|
1695
|
-
* Gets the data for `map`.
|
|
1696
|
-
*
|
|
1697
|
-
* @private
|
|
1698
|
-
* @param {Object} map The map to query.
|
|
1699
|
-
* @param {string} key The reference key.
|
|
1700
|
-
* @returns {*} Returns the map data.
|
|
1701
|
-
*/
|
|
1702
|
-
function getMapData(map, key) {
|
|
1703
|
-
var data = map.__data__;
|
|
1704
|
-
return _isKeyable(key)
|
|
1705
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1706
|
-
: data.map;
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
var _getMapData = getMapData;
|
|
1710
|
-
|
|
1711
|
-
/**
|
|
1712
|
-
* Removes `key` and its value from the map.
|
|
1713
|
-
*
|
|
1714
|
-
* @private
|
|
1715
|
-
* @name delete
|
|
1716
|
-
* @memberOf MapCache
|
|
1717
|
-
* @param {string} key The key of the value to remove.
|
|
1718
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1719
|
-
*/
|
|
1720
|
-
function mapCacheDelete(key) {
|
|
1721
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1722
|
-
this.size -= result ? 1 : 0;
|
|
1723
|
-
return result;
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
1727
|
-
|
|
1728
|
-
/**
|
|
1729
|
-
* Gets the map value for `key`.
|
|
1730
|
-
*
|
|
1731
|
-
* @private
|
|
1732
|
-
* @name get
|
|
1733
|
-
* @memberOf MapCache
|
|
1734
|
-
* @param {string} key The key of the value to get.
|
|
1735
|
-
* @returns {*} Returns the entry value.
|
|
1736
|
-
*/
|
|
1737
|
-
function mapCacheGet(key) {
|
|
1738
|
-
return _getMapData(this, key).get(key);
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
var _mapCacheGet = mapCacheGet;
|
|
1742
|
-
|
|
1743
|
-
/**
|
|
1744
|
-
* Checks if a map value for `key` exists.
|
|
1745
|
-
*
|
|
1746
|
-
* @private
|
|
1747
|
-
* @name has
|
|
1748
|
-
* @memberOf MapCache
|
|
1749
|
-
* @param {string} key The key of the entry to check.
|
|
1750
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1751
|
-
*/
|
|
1752
|
-
function mapCacheHas(key) {
|
|
1753
|
-
return _getMapData(this, key).has(key);
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
var _mapCacheHas = mapCacheHas;
|
|
1757
|
-
|
|
1758
|
-
/**
|
|
1759
|
-
* Sets the map `key` to `value`.
|
|
1760
|
-
*
|
|
1761
|
-
* @private
|
|
1762
|
-
* @name set
|
|
1763
|
-
* @memberOf MapCache
|
|
1764
|
-
* @param {string} key The key of the value to set.
|
|
1765
|
-
* @param {*} value The value to set.
|
|
1766
|
-
* @returns {Object} Returns the map cache instance.
|
|
1767
|
-
*/
|
|
1768
|
-
function mapCacheSet(key, value) {
|
|
1769
|
-
var data = _getMapData(this, key),
|
|
1770
|
-
size = data.size;
|
|
1771
|
-
|
|
1772
|
-
data.set(key, value);
|
|
1773
|
-
this.size += data.size == size ? 0 : 1;
|
|
1774
|
-
return this;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
var _mapCacheSet = mapCacheSet;
|
|
1778
|
-
|
|
1779
|
-
/**
|
|
1780
|
-
* Creates a map cache object to store key-value pairs.
|
|
1781
|
-
*
|
|
1782
|
-
* @private
|
|
1783
|
-
* @constructor
|
|
1784
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1785
|
-
*/
|
|
1786
|
-
function MapCache(entries) {
|
|
1787
|
-
var index = -1,
|
|
1788
|
-
length = entries == null ? 0 : entries.length;
|
|
1789
|
-
|
|
1790
|
-
this.clear();
|
|
1791
|
-
while (++index < length) {
|
|
1792
|
-
var entry = entries[index];
|
|
1793
|
-
this.set(entry[0], entry[1]);
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
// Add methods to `MapCache`.
|
|
1798
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1799
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1800
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1801
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1802
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1803
|
-
|
|
1804
|
-
var _MapCache = MapCache;
|
|
1805
|
-
|
|
1806
|
-
/** Error message constants. */
|
|
1807
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1808
|
-
|
|
1809
|
-
/**
|
|
1810
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1811
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1812
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1813
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1814
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1815
|
-
*
|
|
1816
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1817
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1818
|
-
* constructor with one whose instances implement the
|
|
1819
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1820
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1821
|
-
*
|
|
1822
|
-
* @static
|
|
1823
|
-
* @memberOf _
|
|
1824
|
-
* @since 0.1.0
|
|
1825
|
-
* @category Function
|
|
1826
|
-
* @param {Function} func The function to have its output memoized.
|
|
1827
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1828
|
-
* @returns {Function} Returns the new memoized function.
|
|
1829
|
-
* @example
|
|
1830
|
-
*
|
|
1831
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1832
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1833
|
-
*
|
|
1834
|
-
* var values = _.memoize(_.values);
|
|
1835
|
-
* values(object);
|
|
1836
|
-
* // => [1, 2]
|
|
1837
|
-
*
|
|
1838
|
-
* values(other);
|
|
1839
|
-
* // => [3, 4]
|
|
1840
|
-
*
|
|
1841
|
-
* object.a = 2;
|
|
1842
|
-
* values(object);
|
|
1843
|
-
* // => [1, 2]
|
|
1844
|
-
*
|
|
1845
|
-
* // Modify the result cache.
|
|
1846
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1847
|
-
* values(object);
|
|
1848
|
-
* // => ['a', 'b']
|
|
1849
|
-
*
|
|
1850
|
-
* // Replace `_.memoize.Cache`.
|
|
1851
|
-
* _.memoize.Cache = WeakMap;
|
|
1852
|
-
*/
|
|
1853
|
-
function memoize(func, resolver) {
|
|
1854
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1855
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1856
|
-
}
|
|
1857
|
-
var memoized = function() {
|
|
1858
|
-
var args = arguments,
|
|
1859
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1860
|
-
cache = memoized.cache;
|
|
1861
|
-
|
|
1862
|
-
if (cache.has(key)) {
|
|
1863
|
-
return cache.get(key);
|
|
1864
|
-
}
|
|
1865
|
-
var result = func.apply(this, args);
|
|
1866
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1867
|
-
return result;
|
|
1868
|
-
};
|
|
1869
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1870
|
-
return memoized;
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
// Expose `MapCache`.
|
|
1874
|
-
memoize.Cache = _MapCache;
|
|
1875
|
-
|
|
1876
|
-
var memoize_1 = memoize;
|
|
1877
|
-
|
|
1878
|
-
/** Used as the maximum memoize cache size. */
|
|
1879
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1880
|
-
|
|
1881
|
-
/**
|
|
1882
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1883
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1884
|
-
*
|
|
1885
|
-
* @private
|
|
1886
|
-
* @param {Function} func The function to have its output memoized.
|
|
1887
|
-
* @returns {Function} Returns the new memoized function.
|
|
1888
|
-
*/
|
|
1889
|
-
function memoizeCapped(func) {
|
|
1890
|
-
var result = memoize_1(func, function(key) {
|
|
1891
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1892
|
-
cache.clear();
|
|
1893
|
-
}
|
|
1894
|
-
return key;
|
|
1895
|
-
});
|
|
1896
|
-
|
|
1897
|
-
var cache = result.cache;
|
|
1898
|
-
return result;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
var _memoizeCapped = memoizeCapped;
|
|
1902
|
-
|
|
1903
|
-
/** Used to match property names within property paths. */
|
|
1904
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1905
|
-
|
|
1906
|
-
/** Used to match backslashes in property paths. */
|
|
1907
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1908
|
-
|
|
1909
|
-
/**
|
|
1910
|
-
* Converts `string` to a property path array.
|
|
1911
|
-
*
|
|
1912
|
-
* @private
|
|
1913
|
-
* @param {string} string The string to convert.
|
|
1914
|
-
* @returns {Array} Returns the property path array.
|
|
1915
|
-
*/
|
|
1916
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1917
|
-
var result = [];
|
|
1918
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1919
|
-
result.push('');
|
|
1920
|
-
}
|
|
1921
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1922
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1923
|
-
});
|
|
1924
|
-
return result;
|
|
1925
|
-
});
|
|
1926
|
-
|
|
1927
|
-
var _stringToPath = stringToPath;
|
|
1928
|
-
|
|
1929
|
-
/**
|
|
1930
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1931
|
-
* shorthands.
|
|
1932
|
-
*
|
|
1933
|
-
* @private
|
|
1934
|
-
* @param {Array} [array] The array to iterate over.
|
|
1935
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1936
|
-
* @returns {Array} Returns the new mapped array.
|
|
1937
|
-
*/
|
|
1938
|
-
function arrayMap(array, iteratee) {
|
|
1939
|
-
var index = -1,
|
|
1940
|
-
length = array == null ? 0 : array.length,
|
|
1941
|
-
result = Array(length);
|
|
1942
|
-
|
|
1943
|
-
while (++index < length) {
|
|
1944
|
-
result[index] = iteratee(array[index], index, array);
|
|
1945
|
-
}
|
|
1946
|
-
return result;
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
var _arrayMap = arrayMap;
|
|
1950
|
-
|
|
1951
|
-
/** Used as references for various `Number` constants. */
|
|
1952
|
-
var INFINITY$1 = 1 / 0;
|
|
1953
|
-
|
|
1954
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1955
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1956
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1957
|
-
|
|
1958
|
-
/**
|
|
1959
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1960
|
-
* values to empty strings.
|
|
1961
|
-
*
|
|
1962
|
-
* @private
|
|
1963
|
-
* @param {*} value The value to process.
|
|
1964
|
-
* @returns {string} Returns the string.
|
|
1965
|
-
*/
|
|
1966
|
-
function baseToString(value) {
|
|
1967
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1968
|
-
if (typeof value == 'string') {
|
|
1969
|
-
return value;
|
|
1970
|
-
}
|
|
1971
|
-
if (isArray_1(value)) {
|
|
1972
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
1973
|
-
return _arrayMap(value, baseToString) + '';
|
|
1974
|
-
}
|
|
1975
|
-
if (isSymbol_1(value)) {
|
|
1976
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
1977
|
-
}
|
|
1978
|
-
var result = (value + '');
|
|
1979
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
var _baseToString = baseToString;
|
|
1983
|
-
|
|
1984
|
-
/**
|
|
1985
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
1986
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1987
|
-
*
|
|
1988
|
-
* @static
|
|
1989
|
-
* @memberOf _
|
|
1990
|
-
* @since 4.0.0
|
|
1991
|
-
* @category Lang
|
|
1992
|
-
* @param {*} value The value to convert.
|
|
1993
|
-
* @returns {string} Returns the converted string.
|
|
1994
|
-
* @example
|
|
1995
|
-
*
|
|
1996
|
-
* _.toString(null);
|
|
1997
|
-
* // => ''
|
|
1998
|
-
*
|
|
1999
|
-
* _.toString(-0);
|
|
2000
|
-
* // => '-0'
|
|
2001
|
-
*
|
|
2002
|
-
* _.toString([1, 2, 3]);
|
|
2003
|
-
* // => '1,2,3'
|
|
2004
|
-
*/
|
|
2005
|
-
function toString(value) {
|
|
2006
|
-
return value == null ? '' : _baseToString(value);
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
var toString_1 = toString;
|
|
2010
|
-
|
|
2011
|
-
/**
|
|
2012
|
-
* Casts `value` to a path array if it's not one.
|
|
2013
|
-
*
|
|
2014
|
-
* @private
|
|
2015
|
-
* @param {*} value The value to inspect.
|
|
2016
|
-
* @param {Object} [object] The object to query keys on.
|
|
2017
|
-
* @returns {Array} Returns the cast property path array.
|
|
2018
|
-
*/
|
|
2019
|
-
function castPath(value, object) {
|
|
2020
|
-
if (isArray_1(value)) {
|
|
2021
|
-
return value;
|
|
2022
|
-
}
|
|
2023
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
var _castPath = castPath;
|
|
2027
|
-
|
|
2028
|
-
/** Used as references for various `Number` constants. */
|
|
2029
|
-
var INFINITY = 1 / 0;
|
|
2030
|
-
|
|
2031
|
-
/**
|
|
2032
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
2033
|
-
*
|
|
2034
|
-
* @private
|
|
2035
|
-
* @param {*} value The value to inspect.
|
|
2036
|
-
* @returns {string|symbol} Returns the key.
|
|
2037
|
-
*/
|
|
2038
|
-
function toKey(value) {
|
|
2039
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
2040
|
-
return value;
|
|
2041
|
-
}
|
|
2042
|
-
var result = (value + '');
|
|
2043
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
var _toKey = toKey;
|
|
2047
|
-
|
|
2048
|
-
/**
|
|
2049
|
-
* The base implementation of `_.get` without support for default values.
|
|
2050
|
-
*
|
|
2051
|
-
* @private
|
|
2052
|
-
* @param {Object} object The object to query.
|
|
2053
|
-
* @param {Array|string} path The path of the property to get.
|
|
2054
|
-
* @returns {*} Returns the resolved value.
|
|
2055
|
-
*/
|
|
2056
|
-
function baseGet(object, path) {
|
|
2057
|
-
path = _castPath(path, object);
|
|
2058
|
-
|
|
2059
|
-
var index = 0,
|
|
2060
|
-
length = path.length;
|
|
2061
|
-
|
|
2062
|
-
while (object != null && index < length) {
|
|
2063
|
-
object = object[_toKey(path[index++])];
|
|
2064
|
-
}
|
|
2065
|
-
return (index && index == length) ? object : undefined;
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
var _baseGet = baseGet;
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
2072
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
2073
|
-
*
|
|
2074
|
-
* @static
|
|
2075
|
-
* @memberOf _
|
|
2076
|
-
* @since 3.7.0
|
|
2077
|
-
* @category Object
|
|
2078
|
-
* @param {Object} object The object to query.
|
|
2079
|
-
* @param {Array|string} path The path of the property to get.
|
|
2080
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
2081
|
-
* @returns {*} Returns the resolved value.
|
|
2082
|
-
* @example
|
|
2083
|
-
*
|
|
2084
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
2085
|
-
*
|
|
2086
|
-
* _.get(object, 'a[0].b.c');
|
|
2087
|
-
* // => 3
|
|
2088
|
-
*
|
|
2089
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
2090
|
-
* // => 3
|
|
2091
|
-
*
|
|
2092
|
-
* _.get(object, 'a.b.c', 'default');
|
|
2093
|
-
* // => 'default'
|
|
2094
|
-
*/
|
|
2095
|
-
function get(object, path, defaultValue) {
|
|
2096
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
2097
|
-
return result === undefined ? defaultValue : result;
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
var get_1 = get;
|
|
2101
|
-
|
|
2102
|
-
/**
|
|
2103
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
2104
|
-
* iteratee shorthands.
|
|
2105
|
-
*
|
|
2106
|
-
* @private
|
|
2107
|
-
* @param {Array} [array] The array to iterate over.
|
|
2108
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2109
|
-
* @param {*} [accumulator] The initial value.
|
|
2110
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
2111
|
-
* the initial value.
|
|
2112
|
-
* @returns {*} Returns the accumulated value.
|
|
2113
|
-
*/
|
|
2114
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
2115
|
-
var index = -1,
|
|
2116
|
-
length = array == null ? 0 : array.length;
|
|
2117
|
-
|
|
2118
|
-
if (initAccum && length) {
|
|
2119
|
-
accumulator = array[++index];
|
|
2120
|
-
}
|
|
2121
|
-
while (++index < length) {
|
|
2122
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
2123
|
-
}
|
|
2124
|
-
return accumulator;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
var _arrayReduce = arrayReduce;
|
|
2128
|
-
|
|
2129
|
-
/**
|
|
2130
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
2131
|
-
*
|
|
2132
|
-
* @private
|
|
2133
|
-
* @param {Object} object The object to query.
|
|
2134
|
-
* @returns {Function} Returns the new accessor function.
|
|
2135
|
-
*/
|
|
2136
|
-
function basePropertyOf(object) {
|
|
2137
|
-
return function(key) {
|
|
2138
|
-
return object == null ? undefined : object[key];
|
|
2139
|
-
};
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
var _basePropertyOf = basePropertyOf;
|
|
2143
|
-
|
|
2144
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2145
|
-
var deburredLetters = {
|
|
2146
|
-
// Latin-1 Supplement block.
|
|
2147
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2148
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2149
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2150
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2151
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2152
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2153
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2154
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2155
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2156
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2157
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2158
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2159
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2160
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2161
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2162
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2163
|
-
'\xdf': 'ss',
|
|
2164
|
-
// Latin Extended-A block.
|
|
2165
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2166
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2167
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2168
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2169
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2170
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2171
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2172
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2173
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2174
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2175
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2176
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2177
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2178
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2179
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2180
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2181
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2182
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2183
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2184
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2185
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2186
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2187
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2188
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2189
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2190
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2191
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2192
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2193
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2194
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2195
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2196
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2197
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2198
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2199
|
-
'\u0149': "'n", '\u017f': 's'
|
|
2200
|
-
};
|
|
2201
|
-
|
|
2202
|
-
/**
|
|
2203
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2204
|
-
* letters to basic Latin letters.
|
|
2205
|
-
*
|
|
2206
|
-
* @private
|
|
2207
|
-
* @param {string} letter The matched letter to deburr.
|
|
2208
|
-
* @returns {string} Returns the deburred letter.
|
|
2209
|
-
*/
|
|
2210
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2211
|
-
|
|
2212
|
-
var _deburrLetter = deburrLetter;
|
|
2213
|
-
|
|
2214
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2215
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2216
|
-
|
|
2217
|
-
/** Used to compose unicode character classes. */
|
|
2218
|
-
var rsComboMarksRange$3 = '\\u0300-\\u036f',
|
|
2219
|
-
reComboHalfMarksRange$3 = '\\ufe20-\\ufe2f',
|
|
2220
|
-
rsComboSymbolsRange$3 = '\\u20d0-\\u20ff',
|
|
2221
|
-
rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
|
|
2222
|
-
|
|
2223
|
-
/** Used to compose unicode capture groups. */
|
|
2224
|
-
var rsCombo$2 = '[' + rsComboRange$3 + ']';
|
|
2225
|
-
|
|
2226
|
-
/**
|
|
2227
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2228
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2229
|
-
*/
|
|
2230
|
-
var reComboMark = RegExp(rsCombo$2, 'g');
|
|
2231
|
-
|
|
2232
|
-
/**
|
|
2233
|
-
* Deburrs `string` by converting
|
|
2234
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2235
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2236
|
-
* letters to basic Latin letters and removing
|
|
2237
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2238
|
-
*
|
|
2239
|
-
* @static
|
|
2240
|
-
* @memberOf _
|
|
2241
|
-
* @since 3.0.0
|
|
2242
|
-
* @category String
|
|
2243
|
-
* @param {string} [string=''] The string to deburr.
|
|
2244
|
-
* @returns {string} Returns the deburred string.
|
|
2245
|
-
* @example
|
|
2246
|
-
*
|
|
2247
|
-
* _.deburr('déjà vu');
|
|
2248
|
-
* // => 'deja vu'
|
|
2249
|
-
*/
|
|
2250
|
-
function deburr(string) {
|
|
2251
|
-
string = toString_1(string);
|
|
2252
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
|
-
var deburr_1 = deburr;
|
|
2256
|
-
|
|
2257
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2258
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2259
|
-
|
|
2260
|
-
/**
|
|
2261
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2262
|
-
*
|
|
2263
|
-
* @private
|
|
2264
|
-
* @param {string} The string to inspect.
|
|
2265
|
-
* @returns {Array} Returns the words of `string`.
|
|
2266
|
-
*/
|
|
2267
|
-
function asciiWords(string) {
|
|
2268
|
-
return string.match(reAsciiWord) || [];
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
var _asciiWords = asciiWords;
|
|
2272
|
-
|
|
2273
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2274
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
2275
|
-
|
|
2276
|
-
/**
|
|
2277
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2278
|
-
*
|
|
2279
|
-
* @private
|
|
2280
|
-
* @param {string} string The string to inspect.
|
|
2281
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2282
|
-
*/
|
|
2283
|
-
function hasUnicodeWord(string) {
|
|
2284
|
-
return reHasUnicodeWord.test(string);
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2288
|
-
|
|
2289
|
-
/** Used to compose unicode character classes. */
|
|
2290
|
-
var rsAstralRange$2 = '\\ud800-\\udfff',
|
|
2291
|
-
rsComboMarksRange$2 = '\\u0300-\\u036f',
|
|
2292
|
-
reComboHalfMarksRange$2 = '\\ufe20-\\ufe2f',
|
|
2293
|
-
rsComboSymbolsRange$2 = '\\u20d0-\\u20ff',
|
|
2294
|
-
rsComboRange$2 = rsComboMarksRange$2 + reComboHalfMarksRange$2 + rsComboSymbolsRange$2,
|
|
2295
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2296
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2297
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2298
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2299
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2300
|
-
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
2301
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2302
|
-
rsVarRange$2 = '\\ufe0e\\ufe0f',
|
|
2303
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2304
|
-
|
|
2305
|
-
/** Used to compose unicode capture groups. */
|
|
2306
|
-
var rsApos$1 = "['\u2019]",
|
|
2307
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2308
|
-
rsCombo$1 = '[' + rsComboRange$2 + ']',
|
|
2309
|
-
rsDigits = '\\d+',
|
|
2310
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2311
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2312
|
-
rsMisc = '[^' + rsAstralRange$2 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2313
|
-
rsFitz$1 = '\\ud83c[\\udffb-\\udfff]',
|
|
2314
|
-
rsModifier$1 = '(?:' + rsCombo$1 + '|' + rsFitz$1 + ')',
|
|
2315
|
-
rsNonAstral$1 = '[^' + rsAstralRange$2 + ']',
|
|
2316
|
-
rsRegional$1 = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2317
|
-
rsSurrPair$1 = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2318
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2319
|
-
rsZWJ$2 = '\\u200d';
|
|
2320
|
-
|
|
2321
|
-
/** Used to compose unicode regexes. */
|
|
2322
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2323
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2324
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2325
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2326
|
-
reOptMod$1 = rsModifier$1 + '?',
|
|
2327
|
-
rsOptVar$1 = '[' + rsVarRange$2 + ']?',
|
|
2328
|
-
rsOptJoin$1 = '(?:' + rsZWJ$2 + '(?:' + [rsNonAstral$1, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsOptVar$1 + reOptMod$1 + ')*',
|
|
2329
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2330
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2331
|
-
rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1,
|
|
2332
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsSeq$1;
|
|
2333
|
-
|
|
2334
|
-
/** Used to match complex or compound words. */
|
|
2335
|
-
var reUnicodeWord = RegExp([
|
|
2336
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2337
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2338
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2339
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2340
|
-
rsOrdUpper,
|
|
2341
|
-
rsOrdLower,
|
|
2342
|
-
rsDigits,
|
|
2343
|
-
rsEmoji
|
|
2344
|
-
].join('|'), 'g');
|
|
2345
|
-
|
|
2346
|
-
/**
|
|
2347
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2348
|
-
*
|
|
2349
|
-
* @private
|
|
2350
|
-
* @param {string} The string to inspect.
|
|
2351
|
-
* @returns {Array} Returns the words of `string`.
|
|
2352
|
-
*/
|
|
2353
|
-
function unicodeWords(string) {
|
|
2354
|
-
return string.match(reUnicodeWord) || [];
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
var _unicodeWords = unicodeWords;
|
|
2358
|
-
|
|
2359
|
-
/**
|
|
2360
|
-
* Splits `string` into an array of its words.
|
|
2361
|
-
*
|
|
2362
|
-
* @static
|
|
2363
|
-
* @memberOf _
|
|
2364
|
-
* @since 3.0.0
|
|
2365
|
-
* @category String
|
|
2366
|
-
* @param {string} [string=''] The string to inspect.
|
|
2367
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2368
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2369
|
-
* @returns {Array} Returns the words of `string`.
|
|
2370
|
-
* @example
|
|
2371
|
-
*
|
|
2372
|
-
* _.words('fred, barney, & pebbles');
|
|
2373
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2374
|
-
*
|
|
2375
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2376
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2377
|
-
*/
|
|
2378
|
-
function words(string, pattern, guard) {
|
|
2379
|
-
string = toString_1(string);
|
|
2380
|
-
pattern = guard ? undefined : pattern;
|
|
2381
|
-
|
|
2382
|
-
if (pattern === undefined) {
|
|
2383
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2384
|
-
}
|
|
2385
|
-
return string.match(pattern) || [];
|
|
2386
|
-
}
|
|
2387
|
-
|
|
2388
|
-
var words_1 = words;
|
|
2389
|
-
|
|
2390
|
-
/** Used to compose unicode capture groups. */
|
|
2391
|
-
var rsApos = "['\u2019]";
|
|
2392
|
-
|
|
2393
|
-
/** Used to match apostrophes. */
|
|
2394
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2395
|
-
|
|
2396
|
-
/**
|
|
2397
|
-
* Creates a function like `_.camelCase`.
|
|
2398
|
-
*
|
|
2399
|
-
* @private
|
|
2400
|
-
* @param {Function} callback The function to combine each word.
|
|
2401
|
-
* @returns {Function} Returns the new compounder function.
|
|
2402
|
-
*/
|
|
2403
|
-
function createCompounder(callback) {
|
|
2404
|
-
return function(string) {
|
|
2405
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2406
|
-
};
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
|
-
var _createCompounder = createCompounder;
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
9
|
+
require('@babel/runtime/helpers/typeof');
|
|
10
|
+
require('@babel/runtime/regenerator');
|
|
11
|
+
var lodash = require('lodash');
|
|
12
|
+
require('react-timeago');
|
|
13
|
+
require('date-fns-tz');
|
|
14
|
+
var components = require('@quintype/components');
|
|
15
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
16
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
17
|
+
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
21
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
24
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
2410
25
|
|
|
2411
26
|
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
2412
27
|
var sharePageUrl = canUseDOM && window.location.href;
|
|
@@ -2439,10 +54,10 @@ var clientWidths = {
|
|
|
2439
54
|
tablet: 1024
|
|
2440
55
|
};
|
|
2441
56
|
var clientWidth = function clientWidth(device) {
|
|
2442
|
-
var foundDeviceWidth =
|
|
57
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2443
58
|
|
|
2444
59
|
if (foundDeviceWidth) {
|
|
2445
|
-
return
|
|
60
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2446
61
|
}
|
|
2447
62
|
|
|
2448
63
|
return false;
|
|
@@ -2454,15 +69,15 @@ var getTextColor = function getTextColor() {
|
|
|
2454
69
|
var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
|
|
2455
70
|
return textColor;
|
|
2456
71
|
};
|
|
2457
|
-
|
|
2458
|
-
"sketches-host":
|
|
2459
|
-
"cdn-name":
|
|
2460
|
-
"cdn-image":
|
|
72
|
+
PropTypes__default["default"].shape({
|
|
73
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
74
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
75
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2461
76
|
});
|
|
2462
|
-
|
|
2463
|
-
headline:
|
|
2464
|
-
"last-published-at":
|
|
2465
|
-
subheadline:
|
|
77
|
+
PropTypes__default["default"].shape({
|
|
78
|
+
headline: PropTypes__default["default"].string,
|
|
79
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
80
|
+
subheadline: PropTypes__default["default"].string
|
|
2466
81
|
});
|
|
2467
82
|
|
|
2468
83
|
var UserFallbackIcon = function UserFallbackIcon(_ref) {
|
|
@@ -2470,20 +85,20 @@ var UserFallbackIcon = function UserFallbackIcon(_ref) {
|
|
|
2470
85
|
width = _ref$width === void 0 ? 120 : _ref$width,
|
|
2471
86
|
_ref$height = _ref.height,
|
|
2472
87
|
height = _ref$height === void 0 ? 120 : _ref$height;
|
|
2473
|
-
return /*#__PURE__*/
|
|
88
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2474
89
|
width: width,
|
|
2475
90
|
height: height,
|
|
2476
91
|
viewBox: "0 0 120 120",
|
|
2477
92
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2478
|
-
}, /*#__PURE__*/
|
|
93
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2479
94
|
d: "M93.28 108.98c-1.055-17.675-15.47-31.678-33.098-31.678-17.708 0-32.173 14.129-33.11 31.916 9.415 6.311 20.741 9.993 32.927 9.993 12.338 0 23.795-3.774 33.28-10.23l.001-.001zM58.584 73.283c9.928 0 17.977-8.275 17.977-18.483 0-10.209-8.049-18.484-17.977-18.484-9.929 0-17.977 8.275-17.977 18.484 0 10.208 8.048 18.483 17.977 18.483zM60 120C26.863 120 0 93.137 0 60S26.863 0 60 0s60 26.863 60 60-26.863 60-60 60z",
|
|
2480
95
|
fill: "#DADADA",
|
|
2481
96
|
fillRule: "nonzero"
|
|
2482
97
|
}));
|
|
2483
98
|
};
|
|
2484
99
|
UserFallbackIcon.propTypes = {
|
|
2485
|
-
width:
|
|
2486
|
-
height:
|
|
100
|
+
width: PropTypes__default["default"].object,
|
|
101
|
+
height: PropTypes__default["default"].object
|
|
2487
102
|
};
|
|
2488
103
|
|
|
2489
104
|
var _styleModuleImportMap$3 = {
|
|
@@ -2503,12 +118,12 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
2503
118
|
var avatarUrl = author["avatar-url"],
|
|
2504
119
|
avatarS3Key = author["avatar-s3-key"],
|
|
2505
120
|
name = author.name;
|
|
2506
|
-
return /*#__PURE__*/
|
|
121
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2507
122
|
"data-test-id": "author-image",
|
|
2508
|
-
className: "arr--author-image " +
|
|
2509
|
-
}, /*#__PURE__*/
|
|
123
|
+
className: "arr--author-image " + _getClassName__default["default"]("author-image ".concat(templateStyle), _styleModuleImportMap$3)
|
|
124
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2510
125
|
className: "author-image-m_image-container__19WNd"
|
|
2511
|
-
}, avatarS3Key ? /*#__PURE__*/
|
|
126
|
+
}, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
2512
127
|
slug: avatarS3Key,
|
|
2513
128
|
alt: name,
|
|
2514
129
|
defaultWidth: 250,
|
|
@@ -2518,9 +133,9 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
2518
133
|
imgParams: {
|
|
2519
134
|
auto: ["format", "compress"]
|
|
2520
135
|
}
|
|
2521
|
-
}) : avatarUrl ? /*#__PURE__*/
|
|
136
|
+
}) : avatarUrl ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2522
137
|
src: avatarUrl
|
|
2523
|
-
}) : /*#__PURE__*/
|
|
138
|
+
}) : /*#__PURE__*/React__default["default"].createElement(UserFallbackIcon, null)));
|
|
2524
139
|
};
|
|
2525
140
|
|
|
2526
141
|
var AuthorImage = function AuthorImage(_ref) {
|
|
@@ -2534,202 +149,123 @@ var AuthorImage = function AuthorImage(_ref) {
|
|
|
2534
149
|
var mountAt = config.mountAt || "";
|
|
2535
150
|
var templateStyle = "";
|
|
2536
151
|
if (template === "smallerCircle") templateStyle = "smaller-circle";else if (template === "smallCircle") templateStyle = "small-circle";else if (template === "square") templateStyle = "square";
|
|
2537
|
-
if (slug) return /*#__PURE__*/
|
|
152
|
+
if (slug) return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2538
153
|
href: "".concat(mountAt, "/author/") + slug
|
|
2539
154
|
}, authorWithImage(author, templateStyle));else return authorWithImage(author, templateStyle);
|
|
2540
155
|
};
|
|
2541
156
|
|
|
2542
157
|
AuthorImage.propTypes = {
|
|
2543
|
-
author:
|
|
2544
|
-
"avatar-url":
|
|
2545
|
-
"avatar-s3-key":
|
|
2546
|
-
name:
|
|
2547
|
-
slug:
|
|
158
|
+
author: PropTypes__default["default"].shape({
|
|
159
|
+
"avatar-url": PropTypes__default["default"].string,
|
|
160
|
+
"avatar-s3-key": PropTypes__default["default"].string,
|
|
161
|
+
name: PropTypes__default["default"].string,
|
|
162
|
+
slug: PropTypes__default["default"].string
|
|
2548
163
|
}),
|
|
2549
|
-
template:
|
|
164
|
+
template: PropTypes__default["default"].string
|
|
2550
165
|
};
|
|
2551
166
|
|
|
2552
|
-
function _extends() {
|
|
2553
|
-
_extends = Object.assign || function (target) {
|
|
2554
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2555
|
-
var source = arguments[i];
|
|
2556
|
-
|
|
2557
|
-
for (var key in source) {
|
|
2558
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2559
|
-
target[key] = source[key];
|
|
2560
|
-
}
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
return target;
|
|
2565
|
-
};
|
|
2566
|
-
|
|
2567
|
-
return _extends.apply(this, arguments);
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
|
-
function _arrayWithHoles(arr) {
|
|
2571
|
-
if (Array.isArray(arr)) return arr;
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2575
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2576
|
-
|
|
2577
|
-
if (_i == null) return;
|
|
2578
|
-
var _arr = [];
|
|
2579
|
-
var _n = true;
|
|
2580
|
-
var _d = false;
|
|
2581
|
-
|
|
2582
|
-
var _s, _e;
|
|
2583
|
-
|
|
2584
|
-
try {
|
|
2585
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2586
|
-
_arr.push(_s.value);
|
|
2587
|
-
|
|
2588
|
-
if (i && _arr.length === i) break;
|
|
2589
|
-
}
|
|
2590
|
-
} catch (err) {
|
|
2591
|
-
_d = true;
|
|
2592
|
-
_e = err;
|
|
2593
|
-
} finally {
|
|
2594
|
-
try {
|
|
2595
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
2596
|
-
} finally {
|
|
2597
|
-
if (_d) throw _e;
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
return _arr;
|
|
2602
|
-
}
|
|
2603
|
-
|
|
2604
|
-
function _arrayLikeToArray(arr, len) {
|
|
2605
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2606
|
-
|
|
2607
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2608
|
-
arr2[i] = arr[i];
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
return arr2;
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
2615
|
-
if (!o) return;
|
|
2616
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
2617
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2618
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2619
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
2620
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
function _nonIterableRest() {
|
|
2624
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
function _slicedToArray(arr, i) {
|
|
2628
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
167
|
var Twitter = function Twitter(_ref) {
|
|
2632
168
|
var _ref$color = _ref.color,
|
|
2633
169
|
color = _ref$color === void 0 ? "#1CB7EB" : _ref$color;
|
|
2634
|
-
return /*#__PURE__*/
|
|
170
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2635
171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2636
172
|
width: "24",
|
|
2637
173
|
height: "24",
|
|
2638
174
|
viewBox: "0 0 24 24"
|
|
2639
|
-
}, /*#__PURE__*/
|
|
175
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2640
176
|
fill: color,
|
|
2641
177
|
d: "M19.137 8.594c.023.094.035.246.035.457 0 1.687-.41 3.316-1.23 4.887-.844 1.664-2.028 2.988-3.551 3.972-1.664 1.102-3.575 1.652-5.73 1.652-2.063 0-3.95-.55-5.661-1.652.258.024.55.035.879.035 1.71 0 3.246-.527 4.605-1.582-.82 0-1.54-.24-2.162-.72a3.673 3.673 0 01-1.283-1.811c.234.023.457.035.668.035.328 0 .656-.035.984-.105a3.724 3.724 0 01-2.109-1.301 3.542 3.542 0 01-.844-2.32v-.07a3.493 3.493 0 001.653.492 4.097 4.097 0 01-1.196-1.336 3.557 3.557 0 01-.457-1.776c0-.644.176-1.26.528-1.845a10.188 10.188 0 003.357 2.742 10.222 10.222 0 004.236 1.125 5.122 5.122 0 01-.07-.844c0-.656.164-1.272.492-1.846a3.615 3.615 0 011.336-1.353 3.568 3.568 0 011.828-.492c.54 0 1.037.105 1.494.316.457.21.862.492 1.213.844a7.479 7.479 0 002.356-.88c-.281.868-.82 1.548-1.617 2.04A7.926 7.926 0 0021 6.66a8.132 8.132 0 01-1.863 1.934z"
|
|
2642
178
|
}));
|
|
2643
179
|
};
|
|
2644
180
|
Twitter.propTypes = {
|
|
2645
|
-
color:
|
|
181
|
+
color: PropTypes__default["default"].string
|
|
2646
182
|
};
|
|
2647
183
|
|
|
2648
184
|
var Facebook = function Facebook(_ref) {
|
|
2649
185
|
var _ref$color = _ref.color,
|
|
2650
186
|
color = _ref$color === void 0 ? "#3B5998" : _ref$color;
|
|
2651
|
-
return /*#__PURE__*/
|
|
187
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2652
188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2653
189
|
width: "24",
|
|
2654
190
|
height: "24",
|
|
2655
191
|
viewBox: "0 0 24 24"
|
|
2656
|
-
}, /*#__PURE__*/
|
|
192
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2657
193
|
fill: color,
|
|
2658
194
|
d: "M9.906 20v-7.156H7.5V10h2.406V7.75c0-1.187.334-2.11 1-2.766.667-.656 1.552-.984 2.656-.984.896 0 1.625.042 2.188.125v2.531h-1.5c-.563 0-.948.125-1.156.375-.167.209-.25.542-.25 1V10H15.5l-.375 2.844h-2.281V20H9.906z"
|
|
2659
195
|
}));
|
|
2660
196
|
};
|
|
2661
197
|
Facebook.propTypes = {
|
|
2662
|
-
color:
|
|
198
|
+
color: PropTypes__default["default"].string
|
|
2663
199
|
};
|
|
2664
200
|
|
|
2665
201
|
var LinkedIn = function LinkedIn(_ref) {
|
|
2666
202
|
var _ref$color = _ref.color,
|
|
2667
203
|
color = _ref$color === void 0 ? "#0077B5" : _ref$color;
|
|
2668
|
-
return /*#__PURE__*/
|
|
204
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2669
205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2670
206
|
width: "24",
|
|
2671
207
|
height: "24",
|
|
2672
208
|
viewBox: "0 0 24 24"
|
|
2673
|
-
}, /*#__PURE__*/
|
|
209
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2674
210
|
fill: color,
|
|
2675
211
|
d: "M6.71 19H3.26V7.904h3.45V19zM5.005 6.383a1.926 1.926 0 01-1.41-.594A1.923 1.923 0 013 4.38c0-.544.198-1.014.594-1.41a1.926 1.926 0 011.41-.594c.544 0 1.014.198 1.41.594.396.396.594.866.594 1.41 0 .544-.198 1.014-.594 1.41a1.926 1.926 0 01-1.41.594zM19.625 19h-3.451v-5.418c0-.89-.074-1.534-.223-1.93-.272-.668-.804-1.002-1.596-1.002-.791 0-1.348.297-1.67.891-.247.445-.37 1.1-.37 1.967V19H8.9V7.904h3.303v1.522h.037c.248-.495.643-.903 1.188-1.225.593-.396 1.286-.594 2.078-.594 1.608 0 2.734.508 3.377 1.522.495.816.742 2.078.742 3.785V19z"
|
|
2676
212
|
}));
|
|
2677
213
|
};
|
|
2678
214
|
LinkedIn.propTypes = {
|
|
2679
|
-
color:
|
|
215
|
+
color: PropTypes__default["default"].string
|
|
2680
216
|
};
|
|
2681
217
|
|
|
2682
218
|
var WhatsApp = function WhatsApp(_ref) {
|
|
2683
219
|
var _ref$color = _ref.color,
|
|
2684
220
|
color = _ref$color === void 0 ? "#4AC959" : _ref$color;
|
|
2685
|
-
return /*#__PURE__*/
|
|
221
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2686
222
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2687
223
|
width: "24",
|
|
2688
224
|
height: "24",
|
|
2689
225
|
viewBox: "0 0 24 24"
|
|
2690
|
-
}, /*#__PURE__*/
|
|
226
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2691
227
|
fill: color,
|
|
2692
228
|
fillRule: "evenodd",
|
|
2693
229
|
d: "M18.404 5.505a9.457 9.457 0 012.02 2.96 8.587 8.587 0 01.715 3.449 8.665 8.665 0 01-1.245 4.53 9.282 9.282 0 01-3.347 3.307 8.894 8.894 0 01-4.552 1.225 8.835 8.835 0 01-4.327-1.102l-4.817 1.265 1.307-4.694a8.775 8.775 0 01-1.225-4.531 8.77 8.77 0 011.225-4.531 9.17 9.17 0 013.306-3.307 8.781 8.781 0 014.531-1.224c1.198 0 2.347.23 3.45.693a9.515 9.515 0 012.959 1.96zm-6.409 13.96c1.36 0 2.626-.34 3.797-1.02a7.75 7.75 0 002.796-2.756 7.202 7.202 0 001.04-3.775c0-.98-.203-1.933-.612-2.858a8.088 8.088 0 00-1.694-2.47 7.565 7.565 0 00-2.449-1.653 7.405 7.405 0 00-2.878-.571c-1.36 0-2.62.34-3.776 1.02a7.646 7.646 0 00-2.755 2.756 7.316 7.316 0 00-1.02 3.776c0 1.442.394 2.775 1.183 4l.164.286-.776 2.775 2.857-.734.286.163a7.275 7.275 0 003.837 1.061zm4.123-5.674l.123.082c.19.082.299.15.326.204.027.054.034.19.02.408a2.11 2.11 0 01-.163.674c-.095.231-.313.462-.653.694-.34.231-.633.36-.878.388-.38.054-.748.054-1.102 0-.408-.082-.952-.273-1.632-.572-1.388-.599-2.654-1.714-3.797-3.347l-.081-.082c-.6-.843-.898-1.62-.898-2.327 0-.707.244-1.32.734-1.837l.041-.04c.19-.19.395-.286.612-.286h.49c.11 0 .198.02.266.061.068.041.129.143.183.306l.694 1.674c.082.163.095.3.041.408a2.832 2.832 0 01-.53.735.917.917 0 00-.205.265c-.027.068 0 .143.082.225.38.707.83 1.265 1.347 1.673.381.3.952.64 1.714 1.02.218.11.381.096.49-.04.354-.408.599-.707.735-.898.054-.109.123-.163.204-.163.082 0 .177.013.286.04.218.082.735.327 1.551.735z"
|
|
2694
230
|
}));
|
|
2695
231
|
};
|
|
2696
232
|
WhatsApp.propTypes = {
|
|
2697
|
-
color:
|
|
233
|
+
color: PropTypes__default["default"].string
|
|
2698
234
|
};
|
|
2699
235
|
|
|
2700
236
|
var getSocialIcons = function getSocialIcons(color, iconType) {
|
|
2701
237
|
switch (iconType) {
|
|
2702
238
|
case "plain-color-svg":
|
|
2703
239
|
return {
|
|
2704
|
-
facebook: /*#__PURE__*/
|
|
240
|
+
facebook: /*#__PURE__*/React__default["default"].createElement(Facebook, {
|
|
2705
241
|
key: iconType
|
|
2706
242
|
}),
|
|
2707
|
-
twitter: /*#__PURE__*/
|
|
243
|
+
twitter: /*#__PURE__*/React__default["default"].createElement(Twitter, {
|
|
2708
244
|
key: iconType
|
|
2709
245
|
}),
|
|
2710
|
-
linkedin: /*#__PURE__*/
|
|
246
|
+
linkedin: /*#__PURE__*/React__default["default"].createElement(LinkedIn, {
|
|
2711
247
|
key: iconType
|
|
2712
248
|
}),
|
|
2713
|
-
whatsapp: /*#__PURE__*/
|
|
249
|
+
whatsapp: /*#__PURE__*/React__default["default"].createElement(WhatsApp, {
|
|
2714
250
|
key: iconType
|
|
2715
251
|
})
|
|
2716
252
|
};
|
|
2717
253
|
|
|
2718
254
|
default:
|
|
2719
255
|
return {
|
|
2720
|
-
facebook: /*#__PURE__*/
|
|
256
|
+
facebook: /*#__PURE__*/React__default["default"].createElement(Facebook, {
|
|
2721
257
|
color: color,
|
|
2722
258
|
key: iconType
|
|
2723
259
|
}),
|
|
2724
|
-
twitter: /*#__PURE__*/
|
|
260
|
+
twitter: /*#__PURE__*/React__default["default"].createElement(Twitter, {
|
|
2725
261
|
color: color,
|
|
2726
262
|
key: iconType
|
|
2727
263
|
}),
|
|
2728
|
-
linkedin: /*#__PURE__*/
|
|
264
|
+
linkedin: /*#__PURE__*/React__default["default"].createElement(LinkedIn, {
|
|
2729
265
|
color: color,
|
|
2730
266
|
key: iconType
|
|
2731
267
|
}),
|
|
2732
|
-
whatsapp: /*#__PURE__*/
|
|
268
|
+
whatsapp: /*#__PURE__*/React__default["default"].createElement(WhatsApp, {
|
|
2733
269
|
color: color,
|
|
2734
270
|
key: iconType
|
|
2735
271
|
})
|
|
@@ -2785,22 +321,22 @@ var socialShareData = function socialShareData(_ref) {
|
|
|
2785
321
|
var CloseIcon = function CloseIcon(_ref) {
|
|
2786
322
|
var _ref$color = _ref.color,
|
|
2787
323
|
color = _ref$color === void 0 ? "#333" : _ref$color;
|
|
2788
|
-
return /*#__PURE__*/
|
|
324
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2789
325
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2790
326
|
width: "24",
|
|
2791
327
|
height: "24",
|
|
2792
328
|
viewBox: "0 0 24 24"
|
|
2793
|
-
}, /*#__PURE__*/
|
|
329
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2794
330
|
fill: "none",
|
|
2795
331
|
stroke: color,
|
|
2796
332
|
strokeLinecap: "square",
|
|
2797
333
|
strokeWidth: "2"
|
|
2798
|
-
}, /*#__PURE__*/
|
|
334
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2799
335
|
d: "M16.95 6.914l-9.9 9.9M16.95 17.107l-9.9-9.9"
|
|
2800
336
|
})));
|
|
2801
337
|
};
|
|
2802
338
|
CloseIcon.propTypes = {
|
|
2803
|
-
color:
|
|
339
|
+
color: PropTypes__default["default"].string
|
|
2804
340
|
};
|
|
2805
341
|
|
|
2806
342
|
var _styleModuleImportMap$2 = {
|
|
@@ -2821,17 +357,17 @@ var _styleModuleImportMap$2 = {
|
|
|
2821
357
|
};
|
|
2822
358
|
|
|
2823
359
|
var popupSocialShareItem = function popupSocialShareItem(url, icon, text, index) {
|
|
2824
|
-
return url ? /*#__PURE__*/
|
|
360
|
+
return url ? /*#__PURE__*/React__default["default"].createElement("li", {
|
|
2825
361
|
className: "social-share-popup-m_social-icon-wrapper__36jyV",
|
|
2826
362
|
"data-testid": text,
|
|
2827
363
|
key: "popup-item-".concat(index)
|
|
2828
|
-
}, /*#__PURE__*/
|
|
364
|
+
}, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
2829
365
|
href: url,
|
|
2830
366
|
target: "_blank",
|
|
2831
367
|
rel: "noopener noreferrer",
|
|
2832
368
|
className: "social-share-popup-m_social-wrapper__1lPzr",
|
|
2833
369
|
"aria-label": "social-icon"
|
|
2834
|
-
}, icon, /*#__PURE__*/
|
|
370
|
+
}, icon, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2835
371
|
className: "social-share-popup-m_social-text__1QPXb"
|
|
2836
372
|
}, text))) : null;
|
|
2837
373
|
};
|
|
@@ -2861,20 +397,20 @@ var SocialSharePopup = function SocialSharePopup(_ref) {
|
|
|
2861
397
|
iconType: iconType
|
|
2862
398
|
};
|
|
2863
399
|
var popupItemsList = socialShareData(options);
|
|
2864
|
-
return /*#__PURE__*/
|
|
2865
|
-
className:
|
|
2866
|
-
}, /*#__PURE__*/
|
|
400
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
401
|
+
className: _getClassName__default["default"]("share-popup-wrapper ".concat(textColor), _styleModuleImportMap$2)
|
|
402
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2867
403
|
className: "social-share-popup-m_share-popup__QRt3l social-share-popup-m_share-popup-wrapper__GEJqD"
|
|
2868
|
-
}, /*#__PURE__*/
|
|
404
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2869
405
|
className: "social-share-popup-m_top-bar__174Um"
|
|
2870
|
-
}, /*#__PURE__*/
|
|
406
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2871
407
|
className: "social-share-popup-m_share-text__19E-F"
|
|
2872
|
-
}, "Share via"), /*#__PURE__*/
|
|
408
|
+
}, "Share via"), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2873
409
|
className: "social-share-popup-m_close__3k-Hj",
|
|
2874
410
|
onClick: closePopup
|
|
2875
|
-
}, /*#__PURE__*/
|
|
411
|
+
}, /*#__PURE__*/React__default["default"].createElement(CloseIcon, {
|
|
2876
412
|
color: iconColor
|
|
2877
|
-
}))), /*#__PURE__*/
|
|
413
|
+
}))), /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
2878
414
|
className: "social-share-popup-m_wrapper__3Ytce"
|
|
2879
415
|
}, popupItemsList.map(function (_ref2, index) {
|
|
2880
416
|
var url = _ref2.url,
|
|
@@ -2886,278 +422,35 @@ var SocialSharePopup = function SocialSharePopup(_ref) {
|
|
|
2886
422
|
}))));
|
|
2887
423
|
};
|
|
2888
424
|
SocialSharePopup.propTypes = {
|
|
2889
|
-
fbUrl:
|
|
2890
|
-
twitterUrl:
|
|
2891
|
-
linkedinUrl:
|
|
2892
|
-
whatsappUrl:
|
|
2893
|
-
grey:
|
|
2894
|
-
primaryColor:
|
|
2895
|
-
closePopup:
|
|
2896
|
-
theme:
|
|
2897
|
-
iconType:
|
|
425
|
+
fbUrl: PropTypes__default["default"].string,
|
|
426
|
+
twitterUrl: PropTypes__default["default"].string,
|
|
427
|
+
linkedinUrl: PropTypes__default["default"].string,
|
|
428
|
+
whatsappUrl: PropTypes__default["default"].string,
|
|
429
|
+
grey: PropTypes__default["default"].string,
|
|
430
|
+
primaryColor: PropTypes__default["default"].string,
|
|
431
|
+
closePopup: PropTypes__default["default"].bool,
|
|
432
|
+
theme: PropTypes__default["default"].string,
|
|
433
|
+
iconType: PropTypes__default["default"].string
|
|
2898
434
|
};
|
|
2899
435
|
|
|
2900
436
|
var ShareIcon = function ShareIcon(_ref) {
|
|
2901
437
|
var _ref$color = _ref.color,
|
|
2902
438
|
color = _ref$color === void 0 ? "#0D0D0D" : _ref$color;
|
|
2903
|
-
return /*#__PURE__*/
|
|
439
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2904
440
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2905
441
|
width: "24",
|
|
2906
442
|
height: "24",
|
|
2907
443
|
viewBox: "0 0 24 24"
|
|
2908
|
-
}, /*#__PURE__*/
|
|
444
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2909
445
|
fill: color,
|
|
2910
446
|
fillRule: "evenodd",
|
|
2911
447
|
d: "M15.843 3.189c-1.478 0-2.689 1.239-2.689 2.75 0 .293.046.58.13.846L8.844 9.31a2.638 2.638 0 00-1.687-.621c-1.477 0-2.688 1.238-2.688 2.75 0 1.51 1.21 2.75 2.688 2.75.638 0 1.224-.231 1.687-.615l4.446 2.525a2.778 2.778 0 00-.136.84c0 1.51 1.211 2.75 2.689 2.75 1.477 0 2.688-1.24 2.688-2.75 0-1.512-1.21-2.75-2.688-2.75-.742 0-1.419.317-1.907.82l-4.323-2.46a2.763 2.763 0 000-2.221l4.317-2.459c.488.506 1.168.82 1.913.82 1.477 0 2.688-1.239 2.688-2.75s-1.21-2.75-2.688-2.75z"
|
|
2912
448
|
}));
|
|
2913
449
|
};
|
|
2914
450
|
ShareIcon.propTypes = {
|
|
2915
|
-
color:
|
|
451
|
+
color: PropTypes__default["default"].string
|
|
2916
452
|
};
|
|
2917
453
|
|
|
2918
|
-
/**
|
|
2919
|
-
* The base implementation of `_.slice` without an iteratee call guard.
|
|
2920
|
-
*
|
|
2921
|
-
* @private
|
|
2922
|
-
* @param {Array} array The array to slice.
|
|
2923
|
-
* @param {number} [start=0] The start position.
|
|
2924
|
-
* @param {number} [end=array.length] The end position.
|
|
2925
|
-
* @returns {Array} Returns the slice of `array`.
|
|
2926
|
-
*/
|
|
2927
|
-
function baseSlice(array, start, end) {
|
|
2928
|
-
var index = -1,
|
|
2929
|
-
length = array.length;
|
|
2930
|
-
|
|
2931
|
-
if (start < 0) {
|
|
2932
|
-
start = -start > length ? 0 : (length + start);
|
|
2933
|
-
}
|
|
2934
|
-
end = end > length ? length : end;
|
|
2935
|
-
if (end < 0) {
|
|
2936
|
-
end += length;
|
|
2937
|
-
}
|
|
2938
|
-
length = start > end ? 0 : ((end - start) >>> 0);
|
|
2939
|
-
start >>>= 0;
|
|
2940
|
-
|
|
2941
|
-
var result = Array(length);
|
|
2942
|
-
while (++index < length) {
|
|
2943
|
-
result[index] = array[index + start];
|
|
2944
|
-
}
|
|
2945
|
-
return result;
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
var _baseSlice = baseSlice;
|
|
2949
|
-
|
|
2950
|
-
/**
|
|
2951
|
-
* Casts `array` to a slice if it's needed.
|
|
2952
|
-
*
|
|
2953
|
-
* @private
|
|
2954
|
-
* @param {Array} array The array to inspect.
|
|
2955
|
-
* @param {number} start The start position.
|
|
2956
|
-
* @param {number} [end=array.length] The end position.
|
|
2957
|
-
* @returns {Array} Returns the cast slice.
|
|
2958
|
-
*/
|
|
2959
|
-
function castSlice(array, start, end) {
|
|
2960
|
-
var length = array.length;
|
|
2961
|
-
end = end === undefined ? length : end;
|
|
2962
|
-
return (!start && end >= length) ? array : _baseSlice(array, start, end);
|
|
2963
|
-
}
|
|
2964
|
-
|
|
2965
|
-
var _castSlice = castSlice;
|
|
2966
|
-
|
|
2967
|
-
/** Used to compose unicode character classes. */
|
|
2968
|
-
var rsAstralRange$1 = '\\ud800-\\udfff',
|
|
2969
|
-
rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
2970
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
2971
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
2972
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
|
|
2973
|
-
rsVarRange$1 = '\\ufe0e\\ufe0f';
|
|
2974
|
-
|
|
2975
|
-
/** Used to compose unicode capture groups. */
|
|
2976
|
-
var rsZWJ$1 = '\\u200d';
|
|
2977
|
-
|
|
2978
|
-
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
2979
|
-
var reHasUnicode = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + ']');
|
|
2980
|
-
|
|
2981
|
-
/**
|
|
2982
|
-
* Checks if `string` contains Unicode symbols.
|
|
2983
|
-
*
|
|
2984
|
-
* @private
|
|
2985
|
-
* @param {string} string The string to inspect.
|
|
2986
|
-
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
2987
|
-
*/
|
|
2988
|
-
function hasUnicode(string) {
|
|
2989
|
-
return reHasUnicode.test(string);
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
var _hasUnicode = hasUnicode;
|
|
2993
|
-
|
|
2994
|
-
/**
|
|
2995
|
-
* Converts an ASCII `string` to an array.
|
|
2996
|
-
*
|
|
2997
|
-
* @private
|
|
2998
|
-
* @param {string} string The string to convert.
|
|
2999
|
-
* @returns {Array} Returns the converted array.
|
|
3000
|
-
*/
|
|
3001
|
-
function asciiToArray(string) {
|
|
3002
|
-
return string.split('');
|
|
3003
|
-
}
|
|
3004
|
-
|
|
3005
|
-
var _asciiToArray = asciiToArray;
|
|
3006
|
-
|
|
3007
|
-
/** Used to compose unicode character classes. */
|
|
3008
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
3009
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
3010
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
3011
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
3012
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
3013
|
-
rsVarRange = '\\ufe0e\\ufe0f';
|
|
3014
|
-
|
|
3015
|
-
/** Used to compose unicode capture groups. */
|
|
3016
|
-
var rsAstral = '[' + rsAstralRange + ']',
|
|
3017
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
3018
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
3019
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
3020
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
3021
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
3022
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
3023
|
-
rsZWJ = '\\u200d';
|
|
3024
|
-
|
|
3025
|
-
/** Used to compose unicode regexes. */
|
|
3026
|
-
var reOptMod = rsModifier + '?',
|
|
3027
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
3028
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
3029
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
3030
|
-
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
3031
|
-
|
|
3032
|
-
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
3033
|
-
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
3034
|
-
|
|
3035
|
-
/**
|
|
3036
|
-
* Converts a Unicode `string` to an array.
|
|
3037
|
-
*
|
|
3038
|
-
* @private
|
|
3039
|
-
* @param {string} string The string to convert.
|
|
3040
|
-
* @returns {Array} Returns the converted array.
|
|
3041
|
-
*/
|
|
3042
|
-
function unicodeToArray(string) {
|
|
3043
|
-
return string.match(reUnicode) || [];
|
|
3044
|
-
}
|
|
3045
|
-
|
|
3046
|
-
var _unicodeToArray = unicodeToArray;
|
|
3047
|
-
|
|
3048
|
-
/**
|
|
3049
|
-
* Converts `string` to an array.
|
|
3050
|
-
*
|
|
3051
|
-
* @private
|
|
3052
|
-
* @param {string} string The string to convert.
|
|
3053
|
-
* @returns {Array} Returns the converted array.
|
|
3054
|
-
*/
|
|
3055
|
-
function stringToArray(string) {
|
|
3056
|
-
return _hasUnicode(string)
|
|
3057
|
-
? _unicodeToArray(string)
|
|
3058
|
-
: _asciiToArray(string);
|
|
3059
|
-
}
|
|
3060
|
-
|
|
3061
|
-
var _stringToArray = stringToArray;
|
|
3062
|
-
|
|
3063
|
-
/**
|
|
3064
|
-
* Creates a function like `_.lowerFirst`.
|
|
3065
|
-
*
|
|
3066
|
-
* @private
|
|
3067
|
-
* @param {string} methodName The name of the `String` case method to use.
|
|
3068
|
-
* @returns {Function} Returns the new case function.
|
|
3069
|
-
*/
|
|
3070
|
-
function createCaseFirst(methodName) {
|
|
3071
|
-
return function(string) {
|
|
3072
|
-
string = toString_1(string);
|
|
3073
|
-
|
|
3074
|
-
var strSymbols = _hasUnicode(string)
|
|
3075
|
-
? _stringToArray(string)
|
|
3076
|
-
: undefined;
|
|
3077
|
-
|
|
3078
|
-
var chr = strSymbols
|
|
3079
|
-
? strSymbols[0]
|
|
3080
|
-
: string.charAt(0);
|
|
3081
|
-
|
|
3082
|
-
var trailing = strSymbols
|
|
3083
|
-
? _castSlice(strSymbols, 1).join('')
|
|
3084
|
-
: string.slice(1);
|
|
3085
|
-
|
|
3086
|
-
return chr[methodName]() + trailing;
|
|
3087
|
-
};
|
|
3088
|
-
}
|
|
3089
|
-
|
|
3090
|
-
var _createCaseFirst = createCaseFirst;
|
|
3091
|
-
|
|
3092
|
-
/**
|
|
3093
|
-
* Converts the first character of `string` to upper case.
|
|
3094
|
-
*
|
|
3095
|
-
* @static
|
|
3096
|
-
* @memberOf _
|
|
3097
|
-
* @since 4.0.0
|
|
3098
|
-
* @category String
|
|
3099
|
-
* @param {string} [string=''] The string to convert.
|
|
3100
|
-
* @returns {string} Returns the converted string.
|
|
3101
|
-
* @example
|
|
3102
|
-
*
|
|
3103
|
-
* _.upperFirst('fred');
|
|
3104
|
-
* // => 'Fred'
|
|
3105
|
-
*
|
|
3106
|
-
* _.upperFirst('FRED');
|
|
3107
|
-
* // => 'FRED'
|
|
3108
|
-
*/
|
|
3109
|
-
var upperFirst = _createCaseFirst('toUpperCase');
|
|
3110
|
-
|
|
3111
|
-
var upperFirst_1 = upperFirst;
|
|
3112
|
-
|
|
3113
|
-
/**
|
|
3114
|
-
* Converts the first character of `string` to upper case and the remaining
|
|
3115
|
-
* to lower case.
|
|
3116
|
-
*
|
|
3117
|
-
* @static
|
|
3118
|
-
* @memberOf _
|
|
3119
|
-
* @since 3.0.0
|
|
3120
|
-
* @category String
|
|
3121
|
-
* @param {string} [string=''] The string to capitalize.
|
|
3122
|
-
* @returns {string} Returns the capitalized string.
|
|
3123
|
-
* @example
|
|
3124
|
-
*
|
|
3125
|
-
* _.capitalize('FRED');
|
|
3126
|
-
* // => 'Fred'
|
|
3127
|
-
*/
|
|
3128
|
-
function capitalize(string) {
|
|
3129
|
-
return upperFirst_1(toString_1(string).toLowerCase());
|
|
3130
|
-
}
|
|
3131
|
-
|
|
3132
|
-
var capitalize_1 = capitalize;
|
|
3133
|
-
|
|
3134
|
-
/**
|
|
3135
|
-
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
3136
|
-
*
|
|
3137
|
-
* @static
|
|
3138
|
-
* @memberOf _
|
|
3139
|
-
* @since 3.0.0
|
|
3140
|
-
* @category String
|
|
3141
|
-
* @param {string} [string=''] The string to convert.
|
|
3142
|
-
* @returns {string} Returns the camel cased string.
|
|
3143
|
-
* @example
|
|
3144
|
-
*
|
|
3145
|
-
* _.camelCase('Foo Bar');
|
|
3146
|
-
* // => 'fooBar'
|
|
3147
|
-
*
|
|
3148
|
-
* _.camelCase('--foo-bar--');
|
|
3149
|
-
* // => 'fooBar'
|
|
3150
|
-
*
|
|
3151
|
-
* _.camelCase('__FOO_BAR__');
|
|
3152
|
-
* // => 'fooBar'
|
|
3153
|
-
*/
|
|
3154
|
-
var camelCase = _createCompounder(function(result, word, index) {
|
|
3155
|
-
word = word.toLowerCase();
|
|
3156
|
-
return result + (index ? capitalize_1(word) : word);
|
|
3157
|
-
});
|
|
3158
|
-
|
|
3159
|
-
var camelCase_1 = camelCase;
|
|
3160
|
-
|
|
3161
454
|
var _styleModuleImportMap$1 = {
|
|
3162
455
|
"./social-share-template.m.css": {
|
|
3163
456
|
"desktop-view": "social-share-template-m_desktop-view__3TmkO",
|
|
@@ -3181,10 +474,10 @@ var ShareItem = function ShareItem(_ref) {
|
|
|
3181
474
|
url = _ref.url,
|
|
3182
475
|
icon = _ref.icon,
|
|
3183
476
|
dataTestId = _ref.dataTestId;
|
|
3184
|
-
return url ? /*#__PURE__*/
|
|
477
|
+
return url ? /*#__PURE__*/React__default["default"].createElement("li", {
|
|
3185
478
|
"data-testid": dataTestId,
|
|
3186
479
|
className: "social-share-template-m_icon__1Mnu5"
|
|
3187
|
-
}, /*#__PURE__*/
|
|
480
|
+
}, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
3188
481
|
href: url,
|
|
3189
482
|
target: "_blank",
|
|
3190
483
|
rel: "noopener noreferrer",
|
|
@@ -3194,17 +487,17 @@ var ShareItem = function ShareItem(_ref) {
|
|
|
3194
487
|
};
|
|
3195
488
|
|
|
3196
489
|
ShareItem.propTypes = {
|
|
3197
|
-
name:
|
|
3198
|
-
url:
|
|
3199
|
-
icon:
|
|
3200
|
-
dataTestId:
|
|
490
|
+
name: PropTypes__default["default"].string,
|
|
491
|
+
url: PropTypes__default["default"].string,
|
|
492
|
+
icon: PropTypes__default["default"].node,
|
|
493
|
+
dataTestId: PropTypes__default["default"].string
|
|
3201
494
|
};
|
|
3202
495
|
|
|
3203
496
|
function getActionIcon(open, color) {
|
|
3204
|
-
if (!open) return /*#__PURE__*/
|
|
497
|
+
if (!open) return /*#__PURE__*/React__default["default"].createElement(ShareIcon, {
|
|
3205
498
|
color: color
|
|
3206
499
|
});
|
|
3207
|
-
return /*#__PURE__*/
|
|
500
|
+
return /*#__PURE__*/React__default["default"].createElement(CloseIcon, {
|
|
3208
501
|
color: color
|
|
3209
502
|
});
|
|
3210
503
|
}
|
|
@@ -3238,21 +531,21 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
3238
531
|
};
|
|
3239
532
|
var iconsList = socialShareData(options);
|
|
3240
533
|
|
|
3241
|
-
var _useState = useState(open),
|
|
3242
|
-
_useState2 =
|
|
534
|
+
var _useState = React.useState(open),
|
|
535
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
3243
536
|
isOpen = _useState2[0],
|
|
3244
537
|
setIsOpen = _useState2[1];
|
|
3245
538
|
|
|
3246
539
|
var verticalShare = vertical ? "vertical" : "horizontal";
|
|
3247
|
-
useEffect(function () {
|
|
540
|
+
React.useEffect(function () {
|
|
3248
541
|
return setIsOpen(open);
|
|
3249
542
|
}, [open]);
|
|
3250
543
|
|
|
3251
544
|
var shareIcon = function shareIcon() {
|
|
3252
|
-
return /*#__PURE__*/
|
|
545
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
3253
546
|
className: "social-share-template-m_icon__1Mnu5",
|
|
3254
547
|
key: "horizontal-0"
|
|
3255
|
-
}, /*#__PURE__*/
|
|
548
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3256
549
|
onClick: clickHandler
|
|
3257
550
|
}, getActionIcon(isOpen, iconColor)));
|
|
3258
551
|
};
|
|
@@ -3262,16 +555,16 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
3262
555
|
};
|
|
3263
556
|
|
|
3264
557
|
var popUpWrapper = function popUpWrapper() {
|
|
3265
|
-
return /*#__PURE__*/
|
|
558
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3266
559
|
className: "social-share-template-m_tablet-view__kATzi"
|
|
3267
|
-
}, !isOpen && /*#__PURE__*/
|
|
3268
|
-
className:
|
|
3269
|
-
}, shareIcon()), isOpen && /*#__PURE__*/
|
|
560
|
+
}, !isOpen && /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
561
|
+
className: _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$1)
|
|
562
|
+
}, shareIcon()), isOpen && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3270
563
|
className: "social-share-template-m_overlay__1nBp-",
|
|
3271
564
|
onClick: clickHandler
|
|
3272
|
-
}, /*#__PURE__*/
|
|
3273
|
-
className: "arr--popup " +
|
|
3274
|
-
}, /*#__PURE__*/
|
|
565
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
566
|
+
className: "arr--popup " + _getClassName__default["default"]("popup-wrapper ".concat(isOpen ? "popup-open" : ""), _styleModuleImportMap$1)
|
|
567
|
+
}, /*#__PURE__*/React__default["default"].createElement(SocialSharePopup, {
|
|
3275
568
|
fbUrl: fbUrl,
|
|
3276
569
|
twitterUrl: twitterUrl,
|
|
3277
570
|
linkedinUrl: linkedinUrl,
|
|
@@ -3285,76 +578,76 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
3285
578
|
};
|
|
3286
579
|
|
|
3287
580
|
var popupStyle = !isOpen && vertical ? "tablet-view-popup" : "";
|
|
3288
|
-
return /*#__PURE__*/
|
|
581
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3289
582
|
"data-test-id": verticalShare,
|
|
3290
|
-
className: "arr--share " +
|
|
3291
|
-
}, /*#__PURE__*/
|
|
583
|
+
className: "arr--share " + _getClassName__default["default"]("".concat(iconShade, " ").concat(verticalShare, " ").concat(popupStyle), _styleModuleImportMap$1)
|
|
584
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3292
585
|
className: "social-share-template-m_desktop-view__3TmkO"
|
|
3293
|
-
}, /*#__PURE__*/
|
|
3294
|
-
"data-test-id":
|
|
3295
|
-
className: "desktop-share-wrapper " +
|
|
586
|
+
}, /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
587
|
+
"data-test-id": lodash.camelCase(iconType),
|
|
588
|
+
className: "desktop-share-wrapper " + _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$1)
|
|
3296
589
|
}, shareIcon(), iconsList.map(function (iconData, index) {
|
|
3297
|
-
return /*#__PURE__*/
|
|
590
|
+
return /*#__PURE__*/React__default["default"].createElement(ShareItem, _extends__default["default"]({}, iconData, {
|
|
3298
591
|
key: iconData.name,
|
|
3299
592
|
dataTestId: "card-share-".concat(index)
|
|
3300
593
|
}));
|
|
3301
594
|
}))), popUpWrapper());
|
|
3302
595
|
};
|
|
3303
596
|
SocialShareTemplate.propTypes = {
|
|
3304
|
-
fbUrl:
|
|
3305
|
-
twitterUrl:
|
|
3306
|
-
linkedinUrl:
|
|
3307
|
-
whatsappUrl:
|
|
3308
|
-
vertical:
|
|
3309
|
-
theme:
|
|
3310
|
-
iconType:
|
|
3311
|
-
open:
|
|
597
|
+
fbUrl: PropTypes__default["default"].string,
|
|
598
|
+
twitterUrl: PropTypes__default["default"].string,
|
|
599
|
+
linkedinUrl: PropTypes__default["default"].string,
|
|
600
|
+
whatsappUrl: PropTypes__default["default"].string,
|
|
601
|
+
vertical: PropTypes__default["default"].bool,
|
|
602
|
+
theme: PropTypes__default["default"].string,
|
|
603
|
+
iconType: PropTypes__default["default"].string,
|
|
604
|
+
open: PropTypes__default["default"]["boolean"]
|
|
3312
605
|
};
|
|
3313
606
|
|
|
3314
607
|
var Youtube = function Youtube(_ref) {
|
|
3315
608
|
var _ref$color = _ref.color,
|
|
3316
609
|
color = _ref$color === void 0 ? "#F61C0D" : _ref$color;
|
|
3317
|
-
return /*#__PURE__*/
|
|
610
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3318
611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3319
612
|
width: "24",
|
|
3320
613
|
height: "24",
|
|
3321
614
|
viewBox: "0 0 24 24"
|
|
3322
|
-
}, /*#__PURE__*/
|
|
615
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3323
616
|
fill: color,
|
|
3324
617
|
fillRule: "evenodd",
|
|
3325
618
|
d: "M22.077 6.844c.18.703.308 1.77.385 3.203L22.5 12l-.038 1.953c-.077 1.458-.206 2.54-.385 3.242a2.733 2.733 0 01-.692 1.172 2.654 2.654 0 01-1.193.703c-.666.183-2.23.313-4.692.39l-3.5.04-3.5-.04c-2.462-.077-4.026-.207-4.692-.39a2.657 2.657 0 01-1.193-.703 2.733 2.733 0 01-.692-1.172c-.18-.703-.308-1.784-.385-3.242L1.5 12c0-.573.013-1.224.038-1.953.077-1.432.206-2.5.385-3.203A2.718 2.718 0 013.808 4.93c.666-.183 2.23-.313 4.692-.39L12 4.5l3.5.04c2.462.077 4.026.207 4.692.39a2.718 2.718 0 011.885 1.914zm-12.23 8.36l5.5-3.204-5.5-3.164v6.367z"
|
|
3326
619
|
}));
|
|
3327
620
|
};
|
|
3328
621
|
Youtube.propTypes = {
|
|
3329
|
-
color:
|
|
622
|
+
color: PropTypes__default["default"].string
|
|
3330
623
|
};
|
|
3331
624
|
|
|
3332
625
|
var Instagram = function Instagram() {
|
|
3333
|
-
return /*#__PURE__*/
|
|
626
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3334
627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3335
628
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
3336
629
|
width: "24",
|
|
3337
630
|
height: "24",
|
|
3338
631
|
viewBox: "0 0 24 24"
|
|
3339
|
-
}, /*#__PURE__*/
|
|
632
|
+
}, /*#__PURE__*/React__default["default"].createElement("defs", null, /*#__PURE__*/React__default["default"].createElement("linearGradient", {
|
|
3340
633
|
id: "prefix__b",
|
|
3341
634
|
x1: "0%",
|
|
3342
635
|
x2: "110.694%",
|
|
3343
636
|
y1: "0%",
|
|
3344
637
|
y2: "109.202%"
|
|
3345
|
-
}, /*#__PURE__*/
|
|
638
|
+
}, /*#__PURE__*/React__default["default"].createElement("stop", {
|
|
3346
639
|
offset: "0%",
|
|
3347
640
|
stopColor: "#724AC6"
|
|
3348
|
-
}), /*#__PURE__*/
|
|
641
|
+
}), /*#__PURE__*/React__default["default"].createElement("stop", {
|
|
3349
642
|
offset: "53.59%",
|
|
3350
643
|
stopColor: "#E5375E"
|
|
3351
|
-
}), /*#__PURE__*/
|
|
644
|
+
}), /*#__PURE__*/React__default["default"].createElement("stop", {
|
|
3352
645
|
offset: "100%",
|
|
3353
646
|
stopColor: "#FC9949"
|
|
3354
|
-
})), /*#__PURE__*/
|
|
647
|
+
})), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3355
648
|
id: "prefix__a",
|
|
3356
649
|
d: "M9 4.636c.784 0 1.512.196 2.182.588.67.392 1.202.924 1.594 1.594.392.67.588 1.398.588 2.182s-.196 1.512-.588 2.182a4.382 4.382 0 01-1.594 1.594c-.67.392-1.398.588-2.182.588s-1.512-.196-2.182-.588a4.382 4.382 0 01-1.594-1.594c-.392-.67-.588-1.398-.588-2.182s.196-1.512.588-2.182a4.382 4.382 0 011.594-1.594A4.247 4.247 0 019 4.636zm0 7.21c.784 0 1.455-.278 2.011-.835.557-.556.835-1.227.835-2.011s-.278-1.455-.835-2.011c-.556-.557-1.227-.835-2.011-.835s-1.455.278-2.011.835c-.557.556-.835 1.227-.835 2.011s.278 1.455.835 2.011A2.739 2.739 0 009 11.846zm5.578-7.4a1.181 1.181 0 01-.322.721.923.923 0 01-.702.304.981.981 0 01-.721-.304.98.98 0 01-.304-.72c0-.279.101-.52.304-.722a.984.984 0 01.72-.303c.279 0 .52.101.722.303a.987.987 0 01.303.721zm2.884 1.025c.025.708.038 1.885.038 3.529s-.019 2.827-.057 3.548c-.038.721-.145 1.347-.322 1.878a4.425 4.425 0 01-1.044 1.651 4.429 4.429 0 01-1.65 1.044c-.532.177-1.158.284-1.879.322-.721.038-1.904.057-3.548.057-1.644 0-2.827-.019-3.548-.057-.721-.038-1.347-.158-1.878-.36a4.05 4.05 0 01-1.651-1.006 4.429 4.429 0 01-1.044-1.65c-.177-.532-.284-1.158-.322-1.879C.519 11.827.5 10.644.5 9c0-1.644.019-2.827.057-3.548.038-.721.145-1.347.322-1.878a4.425 4.425 0 011.044-1.651A4.429 4.429 0 013.573.879C4.106.702 4.732.595 5.453.557 6.173.519 7.356.5 9 .5c1.644 0 2.827.019 3.548.057.721.038 1.347.145 1.878.322a4.425 4.425 0 011.651 1.044 4.429 4.429 0 011.044 1.65c.177.532.29 1.164.341 1.898zm-1.821 8.538c.151-.43.253-1.113.303-2.05.025-.556.038-1.34.038-2.352V8.393a54.22 54.22 0 00-.038-2.353c-.05-.961-.152-1.644-.303-2.049a2.743 2.743 0 00-1.632-1.632c-.405-.151-1.088-.253-2.05-.303a55.796 55.796 0 00-2.352-.038H8.393c-1.012 0-1.796.013-2.353.038-.936.05-1.619.152-2.049.303a2.743 2.743 0 00-1.632 1.632c-.151.405-.253 1.088-.303 2.05-.025.556-.038 1.34-.038 2.352v1.214c0 1.012.013 1.796.038 2.353.05.936.152 1.619.303 2.049.33.784.873 1.328 1.632 1.632.43.151 1.113.253 2.05.303.556.025 1.34.038 2.352.038h1.214a54.22 54.22 0 002.353-.038c.961-.05 1.644-.152 2.049-.303.784-.33 1.328-.873 1.632-1.632z"
|
|
3357
|
-
})), /*#__PURE__*/
|
|
650
|
+
})), /*#__PURE__*/React__default["default"].createElement("use", {
|
|
3358
651
|
fill: "url(#prefix__b)",
|
|
3359
652
|
fillRule: "nonzero",
|
|
3360
653
|
transform: "translate(3 3)",
|
|
@@ -3363,12 +656,12 @@ var Instagram = function Instagram() {
|
|
|
3363
656
|
};
|
|
3364
657
|
|
|
3365
658
|
var Pinterest = function Pinterest() {
|
|
3366
|
-
return /*#__PURE__*/
|
|
659
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3367
660
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3368
661
|
width: "24",
|
|
3369
662
|
height: "24",
|
|
3370
663
|
viewBox: "0 0 24 24"
|
|
3371
|
-
}, /*#__PURE__*/
|
|
664
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3372
665
|
fill: "#E60023",
|
|
3373
666
|
d: "M21.5 12a9.209 9.209 0 01-1.283 4.75 9.6 9.6 0 01-3.467 3.467A9.209 9.209 0 0112 21.5c-.97 0-1.903-.14-2.796-.421.613-1.022.996-1.852 1.149-2.49l.613-2.26c.153.306.434.561.842.766.41.204.856.306 1.341.306.92 0 1.756-.262 2.51-.785.753-.524 1.34-1.232 1.761-2.126.422-.894.632-1.87.632-2.93s-.255-2.012-.766-2.854a5.318 5.318 0 00-2.107-1.973c-.893-.473-1.89-.709-2.987-.709-1.303 0-2.452.268-3.448.805a5.465 5.465 0 00-2.088 2.087 5.704 5.704 0 00-.747 2.854c0 .74.185 1.475.556 2.203.37.728.836 1.22 1.398 1.475.179.076.28.038.306-.115l.268-1.073a.266.266 0 00-.076-.268 3.048 3.048 0 01-.498-.977 3.908 3.908 0 01-.192-1.207c0-.715.173-1.385.518-2.01a3.99 3.99 0 011.474-1.514c.664-.408 1.43-.613 2.299-.613 1.174 0 2.132.364 2.873 1.092.74.728 1.11 1.654 1.11 2.777 0 1.277-.287 2.324-.861 3.141-.575.818-1.284 1.226-2.126 1.226-.486 0-.869-.172-1.15-.517-.28-.345-.37-.747-.268-1.207.051-.28.166-.689.345-1.225.281-.945.421-1.603.421-1.973 0-.37-.102-.677-.306-.92-.204-.242-.498-.363-.881-.363-.485 0-.894.217-1.226.65-.332.435-.498.984-.498 1.648 0 .562.09 1.034.268 1.417L8.591 18.13c-.154.638-.166 1.545-.039 2.72-1.813-.69-3.275-1.839-4.386-3.448C3.056 15.792 2.5 13.991 2.5 12c0-1.711.428-3.294 1.283-4.75A9.6 9.6 0 017.25 3.783 9.209 9.209 0 0112 2.5c1.711 0 3.294.428 4.75 1.283a9.6 9.6 0 013.467 3.467A9.209 9.209 0 0121.5 12z"
|
|
3374
667
|
}));
|
|
@@ -3426,60 +719,60 @@ var AuthorIntroductionCard = function AuthorIntroductionCard(_ref) {
|
|
|
3426
719
|
var getIcon = function getIcon(item) {
|
|
3427
720
|
switch (item) {
|
|
3428
721
|
case "twitter":
|
|
3429
|
-
return /*#__PURE__*/
|
|
722
|
+
return /*#__PURE__*/React__default["default"].createElement(Twitter, null);
|
|
3430
723
|
|
|
3431
724
|
case "facebook":
|
|
3432
|
-
return /*#__PURE__*/
|
|
725
|
+
return /*#__PURE__*/React__default["default"].createElement(Facebook, null);
|
|
3433
726
|
|
|
3434
727
|
case "youtube":
|
|
3435
|
-
return /*#__PURE__*/
|
|
728
|
+
return /*#__PURE__*/React__default["default"].createElement(Youtube, null);
|
|
3436
729
|
|
|
3437
730
|
case "linkedin":
|
|
3438
|
-
return /*#__PURE__*/
|
|
731
|
+
return /*#__PURE__*/React__default["default"].createElement(LinkedIn, null);
|
|
3439
732
|
|
|
3440
733
|
case "whatsapp":
|
|
3441
|
-
return /*#__PURE__*/
|
|
734
|
+
return /*#__PURE__*/React__default["default"].createElement(WhatsApp, {
|
|
3442
735
|
color: "#4AC959"
|
|
3443
736
|
});
|
|
3444
737
|
|
|
3445
738
|
case "instagram":
|
|
3446
|
-
return /*#__PURE__*/
|
|
739
|
+
return /*#__PURE__*/React__default["default"].createElement(Instagram, null);
|
|
3447
740
|
|
|
3448
741
|
case "pinterest":
|
|
3449
|
-
return /*#__PURE__*/
|
|
742
|
+
return /*#__PURE__*/React__default["default"].createElement(Pinterest, null);
|
|
3450
743
|
}
|
|
3451
744
|
};
|
|
3452
745
|
|
|
3453
|
-
return /*#__PURE__*/
|
|
746
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3454
747
|
"data-test-id": "author-intro",
|
|
3455
748
|
style: {
|
|
3456
749
|
backgroundColor: theme,
|
|
3457
750
|
color: textColor
|
|
3458
751
|
},
|
|
3459
|
-
className: ("".concat(isFullWidth, " arrow-component arr--author-intro-card") ? "".concat(isFullWidth, " arrow-component arr--author-intro-card") + " " : "") +
|
|
3460
|
-
}, /*#__PURE__*/
|
|
3461
|
-
className: "arrow-author-intro-wrapper " +
|
|
3462
|
-
}, /*#__PURE__*/
|
|
752
|
+
className: ("".concat(isFullWidth, " arrow-component arr--author-intro-card") ? "".concat(isFullWidth, " arrow-component arr--author-intro-card") + " " : "") + _getClassName__default["default"]("".concat(authorCardStyle, " ").concat(supportBorder, " ").concat(textColor), _styleModuleImportMap)
|
|
753
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
754
|
+
className: "arrow-author-intro-wrapper " + _getClassName__default["default"]("wrapper ".concat(textColor), _styleModuleImportMap)
|
|
755
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3463
756
|
className: "arrow-author-introduction-card author-intro-m_introduction-card__1kdGt"
|
|
3464
|
-
}, isSmallCircle && isMobile ? null : /*#__PURE__*/
|
|
3465
|
-
className:
|
|
3466
|
-
}, name), enableBio && bio && /*#__PURE__*/
|
|
757
|
+
}, isSmallCircle && isMobile ? null : /*#__PURE__*/React__default["default"].createElement("h2", {
|
|
758
|
+
className: _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap)
|
|
759
|
+
}, name), enableBio && bio && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3467
760
|
"data-test-id": "author-bio",
|
|
3468
|
-
className:
|
|
3469
|
-
}, bio, isSmallCircle && /*#__PURE__*/
|
|
761
|
+
className: _getClassName__default["default"]("author-description ".concat(textColor), _styleModuleImportMap)
|
|
762
|
+
}, bio, isSmallCircle && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3470
763
|
className: "author-intro-m_fade-out__1EBqd",
|
|
3471
764
|
style: {
|
|
3472
765
|
backgroundImage: "linear-gradient(to right, transparent, ".concat(theme, ")")
|
|
3473
766
|
}
|
|
3474
|
-
})), /*#__PURE__*/
|
|
767
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3475
768
|
className: "author-intro-m_social-wrapper__1F9jD"
|
|
3476
|
-
}, /*#__PURE__*/
|
|
769
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3477
770
|
className: "author-intro-m_social-connect-wrapper__2B0QA"
|
|
3478
|
-
}, enableSocialLinks && social && /*#__PURE__*/
|
|
3479
|
-
className:
|
|
771
|
+
}, enableSocialLinks && social && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, template !== "smallCircle" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
772
|
+
className: _getClassName__default["default"]("connect ".concat(textColor), _styleModuleImportMap)
|
|
3480
773
|
}, "Connect :"), Object.entries(social).map(function (item, index) {
|
|
3481
774
|
return item.length > 0 && item[1] ? // can add Social Networks without the url so adding an additional check below
|
|
3482
|
-
item[1].url ? /*#__PURE__*/
|
|
775
|
+
item[1].url ? /*#__PURE__*/React__default["default"].createElement("a", {
|
|
3483
776
|
"data-test-id": "social-link",
|
|
3484
777
|
href: item[1].url,
|
|
3485
778
|
key: "".concat(item, "-").concat(index),
|
|
@@ -3487,34 +780,34 @@ var AuthorIntroductionCard = function AuthorIntroductionCard(_ref) {
|
|
|
3487
780
|
target: "_blank",
|
|
3488
781
|
className: "author-intro-m_social-share__f5EpE"
|
|
3489
782
|
}, getIcon(item[0])) : null : null;
|
|
3490
|
-
}))), !isSmallCircle && /*#__PURE__*/
|
|
783
|
+
}))), !isSmallCircle && /*#__PURE__*/React__default["default"].createElement(components.SocialShare, {
|
|
3491
784
|
template: SocialShareTemplate,
|
|
3492
785
|
fullUrl: sharePageUrl,
|
|
3493
786
|
title: name,
|
|
3494
787
|
theme: theme,
|
|
3495
788
|
iconType: "plain-svg"
|
|
3496
|
-
}))), /*#__PURE__*/
|
|
789
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3497
790
|
className: "arrow-author-image author-intro-m_author-image__2jRxy"
|
|
3498
|
-
}, /*#__PURE__*/
|
|
791
|
+
}, /*#__PURE__*/React__default["default"].createElement(AuthorImage, {
|
|
3499
792
|
author: data,
|
|
3500
793
|
template: template
|
|
3501
|
-
}), isSmallCircle && isMobile && /*#__PURE__*/
|
|
3502
|
-
className:
|
|
794
|
+
}), isSmallCircle && isMobile && /*#__PURE__*/React__default["default"].createElement("h2", {
|
|
795
|
+
className: _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap)
|
|
3503
796
|
}, name))));
|
|
3504
797
|
};
|
|
3505
798
|
AuthorIntroductionCard.propTypes = {
|
|
3506
|
-
data:
|
|
3507
|
-
name:
|
|
3508
|
-
bio:
|
|
3509
|
-
social:
|
|
799
|
+
data: PropTypes__default["default"].shape({
|
|
800
|
+
name: PropTypes__default["default"].string,
|
|
801
|
+
bio: PropTypes__default["default"].string,
|
|
802
|
+
social: PropTypes__default["default"].object
|
|
3510
803
|
}),
|
|
3511
|
-
config:
|
|
3512
|
-
theme:
|
|
3513
|
-
enableBio:
|
|
3514
|
-
enableSocialLinks:
|
|
3515
|
-
borderSupport:
|
|
804
|
+
config: PropTypes__default["default"].shape({
|
|
805
|
+
theme: PropTypes__default["default"].string,
|
|
806
|
+
enableBio: PropTypes__default["default"].bool,
|
|
807
|
+
enableSocialLinks: PropTypes__default["default"].bool,
|
|
808
|
+
borderSupport: PropTypes__default["default"].bool
|
|
3516
809
|
}),
|
|
3517
|
-
template:
|
|
810
|
+
template: PropTypes__default["default"].string
|
|
3518
811
|
};
|
|
3519
812
|
|
|
3520
|
-
|
|
813
|
+
exports.AuthorIntroductionCard = AuthorIntroductionCard;
|