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