@springtree/eva-sdk-core-settings 2.0.3 → 2.0.4

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