@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,2711 @@
1
+ import React, { useState, Suspense, lazy, useContext, createContext } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Link, ResponsiveImage } from '@quintype/components';
4
+ import 'react-timeago';
5
+ import 'date-fns-tz';
6
+ import { useSelector } from 'react-redux';
7
+
8
+ function _extends() {
9
+ _extends = Object.assign || function (target) {
10
+ for (var i = 1; i < arguments.length; i++) {
11
+ var source = arguments[i];
12
+
13
+ for (var key in source) {
14
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
15
+ target[key] = source[key];
16
+ }
17
+ }
18
+ }
19
+
20
+ return target;
21
+ };
22
+
23
+ return _extends.apply(this, arguments);
24
+ }
25
+
26
+ function _objectWithoutPropertiesLoose(source, excluded) {
27
+ if (source == null) return {};
28
+ var target = {};
29
+ var sourceKeys = Object.keys(source);
30
+ var key, i;
31
+
32
+ for (i = 0; i < sourceKeys.length; i++) {
33
+ key = sourceKeys[i];
34
+ if (excluded.indexOf(key) >= 0) continue;
35
+ target[key] = source[key];
36
+ }
37
+
38
+ return target;
39
+ }
40
+
41
+ function _objectWithoutProperties(source, excluded) {
42
+ if (source == null) return {};
43
+ var target = _objectWithoutPropertiesLoose(source, excluded);
44
+ var key, i;
45
+
46
+ if (Object.getOwnPropertySymbols) {
47
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
48
+
49
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
50
+ key = sourceSymbolKeys[i];
51
+ if (excluded.indexOf(key) >= 0) continue;
52
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
53
+ target[key] = source[key];
54
+ }
55
+ }
56
+
57
+ return target;
58
+ }
59
+
60
+ var _excluded$1 = ["element", "render"];
61
+ var withElementWrapper = function withElementWrapper(StoryElement) {
62
+ return function (props) {
63
+ var element = props.element,
64
+ render = props.render,
65
+ restProps = _objectWithoutProperties(props, _excluded$1);
66
+
67
+ if (!element) return null;
68
+ if (render && typeof render === "function") return render(props);
69
+ return /*#__PURE__*/React.createElement(StoryElement, _extends({}, restProps, {
70
+ element: element
71
+ }));
72
+ };
73
+ };
74
+ withElementWrapper.propTypes = {
75
+ StoryElement: PropTypes.element
76
+ };
77
+
78
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
79
+
80
+ function getDefaultExportFromCjs (x) {
81
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
82
+ }
83
+
84
+ function createCommonjsModule(fn) {
85
+ var module = { exports: {} };
86
+ return fn(module, module.exports), module.exports;
87
+ }
88
+
89
+ /**
90
+ * Copyright (c) 2014-present, Facebook, Inc.
91
+ *
92
+ * This source code is licensed under the MIT license found in the
93
+ * LICENSE file in the root directory of this source tree.
94
+ */
95
+
96
+ createCommonjsModule(function (module) {
97
+ var runtime = (function (exports) {
98
+
99
+ var Op = Object.prototype;
100
+ var hasOwn = Op.hasOwnProperty;
101
+ var undefined$1; // More compressible than void 0.
102
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
103
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
104
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
105
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
106
+
107
+ function define(obj, key, value) {
108
+ Object.defineProperty(obj, key, {
109
+ value: value,
110
+ enumerable: true,
111
+ configurable: true,
112
+ writable: true
113
+ });
114
+ return obj[key];
115
+ }
116
+ try {
117
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
118
+ define({}, "");
119
+ } catch (err) {
120
+ define = function(obj, key, value) {
121
+ return obj[key] = value;
122
+ };
123
+ }
124
+
125
+ function wrap(innerFn, outerFn, self, tryLocsList) {
126
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
127
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
128
+ var generator = Object.create(protoGenerator.prototype);
129
+ var context = new Context(tryLocsList || []);
130
+
131
+ // The ._invoke method unifies the implementations of the .next,
132
+ // .throw, and .return methods.
133
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
134
+
135
+ return generator;
136
+ }
137
+ exports.wrap = wrap;
138
+
139
+ // Try/catch helper to minimize deoptimizations. Returns a completion
140
+ // record like context.tryEntries[i].completion. This interface could
141
+ // have been (and was previously) designed to take a closure to be
142
+ // invoked without arguments, but in all the cases we care about we
143
+ // already have an existing method we want to call, so there's no need
144
+ // to create a new function object. We can even get away with assuming
145
+ // the method takes exactly one argument, since that happens to be true
146
+ // in every case, so we don't have to touch the arguments object. The
147
+ // only additional allocation required is the completion record, which
148
+ // has a stable shape and so hopefully should be cheap to allocate.
149
+ function tryCatch(fn, obj, arg) {
150
+ try {
151
+ return { type: "normal", arg: fn.call(obj, arg) };
152
+ } catch (err) {
153
+ return { type: "throw", arg: err };
154
+ }
155
+ }
156
+
157
+ var GenStateSuspendedStart = "suspendedStart";
158
+ var GenStateSuspendedYield = "suspendedYield";
159
+ var GenStateExecuting = "executing";
160
+ var GenStateCompleted = "completed";
161
+
162
+ // Returning this object from the innerFn has the same effect as
163
+ // breaking out of the dispatch switch statement.
164
+ var ContinueSentinel = {};
165
+
166
+ // Dummy constructor functions that we use as the .constructor and
167
+ // .constructor.prototype properties for functions that return Generator
168
+ // objects. For full spec compliance, you may wish to configure your
169
+ // minifier not to mangle the names of these two functions.
170
+ function Generator() {}
171
+ function GeneratorFunction() {}
172
+ function GeneratorFunctionPrototype() {}
173
+
174
+ // This is a polyfill for %IteratorPrototype% for environments that
175
+ // don't natively support it.
176
+ var IteratorPrototype = {};
177
+ define(IteratorPrototype, iteratorSymbol, function () {
178
+ return this;
179
+ });
180
+
181
+ var getProto = Object.getPrototypeOf;
182
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
183
+ if (NativeIteratorPrototype &&
184
+ NativeIteratorPrototype !== Op &&
185
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
186
+ // This environment has a native %IteratorPrototype%; use it instead
187
+ // of the polyfill.
188
+ IteratorPrototype = NativeIteratorPrototype;
189
+ }
190
+
191
+ var Gp = GeneratorFunctionPrototype.prototype =
192
+ Generator.prototype = Object.create(IteratorPrototype);
193
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
194
+ define(Gp, "constructor", GeneratorFunctionPrototype);
195
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
196
+ GeneratorFunction.displayName = define(
197
+ GeneratorFunctionPrototype,
198
+ toStringTagSymbol,
199
+ "GeneratorFunction"
200
+ );
201
+
202
+ // Helper for defining the .next, .throw, and .return methods of the
203
+ // Iterator interface in terms of a single ._invoke method.
204
+ function defineIteratorMethods(prototype) {
205
+ ["next", "throw", "return"].forEach(function(method) {
206
+ define(prototype, method, function(arg) {
207
+ return this._invoke(method, arg);
208
+ });
209
+ });
210
+ }
211
+
212
+ exports.isGeneratorFunction = function(genFun) {
213
+ var ctor = typeof genFun === "function" && genFun.constructor;
214
+ return ctor
215
+ ? ctor === GeneratorFunction ||
216
+ // For the native GeneratorFunction constructor, the best we can
217
+ // do is to check its .name property.
218
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
219
+ : false;
220
+ };
221
+
222
+ exports.mark = function(genFun) {
223
+ if (Object.setPrototypeOf) {
224
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
225
+ } else {
226
+ genFun.__proto__ = GeneratorFunctionPrototype;
227
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
228
+ }
229
+ genFun.prototype = Object.create(Gp);
230
+ return genFun;
231
+ };
232
+
233
+ // Within the body of any async function, `await x` is transformed to
234
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
235
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
236
+ // meant to be awaited.
237
+ exports.awrap = function(arg) {
238
+ return { __await: arg };
239
+ };
240
+
241
+ function AsyncIterator(generator, PromiseImpl) {
242
+ function invoke(method, arg, resolve, reject) {
243
+ var record = tryCatch(generator[method], generator, arg);
244
+ if (record.type === "throw") {
245
+ reject(record.arg);
246
+ } else {
247
+ var result = record.arg;
248
+ var value = result.value;
249
+ if (value &&
250
+ typeof value === "object" &&
251
+ hasOwn.call(value, "__await")) {
252
+ return PromiseImpl.resolve(value.__await).then(function(value) {
253
+ invoke("next", value, resolve, reject);
254
+ }, function(err) {
255
+ invoke("throw", err, resolve, reject);
256
+ });
257
+ }
258
+
259
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
260
+ // When a yielded Promise is resolved, its final value becomes
261
+ // the .value of the Promise<{value,done}> result for the
262
+ // current iteration.
263
+ result.value = unwrapped;
264
+ resolve(result);
265
+ }, function(error) {
266
+ // If a rejected Promise was yielded, throw the rejection back
267
+ // into the async generator function so it can be handled there.
268
+ return invoke("throw", error, resolve, reject);
269
+ });
270
+ }
271
+ }
272
+
273
+ var previousPromise;
274
+
275
+ function enqueue(method, arg) {
276
+ function callInvokeWithMethodAndArg() {
277
+ return new PromiseImpl(function(resolve, reject) {
278
+ invoke(method, arg, resolve, reject);
279
+ });
280
+ }
281
+
282
+ return previousPromise =
283
+ // If enqueue has been called before, then we want to wait until
284
+ // all previous Promises have been resolved before calling invoke,
285
+ // so that results are always delivered in the correct order. If
286
+ // enqueue has not been called before, then it is important to
287
+ // call invoke immediately, without waiting on a callback to fire,
288
+ // so that the async generator function has the opportunity to do
289
+ // any necessary setup in a predictable way. This predictability
290
+ // is why the Promise constructor synchronously invokes its
291
+ // executor callback, and why async functions synchronously
292
+ // execute code before the first await. Since we implement simple
293
+ // async functions in terms of async generators, it is especially
294
+ // important to get this right, even though it requires care.
295
+ previousPromise ? previousPromise.then(
296
+ callInvokeWithMethodAndArg,
297
+ // Avoid propagating failures to Promises returned by later
298
+ // invocations of the iterator.
299
+ callInvokeWithMethodAndArg
300
+ ) : callInvokeWithMethodAndArg();
301
+ }
302
+
303
+ // Define the unified helper method that is used to implement .next,
304
+ // .throw, and .return (see defineIteratorMethods).
305
+ this._invoke = enqueue;
306
+ }
307
+
308
+ defineIteratorMethods(AsyncIterator.prototype);
309
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
310
+ return this;
311
+ });
312
+ exports.AsyncIterator = AsyncIterator;
313
+
314
+ // Note that simple async functions are implemented on top of
315
+ // AsyncIterator objects; they just return a Promise for the value of
316
+ // the final result produced by the iterator.
317
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
318
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
319
+
320
+ var iter = new AsyncIterator(
321
+ wrap(innerFn, outerFn, self, tryLocsList),
322
+ PromiseImpl
323
+ );
324
+
325
+ return exports.isGeneratorFunction(outerFn)
326
+ ? iter // If outerFn is a generator, return the full iterator.
327
+ : iter.next().then(function(result) {
328
+ return result.done ? result.value : iter.next();
329
+ });
330
+ };
331
+
332
+ function makeInvokeMethod(innerFn, self, context) {
333
+ var state = GenStateSuspendedStart;
334
+
335
+ return function invoke(method, arg) {
336
+ if (state === GenStateExecuting) {
337
+ throw new Error("Generator is already running");
338
+ }
339
+
340
+ if (state === GenStateCompleted) {
341
+ if (method === "throw") {
342
+ throw arg;
343
+ }
344
+
345
+ // Be forgiving, per 25.3.3.3.3 of the spec:
346
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
347
+ return doneResult();
348
+ }
349
+
350
+ context.method = method;
351
+ context.arg = arg;
352
+
353
+ while (true) {
354
+ var delegate = context.delegate;
355
+ if (delegate) {
356
+ var delegateResult = maybeInvokeDelegate(delegate, context);
357
+ if (delegateResult) {
358
+ if (delegateResult === ContinueSentinel) continue;
359
+ return delegateResult;
360
+ }
361
+ }
362
+
363
+ if (context.method === "next") {
364
+ // Setting context._sent for legacy support of Babel's
365
+ // function.sent implementation.
366
+ context.sent = context._sent = context.arg;
367
+
368
+ } else if (context.method === "throw") {
369
+ if (state === GenStateSuspendedStart) {
370
+ state = GenStateCompleted;
371
+ throw context.arg;
372
+ }
373
+
374
+ context.dispatchException(context.arg);
375
+
376
+ } else if (context.method === "return") {
377
+ context.abrupt("return", context.arg);
378
+ }
379
+
380
+ state = GenStateExecuting;
381
+
382
+ var record = tryCatch(innerFn, self, context);
383
+ if (record.type === "normal") {
384
+ // If an exception is thrown from innerFn, we leave state ===
385
+ // GenStateExecuting and loop back for another invocation.
386
+ state = context.done
387
+ ? GenStateCompleted
388
+ : GenStateSuspendedYield;
389
+
390
+ if (record.arg === ContinueSentinel) {
391
+ continue;
392
+ }
393
+
394
+ return {
395
+ value: record.arg,
396
+ done: context.done
397
+ };
398
+
399
+ } else if (record.type === "throw") {
400
+ state = GenStateCompleted;
401
+ // Dispatch the exception by looping back around to the
402
+ // context.dispatchException(context.arg) call above.
403
+ context.method = "throw";
404
+ context.arg = record.arg;
405
+ }
406
+ }
407
+ };
408
+ }
409
+
410
+ // Call delegate.iterator[context.method](context.arg) and handle the
411
+ // result, either by returning a { value, done } result from the
412
+ // delegate iterator, or by modifying context.method and context.arg,
413
+ // setting context.delegate to null, and returning the ContinueSentinel.
414
+ function maybeInvokeDelegate(delegate, context) {
415
+ var method = delegate.iterator[context.method];
416
+ if (method === undefined$1) {
417
+ // A .throw or .return when the delegate iterator has no .throw
418
+ // method always terminates the yield* loop.
419
+ context.delegate = null;
420
+
421
+ if (context.method === "throw") {
422
+ // Note: ["return"] must be used for ES3 parsing compatibility.
423
+ if (delegate.iterator["return"]) {
424
+ // If the delegate iterator has a return method, give it a
425
+ // chance to clean up.
426
+ context.method = "return";
427
+ context.arg = undefined$1;
428
+ maybeInvokeDelegate(delegate, context);
429
+
430
+ if (context.method === "throw") {
431
+ // If maybeInvokeDelegate(context) changed context.method from
432
+ // "return" to "throw", let that override the TypeError below.
433
+ return ContinueSentinel;
434
+ }
435
+ }
436
+
437
+ context.method = "throw";
438
+ context.arg = new TypeError(
439
+ "The iterator does not provide a 'throw' method");
440
+ }
441
+
442
+ return ContinueSentinel;
443
+ }
444
+
445
+ var record = tryCatch(method, delegate.iterator, context.arg);
446
+
447
+ if (record.type === "throw") {
448
+ context.method = "throw";
449
+ context.arg = record.arg;
450
+ context.delegate = null;
451
+ return ContinueSentinel;
452
+ }
453
+
454
+ var info = record.arg;
455
+
456
+ if (! info) {
457
+ context.method = "throw";
458
+ context.arg = new TypeError("iterator result is not an object");
459
+ context.delegate = null;
460
+ return ContinueSentinel;
461
+ }
462
+
463
+ if (info.done) {
464
+ // Assign the result of the finished delegate to the temporary
465
+ // variable specified by delegate.resultName (see delegateYield).
466
+ context[delegate.resultName] = info.value;
467
+
468
+ // Resume execution at the desired location (see delegateYield).
469
+ context.next = delegate.nextLoc;
470
+
471
+ // If context.method was "throw" but the delegate handled the
472
+ // exception, let the outer generator proceed normally. If
473
+ // context.method was "next", forget context.arg since it has been
474
+ // "consumed" by the delegate iterator. If context.method was
475
+ // "return", allow the original .return call to continue in the
476
+ // outer generator.
477
+ if (context.method !== "return") {
478
+ context.method = "next";
479
+ context.arg = undefined$1;
480
+ }
481
+
482
+ } else {
483
+ // Re-yield the result returned by the delegate method.
484
+ return info;
485
+ }
486
+
487
+ // The delegate iterator is finished, so forget it and continue with
488
+ // the outer generator.
489
+ context.delegate = null;
490
+ return ContinueSentinel;
491
+ }
492
+
493
+ // Define Generator.prototype.{next,throw,return} in terms of the
494
+ // unified ._invoke helper method.
495
+ defineIteratorMethods(Gp);
496
+
497
+ define(Gp, toStringTagSymbol, "Generator");
498
+
499
+ // A Generator should always return itself as the iterator object when the
500
+ // @@iterator function is called on it. Some browsers' implementations of the
501
+ // iterator prototype chain incorrectly implement this, causing the Generator
502
+ // object to not be returned from this call. This ensures that doesn't happen.
503
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
504
+ define(Gp, iteratorSymbol, function() {
505
+ return this;
506
+ });
507
+
508
+ define(Gp, "toString", function() {
509
+ return "[object Generator]";
510
+ });
511
+
512
+ function pushTryEntry(locs) {
513
+ var entry = { tryLoc: locs[0] };
514
+
515
+ if (1 in locs) {
516
+ entry.catchLoc = locs[1];
517
+ }
518
+
519
+ if (2 in locs) {
520
+ entry.finallyLoc = locs[2];
521
+ entry.afterLoc = locs[3];
522
+ }
523
+
524
+ this.tryEntries.push(entry);
525
+ }
526
+
527
+ function resetTryEntry(entry) {
528
+ var record = entry.completion || {};
529
+ record.type = "normal";
530
+ delete record.arg;
531
+ entry.completion = record;
532
+ }
533
+
534
+ function Context(tryLocsList) {
535
+ // The root entry object (effectively a try statement without a catch
536
+ // or a finally block) gives us a place to store values thrown from
537
+ // locations where there is no enclosing try statement.
538
+ this.tryEntries = [{ tryLoc: "root" }];
539
+ tryLocsList.forEach(pushTryEntry, this);
540
+ this.reset(true);
541
+ }
542
+
543
+ exports.keys = function(object) {
544
+ var keys = [];
545
+ for (var key in object) {
546
+ keys.push(key);
547
+ }
548
+ keys.reverse();
549
+
550
+ // Rather than returning an object with a next method, we keep
551
+ // things simple and return the next function itself.
552
+ return function next() {
553
+ while (keys.length) {
554
+ var key = keys.pop();
555
+ if (key in object) {
556
+ next.value = key;
557
+ next.done = false;
558
+ return next;
559
+ }
560
+ }
561
+
562
+ // To avoid creating an additional object, we just hang the .value
563
+ // and .done properties off the next function object itself. This
564
+ // also ensures that the minifier will not anonymize the function.
565
+ next.done = true;
566
+ return next;
567
+ };
568
+ };
569
+
570
+ function values(iterable) {
571
+ if (iterable) {
572
+ var iteratorMethod = iterable[iteratorSymbol];
573
+ if (iteratorMethod) {
574
+ return iteratorMethod.call(iterable);
575
+ }
576
+
577
+ if (typeof iterable.next === "function") {
578
+ return iterable;
579
+ }
580
+
581
+ if (!isNaN(iterable.length)) {
582
+ var i = -1, next = function next() {
583
+ while (++i < iterable.length) {
584
+ if (hasOwn.call(iterable, i)) {
585
+ next.value = iterable[i];
586
+ next.done = false;
587
+ return next;
588
+ }
589
+ }
590
+
591
+ next.value = undefined$1;
592
+ next.done = true;
593
+
594
+ return next;
595
+ };
596
+
597
+ return next.next = next;
598
+ }
599
+ }
600
+
601
+ // Return an iterator with no values.
602
+ return { next: doneResult };
603
+ }
604
+ exports.values = values;
605
+
606
+ function doneResult() {
607
+ return { value: undefined$1, done: true };
608
+ }
609
+
610
+ Context.prototype = {
611
+ constructor: Context,
612
+
613
+ reset: function(skipTempReset) {
614
+ this.prev = 0;
615
+ this.next = 0;
616
+ // Resetting context._sent for legacy support of Babel's
617
+ // function.sent implementation.
618
+ this.sent = this._sent = undefined$1;
619
+ this.done = false;
620
+ this.delegate = null;
621
+
622
+ this.method = "next";
623
+ this.arg = undefined$1;
624
+
625
+ this.tryEntries.forEach(resetTryEntry);
626
+
627
+ if (!skipTempReset) {
628
+ for (var name in this) {
629
+ // Not sure about the optimal order of these conditions:
630
+ if (name.charAt(0) === "t" &&
631
+ hasOwn.call(this, name) &&
632
+ !isNaN(+name.slice(1))) {
633
+ this[name] = undefined$1;
634
+ }
635
+ }
636
+ }
637
+ },
638
+
639
+ stop: function() {
640
+ this.done = true;
641
+
642
+ var rootEntry = this.tryEntries[0];
643
+ var rootRecord = rootEntry.completion;
644
+ if (rootRecord.type === "throw") {
645
+ throw rootRecord.arg;
646
+ }
647
+
648
+ return this.rval;
649
+ },
650
+
651
+ dispatchException: function(exception) {
652
+ if (this.done) {
653
+ throw exception;
654
+ }
655
+
656
+ var context = this;
657
+ function handle(loc, caught) {
658
+ record.type = "throw";
659
+ record.arg = exception;
660
+ context.next = loc;
661
+
662
+ if (caught) {
663
+ // If the dispatched exception was caught by a catch block,
664
+ // then let that catch block handle the exception normally.
665
+ context.method = "next";
666
+ context.arg = undefined$1;
667
+ }
668
+
669
+ return !! caught;
670
+ }
671
+
672
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
673
+ var entry = this.tryEntries[i];
674
+ var record = entry.completion;
675
+
676
+ if (entry.tryLoc === "root") {
677
+ // Exception thrown outside of any try block that could handle
678
+ // it, so set the completion value of the entire function to
679
+ // throw the exception.
680
+ return handle("end");
681
+ }
682
+
683
+ if (entry.tryLoc <= this.prev) {
684
+ var hasCatch = hasOwn.call(entry, "catchLoc");
685
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
686
+
687
+ if (hasCatch && hasFinally) {
688
+ if (this.prev < entry.catchLoc) {
689
+ return handle(entry.catchLoc, true);
690
+ } else if (this.prev < entry.finallyLoc) {
691
+ return handle(entry.finallyLoc);
692
+ }
693
+
694
+ } else if (hasCatch) {
695
+ if (this.prev < entry.catchLoc) {
696
+ return handle(entry.catchLoc, true);
697
+ }
698
+
699
+ } else if (hasFinally) {
700
+ if (this.prev < entry.finallyLoc) {
701
+ return handle(entry.finallyLoc);
702
+ }
703
+
704
+ } else {
705
+ throw new Error("try statement without catch or finally");
706
+ }
707
+ }
708
+ }
709
+ },
710
+
711
+ abrupt: function(type, arg) {
712
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
713
+ var entry = this.tryEntries[i];
714
+ if (entry.tryLoc <= this.prev &&
715
+ hasOwn.call(entry, "finallyLoc") &&
716
+ this.prev < entry.finallyLoc) {
717
+ var finallyEntry = entry;
718
+ break;
719
+ }
720
+ }
721
+
722
+ if (finallyEntry &&
723
+ (type === "break" ||
724
+ type === "continue") &&
725
+ finallyEntry.tryLoc <= arg &&
726
+ arg <= finallyEntry.finallyLoc) {
727
+ // Ignore the finally entry if control is not jumping to a
728
+ // location outside the try/catch block.
729
+ finallyEntry = null;
730
+ }
731
+
732
+ var record = finallyEntry ? finallyEntry.completion : {};
733
+ record.type = type;
734
+ record.arg = arg;
735
+
736
+ if (finallyEntry) {
737
+ this.method = "next";
738
+ this.next = finallyEntry.finallyLoc;
739
+ return ContinueSentinel;
740
+ }
741
+
742
+ return this.complete(record);
743
+ },
744
+
745
+ complete: function(record, afterLoc) {
746
+ if (record.type === "throw") {
747
+ throw record.arg;
748
+ }
749
+
750
+ if (record.type === "break" ||
751
+ record.type === "continue") {
752
+ this.next = record.arg;
753
+ } else if (record.type === "return") {
754
+ this.rval = this.arg = record.arg;
755
+ this.method = "return";
756
+ this.next = "end";
757
+ } else if (record.type === "normal" && afterLoc) {
758
+ this.next = afterLoc;
759
+ }
760
+
761
+ return ContinueSentinel;
762
+ },
763
+
764
+ finish: function(finallyLoc) {
765
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
766
+ var entry = this.tryEntries[i];
767
+ if (entry.finallyLoc === finallyLoc) {
768
+ this.complete(entry.completion, entry.afterLoc);
769
+ resetTryEntry(entry);
770
+ return ContinueSentinel;
771
+ }
772
+ }
773
+ },
774
+
775
+ "catch": function(tryLoc) {
776
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
777
+ var entry = this.tryEntries[i];
778
+ if (entry.tryLoc === tryLoc) {
779
+ var record = entry.completion;
780
+ if (record.type === "throw") {
781
+ var thrown = record.arg;
782
+ resetTryEntry(entry);
783
+ }
784
+ return thrown;
785
+ }
786
+ }
787
+
788
+ // The context.catch method must only be called with a location
789
+ // argument that corresponds to a known catch block.
790
+ throw new Error("illegal catch attempt");
791
+ },
792
+
793
+ delegateYield: function(iterable, resultName, nextLoc) {
794
+ this.delegate = {
795
+ iterator: values(iterable),
796
+ resultName: resultName,
797
+ nextLoc: nextLoc
798
+ };
799
+
800
+ if (this.method === "next") {
801
+ // Deliberately forget the last sent value so that we don't
802
+ // accidentally pass it on to the delegate.
803
+ this.arg = undefined$1;
804
+ }
805
+
806
+ return ContinueSentinel;
807
+ }
808
+ };
809
+
810
+ // Regardless of whether this script is executing as a CommonJS module
811
+ // or not, return the runtime object so that we can declare the variable
812
+ // regeneratorRuntime in the outer scope, which allows this module to be
813
+ // injected easily by `bin/regenerator --include-runtime script.js`.
814
+ return exports;
815
+
816
+ }(
817
+ // If this script is executing as a CommonJS module, use module.exports
818
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
819
+ // object. Either way, the resulting object will be used to initialize
820
+ // the regeneratorRuntime variable at the top of this file.
821
+ module.exports
822
+ ));
823
+
824
+ try {
825
+ regeneratorRuntime = runtime;
826
+ } catch (accidentalStrictMode) {
827
+ // This module should not be running in strict mode, so the above
828
+ // assignment should always work unless something is misconfigured. Just
829
+ // in case runtime.js accidentally runs in strict mode, in modern engines
830
+ // we can explicitly access globalThis. In older engines we can escape
831
+ // strict mode using a global Function call. This could conceivably fail
832
+ // if a Content Security Policy forbids using Function, but in that case
833
+ // the proper solution is to fix the accidental strict mode problem. If
834
+ // you've misconfigured your bundler to force strict mode and applied a
835
+ // CSP to forbid Function, and you're not willing to fix either of those
836
+ // problems, please detail your unique predicament in a GitHub issue.
837
+ if (typeof globalThis === "object") {
838
+ globalThis.regeneratorRuntime = runtime;
839
+ } else {
840
+ Function("r", "regeneratorRuntime = r")(runtime);
841
+ }
842
+ }
843
+ });
844
+
845
+ /**
846
+ * Checks if `value` is classified as an `Array` object.
847
+ *
848
+ * @static
849
+ * @memberOf _
850
+ * @since 0.1.0
851
+ * @category Lang
852
+ * @param {*} value The value to check.
853
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
854
+ * @example
855
+ *
856
+ * _.isArray([1, 2, 3]);
857
+ * // => true
858
+ *
859
+ * _.isArray(document.body.children);
860
+ * // => false
861
+ *
862
+ * _.isArray('abc');
863
+ * // => false
864
+ *
865
+ * _.isArray(_.noop);
866
+ * // => false
867
+ */
868
+ var isArray = Array.isArray;
869
+
870
+ var isArray_1 = isArray;
871
+
872
+ /** Detect free variable `global` from Node.js. */
873
+
874
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
875
+
876
+ var _freeGlobal = freeGlobal;
877
+
878
+ /** Detect free variable `self`. */
879
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
880
+
881
+ /** Used as a reference to the global object. */
882
+ var root = _freeGlobal || freeSelf || Function('return this')();
883
+
884
+ var _root = root;
885
+
886
+ /** Built-in value references. */
887
+ var Symbol$1 = _root.Symbol;
888
+
889
+ var _Symbol = Symbol$1;
890
+
891
+ /** Used for built-in method references. */
892
+ var objectProto$4 = Object.prototype;
893
+
894
+ /** Used to check objects for own properties. */
895
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
896
+
897
+ /**
898
+ * Used to resolve the
899
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
900
+ * of values.
901
+ */
902
+ var nativeObjectToString$1 = objectProto$4.toString;
903
+
904
+ /** Built-in value references. */
905
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
906
+
907
+ /**
908
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
909
+ *
910
+ * @private
911
+ * @param {*} value The value to query.
912
+ * @returns {string} Returns the raw `toStringTag`.
913
+ */
914
+ function getRawTag(value) {
915
+ var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
916
+ tag = value[symToStringTag$1];
917
+
918
+ try {
919
+ value[symToStringTag$1] = undefined;
920
+ var unmasked = true;
921
+ } catch (e) {}
922
+
923
+ var result = nativeObjectToString$1.call(value);
924
+ if (unmasked) {
925
+ if (isOwn) {
926
+ value[symToStringTag$1] = tag;
927
+ } else {
928
+ delete value[symToStringTag$1];
929
+ }
930
+ }
931
+ return result;
932
+ }
933
+
934
+ var _getRawTag = getRawTag;
935
+
936
+ /** Used for built-in method references. */
937
+ var objectProto$3 = Object.prototype;
938
+
939
+ /**
940
+ * Used to resolve the
941
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
942
+ * of values.
943
+ */
944
+ var nativeObjectToString = objectProto$3.toString;
945
+
946
+ /**
947
+ * Converts `value` to a string using `Object.prototype.toString`.
948
+ *
949
+ * @private
950
+ * @param {*} value The value to convert.
951
+ * @returns {string} Returns the converted string.
952
+ */
953
+ function objectToString(value) {
954
+ return nativeObjectToString.call(value);
955
+ }
956
+
957
+ var _objectToString = objectToString;
958
+
959
+ /** `Object#toString` result references. */
960
+ var nullTag = '[object Null]',
961
+ undefinedTag = '[object Undefined]';
962
+
963
+ /** Built-in value references. */
964
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
965
+
966
+ /**
967
+ * The base implementation of `getTag` without fallbacks for buggy environments.
968
+ *
969
+ * @private
970
+ * @param {*} value The value to query.
971
+ * @returns {string} Returns the `toStringTag`.
972
+ */
973
+ function baseGetTag(value) {
974
+ if (value == null) {
975
+ return value === undefined ? undefinedTag : nullTag;
976
+ }
977
+ return (symToStringTag && symToStringTag in Object(value))
978
+ ? _getRawTag(value)
979
+ : _objectToString(value);
980
+ }
981
+
982
+ var _baseGetTag = baseGetTag;
983
+
984
+ /**
985
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
986
+ * and has a `typeof` result of "object".
987
+ *
988
+ * @static
989
+ * @memberOf _
990
+ * @since 4.0.0
991
+ * @category Lang
992
+ * @param {*} value The value to check.
993
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
994
+ * @example
995
+ *
996
+ * _.isObjectLike({});
997
+ * // => true
998
+ *
999
+ * _.isObjectLike([1, 2, 3]);
1000
+ * // => true
1001
+ *
1002
+ * _.isObjectLike(_.noop);
1003
+ * // => false
1004
+ *
1005
+ * _.isObjectLike(null);
1006
+ * // => false
1007
+ */
1008
+ function isObjectLike(value) {
1009
+ return value != null && typeof value == 'object';
1010
+ }
1011
+
1012
+ var isObjectLike_1 = isObjectLike;
1013
+
1014
+ /** `Object#toString` result references. */
1015
+ var symbolTag = '[object Symbol]';
1016
+
1017
+ /**
1018
+ * Checks if `value` is classified as a `Symbol` primitive or object.
1019
+ *
1020
+ * @static
1021
+ * @memberOf _
1022
+ * @since 4.0.0
1023
+ * @category Lang
1024
+ * @param {*} value The value to check.
1025
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
1026
+ * @example
1027
+ *
1028
+ * _.isSymbol(Symbol.iterator);
1029
+ * // => true
1030
+ *
1031
+ * _.isSymbol('abc');
1032
+ * // => false
1033
+ */
1034
+ function isSymbol(value) {
1035
+ return typeof value == 'symbol' ||
1036
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
1037
+ }
1038
+
1039
+ var isSymbol_1 = isSymbol;
1040
+
1041
+ /** Used to match property names within property paths. */
1042
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1043
+ reIsPlainProp = /^\w*$/;
1044
+
1045
+ /**
1046
+ * Checks if `value` is a property name and not a property path.
1047
+ *
1048
+ * @private
1049
+ * @param {*} value The value to check.
1050
+ * @param {Object} [object] The object to query keys on.
1051
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1052
+ */
1053
+ function isKey(value, object) {
1054
+ if (isArray_1(value)) {
1055
+ return false;
1056
+ }
1057
+ var type = typeof value;
1058
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
1059
+ value == null || isSymbol_1(value)) {
1060
+ return true;
1061
+ }
1062
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
1063
+ (object != null && value in Object(object));
1064
+ }
1065
+
1066
+ var _isKey = isKey;
1067
+
1068
+ /**
1069
+ * Checks if `value` is the
1070
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1071
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1072
+ *
1073
+ * @static
1074
+ * @memberOf _
1075
+ * @since 0.1.0
1076
+ * @category Lang
1077
+ * @param {*} value The value to check.
1078
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1079
+ * @example
1080
+ *
1081
+ * _.isObject({});
1082
+ * // => true
1083
+ *
1084
+ * _.isObject([1, 2, 3]);
1085
+ * // => true
1086
+ *
1087
+ * _.isObject(_.noop);
1088
+ * // => true
1089
+ *
1090
+ * _.isObject(null);
1091
+ * // => false
1092
+ */
1093
+ function isObject(value) {
1094
+ var type = typeof value;
1095
+ return value != null && (type == 'object' || type == 'function');
1096
+ }
1097
+
1098
+ var isObject_1 = isObject;
1099
+
1100
+ /** `Object#toString` result references. */
1101
+ var asyncTag = '[object AsyncFunction]',
1102
+ funcTag = '[object Function]',
1103
+ genTag = '[object GeneratorFunction]',
1104
+ proxyTag = '[object Proxy]';
1105
+
1106
+ /**
1107
+ * Checks if `value` is classified as a `Function` object.
1108
+ *
1109
+ * @static
1110
+ * @memberOf _
1111
+ * @since 0.1.0
1112
+ * @category Lang
1113
+ * @param {*} value The value to check.
1114
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1115
+ * @example
1116
+ *
1117
+ * _.isFunction(_);
1118
+ * // => true
1119
+ *
1120
+ * _.isFunction(/abc/);
1121
+ * // => false
1122
+ */
1123
+ function isFunction(value) {
1124
+ if (!isObject_1(value)) {
1125
+ return false;
1126
+ }
1127
+ // The use of `Object#toString` avoids issues with the `typeof` operator
1128
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
1129
+ var tag = _baseGetTag(value);
1130
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1131
+ }
1132
+
1133
+ var isFunction_1 = isFunction;
1134
+
1135
+ /** Used to detect overreaching core-js shims. */
1136
+ var coreJsData = _root['__core-js_shared__'];
1137
+
1138
+ var _coreJsData = coreJsData;
1139
+
1140
+ /** Used to detect methods masquerading as native. */
1141
+ var maskSrcKey = (function() {
1142
+ var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
1143
+ return uid ? ('Symbol(src)_1.' + uid) : '';
1144
+ }());
1145
+
1146
+ /**
1147
+ * Checks if `func` has its source masked.
1148
+ *
1149
+ * @private
1150
+ * @param {Function} func The function to check.
1151
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1152
+ */
1153
+ function isMasked(func) {
1154
+ return !!maskSrcKey && (maskSrcKey in func);
1155
+ }
1156
+
1157
+ var _isMasked = isMasked;
1158
+
1159
+ /** Used for built-in method references. */
1160
+ var funcProto$1 = Function.prototype;
1161
+
1162
+ /** Used to resolve the decompiled source of functions. */
1163
+ var funcToString$1 = funcProto$1.toString;
1164
+
1165
+ /**
1166
+ * Converts `func` to its source code.
1167
+ *
1168
+ * @private
1169
+ * @param {Function} func The function to convert.
1170
+ * @returns {string} Returns the source code.
1171
+ */
1172
+ function toSource(func) {
1173
+ if (func != null) {
1174
+ try {
1175
+ return funcToString$1.call(func);
1176
+ } catch (e) {}
1177
+ try {
1178
+ return (func + '');
1179
+ } catch (e) {}
1180
+ }
1181
+ return '';
1182
+ }
1183
+
1184
+ var _toSource = toSource;
1185
+
1186
+ /**
1187
+ * Used to match `RegExp`
1188
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1189
+ */
1190
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1191
+
1192
+ /** Used to detect host constructors (Safari). */
1193
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
1194
+
1195
+ /** Used for built-in method references. */
1196
+ var funcProto = Function.prototype,
1197
+ objectProto$2 = Object.prototype;
1198
+
1199
+ /** Used to resolve the decompiled source of functions. */
1200
+ var funcToString = funcProto.toString;
1201
+
1202
+ /** Used to check objects for own properties. */
1203
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1204
+
1205
+ /** Used to detect if a method is native. */
1206
+ var reIsNative = RegExp('^' +
1207
+ funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
1208
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1209
+ );
1210
+
1211
+ /**
1212
+ * The base implementation of `_.isNative` without bad shim checks.
1213
+ *
1214
+ * @private
1215
+ * @param {*} value The value to check.
1216
+ * @returns {boolean} Returns `true` if `value` is a native function,
1217
+ * else `false`.
1218
+ */
1219
+ function baseIsNative(value) {
1220
+ if (!isObject_1(value) || _isMasked(value)) {
1221
+ return false;
1222
+ }
1223
+ var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
1224
+ return pattern.test(_toSource(value));
1225
+ }
1226
+
1227
+ var _baseIsNative = baseIsNative;
1228
+
1229
+ /**
1230
+ * Gets the value at `key` of `object`.
1231
+ *
1232
+ * @private
1233
+ * @param {Object} [object] The object to query.
1234
+ * @param {string} key The key of the property to get.
1235
+ * @returns {*} Returns the property value.
1236
+ */
1237
+ function getValue(object, key) {
1238
+ return object == null ? undefined : object[key];
1239
+ }
1240
+
1241
+ var _getValue = getValue;
1242
+
1243
+ /**
1244
+ * Gets the native function at `key` of `object`.
1245
+ *
1246
+ * @private
1247
+ * @param {Object} object The object to query.
1248
+ * @param {string} key The key of the method to get.
1249
+ * @returns {*} Returns the function if it's native, else `undefined`.
1250
+ */
1251
+ function getNative(object, key) {
1252
+ var value = _getValue(object, key);
1253
+ return _baseIsNative(value) ? value : undefined;
1254
+ }
1255
+
1256
+ var _getNative = getNative;
1257
+
1258
+ /* Built-in method references that are verified to be native. */
1259
+ var nativeCreate = _getNative(Object, 'create');
1260
+
1261
+ var _nativeCreate = nativeCreate;
1262
+
1263
+ /**
1264
+ * Removes all key-value entries from the hash.
1265
+ *
1266
+ * @private
1267
+ * @name clear
1268
+ * @memberOf Hash
1269
+ */
1270
+ function hashClear() {
1271
+ this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
1272
+ this.size = 0;
1273
+ }
1274
+
1275
+ var _hashClear = hashClear;
1276
+
1277
+ /**
1278
+ * Removes `key` and its value from the hash.
1279
+ *
1280
+ * @private
1281
+ * @name delete
1282
+ * @memberOf Hash
1283
+ * @param {Object} hash The hash to modify.
1284
+ * @param {string} key The key of the value to remove.
1285
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1286
+ */
1287
+ function hashDelete(key) {
1288
+ var result = this.has(key) && delete this.__data__[key];
1289
+ this.size -= result ? 1 : 0;
1290
+ return result;
1291
+ }
1292
+
1293
+ var _hashDelete = hashDelete;
1294
+
1295
+ /** Used to stand-in for `undefined` hash values. */
1296
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1297
+
1298
+ /** Used for built-in method references. */
1299
+ var objectProto$1 = Object.prototype;
1300
+
1301
+ /** Used to check objects for own properties. */
1302
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1303
+
1304
+ /**
1305
+ * Gets the hash value for `key`.
1306
+ *
1307
+ * @private
1308
+ * @name get
1309
+ * @memberOf Hash
1310
+ * @param {string} key The key of the value to get.
1311
+ * @returns {*} Returns the entry value.
1312
+ */
1313
+ function hashGet(key) {
1314
+ var data = this.__data__;
1315
+ if (_nativeCreate) {
1316
+ var result = data[key];
1317
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1318
+ }
1319
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
1320
+ }
1321
+
1322
+ var _hashGet = hashGet;
1323
+
1324
+ /** Used for built-in method references. */
1325
+ var objectProto = Object.prototype;
1326
+
1327
+ /** Used to check objects for own properties. */
1328
+ var hasOwnProperty = objectProto.hasOwnProperty;
1329
+
1330
+ /**
1331
+ * Checks if a hash value for `key` exists.
1332
+ *
1333
+ * @private
1334
+ * @name has
1335
+ * @memberOf Hash
1336
+ * @param {string} key The key of the entry to check.
1337
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1338
+ */
1339
+ function hashHas(key) {
1340
+ var data = this.__data__;
1341
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
1342
+ }
1343
+
1344
+ var _hashHas = hashHas;
1345
+
1346
+ /** Used to stand-in for `undefined` hash values. */
1347
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1348
+
1349
+ /**
1350
+ * Sets the hash `key` to `value`.
1351
+ *
1352
+ * @private
1353
+ * @name set
1354
+ * @memberOf Hash
1355
+ * @param {string} key The key of the value to set.
1356
+ * @param {*} value The value to set.
1357
+ * @returns {Object} Returns the hash instance.
1358
+ */
1359
+ function hashSet(key, value) {
1360
+ var data = this.__data__;
1361
+ this.size += this.has(key) ? 0 : 1;
1362
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1363
+ return this;
1364
+ }
1365
+
1366
+ var _hashSet = hashSet;
1367
+
1368
+ /**
1369
+ * Creates a hash object.
1370
+ *
1371
+ * @private
1372
+ * @constructor
1373
+ * @param {Array} [entries] The key-value pairs to cache.
1374
+ */
1375
+ function Hash(entries) {
1376
+ var index = -1,
1377
+ length = entries == null ? 0 : entries.length;
1378
+
1379
+ this.clear();
1380
+ while (++index < length) {
1381
+ var entry = entries[index];
1382
+ this.set(entry[0], entry[1]);
1383
+ }
1384
+ }
1385
+
1386
+ // Add methods to `Hash`.
1387
+ Hash.prototype.clear = _hashClear;
1388
+ Hash.prototype['delete'] = _hashDelete;
1389
+ Hash.prototype.get = _hashGet;
1390
+ Hash.prototype.has = _hashHas;
1391
+ Hash.prototype.set = _hashSet;
1392
+
1393
+ var _Hash = Hash;
1394
+
1395
+ /**
1396
+ * Removes all key-value entries from the list cache.
1397
+ *
1398
+ * @private
1399
+ * @name clear
1400
+ * @memberOf ListCache
1401
+ */
1402
+ function listCacheClear() {
1403
+ this.__data__ = [];
1404
+ this.size = 0;
1405
+ }
1406
+
1407
+ var _listCacheClear = listCacheClear;
1408
+
1409
+ /**
1410
+ * Performs a
1411
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1412
+ * comparison between two values to determine if they are equivalent.
1413
+ *
1414
+ * @static
1415
+ * @memberOf _
1416
+ * @since 4.0.0
1417
+ * @category Lang
1418
+ * @param {*} value The value to compare.
1419
+ * @param {*} other The other value to compare.
1420
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1421
+ * @example
1422
+ *
1423
+ * var object = { 'a': 1 };
1424
+ * var other = { 'a': 1 };
1425
+ *
1426
+ * _.eq(object, object);
1427
+ * // => true
1428
+ *
1429
+ * _.eq(object, other);
1430
+ * // => false
1431
+ *
1432
+ * _.eq('a', 'a');
1433
+ * // => true
1434
+ *
1435
+ * _.eq('a', Object('a'));
1436
+ * // => false
1437
+ *
1438
+ * _.eq(NaN, NaN);
1439
+ * // => true
1440
+ */
1441
+ function eq(value, other) {
1442
+ return value === other || (value !== value && other !== other);
1443
+ }
1444
+
1445
+ var eq_1 = eq;
1446
+
1447
+ /**
1448
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1449
+ *
1450
+ * @private
1451
+ * @param {Array} array The array to inspect.
1452
+ * @param {*} key The key to search for.
1453
+ * @returns {number} Returns the index of the matched value, else `-1`.
1454
+ */
1455
+ function assocIndexOf(array, key) {
1456
+ var length = array.length;
1457
+ while (length--) {
1458
+ if (eq_1(array[length][0], key)) {
1459
+ return length;
1460
+ }
1461
+ }
1462
+ return -1;
1463
+ }
1464
+
1465
+ var _assocIndexOf = assocIndexOf;
1466
+
1467
+ /** Used for built-in method references. */
1468
+ var arrayProto = Array.prototype;
1469
+
1470
+ /** Built-in value references. */
1471
+ var splice = arrayProto.splice;
1472
+
1473
+ /**
1474
+ * Removes `key` and its value from the list cache.
1475
+ *
1476
+ * @private
1477
+ * @name delete
1478
+ * @memberOf ListCache
1479
+ * @param {string} key The key of the value to remove.
1480
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1481
+ */
1482
+ function listCacheDelete(key) {
1483
+ var data = this.__data__,
1484
+ index = _assocIndexOf(data, key);
1485
+
1486
+ if (index < 0) {
1487
+ return false;
1488
+ }
1489
+ var lastIndex = data.length - 1;
1490
+ if (index == lastIndex) {
1491
+ data.pop();
1492
+ } else {
1493
+ splice.call(data, index, 1);
1494
+ }
1495
+ --this.size;
1496
+ return true;
1497
+ }
1498
+
1499
+ var _listCacheDelete = listCacheDelete;
1500
+
1501
+ /**
1502
+ * Gets the list cache value for `key`.
1503
+ *
1504
+ * @private
1505
+ * @name get
1506
+ * @memberOf ListCache
1507
+ * @param {string} key The key of the value to get.
1508
+ * @returns {*} Returns the entry value.
1509
+ */
1510
+ function listCacheGet(key) {
1511
+ var data = this.__data__,
1512
+ index = _assocIndexOf(data, key);
1513
+
1514
+ return index < 0 ? undefined : data[index][1];
1515
+ }
1516
+
1517
+ var _listCacheGet = listCacheGet;
1518
+
1519
+ /**
1520
+ * Checks if a list cache value for `key` exists.
1521
+ *
1522
+ * @private
1523
+ * @name has
1524
+ * @memberOf ListCache
1525
+ * @param {string} key The key of the entry to check.
1526
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1527
+ */
1528
+ function listCacheHas(key) {
1529
+ return _assocIndexOf(this.__data__, key) > -1;
1530
+ }
1531
+
1532
+ var _listCacheHas = listCacheHas;
1533
+
1534
+ /**
1535
+ * Sets the list cache `key` to `value`.
1536
+ *
1537
+ * @private
1538
+ * @name set
1539
+ * @memberOf ListCache
1540
+ * @param {string} key The key of the value to set.
1541
+ * @param {*} value The value to set.
1542
+ * @returns {Object} Returns the list cache instance.
1543
+ */
1544
+ function listCacheSet(key, value) {
1545
+ var data = this.__data__,
1546
+ index = _assocIndexOf(data, key);
1547
+
1548
+ if (index < 0) {
1549
+ ++this.size;
1550
+ data.push([key, value]);
1551
+ } else {
1552
+ data[index][1] = value;
1553
+ }
1554
+ return this;
1555
+ }
1556
+
1557
+ var _listCacheSet = listCacheSet;
1558
+
1559
+ /**
1560
+ * Creates an list cache object.
1561
+ *
1562
+ * @private
1563
+ * @constructor
1564
+ * @param {Array} [entries] The key-value pairs to cache.
1565
+ */
1566
+ function ListCache(entries) {
1567
+ var index = -1,
1568
+ length = entries == null ? 0 : entries.length;
1569
+
1570
+ this.clear();
1571
+ while (++index < length) {
1572
+ var entry = entries[index];
1573
+ this.set(entry[0], entry[1]);
1574
+ }
1575
+ }
1576
+
1577
+ // Add methods to `ListCache`.
1578
+ ListCache.prototype.clear = _listCacheClear;
1579
+ ListCache.prototype['delete'] = _listCacheDelete;
1580
+ ListCache.prototype.get = _listCacheGet;
1581
+ ListCache.prototype.has = _listCacheHas;
1582
+ ListCache.prototype.set = _listCacheSet;
1583
+
1584
+ var _ListCache = ListCache;
1585
+
1586
+ /* Built-in method references that are verified to be native. */
1587
+ var Map = _getNative(_root, 'Map');
1588
+
1589
+ var _Map = Map;
1590
+
1591
+ /**
1592
+ * Removes all key-value entries from the map.
1593
+ *
1594
+ * @private
1595
+ * @name clear
1596
+ * @memberOf MapCache
1597
+ */
1598
+ function mapCacheClear() {
1599
+ this.size = 0;
1600
+ this.__data__ = {
1601
+ 'hash': new _Hash,
1602
+ 'map': new (_Map || _ListCache),
1603
+ 'string': new _Hash
1604
+ };
1605
+ }
1606
+
1607
+ var _mapCacheClear = mapCacheClear;
1608
+
1609
+ /**
1610
+ * Checks if `value` is suitable for use as unique object key.
1611
+ *
1612
+ * @private
1613
+ * @param {*} value The value to check.
1614
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1615
+ */
1616
+ function isKeyable(value) {
1617
+ var type = typeof value;
1618
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1619
+ ? (value !== '__proto__')
1620
+ : (value === null);
1621
+ }
1622
+
1623
+ var _isKeyable = isKeyable;
1624
+
1625
+ /**
1626
+ * Gets the data for `map`.
1627
+ *
1628
+ * @private
1629
+ * @param {Object} map The map to query.
1630
+ * @param {string} key The reference key.
1631
+ * @returns {*} Returns the map data.
1632
+ */
1633
+ function getMapData(map, key) {
1634
+ var data = map.__data__;
1635
+ return _isKeyable(key)
1636
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1637
+ : data.map;
1638
+ }
1639
+
1640
+ var _getMapData = getMapData;
1641
+
1642
+ /**
1643
+ * Removes `key` and its value from the map.
1644
+ *
1645
+ * @private
1646
+ * @name delete
1647
+ * @memberOf MapCache
1648
+ * @param {string} key The key of the value to remove.
1649
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1650
+ */
1651
+ function mapCacheDelete(key) {
1652
+ var result = _getMapData(this, key)['delete'](key);
1653
+ this.size -= result ? 1 : 0;
1654
+ return result;
1655
+ }
1656
+
1657
+ var _mapCacheDelete = mapCacheDelete;
1658
+
1659
+ /**
1660
+ * Gets the map value for `key`.
1661
+ *
1662
+ * @private
1663
+ * @name get
1664
+ * @memberOf MapCache
1665
+ * @param {string} key The key of the value to get.
1666
+ * @returns {*} Returns the entry value.
1667
+ */
1668
+ function mapCacheGet(key) {
1669
+ return _getMapData(this, key).get(key);
1670
+ }
1671
+
1672
+ var _mapCacheGet = mapCacheGet;
1673
+
1674
+ /**
1675
+ * Checks if a map value for `key` exists.
1676
+ *
1677
+ * @private
1678
+ * @name has
1679
+ * @memberOf MapCache
1680
+ * @param {string} key The key of the entry to check.
1681
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1682
+ */
1683
+ function mapCacheHas(key) {
1684
+ return _getMapData(this, key).has(key);
1685
+ }
1686
+
1687
+ var _mapCacheHas = mapCacheHas;
1688
+
1689
+ /**
1690
+ * Sets the map `key` to `value`.
1691
+ *
1692
+ * @private
1693
+ * @name set
1694
+ * @memberOf MapCache
1695
+ * @param {string} key The key of the value to set.
1696
+ * @param {*} value The value to set.
1697
+ * @returns {Object} Returns the map cache instance.
1698
+ */
1699
+ function mapCacheSet(key, value) {
1700
+ var data = _getMapData(this, key),
1701
+ size = data.size;
1702
+
1703
+ data.set(key, value);
1704
+ this.size += data.size == size ? 0 : 1;
1705
+ return this;
1706
+ }
1707
+
1708
+ var _mapCacheSet = mapCacheSet;
1709
+
1710
+ /**
1711
+ * Creates a map cache object to store key-value pairs.
1712
+ *
1713
+ * @private
1714
+ * @constructor
1715
+ * @param {Array} [entries] The key-value pairs to cache.
1716
+ */
1717
+ function MapCache(entries) {
1718
+ var index = -1,
1719
+ length = entries == null ? 0 : entries.length;
1720
+
1721
+ this.clear();
1722
+ while (++index < length) {
1723
+ var entry = entries[index];
1724
+ this.set(entry[0], entry[1]);
1725
+ }
1726
+ }
1727
+
1728
+ // Add methods to `MapCache`.
1729
+ MapCache.prototype.clear = _mapCacheClear;
1730
+ MapCache.prototype['delete'] = _mapCacheDelete;
1731
+ MapCache.prototype.get = _mapCacheGet;
1732
+ MapCache.prototype.has = _mapCacheHas;
1733
+ MapCache.prototype.set = _mapCacheSet;
1734
+
1735
+ var _MapCache = MapCache;
1736
+
1737
+ /** Error message constants. */
1738
+ var FUNC_ERROR_TEXT = 'Expected a function';
1739
+
1740
+ /**
1741
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1742
+ * provided, it determines the cache key for storing the result based on the
1743
+ * arguments provided to the memoized function. By default, the first argument
1744
+ * provided to the memoized function is used as the map cache key. The `func`
1745
+ * is invoked with the `this` binding of the memoized function.
1746
+ *
1747
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1748
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1749
+ * constructor with one whose instances implement the
1750
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1751
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1752
+ *
1753
+ * @static
1754
+ * @memberOf _
1755
+ * @since 0.1.0
1756
+ * @category Function
1757
+ * @param {Function} func The function to have its output memoized.
1758
+ * @param {Function} [resolver] The function to resolve the cache key.
1759
+ * @returns {Function} Returns the new memoized function.
1760
+ * @example
1761
+ *
1762
+ * var object = { 'a': 1, 'b': 2 };
1763
+ * var other = { 'c': 3, 'd': 4 };
1764
+ *
1765
+ * var values = _.memoize(_.values);
1766
+ * values(object);
1767
+ * // => [1, 2]
1768
+ *
1769
+ * values(other);
1770
+ * // => [3, 4]
1771
+ *
1772
+ * object.a = 2;
1773
+ * values(object);
1774
+ * // => [1, 2]
1775
+ *
1776
+ * // Modify the result cache.
1777
+ * values.cache.set(object, ['a', 'b']);
1778
+ * values(object);
1779
+ * // => ['a', 'b']
1780
+ *
1781
+ * // Replace `_.memoize.Cache`.
1782
+ * _.memoize.Cache = WeakMap;
1783
+ */
1784
+ function memoize(func, resolver) {
1785
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1786
+ throw new TypeError(FUNC_ERROR_TEXT);
1787
+ }
1788
+ var memoized = function() {
1789
+ var args = arguments,
1790
+ key = resolver ? resolver.apply(this, args) : args[0],
1791
+ cache = memoized.cache;
1792
+
1793
+ if (cache.has(key)) {
1794
+ return cache.get(key);
1795
+ }
1796
+ var result = func.apply(this, args);
1797
+ memoized.cache = cache.set(key, result) || cache;
1798
+ return result;
1799
+ };
1800
+ memoized.cache = new (memoize.Cache || _MapCache);
1801
+ return memoized;
1802
+ }
1803
+
1804
+ // Expose `MapCache`.
1805
+ memoize.Cache = _MapCache;
1806
+
1807
+ var memoize_1 = memoize;
1808
+
1809
+ /** Used as the maximum memoize cache size. */
1810
+ var MAX_MEMOIZE_SIZE = 500;
1811
+
1812
+ /**
1813
+ * A specialized version of `_.memoize` which clears the memoized function's
1814
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1815
+ *
1816
+ * @private
1817
+ * @param {Function} func The function to have its output memoized.
1818
+ * @returns {Function} Returns the new memoized function.
1819
+ */
1820
+ function memoizeCapped(func) {
1821
+ var result = memoize_1(func, function(key) {
1822
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1823
+ cache.clear();
1824
+ }
1825
+ return key;
1826
+ });
1827
+
1828
+ var cache = result.cache;
1829
+ return result;
1830
+ }
1831
+
1832
+ var _memoizeCapped = memoizeCapped;
1833
+
1834
+ /** Used to match property names within property paths. */
1835
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1836
+
1837
+ /** Used to match backslashes in property paths. */
1838
+ var reEscapeChar = /\\(\\)?/g;
1839
+
1840
+ /**
1841
+ * Converts `string` to a property path array.
1842
+ *
1843
+ * @private
1844
+ * @param {string} string The string to convert.
1845
+ * @returns {Array} Returns the property path array.
1846
+ */
1847
+ var stringToPath = _memoizeCapped(function(string) {
1848
+ var result = [];
1849
+ if (string.charCodeAt(0) === 46 /* . */) {
1850
+ result.push('');
1851
+ }
1852
+ string.replace(rePropName, function(match, number, quote, subString) {
1853
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1854
+ });
1855
+ return result;
1856
+ });
1857
+
1858
+ var _stringToPath = stringToPath;
1859
+
1860
+ /**
1861
+ * A specialized version of `_.map` for arrays without support for iteratee
1862
+ * shorthands.
1863
+ *
1864
+ * @private
1865
+ * @param {Array} [array] The array to iterate over.
1866
+ * @param {Function} iteratee The function invoked per iteration.
1867
+ * @returns {Array} Returns the new mapped array.
1868
+ */
1869
+ function arrayMap(array, iteratee) {
1870
+ var index = -1,
1871
+ length = array == null ? 0 : array.length,
1872
+ result = Array(length);
1873
+
1874
+ while (++index < length) {
1875
+ result[index] = iteratee(array[index], index, array);
1876
+ }
1877
+ return result;
1878
+ }
1879
+
1880
+ var _arrayMap = arrayMap;
1881
+
1882
+ /** Used as references for various `Number` constants. */
1883
+ var INFINITY$1 = 1 / 0;
1884
+
1885
+ /** Used to convert symbols to primitives and strings. */
1886
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1887
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
1888
+
1889
+ /**
1890
+ * The base implementation of `_.toString` which doesn't convert nullish
1891
+ * values to empty strings.
1892
+ *
1893
+ * @private
1894
+ * @param {*} value The value to process.
1895
+ * @returns {string} Returns the string.
1896
+ */
1897
+ function baseToString(value) {
1898
+ // Exit early for strings to avoid a performance hit in some environments.
1899
+ if (typeof value == 'string') {
1900
+ return value;
1901
+ }
1902
+ if (isArray_1(value)) {
1903
+ // Recursively convert values (susceptible to call stack limits).
1904
+ return _arrayMap(value, baseToString) + '';
1905
+ }
1906
+ if (isSymbol_1(value)) {
1907
+ return symbolToString ? symbolToString.call(value) : '';
1908
+ }
1909
+ var result = (value + '');
1910
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1911
+ }
1912
+
1913
+ var _baseToString = baseToString;
1914
+
1915
+ /**
1916
+ * Converts `value` to a string. An empty string is returned for `null`
1917
+ * and `undefined` values. The sign of `-0` is preserved.
1918
+ *
1919
+ * @static
1920
+ * @memberOf _
1921
+ * @since 4.0.0
1922
+ * @category Lang
1923
+ * @param {*} value The value to convert.
1924
+ * @returns {string} Returns the converted string.
1925
+ * @example
1926
+ *
1927
+ * _.toString(null);
1928
+ * // => ''
1929
+ *
1930
+ * _.toString(-0);
1931
+ * // => '-0'
1932
+ *
1933
+ * _.toString([1, 2, 3]);
1934
+ * // => '1,2,3'
1935
+ */
1936
+ function toString(value) {
1937
+ return value == null ? '' : _baseToString(value);
1938
+ }
1939
+
1940
+ var toString_1 = toString;
1941
+
1942
+ /**
1943
+ * Casts `value` to a path array if it's not one.
1944
+ *
1945
+ * @private
1946
+ * @param {*} value The value to inspect.
1947
+ * @param {Object} [object] The object to query keys on.
1948
+ * @returns {Array} Returns the cast property path array.
1949
+ */
1950
+ function castPath(value, object) {
1951
+ if (isArray_1(value)) {
1952
+ return value;
1953
+ }
1954
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1955
+ }
1956
+
1957
+ var _castPath = castPath;
1958
+
1959
+ /** Used as references for various `Number` constants. */
1960
+ var INFINITY = 1 / 0;
1961
+
1962
+ /**
1963
+ * Converts `value` to a string key if it's not a string or symbol.
1964
+ *
1965
+ * @private
1966
+ * @param {*} value The value to inspect.
1967
+ * @returns {string|symbol} Returns the key.
1968
+ */
1969
+ function toKey(value) {
1970
+ if (typeof value == 'string' || isSymbol_1(value)) {
1971
+ return value;
1972
+ }
1973
+ var result = (value + '');
1974
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1975
+ }
1976
+
1977
+ var _toKey = toKey;
1978
+
1979
+ /**
1980
+ * The base implementation of `_.get` without support for default values.
1981
+ *
1982
+ * @private
1983
+ * @param {Object} object The object to query.
1984
+ * @param {Array|string} path The path of the property to get.
1985
+ * @returns {*} Returns the resolved value.
1986
+ */
1987
+ function baseGet(object, path) {
1988
+ path = _castPath(path, object);
1989
+
1990
+ var index = 0,
1991
+ length = path.length;
1992
+
1993
+ while (object != null && index < length) {
1994
+ object = object[_toKey(path[index++])];
1995
+ }
1996
+ return (index && index == length) ? object : undefined;
1997
+ }
1998
+
1999
+ var _baseGet = baseGet;
2000
+
2001
+ /**
2002
+ * Gets the value at `path` of `object`. If the resolved value is
2003
+ * `undefined`, the `defaultValue` is returned in its place.
2004
+ *
2005
+ * @static
2006
+ * @memberOf _
2007
+ * @since 3.7.0
2008
+ * @category Object
2009
+ * @param {Object} object The object to query.
2010
+ * @param {Array|string} path The path of the property to get.
2011
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
2012
+ * @returns {*} Returns the resolved value.
2013
+ * @example
2014
+ *
2015
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2016
+ *
2017
+ * _.get(object, 'a[0].b.c');
2018
+ * // => 3
2019
+ *
2020
+ * _.get(object, ['a', '0', 'b', 'c']);
2021
+ * // => 3
2022
+ *
2023
+ * _.get(object, 'a.b.c', 'default');
2024
+ * // => 'default'
2025
+ */
2026
+ function get(object, path, defaultValue) {
2027
+ var result = object == null ? undefined : _baseGet(object, path);
2028
+ return result === undefined ? defaultValue : result;
2029
+ }
2030
+
2031
+ var get_1 = get;
2032
+
2033
+ var hexToRGB = function hexToRGB(hex) {
2034
+ var r = parseInt(hex.slice(1, 3), 16);
2035
+ var g = parseInt(hex.slice(3, 5), 16);
2036
+ var b = parseInt(hex.slice(5, 7), 16);
2037
+ return {
2038
+ r: r,
2039
+ g: g,
2040
+ b: b
2041
+ };
2042
+ };
2043
+ var getLuminanceOfColor = function getLuminanceOfColor(hex) {
2044
+ var _hexToRGB = hexToRGB(hex),
2045
+ r = _hexToRGB.r,
2046
+ g = _hexToRGB.g,
2047
+ b = _hexToRGB.b;
2048
+
2049
+ return r * 0.299 + g * 0.587 + b * 0.114;
2050
+ };
2051
+ var rgbToHex = function rgbToHex() {
2052
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
2053
+ var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
2054
+ 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;
2055
+ };
2056
+ var getTextColor = function getTextColor() {
2057
+ var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
2058
+ var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
2059
+ var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
2060
+ var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
2061
+ return textColor;
2062
+ };
2063
+ var shapeConfig = PropTypes.shape({
2064
+ "sketches-host": PropTypes.string,
2065
+ "cdn-name": PropTypes.string,
2066
+ "cdn-image": PropTypes.string
2067
+ });
2068
+ var shapeStory = PropTypes.shape({
2069
+ headline: PropTypes.string,
2070
+ "last-published-at": PropTypes.number,
2071
+ subheadline: PropTypes.string
2072
+ });
2073
+
2074
+ function _defineProperty(obj, key, value) {
2075
+ if (key in obj) {
2076
+ Object.defineProperty(obj, key, {
2077
+ value: value,
2078
+ enumerable: true,
2079
+ configurable: true,
2080
+ writable: true
2081
+ });
2082
+ } else {
2083
+ obj[key] = value;
2084
+ }
2085
+
2086
+ return obj;
2087
+ }
2088
+
2089
+ function _arrayWithHoles(arr) {
2090
+ if (Array.isArray(arr)) return arr;
2091
+ }
2092
+
2093
+ function _iterableToArrayLimit(arr, i) {
2094
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2095
+
2096
+ if (_i == null) return;
2097
+ var _arr = [];
2098
+ var _n = true;
2099
+ var _d = false;
2100
+
2101
+ var _s, _e;
2102
+
2103
+ try {
2104
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
2105
+ _arr.push(_s.value);
2106
+
2107
+ if (i && _arr.length === i) break;
2108
+ }
2109
+ } catch (err) {
2110
+ _d = true;
2111
+ _e = err;
2112
+ } finally {
2113
+ try {
2114
+ if (!_n && _i["return"] != null) _i["return"]();
2115
+ } finally {
2116
+ if (_d) throw _e;
2117
+ }
2118
+ }
2119
+
2120
+ return _arr;
2121
+ }
2122
+
2123
+ function _arrayLikeToArray(arr, len) {
2124
+ if (len == null || len > arr.length) len = arr.length;
2125
+
2126
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
2127
+ arr2[i] = arr[i];
2128
+ }
2129
+
2130
+ return arr2;
2131
+ }
2132
+
2133
+ function _unsupportedIterableToArray(o, minLen) {
2134
+ if (!o) return;
2135
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2136
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2137
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2138
+ if (n === "Map" || n === "Set") return Array.from(o);
2139
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2140
+ }
2141
+
2142
+ function _nonIterableRest() {
2143
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2144
+ }
2145
+
2146
+ function _slicedToArray(arr, i) {
2147
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
2148
+ }
2149
+
2150
+ var Loading = function Loading(_ref) {
2151
+ _ref.width;
2152
+ _ref.height;
2153
+ _ref.iconColor;
2154
+ return /*#__PURE__*/React.createElement("div", {
2155
+ className: "loading-m_loading-indicator__2Dlst"
2156
+ }, /*#__PURE__*/React.createElement("svg", {
2157
+ width: "40",
2158
+ height: "40",
2159
+ xmlns: "http://www.w3.org/2000/svg",
2160
+ viewBox: "0 0 100 100",
2161
+ preserveAspectRatio: "xMidYMid"
2162
+ }, /*#__PURE__*/React.createElement("circle", {
2163
+ cx: "84",
2164
+ cy: "50",
2165
+ r: "0",
2166
+ fill: "currentColor"
2167
+ }, /*#__PURE__*/React.createElement("animate", {
2168
+ attributeName: "r",
2169
+ values: "10;0;0;0;0",
2170
+ keyTimes: "0;0.25;0.5;0.75;1",
2171
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2172
+ calcMode: "spline",
2173
+ dur: "2s",
2174
+ repeatCount: "indefinite",
2175
+ begin: "0s"
2176
+ }), /*#__PURE__*/React.createElement("animate", {
2177
+ attributeName: "cx",
2178
+ values: "84;84;84;84;84",
2179
+ keyTimes: "0;0.25;0.5;0.75;1",
2180
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2181
+ calcMode: "spline",
2182
+ dur: "2s",
2183
+ repeatCount: "indefinite",
2184
+ begin: "0s"
2185
+ })), /*#__PURE__*/React.createElement("circle", {
2186
+ cx: "84",
2187
+ cy: "50",
2188
+ r: ".709",
2189
+ fill: "currentColor"
2190
+ }, /*#__PURE__*/React.createElement("animate", {
2191
+ attributeName: "r",
2192
+ values: "0;10;10;10;0",
2193
+ keyTimes: "0;0.25;0.5;0.75;1",
2194
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2195
+ calcMode: "spline",
2196
+ dur: "2s",
2197
+ repeatCount: "indefinite",
2198
+ begin: "-1s"
2199
+ }), /*#__PURE__*/React.createElement("animate", {
2200
+ attributeName: "cx",
2201
+ values: "16;16;50;84;84",
2202
+ keyTimes: "0;0.25;0.5;0.75;1",
2203
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2204
+ calcMode: "spline",
2205
+ dur: "2s",
2206
+ repeatCount: "indefinite",
2207
+ begin: "-1s"
2208
+ })), /*#__PURE__*/React.createElement("circle", {
2209
+ cx: "81.59",
2210
+ cy: "50",
2211
+ r: "10",
2212
+ fill: "currentColor"
2213
+ }, /*#__PURE__*/React.createElement("animate", {
2214
+ attributeName: "r",
2215
+ values: "0;10;10;10;0",
2216
+ keyTimes: "0;0.25;0.5;0.75;1",
2217
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2218
+ calcMode: "spline",
2219
+ dur: "2s",
2220
+ repeatCount: "indefinite",
2221
+ begin: "-0.5s"
2222
+ }), /*#__PURE__*/React.createElement("animate", {
2223
+ attributeName: "cx",
2224
+ values: "16;16;50;84;84",
2225
+ keyTimes: "0;0.25;0.5;0.75;1",
2226
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2227
+ calcMode: "spline",
2228
+ dur: "2s",
2229
+ repeatCount: "indefinite",
2230
+ begin: "-0.5s"
2231
+ })), /*#__PURE__*/React.createElement("circle", {
2232
+ cx: "47.59",
2233
+ cy: "50",
2234
+ r: "10",
2235
+ fill: "currentColor"
2236
+ }, /*#__PURE__*/React.createElement("animate", {
2237
+ attributeName: "r",
2238
+ values: "0;10;10;10;0",
2239
+ keyTimes: "0;0.25;0.5;0.75;1",
2240
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2241
+ calcMode: "spline",
2242
+ dur: "2s",
2243
+ repeatCount: "indefinite",
2244
+ begin: "0s"
2245
+ }), /*#__PURE__*/React.createElement("animate", {
2246
+ attributeName: "cx",
2247
+ values: "16;16;50;84;84",
2248
+ keyTimes: "0;0.25;0.5;0.75;1",
2249
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2250
+ calcMode: "spline",
2251
+ dur: "2s",
2252
+ repeatCount: "indefinite",
2253
+ begin: "0s"
2254
+ })), /*#__PURE__*/React.createElement("circle", {
2255
+ cx: "16",
2256
+ cy: "50",
2257
+ r: "9.291",
2258
+ fill: "currentColor"
2259
+ }, /*#__PURE__*/React.createElement("animate", {
2260
+ attributeName: "r",
2261
+ values: "0;0;10;10;10",
2262
+ keyTimes: "0;0.25;0.5;0.75;1",
2263
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2264
+ calcMode: "spline",
2265
+ dur: "2s",
2266
+ repeatCount: "indefinite",
2267
+ begin: "0s"
2268
+ }), /*#__PURE__*/React.createElement("animate", {
2269
+ attributeName: "cx",
2270
+ values: "16;16;16;50;84",
2271
+ keyTimes: "0;0.25;0.5;0.75;1",
2272
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
2273
+ calcMode: "spline",
2274
+ dur: "2s",
2275
+ repeatCount: "indefinite",
2276
+ begin: "0s"
2277
+ }))));
2278
+ };
2279
+ Loading.propTypes = {
2280
+ width: PropTypes.object,
2281
+ height: PropTypes.object,
2282
+ iconColor: PropTypes.object
2283
+ };
2284
+
2285
+ var HyperLinkIcon = function HyperLinkIcon() {
2286
+ return /*#__PURE__*/React.createElement("svg", {
2287
+ xmlns: "http://www.w3.org/2000/svg",
2288
+ width: "36",
2289
+ height: "28"
2290
+ }, /*#__PURE__*/React.createElement("g", {
2291
+ fill: "none",
2292
+ fillRule: "evenodd"
2293
+ }, /*#__PURE__*/React.createElement("rect", {
2294
+ width: "36",
2295
+ height: "28",
2296
+ fill: "#3D6FCF",
2297
+ rx: "4"
2298
+ }), /*#__PURE__*/React.createElement("path", {
2299
+ stroke: "#FFF",
2300
+ strokeLinecap: "round",
2301
+ strokeLinejoin: "round",
2302
+ strokeWidth: "2",
2303
+ d: "M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"
2304
+ })));
2305
+ };
2306
+
2307
+ var HyperLink = function HyperLink(_ref) {
2308
+ var _ref$hyperLink = _ref.hyperLink,
2309
+ hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
2310
+ if (!hyperLink) return null;
2311
+ return /*#__PURE__*/React.createElement(Link, {
2312
+ href: hyperLink,
2313
+ "aria-label": "hyperlink-button",
2314
+ className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
2315
+ target: "_blank",
2316
+ rel: "noopener noreferrer"
2317
+ }, /*#__PURE__*/React.createElement(HyperLinkIcon, null));
2318
+ };
2319
+ HyperLink.propTypes = {
2320
+ hyperLink: PropTypes.string
2321
+ };
2322
+
2323
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2324
+
2325
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2326
+ var Lightbox = /*#__PURE__*/lazy(function () {
2327
+ return import('react-image-lightbox');
2328
+ });
2329
+ var FullScreenImages = function FullScreenImages(_ref) {
2330
+ var _ref$imageSlug = _ref.imageSlug,
2331
+ imageSlug = _ref$imageSlug === void 0 ? "" : _ref$imageSlug,
2332
+ template = _ref.template,
2333
+ _ref$element = _ref.element,
2334
+ element = _ref$element === void 0 ? {} : _ref$element,
2335
+ props = _ref.props;
2336
+ var cdnImage = useSelector(function (state) {
2337
+ return get_1(state, ["qt", "config", "cdn-image"]);
2338
+ });
2339
+
2340
+ var _useState = useState(0),
2341
+ _useState2 = _slicedToArray(_useState, 2),
2342
+ photoIndex = _useState2[0],
2343
+ handleImage = _useState2[1];
2344
+
2345
+ var _useState3 = useState(false),
2346
+ _useState4 = _slicedToArray(_useState3, 2),
2347
+ isOpen = _useState4[0],
2348
+ handleOpen = _useState4[1];
2349
+
2350
+ var deviceWidth = get_1(global, ["innerWidth"], 0);
2351
+ var hyperlinks = get_1(element, ["story-elements"], []).map(function (image) {
2352
+ return image.hyperlink;
2353
+ });
2354
+ var imageUrlList = [];
2355
+
2356
+ if (!imageSlug) {
2357
+ imageUrlList = get_1(element, ["story-elements"], []).map(function (image) {
2358
+ return "//".concat(cdnImage, "/").concat(image["image-s3-key"], "?w=").concat(deviceWidth);
2359
+ });
2360
+ }
2361
+
2362
+ var onClickHandler = function onClickHandler(index) {
2363
+ handleOpen(true);
2364
+ handleImage(index);
2365
+ };
2366
+
2367
+ var onClickKey = imageSlug ? "onClick" : "onClickHandler";
2368
+ var imageUrlListLength = imageUrlList.length;
2369
+
2370
+ var onMoveNext = function onMoveNext(imageUrlListLength) {
2371
+ var next = (photoIndex + 1) % imageUrlListLength;
2372
+ handleImage(next);
2373
+ };
2374
+
2375
+ var onMovePrev = function onMovePrev(imageUrlListLength) {
2376
+ var prev = (photoIndex + imageUrlListLength - 1) % imageUrlListLength;
2377
+ handleImage(prev);
2378
+ };
2379
+
2380
+ var onClose = function onClose() {
2381
+ handleImage(0);
2382
+ handleOpen(false);
2383
+ };
2384
+
2385
+ var getHyperLink = function getHyperLink() {
2386
+ if (element.hyperlink || hyperlinks[photoIndex]) {
2387
+ return /*#__PURE__*/React.createElement(HyperLink, {
2388
+ hyperLink: element.hyperlink || hyperlinks[photoIndex]
2389
+ });
2390
+ }
2391
+
2392
+ return null;
2393
+ };
2394
+
2395
+ var lightboxProps = imageSlug ? {
2396
+ mainSrc: "//".concat(cdnImage, "/").concat(imageSlug, "?w=").concat(deviceWidth),
2397
+ toolbarButtons: [getHyperLink()]
2398
+ } : {
2399
+ mainSrc: imageUrlList[photoIndex],
2400
+ nextSrc: imageUrlList[(photoIndex + 1) % imageUrlListLength],
2401
+ prevSrc: imageUrlList[(photoIndex + imageUrlListLength - 1) % imageUrlListLength],
2402
+ onMoveNextRequest: function onMoveNextRequest() {
2403
+ return onMoveNext(imageUrlListLength);
2404
+ },
2405
+ onMovePrevRequest: function onMovePrevRequest() {
2406
+ return onMovePrev(imageUrlListLength);
2407
+ },
2408
+ toolbarButtons: [getHyperLink()]
2409
+ };
2410
+
2411
+ var LoadingScreen = function LoadingScreen() {
2412
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Loading, null));
2413
+ };
2414
+
2415
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(template, _objectSpread(_defineProperty({}, onClickKey, onClickHandler), props)), isOpen ? /*#__PURE__*/React.createElement(Suspense, {
2416
+ fallback: /*#__PURE__*/React.createElement(LoadingScreen, null)
2417
+ }, /*#__PURE__*/React.createElement(Lightbox, _extends({
2418
+ wrapperClassName: "arr--image-lightbox",
2419
+ onCloseRequest: onClose
2420
+ }, lightboxProps))) : null);
2421
+ };
2422
+ FullScreenImages.propTypes = {
2423
+ imageSlug: PropTypes.string,
2424
+ template: PropTypes.func,
2425
+ element: PropTypes.shape({
2426
+ "story-elements": PropTypes.array
2427
+ }),
2428
+ props: PropTypes.object
2429
+ };
2430
+
2431
+ var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
2432
+ var useStateValue = function useStateValue() {
2433
+ return useContext(StateContext);
2434
+ };
2435
+
2436
+ var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
2437
+
2438
+ Object.defineProperty(exports, "__esModule", {
2439
+ value: true
2440
+ });
2441
+ exports["default"] = void 0;
2442
+ var optionsDefaults = {
2443
+ attributeNames: {
2444
+ styleName: 'className'
2445
+ },
2446
+ generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
2447
+ handleMissingStyleName: 'throw'
2448
+ };
2449
+ var _default = optionsDefaults;
2450
+ exports["default"] = _default;
2451
+
2452
+
2453
+ });
2454
+
2455
+ var getClassName = createCommonjsModule(function (module, exports) {
2456
+
2457
+ Object.defineProperty(exports, "__esModule", {
2458
+ value: true
2459
+ });
2460
+ exports["default"] = void 0;
2461
+
2462
+ var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
2463
+
2464
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
2465
+
2466
+ var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
2467
+ return styleName.indexOf('.') !== -1;
2468
+ };
2469
+
2470
+ var handleError = function handleError(message, handleMissingStyleName) {
2471
+ if (handleMissingStyleName === 'throw') {
2472
+ throw new Error(message);
2473
+ } else if (handleMissingStyleName === 'warn') {
2474
+ // eslint-disable-next-line no-console
2475
+ console.warn(message);
2476
+ }
2477
+
2478
+ return null;
2479
+ };
2480
+
2481
+ var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
2482
+ // Note:
2483
+ // Do not use the desctructing syntax with Babel.
2484
+ // Desctructing adds _slicedToArray helper.
2485
+ var styleNameParts = styleName.split('.');
2486
+ var importName = styleNameParts[0];
2487
+ var moduleName = styleNameParts[1];
2488
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
2489
+
2490
+ if (!moduleName) {
2491
+ return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
2492
+ }
2493
+
2494
+ if (!styleModuleImportMap[importName]) {
2495
+ return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
2496
+ }
2497
+
2498
+ if (!styleModuleImportMap[importName][moduleName]) {
2499
+ return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
2500
+ }
2501
+
2502
+ return styleModuleImportMap[importName][moduleName];
2503
+ };
2504
+
2505
+ var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
2506
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
2507
+ var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
2508
+ return styleModuleImportMap[importKey][styleName] && importKey;
2509
+ }).filter(function (importKey) {
2510
+ return importKey;
2511
+ });
2512
+
2513
+ if (importKeysWithMatches.length > 1) {
2514
+ 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');
2515
+ }
2516
+
2517
+ if (importKeysWithMatches.length === 0) {
2518
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
2519
+ }
2520
+
2521
+ return styleModuleImportMap[importKeysWithMatches[0]][styleName];
2522
+ };
2523
+
2524
+ var _default = function _default(styleNameValue, styleModuleImportMap, options) {
2525
+ var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
2526
+
2527
+ var _ref = options || {},
2528
+ _ref$handleMissingSty = _ref.handleMissingStyleName,
2529
+ handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
2530
+ _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
2531
+ autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
2532
+
2533
+ if (!styleNameValue) {
2534
+ return '';
2535
+ }
2536
+
2537
+ return styleNameValue.split(' ').filter(function (styleName) {
2538
+ return styleName;
2539
+ }).map(function (styleName) {
2540
+ if (isNamespacedStyleName(styleName)) {
2541
+ return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
2542
+ }
2543
+
2544
+ if (styleModuleImportMapKeys.length === 0) {
2545
+ throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
2546
+ }
2547
+
2548
+ if (styleModuleImportMapKeys.length > 1) {
2549
+ if (!autoResolveMultipleImports) {
2550
+ throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
2551
+ }
2552
+
2553
+ return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
2554
+ }
2555
+
2556
+ var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
2557
+
2558
+ if (!styleModuleMap[styleName]) {
2559
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
2560
+ }
2561
+
2562
+ return styleModuleMap[styleName];
2563
+ }).filter(function (className) {
2564
+ // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
2565
+ return className;
2566
+ }).join(' ');
2567
+ };
2568
+
2569
+ exports["default"] = _default;
2570
+
2571
+
2572
+ });
2573
+
2574
+ var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
2575
+
2576
+ var _styleModuleImportMap = {
2577
+ "./caption-attribution.m.css": {
2578
+ "viewports": "\"../../../../assets/stylesheets/viewports.m.css\"",
2579
+ "mobile": "768px",
2580
+ "caption": "caption-attribution-m_caption__BM5NN",
2581
+ "wrapper": "caption-attribution-m_wrapper__oHBX7",
2582
+ "dark": "caption-attribution-m_dark__uER8u",
2583
+ "attribution": "caption-attribution-m_attribution__279W9",
2584
+ "light": "caption-attribution-m_light__19OWp"
2585
+ }
2586
+ };
2587
+ var CaptionAttribution = function CaptionAttribution(_ref) {
2588
+ var story = _ref.story,
2589
+ element = _ref.element;
2590
+ _ref.config;
2591
+ if (!(story || element)) return null;
2592
+ var configData = useStateValue() || {};
2593
+ var textColor = getTextColor(configData.theme);
2594
+
2595
+ var _ref2 = story || {},
2596
+ _ref2$heroImageCapt = _ref2["hero-image-caption"],
2597
+ heroImageCaption = _ref2$heroImageCapt === void 0 ? "" : _ref2$heroImageCapt,
2598
+ _ref2$heroImageAttr = _ref2["hero-image-attribution"],
2599
+ heroImageAttribution = _ref2$heroImageAttr === void 0 ? "" : _ref2$heroImageAttr;
2600
+
2601
+ var _ref3 = element || {},
2602
+ _ref3$title = _ref3.title,
2603
+ title = _ref3$title === void 0 ? "" : _ref3$title,
2604
+ _ref3$imageAttributi = _ref3["image-attribution"],
2605
+ imageAttribution = _ref3$imageAttributi === void 0 ? "" : _ref3$imageAttributi;
2606
+
2607
+ var caption = heroImageCaption || title;
2608
+ var attribution = heroImageAttribution || imageAttribution;
2609
+ var updateStyle = caption ? "wrapper" : "";
2610
+ return /*#__PURE__*/React.createElement("div", {
2611
+ "data-test-id": "caption",
2612
+ className: "arr--caption-attribution " + _getClassName("caption ".concat(textColor), _styleModuleImportMap)
2613
+ }, /*#__PURE__*/React.createElement("span", {
2614
+ dangerouslySetInnerHTML: {
2615
+ __html: caption
2616
+ }
2617
+ }), attribution && /*#__PURE__*/React.createElement("span", {
2618
+ "data-test-id": "attribution",
2619
+ dangerouslySetInnerHTML: {
2620
+ __html: attribution
2621
+ },
2622
+ className: _getClassName("attribution ".concat(textColor, " ").concat(updateStyle), _styleModuleImportMap)
2623
+ }));
2624
+ };
2625
+ CaptionAttribution.propTypes = {
2626
+ config: PropTypes.shape({
2627
+ theme: PropTypes.string
2628
+ }),
2629
+ story: shapeStory,
2630
+ element: PropTypes.shape({
2631
+ "image-attribution": PropTypes.string,
2632
+ title: PropTypes.string
2633
+ })
2634
+ };
2635
+
2636
+ var _excluded = ["element", "opts", "story", "config", "caption"];
2637
+
2638
+ var ImageBase = function ImageBase(_ref) {
2639
+ var element = _ref.element,
2640
+ _ref$opts = _ref.opts,
2641
+ opts = _ref$opts === void 0 ? {} : _ref$opts,
2642
+ _ref$story = _ref.story,
2643
+ story = _ref$story === void 0 ? {} : _ref$story;
2644
+ _ref.config;
2645
+ var _ref$caption = _ref.caption,
2646
+ caption = _ref$caption === void 0 ? true : _ref$caption,
2647
+ restProps = _objectWithoutProperties(_ref, _excluded);
2648
+
2649
+ if (!element) return null;
2650
+ var configData = useStateValue() || {};
2651
+
2652
+ var ImageTemplate = function ImageTemplate(_ref2) {
2653
+ var _onClick = _ref2.onClick;
2654
+ return /*#__PURE__*/React.createElement("div", {
2655
+ className: "image-m_image-template__3s9OA"
2656
+ }, /*#__PURE__*/React.createElement("figure", {
2657
+ className: "image-m_element__KVuzX",
2658
+ onClick: function onClick() {
2659
+ return _onClick();
2660
+ }
2661
+ }, /*#__PURE__*/React.createElement(ResponsiveImage, {
2662
+ slug: element["image-s3-key"],
2663
+ metadata: element["image-metadata"],
2664
+ alt: element["title"],
2665
+ aspectRatio: null,
2666
+ defaultWidth: 640,
2667
+ widths: opts.imageWidths || [360, 640, 1200],
2668
+ imgParams: {
2669
+ auto: ["format", "compress"]
2670
+ }
2671
+ })), element["hyperlink"] && /*#__PURE__*/React.createElement(HyperLink, {
2672
+ hyperLink: element["hyperlink"]
2673
+ }));
2674
+ };
2675
+
2676
+ ImageTemplate.propTypes = {
2677
+ onClick: PropTypes.func
2678
+ };
2679
+ return /*#__PURE__*/React.createElement("div", _extends({
2680
+ className: "arrow-component arr--image-element"
2681
+ }, restProps, {
2682
+ "data-test-id": "image-element"
2683
+ }), /*#__PURE__*/React.createElement(FullScreenImages, {
2684
+ template: ImageTemplate,
2685
+ element: element,
2686
+ imageSlug: element["image-s3-key"],
2687
+ story: story
2688
+ }), caption && /*#__PURE__*/React.createElement(CaptionAttribution, {
2689
+ element: element,
2690
+ config: configData
2691
+ }));
2692
+ };
2693
+
2694
+ ImageBase.propTypes = {
2695
+ element: PropTypes.shape({
2696
+ "image-s3-key": PropTypes.string,
2697
+ "image-metadata": PropTypes.object,
2698
+ "image-attribution": PropTypes.string,
2699
+ title: PropTypes.string,
2700
+ hyperlink: PropTypes.string
2701
+ }),
2702
+ caption: PropTypes.bool,
2703
+ opts: PropTypes.shape({
2704
+ imageWidths: PropTypes.array
2705
+ }),
2706
+ story: shapeStory,
2707
+ config: shapeConfig
2708
+ };
2709
+ var Image = withElementWrapper(ImageBase);
2710
+
2711
+ export { Image };