@quintype/arrow 3.15.1-fallback-support.1 → 3.15.1-perf.1

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