@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,3715 @@
1
+ import React, { useState, useEffect, createContext } from 'react';
2
+ import { LinkBase, Link, ResponsiveImage, SocialShare } from '@quintype/components';
3
+ import PropTypes from 'prop-types';
4
+ import 'react-timeago';
5
+ import 'date-fns-tz';
6
+ import { useSelector } from 'react-redux';
7
+
8
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
+
10
+ function getDefaultExportFromCjs (x) {
11
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
12
+ }
13
+
14
+ function createCommonjsModule(fn) {
15
+ var module = { exports: {} };
16
+ return fn(module, module.exports), module.exports;
17
+ }
18
+
19
+ /**
20
+ * Copyright (c) 2014-present, Facebook, Inc.
21
+ *
22
+ * This source code is licensed under the MIT license found in the
23
+ * LICENSE file in the root directory of this source tree.
24
+ */
25
+
26
+ createCommonjsModule(function (module) {
27
+ var runtime = (function (exports) {
28
+
29
+ var Op = Object.prototype;
30
+ var hasOwn = Op.hasOwnProperty;
31
+ var undefined$1; // More compressible than void 0.
32
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
33
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
34
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
35
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
36
+
37
+ function define(obj, key, value) {
38
+ Object.defineProperty(obj, key, {
39
+ value: value,
40
+ enumerable: true,
41
+ configurable: true,
42
+ writable: true
43
+ });
44
+ return obj[key];
45
+ }
46
+ try {
47
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
48
+ define({}, "");
49
+ } catch (err) {
50
+ define = function(obj, key, value) {
51
+ return obj[key] = value;
52
+ };
53
+ }
54
+
55
+ function wrap(innerFn, outerFn, self, tryLocsList) {
56
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
57
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
58
+ var generator = Object.create(protoGenerator.prototype);
59
+ var context = new Context(tryLocsList || []);
60
+
61
+ // The ._invoke method unifies the implementations of the .next,
62
+ // .throw, and .return methods.
63
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
64
+
65
+ return generator;
66
+ }
67
+ exports.wrap = wrap;
68
+
69
+ // Try/catch helper to minimize deoptimizations. Returns a completion
70
+ // record like context.tryEntries[i].completion. This interface could
71
+ // have been (and was previously) designed to take a closure to be
72
+ // invoked without arguments, but in all the cases we care about we
73
+ // already have an existing method we want to call, so there's no need
74
+ // to create a new function object. We can even get away with assuming
75
+ // the method takes exactly one argument, since that happens to be true
76
+ // in every case, so we don't have to touch the arguments object. The
77
+ // only additional allocation required is the completion record, which
78
+ // has a stable shape and so hopefully should be cheap to allocate.
79
+ function tryCatch(fn, obj, arg) {
80
+ try {
81
+ return { type: "normal", arg: fn.call(obj, arg) };
82
+ } catch (err) {
83
+ return { type: "throw", arg: err };
84
+ }
85
+ }
86
+
87
+ var GenStateSuspendedStart = "suspendedStart";
88
+ var GenStateSuspendedYield = "suspendedYield";
89
+ var GenStateExecuting = "executing";
90
+ var GenStateCompleted = "completed";
91
+
92
+ // Returning this object from the innerFn has the same effect as
93
+ // breaking out of the dispatch switch statement.
94
+ var ContinueSentinel = {};
95
+
96
+ // Dummy constructor functions that we use as the .constructor and
97
+ // .constructor.prototype properties for functions that return Generator
98
+ // objects. For full spec compliance, you may wish to configure your
99
+ // minifier not to mangle the names of these two functions.
100
+ function Generator() {}
101
+ function GeneratorFunction() {}
102
+ function GeneratorFunctionPrototype() {}
103
+
104
+ // This is a polyfill for %IteratorPrototype% for environments that
105
+ // don't natively support it.
106
+ var IteratorPrototype = {};
107
+ define(IteratorPrototype, iteratorSymbol, function () {
108
+ return this;
109
+ });
110
+
111
+ var getProto = Object.getPrototypeOf;
112
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
113
+ if (NativeIteratorPrototype &&
114
+ NativeIteratorPrototype !== Op &&
115
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
116
+ // This environment has a native %IteratorPrototype%; use it instead
117
+ // of the polyfill.
118
+ IteratorPrototype = NativeIteratorPrototype;
119
+ }
120
+
121
+ var Gp = GeneratorFunctionPrototype.prototype =
122
+ Generator.prototype = Object.create(IteratorPrototype);
123
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
124
+ define(Gp, "constructor", GeneratorFunctionPrototype);
125
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
126
+ GeneratorFunction.displayName = define(
127
+ GeneratorFunctionPrototype,
128
+ toStringTagSymbol,
129
+ "GeneratorFunction"
130
+ );
131
+
132
+ // Helper for defining the .next, .throw, and .return methods of the
133
+ // Iterator interface in terms of a single ._invoke method.
134
+ function defineIteratorMethods(prototype) {
135
+ ["next", "throw", "return"].forEach(function(method) {
136
+ define(prototype, method, function(arg) {
137
+ return this._invoke(method, arg);
138
+ });
139
+ });
140
+ }
141
+
142
+ exports.isGeneratorFunction = function(genFun) {
143
+ var ctor = typeof genFun === "function" && genFun.constructor;
144
+ return ctor
145
+ ? ctor === GeneratorFunction ||
146
+ // For the native GeneratorFunction constructor, the best we can
147
+ // do is to check its .name property.
148
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
149
+ : false;
150
+ };
151
+
152
+ exports.mark = function(genFun) {
153
+ if (Object.setPrototypeOf) {
154
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
155
+ } else {
156
+ genFun.__proto__ = GeneratorFunctionPrototype;
157
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
158
+ }
159
+ genFun.prototype = Object.create(Gp);
160
+ return genFun;
161
+ };
162
+
163
+ // Within the body of any async function, `await x` is transformed to
164
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
165
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
166
+ // meant to be awaited.
167
+ exports.awrap = function(arg) {
168
+ return { __await: arg };
169
+ };
170
+
171
+ function AsyncIterator(generator, PromiseImpl) {
172
+ function invoke(method, arg, resolve, reject) {
173
+ var record = tryCatch(generator[method], generator, arg);
174
+ if (record.type === "throw") {
175
+ reject(record.arg);
176
+ } else {
177
+ var result = record.arg;
178
+ var value = result.value;
179
+ if (value &&
180
+ typeof value === "object" &&
181
+ hasOwn.call(value, "__await")) {
182
+ return PromiseImpl.resolve(value.__await).then(function(value) {
183
+ invoke("next", value, resolve, reject);
184
+ }, function(err) {
185
+ invoke("throw", err, resolve, reject);
186
+ });
187
+ }
188
+
189
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
190
+ // When a yielded Promise is resolved, its final value becomes
191
+ // the .value of the Promise<{value,done}> result for the
192
+ // current iteration.
193
+ result.value = unwrapped;
194
+ resolve(result);
195
+ }, function(error) {
196
+ // If a rejected Promise was yielded, throw the rejection back
197
+ // into the async generator function so it can be handled there.
198
+ return invoke("throw", error, resolve, reject);
199
+ });
200
+ }
201
+ }
202
+
203
+ var previousPromise;
204
+
205
+ function enqueue(method, arg) {
206
+ function callInvokeWithMethodAndArg() {
207
+ return new PromiseImpl(function(resolve, reject) {
208
+ invoke(method, arg, resolve, reject);
209
+ });
210
+ }
211
+
212
+ return previousPromise =
213
+ // If enqueue has been called before, then we want to wait until
214
+ // all previous Promises have been resolved before calling invoke,
215
+ // so that results are always delivered in the correct order. If
216
+ // enqueue has not been called before, then it is important to
217
+ // call invoke immediately, without waiting on a callback to fire,
218
+ // so that the async generator function has the opportunity to do
219
+ // any necessary setup in a predictable way. This predictability
220
+ // is why the Promise constructor synchronously invokes its
221
+ // executor callback, and why async functions synchronously
222
+ // execute code before the first await. Since we implement simple
223
+ // async functions in terms of async generators, it is especially
224
+ // important to get this right, even though it requires care.
225
+ previousPromise ? previousPromise.then(
226
+ callInvokeWithMethodAndArg,
227
+ // Avoid propagating failures to Promises returned by later
228
+ // invocations of the iterator.
229
+ callInvokeWithMethodAndArg
230
+ ) : callInvokeWithMethodAndArg();
231
+ }
232
+
233
+ // Define the unified helper method that is used to implement .next,
234
+ // .throw, and .return (see defineIteratorMethods).
235
+ this._invoke = enqueue;
236
+ }
237
+
238
+ defineIteratorMethods(AsyncIterator.prototype);
239
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
240
+ return this;
241
+ });
242
+ exports.AsyncIterator = AsyncIterator;
243
+
244
+ // Note that simple async functions are implemented on top of
245
+ // AsyncIterator objects; they just return a Promise for the value of
246
+ // the final result produced by the iterator.
247
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
248
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
249
+
250
+ var iter = new AsyncIterator(
251
+ wrap(innerFn, outerFn, self, tryLocsList),
252
+ PromiseImpl
253
+ );
254
+
255
+ return exports.isGeneratorFunction(outerFn)
256
+ ? iter // If outerFn is a generator, return the full iterator.
257
+ : iter.next().then(function(result) {
258
+ return result.done ? result.value : iter.next();
259
+ });
260
+ };
261
+
262
+ function makeInvokeMethod(innerFn, self, context) {
263
+ var state = GenStateSuspendedStart;
264
+
265
+ return function invoke(method, arg) {
266
+ if (state === GenStateExecuting) {
267
+ throw new Error("Generator is already running");
268
+ }
269
+
270
+ if (state === GenStateCompleted) {
271
+ if (method === "throw") {
272
+ throw arg;
273
+ }
274
+
275
+ // Be forgiving, per 25.3.3.3.3 of the spec:
276
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
277
+ return doneResult();
278
+ }
279
+
280
+ context.method = method;
281
+ context.arg = arg;
282
+
283
+ while (true) {
284
+ var delegate = context.delegate;
285
+ if (delegate) {
286
+ var delegateResult = maybeInvokeDelegate(delegate, context);
287
+ if (delegateResult) {
288
+ if (delegateResult === ContinueSentinel) continue;
289
+ return delegateResult;
290
+ }
291
+ }
292
+
293
+ if (context.method === "next") {
294
+ // Setting context._sent for legacy support of Babel's
295
+ // function.sent implementation.
296
+ context.sent = context._sent = context.arg;
297
+
298
+ } else if (context.method === "throw") {
299
+ if (state === GenStateSuspendedStart) {
300
+ state = GenStateCompleted;
301
+ throw context.arg;
302
+ }
303
+
304
+ context.dispatchException(context.arg);
305
+
306
+ } else if (context.method === "return") {
307
+ context.abrupt("return", context.arg);
308
+ }
309
+
310
+ state = GenStateExecuting;
311
+
312
+ var record = tryCatch(innerFn, self, context);
313
+ if (record.type === "normal") {
314
+ // If an exception is thrown from innerFn, we leave state ===
315
+ // GenStateExecuting and loop back for another invocation.
316
+ state = context.done
317
+ ? GenStateCompleted
318
+ : GenStateSuspendedYield;
319
+
320
+ if (record.arg === ContinueSentinel) {
321
+ continue;
322
+ }
323
+
324
+ return {
325
+ value: record.arg,
326
+ done: context.done
327
+ };
328
+
329
+ } else if (record.type === "throw") {
330
+ state = GenStateCompleted;
331
+ // Dispatch the exception by looping back around to the
332
+ // context.dispatchException(context.arg) call above.
333
+ context.method = "throw";
334
+ context.arg = record.arg;
335
+ }
336
+ }
337
+ };
338
+ }
339
+
340
+ // Call delegate.iterator[context.method](context.arg) and handle the
341
+ // result, either by returning a { value, done } result from the
342
+ // delegate iterator, or by modifying context.method and context.arg,
343
+ // setting context.delegate to null, and returning the ContinueSentinel.
344
+ function maybeInvokeDelegate(delegate, context) {
345
+ var method = delegate.iterator[context.method];
346
+ if (method === undefined$1) {
347
+ // A .throw or .return when the delegate iterator has no .throw
348
+ // method always terminates the yield* loop.
349
+ context.delegate = null;
350
+
351
+ if (context.method === "throw") {
352
+ // Note: ["return"] must be used for ES3 parsing compatibility.
353
+ if (delegate.iterator["return"]) {
354
+ // If the delegate iterator has a return method, give it a
355
+ // chance to clean up.
356
+ context.method = "return";
357
+ context.arg = undefined$1;
358
+ maybeInvokeDelegate(delegate, context);
359
+
360
+ if (context.method === "throw") {
361
+ // If maybeInvokeDelegate(context) changed context.method from
362
+ // "return" to "throw", let that override the TypeError below.
363
+ return ContinueSentinel;
364
+ }
365
+ }
366
+
367
+ context.method = "throw";
368
+ context.arg = new TypeError(
369
+ "The iterator does not provide a 'throw' method");
370
+ }
371
+
372
+ return ContinueSentinel;
373
+ }
374
+
375
+ var record = tryCatch(method, delegate.iterator, context.arg);
376
+
377
+ if (record.type === "throw") {
378
+ context.method = "throw";
379
+ context.arg = record.arg;
380
+ context.delegate = null;
381
+ return ContinueSentinel;
382
+ }
383
+
384
+ var info = record.arg;
385
+
386
+ if (! info) {
387
+ context.method = "throw";
388
+ context.arg = new TypeError("iterator result is not an object");
389
+ context.delegate = null;
390
+ return ContinueSentinel;
391
+ }
392
+
393
+ if (info.done) {
394
+ // Assign the result of the finished delegate to the temporary
395
+ // variable specified by delegate.resultName (see delegateYield).
396
+ context[delegate.resultName] = info.value;
397
+
398
+ // Resume execution at the desired location (see delegateYield).
399
+ context.next = delegate.nextLoc;
400
+
401
+ // If context.method was "throw" but the delegate handled the
402
+ // exception, let the outer generator proceed normally. If
403
+ // context.method was "next", forget context.arg since it has been
404
+ // "consumed" by the delegate iterator. If context.method was
405
+ // "return", allow the original .return call to continue in the
406
+ // outer generator.
407
+ if (context.method !== "return") {
408
+ context.method = "next";
409
+ context.arg = undefined$1;
410
+ }
411
+
412
+ } else {
413
+ // Re-yield the result returned by the delegate method.
414
+ return info;
415
+ }
416
+
417
+ // The delegate iterator is finished, so forget it and continue with
418
+ // the outer generator.
419
+ context.delegate = null;
420
+ return ContinueSentinel;
421
+ }
422
+
423
+ // Define Generator.prototype.{next,throw,return} in terms of the
424
+ // unified ._invoke helper method.
425
+ defineIteratorMethods(Gp);
426
+
427
+ define(Gp, toStringTagSymbol, "Generator");
428
+
429
+ // A Generator should always return itself as the iterator object when the
430
+ // @@iterator function is called on it. Some browsers' implementations of the
431
+ // iterator prototype chain incorrectly implement this, causing the Generator
432
+ // object to not be returned from this call. This ensures that doesn't happen.
433
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
434
+ define(Gp, iteratorSymbol, function() {
435
+ return this;
436
+ });
437
+
438
+ define(Gp, "toString", function() {
439
+ return "[object Generator]";
440
+ });
441
+
442
+ function pushTryEntry(locs) {
443
+ var entry = { tryLoc: locs[0] };
444
+
445
+ if (1 in locs) {
446
+ entry.catchLoc = locs[1];
447
+ }
448
+
449
+ if (2 in locs) {
450
+ entry.finallyLoc = locs[2];
451
+ entry.afterLoc = locs[3];
452
+ }
453
+
454
+ this.tryEntries.push(entry);
455
+ }
456
+
457
+ function resetTryEntry(entry) {
458
+ var record = entry.completion || {};
459
+ record.type = "normal";
460
+ delete record.arg;
461
+ entry.completion = record;
462
+ }
463
+
464
+ function Context(tryLocsList) {
465
+ // The root entry object (effectively a try statement without a catch
466
+ // or a finally block) gives us a place to store values thrown from
467
+ // locations where there is no enclosing try statement.
468
+ this.tryEntries = [{ tryLoc: "root" }];
469
+ tryLocsList.forEach(pushTryEntry, this);
470
+ this.reset(true);
471
+ }
472
+
473
+ exports.keys = function(object) {
474
+ var keys = [];
475
+ for (var key in object) {
476
+ keys.push(key);
477
+ }
478
+ keys.reverse();
479
+
480
+ // Rather than returning an object with a next method, we keep
481
+ // things simple and return the next function itself.
482
+ return function next() {
483
+ while (keys.length) {
484
+ var key = keys.pop();
485
+ if (key in object) {
486
+ next.value = key;
487
+ next.done = false;
488
+ return next;
489
+ }
490
+ }
491
+
492
+ // To avoid creating an additional object, we just hang the .value
493
+ // and .done properties off the next function object itself. This
494
+ // also ensures that the minifier will not anonymize the function.
495
+ next.done = true;
496
+ return next;
497
+ };
498
+ };
499
+
500
+ function values(iterable) {
501
+ if (iterable) {
502
+ var iteratorMethod = iterable[iteratorSymbol];
503
+ if (iteratorMethod) {
504
+ return iteratorMethod.call(iterable);
505
+ }
506
+
507
+ if (typeof iterable.next === "function") {
508
+ return iterable;
509
+ }
510
+
511
+ if (!isNaN(iterable.length)) {
512
+ var i = -1, next = function next() {
513
+ while (++i < iterable.length) {
514
+ if (hasOwn.call(iterable, i)) {
515
+ next.value = iterable[i];
516
+ next.done = false;
517
+ return next;
518
+ }
519
+ }
520
+
521
+ next.value = undefined$1;
522
+ next.done = true;
523
+
524
+ return next;
525
+ };
526
+
527
+ return next.next = next;
528
+ }
529
+ }
530
+
531
+ // Return an iterator with no values.
532
+ return { next: doneResult };
533
+ }
534
+ exports.values = values;
535
+
536
+ function doneResult() {
537
+ return { value: undefined$1, done: true };
538
+ }
539
+
540
+ Context.prototype = {
541
+ constructor: Context,
542
+
543
+ reset: function(skipTempReset) {
544
+ this.prev = 0;
545
+ this.next = 0;
546
+ // Resetting context._sent for legacy support of Babel's
547
+ // function.sent implementation.
548
+ this.sent = this._sent = undefined$1;
549
+ this.done = false;
550
+ this.delegate = null;
551
+
552
+ this.method = "next";
553
+ this.arg = undefined$1;
554
+
555
+ this.tryEntries.forEach(resetTryEntry);
556
+
557
+ if (!skipTempReset) {
558
+ for (var name in this) {
559
+ // Not sure about the optimal order of these conditions:
560
+ if (name.charAt(0) === "t" &&
561
+ hasOwn.call(this, name) &&
562
+ !isNaN(+name.slice(1))) {
563
+ this[name] = undefined$1;
564
+ }
565
+ }
566
+ }
567
+ },
568
+
569
+ stop: function() {
570
+ this.done = true;
571
+
572
+ var rootEntry = this.tryEntries[0];
573
+ var rootRecord = rootEntry.completion;
574
+ if (rootRecord.type === "throw") {
575
+ throw rootRecord.arg;
576
+ }
577
+
578
+ return this.rval;
579
+ },
580
+
581
+ dispatchException: function(exception) {
582
+ if (this.done) {
583
+ throw exception;
584
+ }
585
+
586
+ var context = this;
587
+ function handle(loc, caught) {
588
+ record.type = "throw";
589
+ record.arg = exception;
590
+ context.next = loc;
591
+
592
+ if (caught) {
593
+ // If the dispatched exception was caught by a catch block,
594
+ // then let that catch block handle the exception normally.
595
+ context.method = "next";
596
+ context.arg = undefined$1;
597
+ }
598
+
599
+ return !! caught;
600
+ }
601
+
602
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
603
+ var entry = this.tryEntries[i];
604
+ var record = entry.completion;
605
+
606
+ if (entry.tryLoc === "root") {
607
+ // Exception thrown outside of any try block that could handle
608
+ // it, so set the completion value of the entire function to
609
+ // throw the exception.
610
+ return handle("end");
611
+ }
612
+
613
+ if (entry.tryLoc <= this.prev) {
614
+ var hasCatch = hasOwn.call(entry, "catchLoc");
615
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
616
+
617
+ if (hasCatch && hasFinally) {
618
+ if (this.prev < entry.catchLoc) {
619
+ return handle(entry.catchLoc, true);
620
+ } else if (this.prev < entry.finallyLoc) {
621
+ return handle(entry.finallyLoc);
622
+ }
623
+
624
+ } else if (hasCatch) {
625
+ if (this.prev < entry.catchLoc) {
626
+ return handle(entry.catchLoc, true);
627
+ }
628
+
629
+ } else if (hasFinally) {
630
+ if (this.prev < entry.finallyLoc) {
631
+ return handle(entry.finallyLoc);
632
+ }
633
+
634
+ } else {
635
+ throw new Error("try statement without catch or finally");
636
+ }
637
+ }
638
+ }
639
+ },
640
+
641
+ abrupt: function(type, arg) {
642
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
643
+ var entry = this.tryEntries[i];
644
+ if (entry.tryLoc <= this.prev &&
645
+ hasOwn.call(entry, "finallyLoc") &&
646
+ this.prev < entry.finallyLoc) {
647
+ var finallyEntry = entry;
648
+ break;
649
+ }
650
+ }
651
+
652
+ if (finallyEntry &&
653
+ (type === "break" ||
654
+ type === "continue") &&
655
+ finallyEntry.tryLoc <= arg &&
656
+ arg <= finallyEntry.finallyLoc) {
657
+ // Ignore the finally entry if control is not jumping to a
658
+ // location outside the try/catch block.
659
+ finallyEntry = null;
660
+ }
661
+
662
+ var record = finallyEntry ? finallyEntry.completion : {};
663
+ record.type = type;
664
+ record.arg = arg;
665
+
666
+ if (finallyEntry) {
667
+ this.method = "next";
668
+ this.next = finallyEntry.finallyLoc;
669
+ return ContinueSentinel;
670
+ }
671
+
672
+ return this.complete(record);
673
+ },
674
+
675
+ complete: function(record, afterLoc) {
676
+ if (record.type === "throw") {
677
+ throw record.arg;
678
+ }
679
+
680
+ if (record.type === "break" ||
681
+ record.type === "continue") {
682
+ this.next = record.arg;
683
+ } else if (record.type === "return") {
684
+ this.rval = this.arg = record.arg;
685
+ this.method = "return";
686
+ this.next = "end";
687
+ } else if (record.type === "normal" && afterLoc) {
688
+ this.next = afterLoc;
689
+ }
690
+
691
+ return ContinueSentinel;
692
+ },
693
+
694
+ finish: function(finallyLoc) {
695
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
696
+ var entry = this.tryEntries[i];
697
+ if (entry.finallyLoc === finallyLoc) {
698
+ this.complete(entry.completion, entry.afterLoc);
699
+ resetTryEntry(entry);
700
+ return ContinueSentinel;
701
+ }
702
+ }
703
+ },
704
+
705
+ "catch": function(tryLoc) {
706
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
707
+ var entry = this.tryEntries[i];
708
+ if (entry.tryLoc === tryLoc) {
709
+ var record = entry.completion;
710
+ if (record.type === "throw") {
711
+ var thrown = record.arg;
712
+ resetTryEntry(entry);
713
+ }
714
+ return thrown;
715
+ }
716
+ }
717
+
718
+ // The context.catch method must only be called with a location
719
+ // argument that corresponds to a known catch block.
720
+ throw new Error("illegal catch attempt");
721
+ },
722
+
723
+ delegateYield: function(iterable, resultName, nextLoc) {
724
+ this.delegate = {
725
+ iterator: values(iterable),
726
+ resultName: resultName,
727
+ nextLoc: nextLoc
728
+ };
729
+
730
+ if (this.method === "next") {
731
+ // Deliberately forget the last sent value so that we don't
732
+ // accidentally pass it on to the delegate.
733
+ this.arg = undefined$1;
734
+ }
735
+
736
+ return ContinueSentinel;
737
+ }
738
+ };
739
+
740
+ // Regardless of whether this script is executing as a CommonJS module
741
+ // or not, return the runtime object so that we can declare the variable
742
+ // regeneratorRuntime in the outer scope, which allows this module to be
743
+ // injected easily by `bin/regenerator --include-runtime script.js`.
744
+ return exports;
745
+
746
+ }(
747
+ // If this script is executing as a CommonJS module, use module.exports
748
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
749
+ // object. Either way, the resulting object will be used to initialize
750
+ // the regeneratorRuntime variable at the top of this file.
751
+ module.exports
752
+ ));
753
+
754
+ try {
755
+ regeneratorRuntime = runtime;
756
+ } catch (accidentalStrictMode) {
757
+ // This module should not be running in strict mode, so the above
758
+ // assignment should always work unless something is misconfigured. Just
759
+ // in case runtime.js accidentally runs in strict mode, in modern engines
760
+ // we can explicitly access globalThis. In older engines we can escape
761
+ // strict mode using a global Function call. This could conceivably fail
762
+ // if a Content Security Policy forbids using Function, but in that case
763
+ // the proper solution is to fix the accidental strict mode problem. If
764
+ // you've misconfigured your bundler to force strict mode and applied a
765
+ // CSP to forbid Function, and you're not willing to fix either of those
766
+ // problems, please detail your unique predicament in a GitHub issue.
767
+ if (typeof globalThis === "object") {
768
+ globalThis.regeneratorRuntime = runtime;
769
+ } else {
770
+ Function("r", "regeneratorRuntime = r")(runtime);
771
+ }
772
+ }
773
+ });
774
+
775
+ /**
776
+ * Checks if `value` is classified as an `Array` object.
777
+ *
778
+ * @static
779
+ * @memberOf _
780
+ * @since 0.1.0
781
+ * @category Lang
782
+ * @param {*} value The value to check.
783
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
784
+ * @example
785
+ *
786
+ * _.isArray([1, 2, 3]);
787
+ * // => true
788
+ *
789
+ * _.isArray(document.body.children);
790
+ * // => false
791
+ *
792
+ * _.isArray('abc');
793
+ * // => false
794
+ *
795
+ * _.isArray(_.noop);
796
+ * // => false
797
+ */
798
+ var isArray = Array.isArray;
799
+
800
+ var isArray_1 = isArray;
801
+
802
+ /** Detect free variable `global` from Node.js. */
803
+
804
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
805
+
806
+ var _freeGlobal = freeGlobal;
807
+
808
+ /** Detect free variable `self`. */
809
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
810
+
811
+ /** Used as a reference to the global object. */
812
+ var root = _freeGlobal || freeSelf || Function('return this')();
813
+
814
+ var _root = root;
815
+
816
+ /** Built-in value references. */
817
+ var Symbol$1 = _root.Symbol;
818
+
819
+ var _Symbol = Symbol$1;
820
+
821
+ /** Used for built-in method references. */
822
+ var objectProto$4 = Object.prototype;
823
+
824
+ /** Used to check objects for own properties. */
825
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
826
+
827
+ /**
828
+ * Used to resolve the
829
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
830
+ * of values.
831
+ */
832
+ var nativeObjectToString$1 = objectProto$4.toString;
833
+
834
+ /** Built-in value references. */
835
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
836
+
837
+ /**
838
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
839
+ *
840
+ * @private
841
+ * @param {*} value The value to query.
842
+ * @returns {string} Returns the raw `toStringTag`.
843
+ */
844
+ function getRawTag(value) {
845
+ var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
846
+ tag = value[symToStringTag$1];
847
+
848
+ try {
849
+ value[symToStringTag$1] = undefined;
850
+ var unmasked = true;
851
+ } catch (e) {}
852
+
853
+ var result = nativeObjectToString$1.call(value);
854
+ if (unmasked) {
855
+ if (isOwn) {
856
+ value[symToStringTag$1] = tag;
857
+ } else {
858
+ delete value[symToStringTag$1];
859
+ }
860
+ }
861
+ return result;
862
+ }
863
+
864
+ var _getRawTag = getRawTag;
865
+
866
+ /** Used for built-in method references. */
867
+ var objectProto$3 = Object.prototype;
868
+
869
+ /**
870
+ * Used to resolve the
871
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
872
+ * of values.
873
+ */
874
+ var nativeObjectToString = objectProto$3.toString;
875
+
876
+ /**
877
+ * Converts `value` to a string using `Object.prototype.toString`.
878
+ *
879
+ * @private
880
+ * @param {*} value The value to convert.
881
+ * @returns {string} Returns the converted string.
882
+ */
883
+ function objectToString(value) {
884
+ return nativeObjectToString.call(value);
885
+ }
886
+
887
+ var _objectToString = objectToString;
888
+
889
+ /** `Object#toString` result references. */
890
+ var nullTag = '[object Null]',
891
+ undefinedTag = '[object Undefined]';
892
+
893
+ /** Built-in value references. */
894
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
895
+
896
+ /**
897
+ * The base implementation of `getTag` without fallbacks for buggy environments.
898
+ *
899
+ * @private
900
+ * @param {*} value The value to query.
901
+ * @returns {string} Returns the `toStringTag`.
902
+ */
903
+ function baseGetTag(value) {
904
+ if (value == null) {
905
+ return value === undefined ? undefinedTag : nullTag;
906
+ }
907
+ return (symToStringTag && symToStringTag in Object(value))
908
+ ? _getRawTag(value)
909
+ : _objectToString(value);
910
+ }
911
+
912
+ var _baseGetTag = baseGetTag;
913
+
914
+ /**
915
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
916
+ * and has a `typeof` result of "object".
917
+ *
918
+ * @static
919
+ * @memberOf _
920
+ * @since 4.0.0
921
+ * @category Lang
922
+ * @param {*} value The value to check.
923
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
924
+ * @example
925
+ *
926
+ * _.isObjectLike({});
927
+ * // => true
928
+ *
929
+ * _.isObjectLike([1, 2, 3]);
930
+ * // => true
931
+ *
932
+ * _.isObjectLike(_.noop);
933
+ * // => false
934
+ *
935
+ * _.isObjectLike(null);
936
+ * // => false
937
+ */
938
+ function isObjectLike(value) {
939
+ return value != null && typeof value == 'object';
940
+ }
941
+
942
+ var isObjectLike_1 = isObjectLike;
943
+
944
+ /** `Object#toString` result references. */
945
+ var symbolTag = '[object Symbol]';
946
+
947
+ /**
948
+ * Checks if `value` is classified as a `Symbol` primitive or object.
949
+ *
950
+ * @static
951
+ * @memberOf _
952
+ * @since 4.0.0
953
+ * @category Lang
954
+ * @param {*} value The value to check.
955
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
956
+ * @example
957
+ *
958
+ * _.isSymbol(Symbol.iterator);
959
+ * // => true
960
+ *
961
+ * _.isSymbol('abc');
962
+ * // => false
963
+ */
964
+ function isSymbol(value) {
965
+ return typeof value == 'symbol' ||
966
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
967
+ }
968
+
969
+ var isSymbol_1 = isSymbol;
970
+
971
+ /** Used to match property names within property paths. */
972
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
973
+ reIsPlainProp = /^\w*$/;
974
+
975
+ /**
976
+ * Checks if `value` is a property name and not a property path.
977
+ *
978
+ * @private
979
+ * @param {*} value The value to check.
980
+ * @param {Object} [object] The object to query keys on.
981
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
982
+ */
983
+ function isKey(value, object) {
984
+ if (isArray_1(value)) {
985
+ return false;
986
+ }
987
+ var type = typeof value;
988
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
989
+ value == null || isSymbol_1(value)) {
990
+ return true;
991
+ }
992
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
993
+ (object != null && value in Object(object));
994
+ }
995
+
996
+ var _isKey = isKey;
997
+
998
+ /**
999
+ * Checks if `value` is the
1000
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1001
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1002
+ *
1003
+ * @static
1004
+ * @memberOf _
1005
+ * @since 0.1.0
1006
+ * @category Lang
1007
+ * @param {*} value The value to check.
1008
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1009
+ * @example
1010
+ *
1011
+ * _.isObject({});
1012
+ * // => true
1013
+ *
1014
+ * _.isObject([1, 2, 3]);
1015
+ * // => true
1016
+ *
1017
+ * _.isObject(_.noop);
1018
+ * // => true
1019
+ *
1020
+ * _.isObject(null);
1021
+ * // => false
1022
+ */
1023
+ function isObject(value) {
1024
+ var type = typeof value;
1025
+ return value != null && (type == 'object' || type == 'function');
1026
+ }
1027
+
1028
+ var isObject_1 = isObject;
1029
+
1030
+ /** `Object#toString` result references. */
1031
+ var asyncTag = '[object AsyncFunction]',
1032
+ funcTag = '[object Function]',
1033
+ genTag = '[object GeneratorFunction]',
1034
+ proxyTag = '[object Proxy]';
1035
+
1036
+ /**
1037
+ * Checks if `value` is classified as a `Function` object.
1038
+ *
1039
+ * @static
1040
+ * @memberOf _
1041
+ * @since 0.1.0
1042
+ * @category Lang
1043
+ * @param {*} value The value to check.
1044
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1045
+ * @example
1046
+ *
1047
+ * _.isFunction(_);
1048
+ * // => true
1049
+ *
1050
+ * _.isFunction(/abc/);
1051
+ * // => false
1052
+ */
1053
+ function isFunction(value) {
1054
+ if (!isObject_1(value)) {
1055
+ return false;
1056
+ }
1057
+ // The use of `Object#toString` avoids issues with the `typeof` operator
1058
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
1059
+ var tag = _baseGetTag(value);
1060
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1061
+ }
1062
+
1063
+ var isFunction_1 = isFunction;
1064
+
1065
+ /** Used to detect overreaching core-js shims. */
1066
+ var coreJsData = _root['__core-js_shared__'];
1067
+
1068
+ var _coreJsData = coreJsData;
1069
+
1070
+ /** Used to detect methods masquerading as native. */
1071
+ var maskSrcKey = (function() {
1072
+ var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
1073
+ return uid ? ('Symbol(src)_1.' + uid) : '';
1074
+ }());
1075
+
1076
+ /**
1077
+ * Checks if `func` has its source masked.
1078
+ *
1079
+ * @private
1080
+ * @param {Function} func The function to check.
1081
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1082
+ */
1083
+ function isMasked(func) {
1084
+ return !!maskSrcKey && (maskSrcKey in func);
1085
+ }
1086
+
1087
+ var _isMasked = isMasked;
1088
+
1089
+ /** Used for built-in method references. */
1090
+ var funcProto$1 = Function.prototype;
1091
+
1092
+ /** Used to resolve the decompiled source of functions. */
1093
+ var funcToString$1 = funcProto$1.toString;
1094
+
1095
+ /**
1096
+ * Converts `func` to its source code.
1097
+ *
1098
+ * @private
1099
+ * @param {Function} func The function to convert.
1100
+ * @returns {string} Returns the source code.
1101
+ */
1102
+ function toSource(func) {
1103
+ if (func != null) {
1104
+ try {
1105
+ return funcToString$1.call(func);
1106
+ } catch (e) {}
1107
+ try {
1108
+ return (func + '');
1109
+ } catch (e) {}
1110
+ }
1111
+ return '';
1112
+ }
1113
+
1114
+ var _toSource = toSource;
1115
+
1116
+ /**
1117
+ * Used to match `RegExp`
1118
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1119
+ */
1120
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1121
+
1122
+ /** Used to detect host constructors (Safari). */
1123
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
1124
+
1125
+ /** Used for built-in method references. */
1126
+ var funcProto = Function.prototype,
1127
+ objectProto$2 = Object.prototype;
1128
+
1129
+ /** Used to resolve the decompiled source of functions. */
1130
+ var funcToString = funcProto.toString;
1131
+
1132
+ /** Used to check objects for own properties. */
1133
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1134
+
1135
+ /** Used to detect if a method is native. */
1136
+ var reIsNative = RegExp('^' +
1137
+ funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
1138
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1139
+ );
1140
+
1141
+ /**
1142
+ * The base implementation of `_.isNative` without bad shim checks.
1143
+ *
1144
+ * @private
1145
+ * @param {*} value The value to check.
1146
+ * @returns {boolean} Returns `true` if `value` is a native function,
1147
+ * else `false`.
1148
+ */
1149
+ function baseIsNative(value) {
1150
+ if (!isObject_1(value) || _isMasked(value)) {
1151
+ return false;
1152
+ }
1153
+ var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
1154
+ return pattern.test(_toSource(value));
1155
+ }
1156
+
1157
+ var _baseIsNative = baseIsNative;
1158
+
1159
+ /**
1160
+ * Gets the value at `key` of `object`.
1161
+ *
1162
+ * @private
1163
+ * @param {Object} [object] The object to query.
1164
+ * @param {string} key The key of the property to get.
1165
+ * @returns {*} Returns the property value.
1166
+ */
1167
+ function getValue(object, key) {
1168
+ return object == null ? undefined : object[key];
1169
+ }
1170
+
1171
+ var _getValue = getValue;
1172
+
1173
+ /**
1174
+ * Gets the native function at `key` of `object`.
1175
+ *
1176
+ * @private
1177
+ * @param {Object} object The object to query.
1178
+ * @param {string} key The key of the method to get.
1179
+ * @returns {*} Returns the function if it's native, else `undefined`.
1180
+ */
1181
+ function getNative(object, key) {
1182
+ var value = _getValue(object, key);
1183
+ return _baseIsNative(value) ? value : undefined;
1184
+ }
1185
+
1186
+ var _getNative = getNative;
1187
+
1188
+ /* Built-in method references that are verified to be native. */
1189
+ var nativeCreate = _getNative(Object, 'create');
1190
+
1191
+ var _nativeCreate = nativeCreate;
1192
+
1193
+ /**
1194
+ * Removes all key-value entries from the hash.
1195
+ *
1196
+ * @private
1197
+ * @name clear
1198
+ * @memberOf Hash
1199
+ */
1200
+ function hashClear() {
1201
+ this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
1202
+ this.size = 0;
1203
+ }
1204
+
1205
+ var _hashClear = hashClear;
1206
+
1207
+ /**
1208
+ * Removes `key` and its value from the hash.
1209
+ *
1210
+ * @private
1211
+ * @name delete
1212
+ * @memberOf Hash
1213
+ * @param {Object} hash The hash to modify.
1214
+ * @param {string} key The key of the value to remove.
1215
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1216
+ */
1217
+ function hashDelete(key) {
1218
+ var result = this.has(key) && delete this.__data__[key];
1219
+ this.size -= result ? 1 : 0;
1220
+ return result;
1221
+ }
1222
+
1223
+ var _hashDelete = hashDelete;
1224
+
1225
+ /** Used to stand-in for `undefined` hash values. */
1226
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1227
+
1228
+ /** Used for built-in method references. */
1229
+ var objectProto$1 = Object.prototype;
1230
+
1231
+ /** Used to check objects for own properties. */
1232
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1233
+
1234
+ /**
1235
+ * Gets the hash value for `key`.
1236
+ *
1237
+ * @private
1238
+ * @name get
1239
+ * @memberOf Hash
1240
+ * @param {string} key The key of the value to get.
1241
+ * @returns {*} Returns the entry value.
1242
+ */
1243
+ function hashGet(key) {
1244
+ var data = this.__data__;
1245
+ if (_nativeCreate) {
1246
+ var result = data[key];
1247
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1248
+ }
1249
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
1250
+ }
1251
+
1252
+ var _hashGet = hashGet;
1253
+
1254
+ /** Used for built-in method references. */
1255
+ var objectProto = Object.prototype;
1256
+
1257
+ /** Used to check objects for own properties. */
1258
+ var hasOwnProperty = objectProto.hasOwnProperty;
1259
+
1260
+ /**
1261
+ * Checks if a hash value for `key` exists.
1262
+ *
1263
+ * @private
1264
+ * @name has
1265
+ * @memberOf Hash
1266
+ * @param {string} key The key of the entry to check.
1267
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1268
+ */
1269
+ function hashHas(key) {
1270
+ var data = this.__data__;
1271
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
1272
+ }
1273
+
1274
+ var _hashHas = hashHas;
1275
+
1276
+ /** Used to stand-in for `undefined` hash values. */
1277
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1278
+
1279
+ /**
1280
+ * Sets the hash `key` to `value`.
1281
+ *
1282
+ * @private
1283
+ * @name set
1284
+ * @memberOf Hash
1285
+ * @param {string} key The key of the value to set.
1286
+ * @param {*} value The value to set.
1287
+ * @returns {Object} Returns the hash instance.
1288
+ */
1289
+ function hashSet(key, value) {
1290
+ var data = this.__data__;
1291
+ this.size += this.has(key) ? 0 : 1;
1292
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1293
+ return this;
1294
+ }
1295
+
1296
+ var _hashSet = hashSet;
1297
+
1298
+ /**
1299
+ * Creates a hash object.
1300
+ *
1301
+ * @private
1302
+ * @constructor
1303
+ * @param {Array} [entries] The key-value pairs to cache.
1304
+ */
1305
+ function Hash(entries) {
1306
+ var index = -1,
1307
+ length = entries == null ? 0 : entries.length;
1308
+
1309
+ this.clear();
1310
+ while (++index < length) {
1311
+ var entry = entries[index];
1312
+ this.set(entry[0], entry[1]);
1313
+ }
1314
+ }
1315
+
1316
+ // Add methods to `Hash`.
1317
+ Hash.prototype.clear = _hashClear;
1318
+ Hash.prototype['delete'] = _hashDelete;
1319
+ Hash.prototype.get = _hashGet;
1320
+ Hash.prototype.has = _hashHas;
1321
+ Hash.prototype.set = _hashSet;
1322
+
1323
+ var _Hash = Hash;
1324
+
1325
+ /**
1326
+ * Removes all key-value entries from the list cache.
1327
+ *
1328
+ * @private
1329
+ * @name clear
1330
+ * @memberOf ListCache
1331
+ */
1332
+ function listCacheClear() {
1333
+ this.__data__ = [];
1334
+ this.size = 0;
1335
+ }
1336
+
1337
+ var _listCacheClear = listCacheClear;
1338
+
1339
+ /**
1340
+ * Performs a
1341
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1342
+ * comparison between two values to determine if they are equivalent.
1343
+ *
1344
+ * @static
1345
+ * @memberOf _
1346
+ * @since 4.0.0
1347
+ * @category Lang
1348
+ * @param {*} value The value to compare.
1349
+ * @param {*} other The other value to compare.
1350
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1351
+ * @example
1352
+ *
1353
+ * var object = { 'a': 1 };
1354
+ * var other = { 'a': 1 };
1355
+ *
1356
+ * _.eq(object, object);
1357
+ * // => true
1358
+ *
1359
+ * _.eq(object, other);
1360
+ * // => false
1361
+ *
1362
+ * _.eq('a', 'a');
1363
+ * // => true
1364
+ *
1365
+ * _.eq('a', Object('a'));
1366
+ * // => false
1367
+ *
1368
+ * _.eq(NaN, NaN);
1369
+ * // => true
1370
+ */
1371
+ function eq(value, other) {
1372
+ return value === other || (value !== value && other !== other);
1373
+ }
1374
+
1375
+ var eq_1 = eq;
1376
+
1377
+ /**
1378
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1379
+ *
1380
+ * @private
1381
+ * @param {Array} array The array to inspect.
1382
+ * @param {*} key The key to search for.
1383
+ * @returns {number} Returns the index of the matched value, else `-1`.
1384
+ */
1385
+ function assocIndexOf(array, key) {
1386
+ var length = array.length;
1387
+ while (length--) {
1388
+ if (eq_1(array[length][0], key)) {
1389
+ return length;
1390
+ }
1391
+ }
1392
+ return -1;
1393
+ }
1394
+
1395
+ var _assocIndexOf = assocIndexOf;
1396
+
1397
+ /** Used for built-in method references. */
1398
+ var arrayProto = Array.prototype;
1399
+
1400
+ /** Built-in value references. */
1401
+ var splice = arrayProto.splice;
1402
+
1403
+ /**
1404
+ * Removes `key` and its value from the list cache.
1405
+ *
1406
+ * @private
1407
+ * @name delete
1408
+ * @memberOf ListCache
1409
+ * @param {string} key The key of the value to remove.
1410
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1411
+ */
1412
+ function listCacheDelete(key) {
1413
+ var data = this.__data__,
1414
+ index = _assocIndexOf(data, key);
1415
+
1416
+ if (index < 0) {
1417
+ return false;
1418
+ }
1419
+ var lastIndex = data.length - 1;
1420
+ if (index == lastIndex) {
1421
+ data.pop();
1422
+ } else {
1423
+ splice.call(data, index, 1);
1424
+ }
1425
+ --this.size;
1426
+ return true;
1427
+ }
1428
+
1429
+ var _listCacheDelete = listCacheDelete;
1430
+
1431
+ /**
1432
+ * Gets the list cache value for `key`.
1433
+ *
1434
+ * @private
1435
+ * @name get
1436
+ * @memberOf ListCache
1437
+ * @param {string} key The key of the value to get.
1438
+ * @returns {*} Returns the entry value.
1439
+ */
1440
+ function listCacheGet(key) {
1441
+ var data = this.__data__,
1442
+ index = _assocIndexOf(data, key);
1443
+
1444
+ return index < 0 ? undefined : data[index][1];
1445
+ }
1446
+
1447
+ var _listCacheGet = listCacheGet;
1448
+
1449
+ /**
1450
+ * Checks if a list cache value for `key` exists.
1451
+ *
1452
+ * @private
1453
+ * @name has
1454
+ * @memberOf ListCache
1455
+ * @param {string} key The key of the entry to check.
1456
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1457
+ */
1458
+ function listCacheHas(key) {
1459
+ return _assocIndexOf(this.__data__, key) > -1;
1460
+ }
1461
+
1462
+ var _listCacheHas = listCacheHas;
1463
+
1464
+ /**
1465
+ * Sets the list cache `key` to `value`.
1466
+ *
1467
+ * @private
1468
+ * @name set
1469
+ * @memberOf ListCache
1470
+ * @param {string} key The key of the value to set.
1471
+ * @param {*} value The value to set.
1472
+ * @returns {Object} Returns the list cache instance.
1473
+ */
1474
+ function listCacheSet(key, value) {
1475
+ var data = this.__data__,
1476
+ index = _assocIndexOf(data, key);
1477
+
1478
+ if (index < 0) {
1479
+ ++this.size;
1480
+ data.push([key, value]);
1481
+ } else {
1482
+ data[index][1] = value;
1483
+ }
1484
+ return this;
1485
+ }
1486
+
1487
+ var _listCacheSet = listCacheSet;
1488
+
1489
+ /**
1490
+ * Creates an list cache object.
1491
+ *
1492
+ * @private
1493
+ * @constructor
1494
+ * @param {Array} [entries] The key-value pairs to cache.
1495
+ */
1496
+ function ListCache(entries) {
1497
+ var index = -1,
1498
+ length = entries == null ? 0 : entries.length;
1499
+
1500
+ this.clear();
1501
+ while (++index < length) {
1502
+ var entry = entries[index];
1503
+ this.set(entry[0], entry[1]);
1504
+ }
1505
+ }
1506
+
1507
+ // Add methods to `ListCache`.
1508
+ ListCache.prototype.clear = _listCacheClear;
1509
+ ListCache.prototype['delete'] = _listCacheDelete;
1510
+ ListCache.prototype.get = _listCacheGet;
1511
+ ListCache.prototype.has = _listCacheHas;
1512
+ ListCache.prototype.set = _listCacheSet;
1513
+
1514
+ var _ListCache = ListCache;
1515
+
1516
+ /* Built-in method references that are verified to be native. */
1517
+ var Map = _getNative(_root, 'Map');
1518
+
1519
+ var _Map = Map;
1520
+
1521
+ /**
1522
+ * Removes all key-value entries from the map.
1523
+ *
1524
+ * @private
1525
+ * @name clear
1526
+ * @memberOf MapCache
1527
+ */
1528
+ function mapCacheClear() {
1529
+ this.size = 0;
1530
+ this.__data__ = {
1531
+ 'hash': new _Hash,
1532
+ 'map': new (_Map || _ListCache),
1533
+ 'string': new _Hash
1534
+ };
1535
+ }
1536
+
1537
+ var _mapCacheClear = mapCacheClear;
1538
+
1539
+ /**
1540
+ * Checks if `value` is suitable for use as unique object key.
1541
+ *
1542
+ * @private
1543
+ * @param {*} value The value to check.
1544
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1545
+ */
1546
+ function isKeyable(value) {
1547
+ var type = typeof value;
1548
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1549
+ ? (value !== '__proto__')
1550
+ : (value === null);
1551
+ }
1552
+
1553
+ var _isKeyable = isKeyable;
1554
+
1555
+ /**
1556
+ * Gets the data for `map`.
1557
+ *
1558
+ * @private
1559
+ * @param {Object} map The map to query.
1560
+ * @param {string} key The reference key.
1561
+ * @returns {*} Returns the map data.
1562
+ */
1563
+ function getMapData(map, key) {
1564
+ var data = map.__data__;
1565
+ return _isKeyable(key)
1566
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1567
+ : data.map;
1568
+ }
1569
+
1570
+ var _getMapData = getMapData;
1571
+
1572
+ /**
1573
+ * Removes `key` and its value from the map.
1574
+ *
1575
+ * @private
1576
+ * @name delete
1577
+ * @memberOf MapCache
1578
+ * @param {string} key The key of the value to remove.
1579
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1580
+ */
1581
+ function mapCacheDelete(key) {
1582
+ var result = _getMapData(this, key)['delete'](key);
1583
+ this.size -= result ? 1 : 0;
1584
+ return result;
1585
+ }
1586
+
1587
+ var _mapCacheDelete = mapCacheDelete;
1588
+
1589
+ /**
1590
+ * Gets the map value for `key`.
1591
+ *
1592
+ * @private
1593
+ * @name get
1594
+ * @memberOf MapCache
1595
+ * @param {string} key The key of the value to get.
1596
+ * @returns {*} Returns the entry value.
1597
+ */
1598
+ function mapCacheGet(key) {
1599
+ return _getMapData(this, key).get(key);
1600
+ }
1601
+
1602
+ var _mapCacheGet = mapCacheGet;
1603
+
1604
+ /**
1605
+ * Checks if a map value for `key` exists.
1606
+ *
1607
+ * @private
1608
+ * @name has
1609
+ * @memberOf MapCache
1610
+ * @param {string} key The key of the entry to check.
1611
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1612
+ */
1613
+ function mapCacheHas(key) {
1614
+ return _getMapData(this, key).has(key);
1615
+ }
1616
+
1617
+ var _mapCacheHas = mapCacheHas;
1618
+
1619
+ /**
1620
+ * Sets the map `key` to `value`.
1621
+ *
1622
+ * @private
1623
+ * @name set
1624
+ * @memberOf MapCache
1625
+ * @param {string} key The key of the value to set.
1626
+ * @param {*} value The value to set.
1627
+ * @returns {Object} Returns the map cache instance.
1628
+ */
1629
+ function mapCacheSet(key, value) {
1630
+ var data = _getMapData(this, key),
1631
+ size = data.size;
1632
+
1633
+ data.set(key, value);
1634
+ this.size += data.size == size ? 0 : 1;
1635
+ return this;
1636
+ }
1637
+
1638
+ var _mapCacheSet = mapCacheSet;
1639
+
1640
+ /**
1641
+ * Creates a map cache object to store key-value pairs.
1642
+ *
1643
+ * @private
1644
+ * @constructor
1645
+ * @param {Array} [entries] The key-value pairs to cache.
1646
+ */
1647
+ function MapCache(entries) {
1648
+ var index = -1,
1649
+ length = entries == null ? 0 : entries.length;
1650
+
1651
+ this.clear();
1652
+ while (++index < length) {
1653
+ var entry = entries[index];
1654
+ this.set(entry[0], entry[1]);
1655
+ }
1656
+ }
1657
+
1658
+ // Add methods to `MapCache`.
1659
+ MapCache.prototype.clear = _mapCacheClear;
1660
+ MapCache.prototype['delete'] = _mapCacheDelete;
1661
+ MapCache.prototype.get = _mapCacheGet;
1662
+ MapCache.prototype.has = _mapCacheHas;
1663
+ MapCache.prototype.set = _mapCacheSet;
1664
+
1665
+ var _MapCache = MapCache;
1666
+
1667
+ /** Error message constants. */
1668
+ var FUNC_ERROR_TEXT = 'Expected a function';
1669
+
1670
+ /**
1671
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1672
+ * provided, it determines the cache key for storing the result based on the
1673
+ * arguments provided to the memoized function. By default, the first argument
1674
+ * provided to the memoized function is used as the map cache key. The `func`
1675
+ * is invoked with the `this` binding of the memoized function.
1676
+ *
1677
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1678
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1679
+ * constructor with one whose instances implement the
1680
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1681
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1682
+ *
1683
+ * @static
1684
+ * @memberOf _
1685
+ * @since 0.1.0
1686
+ * @category Function
1687
+ * @param {Function} func The function to have its output memoized.
1688
+ * @param {Function} [resolver] The function to resolve the cache key.
1689
+ * @returns {Function} Returns the new memoized function.
1690
+ * @example
1691
+ *
1692
+ * var object = { 'a': 1, 'b': 2 };
1693
+ * var other = { 'c': 3, 'd': 4 };
1694
+ *
1695
+ * var values = _.memoize(_.values);
1696
+ * values(object);
1697
+ * // => [1, 2]
1698
+ *
1699
+ * values(other);
1700
+ * // => [3, 4]
1701
+ *
1702
+ * object.a = 2;
1703
+ * values(object);
1704
+ * // => [1, 2]
1705
+ *
1706
+ * // Modify the result cache.
1707
+ * values.cache.set(object, ['a', 'b']);
1708
+ * values(object);
1709
+ * // => ['a', 'b']
1710
+ *
1711
+ * // Replace `_.memoize.Cache`.
1712
+ * _.memoize.Cache = WeakMap;
1713
+ */
1714
+ function memoize(func, resolver) {
1715
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1716
+ throw new TypeError(FUNC_ERROR_TEXT);
1717
+ }
1718
+ var memoized = function() {
1719
+ var args = arguments,
1720
+ key = resolver ? resolver.apply(this, args) : args[0],
1721
+ cache = memoized.cache;
1722
+
1723
+ if (cache.has(key)) {
1724
+ return cache.get(key);
1725
+ }
1726
+ var result = func.apply(this, args);
1727
+ memoized.cache = cache.set(key, result) || cache;
1728
+ return result;
1729
+ };
1730
+ memoized.cache = new (memoize.Cache || _MapCache);
1731
+ return memoized;
1732
+ }
1733
+
1734
+ // Expose `MapCache`.
1735
+ memoize.Cache = _MapCache;
1736
+
1737
+ var memoize_1 = memoize;
1738
+
1739
+ /** Used as the maximum memoize cache size. */
1740
+ var MAX_MEMOIZE_SIZE = 500;
1741
+
1742
+ /**
1743
+ * A specialized version of `_.memoize` which clears the memoized function's
1744
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1745
+ *
1746
+ * @private
1747
+ * @param {Function} func The function to have its output memoized.
1748
+ * @returns {Function} Returns the new memoized function.
1749
+ */
1750
+ function memoizeCapped(func) {
1751
+ var result = memoize_1(func, function(key) {
1752
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1753
+ cache.clear();
1754
+ }
1755
+ return key;
1756
+ });
1757
+
1758
+ var cache = result.cache;
1759
+ return result;
1760
+ }
1761
+
1762
+ var _memoizeCapped = memoizeCapped;
1763
+
1764
+ /** Used to match property names within property paths. */
1765
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1766
+
1767
+ /** Used to match backslashes in property paths. */
1768
+ var reEscapeChar = /\\(\\)?/g;
1769
+
1770
+ /**
1771
+ * Converts `string` to a property path array.
1772
+ *
1773
+ * @private
1774
+ * @param {string} string The string to convert.
1775
+ * @returns {Array} Returns the property path array.
1776
+ */
1777
+ var stringToPath = _memoizeCapped(function(string) {
1778
+ var result = [];
1779
+ if (string.charCodeAt(0) === 46 /* . */) {
1780
+ result.push('');
1781
+ }
1782
+ string.replace(rePropName, function(match, number, quote, subString) {
1783
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1784
+ });
1785
+ return result;
1786
+ });
1787
+
1788
+ var _stringToPath = stringToPath;
1789
+
1790
+ /**
1791
+ * A specialized version of `_.map` for arrays without support for iteratee
1792
+ * shorthands.
1793
+ *
1794
+ * @private
1795
+ * @param {Array} [array] The array to iterate over.
1796
+ * @param {Function} iteratee The function invoked per iteration.
1797
+ * @returns {Array} Returns the new mapped array.
1798
+ */
1799
+ function arrayMap(array, iteratee) {
1800
+ var index = -1,
1801
+ length = array == null ? 0 : array.length,
1802
+ result = Array(length);
1803
+
1804
+ while (++index < length) {
1805
+ result[index] = iteratee(array[index], index, array);
1806
+ }
1807
+ return result;
1808
+ }
1809
+
1810
+ var _arrayMap = arrayMap;
1811
+
1812
+ /** Used as references for various `Number` constants. */
1813
+ var INFINITY$1 = 1 / 0;
1814
+
1815
+ /** Used to convert symbols to primitives and strings. */
1816
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1817
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
1818
+
1819
+ /**
1820
+ * The base implementation of `_.toString` which doesn't convert nullish
1821
+ * values to empty strings.
1822
+ *
1823
+ * @private
1824
+ * @param {*} value The value to process.
1825
+ * @returns {string} Returns the string.
1826
+ */
1827
+ function baseToString(value) {
1828
+ // Exit early for strings to avoid a performance hit in some environments.
1829
+ if (typeof value == 'string') {
1830
+ return value;
1831
+ }
1832
+ if (isArray_1(value)) {
1833
+ // Recursively convert values (susceptible to call stack limits).
1834
+ return _arrayMap(value, baseToString) + '';
1835
+ }
1836
+ if (isSymbol_1(value)) {
1837
+ return symbolToString ? symbolToString.call(value) : '';
1838
+ }
1839
+ var result = (value + '');
1840
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1841
+ }
1842
+
1843
+ var _baseToString = baseToString;
1844
+
1845
+ /**
1846
+ * Converts `value` to a string. An empty string is returned for `null`
1847
+ * and `undefined` values. The sign of `-0` is preserved.
1848
+ *
1849
+ * @static
1850
+ * @memberOf _
1851
+ * @since 4.0.0
1852
+ * @category Lang
1853
+ * @param {*} value The value to convert.
1854
+ * @returns {string} Returns the converted string.
1855
+ * @example
1856
+ *
1857
+ * _.toString(null);
1858
+ * // => ''
1859
+ *
1860
+ * _.toString(-0);
1861
+ * // => '-0'
1862
+ *
1863
+ * _.toString([1, 2, 3]);
1864
+ * // => '1,2,3'
1865
+ */
1866
+ function toString(value) {
1867
+ return value == null ? '' : _baseToString(value);
1868
+ }
1869
+
1870
+ var toString_1 = toString;
1871
+
1872
+ /**
1873
+ * Casts `value` to a path array if it's not one.
1874
+ *
1875
+ * @private
1876
+ * @param {*} value The value to inspect.
1877
+ * @param {Object} [object] The object to query keys on.
1878
+ * @returns {Array} Returns the cast property path array.
1879
+ */
1880
+ function castPath(value, object) {
1881
+ if (isArray_1(value)) {
1882
+ return value;
1883
+ }
1884
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1885
+ }
1886
+
1887
+ var _castPath = castPath;
1888
+
1889
+ /** Used as references for various `Number` constants. */
1890
+ var INFINITY = 1 / 0;
1891
+
1892
+ /**
1893
+ * Converts `value` to a string key if it's not a string or symbol.
1894
+ *
1895
+ * @private
1896
+ * @param {*} value The value to inspect.
1897
+ * @returns {string|symbol} Returns the key.
1898
+ */
1899
+ function toKey(value) {
1900
+ if (typeof value == 'string' || isSymbol_1(value)) {
1901
+ return value;
1902
+ }
1903
+ var result = (value + '');
1904
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1905
+ }
1906
+
1907
+ var _toKey = toKey;
1908
+
1909
+ /**
1910
+ * The base implementation of `_.get` without support for default values.
1911
+ *
1912
+ * @private
1913
+ * @param {Object} object The object to query.
1914
+ * @param {Array|string} path The path of the property to get.
1915
+ * @returns {*} Returns the resolved value.
1916
+ */
1917
+ function baseGet(object, path) {
1918
+ path = _castPath(path, object);
1919
+
1920
+ var index = 0,
1921
+ length = path.length;
1922
+
1923
+ while (object != null && index < length) {
1924
+ object = object[_toKey(path[index++])];
1925
+ }
1926
+ return (index && index == length) ? object : undefined;
1927
+ }
1928
+
1929
+ var _baseGet = baseGet;
1930
+
1931
+ /**
1932
+ * Gets the value at `path` of `object`. If the resolved value is
1933
+ * `undefined`, the `defaultValue` is returned in its place.
1934
+ *
1935
+ * @static
1936
+ * @memberOf _
1937
+ * @since 3.7.0
1938
+ * @category Object
1939
+ * @param {Object} object The object to query.
1940
+ * @param {Array|string} path The path of the property to get.
1941
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1942
+ * @returns {*} Returns the resolved value.
1943
+ * @example
1944
+ *
1945
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1946
+ *
1947
+ * _.get(object, 'a[0].b.c');
1948
+ * // => 3
1949
+ *
1950
+ * _.get(object, ['a', '0', 'b', 'c']);
1951
+ * // => 3
1952
+ *
1953
+ * _.get(object, 'a.b.c', 'default');
1954
+ * // => 'default'
1955
+ */
1956
+ function get(object, path, defaultValue) {
1957
+ var result = object == null ? undefined : _baseGet(object, path);
1958
+ return result === undefined ? defaultValue : result;
1959
+ }
1960
+
1961
+ var get_1 = get;
1962
+
1963
+ /**
1964
+ * A specialized version of `_.reduce` for arrays without support for
1965
+ * iteratee shorthands.
1966
+ *
1967
+ * @private
1968
+ * @param {Array} [array] The array to iterate over.
1969
+ * @param {Function} iteratee The function invoked per iteration.
1970
+ * @param {*} [accumulator] The initial value.
1971
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
1972
+ * the initial value.
1973
+ * @returns {*} Returns the accumulated value.
1974
+ */
1975
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
1976
+ var index = -1,
1977
+ length = array == null ? 0 : array.length;
1978
+
1979
+ if (initAccum && length) {
1980
+ accumulator = array[++index];
1981
+ }
1982
+ while (++index < length) {
1983
+ accumulator = iteratee(accumulator, array[index], index, array);
1984
+ }
1985
+ return accumulator;
1986
+ }
1987
+
1988
+ var _arrayReduce = arrayReduce;
1989
+
1990
+ /**
1991
+ * The base implementation of `_.propertyOf` without support for deep paths.
1992
+ *
1993
+ * @private
1994
+ * @param {Object} object The object to query.
1995
+ * @returns {Function} Returns the new accessor function.
1996
+ */
1997
+ function basePropertyOf(object) {
1998
+ return function(key) {
1999
+ return object == null ? undefined : object[key];
2000
+ };
2001
+ }
2002
+
2003
+ var _basePropertyOf = basePropertyOf;
2004
+
2005
+ /** Used to map Latin Unicode letters to basic Latin letters. */
2006
+ var deburredLetters = {
2007
+ // Latin-1 Supplement block.
2008
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
2009
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
2010
+ '\xc7': 'C', '\xe7': 'c',
2011
+ '\xd0': 'D', '\xf0': 'd',
2012
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
2013
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
2014
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
2015
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
2016
+ '\xd1': 'N', '\xf1': 'n',
2017
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
2018
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
2019
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
2020
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
2021
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
2022
+ '\xc6': 'Ae', '\xe6': 'ae',
2023
+ '\xde': 'Th', '\xfe': 'th',
2024
+ '\xdf': 'ss',
2025
+ // Latin Extended-A block.
2026
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
2027
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
2028
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
2029
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
2030
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
2031
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
2032
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
2033
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
2034
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
2035
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
2036
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
2037
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
2038
+ '\u0134': 'J', '\u0135': 'j',
2039
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
2040
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
2041
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
2042
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
2043
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
2044
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
2045
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
2046
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
2047
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
2048
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
2049
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
2050
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
2051
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
2052
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
2053
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
2054
+ '\u0174': 'W', '\u0175': 'w',
2055
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
2056
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
2057
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
2058
+ '\u0132': 'IJ', '\u0133': 'ij',
2059
+ '\u0152': 'Oe', '\u0153': 'oe',
2060
+ '\u0149': "'n", '\u017f': 's'
2061
+ };
2062
+
2063
+ /**
2064
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2065
+ * letters to basic Latin letters.
2066
+ *
2067
+ * @private
2068
+ * @param {string} letter The matched letter to deburr.
2069
+ * @returns {string} Returns the deburred letter.
2070
+ */
2071
+ var deburrLetter = _basePropertyOf(deburredLetters);
2072
+
2073
+ var _deburrLetter = deburrLetter;
2074
+
2075
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
2076
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
2077
+
2078
+ /** Used to compose unicode character classes. */
2079
+ var rsComboMarksRange$3 = '\\u0300-\\u036f',
2080
+ reComboHalfMarksRange$3 = '\\ufe20-\\ufe2f',
2081
+ rsComboSymbolsRange$3 = '\\u20d0-\\u20ff',
2082
+ rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
2083
+
2084
+ /** Used to compose unicode capture groups. */
2085
+ var rsCombo$2 = '[' + rsComboRange$3 + ']';
2086
+
2087
+ /**
2088
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
2089
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
2090
+ */
2091
+ var reComboMark = RegExp(rsCombo$2, 'g');
2092
+
2093
+ /**
2094
+ * Deburrs `string` by converting
2095
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
2096
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
2097
+ * letters to basic Latin letters and removing
2098
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
2099
+ *
2100
+ * @static
2101
+ * @memberOf _
2102
+ * @since 3.0.0
2103
+ * @category String
2104
+ * @param {string} [string=''] The string to deburr.
2105
+ * @returns {string} Returns the deburred string.
2106
+ * @example
2107
+ *
2108
+ * _.deburr('déjà vu');
2109
+ * // => 'deja vu'
2110
+ */
2111
+ function deburr(string) {
2112
+ string = toString_1(string);
2113
+ return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
2114
+ }
2115
+
2116
+ var deburr_1 = deburr;
2117
+
2118
+ /** Used to match words composed of alphanumeric characters. */
2119
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
2120
+
2121
+ /**
2122
+ * Splits an ASCII `string` into an array of its words.
2123
+ *
2124
+ * @private
2125
+ * @param {string} The string to inspect.
2126
+ * @returns {Array} Returns the words of `string`.
2127
+ */
2128
+ function asciiWords(string) {
2129
+ return string.match(reAsciiWord) || [];
2130
+ }
2131
+
2132
+ var _asciiWords = asciiWords;
2133
+
2134
+ /** Used to detect strings that need a more robust regexp to match words. */
2135
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
2136
+
2137
+ /**
2138
+ * Checks if `string` contains a word composed of Unicode symbols.
2139
+ *
2140
+ * @private
2141
+ * @param {string} string The string to inspect.
2142
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
2143
+ */
2144
+ function hasUnicodeWord(string) {
2145
+ return reHasUnicodeWord.test(string);
2146
+ }
2147
+
2148
+ var _hasUnicodeWord = hasUnicodeWord;
2149
+
2150
+ /** Used to compose unicode character classes. */
2151
+ var rsAstralRange$2 = '\\ud800-\\udfff',
2152
+ rsComboMarksRange$2 = '\\u0300-\\u036f',
2153
+ reComboHalfMarksRange$2 = '\\ufe20-\\ufe2f',
2154
+ rsComboSymbolsRange$2 = '\\u20d0-\\u20ff',
2155
+ rsComboRange$2 = rsComboMarksRange$2 + reComboHalfMarksRange$2 + rsComboSymbolsRange$2,
2156
+ rsDingbatRange = '\\u2700-\\u27bf',
2157
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
2158
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
2159
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
2160
+ rsPunctuationRange = '\\u2000-\\u206f',
2161
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
2162
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
2163
+ rsVarRange$2 = '\\ufe0e\\ufe0f',
2164
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
2165
+
2166
+ /** Used to compose unicode capture groups. */
2167
+ var rsApos$1 = "['\u2019]",
2168
+ rsBreak = '[' + rsBreakRange + ']',
2169
+ rsCombo$1 = '[' + rsComboRange$2 + ']',
2170
+ rsDigits = '\\d+',
2171
+ rsDingbat = '[' + rsDingbatRange + ']',
2172
+ rsLower = '[' + rsLowerRange + ']',
2173
+ rsMisc = '[^' + rsAstralRange$2 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
2174
+ rsFitz$1 = '\\ud83c[\\udffb-\\udfff]',
2175
+ rsModifier$1 = '(?:' + rsCombo$1 + '|' + rsFitz$1 + ')',
2176
+ rsNonAstral$1 = '[^' + rsAstralRange$2 + ']',
2177
+ rsRegional$1 = '(?:\\ud83c[\\udde6-\\uddff]){2}',
2178
+ rsSurrPair$1 = '[\\ud800-\\udbff][\\udc00-\\udfff]',
2179
+ rsUpper = '[' + rsUpperRange + ']',
2180
+ rsZWJ$2 = '\\u200d';
2181
+
2182
+ /** Used to compose unicode regexes. */
2183
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
2184
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
2185
+ rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
2186
+ rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
2187
+ reOptMod$1 = rsModifier$1 + '?',
2188
+ rsOptVar$1 = '[' + rsVarRange$2 + ']?',
2189
+ rsOptJoin$1 = '(?:' + rsZWJ$2 + '(?:' + [rsNonAstral$1, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsOptVar$1 + reOptMod$1 + ')*',
2190
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
2191
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
2192
+ rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1,
2193
+ rsEmoji = '(?:' + [rsDingbat, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsSeq$1;
2194
+
2195
+ /** Used to match complex or compound words. */
2196
+ var reUnicodeWord = RegExp([
2197
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
2198
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
2199
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
2200
+ rsUpper + '+' + rsOptContrUpper,
2201
+ rsOrdUpper,
2202
+ rsOrdLower,
2203
+ rsDigits,
2204
+ rsEmoji
2205
+ ].join('|'), 'g');
2206
+
2207
+ /**
2208
+ * Splits a Unicode `string` into an array of its words.
2209
+ *
2210
+ * @private
2211
+ * @param {string} The string to inspect.
2212
+ * @returns {Array} Returns the words of `string`.
2213
+ */
2214
+ function unicodeWords(string) {
2215
+ return string.match(reUnicodeWord) || [];
2216
+ }
2217
+
2218
+ var _unicodeWords = unicodeWords;
2219
+
2220
+ /**
2221
+ * Splits `string` into an array of its words.
2222
+ *
2223
+ * @static
2224
+ * @memberOf _
2225
+ * @since 3.0.0
2226
+ * @category String
2227
+ * @param {string} [string=''] The string to inspect.
2228
+ * @param {RegExp|string} [pattern] The pattern to match words.
2229
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
2230
+ * @returns {Array} Returns the words of `string`.
2231
+ * @example
2232
+ *
2233
+ * _.words('fred, barney, & pebbles');
2234
+ * // => ['fred', 'barney', 'pebbles']
2235
+ *
2236
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
2237
+ * // => ['fred', 'barney', '&', 'pebbles']
2238
+ */
2239
+ function words(string, pattern, guard) {
2240
+ string = toString_1(string);
2241
+ pattern = guard ? undefined : pattern;
2242
+
2243
+ if (pattern === undefined) {
2244
+ return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
2245
+ }
2246
+ return string.match(pattern) || [];
2247
+ }
2248
+
2249
+ var words_1 = words;
2250
+
2251
+ /** Used to compose unicode capture groups. */
2252
+ var rsApos = "['\u2019]";
2253
+
2254
+ /** Used to match apostrophes. */
2255
+ var reApos = RegExp(rsApos, 'g');
2256
+
2257
+ /**
2258
+ * Creates a function like `_.camelCase`.
2259
+ *
2260
+ * @private
2261
+ * @param {Function} callback The function to combine each word.
2262
+ * @returns {Function} Returns the new compounder function.
2263
+ */
2264
+ function createCompounder(callback) {
2265
+ return function(string) {
2266
+ return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
2267
+ };
2268
+ }
2269
+
2270
+ var _createCompounder = createCompounder;
2271
+
2272
+ var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
2273
+ var sharePageUrl = canUseDOM && window.location.href;
2274
+
2275
+ var hexToRGB = function hexToRGB(hex) {
2276
+ var r = parseInt(hex.slice(1, 3), 16);
2277
+ var g = parseInt(hex.slice(3, 5), 16);
2278
+ var b = parseInt(hex.slice(5, 7), 16);
2279
+ return {
2280
+ r: r,
2281
+ g: g,
2282
+ b: b
2283
+ };
2284
+ };
2285
+ var getLuminanceOfColor = function getLuminanceOfColor(hex) {
2286
+ var _hexToRGB = hexToRGB(hex),
2287
+ r = _hexToRGB.r,
2288
+ g = _hexToRGB.g,
2289
+ b = _hexToRGB.b;
2290
+
2291
+ return r * 0.299 + g * 0.587 + b * 0.114;
2292
+ };
2293
+ var rgbToHex = function rgbToHex() {
2294
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
2295
+ var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
2296
+ 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;
2297
+ };
2298
+ var clientWidths = {
2299
+ mobile: 767,
2300
+ tablet: 1024
2301
+ };
2302
+ var clientWidth = function clientWidth(device) {
2303
+ var foundDeviceWidth = get_1(clientWidths, device);
2304
+
2305
+ if (foundDeviceWidth) {
2306
+ return get_1(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
2307
+ }
2308
+
2309
+ return false;
2310
+ };
2311
+ var getTextColor = function getTextColor() {
2312
+ var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
2313
+ var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
2314
+ var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
2315
+ var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
2316
+ return textColor;
2317
+ };
2318
+ var getSlug = function getSlug(collection) {
2319
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2320
+ var _config$magazineSlug = config.magazineSlug,
2321
+ magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
2322
+ _config$isArchivePage = config.isArchivePage,
2323
+ isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
2324
+
2325
+ if (isArchivePage) {
2326
+ return "/magazine/archive/".concat(magazineSlug);
2327
+ }
2328
+
2329
+ if (magazineSlug) {
2330
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2331
+ }
2332
+
2333
+ var isSection = collection.template === "section";
2334
+
2335
+ if (isSection) {
2336
+ var sectionId = get_1(collection, ["metadata", "section", "0", "id"], "");
2337
+ var sections = config.sections;
2338
+ var section = sections && sections.find(function (section) {
2339
+ return section.id === sectionId;
2340
+ });
2341
+ return section ? section["section-url"] : "/";
2342
+ }
2343
+
2344
+ return "/collection/".concat(collection.slug);
2345
+ };
2346
+ PropTypes.shape({
2347
+ "sketches-host": PropTypes.string,
2348
+ "cdn-name": PropTypes.string,
2349
+ "cdn-image": PropTypes.string
2350
+ });
2351
+ PropTypes.shape({
2352
+ headline: PropTypes.string,
2353
+ "last-published-at": PropTypes.number,
2354
+ subheadline: PropTypes.string
2355
+ });
2356
+ var generateNavigateSlug = function generateNavigateSlug() {
2357
+ var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2358
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2359
+ var customUrlPath = arguments.length > 2 ? arguments[2] : undefined;
2360
+
2361
+ if (customUrlPath) {
2362
+ return customUrlPath;
2363
+ }
2364
+
2365
+ var _config$magazineSlug2 = config.magazineSlug,
2366
+ magazineSlug = _config$magazineSlug2 === void 0 ? "" : _config$magazineSlug2,
2367
+ _config$isArchivePage2 = config.isArchivePage,
2368
+ isArchivePage = _config$isArchivePage2 === void 0 ? false : _config$isArchivePage2;
2369
+
2370
+ if (isArchivePage) {
2371
+ return "/magazine/archive/".concat(magazineSlug);
2372
+ }
2373
+
2374
+ if (magazineSlug) {
2375
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2376
+ }
2377
+
2378
+ if (collection) {
2379
+ return getSlug(collection, config);
2380
+ }
2381
+
2382
+ return "/";
2383
+ };
2384
+
2385
+ function _defineProperty(obj, key, value) {
2386
+ if (key in obj) {
2387
+ Object.defineProperty(obj, key, {
2388
+ value: value,
2389
+ enumerable: true,
2390
+ configurable: true,
2391
+ writable: true
2392
+ });
2393
+ } else {
2394
+ obj[key] = value;
2395
+ }
2396
+
2397
+ return obj;
2398
+ }
2399
+
2400
+ var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
2401
+
2402
+ Object.defineProperty(exports, "__esModule", {
2403
+ value: true
2404
+ });
2405
+ exports["default"] = void 0;
2406
+ var optionsDefaults = {
2407
+ attributeNames: {
2408
+ styleName: 'className'
2409
+ },
2410
+ generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
2411
+ handleMissingStyleName: 'throw'
2412
+ };
2413
+ var _default = optionsDefaults;
2414
+ exports["default"] = _default;
2415
+
2416
+
2417
+ });
2418
+
2419
+ var getClassName = createCommonjsModule(function (module, exports) {
2420
+
2421
+ Object.defineProperty(exports, "__esModule", {
2422
+ value: true
2423
+ });
2424
+ exports["default"] = void 0;
2425
+
2426
+ var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
2427
+
2428
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
2429
+
2430
+ var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
2431
+ return styleName.indexOf('.') !== -1;
2432
+ };
2433
+
2434
+ var handleError = function handleError(message, handleMissingStyleName) {
2435
+ if (handleMissingStyleName === 'throw') {
2436
+ throw new Error(message);
2437
+ } else if (handleMissingStyleName === 'warn') {
2438
+ // eslint-disable-next-line no-console
2439
+ console.warn(message);
2440
+ }
2441
+
2442
+ return null;
2443
+ };
2444
+
2445
+ var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
2446
+ // Note:
2447
+ // Do not use the desctructing syntax with Babel.
2448
+ // Desctructing adds _slicedToArray helper.
2449
+ var styleNameParts = styleName.split('.');
2450
+ var importName = styleNameParts[0];
2451
+ var moduleName = styleNameParts[1];
2452
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
2453
+
2454
+ if (!moduleName) {
2455
+ return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
2456
+ }
2457
+
2458
+ if (!styleModuleImportMap[importName]) {
2459
+ return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
2460
+ }
2461
+
2462
+ if (!styleModuleImportMap[importName][moduleName]) {
2463
+ return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
2464
+ }
2465
+
2466
+ return styleModuleImportMap[importName][moduleName];
2467
+ };
2468
+
2469
+ var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
2470
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
2471
+ var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
2472
+ return styleModuleImportMap[importKey][styleName] && importKey;
2473
+ }).filter(function (importKey) {
2474
+ return importKey;
2475
+ });
2476
+
2477
+ if (importKeysWithMatches.length > 1) {
2478
+ 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');
2479
+ }
2480
+
2481
+ if (importKeysWithMatches.length === 0) {
2482
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
2483
+ }
2484
+
2485
+ return styleModuleImportMap[importKeysWithMatches[0]][styleName];
2486
+ };
2487
+
2488
+ var _default = function _default(styleNameValue, styleModuleImportMap, options) {
2489
+ var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
2490
+
2491
+ var _ref = options || {},
2492
+ _ref$handleMissingSty = _ref.handleMissingStyleName,
2493
+ handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
2494
+ _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
2495
+ autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
2496
+
2497
+ if (!styleNameValue) {
2498
+ return '';
2499
+ }
2500
+
2501
+ return styleNameValue.split(' ').filter(function (styleName) {
2502
+ return styleName;
2503
+ }).map(function (styleName) {
2504
+ if (isNamespacedStyleName(styleName)) {
2505
+ return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
2506
+ }
2507
+
2508
+ if (styleModuleImportMapKeys.length === 0) {
2509
+ throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
2510
+ }
2511
+
2512
+ if (styleModuleImportMapKeys.length > 1) {
2513
+ if (!autoResolveMultipleImports) {
2514
+ throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
2515
+ }
2516
+
2517
+ return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
2518
+ }
2519
+
2520
+ var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
2521
+
2522
+ if (!styleModuleMap[styleName]) {
2523
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
2524
+ }
2525
+
2526
+ return styleModuleMap[styleName];
2527
+ }).filter(function (className) {
2528
+ // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
2529
+ return className;
2530
+ }).join(' ');
2531
+ };
2532
+
2533
+ exports["default"] = _default;
2534
+
2535
+
2536
+ });
2537
+
2538
+ var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
2539
+
2540
+ var _styleModuleImportMap$4 = {
2541
+ "./load-more.m.css": {
2542
+ "button": "load-more-m_button__1mmf1",
2543
+ "default": "load-more-m_default__2_k4V",
2544
+ "dark": "load-more-m_dark__3dfzb",
2545
+ "light": "load-more-m_light__ePZQI"
2546
+ }
2547
+ };
2548
+
2549
+ 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; }
2550
+
2551
+ 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; }
2552
+ var LoadmoreButton = function LoadmoreButton(_ref) {
2553
+ var _ref$config = _ref.config,
2554
+ config = _ref$config === void 0 ? {} : _ref$config,
2555
+ collection = _ref.collection,
2556
+ _ref$template = _ref.template,
2557
+ template = _ref$template === void 0 ? "SubsequentLoadCount" : _ref$template,
2558
+ onClick = _ref.onClick,
2559
+ navigate = _ref.navigate,
2560
+ qtConfig = _ref.qtConfig;
2561
+ var _config$showButton = config.showButton,
2562
+ showButton = _config$showButton === void 0 ? true : _config$showButton,
2563
+ _config$buttonText = config.buttonText,
2564
+ buttonText = _config$buttonText === void 0 ? "Read More" : _config$buttonText,
2565
+ _config$theme = config.theme,
2566
+ theme = _config$theme === void 0 ? "" : _config$theme,
2567
+ _config$customUrlPath = config.customUrlPath,
2568
+ customUrlPath = _config$customUrlPath === void 0 ? "" : _config$customUrlPath;
2569
+ if (!showButton) return null;
2570
+ var textColor = getTextColor(theme);
2571
+ var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
2572
+ return template === "SubsequentLoadCount" ? /*#__PURE__*/React.createElement("div", {
2573
+ onClick: onClick,
2574
+ "data-test-id": "load-more",
2575
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$4)
2576
+ }, buttonText) : /*#__PURE__*/React.createElement(LinkBase, {
2577
+ href: slug,
2578
+ navigateTo: navigate,
2579
+ "data-test-id": "load-more",
2580
+ "aria-label": "load-more"
2581
+ }, /*#__PURE__*/React.createElement("div", {
2582
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$4)
2583
+ }, buttonText));
2584
+ };
2585
+ LoadmoreButton.propTypes = {
2586
+ collection: PropTypes.object,
2587
+ template: PropTypes.string,
2588
+ config: PropTypes.object,
2589
+ onClick: PropTypes.func,
2590
+ navigate: PropTypes.func,
2591
+ qtConfig: PropTypes.object
2592
+ };
2593
+
2594
+ var UserFallbackIcon = function UserFallbackIcon(_ref) {
2595
+ var _ref$width = _ref.width,
2596
+ width = _ref$width === void 0 ? 120 : _ref$width,
2597
+ _ref$height = _ref.height,
2598
+ height = _ref$height === void 0 ? 120 : _ref$height;
2599
+ return /*#__PURE__*/React.createElement("svg", {
2600
+ width: width,
2601
+ height: height,
2602
+ viewBox: "0 0 120 120",
2603
+ xmlns: "http://www.w3.org/2000/svg"
2604
+ }, /*#__PURE__*/React.createElement("path", {
2605
+ d: "M93.28 108.98c-1.055-17.675-15.47-31.678-33.098-31.678-17.708 0-32.173 14.129-33.11 31.916 9.415 6.311 20.741 9.993 32.927 9.993 12.338 0 23.795-3.774 33.28-10.23l.001-.001zM58.584 73.283c9.928 0 17.977-8.275 17.977-18.483 0-10.209-8.049-18.484-17.977-18.484-9.929 0-17.977 8.275-17.977 18.484 0 10.208 8.048 18.483 17.977 18.483zM60 120C26.863 120 0 93.137 0 60S26.863 0 60 0s60 26.863 60 60-26.863 60-60 60z",
2606
+ fill: "#DADADA",
2607
+ fillRule: "nonzero"
2608
+ }));
2609
+ };
2610
+ UserFallbackIcon.propTypes = {
2611
+ width: PropTypes.object,
2612
+ height: PropTypes.object
2613
+ };
2614
+
2615
+ var _styleModuleImportMap$3 = {
2616
+ "./author-image.m.css": {
2617
+ "viewports": "\"../../../../assets/stylesheets/viewports.m.css\"",
2618
+ "mobile": "768px",
2619
+ "tablet": "992px",
2620
+ "image-container": "author-image-m_image-container__19WNd",
2621
+ "author-image": "author-image-m_author-image__D8GMB",
2622
+ "square": "author-image-m_square__bjK7M",
2623
+ "small-circle": "author-image-m_small-circle__DbQMN",
2624
+ "smaller-circle": "author-image-m_smaller-circle__2yMOZ"
2625
+ }
2626
+ };
2627
+
2628
+ var authorWithImage = function authorWithImage(author, templateStyle) {
2629
+ var avatarUrl = author["avatar-url"],
2630
+ avatarS3Key = author["avatar-s3-key"],
2631
+ name = author.name;
2632
+ return /*#__PURE__*/React.createElement("div", {
2633
+ "data-test-id": "author-image",
2634
+ className: "arr--author-image " + _getClassName("author-image ".concat(templateStyle), _styleModuleImportMap$3)
2635
+ }, /*#__PURE__*/React.createElement("figure", {
2636
+ className: "author-image-m_image-container__19WNd"
2637
+ }, avatarS3Key ? /*#__PURE__*/React.createElement(ResponsiveImage, {
2638
+ slug: avatarS3Key,
2639
+ alt: name,
2640
+ defaultWidth: 250,
2641
+ widths: [250, 480],
2642
+ aspectRatio: [[1, 1], [1, 1]],
2643
+ sizes: "98vw",
2644
+ imgParams: {
2645
+ auto: ["format", "compress"]
2646
+ }
2647
+ }) : avatarUrl ? /*#__PURE__*/React.createElement("img", {
2648
+ src: avatarUrl
2649
+ }) : /*#__PURE__*/React.createElement(UserFallbackIcon, null)));
2650
+ };
2651
+
2652
+ var AuthorImage = function AuthorImage(_ref) {
2653
+ var _ref$author = _ref.author,
2654
+ author = _ref$author === void 0 ? {} : _ref$author,
2655
+ _ref$template = _ref.template,
2656
+ template = _ref$template === void 0 ? "" : _ref$template,
2657
+ _ref$config = _ref.config,
2658
+ config = _ref$config === void 0 ? {} : _ref$config;
2659
+ var slug = author.slug;
2660
+ var mountAt = config.mountAt || "";
2661
+ var templateStyle = "";
2662
+ if (template === "smallerCircle") templateStyle = "smaller-circle";else if (template === "smallCircle") templateStyle = "small-circle";else if (template === "square") templateStyle = "square";
2663
+ if (slug) return /*#__PURE__*/React.createElement(Link, {
2664
+ href: "".concat(mountAt, "/author/") + slug
2665
+ }, authorWithImage(author, templateStyle));else return authorWithImage(author, templateStyle);
2666
+ };
2667
+
2668
+ AuthorImage.propTypes = {
2669
+ author: PropTypes.shape({
2670
+ "avatar-url": PropTypes.string,
2671
+ "avatar-s3-key": PropTypes.string,
2672
+ name: PropTypes.string,
2673
+ slug: PropTypes.string
2674
+ }),
2675
+ template: PropTypes.string
2676
+ };
2677
+
2678
+ function _extends() {
2679
+ _extends = Object.assign || function (target) {
2680
+ for (var i = 1; i < arguments.length; i++) {
2681
+ var source = arguments[i];
2682
+
2683
+ for (var key in source) {
2684
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
2685
+ target[key] = source[key];
2686
+ }
2687
+ }
2688
+ }
2689
+
2690
+ return target;
2691
+ };
2692
+
2693
+ return _extends.apply(this, arguments);
2694
+ }
2695
+
2696
+ function _arrayWithHoles(arr) {
2697
+ if (Array.isArray(arr)) return arr;
2698
+ }
2699
+
2700
+ function _iterableToArrayLimit(arr, i) {
2701
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2702
+
2703
+ if (_i == null) return;
2704
+ var _arr = [];
2705
+ var _n = true;
2706
+ var _d = false;
2707
+
2708
+ var _s, _e;
2709
+
2710
+ try {
2711
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
2712
+ _arr.push(_s.value);
2713
+
2714
+ if (i && _arr.length === i) break;
2715
+ }
2716
+ } catch (err) {
2717
+ _d = true;
2718
+ _e = err;
2719
+ } finally {
2720
+ try {
2721
+ if (!_n && _i["return"] != null) _i["return"]();
2722
+ } finally {
2723
+ if (_d) throw _e;
2724
+ }
2725
+ }
2726
+
2727
+ return _arr;
2728
+ }
2729
+
2730
+ function _arrayLikeToArray(arr, len) {
2731
+ if (len == null || len > arr.length) len = arr.length;
2732
+
2733
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
2734
+ arr2[i] = arr[i];
2735
+ }
2736
+
2737
+ return arr2;
2738
+ }
2739
+
2740
+ function _unsupportedIterableToArray(o, minLen) {
2741
+ if (!o) return;
2742
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2743
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2744
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2745
+ if (n === "Map" || n === "Set") return Array.from(o);
2746
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2747
+ }
2748
+
2749
+ function _nonIterableRest() {
2750
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2751
+ }
2752
+
2753
+ function _slicedToArray(arr, i) {
2754
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
2755
+ }
2756
+
2757
+ var Twitter = function Twitter(_ref) {
2758
+ var _ref$color = _ref.color,
2759
+ color = _ref$color === void 0 ? "#1CB7EB" : _ref$color;
2760
+ return /*#__PURE__*/React.createElement("svg", {
2761
+ xmlns: "http://www.w3.org/2000/svg",
2762
+ width: "24",
2763
+ height: "24",
2764
+ viewBox: "0 0 24 24"
2765
+ }, /*#__PURE__*/React.createElement("path", {
2766
+ fill: color,
2767
+ d: "M19.137 8.594c.023.094.035.246.035.457 0 1.687-.41 3.316-1.23 4.887-.844 1.664-2.028 2.988-3.551 3.972-1.664 1.102-3.575 1.652-5.73 1.652-2.063 0-3.95-.55-5.661-1.652.258.024.55.035.879.035 1.71 0 3.246-.527 4.605-1.582-.82 0-1.54-.24-2.162-.72a3.673 3.673 0 01-1.283-1.811c.234.023.457.035.668.035.328 0 .656-.035.984-.105a3.724 3.724 0 01-2.109-1.301 3.542 3.542 0 01-.844-2.32v-.07a3.493 3.493 0 001.653.492 4.097 4.097 0 01-1.196-1.336 3.557 3.557 0 01-.457-1.776c0-.644.176-1.26.528-1.845a10.188 10.188 0 003.357 2.742 10.222 10.222 0 004.236 1.125 5.122 5.122 0 01-.07-.844c0-.656.164-1.272.492-1.846a3.615 3.615 0 011.336-1.353 3.568 3.568 0 011.828-.492c.54 0 1.037.105 1.494.316.457.21.862.492 1.213.844a7.479 7.479 0 002.356-.88c-.281.868-.82 1.548-1.617 2.04A7.926 7.926 0 0021 6.66a8.132 8.132 0 01-1.863 1.934z"
2768
+ }));
2769
+ };
2770
+ Twitter.propTypes = {
2771
+ color: PropTypes.string
2772
+ };
2773
+
2774
+ var Facebook = function Facebook(_ref) {
2775
+ var _ref$color = _ref.color,
2776
+ color = _ref$color === void 0 ? "#3B5998" : _ref$color;
2777
+ return /*#__PURE__*/React.createElement("svg", {
2778
+ xmlns: "http://www.w3.org/2000/svg",
2779
+ width: "24",
2780
+ height: "24",
2781
+ viewBox: "0 0 24 24"
2782
+ }, /*#__PURE__*/React.createElement("path", {
2783
+ fill: color,
2784
+ d: "M9.906 20v-7.156H7.5V10h2.406V7.75c0-1.187.334-2.11 1-2.766.667-.656 1.552-.984 2.656-.984.896 0 1.625.042 2.188.125v2.531h-1.5c-.563 0-.948.125-1.156.375-.167.209-.25.542-.25 1V10H15.5l-.375 2.844h-2.281V20H9.906z"
2785
+ }));
2786
+ };
2787
+ Facebook.propTypes = {
2788
+ color: PropTypes.string
2789
+ };
2790
+
2791
+ var LinkedIn = function LinkedIn(_ref) {
2792
+ var _ref$color = _ref.color,
2793
+ color = _ref$color === void 0 ? "#0077B5" : _ref$color;
2794
+ return /*#__PURE__*/React.createElement("svg", {
2795
+ xmlns: "http://www.w3.org/2000/svg",
2796
+ width: "24",
2797
+ height: "24",
2798
+ viewBox: "0 0 24 24"
2799
+ }, /*#__PURE__*/React.createElement("path", {
2800
+ fill: color,
2801
+ d: "M6.71 19H3.26V7.904h3.45V19zM5.005 6.383a1.926 1.926 0 01-1.41-.594A1.923 1.923 0 013 4.38c0-.544.198-1.014.594-1.41a1.926 1.926 0 011.41-.594c.544 0 1.014.198 1.41.594.396.396.594.866.594 1.41 0 .544-.198 1.014-.594 1.41a1.926 1.926 0 01-1.41.594zM19.625 19h-3.451v-5.418c0-.89-.074-1.534-.223-1.93-.272-.668-.804-1.002-1.596-1.002-.791 0-1.348.297-1.67.891-.247.445-.37 1.1-.37 1.967V19H8.9V7.904h3.303v1.522h.037c.248-.495.643-.903 1.188-1.225.593-.396 1.286-.594 2.078-.594 1.608 0 2.734.508 3.377 1.522.495.816.742 2.078.742 3.785V19z"
2802
+ }));
2803
+ };
2804
+ LinkedIn.propTypes = {
2805
+ color: PropTypes.string
2806
+ };
2807
+
2808
+ var WhatsApp = function WhatsApp(_ref) {
2809
+ var _ref$color = _ref.color,
2810
+ color = _ref$color === void 0 ? "#4AC959" : _ref$color;
2811
+ return /*#__PURE__*/React.createElement("svg", {
2812
+ xmlns: "http://www.w3.org/2000/svg",
2813
+ width: "24",
2814
+ height: "24",
2815
+ viewBox: "0 0 24 24"
2816
+ }, /*#__PURE__*/React.createElement("path", {
2817
+ fill: color,
2818
+ fillRule: "evenodd",
2819
+ d: "M18.404 5.505a9.457 9.457 0 012.02 2.96 8.587 8.587 0 01.715 3.449 8.665 8.665 0 01-1.245 4.53 9.282 9.282 0 01-3.347 3.307 8.894 8.894 0 01-4.552 1.225 8.835 8.835 0 01-4.327-1.102l-4.817 1.265 1.307-4.694a8.775 8.775 0 01-1.225-4.531 8.77 8.77 0 011.225-4.531 9.17 9.17 0 013.306-3.307 8.781 8.781 0 014.531-1.224c1.198 0 2.347.23 3.45.693a9.515 9.515 0 012.959 1.96zm-6.409 13.96c1.36 0 2.626-.34 3.797-1.02a7.75 7.75 0 002.796-2.756 7.202 7.202 0 001.04-3.775c0-.98-.203-1.933-.612-2.858a8.088 8.088 0 00-1.694-2.47 7.565 7.565 0 00-2.449-1.653 7.405 7.405 0 00-2.878-.571c-1.36 0-2.62.34-3.776 1.02a7.646 7.646 0 00-2.755 2.756 7.316 7.316 0 00-1.02 3.776c0 1.442.394 2.775 1.183 4l.164.286-.776 2.775 2.857-.734.286.163a7.275 7.275 0 003.837 1.061zm4.123-5.674l.123.082c.19.082.299.15.326.204.027.054.034.19.02.408a2.11 2.11 0 01-.163.674c-.095.231-.313.462-.653.694-.34.231-.633.36-.878.388-.38.054-.748.054-1.102 0-.408-.082-.952-.273-1.632-.572-1.388-.599-2.654-1.714-3.797-3.347l-.081-.082c-.6-.843-.898-1.62-.898-2.327 0-.707.244-1.32.734-1.837l.041-.04c.19-.19.395-.286.612-.286h.49c.11 0 .198.02.266.061.068.041.129.143.183.306l.694 1.674c.082.163.095.3.041.408a2.832 2.832 0 01-.53.735.917.917 0 00-.205.265c-.027.068 0 .143.082.225.38.707.83 1.265 1.347 1.673.381.3.952.64 1.714 1.02.218.11.381.096.49-.04.354-.408.599-.707.735-.898.054-.109.123-.163.204-.163.082 0 .177.013.286.04.218.082.735.327 1.551.735z"
2820
+ }));
2821
+ };
2822
+ WhatsApp.propTypes = {
2823
+ color: PropTypes.string
2824
+ };
2825
+
2826
+ var getSocialIcons = function getSocialIcons(color, iconType) {
2827
+ switch (iconType) {
2828
+ case "plain-color-svg":
2829
+ return {
2830
+ facebook: /*#__PURE__*/React.createElement(Facebook, {
2831
+ key: iconType
2832
+ }),
2833
+ twitter: /*#__PURE__*/React.createElement(Twitter, {
2834
+ key: iconType
2835
+ }),
2836
+ linkedin: /*#__PURE__*/React.createElement(LinkedIn, {
2837
+ key: iconType
2838
+ }),
2839
+ whatsapp: /*#__PURE__*/React.createElement(WhatsApp, {
2840
+ key: iconType
2841
+ })
2842
+ };
2843
+
2844
+ default:
2845
+ return {
2846
+ facebook: /*#__PURE__*/React.createElement(Facebook, {
2847
+ color: color,
2848
+ key: iconType
2849
+ }),
2850
+ twitter: /*#__PURE__*/React.createElement(Twitter, {
2851
+ color: color,
2852
+ key: iconType
2853
+ }),
2854
+ linkedin: /*#__PURE__*/React.createElement(LinkedIn, {
2855
+ color: color,
2856
+ key: iconType
2857
+ }),
2858
+ whatsapp: /*#__PURE__*/React.createElement(WhatsApp, {
2859
+ color: color,
2860
+ key: iconType
2861
+ })
2862
+ };
2863
+ }
2864
+ };
2865
+
2866
+ var socialShareData = function socialShareData(_ref) {
2867
+ var fbUrl = _ref.fbUrl,
2868
+ twitterUrl = _ref.twitterUrl,
2869
+ linkedinUrl = _ref.linkedinUrl,
2870
+ whatsappUrl = _ref.whatsappUrl,
2871
+ iconColor = _ref.iconColor,
2872
+ _ref$iconType = _ref.iconType,
2873
+ iconType = _ref$iconType === void 0 ? "plain-svg" : _ref$iconType;
2874
+ var socialIcons = getSocialIcons(iconColor, iconType);
2875
+
2876
+ var getOptions = function getOptions() {
2877
+ return [{
2878
+ name: "facebook",
2879
+ url: fbUrl,
2880
+ icon: socialIcons["facebook"],
2881
+ text: "Facebook",
2882
+ bgColor: "#4e71a8",
2883
+ alt: "fb icon"
2884
+ }, {
2885
+ name: "twitter",
2886
+ url: twitterUrl,
2887
+ icon: socialIcons["twitter"],
2888
+ text: "Twitter",
2889
+ bgColor: "#1db7eb",
2890
+ alt: "twitter icon"
2891
+ }, {
2892
+ name: "linkedin",
2893
+ url: linkedinUrl,
2894
+ icon: socialIcons["linkedin"],
2895
+ text: "LinkedIn",
2896
+ bgColor: "#0077B5",
2897
+ alt: "linkedin icon"
2898
+ }, {
2899
+ name: "whatsapp",
2900
+ url: whatsappUrl,
2901
+ icon: socialIcons["whatsapp"],
2902
+ text: "Whatsapp",
2903
+ bgColor: "#25d366",
2904
+ alt: "whatsapp share"
2905
+ }];
2906
+ };
2907
+
2908
+ return getOptions();
2909
+ };
2910
+
2911
+ var CloseIcon = function CloseIcon(_ref) {
2912
+ var _ref$color = _ref.color,
2913
+ color = _ref$color === void 0 ? "#333" : _ref$color;
2914
+ return /*#__PURE__*/React.createElement("svg", {
2915
+ xmlns: "http://www.w3.org/2000/svg",
2916
+ width: "24",
2917
+ height: "24",
2918
+ viewBox: "0 0 24 24"
2919
+ }, /*#__PURE__*/React.createElement("g", {
2920
+ fill: "none",
2921
+ stroke: color,
2922
+ strokeLinecap: "square",
2923
+ strokeWidth: "2"
2924
+ }, /*#__PURE__*/React.createElement("path", {
2925
+ d: "M16.95 6.914l-9.9 9.9M16.95 17.107l-9.9-9.9"
2926
+ })));
2927
+ };
2928
+ CloseIcon.propTypes = {
2929
+ color: PropTypes.string
2930
+ };
2931
+
2932
+ var _styleModuleImportMap$2 = {
2933
+ "./social-share-popup.m.css": {
2934
+ "share-popup-wrapper": "social-share-popup-m_share-popup-wrapper__GEJqD",
2935
+ "light": "social-share-popup-m_light__gQmxf",
2936
+ "dark": "social-share-popup-m_dark__26Igp",
2937
+ "share-popup": "social-share-popup-m_share-popup__QRt3l social-share-popup-m_share-popup-wrapper__GEJqD",
2938
+ "social-wrapper": "social-share-popup-m_social-wrapper__1lPzr",
2939
+ "social-icon-wrapper": "social-share-popup-m_social-icon-wrapper__36jyV",
2940
+ "wrapper": "social-share-popup-m_wrapper__3Ytce",
2941
+ "top-bar": "social-share-popup-m_top-bar__174Um",
2942
+ "share-text": "social-share-popup-m_share-text__19E-F",
2943
+ "close": "social-share-popup-m_close__3k-Hj",
2944
+ "social-icon": "social-share-popup-m_social-icon__2a4nT",
2945
+ "social-text": "social-share-popup-m_social-text__1QPXb"
2946
+ }
2947
+ };
2948
+
2949
+ var popupSocialShareItem = function popupSocialShareItem(url, icon, text, index) {
2950
+ return url ? /*#__PURE__*/React.createElement("li", {
2951
+ className: "social-share-popup-m_social-icon-wrapper__36jyV",
2952
+ "data-testid": text,
2953
+ key: "popup-item-".concat(index)
2954
+ }, /*#__PURE__*/React.createElement("a", {
2955
+ href: url,
2956
+ target: "_blank",
2957
+ rel: "noopener noreferrer",
2958
+ className: "social-share-popup-m_social-wrapper__1lPzr",
2959
+ "aria-label": "social-icon"
2960
+ }, icon, /*#__PURE__*/React.createElement("span", {
2961
+ className: "social-share-popup-m_social-text__1QPXb"
2962
+ }, text))) : null;
2963
+ };
2964
+
2965
+ var SocialSharePopup = function SocialSharePopup(_ref) {
2966
+ var _ref$fbUrl = _ref.fbUrl,
2967
+ fbUrl = _ref$fbUrl === void 0 ? "" : _ref$fbUrl,
2968
+ _ref$twitterUrl = _ref.twitterUrl,
2969
+ twitterUrl = _ref$twitterUrl === void 0 ? "" : _ref$twitterUrl,
2970
+ _ref$linkedinUrl = _ref.linkedinUrl,
2971
+ linkedinUrl = _ref$linkedinUrl === void 0 ? "" : _ref$linkedinUrl,
2972
+ _ref$whatsappUrl = _ref.whatsappUrl,
2973
+ whatsappUrl = _ref$whatsappUrl === void 0 ? "" : _ref$whatsappUrl,
2974
+ theme = _ref.theme,
2975
+ _ref$closePopup = _ref.closePopup,
2976
+ closePopup = _ref$closePopup === void 0 ? "" : _ref$closePopup,
2977
+ _ref$iconType = _ref.iconType,
2978
+ iconType = _ref$iconType === void 0 ? "plain-color-svg" : _ref$iconType;
2979
+ var textColor = getTextColor(theme);
2980
+ var iconColor = textColor === "dark" ? "#000000" : "#ffffff";
2981
+ var options = {
2982
+ fbUrl: fbUrl,
2983
+ twitterUrl: twitterUrl,
2984
+ linkedinUrl: linkedinUrl,
2985
+ whatsappUrl: whatsappUrl,
2986
+ iconColor: iconColor,
2987
+ iconType: iconType
2988
+ };
2989
+ var popupItemsList = socialShareData(options);
2990
+ return /*#__PURE__*/React.createElement("div", {
2991
+ className: _getClassName("share-popup-wrapper ".concat(textColor), _styleModuleImportMap$2)
2992
+ }, /*#__PURE__*/React.createElement("div", {
2993
+ className: "social-share-popup-m_share-popup__QRt3l social-share-popup-m_share-popup-wrapper__GEJqD"
2994
+ }, /*#__PURE__*/React.createElement("div", {
2995
+ className: "social-share-popup-m_top-bar__174Um"
2996
+ }, /*#__PURE__*/React.createElement("span", {
2997
+ className: "social-share-popup-m_share-text__19E-F"
2998
+ }, "Share via"), /*#__PURE__*/React.createElement("span", {
2999
+ className: "social-share-popup-m_close__3k-Hj",
3000
+ onClick: closePopup
3001
+ }, /*#__PURE__*/React.createElement(CloseIcon, {
3002
+ color: iconColor
3003
+ }))), /*#__PURE__*/React.createElement("ul", {
3004
+ className: "social-share-popup-m_wrapper__3Ytce"
3005
+ }, popupItemsList.map(function (_ref2, index) {
3006
+ var url = _ref2.url,
3007
+ icon = _ref2.icon,
3008
+ text = _ref2.text,
3009
+ bgColor = _ref2.bgColor;
3010
+ _ref2.alt;
3011
+ return popupSocialShareItem(url, icon, text, bgColor);
3012
+ }))));
3013
+ };
3014
+ SocialSharePopup.propTypes = {
3015
+ fbUrl: PropTypes.string,
3016
+ twitterUrl: PropTypes.string,
3017
+ linkedinUrl: PropTypes.string,
3018
+ whatsappUrl: PropTypes.string,
3019
+ grey: PropTypes.string,
3020
+ primaryColor: PropTypes.string,
3021
+ closePopup: PropTypes.bool,
3022
+ theme: PropTypes.string,
3023
+ iconType: PropTypes.string
3024
+ };
3025
+
3026
+ var ShareIcon = function ShareIcon(_ref) {
3027
+ var _ref$color = _ref.color,
3028
+ color = _ref$color === void 0 ? "#0D0D0D" : _ref$color;
3029
+ return /*#__PURE__*/React.createElement("svg", {
3030
+ xmlns: "http://www.w3.org/2000/svg",
3031
+ width: "24",
3032
+ height: "24",
3033
+ viewBox: "0 0 24 24"
3034
+ }, /*#__PURE__*/React.createElement("path", {
3035
+ fill: color,
3036
+ fillRule: "evenodd",
3037
+ d: "M15.843 3.189c-1.478 0-2.689 1.239-2.689 2.75 0 .293.046.58.13.846L8.844 9.31a2.638 2.638 0 00-1.687-.621c-1.477 0-2.688 1.238-2.688 2.75 0 1.51 1.21 2.75 2.688 2.75.638 0 1.224-.231 1.687-.615l4.446 2.525a2.778 2.778 0 00-.136.84c0 1.51 1.211 2.75 2.689 2.75 1.477 0 2.688-1.24 2.688-2.75 0-1.512-1.21-2.75-2.688-2.75-.742 0-1.419.317-1.907.82l-4.323-2.46a2.763 2.763 0 000-2.221l4.317-2.459c.488.506 1.168.82 1.913.82 1.477 0 2.688-1.239 2.688-2.75s-1.21-2.75-2.688-2.75z"
3038
+ }));
3039
+ };
3040
+ ShareIcon.propTypes = {
3041
+ color: PropTypes.string
3042
+ };
3043
+
3044
+ /**
3045
+ * The base implementation of `_.slice` without an iteratee call guard.
3046
+ *
3047
+ * @private
3048
+ * @param {Array} array The array to slice.
3049
+ * @param {number} [start=0] The start position.
3050
+ * @param {number} [end=array.length] The end position.
3051
+ * @returns {Array} Returns the slice of `array`.
3052
+ */
3053
+ function baseSlice(array, start, end) {
3054
+ var index = -1,
3055
+ length = array.length;
3056
+
3057
+ if (start < 0) {
3058
+ start = -start > length ? 0 : (length + start);
3059
+ }
3060
+ end = end > length ? length : end;
3061
+ if (end < 0) {
3062
+ end += length;
3063
+ }
3064
+ length = start > end ? 0 : ((end - start) >>> 0);
3065
+ start >>>= 0;
3066
+
3067
+ var result = Array(length);
3068
+ while (++index < length) {
3069
+ result[index] = array[index + start];
3070
+ }
3071
+ return result;
3072
+ }
3073
+
3074
+ var _baseSlice = baseSlice;
3075
+
3076
+ /**
3077
+ * Casts `array` to a slice if it's needed.
3078
+ *
3079
+ * @private
3080
+ * @param {Array} array The array to inspect.
3081
+ * @param {number} start The start position.
3082
+ * @param {number} [end=array.length] The end position.
3083
+ * @returns {Array} Returns the cast slice.
3084
+ */
3085
+ function castSlice(array, start, end) {
3086
+ var length = array.length;
3087
+ end = end === undefined ? length : end;
3088
+ return (!start && end >= length) ? array : _baseSlice(array, start, end);
3089
+ }
3090
+
3091
+ var _castSlice = castSlice;
3092
+
3093
+ /** Used to compose unicode character classes. */
3094
+ var rsAstralRange$1 = '\\ud800-\\udfff',
3095
+ rsComboMarksRange$1 = '\\u0300-\\u036f',
3096
+ reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
3097
+ rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
3098
+ rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
3099
+ rsVarRange$1 = '\\ufe0e\\ufe0f';
3100
+
3101
+ /** Used to compose unicode capture groups. */
3102
+ var rsZWJ$1 = '\\u200d';
3103
+
3104
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
3105
+ var reHasUnicode = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + ']');
3106
+
3107
+ /**
3108
+ * Checks if `string` contains Unicode symbols.
3109
+ *
3110
+ * @private
3111
+ * @param {string} string The string to inspect.
3112
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
3113
+ */
3114
+ function hasUnicode(string) {
3115
+ return reHasUnicode.test(string);
3116
+ }
3117
+
3118
+ var _hasUnicode = hasUnicode;
3119
+
3120
+ /**
3121
+ * Converts an ASCII `string` to an array.
3122
+ *
3123
+ * @private
3124
+ * @param {string} string The string to convert.
3125
+ * @returns {Array} Returns the converted array.
3126
+ */
3127
+ function asciiToArray(string) {
3128
+ return string.split('');
3129
+ }
3130
+
3131
+ var _asciiToArray = asciiToArray;
3132
+
3133
+ /** Used to compose unicode character classes. */
3134
+ var rsAstralRange = '\\ud800-\\udfff',
3135
+ rsComboMarksRange = '\\u0300-\\u036f',
3136
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
3137
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
3138
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
3139
+ rsVarRange = '\\ufe0e\\ufe0f';
3140
+
3141
+ /** Used to compose unicode capture groups. */
3142
+ var rsAstral = '[' + rsAstralRange + ']',
3143
+ rsCombo = '[' + rsComboRange + ']',
3144
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
3145
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
3146
+ rsNonAstral = '[^' + rsAstralRange + ']',
3147
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
3148
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
3149
+ rsZWJ = '\\u200d';
3150
+
3151
+ /** Used to compose unicode regexes. */
3152
+ var reOptMod = rsModifier + '?',
3153
+ rsOptVar = '[' + rsVarRange + ']?',
3154
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
3155
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
3156
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
3157
+
3158
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
3159
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
3160
+
3161
+ /**
3162
+ * Converts a Unicode `string` to an array.
3163
+ *
3164
+ * @private
3165
+ * @param {string} string The string to convert.
3166
+ * @returns {Array} Returns the converted array.
3167
+ */
3168
+ function unicodeToArray(string) {
3169
+ return string.match(reUnicode) || [];
3170
+ }
3171
+
3172
+ var _unicodeToArray = unicodeToArray;
3173
+
3174
+ /**
3175
+ * Converts `string` to an array.
3176
+ *
3177
+ * @private
3178
+ * @param {string} string The string to convert.
3179
+ * @returns {Array} Returns the converted array.
3180
+ */
3181
+ function stringToArray(string) {
3182
+ return _hasUnicode(string)
3183
+ ? _unicodeToArray(string)
3184
+ : _asciiToArray(string);
3185
+ }
3186
+
3187
+ var _stringToArray = stringToArray;
3188
+
3189
+ /**
3190
+ * Creates a function like `_.lowerFirst`.
3191
+ *
3192
+ * @private
3193
+ * @param {string} methodName The name of the `String` case method to use.
3194
+ * @returns {Function} Returns the new case function.
3195
+ */
3196
+ function createCaseFirst(methodName) {
3197
+ return function(string) {
3198
+ string = toString_1(string);
3199
+
3200
+ var strSymbols = _hasUnicode(string)
3201
+ ? _stringToArray(string)
3202
+ : undefined;
3203
+
3204
+ var chr = strSymbols
3205
+ ? strSymbols[0]
3206
+ : string.charAt(0);
3207
+
3208
+ var trailing = strSymbols
3209
+ ? _castSlice(strSymbols, 1).join('')
3210
+ : string.slice(1);
3211
+
3212
+ return chr[methodName]() + trailing;
3213
+ };
3214
+ }
3215
+
3216
+ var _createCaseFirst = createCaseFirst;
3217
+
3218
+ /**
3219
+ * Converts the first character of `string` to upper case.
3220
+ *
3221
+ * @static
3222
+ * @memberOf _
3223
+ * @since 4.0.0
3224
+ * @category String
3225
+ * @param {string} [string=''] The string to convert.
3226
+ * @returns {string} Returns the converted string.
3227
+ * @example
3228
+ *
3229
+ * _.upperFirst('fred');
3230
+ * // => 'Fred'
3231
+ *
3232
+ * _.upperFirst('FRED');
3233
+ * // => 'FRED'
3234
+ */
3235
+ var upperFirst = _createCaseFirst('toUpperCase');
3236
+
3237
+ var upperFirst_1 = upperFirst;
3238
+
3239
+ /**
3240
+ * Converts the first character of `string` to upper case and the remaining
3241
+ * to lower case.
3242
+ *
3243
+ * @static
3244
+ * @memberOf _
3245
+ * @since 3.0.0
3246
+ * @category String
3247
+ * @param {string} [string=''] The string to capitalize.
3248
+ * @returns {string} Returns the capitalized string.
3249
+ * @example
3250
+ *
3251
+ * _.capitalize('FRED');
3252
+ * // => 'Fred'
3253
+ */
3254
+ function capitalize(string) {
3255
+ return upperFirst_1(toString_1(string).toLowerCase());
3256
+ }
3257
+
3258
+ var capitalize_1 = capitalize;
3259
+
3260
+ /**
3261
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
3262
+ *
3263
+ * @static
3264
+ * @memberOf _
3265
+ * @since 3.0.0
3266
+ * @category String
3267
+ * @param {string} [string=''] The string to convert.
3268
+ * @returns {string} Returns the camel cased string.
3269
+ * @example
3270
+ *
3271
+ * _.camelCase('Foo Bar');
3272
+ * // => 'fooBar'
3273
+ *
3274
+ * _.camelCase('--foo-bar--');
3275
+ * // => 'fooBar'
3276
+ *
3277
+ * _.camelCase('__FOO_BAR__');
3278
+ * // => 'fooBar'
3279
+ */
3280
+ var camelCase = _createCompounder(function(result, word, index) {
3281
+ word = word.toLowerCase();
3282
+ return result + (index ? capitalize_1(word) : word);
3283
+ });
3284
+
3285
+ var camelCase_1 = camelCase;
3286
+
3287
+ var _styleModuleImportMap$1 = {
3288
+ "./social-share-template.m.css": {
3289
+ "desktop-view": "social-share-template-m_desktop-view__3TmkO",
3290
+ "tablet-view": "social-share-template-m_tablet-view__kATzi",
3291
+ "wrapper": "social-share-template-m_wrapper__1wXin",
3292
+ "horizontal": "social-share-template-m_horizontal__1c9Kt",
3293
+ "vertical": "social-share-template-m_vertical__VU5JY",
3294
+ "light": "social-share-template-m_light__3-V_k",
3295
+ "dark": "social-share-template-m_dark__1lmTM",
3296
+ "icon": "social-share-template-m_icon__1Mnu5",
3297
+ "open": "social-share-template-m_open__3xObA",
3298
+ "popup-wrapper": "social-share-template-m_popup-wrapper__1Zv3e",
3299
+ "popup-open": "social-share-template-m_popup-open__21UNo",
3300
+ "overlay": "social-share-template-m_overlay__1nBp-",
3301
+ "tablet-view-popup": "social-share-template-m_tablet-view-popup__1hXU9"
3302
+ }
3303
+ };
3304
+
3305
+ var ShareItem = function ShareItem(_ref) {
3306
+ var name = _ref.name,
3307
+ url = _ref.url,
3308
+ icon = _ref.icon,
3309
+ dataTestId = _ref.dataTestId;
3310
+ return url ? /*#__PURE__*/React.createElement("li", {
3311
+ "data-testid": dataTestId,
3312
+ className: "social-share-template-m_icon__1Mnu5"
3313
+ }, /*#__PURE__*/React.createElement("a", {
3314
+ href: url,
3315
+ target: "_blank",
3316
+ rel: "noopener noreferrer",
3317
+ "data-share-icon": name,
3318
+ "aria-label": "share-icon"
3319
+ }, icon)) : null;
3320
+ };
3321
+
3322
+ ShareItem.propTypes = {
3323
+ name: PropTypes.string,
3324
+ url: PropTypes.string,
3325
+ icon: PropTypes.node,
3326
+ dataTestId: PropTypes.string
3327
+ };
3328
+
3329
+ function getActionIcon(open, color) {
3330
+ if (!open) return /*#__PURE__*/React.createElement(ShareIcon, {
3331
+ color: color
3332
+ });
3333
+ return /*#__PURE__*/React.createElement(CloseIcon, {
3334
+ color: color
3335
+ });
3336
+ }
3337
+
3338
+ var SocialShareTemplate = function SocialShareTemplate(props) {
3339
+ var _props$fbUrl = props.fbUrl,
3340
+ fbUrl = _props$fbUrl === void 0 ? "" : _props$fbUrl,
3341
+ _props$twitterUrl = props.twitterUrl,
3342
+ twitterUrl = _props$twitterUrl === void 0 ? "" : _props$twitterUrl,
3343
+ _props$linkedinUrl = props.linkedinUrl,
3344
+ linkedinUrl = _props$linkedinUrl === void 0 ? "" : _props$linkedinUrl,
3345
+ _props$whatsappUrl = props.whatsappUrl,
3346
+ whatsappUrl = _props$whatsappUrl === void 0 ? "" : _props$whatsappUrl,
3347
+ _props$vertical = props.vertical,
3348
+ vertical = _props$vertical === void 0 ? false : _props$vertical,
3349
+ theme = props.theme,
3350
+ _props$iconType = props.iconType,
3351
+ iconType = _props$iconType === void 0 ? "plain-color-svg" : _props$iconType,
3352
+ _props$open = props.open,
3353
+ open = _props$open === void 0 ? false : _props$open;
3354
+ if (!fbUrl && !twitterUrl && !linkedinUrl && !whatsappUrl) return null;
3355
+ var iconShade = getTextColor(theme);
3356
+ var iconColor = iconShade === "dark" ? "#000000" : "#ffffff";
3357
+ var options = {
3358
+ fbUrl: fbUrl,
3359
+ twitterUrl: twitterUrl,
3360
+ linkedinUrl: linkedinUrl,
3361
+ whatsappUrl: whatsappUrl,
3362
+ iconColor: iconColor,
3363
+ iconType: iconType
3364
+ };
3365
+ var iconsList = socialShareData(options);
3366
+
3367
+ var _useState = useState(open),
3368
+ _useState2 = _slicedToArray(_useState, 2),
3369
+ isOpen = _useState2[0],
3370
+ setIsOpen = _useState2[1];
3371
+
3372
+ var verticalShare = vertical ? "vertical" : "horizontal";
3373
+ useEffect(function () {
3374
+ return setIsOpen(open);
3375
+ }, [open]);
3376
+
3377
+ var shareIcon = function shareIcon() {
3378
+ return /*#__PURE__*/React.createElement("li", {
3379
+ className: "social-share-template-m_icon__1Mnu5",
3380
+ key: "horizontal-0"
3381
+ }, /*#__PURE__*/React.createElement("div", {
3382
+ onClick: clickHandler
3383
+ }, getActionIcon(isOpen, iconColor)));
3384
+ };
3385
+
3386
+ var clickHandler = function clickHandler() {
3387
+ setIsOpen(!isOpen);
3388
+ };
3389
+
3390
+ var popUpWrapper = function popUpWrapper() {
3391
+ return /*#__PURE__*/React.createElement("div", {
3392
+ className: "social-share-template-m_tablet-view__kATzi"
3393
+ }, !isOpen && /*#__PURE__*/React.createElement("ul", {
3394
+ className: _getClassName("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$1)
3395
+ }, shareIcon()), isOpen && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
3396
+ className: "social-share-template-m_overlay__1nBp-",
3397
+ onClick: clickHandler
3398
+ }, /*#__PURE__*/React.createElement("div", {
3399
+ className: "arr--popup " + _getClassName("popup-wrapper ".concat(isOpen ? "popup-open" : ""), _styleModuleImportMap$1)
3400
+ }, /*#__PURE__*/React.createElement(SocialSharePopup, {
3401
+ fbUrl: fbUrl,
3402
+ twitterUrl: twitterUrl,
3403
+ linkedinUrl: linkedinUrl,
3404
+ whatsappUrl: whatsappUrl,
3405
+ iconType: iconType,
3406
+ theme: theme,
3407
+ closePopup: function closePopup() {
3408
+ setIsOpen(false);
3409
+ }
3410
+ })))));
3411
+ };
3412
+
3413
+ var popupStyle = !isOpen && vertical ? "tablet-view-popup" : "";
3414
+ return /*#__PURE__*/React.createElement("div", {
3415
+ "data-test-id": verticalShare,
3416
+ className: "arr--share " + _getClassName("".concat(iconShade, " ").concat(verticalShare, " ").concat(popupStyle), _styleModuleImportMap$1)
3417
+ }, /*#__PURE__*/React.createElement("div", {
3418
+ className: "social-share-template-m_desktop-view__3TmkO"
3419
+ }, /*#__PURE__*/React.createElement("ul", {
3420
+ "data-test-id": camelCase_1(iconType),
3421
+ className: "desktop-share-wrapper " + _getClassName("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$1)
3422
+ }, shareIcon(), iconsList.map(function (iconData, index) {
3423
+ return /*#__PURE__*/React.createElement(ShareItem, _extends({}, iconData, {
3424
+ key: iconData.name,
3425
+ dataTestId: "card-share-".concat(index)
3426
+ }));
3427
+ }))), popUpWrapper());
3428
+ };
3429
+ SocialShareTemplate.propTypes = {
3430
+ fbUrl: PropTypes.string,
3431
+ twitterUrl: PropTypes.string,
3432
+ linkedinUrl: PropTypes.string,
3433
+ whatsappUrl: PropTypes.string,
3434
+ vertical: PropTypes.bool,
3435
+ theme: PropTypes.string,
3436
+ iconType: PropTypes.string,
3437
+ open: PropTypes["boolean"]
3438
+ };
3439
+
3440
+ var Youtube = function Youtube(_ref) {
3441
+ var _ref$color = _ref.color,
3442
+ color = _ref$color === void 0 ? "#F61C0D" : _ref$color;
3443
+ return /*#__PURE__*/React.createElement("svg", {
3444
+ xmlns: "http://www.w3.org/2000/svg",
3445
+ width: "24",
3446
+ height: "24",
3447
+ viewBox: "0 0 24 24"
3448
+ }, /*#__PURE__*/React.createElement("path", {
3449
+ fill: color,
3450
+ fillRule: "evenodd",
3451
+ d: "M22.077 6.844c.18.703.308 1.77.385 3.203L22.5 12l-.038 1.953c-.077 1.458-.206 2.54-.385 3.242a2.733 2.733 0 01-.692 1.172 2.654 2.654 0 01-1.193.703c-.666.183-2.23.313-4.692.39l-3.5.04-3.5-.04c-2.462-.077-4.026-.207-4.692-.39a2.657 2.657 0 01-1.193-.703 2.733 2.733 0 01-.692-1.172c-.18-.703-.308-1.784-.385-3.242L1.5 12c0-.573.013-1.224.038-1.953.077-1.432.206-2.5.385-3.203A2.718 2.718 0 013.808 4.93c.666-.183 2.23-.313 4.692-.39L12 4.5l3.5.04c2.462.077 4.026.207 4.692.39a2.718 2.718 0 011.885 1.914zm-12.23 8.36l5.5-3.204-5.5-3.164v6.367z"
3452
+ }));
3453
+ };
3454
+ Youtube.propTypes = {
3455
+ color: PropTypes.string
3456
+ };
3457
+
3458
+ var Instagram = function Instagram() {
3459
+ return /*#__PURE__*/React.createElement("svg", {
3460
+ xmlns: "http://www.w3.org/2000/svg",
3461
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
3462
+ width: "24",
3463
+ height: "24",
3464
+ viewBox: "0 0 24 24"
3465
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
3466
+ id: "prefix__b",
3467
+ x1: "0%",
3468
+ x2: "110.694%",
3469
+ y1: "0%",
3470
+ y2: "109.202%"
3471
+ }, /*#__PURE__*/React.createElement("stop", {
3472
+ offset: "0%",
3473
+ stopColor: "#724AC6"
3474
+ }), /*#__PURE__*/React.createElement("stop", {
3475
+ offset: "53.59%",
3476
+ stopColor: "#E5375E"
3477
+ }), /*#__PURE__*/React.createElement("stop", {
3478
+ offset: "100%",
3479
+ stopColor: "#FC9949"
3480
+ })), /*#__PURE__*/React.createElement("path", {
3481
+ id: "prefix__a",
3482
+ d: "M9 4.636c.784 0 1.512.196 2.182.588.67.392 1.202.924 1.594 1.594.392.67.588 1.398.588 2.182s-.196 1.512-.588 2.182a4.382 4.382 0 01-1.594 1.594c-.67.392-1.398.588-2.182.588s-1.512-.196-2.182-.588a4.382 4.382 0 01-1.594-1.594c-.392-.67-.588-1.398-.588-2.182s.196-1.512.588-2.182a4.382 4.382 0 011.594-1.594A4.247 4.247 0 019 4.636zm0 7.21c.784 0 1.455-.278 2.011-.835.557-.556.835-1.227.835-2.011s-.278-1.455-.835-2.011c-.556-.557-1.227-.835-2.011-.835s-1.455.278-2.011.835c-.557.556-.835 1.227-.835 2.011s.278 1.455.835 2.011A2.739 2.739 0 009 11.846zm5.578-7.4a1.181 1.181 0 01-.322.721.923.923 0 01-.702.304.981.981 0 01-.721-.304.98.98 0 01-.304-.72c0-.279.101-.52.304-.722a.984.984 0 01.72-.303c.279 0 .52.101.722.303a.987.987 0 01.303.721zm2.884 1.025c.025.708.038 1.885.038 3.529s-.019 2.827-.057 3.548c-.038.721-.145 1.347-.322 1.878a4.425 4.425 0 01-1.044 1.651 4.429 4.429 0 01-1.65 1.044c-.532.177-1.158.284-1.879.322-.721.038-1.904.057-3.548.057-1.644 0-2.827-.019-3.548-.057-.721-.038-1.347-.158-1.878-.36a4.05 4.05 0 01-1.651-1.006 4.429 4.429 0 01-1.044-1.65c-.177-.532-.284-1.158-.322-1.879C.519 11.827.5 10.644.5 9c0-1.644.019-2.827.057-3.548.038-.721.145-1.347.322-1.878a4.425 4.425 0 011.044-1.651A4.429 4.429 0 013.573.879C4.106.702 4.732.595 5.453.557 6.173.519 7.356.5 9 .5c1.644 0 2.827.019 3.548.057.721.038 1.347.145 1.878.322a4.425 4.425 0 011.651 1.044 4.429 4.429 0 011.044 1.65c.177.532.29 1.164.341 1.898zm-1.821 8.538c.151-.43.253-1.113.303-2.05.025-.556.038-1.34.038-2.352V8.393a54.22 54.22 0 00-.038-2.353c-.05-.961-.152-1.644-.303-2.049a2.743 2.743 0 00-1.632-1.632c-.405-.151-1.088-.253-2.05-.303a55.796 55.796 0 00-2.352-.038H8.393c-1.012 0-1.796.013-2.353.038-.936.05-1.619.152-2.049.303a2.743 2.743 0 00-1.632 1.632c-.151.405-.253 1.088-.303 2.05-.025.556-.038 1.34-.038 2.352v1.214c0 1.012.013 1.796.038 2.353.05.936.152 1.619.303 2.049.33.784.873 1.328 1.632 1.632.43.151 1.113.253 2.05.303.556.025 1.34.038 2.352.038h1.214a54.22 54.22 0 002.353-.038c.961-.05 1.644-.152 2.049-.303.784-.33 1.328-.873 1.632-1.632z"
3483
+ })), /*#__PURE__*/React.createElement("use", {
3484
+ fill: "url(#prefix__b)",
3485
+ fillRule: "nonzero",
3486
+ transform: "translate(3 3)",
3487
+ xlinkHref: "#prefix__a"
3488
+ }));
3489
+ };
3490
+
3491
+ var Pinterest = function Pinterest() {
3492
+ return /*#__PURE__*/React.createElement("svg", {
3493
+ xmlns: "http://www.w3.org/2000/svg",
3494
+ width: "24",
3495
+ height: "24",
3496
+ viewBox: "0 0 24 24"
3497
+ }, /*#__PURE__*/React.createElement("path", {
3498
+ fill: "#E60023",
3499
+ d: "M21.5 12a9.209 9.209 0 01-1.283 4.75 9.6 9.6 0 01-3.467 3.467A9.209 9.209 0 0112 21.5c-.97 0-1.903-.14-2.796-.421.613-1.022.996-1.852 1.149-2.49l.613-2.26c.153.306.434.561.842.766.41.204.856.306 1.341.306.92 0 1.756-.262 2.51-.785.753-.524 1.34-1.232 1.761-2.126.422-.894.632-1.87.632-2.93s-.255-2.012-.766-2.854a5.318 5.318 0 00-2.107-1.973c-.893-.473-1.89-.709-2.987-.709-1.303 0-2.452.268-3.448.805a5.465 5.465 0 00-2.088 2.087 5.704 5.704 0 00-.747 2.854c0 .74.185 1.475.556 2.203.37.728.836 1.22 1.398 1.475.179.076.28.038.306-.115l.268-1.073a.266.266 0 00-.076-.268 3.048 3.048 0 01-.498-.977 3.908 3.908 0 01-.192-1.207c0-.715.173-1.385.518-2.01a3.99 3.99 0 011.474-1.514c.664-.408 1.43-.613 2.299-.613 1.174 0 2.132.364 2.873 1.092.74.728 1.11 1.654 1.11 2.777 0 1.277-.287 2.324-.861 3.141-.575.818-1.284 1.226-2.126 1.226-.486 0-.869-.172-1.15-.517-.28-.345-.37-.747-.268-1.207.051-.28.166-.689.345-1.225.281-.945.421-1.603.421-1.973 0-.37-.102-.677-.306-.92-.204-.242-.498-.363-.881-.363-.485 0-.894.217-1.226.65-.332.435-.498.984-.498 1.648 0 .562.09 1.034.268 1.417L8.591 18.13c-.154.638-.166 1.545-.039 2.72-1.813-.69-3.275-1.839-4.386-3.448C3.056 15.792 2.5 13.991 2.5 12c0-1.711.428-3.294 1.283-4.75A9.6 9.6 0 017.25 3.783 9.209 9.209 0 0112 2.5c1.711 0 3.294.428 4.75 1.283a9.6 9.6 0 013.467 3.467A9.209 9.209 0 0121.5 12z"
3500
+ }));
3501
+ };
3502
+
3503
+ var _styleModuleImportMap = {
3504
+ "./author-intro.m.css": {
3505
+ "viewports": "\"../../../../assets/stylesheets/viewports.m.css\"",
3506
+ "mobile": "768px",
3507
+ "tablet": "992px",
3508
+ "connect": "author-intro-m_connect__15zIX",
3509
+ "social-share": "author-intro-m_social-share__f5EpE",
3510
+ "share-icon": "author-intro-m_share-icon__3gke5",
3511
+ "default": "author-intro-m_default__1rQ_v",
3512
+ "author-image": "author-intro-m_author-image__2jRxy",
3513
+ "author-name": "author-intro-m_author-name__1L60a",
3514
+ "author-description": "author-intro-m_author-description__2CTEw",
3515
+ "wrapper": "author-intro-m_wrapper__2Bi-s",
3516
+ "introduction-card": "author-intro-m_introduction-card__1kdGt",
3517
+ "social-wrapper": "author-intro-m_social-wrapper__1F9jD",
3518
+ "linkWrapper": "author-intro-m_linkWrapper__Au0nU",
3519
+ "social-connect-wrapper": "author-intro-m_social-connect-wrapper__2B0QA",
3520
+ "dark": "author-intro-m_dark__ALdDb",
3521
+ "light": "author-intro-m_light__2SfeE",
3522
+ "small-circle": "author-intro-m_small-circle__jyG1s",
3523
+ "border": "author-intro-m_border__3Tii9",
3524
+ "fade-out": "author-intro-m_fade-out__1EBqd"
3525
+ }
3526
+ };
3527
+ var AuthorIntroductionCard = function AuthorIntroductionCard(_ref) {
3528
+ var _ref$data = _ref.data,
3529
+ data = _ref$data === void 0 ? {} : _ref$data,
3530
+ _ref$config = _ref.config,
3531
+ config = _ref$config === void 0 ? {} : _ref$config,
3532
+ _ref$template = _ref.template,
3533
+ template = _ref$template === void 0 ? "" : _ref$template;
3534
+ var _config$theme = config.theme,
3535
+ theme = _config$theme === void 0 ? "" : _config$theme,
3536
+ _config$enableBio = config.enableBio,
3537
+ enableBio = _config$enableBio === void 0 ? true : _config$enableBio,
3538
+ _config$enableSocialL = config.enableSocialLinks,
3539
+ enableSocialLinks = _config$enableSocialL === void 0 ? true : _config$enableSocialL,
3540
+ _config$borderSupport = config.borderSupport,
3541
+ borderSupport = _config$borderSupport === void 0 ? true : _config$borderSupport;
3542
+ var textColor = getTextColor(theme);
3543
+ var name = data.name,
3544
+ bio = data.bio,
3545
+ social = data.social;
3546
+ var isSmallCircle = template === "smallCircle";
3547
+ var authorCardStyle = isSmallCircle ? "small-circle" : "default";
3548
+ var isMobile = clientWidth("mobile");
3549
+ var isFullWidth = !isSmallCircle ? "full-width-with-padding" : "";
3550
+ var supportBorder = isSmallCircle && borderSupport ? "border" : "";
3551
+
3552
+ var getIcon = function getIcon(item) {
3553
+ switch (item) {
3554
+ case "twitter":
3555
+ return /*#__PURE__*/React.createElement(Twitter, null);
3556
+
3557
+ case "facebook":
3558
+ return /*#__PURE__*/React.createElement(Facebook, null);
3559
+
3560
+ case "youtube":
3561
+ return /*#__PURE__*/React.createElement(Youtube, null);
3562
+
3563
+ case "linkedin":
3564
+ return /*#__PURE__*/React.createElement(LinkedIn, null);
3565
+
3566
+ case "whatsapp":
3567
+ return /*#__PURE__*/React.createElement(WhatsApp, {
3568
+ color: "#4AC959"
3569
+ });
3570
+
3571
+ case "instagram":
3572
+ return /*#__PURE__*/React.createElement(Instagram, null);
3573
+
3574
+ case "pinterest":
3575
+ return /*#__PURE__*/React.createElement(Pinterest, null);
3576
+ }
3577
+ };
3578
+
3579
+ return /*#__PURE__*/React.createElement("div", {
3580
+ "data-test-id": "author-intro",
3581
+ style: {
3582
+ backgroundColor: theme,
3583
+ color: textColor
3584
+ },
3585
+ className: ("".concat(isFullWidth, " arrow-component arr--author-intro-card") ? "".concat(isFullWidth, " arrow-component arr--author-intro-card") + " " : "") + _getClassName("".concat(authorCardStyle, " ").concat(supportBorder, " ").concat(textColor), _styleModuleImportMap)
3586
+ }, /*#__PURE__*/React.createElement("div", {
3587
+ className: "arrow-author-intro-wrapper " + _getClassName("wrapper ".concat(textColor), _styleModuleImportMap)
3588
+ }, /*#__PURE__*/React.createElement("div", {
3589
+ className: "arrow-author-introduction-card author-intro-m_introduction-card__1kdGt"
3590
+ }, isSmallCircle && isMobile ? null : /*#__PURE__*/React.createElement("h2", {
3591
+ className: _getClassName("author-name ".concat(textColor), _styleModuleImportMap)
3592
+ }, name), enableBio && bio && /*#__PURE__*/React.createElement("div", {
3593
+ "data-test-id": "author-bio",
3594
+ className: _getClassName("author-description ".concat(textColor), _styleModuleImportMap)
3595
+ }, bio, isSmallCircle && /*#__PURE__*/React.createElement("div", {
3596
+ className: "author-intro-m_fade-out__1EBqd",
3597
+ style: {
3598
+ backgroundImage: "linear-gradient(to right, transparent, ".concat(theme, ")")
3599
+ }
3600
+ })), /*#__PURE__*/React.createElement("div", {
3601
+ className: "author-intro-m_social-wrapper__1F9jD"
3602
+ }, /*#__PURE__*/React.createElement("div", {
3603
+ className: "author-intro-m_social-connect-wrapper__2B0QA"
3604
+ }, enableSocialLinks && social && /*#__PURE__*/React.createElement(React.Fragment, null, template !== "smallCircle" && /*#__PURE__*/React.createElement("div", {
3605
+ className: _getClassName("connect ".concat(textColor), _styleModuleImportMap)
3606
+ }, "Connect :"), Object.entries(social).map(function (item, index) {
3607
+ return item.length > 0 && item[1] ? // can add Social Networks without the url so adding an additional check below
3608
+ item[1].url ? /*#__PURE__*/React.createElement("a", {
3609
+ "data-test-id": "social-link",
3610
+ href: item[1].url,
3611
+ key: "".concat(item, "-").concat(index),
3612
+ rel: "noopener noreferrer",
3613
+ target: "_blank",
3614
+ className: "author-intro-m_social-share__f5EpE"
3615
+ }, getIcon(item[0])) : null : null;
3616
+ }))), !isSmallCircle && /*#__PURE__*/React.createElement(SocialShare, {
3617
+ template: SocialShareTemplate,
3618
+ fullUrl: sharePageUrl,
3619
+ title: name,
3620
+ theme: theme,
3621
+ iconType: "plain-svg"
3622
+ }))), /*#__PURE__*/React.createElement("div", {
3623
+ className: "arrow-author-image author-intro-m_author-image__2jRxy"
3624
+ }, /*#__PURE__*/React.createElement(AuthorImage, {
3625
+ author: data,
3626
+ template: template
3627
+ }), isSmallCircle && isMobile && /*#__PURE__*/React.createElement("h2", {
3628
+ className: _getClassName("author-name ".concat(textColor), _styleModuleImportMap)
3629
+ }, name))));
3630
+ };
3631
+ AuthorIntroductionCard.propTypes = {
3632
+ data: PropTypes.shape({
3633
+ name: PropTypes.string,
3634
+ bio: PropTypes.string,
3635
+ social: PropTypes.object
3636
+ }),
3637
+ config: PropTypes.shape({
3638
+ theme: PropTypes.string,
3639
+ enableBio: PropTypes.bool,
3640
+ enableSocialLinks: PropTypes.bool,
3641
+ borderSupport: PropTypes.bool
3642
+ }),
3643
+ template: PropTypes.string
3644
+ };
3645
+
3646
+ var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
3647
+
3648
+ var StateProvider = function StateProvider(RowComponent) {
3649
+ return function (props) {
3650
+ return (
3651
+ /*#__PURE__*/
3652
+ // eslint-disable-next-line react/prop-types
3653
+ React.createElement(StateContext.Provider, {
3654
+ value: props.config
3655
+ }, /*#__PURE__*/React.createElement(RowComponent, props))
3656
+ );
3657
+ };
3658
+ };
3659
+
3660
+ var AuthorsListBase = function AuthorsListBase(_ref) {
3661
+ var _ref$data = _ref.data,
3662
+ data = _ref$data === void 0 ? [] : _ref$data,
3663
+ _ref$config = _ref.config,
3664
+ config = _ref$config === void 0 ? {} : _ref$config,
3665
+ getMoreData = _ref.getMoreData,
3666
+ _ref$hideLoadmore = _ref.hideLoadmore,
3667
+ hideLoadmore = _ref$hideLoadmore === void 0 ? false : _ref$hideLoadmore,
3668
+ limit = _ref.limit;
3669
+ if (data.length < 1) return null;
3670
+ var theme = config.theme;
3671
+ var textColor = getTextColor(theme);
3672
+ var mountAt = config.mountAt || "";
3673
+ var qtConfig = useSelector(function (state) {
3674
+ return get_1(state, ["qt", "config"], {});
3675
+ });
3676
+ return /*#__PURE__*/React.createElement("div", {
3677
+ "data-test-id": "authors-list",
3678
+ className: "full-width-with-padding arrow-component arr--authors-list",
3679
+ style: {
3680
+ background: theme,
3681
+ color: textColor
3682
+ }
3683
+ }, /*#__PURE__*/React.createElement("div", {
3684
+ className: "authors-list-m_wrapper__6y3He"
3685
+ }, data.slice(0, limit).map(function (author, index) {
3686
+ return /*#__PURE__*/React.createElement(Link, {
3687
+ href: "".concat(mountAt, "/author/") + author.slug,
3688
+ key: "author-list-".concat(index),
3689
+ className: "authors-list-m_linkWrapper__1ZhOs",
3690
+ "aria-label": "author"
3691
+ }, /*#__PURE__*/React.createElement(AuthorIntroductionCard, {
3692
+ data: author,
3693
+ config: config,
3694
+ template: "smallCircle"
3695
+ }));
3696
+ })), !hideLoadmore && /*#__PURE__*/React.createElement(LoadmoreButton, {
3697
+ onClick: getMoreData,
3698
+ template: "SubsequentLoadCount",
3699
+ config: config,
3700
+ qtConfig: qtConfig
3701
+ }));
3702
+ };
3703
+ AuthorsListBase.propTypes = {
3704
+ data: PropTypes.array,
3705
+ config: PropTypes.shape({
3706
+ enableBio: PropTypes.bool,
3707
+ theme: PropTypes.string
3708
+ }),
3709
+ getMoreData: PropTypes.object.isRequired,
3710
+ limit: PropTypes.number,
3711
+ hideLoadmore: PropTypes.bool
3712
+ };
3713
+ var AuthorsList = StateProvider(AuthorsListBase);
3714
+
3715
+ export { AuthorsList, AuthorsListBase };