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