unika-components 1.0.0

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,3688 @@
1
+ import { computed, defineComponent, openBlock, createBlock, resolveDynamicComponent, withModifiers, normalizeStyle, withCtx, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, normalizeProps, guardReactiveProps } from 'vue';
2
+
3
+ /** Detect free variable `global` from Node.js. */
4
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
5
+
6
+ var freeGlobal$1 = freeGlobal;
7
+
8
+ /** Detect free variable `self`. */
9
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
10
+
11
+ /** Used as a reference to the global object. */
12
+ var root = freeGlobal$1 || freeSelf || Function('return this')();
13
+
14
+ var root$1 = root;
15
+
16
+ /** Built-in value references. */
17
+ var Symbol = root$1.Symbol;
18
+
19
+ var Symbol$1 = Symbol;
20
+
21
+ /** Used for built-in method references. */
22
+ var objectProto$c = Object.prototype;
23
+
24
+ /** Used to check objects for own properties. */
25
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
26
+
27
+ /**
28
+ * Used to resolve the
29
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
30
+ * of values.
31
+ */
32
+ var nativeObjectToString$1 = objectProto$c.toString;
33
+
34
+ /** Built-in value references. */
35
+ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
36
+
37
+ /**
38
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
39
+ *
40
+ * @private
41
+ * @param {*} value The value to query.
42
+ * @returns {string} Returns the raw `toStringTag`.
43
+ */
44
+ function getRawTag(value) {
45
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
46
+ tag = value[symToStringTag$1];
47
+
48
+ try {
49
+ value[symToStringTag$1] = undefined;
50
+ var unmasked = true;
51
+ } catch (e) {}
52
+
53
+ var result = nativeObjectToString$1.call(value);
54
+ if (unmasked) {
55
+ if (isOwn) {
56
+ value[symToStringTag$1] = tag;
57
+ } else {
58
+ delete value[symToStringTag$1];
59
+ }
60
+ }
61
+ return result;
62
+ }
63
+
64
+ /** Used for built-in method references. */
65
+ var objectProto$b = Object.prototype;
66
+
67
+ /**
68
+ * Used to resolve the
69
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
70
+ * of values.
71
+ */
72
+ var nativeObjectToString = objectProto$b.toString;
73
+
74
+ /**
75
+ * Converts `value` to a string using `Object.prototype.toString`.
76
+ *
77
+ * @private
78
+ * @param {*} value The value to convert.
79
+ * @returns {string} Returns the converted string.
80
+ */
81
+ function objectToString(value) {
82
+ return nativeObjectToString.call(value);
83
+ }
84
+
85
+ /** `Object#toString` result references. */
86
+ var nullTag = '[object Null]',
87
+ undefinedTag = '[object Undefined]';
88
+
89
+ /** Built-in value references. */
90
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
91
+
92
+ /**
93
+ * The base implementation of `getTag` without fallbacks for buggy environments.
94
+ *
95
+ * @private
96
+ * @param {*} value The value to query.
97
+ * @returns {string} Returns the `toStringTag`.
98
+ */
99
+ function baseGetTag(value) {
100
+ if (value == null) {
101
+ return value === undefined ? undefinedTag : nullTag;
102
+ }
103
+ return (symToStringTag && symToStringTag in Object(value))
104
+ ? getRawTag(value)
105
+ : objectToString(value);
106
+ }
107
+
108
+ /**
109
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
110
+ * and has a `typeof` result of "object".
111
+ *
112
+ * @static
113
+ * @memberOf _
114
+ * @since 4.0.0
115
+ * @category Lang
116
+ * @param {*} value The value to check.
117
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
118
+ * @example
119
+ *
120
+ * _.isObjectLike({});
121
+ * // => true
122
+ *
123
+ * _.isObjectLike([1, 2, 3]);
124
+ * // => true
125
+ *
126
+ * _.isObjectLike(_.noop);
127
+ * // => false
128
+ *
129
+ * _.isObjectLike(null);
130
+ * // => false
131
+ */
132
+ function isObjectLike(value) {
133
+ return value != null && typeof value == 'object';
134
+ }
135
+
136
+ /** `Object#toString` result references. */
137
+ var symbolTag$1 = '[object Symbol]';
138
+
139
+ /**
140
+ * Checks if `value` is classified as a `Symbol` primitive or object.
141
+ *
142
+ * @static
143
+ * @memberOf _
144
+ * @since 4.0.0
145
+ * @category Lang
146
+ * @param {*} value The value to check.
147
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
148
+ * @example
149
+ *
150
+ * _.isSymbol(Symbol.iterator);
151
+ * // => true
152
+ *
153
+ * _.isSymbol('abc');
154
+ * // => false
155
+ */
156
+ function isSymbol(value) {
157
+ return typeof value == 'symbol' ||
158
+ (isObjectLike(value) && baseGetTag(value) == symbolTag$1);
159
+ }
160
+
161
+ /**
162
+ * A specialized version of `_.map` for arrays without support for iteratee
163
+ * shorthands.
164
+ *
165
+ * @private
166
+ * @param {Array} [array] The array to iterate over.
167
+ * @param {Function} iteratee The function invoked per iteration.
168
+ * @returns {Array} Returns the new mapped array.
169
+ */
170
+ function arrayMap(array, iteratee) {
171
+ var index = -1,
172
+ length = array == null ? 0 : array.length,
173
+ result = Array(length);
174
+
175
+ while (++index < length) {
176
+ result[index] = iteratee(array[index], index, array);
177
+ }
178
+ return result;
179
+ }
180
+
181
+ /**
182
+ * Checks if `value` is classified as an `Array` object.
183
+ *
184
+ * @static
185
+ * @memberOf _
186
+ * @since 0.1.0
187
+ * @category Lang
188
+ * @param {*} value The value to check.
189
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
190
+ * @example
191
+ *
192
+ * _.isArray([1, 2, 3]);
193
+ * // => true
194
+ *
195
+ * _.isArray(document.body.children);
196
+ * // => false
197
+ *
198
+ * _.isArray('abc');
199
+ * // => false
200
+ *
201
+ * _.isArray(_.noop);
202
+ * // => false
203
+ */
204
+ var isArray = Array.isArray;
205
+
206
+ var isArray$1 = isArray;
207
+
208
+ /** Used as references for various `Number` constants. */
209
+ var INFINITY$1 = 1 / 0;
210
+
211
+ /** Used to convert symbols to primitives and strings. */
212
+ var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : undefined,
213
+ symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
214
+
215
+ /**
216
+ * The base implementation of `_.toString` which doesn't convert nullish
217
+ * values to empty strings.
218
+ *
219
+ * @private
220
+ * @param {*} value The value to process.
221
+ * @returns {string} Returns the string.
222
+ */
223
+ function baseToString(value) {
224
+ // Exit early for strings to avoid a performance hit in some environments.
225
+ if (typeof value == 'string') {
226
+ return value;
227
+ }
228
+ if (isArray$1(value)) {
229
+ // Recursively convert values (susceptible to call stack limits).
230
+ return arrayMap(value, baseToString) + '';
231
+ }
232
+ if (isSymbol(value)) {
233
+ return symbolToString ? symbolToString.call(value) : '';
234
+ }
235
+ var result = (value + '');
236
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
237
+ }
238
+
239
+ /**
240
+ * Checks if `value` is the
241
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
242
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
243
+ *
244
+ * @static
245
+ * @memberOf _
246
+ * @since 0.1.0
247
+ * @category Lang
248
+ * @param {*} value The value to check.
249
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
250
+ * @example
251
+ *
252
+ * _.isObject({});
253
+ * // => true
254
+ *
255
+ * _.isObject([1, 2, 3]);
256
+ * // => true
257
+ *
258
+ * _.isObject(_.noop);
259
+ * // => true
260
+ *
261
+ * _.isObject(null);
262
+ * // => false
263
+ */
264
+ function isObject(value) {
265
+ var type = typeof value;
266
+ return value != null && (type == 'object' || type == 'function');
267
+ }
268
+
269
+ /**
270
+ * This method returns the first argument it receives.
271
+ *
272
+ * @static
273
+ * @since 0.1.0
274
+ * @memberOf _
275
+ * @category Util
276
+ * @param {*} value Any value.
277
+ * @returns {*} Returns `value`.
278
+ * @example
279
+ *
280
+ * var object = { 'a': 1 };
281
+ *
282
+ * console.log(_.identity(object) === object);
283
+ * // => true
284
+ */
285
+ function identity(value) {
286
+ return value;
287
+ }
288
+
289
+ /** `Object#toString` result references. */
290
+ var asyncTag = '[object AsyncFunction]',
291
+ funcTag$1 = '[object Function]',
292
+ genTag = '[object GeneratorFunction]',
293
+ proxyTag = '[object Proxy]';
294
+
295
+ /**
296
+ * Checks if `value` is classified as a `Function` object.
297
+ *
298
+ * @static
299
+ * @memberOf _
300
+ * @since 0.1.0
301
+ * @category Lang
302
+ * @param {*} value The value to check.
303
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
304
+ * @example
305
+ *
306
+ * _.isFunction(_);
307
+ * // => true
308
+ *
309
+ * _.isFunction(/abc/);
310
+ * // => false
311
+ */
312
+ function isFunction(value) {
313
+ if (!isObject(value)) {
314
+ return false;
315
+ }
316
+ // The use of `Object#toString` avoids issues with the `typeof` operator
317
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
318
+ var tag = baseGetTag(value);
319
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
320
+ }
321
+
322
+ /** Used to detect overreaching core-js shims. */
323
+ var coreJsData = root$1['__core-js_shared__'];
324
+
325
+ var coreJsData$1 = coreJsData;
326
+
327
+ /** Used to detect methods masquerading as native. */
328
+ var maskSrcKey = (function() {
329
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
330
+ return uid ? ('Symbol(src)_1.' + uid) : '';
331
+ }());
332
+
333
+ /**
334
+ * Checks if `func` has its source masked.
335
+ *
336
+ * @private
337
+ * @param {Function} func The function to check.
338
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
339
+ */
340
+ function isMasked(func) {
341
+ return !!maskSrcKey && (maskSrcKey in func);
342
+ }
343
+
344
+ /** Used for built-in method references. */
345
+ var funcProto$1 = Function.prototype;
346
+
347
+ /** Used to resolve the decompiled source of functions. */
348
+ var funcToString$1 = funcProto$1.toString;
349
+
350
+ /**
351
+ * Converts `func` to its source code.
352
+ *
353
+ * @private
354
+ * @param {Function} func The function to convert.
355
+ * @returns {string} Returns the source code.
356
+ */
357
+ function toSource(func) {
358
+ if (func != null) {
359
+ try {
360
+ return funcToString$1.call(func);
361
+ } catch (e) {}
362
+ try {
363
+ return (func + '');
364
+ } catch (e) {}
365
+ }
366
+ return '';
367
+ }
368
+
369
+ /**
370
+ * Used to match `RegExp`
371
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
372
+ */
373
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
374
+
375
+ /** Used to detect host constructors (Safari). */
376
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
377
+
378
+ /** Used for built-in method references. */
379
+ var funcProto = Function.prototype,
380
+ objectProto$a = Object.prototype;
381
+
382
+ /** Used to resolve the decompiled source of functions. */
383
+ var funcToString = funcProto.toString;
384
+
385
+ /** Used to check objects for own properties. */
386
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
387
+
388
+ /** Used to detect if a method is native. */
389
+ var reIsNative = RegExp('^' +
390
+ funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
391
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
392
+ );
393
+
394
+ /**
395
+ * The base implementation of `_.isNative` without bad shim checks.
396
+ *
397
+ * @private
398
+ * @param {*} value The value to check.
399
+ * @returns {boolean} Returns `true` if `value` is a native function,
400
+ * else `false`.
401
+ */
402
+ function baseIsNative(value) {
403
+ if (!isObject(value) || isMasked(value)) {
404
+ return false;
405
+ }
406
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
407
+ return pattern.test(toSource(value));
408
+ }
409
+
410
+ /**
411
+ * Gets the value at `key` of `object`.
412
+ *
413
+ * @private
414
+ * @param {Object} [object] The object to query.
415
+ * @param {string} key The key of the property to get.
416
+ * @returns {*} Returns the property value.
417
+ */
418
+ function getValue(object, key) {
419
+ return object == null ? undefined : object[key];
420
+ }
421
+
422
+ /**
423
+ * Gets the native function at `key` of `object`.
424
+ *
425
+ * @private
426
+ * @param {Object} object The object to query.
427
+ * @param {string} key The key of the method to get.
428
+ * @returns {*} Returns the function if it's native, else `undefined`.
429
+ */
430
+ function getNative(object, key) {
431
+ var value = getValue(object, key);
432
+ return baseIsNative(value) ? value : undefined;
433
+ }
434
+
435
+ /* Built-in method references that are verified to be native. */
436
+ var WeakMap = getNative(root$1, 'WeakMap');
437
+
438
+ var WeakMap$1 = WeakMap;
439
+
440
+ /**
441
+ * A faster alternative to `Function#apply`, this function invokes `func`
442
+ * with the `this` binding of `thisArg` and the arguments of `args`.
443
+ *
444
+ * @private
445
+ * @param {Function} func The function to invoke.
446
+ * @param {*} thisArg The `this` binding of `func`.
447
+ * @param {Array} args The arguments to invoke `func` with.
448
+ * @returns {*} Returns the result of `func`.
449
+ */
450
+ function apply(func, thisArg, args) {
451
+ switch (args.length) {
452
+ case 0: return func.call(thisArg);
453
+ case 1: return func.call(thisArg, args[0]);
454
+ case 2: return func.call(thisArg, args[0], args[1]);
455
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
456
+ }
457
+ return func.apply(thisArg, args);
458
+ }
459
+
460
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
461
+ var HOT_COUNT = 800,
462
+ HOT_SPAN = 16;
463
+
464
+ /* Built-in method references for those with the same name as other `lodash` methods. */
465
+ var nativeNow = Date.now;
466
+
467
+ /**
468
+ * Creates a function that'll short out and invoke `identity` instead
469
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
470
+ * milliseconds.
471
+ *
472
+ * @private
473
+ * @param {Function} func The function to restrict.
474
+ * @returns {Function} Returns the new shortable function.
475
+ */
476
+ function shortOut(func) {
477
+ var count = 0,
478
+ lastCalled = 0;
479
+
480
+ return function() {
481
+ var stamp = nativeNow(),
482
+ remaining = HOT_SPAN - (stamp - lastCalled);
483
+
484
+ lastCalled = stamp;
485
+ if (remaining > 0) {
486
+ if (++count >= HOT_COUNT) {
487
+ return arguments[0];
488
+ }
489
+ } else {
490
+ count = 0;
491
+ }
492
+ return func.apply(undefined, arguments);
493
+ };
494
+ }
495
+
496
+ /**
497
+ * Creates a function that returns `value`.
498
+ *
499
+ * @static
500
+ * @memberOf _
501
+ * @since 2.4.0
502
+ * @category Util
503
+ * @param {*} value The value to return from the new function.
504
+ * @returns {Function} Returns the new constant function.
505
+ * @example
506
+ *
507
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
508
+ *
509
+ * console.log(objects);
510
+ * // => [{ 'a': 1 }, { 'a': 1 }]
511
+ *
512
+ * console.log(objects[0] === objects[1]);
513
+ * // => true
514
+ */
515
+ function constant(value) {
516
+ return function() {
517
+ return value;
518
+ };
519
+ }
520
+
521
+ var defineProperty = (function() {
522
+ try {
523
+ var func = getNative(Object, 'defineProperty');
524
+ func({}, '', {});
525
+ return func;
526
+ } catch (e) {}
527
+ }());
528
+
529
+ var defineProperty$1 = defineProperty;
530
+
531
+ /**
532
+ * The base implementation of `setToString` without support for hot loop shorting.
533
+ *
534
+ * @private
535
+ * @param {Function} func The function to modify.
536
+ * @param {Function} string The `toString` result.
537
+ * @returns {Function} Returns `func`.
538
+ */
539
+ var baseSetToString = !defineProperty$1 ? identity : function(func, string) {
540
+ return defineProperty$1(func, 'toString', {
541
+ 'configurable': true,
542
+ 'enumerable': false,
543
+ 'value': constant(string),
544
+ 'writable': true
545
+ });
546
+ };
547
+
548
+ var baseSetToString$1 = baseSetToString;
549
+
550
+ /**
551
+ * Sets the `toString` method of `func` to return `string`.
552
+ *
553
+ * @private
554
+ * @param {Function} func The function to modify.
555
+ * @param {Function} string The `toString` result.
556
+ * @returns {Function} Returns `func`.
557
+ */
558
+ var setToString = shortOut(baseSetToString$1);
559
+
560
+ var setToString$1 = setToString;
561
+
562
+ /**
563
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
564
+ * support for iteratee shorthands.
565
+ *
566
+ * @private
567
+ * @param {Array} array The array to inspect.
568
+ * @param {Function} predicate The function invoked per iteration.
569
+ * @param {number} fromIndex The index to search from.
570
+ * @param {boolean} [fromRight] Specify iterating from right to left.
571
+ * @returns {number} Returns the index of the matched value, else `-1`.
572
+ */
573
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
574
+ var length = array.length,
575
+ index = fromIndex + (fromRight ? 1 : -1);
576
+
577
+ while ((fromRight ? index-- : ++index < length)) {
578
+ if (predicate(array[index], index, array)) {
579
+ return index;
580
+ }
581
+ }
582
+ return -1;
583
+ }
584
+
585
+ /**
586
+ * The base implementation of `_.isNaN` without support for number objects.
587
+ *
588
+ * @private
589
+ * @param {*} value The value to check.
590
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
591
+ */
592
+ function baseIsNaN(value) {
593
+ return value !== value;
594
+ }
595
+
596
+ /**
597
+ * A specialized version of `_.indexOf` which performs strict equality
598
+ * comparisons of values, i.e. `===`.
599
+ *
600
+ * @private
601
+ * @param {Array} array The array to inspect.
602
+ * @param {*} value The value to search for.
603
+ * @param {number} fromIndex The index to search from.
604
+ * @returns {number} Returns the index of the matched value, else `-1`.
605
+ */
606
+ function strictIndexOf(array, value, fromIndex) {
607
+ var index = fromIndex - 1,
608
+ length = array.length;
609
+
610
+ while (++index < length) {
611
+ if (array[index] === value) {
612
+ return index;
613
+ }
614
+ }
615
+ return -1;
616
+ }
617
+
618
+ /**
619
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
620
+ *
621
+ * @private
622
+ * @param {Array} array The array to inspect.
623
+ * @param {*} value The value to search for.
624
+ * @param {number} fromIndex The index to search from.
625
+ * @returns {number} Returns the index of the matched value, else `-1`.
626
+ */
627
+ function baseIndexOf(array, value, fromIndex) {
628
+ return value === value
629
+ ? strictIndexOf(array, value, fromIndex)
630
+ : baseFindIndex(array, baseIsNaN, fromIndex);
631
+ }
632
+
633
+ /**
634
+ * A specialized version of `_.includes` for arrays without support for
635
+ * specifying an index to search from.
636
+ *
637
+ * @private
638
+ * @param {Array} [array] The array to inspect.
639
+ * @param {*} target The value to search for.
640
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
641
+ */
642
+ function arrayIncludes(array, value) {
643
+ var length = array == null ? 0 : array.length;
644
+ return !!length && baseIndexOf(array, value, 0) > -1;
645
+ }
646
+
647
+ /** Used as references for various `Number` constants. */
648
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
649
+
650
+ /** Used to detect unsigned integer values. */
651
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
652
+
653
+ /**
654
+ * Checks if `value` is a valid array-like index.
655
+ *
656
+ * @private
657
+ * @param {*} value The value to check.
658
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
659
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
660
+ */
661
+ function isIndex(value, length) {
662
+ var type = typeof value;
663
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
664
+
665
+ return !!length &&
666
+ (type == 'number' ||
667
+ (type != 'symbol' && reIsUint.test(value))) &&
668
+ (value > -1 && value % 1 == 0 && value < length);
669
+ }
670
+
671
+ /**
672
+ * The base implementation of `assignValue` and `assignMergeValue` without
673
+ * value checks.
674
+ *
675
+ * @private
676
+ * @param {Object} object The object to modify.
677
+ * @param {string} key The key of the property to assign.
678
+ * @param {*} value The value to assign.
679
+ */
680
+ function baseAssignValue(object, key, value) {
681
+ if (key == '__proto__' && defineProperty$1) {
682
+ defineProperty$1(object, key, {
683
+ 'configurable': true,
684
+ 'enumerable': true,
685
+ 'value': value,
686
+ 'writable': true
687
+ });
688
+ } else {
689
+ object[key] = value;
690
+ }
691
+ }
692
+
693
+ /**
694
+ * Performs a
695
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
696
+ * comparison between two values to determine if they are equivalent.
697
+ *
698
+ * @static
699
+ * @memberOf _
700
+ * @since 4.0.0
701
+ * @category Lang
702
+ * @param {*} value The value to compare.
703
+ * @param {*} other The other value to compare.
704
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
705
+ * @example
706
+ *
707
+ * var object = { 'a': 1 };
708
+ * var other = { 'a': 1 };
709
+ *
710
+ * _.eq(object, object);
711
+ * // => true
712
+ *
713
+ * _.eq(object, other);
714
+ * // => false
715
+ *
716
+ * _.eq('a', 'a');
717
+ * // => true
718
+ *
719
+ * _.eq('a', Object('a'));
720
+ * // => false
721
+ *
722
+ * _.eq(NaN, NaN);
723
+ * // => true
724
+ */
725
+ function eq(value, other) {
726
+ return value === other || (value !== value && other !== other);
727
+ }
728
+
729
+ /** Used for built-in method references. */
730
+ var objectProto$9 = Object.prototype;
731
+
732
+ /** Used to check objects for own properties. */
733
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
734
+
735
+ /**
736
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
737
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
738
+ * for equality comparisons.
739
+ *
740
+ * @private
741
+ * @param {Object} object The object to modify.
742
+ * @param {string} key The key of the property to assign.
743
+ * @param {*} value The value to assign.
744
+ */
745
+ function assignValue(object, key, value) {
746
+ var objValue = object[key];
747
+ if (!(hasOwnProperty$7.call(object, key) && eq(objValue, value)) ||
748
+ (value === undefined && !(key in object))) {
749
+ baseAssignValue(object, key, value);
750
+ }
751
+ }
752
+
753
+ /* Built-in method references for those with the same name as other `lodash` methods. */
754
+ var nativeMax = Math.max;
755
+
756
+ /**
757
+ * A specialized version of `baseRest` which transforms the rest array.
758
+ *
759
+ * @private
760
+ * @param {Function} func The function to apply a rest parameter to.
761
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
762
+ * @param {Function} transform The rest array transform.
763
+ * @returns {Function} Returns the new function.
764
+ */
765
+ function overRest(func, start, transform) {
766
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
767
+ return function() {
768
+ var args = arguments,
769
+ index = -1,
770
+ length = nativeMax(args.length - start, 0),
771
+ array = Array(length);
772
+
773
+ while (++index < length) {
774
+ array[index] = args[start + index];
775
+ }
776
+ index = -1;
777
+ var otherArgs = Array(start + 1);
778
+ while (++index < start) {
779
+ otherArgs[index] = args[index];
780
+ }
781
+ otherArgs[start] = transform(array);
782
+ return apply(func, this, otherArgs);
783
+ };
784
+ }
785
+
786
+ /**
787
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
788
+ *
789
+ * @private
790
+ * @param {Function} func The function to apply a rest parameter to.
791
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
792
+ * @returns {Function} Returns the new function.
793
+ */
794
+ function baseRest(func, start) {
795
+ return setToString$1(overRest(func, start, identity), func + '');
796
+ }
797
+
798
+ /** Used as references for various `Number` constants. */
799
+ var MAX_SAFE_INTEGER = 9007199254740991;
800
+
801
+ /**
802
+ * Checks if `value` is a valid array-like length.
803
+ *
804
+ * **Note:** This method is loosely based on
805
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
806
+ *
807
+ * @static
808
+ * @memberOf _
809
+ * @since 4.0.0
810
+ * @category Lang
811
+ * @param {*} value The value to check.
812
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
813
+ * @example
814
+ *
815
+ * _.isLength(3);
816
+ * // => true
817
+ *
818
+ * _.isLength(Number.MIN_VALUE);
819
+ * // => false
820
+ *
821
+ * _.isLength(Infinity);
822
+ * // => false
823
+ *
824
+ * _.isLength('3');
825
+ * // => false
826
+ */
827
+ function isLength(value) {
828
+ return typeof value == 'number' &&
829
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
830
+ }
831
+
832
+ /**
833
+ * Checks if `value` is array-like. A value is considered array-like if it's
834
+ * not a function and has a `value.length` that's an integer greater than or
835
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
836
+ *
837
+ * @static
838
+ * @memberOf _
839
+ * @since 4.0.0
840
+ * @category Lang
841
+ * @param {*} value The value to check.
842
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
843
+ * @example
844
+ *
845
+ * _.isArrayLike([1, 2, 3]);
846
+ * // => true
847
+ *
848
+ * _.isArrayLike(document.body.children);
849
+ * // => true
850
+ *
851
+ * _.isArrayLike('abc');
852
+ * // => true
853
+ *
854
+ * _.isArrayLike(_.noop);
855
+ * // => false
856
+ */
857
+ function isArrayLike(value) {
858
+ return value != null && isLength(value.length) && !isFunction(value);
859
+ }
860
+
861
+ /** Used for built-in method references. */
862
+ var objectProto$8 = Object.prototype;
863
+
864
+ /**
865
+ * Checks if `value` is likely a prototype object.
866
+ *
867
+ * @private
868
+ * @param {*} value The value to check.
869
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
870
+ */
871
+ function isPrototype(value) {
872
+ var Ctor = value && value.constructor,
873
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$8;
874
+
875
+ return value === proto;
876
+ }
877
+
878
+ /**
879
+ * The base implementation of `_.times` without support for iteratee shorthands
880
+ * or max array length checks.
881
+ *
882
+ * @private
883
+ * @param {number} n The number of times to invoke `iteratee`.
884
+ * @param {Function} iteratee The function invoked per iteration.
885
+ * @returns {Array} Returns the array of results.
886
+ */
887
+ function baseTimes(n, iteratee) {
888
+ var index = -1,
889
+ result = Array(n);
890
+
891
+ while (++index < n) {
892
+ result[index] = iteratee(index);
893
+ }
894
+ return result;
895
+ }
896
+
897
+ /** `Object#toString` result references. */
898
+ var argsTag$2 = '[object Arguments]';
899
+
900
+ /**
901
+ * The base implementation of `_.isArguments`.
902
+ *
903
+ * @private
904
+ * @param {*} value The value to check.
905
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
906
+ */
907
+ function baseIsArguments(value) {
908
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
909
+ }
910
+
911
+ /** Used for built-in method references. */
912
+ var objectProto$7 = Object.prototype;
913
+
914
+ /** Used to check objects for own properties. */
915
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
916
+
917
+ /** Built-in value references. */
918
+ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
919
+
920
+ /**
921
+ * Checks if `value` is likely an `arguments` object.
922
+ *
923
+ * @static
924
+ * @memberOf _
925
+ * @since 0.1.0
926
+ * @category Lang
927
+ * @param {*} value The value to check.
928
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
929
+ * else `false`.
930
+ * @example
931
+ *
932
+ * _.isArguments(function() { return arguments; }());
933
+ * // => true
934
+ *
935
+ * _.isArguments([1, 2, 3]);
936
+ * // => false
937
+ */
938
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
939
+ return isObjectLike(value) && hasOwnProperty$6.call(value, 'callee') &&
940
+ !propertyIsEnumerable$1.call(value, 'callee');
941
+ };
942
+
943
+ var isArguments$1 = isArguments;
944
+
945
+ /**
946
+ * This method returns `false`.
947
+ *
948
+ * @static
949
+ * @memberOf _
950
+ * @since 4.13.0
951
+ * @category Util
952
+ * @returns {boolean} Returns `false`.
953
+ * @example
954
+ *
955
+ * _.times(2, _.stubFalse);
956
+ * // => [false, false]
957
+ */
958
+ function stubFalse() {
959
+ return false;
960
+ }
961
+
962
+ /** Detect free variable `exports`. */
963
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
964
+
965
+ /** Detect free variable `module`. */
966
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
967
+
968
+ /** Detect the popular CommonJS extension `module.exports`. */
969
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
970
+
971
+ /** Built-in value references. */
972
+ var Buffer = moduleExports$1 ? root$1.Buffer : undefined;
973
+
974
+ /* Built-in method references for those with the same name as other `lodash` methods. */
975
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
976
+
977
+ /**
978
+ * Checks if `value` is a buffer.
979
+ *
980
+ * @static
981
+ * @memberOf _
982
+ * @since 4.3.0
983
+ * @category Lang
984
+ * @param {*} value The value to check.
985
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
986
+ * @example
987
+ *
988
+ * _.isBuffer(new Buffer(2));
989
+ * // => true
990
+ *
991
+ * _.isBuffer(new Uint8Array(2));
992
+ * // => false
993
+ */
994
+ var isBuffer = nativeIsBuffer || stubFalse;
995
+
996
+ var isBuffer$1 = isBuffer;
997
+
998
+ /** `Object#toString` result references. */
999
+ var argsTag$1 = '[object Arguments]',
1000
+ arrayTag$1 = '[object Array]',
1001
+ boolTag$1 = '[object Boolean]',
1002
+ dateTag$1 = '[object Date]',
1003
+ errorTag$1 = '[object Error]',
1004
+ funcTag = '[object Function]',
1005
+ mapTag$2 = '[object Map]',
1006
+ numberTag$1 = '[object Number]',
1007
+ objectTag$2 = '[object Object]',
1008
+ regexpTag$1 = '[object RegExp]',
1009
+ setTag$2 = '[object Set]',
1010
+ stringTag$1 = '[object String]',
1011
+ weakMapTag$1 = '[object WeakMap]';
1012
+
1013
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1014
+ dataViewTag$2 = '[object DataView]',
1015
+ float32Tag = '[object Float32Array]',
1016
+ float64Tag = '[object Float64Array]',
1017
+ int8Tag = '[object Int8Array]',
1018
+ int16Tag = '[object Int16Array]',
1019
+ int32Tag = '[object Int32Array]',
1020
+ uint8Tag = '[object Uint8Array]',
1021
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1022
+ uint16Tag = '[object Uint16Array]',
1023
+ uint32Tag = '[object Uint32Array]';
1024
+
1025
+ /** Used to identify `toStringTag` values of typed arrays. */
1026
+ var typedArrayTags = {};
1027
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1028
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1029
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1030
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1031
+ typedArrayTags[uint32Tag] = true;
1032
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1033
+ typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] =
1034
+ typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] =
1035
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag] =
1036
+ typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] =
1037
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] =
1038
+ typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] =
1039
+ typedArrayTags[weakMapTag$1] = false;
1040
+
1041
+ /**
1042
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1043
+ *
1044
+ * @private
1045
+ * @param {*} value The value to check.
1046
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1047
+ */
1048
+ function baseIsTypedArray(value) {
1049
+ return isObjectLike(value) &&
1050
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
1051
+ }
1052
+
1053
+ /**
1054
+ * The base implementation of `_.unary` without support for storing metadata.
1055
+ *
1056
+ * @private
1057
+ * @param {Function} func The function to cap arguments for.
1058
+ * @returns {Function} Returns the new capped function.
1059
+ */
1060
+ function baseUnary(func) {
1061
+ return function(value) {
1062
+ return func(value);
1063
+ };
1064
+ }
1065
+
1066
+ /** Detect free variable `exports`. */
1067
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1068
+
1069
+ /** Detect free variable `module`. */
1070
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1071
+
1072
+ /** Detect the popular CommonJS extension `module.exports`. */
1073
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1074
+
1075
+ /** Detect free variable `process` from Node.js. */
1076
+ var freeProcess = moduleExports && freeGlobal$1.process;
1077
+
1078
+ /** Used to access faster Node.js helpers. */
1079
+ var nodeUtil = (function() {
1080
+ try {
1081
+ // Use `util.types` for Node.js 10+.
1082
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
1083
+
1084
+ if (types) {
1085
+ return types;
1086
+ }
1087
+
1088
+ // Legacy `process.binding('util')` for Node.js < 10.
1089
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1090
+ } catch (e) {}
1091
+ }());
1092
+
1093
+ var nodeUtil$1 = nodeUtil;
1094
+
1095
+ /* Node.js helper references. */
1096
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
1097
+
1098
+ /**
1099
+ * Checks if `value` is classified as a typed array.
1100
+ *
1101
+ * @static
1102
+ * @memberOf _
1103
+ * @since 3.0.0
1104
+ * @category Lang
1105
+ * @param {*} value The value to check.
1106
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1107
+ * @example
1108
+ *
1109
+ * _.isTypedArray(new Uint8Array);
1110
+ * // => true
1111
+ *
1112
+ * _.isTypedArray([]);
1113
+ * // => false
1114
+ */
1115
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1116
+
1117
+ var isTypedArray$1 = isTypedArray;
1118
+
1119
+ /** Used for built-in method references. */
1120
+ var objectProto$6 = Object.prototype;
1121
+
1122
+ /** Used to check objects for own properties. */
1123
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
1124
+
1125
+ /**
1126
+ * Creates an array of the enumerable property names of the array-like `value`.
1127
+ *
1128
+ * @private
1129
+ * @param {*} value The value to query.
1130
+ * @param {boolean} inherited Specify returning inherited property names.
1131
+ * @returns {Array} Returns the array of property names.
1132
+ */
1133
+ function arrayLikeKeys(value, inherited) {
1134
+ var isArr = isArray$1(value),
1135
+ isArg = !isArr && isArguments$1(value),
1136
+ isBuff = !isArr && !isArg && isBuffer$1(value),
1137
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
1138
+ skipIndexes = isArr || isArg || isBuff || isType,
1139
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1140
+ length = result.length;
1141
+
1142
+ for (var key in value) {
1143
+ if ((inherited || hasOwnProperty$5.call(value, key)) &&
1144
+ !(skipIndexes && (
1145
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1146
+ key == 'length' ||
1147
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1148
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1149
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1150
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1151
+ // Skip index properties.
1152
+ isIndex(key, length)
1153
+ ))) {
1154
+ result.push(key);
1155
+ }
1156
+ }
1157
+ return result;
1158
+ }
1159
+
1160
+ /**
1161
+ * Creates a unary function that invokes `func` with its argument transformed.
1162
+ *
1163
+ * @private
1164
+ * @param {Function} func The function to wrap.
1165
+ * @param {Function} transform The argument transform.
1166
+ * @returns {Function} Returns the new function.
1167
+ */
1168
+ function overArg(func, transform) {
1169
+ return function(arg) {
1170
+ return func(transform(arg));
1171
+ };
1172
+ }
1173
+
1174
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1175
+ var nativeKeys = overArg(Object.keys, Object);
1176
+
1177
+ var nativeKeys$1 = nativeKeys;
1178
+
1179
+ /** Used for built-in method references. */
1180
+ var objectProto$5 = Object.prototype;
1181
+
1182
+ /** Used to check objects for own properties. */
1183
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
1184
+
1185
+ /**
1186
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1187
+ *
1188
+ * @private
1189
+ * @param {Object} object The object to query.
1190
+ * @returns {Array} Returns the array of property names.
1191
+ */
1192
+ function baseKeys(object) {
1193
+ if (!isPrototype(object)) {
1194
+ return nativeKeys$1(object);
1195
+ }
1196
+ var result = [];
1197
+ for (var key in Object(object)) {
1198
+ if (hasOwnProperty$4.call(object, key) && key != 'constructor') {
1199
+ result.push(key);
1200
+ }
1201
+ }
1202
+ return result;
1203
+ }
1204
+
1205
+ /**
1206
+ * Creates an array of the own enumerable property names of `object`.
1207
+ *
1208
+ * **Note:** Non-object values are coerced to objects. See the
1209
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1210
+ * for more details.
1211
+ *
1212
+ * @static
1213
+ * @since 0.1.0
1214
+ * @memberOf _
1215
+ * @category Object
1216
+ * @param {Object} object The object to query.
1217
+ * @returns {Array} Returns the array of property names.
1218
+ * @example
1219
+ *
1220
+ * function Foo() {
1221
+ * this.a = 1;
1222
+ * this.b = 2;
1223
+ * }
1224
+ *
1225
+ * Foo.prototype.c = 3;
1226
+ *
1227
+ * _.keys(new Foo);
1228
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1229
+ *
1230
+ * _.keys('hi');
1231
+ * // => ['0', '1']
1232
+ */
1233
+ function keys(object) {
1234
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1235
+ }
1236
+
1237
+ /** Used to match property names within property paths. */
1238
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1239
+ reIsPlainProp = /^\w*$/;
1240
+
1241
+ /**
1242
+ * Checks if `value` is a property name and not a property path.
1243
+ *
1244
+ * @private
1245
+ * @param {*} value The value to check.
1246
+ * @param {Object} [object] The object to query keys on.
1247
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1248
+ */
1249
+ function isKey(value, object) {
1250
+ if (isArray$1(value)) {
1251
+ return false;
1252
+ }
1253
+ var type = typeof value;
1254
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
1255
+ value == null || isSymbol(value)) {
1256
+ return true;
1257
+ }
1258
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
1259
+ (object != null && value in Object(object));
1260
+ }
1261
+
1262
+ /* Built-in method references that are verified to be native. */
1263
+ var nativeCreate = getNative(Object, 'create');
1264
+
1265
+ var nativeCreate$1 = nativeCreate;
1266
+
1267
+ /**
1268
+ * Removes all key-value entries from the hash.
1269
+ *
1270
+ * @private
1271
+ * @name clear
1272
+ * @memberOf Hash
1273
+ */
1274
+ function hashClear() {
1275
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
1276
+ this.size = 0;
1277
+ }
1278
+
1279
+ /**
1280
+ * Removes `key` and its value from the hash.
1281
+ *
1282
+ * @private
1283
+ * @name delete
1284
+ * @memberOf Hash
1285
+ * @param {Object} hash The hash to modify.
1286
+ * @param {string} key The key of the value to remove.
1287
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1288
+ */
1289
+ function hashDelete(key) {
1290
+ var result = this.has(key) && delete this.__data__[key];
1291
+ this.size -= result ? 1 : 0;
1292
+ return result;
1293
+ }
1294
+
1295
+ /** Used to stand-in for `undefined` hash values. */
1296
+ var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
1297
+
1298
+ /** Used for built-in method references. */
1299
+ var objectProto$4 = Object.prototype;
1300
+
1301
+ /** Used to check objects for own properties. */
1302
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1303
+
1304
+ /**
1305
+ * Gets the hash value for `key`.
1306
+ *
1307
+ * @private
1308
+ * @name get
1309
+ * @memberOf Hash
1310
+ * @param {string} key The key of the value to get.
1311
+ * @returns {*} Returns the entry value.
1312
+ */
1313
+ function hashGet(key) {
1314
+ var data = this.__data__;
1315
+ if (nativeCreate$1) {
1316
+ var result = data[key];
1317
+ return result === HASH_UNDEFINED$2 ? undefined : result;
1318
+ }
1319
+ return hasOwnProperty$3.call(data, key) ? data[key] : undefined;
1320
+ }
1321
+
1322
+ /** Used for built-in method references. */
1323
+ var objectProto$3 = Object.prototype;
1324
+
1325
+ /** Used to check objects for own properties. */
1326
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1327
+
1328
+ /**
1329
+ * Checks if a hash value for `key` exists.
1330
+ *
1331
+ * @private
1332
+ * @name has
1333
+ * @memberOf Hash
1334
+ * @param {string} key The key of the entry to check.
1335
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1336
+ */
1337
+ function hashHas(key) {
1338
+ var data = this.__data__;
1339
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$2.call(data, key);
1340
+ }
1341
+
1342
+ /** Used to stand-in for `undefined` hash values. */
1343
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1344
+
1345
+ /**
1346
+ * Sets the hash `key` to `value`.
1347
+ *
1348
+ * @private
1349
+ * @name set
1350
+ * @memberOf Hash
1351
+ * @param {string} key The key of the value to set.
1352
+ * @param {*} value The value to set.
1353
+ * @returns {Object} Returns the hash instance.
1354
+ */
1355
+ function hashSet(key, value) {
1356
+ var data = this.__data__;
1357
+ this.size += this.has(key) ? 0 : 1;
1358
+ data[key] = (nativeCreate$1 && value === undefined) ? HASH_UNDEFINED$1 : value;
1359
+ return this;
1360
+ }
1361
+
1362
+ /**
1363
+ * Creates a hash object.
1364
+ *
1365
+ * @private
1366
+ * @constructor
1367
+ * @param {Array} [entries] The key-value pairs to cache.
1368
+ */
1369
+ function Hash(entries) {
1370
+ var index = -1,
1371
+ length = entries == null ? 0 : entries.length;
1372
+
1373
+ this.clear();
1374
+ while (++index < length) {
1375
+ var entry = entries[index];
1376
+ this.set(entry[0], entry[1]);
1377
+ }
1378
+ }
1379
+
1380
+ // Add methods to `Hash`.
1381
+ Hash.prototype.clear = hashClear;
1382
+ Hash.prototype['delete'] = hashDelete;
1383
+ Hash.prototype.get = hashGet;
1384
+ Hash.prototype.has = hashHas;
1385
+ Hash.prototype.set = hashSet;
1386
+
1387
+ /**
1388
+ * Removes all key-value entries from the list cache.
1389
+ *
1390
+ * @private
1391
+ * @name clear
1392
+ * @memberOf ListCache
1393
+ */
1394
+ function listCacheClear() {
1395
+ this.__data__ = [];
1396
+ this.size = 0;
1397
+ }
1398
+
1399
+ /**
1400
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1401
+ *
1402
+ * @private
1403
+ * @param {Array} array The array to inspect.
1404
+ * @param {*} key The key to search for.
1405
+ * @returns {number} Returns the index of the matched value, else `-1`.
1406
+ */
1407
+ function assocIndexOf(array, key) {
1408
+ var length = array.length;
1409
+ while (length--) {
1410
+ if (eq(array[length][0], key)) {
1411
+ return length;
1412
+ }
1413
+ }
1414
+ return -1;
1415
+ }
1416
+
1417
+ /** Used for built-in method references. */
1418
+ var arrayProto = Array.prototype;
1419
+
1420
+ /** Built-in value references. */
1421
+ var splice = arrayProto.splice;
1422
+
1423
+ /**
1424
+ * Removes `key` and its value from the list cache.
1425
+ *
1426
+ * @private
1427
+ * @name delete
1428
+ * @memberOf ListCache
1429
+ * @param {string} key The key of the value to remove.
1430
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1431
+ */
1432
+ function listCacheDelete(key) {
1433
+ var data = this.__data__,
1434
+ index = assocIndexOf(data, key);
1435
+
1436
+ if (index < 0) {
1437
+ return false;
1438
+ }
1439
+ var lastIndex = data.length - 1;
1440
+ if (index == lastIndex) {
1441
+ data.pop();
1442
+ } else {
1443
+ splice.call(data, index, 1);
1444
+ }
1445
+ --this.size;
1446
+ return true;
1447
+ }
1448
+
1449
+ /**
1450
+ * Gets the list cache value for `key`.
1451
+ *
1452
+ * @private
1453
+ * @name get
1454
+ * @memberOf ListCache
1455
+ * @param {string} key The key of the value to get.
1456
+ * @returns {*} Returns the entry value.
1457
+ */
1458
+ function listCacheGet(key) {
1459
+ var data = this.__data__,
1460
+ index = assocIndexOf(data, key);
1461
+
1462
+ return index < 0 ? undefined : data[index][1];
1463
+ }
1464
+
1465
+ /**
1466
+ * Checks if a list cache value for `key` exists.
1467
+ *
1468
+ * @private
1469
+ * @name has
1470
+ * @memberOf ListCache
1471
+ * @param {string} key The key of the entry to check.
1472
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1473
+ */
1474
+ function listCacheHas(key) {
1475
+ return assocIndexOf(this.__data__, key) > -1;
1476
+ }
1477
+
1478
+ /**
1479
+ * Sets the list cache `key` to `value`.
1480
+ *
1481
+ * @private
1482
+ * @name set
1483
+ * @memberOf ListCache
1484
+ * @param {string} key The key of the value to set.
1485
+ * @param {*} value The value to set.
1486
+ * @returns {Object} Returns the list cache instance.
1487
+ */
1488
+ function listCacheSet(key, value) {
1489
+ var data = this.__data__,
1490
+ index = assocIndexOf(data, key);
1491
+
1492
+ if (index < 0) {
1493
+ ++this.size;
1494
+ data.push([key, value]);
1495
+ } else {
1496
+ data[index][1] = value;
1497
+ }
1498
+ return this;
1499
+ }
1500
+
1501
+ /**
1502
+ * Creates an list cache object.
1503
+ *
1504
+ * @private
1505
+ * @constructor
1506
+ * @param {Array} [entries] The key-value pairs to cache.
1507
+ */
1508
+ function ListCache(entries) {
1509
+ var index = -1,
1510
+ length = entries == null ? 0 : entries.length;
1511
+
1512
+ this.clear();
1513
+ while (++index < length) {
1514
+ var entry = entries[index];
1515
+ this.set(entry[0], entry[1]);
1516
+ }
1517
+ }
1518
+
1519
+ // Add methods to `ListCache`.
1520
+ ListCache.prototype.clear = listCacheClear;
1521
+ ListCache.prototype['delete'] = listCacheDelete;
1522
+ ListCache.prototype.get = listCacheGet;
1523
+ ListCache.prototype.has = listCacheHas;
1524
+ ListCache.prototype.set = listCacheSet;
1525
+
1526
+ /* Built-in method references that are verified to be native. */
1527
+ var Map = getNative(root$1, 'Map');
1528
+
1529
+ var Map$1 = Map;
1530
+
1531
+ /**
1532
+ * Removes all key-value entries from the map.
1533
+ *
1534
+ * @private
1535
+ * @name clear
1536
+ * @memberOf MapCache
1537
+ */
1538
+ function mapCacheClear() {
1539
+ this.size = 0;
1540
+ this.__data__ = {
1541
+ 'hash': new Hash,
1542
+ 'map': new (Map$1 || ListCache),
1543
+ 'string': new Hash
1544
+ };
1545
+ }
1546
+
1547
+ /**
1548
+ * Checks if `value` is suitable for use as unique object key.
1549
+ *
1550
+ * @private
1551
+ * @param {*} value The value to check.
1552
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1553
+ */
1554
+ function isKeyable(value) {
1555
+ var type = typeof value;
1556
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1557
+ ? (value !== '__proto__')
1558
+ : (value === null);
1559
+ }
1560
+
1561
+ /**
1562
+ * Gets the data for `map`.
1563
+ *
1564
+ * @private
1565
+ * @param {Object} map The map to query.
1566
+ * @param {string} key The reference key.
1567
+ * @returns {*} Returns the map data.
1568
+ */
1569
+ function getMapData(map, key) {
1570
+ var data = map.__data__;
1571
+ return isKeyable(key)
1572
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1573
+ : data.map;
1574
+ }
1575
+
1576
+ /**
1577
+ * Removes `key` and its value from the map.
1578
+ *
1579
+ * @private
1580
+ * @name delete
1581
+ * @memberOf MapCache
1582
+ * @param {string} key The key of the value to remove.
1583
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1584
+ */
1585
+ function mapCacheDelete(key) {
1586
+ var result = getMapData(this, key)['delete'](key);
1587
+ this.size -= result ? 1 : 0;
1588
+ return result;
1589
+ }
1590
+
1591
+ /**
1592
+ * Gets the map value for `key`.
1593
+ *
1594
+ * @private
1595
+ * @name get
1596
+ * @memberOf MapCache
1597
+ * @param {string} key The key of the value to get.
1598
+ * @returns {*} Returns the entry value.
1599
+ */
1600
+ function mapCacheGet(key) {
1601
+ return getMapData(this, key).get(key);
1602
+ }
1603
+
1604
+ /**
1605
+ * Checks if a map value for `key` exists.
1606
+ *
1607
+ * @private
1608
+ * @name has
1609
+ * @memberOf MapCache
1610
+ * @param {string} key The key of the entry to check.
1611
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1612
+ */
1613
+ function mapCacheHas(key) {
1614
+ return getMapData(this, key).has(key);
1615
+ }
1616
+
1617
+ /**
1618
+ * Sets the map `key` to `value`.
1619
+ *
1620
+ * @private
1621
+ * @name set
1622
+ * @memberOf MapCache
1623
+ * @param {string} key The key of the value to set.
1624
+ * @param {*} value The value to set.
1625
+ * @returns {Object} Returns the map cache instance.
1626
+ */
1627
+ function mapCacheSet(key, value) {
1628
+ var data = getMapData(this, key),
1629
+ size = data.size;
1630
+
1631
+ data.set(key, value);
1632
+ this.size += data.size == size ? 0 : 1;
1633
+ return this;
1634
+ }
1635
+
1636
+ /**
1637
+ * Creates a map cache object to store key-value pairs.
1638
+ *
1639
+ * @private
1640
+ * @constructor
1641
+ * @param {Array} [entries] The key-value pairs to cache.
1642
+ */
1643
+ function MapCache(entries) {
1644
+ var index = -1,
1645
+ length = entries == null ? 0 : entries.length;
1646
+
1647
+ this.clear();
1648
+ while (++index < length) {
1649
+ var entry = entries[index];
1650
+ this.set(entry[0], entry[1]);
1651
+ }
1652
+ }
1653
+
1654
+ // Add methods to `MapCache`.
1655
+ MapCache.prototype.clear = mapCacheClear;
1656
+ MapCache.prototype['delete'] = mapCacheDelete;
1657
+ MapCache.prototype.get = mapCacheGet;
1658
+ MapCache.prototype.has = mapCacheHas;
1659
+ MapCache.prototype.set = mapCacheSet;
1660
+
1661
+ /** Error message constants. */
1662
+ var FUNC_ERROR_TEXT = 'Expected a function';
1663
+
1664
+ /**
1665
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1666
+ * provided, it determines the cache key for storing the result based on the
1667
+ * arguments provided to the memoized function. By default, the first argument
1668
+ * provided to the memoized function is used as the map cache key. The `func`
1669
+ * is invoked with the `this` binding of the memoized function.
1670
+ *
1671
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1672
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1673
+ * constructor with one whose instances implement the
1674
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1675
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1676
+ *
1677
+ * @static
1678
+ * @memberOf _
1679
+ * @since 0.1.0
1680
+ * @category Function
1681
+ * @param {Function} func The function to have its output memoized.
1682
+ * @param {Function} [resolver] The function to resolve the cache key.
1683
+ * @returns {Function} Returns the new memoized function.
1684
+ * @example
1685
+ *
1686
+ * var object = { 'a': 1, 'b': 2 };
1687
+ * var other = { 'c': 3, 'd': 4 };
1688
+ *
1689
+ * var values = _.memoize(_.values);
1690
+ * values(object);
1691
+ * // => [1, 2]
1692
+ *
1693
+ * values(other);
1694
+ * // => [3, 4]
1695
+ *
1696
+ * object.a = 2;
1697
+ * values(object);
1698
+ * // => [1, 2]
1699
+ *
1700
+ * // Modify the result cache.
1701
+ * values.cache.set(object, ['a', 'b']);
1702
+ * values(object);
1703
+ * // => ['a', 'b']
1704
+ *
1705
+ * // Replace `_.memoize.Cache`.
1706
+ * _.memoize.Cache = WeakMap;
1707
+ */
1708
+ function memoize(func, resolver) {
1709
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1710
+ throw new TypeError(FUNC_ERROR_TEXT);
1711
+ }
1712
+ var memoized = function() {
1713
+ var args = arguments,
1714
+ key = resolver ? resolver.apply(this, args) : args[0],
1715
+ cache = memoized.cache;
1716
+
1717
+ if (cache.has(key)) {
1718
+ return cache.get(key);
1719
+ }
1720
+ var result = func.apply(this, args);
1721
+ memoized.cache = cache.set(key, result) || cache;
1722
+ return result;
1723
+ };
1724
+ memoized.cache = new (memoize.Cache || MapCache);
1725
+ return memoized;
1726
+ }
1727
+
1728
+ // Expose `MapCache`.
1729
+ memoize.Cache = MapCache;
1730
+
1731
+ /** Used as the maximum memoize cache size. */
1732
+ var MAX_MEMOIZE_SIZE = 500;
1733
+
1734
+ /**
1735
+ * A specialized version of `_.memoize` which clears the memoized function's
1736
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1737
+ *
1738
+ * @private
1739
+ * @param {Function} func The function to have its output memoized.
1740
+ * @returns {Function} Returns the new memoized function.
1741
+ */
1742
+ function memoizeCapped(func) {
1743
+ var result = memoize(func, function(key) {
1744
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1745
+ cache.clear();
1746
+ }
1747
+ return key;
1748
+ });
1749
+
1750
+ var cache = result.cache;
1751
+ return result;
1752
+ }
1753
+
1754
+ /** Used to match property names within property paths. */
1755
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1756
+
1757
+ /** Used to match backslashes in property paths. */
1758
+ var reEscapeChar = /\\(\\)?/g;
1759
+
1760
+ /**
1761
+ * Converts `string` to a property path array.
1762
+ *
1763
+ * @private
1764
+ * @param {string} string The string to convert.
1765
+ * @returns {Array} Returns the property path array.
1766
+ */
1767
+ var stringToPath = memoizeCapped(function(string) {
1768
+ var result = [];
1769
+ if (string.charCodeAt(0) === 46 /* . */) {
1770
+ result.push('');
1771
+ }
1772
+ string.replace(rePropName, function(match, number, quote, subString) {
1773
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1774
+ });
1775
+ return result;
1776
+ });
1777
+
1778
+ var stringToPath$1 = stringToPath;
1779
+
1780
+ /**
1781
+ * Converts `value` to a string. An empty string is returned for `null`
1782
+ * and `undefined` values. The sign of `-0` is preserved.
1783
+ *
1784
+ * @static
1785
+ * @memberOf _
1786
+ * @since 4.0.0
1787
+ * @category Lang
1788
+ * @param {*} value The value to convert.
1789
+ * @returns {string} Returns the converted string.
1790
+ * @example
1791
+ *
1792
+ * _.toString(null);
1793
+ * // => ''
1794
+ *
1795
+ * _.toString(-0);
1796
+ * // => '-0'
1797
+ *
1798
+ * _.toString([1, 2, 3]);
1799
+ * // => '1,2,3'
1800
+ */
1801
+ function toString(value) {
1802
+ return value == null ? '' : baseToString(value);
1803
+ }
1804
+
1805
+ /**
1806
+ * Casts `value` to a path array if it's not one.
1807
+ *
1808
+ * @private
1809
+ * @param {*} value The value to inspect.
1810
+ * @param {Object} [object] The object to query keys on.
1811
+ * @returns {Array} Returns the cast property path array.
1812
+ */
1813
+ function castPath(value, object) {
1814
+ if (isArray$1(value)) {
1815
+ return value;
1816
+ }
1817
+ return isKey(value, object) ? [value] : stringToPath$1(toString(value));
1818
+ }
1819
+
1820
+ /** Used as references for various `Number` constants. */
1821
+ var INFINITY = 1 / 0;
1822
+
1823
+ /**
1824
+ * Converts `value` to a string key if it's not a string or symbol.
1825
+ *
1826
+ * @private
1827
+ * @param {*} value The value to inspect.
1828
+ * @returns {string|symbol} Returns the key.
1829
+ */
1830
+ function toKey(value) {
1831
+ if (typeof value == 'string' || isSymbol(value)) {
1832
+ return value;
1833
+ }
1834
+ var result = (value + '');
1835
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1836
+ }
1837
+
1838
+ /**
1839
+ * The base implementation of `_.get` without support for default values.
1840
+ *
1841
+ * @private
1842
+ * @param {Object} object The object to query.
1843
+ * @param {Array|string} path The path of the property to get.
1844
+ * @returns {*} Returns the resolved value.
1845
+ */
1846
+ function baseGet(object, path) {
1847
+ path = castPath(path, object);
1848
+
1849
+ var index = 0,
1850
+ length = path.length;
1851
+
1852
+ while (object != null && index < length) {
1853
+ object = object[toKey(path[index++])];
1854
+ }
1855
+ return (index && index == length) ? object : undefined;
1856
+ }
1857
+
1858
+ /**
1859
+ * Gets the value at `path` of `object`. If the resolved value is
1860
+ * `undefined`, the `defaultValue` is returned in its place.
1861
+ *
1862
+ * @static
1863
+ * @memberOf _
1864
+ * @since 3.7.0
1865
+ * @category Object
1866
+ * @param {Object} object The object to query.
1867
+ * @param {Array|string} path The path of the property to get.
1868
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1869
+ * @returns {*} Returns the resolved value.
1870
+ * @example
1871
+ *
1872
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1873
+ *
1874
+ * _.get(object, 'a[0].b.c');
1875
+ * // => 3
1876
+ *
1877
+ * _.get(object, ['a', '0', 'b', 'c']);
1878
+ * // => 3
1879
+ *
1880
+ * _.get(object, 'a.b.c', 'default');
1881
+ * // => 'default'
1882
+ */
1883
+ function get(object, path, defaultValue) {
1884
+ var result = object == null ? undefined : baseGet(object, path);
1885
+ return result === undefined ? defaultValue : result;
1886
+ }
1887
+
1888
+ /**
1889
+ * Appends the elements of `values` to `array`.
1890
+ *
1891
+ * @private
1892
+ * @param {Array} array The array to modify.
1893
+ * @param {Array} values The values to append.
1894
+ * @returns {Array} Returns `array`.
1895
+ */
1896
+ function arrayPush(array, values) {
1897
+ var index = -1,
1898
+ length = values.length,
1899
+ offset = array.length;
1900
+
1901
+ while (++index < length) {
1902
+ array[offset + index] = values[index];
1903
+ }
1904
+ return array;
1905
+ }
1906
+
1907
+ /** Built-in value references. */
1908
+ var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : undefined;
1909
+
1910
+ /**
1911
+ * Checks if `value` is a flattenable `arguments` object or array.
1912
+ *
1913
+ * @private
1914
+ * @param {*} value The value to check.
1915
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
1916
+ */
1917
+ function isFlattenable(value) {
1918
+ return isArray$1(value) || isArguments$1(value) ||
1919
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
1920
+ }
1921
+
1922
+ /**
1923
+ * The base implementation of `_.flatten` with support for restricting flattening.
1924
+ *
1925
+ * @private
1926
+ * @param {Array} array The array to flatten.
1927
+ * @param {number} depth The maximum recursion depth.
1928
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
1929
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
1930
+ * @param {Array} [result=[]] The initial result value.
1931
+ * @returns {Array} Returns the new flattened array.
1932
+ */
1933
+ function baseFlatten(array, depth, predicate, isStrict, result) {
1934
+ var index = -1,
1935
+ length = array.length;
1936
+
1937
+ predicate || (predicate = isFlattenable);
1938
+ result || (result = []);
1939
+
1940
+ while (++index < length) {
1941
+ var value = array[index];
1942
+ if (depth > 0 && predicate(value)) {
1943
+ if (depth > 1) {
1944
+ // Recursively flatten arrays (susceptible to call stack limits).
1945
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
1946
+ } else {
1947
+ arrayPush(result, value);
1948
+ }
1949
+ } else if (!isStrict) {
1950
+ result[result.length] = value;
1951
+ }
1952
+ }
1953
+ return result;
1954
+ }
1955
+
1956
+ /**
1957
+ * Flattens `array` a single level deep.
1958
+ *
1959
+ * @static
1960
+ * @memberOf _
1961
+ * @since 0.1.0
1962
+ * @category Array
1963
+ * @param {Array} array The array to flatten.
1964
+ * @returns {Array} Returns the new flattened array.
1965
+ * @example
1966
+ *
1967
+ * _.flatten([1, [2, [3, [4]], 5]]);
1968
+ * // => [1, 2, [3, [4]], 5]
1969
+ */
1970
+ function flatten(array) {
1971
+ var length = array == null ? 0 : array.length;
1972
+ return length ? baseFlatten(array, 1) : [];
1973
+ }
1974
+
1975
+ /**
1976
+ * A specialized version of `baseRest` which flattens the rest array.
1977
+ *
1978
+ * @private
1979
+ * @param {Function} func The function to apply a rest parameter to.
1980
+ * @returns {Function} Returns the new function.
1981
+ */
1982
+ function flatRest(func) {
1983
+ return setToString$1(overRest(func, undefined, flatten), func + '');
1984
+ }
1985
+
1986
+ /**
1987
+ * Removes all key-value entries from the stack.
1988
+ *
1989
+ * @private
1990
+ * @name clear
1991
+ * @memberOf Stack
1992
+ */
1993
+ function stackClear() {
1994
+ this.__data__ = new ListCache;
1995
+ this.size = 0;
1996
+ }
1997
+
1998
+ /**
1999
+ * Removes `key` and its value from the stack.
2000
+ *
2001
+ * @private
2002
+ * @name delete
2003
+ * @memberOf Stack
2004
+ * @param {string} key The key of the value to remove.
2005
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2006
+ */
2007
+ function stackDelete(key) {
2008
+ var data = this.__data__,
2009
+ result = data['delete'](key);
2010
+
2011
+ this.size = data.size;
2012
+ return result;
2013
+ }
2014
+
2015
+ /**
2016
+ * Gets the stack value for `key`.
2017
+ *
2018
+ * @private
2019
+ * @name get
2020
+ * @memberOf Stack
2021
+ * @param {string} key The key of the value to get.
2022
+ * @returns {*} Returns the entry value.
2023
+ */
2024
+ function stackGet(key) {
2025
+ return this.__data__.get(key);
2026
+ }
2027
+
2028
+ /**
2029
+ * Checks if a stack value for `key` exists.
2030
+ *
2031
+ * @private
2032
+ * @name has
2033
+ * @memberOf Stack
2034
+ * @param {string} key The key of the entry to check.
2035
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2036
+ */
2037
+ function stackHas(key) {
2038
+ return this.__data__.has(key);
2039
+ }
2040
+
2041
+ /** Used as the size to enable large array optimizations. */
2042
+ var LARGE_ARRAY_SIZE$1 = 200;
2043
+
2044
+ /**
2045
+ * Sets the stack `key` to `value`.
2046
+ *
2047
+ * @private
2048
+ * @name set
2049
+ * @memberOf Stack
2050
+ * @param {string} key The key of the value to set.
2051
+ * @param {*} value The value to set.
2052
+ * @returns {Object} Returns the stack cache instance.
2053
+ */
2054
+ function stackSet(key, value) {
2055
+ var data = this.__data__;
2056
+ if (data instanceof ListCache) {
2057
+ var pairs = data.__data__;
2058
+ if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE$1 - 1)) {
2059
+ pairs.push([key, value]);
2060
+ this.size = ++data.size;
2061
+ return this;
2062
+ }
2063
+ data = this.__data__ = new MapCache(pairs);
2064
+ }
2065
+ data.set(key, value);
2066
+ this.size = data.size;
2067
+ return this;
2068
+ }
2069
+
2070
+ /**
2071
+ * Creates a stack cache object to store key-value pairs.
2072
+ *
2073
+ * @private
2074
+ * @constructor
2075
+ * @param {Array} [entries] The key-value pairs to cache.
2076
+ */
2077
+ function Stack(entries) {
2078
+ var data = this.__data__ = new ListCache(entries);
2079
+ this.size = data.size;
2080
+ }
2081
+
2082
+ // Add methods to `Stack`.
2083
+ Stack.prototype.clear = stackClear;
2084
+ Stack.prototype['delete'] = stackDelete;
2085
+ Stack.prototype.get = stackGet;
2086
+ Stack.prototype.has = stackHas;
2087
+ Stack.prototype.set = stackSet;
2088
+
2089
+ /**
2090
+ * A specialized version of `_.filter` for arrays without support for
2091
+ * iteratee shorthands.
2092
+ *
2093
+ * @private
2094
+ * @param {Array} [array] The array to iterate over.
2095
+ * @param {Function} predicate The function invoked per iteration.
2096
+ * @returns {Array} Returns the new filtered array.
2097
+ */
2098
+ function arrayFilter(array, predicate) {
2099
+ var index = -1,
2100
+ length = array == null ? 0 : array.length,
2101
+ resIndex = 0,
2102
+ result = [];
2103
+
2104
+ while (++index < length) {
2105
+ var value = array[index];
2106
+ if (predicate(value, index, array)) {
2107
+ result[resIndex++] = value;
2108
+ }
2109
+ }
2110
+ return result;
2111
+ }
2112
+
2113
+ /**
2114
+ * This method returns a new empty array.
2115
+ *
2116
+ * @static
2117
+ * @memberOf _
2118
+ * @since 4.13.0
2119
+ * @category Util
2120
+ * @returns {Array} Returns the new empty array.
2121
+ * @example
2122
+ *
2123
+ * var arrays = _.times(2, _.stubArray);
2124
+ *
2125
+ * console.log(arrays);
2126
+ * // => [[], []]
2127
+ *
2128
+ * console.log(arrays[0] === arrays[1]);
2129
+ * // => false
2130
+ */
2131
+ function stubArray() {
2132
+ return [];
2133
+ }
2134
+
2135
+ /** Used for built-in method references. */
2136
+ var objectProto$2 = Object.prototype;
2137
+
2138
+ /** Built-in value references. */
2139
+ var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
2140
+
2141
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2142
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
2143
+
2144
+ /**
2145
+ * Creates an array of the own enumerable symbols of `object`.
2146
+ *
2147
+ * @private
2148
+ * @param {Object} object The object to query.
2149
+ * @returns {Array} Returns the array of symbols.
2150
+ */
2151
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
2152
+ if (object == null) {
2153
+ return [];
2154
+ }
2155
+ object = Object(object);
2156
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
2157
+ return propertyIsEnumerable.call(object, symbol);
2158
+ });
2159
+ };
2160
+
2161
+ var getSymbols$1 = getSymbols;
2162
+
2163
+ /**
2164
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2165
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2166
+ * symbols of `object`.
2167
+ *
2168
+ * @private
2169
+ * @param {Object} object The object to query.
2170
+ * @param {Function} keysFunc The function to get the keys of `object`.
2171
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
2172
+ * @returns {Array} Returns the array of property names and symbols.
2173
+ */
2174
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2175
+ var result = keysFunc(object);
2176
+ return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
2177
+ }
2178
+
2179
+ /**
2180
+ * Creates an array of own enumerable property names and symbols of `object`.
2181
+ *
2182
+ * @private
2183
+ * @param {Object} object The object to query.
2184
+ * @returns {Array} Returns the array of property names and symbols.
2185
+ */
2186
+ function getAllKeys(object) {
2187
+ return baseGetAllKeys(object, keys, getSymbols$1);
2188
+ }
2189
+
2190
+ /* Built-in method references that are verified to be native. */
2191
+ var DataView = getNative(root$1, 'DataView');
2192
+
2193
+ var DataView$1 = DataView;
2194
+
2195
+ /* Built-in method references that are verified to be native. */
2196
+ var Promise$1 = getNative(root$1, 'Promise');
2197
+
2198
+ var Promise$2 = Promise$1;
2199
+
2200
+ /* Built-in method references that are verified to be native. */
2201
+ var Set = getNative(root$1, 'Set');
2202
+
2203
+ var Set$1 = Set;
2204
+
2205
+ /** `Object#toString` result references. */
2206
+ var mapTag$1 = '[object Map]',
2207
+ objectTag$1 = '[object Object]',
2208
+ promiseTag = '[object Promise]',
2209
+ setTag$1 = '[object Set]',
2210
+ weakMapTag = '[object WeakMap]';
2211
+
2212
+ var dataViewTag$1 = '[object DataView]';
2213
+
2214
+ /** Used to detect maps, sets, and weakmaps. */
2215
+ var dataViewCtorString = toSource(DataView$1),
2216
+ mapCtorString = toSource(Map$1),
2217
+ promiseCtorString = toSource(Promise$2),
2218
+ setCtorString = toSource(Set$1),
2219
+ weakMapCtorString = toSource(WeakMap$1);
2220
+
2221
+ /**
2222
+ * Gets the `toStringTag` of `value`.
2223
+ *
2224
+ * @private
2225
+ * @param {*} value The value to query.
2226
+ * @returns {string} Returns the `toStringTag`.
2227
+ */
2228
+ var getTag = baseGetTag;
2229
+
2230
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2231
+ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$1) ||
2232
+ (Map$1 && getTag(new Map$1) != mapTag$1) ||
2233
+ (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
2234
+ (Set$1 && getTag(new Set$1) != setTag$1) ||
2235
+ (WeakMap$1 && getTag(new WeakMap$1) != weakMapTag)) {
2236
+ getTag = function(value) {
2237
+ var result = baseGetTag(value),
2238
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
2239
+ ctorString = Ctor ? toSource(Ctor) : '';
2240
+
2241
+ if (ctorString) {
2242
+ switch (ctorString) {
2243
+ case dataViewCtorString: return dataViewTag$1;
2244
+ case mapCtorString: return mapTag$1;
2245
+ case promiseCtorString: return promiseTag;
2246
+ case setCtorString: return setTag$1;
2247
+ case weakMapCtorString: return weakMapTag;
2248
+ }
2249
+ }
2250
+ return result;
2251
+ };
2252
+ }
2253
+
2254
+ var getTag$1 = getTag;
2255
+
2256
+ /** Built-in value references. */
2257
+ var Uint8Array = root$1.Uint8Array;
2258
+
2259
+ var Uint8Array$1 = Uint8Array;
2260
+
2261
+ /** Used to stand-in for `undefined` hash values. */
2262
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
2263
+
2264
+ /**
2265
+ * Adds `value` to the array cache.
2266
+ *
2267
+ * @private
2268
+ * @name add
2269
+ * @memberOf SetCache
2270
+ * @alias push
2271
+ * @param {*} value The value to cache.
2272
+ * @returns {Object} Returns the cache instance.
2273
+ */
2274
+ function setCacheAdd(value) {
2275
+ this.__data__.set(value, HASH_UNDEFINED);
2276
+ return this;
2277
+ }
2278
+
2279
+ /**
2280
+ * Checks if `value` is in the array cache.
2281
+ *
2282
+ * @private
2283
+ * @name has
2284
+ * @memberOf SetCache
2285
+ * @param {*} value The value to search for.
2286
+ * @returns {number} Returns `true` if `value` is found, else `false`.
2287
+ */
2288
+ function setCacheHas(value) {
2289
+ return this.__data__.has(value);
2290
+ }
2291
+
2292
+ /**
2293
+ *
2294
+ * Creates an array cache object to store unique values.
2295
+ *
2296
+ * @private
2297
+ * @constructor
2298
+ * @param {Array} [values] The values to cache.
2299
+ */
2300
+ function SetCache(values) {
2301
+ var index = -1,
2302
+ length = values == null ? 0 : values.length;
2303
+
2304
+ this.__data__ = new MapCache;
2305
+ while (++index < length) {
2306
+ this.add(values[index]);
2307
+ }
2308
+ }
2309
+
2310
+ // Add methods to `SetCache`.
2311
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
2312
+ SetCache.prototype.has = setCacheHas;
2313
+
2314
+ /**
2315
+ * A specialized version of `_.some` for arrays without support for iteratee
2316
+ * shorthands.
2317
+ *
2318
+ * @private
2319
+ * @param {Array} [array] The array to iterate over.
2320
+ * @param {Function} predicate The function invoked per iteration.
2321
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
2322
+ * else `false`.
2323
+ */
2324
+ function arraySome(array, predicate) {
2325
+ var index = -1,
2326
+ length = array == null ? 0 : array.length;
2327
+
2328
+ while (++index < length) {
2329
+ if (predicate(array[index], index, array)) {
2330
+ return true;
2331
+ }
2332
+ }
2333
+ return false;
2334
+ }
2335
+
2336
+ /**
2337
+ * Checks if a `cache` value for `key` exists.
2338
+ *
2339
+ * @private
2340
+ * @param {Object} cache The cache to query.
2341
+ * @param {string} key The key of the entry to check.
2342
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2343
+ */
2344
+ function cacheHas(cache, key) {
2345
+ return cache.has(key);
2346
+ }
2347
+
2348
+ /** Used to compose bitmasks for value comparisons. */
2349
+ var COMPARE_PARTIAL_FLAG$5 = 1,
2350
+ COMPARE_UNORDERED_FLAG$3 = 2;
2351
+
2352
+ /**
2353
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
2354
+ * partial deep comparisons.
2355
+ *
2356
+ * @private
2357
+ * @param {Array} array The array to compare.
2358
+ * @param {Array} other The other array to compare.
2359
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2360
+ * @param {Function} customizer The function to customize comparisons.
2361
+ * @param {Function} equalFunc The function to determine equivalents of values.
2362
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
2363
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
2364
+ */
2365
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
2366
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,
2367
+ arrLength = array.length,
2368
+ othLength = other.length;
2369
+
2370
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
2371
+ return false;
2372
+ }
2373
+ // Check that cyclic values are equal.
2374
+ var arrStacked = stack.get(array);
2375
+ var othStacked = stack.get(other);
2376
+ if (arrStacked && othStacked) {
2377
+ return arrStacked == other && othStacked == array;
2378
+ }
2379
+ var index = -1,
2380
+ result = true,
2381
+ seen = (bitmask & COMPARE_UNORDERED_FLAG$3) ? new SetCache : undefined;
2382
+
2383
+ stack.set(array, other);
2384
+ stack.set(other, array);
2385
+
2386
+ // Ignore non-index properties.
2387
+ while (++index < arrLength) {
2388
+ var arrValue = array[index],
2389
+ othValue = other[index];
2390
+
2391
+ if (customizer) {
2392
+ var compared = isPartial
2393
+ ? customizer(othValue, arrValue, index, other, array, stack)
2394
+ : customizer(arrValue, othValue, index, array, other, stack);
2395
+ }
2396
+ if (compared !== undefined) {
2397
+ if (compared) {
2398
+ continue;
2399
+ }
2400
+ result = false;
2401
+ break;
2402
+ }
2403
+ // Recursively compare arrays (susceptible to call stack limits).
2404
+ if (seen) {
2405
+ if (!arraySome(other, function(othValue, othIndex) {
2406
+ if (!cacheHas(seen, othIndex) &&
2407
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
2408
+ return seen.push(othIndex);
2409
+ }
2410
+ })) {
2411
+ result = false;
2412
+ break;
2413
+ }
2414
+ } else if (!(
2415
+ arrValue === othValue ||
2416
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
2417
+ )) {
2418
+ result = false;
2419
+ break;
2420
+ }
2421
+ }
2422
+ stack['delete'](array);
2423
+ stack['delete'](other);
2424
+ return result;
2425
+ }
2426
+
2427
+ /**
2428
+ * Converts `map` to its key-value pairs.
2429
+ *
2430
+ * @private
2431
+ * @param {Object} map The map to convert.
2432
+ * @returns {Array} Returns the key-value pairs.
2433
+ */
2434
+ function mapToArray(map) {
2435
+ var index = -1,
2436
+ result = Array(map.size);
2437
+
2438
+ map.forEach(function(value, key) {
2439
+ result[++index] = [key, value];
2440
+ });
2441
+ return result;
2442
+ }
2443
+
2444
+ /**
2445
+ * Converts `set` to an array of its values.
2446
+ *
2447
+ * @private
2448
+ * @param {Object} set The set to convert.
2449
+ * @returns {Array} Returns the values.
2450
+ */
2451
+ function setToArray(set) {
2452
+ var index = -1,
2453
+ result = Array(set.size);
2454
+
2455
+ set.forEach(function(value) {
2456
+ result[++index] = value;
2457
+ });
2458
+ return result;
2459
+ }
2460
+
2461
+ /** Used to compose bitmasks for value comparisons. */
2462
+ var COMPARE_PARTIAL_FLAG$4 = 1,
2463
+ COMPARE_UNORDERED_FLAG$2 = 2;
2464
+
2465
+ /** `Object#toString` result references. */
2466
+ var boolTag = '[object Boolean]',
2467
+ dateTag = '[object Date]',
2468
+ errorTag = '[object Error]',
2469
+ mapTag = '[object Map]',
2470
+ numberTag = '[object Number]',
2471
+ regexpTag = '[object RegExp]',
2472
+ setTag = '[object Set]',
2473
+ stringTag = '[object String]',
2474
+ symbolTag = '[object Symbol]';
2475
+
2476
+ var arrayBufferTag = '[object ArrayBuffer]',
2477
+ dataViewTag = '[object DataView]';
2478
+
2479
+ /** Used to convert symbols to primitives and strings. */
2480
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
2481
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2482
+
2483
+ /**
2484
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
2485
+ * the same `toStringTag`.
2486
+ *
2487
+ * **Note:** This function only supports comparing values with tags of
2488
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
2489
+ *
2490
+ * @private
2491
+ * @param {Object} object The object to compare.
2492
+ * @param {Object} other The other object to compare.
2493
+ * @param {string} tag The `toStringTag` of the objects to compare.
2494
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2495
+ * @param {Function} customizer The function to customize comparisons.
2496
+ * @param {Function} equalFunc The function to determine equivalents of values.
2497
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
2498
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2499
+ */
2500
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
2501
+ switch (tag) {
2502
+ case dataViewTag:
2503
+ if ((object.byteLength != other.byteLength) ||
2504
+ (object.byteOffset != other.byteOffset)) {
2505
+ return false;
2506
+ }
2507
+ object = object.buffer;
2508
+ other = other.buffer;
2509
+
2510
+ case arrayBufferTag:
2511
+ if ((object.byteLength != other.byteLength) ||
2512
+ !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
2513
+ return false;
2514
+ }
2515
+ return true;
2516
+
2517
+ case boolTag:
2518
+ case dateTag:
2519
+ case numberTag:
2520
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
2521
+ // Invalid dates are coerced to `NaN`.
2522
+ return eq(+object, +other);
2523
+
2524
+ case errorTag:
2525
+ return object.name == other.name && object.message == other.message;
2526
+
2527
+ case regexpTag:
2528
+ case stringTag:
2529
+ // Coerce regexes to strings and treat strings, primitives and objects,
2530
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
2531
+ // for more details.
2532
+ return object == (other + '');
2533
+
2534
+ case mapTag:
2535
+ var convert = mapToArray;
2536
+
2537
+ case setTag:
2538
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
2539
+ convert || (convert = setToArray);
2540
+
2541
+ if (object.size != other.size && !isPartial) {
2542
+ return false;
2543
+ }
2544
+ // Assume cyclic values are equal.
2545
+ var stacked = stack.get(object);
2546
+ if (stacked) {
2547
+ return stacked == other;
2548
+ }
2549
+ bitmask |= COMPARE_UNORDERED_FLAG$2;
2550
+
2551
+ // Recursively compare objects (susceptible to call stack limits).
2552
+ stack.set(object, other);
2553
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
2554
+ stack['delete'](object);
2555
+ return result;
2556
+
2557
+ case symbolTag:
2558
+ if (symbolValueOf) {
2559
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
2560
+ }
2561
+ }
2562
+ return false;
2563
+ }
2564
+
2565
+ /** Used to compose bitmasks for value comparisons. */
2566
+ var COMPARE_PARTIAL_FLAG$3 = 1;
2567
+
2568
+ /** Used for built-in method references. */
2569
+ var objectProto$1 = Object.prototype;
2570
+
2571
+ /** Used to check objects for own properties. */
2572
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
2573
+
2574
+ /**
2575
+ * A specialized version of `baseIsEqualDeep` for objects with support for
2576
+ * partial deep comparisons.
2577
+ *
2578
+ * @private
2579
+ * @param {Object} object The object to compare.
2580
+ * @param {Object} other The other object to compare.
2581
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2582
+ * @param {Function} customizer The function to customize comparisons.
2583
+ * @param {Function} equalFunc The function to determine equivalents of values.
2584
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
2585
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2586
+ */
2587
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
2588
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
2589
+ objProps = getAllKeys(object),
2590
+ objLength = objProps.length,
2591
+ othProps = getAllKeys(other),
2592
+ othLength = othProps.length;
2593
+
2594
+ if (objLength != othLength && !isPartial) {
2595
+ return false;
2596
+ }
2597
+ var index = objLength;
2598
+ while (index--) {
2599
+ var key = objProps[index];
2600
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
2601
+ return false;
2602
+ }
2603
+ }
2604
+ // Check that cyclic values are equal.
2605
+ var objStacked = stack.get(object);
2606
+ var othStacked = stack.get(other);
2607
+ if (objStacked && othStacked) {
2608
+ return objStacked == other && othStacked == object;
2609
+ }
2610
+ var result = true;
2611
+ stack.set(object, other);
2612
+ stack.set(other, object);
2613
+
2614
+ var skipCtor = isPartial;
2615
+ while (++index < objLength) {
2616
+ key = objProps[index];
2617
+ var objValue = object[key],
2618
+ othValue = other[key];
2619
+
2620
+ if (customizer) {
2621
+ var compared = isPartial
2622
+ ? customizer(othValue, objValue, key, other, object, stack)
2623
+ : customizer(objValue, othValue, key, object, other, stack);
2624
+ }
2625
+ // Recursively compare objects (susceptible to call stack limits).
2626
+ if (!(compared === undefined
2627
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
2628
+ : compared
2629
+ )) {
2630
+ result = false;
2631
+ break;
2632
+ }
2633
+ skipCtor || (skipCtor = key == 'constructor');
2634
+ }
2635
+ if (result && !skipCtor) {
2636
+ var objCtor = object.constructor,
2637
+ othCtor = other.constructor;
2638
+
2639
+ // Non `Object` object instances with different constructors are not equal.
2640
+ if (objCtor != othCtor &&
2641
+ ('constructor' in object && 'constructor' in other) &&
2642
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2643
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2644
+ result = false;
2645
+ }
2646
+ }
2647
+ stack['delete'](object);
2648
+ stack['delete'](other);
2649
+ return result;
2650
+ }
2651
+
2652
+ /** Used to compose bitmasks for value comparisons. */
2653
+ var COMPARE_PARTIAL_FLAG$2 = 1;
2654
+
2655
+ /** `Object#toString` result references. */
2656
+ var argsTag = '[object Arguments]',
2657
+ arrayTag = '[object Array]',
2658
+ objectTag = '[object Object]';
2659
+
2660
+ /** Used for built-in method references. */
2661
+ var objectProto = Object.prototype;
2662
+
2663
+ /** Used to check objects for own properties. */
2664
+ var hasOwnProperty = objectProto.hasOwnProperty;
2665
+
2666
+ /**
2667
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
2668
+ * deep comparisons and tracks traversed objects enabling objects with circular
2669
+ * references to be compared.
2670
+ *
2671
+ * @private
2672
+ * @param {Object} object The object to compare.
2673
+ * @param {Object} other The other object to compare.
2674
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2675
+ * @param {Function} customizer The function to customize comparisons.
2676
+ * @param {Function} equalFunc The function to determine equivalents of values.
2677
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
2678
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2679
+ */
2680
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
2681
+ var objIsArr = isArray$1(object),
2682
+ othIsArr = isArray$1(other),
2683
+ objTag = objIsArr ? arrayTag : getTag$1(object),
2684
+ othTag = othIsArr ? arrayTag : getTag$1(other);
2685
+
2686
+ objTag = objTag == argsTag ? objectTag : objTag;
2687
+ othTag = othTag == argsTag ? objectTag : othTag;
2688
+
2689
+ var objIsObj = objTag == objectTag,
2690
+ othIsObj = othTag == objectTag,
2691
+ isSameTag = objTag == othTag;
2692
+
2693
+ if (isSameTag && isBuffer$1(object)) {
2694
+ if (!isBuffer$1(other)) {
2695
+ return false;
2696
+ }
2697
+ objIsArr = true;
2698
+ objIsObj = false;
2699
+ }
2700
+ if (isSameTag && !objIsObj) {
2701
+ stack || (stack = new Stack);
2702
+ return (objIsArr || isTypedArray$1(object))
2703
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
2704
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
2705
+ }
2706
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
2707
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
2708
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
2709
+
2710
+ if (objIsWrapped || othIsWrapped) {
2711
+ var objUnwrapped = objIsWrapped ? object.value() : object,
2712
+ othUnwrapped = othIsWrapped ? other.value() : other;
2713
+
2714
+ stack || (stack = new Stack);
2715
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
2716
+ }
2717
+ }
2718
+ if (!isSameTag) {
2719
+ return false;
2720
+ }
2721
+ stack || (stack = new Stack);
2722
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
2723
+ }
2724
+
2725
+ /**
2726
+ * The base implementation of `_.isEqual` which supports partial comparisons
2727
+ * and tracks traversed objects.
2728
+ *
2729
+ * @private
2730
+ * @param {*} value The value to compare.
2731
+ * @param {*} other The other value to compare.
2732
+ * @param {boolean} bitmask The bitmask flags.
2733
+ * 1 - Unordered comparison
2734
+ * 2 - Partial comparison
2735
+ * @param {Function} [customizer] The function to customize comparisons.
2736
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
2737
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2738
+ */
2739
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
2740
+ if (value === other) {
2741
+ return true;
2742
+ }
2743
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
2744
+ return value !== value && other !== other;
2745
+ }
2746
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
2747
+ }
2748
+
2749
+ /** Used to compose bitmasks for value comparisons. */
2750
+ var COMPARE_PARTIAL_FLAG$1 = 1,
2751
+ COMPARE_UNORDERED_FLAG$1 = 2;
2752
+
2753
+ /**
2754
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
2755
+ *
2756
+ * @private
2757
+ * @param {Object} object The object to inspect.
2758
+ * @param {Object} source The object of property values to match.
2759
+ * @param {Array} matchData The property names, values, and compare flags to match.
2760
+ * @param {Function} [customizer] The function to customize comparisons.
2761
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
2762
+ */
2763
+ function baseIsMatch(object, source, matchData, customizer) {
2764
+ var index = matchData.length,
2765
+ length = index,
2766
+ noCustomizer = !customizer;
2767
+
2768
+ if (object == null) {
2769
+ return !length;
2770
+ }
2771
+ object = Object(object);
2772
+ while (index--) {
2773
+ var data = matchData[index];
2774
+ if ((noCustomizer && data[2])
2775
+ ? data[1] !== object[data[0]]
2776
+ : !(data[0] in object)
2777
+ ) {
2778
+ return false;
2779
+ }
2780
+ }
2781
+ while (++index < length) {
2782
+ data = matchData[index];
2783
+ var key = data[0],
2784
+ objValue = object[key],
2785
+ srcValue = data[1];
2786
+
2787
+ if (noCustomizer && data[2]) {
2788
+ if (objValue === undefined && !(key in object)) {
2789
+ return false;
2790
+ }
2791
+ } else {
2792
+ var stack = new Stack;
2793
+ if (customizer) {
2794
+ var result = customizer(objValue, srcValue, key, object, source, stack);
2795
+ }
2796
+ if (!(result === undefined
2797
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack)
2798
+ : result
2799
+ )) {
2800
+ return false;
2801
+ }
2802
+ }
2803
+ }
2804
+ return true;
2805
+ }
2806
+
2807
+ /**
2808
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
2809
+ *
2810
+ * @private
2811
+ * @param {*} value The value to check.
2812
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
2813
+ * equality comparisons, else `false`.
2814
+ */
2815
+ function isStrictComparable(value) {
2816
+ return value === value && !isObject(value);
2817
+ }
2818
+
2819
+ /**
2820
+ * Gets the property names, values, and compare flags of `object`.
2821
+ *
2822
+ * @private
2823
+ * @param {Object} object The object to query.
2824
+ * @returns {Array} Returns the match data of `object`.
2825
+ */
2826
+ function getMatchData(object) {
2827
+ var result = keys(object),
2828
+ length = result.length;
2829
+
2830
+ while (length--) {
2831
+ var key = result[length],
2832
+ value = object[key];
2833
+
2834
+ result[length] = [key, value, isStrictComparable(value)];
2835
+ }
2836
+ return result;
2837
+ }
2838
+
2839
+ /**
2840
+ * A specialized version of `matchesProperty` for source values suitable
2841
+ * for strict equality comparisons, i.e. `===`.
2842
+ *
2843
+ * @private
2844
+ * @param {string} key The key of the property to get.
2845
+ * @param {*} srcValue The value to match.
2846
+ * @returns {Function} Returns the new spec function.
2847
+ */
2848
+ function matchesStrictComparable(key, srcValue) {
2849
+ return function(object) {
2850
+ if (object == null) {
2851
+ return false;
2852
+ }
2853
+ return object[key] === srcValue &&
2854
+ (srcValue !== undefined || (key in Object(object)));
2855
+ };
2856
+ }
2857
+
2858
+ /**
2859
+ * The base implementation of `_.matches` which doesn't clone `source`.
2860
+ *
2861
+ * @private
2862
+ * @param {Object} source The object of property values to match.
2863
+ * @returns {Function} Returns the new spec function.
2864
+ */
2865
+ function baseMatches(source) {
2866
+ var matchData = getMatchData(source);
2867
+ if (matchData.length == 1 && matchData[0][2]) {
2868
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
2869
+ }
2870
+ return function(object) {
2871
+ return object === source || baseIsMatch(object, source, matchData);
2872
+ };
2873
+ }
2874
+
2875
+ /**
2876
+ * The base implementation of `_.hasIn` without support for deep paths.
2877
+ *
2878
+ * @private
2879
+ * @param {Object} [object] The object to query.
2880
+ * @param {Array|string} key The key to check.
2881
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
2882
+ */
2883
+ function baseHasIn(object, key) {
2884
+ return object != null && key in Object(object);
2885
+ }
2886
+
2887
+ /**
2888
+ * Checks if `path` exists on `object`.
2889
+ *
2890
+ * @private
2891
+ * @param {Object} object The object to query.
2892
+ * @param {Array|string} path The path to check.
2893
+ * @param {Function} hasFunc The function to check properties.
2894
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
2895
+ */
2896
+ function hasPath(object, path, hasFunc) {
2897
+ path = castPath(path, object);
2898
+
2899
+ var index = -1,
2900
+ length = path.length,
2901
+ result = false;
2902
+
2903
+ while (++index < length) {
2904
+ var key = toKey(path[index]);
2905
+ if (!(result = object != null && hasFunc(object, key))) {
2906
+ break;
2907
+ }
2908
+ object = object[key];
2909
+ }
2910
+ if (result || ++index != length) {
2911
+ return result;
2912
+ }
2913
+ length = object == null ? 0 : object.length;
2914
+ return !!length && isLength(length) && isIndex(key, length) &&
2915
+ (isArray$1(object) || isArguments$1(object));
2916
+ }
2917
+
2918
+ /**
2919
+ * Checks if `path` is a direct or inherited property of `object`.
2920
+ *
2921
+ * @static
2922
+ * @memberOf _
2923
+ * @since 4.0.0
2924
+ * @category Object
2925
+ * @param {Object} object The object to query.
2926
+ * @param {Array|string} path The path to check.
2927
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
2928
+ * @example
2929
+ *
2930
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
2931
+ *
2932
+ * _.hasIn(object, 'a');
2933
+ * // => true
2934
+ *
2935
+ * _.hasIn(object, 'a.b');
2936
+ * // => true
2937
+ *
2938
+ * _.hasIn(object, ['a', 'b']);
2939
+ * // => true
2940
+ *
2941
+ * _.hasIn(object, 'b');
2942
+ * // => false
2943
+ */
2944
+ function hasIn(object, path) {
2945
+ return object != null && hasPath(object, path, baseHasIn);
2946
+ }
2947
+
2948
+ /** Used to compose bitmasks for value comparisons. */
2949
+ var COMPARE_PARTIAL_FLAG = 1,
2950
+ COMPARE_UNORDERED_FLAG = 2;
2951
+
2952
+ /**
2953
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
2954
+ *
2955
+ * @private
2956
+ * @param {string} path The path of the property to get.
2957
+ * @param {*} srcValue The value to match.
2958
+ * @returns {Function} Returns the new spec function.
2959
+ */
2960
+ function baseMatchesProperty(path, srcValue) {
2961
+ if (isKey(path) && isStrictComparable(srcValue)) {
2962
+ return matchesStrictComparable(toKey(path), srcValue);
2963
+ }
2964
+ return function(object) {
2965
+ var objValue = get(object, path);
2966
+ return (objValue === undefined && objValue === srcValue)
2967
+ ? hasIn(object, path)
2968
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
2969
+ };
2970
+ }
2971
+
2972
+ /**
2973
+ * The base implementation of `_.property` without support for deep paths.
2974
+ *
2975
+ * @private
2976
+ * @param {string} key The key of the property to get.
2977
+ * @returns {Function} Returns the new accessor function.
2978
+ */
2979
+ function baseProperty(key) {
2980
+ return function(object) {
2981
+ return object == null ? undefined : object[key];
2982
+ };
2983
+ }
2984
+
2985
+ /**
2986
+ * A specialized version of `baseProperty` which supports deep paths.
2987
+ *
2988
+ * @private
2989
+ * @param {Array|string} path The path of the property to get.
2990
+ * @returns {Function} Returns the new accessor function.
2991
+ */
2992
+ function basePropertyDeep(path) {
2993
+ return function(object) {
2994
+ return baseGet(object, path);
2995
+ };
2996
+ }
2997
+
2998
+ /**
2999
+ * Creates a function that returns the value at `path` of a given object.
3000
+ *
3001
+ * @static
3002
+ * @memberOf _
3003
+ * @since 2.4.0
3004
+ * @category Util
3005
+ * @param {Array|string} path The path of the property to get.
3006
+ * @returns {Function} Returns the new accessor function.
3007
+ * @example
3008
+ *
3009
+ * var objects = [
3010
+ * { 'a': { 'b': 2 } },
3011
+ * { 'a': { 'b': 1 } }
3012
+ * ];
3013
+ *
3014
+ * _.map(objects, _.property('a.b'));
3015
+ * // => [2, 1]
3016
+ *
3017
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
3018
+ * // => [1, 2]
3019
+ */
3020
+ function property(path) {
3021
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
3022
+ }
3023
+
3024
+ /**
3025
+ * The base implementation of `_.iteratee`.
3026
+ *
3027
+ * @private
3028
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
3029
+ * @returns {Function} Returns the iteratee.
3030
+ */
3031
+ function baseIteratee(value) {
3032
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
3033
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
3034
+ if (typeof value == 'function') {
3035
+ return value;
3036
+ }
3037
+ if (value == null) {
3038
+ return identity;
3039
+ }
3040
+ if (typeof value == 'object') {
3041
+ return isArray$1(value)
3042
+ ? baseMatchesProperty(value[0], value[1])
3043
+ : baseMatches(value);
3044
+ }
3045
+ return property(value);
3046
+ }
3047
+
3048
+ /**
3049
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
3050
+ *
3051
+ * @private
3052
+ * @param {boolean} [fromRight] Specify iterating from right to left.
3053
+ * @returns {Function} Returns the new base function.
3054
+ */
3055
+ function createBaseFor(fromRight) {
3056
+ return function(object, iteratee, keysFunc) {
3057
+ var index = -1,
3058
+ iterable = Object(object),
3059
+ props = keysFunc(object),
3060
+ length = props.length;
3061
+
3062
+ while (length--) {
3063
+ var key = props[fromRight ? length : ++index];
3064
+ if (iteratee(iterable[key], key, iterable) === false) {
3065
+ break;
3066
+ }
3067
+ }
3068
+ return object;
3069
+ };
3070
+ }
3071
+
3072
+ /**
3073
+ * The base implementation of `baseForOwn` which iterates over `object`
3074
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
3075
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
3076
+ *
3077
+ * @private
3078
+ * @param {Object} object The object to iterate over.
3079
+ * @param {Function} iteratee The function invoked per iteration.
3080
+ * @param {Function} keysFunc The function to get the keys of `object`.
3081
+ * @returns {Object} Returns `object`.
3082
+ */
3083
+ var baseFor = createBaseFor();
3084
+
3085
+ var baseFor$1 = baseFor;
3086
+
3087
+ /**
3088
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
3089
+ *
3090
+ * @private
3091
+ * @param {Object} object The object to iterate over.
3092
+ * @param {Function} iteratee The function invoked per iteration.
3093
+ * @returns {Object} Returns `object`.
3094
+ */
3095
+ function baseForOwn(object, iteratee) {
3096
+ return object && baseFor$1(object, iteratee, keys);
3097
+ }
3098
+
3099
+ /**
3100
+ * This method is like `_.isArrayLike` except that it also checks if `value`
3101
+ * is an object.
3102
+ *
3103
+ * @static
3104
+ * @memberOf _
3105
+ * @since 4.0.0
3106
+ * @category Lang
3107
+ * @param {*} value The value to check.
3108
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
3109
+ * else `false`.
3110
+ * @example
3111
+ *
3112
+ * _.isArrayLikeObject([1, 2, 3]);
3113
+ * // => true
3114
+ *
3115
+ * _.isArrayLikeObject(document.body.children);
3116
+ * // => true
3117
+ *
3118
+ * _.isArrayLikeObject('abc');
3119
+ * // => false
3120
+ *
3121
+ * _.isArrayLikeObject(_.noop);
3122
+ * // => false
3123
+ */
3124
+ function isArrayLikeObject(value) {
3125
+ return isObjectLike(value) && isArrayLike(value);
3126
+ }
3127
+
3128
+ /**
3129
+ * This function is like `arrayIncludes` except that it accepts a comparator.
3130
+ *
3131
+ * @private
3132
+ * @param {Array} [array] The array to inspect.
3133
+ * @param {*} target The value to search for.
3134
+ * @param {Function} comparator The comparator invoked per element.
3135
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
3136
+ */
3137
+ function arrayIncludesWith(array, value, comparator) {
3138
+ var index = -1,
3139
+ length = array == null ? 0 : array.length;
3140
+
3141
+ while (++index < length) {
3142
+ if (comparator(value, array[index])) {
3143
+ return true;
3144
+ }
3145
+ }
3146
+ return false;
3147
+ }
3148
+
3149
+ /** Used as the size to enable large array optimizations. */
3150
+ var LARGE_ARRAY_SIZE = 200;
3151
+
3152
+ /**
3153
+ * The base implementation of methods like `_.difference` without support
3154
+ * for excluding multiple arrays or iteratee shorthands.
3155
+ *
3156
+ * @private
3157
+ * @param {Array} array The array to inspect.
3158
+ * @param {Array} values The values to exclude.
3159
+ * @param {Function} [iteratee] The iteratee invoked per element.
3160
+ * @param {Function} [comparator] The comparator invoked per element.
3161
+ * @returns {Array} Returns the new array of filtered values.
3162
+ */
3163
+ function baseDifference(array, values, iteratee, comparator) {
3164
+ var index = -1,
3165
+ includes = arrayIncludes,
3166
+ isCommon = true,
3167
+ length = array.length,
3168
+ result = [],
3169
+ valuesLength = values.length;
3170
+
3171
+ if (!length) {
3172
+ return result;
3173
+ }
3174
+ if (iteratee) {
3175
+ values = arrayMap(values, baseUnary(iteratee));
3176
+ }
3177
+ if (comparator) {
3178
+ includes = arrayIncludesWith;
3179
+ isCommon = false;
3180
+ }
3181
+ else if (values.length >= LARGE_ARRAY_SIZE) {
3182
+ includes = cacheHas;
3183
+ isCommon = false;
3184
+ values = new SetCache(values);
3185
+ }
3186
+ outer:
3187
+ while (++index < length) {
3188
+ var value = array[index],
3189
+ computed = iteratee == null ? value : iteratee(value);
3190
+
3191
+ value = (comparator || value !== 0) ? value : 0;
3192
+ if (isCommon && computed === computed) {
3193
+ var valuesIndex = valuesLength;
3194
+ while (valuesIndex--) {
3195
+ if (values[valuesIndex] === computed) {
3196
+ continue outer;
3197
+ }
3198
+ }
3199
+ result.push(value);
3200
+ }
3201
+ else if (!includes(values, computed, comparator)) {
3202
+ result.push(value);
3203
+ }
3204
+ }
3205
+ return result;
3206
+ }
3207
+
3208
+ /**
3209
+ * Creates an object with the same keys as `object` and values generated
3210
+ * by running each own enumerable string keyed property of `object` thru
3211
+ * `iteratee`. The iteratee is invoked with three arguments:
3212
+ * (value, key, object).
3213
+ *
3214
+ * @static
3215
+ * @memberOf _
3216
+ * @since 2.4.0
3217
+ * @category Object
3218
+ * @param {Object} object The object to iterate over.
3219
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
3220
+ * @returns {Object} Returns the new mapped object.
3221
+ * @see _.mapKeys
3222
+ * @example
3223
+ *
3224
+ * var users = {
3225
+ * 'fred': { 'user': 'fred', 'age': 40 },
3226
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
3227
+ * };
3228
+ *
3229
+ * _.mapValues(users, function(o) { return o.age; });
3230
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
3231
+ *
3232
+ * // The `_.property` iteratee shorthand.
3233
+ * _.mapValues(users, 'age');
3234
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
3235
+ */
3236
+ function mapValues(object, iteratee) {
3237
+ var result = {};
3238
+ iteratee = baseIteratee(iteratee);
3239
+
3240
+ baseForOwn(object, function(value, key, object) {
3241
+ baseAssignValue(result, key, iteratee(value, key, object));
3242
+ });
3243
+ return result;
3244
+ }
3245
+
3246
+ /**
3247
+ * The base implementation of `_.set`.
3248
+ *
3249
+ * @private
3250
+ * @param {Object} object The object to modify.
3251
+ * @param {Array|string} path The path of the property to set.
3252
+ * @param {*} value The value to set.
3253
+ * @param {Function} [customizer] The function to customize path creation.
3254
+ * @returns {Object} Returns `object`.
3255
+ */
3256
+ function baseSet(object, path, value, customizer) {
3257
+ if (!isObject(object)) {
3258
+ return object;
3259
+ }
3260
+ path = castPath(path, object);
3261
+
3262
+ var index = -1,
3263
+ length = path.length,
3264
+ lastIndex = length - 1,
3265
+ nested = object;
3266
+
3267
+ while (nested != null && ++index < length) {
3268
+ var key = toKey(path[index]),
3269
+ newValue = value;
3270
+
3271
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
3272
+ return object;
3273
+ }
3274
+
3275
+ if (index != lastIndex) {
3276
+ var objValue = nested[key];
3277
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
3278
+ if (newValue === undefined) {
3279
+ newValue = isObject(objValue)
3280
+ ? objValue
3281
+ : (isIndex(path[index + 1]) ? [] : {});
3282
+ }
3283
+ }
3284
+ assignValue(nested, key, newValue);
3285
+ nested = nested[key];
3286
+ }
3287
+ return object;
3288
+ }
3289
+
3290
+ /**
3291
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
3292
+ *
3293
+ * @private
3294
+ * @param {Object} object The source object.
3295
+ * @param {string[]} paths The property paths to pick.
3296
+ * @param {Function} predicate The function invoked per property.
3297
+ * @returns {Object} Returns the new object.
3298
+ */
3299
+ function basePickBy(object, paths, predicate) {
3300
+ var index = -1,
3301
+ length = paths.length,
3302
+ result = {};
3303
+
3304
+ while (++index < length) {
3305
+ var path = paths[index],
3306
+ value = baseGet(object, path);
3307
+
3308
+ if (predicate(value, path)) {
3309
+ baseSet(result, castPath(path, object), value);
3310
+ }
3311
+ }
3312
+ return result;
3313
+ }
3314
+
3315
+ /**
3316
+ * The base implementation of `_.pick` without support for individual
3317
+ * property identifiers.
3318
+ *
3319
+ * @private
3320
+ * @param {Object} object The source object.
3321
+ * @param {string[]} paths The property paths to pick.
3322
+ * @returns {Object} Returns the new object.
3323
+ */
3324
+ function basePick(object, paths) {
3325
+ return basePickBy(object, paths, function(value, path) {
3326
+ return hasIn(object, path);
3327
+ });
3328
+ }
3329
+
3330
+ /**
3331
+ * Creates an object composed of the picked `object` properties.
3332
+ *
3333
+ * @static
3334
+ * @since 0.1.0
3335
+ * @memberOf _
3336
+ * @category Object
3337
+ * @param {Object} object The source object.
3338
+ * @param {...(string|string[])} [paths] The property paths to pick.
3339
+ * @returns {Object} Returns the new object.
3340
+ * @example
3341
+ *
3342
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
3343
+ *
3344
+ * _.pick(object, ['a', 'c']);
3345
+ * // => { 'a': 1, 'c': 3 }
3346
+ */
3347
+ var pick = flatRest(function(object, paths) {
3348
+ return object == null ? {} : basePick(object, paths);
3349
+ });
3350
+
3351
+ var pick$1 = pick;
3352
+
3353
+ /**
3354
+ * Creates an array excluding all given values using
3355
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3356
+ * for equality comparisons.
3357
+ *
3358
+ * **Note:** Unlike `_.pull`, this method returns a new array.
3359
+ *
3360
+ * @static
3361
+ * @memberOf _
3362
+ * @since 0.1.0
3363
+ * @category Array
3364
+ * @param {Array} array The array to inspect.
3365
+ * @param {...*} [values] The values to exclude.
3366
+ * @returns {Array} Returns the new array of filtered values.
3367
+ * @see _.difference, _.xor
3368
+ * @example
3369
+ *
3370
+ * _.without([2, 1, 2, 3], 1, 2);
3371
+ * // => [3]
3372
+ */
3373
+ var without = baseRest(function(array, values) {
3374
+ return isArrayLikeObject(array)
3375
+ ? baseDifference(array, values)
3376
+ : [];
3377
+ });
3378
+
3379
+ var without$1 = without;
3380
+
3381
+ // the common default props, all the components should have these props
3382
+ const commonDefaultProps = {
3383
+ // actions
3384
+ actionType: '',
3385
+ url: '',
3386
+ // size
3387
+ height: '',
3388
+ width: '318px',
3389
+ paddingLeft: '0px',
3390
+ paddingRight: '0px',
3391
+ paddingTop: '0px',
3392
+ paddingBottom: '0px',
3393
+ // border type
3394
+ borderStyle: 'none',
3395
+ borderColor: '#000',
3396
+ borderWidth: '0',
3397
+ borderRadius: '0',
3398
+ // shadow and opacity
3399
+ boxShadow: '0 0 0 #000000',
3400
+ opacity: 1,
3401
+ // position and x,y
3402
+ position: 'absolute',
3403
+ left: '0',
3404
+ top: '0',
3405
+ right: '0'
3406
+ };
3407
+ const textDefaultProps = {
3408
+ // basic props - font styles
3409
+ text: '正文内容',
3410
+ fontSize: '14px',
3411
+ fontFamily: '',
3412
+ fontWeight: 'normal',
3413
+ fontStyle: 'normal',
3414
+ textDecoration: 'none',
3415
+ lineHeight: '1',
3416
+ textAlign: 'left',
3417
+ color: '#000000',
3418
+ backgroundColor: '',
3419
+ ...commonDefaultProps
3420
+ };
3421
+ const imageDefaultProps = {
3422
+ imageSrc: '',
3423
+ ...commonDefaultProps
3424
+ };
3425
+ const shapeDefaultProps = {
3426
+ backgroundColor: '',
3427
+ ...commonDefaultProps
3428
+ };
3429
+ // this contains all default props for all the components
3430
+ // useful for inserting new component into the store
3431
+ const componentsDefaultProps = {
3432
+ 'uni-text': {
3433
+ props: textDefaultProps
3434
+ },
3435
+ 'uni-image': {
3436
+ props: imageDefaultProps
3437
+ },
3438
+ 'uni-shape': {
3439
+ props: shapeDefaultProps
3440
+ }
3441
+ };
3442
+ const isEditingProp = {
3443
+ isEditing: {
3444
+ type: Boolean,
3445
+ default: false
3446
+ }
3447
+ };
3448
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
3449
+ const transformToComponentProps = (props, extraProps) => {
3450
+ const mapProps = mapValues(props, (item) => {
3451
+ return {
3452
+ type: item.constructor,
3453
+ default: item
3454
+ };
3455
+ });
3456
+ if (extraProps) {
3457
+ return { ...mapProps, ...extraProps };
3458
+ }
3459
+ else {
3460
+ return mapProps;
3461
+ }
3462
+ };
3463
+
3464
+ const defaultStyles = without$1(Object.keys(textDefaultProps), 'actionType', 'url', 'text');
3465
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
3466
+ const useStylePick = (props, pickStyles = defaultStyles) => {
3467
+ return computed(() => pick$1(props, pickStyles));
3468
+ };
3469
+
3470
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
3471
+ const useComponentClick = (props) => {
3472
+ const handleClick = () => {
3473
+ if (props.actionType && props.url && !props.isEditing) {
3474
+ window.location.href = props.url;
3475
+ }
3476
+ };
3477
+ return handleClick;
3478
+ };
3479
+
3480
+ const extraProps = {
3481
+ tag: {
3482
+ type: String,
3483
+ default: 'p'
3484
+ },
3485
+ ...isEditingProp
3486
+ };
3487
+ const defaultProps$1 = transformToComponentProps(componentsDefaultProps['uni-text'].props, extraProps);
3488
+ // array that contains style props
3489
+ var script$4 = defineComponent({
3490
+ name: 'uni-text',
3491
+ props: {
3492
+ ...defaultProps$1
3493
+ },
3494
+ setup(props) {
3495
+ const styleProps = useStylePick(props);
3496
+ const handleClick = useComponentClick(props);
3497
+ return {
3498
+ styleProps,
3499
+ handleClick
3500
+ };
3501
+ }
3502
+ });
3503
+
3504
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
3505
+ return (openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
3506
+ onClick: withModifiers(_ctx.handleClick, ["prevent"]),
3507
+ style: normalizeStyle(_ctx.styleProps),
3508
+ class: "uni-text-component"
3509
+ }, {
3510
+ default: withCtx(() => [
3511
+ createTextVNode(toDisplayString(_ctx.text), 1 /* TEXT */)
3512
+ ]),
3513
+ _: 1 /* STABLE */
3514
+ }, 8 /* PROPS */, ["onClick", "style"]))
3515
+ }
3516
+
3517
+ script$4.render = render$4;
3518
+ script$4.__scopeId = "data-v-55ed80cb";
3519
+ script$4.__file = "src/components/UniText/UniText.vue";
3520
+
3521
+ script$4.install = (app) => {
3522
+ app.component(script$4.name, script$4);
3523
+ };
3524
+
3525
+ // array that contains style props
3526
+ var script$3 = defineComponent({
3527
+ name: 'uni-image',
3528
+ props: transformToComponentProps(componentsDefaultProps['uni-image'].props, isEditingProp),
3529
+ setup(props) {
3530
+ const styleProps = useStylePick(props);
3531
+ const handleClick = useComponentClick(props);
3532
+ return {
3533
+ styleProps,
3534
+ handleClick
3535
+ };
3536
+ }
3537
+ });
3538
+
3539
+ const _hoisted_1$2 = ["src"];
3540
+
3541
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3542
+ return (openBlock(), createElementBlock("img", {
3543
+ src: _ctx.imageSrc,
3544
+ style: normalizeStyle(_ctx.styleProps),
3545
+ onClick: _cache[0] || (_cache[0] = withModifiers((...args) => (_ctx.handleClick && _ctx.handleClick(...args)), ["prevent"])),
3546
+ class: "uni-image-component",
3547
+ draggable: false
3548
+ }, null, 12 /* STYLE, PROPS */, _hoisted_1$2))
3549
+ }
3550
+
3551
+ script$3.render = render$3;
3552
+ script$3.__scopeId = "data-v-03caca2f";
3553
+ script$3.__file = "src/components/UniImage/UniImage.vue";
3554
+
3555
+ script$3.install = (app) => {
3556
+ app.component(script$3.name, script$3);
3557
+ };
3558
+
3559
+ const defaultProps = transformToComponentProps(componentsDefaultProps['uni-shape'].props, isEditingProp);
3560
+ // array that contains style props
3561
+ var script$2 = defineComponent({
3562
+ name: 'uni-shape',
3563
+ props: {
3564
+ ...defaultProps
3565
+ },
3566
+ setup(props) {
3567
+ const styleProps = useStylePick(props);
3568
+ const handleClick = useComponentClick(props);
3569
+ return {
3570
+ styleProps,
3571
+ handleClick
3572
+ };
3573
+ }
3574
+ });
3575
+
3576
+ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3577
+ return (openBlock(), createElementBlock("div", {
3578
+ onClick: _cache[0] || (_cache[0] = withModifiers((...args) => (_ctx.handleClick && _ctx.handleClick(...args)), ["prevent"])),
3579
+ style: normalizeStyle(_ctx.styleProps),
3580
+ class: "uni-shape-component",
3581
+ draggable: false
3582
+ }, null, 4 /* STYLE */))
3583
+ }
3584
+
3585
+ script$2.render = render$2;
3586
+ script$2.__file = "src/components/UniShape/UniShape.vue";
3587
+
3588
+ script$2.install = (app) => {
3589
+ app.component(script$2.name, script$2);
3590
+ };
3591
+
3592
+ var script$1 = defineComponent({
3593
+ name: 'long-page',
3594
+ props: {
3595
+ work: {
3596
+ type: Object
3597
+ },
3598
+ components: {
3599
+ type: Array,
3600
+ required: true
3601
+ }
3602
+ }
3603
+ });
3604
+
3605
+ const _hoisted_1$1 = ["id"];
3606
+
3607
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3608
+ return (openBlock(), createElementBlock("div", {
3609
+ class: "final-page",
3610
+ style: normalizeStyle(_ctx.work && {width: _ctx.work.width, height: _ctx.work.height} )
3611
+ }, [
3612
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.components, (item) => {
3613
+ return (openBlock(), createElementBlock("div", {
3614
+ key: item.id,
3615
+ id: `component-${item.id}`
3616
+ }, [
3617
+ (openBlock(), createBlock(resolveDynamicComponent(item.name), normalizeProps(guardReactiveProps(item.props)), null, 16 /* FULL_PROPS */))
3618
+ ], 8 /* PROPS */, _hoisted_1$1))
3619
+ }), 128 /* KEYED_FRAGMENT */))
3620
+ ], 4 /* STYLE */))
3621
+ }
3622
+
3623
+ script$1.render = render$1;
3624
+ script$1.__file = "src/components/LongPage/LongPage.vue";
3625
+
3626
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3627
+ script$1.install = (app) => {
3628
+ app.component(script$1.name, script$1);
3629
+ };
3630
+
3631
+ var script = defineComponent({
3632
+ name: 'swiper-page',
3633
+ props: {
3634
+ page: {
3635
+ type: Object
3636
+ },
3637
+ components: {
3638
+ type: Array,
3639
+ required: true
3640
+ }
3641
+ }
3642
+ });
3643
+
3644
+ const _hoisted_1 = ["id"];
3645
+
3646
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
3647
+ return (openBlock(), createElementBlock("div", {
3648
+ class: "final-page",
3649
+ style: normalizeStyle(_ctx.page && _ctx.page.props)
3650
+ }, [
3651
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.components, (item) => {
3652
+ return (openBlock(), createElementBlock("div", {
3653
+ key: item.id,
3654
+ id: `component-${item.id}`
3655
+ }, [
3656
+ (openBlock(), createBlock(resolveDynamicComponent(item.name), normalizeProps(guardReactiveProps(item.props)), null, 16 /* FULL_PROPS */))
3657
+ ], 8 /* PROPS */, _hoisted_1))
3658
+ }), 128 /* KEYED_FRAGMENT */))
3659
+ ], 4 /* STYLE */))
3660
+ }
3661
+
3662
+ script.render = render;
3663
+ script.__file = "src/components/SwiperPage/SwiperPage.vue";
3664
+
3665
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3666
+ script.install = (app) => {
3667
+ app.component(script.name, script);
3668
+ };
3669
+
3670
+ // export { textDefaultProps , textStylePropNames, TextComponentProps,
3671
+ const components = [
3672
+ script$4,
3673
+ script$3,
3674
+ script$2,
3675
+ script$1,
3676
+ script
3677
+ ];
3678
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
3679
+ const install = (app) => {
3680
+ components.forEach(component => {
3681
+ app.component(component.name, component);
3682
+ });
3683
+ };
3684
+ var index = {
3685
+ install
3686
+ };
3687
+
3688
+ export { script$1 as LongPage, script as SwiperPage, script$3 as UniImage, script$2 as UniShape, script$4 as UniText, index as default, install };