@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,3136 @@
1
+ import React, { useContext, createContext } from 'react';
2
+ import PropTypes, { PropTypes as PropTypes$1 } from 'prop-types';
3
+ import { connect, useDispatch, useSelector } from 'react-redux';
4
+ import { Link, LinkBase, LazyLoadImages, ResponsiveImage } from '@quintype/components';
5
+ import Timeago from 'react-timeago';
6
+ import { utcToZonedTime, format } from 'date-fns-tz';
7
+
8
+ function _defineProperty(obj, key, value) {
9
+ if (key in obj) {
10
+ Object.defineProperty(obj, key, {
11
+ value: value,
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true
15
+ });
16
+ } else {
17
+ obj[key] = value;
18
+ }
19
+
20
+ return obj;
21
+ }
22
+
23
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
24
+
25
+ function getDefaultExportFromCjs (x) {
26
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
27
+ }
28
+
29
+ function createCommonjsModule(fn) {
30
+ var module = { exports: {} };
31
+ return fn(module, module.exports), module.exports;
32
+ }
33
+
34
+ var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
35
+
36
+ Object.defineProperty(exports, "__esModule", {
37
+ value: true
38
+ });
39
+ exports["default"] = void 0;
40
+ var optionsDefaults = {
41
+ attributeNames: {
42
+ styleName: 'className'
43
+ },
44
+ generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
45
+ handleMissingStyleName: 'throw'
46
+ };
47
+ var _default = optionsDefaults;
48
+ exports["default"] = _default;
49
+
50
+
51
+ });
52
+
53
+ var getClassName = createCommonjsModule(function (module, exports) {
54
+
55
+ Object.defineProperty(exports, "__esModule", {
56
+ value: true
57
+ });
58
+ exports["default"] = void 0;
59
+
60
+ var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
61
+
62
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
63
+
64
+ var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
65
+ return styleName.indexOf('.') !== -1;
66
+ };
67
+
68
+ var handleError = function handleError(message, handleMissingStyleName) {
69
+ if (handleMissingStyleName === 'throw') {
70
+ throw new Error(message);
71
+ } else if (handleMissingStyleName === 'warn') {
72
+ // eslint-disable-next-line no-console
73
+ console.warn(message);
74
+ }
75
+
76
+ return null;
77
+ };
78
+
79
+ var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
80
+ // Note:
81
+ // Do not use the desctructing syntax with Babel.
82
+ // Desctructing adds _slicedToArray helper.
83
+ var styleNameParts = styleName.split('.');
84
+ var importName = styleNameParts[0];
85
+ var moduleName = styleNameParts[1];
86
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
87
+
88
+ if (!moduleName) {
89
+ return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
90
+ }
91
+
92
+ if (!styleModuleImportMap[importName]) {
93
+ return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
94
+ }
95
+
96
+ if (!styleModuleImportMap[importName][moduleName]) {
97
+ return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
98
+ }
99
+
100
+ return styleModuleImportMap[importName][moduleName];
101
+ };
102
+
103
+ var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
104
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
105
+ var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
106
+ return styleModuleImportMap[importKey][styleName] && importKey;
107
+ }).filter(function (importKey) {
108
+ return importKey;
109
+ });
110
+
111
+ if (importKeysWithMatches.length > 1) {
112
+ 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');
113
+ }
114
+
115
+ if (importKeysWithMatches.length === 0) {
116
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
117
+ }
118
+
119
+ return styleModuleImportMap[importKeysWithMatches[0]][styleName];
120
+ };
121
+
122
+ var _default = function _default(styleNameValue, styleModuleImportMap, options) {
123
+ var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
124
+
125
+ var _ref = options || {},
126
+ _ref$handleMissingSty = _ref.handleMissingStyleName,
127
+ handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
128
+ _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
129
+ autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
130
+
131
+ if (!styleNameValue) {
132
+ return '';
133
+ }
134
+
135
+ return styleNameValue.split(' ').filter(function (styleName) {
136
+ return styleName;
137
+ }).map(function (styleName) {
138
+ if (isNamespacedStyleName(styleName)) {
139
+ return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
140
+ }
141
+
142
+ if (styleModuleImportMapKeys.length === 0) {
143
+ throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
144
+ }
145
+
146
+ if (styleModuleImportMapKeys.length > 1) {
147
+ if (!autoResolveMultipleImports) {
148
+ throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
149
+ }
150
+
151
+ return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
152
+ }
153
+
154
+ var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
155
+
156
+ if (!styleModuleMap[styleName]) {
157
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
158
+ }
159
+
160
+ return styleModuleMap[styleName];
161
+ }).filter(function (className) {
162
+ // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
163
+ return className;
164
+ }).join(' ');
165
+ };
166
+
167
+ exports["default"] = _default;
168
+
169
+
170
+ });
171
+
172
+ var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
173
+
174
+ var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
175
+
176
+ var StateProvider = function StateProvider(RowComponent) {
177
+ return function (props) {
178
+ return (
179
+ /*#__PURE__*/
180
+ // eslint-disable-next-line react/prop-types
181
+ React.createElement(StateContext.Provider, {
182
+ value: props.config
183
+ }, /*#__PURE__*/React.createElement(RowComponent, props))
184
+ );
185
+ };
186
+ };
187
+ var useStateValue = function useStateValue() {
188
+ return useContext(StateContext);
189
+ };
190
+
191
+ /**
192
+ * Checks if `value` is classified as an `Array` object.
193
+ *
194
+ * @static
195
+ * @memberOf _
196
+ * @since 0.1.0
197
+ * @category Lang
198
+ * @param {*} value The value to check.
199
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
200
+ * @example
201
+ *
202
+ * _.isArray([1, 2, 3]);
203
+ * // => true
204
+ *
205
+ * _.isArray(document.body.children);
206
+ * // => false
207
+ *
208
+ * _.isArray('abc');
209
+ * // => false
210
+ *
211
+ * _.isArray(_.noop);
212
+ * // => false
213
+ */
214
+ var isArray = Array.isArray;
215
+
216
+ var isArray_1 = isArray;
217
+
218
+ /** Detect free variable `global` from Node.js. */
219
+
220
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
221
+
222
+ var _freeGlobal = freeGlobal;
223
+
224
+ /** Detect free variable `self`. */
225
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
226
+
227
+ /** Used as a reference to the global object. */
228
+ var root = _freeGlobal || freeSelf || Function('return this')();
229
+
230
+ var _root = root;
231
+
232
+ /** Built-in value references. */
233
+ var Symbol$1 = _root.Symbol;
234
+
235
+ var _Symbol = Symbol$1;
236
+
237
+ /** Used for built-in method references. */
238
+ var objectProto$4 = Object.prototype;
239
+
240
+ /** Used to check objects for own properties. */
241
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
242
+
243
+ /**
244
+ * Used to resolve the
245
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
246
+ * of values.
247
+ */
248
+ var nativeObjectToString$1 = objectProto$4.toString;
249
+
250
+ /** Built-in value references. */
251
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
252
+
253
+ /**
254
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
255
+ *
256
+ * @private
257
+ * @param {*} value The value to query.
258
+ * @returns {string} Returns the raw `toStringTag`.
259
+ */
260
+ function getRawTag(value) {
261
+ var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
262
+ tag = value[symToStringTag$1];
263
+
264
+ try {
265
+ value[symToStringTag$1] = undefined;
266
+ var unmasked = true;
267
+ } catch (e) {}
268
+
269
+ var result = nativeObjectToString$1.call(value);
270
+ if (unmasked) {
271
+ if (isOwn) {
272
+ value[symToStringTag$1] = tag;
273
+ } else {
274
+ delete value[symToStringTag$1];
275
+ }
276
+ }
277
+ return result;
278
+ }
279
+
280
+ var _getRawTag = getRawTag;
281
+
282
+ /** Used for built-in method references. */
283
+ var objectProto$3 = Object.prototype;
284
+
285
+ /**
286
+ * Used to resolve the
287
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
288
+ * of values.
289
+ */
290
+ var nativeObjectToString = objectProto$3.toString;
291
+
292
+ /**
293
+ * Converts `value` to a string using `Object.prototype.toString`.
294
+ *
295
+ * @private
296
+ * @param {*} value The value to convert.
297
+ * @returns {string} Returns the converted string.
298
+ */
299
+ function objectToString(value) {
300
+ return nativeObjectToString.call(value);
301
+ }
302
+
303
+ var _objectToString = objectToString;
304
+
305
+ /** `Object#toString` result references. */
306
+ var nullTag = '[object Null]',
307
+ undefinedTag = '[object Undefined]';
308
+
309
+ /** Built-in value references. */
310
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
311
+
312
+ /**
313
+ * The base implementation of `getTag` without fallbacks for buggy environments.
314
+ *
315
+ * @private
316
+ * @param {*} value The value to query.
317
+ * @returns {string} Returns the `toStringTag`.
318
+ */
319
+ function baseGetTag(value) {
320
+ if (value == null) {
321
+ return value === undefined ? undefinedTag : nullTag;
322
+ }
323
+ return (symToStringTag && symToStringTag in Object(value))
324
+ ? _getRawTag(value)
325
+ : _objectToString(value);
326
+ }
327
+
328
+ var _baseGetTag = baseGetTag;
329
+
330
+ /**
331
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
332
+ * and has a `typeof` result of "object".
333
+ *
334
+ * @static
335
+ * @memberOf _
336
+ * @since 4.0.0
337
+ * @category Lang
338
+ * @param {*} value The value to check.
339
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
340
+ * @example
341
+ *
342
+ * _.isObjectLike({});
343
+ * // => true
344
+ *
345
+ * _.isObjectLike([1, 2, 3]);
346
+ * // => true
347
+ *
348
+ * _.isObjectLike(_.noop);
349
+ * // => false
350
+ *
351
+ * _.isObjectLike(null);
352
+ * // => false
353
+ */
354
+ function isObjectLike(value) {
355
+ return value != null && typeof value == 'object';
356
+ }
357
+
358
+ var isObjectLike_1 = isObjectLike;
359
+
360
+ /** `Object#toString` result references. */
361
+ var symbolTag = '[object Symbol]';
362
+
363
+ /**
364
+ * Checks if `value` is classified as a `Symbol` primitive or object.
365
+ *
366
+ * @static
367
+ * @memberOf _
368
+ * @since 4.0.0
369
+ * @category Lang
370
+ * @param {*} value The value to check.
371
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
372
+ * @example
373
+ *
374
+ * _.isSymbol(Symbol.iterator);
375
+ * // => true
376
+ *
377
+ * _.isSymbol('abc');
378
+ * // => false
379
+ */
380
+ function isSymbol(value) {
381
+ return typeof value == 'symbol' ||
382
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
383
+ }
384
+
385
+ var isSymbol_1 = isSymbol;
386
+
387
+ /** Used to match property names within property paths. */
388
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
389
+ reIsPlainProp = /^\w*$/;
390
+
391
+ /**
392
+ * Checks if `value` is a property name and not a property path.
393
+ *
394
+ * @private
395
+ * @param {*} value The value to check.
396
+ * @param {Object} [object] The object to query keys on.
397
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
398
+ */
399
+ function isKey(value, object) {
400
+ if (isArray_1(value)) {
401
+ return false;
402
+ }
403
+ var type = typeof value;
404
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
405
+ value == null || isSymbol_1(value)) {
406
+ return true;
407
+ }
408
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
409
+ (object != null && value in Object(object));
410
+ }
411
+
412
+ var _isKey = isKey;
413
+
414
+ /**
415
+ * Checks if `value` is the
416
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
417
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
418
+ *
419
+ * @static
420
+ * @memberOf _
421
+ * @since 0.1.0
422
+ * @category Lang
423
+ * @param {*} value The value to check.
424
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
425
+ * @example
426
+ *
427
+ * _.isObject({});
428
+ * // => true
429
+ *
430
+ * _.isObject([1, 2, 3]);
431
+ * // => true
432
+ *
433
+ * _.isObject(_.noop);
434
+ * // => true
435
+ *
436
+ * _.isObject(null);
437
+ * // => false
438
+ */
439
+ function isObject(value) {
440
+ var type = typeof value;
441
+ return value != null && (type == 'object' || type == 'function');
442
+ }
443
+
444
+ var isObject_1 = isObject;
445
+
446
+ /** `Object#toString` result references. */
447
+ var asyncTag = '[object AsyncFunction]',
448
+ funcTag = '[object Function]',
449
+ genTag = '[object GeneratorFunction]',
450
+ proxyTag = '[object Proxy]';
451
+
452
+ /**
453
+ * Checks if `value` is classified as a `Function` object.
454
+ *
455
+ * @static
456
+ * @memberOf _
457
+ * @since 0.1.0
458
+ * @category Lang
459
+ * @param {*} value The value to check.
460
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
461
+ * @example
462
+ *
463
+ * _.isFunction(_);
464
+ * // => true
465
+ *
466
+ * _.isFunction(/abc/);
467
+ * // => false
468
+ */
469
+ function isFunction(value) {
470
+ if (!isObject_1(value)) {
471
+ return false;
472
+ }
473
+ // The use of `Object#toString` avoids issues with the `typeof` operator
474
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
475
+ var tag = _baseGetTag(value);
476
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
477
+ }
478
+
479
+ var isFunction_1 = isFunction;
480
+
481
+ /** Used to detect overreaching core-js shims. */
482
+ var coreJsData = _root['__core-js_shared__'];
483
+
484
+ var _coreJsData = coreJsData;
485
+
486
+ /** Used to detect methods masquerading as native. */
487
+ var maskSrcKey = (function() {
488
+ var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
489
+ return uid ? ('Symbol(src)_1.' + uid) : '';
490
+ }());
491
+
492
+ /**
493
+ * Checks if `func` has its source masked.
494
+ *
495
+ * @private
496
+ * @param {Function} func The function to check.
497
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
498
+ */
499
+ function isMasked(func) {
500
+ return !!maskSrcKey && (maskSrcKey in func);
501
+ }
502
+
503
+ var _isMasked = isMasked;
504
+
505
+ /** Used for built-in method references. */
506
+ var funcProto$1 = Function.prototype;
507
+
508
+ /** Used to resolve the decompiled source of functions. */
509
+ var funcToString$1 = funcProto$1.toString;
510
+
511
+ /**
512
+ * Converts `func` to its source code.
513
+ *
514
+ * @private
515
+ * @param {Function} func The function to convert.
516
+ * @returns {string} Returns the source code.
517
+ */
518
+ function toSource(func) {
519
+ if (func != null) {
520
+ try {
521
+ return funcToString$1.call(func);
522
+ } catch (e) {}
523
+ try {
524
+ return (func + '');
525
+ } catch (e) {}
526
+ }
527
+ return '';
528
+ }
529
+
530
+ var _toSource = toSource;
531
+
532
+ /**
533
+ * Used to match `RegExp`
534
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
535
+ */
536
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
537
+
538
+ /** Used to detect host constructors (Safari). */
539
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
540
+
541
+ /** Used for built-in method references. */
542
+ var funcProto = Function.prototype,
543
+ objectProto$2 = Object.prototype;
544
+
545
+ /** Used to resolve the decompiled source of functions. */
546
+ var funcToString = funcProto.toString;
547
+
548
+ /** Used to check objects for own properties. */
549
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
550
+
551
+ /** Used to detect if a method is native. */
552
+ var reIsNative = RegExp('^' +
553
+ funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
554
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
555
+ );
556
+
557
+ /**
558
+ * The base implementation of `_.isNative` without bad shim checks.
559
+ *
560
+ * @private
561
+ * @param {*} value The value to check.
562
+ * @returns {boolean} Returns `true` if `value` is a native function,
563
+ * else `false`.
564
+ */
565
+ function baseIsNative(value) {
566
+ if (!isObject_1(value) || _isMasked(value)) {
567
+ return false;
568
+ }
569
+ var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
570
+ return pattern.test(_toSource(value));
571
+ }
572
+
573
+ var _baseIsNative = baseIsNative;
574
+
575
+ /**
576
+ * Gets the value at `key` of `object`.
577
+ *
578
+ * @private
579
+ * @param {Object} [object] The object to query.
580
+ * @param {string} key The key of the property to get.
581
+ * @returns {*} Returns the property value.
582
+ */
583
+ function getValue(object, key) {
584
+ return object == null ? undefined : object[key];
585
+ }
586
+
587
+ var _getValue = getValue;
588
+
589
+ /**
590
+ * Gets the native function at `key` of `object`.
591
+ *
592
+ * @private
593
+ * @param {Object} object The object to query.
594
+ * @param {string} key The key of the method to get.
595
+ * @returns {*} Returns the function if it's native, else `undefined`.
596
+ */
597
+ function getNative(object, key) {
598
+ var value = _getValue(object, key);
599
+ return _baseIsNative(value) ? value : undefined;
600
+ }
601
+
602
+ var _getNative = getNative;
603
+
604
+ /* Built-in method references that are verified to be native. */
605
+ var nativeCreate = _getNative(Object, 'create');
606
+
607
+ var _nativeCreate = nativeCreate;
608
+
609
+ /**
610
+ * Removes all key-value entries from the hash.
611
+ *
612
+ * @private
613
+ * @name clear
614
+ * @memberOf Hash
615
+ */
616
+ function hashClear() {
617
+ this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
618
+ this.size = 0;
619
+ }
620
+
621
+ var _hashClear = hashClear;
622
+
623
+ /**
624
+ * Removes `key` and its value from the hash.
625
+ *
626
+ * @private
627
+ * @name delete
628
+ * @memberOf Hash
629
+ * @param {Object} hash The hash to modify.
630
+ * @param {string} key The key of the value to remove.
631
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
632
+ */
633
+ function hashDelete(key) {
634
+ var result = this.has(key) && delete this.__data__[key];
635
+ this.size -= result ? 1 : 0;
636
+ return result;
637
+ }
638
+
639
+ var _hashDelete = hashDelete;
640
+
641
+ /** Used to stand-in for `undefined` hash values. */
642
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
643
+
644
+ /** Used for built-in method references. */
645
+ var objectProto$1 = Object.prototype;
646
+
647
+ /** Used to check objects for own properties. */
648
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
649
+
650
+ /**
651
+ * Gets the hash value for `key`.
652
+ *
653
+ * @private
654
+ * @name get
655
+ * @memberOf Hash
656
+ * @param {string} key The key of the value to get.
657
+ * @returns {*} Returns the entry value.
658
+ */
659
+ function hashGet(key) {
660
+ var data = this.__data__;
661
+ if (_nativeCreate) {
662
+ var result = data[key];
663
+ return result === HASH_UNDEFINED$1 ? undefined : result;
664
+ }
665
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
666
+ }
667
+
668
+ var _hashGet = hashGet;
669
+
670
+ /** Used for built-in method references. */
671
+ var objectProto = Object.prototype;
672
+
673
+ /** Used to check objects for own properties. */
674
+ var hasOwnProperty = objectProto.hasOwnProperty;
675
+
676
+ /**
677
+ * Checks if a hash value for `key` exists.
678
+ *
679
+ * @private
680
+ * @name has
681
+ * @memberOf Hash
682
+ * @param {string} key The key of the entry to check.
683
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
684
+ */
685
+ function hashHas(key) {
686
+ var data = this.__data__;
687
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
688
+ }
689
+
690
+ var _hashHas = hashHas;
691
+
692
+ /** Used to stand-in for `undefined` hash values. */
693
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
694
+
695
+ /**
696
+ * Sets the hash `key` to `value`.
697
+ *
698
+ * @private
699
+ * @name set
700
+ * @memberOf Hash
701
+ * @param {string} key The key of the value to set.
702
+ * @param {*} value The value to set.
703
+ * @returns {Object} Returns the hash instance.
704
+ */
705
+ function hashSet(key, value) {
706
+ var data = this.__data__;
707
+ this.size += this.has(key) ? 0 : 1;
708
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
709
+ return this;
710
+ }
711
+
712
+ var _hashSet = hashSet;
713
+
714
+ /**
715
+ * Creates a hash object.
716
+ *
717
+ * @private
718
+ * @constructor
719
+ * @param {Array} [entries] The key-value pairs to cache.
720
+ */
721
+ function Hash(entries) {
722
+ var index = -1,
723
+ length = entries == null ? 0 : entries.length;
724
+
725
+ this.clear();
726
+ while (++index < length) {
727
+ var entry = entries[index];
728
+ this.set(entry[0], entry[1]);
729
+ }
730
+ }
731
+
732
+ // Add methods to `Hash`.
733
+ Hash.prototype.clear = _hashClear;
734
+ Hash.prototype['delete'] = _hashDelete;
735
+ Hash.prototype.get = _hashGet;
736
+ Hash.prototype.has = _hashHas;
737
+ Hash.prototype.set = _hashSet;
738
+
739
+ var _Hash = Hash;
740
+
741
+ /**
742
+ * Removes all key-value entries from the list cache.
743
+ *
744
+ * @private
745
+ * @name clear
746
+ * @memberOf ListCache
747
+ */
748
+ function listCacheClear() {
749
+ this.__data__ = [];
750
+ this.size = 0;
751
+ }
752
+
753
+ var _listCacheClear = listCacheClear;
754
+
755
+ /**
756
+ * Performs a
757
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
758
+ * comparison between two values to determine if they are equivalent.
759
+ *
760
+ * @static
761
+ * @memberOf _
762
+ * @since 4.0.0
763
+ * @category Lang
764
+ * @param {*} value The value to compare.
765
+ * @param {*} other The other value to compare.
766
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
767
+ * @example
768
+ *
769
+ * var object = { 'a': 1 };
770
+ * var other = { 'a': 1 };
771
+ *
772
+ * _.eq(object, object);
773
+ * // => true
774
+ *
775
+ * _.eq(object, other);
776
+ * // => false
777
+ *
778
+ * _.eq('a', 'a');
779
+ * // => true
780
+ *
781
+ * _.eq('a', Object('a'));
782
+ * // => false
783
+ *
784
+ * _.eq(NaN, NaN);
785
+ * // => true
786
+ */
787
+ function eq(value, other) {
788
+ return value === other || (value !== value && other !== other);
789
+ }
790
+
791
+ var eq_1 = eq;
792
+
793
+ /**
794
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
795
+ *
796
+ * @private
797
+ * @param {Array} array The array to inspect.
798
+ * @param {*} key The key to search for.
799
+ * @returns {number} Returns the index of the matched value, else `-1`.
800
+ */
801
+ function assocIndexOf(array, key) {
802
+ var length = array.length;
803
+ while (length--) {
804
+ if (eq_1(array[length][0], key)) {
805
+ return length;
806
+ }
807
+ }
808
+ return -1;
809
+ }
810
+
811
+ var _assocIndexOf = assocIndexOf;
812
+
813
+ /** Used for built-in method references. */
814
+ var arrayProto = Array.prototype;
815
+
816
+ /** Built-in value references. */
817
+ var splice = arrayProto.splice;
818
+
819
+ /**
820
+ * Removes `key` and its value from the list cache.
821
+ *
822
+ * @private
823
+ * @name delete
824
+ * @memberOf ListCache
825
+ * @param {string} key The key of the value to remove.
826
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
827
+ */
828
+ function listCacheDelete(key) {
829
+ var data = this.__data__,
830
+ index = _assocIndexOf(data, key);
831
+
832
+ if (index < 0) {
833
+ return false;
834
+ }
835
+ var lastIndex = data.length - 1;
836
+ if (index == lastIndex) {
837
+ data.pop();
838
+ } else {
839
+ splice.call(data, index, 1);
840
+ }
841
+ --this.size;
842
+ return true;
843
+ }
844
+
845
+ var _listCacheDelete = listCacheDelete;
846
+
847
+ /**
848
+ * Gets the list cache value for `key`.
849
+ *
850
+ * @private
851
+ * @name get
852
+ * @memberOf ListCache
853
+ * @param {string} key The key of the value to get.
854
+ * @returns {*} Returns the entry value.
855
+ */
856
+ function listCacheGet(key) {
857
+ var data = this.__data__,
858
+ index = _assocIndexOf(data, key);
859
+
860
+ return index < 0 ? undefined : data[index][1];
861
+ }
862
+
863
+ var _listCacheGet = listCacheGet;
864
+
865
+ /**
866
+ * Checks if a list cache value for `key` exists.
867
+ *
868
+ * @private
869
+ * @name has
870
+ * @memberOf ListCache
871
+ * @param {string} key The key of the entry to check.
872
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
873
+ */
874
+ function listCacheHas(key) {
875
+ return _assocIndexOf(this.__data__, key) > -1;
876
+ }
877
+
878
+ var _listCacheHas = listCacheHas;
879
+
880
+ /**
881
+ * Sets the list cache `key` to `value`.
882
+ *
883
+ * @private
884
+ * @name set
885
+ * @memberOf ListCache
886
+ * @param {string} key The key of the value to set.
887
+ * @param {*} value The value to set.
888
+ * @returns {Object} Returns the list cache instance.
889
+ */
890
+ function listCacheSet(key, value) {
891
+ var data = this.__data__,
892
+ index = _assocIndexOf(data, key);
893
+
894
+ if (index < 0) {
895
+ ++this.size;
896
+ data.push([key, value]);
897
+ } else {
898
+ data[index][1] = value;
899
+ }
900
+ return this;
901
+ }
902
+
903
+ var _listCacheSet = listCacheSet;
904
+
905
+ /**
906
+ * Creates an list cache object.
907
+ *
908
+ * @private
909
+ * @constructor
910
+ * @param {Array} [entries] The key-value pairs to cache.
911
+ */
912
+ function ListCache(entries) {
913
+ var index = -1,
914
+ length = entries == null ? 0 : entries.length;
915
+
916
+ this.clear();
917
+ while (++index < length) {
918
+ var entry = entries[index];
919
+ this.set(entry[0], entry[1]);
920
+ }
921
+ }
922
+
923
+ // Add methods to `ListCache`.
924
+ ListCache.prototype.clear = _listCacheClear;
925
+ ListCache.prototype['delete'] = _listCacheDelete;
926
+ ListCache.prototype.get = _listCacheGet;
927
+ ListCache.prototype.has = _listCacheHas;
928
+ ListCache.prototype.set = _listCacheSet;
929
+
930
+ var _ListCache = ListCache;
931
+
932
+ /* Built-in method references that are verified to be native. */
933
+ var Map = _getNative(_root, 'Map');
934
+
935
+ var _Map = Map;
936
+
937
+ /**
938
+ * Removes all key-value entries from the map.
939
+ *
940
+ * @private
941
+ * @name clear
942
+ * @memberOf MapCache
943
+ */
944
+ function mapCacheClear() {
945
+ this.size = 0;
946
+ this.__data__ = {
947
+ 'hash': new _Hash,
948
+ 'map': new (_Map || _ListCache),
949
+ 'string': new _Hash
950
+ };
951
+ }
952
+
953
+ var _mapCacheClear = mapCacheClear;
954
+
955
+ /**
956
+ * Checks if `value` is suitable for use as unique object key.
957
+ *
958
+ * @private
959
+ * @param {*} value The value to check.
960
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
961
+ */
962
+ function isKeyable(value) {
963
+ var type = typeof value;
964
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
965
+ ? (value !== '__proto__')
966
+ : (value === null);
967
+ }
968
+
969
+ var _isKeyable = isKeyable;
970
+
971
+ /**
972
+ * Gets the data for `map`.
973
+ *
974
+ * @private
975
+ * @param {Object} map The map to query.
976
+ * @param {string} key The reference key.
977
+ * @returns {*} Returns the map data.
978
+ */
979
+ function getMapData(map, key) {
980
+ var data = map.__data__;
981
+ return _isKeyable(key)
982
+ ? data[typeof key == 'string' ? 'string' : 'hash']
983
+ : data.map;
984
+ }
985
+
986
+ var _getMapData = getMapData;
987
+
988
+ /**
989
+ * Removes `key` and its value from the map.
990
+ *
991
+ * @private
992
+ * @name delete
993
+ * @memberOf MapCache
994
+ * @param {string} key The key of the value to remove.
995
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
996
+ */
997
+ function mapCacheDelete(key) {
998
+ var result = _getMapData(this, key)['delete'](key);
999
+ this.size -= result ? 1 : 0;
1000
+ return result;
1001
+ }
1002
+
1003
+ var _mapCacheDelete = mapCacheDelete;
1004
+
1005
+ /**
1006
+ * Gets the map value for `key`.
1007
+ *
1008
+ * @private
1009
+ * @name get
1010
+ * @memberOf MapCache
1011
+ * @param {string} key The key of the value to get.
1012
+ * @returns {*} Returns the entry value.
1013
+ */
1014
+ function mapCacheGet(key) {
1015
+ return _getMapData(this, key).get(key);
1016
+ }
1017
+
1018
+ var _mapCacheGet = mapCacheGet;
1019
+
1020
+ /**
1021
+ * Checks if a map value for `key` exists.
1022
+ *
1023
+ * @private
1024
+ * @name has
1025
+ * @memberOf MapCache
1026
+ * @param {string} key The key of the entry to check.
1027
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1028
+ */
1029
+ function mapCacheHas(key) {
1030
+ return _getMapData(this, key).has(key);
1031
+ }
1032
+
1033
+ var _mapCacheHas = mapCacheHas;
1034
+
1035
+ /**
1036
+ * Sets the map `key` to `value`.
1037
+ *
1038
+ * @private
1039
+ * @name set
1040
+ * @memberOf MapCache
1041
+ * @param {string} key The key of the value to set.
1042
+ * @param {*} value The value to set.
1043
+ * @returns {Object} Returns the map cache instance.
1044
+ */
1045
+ function mapCacheSet(key, value) {
1046
+ var data = _getMapData(this, key),
1047
+ size = data.size;
1048
+
1049
+ data.set(key, value);
1050
+ this.size += data.size == size ? 0 : 1;
1051
+ return this;
1052
+ }
1053
+
1054
+ var _mapCacheSet = mapCacheSet;
1055
+
1056
+ /**
1057
+ * Creates a map cache object to store key-value pairs.
1058
+ *
1059
+ * @private
1060
+ * @constructor
1061
+ * @param {Array} [entries] The key-value pairs to cache.
1062
+ */
1063
+ function MapCache(entries) {
1064
+ var index = -1,
1065
+ length = entries == null ? 0 : entries.length;
1066
+
1067
+ this.clear();
1068
+ while (++index < length) {
1069
+ var entry = entries[index];
1070
+ this.set(entry[0], entry[1]);
1071
+ }
1072
+ }
1073
+
1074
+ // Add methods to `MapCache`.
1075
+ MapCache.prototype.clear = _mapCacheClear;
1076
+ MapCache.prototype['delete'] = _mapCacheDelete;
1077
+ MapCache.prototype.get = _mapCacheGet;
1078
+ MapCache.prototype.has = _mapCacheHas;
1079
+ MapCache.prototype.set = _mapCacheSet;
1080
+
1081
+ var _MapCache = MapCache;
1082
+
1083
+ /** Error message constants. */
1084
+ var FUNC_ERROR_TEXT = 'Expected a function';
1085
+
1086
+ /**
1087
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1088
+ * provided, it determines the cache key for storing the result based on the
1089
+ * arguments provided to the memoized function. By default, the first argument
1090
+ * provided to the memoized function is used as the map cache key. The `func`
1091
+ * is invoked with the `this` binding of the memoized function.
1092
+ *
1093
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1094
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1095
+ * constructor with one whose instances implement the
1096
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1097
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1098
+ *
1099
+ * @static
1100
+ * @memberOf _
1101
+ * @since 0.1.0
1102
+ * @category Function
1103
+ * @param {Function} func The function to have its output memoized.
1104
+ * @param {Function} [resolver] The function to resolve the cache key.
1105
+ * @returns {Function} Returns the new memoized function.
1106
+ * @example
1107
+ *
1108
+ * var object = { 'a': 1, 'b': 2 };
1109
+ * var other = { 'c': 3, 'd': 4 };
1110
+ *
1111
+ * var values = _.memoize(_.values);
1112
+ * values(object);
1113
+ * // => [1, 2]
1114
+ *
1115
+ * values(other);
1116
+ * // => [3, 4]
1117
+ *
1118
+ * object.a = 2;
1119
+ * values(object);
1120
+ * // => [1, 2]
1121
+ *
1122
+ * // Modify the result cache.
1123
+ * values.cache.set(object, ['a', 'b']);
1124
+ * values(object);
1125
+ * // => ['a', 'b']
1126
+ *
1127
+ * // Replace `_.memoize.Cache`.
1128
+ * _.memoize.Cache = WeakMap;
1129
+ */
1130
+ function memoize(func, resolver) {
1131
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1132
+ throw new TypeError(FUNC_ERROR_TEXT);
1133
+ }
1134
+ var memoized = function() {
1135
+ var args = arguments,
1136
+ key = resolver ? resolver.apply(this, args) : args[0],
1137
+ cache = memoized.cache;
1138
+
1139
+ if (cache.has(key)) {
1140
+ return cache.get(key);
1141
+ }
1142
+ var result = func.apply(this, args);
1143
+ memoized.cache = cache.set(key, result) || cache;
1144
+ return result;
1145
+ };
1146
+ memoized.cache = new (memoize.Cache || _MapCache);
1147
+ return memoized;
1148
+ }
1149
+
1150
+ // Expose `MapCache`.
1151
+ memoize.Cache = _MapCache;
1152
+
1153
+ var memoize_1 = memoize;
1154
+
1155
+ /** Used as the maximum memoize cache size. */
1156
+ var MAX_MEMOIZE_SIZE = 500;
1157
+
1158
+ /**
1159
+ * A specialized version of `_.memoize` which clears the memoized function's
1160
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1161
+ *
1162
+ * @private
1163
+ * @param {Function} func The function to have its output memoized.
1164
+ * @returns {Function} Returns the new memoized function.
1165
+ */
1166
+ function memoizeCapped(func) {
1167
+ var result = memoize_1(func, function(key) {
1168
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1169
+ cache.clear();
1170
+ }
1171
+ return key;
1172
+ });
1173
+
1174
+ var cache = result.cache;
1175
+ return result;
1176
+ }
1177
+
1178
+ var _memoizeCapped = memoizeCapped;
1179
+
1180
+ /** Used to match property names within property paths. */
1181
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1182
+
1183
+ /** Used to match backslashes in property paths. */
1184
+ var reEscapeChar = /\\(\\)?/g;
1185
+
1186
+ /**
1187
+ * Converts `string` to a property path array.
1188
+ *
1189
+ * @private
1190
+ * @param {string} string The string to convert.
1191
+ * @returns {Array} Returns the property path array.
1192
+ */
1193
+ var stringToPath = _memoizeCapped(function(string) {
1194
+ var result = [];
1195
+ if (string.charCodeAt(0) === 46 /* . */) {
1196
+ result.push('');
1197
+ }
1198
+ string.replace(rePropName, function(match, number, quote, subString) {
1199
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1200
+ });
1201
+ return result;
1202
+ });
1203
+
1204
+ var _stringToPath = stringToPath;
1205
+
1206
+ /**
1207
+ * A specialized version of `_.map` for arrays without support for iteratee
1208
+ * shorthands.
1209
+ *
1210
+ * @private
1211
+ * @param {Array} [array] The array to iterate over.
1212
+ * @param {Function} iteratee The function invoked per iteration.
1213
+ * @returns {Array} Returns the new mapped array.
1214
+ */
1215
+ function arrayMap(array, iteratee) {
1216
+ var index = -1,
1217
+ length = array == null ? 0 : array.length,
1218
+ result = Array(length);
1219
+
1220
+ while (++index < length) {
1221
+ result[index] = iteratee(array[index], index, array);
1222
+ }
1223
+ return result;
1224
+ }
1225
+
1226
+ var _arrayMap = arrayMap;
1227
+
1228
+ /** Used as references for various `Number` constants. */
1229
+ var INFINITY$1 = 1 / 0;
1230
+
1231
+ /** Used to convert symbols to primitives and strings. */
1232
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1233
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
1234
+
1235
+ /**
1236
+ * The base implementation of `_.toString` which doesn't convert nullish
1237
+ * values to empty strings.
1238
+ *
1239
+ * @private
1240
+ * @param {*} value The value to process.
1241
+ * @returns {string} Returns the string.
1242
+ */
1243
+ function baseToString(value) {
1244
+ // Exit early for strings to avoid a performance hit in some environments.
1245
+ if (typeof value == 'string') {
1246
+ return value;
1247
+ }
1248
+ if (isArray_1(value)) {
1249
+ // Recursively convert values (susceptible to call stack limits).
1250
+ return _arrayMap(value, baseToString) + '';
1251
+ }
1252
+ if (isSymbol_1(value)) {
1253
+ return symbolToString ? symbolToString.call(value) : '';
1254
+ }
1255
+ var result = (value + '');
1256
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1257
+ }
1258
+
1259
+ var _baseToString = baseToString;
1260
+
1261
+ /**
1262
+ * Converts `value` to a string. An empty string is returned for `null`
1263
+ * and `undefined` values. The sign of `-0` is preserved.
1264
+ *
1265
+ * @static
1266
+ * @memberOf _
1267
+ * @since 4.0.0
1268
+ * @category Lang
1269
+ * @param {*} value The value to convert.
1270
+ * @returns {string} Returns the converted string.
1271
+ * @example
1272
+ *
1273
+ * _.toString(null);
1274
+ * // => ''
1275
+ *
1276
+ * _.toString(-0);
1277
+ * // => '-0'
1278
+ *
1279
+ * _.toString([1, 2, 3]);
1280
+ * // => '1,2,3'
1281
+ */
1282
+ function toString(value) {
1283
+ return value == null ? '' : _baseToString(value);
1284
+ }
1285
+
1286
+ var toString_1 = toString;
1287
+
1288
+ /**
1289
+ * Casts `value` to a path array if it's not one.
1290
+ *
1291
+ * @private
1292
+ * @param {*} value The value to inspect.
1293
+ * @param {Object} [object] The object to query keys on.
1294
+ * @returns {Array} Returns the cast property path array.
1295
+ */
1296
+ function castPath(value, object) {
1297
+ if (isArray_1(value)) {
1298
+ return value;
1299
+ }
1300
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1301
+ }
1302
+
1303
+ var _castPath = castPath;
1304
+
1305
+ /** Used as references for various `Number` constants. */
1306
+ var INFINITY = 1 / 0;
1307
+
1308
+ /**
1309
+ * Converts `value` to a string key if it's not a string or symbol.
1310
+ *
1311
+ * @private
1312
+ * @param {*} value The value to inspect.
1313
+ * @returns {string|symbol} Returns the key.
1314
+ */
1315
+ function toKey(value) {
1316
+ if (typeof value == 'string' || isSymbol_1(value)) {
1317
+ return value;
1318
+ }
1319
+ var result = (value + '');
1320
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1321
+ }
1322
+
1323
+ var _toKey = toKey;
1324
+
1325
+ /**
1326
+ * The base implementation of `_.get` without support for default values.
1327
+ *
1328
+ * @private
1329
+ * @param {Object} object The object to query.
1330
+ * @param {Array|string} path The path of the property to get.
1331
+ * @returns {*} Returns the resolved value.
1332
+ */
1333
+ function baseGet(object, path) {
1334
+ path = _castPath(path, object);
1335
+
1336
+ var index = 0,
1337
+ length = path.length;
1338
+
1339
+ while (object != null && index < length) {
1340
+ object = object[_toKey(path[index++])];
1341
+ }
1342
+ return (index && index == length) ? object : undefined;
1343
+ }
1344
+
1345
+ var _baseGet = baseGet;
1346
+
1347
+ /**
1348
+ * Gets the value at `path` of `object`. If the resolved value is
1349
+ * `undefined`, the `defaultValue` is returned in its place.
1350
+ *
1351
+ * @static
1352
+ * @memberOf _
1353
+ * @since 3.7.0
1354
+ * @category Object
1355
+ * @param {Object} object The object to query.
1356
+ * @param {Array|string} path The path of the property to get.
1357
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1358
+ * @returns {*} Returns the resolved value.
1359
+ * @example
1360
+ *
1361
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1362
+ *
1363
+ * _.get(object, 'a[0].b.c');
1364
+ * // => 3
1365
+ *
1366
+ * _.get(object, ['a', '0', 'b', 'c']);
1367
+ * // => 3
1368
+ *
1369
+ * _.get(object, 'a.b.c', 'default');
1370
+ * // => 'default'
1371
+ */
1372
+ function get(object, path, defaultValue) {
1373
+ var result = object == null ? undefined : _baseGet(object, path);
1374
+ return result === undefined ? defaultValue : result;
1375
+ }
1376
+
1377
+ var get_1 = get;
1378
+
1379
+ /**
1380
+ * Copyright (c) 2014-present, Facebook, Inc.
1381
+ *
1382
+ * This source code is licensed under the MIT license found in the
1383
+ * LICENSE file in the root directory of this source tree.
1384
+ */
1385
+
1386
+ createCommonjsModule(function (module) {
1387
+ var runtime = (function (exports) {
1388
+
1389
+ var Op = Object.prototype;
1390
+ var hasOwn = Op.hasOwnProperty;
1391
+ var undefined$1; // More compressible than void 0.
1392
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
1393
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
1394
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
1395
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1396
+
1397
+ function define(obj, key, value) {
1398
+ Object.defineProperty(obj, key, {
1399
+ value: value,
1400
+ enumerable: true,
1401
+ configurable: true,
1402
+ writable: true
1403
+ });
1404
+ return obj[key];
1405
+ }
1406
+ try {
1407
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
1408
+ define({}, "");
1409
+ } catch (err) {
1410
+ define = function(obj, key, value) {
1411
+ return obj[key] = value;
1412
+ };
1413
+ }
1414
+
1415
+ function wrap(innerFn, outerFn, self, tryLocsList) {
1416
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1417
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1418
+ var generator = Object.create(protoGenerator.prototype);
1419
+ var context = new Context(tryLocsList || []);
1420
+
1421
+ // The ._invoke method unifies the implementations of the .next,
1422
+ // .throw, and .return methods.
1423
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
1424
+
1425
+ return generator;
1426
+ }
1427
+ exports.wrap = wrap;
1428
+
1429
+ // Try/catch helper to minimize deoptimizations. Returns a completion
1430
+ // record like context.tryEntries[i].completion. This interface could
1431
+ // have been (and was previously) designed to take a closure to be
1432
+ // invoked without arguments, but in all the cases we care about we
1433
+ // already have an existing method we want to call, so there's no need
1434
+ // to create a new function object. We can even get away with assuming
1435
+ // the method takes exactly one argument, since that happens to be true
1436
+ // in every case, so we don't have to touch the arguments object. The
1437
+ // only additional allocation required is the completion record, which
1438
+ // has a stable shape and so hopefully should be cheap to allocate.
1439
+ function tryCatch(fn, obj, arg) {
1440
+ try {
1441
+ return { type: "normal", arg: fn.call(obj, arg) };
1442
+ } catch (err) {
1443
+ return { type: "throw", arg: err };
1444
+ }
1445
+ }
1446
+
1447
+ var GenStateSuspendedStart = "suspendedStart";
1448
+ var GenStateSuspendedYield = "suspendedYield";
1449
+ var GenStateExecuting = "executing";
1450
+ var GenStateCompleted = "completed";
1451
+
1452
+ // Returning this object from the innerFn has the same effect as
1453
+ // breaking out of the dispatch switch statement.
1454
+ var ContinueSentinel = {};
1455
+
1456
+ // Dummy constructor functions that we use as the .constructor and
1457
+ // .constructor.prototype properties for functions that return Generator
1458
+ // objects. For full spec compliance, you may wish to configure your
1459
+ // minifier not to mangle the names of these two functions.
1460
+ function Generator() {}
1461
+ function GeneratorFunction() {}
1462
+ function GeneratorFunctionPrototype() {}
1463
+
1464
+ // This is a polyfill for %IteratorPrototype% for environments that
1465
+ // don't natively support it.
1466
+ var IteratorPrototype = {};
1467
+ define(IteratorPrototype, iteratorSymbol, function () {
1468
+ return this;
1469
+ });
1470
+
1471
+ var getProto = Object.getPrototypeOf;
1472
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1473
+ if (NativeIteratorPrototype &&
1474
+ NativeIteratorPrototype !== Op &&
1475
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1476
+ // This environment has a native %IteratorPrototype%; use it instead
1477
+ // of the polyfill.
1478
+ IteratorPrototype = NativeIteratorPrototype;
1479
+ }
1480
+
1481
+ var Gp = GeneratorFunctionPrototype.prototype =
1482
+ Generator.prototype = Object.create(IteratorPrototype);
1483
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
1484
+ define(Gp, "constructor", GeneratorFunctionPrototype);
1485
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
1486
+ GeneratorFunction.displayName = define(
1487
+ GeneratorFunctionPrototype,
1488
+ toStringTagSymbol,
1489
+ "GeneratorFunction"
1490
+ );
1491
+
1492
+ // Helper for defining the .next, .throw, and .return methods of the
1493
+ // Iterator interface in terms of a single ._invoke method.
1494
+ function defineIteratorMethods(prototype) {
1495
+ ["next", "throw", "return"].forEach(function(method) {
1496
+ define(prototype, method, function(arg) {
1497
+ return this._invoke(method, arg);
1498
+ });
1499
+ });
1500
+ }
1501
+
1502
+ exports.isGeneratorFunction = function(genFun) {
1503
+ var ctor = typeof genFun === "function" && genFun.constructor;
1504
+ return ctor
1505
+ ? ctor === GeneratorFunction ||
1506
+ // For the native GeneratorFunction constructor, the best we can
1507
+ // do is to check its .name property.
1508
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
1509
+ : false;
1510
+ };
1511
+
1512
+ exports.mark = function(genFun) {
1513
+ if (Object.setPrototypeOf) {
1514
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1515
+ } else {
1516
+ genFun.__proto__ = GeneratorFunctionPrototype;
1517
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
1518
+ }
1519
+ genFun.prototype = Object.create(Gp);
1520
+ return genFun;
1521
+ };
1522
+
1523
+ // Within the body of any async function, `await x` is transformed to
1524
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1525
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
1526
+ // meant to be awaited.
1527
+ exports.awrap = function(arg) {
1528
+ return { __await: arg };
1529
+ };
1530
+
1531
+ function AsyncIterator(generator, PromiseImpl) {
1532
+ function invoke(method, arg, resolve, reject) {
1533
+ var record = tryCatch(generator[method], generator, arg);
1534
+ if (record.type === "throw") {
1535
+ reject(record.arg);
1536
+ } else {
1537
+ var result = record.arg;
1538
+ var value = result.value;
1539
+ if (value &&
1540
+ typeof value === "object" &&
1541
+ hasOwn.call(value, "__await")) {
1542
+ return PromiseImpl.resolve(value.__await).then(function(value) {
1543
+ invoke("next", value, resolve, reject);
1544
+ }, function(err) {
1545
+ invoke("throw", err, resolve, reject);
1546
+ });
1547
+ }
1548
+
1549
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
1550
+ // When a yielded Promise is resolved, its final value becomes
1551
+ // the .value of the Promise<{value,done}> result for the
1552
+ // current iteration.
1553
+ result.value = unwrapped;
1554
+ resolve(result);
1555
+ }, function(error) {
1556
+ // If a rejected Promise was yielded, throw the rejection back
1557
+ // into the async generator function so it can be handled there.
1558
+ return invoke("throw", error, resolve, reject);
1559
+ });
1560
+ }
1561
+ }
1562
+
1563
+ var previousPromise;
1564
+
1565
+ function enqueue(method, arg) {
1566
+ function callInvokeWithMethodAndArg() {
1567
+ return new PromiseImpl(function(resolve, reject) {
1568
+ invoke(method, arg, resolve, reject);
1569
+ });
1570
+ }
1571
+
1572
+ return previousPromise =
1573
+ // If enqueue has been called before, then we want to wait until
1574
+ // all previous Promises have been resolved before calling invoke,
1575
+ // so that results are always delivered in the correct order. If
1576
+ // enqueue has not been called before, then it is important to
1577
+ // call invoke immediately, without waiting on a callback to fire,
1578
+ // so that the async generator function has the opportunity to do
1579
+ // any necessary setup in a predictable way. This predictability
1580
+ // is why the Promise constructor synchronously invokes its
1581
+ // executor callback, and why async functions synchronously
1582
+ // execute code before the first await. Since we implement simple
1583
+ // async functions in terms of async generators, it is especially
1584
+ // important to get this right, even though it requires care.
1585
+ previousPromise ? previousPromise.then(
1586
+ callInvokeWithMethodAndArg,
1587
+ // Avoid propagating failures to Promises returned by later
1588
+ // invocations of the iterator.
1589
+ callInvokeWithMethodAndArg
1590
+ ) : callInvokeWithMethodAndArg();
1591
+ }
1592
+
1593
+ // Define the unified helper method that is used to implement .next,
1594
+ // .throw, and .return (see defineIteratorMethods).
1595
+ this._invoke = enqueue;
1596
+ }
1597
+
1598
+ defineIteratorMethods(AsyncIterator.prototype);
1599
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
1600
+ return this;
1601
+ });
1602
+ exports.AsyncIterator = AsyncIterator;
1603
+
1604
+ // Note that simple async functions are implemented on top of
1605
+ // AsyncIterator objects; they just return a Promise for the value of
1606
+ // the final result produced by the iterator.
1607
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1608
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
1609
+
1610
+ var iter = new AsyncIterator(
1611
+ wrap(innerFn, outerFn, self, tryLocsList),
1612
+ PromiseImpl
1613
+ );
1614
+
1615
+ return exports.isGeneratorFunction(outerFn)
1616
+ ? iter // If outerFn is a generator, return the full iterator.
1617
+ : iter.next().then(function(result) {
1618
+ return result.done ? result.value : iter.next();
1619
+ });
1620
+ };
1621
+
1622
+ function makeInvokeMethod(innerFn, self, context) {
1623
+ var state = GenStateSuspendedStart;
1624
+
1625
+ return function invoke(method, arg) {
1626
+ if (state === GenStateExecuting) {
1627
+ throw new Error("Generator is already running");
1628
+ }
1629
+
1630
+ if (state === GenStateCompleted) {
1631
+ if (method === "throw") {
1632
+ throw arg;
1633
+ }
1634
+
1635
+ // Be forgiving, per 25.3.3.3.3 of the spec:
1636
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1637
+ return doneResult();
1638
+ }
1639
+
1640
+ context.method = method;
1641
+ context.arg = arg;
1642
+
1643
+ while (true) {
1644
+ var delegate = context.delegate;
1645
+ if (delegate) {
1646
+ var delegateResult = maybeInvokeDelegate(delegate, context);
1647
+ if (delegateResult) {
1648
+ if (delegateResult === ContinueSentinel) continue;
1649
+ return delegateResult;
1650
+ }
1651
+ }
1652
+
1653
+ if (context.method === "next") {
1654
+ // Setting context._sent for legacy support of Babel's
1655
+ // function.sent implementation.
1656
+ context.sent = context._sent = context.arg;
1657
+
1658
+ } else if (context.method === "throw") {
1659
+ if (state === GenStateSuspendedStart) {
1660
+ state = GenStateCompleted;
1661
+ throw context.arg;
1662
+ }
1663
+
1664
+ context.dispatchException(context.arg);
1665
+
1666
+ } else if (context.method === "return") {
1667
+ context.abrupt("return", context.arg);
1668
+ }
1669
+
1670
+ state = GenStateExecuting;
1671
+
1672
+ var record = tryCatch(innerFn, self, context);
1673
+ if (record.type === "normal") {
1674
+ // If an exception is thrown from innerFn, we leave state ===
1675
+ // GenStateExecuting and loop back for another invocation.
1676
+ state = context.done
1677
+ ? GenStateCompleted
1678
+ : GenStateSuspendedYield;
1679
+
1680
+ if (record.arg === ContinueSentinel) {
1681
+ continue;
1682
+ }
1683
+
1684
+ return {
1685
+ value: record.arg,
1686
+ done: context.done
1687
+ };
1688
+
1689
+ } else if (record.type === "throw") {
1690
+ state = GenStateCompleted;
1691
+ // Dispatch the exception by looping back around to the
1692
+ // context.dispatchException(context.arg) call above.
1693
+ context.method = "throw";
1694
+ context.arg = record.arg;
1695
+ }
1696
+ }
1697
+ };
1698
+ }
1699
+
1700
+ // Call delegate.iterator[context.method](context.arg) and handle the
1701
+ // result, either by returning a { value, done } result from the
1702
+ // delegate iterator, or by modifying context.method and context.arg,
1703
+ // setting context.delegate to null, and returning the ContinueSentinel.
1704
+ function maybeInvokeDelegate(delegate, context) {
1705
+ var method = delegate.iterator[context.method];
1706
+ if (method === undefined$1) {
1707
+ // A .throw or .return when the delegate iterator has no .throw
1708
+ // method always terminates the yield* loop.
1709
+ context.delegate = null;
1710
+
1711
+ if (context.method === "throw") {
1712
+ // Note: ["return"] must be used for ES3 parsing compatibility.
1713
+ if (delegate.iterator["return"]) {
1714
+ // If the delegate iterator has a return method, give it a
1715
+ // chance to clean up.
1716
+ context.method = "return";
1717
+ context.arg = undefined$1;
1718
+ maybeInvokeDelegate(delegate, context);
1719
+
1720
+ if (context.method === "throw") {
1721
+ // If maybeInvokeDelegate(context) changed context.method from
1722
+ // "return" to "throw", let that override the TypeError below.
1723
+ return ContinueSentinel;
1724
+ }
1725
+ }
1726
+
1727
+ context.method = "throw";
1728
+ context.arg = new TypeError(
1729
+ "The iterator does not provide a 'throw' method");
1730
+ }
1731
+
1732
+ return ContinueSentinel;
1733
+ }
1734
+
1735
+ var record = tryCatch(method, delegate.iterator, context.arg);
1736
+
1737
+ if (record.type === "throw") {
1738
+ context.method = "throw";
1739
+ context.arg = record.arg;
1740
+ context.delegate = null;
1741
+ return ContinueSentinel;
1742
+ }
1743
+
1744
+ var info = record.arg;
1745
+
1746
+ if (! info) {
1747
+ context.method = "throw";
1748
+ context.arg = new TypeError("iterator result is not an object");
1749
+ context.delegate = null;
1750
+ return ContinueSentinel;
1751
+ }
1752
+
1753
+ if (info.done) {
1754
+ // Assign the result of the finished delegate to the temporary
1755
+ // variable specified by delegate.resultName (see delegateYield).
1756
+ context[delegate.resultName] = info.value;
1757
+
1758
+ // Resume execution at the desired location (see delegateYield).
1759
+ context.next = delegate.nextLoc;
1760
+
1761
+ // If context.method was "throw" but the delegate handled the
1762
+ // exception, let the outer generator proceed normally. If
1763
+ // context.method was "next", forget context.arg since it has been
1764
+ // "consumed" by the delegate iterator. If context.method was
1765
+ // "return", allow the original .return call to continue in the
1766
+ // outer generator.
1767
+ if (context.method !== "return") {
1768
+ context.method = "next";
1769
+ context.arg = undefined$1;
1770
+ }
1771
+
1772
+ } else {
1773
+ // Re-yield the result returned by the delegate method.
1774
+ return info;
1775
+ }
1776
+
1777
+ // The delegate iterator is finished, so forget it and continue with
1778
+ // the outer generator.
1779
+ context.delegate = null;
1780
+ return ContinueSentinel;
1781
+ }
1782
+
1783
+ // Define Generator.prototype.{next,throw,return} in terms of the
1784
+ // unified ._invoke helper method.
1785
+ defineIteratorMethods(Gp);
1786
+
1787
+ define(Gp, toStringTagSymbol, "Generator");
1788
+
1789
+ // A Generator should always return itself as the iterator object when the
1790
+ // @@iterator function is called on it. Some browsers' implementations of the
1791
+ // iterator prototype chain incorrectly implement this, causing the Generator
1792
+ // object to not be returned from this call. This ensures that doesn't happen.
1793
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
1794
+ define(Gp, iteratorSymbol, function() {
1795
+ return this;
1796
+ });
1797
+
1798
+ define(Gp, "toString", function() {
1799
+ return "[object Generator]";
1800
+ });
1801
+
1802
+ function pushTryEntry(locs) {
1803
+ var entry = { tryLoc: locs[0] };
1804
+
1805
+ if (1 in locs) {
1806
+ entry.catchLoc = locs[1];
1807
+ }
1808
+
1809
+ if (2 in locs) {
1810
+ entry.finallyLoc = locs[2];
1811
+ entry.afterLoc = locs[3];
1812
+ }
1813
+
1814
+ this.tryEntries.push(entry);
1815
+ }
1816
+
1817
+ function resetTryEntry(entry) {
1818
+ var record = entry.completion || {};
1819
+ record.type = "normal";
1820
+ delete record.arg;
1821
+ entry.completion = record;
1822
+ }
1823
+
1824
+ function Context(tryLocsList) {
1825
+ // The root entry object (effectively a try statement without a catch
1826
+ // or a finally block) gives us a place to store values thrown from
1827
+ // locations where there is no enclosing try statement.
1828
+ this.tryEntries = [{ tryLoc: "root" }];
1829
+ tryLocsList.forEach(pushTryEntry, this);
1830
+ this.reset(true);
1831
+ }
1832
+
1833
+ exports.keys = function(object) {
1834
+ var keys = [];
1835
+ for (var key in object) {
1836
+ keys.push(key);
1837
+ }
1838
+ keys.reverse();
1839
+
1840
+ // Rather than returning an object with a next method, we keep
1841
+ // things simple and return the next function itself.
1842
+ return function next() {
1843
+ while (keys.length) {
1844
+ var key = keys.pop();
1845
+ if (key in object) {
1846
+ next.value = key;
1847
+ next.done = false;
1848
+ return next;
1849
+ }
1850
+ }
1851
+
1852
+ // To avoid creating an additional object, we just hang the .value
1853
+ // and .done properties off the next function object itself. This
1854
+ // also ensures that the minifier will not anonymize the function.
1855
+ next.done = true;
1856
+ return next;
1857
+ };
1858
+ };
1859
+
1860
+ function values(iterable) {
1861
+ if (iterable) {
1862
+ var iteratorMethod = iterable[iteratorSymbol];
1863
+ if (iteratorMethod) {
1864
+ return iteratorMethod.call(iterable);
1865
+ }
1866
+
1867
+ if (typeof iterable.next === "function") {
1868
+ return iterable;
1869
+ }
1870
+
1871
+ if (!isNaN(iterable.length)) {
1872
+ var i = -1, next = function next() {
1873
+ while (++i < iterable.length) {
1874
+ if (hasOwn.call(iterable, i)) {
1875
+ next.value = iterable[i];
1876
+ next.done = false;
1877
+ return next;
1878
+ }
1879
+ }
1880
+
1881
+ next.value = undefined$1;
1882
+ next.done = true;
1883
+
1884
+ return next;
1885
+ };
1886
+
1887
+ return next.next = next;
1888
+ }
1889
+ }
1890
+
1891
+ // Return an iterator with no values.
1892
+ return { next: doneResult };
1893
+ }
1894
+ exports.values = values;
1895
+
1896
+ function doneResult() {
1897
+ return { value: undefined$1, done: true };
1898
+ }
1899
+
1900
+ Context.prototype = {
1901
+ constructor: Context,
1902
+
1903
+ reset: function(skipTempReset) {
1904
+ this.prev = 0;
1905
+ this.next = 0;
1906
+ // Resetting context._sent for legacy support of Babel's
1907
+ // function.sent implementation.
1908
+ this.sent = this._sent = undefined$1;
1909
+ this.done = false;
1910
+ this.delegate = null;
1911
+
1912
+ this.method = "next";
1913
+ this.arg = undefined$1;
1914
+
1915
+ this.tryEntries.forEach(resetTryEntry);
1916
+
1917
+ if (!skipTempReset) {
1918
+ for (var name in this) {
1919
+ // Not sure about the optimal order of these conditions:
1920
+ if (name.charAt(0) === "t" &&
1921
+ hasOwn.call(this, name) &&
1922
+ !isNaN(+name.slice(1))) {
1923
+ this[name] = undefined$1;
1924
+ }
1925
+ }
1926
+ }
1927
+ },
1928
+
1929
+ stop: function() {
1930
+ this.done = true;
1931
+
1932
+ var rootEntry = this.tryEntries[0];
1933
+ var rootRecord = rootEntry.completion;
1934
+ if (rootRecord.type === "throw") {
1935
+ throw rootRecord.arg;
1936
+ }
1937
+
1938
+ return this.rval;
1939
+ },
1940
+
1941
+ dispatchException: function(exception) {
1942
+ if (this.done) {
1943
+ throw exception;
1944
+ }
1945
+
1946
+ var context = this;
1947
+ function handle(loc, caught) {
1948
+ record.type = "throw";
1949
+ record.arg = exception;
1950
+ context.next = loc;
1951
+
1952
+ if (caught) {
1953
+ // If the dispatched exception was caught by a catch block,
1954
+ // then let that catch block handle the exception normally.
1955
+ context.method = "next";
1956
+ context.arg = undefined$1;
1957
+ }
1958
+
1959
+ return !! caught;
1960
+ }
1961
+
1962
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1963
+ var entry = this.tryEntries[i];
1964
+ var record = entry.completion;
1965
+
1966
+ if (entry.tryLoc === "root") {
1967
+ // Exception thrown outside of any try block that could handle
1968
+ // it, so set the completion value of the entire function to
1969
+ // throw the exception.
1970
+ return handle("end");
1971
+ }
1972
+
1973
+ if (entry.tryLoc <= this.prev) {
1974
+ var hasCatch = hasOwn.call(entry, "catchLoc");
1975
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
1976
+
1977
+ if (hasCatch && hasFinally) {
1978
+ if (this.prev < entry.catchLoc) {
1979
+ return handle(entry.catchLoc, true);
1980
+ } else if (this.prev < entry.finallyLoc) {
1981
+ return handle(entry.finallyLoc);
1982
+ }
1983
+
1984
+ } else if (hasCatch) {
1985
+ if (this.prev < entry.catchLoc) {
1986
+ return handle(entry.catchLoc, true);
1987
+ }
1988
+
1989
+ } else if (hasFinally) {
1990
+ if (this.prev < entry.finallyLoc) {
1991
+ return handle(entry.finallyLoc);
1992
+ }
1993
+
1994
+ } else {
1995
+ throw new Error("try statement without catch or finally");
1996
+ }
1997
+ }
1998
+ }
1999
+ },
2000
+
2001
+ abrupt: function(type, arg) {
2002
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2003
+ var entry = this.tryEntries[i];
2004
+ if (entry.tryLoc <= this.prev &&
2005
+ hasOwn.call(entry, "finallyLoc") &&
2006
+ this.prev < entry.finallyLoc) {
2007
+ var finallyEntry = entry;
2008
+ break;
2009
+ }
2010
+ }
2011
+
2012
+ if (finallyEntry &&
2013
+ (type === "break" ||
2014
+ type === "continue") &&
2015
+ finallyEntry.tryLoc <= arg &&
2016
+ arg <= finallyEntry.finallyLoc) {
2017
+ // Ignore the finally entry if control is not jumping to a
2018
+ // location outside the try/catch block.
2019
+ finallyEntry = null;
2020
+ }
2021
+
2022
+ var record = finallyEntry ? finallyEntry.completion : {};
2023
+ record.type = type;
2024
+ record.arg = arg;
2025
+
2026
+ if (finallyEntry) {
2027
+ this.method = "next";
2028
+ this.next = finallyEntry.finallyLoc;
2029
+ return ContinueSentinel;
2030
+ }
2031
+
2032
+ return this.complete(record);
2033
+ },
2034
+
2035
+ complete: function(record, afterLoc) {
2036
+ if (record.type === "throw") {
2037
+ throw record.arg;
2038
+ }
2039
+
2040
+ if (record.type === "break" ||
2041
+ record.type === "continue") {
2042
+ this.next = record.arg;
2043
+ } else if (record.type === "return") {
2044
+ this.rval = this.arg = record.arg;
2045
+ this.method = "return";
2046
+ this.next = "end";
2047
+ } else if (record.type === "normal" && afterLoc) {
2048
+ this.next = afterLoc;
2049
+ }
2050
+
2051
+ return ContinueSentinel;
2052
+ },
2053
+
2054
+ finish: function(finallyLoc) {
2055
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2056
+ var entry = this.tryEntries[i];
2057
+ if (entry.finallyLoc === finallyLoc) {
2058
+ this.complete(entry.completion, entry.afterLoc);
2059
+ resetTryEntry(entry);
2060
+ return ContinueSentinel;
2061
+ }
2062
+ }
2063
+ },
2064
+
2065
+ "catch": function(tryLoc) {
2066
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2067
+ var entry = this.tryEntries[i];
2068
+ if (entry.tryLoc === tryLoc) {
2069
+ var record = entry.completion;
2070
+ if (record.type === "throw") {
2071
+ var thrown = record.arg;
2072
+ resetTryEntry(entry);
2073
+ }
2074
+ return thrown;
2075
+ }
2076
+ }
2077
+
2078
+ // The context.catch method must only be called with a location
2079
+ // argument that corresponds to a known catch block.
2080
+ throw new Error("illegal catch attempt");
2081
+ },
2082
+
2083
+ delegateYield: function(iterable, resultName, nextLoc) {
2084
+ this.delegate = {
2085
+ iterator: values(iterable),
2086
+ resultName: resultName,
2087
+ nextLoc: nextLoc
2088
+ };
2089
+
2090
+ if (this.method === "next") {
2091
+ // Deliberately forget the last sent value so that we don't
2092
+ // accidentally pass it on to the delegate.
2093
+ this.arg = undefined$1;
2094
+ }
2095
+
2096
+ return ContinueSentinel;
2097
+ }
2098
+ };
2099
+
2100
+ // Regardless of whether this script is executing as a CommonJS module
2101
+ // or not, return the runtime object so that we can declare the variable
2102
+ // regeneratorRuntime in the outer scope, which allows this module to be
2103
+ // injected easily by `bin/regenerator --include-runtime script.js`.
2104
+ return exports;
2105
+
2106
+ }(
2107
+ // If this script is executing as a CommonJS module, use module.exports
2108
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
2109
+ // object. Either way, the resulting object will be used to initialize
2110
+ // the regeneratorRuntime variable at the top of this file.
2111
+ module.exports
2112
+ ));
2113
+
2114
+ try {
2115
+ regeneratorRuntime = runtime;
2116
+ } catch (accidentalStrictMode) {
2117
+ // This module should not be running in strict mode, so the above
2118
+ // assignment should always work unless something is misconfigured. Just
2119
+ // in case runtime.js accidentally runs in strict mode, in modern engines
2120
+ // we can explicitly access globalThis. In older engines we can escape
2121
+ // strict mode using a global Function call. This could conceivably fail
2122
+ // if a Content Security Policy forbids using Function, but in that case
2123
+ // the proper solution is to fix the accidental strict mode problem. If
2124
+ // you've misconfigured your bundler to force strict mode and applied a
2125
+ // CSP to forbid Function, and you're not willing to fix either of those
2126
+ // problems, please detail your unique predicament in a GitHub issue.
2127
+ if (typeof globalThis === "object") {
2128
+ globalThis.regeneratorRuntime = runtime;
2129
+ } else {
2130
+ Function("r", "regeneratorRuntime = r")(runtime);
2131
+ }
2132
+ }
2133
+ });
2134
+
2135
+ /**
2136
+ * A specialized version of `_.reduce` for arrays without support for
2137
+ * iteratee shorthands.
2138
+ *
2139
+ * @private
2140
+ * @param {Array} [array] The array to iterate over.
2141
+ * @param {Function} iteratee The function invoked per iteration.
2142
+ * @param {*} [accumulator] The initial value.
2143
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
2144
+ * the initial value.
2145
+ * @returns {*} Returns the accumulated value.
2146
+ */
2147
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
2148
+ var index = -1,
2149
+ length = array == null ? 0 : array.length;
2150
+
2151
+ if (initAccum && length) {
2152
+ accumulator = array[++index];
2153
+ }
2154
+ while (++index < length) {
2155
+ accumulator = iteratee(accumulator, array[index], index, array);
2156
+ }
2157
+ return accumulator;
2158
+ }
2159
+
2160
+ var _arrayReduce = arrayReduce;
2161
+
2162
+ /**
2163
+ * The base implementation of `_.propertyOf` without support for deep paths.
2164
+ *
2165
+ * @private
2166
+ * @param {Object} object The object to query.
2167
+ * @returns {Function} Returns the new accessor function.
2168
+ */
2169
+ function basePropertyOf(object) {
2170
+ return function(key) {
2171
+ return object == null ? undefined : object[key];
2172
+ };
2173
+ }
2174
+
2175
+ var _basePropertyOf = basePropertyOf;
2176
+
2177
+ /** Used to map Latin Unicode letters to basic Latin letters. */
2178
+ var deburredLetters = {
2179
+ // Latin-1 Supplement block.
2180
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
2181
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
2182
+ '\xc7': 'C', '\xe7': 'c',
2183
+ '\xd0': 'D', '\xf0': 'd',
2184
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
2185
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
2186
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
2187
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
2188
+ '\xd1': 'N', '\xf1': 'n',
2189
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
2190
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
2191
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
2192
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
2193
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
2194
+ '\xc6': 'Ae', '\xe6': 'ae',
2195
+ '\xde': 'Th', '\xfe': 'th',
2196
+ '\xdf': 'ss',
2197
+ // Latin Extended-A block.
2198
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
2199
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
2200
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
2201
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
2202
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
2203
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
2204
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
2205
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
2206
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
2207
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
2208
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
2209
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
2210
+ '\u0134': 'J', '\u0135': 'j',
2211
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
2212
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
2213
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
2214
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
2215
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
2216
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
2217
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
2218
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
2219
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
2220
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
2221
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
2222
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
2223
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
2224
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
2225
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
2226
+ '\u0174': 'W', '\u0175': 'w',
2227
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
2228
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
2229
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
2230
+ '\u0132': 'IJ', '\u0133': 'ij',
2231
+ '\u0152': 'Oe', '\u0153': 'oe',
2232
+ '\u0149': "'n", '\u017f': 's'
2233
+ };
2234
+
2235
+ /**
2236
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2237
+ * letters to basic Latin letters.
2238
+ *
2239
+ * @private
2240
+ * @param {string} letter The matched letter to deburr.
2241
+ * @returns {string} Returns the deburred letter.
2242
+ */
2243
+ var deburrLetter = _basePropertyOf(deburredLetters);
2244
+
2245
+ var _deburrLetter = deburrLetter;
2246
+
2247
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
2248
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
2249
+
2250
+ /** Used to compose unicode character classes. */
2251
+ var rsComboMarksRange$1 = '\\u0300-\\u036f',
2252
+ reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
2253
+ rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
2254
+ rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
2255
+
2256
+ /** Used to compose unicode capture groups. */
2257
+ var rsCombo$1 = '[' + rsComboRange$1 + ']';
2258
+
2259
+ /**
2260
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
2261
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
2262
+ */
2263
+ var reComboMark = RegExp(rsCombo$1, 'g');
2264
+
2265
+ /**
2266
+ * Deburrs `string` by converting
2267
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
2268
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
2269
+ * letters to basic Latin letters and removing
2270
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
2271
+ *
2272
+ * @static
2273
+ * @memberOf _
2274
+ * @since 3.0.0
2275
+ * @category String
2276
+ * @param {string} [string=''] The string to deburr.
2277
+ * @returns {string} Returns the deburred string.
2278
+ * @example
2279
+ *
2280
+ * _.deburr('déjà vu');
2281
+ * // => 'deja vu'
2282
+ */
2283
+ function deburr(string) {
2284
+ string = toString_1(string);
2285
+ return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
2286
+ }
2287
+
2288
+ var deburr_1 = deburr;
2289
+
2290
+ /** Used to match words composed of alphanumeric characters. */
2291
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
2292
+
2293
+ /**
2294
+ * Splits an ASCII `string` into an array of its words.
2295
+ *
2296
+ * @private
2297
+ * @param {string} The string to inspect.
2298
+ * @returns {Array} Returns the words of `string`.
2299
+ */
2300
+ function asciiWords(string) {
2301
+ return string.match(reAsciiWord) || [];
2302
+ }
2303
+
2304
+ var _asciiWords = asciiWords;
2305
+
2306
+ /** Used to detect strings that need a more robust regexp to match words. */
2307
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
2308
+
2309
+ /**
2310
+ * Checks if `string` contains a word composed of Unicode symbols.
2311
+ *
2312
+ * @private
2313
+ * @param {string} string The string to inspect.
2314
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
2315
+ */
2316
+ function hasUnicodeWord(string) {
2317
+ return reHasUnicodeWord.test(string);
2318
+ }
2319
+
2320
+ var _hasUnicodeWord = hasUnicodeWord;
2321
+
2322
+ /** Used to compose unicode character classes. */
2323
+ var rsAstralRange = '\\ud800-\\udfff',
2324
+ rsComboMarksRange = '\\u0300-\\u036f',
2325
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
2326
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
2327
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
2328
+ rsDingbatRange = '\\u2700-\\u27bf',
2329
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
2330
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
2331
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
2332
+ rsPunctuationRange = '\\u2000-\\u206f',
2333
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
2334
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
2335
+ rsVarRange = '\\ufe0e\\ufe0f',
2336
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
2337
+
2338
+ /** Used to compose unicode capture groups. */
2339
+ var rsApos$1 = "['\u2019]",
2340
+ rsBreak = '[' + rsBreakRange + ']',
2341
+ rsCombo = '[' + rsComboRange + ']',
2342
+ rsDigits = '\\d+',
2343
+ rsDingbat = '[' + rsDingbatRange + ']',
2344
+ rsLower = '[' + rsLowerRange + ']',
2345
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
2346
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
2347
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
2348
+ rsNonAstral = '[^' + rsAstralRange + ']',
2349
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
2350
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
2351
+ rsUpper = '[' + rsUpperRange + ']',
2352
+ rsZWJ = '\\u200d';
2353
+
2354
+ /** Used to compose unicode regexes. */
2355
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
2356
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
2357
+ rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
2358
+ rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
2359
+ reOptMod = rsModifier + '?',
2360
+ rsOptVar = '[' + rsVarRange + ']?',
2361
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
2362
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
2363
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
2364
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
2365
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
2366
+
2367
+ /** Used to match complex or compound words. */
2368
+ var reUnicodeWord = RegExp([
2369
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
2370
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
2371
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
2372
+ rsUpper + '+' + rsOptContrUpper,
2373
+ rsOrdUpper,
2374
+ rsOrdLower,
2375
+ rsDigits,
2376
+ rsEmoji
2377
+ ].join('|'), 'g');
2378
+
2379
+ /**
2380
+ * Splits a Unicode `string` into an array of its words.
2381
+ *
2382
+ * @private
2383
+ * @param {string} The string to inspect.
2384
+ * @returns {Array} Returns the words of `string`.
2385
+ */
2386
+ function unicodeWords(string) {
2387
+ return string.match(reUnicodeWord) || [];
2388
+ }
2389
+
2390
+ var _unicodeWords = unicodeWords;
2391
+
2392
+ /**
2393
+ * Splits `string` into an array of its words.
2394
+ *
2395
+ * @static
2396
+ * @memberOf _
2397
+ * @since 3.0.0
2398
+ * @category String
2399
+ * @param {string} [string=''] The string to inspect.
2400
+ * @param {RegExp|string} [pattern] The pattern to match words.
2401
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
2402
+ * @returns {Array} Returns the words of `string`.
2403
+ * @example
2404
+ *
2405
+ * _.words('fred, barney, & pebbles');
2406
+ * // => ['fred', 'barney', 'pebbles']
2407
+ *
2408
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
2409
+ * // => ['fred', 'barney', '&', 'pebbles']
2410
+ */
2411
+ function words(string, pattern, guard) {
2412
+ string = toString_1(string);
2413
+ pattern = guard ? undefined : pattern;
2414
+
2415
+ if (pattern === undefined) {
2416
+ return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
2417
+ }
2418
+ return string.match(pattern) || [];
2419
+ }
2420
+
2421
+ var words_1 = words;
2422
+
2423
+ /** Used to compose unicode capture groups. */
2424
+ var rsApos = "['\u2019]";
2425
+
2426
+ /** Used to match apostrophes. */
2427
+ var reApos = RegExp(rsApos, 'g');
2428
+
2429
+ /**
2430
+ * Creates a function like `_.camelCase`.
2431
+ *
2432
+ * @private
2433
+ * @param {Function} callback The function to combine each word.
2434
+ * @returns {Function} Returns the new compounder function.
2435
+ */
2436
+ function createCompounder(callback) {
2437
+ return function(string) {
2438
+ return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
2439
+ };
2440
+ }
2441
+
2442
+ var _createCompounder = createCompounder;
2443
+
2444
+ /**
2445
+ * Converts `string`, as space separated words, to upper case.
2446
+ *
2447
+ * @static
2448
+ * @memberOf _
2449
+ * @since 4.0.0
2450
+ * @category String
2451
+ * @param {string} [string=''] The string to convert.
2452
+ * @returns {string} Returns the upper cased string.
2453
+ * @example
2454
+ *
2455
+ * _.upperCase('--foo-bar');
2456
+ * // => 'FOO BAR'
2457
+ *
2458
+ * _.upperCase('fooBar');
2459
+ * // => 'FOO BAR'
2460
+ *
2461
+ * _.upperCase('__foo_bar__');
2462
+ * // => 'FOO BAR'
2463
+ */
2464
+ var upperCase = _createCompounder(function(result, word, index) {
2465
+ return result + (index ? ' ' : '') + word.toUpperCase();
2466
+ });
2467
+
2468
+ var upperCase_1 = upperCase;
2469
+
2470
+ /**
2471
+ * Converts `string`, as space separated words, to lower case.
2472
+ *
2473
+ * @static
2474
+ * @memberOf _
2475
+ * @since 4.0.0
2476
+ * @category String
2477
+ * @param {string} [string=''] The string to convert.
2478
+ * @returns {string} Returns the lower cased string.
2479
+ * @example
2480
+ *
2481
+ * _.lowerCase('--Foo-Bar--');
2482
+ * // => 'foo bar'
2483
+ *
2484
+ * _.lowerCase('fooBar');
2485
+ * // => 'foo bar'
2486
+ *
2487
+ * _.lowerCase('__FOO_BAR__');
2488
+ * // => 'foo bar'
2489
+ */
2490
+ var lowerCase = _createCompounder(function(result, word, index) {
2491
+ return result + (index ? ' ' : '') + word.toLowerCase();
2492
+ });
2493
+
2494
+ var lowerCase_1 = lowerCase;
2495
+
2496
+ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestamp) {
2497
+ var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
2498
+ var _config$showTime = config.showTime,
2499
+ showTime = _config$showTime === void 0 ? false : _config$showTime,
2500
+ _config$isTimeFirst = config.isTimeFirst,
2501
+ isTimeFirst = _config$isTimeFirst === void 0 ? false : _config$isTimeFirst,
2502
+ _config$isUpperCase = config.isUpperCase,
2503
+ isUpperCase = _config$isUpperCase === void 0 ? false : _config$isUpperCase,
2504
+ _config$disableMeridi = config.disableMeridiem,
2505
+ disableMeridiem = _config$disableMeridi === void 0 ? false : _config$disableMeridi,
2506
+ _config$timeFormat = config.timeFormat,
2507
+ timeFormat = _config$timeFormat === void 0 ? "12hours" : _config$timeFormat;
2508
+ var monthList = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2509
+ var dateTime = new Date(timestamp);
2510
+ var date = dateTime.getDate().toString().padStart(2, 0);
2511
+ var month = monthList[dateTime.getMonth()];
2512
+ var localizedMonth = month;
2513
+
2514
+ if (isUpperCase) {
2515
+ localizedMonth = upperCase_1(month);
2516
+ }
2517
+
2518
+ var year = dateTime.getFullYear();
2519
+ var localizedMeridiem = config.localizedMeridiem,
2520
+ localizedMonths = config.localizedMonths,
2521
+ _config$direction = config.direction,
2522
+ direction = _config$direction === void 0 ? "ltr" : _config$direction;
2523
+ var time = formatAMPM(timestamp, timeFormat);
2524
+ var timeWithLocalizedMeridiem = time;
2525
+ var timetoShow;
2526
+
2527
+ if (localizedMonths) {
2528
+ localizedMonth = get_1(localizedMonths, [lowerCase_1(month)]) || month;
2529
+ }
2530
+
2531
+ if (localizedMeridiem) {
2532
+ var isAm = time.includes("am");
2533
+ var _localizedMeridiem$am = localizedMeridiem.am,
2534
+ am = _localizedMeridiem$am === void 0 ? "am" : _localizedMeridiem$am,
2535
+ _localizedMeridiem$pm = localizedMeridiem.pm,
2536
+ pm = _localizedMeridiem$pm === void 0 ? "pm" : _localizedMeridiem$pm;
2537
+ timeWithLocalizedMeridiem = (isAm ? time.replace("am", am) : time.replace("pm", pm)) || time;
2538
+ }
2539
+
2540
+ if (direction === "rtl") {
2541
+ timetoShow = showTime ? "".concat(timeWithLocalizedMeridiem) : "";
2542
+ return "".concat(date, " ").concat(localizedMonth, ", ").concat(year, " ").concat(timetoShow, " ");
2543
+ } else {
2544
+ if (disableMeridiem) {
2545
+ return "".concat(localizedMonth, " ").concat(date, ", ").concat(year);
2546
+ } else if (isTimeFirst) {
2547
+ return "".concat(timeWithLocalizedMeridiem, ", ").concat(date, " ").concat(localizedMonth, " ").concat(year);
2548
+ } else {
2549
+ timetoShow = showTime ? ", ".concat(timeWithLocalizedMeridiem) : "";
2550
+ return "".concat(date, " ").concat(localizedMonth, ", ").concat(year).concat(timetoShow);
2551
+ }
2552
+ }
2553
+ };
2554
+
2555
+ function formatAMPM(timestamp) {
2556
+ var timeFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "12hours";
2557
+ var dateTime = new Date(timestamp);
2558
+ var hours = dateTime.getHours();
2559
+ var minutes = dateTime.getMinutes();
2560
+ var ampm = hours >= 12 ? "pm" : "am";
2561
+ hours = hours % 12;
2562
+ hours = hours || 12;
2563
+ minutes = minutes < 10 ? "0" + minutes : minutes;
2564
+ var strTime = hours + ":" + minutes + " " + ampm;
2565
+
2566
+ if (timeFormat === "24hours") {
2567
+ return dateTime.toLocaleTimeString([], {
2568
+ hour: "2-digit",
2569
+ minute: "2-digit"
2570
+ });
2571
+ }
2572
+
2573
+ return strTime;
2574
+ }
2575
+
2576
+ var hexToRGB = function hexToRGB(hex) {
2577
+ var r = parseInt(hex.slice(1, 3), 16);
2578
+ var g = parseInt(hex.slice(3, 5), 16);
2579
+ var b = parseInt(hex.slice(5, 7), 16);
2580
+ return {
2581
+ r: r,
2582
+ g: g,
2583
+ b: b
2584
+ };
2585
+ };
2586
+ var getLuminanceOfColor = function getLuminanceOfColor(hex) {
2587
+ var _hexToRGB = hexToRGB(hex),
2588
+ r = _hexToRGB.r,
2589
+ g = _hexToRGB.g,
2590
+ b = _hexToRGB.b;
2591
+
2592
+ return r * 0.299 + g * 0.587 + b * 0.114;
2593
+ };
2594
+ var rgbToHex = function rgbToHex() {
2595
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
2596
+ var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
2597
+ 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;
2598
+ };
2599
+ var clientWidths = {
2600
+ mobile: 767,
2601
+ tablet: 1024
2602
+ };
2603
+ var clientWidth = function clientWidth(device) {
2604
+ var foundDeviceWidth = get_1(clientWidths, device);
2605
+
2606
+ if (foundDeviceWidth) {
2607
+ return get_1(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
2608
+ }
2609
+
2610
+ return false;
2611
+ };
2612
+ var getTextColor = function getTextColor() {
2613
+ var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
2614
+ var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
2615
+ var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
2616
+ var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
2617
+ return textColor;
2618
+ };
2619
+ var getSlug = function getSlug(collection) {
2620
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2621
+ var _config$magazineSlug = config.magazineSlug,
2622
+ magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
2623
+ _config$isArchivePage = config.isArchivePage,
2624
+ isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
2625
+
2626
+ if (isArchivePage) {
2627
+ return "/magazine/archive/".concat(magazineSlug);
2628
+ }
2629
+
2630
+ if (magazineSlug) {
2631
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2632
+ }
2633
+
2634
+ var isSection = collection.template === "section";
2635
+
2636
+ if (isSection) {
2637
+ var sectionId = get_1(collection, ["metadata", "section", "0", "id"], "");
2638
+ var sections = config.sections;
2639
+ var section = sections && sections.find(function (section) {
2640
+ return section.id === sectionId;
2641
+ });
2642
+ return section ? section["section-url"] : "/";
2643
+ }
2644
+
2645
+ return "/collection/".concat(collection.slug);
2646
+ };
2647
+ PropTypes.shape({
2648
+ "sketches-host": PropTypes.string,
2649
+ "cdn-name": PropTypes.string,
2650
+ "cdn-image": PropTypes.string
2651
+ });
2652
+ PropTypes.shape({
2653
+ headline: PropTypes.string,
2654
+ "last-published-at": PropTypes.number,
2655
+ subheadline: PropTypes.string
2656
+ });
2657
+ var navigateTo = function navigateTo(dispatch) {
2658
+ var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
2659
+ global.app.navigateToPage(dispatch, url);
2660
+ };
2661
+ var generateNavigateSlug = function generateNavigateSlug() {
2662
+ var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2663
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2664
+ var customUrlPath = arguments.length > 2 ? arguments[2] : undefined;
2665
+
2666
+ if (customUrlPath) {
2667
+ return customUrlPath;
2668
+ }
2669
+
2670
+ var _config$magazineSlug2 = config.magazineSlug,
2671
+ magazineSlug = _config$magazineSlug2 === void 0 ? "" : _config$magazineSlug2,
2672
+ _config$isArchivePage2 = config.isArchivePage,
2673
+ isArchivePage = _config$isArchivePage2 === void 0 ? false : _config$isArchivePage2;
2674
+
2675
+ if (isArchivePage) {
2676
+ return "/magazine/archive/".concat(magazineSlug);
2677
+ }
2678
+
2679
+ if (magazineSlug) {
2680
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2681
+ }
2682
+
2683
+ if (collection) {
2684
+ return getSlug(collection, config);
2685
+ }
2686
+
2687
+ return "/";
2688
+ };
2689
+ var getTimeStamp = function getTimeStamp(date, _formatter) {
2690
+ var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2691
+ var template = arguments.length > 3 ? arguments[3] : undefined;
2692
+ var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
2693
+
2694
+ if (timezone && template === "story") {
2695
+ var zonedTime = timezone && utcToZonedTime(date, timezone);
2696
+ var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
2697
+ timeZone: timezone
2698
+ });
2699
+ var timeStamp = timestampToFormat("", "", "", date, config);
2700
+ return /*#__PURE__*/React.createElement("time", {
2701
+ dateTime: formatZonedTime
2702
+ }, timeStamp);
2703
+ }
2704
+
2705
+ return /*#__PURE__*/React.createElement(Timeago, {
2706
+ date: date,
2707
+ formatter: function formatter(value, unit, suffix, date) {
2708
+ return _formatter(value, unit, suffix, date, config);
2709
+ }
2710
+ });
2711
+ };
2712
+
2713
+ var _styleModuleImportMap$2 = {
2714
+ "./collection-name.m.css": {
2715
+ "collection": "collection-name-m_collection__JD6sx",
2716
+ "collection-borderLeft": "collection-name-m_collection-borderLeft__3Dznk",
2717
+ "border-left": "collection-name-m_border-left__3_pYw",
2718
+ "collection-borderBottomFull": "collection-name-m_collection-borderBottomFull__Dkq3K",
2719
+ "collection-borderBottom": "collection-name-m_collection-borderBottom__2rdQM",
2720
+ "collection-crossLine": "collection-name-m_collection-crossLine__1sIpN",
2721
+ "border-bottom": "collection-name-m_border-bottom__1MnlV",
2722
+ "dark": "collection-name-m_dark__nMe5H",
2723
+ "light": "collection-name-m_light__1vFDN"
2724
+ }
2725
+ };
2726
+ var CollectionNameBase = function CollectionNameBase(_ref) {
2727
+ var _ref$collectionNameBo = _ref.collectionNameBorderColor,
2728
+ collectionNameBorderColor = _ref$collectionNameBo === void 0 ? "" : _ref$collectionNameBo,
2729
+ collection = _ref.collection,
2730
+ config = _ref.config,
2731
+ collectionNameTemplate = _ref.collectionNameTemplate,
2732
+ headerLevel = _ref.headerLevel,
2733
+ _ref$customCollection = _ref.customCollectionName,
2734
+ customCollectionName = _ref$customCollection === void 0 ? "" : _ref$customCollection,
2735
+ _ref$navigate = _ref.navigate,
2736
+ navigate = _ref$navigate === void 0 ? true : _ref$navigate;
2737
+ var collectionTitle = useStateValue() || {};
2738
+ var showRowTitle = get_1(collectionTitle, ["showRowTitle"], true);
2739
+ var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
2740
+ var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
2741
+ var slug = navigate && collection && getSlug(collection, config) || "";
2742
+ var collectionName = customCollectionName || collection.name || "";
2743
+ var textColor = getTextColor(collectionTitle.theme);
2744
+ var HeaderTag = "h" + headerLevel;
2745
+ var CollectionNameBorderColor = rgbToHex(collectionNameBorderColor);
2746
+ var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
2747
+
2748
+ var borderBottomStyle = function borderBottomStyle() {
2749
+ return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React.createElement("div", {
2750
+ className: "collection-name-m_border-bottom__1MnlV",
2751
+ style: {
2752
+ borderBottom: "4px solid ".concat(CollectionNameBorderColor)
2753
+ }
2754
+ }) : "";
2755
+ };
2756
+
2757
+ var isMobile = clientWidth("mobile");
2758
+
2759
+ var getBorderHeight = function getBorderHeight() {
2760
+ if (isMobile) {
2761
+ switch (headerLevel) {
2762
+ case "1":
2763
+ return "32px";
2764
+
2765
+ case "2":
2766
+ return "24px";
2767
+
2768
+ case "3":
2769
+ return "20px";
2770
+
2771
+ case "4":
2772
+ return "18px";
2773
+
2774
+ case "5":
2775
+ return "16px";
2776
+
2777
+ case "6":
2778
+ return "16px";
2779
+
2780
+ default:
2781
+ return "20px";
2782
+ }
2783
+ }
2784
+
2785
+ switch (headerLevel) {
2786
+ case "1":
2787
+ return "40px";
2788
+
2789
+ case "2":
2790
+ return "32px";
2791
+
2792
+ case "3":
2793
+ return "24px";
2794
+
2795
+ case "4":
2796
+ return "20px";
2797
+
2798
+ case "5":
2799
+ return "18px";
2800
+
2801
+ case "6":
2802
+ return "16px";
2803
+
2804
+ default:
2805
+ return "24px";
2806
+ }
2807
+ };
2808
+
2809
+ return /*#__PURE__*/React.createElement(React.Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React.createElement("div", {
2810
+ style: {
2811
+ borderBottom: borderBottomFullStyle
2812
+ },
2813
+ "data-test-id": "collection-name",
2814
+ className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$2)
2815
+ }, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React.createElement("span", {
2816
+ className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
2817
+ style: {
2818
+ color: CollectionNameBorderColor,
2819
+ fontSize: getBorderHeight()
2820
+ }
2821
+ }), slug && !slug.includes(undefined) ? /*#__PURE__*/React.createElement(Link, {
2822
+ href: slug,
2823
+ "aria-label": "collection-name"
2824
+ }, /*#__PURE__*/React.createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React.createElement(HeaderTag, null, collectionName), borderBottomStyle()));
2825
+ };
2826
+ CollectionNameBase.propTypes = {
2827
+ /** Collection name border color */
2828
+ collectionNameBorderColor: PropTypes$1.string,
2829
+
2830
+ /** The Collection Object from the API response */
2831
+ collection: PropTypes$1.object,
2832
+
2833
+ /** The publisher config from the API response */
2834
+ config: PropTypes$1.object,
2835
+
2836
+ /** The style template for the component */
2837
+ collectionNameTemplate: PropTypes$1.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
2838
+
2839
+ /** Header tags ranging h1-h6, where h[headerLevel] */
2840
+ headerLevel: PropTypes$1.string,
2841
+ customCollectionName: PropTypes$1.string,
2842
+ navigate: PropTypes$1.bool
2843
+ };
2844
+ CollectionNameBase.defaultProps = {
2845
+ collectionNameTemplate: "",
2846
+ headerLevel: "3"
2847
+ };
2848
+
2849
+ function mapStateToProps(state) {
2850
+ return {
2851
+ config: get_1(state, ["qt", "config"], {})
2852
+ };
2853
+ }
2854
+
2855
+ var CollectionName = connect(mapStateToProps)(CollectionNameBase);
2856
+
2857
+ var _styleModuleImportMap$1 = {
2858
+ "./load-more.m.css": {
2859
+ "button": "load-more-m_button__1mmf1",
2860
+ "default": "load-more-m_default__2_k4V",
2861
+ "dark": "load-more-m_dark__3dfzb",
2862
+ "light": "load-more-m_light__ePZQI"
2863
+ }
2864
+ };
2865
+
2866
+ function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2867
+
2868
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2869
+ var LoadmoreButton = function LoadmoreButton(_ref) {
2870
+ var _ref$config = _ref.config,
2871
+ config = _ref$config === void 0 ? {} : _ref$config,
2872
+ collection = _ref.collection,
2873
+ _ref$template = _ref.template,
2874
+ template = _ref$template === void 0 ? "SubsequentLoadCount" : _ref$template,
2875
+ onClick = _ref.onClick,
2876
+ navigate = _ref.navigate,
2877
+ qtConfig = _ref.qtConfig;
2878
+ var _config$showButton = config.showButton,
2879
+ showButton = _config$showButton === void 0 ? true : _config$showButton,
2880
+ _config$buttonText = config.buttonText,
2881
+ buttonText = _config$buttonText === void 0 ? "Read More" : _config$buttonText,
2882
+ _config$theme = config.theme,
2883
+ theme = _config$theme === void 0 ? "" : _config$theme,
2884
+ _config$customUrlPath = config.customUrlPath,
2885
+ customUrlPath = _config$customUrlPath === void 0 ? "" : _config$customUrlPath;
2886
+ if (!showButton) return null;
2887
+ var textColor = getTextColor(theme);
2888
+ var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
2889
+ return template === "SubsequentLoadCount" ? /*#__PURE__*/React.createElement("div", {
2890
+ onClick: onClick,
2891
+ "data-test-id": "load-more",
2892
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
2893
+ }, buttonText) : /*#__PURE__*/React.createElement(LinkBase, {
2894
+ href: slug,
2895
+ navigateTo: navigate,
2896
+ "data-test-id": "load-more",
2897
+ "aria-label": "load-more"
2898
+ }, /*#__PURE__*/React.createElement("div", {
2899
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
2900
+ }, buttonText));
2901
+ };
2902
+ LoadmoreButton.propTypes = {
2903
+ collection: PropTypes.object,
2904
+ template: PropTypes.string,
2905
+ config: PropTypes.object,
2906
+ onClick: PropTypes.func,
2907
+ navigate: PropTypes.func,
2908
+ qtConfig: PropTypes.object
2909
+ };
2910
+
2911
+ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
2912
+ var _ref$width = _ref.width,
2913
+ width = _ref$width === void 0 ? 40 : _ref$width,
2914
+ _ref$height = _ref.height,
2915
+ height = _ref$height === void 0 ? 30 : _ref$height,
2916
+ _ref$iconColor = _ref.iconColor,
2917
+ iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
2918
+ return /*#__PURE__*/React.createElement("svg", {
2919
+ width: width,
2920
+ height: height,
2921
+ viewBox: "0 0 102 76",
2922
+ version: "1.1"
2923
+ }, /*#__PURE__*/React.createElement("g", {
2924
+ id: "demo-home-copy",
2925
+ stroke: "none",
2926
+ strokeWidth: "1",
2927
+ fill: "none",
2928
+ fillRule: "evenodd",
2929
+ transform: "translate(-377.000000, -314.000000)"
2930
+ }, /*#__PURE__*/React.createElement("g", {
2931
+ id: "Group-13",
2932
+ transform: "translate(377.000000, 314.000000)"
2933
+ }, /*#__PURE__*/React.createElement("path", {
2934
+ d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
2935
+ id: "Combined-Shape",
2936
+ fill: iconColor,
2937
+ fillRule: "nonzero"
2938
+ }), /*#__PURE__*/React.createElement("rect", {
2939
+ id: "Rectangle-19",
2940
+ stroke: iconColor,
2941
+ strokeWidth: "3",
2942
+ x: "1.5",
2943
+ y: "1.5",
2944
+ width: "99",
2945
+ height: "73",
2946
+ rx: "3"
2947
+ }))));
2948
+ };
2949
+ ImageFallbackIcon.propTypes = {
2950
+ width: PropTypes.object,
2951
+ height: PropTypes.object,
2952
+ iconColor: PropTypes.object
2953
+ };
2954
+
2955
+ var imageFallback = function imageFallback() {
2956
+ return /*#__PURE__*/React.createElement("div", {
2957
+ className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
2958
+ }, /*#__PURE__*/React.createElement("figure", {
2959
+ className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
2960
+ }, /*#__PURE__*/React.createElement(ImageFallbackIcon, null)));
2961
+ };
2962
+
2963
+ var FallbackImage = function FallbackImage(_ref) {
2964
+ var slug = _ref.slug;
2965
+
2966
+ if (slug) {
2967
+ return /*#__PURE__*/React.createElement(Link, {
2968
+ href: slug,
2969
+ "aria-label": "image-fallback"
2970
+ }, imageFallback());
2971
+ } else {
2972
+ return imageFallback();
2973
+ }
2974
+ };
2975
+ FallbackImage.propTypes = {
2976
+ slug: PropTypes.string
2977
+ };
2978
+
2979
+ var MagazineCoverImageCard = function MagazineCoverImageCard(_ref) {
2980
+ var collection = _ref.collection,
2981
+ _ref$config = _ref.config,
2982
+ config = _ref$config === void 0 ? {} : _ref$config;
2983
+ var imgAltText = get_1(collection, ["metadata", "magazine", "name"], "cover-image");
2984
+ var coverImageData = get_1(collection, ["metadata", "cover-image"]) || {};
2985
+ var _config$magazineSlug = config.magazineSlug,
2986
+ magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug;
2987
+ var coverUrl = coverImageData["cover-image-url"],
2988
+ covers3Key = coverImageData["cover-image-s3-key"],
2989
+ coverImageMetaData = coverImageData["cover-image-metadata"];
2990
+ var slug = magazineSlug && collection && getSlug(collection, config);
2991
+ return /*#__PURE__*/React.createElement("div", {
2992
+ className: "arr--magazine-cover-img magazine-cover-image-m_cover-image__1McI_"
2993
+ }, covers3Key || coverUrl ? /*#__PURE__*/React.createElement("figure", {
2994
+ className: "magazine-cover-image-m_image__3-ZtB"
2995
+ }, covers3Key ? /*#__PURE__*/React.createElement(Link, {
2996
+ href: slug,
2997
+ "aria-label": "magazine-cover-image"
2998
+ }, /*#__PURE__*/React.createElement(LazyLoadImages, null, /*#__PURE__*/React.createElement(ResponsiveImage, {
2999
+ slug: covers3Key,
3000
+ aspectRatio: [1, 2],
3001
+ metadata: {
3002
+ coverImageMetaData: coverImageMetaData
3003
+ },
3004
+ defaultWidth: 400,
3005
+ imgParams: {
3006
+ auto: ["format", "compress"]
3007
+ },
3008
+ alt: imgAltText
3009
+ }))) : /*#__PURE__*/React.createElement("img", {
3010
+ src: coverUrl,
3011
+ alt: "cover-image",
3012
+ loading: "lazy"
3013
+ })) : /*#__PURE__*/React.createElement("div", {
3014
+ className: "magazine-cover-image-m_fallback-img__cyAjK"
3015
+ }, /*#__PURE__*/React.createElement(FallbackImage, {
3016
+ slug: slug
3017
+ })));
3018
+ };
3019
+ MagazineCoverImageCard.propTypes = {
3020
+ collection: PropTypes.shape({
3021
+ "cover-image-url": PropTypes.string,
3022
+ "cover-image-s3-key": PropTypes.string,
3023
+ "cover-image-metadata": PropTypes.string,
3024
+ slug: PropTypes.string
3025
+ }),
3026
+ config: PropTypes.shape({
3027
+ magazineSlug: PropTypes.string
3028
+ })
3029
+ };
3030
+
3031
+ var _styleModuleImportMap = {
3032
+ "./magazine-cards.m.css": {
3033
+ "viewports": "\"../../../../assets/stylesheets/viewports.m.css\"",
3034
+ "mobile": "768px",
3035
+ "tablet": "992px",
3036
+ "magazine-header": "magazine-cards-m_magazine-header__2pSI3",
3037
+ "content": "magazine-cards-m_content__16_KC",
3038
+ "time": "magazine-cards-m_time__3DIrk",
3039
+ "story-cards": "magazine-cards-m_story-cards__1mNHC",
3040
+ "widget": "magazine-cards-m_widget__2aE9g",
3041
+ "intro-button": "magazine-cards-m_intro-button__3J5c6",
3042
+ "widget-button": "magazine-cards-m_widget-button__3P7F7",
3043
+ "summary": "magazine-cards-m_summary__2jUgG",
3044
+ "dark": "magazine-cards-m_dark__3CSmK",
3045
+ "light": "magazine-cards-m_light__33r9r"
3046
+ }
3047
+ };
3048
+
3049
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3050
+
3051
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3052
+ var MagazineHeaderCardBase = function MagazineHeaderCardBase(_ref) {
3053
+ var _ref$collection = _ref.collection,
3054
+ collection = _ref$collection === void 0 ? {} : _ref$collection,
3055
+ _ref$config = _ref.config,
3056
+ config = _ref$config === void 0 ? {} : _ref$config;
3057
+ var createdAt = collection["created-at"],
3058
+ issueDate = collection["collection-date"],
3059
+ summary = collection.summary;
3060
+ var _config$theme = config.theme,
3061
+ theme = _config$theme === void 0 ? "" : _config$theme,
3062
+ _config$customUrlPath = config.customUrlPath,
3063
+ customUrlPath = _config$customUrlPath === void 0 ? "" : _config$customUrlPath,
3064
+ _config$magazineTitle = config.magazineTitle,
3065
+ magazineTitle = _config$magazineTitle === void 0 ? "" : _config$magazineTitle,
3066
+ _config$magazinePageU = config.magazinePageUrl,
3067
+ magazinePageUrl = _config$magazinePageU === void 0 ? "" : _config$magazinePageU,
3068
+ _config$magazineSlug = config.magazineSlug,
3069
+ magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug;
3070
+ var textColor = getTextColor(theme);
3071
+ var dispatch = useDispatch();
3072
+ var qtConfig = useSelector(function (state) {
3073
+ return get_1(state, ["qt", "config"], {});
3074
+ });
3075
+ var url = generateNavigateSlug(collection, qtConfig, customUrlPath);
3076
+ var date = issueDate || createdAt;
3077
+ var timeStampConfig = {
3078
+ isUpperCase: true,
3079
+ disableMeridiem: true
3080
+ };
3081
+ return /*#__PURE__*/React.createElement("div", {
3082
+ className: "full-width-with-padding arrow-component",
3083
+ style: {
3084
+ backgroundColor: theme
3085
+ },
3086
+ "data-test-id": "magazine-header-card"
3087
+ }, /*#__PURE__*/React.createElement("div", {
3088
+ className: "arr-magazine-card magazine-cards-m_magazine-header__2pSI3 magazine-cards-m_intro-button__3J5c6"
3089
+ }, /*#__PURE__*/React.createElement(MagazineCoverImageCard, {
3090
+ collection: collection,
3091
+ config: _objectSpread(_objectSpread({}, config), {}, {
3092
+ magazineSlug: magazineSlug
3093
+ })
3094
+ }), /*#__PURE__*/React.createElement("div", {
3095
+ className: "magazine-cards-m_content__16_KC"
3096
+ }, /*#__PURE__*/React.createElement("div", {
3097
+ "data-test-id": "title-time",
3098
+ className: _getClassName("time ".concat(textColor), _styleModuleImportMap)
3099
+ }, /*#__PURE__*/React.createElement("a", {
3100
+ href: magazinePageUrl,
3101
+ "data-test-id": "magazine-title",
3102
+ "aria-label": "magazine-title"
3103
+ }, upperCase_1(magazineTitle)), "\xA0 | \xA0", getTimeStamp(date, timestampToFormat, timeStampConfig)), /*#__PURE__*/React.createElement(CollectionName, {
3104
+ collection: collection,
3105
+ headerLevel: "2",
3106
+ navigate: false
3107
+ }), /*#__PURE__*/React.createElement("div", {
3108
+ "data-test-id": "magazine-summary",
3109
+ className: _getClassName("summary ".concat(textColor), _styleModuleImportMap)
3110
+ }, summary), /*#__PURE__*/React.createElement(LoadmoreButton, {
3111
+ collection: collection,
3112
+ template: "customUrlPath",
3113
+ config: config,
3114
+ navigate: function navigate() {
3115
+ return navigateTo(dispatch, url);
3116
+ },
3117
+ qtConfig: qtConfig
3118
+ }))));
3119
+ };
3120
+ MagazineHeaderCardBase.propTypes = {
3121
+ collection: PropTypes.shape({
3122
+ "created-at": PropTypes.number,
3123
+ summary: PropTypes.string,
3124
+ items: PropTypes.array
3125
+ }),
3126
+ config: PropTypes.shape({
3127
+ theme: PropTypes.string,
3128
+ footerButton: PropTypes.string,
3129
+ magazineTitle: PropTypes.string,
3130
+ magazinePageUrl: PropTypes.string,
3131
+ customUrlPath: PropTypes.string
3132
+ })
3133
+ };
3134
+ var MagazineHeaderCard = StateProvider(MagazineHeaderCardBase);
3135
+
3136
+ export { MagazineHeaderCard, MagazineHeaderCardBase };