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