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