@pie-element/passage 2.15.1-next.12 → 2.15.1-next.3
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/controller/lib/index.js +8 -54
- package/controller/lib/index.js.map +1 -1
- package/docs/pie-schema.json +1 -377
- package/docs/pie-schema.json.md +1 -279
- package/module/controller.js +2296 -253
- package/module/demo.js +5 -2
- package/package.json +2 -2
- package/configure/lib/defaults.js +0 -139
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/design.js +0 -311
- package/configure/lib/design.js.map +0 -1
- package/configure/lib/index.js +0 -138
- package/configure/lib/index.js.map +0 -1
- package/configure/package.json +0 -19
- package/controller/lib/defaults.js +0 -22
- package/controller/lib/defaults.js.map +0 -1
- package/docs/config-schema.json +0 -644
- package/docs/config-schema.json.md +0 -477
- package/module/configure.js +0 -5995
package/module/controller.js
CHANGED
|
@@ -1,5 +1,282 @@
|
|
|
1
1
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Removes all key-value entries from the list cache.
|
|
5
|
+
*
|
|
6
|
+
* @private
|
|
7
|
+
* @name clear
|
|
8
|
+
* @memberOf ListCache
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
function listCacheClear$1() {
|
|
12
|
+
this.__data__ = [];
|
|
13
|
+
this.size = 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var _listCacheClear = listCacheClear$1;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Performs a
|
|
20
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
21
|
+
* comparison between two values to determine if they are equivalent.
|
|
22
|
+
*
|
|
23
|
+
* @static
|
|
24
|
+
* @memberOf _
|
|
25
|
+
* @since 4.0.0
|
|
26
|
+
* @category Lang
|
|
27
|
+
* @param {*} value The value to compare.
|
|
28
|
+
* @param {*} other The other value to compare.
|
|
29
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
30
|
+
* @example
|
|
31
|
+
*
|
|
32
|
+
* var object = { 'a': 1 };
|
|
33
|
+
* var other = { 'a': 1 };
|
|
34
|
+
*
|
|
35
|
+
* _.eq(object, object);
|
|
36
|
+
* // => true
|
|
37
|
+
*
|
|
38
|
+
* _.eq(object, other);
|
|
39
|
+
* // => false
|
|
40
|
+
*
|
|
41
|
+
* _.eq('a', 'a');
|
|
42
|
+
* // => true
|
|
43
|
+
*
|
|
44
|
+
* _.eq('a', Object('a'));
|
|
45
|
+
* // => false
|
|
46
|
+
*
|
|
47
|
+
* _.eq(NaN, NaN);
|
|
48
|
+
* // => true
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
function eq$2(value, other) {
|
|
52
|
+
return value === other || (value !== value && other !== other);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
var eq_1 = eq$2;
|
|
56
|
+
|
|
57
|
+
var eq$1 = eq_1;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
61
|
+
*
|
|
62
|
+
* @private
|
|
63
|
+
* @param {Array} array The array to inspect.
|
|
64
|
+
* @param {*} key The key to search for.
|
|
65
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
66
|
+
*/
|
|
67
|
+
function assocIndexOf$4(array, key) {
|
|
68
|
+
var length = array.length;
|
|
69
|
+
while (length--) {
|
|
70
|
+
if (eq$1(array[length][0], key)) {
|
|
71
|
+
return length;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return -1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
var _assocIndexOf = assocIndexOf$4;
|
|
78
|
+
|
|
79
|
+
var assocIndexOf$3 = _assocIndexOf;
|
|
80
|
+
|
|
81
|
+
/** Used for built-in method references. */
|
|
82
|
+
var arrayProto = Array.prototype;
|
|
83
|
+
|
|
84
|
+
/** Built-in value references. */
|
|
85
|
+
var splice = arrayProto.splice;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Removes `key` and its value from the list cache.
|
|
89
|
+
*
|
|
90
|
+
* @private
|
|
91
|
+
* @name delete
|
|
92
|
+
* @memberOf ListCache
|
|
93
|
+
* @param {string} key The key of the value to remove.
|
|
94
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
95
|
+
*/
|
|
96
|
+
function listCacheDelete$1(key) {
|
|
97
|
+
var data = this.__data__,
|
|
98
|
+
index = assocIndexOf$3(data, key);
|
|
99
|
+
|
|
100
|
+
if (index < 0) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
var lastIndex = data.length - 1;
|
|
104
|
+
if (index == lastIndex) {
|
|
105
|
+
data.pop();
|
|
106
|
+
} else {
|
|
107
|
+
splice.call(data, index, 1);
|
|
108
|
+
}
|
|
109
|
+
--this.size;
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
var _listCacheDelete = listCacheDelete$1;
|
|
114
|
+
|
|
115
|
+
var assocIndexOf$2 = _assocIndexOf;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Gets the list cache value for `key`.
|
|
119
|
+
*
|
|
120
|
+
* @private
|
|
121
|
+
* @name get
|
|
122
|
+
* @memberOf ListCache
|
|
123
|
+
* @param {string} key The key of the value to get.
|
|
124
|
+
* @returns {*} Returns the entry value.
|
|
125
|
+
*/
|
|
126
|
+
function listCacheGet$1(key) {
|
|
127
|
+
var data = this.__data__,
|
|
128
|
+
index = assocIndexOf$2(data, key);
|
|
129
|
+
|
|
130
|
+
return index < 0 ? undefined : data[index][1];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
var _listCacheGet = listCacheGet$1;
|
|
134
|
+
|
|
135
|
+
var assocIndexOf$1 = _assocIndexOf;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Checks if a list cache value for `key` exists.
|
|
139
|
+
*
|
|
140
|
+
* @private
|
|
141
|
+
* @name has
|
|
142
|
+
* @memberOf ListCache
|
|
143
|
+
* @param {string} key The key of the entry to check.
|
|
144
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
145
|
+
*/
|
|
146
|
+
function listCacheHas$1(key) {
|
|
147
|
+
return assocIndexOf$1(this.__data__, key) > -1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
var _listCacheHas = listCacheHas$1;
|
|
151
|
+
|
|
152
|
+
var assocIndexOf = _assocIndexOf;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Sets the list cache `key` to `value`.
|
|
156
|
+
*
|
|
157
|
+
* @private
|
|
158
|
+
* @name set
|
|
159
|
+
* @memberOf ListCache
|
|
160
|
+
* @param {string} key The key of the value to set.
|
|
161
|
+
* @param {*} value The value to set.
|
|
162
|
+
* @returns {Object} Returns the list cache instance.
|
|
163
|
+
*/
|
|
164
|
+
function listCacheSet$1(key, value) {
|
|
165
|
+
var data = this.__data__,
|
|
166
|
+
index = assocIndexOf(data, key);
|
|
167
|
+
|
|
168
|
+
if (index < 0) {
|
|
169
|
+
++this.size;
|
|
170
|
+
data.push([key, value]);
|
|
171
|
+
} else {
|
|
172
|
+
data[index][1] = value;
|
|
173
|
+
}
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
var _listCacheSet = listCacheSet$1;
|
|
178
|
+
|
|
179
|
+
var listCacheClear = _listCacheClear,
|
|
180
|
+
listCacheDelete = _listCacheDelete,
|
|
181
|
+
listCacheGet = _listCacheGet,
|
|
182
|
+
listCacheHas = _listCacheHas,
|
|
183
|
+
listCacheSet = _listCacheSet;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Creates an list cache object.
|
|
187
|
+
*
|
|
188
|
+
* @private
|
|
189
|
+
* @constructor
|
|
190
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
191
|
+
*/
|
|
192
|
+
function ListCache$4(entries) {
|
|
193
|
+
var index = -1,
|
|
194
|
+
length = entries == null ? 0 : entries.length;
|
|
195
|
+
|
|
196
|
+
this.clear();
|
|
197
|
+
while (++index < length) {
|
|
198
|
+
var entry = entries[index];
|
|
199
|
+
this.set(entry[0], entry[1]);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Add methods to `ListCache`.
|
|
204
|
+
ListCache$4.prototype.clear = listCacheClear;
|
|
205
|
+
ListCache$4.prototype['delete'] = listCacheDelete;
|
|
206
|
+
ListCache$4.prototype.get = listCacheGet;
|
|
207
|
+
ListCache$4.prototype.has = listCacheHas;
|
|
208
|
+
ListCache$4.prototype.set = listCacheSet;
|
|
209
|
+
|
|
210
|
+
var _ListCache = ListCache$4;
|
|
211
|
+
|
|
212
|
+
var ListCache$3 = _ListCache;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Removes all key-value entries from the stack.
|
|
216
|
+
*
|
|
217
|
+
* @private
|
|
218
|
+
* @name clear
|
|
219
|
+
* @memberOf Stack
|
|
220
|
+
*/
|
|
221
|
+
function stackClear$1() {
|
|
222
|
+
this.__data__ = new ListCache$3;
|
|
223
|
+
this.size = 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
var _stackClear = stackClear$1;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Removes `key` and its value from the stack.
|
|
230
|
+
*
|
|
231
|
+
* @private
|
|
232
|
+
* @name delete
|
|
233
|
+
* @memberOf Stack
|
|
234
|
+
* @param {string} key The key of the value to remove.
|
|
235
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
function stackDelete$1(key) {
|
|
239
|
+
var data = this.__data__,
|
|
240
|
+
result = data['delete'](key);
|
|
241
|
+
|
|
242
|
+
this.size = data.size;
|
|
243
|
+
return result;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
var _stackDelete = stackDelete$1;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Gets the stack value for `key`.
|
|
250
|
+
*
|
|
251
|
+
* @private
|
|
252
|
+
* @name get
|
|
253
|
+
* @memberOf Stack
|
|
254
|
+
* @param {string} key The key of the value to get.
|
|
255
|
+
* @returns {*} Returns the entry value.
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
function stackGet$1(key) {
|
|
259
|
+
return this.__data__.get(key);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
var _stackGet = stackGet$1;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Checks if a stack value for `key` exists.
|
|
266
|
+
*
|
|
267
|
+
* @private
|
|
268
|
+
* @name has
|
|
269
|
+
* @memberOf Stack
|
|
270
|
+
* @param {string} key The key of the entry to check.
|
|
271
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
function stackHas$1(key) {
|
|
275
|
+
return this.__data__.has(key);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
var _stackHas = stackHas$1;
|
|
279
|
+
|
|
3
280
|
/** Detect free variable `global` from Node.js. */
|
|
4
281
|
|
|
5
282
|
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
@@ -26,17 +303,17 @@ var _Symbol = Symbol$3;
|
|
|
26
303
|
var Symbol$2 = _Symbol;
|
|
27
304
|
|
|
28
305
|
/** Used for built-in method references. */
|
|
29
|
-
var objectProto$
|
|
306
|
+
var objectProto$c = Object.prototype;
|
|
30
307
|
|
|
31
308
|
/** Used to check objects for own properties. */
|
|
32
|
-
var hasOwnProperty$
|
|
309
|
+
var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
|
|
33
310
|
|
|
34
311
|
/**
|
|
35
312
|
* Used to resolve the
|
|
36
313
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
37
314
|
* of values.
|
|
38
315
|
*/
|
|
39
|
-
var nativeObjectToString$1 = objectProto$
|
|
316
|
+
var nativeObjectToString$1 = objectProto$c.toString;
|
|
40
317
|
|
|
41
318
|
/** Built-in value references. */
|
|
42
319
|
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
@@ -49,7 +326,7 @@ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
|
49
326
|
* @returns {string} Returns the raw `toStringTag`.
|
|
50
327
|
*/
|
|
51
328
|
function getRawTag$1(value) {
|
|
52
|
-
var isOwn = hasOwnProperty$
|
|
329
|
+
var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
|
|
53
330
|
tag = value[symToStringTag$1];
|
|
54
331
|
|
|
55
332
|
try {
|
|
@@ -72,14 +349,14 @@ var _getRawTag = getRawTag$1;
|
|
|
72
349
|
|
|
73
350
|
/** Used for built-in method references. */
|
|
74
351
|
|
|
75
|
-
var objectProto$
|
|
352
|
+
var objectProto$b = Object.prototype;
|
|
76
353
|
|
|
77
354
|
/**
|
|
78
355
|
* Used to resolve the
|
|
79
356
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
80
357
|
* of values.
|
|
81
358
|
*/
|
|
82
|
-
var nativeObjectToString = objectProto$
|
|
359
|
+
var nativeObjectToString = objectProto$b.toString;
|
|
83
360
|
|
|
84
361
|
/**
|
|
85
362
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -112,7 +389,7 @@ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
|
112
389
|
* @param {*} value The value to query.
|
|
113
390
|
* @returns {string} Returns the `toStringTag`.
|
|
114
391
|
*/
|
|
115
|
-
function baseGetTag$
|
|
392
|
+
function baseGetTag$4(value) {
|
|
116
393
|
if (value == null) {
|
|
117
394
|
return value === undefined ? undefinedTag : nullTag;
|
|
118
395
|
}
|
|
@@ -121,7 +398,7 @@ function baseGetTag$3(value) {
|
|
|
121
398
|
: objectToString(value);
|
|
122
399
|
}
|
|
123
400
|
|
|
124
|
-
var _baseGetTag = baseGetTag$
|
|
401
|
+
var _baseGetTag = baseGetTag$4;
|
|
125
402
|
|
|
126
403
|
/**
|
|
127
404
|
* Checks if `value` is the
|
|
@@ -149,20 +426,20 @@ var _baseGetTag = baseGetTag$3;
|
|
|
149
426
|
* // => false
|
|
150
427
|
*/
|
|
151
428
|
|
|
152
|
-
function isObject$
|
|
429
|
+
function isObject$5(value) {
|
|
153
430
|
var type = typeof value;
|
|
154
431
|
return value != null && (type == 'object' || type == 'function');
|
|
155
432
|
}
|
|
156
433
|
|
|
157
|
-
var isObject_1 = isObject$
|
|
434
|
+
var isObject_1 = isObject$5;
|
|
158
435
|
|
|
159
|
-
var baseGetTag$
|
|
160
|
-
isObject$
|
|
436
|
+
var baseGetTag$3 = _baseGetTag,
|
|
437
|
+
isObject$4 = isObject_1;
|
|
161
438
|
|
|
162
439
|
/** `Object#toString` result references. */
|
|
163
440
|
var asyncTag = '[object AsyncFunction]',
|
|
164
|
-
funcTag = '[object Function]',
|
|
165
|
-
genTag = '[object GeneratorFunction]',
|
|
441
|
+
funcTag$2 = '[object Function]',
|
|
442
|
+
genTag$1 = '[object GeneratorFunction]',
|
|
166
443
|
proxyTag = '[object Proxy]';
|
|
167
444
|
|
|
168
445
|
/**
|
|
@@ -182,17 +459,17 @@ var asyncTag = '[object AsyncFunction]',
|
|
|
182
459
|
* _.isFunction(/abc/);
|
|
183
460
|
* // => false
|
|
184
461
|
*/
|
|
185
|
-
function isFunction$
|
|
186
|
-
if (!isObject$
|
|
462
|
+
function isFunction$2(value) {
|
|
463
|
+
if (!isObject$4(value)) {
|
|
187
464
|
return false;
|
|
188
465
|
}
|
|
189
466
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
190
467
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
191
|
-
var tag = baseGetTag$
|
|
192
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
468
|
+
var tag = baseGetTag$3(value);
|
|
469
|
+
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
193
470
|
}
|
|
194
471
|
|
|
195
|
-
var isFunction_1 = isFunction$
|
|
472
|
+
var isFunction_1 = isFunction$2;
|
|
196
473
|
|
|
197
474
|
var root$6 = _root;
|
|
198
475
|
|
|
@@ -250,9 +527,9 @@ function toSource$2(func) {
|
|
|
250
527
|
|
|
251
528
|
var _toSource = toSource$2;
|
|
252
529
|
|
|
253
|
-
var isFunction = isFunction_1,
|
|
530
|
+
var isFunction$1 = isFunction_1,
|
|
254
531
|
isMasked = _isMasked,
|
|
255
|
-
isObject = isObject_1,
|
|
532
|
+
isObject$3 = isObject_1,
|
|
256
533
|
toSource$1 = _toSource;
|
|
257
534
|
|
|
258
535
|
/**
|
|
@@ -266,17 +543,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
266
543
|
|
|
267
544
|
/** Used for built-in method references. */
|
|
268
545
|
var funcProto = Function.prototype,
|
|
269
|
-
objectProto$
|
|
546
|
+
objectProto$a = Object.prototype;
|
|
270
547
|
|
|
271
548
|
/** Used to resolve the decompiled source of functions. */
|
|
272
549
|
var funcToString = funcProto.toString;
|
|
273
550
|
|
|
274
551
|
/** Used to check objects for own properties. */
|
|
275
|
-
var hasOwnProperty$
|
|
552
|
+
var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
|
|
276
553
|
|
|
277
554
|
/** Used to detect if a method is native. */
|
|
278
555
|
var reIsNative = RegExp('^' +
|
|
279
|
-
funcToString.call(hasOwnProperty$
|
|
556
|
+
funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
|
|
280
557
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
281
558
|
);
|
|
282
559
|
|
|
@@ -289,10 +566,10 @@ var reIsNative = RegExp('^' +
|
|
|
289
566
|
* else `false`.
|
|
290
567
|
*/
|
|
291
568
|
function baseIsNative$1(value) {
|
|
292
|
-
if (!isObject(value) || isMasked(value)) {
|
|
569
|
+
if (!isObject$3(value) || isMasked(value)) {
|
|
293
570
|
return false;
|
|
294
571
|
}
|
|
295
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
572
|
+
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
|
296
573
|
return pattern.test(toSource$1(value));
|
|
297
574
|
}
|
|
298
575
|
|
|
@@ -335,177 +612,1256 @@ var getNative$6 = _getNative,
|
|
|
335
612
|
root$5 = _root;
|
|
336
613
|
|
|
337
614
|
/* Built-in method references that are verified to be native. */
|
|
338
|
-
var Map$
|
|
615
|
+
var Map$3 = getNative$6(root$5, 'Map');
|
|
339
616
|
|
|
340
|
-
var _Map = Map$
|
|
617
|
+
var _Map = Map$3;
|
|
341
618
|
|
|
342
619
|
var getNative$5 = _getNative;
|
|
343
620
|
|
|
344
621
|
/* Built-in method references that are verified to be native. */
|
|
345
|
-
getNative$5(Object, 'create');
|
|
622
|
+
var nativeCreate$4 = getNative$5(Object, 'create');
|
|
346
623
|
|
|
347
|
-
var
|
|
624
|
+
var _nativeCreate = nativeCreate$4;
|
|
348
625
|
|
|
349
|
-
|
|
350
|
-
try {
|
|
351
|
-
var func = getNative$4(Object, 'defineProperty');
|
|
352
|
-
func({}, '', {});
|
|
353
|
-
return func;
|
|
354
|
-
} catch (e) {}
|
|
355
|
-
})());
|
|
626
|
+
var nativeCreate$3 = _nativeCreate;
|
|
356
627
|
|
|
357
628
|
/**
|
|
358
|
-
*
|
|
359
|
-
* and has a `typeof` result of "object".
|
|
360
|
-
*
|
|
361
|
-
* @static
|
|
362
|
-
* @memberOf _
|
|
363
|
-
* @since 4.0.0
|
|
364
|
-
* @category Lang
|
|
365
|
-
* @param {*} value The value to check.
|
|
366
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
367
|
-
* @example
|
|
368
|
-
*
|
|
369
|
-
* _.isObjectLike({});
|
|
370
|
-
* // => true
|
|
371
|
-
*
|
|
372
|
-
* _.isObjectLike([1, 2, 3]);
|
|
373
|
-
* // => true
|
|
629
|
+
* Removes all key-value entries from the hash.
|
|
374
630
|
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
631
|
+
* @private
|
|
632
|
+
* @name clear
|
|
633
|
+
* @memberOf Hash
|
|
634
|
+
*/
|
|
635
|
+
function hashClear$1() {
|
|
636
|
+
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
637
|
+
this.size = 0;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
var _hashClear = hashClear$1;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Removes `key` and its value from the hash.
|
|
377
644
|
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
645
|
+
* @private
|
|
646
|
+
* @name delete
|
|
647
|
+
* @memberOf Hash
|
|
648
|
+
* @param {Object} hash The hash to modify.
|
|
649
|
+
* @param {string} key The key of the value to remove.
|
|
650
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
380
651
|
*/
|
|
381
652
|
|
|
382
|
-
function
|
|
383
|
-
|
|
653
|
+
function hashDelete$1(key) {
|
|
654
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
655
|
+
this.size -= result ? 1 : 0;
|
|
656
|
+
return result;
|
|
384
657
|
}
|
|
385
658
|
|
|
386
|
-
var
|
|
659
|
+
var _hashDelete = hashDelete$1;
|
|
387
660
|
|
|
388
|
-
var
|
|
389
|
-
isObjectLike$1 = isObjectLike_1;
|
|
661
|
+
var nativeCreate$2 = _nativeCreate;
|
|
390
662
|
|
|
391
|
-
/** `
|
|
392
|
-
var
|
|
663
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
664
|
+
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
665
|
+
|
|
666
|
+
/** Used for built-in method references. */
|
|
667
|
+
var objectProto$9 = Object.prototype;
|
|
668
|
+
|
|
669
|
+
/** Used to check objects for own properties. */
|
|
670
|
+
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
393
671
|
|
|
394
672
|
/**
|
|
395
|
-
*
|
|
673
|
+
* Gets the hash value for `key`.
|
|
396
674
|
*
|
|
397
675
|
* @private
|
|
398
|
-
* @
|
|
399
|
-
* @
|
|
676
|
+
* @name get
|
|
677
|
+
* @memberOf Hash
|
|
678
|
+
* @param {string} key The key of the value to get.
|
|
679
|
+
* @returns {*} Returns the entry value.
|
|
400
680
|
*/
|
|
401
|
-
function
|
|
402
|
-
|
|
681
|
+
function hashGet$1(key) {
|
|
682
|
+
var data = this.__data__;
|
|
683
|
+
if (nativeCreate$2) {
|
|
684
|
+
var result = data[key];
|
|
685
|
+
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
686
|
+
}
|
|
687
|
+
return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
|
|
403
688
|
}
|
|
404
689
|
|
|
405
|
-
var
|
|
690
|
+
var _hashGet = hashGet$1;
|
|
406
691
|
|
|
407
|
-
var
|
|
408
|
-
isObjectLike = isObjectLike_1;
|
|
692
|
+
var nativeCreate$1 = _nativeCreate;
|
|
409
693
|
|
|
410
694
|
/** Used for built-in method references. */
|
|
411
|
-
var objectProto = Object.prototype;
|
|
695
|
+
var objectProto$8 = Object.prototype;
|
|
412
696
|
|
|
413
697
|
/** Used to check objects for own properties. */
|
|
414
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
415
|
-
|
|
416
|
-
/** Built-in value references. */
|
|
417
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
698
|
+
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
418
699
|
|
|
419
700
|
/**
|
|
420
|
-
* Checks if
|
|
421
|
-
*
|
|
422
|
-
* @static
|
|
423
|
-
* @memberOf _
|
|
424
|
-
* @since 0.1.0
|
|
425
|
-
* @category Lang
|
|
426
|
-
* @param {*} value The value to check.
|
|
427
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
428
|
-
* else `false`.
|
|
429
|
-
* @example
|
|
430
|
-
*
|
|
431
|
-
* _.isArguments(function() { return arguments; }());
|
|
432
|
-
* // => true
|
|
701
|
+
* Checks if a hash value for `key` exists.
|
|
433
702
|
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
703
|
+
* @private
|
|
704
|
+
* @name has
|
|
705
|
+
* @memberOf Hash
|
|
706
|
+
* @param {string} key The key of the entry to check.
|
|
707
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
436
708
|
*/
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}
|
|
709
|
+
function hashHas$1(key) {
|
|
710
|
+
var data = this.__data__;
|
|
711
|
+
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
var _hashHas = hashHas$1;
|
|
441
715
|
|
|
442
|
-
var
|
|
716
|
+
var nativeCreate = _nativeCreate;
|
|
717
|
+
|
|
718
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
719
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
443
720
|
|
|
444
721
|
/**
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
* @static
|
|
448
|
-
* @memberOf _
|
|
449
|
-
* @since 4.13.0
|
|
450
|
-
* @category Util
|
|
451
|
-
* @returns {boolean} Returns `false`.
|
|
452
|
-
* @example
|
|
722
|
+
* Sets the hash `key` to `value`.
|
|
453
723
|
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
724
|
+
* @private
|
|
725
|
+
* @name set
|
|
726
|
+
* @memberOf Hash
|
|
727
|
+
* @param {string} key The key of the value to set.
|
|
728
|
+
* @param {*} value The value to set.
|
|
729
|
+
* @returns {Object} Returns the hash instance.
|
|
456
730
|
*/
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
731
|
+
function hashSet$1(key, value) {
|
|
732
|
+
var data = this.__data__;
|
|
733
|
+
this.size += this.has(key) ? 0 : 1;
|
|
734
|
+
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
735
|
+
return this;
|
|
460
736
|
}
|
|
461
737
|
|
|
462
|
-
var
|
|
738
|
+
var _hashSet = hashSet$1;
|
|
463
739
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
740
|
+
var hashClear = _hashClear,
|
|
741
|
+
hashDelete = _hashDelete,
|
|
742
|
+
hashGet = _hashGet,
|
|
743
|
+
hashHas = _hashHas,
|
|
744
|
+
hashSet = _hashSet;
|
|
467
745
|
|
|
468
|
-
/**
|
|
469
|
-
|
|
746
|
+
/**
|
|
747
|
+
* Creates a hash object.
|
|
748
|
+
*
|
|
749
|
+
* @private
|
|
750
|
+
* @constructor
|
|
751
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
752
|
+
*/
|
|
753
|
+
function Hash$1(entries) {
|
|
754
|
+
var index = -1,
|
|
755
|
+
length = entries == null ? 0 : entries.length;
|
|
756
|
+
|
|
757
|
+
this.clear();
|
|
758
|
+
while (++index < length) {
|
|
759
|
+
var entry = entries[index];
|
|
760
|
+
this.set(entry[0], entry[1]);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
470
763
|
|
|
471
|
-
|
|
472
|
-
|
|
764
|
+
// Add methods to `Hash`.
|
|
765
|
+
Hash$1.prototype.clear = hashClear;
|
|
766
|
+
Hash$1.prototype['delete'] = hashDelete;
|
|
767
|
+
Hash$1.prototype.get = hashGet;
|
|
768
|
+
Hash$1.prototype.has = hashHas;
|
|
769
|
+
Hash$1.prototype.set = hashSet;
|
|
473
770
|
|
|
474
|
-
|
|
475
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
771
|
+
var _Hash = Hash$1;
|
|
476
772
|
|
|
477
|
-
|
|
478
|
-
|
|
773
|
+
var Hash = _Hash,
|
|
774
|
+
ListCache$2 = _ListCache,
|
|
775
|
+
Map$2 = _Map;
|
|
479
776
|
|
|
480
|
-
|
|
481
|
-
|
|
777
|
+
/**
|
|
778
|
+
* Removes all key-value entries from the map.
|
|
779
|
+
*
|
|
780
|
+
* @private
|
|
781
|
+
* @name clear
|
|
782
|
+
* @memberOf MapCache
|
|
783
|
+
*/
|
|
784
|
+
function mapCacheClear$1() {
|
|
785
|
+
this.size = 0;
|
|
786
|
+
this.__data__ = {
|
|
787
|
+
'hash': new Hash,
|
|
788
|
+
'map': new (Map$2 || ListCache$2),
|
|
789
|
+
'string': new Hash
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
var _mapCacheClear = mapCacheClear$1;
|
|
482
794
|
|
|
483
795
|
/**
|
|
484
|
-
* Checks if `value` is
|
|
796
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
485
797
|
*
|
|
486
|
-
* @
|
|
487
|
-
* @
|
|
488
|
-
* @
|
|
489
|
-
|
|
798
|
+
* @private
|
|
799
|
+
* @param {*} value The value to check.
|
|
800
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
801
|
+
*/
|
|
802
|
+
|
|
803
|
+
function isKeyable$1(value) {
|
|
804
|
+
var type = typeof value;
|
|
805
|
+
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
806
|
+
? (value !== '__proto__')
|
|
807
|
+
: (value === null);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
var _isKeyable = isKeyable$1;
|
|
811
|
+
|
|
812
|
+
var isKeyable = _isKeyable;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Gets the data for `map`.
|
|
816
|
+
*
|
|
817
|
+
* @private
|
|
818
|
+
* @param {Object} map The map to query.
|
|
819
|
+
* @param {string} key The reference key.
|
|
820
|
+
* @returns {*} Returns the map data.
|
|
821
|
+
*/
|
|
822
|
+
function getMapData$4(map, key) {
|
|
823
|
+
var data = map.__data__;
|
|
824
|
+
return isKeyable(key)
|
|
825
|
+
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
826
|
+
: data.map;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
var _getMapData = getMapData$4;
|
|
830
|
+
|
|
831
|
+
var getMapData$3 = _getMapData;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Removes `key` and its value from the map.
|
|
835
|
+
*
|
|
836
|
+
* @private
|
|
837
|
+
* @name delete
|
|
838
|
+
* @memberOf MapCache
|
|
839
|
+
* @param {string} key The key of the value to remove.
|
|
840
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
841
|
+
*/
|
|
842
|
+
function mapCacheDelete$1(key) {
|
|
843
|
+
var result = getMapData$3(this, key)['delete'](key);
|
|
844
|
+
this.size -= result ? 1 : 0;
|
|
845
|
+
return result;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
var _mapCacheDelete = mapCacheDelete$1;
|
|
849
|
+
|
|
850
|
+
var getMapData$2 = _getMapData;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Gets the map value for `key`.
|
|
854
|
+
*
|
|
855
|
+
* @private
|
|
856
|
+
* @name get
|
|
857
|
+
* @memberOf MapCache
|
|
858
|
+
* @param {string} key The key of the value to get.
|
|
859
|
+
* @returns {*} Returns the entry value.
|
|
860
|
+
*/
|
|
861
|
+
function mapCacheGet$1(key) {
|
|
862
|
+
return getMapData$2(this, key).get(key);
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
var _mapCacheGet = mapCacheGet$1;
|
|
866
|
+
|
|
867
|
+
var getMapData$1 = _getMapData;
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Checks if a map value for `key` exists.
|
|
871
|
+
*
|
|
872
|
+
* @private
|
|
873
|
+
* @name has
|
|
874
|
+
* @memberOf MapCache
|
|
875
|
+
* @param {string} key The key of the entry to check.
|
|
876
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
877
|
+
*/
|
|
878
|
+
function mapCacheHas$1(key) {
|
|
879
|
+
return getMapData$1(this, key).has(key);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
var _mapCacheHas = mapCacheHas$1;
|
|
883
|
+
|
|
884
|
+
var getMapData = _getMapData;
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* Sets the map `key` to `value`.
|
|
888
|
+
*
|
|
889
|
+
* @private
|
|
890
|
+
* @name set
|
|
891
|
+
* @memberOf MapCache
|
|
892
|
+
* @param {string} key The key of the value to set.
|
|
893
|
+
* @param {*} value The value to set.
|
|
894
|
+
* @returns {Object} Returns the map cache instance.
|
|
895
|
+
*/
|
|
896
|
+
function mapCacheSet$1(key, value) {
|
|
897
|
+
var data = getMapData(this, key),
|
|
898
|
+
size = data.size;
|
|
899
|
+
|
|
900
|
+
data.set(key, value);
|
|
901
|
+
this.size += data.size == size ? 0 : 1;
|
|
902
|
+
return this;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
var _mapCacheSet = mapCacheSet$1;
|
|
906
|
+
|
|
907
|
+
var mapCacheClear = _mapCacheClear,
|
|
908
|
+
mapCacheDelete = _mapCacheDelete,
|
|
909
|
+
mapCacheGet = _mapCacheGet,
|
|
910
|
+
mapCacheHas = _mapCacheHas,
|
|
911
|
+
mapCacheSet = _mapCacheSet;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Creates a map cache object to store key-value pairs.
|
|
915
|
+
*
|
|
916
|
+
* @private
|
|
917
|
+
* @constructor
|
|
918
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
919
|
+
*/
|
|
920
|
+
function MapCache$1(entries) {
|
|
921
|
+
var index = -1,
|
|
922
|
+
length = entries == null ? 0 : entries.length;
|
|
923
|
+
|
|
924
|
+
this.clear();
|
|
925
|
+
while (++index < length) {
|
|
926
|
+
var entry = entries[index];
|
|
927
|
+
this.set(entry[0], entry[1]);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
// Add methods to `MapCache`.
|
|
932
|
+
MapCache$1.prototype.clear = mapCacheClear;
|
|
933
|
+
MapCache$1.prototype['delete'] = mapCacheDelete;
|
|
934
|
+
MapCache$1.prototype.get = mapCacheGet;
|
|
935
|
+
MapCache$1.prototype.has = mapCacheHas;
|
|
936
|
+
MapCache$1.prototype.set = mapCacheSet;
|
|
937
|
+
|
|
938
|
+
var _MapCache = MapCache$1;
|
|
939
|
+
|
|
940
|
+
var ListCache$1 = _ListCache,
|
|
941
|
+
Map$1 = _Map,
|
|
942
|
+
MapCache = _MapCache;
|
|
943
|
+
|
|
944
|
+
/** Used as the size to enable large array optimizations. */
|
|
945
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Sets the stack `key` to `value`.
|
|
949
|
+
*
|
|
950
|
+
* @private
|
|
951
|
+
* @name set
|
|
952
|
+
* @memberOf Stack
|
|
953
|
+
* @param {string} key The key of the value to set.
|
|
954
|
+
* @param {*} value The value to set.
|
|
955
|
+
* @returns {Object} Returns the stack cache instance.
|
|
956
|
+
*/
|
|
957
|
+
function stackSet$1(key, value) {
|
|
958
|
+
var data = this.__data__;
|
|
959
|
+
if (data instanceof ListCache$1) {
|
|
960
|
+
var pairs = data.__data__;
|
|
961
|
+
if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
962
|
+
pairs.push([key, value]);
|
|
963
|
+
this.size = ++data.size;
|
|
964
|
+
return this;
|
|
965
|
+
}
|
|
966
|
+
data = this.__data__ = new MapCache(pairs);
|
|
967
|
+
}
|
|
968
|
+
data.set(key, value);
|
|
969
|
+
this.size = data.size;
|
|
970
|
+
return this;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
var _stackSet = stackSet$1;
|
|
974
|
+
|
|
975
|
+
var ListCache = _ListCache,
|
|
976
|
+
stackClear = _stackClear,
|
|
977
|
+
stackDelete = _stackDelete,
|
|
978
|
+
stackGet = _stackGet,
|
|
979
|
+
stackHas = _stackHas,
|
|
980
|
+
stackSet = _stackSet;
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Creates a stack cache object to store key-value pairs.
|
|
984
|
+
*
|
|
985
|
+
* @private
|
|
986
|
+
* @constructor
|
|
987
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
988
|
+
*/
|
|
989
|
+
function Stack$1(entries) {
|
|
990
|
+
var data = this.__data__ = new ListCache(entries);
|
|
991
|
+
this.size = data.size;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
// Add methods to `Stack`.
|
|
995
|
+
Stack$1.prototype.clear = stackClear;
|
|
996
|
+
Stack$1.prototype['delete'] = stackDelete;
|
|
997
|
+
Stack$1.prototype.get = stackGet;
|
|
998
|
+
Stack$1.prototype.has = stackHas;
|
|
999
|
+
Stack$1.prototype.set = stackSet;
|
|
1000
|
+
|
|
1001
|
+
var _Stack = Stack$1;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* A specialized version of `_.forEach` for arrays without support for
|
|
1005
|
+
* iteratee shorthands.
|
|
1006
|
+
*
|
|
1007
|
+
* @private
|
|
1008
|
+
* @param {Array} [array] The array to iterate over.
|
|
1009
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
1010
|
+
* @returns {Array} Returns `array`.
|
|
1011
|
+
*/
|
|
1012
|
+
|
|
1013
|
+
function arrayEach$1(array, iteratee) {
|
|
1014
|
+
var index = -1,
|
|
1015
|
+
length = array == null ? 0 : array.length;
|
|
1016
|
+
|
|
1017
|
+
while (++index < length) {
|
|
1018
|
+
if (iteratee(array[index], index, array) === false) {
|
|
1019
|
+
break;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
return array;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
var _arrayEach = arrayEach$1;
|
|
1026
|
+
|
|
1027
|
+
var getNative$4 = _getNative;
|
|
1028
|
+
|
|
1029
|
+
var defineProperty$1 = (function() {
|
|
1030
|
+
try {
|
|
1031
|
+
var func = getNative$4(Object, 'defineProperty');
|
|
1032
|
+
func({}, '', {});
|
|
1033
|
+
return func;
|
|
1034
|
+
} catch (e) {}
|
|
1035
|
+
}());
|
|
1036
|
+
|
|
1037
|
+
var _defineProperty = defineProperty$1;
|
|
1038
|
+
|
|
1039
|
+
var defineProperty = _defineProperty;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
1043
|
+
* value checks.
|
|
1044
|
+
*
|
|
1045
|
+
* @private
|
|
1046
|
+
* @param {Object} object The object to modify.
|
|
1047
|
+
* @param {string} key The key of the property to assign.
|
|
1048
|
+
* @param {*} value The value to assign.
|
|
1049
|
+
*/
|
|
1050
|
+
function baseAssignValue$2(object, key, value) {
|
|
1051
|
+
if (key == '__proto__' && defineProperty) {
|
|
1052
|
+
defineProperty(object, key, {
|
|
1053
|
+
'configurable': true,
|
|
1054
|
+
'enumerable': true,
|
|
1055
|
+
'value': value,
|
|
1056
|
+
'writable': true
|
|
1057
|
+
});
|
|
1058
|
+
} else {
|
|
1059
|
+
object[key] = value;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
var _baseAssignValue = baseAssignValue$2;
|
|
1064
|
+
|
|
1065
|
+
var baseAssignValue$1 = _baseAssignValue,
|
|
1066
|
+
eq = eq_1;
|
|
1067
|
+
|
|
1068
|
+
/** Used for built-in method references. */
|
|
1069
|
+
var objectProto$7 = Object.prototype;
|
|
1070
|
+
|
|
1071
|
+
/** Used to check objects for own properties. */
|
|
1072
|
+
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
1076
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1077
|
+
* for equality comparisons.
|
|
1078
|
+
*
|
|
1079
|
+
* @private
|
|
1080
|
+
* @param {Object} object The object to modify.
|
|
1081
|
+
* @param {string} key The key of the property to assign.
|
|
1082
|
+
* @param {*} value The value to assign.
|
|
1083
|
+
*/
|
|
1084
|
+
function assignValue$2(object, key, value) {
|
|
1085
|
+
var objValue = object[key];
|
|
1086
|
+
if (!(hasOwnProperty$5.call(object, key) && eq(objValue, value)) ||
|
|
1087
|
+
(value === undefined && !(key in object))) {
|
|
1088
|
+
baseAssignValue$1(object, key, value);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
var _assignValue = assignValue$2;
|
|
1093
|
+
|
|
1094
|
+
var assignValue$1 = _assignValue,
|
|
1095
|
+
baseAssignValue = _baseAssignValue;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Copies properties of `source` to `object`.
|
|
1099
|
+
*
|
|
1100
|
+
* @private
|
|
1101
|
+
* @param {Object} source The object to copy properties from.
|
|
1102
|
+
* @param {Array} props The property identifiers to copy.
|
|
1103
|
+
* @param {Object} [object={}] The object to copy properties to.
|
|
1104
|
+
* @param {Function} [customizer] The function to customize copied values.
|
|
1105
|
+
* @returns {Object} Returns `object`.
|
|
1106
|
+
*/
|
|
1107
|
+
function copyObject$4(source, props, object, customizer) {
|
|
1108
|
+
var isNew = !object;
|
|
1109
|
+
object || (object = {});
|
|
1110
|
+
|
|
1111
|
+
var index = -1,
|
|
1112
|
+
length = props.length;
|
|
1113
|
+
|
|
1114
|
+
while (++index < length) {
|
|
1115
|
+
var key = props[index];
|
|
1116
|
+
|
|
1117
|
+
var newValue = customizer
|
|
1118
|
+
? customizer(object[key], source[key], key, object, source)
|
|
1119
|
+
: undefined;
|
|
1120
|
+
|
|
1121
|
+
if (newValue === undefined) {
|
|
1122
|
+
newValue = source[key];
|
|
1123
|
+
}
|
|
1124
|
+
if (isNew) {
|
|
1125
|
+
baseAssignValue(object, key, newValue);
|
|
1126
|
+
} else {
|
|
1127
|
+
assignValue$1(object, key, newValue);
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
return object;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
var _copyObject = copyObject$4;
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
1137
|
+
* or max array length checks.
|
|
1138
|
+
*
|
|
1139
|
+
* @private
|
|
1140
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
1141
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
1142
|
+
* @returns {Array} Returns the array of results.
|
|
1143
|
+
*/
|
|
1144
|
+
|
|
1145
|
+
function baseTimes$1(n, iteratee) {
|
|
1146
|
+
var index = -1,
|
|
1147
|
+
result = Array(n);
|
|
1148
|
+
|
|
1149
|
+
while (++index < n) {
|
|
1150
|
+
result[index] = iteratee(index);
|
|
1151
|
+
}
|
|
1152
|
+
return result;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
var _baseTimes = baseTimes$1;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1159
|
+
* and has a `typeof` result of "object".
|
|
1160
|
+
*
|
|
1161
|
+
* @static
|
|
1162
|
+
* @memberOf _
|
|
1163
|
+
* @since 4.0.0
|
|
1164
|
+
* @category Lang
|
|
1165
|
+
* @param {*} value The value to check.
|
|
1166
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1167
|
+
* @example
|
|
1168
|
+
*
|
|
1169
|
+
* _.isObjectLike({});
|
|
1170
|
+
* // => true
|
|
1171
|
+
*
|
|
1172
|
+
* _.isObjectLike([1, 2, 3]);
|
|
1173
|
+
* // => true
|
|
1174
|
+
*
|
|
1175
|
+
* _.isObjectLike(_.noop);
|
|
1176
|
+
* // => false
|
|
1177
|
+
*
|
|
1178
|
+
* _.isObjectLike(null);
|
|
1179
|
+
* // => false
|
|
1180
|
+
*/
|
|
1181
|
+
|
|
1182
|
+
function isObjectLike$5(value) {
|
|
1183
|
+
return value != null && typeof value == 'object';
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
var isObjectLike_1 = isObjectLike$5;
|
|
1187
|
+
|
|
1188
|
+
var baseGetTag$2 = _baseGetTag,
|
|
1189
|
+
isObjectLike$4 = isObjectLike_1;
|
|
1190
|
+
|
|
1191
|
+
/** `Object#toString` result references. */
|
|
1192
|
+
var argsTag$2 = '[object Arguments]';
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* The base implementation of `_.isArguments`.
|
|
1196
|
+
*
|
|
1197
|
+
* @private
|
|
1198
|
+
* @param {*} value The value to check.
|
|
1199
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1200
|
+
*/
|
|
1201
|
+
function baseIsArguments$1(value) {
|
|
1202
|
+
return isObjectLike$4(value) && baseGetTag$2(value) == argsTag$2;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
var _baseIsArguments = baseIsArguments$1;
|
|
1206
|
+
|
|
1207
|
+
var baseIsArguments = _baseIsArguments,
|
|
1208
|
+
isObjectLike$3 = isObjectLike_1;
|
|
1209
|
+
|
|
1210
|
+
/** Used for built-in method references. */
|
|
1211
|
+
var objectProto$6 = Object.prototype;
|
|
1212
|
+
|
|
1213
|
+
/** Used to check objects for own properties. */
|
|
1214
|
+
var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
|
|
1215
|
+
|
|
1216
|
+
/** Built-in value references. */
|
|
1217
|
+
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Checks if `value` is likely an `arguments` object.
|
|
1221
|
+
*
|
|
1222
|
+
* @static
|
|
1223
|
+
* @memberOf _
|
|
1224
|
+
* @since 0.1.0
|
|
1225
|
+
* @category Lang
|
|
1226
|
+
* @param {*} value The value to check.
|
|
1227
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1228
|
+
* else `false`.
|
|
1229
|
+
* @example
|
|
1230
|
+
*
|
|
1231
|
+
* _.isArguments(function() { return arguments; }());
|
|
1232
|
+
* // => true
|
|
1233
|
+
*
|
|
1234
|
+
* _.isArguments([1, 2, 3]);
|
|
1235
|
+
* // => false
|
|
1236
|
+
*/
|
|
1237
|
+
var isArguments$1 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
1238
|
+
return isObjectLike$3(value) && hasOwnProperty$4.call(value, 'callee') &&
|
|
1239
|
+
!propertyIsEnumerable$1.call(value, 'callee');
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
var isArguments_1 = isArguments$1;
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Checks if `value` is classified as an `Array` object.
|
|
1246
|
+
*
|
|
1247
|
+
* @static
|
|
1248
|
+
* @memberOf _
|
|
1249
|
+
* @since 0.1.0
|
|
1250
|
+
* @category Lang
|
|
1251
|
+
* @param {*} value The value to check.
|
|
1252
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1253
|
+
* @example
|
|
1254
|
+
*
|
|
1255
|
+
* _.isArray([1, 2, 3]);
|
|
1256
|
+
* // => true
|
|
1257
|
+
*
|
|
1258
|
+
* _.isArray(document.body.children);
|
|
1259
|
+
* // => false
|
|
1260
|
+
*
|
|
1261
|
+
* _.isArray('abc');
|
|
1262
|
+
* // => false
|
|
1263
|
+
*
|
|
1264
|
+
* _.isArray(_.noop);
|
|
1265
|
+
* // => false
|
|
1266
|
+
*/
|
|
1267
|
+
|
|
1268
|
+
var isArray$3 = Array.isArray;
|
|
1269
|
+
|
|
1270
|
+
var isArray_1 = isArray$3;
|
|
1271
|
+
|
|
1272
|
+
var isBuffer$2 = {exports: {}};
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* This method returns `false`.
|
|
1276
|
+
*
|
|
1277
|
+
* @static
|
|
1278
|
+
* @memberOf _
|
|
1279
|
+
* @since 4.13.0
|
|
1280
|
+
* @category Util
|
|
1281
|
+
* @returns {boolean} Returns `false`.
|
|
1282
|
+
* @example
|
|
1283
|
+
*
|
|
1284
|
+
* _.times(2, _.stubFalse);
|
|
1285
|
+
* // => [false, false]
|
|
1286
|
+
*/
|
|
1287
|
+
|
|
1288
|
+
function stubFalse() {
|
|
1289
|
+
return false;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
var stubFalse_1 = stubFalse;
|
|
1293
|
+
|
|
1294
|
+
(function (module, exports) {
|
|
1295
|
+
var root = _root,
|
|
1296
|
+
stubFalse = stubFalse_1;
|
|
1297
|
+
|
|
1298
|
+
/** Detect free variable `exports`. */
|
|
1299
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
1300
|
+
|
|
1301
|
+
/** Detect free variable `module`. */
|
|
1302
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1303
|
+
|
|
1304
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1305
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1306
|
+
|
|
1307
|
+
/** Built-in value references. */
|
|
1308
|
+
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
1309
|
+
|
|
1310
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1311
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Checks if `value` is a buffer.
|
|
1315
|
+
*
|
|
1316
|
+
* @static
|
|
1317
|
+
* @memberOf _
|
|
1318
|
+
* @since 4.3.0
|
|
1319
|
+
* @category Lang
|
|
490
1320
|
* @param {*} value The value to check.
|
|
491
1321
|
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
492
1322
|
* @example
|
|
493
1323
|
*
|
|
494
|
-
* _.isBuffer(new Buffer(2));
|
|
1324
|
+
* _.isBuffer(new Buffer(2));
|
|
1325
|
+
* // => true
|
|
1326
|
+
*
|
|
1327
|
+
* _.isBuffer(new Uint8Array(2));
|
|
1328
|
+
* // => false
|
|
1329
|
+
*/
|
|
1330
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1331
|
+
|
|
1332
|
+
module.exports = isBuffer;
|
|
1333
|
+
}(isBuffer$2, isBuffer$2.exports));
|
|
1334
|
+
|
|
1335
|
+
/** Used as references for various `Number` constants. */
|
|
1336
|
+
|
|
1337
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
1338
|
+
|
|
1339
|
+
/** Used to detect unsigned integer values. */
|
|
1340
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Checks if `value` is a valid array-like index.
|
|
1344
|
+
*
|
|
1345
|
+
* @private
|
|
1346
|
+
* @param {*} value The value to check.
|
|
1347
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
1348
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
1349
|
+
*/
|
|
1350
|
+
function isIndex$1(value, length) {
|
|
1351
|
+
var type = typeof value;
|
|
1352
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
1353
|
+
|
|
1354
|
+
return !!length &&
|
|
1355
|
+
(type == 'number' ||
|
|
1356
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
1357
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
var _isIndex = isIndex$1;
|
|
1361
|
+
|
|
1362
|
+
/** Used as references for various `Number` constants. */
|
|
1363
|
+
|
|
1364
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Checks if `value` is a valid array-like length.
|
|
1368
|
+
*
|
|
1369
|
+
* **Note:** This method is loosely based on
|
|
1370
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
1371
|
+
*
|
|
1372
|
+
* @static
|
|
1373
|
+
* @memberOf _
|
|
1374
|
+
* @since 4.0.0
|
|
1375
|
+
* @category Lang
|
|
1376
|
+
* @param {*} value The value to check.
|
|
1377
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
1378
|
+
* @example
|
|
1379
|
+
*
|
|
1380
|
+
* _.isLength(3);
|
|
1381
|
+
* // => true
|
|
1382
|
+
*
|
|
1383
|
+
* _.isLength(Number.MIN_VALUE);
|
|
1384
|
+
* // => false
|
|
1385
|
+
*
|
|
1386
|
+
* _.isLength(Infinity);
|
|
1387
|
+
* // => false
|
|
1388
|
+
*
|
|
1389
|
+
* _.isLength('3');
|
|
1390
|
+
* // => false
|
|
1391
|
+
*/
|
|
1392
|
+
function isLength$2(value) {
|
|
1393
|
+
return typeof value == 'number' &&
|
|
1394
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
var isLength_1 = isLength$2;
|
|
1398
|
+
|
|
1399
|
+
var baseGetTag$1 = _baseGetTag,
|
|
1400
|
+
isLength$1 = isLength_1,
|
|
1401
|
+
isObjectLike$2 = isObjectLike_1;
|
|
1402
|
+
|
|
1403
|
+
/** `Object#toString` result references. */
|
|
1404
|
+
var argsTag$1 = '[object Arguments]',
|
|
1405
|
+
arrayTag$1 = '[object Array]',
|
|
1406
|
+
boolTag$2 = '[object Boolean]',
|
|
1407
|
+
dateTag$2 = '[object Date]',
|
|
1408
|
+
errorTag$1 = '[object Error]',
|
|
1409
|
+
funcTag$1 = '[object Function]',
|
|
1410
|
+
mapTag$4 = '[object Map]',
|
|
1411
|
+
numberTag$2 = '[object Number]',
|
|
1412
|
+
objectTag$2 = '[object Object]',
|
|
1413
|
+
regexpTag$2 = '[object RegExp]',
|
|
1414
|
+
setTag$4 = '[object Set]',
|
|
1415
|
+
stringTag$2 = '[object String]',
|
|
1416
|
+
weakMapTag$2 = '[object WeakMap]';
|
|
1417
|
+
|
|
1418
|
+
var arrayBufferTag$2 = '[object ArrayBuffer]',
|
|
1419
|
+
dataViewTag$3 = '[object DataView]',
|
|
1420
|
+
float32Tag$2 = '[object Float32Array]',
|
|
1421
|
+
float64Tag$2 = '[object Float64Array]',
|
|
1422
|
+
int8Tag$2 = '[object Int8Array]',
|
|
1423
|
+
int16Tag$2 = '[object Int16Array]',
|
|
1424
|
+
int32Tag$2 = '[object Int32Array]',
|
|
1425
|
+
uint8Tag$2 = '[object Uint8Array]',
|
|
1426
|
+
uint8ClampedTag$2 = '[object Uint8ClampedArray]',
|
|
1427
|
+
uint16Tag$2 = '[object Uint16Array]',
|
|
1428
|
+
uint32Tag$2 = '[object Uint32Array]';
|
|
1429
|
+
|
|
1430
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
1431
|
+
var typedArrayTags = {};
|
|
1432
|
+
typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
|
|
1433
|
+
typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
|
|
1434
|
+
typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
|
|
1435
|
+
typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
|
|
1436
|
+
typedArrayTags[uint32Tag$2] = true;
|
|
1437
|
+
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
|
|
1438
|
+
typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
|
|
1439
|
+
typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
|
|
1440
|
+
typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
|
|
1441
|
+
typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
|
|
1442
|
+
typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
|
|
1443
|
+
typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
|
|
1444
|
+
typedArrayTags[weakMapTag$2] = false;
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
1448
|
+
*
|
|
1449
|
+
* @private
|
|
1450
|
+
* @param {*} value The value to check.
|
|
1451
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
1452
|
+
*/
|
|
1453
|
+
function baseIsTypedArray$1(value) {
|
|
1454
|
+
return isObjectLike$2(value) &&
|
|
1455
|
+
isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)];
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
var _baseIsTypedArray = baseIsTypedArray$1;
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
1462
|
+
*
|
|
1463
|
+
* @private
|
|
1464
|
+
* @param {Function} func The function to cap arguments for.
|
|
1465
|
+
* @returns {Function} Returns the new capped function.
|
|
1466
|
+
*/
|
|
1467
|
+
|
|
1468
|
+
function baseUnary$3(func) {
|
|
1469
|
+
return function(value) {
|
|
1470
|
+
return func(value);
|
|
1471
|
+
};
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
var _baseUnary = baseUnary$3;
|
|
1475
|
+
|
|
1476
|
+
var _nodeUtil = {exports: {}};
|
|
1477
|
+
|
|
1478
|
+
(function (module, exports) {
|
|
1479
|
+
var freeGlobal = _freeGlobal;
|
|
1480
|
+
|
|
1481
|
+
/** Detect free variable `exports`. */
|
|
1482
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
1483
|
+
|
|
1484
|
+
/** Detect free variable `module`. */
|
|
1485
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1486
|
+
|
|
1487
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1488
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1489
|
+
|
|
1490
|
+
/** Detect free variable `process` from Node.js. */
|
|
1491
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
1492
|
+
|
|
1493
|
+
/** Used to access faster Node.js helpers. */
|
|
1494
|
+
var nodeUtil = (function() {
|
|
1495
|
+
try {
|
|
1496
|
+
// Use `util.types` for Node.js 10+.
|
|
1497
|
+
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
1498
|
+
|
|
1499
|
+
if (types) {
|
|
1500
|
+
return types;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
// Legacy `process.binding('util')` for Node.js < 10.
|
|
1504
|
+
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
1505
|
+
} catch (e) {}
|
|
1506
|
+
}());
|
|
1507
|
+
|
|
1508
|
+
module.exports = nodeUtil;
|
|
1509
|
+
}(_nodeUtil, _nodeUtil.exports));
|
|
1510
|
+
|
|
1511
|
+
var baseIsTypedArray = _baseIsTypedArray,
|
|
1512
|
+
baseUnary$2 = _baseUnary,
|
|
1513
|
+
nodeUtil$2 = _nodeUtil.exports;
|
|
1514
|
+
|
|
1515
|
+
/* Node.js helper references. */
|
|
1516
|
+
var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Checks if `value` is classified as a typed array.
|
|
1520
|
+
*
|
|
1521
|
+
* @static
|
|
1522
|
+
* @memberOf _
|
|
1523
|
+
* @since 3.0.0
|
|
1524
|
+
* @category Lang
|
|
1525
|
+
* @param {*} value The value to check.
|
|
1526
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
1527
|
+
* @example
|
|
1528
|
+
*
|
|
1529
|
+
* _.isTypedArray(new Uint8Array);
|
|
1530
|
+
* // => true
|
|
1531
|
+
*
|
|
1532
|
+
* _.isTypedArray([]);
|
|
1533
|
+
* // => false
|
|
1534
|
+
*/
|
|
1535
|
+
var isTypedArray$1 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
|
|
1536
|
+
|
|
1537
|
+
var isTypedArray_1 = isTypedArray$1;
|
|
1538
|
+
|
|
1539
|
+
var baseTimes = _baseTimes,
|
|
1540
|
+
isArguments = isArguments_1,
|
|
1541
|
+
isArray$2 = isArray_1,
|
|
1542
|
+
isBuffer$1 = isBuffer$2.exports,
|
|
1543
|
+
isIndex = _isIndex,
|
|
1544
|
+
isTypedArray = isTypedArray_1;
|
|
1545
|
+
|
|
1546
|
+
/** Used for built-in method references. */
|
|
1547
|
+
var objectProto$5 = Object.prototype;
|
|
1548
|
+
|
|
1549
|
+
/** Used to check objects for own properties. */
|
|
1550
|
+
var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
1554
|
+
*
|
|
1555
|
+
* @private
|
|
1556
|
+
* @param {*} value The value to query.
|
|
1557
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
1558
|
+
* @returns {Array} Returns the array of property names.
|
|
1559
|
+
*/
|
|
1560
|
+
function arrayLikeKeys$2(value, inherited) {
|
|
1561
|
+
var isArr = isArray$2(value),
|
|
1562
|
+
isArg = !isArr && isArguments(value),
|
|
1563
|
+
isBuff = !isArr && !isArg && isBuffer$1(value),
|
|
1564
|
+
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
|
1565
|
+
skipIndexes = isArr || isArg || isBuff || isType,
|
|
1566
|
+
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
1567
|
+
length = result.length;
|
|
1568
|
+
|
|
1569
|
+
for (var key in value) {
|
|
1570
|
+
if ((inherited || hasOwnProperty$3.call(value, key)) &&
|
|
1571
|
+
!(skipIndexes && (
|
|
1572
|
+
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1573
|
+
key == 'length' ||
|
|
1574
|
+
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1575
|
+
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
1576
|
+
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1577
|
+
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
1578
|
+
// Skip index properties.
|
|
1579
|
+
isIndex(key, length)
|
|
1580
|
+
))) {
|
|
1581
|
+
result.push(key);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
return result;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
var _arrayLikeKeys = arrayLikeKeys$2;
|
|
1588
|
+
|
|
1589
|
+
/** Used for built-in method references. */
|
|
1590
|
+
|
|
1591
|
+
var objectProto$4 = Object.prototype;
|
|
1592
|
+
|
|
1593
|
+
/**
|
|
1594
|
+
* Checks if `value` is likely a prototype object.
|
|
1595
|
+
*
|
|
1596
|
+
* @private
|
|
1597
|
+
* @param {*} value The value to check.
|
|
1598
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
1599
|
+
*/
|
|
1600
|
+
function isPrototype$3(value) {
|
|
1601
|
+
var Ctor = value && value.constructor,
|
|
1602
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
|
|
1603
|
+
|
|
1604
|
+
return value === proto;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
var _isPrototype = isPrototype$3;
|
|
1608
|
+
|
|
1609
|
+
/**
|
|
1610
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
1611
|
+
*
|
|
1612
|
+
* @private
|
|
1613
|
+
* @param {Function} func The function to wrap.
|
|
1614
|
+
* @param {Function} transform The argument transform.
|
|
1615
|
+
* @returns {Function} Returns the new function.
|
|
1616
|
+
*/
|
|
1617
|
+
|
|
1618
|
+
function overArg$2(func, transform) {
|
|
1619
|
+
return function(arg) {
|
|
1620
|
+
return func(transform(arg));
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
var _overArg = overArg$2;
|
|
1625
|
+
|
|
1626
|
+
var overArg$1 = _overArg;
|
|
1627
|
+
|
|
1628
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1629
|
+
var nativeKeys$1 = overArg$1(Object.keys, Object);
|
|
1630
|
+
|
|
1631
|
+
var _nativeKeys = nativeKeys$1;
|
|
1632
|
+
|
|
1633
|
+
var isPrototype$2 = _isPrototype,
|
|
1634
|
+
nativeKeys = _nativeKeys;
|
|
1635
|
+
|
|
1636
|
+
/** Used for built-in method references. */
|
|
1637
|
+
var objectProto$3 = Object.prototype;
|
|
1638
|
+
|
|
1639
|
+
/** Used to check objects for own properties. */
|
|
1640
|
+
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
1644
|
+
*
|
|
1645
|
+
* @private
|
|
1646
|
+
* @param {Object} object The object to query.
|
|
1647
|
+
* @returns {Array} Returns the array of property names.
|
|
1648
|
+
*/
|
|
1649
|
+
function baseKeys$1(object) {
|
|
1650
|
+
if (!isPrototype$2(object)) {
|
|
1651
|
+
return nativeKeys(object);
|
|
1652
|
+
}
|
|
1653
|
+
var result = [];
|
|
1654
|
+
for (var key in Object(object)) {
|
|
1655
|
+
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
1656
|
+
result.push(key);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
return result;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
var _baseKeys = baseKeys$1;
|
|
1663
|
+
|
|
1664
|
+
var isFunction = isFunction_1,
|
|
1665
|
+
isLength = isLength_1;
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
1669
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
1670
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
1671
|
+
*
|
|
1672
|
+
* @static
|
|
1673
|
+
* @memberOf _
|
|
1674
|
+
* @since 4.0.0
|
|
1675
|
+
* @category Lang
|
|
1676
|
+
* @param {*} value The value to check.
|
|
1677
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
1678
|
+
* @example
|
|
1679
|
+
*
|
|
1680
|
+
* _.isArrayLike([1, 2, 3]);
|
|
495
1681
|
* // => true
|
|
496
1682
|
*
|
|
497
|
-
* _.
|
|
1683
|
+
* _.isArrayLike(document.body.children);
|
|
1684
|
+
* // => true
|
|
1685
|
+
*
|
|
1686
|
+
* _.isArrayLike('abc');
|
|
1687
|
+
* // => true
|
|
1688
|
+
*
|
|
1689
|
+
* _.isArrayLike(_.noop);
|
|
498
1690
|
* // => false
|
|
499
1691
|
*/
|
|
500
|
-
|
|
1692
|
+
function isArrayLike$2(value) {
|
|
1693
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
1694
|
+
}
|
|
501
1695
|
|
|
502
|
-
|
|
503
|
-
}(isBuffer, isBuffer.exports));
|
|
1696
|
+
var isArrayLike_1 = isArrayLike$2;
|
|
504
1697
|
|
|
505
|
-
var
|
|
1698
|
+
var arrayLikeKeys$1 = _arrayLikeKeys,
|
|
1699
|
+
baseKeys = _baseKeys,
|
|
1700
|
+
isArrayLike$1 = isArrayLike_1;
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
1704
|
+
*
|
|
1705
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
1706
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
1707
|
+
* for more details.
|
|
1708
|
+
*
|
|
1709
|
+
* @static
|
|
1710
|
+
* @since 0.1.0
|
|
1711
|
+
* @memberOf _
|
|
1712
|
+
* @category Object
|
|
1713
|
+
* @param {Object} object The object to query.
|
|
1714
|
+
* @returns {Array} Returns the array of property names.
|
|
1715
|
+
* @example
|
|
1716
|
+
*
|
|
1717
|
+
* function Foo() {
|
|
1718
|
+
* this.a = 1;
|
|
1719
|
+
* this.b = 2;
|
|
1720
|
+
* }
|
|
1721
|
+
*
|
|
1722
|
+
* Foo.prototype.c = 3;
|
|
1723
|
+
*
|
|
1724
|
+
* _.keys(new Foo);
|
|
1725
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
1726
|
+
*
|
|
1727
|
+
* _.keys('hi');
|
|
1728
|
+
* // => ['0', '1']
|
|
1729
|
+
*/
|
|
1730
|
+
function keys$3(object) {
|
|
1731
|
+
return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object);
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
var keys_1 = keys$3;
|
|
1735
|
+
|
|
1736
|
+
var copyObject$3 = _copyObject,
|
|
1737
|
+
keys$2 = keys_1;
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* The base implementation of `_.assign` without support for multiple sources
|
|
1741
|
+
* or `customizer` functions.
|
|
1742
|
+
*
|
|
1743
|
+
* @private
|
|
1744
|
+
* @param {Object} object The destination object.
|
|
1745
|
+
* @param {Object} source The source object.
|
|
1746
|
+
* @returns {Object} Returns `object`.
|
|
1747
|
+
*/
|
|
1748
|
+
function baseAssign$1(object, source) {
|
|
1749
|
+
return object && copyObject$3(source, keys$2(source), object);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
var _baseAssign = baseAssign$1;
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* This function is like
|
|
1756
|
+
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
1757
|
+
* except that it includes inherited enumerable properties.
|
|
1758
|
+
*
|
|
1759
|
+
* @private
|
|
1760
|
+
* @param {Object} object The object to query.
|
|
1761
|
+
* @returns {Array} Returns the array of property names.
|
|
1762
|
+
*/
|
|
1763
|
+
|
|
1764
|
+
function nativeKeysIn$1(object) {
|
|
1765
|
+
var result = [];
|
|
1766
|
+
if (object != null) {
|
|
1767
|
+
for (var key in Object(object)) {
|
|
1768
|
+
result.push(key);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
return result;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
var _nativeKeysIn = nativeKeysIn$1;
|
|
1775
|
+
|
|
1776
|
+
var isObject$2 = isObject_1,
|
|
1777
|
+
isPrototype$1 = _isPrototype,
|
|
1778
|
+
nativeKeysIn = _nativeKeysIn;
|
|
1779
|
+
|
|
1780
|
+
/** Used for built-in method references. */
|
|
1781
|
+
var objectProto$2 = Object.prototype;
|
|
1782
|
+
|
|
1783
|
+
/** Used to check objects for own properties. */
|
|
1784
|
+
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
1788
|
+
*
|
|
1789
|
+
* @private
|
|
1790
|
+
* @param {Object} object The object to query.
|
|
1791
|
+
* @returns {Array} Returns the array of property names.
|
|
1792
|
+
*/
|
|
1793
|
+
function baseKeysIn$1(object) {
|
|
1794
|
+
if (!isObject$2(object)) {
|
|
1795
|
+
return nativeKeysIn(object);
|
|
1796
|
+
}
|
|
1797
|
+
var isProto = isPrototype$1(object),
|
|
1798
|
+
result = [];
|
|
1799
|
+
|
|
1800
|
+
for (var key in object) {
|
|
1801
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
|
|
1802
|
+
result.push(key);
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
return result;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
var _baseKeysIn = baseKeysIn$1;
|
|
1809
|
+
|
|
1810
|
+
var arrayLikeKeys = _arrayLikeKeys,
|
|
1811
|
+
baseKeysIn = _baseKeysIn,
|
|
1812
|
+
isArrayLike = isArrayLike_1;
|
|
1813
|
+
|
|
1814
|
+
/**
|
|
1815
|
+
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
1816
|
+
*
|
|
1817
|
+
* **Note:** Non-object values are coerced to objects.
|
|
1818
|
+
*
|
|
1819
|
+
* @static
|
|
1820
|
+
* @memberOf _
|
|
1821
|
+
* @since 3.0.0
|
|
1822
|
+
* @category Object
|
|
1823
|
+
* @param {Object} object The object to query.
|
|
1824
|
+
* @returns {Array} Returns the array of property names.
|
|
1825
|
+
* @example
|
|
1826
|
+
*
|
|
1827
|
+
* function Foo() {
|
|
1828
|
+
* this.a = 1;
|
|
1829
|
+
* this.b = 2;
|
|
1830
|
+
* }
|
|
1831
|
+
*
|
|
1832
|
+
* Foo.prototype.c = 3;
|
|
1833
|
+
*
|
|
1834
|
+
* _.keysIn(new Foo);
|
|
1835
|
+
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
1836
|
+
*/
|
|
1837
|
+
function keysIn$3(object) {
|
|
1838
|
+
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
var keysIn_1 = keysIn$3;
|
|
1842
|
+
|
|
1843
|
+
var copyObject$2 = _copyObject,
|
|
1844
|
+
keysIn$2 = keysIn_1;
|
|
1845
|
+
|
|
1846
|
+
/**
|
|
1847
|
+
* The base implementation of `_.assignIn` without support for multiple sources
|
|
1848
|
+
* or `customizer` functions.
|
|
1849
|
+
*
|
|
1850
|
+
* @private
|
|
1851
|
+
* @param {Object} object The destination object.
|
|
1852
|
+
* @param {Object} source The source object.
|
|
1853
|
+
* @returns {Object} Returns `object`.
|
|
1854
|
+
*/
|
|
1855
|
+
function baseAssignIn$1(object, source) {
|
|
1856
|
+
return object && copyObject$2(source, keysIn$2(source), object);
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
var _baseAssignIn = baseAssignIn$1;
|
|
1860
|
+
|
|
1861
|
+
var _cloneBuffer = {exports: {}};
|
|
506
1862
|
|
|
507
1863
|
(function (module, exports) {
|
|
508
|
-
var
|
|
1864
|
+
var root = _root;
|
|
509
1865
|
|
|
510
1866
|
/** Detect free variable `exports`. */
|
|
511
1867
|
var freeExports = exports && !exports.nodeType && exports;
|
|
@@ -516,71 +1872,281 @@ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeTy
|
|
|
516
1872
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
517
1873
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
518
1874
|
|
|
519
|
-
/**
|
|
520
|
-
var
|
|
1875
|
+
/** Built-in value references. */
|
|
1876
|
+
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
1877
|
+
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
521
1878
|
|
|
522
|
-
/**
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
1879
|
+
/**
|
|
1880
|
+
* Creates a clone of `buffer`.
|
|
1881
|
+
*
|
|
1882
|
+
* @private
|
|
1883
|
+
* @param {Buffer} buffer The buffer to clone.
|
|
1884
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
1885
|
+
* @returns {Buffer} Returns the cloned buffer.
|
|
1886
|
+
*/
|
|
1887
|
+
function cloneBuffer(buffer, isDeep) {
|
|
1888
|
+
if (isDeep) {
|
|
1889
|
+
return buffer.slice();
|
|
1890
|
+
}
|
|
1891
|
+
var length = buffer.length,
|
|
1892
|
+
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
527
1893
|
|
|
528
|
-
|
|
529
|
-
|
|
1894
|
+
buffer.copy(result);
|
|
1895
|
+
return result;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
module.exports = cloneBuffer;
|
|
1899
|
+
}(_cloneBuffer, _cloneBuffer.exports));
|
|
1900
|
+
|
|
1901
|
+
/**
|
|
1902
|
+
* Copies the values of `source` to `array`.
|
|
1903
|
+
*
|
|
1904
|
+
* @private
|
|
1905
|
+
* @param {Array} source The array to copy values from.
|
|
1906
|
+
* @param {Array} [array=[]] The array to copy values to.
|
|
1907
|
+
* @returns {Array} Returns `array`.
|
|
1908
|
+
*/
|
|
1909
|
+
|
|
1910
|
+
function copyArray$1(source, array) {
|
|
1911
|
+
var index = -1,
|
|
1912
|
+
length = source.length;
|
|
1913
|
+
|
|
1914
|
+
array || (array = Array(length));
|
|
1915
|
+
while (++index < length) {
|
|
1916
|
+
array[index] = source[index];
|
|
1917
|
+
}
|
|
1918
|
+
return array;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
var _copyArray = copyArray$1;
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
1925
|
+
* iteratee shorthands.
|
|
1926
|
+
*
|
|
1927
|
+
* @private
|
|
1928
|
+
* @param {Array} [array] The array to iterate over.
|
|
1929
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
1930
|
+
* @returns {Array} Returns the new filtered array.
|
|
1931
|
+
*/
|
|
1932
|
+
|
|
1933
|
+
function arrayFilter$1(array, predicate) {
|
|
1934
|
+
var index = -1,
|
|
1935
|
+
length = array == null ? 0 : array.length,
|
|
1936
|
+
resIndex = 0,
|
|
1937
|
+
result = [];
|
|
1938
|
+
|
|
1939
|
+
while (++index < length) {
|
|
1940
|
+
var value = array[index];
|
|
1941
|
+
if (predicate(value, index, array)) {
|
|
1942
|
+
result[resIndex++] = value;
|
|
530
1943
|
}
|
|
1944
|
+
}
|
|
1945
|
+
return result;
|
|
1946
|
+
}
|
|
531
1947
|
|
|
532
|
-
|
|
533
|
-
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
534
|
-
} catch (e) {}
|
|
535
|
-
}());
|
|
1948
|
+
var _arrayFilter = arrayFilter$1;
|
|
536
1949
|
|
|
537
|
-
|
|
538
|
-
|
|
1950
|
+
/**
|
|
1951
|
+
* This method returns a new empty array.
|
|
1952
|
+
*
|
|
1953
|
+
* @static
|
|
1954
|
+
* @memberOf _
|
|
1955
|
+
* @since 4.13.0
|
|
1956
|
+
* @category Util
|
|
1957
|
+
* @returns {Array} Returns the new empty array.
|
|
1958
|
+
* @example
|
|
1959
|
+
*
|
|
1960
|
+
* var arrays = _.times(2, _.stubArray);
|
|
1961
|
+
*
|
|
1962
|
+
* console.log(arrays);
|
|
1963
|
+
* // => [[], []]
|
|
1964
|
+
*
|
|
1965
|
+
* console.log(arrays[0] === arrays[1]);
|
|
1966
|
+
* // => false
|
|
1967
|
+
*/
|
|
539
1968
|
|
|
540
|
-
|
|
1969
|
+
function stubArray$2() {
|
|
1970
|
+
return [];
|
|
1971
|
+
}
|
|
541
1972
|
|
|
542
|
-
|
|
543
|
-
nodeUtil$2 && nodeUtil$2.isTypedArray;
|
|
1973
|
+
var stubArray_1 = stubArray$2;
|
|
544
1974
|
|
|
545
|
-
var
|
|
1975
|
+
var arrayFilter = _arrayFilter,
|
|
1976
|
+
stubArray$1 = stubArray_1;
|
|
546
1977
|
|
|
547
|
-
|
|
548
|
-
var
|
|
1978
|
+
/** Used for built-in method references. */
|
|
1979
|
+
var objectProto$1 = Object.prototype;
|
|
1980
|
+
|
|
1981
|
+
/** Built-in value references. */
|
|
1982
|
+
var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
|
|
1983
|
+
|
|
1984
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1985
|
+
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
1989
|
+
*
|
|
1990
|
+
* @private
|
|
1991
|
+
* @param {Object} object The object to query.
|
|
1992
|
+
* @returns {Array} Returns the array of symbols.
|
|
1993
|
+
*/
|
|
1994
|
+
var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
|
|
1995
|
+
if (object == null) {
|
|
1996
|
+
return [];
|
|
1997
|
+
}
|
|
1998
|
+
object = Object(object);
|
|
1999
|
+
return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
|
|
2000
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
2001
|
+
});
|
|
2002
|
+
};
|
|
2003
|
+
|
|
2004
|
+
var _getSymbols = getSymbols$3;
|
|
2005
|
+
|
|
2006
|
+
var copyObject$1 = _copyObject,
|
|
2007
|
+
getSymbols$2 = _getSymbols;
|
|
2008
|
+
|
|
2009
|
+
/**
|
|
2010
|
+
* Copies own symbols of `source` to `object`.
|
|
2011
|
+
*
|
|
2012
|
+
* @private
|
|
2013
|
+
* @param {Object} source The object to copy symbols from.
|
|
2014
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
2015
|
+
* @returns {Object} Returns `object`.
|
|
2016
|
+
*/
|
|
2017
|
+
function copySymbols$1(source, object) {
|
|
2018
|
+
return copyObject$1(source, getSymbols$2(source), object);
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
var _copySymbols = copySymbols$1;
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* Appends the elements of `values` to `array`.
|
|
2025
|
+
*
|
|
2026
|
+
* @private
|
|
2027
|
+
* @param {Array} array The array to modify.
|
|
2028
|
+
* @param {Array} values The values to append.
|
|
2029
|
+
* @returns {Array} Returns `array`.
|
|
2030
|
+
*/
|
|
2031
|
+
|
|
2032
|
+
function arrayPush$2(array, values) {
|
|
2033
|
+
var index = -1,
|
|
2034
|
+
length = values.length,
|
|
2035
|
+
offset = array.length;
|
|
2036
|
+
|
|
2037
|
+
while (++index < length) {
|
|
2038
|
+
array[offset + index] = values[index];
|
|
2039
|
+
}
|
|
2040
|
+
return array;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
var _arrayPush = arrayPush$2;
|
|
2044
|
+
|
|
2045
|
+
var overArg = _overArg;
|
|
2046
|
+
|
|
2047
|
+
/** Built-in value references. */
|
|
2048
|
+
var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
|
|
2049
|
+
|
|
2050
|
+
var _getPrototype = getPrototype$2;
|
|
2051
|
+
|
|
2052
|
+
var arrayPush$1 = _arrayPush,
|
|
2053
|
+
getPrototype$1 = _getPrototype,
|
|
2054
|
+
getSymbols$1 = _getSymbols,
|
|
2055
|
+
stubArray = stubArray_1;
|
|
2056
|
+
|
|
2057
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
2058
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
2059
|
+
|
|
2060
|
+
/**
|
|
2061
|
+
* Creates an array of the own and inherited enumerable symbols of `object`.
|
|
2062
|
+
*
|
|
2063
|
+
* @private
|
|
2064
|
+
* @param {Object} object The object to query.
|
|
2065
|
+
* @returns {Array} Returns the array of symbols.
|
|
2066
|
+
*/
|
|
2067
|
+
var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
|
|
2068
|
+
var result = [];
|
|
2069
|
+
while (object) {
|
|
2070
|
+
arrayPush$1(result, getSymbols$1(object));
|
|
2071
|
+
object = getPrototype$1(object);
|
|
2072
|
+
}
|
|
2073
|
+
return result;
|
|
2074
|
+
};
|
|
2075
|
+
|
|
2076
|
+
var _getSymbolsIn = getSymbolsIn$2;
|
|
2077
|
+
|
|
2078
|
+
var copyObject = _copyObject,
|
|
2079
|
+
getSymbolsIn$1 = _getSymbolsIn;
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* Copies own and inherited symbols of `source` to `object`.
|
|
2083
|
+
*
|
|
2084
|
+
* @private
|
|
2085
|
+
* @param {Object} source The object to copy symbols from.
|
|
2086
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
2087
|
+
* @returns {Object} Returns `object`.
|
|
2088
|
+
*/
|
|
2089
|
+
function copySymbolsIn$1(source, object) {
|
|
2090
|
+
return copyObject(source, getSymbolsIn$1(source), object);
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
var _copySymbolsIn = copySymbolsIn$1;
|
|
549
2094
|
|
|
550
|
-
|
|
551
|
-
|
|
2095
|
+
var arrayPush = _arrayPush,
|
|
2096
|
+
isArray$1 = isArray_1;
|
|
552
2097
|
|
|
553
|
-
/**
|
|
554
|
-
|
|
2098
|
+
/**
|
|
2099
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
2100
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
2101
|
+
* symbols of `object`.
|
|
2102
|
+
*
|
|
2103
|
+
* @private
|
|
2104
|
+
* @param {Object} object The object to query.
|
|
2105
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
2106
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
2107
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
2108
|
+
*/
|
|
2109
|
+
function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
|
|
2110
|
+
var result = keysFunc(object);
|
|
2111
|
+
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
2112
|
+
}
|
|
555
2113
|
|
|
556
|
-
|
|
557
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2114
|
+
var _baseGetAllKeys = baseGetAllKeys$2;
|
|
558
2115
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
2116
|
+
var baseGetAllKeys$1 = _baseGetAllKeys,
|
|
2117
|
+
getSymbols = _getSymbols,
|
|
2118
|
+
keys$1 = keys_1;
|
|
562
2119
|
|
|
563
2120
|
/**
|
|
564
|
-
* Creates
|
|
2121
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
565
2122
|
*
|
|
566
2123
|
* @private
|
|
567
|
-
* @param {
|
|
568
|
-
* @
|
|
569
|
-
* @returns {Buffer} Returns the cloned buffer.
|
|
2124
|
+
* @param {Object} object The object to query.
|
|
2125
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
570
2126
|
*/
|
|
571
|
-
function
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
var length = buffer.length,
|
|
576
|
-
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
2127
|
+
function getAllKeys$1(object) {
|
|
2128
|
+
return baseGetAllKeys$1(object, keys$1, getSymbols);
|
|
2129
|
+
}
|
|
577
2130
|
|
|
578
|
-
|
|
579
|
-
|
|
2131
|
+
var _getAllKeys = getAllKeys$1;
|
|
2132
|
+
|
|
2133
|
+
var baseGetAllKeys = _baseGetAllKeys,
|
|
2134
|
+
getSymbolsIn = _getSymbolsIn,
|
|
2135
|
+
keysIn$1 = keysIn_1;
|
|
2136
|
+
|
|
2137
|
+
/**
|
|
2138
|
+
* Creates an array of own and inherited enumerable property names and
|
|
2139
|
+
* symbols of `object`.
|
|
2140
|
+
*
|
|
2141
|
+
* @private
|
|
2142
|
+
* @param {Object} object The object to query.
|
|
2143
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
2144
|
+
*/
|
|
2145
|
+
function getAllKeysIn$1(object) {
|
|
2146
|
+
return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
|
|
580
2147
|
}
|
|
581
2148
|
|
|
582
|
-
|
|
583
|
-
}(_cloneBuffer, _cloneBuffer.exports));
|
|
2149
|
+
var _getAllKeysIn = getAllKeysIn$1;
|
|
584
2150
|
|
|
585
2151
|
var getNative$3 = _getNative,
|
|
586
2152
|
root$4 = _root;
|
|
@@ -623,13 +2189,13 @@ var DataView = _DataView,
|
|
|
623
2189
|
toSource = _toSource;
|
|
624
2190
|
|
|
625
2191
|
/** `Object#toString` result references. */
|
|
626
|
-
var mapTag = '[object Map]',
|
|
627
|
-
objectTag = '[object Object]',
|
|
2192
|
+
var mapTag$3 = '[object Map]',
|
|
2193
|
+
objectTag$1 = '[object Object]',
|
|
628
2194
|
promiseTag = '[object Promise]',
|
|
629
|
-
setTag = '[object Set]',
|
|
630
|
-
weakMapTag = '[object WeakMap]';
|
|
2195
|
+
setTag$3 = '[object Set]',
|
|
2196
|
+
weakMapTag$1 = '[object WeakMap]';
|
|
631
2197
|
|
|
632
|
-
var dataViewTag = '[object DataView]';
|
|
2198
|
+
var dataViewTag$2 = '[object DataView]';
|
|
633
2199
|
|
|
634
2200
|
/** Used to detect maps, sets, and weakmaps. */
|
|
635
2201
|
var dataViewCtorString = toSource(DataView),
|
|
@@ -645,85 +2211,576 @@ var dataViewCtorString = toSource(DataView),
|
|
|
645
2211
|
* @param {*} value The value to query.
|
|
646
2212
|
* @returns {string} Returns the `toStringTag`.
|
|
647
2213
|
*/
|
|
648
|
-
var getTag = baseGetTag;
|
|
2214
|
+
var getTag$3 = baseGetTag;
|
|
649
2215
|
|
|
650
2216
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
651
|
-
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
652
|
-
(Map && getTag(new Map) != mapTag) ||
|
|
653
|
-
(Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
|
|
654
|
-
(Set && getTag(new Set) != setTag) ||
|
|
655
|
-
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
656
|
-
getTag = function(value) {
|
|
2217
|
+
if ((DataView && getTag$3(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
|
|
2218
|
+
(Map && getTag$3(new Map) != mapTag$3) ||
|
|
2219
|
+
(Promise$1 && getTag$3(Promise$1.resolve()) != promiseTag) ||
|
|
2220
|
+
(Set && getTag$3(new Set) != setTag$3) ||
|
|
2221
|
+
(WeakMap && getTag$3(new WeakMap) != weakMapTag$1)) {
|
|
2222
|
+
getTag$3 = function(value) {
|
|
657
2223
|
var result = baseGetTag(value),
|
|
658
|
-
Ctor = result == objectTag ? value.constructor : undefined,
|
|
2224
|
+
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
659
2225
|
ctorString = Ctor ? toSource(Ctor) : '';
|
|
660
2226
|
|
|
661
2227
|
if (ctorString) {
|
|
662
2228
|
switch (ctorString) {
|
|
663
|
-
case dataViewCtorString: return dataViewTag;
|
|
664
|
-
case mapCtorString: return mapTag;
|
|
2229
|
+
case dataViewCtorString: return dataViewTag$2;
|
|
2230
|
+
case mapCtorString: return mapTag$3;
|
|
665
2231
|
case promiseCtorString: return promiseTag;
|
|
666
|
-
case setCtorString: return setTag;
|
|
667
|
-
case weakMapCtorString: return weakMapTag;
|
|
2232
|
+
case setCtorString: return setTag$3;
|
|
2233
|
+
case weakMapCtorString: return weakMapTag$1;
|
|
668
2234
|
}
|
|
669
2235
|
}
|
|
670
2236
|
return result;
|
|
671
2237
|
};
|
|
672
2238
|
}
|
|
673
2239
|
|
|
2240
|
+
var _getTag = getTag$3;
|
|
2241
|
+
|
|
2242
|
+
/** Used for built-in method references. */
|
|
2243
|
+
|
|
2244
|
+
var objectProto = Object.prototype;
|
|
2245
|
+
|
|
2246
|
+
/** Used to check objects for own properties. */
|
|
2247
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2248
|
+
|
|
2249
|
+
/**
|
|
2250
|
+
* Initializes an array clone.
|
|
2251
|
+
*
|
|
2252
|
+
* @private
|
|
2253
|
+
* @param {Array} array The array to clone.
|
|
2254
|
+
* @returns {Array} Returns the initialized clone.
|
|
2255
|
+
*/
|
|
2256
|
+
function initCloneArray$1(array) {
|
|
2257
|
+
var length = array.length,
|
|
2258
|
+
result = new array.constructor(length);
|
|
2259
|
+
|
|
2260
|
+
// Add properties assigned by `RegExp#exec`.
|
|
2261
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
2262
|
+
result.index = array.index;
|
|
2263
|
+
result.input = array.input;
|
|
2264
|
+
}
|
|
2265
|
+
return result;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
var _initCloneArray = initCloneArray$1;
|
|
2269
|
+
|
|
674
2270
|
var root = _root;
|
|
675
2271
|
|
|
676
2272
|
/** Built-in value references. */
|
|
677
|
-
root.Uint8Array;
|
|
2273
|
+
var Uint8Array$1 = root.Uint8Array;
|
|
2274
|
+
|
|
2275
|
+
var _Uint8Array = Uint8Array$1;
|
|
2276
|
+
|
|
2277
|
+
var Uint8Array = _Uint8Array;
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* Creates a clone of `arrayBuffer`.
|
|
2281
|
+
*
|
|
2282
|
+
* @private
|
|
2283
|
+
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
2284
|
+
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
2285
|
+
*/
|
|
2286
|
+
function cloneArrayBuffer$3(arrayBuffer) {
|
|
2287
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2288
|
+
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
2289
|
+
return result;
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
var _cloneArrayBuffer = cloneArrayBuffer$3;
|
|
2293
|
+
|
|
2294
|
+
var cloneArrayBuffer$2 = _cloneArrayBuffer;
|
|
2295
|
+
|
|
2296
|
+
/**
|
|
2297
|
+
* Creates a clone of `dataView`.
|
|
2298
|
+
*
|
|
2299
|
+
* @private
|
|
2300
|
+
* @param {Object} dataView The data view to clone.
|
|
2301
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
2302
|
+
* @returns {Object} Returns the cloned data view.
|
|
2303
|
+
*/
|
|
2304
|
+
function cloneDataView$1(dataView, isDeep) {
|
|
2305
|
+
var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
|
|
2306
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
var _cloneDataView = cloneDataView$1;
|
|
2310
|
+
|
|
2311
|
+
/** Used to match `RegExp` flags from their coerced string values. */
|
|
2312
|
+
|
|
2313
|
+
var reFlags = /\w*$/;
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* Creates a clone of `regexp`.
|
|
2317
|
+
*
|
|
2318
|
+
* @private
|
|
2319
|
+
* @param {Object} regexp The regexp to clone.
|
|
2320
|
+
* @returns {Object} Returns the cloned regexp.
|
|
2321
|
+
*/
|
|
2322
|
+
function cloneRegExp$1(regexp) {
|
|
2323
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
2324
|
+
result.lastIndex = regexp.lastIndex;
|
|
2325
|
+
return result;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
var _cloneRegExp = cloneRegExp$1;
|
|
678
2329
|
|
|
679
2330
|
var Symbol = _Symbol;
|
|
680
2331
|
|
|
681
2332
|
/** Used to convert symbols to primitives and strings. */
|
|
682
|
-
var symbolProto = Symbol ? Symbol.prototype : undefined
|
|
683
|
-
symbolProto ? symbolProto.valueOf : undefined;
|
|
2333
|
+
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
2334
|
+
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
2335
|
+
|
|
2336
|
+
/**
|
|
2337
|
+
* Creates a clone of the `symbol` object.
|
|
2338
|
+
*
|
|
2339
|
+
* @private
|
|
2340
|
+
* @param {Object} symbol The symbol object to clone.
|
|
2341
|
+
* @returns {Object} Returns the cloned symbol object.
|
|
2342
|
+
*/
|
|
2343
|
+
function cloneSymbol$1(symbol) {
|
|
2344
|
+
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
var _cloneSymbol = cloneSymbol$1;
|
|
2348
|
+
|
|
2349
|
+
var cloneArrayBuffer$1 = _cloneArrayBuffer;
|
|
2350
|
+
|
|
2351
|
+
/**
|
|
2352
|
+
* Creates a clone of `typedArray`.
|
|
2353
|
+
*
|
|
2354
|
+
* @private
|
|
2355
|
+
* @param {Object} typedArray The typed array to clone.
|
|
2356
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
2357
|
+
* @returns {Object} Returns the cloned typed array.
|
|
2358
|
+
*/
|
|
2359
|
+
function cloneTypedArray$1(typedArray, isDeep) {
|
|
2360
|
+
var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
|
|
2361
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
var _cloneTypedArray = cloneTypedArray$1;
|
|
2365
|
+
|
|
2366
|
+
var cloneArrayBuffer = _cloneArrayBuffer,
|
|
2367
|
+
cloneDataView = _cloneDataView,
|
|
2368
|
+
cloneRegExp = _cloneRegExp,
|
|
2369
|
+
cloneSymbol = _cloneSymbol,
|
|
2370
|
+
cloneTypedArray = _cloneTypedArray;
|
|
2371
|
+
|
|
2372
|
+
/** `Object#toString` result references. */
|
|
2373
|
+
var boolTag$1 = '[object Boolean]',
|
|
2374
|
+
dateTag$1 = '[object Date]',
|
|
2375
|
+
mapTag$2 = '[object Map]',
|
|
2376
|
+
numberTag$1 = '[object Number]',
|
|
2377
|
+
regexpTag$1 = '[object RegExp]',
|
|
2378
|
+
setTag$2 = '[object Set]',
|
|
2379
|
+
stringTag$1 = '[object String]',
|
|
2380
|
+
symbolTag$1 = '[object Symbol]';
|
|
2381
|
+
|
|
2382
|
+
var arrayBufferTag$1 = '[object ArrayBuffer]',
|
|
2383
|
+
dataViewTag$1 = '[object DataView]',
|
|
2384
|
+
float32Tag$1 = '[object Float32Array]',
|
|
2385
|
+
float64Tag$1 = '[object Float64Array]',
|
|
2386
|
+
int8Tag$1 = '[object Int8Array]',
|
|
2387
|
+
int16Tag$1 = '[object Int16Array]',
|
|
2388
|
+
int32Tag$1 = '[object Int32Array]',
|
|
2389
|
+
uint8Tag$1 = '[object Uint8Array]',
|
|
2390
|
+
uint8ClampedTag$1 = '[object Uint8ClampedArray]',
|
|
2391
|
+
uint16Tag$1 = '[object Uint16Array]',
|
|
2392
|
+
uint32Tag$1 = '[object Uint32Array]';
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* Initializes an object clone based on its `toStringTag`.
|
|
2396
|
+
*
|
|
2397
|
+
* **Note:** This function only supports cloning values with tags of
|
|
2398
|
+
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
2399
|
+
*
|
|
2400
|
+
* @private
|
|
2401
|
+
* @param {Object} object The object to clone.
|
|
2402
|
+
* @param {string} tag The `toStringTag` of the object to clone.
|
|
2403
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
2404
|
+
* @returns {Object} Returns the initialized clone.
|
|
2405
|
+
*/
|
|
2406
|
+
function initCloneByTag$1(object, tag, isDeep) {
|
|
2407
|
+
var Ctor = object.constructor;
|
|
2408
|
+
switch (tag) {
|
|
2409
|
+
case arrayBufferTag$1:
|
|
2410
|
+
return cloneArrayBuffer(object);
|
|
2411
|
+
|
|
2412
|
+
case boolTag$1:
|
|
2413
|
+
case dateTag$1:
|
|
2414
|
+
return new Ctor(+object);
|
|
2415
|
+
|
|
2416
|
+
case dataViewTag$1:
|
|
2417
|
+
return cloneDataView(object, isDeep);
|
|
2418
|
+
|
|
2419
|
+
case float32Tag$1: case float64Tag$1:
|
|
2420
|
+
case int8Tag$1: case int16Tag$1: case int32Tag$1:
|
|
2421
|
+
case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
|
|
2422
|
+
return cloneTypedArray(object, isDeep);
|
|
2423
|
+
|
|
2424
|
+
case mapTag$2:
|
|
2425
|
+
return new Ctor;
|
|
2426
|
+
|
|
2427
|
+
case numberTag$1:
|
|
2428
|
+
case stringTag$1:
|
|
2429
|
+
return new Ctor(object);
|
|
2430
|
+
|
|
2431
|
+
case regexpTag$1:
|
|
2432
|
+
return cloneRegExp(object);
|
|
2433
|
+
|
|
2434
|
+
case setTag$2:
|
|
2435
|
+
return new Ctor;
|
|
2436
|
+
|
|
2437
|
+
case symbolTag$1:
|
|
2438
|
+
return cloneSymbol(object);
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
var _initCloneByTag = initCloneByTag$1;
|
|
2443
|
+
|
|
2444
|
+
var isObject$1 = isObject_1;
|
|
2445
|
+
|
|
2446
|
+
/** Built-in value references. */
|
|
2447
|
+
var objectCreate = Object.create;
|
|
2448
|
+
|
|
2449
|
+
/**
|
|
2450
|
+
* The base implementation of `_.create` without support for assigning
|
|
2451
|
+
* properties to the created object.
|
|
2452
|
+
*
|
|
2453
|
+
* @private
|
|
2454
|
+
* @param {Object} proto The object to inherit from.
|
|
2455
|
+
* @returns {Object} Returns the new object.
|
|
2456
|
+
*/
|
|
2457
|
+
var baseCreate$1 = (function() {
|
|
2458
|
+
function object() {}
|
|
2459
|
+
return function(proto) {
|
|
2460
|
+
if (!isObject$1(proto)) {
|
|
2461
|
+
return {};
|
|
2462
|
+
}
|
|
2463
|
+
if (objectCreate) {
|
|
2464
|
+
return objectCreate(proto);
|
|
2465
|
+
}
|
|
2466
|
+
object.prototype = proto;
|
|
2467
|
+
var result = new object;
|
|
2468
|
+
object.prototype = undefined;
|
|
2469
|
+
return result;
|
|
2470
|
+
};
|
|
2471
|
+
}());
|
|
2472
|
+
|
|
2473
|
+
var _baseCreate = baseCreate$1;
|
|
2474
|
+
|
|
2475
|
+
var baseCreate = _baseCreate,
|
|
2476
|
+
getPrototype = _getPrototype,
|
|
2477
|
+
isPrototype = _isPrototype;
|
|
2478
|
+
|
|
2479
|
+
/**
|
|
2480
|
+
* Initializes an object clone.
|
|
2481
|
+
*
|
|
2482
|
+
* @private
|
|
2483
|
+
* @param {Object} object The object to clone.
|
|
2484
|
+
* @returns {Object} Returns the initialized clone.
|
|
2485
|
+
*/
|
|
2486
|
+
function initCloneObject$1(object) {
|
|
2487
|
+
return (typeof object.constructor == 'function' && !isPrototype(object))
|
|
2488
|
+
? baseCreate(getPrototype(object))
|
|
2489
|
+
: {};
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
var _initCloneObject = initCloneObject$1;
|
|
2493
|
+
|
|
2494
|
+
var getTag$2 = _getTag,
|
|
2495
|
+
isObjectLike$1 = isObjectLike_1;
|
|
2496
|
+
|
|
2497
|
+
/** `Object#toString` result references. */
|
|
2498
|
+
var mapTag$1 = '[object Map]';
|
|
2499
|
+
|
|
2500
|
+
/**
|
|
2501
|
+
* The base implementation of `_.isMap` without Node.js optimizations.
|
|
2502
|
+
*
|
|
2503
|
+
* @private
|
|
2504
|
+
* @param {*} value The value to check.
|
|
2505
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
2506
|
+
*/
|
|
2507
|
+
function baseIsMap$1(value) {
|
|
2508
|
+
return isObjectLike$1(value) && getTag$2(value) == mapTag$1;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
var _baseIsMap = baseIsMap$1;
|
|
684
2512
|
|
|
685
|
-
var
|
|
2513
|
+
var baseIsMap = _baseIsMap,
|
|
2514
|
+
baseUnary$1 = _baseUnary,
|
|
2515
|
+
nodeUtil$1 = _nodeUtil.exports;
|
|
686
2516
|
|
|
687
2517
|
/* Node.js helper references. */
|
|
688
|
-
nodeUtil$1 && nodeUtil$1.isMap;
|
|
2518
|
+
var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
|
|
2519
|
+
|
|
2520
|
+
/**
|
|
2521
|
+
* Checks if `value` is classified as a `Map` object.
|
|
2522
|
+
*
|
|
2523
|
+
* @static
|
|
2524
|
+
* @memberOf _
|
|
2525
|
+
* @since 4.3.0
|
|
2526
|
+
* @category Lang
|
|
2527
|
+
* @param {*} value The value to check.
|
|
2528
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
2529
|
+
* @example
|
|
2530
|
+
*
|
|
2531
|
+
* _.isMap(new Map);
|
|
2532
|
+
* // => true
|
|
2533
|
+
*
|
|
2534
|
+
* _.isMap(new WeakMap);
|
|
2535
|
+
* // => false
|
|
2536
|
+
*/
|
|
2537
|
+
var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
|
|
2538
|
+
|
|
2539
|
+
var isMap_1 = isMap$1;
|
|
2540
|
+
|
|
2541
|
+
var getTag$1 = _getTag,
|
|
2542
|
+
isObjectLike = isObjectLike_1;
|
|
2543
|
+
|
|
2544
|
+
/** `Object#toString` result references. */
|
|
2545
|
+
var setTag$1 = '[object Set]';
|
|
2546
|
+
|
|
2547
|
+
/**
|
|
2548
|
+
* The base implementation of `_.isSet` without Node.js optimizations.
|
|
2549
|
+
*
|
|
2550
|
+
* @private
|
|
2551
|
+
* @param {*} value The value to check.
|
|
2552
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
2553
|
+
*/
|
|
2554
|
+
function baseIsSet$1(value) {
|
|
2555
|
+
return isObjectLike(value) && getTag$1(value) == setTag$1;
|
|
2556
|
+
}
|
|
689
2557
|
|
|
690
|
-
var
|
|
2558
|
+
var _baseIsSet = baseIsSet$1;
|
|
2559
|
+
|
|
2560
|
+
var baseIsSet = _baseIsSet,
|
|
2561
|
+
baseUnary = _baseUnary,
|
|
2562
|
+
nodeUtil = _nodeUtil.exports;
|
|
691
2563
|
|
|
692
2564
|
/* Node.js helper references. */
|
|
693
|
-
nodeUtil && nodeUtil.isSet;
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
2565
|
+
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* Checks if `value` is classified as a `Set` object.
|
|
2569
|
+
*
|
|
2570
|
+
* @static
|
|
2571
|
+
* @memberOf _
|
|
2572
|
+
* @since 4.3.0
|
|
2573
|
+
* @category Lang
|
|
2574
|
+
* @param {*} value The value to check.
|
|
2575
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
2576
|
+
* @example
|
|
2577
|
+
*
|
|
2578
|
+
* _.isSet(new Set);
|
|
2579
|
+
* // => true
|
|
2580
|
+
*
|
|
2581
|
+
* _.isSet(new WeakSet);
|
|
2582
|
+
* // => false
|
|
2583
|
+
*/
|
|
2584
|
+
var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
2585
|
+
|
|
2586
|
+
var isSet_1 = isSet$1;
|
|
2587
|
+
|
|
2588
|
+
var Stack = _Stack,
|
|
2589
|
+
arrayEach = _arrayEach,
|
|
2590
|
+
assignValue = _assignValue,
|
|
2591
|
+
baseAssign = _baseAssign,
|
|
2592
|
+
baseAssignIn = _baseAssignIn,
|
|
2593
|
+
cloneBuffer = _cloneBuffer.exports,
|
|
2594
|
+
copyArray = _copyArray,
|
|
2595
|
+
copySymbols = _copySymbols,
|
|
2596
|
+
copySymbolsIn = _copySymbolsIn,
|
|
2597
|
+
getAllKeys = _getAllKeys,
|
|
2598
|
+
getAllKeysIn = _getAllKeysIn,
|
|
2599
|
+
getTag = _getTag,
|
|
2600
|
+
initCloneArray = _initCloneArray,
|
|
2601
|
+
initCloneByTag = _initCloneByTag,
|
|
2602
|
+
initCloneObject = _initCloneObject,
|
|
2603
|
+
isArray = isArray_1,
|
|
2604
|
+
isBuffer = isBuffer$2.exports,
|
|
2605
|
+
isMap = isMap_1,
|
|
2606
|
+
isObject = isObject_1,
|
|
2607
|
+
isSet = isSet_1,
|
|
2608
|
+
keys = keys_1,
|
|
2609
|
+
keysIn = keysIn_1;
|
|
2610
|
+
|
|
2611
|
+
/** Used to compose bitmasks for cloning. */
|
|
2612
|
+
var CLONE_DEEP_FLAG$1 = 1,
|
|
2613
|
+
CLONE_FLAT_FLAG = 2,
|
|
2614
|
+
CLONE_SYMBOLS_FLAG$1 = 4;
|
|
2615
|
+
|
|
2616
|
+
/** `Object#toString` result references. */
|
|
2617
|
+
var argsTag = '[object Arguments]',
|
|
2618
|
+
arrayTag = '[object Array]',
|
|
2619
|
+
boolTag = '[object Boolean]',
|
|
2620
|
+
dateTag = '[object Date]',
|
|
2621
|
+
errorTag = '[object Error]',
|
|
2622
|
+
funcTag = '[object Function]',
|
|
2623
|
+
genTag = '[object GeneratorFunction]',
|
|
2624
|
+
mapTag = '[object Map]',
|
|
2625
|
+
numberTag = '[object Number]',
|
|
2626
|
+
objectTag = '[object Object]',
|
|
2627
|
+
regexpTag = '[object RegExp]',
|
|
2628
|
+
setTag = '[object Set]',
|
|
2629
|
+
stringTag = '[object String]',
|
|
2630
|
+
symbolTag = '[object Symbol]',
|
|
2631
|
+
weakMapTag = '[object WeakMap]';
|
|
2632
|
+
|
|
2633
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
2634
|
+
dataViewTag = '[object DataView]',
|
|
2635
|
+
float32Tag = '[object Float32Array]',
|
|
2636
|
+
float64Tag = '[object Float64Array]',
|
|
2637
|
+
int8Tag = '[object Int8Array]',
|
|
2638
|
+
int16Tag = '[object Int16Array]',
|
|
2639
|
+
int32Tag = '[object Int32Array]',
|
|
2640
|
+
uint8Tag = '[object Uint8Array]',
|
|
2641
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
2642
|
+
uint16Tag = '[object Uint16Array]',
|
|
2643
|
+
uint32Tag = '[object Uint32Array]';
|
|
2644
|
+
|
|
2645
|
+
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
|
2646
|
+
var cloneableTags = {};
|
|
2647
|
+
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
|
2648
|
+
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
|
2649
|
+
cloneableTags[boolTag] = cloneableTags[dateTag] =
|
|
2650
|
+
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
|
2651
|
+
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
|
2652
|
+
cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
|
2653
|
+
cloneableTags[numberTag] = cloneableTags[objectTag] =
|
|
2654
|
+
cloneableTags[regexpTag] = cloneableTags[setTag] =
|
|
2655
|
+
cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
|
2656
|
+
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
|
2657
|
+
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
2658
|
+
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
|
2659
|
+
cloneableTags[weakMapTag] = false;
|
|
2660
|
+
|
|
2661
|
+
/**
|
|
2662
|
+
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
2663
|
+
* traversed objects.
|
|
2664
|
+
*
|
|
2665
|
+
* @private
|
|
2666
|
+
* @param {*} value The value to clone.
|
|
2667
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
2668
|
+
* 1 - Deep clone
|
|
2669
|
+
* 2 - Flatten inherited properties
|
|
2670
|
+
* 4 - Clone symbols
|
|
2671
|
+
* @param {Function} [customizer] The function to customize cloning.
|
|
2672
|
+
* @param {string} [key] The key of `value`.
|
|
2673
|
+
* @param {Object} [object] The parent object of `value`.
|
|
2674
|
+
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
2675
|
+
* @returns {*} Returns the cloned value.
|
|
2676
|
+
*/
|
|
2677
|
+
function baseClone$1(value, bitmask, customizer, key, object, stack) {
|
|
2678
|
+
var result,
|
|
2679
|
+
isDeep = bitmask & CLONE_DEEP_FLAG$1,
|
|
2680
|
+
isFlat = bitmask & CLONE_FLAT_FLAG,
|
|
2681
|
+
isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
|
|
2682
|
+
|
|
2683
|
+
if (customizer) {
|
|
2684
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
2685
|
+
}
|
|
2686
|
+
if (result !== undefined) {
|
|
2687
|
+
return result;
|
|
2688
|
+
}
|
|
2689
|
+
if (!isObject(value)) {
|
|
2690
|
+
return value;
|
|
2691
|
+
}
|
|
2692
|
+
var isArr = isArray(value);
|
|
2693
|
+
if (isArr) {
|
|
2694
|
+
result = initCloneArray(value);
|
|
2695
|
+
if (!isDeep) {
|
|
2696
|
+
return copyArray(value, result);
|
|
708
2697
|
}
|
|
709
|
-
|
|
710
|
-
|
|
2698
|
+
} else {
|
|
2699
|
+
var tag = getTag(value),
|
|
2700
|
+
isFunc = tag == funcTag || tag == genTag;
|
|
711
2701
|
|
|
712
|
-
|
|
2702
|
+
if (isBuffer(value)) {
|
|
2703
|
+
return cloneBuffer(value, isDeep);
|
|
2704
|
+
}
|
|
2705
|
+
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
|
2706
|
+
result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
|
2707
|
+
if (!isDeep) {
|
|
2708
|
+
return isFlat
|
|
2709
|
+
? copySymbolsIn(value, baseAssignIn(result, value))
|
|
2710
|
+
: copySymbols(value, baseAssign(result, value));
|
|
2711
|
+
}
|
|
2712
|
+
} else {
|
|
2713
|
+
if (!cloneableTags[tag]) {
|
|
2714
|
+
return object ? value : {};
|
|
2715
|
+
}
|
|
2716
|
+
result = initCloneByTag(value, tag, isDeep);
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
// Check for circular references and return its corresponding clone.
|
|
2720
|
+
stack || (stack = new Stack);
|
|
2721
|
+
var stacked = stack.get(value);
|
|
2722
|
+
if (stacked) {
|
|
2723
|
+
return stacked;
|
|
2724
|
+
}
|
|
2725
|
+
stack.set(value, result);
|
|
713
2726
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
...defaults,
|
|
718
|
-
...model,
|
|
2727
|
+
if (isSet(value)) {
|
|
2728
|
+
value.forEach(function(subValue) {
|
|
2729
|
+
result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
|
|
719
2730
|
});
|
|
2731
|
+
} else if (isMap(value)) {
|
|
2732
|
+
value.forEach(function(subValue, key) {
|
|
2733
|
+
result.set(key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
|
|
2734
|
+
});
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
var keysFunc = isFull
|
|
2738
|
+
? (isFlat ? getAllKeysIn : getAllKeys)
|
|
2739
|
+
: (isFlat ? keysIn : keys);
|
|
2740
|
+
|
|
2741
|
+
var props = isArr ? undefined : keysFunc(value);
|
|
2742
|
+
arrayEach(props || value, function(subValue, key) {
|
|
2743
|
+
if (props) {
|
|
2744
|
+
key = subValue;
|
|
2745
|
+
subValue = value[key];
|
|
2746
|
+
}
|
|
2747
|
+
// Recursively populate clone (susceptible to call stack limits).
|
|
2748
|
+
assignValue(result, key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
|
|
720
2749
|
});
|
|
2750
|
+
return result;
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
var _baseClone = baseClone$1;
|
|
2754
|
+
|
|
2755
|
+
var baseClone = _baseClone;
|
|
2756
|
+
|
|
2757
|
+
/** Used to compose bitmasks for cloning. */
|
|
2758
|
+
var CLONE_DEEP_FLAG = 1,
|
|
2759
|
+
CLONE_SYMBOLS_FLAG = 4;
|
|
2760
|
+
|
|
2761
|
+
/**
|
|
2762
|
+
* This method is like `_.clone` except that it recursively clones `value`.
|
|
2763
|
+
*
|
|
2764
|
+
* @static
|
|
2765
|
+
* @memberOf _
|
|
2766
|
+
* @since 1.0.0
|
|
2767
|
+
* @category Lang
|
|
2768
|
+
* @param {*} value The value to recursively clone.
|
|
2769
|
+
* @returns {*} Returns the deep cloned value.
|
|
2770
|
+
* @see _.clone
|
|
2771
|
+
* @example
|
|
2772
|
+
*
|
|
2773
|
+
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
2774
|
+
*
|
|
2775
|
+
* var deep = _.cloneDeep(objects);
|
|
2776
|
+
* console.log(deep[0] === objects[0]);
|
|
2777
|
+
* // => false
|
|
2778
|
+
*/
|
|
2779
|
+
function cloneDeep(value) {
|
|
2780
|
+
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
721
2781
|
}
|
|
722
2782
|
|
|
723
|
-
|
|
724
|
-
...defaults,
|
|
725
|
-
...question,
|
|
726
|
-
});
|
|
2783
|
+
var cloneDeep_1 = cloneDeep;
|
|
727
2784
|
|
|
728
2785
|
/**
|
|
729
2786
|
*
|
|
@@ -733,32 +2790,18 @@ const normalize = (question) => ({
|
|
|
733
2790
|
*/
|
|
734
2791
|
async function model(question, session, env) {
|
|
735
2792
|
const { role, mode } = env || {};
|
|
736
|
-
const
|
|
2793
|
+
const response = cloneDeep_1(question);
|
|
737
2794
|
|
|
738
|
-
|
|
739
|
-
...normalizedQuestion,
|
|
740
|
-
teacherInstructions: null
|
|
741
|
-
};
|
|
2795
|
+
response.showTeacherInstructions = role === 'instructor' && (mode === 'view' || mode === 'evaluate');
|
|
742
2796
|
|
|
743
|
-
if
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
2797
|
+
// if we don't show the teacher instructions don't pass them on
|
|
2798
|
+
if (!response.showTeacherInstructions) {
|
|
2799
|
+
response.passages.forEach((passage) => {
|
|
2800
|
+
delete passage.teacherInstructions;
|
|
2801
|
+
});
|
|
747
2802
|
}
|
|
748
2803
|
|
|
749
|
-
return
|
|
2804
|
+
return response;
|
|
750
2805
|
}
|
|
751
2806
|
|
|
752
|
-
|
|
753
|
-
const errors = {};
|
|
754
|
-
|
|
755
|
-
['teacherInstructions', 'title', 'subtitle', 'author', 'text'].forEach((field) => {
|
|
756
|
-
if (config[field]?.required && !getContent(model[field])) {
|
|
757
|
-
errors[field] = 'This field is required.';
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
|
|
761
|
-
return errors;
|
|
762
|
-
};
|
|
763
|
-
|
|
764
|
-
export { createDefaultModel, model, normalize, validate };
|
|
2807
|
+
export { model };
|