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