@pie-element/charting 11.0.0-beta.0 → 11.0.0-next.42

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.
@@ -0,0 +1,5088 @@
1
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
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$3() {
12
+ this.__data__ = [];
13
+ this.size = 0;
14
+ }
15
+
16
+ var _listCacheClear$1 = listCacheClear$3;
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$5(value, other) {
52
+ return value === other || (value !== value && other !== other);
53
+ }
54
+
55
+ var eq_1$1 = eq$5;
56
+
57
+ var eq$4 = eq_1$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$9(array, key) {
68
+ var length = array.length;
69
+ while (length--) {
70
+ if (eq$4(array[length][0], key)) {
71
+ return length;
72
+ }
73
+ }
74
+ return -1;
75
+ }
76
+
77
+ var _assocIndexOf$1 = assocIndexOf$9;
78
+
79
+ var assocIndexOf$8 = _assocIndexOf$1;
80
+
81
+ /** Used for built-in method references. */
82
+ var arrayProto$1 = Array.prototype;
83
+
84
+ /** Built-in value references. */
85
+ var splice$1 = arrayProto$1.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$3(key) {
97
+ var data = this.__data__,
98
+ index = assocIndexOf$8(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$1.call(data, index, 1);
108
+ }
109
+ --this.size;
110
+ return true;
111
+ }
112
+
113
+ var _listCacheDelete$1 = listCacheDelete$3;
114
+
115
+ var assocIndexOf$7 = _assocIndexOf$1;
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$3(key) {
127
+ var data = this.__data__,
128
+ index = assocIndexOf$7(data, key);
129
+
130
+ return index < 0 ? undefined : data[index][1];
131
+ }
132
+
133
+ var _listCacheGet$1 = listCacheGet$3;
134
+
135
+ var assocIndexOf$6 = _assocIndexOf$1;
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$3(key) {
147
+ return assocIndexOf$6(this.__data__, key) > -1;
148
+ }
149
+
150
+ var _listCacheHas$1 = listCacheHas$3;
151
+
152
+ var assocIndexOf$5 = _assocIndexOf$1;
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$3(key, value) {
165
+ var data = this.__data__,
166
+ index = assocIndexOf$5(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$1 = listCacheSet$3;
178
+
179
+ var listCacheClear$2 = _listCacheClear$1,
180
+ listCacheDelete$2 = _listCacheDelete$1,
181
+ listCacheGet$2 = _listCacheGet$1,
182
+ listCacheHas$2 = _listCacheHas$1,
183
+ listCacheSet$2 = _listCacheSet$1;
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$6(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$6.prototype.clear = listCacheClear$2;
205
+ ListCache$6.prototype['delete'] = listCacheDelete$2;
206
+ ListCache$6.prototype.get = listCacheGet$2;
207
+ ListCache$6.prototype.has = listCacheHas$2;
208
+ ListCache$6.prototype.set = listCacheSet$2;
209
+
210
+ var _ListCache$1 = ListCache$6;
211
+
212
+ var ListCache$5 = _ListCache$1;
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$5;
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
+
280
+ /** Detect free variable `global` from Node.js. */
281
+
282
+ var freeGlobal$3 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
283
+
284
+ var _freeGlobal$1 = freeGlobal$3;
285
+
286
+ var freeGlobal$2 = _freeGlobal$1;
287
+
288
+ /** Detect free variable `self`. */
289
+ var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
290
+
291
+ /** Used as a reference to the global object. */
292
+ var root$g = freeGlobal$2 || freeSelf$1 || Function('return this')();
293
+
294
+ var _root$1 = root$g;
295
+
296
+ var root$f = _root$1;
297
+
298
+ /** Built-in value references. */
299
+ var Symbol$9 = root$f.Symbol;
300
+
301
+ var _Symbol$1 = Symbol$9;
302
+
303
+ var Symbol$8 = _Symbol$1;
304
+
305
+ /** Used for built-in method references. */
306
+ var objectProto$j = Object.prototype;
307
+
308
+ /** Used to check objects for own properties. */
309
+ var hasOwnProperty$f = objectProto$j.hasOwnProperty;
310
+
311
+ /**
312
+ * Used to resolve the
313
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
314
+ * of values.
315
+ */
316
+ var nativeObjectToString$3 = objectProto$j.toString;
317
+
318
+ /** Built-in value references. */
319
+ var symToStringTag$3 = Symbol$8 ? Symbol$8.toStringTag : undefined;
320
+
321
+ /**
322
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
323
+ *
324
+ * @private
325
+ * @param {*} value The value to query.
326
+ * @returns {string} Returns the raw `toStringTag`.
327
+ */
328
+ function getRawTag$3(value) {
329
+ var isOwn = hasOwnProperty$f.call(value, symToStringTag$3),
330
+ tag = value[symToStringTag$3];
331
+
332
+ try {
333
+ value[symToStringTag$3] = undefined;
334
+ var unmasked = true;
335
+ } catch (e) {}
336
+
337
+ var result = nativeObjectToString$3.call(value);
338
+ if (unmasked) {
339
+ if (isOwn) {
340
+ value[symToStringTag$3] = tag;
341
+ } else {
342
+ delete value[symToStringTag$3];
343
+ }
344
+ }
345
+ return result;
346
+ }
347
+
348
+ var _getRawTag$1 = getRawTag$3;
349
+
350
+ /** Used for built-in method references. */
351
+
352
+ var objectProto$i = Object.prototype;
353
+
354
+ /**
355
+ * Used to resolve the
356
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
357
+ * of values.
358
+ */
359
+ var nativeObjectToString$2 = objectProto$i.toString;
360
+
361
+ /**
362
+ * Converts `value` to a string using `Object.prototype.toString`.
363
+ *
364
+ * @private
365
+ * @param {*} value The value to convert.
366
+ * @returns {string} Returns the converted string.
367
+ */
368
+ function objectToString$3(value) {
369
+ return nativeObjectToString$2.call(value);
370
+ }
371
+
372
+ var _objectToString$1 = objectToString$3;
373
+
374
+ var Symbol$7 = _Symbol$1,
375
+ getRawTag$2 = _getRawTag$1,
376
+ objectToString$2 = _objectToString$1;
377
+
378
+ /** `Object#toString` result references. */
379
+ var nullTag$1 = '[object Null]',
380
+ undefinedTag$1 = '[object Undefined]';
381
+
382
+ /** Built-in value references. */
383
+ var symToStringTag$2 = Symbol$7 ? Symbol$7.toStringTag : undefined;
384
+
385
+ /**
386
+ * The base implementation of `getTag` without fallbacks for buggy environments.
387
+ *
388
+ * @private
389
+ * @param {*} value The value to query.
390
+ * @returns {string} Returns the `toStringTag`.
391
+ */
392
+ function baseGetTag$9(value) {
393
+ if (value == null) {
394
+ return value === undefined ? undefinedTag$1 : nullTag$1;
395
+ }
396
+ return (symToStringTag$2 && symToStringTag$2 in Object(value))
397
+ ? getRawTag$2(value)
398
+ : objectToString$2(value);
399
+ }
400
+
401
+ var _baseGetTag$1 = baseGetTag$9;
402
+
403
+ /**
404
+ * Checks if `value` is the
405
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
406
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
407
+ *
408
+ * @static
409
+ * @memberOf _
410
+ * @since 0.1.0
411
+ * @category Lang
412
+ * @param {*} value The value to check.
413
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
414
+ * @example
415
+ *
416
+ * _.isObject({});
417
+ * // => true
418
+ *
419
+ * _.isObject([1, 2, 3]);
420
+ * // => true
421
+ *
422
+ * _.isObject(_.noop);
423
+ * // => true
424
+ *
425
+ * _.isObject(null);
426
+ * // => false
427
+ */
428
+
429
+ function isObject$6(value) {
430
+ var type = typeof value;
431
+ return value != null && (type == 'object' || type == 'function');
432
+ }
433
+
434
+ var isObject_1$1 = isObject$6;
435
+
436
+ var baseGetTag$8 = _baseGetTag$1,
437
+ isObject$5 = isObject_1$1;
438
+
439
+ /** `Object#toString` result references. */
440
+ var asyncTag$1 = '[object AsyncFunction]',
441
+ funcTag$2 = '[object Function]',
442
+ genTag$1 = '[object GeneratorFunction]',
443
+ proxyTag$1 = '[object Proxy]';
444
+
445
+ /**
446
+ * Checks if `value` is classified as a `Function` object.
447
+ *
448
+ * @static
449
+ * @memberOf _
450
+ * @since 0.1.0
451
+ * @category Lang
452
+ * @param {*} value The value to check.
453
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
454
+ * @example
455
+ *
456
+ * _.isFunction(_);
457
+ * // => true
458
+ *
459
+ * _.isFunction(/abc/);
460
+ * // => false
461
+ */
462
+ function isFunction$4(value) {
463
+ if (!isObject$5(value)) {
464
+ return false;
465
+ }
466
+ // The use of `Object#toString` avoids issues with the `typeof` operator
467
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
468
+ var tag = baseGetTag$8(value);
469
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag$1 || tag == proxyTag$1;
470
+ }
471
+
472
+ var isFunction_1$1 = isFunction$4;
473
+
474
+ var root$e = _root$1;
475
+
476
+ /** Used to detect overreaching core-js shims. */
477
+ var coreJsData$3 = root$e['__core-js_shared__'];
478
+
479
+ var _coreJsData$1 = coreJsData$3;
480
+
481
+ var coreJsData$2 = _coreJsData$1;
482
+
483
+ /** Used to detect methods masquerading as native. */
484
+ var maskSrcKey$1 = (function() {
485
+ var uid = /[^.]+$/.exec(coreJsData$2 && coreJsData$2.keys && coreJsData$2.keys.IE_PROTO || '');
486
+ return uid ? ('Symbol(src)_1.' + uid) : '';
487
+ }());
488
+
489
+ /**
490
+ * Checks if `func` has its source masked.
491
+ *
492
+ * @private
493
+ * @param {Function} func The function to check.
494
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
495
+ */
496
+ function isMasked$3(func) {
497
+ return !!maskSrcKey$1 && (maskSrcKey$1 in func);
498
+ }
499
+
500
+ var _isMasked$1 = isMasked$3;
501
+
502
+ /** Used for built-in method references. */
503
+
504
+ var funcProto$3 = Function.prototype;
505
+
506
+ /** Used to resolve the decompiled source of functions. */
507
+ var funcToString$3 = funcProto$3.toString;
508
+
509
+ /**
510
+ * Converts `func` to its source code.
511
+ *
512
+ * @private
513
+ * @param {Function} func The function to convert.
514
+ * @returns {string} Returns the source code.
515
+ */
516
+ function toSource$5(func) {
517
+ if (func != null) {
518
+ try {
519
+ return funcToString$3.call(func);
520
+ } catch (e) {}
521
+ try {
522
+ return (func + '');
523
+ } catch (e) {}
524
+ }
525
+ return '';
526
+ }
527
+
528
+ var _toSource$1 = toSource$5;
529
+
530
+ var isFunction$3 = isFunction_1$1,
531
+ isMasked$2 = _isMasked$1,
532
+ isObject$4 = isObject_1$1,
533
+ toSource$4 = _toSource$1;
534
+
535
+ /**
536
+ * Used to match `RegExp`
537
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
538
+ */
539
+ var reRegExpChar$1 = /[\\^$.*+?()[\]{}|]/g;
540
+
541
+ /** Used to detect host constructors (Safari). */
542
+ var reIsHostCtor$1 = /^\[object .+?Constructor\]$/;
543
+
544
+ /** Used for built-in method references. */
545
+ var funcProto$2 = Function.prototype,
546
+ objectProto$h = Object.prototype;
547
+
548
+ /** Used to resolve the decompiled source of functions. */
549
+ var funcToString$2 = funcProto$2.toString;
550
+
551
+ /** Used to check objects for own properties. */
552
+ var hasOwnProperty$e = objectProto$h.hasOwnProperty;
553
+
554
+ /** Used to detect if a method is native. */
555
+ var reIsNative$1 = RegExp('^' +
556
+ funcToString$2.call(hasOwnProperty$e).replace(reRegExpChar$1, '\\$&')
557
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
558
+ );
559
+
560
+ /**
561
+ * The base implementation of `_.isNative` without bad shim checks.
562
+ *
563
+ * @private
564
+ * @param {*} value The value to check.
565
+ * @returns {boolean} Returns `true` if `value` is a native function,
566
+ * else `false`.
567
+ */
568
+ function baseIsNative$3(value) {
569
+ if (!isObject$4(value) || isMasked$2(value)) {
570
+ return false;
571
+ }
572
+ var pattern = isFunction$3(value) ? reIsNative$1 : reIsHostCtor$1;
573
+ return pattern.test(toSource$4(value));
574
+ }
575
+
576
+ var _baseIsNative$1 = baseIsNative$3;
577
+
578
+ /**
579
+ * Gets the value at `key` of `object`.
580
+ *
581
+ * @private
582
+ * @param {Object} [object] The object to query.
583
+ * @param {string} key The key of the property to get.
584
+ * @returns {*} Returns the property value.
585
+ */
586
+
587
+ function getValue$3(object, key) {
588
+ return object == null ? undefined : object[key];
589
+ }
590
+
591
+ var _getValue$1 = getValue$3;
592
+
593
+ var baseIsNative$2 = _baseIsNative$1,
594
+ getValue$2 = _getValue$1;
595
+
596
+ /**
597
+ * Gets the native function at `key` of `object`.
598
+ *
599
+ * @private
600
+ * @param {Object} object The object to query.
601
+ * @param {string} key The key of the method to get.
602
+ * @returns {*} Returns the function if it's native, else `undefined`.
603
+ */
604
+ function getNative$e(object, key) {
605
+ var value = getValue$2(object, key);
606
+ return baseIsNative$2(value) ? value : undefined;
607
+ }
608
+
609
+ var _getNative$1 = getNative$e;
610
+
611
+ var getNative$d = _getNative$1,
612
+ root$d = _root$1;
613
+
614
+ /* Built-in method references that are verified to be native. */
615
+ var Map$6 = getNative$d(root$d, 'Map');
616
+
617
+ var _Map$1 = Map$6;
618
+
619
+ var getNative$c = _getNative$1;
620
+
621
+ /* Built-in method references that are verified to be native. */
622
+ var nativeCreate$9 = getNative$c(Object, 'create');
623
+
624
+ var _nativeCreate$1 = nativeCreate$9;
625
+
626
+ var nativeCreate$8 = _nativeCreate$1;
627
+
628
+ /**
629
+ * Removes all key-value entries from the hash.
630
+ *
631
+ * @private
632
+ * @name clear
633
+ * @memberOf Hash
634
+ */
635
+ function hashClear$3() {
636
+ this.__data__ = nativeCreate$8 ? nativeCreate$8(null) : {};
637
+ this.size = 0;
638
+ }
639
+
640
+ var _hashClear$1 = hashClear$3;
641
+
642
+ /**
643
+ * Removes `key` and its value from the hash.
644
+ *
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`.
651
+ */
652
+
653
+ function hashDelete$3(key) {
654
+ var result = this.has(key) && delete this.__data__[key];
655
+ this.size -= result ? 1 : 0;
656
+ return result;
657
+ }
658
+
659
+ var _hashDelete$1 = hashDelete$3;
660
+
661
+ var nativeCreate$7 = _nativeCreate$1;
662
+
663
+ /** Used to stand-in for `undefined` hash values. */
664
+ var HASH_UNDEFINED$4 = '__lodash_hash_undefined__';
665
+
666
+ /** Used for built-in method references. */
667
+ var objectProto$g = Object.prototype;
668
+
669
+ /** Used to check objects for own properties. */
670
+ var hasOwnProperty$d = objectProto$g.hasOwnProperty;
671
+
672
+ /**
673
+ * Gets the hash value for `key`.
674
+ *
675
+ * @private
676
+ * @name get
677
+ * @memberOf Hash
678
+ * @param {string} key The key of the value to get.
679
+ * @returns {*} Returns the entry value.
680
+ */
681
+ function hashGet$3(key) {
682
+ var data = this.__data__;
683
+ if (nativeCreate$7) {
684
+ var result = data[key];
685
+ return result === HASH_UNDEFINED$4 ? undefined : result;
686
+ }
687
+ return hasOwnProperty$d.call(data, key) ? data[key] : undefined;
688
+ }
689
+
690
+ var _hashGet$1 = hashGet$3;
691
+
692
+ var nativeCreate$6 = _nativeCreate$1;
693
+
694
+ /** Used for built-in method references. */
695
+ var objectProto$f = Object.prototype;
696
+
697
+ /** Used to check objects for own properties. */
698
+ var hasOwnProperty$c = objectProto$f.hasOwnProperty;
699
+
700
+ /**
701
+ * Checks if a hash value for `key` exists.
702
+ *
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`.
708
+ */
709
+ function hashHas$3(key) {
710
+ var data = this.__data__;
711
+ return nativeCreate$6 ? (data[key] !== undefined) : hasOwnProperty$c.call(data, key);
712
+ }
713
+
714
+ var _hashHas$1 = hashHas$3;
715
+
716
+ var nativeCreate$5 = _nativeCreate$1;
717
+
718
+ /** Used to stand-in for `undefined` hash values. */
719
+ var HASH_UNDEFINED$3 = '__lodash_hash_undefined__';
720
+
721
+ /**
722
+ * Sets the hash `key` to `value`.
723
+ *
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.
730
+ */
731
+ function hashSet$3(key, value) {
732
+ var data = this.__data__;
733
+ this.size += this.has(key) ? 0 : 1;
734
+ data[key] = (nativeCreate$5 && value === undefined) ? HASH_UNDEFINED$3 : value;
735
+ return this;
736
+ }
737
+
738
+ var _hashSet$1 = hashSet$3;
739
+
740
+ var hashClear$2 = _hashClear$1,
741
+ hashDelete$2 = _hashDelete$1,
742
+ hashGet$2 = _hashGet$1,
743
+ hashHas$2 = _hashHas$1,
744
+ hashSet$2 = _hashSet$1;
745
+
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$3(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
+ }
763
+
764
+ // Add methods to `Hash`.
765
+ Hash$3.prototype.clear = hashClear$2;
766
+ Hash$3.prototype['delete'] = hashDelete$2;
767
+ Hash$3.prototype.get = hashGet$2;
768
+ Hash$3.prototype.has = hashHas$2;
769
+ Hash$3.prototype.set = hashSet$2;
770
+
771
+ var _Hash$1 = Hash$3;
772
+
773
+ var Hash$2 = _Hash$1,
774
+ ListCache$4 = _ListCache$1,
775
+ Map$5 = _Map$1;
776
+
777
+ /**
778
+ * Removes all key-value entries from the map.
779
+ *
780
+ * @private
781
+ * @name clear
782
+ * @memberOf MapCache
783
+ */
784
+ function mapCacheClear$3() {
785
+ this.size = 0;
786
+ this.__data__ = {
787
+ 'hash': new Hash$2,
788
+ 'map': new (Map$5 || ListCache$4),
789
+ 'string': new Hash$2
790
+ };
791
+ }
792
+
793
+ var _mapCacheClear$1 = mapCacheClear$3;
794
+
795
+ /**
796
+ * Checks if `value` is suitable for use as unique object key.
797
+ *
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$3(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$1 = isKeyable$3;
811
+
812
+ var isKeyable$2 = _isKeyable$1;
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$9(map, key) {
823
+ var data = map.__data__;
824
+ return isKeyable$2(key)
825
+ ? data[typeof key == 'string' ? 'string' : 'hash']
826
+ : data.map;
827
+ }
828
+
829
+ var _getMapData$1 = getMapData$9;
830
+
831
+ var getMapData$8 = _getMapData$1;
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$3(key) {
843
+ var result = getMapData$8(this, key)['delete'](key);
844
+ this.size -= result ? 1 : 0;
845
+ return result;
846
+ }
847
+
848
+ var _mapCacheDelete$1 = mapCacheDelete$3;
849
+
850
+ var getMapData$7 = _getMapData$1;
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$3(key) {
862
+ return getMapData$7(this, key).get(key);
863
+ }
864
+
865
+ var _mapCacheGet$1 = mapCacheGet$3;
866
+
867
+ var getMapData$6 = _getMapData$1;
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$3(key) {
879
+ return getMapData$6(this, key).has(key);
880
+ }
881
+
882
+ var _mapCacheHas$1 = mapCacheHas$3;
883
+
884
+ var getMapData$5 = _getMapData$1;
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$3(key, value) {
897
+ var data = getMapData$5(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$1 = mapCacheSet$3;
906
+
907
+ var mapCacheClear$2 = _mapCacheClear$1,
908
+ mapCacheDelete$2 = _mapCacheDelete$1,
909
+ mapCacheGet$2 = _mapCacheGet$1,
910
+ mapCacheHas$2 = _mapCacheHas$1,
911
+ mapCacheSet$2 = _mapCacheSet$1;
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$5(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$5.prototype.clear = mapCacheClear$2;
933
+ MapCache$5.prototype['delete'] = mapCacheDelete$2;
934
+ MapCache$5.prototype.get = mapCacheGet$2;
935
+ MapCache$5.prototype.has = mapCacheHas$2;
936
+ MapCache$5.prototype.set = mapCacheSet$2;
937
+
938
+ var _MapCache$1 = MapCache$5;
939
+
940
+ var ListCache$3 = _ListCache$1,
941
+ Map$4 = _Map$1,
942
+ MapCache$4 = _MapCache$1;
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$3) {
960
+ var pairs = data.__data__;
961
+ if (!Map$4 || (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$4(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$2 = _ListCache$1,
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$2(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
+ /** Used to stand-in for `undefined` hash values. */
1004
+
1005
+ var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
1006
+
1007
+ /**
1008
+ * Adds `value` to the array cache.
1009
+ *
1010
+ * @private
1011
+ * @name add
1012
+ * @memberOf SetCache
1013
+ * @alias push
1014
+ * @param {*} value The value to cache.
1015
+ * @returns {Object} Returns the cache instance.
1016
+ */
1017
+ function setCacheAdd$1(value) {
1018
+ this.__data__.set(value, HASH_UNDEFINED$2);
1019
+ return this;
1020
+ }
1021
+
1022
+ var _setCacheAdd = setCacheAdd$1;
1023
+
1024
+ /**
1025
+ * Checks if `value` is in the array cache.
1026
+ *
1027
+ * @private
1028
+ * @name has
1029
+ * @memberOf SetCache
1030
+ * @param {*} value The value to search for.
1031
+ * @returns {number} Returns `true` if `value` is found, else `false`.
1032
+ */
1033
+
1034
+ function setCacheHas$1(value) {
1035
+ return this.__data__.has(value);
1036
+ }
1037
+
1038
+ var _setCacheHas = setCacheHas$1;
1039
+
1040
+ var MapCache$3 = _MapCache$1,
1041
+ setCacheAdd = _setCacheAdd,
1042
+ setCacheHas = _setCacheHas;
1043
+
1044
+ /**
1045
+ *
1046
+ * Creates an array cache object to store unique values.
1047
+ *
1048
+ * @private
1049
+ * @constructor
1050
+ * @param {Array} [values] The values to cache.
1051
+ */
1052
+ function SetCache$1(values) {
1053
+ var index = -1,
1054
+ length = values == null ? 0 : values.length;
1055
+
1056
+ this.__data__ = new MapCache$3;
1057
+ while (++index < length) {
1058
+ this.add(values[index]);
1059
+ }
1060
+ }
1061
+
1062
+ // Add methods to `SetCache`.
1063
+ SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
1064
+ SetCache$1.prototype.has = setCacheHas;
1065
+
1066
+ var _SetCache = SetCache$1;
1067
+
1068
+ /**
1069
+ * A specialized version of `_.some` for arrays without support for iteratee
1070
+ * shorthands.
1071
+ *
1072
+ * @private
1073
+ * @param {Array} [array] The array to iterate over.
1074
+ * @param {Function} predicate The function invoked per iteration.
1075
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
1076
+ * else `false`.
1077
+ */
1078
+
1079
+ function arraySome$1(array, predicate) {
1080
+ var index = -1,
1081
+ length = array == null ? 0 : array.length;
1082
+
1083
+ while (++index < length) {
1084
+ if (predicate(array[index], index, array)) {
1085
+ return true;
1086
+ }
1087
+ }
1088
+ return false;
1089
+ }
1090
+
1091
+ var _arraySome = arraySome$1;
1092
+
1093
+ /**
1094
+ * Checks if a `cache` value for `key` exists.
1095
+ *
1096
+ * @private
1097
+ * @param {Object} cache The cache to query.
1098
+ * @param {string} key The key of the entry to check.
1099
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1100
+ */
1101
+
1102
+ function cacheHas$1(cache, key) {
1103
+ return cache.has(key);
1104
+ }
1105
+
1106
+ var _cacheHas = cacheHas$1;
1107
+
1108
+ var SetCache = _SetCache,
1109
+ arraySome = _arraySome,
1110
+ cacheHas = _cacheHas;
1111
+
1112
+ /** Used to compose bitmasks for value comparisons. */
1113
+ var COMPARE_PARTIAL_FLAG$3 = 1,
1114
+ COMPARE_UNORDERED_FLAG$1 = 2;
1115
+
1116
+ /**
1117
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
1118
+ * partial deep comparisons.
1119
+ *
1120
+ * @private
1121
+ * @param {Array} array The array to compare.
1122
+ * @param {Array} other The other array to compare.
1123
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1124
+ * @param {Function} customizer The function to customize comparisons.
1125
+ * @param {Function} equalFunc The function to determine equivalents of values.
1126
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
1127
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1128
+ */
1129
+ function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
1130
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
1131
+ arrLength = array.length,
1132
+ othLength = other.length;
1133
+
1134
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1135
+ return false;
1136
+ }
1137
+ // Check that cyclic values are equal.
1138
+ var arrStacked = stack.get(array);
1139
+ var othStacked = stack.get(other);
1140
+ if (arrStacked && othStacked) {
1141
+ return arrStacked == other && othStacked == array;
1142
+ }
1143
+ var index = -1,
1144
+ result = true,
1145
+ seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new SetCache : undefined;
1146
+
1147
+ stack.set(array, other);
1148
+ stack.set(other, array);
1149
+
1150
+ // Ignore non-index properties.
1151
+ while (++index < arrLength) {
1152
+ var arrValue = array[index],
1153
+ othValue = other[index];
1154
+
1155
+ if (customizer) {
1156
+ var compared = isPartial
1157
+ ? customizer(othValue, arrValue, index, other, array, stack)
1158
+ : customizer(arrValue, othValue, index, array, other, stack);
1159
+ }
1160
+ if (compared !== undefined) {
1161
+ if (compared) {
1162
+ continue;
1163
+ }
1164
+ result = false;
1165
+ break;
1166
+ }
1167
+ // Recursively compare arrays (susceptible to call stack limits).
1168
+ if (seen) {
1169
+ if (!arraySome(other, function(othValue, othIndex) {
1170
+ if (!cacheHas(seen, othIndex) &&
1171
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
1172
+ return seen.push(othIndex);
1173
+ }
1174
+ })) {
1175
+ result = false;
1176
+ break;
1177
+ }
1178
+ } else if (!(
1179
+ arrValue === othValue ||
1180
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
1181
+ )) {
1182
+ result = false;
1183
+ break;
1184
+ }
1185
+ }
1186
+ stack['delete'](array);
1187
+ stack['delete'](other);
1188
+ return result;
1189
+ }
1190
+
1191
+ var _equalArrays = equalArrays$2;
1192
+
1193
+ var root$c = _root$1;
1194
+
1195
+ /** Built-in value references. */
1196
+ var Uint8Array$1 = root$c.Uint8Array;
1197
+
1198
+ var _Uint8Array = Uint8Array$1;
1199
+
1200
+ /**
1201
+ * Converts `map` to its key-value pairs.
1202
+ *
1203
+ * @private
1204
+ * @param {Object} map The map to convert.
1205
+ * @returns {Array} Returns the key-value pairs.
1206
+ */
1207
+
1208
+ function mapToArray$1(map) {
1209
+ var index = -1,
1210
+ result = Array(map.size);
1211
+
1212
+ map.forEach(function(value, key) {
1213
+ result[++index] = [key, value];
1214
+ });
1215
+ return result;
1216
+ }
1217
+
1218
+ var _mapToArray = mapToArray$1;
1219
+
1220
+ /**
1221
+ * Converts `set` to an array of its values.
1222
+ *
1223
+ * @private
1224
+ * @param {Object} set The set to convert.
1225
+ * @returns {Array} Returns the values.
1226
+ */
1227
+
1228
+ function setToArray$1(set) {
1229
+ var index = -1,
1230
+ result = Array(set.size);
1231
+
1232
+ set.forEach(function(value) {
1233
+ result[++index] = value;
1234
+ });
1235
+ return result;
1236
+ }
1237
+
1238
+ var _setToArray = setToArray$1;
1239
+
1240
+ var Symbol$6 = _Symbol$1,
1241
+ Uint8Array = _Uint8Array,
1242
+ eq$3 = eq_1$1,
1243
+ equalArrays$1 = _equalArrays,
1244
+ mapToArray = _mapToArray,
1245
+ setToArray = _setToArray;
1246
+
1247
+ /** Used to compose bitmasks for value comparisons. */
1248
+ var COMPARE_PARTIAL_FLAG$2 = 1,
1249
+ COMPARE_UNORDERED_FLAG = 2;
1250
+
1251
+ /** `Object#toString` result references. */
1252
+ var boolTag$1 = '[object Boolean]',
1253
+ dateTag$1 = '[object Date]',
1254
+ errorTag$1 = '[object Error]',
1255
+ mapTag$4 = '[object Map]',
1256
+ numberTag$1 = '[object Number]',
1257
+ regexpTag$1 = '[object RegExp]',
1258
+ setTag$4 = '[object Set]',
1259
+ stringTag$1 = '[object String]',
1260
+ symbolTag$1 = '[object Symbol]';
1261
+
1262
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1263
+ dataViewTag$3 = '[object DataView]';
1264
+
1265
+ /** Used to convert symbols to primitives and strings. */
1266
+ var symbolProto$2 = Symbol$6 ? Symbol$6.prototype : undefined,
1267
+ symbolValueOf = symbolProto$2 ? symbolProto$2.valueOf : undefined;
1268
+
1269
+ /**
1270
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
1271
+ * the same `toStringTag`.
1272
+ *
1273
+ * **Note:** This function only supports comparing values with tags of
1274
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
1275
+ *
1276
+ * @private
1277
+ * @param {Object} object The object to compare.
1278
+ * @param {Object} other The other object to compare.
1279
+ * @param {string} tag The `toStringTag` of the objects to compare.
1280
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1281
+ * @param {Function} customizer The function to customize comparisons.
1282
+ * @param {Function} equalFunc The function to determine equivalents of values.
1283
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
1284
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1285
+ */
1286
+ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
1287
+ switch (tag) {
1288
+ case dataViewTag$3:
1289
+ if ((object.byteLength != other.byteLength) ||
1290
+ (object.byteOffset != other.byteOffset)) {
1291
+ return false;
1292
+ }
1293
+ object = object.buffer;
1294
+ other = other.buffer;
1295
+
1296
+ case arrayBufferTag$1:
1297
+ if ((object.byteLength != other.byteLength) ||
1298
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
1299
+ return false;
1300
+ }
1301
+ return true;
1302
+
1303
+ case boolTag$1:
1304
+ case dateTag$1:
1305
+ case numberTag$1:
1306
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
1307
+ // Invalid dates are coerced to `NaN`.
1308
+ return eq$3(+object, +other);
1309
+
1310
+ case errorTag$1:
1311
+ return object.name == other.name && object.message == other.message;
1312
+
1313
+ case regexpTag$1:
1314
+ case stringTag$1:
1315
+ // Coerce regexes to strings and treat strings, primitives and objects,
1316
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
1317
+ // for more details.
1318
+ return object == (other + '');
1319
+
1320
+ case mapTag$4:
1321
+ var convert = mapToArray;
1322
+
1323
+ case setTag$4:
1324
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
1325
+ convert || (convert = setToArray);
1326
+
1327
+ if (object.size != other.size && !isPartial) {
1328
+ return false;
1329
+ }
1330
+ // Assume cyclic values are equal.
1331
+ var stacked = stack.get(object);
1332
+ if (stacked) {
1333
+ return stacked == other;
1334
+ }
1335
+ bitmask |= COMPARE_UNORDERED_FLAG;
1336
+
1337
+ // Recursively compare objects (susceptible to call stack limits).
1338
+ stack.set(object, other);
1339
+ var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1340
+ stack['delete'](object);
1341
+ return result;
1342
+
1343
+ case symbolTag$1:
1344
+ if (symbolValueOf) {
1345
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
1346
+ }
1347
+ }
1348
+ return false;
1349
+ }
1350
+
1351
+ var _equalByTag = equalByTag$1;
1352
+
1353
+ /**
1354
+ * Appends the elements of `values` to `array`.
1355
+ *
1356
+ * @private
1357
+ * @param {Array} array The array to modify.
1358
+ * @param {Array} values The values to append.
1359
+ * @returns {Array} Returns `array`.
1360
+ */
1361
+
1362
+ function arrayPush$2(array, values) {
1363
+ var index = -1,
1364
+ length = values.length,
1365
+ offset = array.length;
1366
+
1367
+ while (++index < length) {
1368
+ array[offset + index] = values[index];
1369
+ }
1370
+ return array;
1371
+ }
1372
+
1373
+ var _arrayPush = arrayPush$2;
1374
+
1375
+ /**
1376
+ * Checks if `value` is classified as an `Array` object.
1377
+ *
1378
+ * @static
1379
+ * @memberOf _
1380
+ * @since 0.1.0
1381
+ * @category Lang
1382
+ * @param {*} value The value to check.
1383
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1384
+ * @example
1385
+ *
1386
+ * _.isArray([1, 2, 3]);
1387
+ * // => true
1388
+ *
1389
+ * _.isArray(document.body.children);
1390
+ * // => false
1391
+ *
1392
+ * _.isArray('abc');
1393
+ * // => false
1394
+ *
1395
+ * _.isArray(_.noop);
1396
+ * // => false
1397
+ */
1398
+
1399
+ var isArray$9 = Array.isArray;
1400
+
1401
+ var isArray_1 = isArray$9;
1402
+
1403
+ var arrayPush$1 = _arrayPush,
1404
+ isArray$8 = isArray_1;
1405
+
1406
+ /**
1407
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1408
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1409
+ * symbols of `object`.
1410
+ *
1411
+ * @private
1412
+ * @param {Object} object The object to query.
1413
+ * @param {Function} keysFunc The function to get the keys of `object`.
1414
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1415
+ * @returns {Array} Returns the array of property names and symbols.
1416
+ */
1417
+ function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
1418
+ var result = keysFunc(object);
1419
+ return isArray$8(object) ? result : arrayPush$1(result, symbolsFunc(object));
1420
+ }
1421
+
1422
+ var _baseGetAllKeys = baseGetAllKeys$1;
1423
+
1424
+ /**
1425
+ * A specialized version of `_.filter` for arrays without support for
1426
+ * iteratee shorthands.
1427
+ *
1428
+ * @private
1429
+ * @param {Array} [array] The array to iterate over.
1430
+ * @param {Function} predicate The function invoked per iteration.
1431
+ * @returns {Array} Returns the new filtered array.
1432
+ */
1433
+
1434
+ function arrayFilter$1(array, predicate) {
1435
+ var index = -1,
1436
+ length = array == null ? 0 : array.length,
1437
+ resIndex = 0,
1438
+ result = [];
1439
+
1440
+ while (++index < length) {
1441
+ var value = array[index];
1442
+ if (predicate(value, index, array)) {
1443
+ result[resIndex++] = value;
1444
+ }
1445
+ }
1446
+ return result;
1447
+ }
1448
+
1449
+ var _arrayFilter = arrayFilter$1;
1450
+
1451
+ /**
1452
+ * This method returns a new empty array.
1453
+ *
1454
+ * @static
1455
+ * @memberOf _
1456
+ * @since 4.13.0
1457
+ * @category Util
1458
+ * @returns {Array} Returns the new empty array.
1459
+ * @example
1460
+ *
1461
+ * var arrays = _.times(2, _.stubArray);
1462
+ *
1463
+ * console.log(arrays);
1464
+ * // => [[], []]
1465
+ *
1466
+ * console.log(arrays[0] === arrays[1]);
1467
+ * // => false
1468
+ */
1469
+
1470
+ function stubArray$1() {
1471
+ return [];
1472
+ }
1473
+
1474
+ var stubArray_1 = stubArray$1;
1475
+
1476
+ var arrayFilter = _arrayFilter,
1477
+ stubArray = stubArray_1;
1478
+
1479
+ /** Used for built-in method references. */
1480
+ var objectProto$e = Object.prototype;
1481
+
1482
+ /** Built-in value references. */
1483
+ var propertyIsEnumerable$2 = objectProto$e.propertyIsEnumerable;
1484
+
1485
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1486
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1487
+
1488
+ /**
1489
+ * Creates an array of the own enumerable symbols of `object`.
1490
+ *
1491
+ * @private
1492
+ * @param {Object} object The object to query.
1493
+ * @returns {Array} Returns the array of symbols.
1494
+ */
1495
+ var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) {
1496
+ if (object == null) {
1497
+ return [];
1498
+ }
1499
+ object = Object(object);
1500
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
1501
+ return propertyIsEnumerable$2.call(object, symbol);
1502
+ });
1503
+ };
1504
+
1505
+ var _getSymbols = getSymbols$1;
1506
+
1507
+ /**
1508
+ * The base implementation of `_.times` without support for iteratee shorthands
1509
+ * or max array length checks.
1510
+ *
1511
+ * @private
1512
+ * @param {number} n The number of times to invoke `iteratee`.
1513
+ * @param {Function} iteratee The function invoked per iteration.
1514
+ * @returns {Array} Returns the array of results.
1515
+ */
1516
+
1517
+ function baseTimes$1(n, iteratee) {
1518
+ var index = -1,
1519
+ result = Array(n);
1520
+
1521
+ while (++index < n) {
1522
+ result[index] = iteratee(index);
1523
+ }
1524
+ return result;
1525
+ }
1526
+
1527
+ var _baseTimes = baseTimes$1;
1528
+
1529
+ /**
1530
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1531
+ * and has a `typeof` result of "object".
1532
+ *
1533
+ * @static
1534
+ * @memberOf _
1535
+ * @since 4.0.0
1536
+ * @category Lang
1537
+ * @param {*} value The value to check.
1538
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1539
+ * @example
1540
+ *
1541
+ * _.isObjectLike({});
1542
+ * // => true
1543
+ *
1544
+ * _.isObjectLike([1, 2, 3]);
1545
+ * // => true
1546
+ *
1547
+ * _.isObjectLike(_.noop);
1548
+ * // => false
1549
+ *
1550
+ * _.isObjectLike(null);
1551
+ * // => false
1552
+ */
1553
+
1554
+ function isObjectLike$8(value) {
1555
+ return value != null && typeof value == 'object';
1556
+ }
1557
+
1558
+ var isObjectLike_1$1 = isObjectLike$8;
1559
+
1560
+ var baseGetTag$7 = _baseGetTag$1,
1561
+ isObjectLike$7 = isObjectLike_1$1;
1562
+
1563
+ /** `Object#toString` result references. */
1564
+ var argsTag$3 = '[object Arguments]';
1565
+
1566
+ /**
1567
+ * The base implementation of `_.isArguments`.
1568
+ *
1569
+ * @private
1570
+ * @param {*} value The value to check.
1571
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1572
+ */
1573
+ function baseIsArguments$3(value) {
1574
+ return isObjectLike$7(value) && baseGetTag$7(value) == argsTag$3;
1575
+ }
1576
+
1577
+ var _baseIsArguments$1 = baseIsArguments$3;
1578
+
1579
+ var baseIsArguments$2 = _baseIsArguments$1,
1580
+ isObjectLike$6 = isObjectLike_1$1;
1581
+
1582
+ /** Used for built-in method references. */
1583
+ var objectProto$d = Object.prototype;
1584
+
1585
+ /** Used to check objects for own properties. */
1586
+ var hasOwnProperty$b = objectProto$d.hasOwnProperty;
1587
+
1588
+ /** Built-in value references. */
1589
+ var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;
1590
+
1591
+ /**
1592
+ * Checks if `value` is likely an `arguments` object.
1593
+ *
1594
+ * @static
1595
+ * @memberOf _
1596
+ * @since 0.1.0
1597
+ * @category Lang
1598
+ * @param {*} value The value to check.
1599
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1600
+ * else `false`.
1601
+ * @example
1602
+ *
1603
+ * _.isArguments(function() { return arguments; }());
1604
+ * // => true
1605
+ *
1606
+ * _.isArguments([1, 2, 3]);
1607
+ * // => false
1608
+ */
1609
+ var isArguments$4 = baseIsArguments$2(function() { return arguments; }()) ? baseIsArguments$2 : function(value) {
1610
+ return isObjectLike$6(value) && hasOwnProperty$b.call(value, 'callee') &&
1611
+ !propertyIsEnumerable$1.call(value, 'callee');
1612
+ };
1613
+
1614
+ var isArguments_1 = isArguments$4;
1615
+
1616
+ var isBuffer$4 = {exports: {}};
1617
+
1618
+ /**
1619
+ * This method returns `false`.
1620
+ *
1621
+ * @static
1622
+ * @memberOf _
1623
+ * @since 4.13.0
1624
+ * @category Util
1625
+ * @returns {boolean} Returns `false`.
1626
+ * @example
1627
+ *
1628
+ * _.times(2, _.stubFalse);
1629
+ * // => [false, false]
1630
+ */
1631
+
1632
+ function stubFalse$1() {
1633
+ return false;
1634
+ }
1635
+
1636
+ var stubFalse_1$1 = stubFalse$1;
1637
+
1638
+ (function (module, exports) {
1639
+ var root = _root$1,
1640
+ stubFalse = stubFalse_1$1;
1641
+
1642
+ /** Detect free variable `exports`. */
1643
+ var freeExports = exports && !exports.nodeType && exports;
1644
+
1645
+ /** Detect free variable `module`. */
1646
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1647
+
1648
+ /** Detect the popular CommonJS extension `module.exports`. */
1649
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1650
+
1651
+ /** Built-in value references. */
1652
+ var Buffer = moduleExports ? root.Buffer : undefined;
1653
+
1654
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1655
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1656
+
1657
+ /**
1658
+ * Checks if `value` is a buffer.
1659
+ *
1660
+ * @static
1661
+ * @memberOf _
1662
+ * @since 4.3.0
1663
+ * @category Lang
1664
+ * @param {*} value The value to check.
1665
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1666
+ * @example
1667
+ *
1668
+ * _.isBuffer(new Buffer(2));
1669
+ * // => true
1670
+ *
1671
+ * _.isBuffer(new Uint8Array(2));
1672
+ * // => false
1673
+ */
1674
+ var isBuffer = nativeIsBuffer || stubFalse;
1675
+
1676
+ module.exports = isBuffer;
1677
+ }(isBuffer$4, isBuffer$4.exports));
1678
+
1679
+ /** Used as references for various `Number` constants. */
1680
+
1681
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
1682
+
1683
+ /** Used to detect unsigned integer values. */
1684
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1685
+
1686
+ /**
1687
+ * Checks if `value` is a valid array-like index.
1688
+ *
1689
+ * @private
1690
+ * @param {*} value The value to check.
1691
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1692
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1693
+ */
1694
+ function isIndex$3(value, length) {
1695
+ var type = typeof value;
1696
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
1697
+
1698
+ return !!length &&
1699
+ (type == 'number' ||
1700
+ (type != 'symbol' && reIsUint.test(value))) &&
1701
+ (value > -1 && value % 1 == 0 && value < length);
1702
+ }
1703
+
1704
+ var _isIndex = isIndex$3;
1705
+
1706
+ /** Used as references for various `Number` constants. */
1707
+
1708
+ var MAX_SAFE_INTEGER = 9007199254740991;
1709
+
1710
+ /**
1711
+ * Checks if `value` is a valid array-like length.
1712
+ *
1713
+ * **Note:** This method is loosely based on
1714
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1715
+ *
1716
+ * @static
1717
+ * @memberOf _
1718
+ * @since 4.0.0
1719
+ * @category Lang
1720
+ * @param {*} value The value to check.
1721
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1722
+ * @example
1723
+ *
1724
+ * _.isLength(3);
1725
+ * // => true
1726
+ *
1727
+ * _.isLength(Number.MIN_VALUE);
1728
+ * // => false
1729
+ *
1730
+ * _.isLength(Infinity);
1731
+ * // => false
1732
+ *
1733
+ * _.isLength('3');
1734
+ * // => false
1735
+ */
1736
+ function isLength$3(value) {
1737
+ return typeof value == 'number' &&
1738
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1739
+ }
1740
+
1741
+ var isLength_1 = isLength$3;
1742
+
1743
+ var baseGetTag$6 = _baseGetTag$1,
1744
+ isLength$2 = isLength_1,
1745
+ isObjectLike$5 = isObjectLike_1$1;
1746
+
1747
+ /** `Object#toString` result references. */
1748
+ var argsTag$2 = '[object Arguments]',
1749
+ arrayTag$1 = '[object Array]',
1750
+ boolTag = '[object Boolean]',
1751
+ dateTag = '[object Date]',
1752
+ errorTag = '[object Error]',
1753
+ funcTag$1 = '[object Function]',
1754
+ mapTag$3 = '[object Map]',
1755
+ numberTag = '[object Number]',
1756
+ objectTag$3 = '[object Object]',
1757
+ regexpTag = '[object RegExp]',
1758
+ setTag$3 = '[object Set]',
1759
+ stringTag = '[object String]',
1760
+ weakMapTag$2 = '[object WeakMap]';
1761
+
1762
+ var arrayBufferTag = '[object ArrayBuffer]',
1763
+ dataViewTag$2 = '[object DataView]',
1764
+ float32Tag = '[object Float32Array]',
1765
+ float64Tag = '[object Float64Array]',
1766
+ int8Tag = '[object Int8Array]',
1767
+ int16Tag = '[object Int16Array]',
1768
+ int32Tag = '[object Int32Array]',
1769
+ uint8Tag = '[object Uint8Array]',
1770
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1771
+ uint16Tag = '[object Uint16Array]',
1772
+ uint32Tag = '[object Uint32Array]';
1773
+
1774
+ /** Used to identify `toStringTag` values of typed arrays. */
1775
+ var typedArrayTags = {};
1776
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1777
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1778
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1779
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1780
+ typedArrayTags[uint32Tag] = true;
1781
+ typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$1] =
1782
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1783
+ typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag] =
1784
+ typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
1785
+ typedArrayTags[mapTag$3] = typedArrayTags[numberTag] =
1786
+ typedArrayTags[objectTag$3] = typedArrayTags[regexpTag] =
1787
+ typedArrayTags[setTag$3] = typedArrayTags[stringTag] =
1788
+ typedArrayTags[weakMapTag$2] = false;
1789
+
1790
+ /**
1791
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1792
+ *
1793
+ * @private
1794
+ * @param {*} value The value to check.
1795
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1796
+ */
1797
+ function baseIsTypedArray$1(value) {
1798
+ return isObjectLike$5(value) &&
1799
+ isLength$2(value.length) && !!typedArrayTags[baseGetTag$6(value)];
1800
+ }
1801
+
1802
+ var _baseIsTypedArray = baseIsTypedArray$1;
1803
+
1804
+ /**
1805
+ * The base implementation of `_.unary` without support for storing metadata.
1806
+ *
1807
+ * @private
1808
+ * @param {Function} func The function to cap arguments for.
1809
+ * @returns {Function} Returns the new capped function.
1810
+ */
1811
+
1812
+ function baseUnary$1(func) {
1813
+ return function(value) {
1814
+ return func(value);
1815
+ };
1816
+ }
1817
+
1818
+ var _baseUnary = baseUnary$1;
1819
+
1820
+ var _nodeUtil$1 = {exports: {}};
1821
+
1822
+ (function (module, exports) {
1823
+ var freeGlobal = _freeGlobal$1;
1824
+
1825
+ /** Detect free variable `exports`. */
1826
+ var freeExports = exports && !exports.nodeType && exports;
1827
+
1828
+ /** Detect free variable `module`. */
1829
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1830
+
1831
+ /** Detect the popular CommonJS extension `module.exports`. */
1832
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1833
+
1834
+ /** Detect free variable `process` from Node.js. */
1835
+ var freeProcess = moduleExports && freeGlobal.process;
1836
+
1837
+ /** Used to access faster Node.js helpers. */
1838
+ var nodeUtil = (function() {
1839
+ try {
1840
+ // Use `util.types` for Node.js 10+.
1841
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
1842
+
1843
+ if (types) {
1844
+ return types;
1845
+ }
1846
+
1847
+ // Legacy `process.binding('util')` for Node.js < 10.
1848
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1849
+ } catch (e) {}
1850
+ }());
1851
+
1852
+ module.exports = nodeUtil;
1853
+ }(_nodeUtil$1, _nodeUtil$1.exports));
1854
+
1855
+ var baseIsTypedArray = _baseIsTypedArray,
1856
+ baseUnary = _baseUnary,
1857
+ nodeUtil$1 = _nodeUtil$1.exports;
1858
+
1859
+ /* Node.js helper references. */
1860
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
1861
+
1862
+ /**
1863
+ * Checks if `value` is classified as a typed array.
1864
+ *
1865
+ * @static
1866
+ * @memberOf _
1867
+ * @since 3.0.0
1868
+ * @category Lang
1869
+ * @param {*} value The value to check.
1870
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1871
+ * @example
1872
+ *
1873
+ * _.isTypedArray(new Uint8Array);
1874
+ * // => true
1875
+ *
1876
+ * _.isTypedArray([]);
1877
+ * // => false
1878
+ */
1879
+ var isTypedArray$3 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1880
+
1881
+ var isTypedArray_1 = isTypedArray$3;
1882
+
1883
+ var baseTimes = _baseTimes,
1884
+ isArguments$3 = isArguments_1,
1885
+ isArray$7 = isArray_1,
1886
+ isBuffer$3 = isBuffer$4.exports,
1887
+ isIndex$2 = _isIndex,
1888
+ isTypedArray$2 = isTypedArray_1;
1889
+
1890
+ /** Used for built-in method references. */
1891
+ var objectProto$c = Object.prototype;
1892
+
1893
+ /** Used to check objects for own properties. */
1894
+ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
1895
+
1896
+ /**
1897
+ * Creates an array of the enumerable property names of the array-like `value`.
1898
+ *
1899
+ * @private
1900
+ * @param {*} value The value to query.
1901
+ * @param {boolean} inherited Specify returning inherited property names.
1902
+ * @returns {Array} Returns the array of property names.
1903
+ */
1904
+ function arrayLikeKeys$1(value, inherited) {
1905
+ var isArr = isArray$7(value),
1906
+ isArg = !isArr && isArguments$3(value),
1907
+ isBuff = !isArr && !isArg && isBuffer$3(value),
1908
+ isType = !isArr && !isArg && !isBuff && isTypedArray$2(value),
1909
+ skipIndexes = isArr || isArg || isBuff || isType,
1910
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1911
+ length = result.length;
1912
+
1913
+ for (var key in value) {
1914
+ if ((inherited || hasOwnProperty$a.call(value, key)) &&
1915
+ !(skipIndexes && (
1916
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1917
+ key == 'length' ||
1918
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1919
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1920
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1921
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1922
+ // Skip index properties.
1923
+ isIndex$2(key, length)
1924
+ ))) {
1925
+ result.push(key);
1926
+ }
1927
+ }
1928
+ return result;
1929
+ }
1930
+
1931
+ var _arrayLikeKeys = arrayLikeKeys$1;
1932
+
1933
+ /** Used for built-in method references. */
1934
+
1935
+ var objectProto$b = Object.prototype;
1936
+
1937
+ /**
1938
+ * Checks if `value` is likely a prototype object.
1939
+ *
1940
+ * @private
1941
+ * @param {*} value The value to check.
1942
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1943
+ */
1944
+ function isPrototype$2(value) {
1945
+ var Ctor = value && value.constructor,
1946
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$b;
1947
+
1948
+ return value === proto;
1949
+ }
1950
+
1951
+ var _isPrototype = isPrototype$2;
1952
+
1953
+ /**
1954
+ * Creates a unary function that invokes `func` with its argument transformed.
1955
+ *
1956
+ * @private
1957
+ * @param {Function} func The function to wrap.
1958
+ * @param {Function} transform The argument transform.
1959
+ * @returns {Function} Returns the new function.
1960
+ */
1961
+
1962
+ function overArg$1(func, transform) {
1963
+ return function(arg) {
1964
+ return func(transform(arg));
1965
+ };
1966
+ }
1967
+
1968
+ var _overArg = overArg$1;
1969
+
1970
+ var overArg = _overArg;
1971
+
1972
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1973
+ var nativeKeys$1 = overArg(Object.keys, Object);
1974
+
1975
+ var _nativeKeys = nativeKeys$1;
1976
+
1977
+ var isPrototype$1 = _isPrototype,
1978
+ nativeKeys = _nativeKeys;
1979
+
1980
+ /** Used for built-in method references. */
1981
+ var objectProto$a = Object.prototype;
1982
+
1983
+ /** Used to check objects for own properties. */
1984
+ var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
1985
+
1986
+ /**
1987
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1988
+ *
1989
+ * @private
1990
+ * @param {Object} object The object to query.
1991
+ * @returns {Array} Returns the array of property names.
1992
+ */
1993
+ function baseKeys$2(object) {
1994
+ if (!isPrototype$1(object)) {
1995
+ return nativeKeys(object);
1996
+ }
1997
+ var result = [];
1998
+ for (var key in Object(object)) {
1999
+ if (hasOwnProperty$9.call(object, key) && key != 'constructor') {
2000
+ result.push(key);
2001
+ }
2002
+ }
2003
+ return result;
2004
+ }
2005
+
2006
+ var _baseKeys = baseKeys$2;
2007
+
2008
+ var isFunction$2 = isFunction_1$1,
2009
+ isLength$1 = isLength_1;
2010
+
2011
+ /**
2012
+ * Checks if `value` is array-like. A value is considered array-like if it's
2013
+ * not a function and has a `value.length` that's an integer greater than or
2014
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
2015
+ *
2016
+ * @static
2017
+ * @memberOf _
2018
+ * @since 4.0.0
2019
+ * @category Lang
2020
+ * @param {*} value The value to check.
2021
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
2022
+ * @example
2023
+ *
2024
+ * _.isArrayLike([1, 2, 3]);
2025
+ * // => true
2026
+ *
2027
+ * _.isArrayLike(document.body.children);
2028
+ * // => true
2029
+ *
2030
+ * _.isArrayLike('abc');
2031
+ * // => true
2032
+ *
2033
+ * _.isArrayLike(_.noop);
2034
+ * // => false
2035
+ */
2036
+ function isArrayLike$2(value) {
2037
+ return value != null && isLength$1(value.length) && !isFunction$2(value);
2038
+ }
2039
+
2040
+ var isArrayLike_1 = isArrayLike$2;
2041
+
2042
+ var arrayLikeKeys = _arrayLikeKeys,
2043
+ baseKeys$1 = _baseKeys,
2044
+ isArrayLike$1 = isArrayLike_1;
2045
+
2046
+ /**
2047
+ * Creates an array of the own enumerable property names of `object`.
2048
+ *
2049
+ * **Note:** Non-object values are coerced to objects. See the
2050
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
2051
+ * for more details.
2052
+ *
2053
+ * @static
2054
+ * @since 0.1.0
2055
+ * @memberOf _
2056
+ * @category Object
2057
+ * @param {Object} object The object to query.
2058
+ * @returns {Array} Returns the array of property names.
2059
+ * @example
2060
+ *
2061
+ * function Foo() {
2062
+ * this.a = 1;
2063
+ * this.b = 2;
2064
+ * }
2065
+ *
2066
+ * Foo.prototype.c = 3;
2067
+ *
2068
+ * _.keys(new Foo);
2069
+ * // => ['a', 'b'] (iteration order is not guaranteed)
2070
+ *
2071
+ * _.keys('hi');
2072
+ * // => ['0', '1']
2073
+ */
2074
+ function keys$1(object) {
2075
+ return isArrayLike$1(object) ? arrayLikeKeys(object) : baseKeys$1(object);
2076
+ }
2077
+
2078
+ var keys_1 = keys$1;
2079
+
2080
+ var baseGetAllKeys = _baseGetAllKeys,
2081
+ getSymbols = _getSymbols,
2082
+ keys = keys_1;
2083
+
2084
+ /**
2085
+ * Creates an array of own enumerable property names and symbols of `object`.
2086
+ *
2087
+ * @private
2088
+ * @param {Object} object The object to query.
2089
+ * @returns {Array} Returns the array of property names and symbols.
2090
+ */
2091
+ function getAllKeys$1(object) {
2092
+ return baseGetAllKeys(object, keys, getSymbols);
2093
+ }
2094
+
2095
+ var _getAllKeys = getAllKeys$1;
2096
+
2097
+ var getAllKeys = _getAllKeys;
2098
+
2099
+ /** Used to compose bitmasks for value comparisons. */
2100
+ var COMPARE_PARTIAL_FLAG$1 = 1;
2101
+
2102
+ /** Used for built-in method references. */
2103
+ var objectProto$9 = Object.prototype;
2104
+
2105
+ /** Used to check objects for own properties. */
2106
+ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
2107
+
2108
+ /**
2109
+ * A specialized version of `baseIsEqualDeep` for objects with support for
2110
+ * partial deep comparisons.
2111
+ *
2112
+ * @private
2113
+ * @param {Object} object The object to compare.
2114
+ * @param {Object} other The other object to compare.
2115
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2116
+ * @param {Function} customizer The function to customize comparisons.
2117
+ * @param {Function} equalFunc The function to determine equivalents of values.
2118
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
2119
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2120
+ */
2121
+ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
2122
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
2123
+ objProps = getAllKeys(object),
2124
+ objLength = objProps.length,
2125
+ othProps = getAllKeys(other),
2126
+ othLength = othProps.length;
2127
+
2128
+ if (objLength != othLength && !isPartial) {
2129
+ return false;
2130
+ }
2131
+ var index = objLength;
2132
+ while (index--) {
2133
+ var key = objProps[index];
2134
+ if (!(isPartial ? key in other : hasOwnProperty$8.call(other, key))) {
2135
+ return false;
2136
+ }
2137
+ }
2138
+ // Check that cyclic values are equal.
2139
+ var objStacked = stack.get(object);
2140
+ var othStacked = stack.get(other);
2141
+ if (objStacked && othStacked) {
2142
+ return objStacked == other && othStacked == object;
2143
+ }
2144
+ var result = true;
2145
+ stack.set(object, other);
2146
+ stack.set(other, object);
2147
+
2148
+ var skipCtor = isPartial;
2149
+ while (++index < objLength) {
2150
+ key = objProps[index];
2151
+ var objValue = object[key],
2152
+ othValue = other[key];
2153
+
2154
+ if (customizer) {
2155
+ var compared = isPartial
2156
+ ? customizer(othValue, objValue, key, other, object, stack)
2157
+ : customizer(objValue, othValue, key, object, other, stack);
2158
+ }
2159
+ // Recursively compare objects (susceptible to call stack limits).
2160
+ if (!(compared === undefined
2161
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
2162
+ : compared
2163
+ )) {
2164
+ result = false;
2165
+ break;
2166
+ }
2167
+ skipCtor || (skipCtor = key == 'constructor');
2168
+ }
2169
+ if (result && !skipCtor) {
2170
+ var objCtor = object.constructor,
2171
+ othCtor = other.constructor;
2172
+
2173
+ // Non `Object` object instances with different constructors are not equal.
2174
+ if (objCtor != othCtor &&
2175
+ ('constructor' in object && 'constructor' in other) &&
2176
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2177
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2178
+ result = false;
2179
+ }
2180
+ }
2181
+ stack['delete'](object);
2182
+ stack['delete'](other);
2183
+ return result;
2184
+ }
2185
+
2186
+ var _equalObjects = equalObjects$1;
2187
+
2188
+ var getNative$b = _getNative$1,
2189
+ root$b = _root$1;
2190
+
2191
+ /* Built-in method references that are verified to be native. */
2192
+ var DataView$3 = getNative$b(root$b, 'DataView');
2193
+
2194
+ var _DataView$1 = DataView$3;
2195
+
2196
+ var getNative$a = _getNative$1,
2197
+ root$a = _root$1;
2198
+
2199
+ /* Built-in method references that are verified to be native. */
2200
+ var Promise$4 = getNative$a(root$a, 'Promise');
2201
+
2202
+ var _Promise$1 = Promise$4;
2203
+
2204
+ var getNative$9 = _getNative$1,
2205
+ root$9 = _root$1;
2206
+
2207
+ /* Built-in method references that are verified to be native. */
2208
+ var Set$3 = getNative$9(root$9, 'Set');
2209
+
2210
+ var _Set$1 = Set$3;
2211
+
2212
+ var getNative$8 = _getNative$1,
2213
+ root$8 = _root$1;
2214
+
2215
+ /* Built-in method references that are verified to be native. */
2216
+ var WeakMap$3 = getNative$8(root$8, 'WeakMap');
2217
+
2218
+ var _WeakMap$1 = WeakMap$3;
2219
+
2220
+ var DataView$2 = _DataView$1,
2221
+ Map$3 = _Map$1,
2222
+ Promise$3 = _Promise$1,
2223
+ Set$2 = _Set$1,
2224
+ WeakMap$2 = _WeakMap$1,
2225
+ baseGetTag$5 = _baseGetTag$1,
2226
+ toSource$3 = _toSource$1;
2227
+
2228
+ /** `Object#toString` result references. */
2229
+ var mapTag$2 = '[object Map]',
2230
+ objectTag$2 = '[object Object]',
2231
+ promiseTag$1 = '[object Promise]',
2232
+ setTag$2 = '[object Set]',
2233
+ weakMapTag$1 = '[object WeakMap]';
2234
+
2235
+ var dataViewTag$1 = '[object DataView]';
2236
+
2237
+ /** Used to detect maps, sets, and weakmaps. */
2238
+ var dataViewCtorString$1 = toSource$3(DataView$2),
2239
+ mapCtorString$1 = toSource$3(Map$3),
2240
+ promiseCtorString$1 = toSource$3(Promise$3),
2241
+ setCtorString$1 = toSource$3(Set$2),
2242
+ weakMapCtorString$1 = toSource$3(WeakMap$2);
2243
+
2244
+ /**
2245
+ * Gets the `toStringTag` of `value`.
2246
+ *
2247
+ * @private
2248
+ * @param {*} value The value to query.
2249
+ * @returns {string} Returns the `toStringTag`.
2250
+ */
2251
+ var getTag$3 = baseGetTag$5;
2252
+
2253
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2254
+ if ((DataView$2 && getTag$3(new DataView$2(new ArrayBuffer(1))) != dataViewTag$1) ||
2255
+ (Map$3 && getTag$3(new Map$3) != mapTag$2) ||
2256
+ (Promise$3 && getTag$3(Promise$3.resolve()) != promiseTag$1) ||
2257
+ (Set$2 && getTag$3(new Set$2) != setTag$2) ||
2258
+ (WeakMap$2 && getTag$3(new WeakMap$2) != weakMapTag$1)) {
2259
+ getTag$3 = function(value) {
2260
+ var result = baseGetTag$5(value),
2261
+ Ctor = result == objectTag$2 ? value.constructor : undefined,
2262
+ ctorString = Ctor ? toSource$3(Ctor) : '';
2263
+
2264
+ if (ctorString) {
2265
+ switch (ctorString) {
2266
+ case dataViewCtorString$1: return dataViewTag$1;
2267
+ case mapCtorString$1: return mapTag$2;
2268
+ case promiseCtorString$1: return promiseTag$1;
2269
+ case setCtorString$1: return setTag$2;
2270
+ case weakMapCtorString$1: return weakMapTag$1;
2271
+ }
2272
+ }
2273
+ return result;
2274
+ };
2275
+ }
2276
+
2277
+ var _getTag = getTag$3;
2278
+
2279
+ var Stack = _Stack,
2280
+ equalArrays = _equalArrays,
2281
+ equalByTag = _equalByTag,
2282
+ equalObjects = _equalObjects,
2283
+ getTag$2 = _getTag,
2284
+ isArray$6 = isArray_1,
2285
+ isBuffer$2 = isBuffer$4.exports,
2286
+ isTypedArray$1 = isTypedArray_1;
2287
+
2288
+ /** Used to compose bitmasks for value comparisons. */
2289
+ var COMPARE_PARTIAL_FLAG = 1;
2290
+
2291
+ /** `Object#toString` result references. */
2292
+ var argsTag$1 = '[object Arguments]',
2293
+ arrayTag = '[object Array]',
2294
+ objectTag$1 = '[object Object]';
2295
+
2296
+ /** Used for built-in method references. */
2297
+ var objectProto$8 = Object.prototype;
2298
+
2299
+ /** Used to check objects for own properties. */
2300
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
2301
+
2302
+ /**
2303
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
2304
+ * deep comparisons and tracks traversed objects enabling objects with circular
2305
+ * references to be compared.
2306
+ *
2307
+ * @private
2308
+ * @param {Object} object The object to compare.
2309
+ * @param {Object} other The other object to compare.
2310
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2311
+ * @param {Function} customizer The function to customize comparisons.
2312
+ * @param {Function} equalFunc The function to determine equivalents of values.
2313
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
2314
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2315
+ */
2316
+ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
2317
+ var objIsArr = isArray$6(object),
2318
+ othIsArr = isArray$6(other),
2319
+ objTag = objIsArr ? arrayTag : getTag$2(object),
2320
+ othTag = othIsArr ? arrayTag : getTag$2(other);
2321
+
2322
+ objTag = objTag == argsTag$1 ? objectTag$1 : objTag;
2323
+ othTag = othTag == argsTag$1 ? objectTag$1 : othTag;
2324
+
2325
+ var objIsObj = objTag == objectTag$1,
2326
+ othIsObj = othTag == objectTag$1,
2327
+ isSameTag = objTag == othTag;
2328
+
2329
+ if (isSameTag && isBuffer$2(object)) {
2330
+ if (!isBuffer$2(other)) {
2331
+ return false;
2332
+ }
2333
+ objIsArr = true;
2334
+ objIsObj = false;
2335
+ }
2336
+ if (isSameTag && !objIsObj) {
2337
+ stack || (stack = new Stack);
2338
+ return (objIsArr || isTypedArray$1(object))
2339
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
2340
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
2341
+ }
2342
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
2343
+ var objIsWrapped = objIsObj && hasOwnProperty$7.call(object, '__wrapped__'),
2344
+ othIsWrapped = othIsObj && hasOwnProperty$7.call(other, '__wrapped__');
2345
+
2346
+ if (objIsWrapped || othIsWrapped) {
2347
+ var objUnwrapped = objIsWrapped ? object.value() : object,
2348
+ othUnwrapped = othIsWrapped ? other.value() : other;
2349
+
2350
+ stack || (stack = new Stack);
2351
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
2352
+ }
2353
+ }
2354
+ if (!isSameTag) {
2355
+ return false;
2356
+ }
2357
+ stack || (stack = new Stack);
2358
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
2359
+ }
2360
+
2361
+ var _baseIsEqualDeep = baseIsEqualDeep$1;
2362
+
2363
+ var baseIsEqualDeep = _baseIsEqualDeep,
2364
+ isObjectLike$4 = isObjectLike_1$1;
2365
+
2366
+ /**
2367
+ * The base implementation of `_.isEqual` which supports partial comparisons
2368
+ * and tracks traversed objects.
2369
+ *
2370
+ * @private
2371
+ * @param {*} value The value to compare.
2372
+ * @param {*} other The other value to compare.
2373
+ * @param {boolean} bitmask The bitmask flags.
2374
+ * 1 - Unordered comparison
2375
+ * 2 - Partial comparison
2376
+ * @param {Function} [customizer] The function to customize comparisons.
2377
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
2378
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2379
+ */
2380
+ function baseIsEqual$1(value, other, bitmask, customizer, stack) {
2381
+ if (value === other) {
2382
+ return true;
2383
+ }
2384
+ if (value == null || other == null || (!isObjectLike$4(value) && !isObjectLike$4(other))) {
2385
+ return value !== value && other !== other;
2386
+ }
2387
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack);
2388
+ }
2389
+
2390
+ var _baseIsEqual = baseIsEqual$1;
2391
+
2392
+ var baseIsEqual = _baseIsEqual;
2393
+
2394
+ /**
2395
+ * Performs a deep comparison between two values to determine if they are
2396
+ * equivalent.
2397
+ *
2398
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
2399
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
2400
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
2401
+ * by their own, not inherited, enumerable properties. Functions and DOM
2402
+ * nodes are compared by strict equality, i.e. `===`.
2403
+ *
2404
+ * @static
2405
+ * @memberOf _
2406
+ * @since 0.1.0
2407
+ * @category Lang
2408
+ * @param {*} value The value to compare.
2409
+ * @param {*} other The other value to compare.
2410
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2411
+ * @example
2412
+ *
2413
+ * var object = { 'a': 1 };
2414
+ * var other = { 'a': 1 };
2415
+ *
2416
+ * _.isEqual(object, other);
2417
+ * // => true
2418
+ *
2419
+ * object === other;
2420
+ * // => false
2421
+ */
2422
+ function isEqual(value, other) {
2423
+ return baseIsEqual(value, other);
2424
+ }
2425
+
2426
+ var isEqual_1 = isEqual;
2427
+
2428
+ var baseKeys = _baseKeys,
2429
+ getTag$1 = _getTag,
2430
+ isArguments$2 = isArguments_1,
2431
+ isArray$5 = isArray_1,
2432
+ isArrayLike = isArrayLike_1,
2433
+ isBuffer$1 = isBuffer$4.exports,
2434
+ isPrototype = _isPrototype,
2435
+ isTypedArray = isTypedArray_1;
2436
+
2437
+ /** `Object#toString` result references. */
2438
+ var mapTag$1 = '[object Map]',
2439
+ setTag$1 = '[object Set]';
2440
+
2441
+ /** Used for built-in method references. */
2442
+ var objectProto$7 = Object.prototype;
2443
+
2444
+ /** Used to check objects for own properties. */
2445
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
2446
+
2447
+ /**
2448
+ * Checks if `value` is an empty object, collection, map, or set.
2449
+ *
2450
+ * Objects are considered empty if they have no own enumerable string keyed
2451
+ * properties.
2452
+ *
2453
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
2454
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
2455
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
2456
+ *
2457
+ * @static
2458
+ * @memberOf _
2459
+ * @since 0.1.0
2460
+ * @category Lang
2461
+ * @param {*} value The value to check.
2462
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
2463
+ * @example
2464
+ *
2465
+ * _.isEmpty(null);
2466
+ * // => true
2467
+ *
2468
+ * _.isEmpty(true);
2469
+ * // => true
2470
+ *
2471
+ * _.isEmpty(1);
2472
+ * // => true
2473
+ *
2474
+ * _.isEmpty([1, 2, 3]);
2475
+ * // => false
2476
+ *
2477
+ * _.isEmpty({ 'a': 1 });
2478
+ * // => false
2479
+ */
2480
+ function isEmpty(value) {
2481
+ if (value == null) {
2482
+ return true;
2483
+ }
2484
+ if (isArrayLike(value) &&
2485
+ (isArray$5(value) || typeof value == 'string' || typeof value.splice == 'function' ||
2486
+ isBuffer$1(value) || isTypedArray(value) || isArguments$2(value))) {
2487
+ return !value.length;
2488
+ }
2489
+ var tag = getTag$1(value);
2490
+ if (tag == mapTag$1 || tag == setTag$1) {
2491
+ return !value.size;
2492
+ }
2493
+ if (isPrototype(value)) {
2494
+ return !baseKeys(value).length;
2495
+ }
2496
+ for (var key in value) {
2497
+ if (hasOwnProperty$6.call(value, key)) {
2498
+ return false;
2499
+ }
2500
+ }
2501
+ return true;
2502
+ }
2503
+
2504
+ var isEmpty_1 = isEmpty;
2505
+
2506
+ var baseGetTag$4 = _baseGetTag$1,
2507
+ isObjectLike$3 = isObjectLike_1$1;
2508
+
2509
+ /** `Object#toString` result references. */
2510
+ var symbolTag = '[object Symbol]';
2511
+
2512
+ /**
2513
+ * Checks if `value` is classified as a `Symbol` primitive or object.
2514
+ *
2515
+ * @static
2516
+ * @memberOf _
2517
+ * @since 4.0.0
2518
+ * @category Lang
2519
+ * @param {*} value The value to check.
2520
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2521
+ * @example
2522
+ *
2523
+ * _.isSymbol(Symbol.iterator);
2524
+ * // => true
2525
+ *
2526
+ * _.isSymbol('abc');
2527
+ * // => false
2528
+ */
2529
+ function isSymbol$3(value) {
2530
+ return typeof value == 'symbol' ||
2531
+ (isObjectLike$3(value) && baseGetTag$4(value) == symbolTag);
2532
+ }
2533
+
2534
+ var isSymbol_1 = isSymbol$3;
2535
+
2536
+ var isArray$4 = isArray_1,
2537
+ isSymbol$2 = isSymbol_1;
2538
+
2539
+ /** Used to match property names within property paths. */
2540
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2541
+ reIsPlainProp = /^\w*$/;
2542
+
2543
+ /**
2544
+ * Checks if `value` is a property name and not a property path.
2545
+ *
2546
+ * @private
2547
+ * @param {*} value The value to check.
2548
+ * @param {Object} [object] The object to query keys on.
2549
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2550
+ */
2551
+ function isKey$1(value, object) {
2552
+ if (isArray$4(value)) {
2553
+ return false;
2554
+ }
2555
+ var type = typeof value;
2556
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2557
+ value == null || isSymbol$2(value)) {
2558
+ return true;
2559
+ }
2560
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2561
+ (object != null && value in Object(object));
2562
+ }
2563
+
2564
+ var _isKey = isKey$1;
2565
+
2566
+ var MapCache$2 = _MapCache$1;
2567
+
2568
+ /** Error message constants. */
2569
+ var FUNC_ERROR_TEXT$1 = 'Expected a function';
2570
+
2571
+ /**
2572
+ * Creates a function that memoizes the result of `func`. If `resolver` is
2573
+ * provided, it determines the cache key for storing the result based on the
2574
+ * arguments provided to the memoized function. By default, the first argument
2575
+ * provided to the memoized function is used as the map cache key. The `func`
2576
+ * is invoked with the `this` binding of the memoized function.
2577
+ *
2578
+ * **Note:** The cache is exposed as the `cache` property on the memoized
2579
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
2580
+ * constructor with one whose instances implement the
2581
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2582
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
2583
+ *
2584
+ * @static
2585
+ * @memberOf _
2586
+ * @since 0.1.0
2587
+ * @category Function
2588
+ * @param {Function} func The function to have its output memoized.
2589
+ * @param {Function} [resolver] The function to resolve the cache key.
2590
+ * @returns {Function} Returns the new memoized function.
2591
+ * @example
2592
+ *
2593
+ * var object = { 'a': 1, 'b': 2 };
2594
+ * var other = { 'c': 3, 'd': 4 };
2595
+ *
2596
+ * var values = _.memoize(_.values);
2597
+ * values(object);
2598
+ * // => [1, 2]
2599
+ *
2600
+ * values(other);
2601
+ * // => [3, 4]
2602
+ *
2603
+ * object.a = 2;
2604
+ * values(object);
2605
+ * // => [1, 2]
2606
+ *
2607
+ * // Modify the result cache.
2608
+ * values.cache.set(object, ['a', 'b']);
2609
+ * values(object);
2610
+ * // => ['a', 'b']
2611
+ *
2612
+ * // Replace `_.memoize.Cache`.
2613
+ * _.memoize.Cache = WeakMap;
2614
+ */
2615
+ function memoize$3(func, resolver) {
2616
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
2617
+ throw new TypeError(FUNC_ERROR_TEXT$1);
2618
+ }
2619
+ var memoized = function() {
2620
+ var args = arguments,
2621
+ key = resolver ? resolver.apply(this, args) : args[0],
2622
+ cache = memoized.cache;
2623
+
2624
+ if (cache.has(key)) {
2625
+ return cache.get(key);
2626
+ }
2627
+ var result = func.apply(this, args);
2628
+ memoized.cache = cache.set(key, result) || cache;
2629
+ return result;
2630
+ };
2631
+ memoized.cache = new (memoize$3.Cache || MapCache$2);
2632
+ return memoized;
2633
+ }
2634
+
2635
+ // Expose `MapCache`.
2636
+ memoize$3.Cache = MapCache$2;
2637
+
2638
+ var memoize_1$1 = memoize$3;
2639
+
2640
+ var memoize$2 = memoize_1$1;
2641
+
2642
+ /** Used as the maximum memoize cache size. */
2643
+ var MAX_MEMOIZE_SIZE$1 = 500;
2644
+
2645
+ /**
2646
+ * A specialized version of `_.memoize` which clears the memoized function's
2647
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
2648
+ *
2649
+ * @private
2650
+ * @param {Function} func The function to have its output memoized.
2651
+ * @returns {Function} Returns the new memoized function.
2652
+ */
2653
+ function memoizeCapped$3(func) {
2654
+ var result = memoize$2(func, function(key) {
2655
+ if (cache.size === MAX_MEMOIZE_SIZE$1) {
2656
+ cache.clear();
2657
+ }
2658
+ return key;
2659
+ });
2660
+
2661
+ var cache = result.cache;
2662
+ return result;
2663
+ }
2664
+
2665
+ var _memoizeCapped$1 = memoizeCapped$3;
2666
+
2667
+ var memoizeCapped$2 = _memoizeCapped$1;
2668
+
2669
+ /** Used to match property names within property paths. */
2670
+ var rePropName$1 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2671
+
2672
+ /** Used to match backslashes in property paths. */
2673
+ var reEscapeChar$1 = /\\(\\)?/g;
2674
+
2675
+ /**
2676
+ * Converts `string` to a property path array.
2677
+ *
2678
+ * @private
2679
+ * @param {string} string The string to convert.
2680
+ * @returns {Array} Returns the property path array.
2681
+ */
2682
+ var stringToPath$1 = memoizeCapped$2(function(string) {
2683
+ var result = [];
2684
+ if (string.charCodeAt(0) === 46 /* . */) {
2685
+ result.push('');
2686
+ }
2687
+ string.replace(rePropName$1, function(match, number, quote, subString) {
2688
+ result.push(quote ? subString.replace(reEscapeChar$1, '$1') : (number || match));
2689
+ });
2690
+ return result;
2691
+ });
2692
+
2693
+ var _stringToPath = stringToPath$1;
2694
+
2695
+ /**
2696
+ * A specialized version of `_.map` for arrays without support for iteratee
2697
+ * shorthands.
2698
+ *
2699
+ * @private
2700
+ * @param {Array} [array] The array to iterate over.
2701
+ * @param {Function} iteratee The function invoked per iteration.
2702
+ * @returns {Array} Returns the new mapped array.
2703
+ */
2704
+
2705
+ function arrayMap$1(array, iteratee) {
2706
+ var index = -1,
2707
+ length = array == null ? 0 : array.length,
2708
+ result = Array(length);
2709
+
2710
+ while (++index < length) {
2711
+ result[index] = iteratee(array[index], index, array);
2712
+ }
2713
+ return result;
2714
+ }
2715
+
2716
+ var _arrayMap = arrayMap$1;
2717
+
2718
+ var Symbol$5 = _Symbol$1,
2719
+ arrayMap = _arrayMap,
2720
+ isArray$3 = isArray_1,
2721
+ isSymbol$1 = isSymbol_1;
2722
+
2723
+ /** Used as references for various `Number` constants. */
2724
+ var INFINITY$1 = 1 / 0;
2725
+
2726
+ /** Used to convert symbols to primitives and strings. */
2727
+ var symbolProto$1 = Symbol$5 ? Symbol$5.prototype : undefined,
2728
+ symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
2729
+
2730
+ /**
2731
+ * The base implementation of `_.toString` which doesn't convert nullish
2732
+ * values to empty strings.
2733
+ *
2734
+ * @private
2735
+ * @param {*} value The value to process.
2736
+ * @returns {string} Returns the string.
2737
+ */
2738
+ function baseToString$1(value) {
2739
+ // Exit early for strings to avoid a performance hit in some environments.
2740
+ if (typeof value == 'string') {
2741
+ return value;
2742
+ }
2743
+ if (isArray$3(value)) {
2744
+ // Recursively convert values (susceptible to call stack limits).
2745
+ return arrayMap(value, baseToString$1) + '';
2746
+ }
2747
+ if (isSymbol$1(value)) {
2748
+ return symbolToString ? symbolToString.call(value) : '';
2749
+ }
2750
+ var result = (value + '');
2751
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
2752
+ }
2753
+
2754
+ var _baseToString = baseToString$1;
2755
+
2756
+ var baseToString = _baseToString;
2757
+
2758
+ /**
2759
+ * Converts `value` to a string. An empty string is returned for `null`
2760
+ * and `undefined` values. The sign of `-0` is preserved.
2761
+ *
2762
+ * @static
2763
+ * @memberOf _
2764
+ * @since 4.0.0
2765
+ * @category Lang
2766
+ * @param {*} value The value to convert.
2767
+ * @returns {string} Returns the converted string.
2768
+ * @example
2769
+ *
2770
+ * _.toString(null);
2771
+ * // => ''
2772
+ *
2773
+ * _.toString(-0);
2774
+ * // => '-0'
2775
+ *
2776
+ * _.toString([1, 2, 3]);
2777
+ * // => '1,2,3'
2778
+ */
2779
+ function toString$1(value) {
2780
+ return value == null ? '' : baseToString(value);
2781
+ }
2782
+
2783
+ var toString_1 = toString$1;
2784
+
2785
+ var isArray$2 = isArray_1,
2786
+ isKey = _isKey,
2787
+ stringToPath = _stringToPath,
2788
+ toString = toString_1;
2789
+
2790
+ /**
2791
+ * Casts `value` to a path array if it's not one.
2792
+ *
2793
+ * @private
2794
+ * @param {*} value The value to inspect.
2795
+ * @param {Object} [object] The object to query keys on.
2796
+ * @returns {Array} Returns the cast property path array.
2797
+ */
2798
+ function castPath$4(value, object) {
2799
+ if (isArray$2(value)) {
2800
+ return value;
2801
+ }
2802
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
2803
+ }
2804
+
2805
+ var _castPath = castPath$4;
2806
+
2807
+ var isSymbol = isSymbol_1;
2808
+
2809
+ /** Used as references for various `Number` constants. */
2810
+ var INFINITY = 1 / 0;
2811
+
2812
+ /**
2813
+ * Converts `value` to a string key if it's not a string or symbol.
2814
+ *
2815
+ * @private
2816
+ * @param {*} value The value to inspect.
2817
+ * @returns {string|symbol} Returns the key.
2818
+ */
2819
+ function toKey$3(value) {
2820
+ if (typeof value == 'string' || isSymbol(value)) {
2821
+ return value;
2822
+ }
2823
+ var result = (value + '');
2824
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2825
+ }
2826
+
2827
+ var _toKey = toKey$3;
2828
+
2829
+ var castPath$3 = _castPath,
2830
+ toKey$2 = _toKey;
2831
+
2832
+ /**
2833
+ * The base implementation of `_.get` without support for default values.
2834
+ *
2835
+ * @private
2836
+ * @param {Object} object The object to query.
2837
+ * @param {Array|string} path The path of the property to get.
2838
+ * @returns {*} Returns the resolved value.
2839
+ */
2840
+ function baseGet$1(object, path) {
2841
+ path = castPath$3(path, object);
2842
+
2843
+ var index = 0,
2844
+ length = path.length;
2845
+
2846
+ while (object != null && index < length) {
2847
+ object = object[toKey$2(path[index++])];
2848
+ }
2849
+ return (index && index == length) ? object : undefined;
2850
+ }
2851
+
2852
+ var _baseGet = baseGet$1;
2853
+
2854
+ var getNative$7 = _getNative$1;
2855
+
2856
+ var defineProperty$2 = (function() {
2857
+ try {
2858
+ var func = getNative$7(Object, 'defineProperty');
2859
+ func({}, '', {});
2860
+ return func;
2861
+ } catch (e) {}
2862
+ }());
2863
+
2864
+ var _defineProperty = defineProperty$2;
2865
+
2866
+ var defineProperty$1 = _defineProperty;
2867
+
2868
+ /**
2869
+ * The base implementation of `assignValue` and `assignMergeValue` without
2870
+ * value checks.
2871
+ *
2872
+ * @private
2873
+ * @param {Object} object The object to modify.
2874
+ * @param {string} key The key of the property to assign.
2875
+ * @param {*} value The value to assign.
2876
+ */
2877
+ function baseAssignValue$1(object, key, value) {
2878
+ if (key == '__proto__' && defineProperty$1) {
2879
+ defineProperty$1(object, key, {
2880
+ 'configurable': true,
2881
+ 'enumerable': true,
2882
+ 'value': value,
2883
+ 'writable': true
2884
+ });
2885
+ } else {
2886
+ object[key] = value;
2887
+ }
2888
+ }
2889
+
2890
+ var _baseAssignValue = baseAssignValue$1;
2891
+
2892
+ var baseAssignValue = _baseAssignValue,
2893
+ eq$2 = eq_1$1;
2894
+
2895
+ /** Used for built-in method references. */
2896
+ var objectProto$6 = Object.prototype;
2897
+
2898
+ /** Used to check objects for own properties. */
2899
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
2900
+
2901
+ /**
2902
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
2903
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2904
+ * for equality comparisons.
2905
+ *
2906
+ * @private
2907
+ * @param {Object} object The object to modify.
2908
+ * @param {string} key The key of the property to assign.
2909
+ * @param {*} value The value to assign.
2910
+ */
2911
+ function assignValue$1(object, key, value) {
2912
+ var objValue = object[key];
2913
+ if (!(hasOwnProperty$5.call(object, key) && eq$2(objValue, value)) ||
2914
+ (value === undefined && !(key in object))) {
2915
+ baseAssignValue(object, key, value);
2916
+ }
2917
+ }
2918
+
2919
+ var _assignValue = assignValue$1;
2920
+
2921
+ var assignValue = _assignValue,
2922
+ castPath$2 = _castPath,
2923
+ isIndex$1 = _isIndex,
2924
+ isObject$3 = isObject_1$1,
2925
+ toKey$1 = _toKey;
2926
+
2927
+ /**
2928
+ * The base implementation of `_.set`.
2929
+ *
2930
+ * @private
2931
+ * @param {Object} object The object to modify.
2932
+ * @param {Array|string} path The path of the property to set.
2933
+ * @param {*} value The value to set.
2934
+ * @param {Function} [customizer] The function to customize path creation.
2935
+ * @returns {Object} Returns `object`.
2936
+ */
2937
+ function baseSet$1(object, path, value, customizer) {
2938
+ if (!isObject$3(object)) {
2939
+ return object;
2940
+ }
2941
+ path = castPath$2(path, object);
2942
+
2943
+ var index = -1,
2944
+ length = path.length,
2945
+ lastIndex = length - 1,
2946
+ nested = object;
2947
+
2948
+ while (nested != null && ++index < length) {
2949
+ var key = toKey$1(path[index]),
2950
+ newValue = value;
2951
+
2952
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
2953
+ return object;
2954
+ }
2955
+
2956
+ if (index != lastIndex) {
2957
+ var objValue = nested[key];
2958
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
2959
+ if (newValue === undefined) {
2960
+ newValue = isObject$3(objValue)
2961
+ ? objValue
2962
+ : (isIndex$1(path[index + 1]) ? [] : {});
2963
+ }
2964
+ }
2965
+ assignValue(nested, key, newValue);
2966
+ nested = nested[key];
2967
+ }
2968
+ return object;
2969
+ }
2970
+
2971
+ var _baseSet = baseSet$1;
2972
+
2973
+ var baseGet = _baseGet,
2974
+ baseSet = _baseSet,
2975
+ castPath$1 = _castPath;
2976
+
2977
+ /**
2978
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
2979
+ *
2980
+ * @private
2981
+ * @param {Object} object The source object.
2982
+ * @param {string[]} paths The property paths to pick.
2983
+ * @param {Function} predicate The function invoked per property.
2984
+ * @returns {Object} Returns the new object.
2985
+ */
2986
+ function basePickBy$1(object, paths, predicate) {
2987
+ var index = -1,
2988
+ length = paths.length,
2989
+ result = {};
2990
+
2991
+ while (++index < length) {
2992
+ var path = paths[index],
2993
+ value = baseGet(object, path);
2994
+
2995
+ if (predicate(value, path)) {
2996
+ baseSet(result, castPath$1(path, object), value);
2997
+ }
2998
+ }
2999
+ return result;
3000
+ }
3001
+
3002
+ var _basePickBy = basePickBy$1;
3003
+
3004
+ /**
3005
+ * The base implementation of `_.hasIn` without support for deep paths.
3006
+ *
3007
+ * @private
3008
+ * @param {Object} [object] The object to query.
3009
+ * @param {Array|string} key The key to check.
3010
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
3011
+ */
3012
+
3013
+ function baseHasIn$1(object, key) {
3014
+ return object != null && key in Object(object);
3015
+ }
3016
+
3017
+ var _baseHasIn = baseHasIn$1;
3018
+
3019
+ var castPath = _castPath,
3020
+ isArguments$1 = isArguments_1,
3021
+ isArray$1 = isArray_1,
3022
+ isIndex = _isIndex,
3023
+ isLength = isLength_1,
3024
+ toKey = _toKey;
3025
+
3026
+ /**
3027
+ * Checks if `path` exists on `object`.
3028
+ *
3029
+ * @private
3030
+ * @param {Object} object The object to query.
3031
+ * @param {Array|string} path The path to check.
3032
+ * @param {Function} hasFunc The function to check properties.
3033
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
3034
+ */
3035
+ function hasPath$1(object, path, hasFunc) {
3036
+ path = castPath(path, object);
3037
+
3038
+ var index = -1,
3039
+ length = path.length,
3040
+ result = false;
3041
+
3042
+ while (++index < length) {
3043
+ var key = toKey(path[index]);
3044
+ if (!(result = object != null && hasFunc(object, key))) {
3045
+ break;
3046
+ }
3047
+ object = object[key];
3048
+ }
3049
+ if (result || ++index != length) {
3050
+ return result;
3051
+ }
3052
+ length = object == null ? 0 : object.length;
3053
+ return !!length && isLength(length) && isIndex(key, length) &&
3054
+ (isArray$1(object) || isArguments$1(object));
3055
+ }
3056
+
3057
+ var _hasPath = hasPath$1;
3058
+
3059
+ var baseHasIn = _baseHasIn,
3060
+ hasPath = _hasPath;
3061
+
3062
+ /**
3063
+ * Checks if `path` is a direct or inherited property of `object`.
3064
+ *
3065
+ * @static
3066
+ * @memberOf _
3067
+ * @since 4.0.0
3068
+ * @category Object
3069
+ * @param {Object} object The object to query.
3070
+ * @param {Array|string} path The path to check.
3071
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
3072
+ * @example
3073
+ *
3074
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
3075
+ *
3076
+ * _.hasIn(object, 'a');
3077
+ * // => true
3078
+ *
3079
+ * _.hasIn(object, 'a.b');
3080
+ * // => true
3081
+ *
3082
+ * _.hasIn(object, ['a', 'b']);
3083
+ * // => true
3084
+ *
3085
+ * _.hasIn(object, 'b');
3086
+ * // => false
3087
+ */
3088
+ function hasIn$1(object, path) {
3089
+ return object != null && hasPath(object, path, baseHasIn);
3090
+ }
3091
+
3092
+ var hasIn_1 = hasIn$1;
3093
+
3094
+ var basePickBy = _basePickBy,
3095
+ hasIn = hasIn_1;
3096
+
3097
+ /**
3098
+ * The base implementation of `_.pick` without support for individual
3099
+ * property identifiers.
3100
+ *
3101
+ * @private
3102
+ * @param {Object} object The source object.
3103
+ * @param {string[]} paths The property paths to pick.
3104
+ * @returns {Object} Returns the new object.
3105
+ */
3106
+ function basePick$1(object, paths) {
3107
+ return basePickBy(object, paths, function(value, path) {
3108
+ return hasIn(object, path);
3109
+ });
3110
+ }
3111
+
3112
+ var _basePick = basePick$1;
3113
+
3114
+ var Symbol$4 = _Symbol$1,
3115
+ isArguments = isArguments_1,
3116
+ isArray = isArray_1;
3117
+
3118
+ /** Built-in value references. */
3119
+ var spreadableSymbol = Symbol$4 ? Symbol$4.isConcatSpreadable : undefined;
3120
+
3121
+ /**
3122
+ * Checks if `value` is a flattenable `arguments` object or array.
3123
+ *
3124
+ * @private
3125
+ * @param {*} value The value to check.
3126
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
3127
+ */
3128
+ function isFlattenable$1(value) {
3129
+ return isArray(value) || isArguments(value) ||
3130
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
3131
+ }
3132
+
3133
+ var _isFlattenable = isFlattenable$1;
3134
+
3135
+ var arrayPush = _arrayPush,
3136
+ isFlattenable = _isFlattenable;
3137
+
3138
+ /**
3139
+ * The base implementation of `_.flatten` with support for restricting flattening.
3140
+ *
3141
+ * @private
3142
+ * @param {Array} array The array to flatten.
3143
+ * @param {number} depth The maximum recursion depth.
3144
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
3145
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
3146
+ * @param {Array} [result=[]] The initial result value.
3147
+ * @returns {Array} Returns the new flattened array.
3148
+ */
3149
+ function baseFlatten$1(array, depth, predicate, isStrict, result) {
3150
+ var index = -1,
3151
+ length = array.length;
3152
+
3153
+ predicate || (predicate = isFlattenable);
3154
+ result || (result = []);
3155
+
3156
+ while (++index < length) {
3157
+ var value = array[index];
3158
+ if (depth > 0 && predicate(value)) {
3159
+ if (depth > 1) {
3160
+ // Recursively flatten arrays (susceptible to call stack limits).
3161
+ baseFlatten$1(value, depth - 1, predicate, isStrict, result);
3162
+ } else {
3163
+ arrayPush(result, value);
3164
+ }
3165
+ } else if (!isStrict) {
3166
+ result[result.length] = value;
3167
+ }
3168
+ }
3169
+ return result;
3170
+ }
3171
+
3172
+ var _baseFlatten = baseFlatten$1;
3173
+
3174
+ var baseFlatten = _baseFlatten;
3175
+
3176
+ /**
3177
+ * Flattens `array` a single level deep.
3178
+ *
3179
+ * @static
3180
+ * @memberOf _
3181
+ * @since 0.1.0
3182
+ * @category Array
3183
+ * @param {Array} array The array to flatten.
3184
+ * @returns {Array} Returns the new flattened array.
3185
+ * @example
3186
+ *
3187
+ * _.flatten([1, [2, [3, [4]], 5]]);
3188
+ * // => [1, 2, [3, [4]], 5]
3189
+ */
3190
+ function flatten$1(array) {
3191
+ var length = array == null ? 0 : array.length;
3192
+ return length ? baseFlatten(array, 1) : [];
3193
+ }
3194
+
3195
+ var flatten_1 = flatten$1;
3196
+
3197
+ /**
3198
+ * A faster alternative to `Function#apply`, this function invokes `func`
3199
+ * with the `this` binding of `thisArg` and the arguments of `args`.
3200
+ *
3201
+ * @private
3202
+ * @param {Function} func The function to invoke.
3203
+ * @param {*} thisArg The `this` binding of `func`.
3204
+ * @param {Array} args The arguments to invoke `func` with.
3205
+ * @returns {*} Returns the result of `func`.
3206
+ */
3207
+
3208
+ function apply$1(func, thisArg, args) {
3209
+ switch (args.length) {
3210
+ case 0: return func.call(thisArg);
3211
+ case 1: return func.call(thisArg, args[0]);
3212
+ case 2: return func.call(thisArg, args[0], args[1]);
3213
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
3214
+ }
3215
+ return func.apply(thisArg, args);
3216
+ }
3217
+
3218
+ var _apply = apply$1;
3219
+
3220
+ var apply = _apply;
3221
+
3222
+ /* Built-in method references for those with the same name as other `lodash` methods. */
3223
+ var nativeMax = Math.max;
3224
+
3225
+ /**
3226
+ * A specialized version of `baseRest` which transforms the rest array.
3227
+ *
3228
+ * @private
3229
+ * @param {Function} func The function to apply a rest parameter to.
3230
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
3231
+ * @param {Function} transform The rest array transform.
3232
+ * @returns {Function} Returns the new function.
3233
+ */
3234
+ function overRest$1(func, start, transform) {
3235
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
3236
+ return function() {
3237
+ var args = arguments,
3238
+ index = -1,
3239
+ length = nativeMax(args.length - start, 0),
3240
+ array = Array(length);
3241
+
3242
+ while (++index < length) {
3243
+ array[index] = args[start + index];
3244
+ }
3245
+ index = -1;
3246
+ var otherArgs = Array(start + 1);
3247
+ while (++index < start) {
3248
+ otherArgs[index] = args[index];
3249
+ }
3250
+ otherArgs[start] = transform(array);
3251
+ return apply(func, this, otherArgs);
3252
+ };
3253
+ }
3254
+
3255
+ var _overRest = overRest$1;
3256
+
3257
+ /**
3258
+ * Creates a function that returns `value`.
3259
+ *
3260
+ * @static
3261
+ * @memberOf _
3262
+ * @since 2.4.0
3263
+ * @category Util
3264
+ * @param {*} value The value to return from the new function.
3265
+ * @returns {Function} Returns the new constant function.
3266
+ * @example
3267
+ *
3268
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
3269
+ *
3270
+ * console.log(objects);
3271
+ * // => [{ 'a': 1 }, { 'a': 1 }]
3272
+ *
3273
+ * console.log(objects[0] === objects[1]);
3274
+ * // => true
3275
+ */
3276
+
3277
+ function constant$1(value) {
3278
+ return function() {
3279
+ return value;
3280
+ };
3281
+ }
3282
+
3283
+ var constant_1 = constant$1;
3284
+
3285
+ /**
3286
+ * This method returns the first argument it receives.
3287
+ *
3288
+ * @static
3289
+ * @since 0.1.0
3290
+ * @memberOf _
3291
+ * @category Util
3292
+ * @param {*} value Any value.
3293
+ * @returns {*} Returns `value`.
3294
+ * @example
3295
+ *
3296
+ * var object = { 'a': 1 };
3297
+ *
3298
+ * console.log(_.identity(object) === object);
3299
+ * // => true
3300
+ */
3301
+
3302
+ function identity$1(value) {
3303
+ return value;
3304
+ }
3305
+
3306
+ var identity_1 = identity$1;
3307
+
3308
+ var constant = constant_1,
3309
+ defineProperty = _defineProperty,
3310
+ identity = identity_1;
3311
+
3312
+ /**
3313
+ * The base implementation of `setToString` without support for hot loop shorting.
3314
+ *
3315
+ * @private
3316
+ * @param {Function} func The function to modify.
3317
+ * @param {Function} string The `toString` result.
3318
+ * @returns {Function} Returns `func`.
3319
+ */
3320
+ var baseSetToString$1 = !defineProperty ? identity : function(func, string) {
3321
+ return defineProperty(func, 'toString', {
3322
+ 'configurable': true,
3323
+ 'enumerable': false,
3324
+ 'value': constant(string),
3325
+ 'writable': true
3326
+ });
3327
+ };
3328
+
3329
+ var _baseSetToString = baseSetToString$1;
3330
+
3331
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
3332
+
3333
+ var HOT_COUNT = 800,
3334
+ HOT_SPAN = 16;
3335
+
3336
+ /* Built-in method references for those with the same name as other `lodash` methods. */
3337
+ var nativeNow = Date.now;
3338
+
3339
+ /**
3340
+ * Creates a function that'll short out and invoke `identity` instead
3341
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
3342
+ * milliseconds.
3343
+ *
3344
+ * @private
3345
+ * @param {Function} func The function to restrict.
3346
+ * @returns {Function} Returns the new shortable function.
3347
+ */
3348
+ function shortOut$1(func) {
3349
+ var count = 0,
3350
+ lastCalled = 0;
3351
+
3352
+ return function() {
3353
+ var stamp = nativeNow(),
3354
+ remaining = HOT_SPAN - (stamp - lastCalled);
3355
+
3356
+ lastCalled = stamp;
3357
+ if (remaining > 0) {
3358
+ if (++count >= HOT_COUNT) {
3359
+ return arguments[0];
3360
+ }
3361
+ } else {
3362
+ count = 0;
3363
+ }
3364
+ return func.apply(undefined, arguments);
3365
+ };
3366
+ }
3367
+
3368
+ var _shortOut = shortOut$1;
3369
+
3370
+ var baseSetToString = _baseSetToString,
3371
+ shortOut = _shortOut;
3372
+
3373
+ /**
3374
+ * Sets the `toString` method of `func` to return `string`.
3375
+ *
3376
+ * @private
3377
+ * @param {Function} func The function to modify.
3378
+ * @param {Function} string The `toString` result.
3379
+ * @returns {Function} Returns `func`.
3380
+ */
3381
+ var setToString$1 = shortOut(baseSetToString);
3382
+
3383
+ var _setToString = setToString$1;
3384
+
3385
+ var flatten = flatten_1,
3386
+ overRest = _overRest,
3387
+ setToString = _setToString;
3388
+
3389
+ /**
3390
+ * A specialized version of `baseRest` which flattens the rest array.
3391
+ *
3392
+ * @private
3393
+ * @param {Function} func The function to apply a rest parameter to.
3394
+ * @returns {Function} Returns the new function.
3395
+ */
3396
+ function flatRest$1(func) {
3397
+ return setToString(overRest(func, undefined, flatten), func + '');
3398
+ }
3399
+
3400
+ var _flatRest = flatRest$1;
3401
+
3402
+ var basePick = _basePick,
3403
+ flatRest = _flatRest;
3404
+
3405
+ /**
3406
+ * Creates an object composed of the picked `object` properties.
3407
+ *
3408
+ * @static
3409
+ * @since 0.1.0
3410
+ * @memberOf _
3411
+ * @category Object
3412
+ * @param {Object} object The source object.
3413
+ * @param {...(string|string[])} [paths] The property paths to pick.
3414
+ * @returns {Object} Returns the new object.
3415
+ * @example
3416
+ *
3417
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
3418
+ *
3419
+ * _.pick(object, ['a', 'c']);
3420
+ * // => { 'a': 1, 'c': 3 }
3421
+ */
3422
+ var pick = flatRest(function(object, paths) {
3423
+ return object == null ? {} : basePick(object, paths);
3424
+ });
3425
+
3426
+ var pick_1 = pick;
3427
+
3428
+ /**
3429
+ * NOTE: There's no functionality described for graphTitle,
3430
+ * rationale, scoringType, studentInstructions, teacherInstructions
3431
+ * so there's no implementation (they are only added in model)
3432
+ */
3433
+
3434
+ var defaults = {
3435
+ addCategoryEnabled: true,
3436
+ changeAddCategoryEnabled: false,
3437
+ changeEditableEnabled: false,
3438
+ changeInteractiveEnabled: false,
3439
+ chartType: 'lineCross',
3440
+ correctAnswer: {},
3441
+ data: [],
3442
+ domain: {},
3443
+ graph: { width: 480, height: 480 },
3444
+ prompt: '',
3445
+ promptEnabled: true,
3446
+ range: { label: '', max: 1, min: 0, labelStep: 1 },
3447
+ rationale: '',
3448
+ rationaleEnabled: true,
3449
+ scoringType: 'all or nothing',
3450
+ studentInstructionsEnabled: true,
3451
+ studentNewCategoryDefaultLabel: 'New Category',
3452
+ teacherInstructions: '',
3453
+ teacherInstructionsEnabled: true,
3454
+ title: '',
3455
+ };
3456
+
3457
+ const enabled = (config, env, defaultValue) => {
3458
+ // if model.partialScoring = false
3459
+ // - if env.partialScoring = false || env.partialScoring = true => use dichotomous scoring
3460
+ // else if model.partialScoring = true || undefined
3461
+ // - if env.partialScoring = false, use dichotomous scoring
3462
+ // - else if env.partialScoring = true, use partial scoring
3463
+ config = config || {};
3464
+ env = env || {};
3465
+
3466
+ if (config.partialScoring === false) {
3467
+ return false;
3468
+ }
3469
+
3470
+ if (env.partialScoring === false) {
3471
+ return false;
3472
+ }
3473
+
3474
+ return typeof defaultValue === 'boolean' ? defaultValue : true;
3475
+ };
3476
+
3477
+ /** Detect free variable `global` from Node.js. */
3478
+
3479
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
3480
+
3481
+ var _freeGlobal = freeGlobal$1;
3482
+
3483
+ var freeGlobal = _freeGlobal;
3484
+
3485
+ /** Detect free variable `self`. */
3486
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3487
+
3488
+ /** Used as a reference to the global object. */
3489
+ var root$7 = freeGlobal || freeSelf || Function('return this')();
3490
+
3491
+ var _root = root$7;
3492
+
3493
+ var root$6 = _root;
3494
+
3495
+ /** Built-in value references. */
3496
+ var Symbol$3 = root$6.Symbol;
3497
+
3498
+ var _Symbol = Symbol$3;
3499
+
3500
+ var Symbol$2 = _Symbol;
3501
+
3502
+ /** Used for built-in method references. */
3503
+ var objectProto$5 = Object.prototype;
3504
+
3505
+ /** Used to check objects for own properties. */
3506
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
3507
+
3508
+ /**
3509
+ * Used to resolve the
3510
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3511
+ * of values.
3512
+ */
3513
+ var nativeObjectToString$1 = objectProto$5.toString;
3514
+
3515
+ /** Built-in value references. */
3516
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
3517
+
3518
+ /**
3519
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3520
+ *
3521
+ * @private
3522
+ * @param {*} value The value to query.
3523
+ * @returns {string} Returns the raw `toStringTag`.
3524
+ */
3525
+ function getRawTag$1(value) {
3526
+ var isOwn = hasOwnProperty$4.call(value, symToStringTag$1),
3527
+ tag = value[symToStringTag$1];
3528
+
3529
+ try {
3530
+ value[symToStringTag$1] = undefined;
3531
+ var unmasked = true;
3532
+ } catch (e) {}
3533
+
3534
+ var result = nativeObjectToString$1.call(value);
3535
+ if (unmasked) {
3536
+ if (isOwn) {
3537
+ value[symToStringTag$1] = tag;
3538
+ } else {
3539
+ delete value[symToStringTag$1];
3540
+ }
3541
+ }
3542
+ return result;
3543
+ }
3544
+
3545
+ var _getRawTag = getRawTag$1;
3546
+
3547
+ /** Used for built-in method references. */
3548
+
3549
+ var objectProto$4 = Object.prototype;
3550
+
3551
+ /**
3552
+ * Used to resolve the
3553
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3554
+ * of values.
3555
+ */
3556
+ var nativeObjectToString = objectProto$4.toString;
3557
+
3558
+ /**
3559
+ * Converts `value` to a string using `Object.prototype.toString`.
3560
+ *
3561
+ * @private
3562
+ * @param {*} value The value to convert.
3563
+ * @returns {string} Returns the converted string.
3564
+ */
3565
+ function objectToString$1(value) {
3566
+ return nativeObjectToString.call(value);
3567
+ }
3568
+
3569
+ var _objectToString = objectToString$1;
3570
+
3571
+ var Symbol$1 = _Symbol,
3572
+ getRawTag = _getRawTag,
3573
+ objectToString = _objectToString;
3574
+
3575
+ /** `Object#toString` result references. */
3576
+ var nullTag = '[object Null]',
3577
+ undefinedTag = '[object Undefined]';
3578
+
3579
+ /** Built-in value references. */
3580
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
3581
+
3582
+ /**
3583
+ * The base implementation of `getTag` without fallbacks for buggy environments.
3584
+ *
3585
+ * @private
3586
+ * @param {*} value The value to query.
3587
+ * @returns {string} Returns the `toStringTag`.
3588
+ */
3589
+ function baseGetTag$3(value) {
3590
+ if (value == null) {
3591
+ return value === undefined ? undefinedTag : nullTag;
3592
+ }
3593
+ return (symToStringTag && symToStringTag in Object(value))
3594
+ ? getRawTag(value)
3595
+ : objectToString(value);
3596
+ }
3597
+
3598
+ var _baseGetTag = baseGetTag$3;
3599
+
3600
+ /**
3601
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3602
+ * and has a `typeof` result of "object".
3603
+ *
3604
+ * @static
3605
+ * @memberOf _
3606
+ * @since 4.0.0
3607
+ * @category Lang
3608
+ * @param {*} value The value to check.
3609
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3610
+ * @example
3611
+ *
3612
+ * _.isObjectLike({});
3613
+ * // => true
3614
+ *
3615
+ * _.isObjectLike([1, 2, 3]);
3616
+ * // => true
3617
+ *
3618
+ * _.isObjectLike(_.noop);
3619
+ * // => false
3620
+ *
3621
+ * _.isObjectLike(null);
3622
+ * // => false
3623
+ */
3624
+
3625
+ function isObjectLike$2(value) {
3626
+ return value != null && typeof value == 'object';
3627
+ }
3628
+
3629
+ var isObjectLike_1 = isObjectLike$2;
3630
+
3631
+ /**
3632
+ * Checks if `value` is the
3633
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
3634
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
3635
+ *
3636
+ * @static
3637
+ * @memberOf _
3638
+ * @since 0.1.0
3639
+ * @category Lang
3640
+ * @param {*} value The value to check.
3641
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
3642
+ * @example
3643
+ *
3644
+ * _.isObject({});
3645
+ * // => true
3646
+ *
3647
+ * _.isObject([1, 2, 3]);
3648
+ * // => true
3649
+ *
3650
+ * _.isObject(_.noop);
3651
+ * // => true
3652
+ *
3653
+ * _.isObject(null);
3654
+ * // => false
3655
+ */
3656
+
3657
+ function isObject$2(value) {
3658
+ var type = typeof value;
3659
+ return value != null && (type == 'object' || type == 'function');
3660
+ }
3661
+
3662
+ var isObject_1 = isObject$2;
3663
+
3664
+ var baseGetTag$2 = _baseGetTag,
3665
+ isObject$1 = isObject_1;
3666
+
3667
+ /** `Object#toString` result references. */
3668
+ var asyncTag = '[object AsyncFunction]',
3669
+ funcTag = '[object Function]',
3670
+ genTag = '[object GeneratorFunction]',
3671
+ proxyTag = '[object Proxy]';
3672
+
3673
+ /**
3674
+ * Checks if `value` is classified as a `Function` object.
3675
+ *
3676
+ * @static
3677
+ * @memberOf _
3678
+ * @since 0.1.0
3679
+ * @category Lang
3680
+ * @param {*} value The value to check.
3681
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
3682
+ * @example
3683
+ *
3684
+ * _.isFunction(_);
3685
+ * // => true
3686
+ *
3687
+ * _.isFunction(/abc/);
3688
+ * // => false
3689
+ */
3690
+ function isFunction$1(value) {
3691
+ if (!isObject$1(value)) {
3692
+ return false;
3693
+ }
3694
+ // The use of `Object#toString` avoids issues with the `typeof` operator
3695
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
3696
+ var tag = baseGetTag$2(value);
3697
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
3698
+ }
3699
+
3700
+ var isFunction_1 = isFunction$1;
3701
+
3702
+ var root$5 = _root;
3703
+
3704
+ /** Used to detect overreaching core-js shims. */
3705
+ var coreJsData$1 = root$5['__core-js_shared__'];
3706
+
3707
+ var _coreJsData = coreJsData$1;
3708
+
3709
+ var coreJsData = _coreJsData;
3710
+
3711
+ /** Used to detect methods masquerading as native. */
3712
+ var maskSrcKey = (function() {
3713
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
3714
+ return uid ? ('Symbol(src)_1.' + uid) : '';
3715
+ }());
3716
+
3717
+ /**
3718
+ * Checks if `func` has its source masked.
3719
+ *
3720
+ * @private
3721
+ * @param {Function} func The function to check.
3722
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
3723
+ */
3724
+ function isMasked$1(func) {
3725
+ return !!maskSrcKey && (maskSrcKey in func);
3726
+ }
3727
+
3728
+ var _isMasked = isMasked$1;
3729
+
3730
+ /** Used for built-in method references. */
3731
+
3732
+ var funcProto$1 = Function.prototype;
3733
+
3734
+ /** Used to resolve the decompiled source of functions. */
3735
+ var funcToString$1 = funcProto$1.toString;
3736
+
3737
+ /**
3738
+ * Converts `func` to its source code.
3739
+ *
3740
+ * @private
3741
+ * @param {Function} func The function to convert.
3742
+ * @returns {string} Returns the source code.
3743
+ */
3744
+ function toSource$2(func) {
3745
+ if (func != null) {
3746
+ try {
3747
+ return funcToString$1.call(func);
3748
+ } catch (e) {}
3749
+ try {
3750
+ return (func + '');
3751
+ } catch (e) {}
3752
+ }
3753
+ return '';
3754
+ }
3755
+
3756
+ var _toSource = toSource$2;
3757
+
3758
+ var isFunction = isFunction_1,
3759
+ isMasked = _isMasked,
3760
+ isObject = isObject_1,
3761
+ toSource$1 = _toSource;
3762
+
3763
+ /**
3764
+ * Used to match `RegExp`
3765
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
3766
+ */
3767
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
3768
+
3769
+ /** Used to detect host constructors (Safari). */
3770
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
3771
+
3772
+ /** Used for built-in method references. */
3773
+ var funcProto = Function.prototype,
3774
+ objectProto$3 = Object.prototype;
3775
+
3776
+ /** Used to resolve the decompiled source of functions. */
3777
+ var funcToString = funcProto.toString;
3778
+
3779
+ /** Used to check objects for own properties. */
3780
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
3781
+
3782
+ /** Used to detect if a method is native. */
3783
+ var reIsNative = RegExp('^' +
3784
+ funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\$&')
3785
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
3786
+ );
3787
+
3788
+ /**
3789
+ * The base implementation of `_.isNative` without bad shim checks.
3790
+ *
3791
+ * @private
3792
+ * @param {*} value The value to check.
3793
+ * @returns {boolean} Returns `true` if `value` is a native function,
3794
+ * else `false`.
3795
+ */
3796
+ function baseIsNative$1(value) {
3797
+ if (!isObject(value) || isMasked(value)) {
3798
+ return false;
3799
+ }
3800
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
3801
+ return pattern.test(toSource$1(value));
3802
+ }
3803
+
3804
+ var _baseIsNative = baseIsNative$1;
3805
+
3806
+ /**
3807
+ * Gets the value at `key` of `object`.
3808
+ *
3809
+ * @private
3810
+ * @param {Object} [object] The object to query.
3811
+ * @param {string} key The key of the property to get.
3812
+ * @returns {*} Returns the property value.
3813
+ */
3814
+
3815
+ function getValue$1(object, key) {
3816
+ return object == null ? undefined : object[key];
3817
+ }
3818
+
3819
+ var _getValue = getValue$1;
3820
+
3821
+ var baseIsNative = _baseIsNative,
3822
+ getValue = _getValue;
3823
+
3824
+ /**
3825
+ * Gets the native function at `key` of `object`.
3826
+ *
3827
+ * @private
3828
+ * @param {Object} object The object to query.
3829
+ * @param {string} key The key of the method to get.
3830
+ * @returns {*} Returns the function if it's native, else `undefined`.
3831
+ */
3832
+ function getNative$6(object, key) {
3833
+ var value = getValue(object, key);
3834
+ return baseIsNative(value) ? value : undefined;
3835
+ }
3836
+
3837
+ var _getNative = getNative$6;
3838
+
3839
+ var getNative$5 = _getNative;
3840
+
3841
+ /* Built-in method references that are verified to be native. */
3842
+ var nativeCreate$4 = getNative$5(Object, 'create');
3843
+
3844
+ var _nativeCreate = nativeCreate$4;
3845
+
3846
+ var nativeCreate$3 = _nativeCreate;
3847
+
3848
+ /**
3849
+ * Removes all key-value entries from the hash.
3850
+ *
3851
+ * @private
3852
+ * @name clear
3853
+ * @memberOf Hash
3854
+ */
3855
+ function hashClear$1() {
3856
+ this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
3857
+ this.size = 0;
3858
+ }
3859
+
3860
+ var _hashClear = hashClear$1;
3861
+
3862
+ /**
3863
+ * Removes `key` and its value from the hash.
3864
+ *
3865
+ * @private
3866
+ * @name delete
3867
+ * @memberOf Hash
3868
+ * @param {Object} hash The hash to modify.
3869
+ * @param {string} key The key of the value to remove.
3870
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3871
+ */
3872
+
3873
+ function hashDelete$1(key) {
3874
+ var result = this.has(key) && delete this.__data__[key];
3875
+ this.size -= result ? 1 : 0;
3876
+ return result;
3877
+ }
3878
+
3879
+ var _hashDelete = hashDelete$1;
3880
+
3881
+ var nativeCreate$2 = _nativeCreate;
3882
+
3883
+ /** Used to stand-in for `undefined` hash values. */
3884
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
3885
+
3886
+ /** Used for built-in method references. */
3887
+ var objectProto$2 = Object.prototype;
3888
+
3889
+ /** Used to check objects for own properties. */
3890
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
3891
+
3892
+ /**
3893
+ * Gets the hash value for `key`.
3894
+ *
3895
+ * @private
3896
+ * @name get
3897
+ * @memberOf Hash
3898
+ * @param {string} key The key of the value to get.
3899
+ * @returns {*} Returns the entry value.
3900
+ */
3901
+ function hashGet$1(key) {
3902
+ var data = this.__data__;
3903
+ if (nativeCreate$2) {
3904
+ var result = data[key];
3905
+ return result === HASH_UNDEFINED$1 ? undefined : result;
3906
+ }
3907
+ return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
3908
+ }
3909
+
3910
+ var _hashGet = hashGet$1;
3911
+
3912
+ var nativeCreate$1 = _nativeCreate;
3913
+
3914
+ /** Used for built-in method references. */
3915
+ var objectProto$1 = Object.prototype;
3916
+
3917
+ /** Used to check objects for own properties. */
3918
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
3919
+
3920
+ /**
3921
+ * Checks if a hash value for `key` exists.
3922
+ *
3923
+ * @private
3924
+ * @name has
3925
+ * @memberOf Hash
3926
+ * @param {string} key The key of the entry to check.
3927
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3928
+ */
3929
+ function hashHas$1(key) {
3930
+ var data = this.__data__;
3931
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
3932
+ }
3933
+
3934
+ var _hashHas = hashHas$1;
3935
+
3936
+ var nativeCreate = _nativeCreate;
3937
+
3938
+ /** Used to stand-in for `undefined` hash values. */
3939
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
3940
+
3941
+ /**
3942
+ * Sets the hash `key` to `value`.
3943
+ *
3944
+ * @private
3945
+ * @name set
3946
+ * @memberOf Hash
3947
+ * @param {string} key The key of the value to set.
3948
+ * @param {*} value The value to set.
3949
+ * @returns {Object} Returns the hash instance.
3950
+ */
3951
+ function hashSet$1(key, value) {
3952
+ var data = this.__data__;
3953
+ this.size += this.has(key) ? 0 : 1;
3954
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3955
+ return this;
3956
+ }
3957
+
3958
+ var _hashSet = hashSet$1;
3959
+
3960
+ var hashClear = _hashClear,
3961
+ hashDelete = _hashDelete,
3962
+ hashGet = _hashGet,
3963
+ hashHas = _hashHas,
3964
+ hashSet = _hashSet;
3965
+
3966
+ /**
3967
+ * Creates a hash object.
3968
+ *
3969
+ * @private
3970
+ * @constructor
3971
+ * @param {Array} [entries] The key-value pairs to cache.
3972
+ */
3973
+ function Hash$1(entries) {
3974
+ var index = -1,
3975
+ length = entries == null ? 0 : entries.length;
3976
+
3977
+ this.clear();
3978
+ while (++index < length) {
3979
+ var entry = entries[index];
3980
+ this.set(entry[0], entry[1]);
3981
+ }
3982
+ }
3983
+
3984
+ // Add methods to `Hash`.
3985
+ Hash$1.prototype.clear = hashClear;
3986
+ Hash$1.prototype['delete'] = hashDelete;
3987
+ Hash$1.prototype.get = hashGet;
3988
+ Hash$1.prototype.has = hashHas;
3989
+ Hash$1.prototype.set = hashSet;
3990
+
3991
+ var _Hash = Hash$1;
3992
+
3993
+ /**
3994
+ * Removes all key-value entries from the list cache.
3995
+ *
3996
+ * @private
3997
+ * @name clear
3998
+ * @memberOf ListCache
3999
+ */
4000
+
4001
+ function listCacheClear$1() {
4002
+ this.__data__ = [];
4003
+ this.size = 0;
4004
+ }
4005
+
4006
+ var _listCacheClear = listCacheClear$1;
4007
+
4008
+ /**
4009
+ * Performs a
4010
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4011
+ * comparison between two values to determine if they are equivalent.
4012
+ *
4013
+ * @static
4014
+ * @memberOf _
4015
+ * @since 4.0.0
4016
+ * @category Lang
4017
+ * @param {*} value The value to compare.
4018
+ * @param {*} other The other value to compare.
4019
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4020
+ * @example
4021
+ *
4022
+ * var object = { 'a': 1 };
4023
+ * var other = { 'a': 1 };
4024
+ *
4025
+ * _.eq(object, object);
4026
+ * // => true
4027
+ *
4028
+ * _.eq(object, other);
4029
+ * // => false
4030
+ *
4031
+ * _.eq('a', 'a');
4032
+ * // => true
4033
+ *
4034
+ * _.eq('a', Object('a'));
4035
+ * // => false
4036
+ *
4037
+ * _.eq(NaN, NaN);
4038
+ * // => true
4039
+ */
4040
+
4041
+ function eq$1(value, other) {
4042
+ return value === other || (value !== value && other !== other);
4043
+ }
4044
+
4045
+ var eq_1 = eq$1;
4046
+
4047
+ var eq = eq_1;
4048
+
4049
+ /**
4050
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
4051
+ *
4052
+ * @private
4053
+ * @param {Array} array The array to inspect.
4054
+ * @param {*} key The key to search for.
4055
+ * @returns {number} Returns the index of the matched value, else `-1`.
4056
+ */
4057
+ function assocIndexOf$4(array, key) {
4058
+ var length = array.length;
4059
+ while (length--) {
4060
+ if (eq(array[length][0], key)) {
4061
+ return length;
4062
+ }
4063
+ }
4064
+ return -1;
4065
+ }
4066
+
4067
+ var _assocIndexOf = assocIndexOf$4;
4068
+
4069
+ var assocIndexOf$3 = _assocIndexOf;
4070
+
4071
+ /** Used for built-in method references. */
4072
+ var arrayProto = Array.prototype;
4073
+
4074
+ /** Built-in value references. */
4075
+ var splice = arrayProto.splice;
4076
+
4077
+ /**
4078
+ * Removes `key` and its value from the list cache.
4079
+ *
4080
+ * @private
4081
+ * @name delete
4082
+ * @memberOf ListCache
4083
+ * @param {string} key The key of the value to remove.
4084
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4085
+ */
4086
+ function listCacheDelete$1(key) {
4087
+ var data = this.__data__,
4088
+ index = assocIndexOf$3(data, key);
4089
+
4090
+ if (index < 0) {
4091
+ return false;
4092
+ }
4093
+ var lastIndex = data.length - 1;
4094
+ if (index == lastIndex) {
4095
+ data.pop();
4096
+ } else {
4097
+ splice.call(data, index, 1);
4098
+ }
4099
+ --this.size;
4100
+ return true;
4101
+ }
4102
+
4103
+ var _listCacheDelete = listCacheDelete$1;
4104
+
4105
+ var assocIndexOf$2 = _assocIndexOf;
4106
+
4107
+ /**
4108
+ * Gets the list cache value for `key`.
4109
+ *
4110
+ * @private
4111
+ * @name get
4112
+ * @memberOf ListCache
4113
+ * @param {string} key The key of the value to get.
4114
+ * @returns {*} Returns the entry value.
4115
+ */
4116
+ function listCacheGet$1(key) {
4117
+ var data = this.__data__,
4118
+ index = assocIndexOf$2(data, key);
4119
+
4120
+ return index < 0 ? undefined : data[index][1];
4121
+ }
4122
+
4123
+ var _listCacheGet = listCacheGet$1;
4124
+
4125
+ var assocIndexOf$1 = _assocIndexOf;
4126
+
4127
+ /**
4128
+ * Checks if a list cache value for `key` exists.
4129
+ *
4130
+ * @private
4131
+ * @name has
4132
+ * @memberOf ListCache
4133
+ * @param {string} key The key of the entry to check.
4134
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4135
+ */
4136
+ function listCacheHas$1(key) {
4137
+ return assocIndexOf$1(this.__data__, key) > -1;
4138
+ }
4139
+
4140
+ var _listCacheHas = listCacheHas$1;
4141
+
4142
+ var assocIndexOf = _assocIndexOf;
4143
+
4144
+ /**
4145
+ * Sets the list cache `key` to `value`.
4146
+ *
4147
+ * @private
4148
+ * @name set
4149
+ * @memberOf ListCache
4150
+ * @param {string} key The key of the value to set.
4151
+ * @param {*} value The value to set.
4152
+ * @returns {Object} Returns the list cache instance.
4153
+ */
4154
+ function listCacheSet$1(key, value) {
4155
+ var data = this.__data__,
4156
+ index = assocIndexOf(data, key);
4157
+
4158
+ if (index < 0) {
4159
+ ++this.size;
4160
+ data.push([key, value]);
4161
+ } else {
4162
+ data[index][1] = value;
4163
+ }
4164
+ return this;
4165
+ }
4166
+
4167
+ var _listCacheSet = listCacheSet$1;
4168
+
4169
+ var listCacheClear = _listCacheClear,
4170
+ listCacheDelete = _listCacheDelete,
4171
+ listCacheGet = _listCacheGet,
4172
+ listCacheHas = _listCacheHas,
4173
+ listCacheSet = _listCacheSet;
4174
+
4175
+ /**
4176
+ * Creates an list cache object.
4177
+ *
4178
+ * @private
4179
+ * @constructor
4180
+ * @param {Array} [entries] The key-value pairs to cache.
4181
+ */
4182
+ function ListCache$1(entries) {
4183
+ var index = -1,
4184
+ length = entries == null ? 0 : entries.length;
4185
+
4186
+ this.clear();
4187
+ while (++index < length) {
4188
+ var entry = entries[index];
4189
+ this.set(entry[0], entry[1]);
4190
+ }
4191
+ }
4192
+
4193
+ // Add methods to `ListCache`.
4194
+ ListCache$1.prototype.clear = listCacheClear;
4195
+ ListCache$1.prototype['delete'] = listCacheDelete;
4196
+ ListCache$1.prototype.get = listCacheGet;
4197
+ ListCache$1.prototype.has = listCacheHas;
4198
+ ListCache$1.prototype.set = listCacheSet;
4199
+
4200
+ var _ListCache = ListCache$1;
4201
+
4202
+ var getNative$4 = _getNative,
4203
+ root$4 = _root;
4204
+
4205
+ /* Built-in method references that are verified to be native. */
4206
+ var Map$2 = getNative$4(root$4, 'Map');
4207
+
4208
+ var _Map = Map$2;
4209
+
4210
+ var Hash = _Hash,
4211
+ ListCache = _ListCache,
4212
+ Map$1 = _Map;
4213
+
4214
+ /**
4215
+ * Removes all key-value entries from the map.
4216
+ *
4217
+ * @private
4218
+ * @name clear
4219
+ * @memberOf MapCache
4220
+ */
4221
+ function mapCacheClear$1() {
4222
+ this.size = 0;
4223
+ this.__data__ = {
4224
+ 'hash': new Hash,
4225
+ 'map': new (Map$1 || ListCache),
4226
+ 'string': new Hash
4227
+ };
4228
+ }
4229
+
4230
+ var _mapCacheClear = mapCacheClear$1;
4231
+
4232
+ /**
4233
+ * Checks if `value` is suitable for use as unique object key.
4234
+ *
4235
+ * @private
4236
+ * @param {*} value The value to check.
4237
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
4238
+ */
4239
+
4240
+ function isKeyable$1(value) {
4241
+ var type = typeof value;
4242
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
4243
+ ? (value !== '__proto__')
4244
+ : (value === null);
4245
+ }
4246
+
4247
+ var _isKeyable = isKeyable$1;
4248
+
4249
+ var isKeyable = _isKeyable;
4250
+
4251
+ /**
4252
+ * Gets the data for `map`.
4253
+ *
4254
+ * @private
4255
+ * @param {Object} map The map to query.
4256
+ * @param {string} key The reference key.
4257
+ * @returns {*} Returns the map data.
4258
+ */
4259
+ function getMapData$4(map, key) {
4260
+ var data = map.__data__;
4261
+ return isKeyable(key)
4262
+ ? data[typeof key == 'string' ? 'string' : 'hash']
4263
+ : data.map;
4264
+ }
4265
+
4266
+ var _getMapData = getMapData$4;
4267
+
4268
+ var getMapData$3 = _getMapData;
4269
+
4270
+ /**
4271
+ * Removes `key` and its value from the map.
4272
+ *
4273
+ * @private
4274
+ * @name delete
4275
+ * @memberOf MapCache
4276
+ * @param {string} key The key of the value to remove.
4277
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4278
+ */
4279
+ function mapCacheDelete$1(key) {
4280
+ var result = getMapData$3(this, key)['delete'](key);
4281
+ this.size -= result ? 1 : 0;
4282
+ return result;
4283
+ }
4284
+
4285
+ var _mapCacheDelete = mapCacheDelete$1;
4286
+
4287
+ var getMapData$2 = _getMapData;
4288
+
4289
+ /**
4290
+ * Gets the map value for `key`.
4291
+ *
4292
+ * @private
4293
+ * @name get
4294
+ * @memberOf MapCache
4295
+ * @param {string} key The key of the value to get.
4296
+ * @returns {*} Returns the entry value.
4297
+ */
4298
+ function mapCacheGet$1(key) {
4299
+ return getMapData$2(this, key).get(key);
4300
+ }
4301
+
4302
+ var _mapCacheGet = mapCacheGet$1;
4303
+
4304
+ var getMapData$1 = _getMapData;
4305
+
4306
+ /**
4307
+ * Checks if a map value for `key` exists.
4308
+ *
4309
+ * @private
4310
+ * @name has
4311
+ * @memberOf MapCache
4312
+ * @param {string} key The key of the entry to check.
4313
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4314
+ */
4315
+ function mapCacheHas$1(key) {
4316
+ return getMapData$1(this, key).has(key);
4317
+ }
4318
+
4319
+ var _mapCacheHas = mapCacheHas$1;
4320
+
4321
+ var getMapData = _getMapData;
4322
+
4323
+ /**
4324
+ * Sets the map `key` to `value`.
4325
+ *
4326
+ * @private
4327
+ * @name set
4328
+ * @memberOf MapCache
4329
+ * @param {string} key The key of the value to set.
4330
+ * @param {*} value The value to set.
4331
+ * @returns {Object} Returns the map cache instance.
4332
+ */
4333
+ function mapCacheSet$1(key, value) {
4334
+ var data = getMapData(this, key),
4335
+ size = data.size;
4336
+
4337
+ data.set(key, value);
4338
+ this.size += data.size == size ? 0 : 1;
4339
+ return this;
4340
+ }
4341
+
4342
+ var _mapCacheSet = mapCacheSet$1;
4343
+
4344
+ var mapCacheClear = _mapCacheClear,
4345
+ mapCacheDelete = _mapCacheDelete,
4346
+ mapCacheGet = _mapCacheGet,
4347
+ mapCacheHas = _mapCacheHas,
4348
+ mapCacheSet = _mapCacheSet;
4349
+
4350
+ /**
4351
+ * Creates a map cache object to store key-value pairs.
4352
+ *
4353
+ * @private
4354
+ * @constructor
4355
+ * @param {Array} [entries] The key-value pairs to cache.
4356
+ */
4357
+ function MapCache$1(entries) {
4358
+ var index = -1,
4359
+ length = entries == null ? 0 : entries.length;
4360
+
4361
+ this.clear();
4362
+ while (++index < length) {
4363
+ var entry = entries[index];
4364
+ this.set(entry[0], entry[1]);
4365
+ }
4366
+ }
4367
+
4368
+ // Add methods to `MapCache`.
4369
+ MapCache$1.prototype.clear = mapCacheClear;
4370
+ MapCache$1.prototype['delete'] = mapCacheDelete;
4371
+ MapCache$1.prototype.get = mapCacheGet;
4372
+ MapCache$1.prototype.has = mapCacheHas;
4373
+ MapCache$1.prototype.set = mapCacheSet;
4374
+
4375
+ var _MapCache = MapCache$1;
4376
+
4377
+ var MapCache = _MapCache;
4378
+
4379
+ /** Error message constants. */
4380
+ var FUNC_ERROR_TEXT = 'Expected a function';
4381
+
4382
+ /**
4383
+ * Creates a function that memoizes the result of `func`. If `resolver` is
4384
+ * provided, it determines the cache key for storing the result based on the
4385
+ * arguments provided to the memoized function. By default, the first argument
4386
+ * provided to the memoized function is used as the map cache key. The `func`
4387
+ * is invoked with the `this` binding of the memoized function.
4388
+ *
4389
+ * **Note:** The cache is exposed as the `cache` property on the memoized
4390
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
4391
+ * constructor with one whose instances implement the
4392
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
4393
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
4394
+ *
4395
+ * @static
4396
+ * @memberOf _
4397
+ * @since 0.1.0
4398
+ * @category Function
4399
+ * @param {Function} func The function to have its output memoized.
4400
+ * @param {Function} [resolver] The function to resolve the cache key.
4401
+ * @returns {Function} Returns the new memoized function.
4402
+ * @example
4403
+ *
4404
+ * var object = { 'a': 1, 'b': 2 };
4405
+ * var other = { 'c': 3, 'd': 4 };
4406
+ *
4407
+ * var values = _.memoize(_.values);
4408
+ * values(object);
4409
+ * // => [1, 2]
4410
+ *
4411
+ * values(other);
4412
+ * // => [3, 4]
4413
+ *
4414
+ * object.a = 2;
4415
+ * values(object);
4416
+ * // => [1, 2]
4417
+ *
4418
+ * // Modify the result cache.
4419
+ * values.cache.set(object, ['a', 'b']);
4420
+ * values(object);
4421
+ * // => ['a', 'b']
4422
+ *
4423
+ * // Replace `_.memoize.Cache`.
4424
+ * _.memoize.Cache = WeakMap;
4425
+ */
4426
+ function memoize$1(func, resolver) {
4427
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
4428
+ throw new TypeError(FUNC_ERROR_TEXT);
4429
+ }
4430
+ var memoized = function() {
4431
+ var args = arguments,
4432
+ key = resolver ? resolver.apply(this, args) : args[0],
4433
+ cache = memoized.cache;
4434
+
4435
+ if (cache.has(key)) {
4436
+ return cache.get(key);
4437
+ }
4438
+ var result = func.apply(this, args);
4439
+ memoized.cache = cache.set(key, result) || cache;
4440
+ return result;
4441
+ };
4442
+ memoized.cache = new (memoize$1.Cache || MapCache);
4443
+ return memoized;
4444
+ }
4445
+
4446
+ // Expose `MapCache`.
4447
+ memoize$1.Cache = MapCache;
4448
+
4449
+ var memoize_1 = memoize$1;
4450
+
4451
+ var memoize = memoize_1;
4452
+
4453
+ /** Used as the maximum memoize cache size. */
4454
+ var MAX_MEMOIZE_SIZE = 500;
4455
+
4456
+ /**
4457
+ * A specialized version of `_.memoize` which clears the memoized function's
4458
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
4459
+ *
4460
+ * @private
4461
+ * @param {Function} func The function to have its output memoized.
4462
+ * @returns {Function} Returns the new memoized function.
4463
+ */
4464
+ function memoizeCapped$1(func) {
4465
+ var result = memoize(func, function(key) {
4466
+ if (cache.size === MAX_MEMOIZE_SIZE) {
4467
+ cache.clear();
4468
+ }
4469
+ return key;
4470
+ });
4471
+
4472
+ var cache = result.cache;
4473
+ return result;
4474
+ }
4475
+
4476
+ var _memoizeCapped = memoizeCapped$1;
4477
+
4478
+ var memoizeCapped = _memoizeCapped;
4479
+
4480
+ /** Used to match property names within property paths. */
4481
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
4482
+
4483
+ /** Used to match backslashes in property paths. */
4484
+ var reEscapeChar = /\\(\\)?/g;
4485
+
4486
+ /**
4487
+ * Converts `string` to a property path array.
4488
+ *
4489
+ * @private
4490
+ * @param {string} string The string to convert.
4491
+ * @returns {Array} Returns the property path array.
4492
+ */
4493
+ memoizeCapped(function(string) {
4494
+ var result = [];
4495
+ if (string.charCodeAt(0) === 46 /* . */) {
4496
+ result.push('');
4497
+ }
4498
+ string.replace(rePropName, function(match, number, quote, subString) {
4499
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
4500
+ });
4501
+ return result;
4502
+ });
4503
+
4504
+ var Symbol = _Symbol;
4505
+
4506
+ /** Used to convert symbols to primitives and strings. */
4507
+ var symbolProto = Symbol ? Symbol.prototype : undefined;
4508
+ symbolProto ? symbolProto.toString : undefined;
4509
+
4510
+ var baseGetTag$1 = _baseGetTag,
4511
+ isObjectLike$1 = isObjectLike_1;
4512
+
4513
+ /** `Object#toString` result references. */
4514
+ var argsTag = '[object Arguments]';
4515
+
4516
+ /**
4517
+ * The base implementation of `_.isArguments`.
4518
+ *
4519
+ * @private
4520
+ * @param {*} value The value to check.
4521
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4522
+ */
4523
+ function baseIsArguments$1(value) {
4524
+ return isObjectLike$1(value) && baseGetTag$1(value) == argsTag;
4525
+ }
4526
+
4527
+ var _baseIsArguments = baseIsArguments$1;
4528
+
4529
+ var baseIsArguments = _baseIsArguments,
4530
+ isObjectLike = isObjectLike_1;
4531
+
4532
+ /** Used for built-in method references. */
4533
+ var objectProto = Object.prototype;
4534
+
4535
+ /** Used to check objects for own properties. */
4536
+ var hasOwnProperty = objectProto.hasOwnProperty;
4537
+
4538
+ /** Built-in value references. */
4539
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
4540
+
4541
+ /**
4542
+ * Checks if `value` is likely an `arguments` object.
4543
+ *
4544
+ * @static
4545
+ * @memberOf _
4546
+ * @since 0.1.0
4547
+ * @category Lang
4548
+ * @param {*} value The value to check.
4549
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4550
+ * else `false`.
4551
+ * @example
4552
+ *
4553
+ * _.isArguments(function() { return arguments; }());
4554
+ * // => true
4555
+ *
4556
+ * _.isArguments([1, 2, 3]);
4557
+ * // => false
4558
+ */
4559
+ baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
4560
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
4561
+ !propertyIsEnumerable.call(value, 'callee');
4562
+ };
4563
+
4564
+ var isBuffer = {exports: {}};
4565
+
4566
+ /**
4567
+ * This method returns `false`.
4568
+ *
4569
+ * @static
4570
+ * @memberOf _
4571
+ * @since 4.13.0
4572
+ * @category Util
4573
+ * @returns {boolean} Returns `false`.
4574
+ * @example
4575
+ *
4576
+ * _.times(2, _.stubFalse);
4577
+ * // => [false, false]
4578
+ */
4579
+
4580
+ function stubFalse() {
4581
+ return false;
4582
+ }
4583
+
4584
+ var stubFalse_1 = stubFalse;
4585
+
4586
+ (function (module, exports) {
4587
+ var root = _root,
4588
+ stubFalse = stubFalse_1;
4589
+
4590
+ /** Detect free variable `exports`. */
4591
+ var freeExports = exports && !exports.nodeType && exports;
4592
+
4593
+ /** Detect free variable `module`. */
4594
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
4595
+
4596
+ /** Detect the popular CommonJS extension `module.exports`. */
4597
+ var moduleExports = freeModule && freeModule.exports === freeExports;
4598
+
4599
+ /** Built-in value references. */
4600
+ var Buffer = moduleExports ? root.Buffer : undefined;
4601
+
4602
+ /* Built-in method references for those with the same name as other `lodash` methods. */
4603
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
4604
+
4605
+ /**
4606
+ * Checks if `value` is a buffer.
4607
+ *
4608
+ * @static
4609
+ * @memberOf _
4610
+ * @since 4.3.0
4611
+ * @category Lang
4612
+ * @param {*} value The value to check.
4613
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
4614
+ * @example
4615
+ *
4616
+ * _.isBuffer(new Buffer(2));
4617
+ * // => true
4618
+ *
4619
+ * _.isBuffer(new Uint8Array(2));
4620
+ * // => false
4621
+ */
4622
+ var isBuffer = nativeIsBuffer || stubFalse;
4623
+
4624
+ module.exports = isBuffer;
4625
+ }(isBuffer, isBuffer.exports));
4626
+
4627
+ var _nodeUtil = {exports: {}};
4628
+
4629
+ (function (module, exports) {
4630
+ var freeGlobal = _freeGlobal;
4631
+
4632
+ /** Detect free variable `exports`. */
4633
+ var freeExports = exports && !exports.nodeType && exports;
4634
+
4635
+ /** Detect free variable `module`. */
4636
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
4637
+
4638
+ /** Detect the popular CommonJS extension `module.exports`. */
4639
+ var moduleExports = freeModule && freeModule.exports === freeExports;
4640
+
4641
+ /** Detect free variable `process` from Node.js. */
4642
+ var freeProcess = moduleExports && freeGlobal.process;
4643
+
4644
+ /** Used to access faster Node.js helpers. */
4645
+ var nodeUtil = (function() {
4646
+ try {
4647
+ // Use `util.types` for Node.js 10+.
4648
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
4649
+
4650
+ if (types) {
4651
+ return types;
4652
+ }
4653
+
4654
+ // Legacy `process.binding('util')` for Node.js < 10.
4655
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
4656
+ } catch (e) {}
4657
+ }());
4658
+
4659
+ module.exports = nodeUtil;
4660
+ }(_nodeUtil, _nodeUtil.exports));
4661
+
4662
+ var nodeUtil = _nodeUtil.exports;
4663
+
4664
+ /* Node.js helper references. */
4665
+ nodeUtil && nodeUtil.isTypedArray;
4666
+
4667
+ var getNative$3 = _getNative,
4668
+ root$3 = _root;
4669
+
4670
+ /* Built-in method references that are verified to be native. */
4671
+ var DataView$1 = getNative$3(root$3, 'DataView');
4672
+
4673
+ var _DataView = DataView$1;
4674
+
4675
+ var getNative$2 = _getNative,
4676
+ root$2 = _root;
4677
+
4678
+ /* Built-in method references that are verified to be native. */
4679
+ var Promise$2 = getNative$2(root$2, 'Promise');
4680
+
4681
+ var _Promise = Promise$2;
4682
+
4683
+ var getNative$1 = _getNative,
4684
+ root$1 = _root;
4685
+
4686
+ /* Built-in method references that are verified to be native. */
4687
+ var Set$1 = getNative$1(root$1, 'Set');
4688
+
4689
+ var _Set = Set$1;
4690
+
4691
+ var getNative = _getNative,
4692
+ root = _root;
4693
+
4694
+ /* Built-in method references that are verified to be native. */
4695
+ var WeakMap$1 = getNative(root, 'WeakMap');
4696
+
4697
+ var _WeakMap = WeakMap$1;
4698
+
4699
+ var DataView = _DataView,
4700
+ Map = _Map,
4701
+ Promise$1 = _Promise,
4702
+ Set = _Set,
4703
+ WeakMap = _WeakMap,
4704
+ baseGetTag = _baseGetTag,
4705
+ toSource = _toSource;
4706
+
4707
+ /** `Object#toString` result references. */
4708
+ var mapTag = '[object Map]',
4709
+ objectTag = '[object Object]',
4710
+ promiseTag = '[object Promise]',
4711
+ setTag = '[object Set]',
4712
+ weakMapTag = '[object WeakMap]';
4713
+
4714
+ var dataViewTag = '[object DataView]';
4715
+
4716
+ /** Used to detect maps, sets, and weakmaps. */
4717
+ var dataViewCtorString = toSource(DataView),
4718
+ mapCtorString = toSource(Map),
4719
+ promiseCtorString = toSource(Promise$1),
4720
+ setCtorString = toSource(Set),
4721
+ weakMapCtorString = toSource(WeakMap);
4722
+
4723
+ /**
4724
+ * Gets the `toStringTag` of `value`.
4725
+ *
4726
+ * @private
4727
+ * @param {*} value The value to query.
4728
+ * @returns {string} Returns the `toStringTag`.
4729
+ */
4730
+ var getTag = baseGetTag;
4731
+
4732
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
4733
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
4734
+ (Map && getTag(new Map) != mapTag) ||
4735
+ (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
4736
+ (Set && getTag(new Set) != setTag) ||
4737
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
4738
+ getTag = function(value) {
4739
+ var result = baseGetTag(value),
4740
+ Ctor = result == objectTag ? value.constructor : undefined,
4741
+ ctorString = Ctor ? toSource(Ctor) : '';
4742
+
4743
+ if (ctorString) {
4744
+ switch (ctorString) {
4745
+ case dataViewCtorString: return dataViewTag;
4746
+ case mapCtorString: return mapTag;
4747
+ case promiseCtorString: return promiseTag;
4748
+ case setCtorString: return setTag;
4749
+ case weakMapCtorString: return weakMapTag;
4750
+ }
4751
+ }
4752
+ return result;
4753
+ };
4754
+ }
4755
+
4756
+ // eslint-disable-next-line no-console
4757
+ const lg = (n) => console[n].bind(console, 'controller-utils:');
4758
+ lg('debug');
4759
+ lg('log');
4760
+ lg('warn');
4761
+ lg('error');
4762
+
4763
+ const lowerCase = (string) => (string || '').toLowerCase();
4764
+
4765
+ const checkLabelsEquality = (givenAnswerLabel, correctAnswerLabel) =>
4766
+ lowerCase(givenAnswerLabel) === lowerCase(correctAnswerLabel);
4767
+
4768
+ const setCorrectness = (answers, partialScoring) =>
4769
+ answers
4770
+ ? answers.map((answer) => ({
4771
+ ...answer,
4772
+ correctness: {
4773
+ value: partialScoring ? 'incorrect' : 'correct',
4774
+ label: partialScoring ? 'incorrect' : 'correct',
4775
+ },
4776
+ }))
4777
+ : [];
4778
+
4779
+ const normalize = (question) => ({ ...defaults, ...question });
4780
+
4781
+ const getScore = (question, session, env = {}) => {
4782
+ const { correctAnswer, data: initialData = [], scoringType } = question;
4783
+ let correctResponses = [];
4784
+
4785
+ const isPartialScoring = enabled(
4786
+ { partialScoring: scoringType !== undefined ? scoringType === 'partial scoring' : scoringType },
4787
+ env,
4788
+ );
4789
+
4790
+ const { data: correctAnswers = [] } = correctAnswer || {};
4791
+ const defaultAnswers = filterCategories(initialData);
4792
+
4793
+ let answers = setCorrectness((session && session.answer) || defaultAnswers, isPartialScoring);
4794
+
4795
+ let result = 0;
4796
+
4797
+ if (isPartialScoring) {
4798
+ // if score type is "partial scoring"
4799
+ // maxScore is calculated based on the correct response
4800
+ // score is calculated based on the given response
4801
+ let maxScore = 0;
4802
+ let score = 0;
4803
+
4804
+ const scoreForLabelAndValueEditable = (answer, corrAnswer) => {
4805
+ const { value, label, index } = answer;
4806
+ const valueIsCorrect = value === corrAnswer.value;
4807
+ const labelIsCorrect = checkLabelsEquality(label, corrAnswer.label);
4808
+ maxScore += 2;
4809
+
4810
+ if (valueIsCorrect) {
4811
+ score += 1;
4812
+ answer.correctness.value = 'correct';
4813
+ }
4814
+
4815
+ if (labelIsCorrect) {
4816
+ score += 1;
4817
+ answer.correctness.label = 'correct';
4818
+ }
4819
+
4820
+ if (valueIsCorrect && labelIsCorrect) {
4821
+ correctResponses.push({ label: label, index: index });
4822
+ }
4823
+ };
4824
+
4825
+ // if given answer has more categories than the correct answers, the "extra" will be ignored
4826
+ correctAnswers.forEach((corrAnswer, index) => {
4827
+ const defaultAnswer = defaultAnswers[index];
4828
+ const answer = answers[index];
4829
+
4830
+ // if there is a corresponding category at the same position in the given answer
4831
+ if (answer) {
4832
+ // if there is a corresponding category at the same position in the default answer
4833
+ if (defaultAnswer) {
4834
+ // if category's label (in default answer) was not editable
4835
+ // it means that this category values only one point (only the value can be changed)
4836
+ if (!defaultAnswer.editable && answer.interactive) {
4837
+ maxScore += 1;
4838
+
4839
+ if (answer.value === corrAnswer.value) {
4840
+ score += 1;
4841
+ answer.correctness.value = 'correct';
4842
+ correctResponses.push({ label: answer.label, index: index });
4843
+ }
4844
+ answer.correctness.label = 'correct';
4845
+
4846
+ // if category's label (in default answer) was editable
4847
+ // it means that this category values 2 points (both label and value can be changed)
4848
+ } else if (defaultAnswer.editable && answer.interactive) {
4849
+ scoreForLabelAndValueEditable(answer, corrAnswer);
4850
+ } else if (!answer.interactive) {
4851
+ answer.correctness.value = 'correct';
4852
+ answer.correctness.label = 'correct';
4853
+ correctResponses.push({ label: answer.label, index: index });
4854
+ }
4855
+ } else {
4856
+ // if there is not a corresponding category at the same position in the default answer
4857
+ scoreForLabelAndValueEditable(answer, corrAnswer);
4858
+ }
4859
+ } else {
4860
+ // if there is not a corresponding category at the same position in the given answer
4861
+ // it means that the given answer has less categories than the correct answer
4862
+ maxScore += 2;
4863
+ }
4864
+ });
4865
+
4866
+ result = maxScore ? score / maxScore : 0;
4867
+ } else {
4868
+ // all-or-nothing scoring: overall score is 1 only if lengths and all values/labels match
4869
+ result = correctAnswers.length === answers.length ? 1 : 0;
4870
+
4871
+ // regardless of overall result, mark each answer individually for user feedback
4872
+ answers = answers.map((answer, index) => {
4873
+ const correctAnswer = correctAnswers[index];
4874
+ const valueIsCorrect = correctAnswer ? answer.value === correctAnswer.value : false;
4875
+ const labelIsCorrect = correctAnswer ? lowerCase(answer.label) === lowerCase(correctAnswer.label) : false;
4876
+
4877
+ if (!valueIsCorrect || !labelIsCorrect) {
4878
+ result = 0;
4879
+ }
4880
+
4881
+ if (valueIsCorrect && labelIsCorrect) {
4882
+ correctResponses.push({ label: answer.label, index });
4883
+ }
4884
+
4885
+ return {
4886
+ ...answer,
4887
+ correctness: {
4888
+ value: valueIsCorrect ? 'correct' : 'incorrect',
4889
+ label: labelIsCorrect ? 'correct' : 'incorrect',
4890
+ },
4891
+ };
4892
+ });
4893
+ }
4894
+
4895
+ const score = {
4896
+ score: parseFloat(result.toFixed(2)),
4897
+ answers,
4898
+ };
4899
+
4900
+ if (env.extraProps && env.extraProps.correctResponseEnabled) {
4901
+ score.correctResponses = correctResponses;
4902
+ }
4903
+
4904
+ return score;
4905
+ };
4906
+
4907
+ // eslint-disable-next-line no-unused-vars
4908
+ const filterCategories = (categories) => (categories ? categories.map(({ deletable, ...rest }) => rest) : []);
4909
+
4910
+ function model(question, session, env) {
4911
+ return new Promise((resolve) => {
4912
+ const normalizedQuestion = normalize(question);
4913
+ const {
4914
+ addCategoryEnabled,
4915
+ chartType,
4916
+ data,
4917
+ domain,
4918
+ graph,
4919
+ prompt,
4920
+ promptEnabled,
4921
+ range,
4922
+ rationale,
4923
+ title,
4924
+ rationaleEnabled,
4925
+ teacherInstructions,
4926
+ teacherInstructionsEnabled,
4927
+ correctAnswer,
4928
+ scoringType,
4929
+ studentNewCategoryDefaultLabel,
4930
+ language,
4931
+ extraCSSRules,
4932
+ } = normalizedQuestion;
4933
+
4934
+ const correctInfo = { correctness: 'incorrect', score: '0%' };
4935
+
4936
+ const base = {
4937
+ addCategoryEnabled,
4938
+ chartType,
4939
+ data: filterCategories(data),
4940
+ domain,
4941
+ graph,
4942
+ prompt: promptEnabled ? prompt : null,
4943
+ range,
4944
+ rationale,
4945
+ title,
4946
+ size: graph,
4947
+ showToggle: false,
4948
+ correctness: correctInfo,
4949
+ disabled: env.mode !== 'gather',
4950
+ scoringType,
4951
+ studentNewCategoryDefaultLabel,
4952
+ language,
4953
+ env,
4954
+ extraCSSRules,
4955
+ };
4956
+
4957
+ const scoreObject = getScore(normalizedQuestion, session, env);
4958
+ const answers = filterCategories(scoreObject.answers);
4959
+
4960
+ if (env.mode === 'view') {
4961
+ // eslint-disable-next-line no-unused-vars
4962
+ base.correctedAnswer = answers.map(({ correctness, ...rest }) => {
4963
+ return { ...rest, interactive: false };
4964
+ });
4965
+
4966
+ base.addCategoryEnabled = false;
4967
+ }
4968
+
4969
+ if (env.mode === 'evaluate') {
4970
+ base.correctedAnswer = answers;
4971
+ base.correctAnswer = correctAnswer;
4972
+ base.showToggle = !!correctAnswer?.data?.length && scoreObject.score !== 1;
4973
+ base.addCategoryEnabled = false;
4974
+ base.showKeyLegend = true;
4975
+ }
4976
+
4977
+ if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
4978
+ base.rationale = rationaleEnabled ? rationale : null;
4979
+ base.teacherInstructions = teacherInstructionsEnabled ? teacherInstructions : null;
4980
+ } else {
4981
+ base.rationale = null;
4982
+ base.teacherInstructions = null;
4983
+ }
4984
+ resolve(base);
4985
+ });
4986
+ }
4987
+
4988
+ function outcome(model, session, env) {
4989
+ return new Promise((resolve) => {
4990
+ const scoreObject = getScore(model, session, env);
4991
+ const result = {
4992
+ score: scoreObject.score,
4993
+ empty: !session || isEmpty_1(session),
4994
+ };
4995
+ if (env.extraProps && env.extraProps.correctResponseEnabled) {
4996
+ result.extraProps = { correctResponse: scoreObject.correctResponses };
4997
+ }
4998
+ resolve(result);
4999
+ });
5000
+ }
5001
+
5002
+ const createCorrectResponseSession = (question, env) => {
5003
+ return new Promise((resolve) => {
5004
+ if (env.mode !== 'evaluate' && env.role === 'instructor') {
5005
+ const { correctAnswer } = question;
5006
+
5007
+ let answers = correctAnswer && correctAnswer.data;
5008
+
5009
+ // for IBX preview mode
5010
+ if (env.mode === 'gather') {
5011
+ const { data } = question;
5012
+
5013
+ answers = ((correctAnswer && correctAnswer.data) || []).map((answer, index) => {
5014
+ return {
5015
+ ...data[index],
5016
+ ...answer,
5017
+ };
5018
+ });
5019
+ }
5020
+
5021
+ resolve({
5022
+ answer: answers,
5023
+ id: '1',
5024
+ });
5025
+ } else {
5026
+ return resolve(null);
5027
+ }
5028
+ });
5029
+ };
5030
+
5031
+ // remove all html tags
5032
+ const getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');
5033
+
5034
+ // remove all html tags except img, iframe and source tag for audio
5035
+ const getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
5036
+
5037
+ const validate = (model = {}, config = {}) => {
5038
+ const { correctAnswer, data } = model || {};
5039
+ const { data: correctData } = correctAnswer || {};
5040
+ const categories = correctData || [];
5041
+
5042
+ const errors = {};
5043
+ const correctAnswerErrors = {};
5044
+ const categoryErrors = {};
5045
+
5046
+ ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {
5047
+ if (config[field]?.required && !getContent(model[field])) {
5048
+ errors[field] = 'This field is required.';
5049
+ }
5050
+ });
5051
+
5052
+ categories.forEach((category, index) => {
5053
+ const { label } = category;
5054
+
5055
+ if (!getInnerText(label)) {
5056
+ categoryErrors[index] = 'Content should not be empty. ';
5057
+ } else {
5058
+ const identicalAnswer = categories.some((c, i) => c.label === label && index !== i);
5059
+
5060
+ if (identicalAnswer) {
5061
+ categoryErrors[index] = 'Category names should be unique. ';
5062
+ }
5063
+ }
5064
+ });
5065
+
5066
+ if (categories.length < 1 || categories.length > 20) {
5067
+ correctAnswerErrors.categoriesError = 'The correct answer should include between 1 and 20 categories.';
5068
+ } else if (
5069
+ isEqual_1(
5070
+ data.map((category) => pick_1(category, 'value', 'label')),
5071
+ correctData.map((category) => pick_1(category, 'value', 'label')),
5072
+ )
5073
+ ) {
5074
+ correctAnswerErrors.identicalError = 'Correct answer should not be identical to the chart’s initial state';
5075
+ }
5076
+
5077
+ if (!isEmpty_1(categoryErrors)) {
5078
+ errors.categoryErrors = categoryErrors;
5079
+ }
5080
+
5081
+ if (!isEmpty_1(correctAnswerErrors)) {
5082
+ errors.correctAnswerErrors = correctAnswerErrors;
5083
+ }
5084
+
5085
+ return errors;
5086
+ };
5087
+
5088
+ export { checkLabelsEquality, createCorrectResponseSession, filterCategories, getScore, model, normalize, outcome, setCorrectness, validate };