@quintype/arrow 3.15.1-perf.1 → 3.15.1-perf.4

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