@kne/super-select 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,8 +3,12 @@ var globalContext = require('@kne/global-context');
3
3
  var useResize = require('@kne/use-resize');
4
4
  var useControlValue = require('@kne/use-control-value');
5
5
  var classnames = require('classnames');
6
+ var isEqual = require('lodash/isEqual');
7
+ var last = require('lodash/last');
6
8
  var antd = require('antd');
7
9
  var icons = require('@ant-design/icons');
10
+ var isEmpty = require('@kne/is-empty');
11
+ var get = require('lodash/get');
8
12
  var SimpleBar = require('simplebar-react');
9
13
  require('simplebar-react/dist/simplebar.min.css');
10
14
  var SearchInput = require('@kne/search-input');
@@ -16,6 +20,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
20
  var useResize__default = /*#__PURE__*/_interopDefaultLegacy(useResize);
17
21
  var useControlValue__default = /*#__PURE__*/_interopDefaultLegacy(useControlValue);
18
22
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
23
+ var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
24
+ var last__default = /*#__PURE__*/_interopDefaultLegacy(last);
25
+ var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
19
26
  var SimpleBar__default = /*#__PURE__*/_interopDefaultLegacy(SimpleBar);
20
27
  var SearchInput__default = /*#__PURE__*/_interopDefaultLegacy(SearchInput);
21
28
 
@@ -35,2211 +42,6 @@ const {
35
42
  useContext
36
43
  } = context;
37
44
 
38
- /**
39
- * Removes all key-value entries from the list cache.
40
- *
41
- * @private
42
- * @name clear
43
- * @memberOf ListCache
44
- */
45
- function listCacheClear() {
46
- this.__data__ = [];
47
- this.size = 0;
48
- }
49
-
50
- var _listCacheClear = listCacheClear;
51
-
52
- /**
53
- * Performs a
54
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
55
- * comparison between two values to determine if they are equivalent.
56
- *
57
- * @static
58
- * @memberOf _
59
- * @since 4.0.0
60
- * @category Lang
61
- * @param {*} value The value to compare.
62
- * @param {*} other The other value to compare.
63
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
64
- * @example
65
- *
66
- * var object = { 'a': 1 };
67
- * var other = { 'a': 1 };
68
- *
69
- * _.eq(object, object);
70
- * // => true
71
- *
72
- * _.eq(object, other);
73
- * // => false
74
- *
75
- * _.eq('a', 'a');
76
- * // => true
77
- *
78
- * _.eq('a', Object('a'));
79
- * // => false
80
- *
81
- * _.eq(NaN, NaN);
82
- * // => true
83
- */
84
- function eq(value, other) {
85
- return value === other || (value !== value && other !== other);
86
- }
87
-
88
- var eq_1 = eq;
89
-
90
- /**
91
- * Gets the index at which the `key` is found in `array` of key-value pairs.
92
- *
93
- * @private
94
- * @param {Array} array The array to inspect.
95
- * @param {*} key The key to search for.
96
- * @returns {number} Returns the index of the matched value, else `-1`.
97
- */
98
- function assocIndexOf(array, key) {
99
- var length = array.length;
100
- while (length--) {
101
- if (eq_1(array[length][0], key)) {
102
- return length;
103
- }
104
- }
105
- return -1;
106
- }
107
-
108
- var _assocIndexOf = assocIndexOf;
109
-
110
- /** Used for built-in method references. */
111
- var arrayProto = Array.prototype;
112
-
113
- /** Built-in value references. */
114
- var splice = arrayProto.splice;
115
-
116
- /**
117
- * Removes `key` and its value from the list cache.
118
- *
119
- * @private
120
- * @name delete
121
- * @memberOf ListCache
122
- * @param {string} key The key of the value to remove.
123
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
124
- */
125
- function listCacheDelete(key) {
126
- var data = this.__data__,
127
- index = _assocIndexOf(data, key);
128
-
129
- if (index < 0) {
130
- return false;
131
- }
132
- var lastIndex = data.length - 1;
133
- if (index == lastIndex) {
134
- data.pop();
135
- } else {
136
- splice.call(data, index, 1);
137
- }
138
- --this.size;
139
- return true;
140
- }
141
-
142
- var _listCacheDelete = listCacheDelete;
143
-
144
- /**
145
- * Gets the list cache value for `key`.
146
- *
147
- * @private
148
- * @name get
149
- * @memberOf ListCache
150
- * @param {string} key The key of the value to get.
151
- * @returns {*} Returns the entry value.
152
- */
153
- function listCacheGet(key) {
154
- var data = this.__data__,
155
- index = _assocIndexOf(data, key);
156
-
157
- return index < 0 ? undefined : data[index][1];
158
- }
159
-
160
- var _listCacheGet = listCacheGet;
161
-
162
- /**
163
- * Checks if a list cache value for `key` exists.
164
- *
165
- * @private
166
- * @name has
167
- * @memberOf ListCache
168
- * @param {string} key The key of the entry to check.
169
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
170
- */
171
- function listCacheHas(key) {
172
- return _assocIndexOf(this.__data__, key) > -1;
173
- }
174
-
175
- var _listCacheHas = listCacheHas;
176
-
177
- /**
178
- * Sets the list cache `key` to `value`.
179
- *
180
- * @private
181
- * @name set
182
- * @memberOf ListCache
183
- * @param {string} key The key of the value to set.
184
- * @param {*} value The value to set.
185
- * @returns {Object} Returns the list cache instance.
186
- */
187
- function listCacheSet(key, value) {
188
- var data = this.__data__,
189
- index = _assocIndexOf(data, key);
190
-
191
- if (index < 0) {
192
- ++this.size;
193
- data.push([key, value]);
194
- } else {
195
- data[index][1] = value;
196
- }
197
- return this;
198
- }
199
-
200
- var _listCacheSet = listCacheSet;
201
-
202
- /**
203
- * Creates an list cache object.
204
- *
205
- * @private
206
- * @constructor
207
- * @param {Array} [entries] The key-value pairs to cache.
208
- */
209
- function ListCache(entries) {
210
- var index = -1,
211
- length = entries == null ? 0 : entries.length;
212
-
213
- this.clear();
214
- while (++index < length) {
215
- var entry = entries[index];
216
- this.set(entry[0], entry[1]);
217
- }
218
- }
219
-
220
- // Add methods to `ListCache`.
221
- ListCache.prototype.clear = _listCacheClear;
222
- ListCache.prototype['delete'] = _listCacheDelete;
223
- ListCache.prototype.get = _listCacheGet;
224
- ListCache.prototype.has = _listCacheHas;
225
- ListCache.prototype.set = _listCacheSet;
226
-
227
- var _ListCache = ListCache;
228
-
229
- /**
230
- * Removes all key-value entries from the stack.
231
- *
232
- * @private
233
- * @name clear
234
- * @memberOf Stack
235
- */
236
- function stackClear() {
237
- this.__data__ = new _ListCache;
238
- this.size = 0;
239
- }
240
-
241
- var _stackClear = stackClear;
242
-
243
- /**
244
- * Removes `key` and its value from the stack.
245
- *
246
- * @private
247
- * @name delete
248
- * @memberOf Stack
249
- * @param {string} key The key of the value to remove.
250
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
251
- */
252
- function stackDelete(key) {
253
- var data = this.__data__,
254
- result = data['delete'](key);
255
-
256
- this.size = data.size;
257
- return result;
258
- }
259
-
260
- var _stackDelete = stackDelete;
261
-
262
- /**
263
- * Gets the stack value for `key`.
264
- *
265
- * @private
266
- * @name get
267
- * @memberOf Stack
268
- * @param {string} key The key of the value to get.
269
- * @returns {*} Returns the entry value.
270
- */
271
- function stackGet(key) {
272
- return this.__data__.get(key);
273
- }
274
-
275
- var _stackGet = stackGet;
276
-
277
- /**
278
- * Checks if a stack value for `key` exists.
279
- *
280
- * @private
281
- * @name has
282
- * @memberOf Stack
283
- * @param {string} key The key of the entry to check.
284
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
285
- */
286
- function stackHas(key) {
287
- return this.__data__.has(key);
288
- }
289
-
290
- var _stackHas = stackHas;
291
-
292
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
293
-
294
- function createCommonjsModule(fn) {
295
- var module = { exports: {} };
296
- return fn(module, module.exports), module.exports;
297
- }
298
-
299
- /** Detect free variable `global` from Node.js. */
300
-
301
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
302
-
303
- var _freeGlobal = freeGlobal;
304
-
305
- /** Detect free variable `self`. */
306
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
307
-
308
- /** Used as a reference to the global object. */
309
- var root = _freeGlobal || freeSelf || Function('return this')();
310
-
311
- var _root = root;
312
-
313
- /** Built-in value references. */
314
- var Symbol = _root.Symbol;
315
-
316
- var _Symbol = Symbol;
317
-
318
- /** Used for built-in method references. */
319
- var objectProto$b = Object.prototype;
320
-
321
- /** Used to check objects for own properties. */
322
- var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
323
-
324
- /**
325
- * Used to resolve the
326
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
327
- * of values.
328
- */
329
- var nativeObjectToString$1 = objectProto$b.toString;
330
-
331
- /** Built-in value references. */
332
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
333
-
334
- /**
335
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
336
- *
337
- * @private
338
- * @param {*} value The value to query.
339
- * @returns {string} Returns the raw `toStringTag`.
340
- */
341
- function getRawTag(value) {
342
- var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
343
- tag = value[symToStringTag$1];
344
-
345
- try {
346
- value[symToStringTag$1] = undefined;
347
- var unmasked = true;
348
- } catch (e) {}
349
-
350
- var result = nativeObjectToString$1.call(value);
351
- if (unmasked) {
352
- if (isOwn) {
353
- value[symToStringTag$1] = tag;
354
- } else {
355
- delete value[symToStringTag$1];
356
- }
357
- }
358
- return result;
359
- }
360
-
361
- var _getRawTag = getRawTag;
362
-
363
- /** Used for built-in method references. */
364
- var objectProto$a = Object.prototype;
365
-
366
- /**
367
- * Used to resolve the
368
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
369
- * of values.
370
- */
371
- var nativeObjectToString = objectProto$a.toString;
372
-
373
- /**
374
- * Converts `value` to a string using `Object.prototype.toString`.
375
- *
376
- * @private
377
- * @param {*} value The value to convert.
378
- * @returns {string} Returns the converted string.
379
- */
380
- function objectToString(value) {
381
- return nativeObjectToString.call(value);
382
- }
383
-
384
- var _objectToString = objectToString;
385
-
386
- /** `Object#toString` result references. */
387
- var nullTag = '[object Null]',
388
- undefinedTag = '[object Undefined]';
389
-
390
- /** Built-in value references. */
391
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
392
-
393
- /**
394
- * The base implementation of `getTag` without fallbacks for buggy environments.
395
- *
396
- * @private
397
- * @param {*} value The value to query.
398
- * @returns {string} Returns the `toStringTag`.
399
- */
400
- function baseGetTag(value) {
401
- if (value == null) {
402
- return value === undefined ? undefinedTag : nullTag;
403
- }
404
- return (symToStringTag && symToStringTag in Object(value))
405
- ? _getRawTag(value)
406
- : _objectToString(value);
407
- }
408
-
409
- var _baseGetTag = baseGetTag;
410
-
411
- /**
412
- * Checks if `value` is the
413
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
414
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
415
- *
416
- * @static
417
- * @memberOf _
418
- * @since 0.1.0
419
- * @category Lang
420
- * @param {*} value The value to check.
421
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
422
- * @example
423
- *
424
- * _.isObject({});
425
- * // => true
426
- *
427
- * _.isObject([1, 2, 3]);
428
- * // => true
429
- *
430
- * _.isObject(_.noop);
431
- * // => true
432
- *
433
- * _.isObject(null);
434
- * // => false
435
- */
436
- function isObject(value) {
437
- var type = typeof value;
438
- return value != null && (type == 'object' || type == 'function');
439
- }
440
-
441
- var isObject_1 = isObject;
442
-
443
- /** `Object#toString` result references. */
444
- var asyncTag = '[object AsyncFunction]',
445
- funcTag$1 = '[object Function]',
446
- genTag = '[object GeneratorFunction]',
447
- proxyTag = '[object Proxy]';
448
-
449
- /**
450
- * Checks if `value` is classified as a `Function` object.
451
- *
452
- * @static
453
- * @memberOf _
454
- * @since 0.1.0
455
- * @category Lang
456
- * @param {*} value The value to check.
457
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
458
- * @example
459
- *
460
- * _.isFunction(_);
461
- * // => true
462
- *
463
- * _.isFunction(/abc/);
464
- * // => false
465
- */
466
- function isFunction(value) {
467
- if (!isObject_1(value)) {
468
- return false;
469
- }
470
- // The use of `Object#toString` avoids issues with the `typeof` operator
471
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
472
- var tag = _baseGetTag(value);
473
- return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
474
- }
475
-
476
- var isFunction_1 = isFunction;
477
-
478
- /** Used to detect overreaching core-js shims. */
479
- var coreJsData = _root['__core-js_shared__'];
480
-
481
- var _coreJsData = coreJsData;
482
-
483
- /** Used to detect methods masquerading as native. */
484
- var maskSrcKey = (function() {
485
- var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
486
- return uid ? ('Symbol(src)_1.' + uid) : '';
487
- }());
488
-
489
- /**
490
- * Checks if `func` has its source masked.
491
- *
492
- * @private
493
- * @param {Function} func The function to check.
494
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
495
- */
496
- function isMasked(func) {
497
- return !!maskSrcKey && (maskSrcKey in func);
498
- }
499
-
500
- var _isMasked = isMasked;
501
-
502
- /** Used for built-in method references. */
503
- var funcProto$1 = Function.prototype;
504
-
505
- /** Used to resolve the decompiled source of functions. */
506
- var funcToString$1 = funcProto$1.toString;
507
-
508
- /**
509
- * Converts `func` to its source code.
510
- *
511
- * @private
512
- * @param {Function} func The function to convert.
513
- * @returns {string} Returns the source code.
514
- */
515
- function toSource(func) {
516
- if (func != null) {
517
- try {
518
- return funcToString$1.call(func);
519
- } catch (e) {}
520
- try {
521
- return (func + '');
522
- } catch (e) {}
523
- }
524
- return '';
525
- }
526
-
527
- var _toSource = toSource;
528
-
529
- /**
530
- * Used to match `RegExp`
531
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
532
- */
533
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
534
-
535
- /** Used to detect host constructors (Safari). */
536
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
537
-
538
- /** Used for built-in method references. */
539
- var funcProto = Function.prototype,
540
- objectProto$9 = Object.prototype;
541
-
542
- /** Used to resolve the decompiled source of functions. */
543
- var funcToString = funcProto.toString;
544
-
545
- /** Used to check objects for own properties. */
546
- var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
547
-
548
- /** Used to detect if a method is native. */
549
- var reIsNative = RegExp('^' +
550
- funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
551
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
552
- );
553
-
554
- /**
555
- * The base implementation of `_.isNative` without bad shim checks.
556
- *
557
- * @private
558
- * @param {*} value The value to check.
559
- * @returns {boolean} Returns `true` if `value` is a native function,
560
- * else `false`.
561
- */
562
- function baseIsNative(value) {
563
- if (!isObject_1(value) || _isMasked(value)) {
564
- return false;
565
- }
566
- var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
567
- return pattern.test(_toSource(value));
568
- }
569
-
570
- var _baseIsNative = baseIsNative;
571
-
572
- /**
573
- * Gets the value at `key` of `object`.
574
- *
575
- * @private
576
- * @param {Object} [object] The object to query.
577
- * @param {string} key The key of the property to get.
578
- * @returns {*} Returns the property value.
579
- */
580
- function getValue(object, key) {
581
- return object == null ? undefined : object[key];
582
- }
583
-
584
- var _getValue = getValue;
585
-
586
- /**
587
- * Gets the native function at `key` of `object`.
588
- *
589
- * @private
590
- * @param {Object} object The object to query.
591
- * @param {string} key The key of the method to get.
592
- * @returns {*} Returns the function if it's native, else `undefined`.
593
- */
594
- function getNative(object, key) {
595
- var value = _getValue(object, key);
596
- return _baseIsNative(value) ? value : undefined;
597
- }
598
-
599
- var _getNative = getNative;
600
-
601
- /* Built-in method references that are verified to be native. */
602
- var Map = _getNative(_root, 'Map');
603
-
604
- var _Map = Map;
605
-
606
- /* Built-in method references that are verified to be native. */
607
- var nativeCreate = _getNative(Object, 'create');
608
-
609
- var _nativeCreate = nativeCreate;
610
-
611
- /**
612
- * Removes all key-value entries from the hash.
613
- *
614
- * @private
615
- * @name clear
616
- * @memberOf Hash
617
- */
618
- function hashClear() {
619
- this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
620
- this.size = 0;
621
- }
622
-
623
- var _hashClear = hashClear;
624
-
625
- /**
626
- * Removes `key` and its value from the hash.
627
- *
628
- * @private
629
- * @name delete
630
- * @memberOf Hash
631
- * @param {Object} hash The hash to modify.
632
- * @param {string} key The key of the value to remove.
633
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
634
- */
635
- function hashDelete(key) {
636
- var result = this.has(key) && delete this.__data__[key];
637
- this.size -= result ? 1 : 0;
638
- return result;
639
- }
640
-
641
- var _hashDelete = hashDelete;
642
-
643
- /** Used to stand-in for `undefined` hash values. */
644
- var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
645
-
646
- /** Used for built-in method references. */
647
- var objectProto$8 = Object.prototype;
648
-
649
- /** Used to check objects for own properties. */
650
- var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
651
-
652
- /**
653
- * Gets the hash value for `key`.
654
- *
655
- * @private
656
- * @name get
657
- * @memberOf Hash
658
- * @param {string} key The key of the value to get.
659
- * @returns {*} Returns the entry value.
660
- */
661
- function hashGet(key) {
662
- var data = this.__data__;
663
- if (_nativeCreate) {
664
- var result = data[key];
665
- return result === HASH_UNDEFINED$2 ? undefined : result;
666
- }
667
- return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
668
- }
669
-
670
- var _hashGet = hashGet;
671
-
672
- /** Used for built-in method references. */
673
- var objectProto$7 = Object.prototype;
674
-
675
- /** Used to check objects for own properties. */
676
- var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
677
-
678
- /**
679
- * Checks if a hash value for `key` exists.
680
- *
681
- * @private
682
- * @name has
683
- * @memberOf Hash
684
- * @param {string} key The key of the entry to check.
685
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
686
- */
687
- function hashHas(key) {
688
- var data = this.__data__;
689
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$5.call(data, key);
690
- }
691
-
692
- var _hashHas = hashHas;
693
-
694
- /** Used to stand-in for `undefined` hash values. */
695
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
696
-
697
- /**
698
- * Sets the hash `key` to `value`.
699
- *
700
- * @private
701
- * @name set
702
- * @memberOf Hash
703
- * @param {string} key The key of the value to set.
704
- * @param {*} value The value to set.
705
- * @returns {Object} Returns the hash instance.
706
- */
707
- function hashSet(key, value) {
708
- var data = this.__data__;
709
- this.size += this.has(key) ? 0 : 1;
710
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
711
- return this;
712
- }
713
-
714
- var _hashSet = hashSet;
715
-
716
- /**
717
- * Creates a hash object.
718
- *
719
- * @private
720
- * @constructor
721
- * @param {Array} [entries] The key-value pairs to cache.
722
- */
723
- function Hash(entries) {
724
- var index = -1,
725
- length = entries == null ? 0 : entries.length;
726
-
727
- this.clear();
728
- while (++index < length) {
729
- var entry = entries[index];
730
- this.set(entry[0], entry[1]);
731
- }
732
- }
733
-
734
- // Add methods to `Hash`.
735
- Hash.prototype.clear = _hashClear;
736
- Hash.prototype['delete'] = _hashDelete;
737
- Hash.prototype.get = _hashGet;
738
- Hash.prototype.has = _hashHas;
739
- Hash.prototype.set = _hashSet;
740
-
741
- var _Hash = Hash;
742
-
743
- /**
744
- * Removes all key-value entries from the map.
745
- *
746
- * @private
747
- * @name clear
748
- * @memberOf MapCache
749
- */
750
- function mapCacheClear() {
751
- this.size = 0;
752
- this.__data__ = {
753
- 'hash': new _Hash,
754
- 'map': new (_Map || _ListCache),
755
- 'string': new _Hash
756
- };
757
- }
758
-
759
- var _mapCacheClear = mapCacheClear;
760
-
761
- /**
762
- * Checks if `value` is suitable for use as unique object key.
763
- *
764
- * @private
765
- * @param {*} value The value to check.
766
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
767
- */
768
- function isKeyable(value) {
769
- var type = typeof value;
770
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
771
- ? (value !== '__proto__')
772
- : (value === null);
773
- }
774
-
775
- var _isKeyable = isKeyable;
776
-
777
- /**
778
- * Gets the data for `map`.
779
- *
780
- * @private
781
- * @param {Object} map The map to query.
782
- * @param {string} key The reference key.
783
- * @returns {*} Returns the map data.
784
- */
785
- function getMapData(map, key) {
786
- var data = map.__data__;
787
- return _isKeyable(key)
788
- ? data[typeof key == 'string' ? 'string' : 'hash']
789
- : data.map;
790
- }
791
-
792
- var _getMapData = getMapData;
793
-
794
- /**
795
- * Removes `key` and its value from the map.
796
- *
797
- * @private
798
- * @name delete
799
- * @memberOf MapCache
800
- * @param {string} key The key of the value to remove.
801
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
802
- */
803
- function mapCacheDelete(key) {
804
- var result = _getMapData(this, key)['delete'](key);
805
- this.size -= result ? 1 : 0;
806
- return result;
807
- }
808
-
809
- var _mapCacheDelete = mapCacheDelete;
810
-
811
- /**
812
- * Gets the map value for `key`.
813
- *
814
- * @private
815
- * @name get
816
- * @memberOf MapCache
817
- * @param {string} key The key of the value to get.
818
- * @returns {*} Returns the entry value.
819
- */
820
- function mapCacheGet(key) {
821
- return _getMapData(this, key).get(key);
822
- }
823
-
824
- var _mapCacheGet = mapCacheGet;
825
-
826
- /**
827
- * Checks if a map value for `key` exists.
828
- *
829
- * @private
830
- * @name has
831
- * @memberOf MapCache
832
- * @param {string} key The key of the entry to check.
833
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
834
- */
835
- function mapCacheHas(key) {
836
- return _getMapData(this, key).has(key);
837
- }
838
-
839
- var _mapCacheHas = mapCacheHas;
840
-
841
- /**
842
- * Sets the map `key` to `value`.
843
- *
844
- * @private
845
- * @name set
846
- * @memberOf MapCache
847
- * @param {string} key The key of the value to set.
848
- * @param {*} value The value to set.
849
- * @returns {Object} Returns the map cache instance.
850
- */
851
- function mapCacheSet(key, value) {
852
- var data = _getMapData(this, key),
853
- size = data.size;
854
-
855
- data.set(key, value);
856
- this.size += data.size == size ? 0 : 1;
857
- return this;
858
- }
859
-
860
- var _mapCacheSet = mapCacheSet;
861
-
862
- /**
863
- * Creates a map cache object to store key-value pairs.
864
- *
865
- * @private
866
- * @constructor
867
- * @param {Array} [entries] The key-value pairs to cache.
868
- */
869
- function MapCache(entries) {
870
- var index = -1,
871
- length = entries == null ? 0 : entries.length;
872
-
873
- this.clear();
874
- while (++index < length) {
875
- var entry = entries[index];
876
- this.set(entry[0], entry[1]);
877
- }
878
- }
879
-
880
- // Add methods to `MapCache`.
881
- MapCache.prototype.clear = _mapCacheClear;
882
- MapCache.prototype['delete'] = _mapCacheDelete;
883
- MapCache.prototype.get = _mapCacheGet;
884
- MapCache.prototype.has = _mapCacheHas;
885
- MapCache.prototype.set = _mapCacheSet;
886
-
887
- var _MapCache = MapCache;
888
-
889
- /** Used as the size to enable large array optimizations. */
890
- var LARGE_ARRAY_SIZE = 200;
891
-
892
- /**
893
- * Sets the stack `key` to `value`.
894
- *
895
- * @private
896
- * @name set
897
- * @memberOf Stack
898
- * @param {string} key The key of the value to set.
899
- * @param {*} value The value to set.
900
- * @returns {Object} Returns the stack cache instance.
901
- */
902
- function stackSet(key, value) {
903
- var data = this.__data__;
904
- if (data instanceof _ListCache) {
905
- var pairs = data.__data__;
906
- if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
907
- pairs.push([key, value]);
908
- this.size = ++data.size;
909
- return this;
910
- }
911
- data = this.__data__ = new _MapCache(pairs);
912
- }
913
- data.set(key, value);
914
- this.size = data.size;
915
- return this;
916
- }
917
-
918
- var _stackSet = stackSet;
919
-
920
- /**
921
- * Creates a stack cache object to store key-value pairs.
922
- *
923
- * @private
924
- * @constructor
925
- * @param {Array} [entries] The key-value pairs to cache.
926
- */
927
- function Stack(entries) {
928
- var data = this.__data__ = new _ListCache(entries);
929
- this.size = data.size;
930
- }
931
-
932
- // Add methods to `Stack`.
933
- Stack.prototype.clear = _stackClear;
934
- Stack.prototype['delete'] = _stackDelete;
935
- Stack.prototype.get = _stackGet;
936
- Stack.prototype.has = _stackHas;
937
- Stack.prototype.set = _stackSet;
938
-
939
- var _Stack = Stack;
940
-
941
- /** Used to stand-in for `undefined` hash values. */
942
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
943
-
944
- /**
945
- * Adds `value` to the array cache.
946
- *
947
- * @private
948
- * @name add
949
- * @memberOf SetCache
950
- * @alias push
951
- * @param {*} value The value to cache.
952
- * @returns {Object} Returns the cache instance.
953
- */
954
- function setCacheAdd(value) {
955
- this.__data__.set(value, HASH_UNDEFINED);
956
- return this;
957
- }
958
-
959
- var _setCacheAdd = setCacheAdd;
960
-
961
- /**
962
- * Checks if `value` is in the array cache.
963
- *
964
- * @private
965
- * @name has
966
- * @memberOf SetCache
967
- * @param {*} value The value to search for.
968
- * @returns {number} Returns `true` if `value` is found, else `false`.
969
- */
970
- function setCacheHas(value) {
971
- return this.__data__.has(value);
972
- }
973
-
974
- var _setCacheHas = setCacheHas;
975
-
976
- /**
977
- *
978
- * Creates an array cache object to store unique values.
979
- *
980
- * @private
981
- * @constructor
982
- * @param {Array} [values] The values to cache.
983
- */
984
- function SetCache(values) {
985
- var index = -1,
986
- length = values == null ? 0 : values.length;
987
-
988
- this.__data__ = new _MapCache;
989
- while (++index < length) {
990
- this.add(values[index]);
991
- }
992
- }
993
-
994
- // Add methods to `SetCache`.
995
- SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
996
- SetCache.prototype.has = _setCacheHas;
997
-
998
- var _SetCache = SetCache;
999
-
1000
- /**
1001
- * A specialized version of `_.some` for arrays without support for iteratee
1002
- * shorthands.
1003
- *
1004
- * @private
1005
- * @param {Array} [array] The array to iterate over.
1006
- * @param {Function} predicate The function invoked per iteration.
1007
- * @returns {boolean} Returns `true` if any element passes the predicate check,
1008
- * else `false`.
1009
- */
1010
- function arraySome(array, predicate) {
1011
- var index = -1,
1012
- length = array == null ? 0 : array.length;
1013
-
1014
- while (++index < length) {
1015
- if (predicate(array[index], index, array)) {
1016
- return true;
1017
- }
1018
- }
1019
- return false;
1020
- }
1021
-
1022
- var _arraySome = arraySome;
1023
-
1024
- /**
1025
- * Checks if a `cache` value for `key` exists.
1026
- *
1027
- * @private
1028
- * @param {Object} cache The cache to query.
1029
- * @param {string} key The key of the entry to check.
1030
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1031
- */
1032
- function cacheHas(cache, key) {
1033
- return cache.has(key);
1034
- }
1035
-
1036
- var _cacheHas = cacheHas;
1037
-
1038
- /** Used to compose bitmasks for value comparisons. */
1039
- var COMPARE_PARTIAL_FLAG$3 = 1,
1040
- COMPARE_UNORDERED_FLAG$1 = 2;
1041
-
1042
- /**
1043
- * A specialized version of `baseIsEqualDeep` for arrays with support for
1044
- * partial deep comparisons.
1045
- *
1046
- * @private
1047
- * @param {Array} array The array to compare.
1048
- * @param {Array} other The other array to compare.
1049
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1050
- * @param {Function} customizer The function to customize comparisons.
1051
- * @param {Function} equalFunc The function to determine equivalents of values.
1052
- * @param {Object} stack Tracks traversed `array` and `other` objects.
1053
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1054
- */
1055
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
1056
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
1057
- arrLength = array.length,
1058
- othLength = other.length;
1059
-
1060
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1061
- return false;
1062
- }
1063
- // Check that cyclic values are equal.
1064
- var arrStacked = stack.get(array);
1065
- var othStacked = stack.get(other);
1066
- if (arrStacked && othStacked) {
1067
- return arrStacked == other && othStacked == array;
1068
- }
1069
- var index = -1,
1070
- result = true,
1071
- seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new _SetCache : undefined;
1072
-
1073
- stack.set(array, other);
1074
- stack.set(other, array);
1075
-
1076
- // Ignore non-index properties.
1077
- while (++index < arrLength) {
1078
- var arrValue = array[index],
1079
- othValue = other[index];
1080
-
1081
- if (customizer) {
1082
- var compared = isPartial
1083
- ? customizer(othValue, arrValue, index, other, array, stack)
1084
- : customizer(arrValue, othValue, index, array, other, stack);
1085
- }
1086
- if (compared !== undefined) {
1087
- if (compared) {
1088
- continue;
1089
- }
1090
- result = false;
1091
- break;
1092
- }
1093
- // Recursively compare arrays (susceptible to call stack limits).
1094
- if (seen) {
1095
- if (!_arraySome(other, function(othValue, othIndex) {
1096
- if (!_cacheHas(seen, othIndex) &&
1097
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
1098
- return seen.push(othIndex);
1099
- }
1100
- })) {
1101
- result = false;
1102
- break;
1103
- }
1104
- } else if (!(
1105
- arrValue === othValue ||
1106
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
1107
- )) {
1108
- result = false;
1109
- break;
1110
- }
1111
- }
1112
- stack['delete'](array);
1113
- stack['delete'](other);
1114
- return result;
1115
- }
1116
-
1117
- var _equalArrays = equalArrays;
1118
-
1119
- /** Built-in value references. */
1120
- var Uint8Array = _root.Uint8Array;
1121
-
1122
- var _Uint8Array = Uint8Array;
1123
-
1124
- /**
1125
- * Converts `map` to its key-value pairs.
1126
- *
1127
- * @private
1128
- * @param {Object} map The map to convert.
1129
- * @returns {Array} Returns the key-value pairs.
1130
- */
1131
- function mapToArray(map) {
1132
- var index = -1,
1133
- result = Array(map.size);
1134
-
1135
- map.forEach(function(value, key) {
1136
- result[++index] = [key, value];
1137
- });
1138
- return result;
1139
- }
1140
-
1141
- var _mapToArray = mapToArray;
1142
-
1143
- /**
1144
- * Converts `set` to an array of its values.
1145
- *
1146
- * @private
1147
- * @param {Object} set The set to convert.
1148
- * @returns {Array} Returns the values.
1149
- */
1150
- function setToArray(set) {
1151
- var index = -1,
1152
- result = Array(set.size);
1153
-
1154
- set.forEach(function(value) {
1155
- result[++index] = value;
1156
- });
1157
- return result;
1158
- }
1159
-
1160
- var _setToArray = setToArray;
1161
-
1162
- /** Used to compose bitmasks for value comparisons. */
1163
- var COMPARE_PARTIAL_FLAG$2 = 1,
1164
- COMPARE_UNORDERED_FLAG = 2;
1165
-
1166
- /** `Object#toString` result references. */
1167
- var boolTag$1 = '[object Boolean]',
1168
- dateTag$1 = '[object Date]',
1169
- errorTag$1 = '[object Error]',
1170
- mapTag$2 = '[object Map]',
1171
- numberTag$1 = '[object Number]',
1172
- regexpTag$1 = '[object RegExp]',
1173
- setTag$2 = '[object Set]',
1174
- stringTag$1 = '[object String]',
1175
- symbolTag$1 = '[object Symbol]';
1176
-
1177
- var arrayBufferTag$1 = '[object ArrayBuffer]',
1178
- dataViewTag$2 = '[object DataView]';
1179
-
1180
- /** Used to convert symbols to primitives and strings. */
1181
- var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
1182
- symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
1183
-
1184
- /**
1185
- * A specialized version of `baseIsEqualDeep` for comparing objects of
1186
- * the same `toStringTag`.
1187
- *
1188
- * **Note:** This function only supports comparing values with tags of
1189
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
1190
- *
1191
- * @private
1192
- * @param {Object} object The object to compare.
1193
- * @param {Object} other The other object to compare.
1194
- * @param {string} tag The `toStringTag` of the objects to compare.
1195
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1196
- * @param {Function} customizer The function to customize comparisons.
1197
- * @param {Function} equalFunc The function to determine equivalents of values.
1198
- * @param {Object} stack Tracks traversed `object` and `other` objects.
1199
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1200
- */
1201
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1202
- switch (tag) {
1203
- case dataViewTag$2:
1204
- if ((object.byteLength != other.byteLength) ||
1205
- (object.byteOffset != other.byteOffset)) {
1206
- return false;
1207
- }
1208
- object = object.buffer;
1209
- other = other.buffer;
1210
-
1211
- case arrayBufferTag$1:
1212
- if ((object.byteLength != other.byteLength) ||
1213
- !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
1214
- return false;
1215
- }
1216
- return true;
1217
-
1218
- case boolTag$1:
1219
- case dateTag$1:
1220
- case numberTag$1:
1221
- // Coerce booleans to `1` or `0` and dates to milliseconds.
1222
- // Invalid dates are coerced to `NaN`.
1223
- return eq_1(+object, +other);
1224
-
1225
- case errorTag$1:
1226
- return object.name == other.name && object.message == other.message;
1227
-
1228
- case regexpTag$1:
1229
- case stringTag$1:
1230
- // Coerce regexes to strings and treat strings, primitives and objects,
1231
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
1232
- // for more details.
1233
- return object == (other + '');
1234
-
1235
- case mapTag$2:
1236
- var convert = _mapToArray;
1237
-
1238
- case setTag$2:
1239
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
1240
- convert || (convert = _setToArray);
1241
-
1242
- if (object.size != other.size && !isPartial) {
1243
- return false;
1244
- }
1245
- // Assume cyclic values are equal.
1246
- var stacked = stack.get(object);
1247
- if (stacked) {
1248
- return stacked == other;
1249
- }
1250
- bitmask |= COMPARE_UNORDERED_FLAG;
1251
-
1252
- // Recursively compare objects (susceptible to call stack limits).
1253
- stack.set(object, other);
1254
- var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1255
- stack['delete'](object);
1256
- return result;
1257
-
1258
- case symbolTag$1:
1259
- if (symbolValueOf) {
1260
- return symbolValueOf.call(object) == symbolValueOf.call(other);
1261
- }
1262
- }
1263
- return false;
1264
- }
1265
-
1266
- var _equalByTag = equalByTag;
1267
-
1268
- /**
1269
- * Appends the elements of `values` to `array`.
1270
- *
1271
- * @private
1272
- * @param {Array} array The array to modify.
1273
- * @param {Array} values The values to append.
1274
- * @returns {Array} Returns `array`.
1275
- */
1276
- function arrayPush(array, values) {
1277
- var index = -1,
1278
- length = values.length,
1279
- offset = array.length;
1280
-
1281
- while (++index < length) {
1282
- array[offset + index] = values[index];
1283
- }
1284
- return array;
1285
- }
1286
-
1287
- var _arrayPush = arrayPush;
1288
-
1289
- /**
1290
- * Checks if `value` is classified as an `Array` object.
1291
- *
1292
- * @static
1293
- * @memberOf _
1294
- * @since 0.1.0
1295
- * @category Lang
1296
- * @param {*} value The value to check.
1297
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1298
- * @example
1299
- *
1300
- * _.isArray([1, 2, 3]);
1301
- * // => true
1302
- *
1303
- * _.isArray(document.body.children);
1304
- * // => false
1305
- *
1306
- * _.isArray('abc');
1307
- * // => false
1308
- *
1309
- * _.isArray(_.noop);
1310
- * // => false
1311
- */
1312
- var isArray = Array.isArray;
1313
-
1314
- var isArray_1 = isArray;
1315
-
1316
- /**
1317
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1318
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1319
- * symbols of `object`.
1320
- *
1321
- * @private
1322
- * @param {Object} object The object to query.
1323
- * @param {Function} keysFunc The function to get the keys of `object`.
1324
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
1325
- * @returns {Array} Returns the array of property names and symbols.
1326
- */
1327
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1328
- var result = keysFunc(object);
1329
- return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
1330
- }
1331
-
1332
- var _baseGetAllKeys = baseGetAllKeys;
1333
-
1334
- /**
1335
- * A specialized version of `_.filter` for arrays without support for
1336
- * iteratee shorthands.
1337
- *
1338
- * @private
1339
- * @param {Array} [array] The array to iterate over.
1340
- * @param {Function} predicate The function invoked per iteration.
1341
- * @returns {Array} Returns the new filtered array.
1342
- */
1343
- function arrayFilter(array, predicate) {
1344
- var index = -1,
1345
- length = array == null ? 0 : array.length,
1346
- resIndex = 0,
1347
- result = [];
1348
-
1349
- while (++index < length) {
1350
- var value = array[index];
1351
- if (predicate(value, index, array)) {
1352
- result[resIndex++] = value;
1353
- }
1354
- }
1355
- return result;
1356
- }
1357
-
1358
- var _arrayFilter = arrayFilter;
1359
-
1360
- /**
1361
- * This method returns a new empty array.
1362
- *
1363
- * @static
1364
- * @memberOf _
1365
- * @since 4.13.0
1366
- * @category Util
1367
- * @returns {Array} Returns the new empty array.
1368
- * @example
1369
- *
1370
- * var arrays = _.times(2, _.stubArray);
1371
- *
1372
- * console.log(arrays);
1373
- * // => [[], []]
1374
- *
1375
- * console.log(arrays[0] === arrays[1]);
1376
- * // => false
1377
- */
1378
- function stubArray() {
1379
- return [];
1380
- }
1381
-
1382
- var stubArray_1 = stubArray;
1383
-
1384
- /** Used for built-in method references. */
1385
- var objectProto$6 = Object.prototype;
1386
-
1387
- /** Built-in value references. */
1388
- var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
1389
-
1390
- /* Built-in method references for those with the same name as other `lodash` methods. */
1391
- var nativeGetSymbols = Object.getOwnPropertySymbols;
1392
-
1393
- /**
1394
- * Creates an array of the own enumerable symbols of `object`.
1395
- *
1396
- * @private
1397
- * @param {Object} object The object to query.
1398
- * @returns {Array} Returns the array of symbols.
1399
- */
1400
- var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
1401
- if (object == null) {
1402
- return [];
1403
- }
1404
- object = Object(object);
1405
- return _arrayFilter(nativeGetSymbols(object), function(symbol) {
1406
- return propertyIsEnumerable$1.call(object, symbol);
1407
- });
1408
- };
1409
-
1410
- var _getSymbols = getSymbols;
1411
-
1412
- /**
1413
- * The base implementation of `_.times` without support for iteratee shorthands
1414
- * or max array length checks.
1415
- *
1416
- * @private
1417
- * @param {number} n The number of times to invoke `iteratee`.
1418
- * @param {Function} iteratee The function invoked per iteration.
1419
- * @returns {Array} Returns the array of results.
1420
- */
1421
- function baseTimes(n, iteratee) {
1422
- var index = -1,
1423
- result = Array(n);
1424
-
1425
- while (++index < n) {
1426
- result[index] = iteratee(index);
1427
- }
1428
- return result;
1429
- }
1430
-
1431
- var _baseTimes = baseTimes;
1432
-
1433
- /**
1434
- * Checks if `value` is object-like. A value is object-like if it's not `null`
1435
- * and has a `typeof` result of "object".
1436
- *
1437
- * @static
1438
- * @memberOf _
1439
- * @since 4.0.0
1440
- * @category Lang
1441
- * @param {*} value The value to check.
1442
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1443
- * @example
1444
- *
1445
- * _.isObjectLike({});
1446
- * // => true
1447
- *
1448
- * _.isObjectLike([1, 2, 3]);
1449
- * // => true
1450
- *
1451
- * _.isObjectLike(_.noop);
1452
- * // => false
1453
- *
1454
- * _.isObjectLike(null);
1455
- * // => false
1456
- */
1457
- function isObjectLike(value) {
1458
- return value != null && typeof value == 'object';
1459
- }
1460
-
1461
- var isObjectLike_1 = isObjectLike;
1462
-
1463
- /** `Object#toString` result references. */
1464
- var argsTag$2 = '[object Arguments]';
1465
-
1466
- /**
1467
- * The base implementation of `_.isArguments`.
1468
- *
1469
- * @private
1470
- * @param {*} value The value to check.
1471
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1472
- */
1473
- function baseIsArguments(value) {
1474
- return isObjectLike_1(value) && _baseGetTag(value) == argsTag$2;
1475
- }
1476
-
1477
- var _baseIsArguments = baseIsArguments;
1478
-
1479
- /** Used for built-in method references. */
1480
- var objectProto$5 = Object.prototype;
1481
-
1482
- /** Used to check objects for own properties. */
1483
- var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
1484
-
1485
- /** Built-in value references. */
1486
- var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
1487
-
1488
- /**
1489
- * Checks if `value` is likely an `arguments` object.
1490
- *
1491
- * @static
1492
- * @memberOf _
1493
- * @since 0.1.0
1494
- * @category Lang
1495
- * @param {*} value The value to check.
1496
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1497
- * else `false`.
1498
- * @example
1499
- *
1500
- * _.isArguments(function() { return arguments; }());
1501
- * // => true
1502
- *
1503
- * _.isArguments([1, 2, 3]);
1504
- * // => false
1505
- */
1506
- var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
1507
- return isObjectLike_1(value) && hasOwnProperty$4.call(value, 'callee') &&
1508
- !propertyIsEnumerable.call(value, 'callee');
1509
- };
1510
-
1511
- var isArguments_1 = isArguments;
1512
-
1513
- /**
1514
- * This method returns `false`.
1515
- *
1516
- * @static
1517
- * @memberOf _
1518
- * @since 4.13.0
1519
- * @category Util
1520
- * @returns {boolean} Returns `false`.
1521
- * @example
1522
- *
1523
- * _.times(2, _.stubFalse);
1524
- * // => [false, false]
1525
- */
1526
- function stubFalse() {
1527
- return false;
1528
- }
1529
-
1530
- var stubFalse_1 = stubFalse;
1531
-
1532
- var isBuffer_1 = createCommonjsModule(function (module, exports) {
1533
- /** Detect free variable `exports`. */
1534
- var freeExports = exports && !exports.nodeType && exports;
1535
-
1536
- /** Detect free variable `module`. */
1537
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1538
-
1539
- /** Detect the popular CommonJS extension `module.exports`. */
1540
- var moduleExports = freeModule && freeModule.exports === freeExports;
1541
-
1542
- /** Built-in value references. */
1543
- var Buffer = moduleExports ? _root.Buffer : undefined;
1544
-
1545
- /* Built-in method references for those with the same name as other `lodash` methods. */
1546
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1547
-
1548
- /**
1549
- * Checks if `value` is a buffer.
1550
- *
1551
- * @static
1552
- * @memberOf _
1553
- * @since 4.3.0
1554
- * @category Lang
1555
- * @param {*} value The value to check.
1556
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1557
- * @example
1558
- *
1559
- * _.isBuffer(new Buffer(2));
1560
- * // => true
1561
- *
1562
- * _.isBuffer(new Uint8Array(2));
1563
- * // => false
1564
- */
1565
- var isBuffer = nativeIsBuffer || stubFalse_1;
1566
-
1567
- module.exports = isBuffer;
1568
- });
1569
-
1570
- /** Used as references for various `Number` constants. */
1571
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
1572
-
1573
- /** Used to detect unsigned integer values. */
1574
- var reIsUint = /^(?:0|[1-9]\d*)$/;
1575
-
1576
- /**
1577
- * Checks if `value` is a valid array-like index.
1578
- *
1579
- * @private
1580
- * @param {*} value The value to check.
1581
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1582
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1583
- */
1584
- function isIndex(value, length) {
1585
- var type = typeof value;
1586
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
1587
-
1588
- return !!length &&
1589
- (type == 'number' ||
1590
- (type != 'symbol' && reIsUint.test(value))) &&
1591
- (value > -1 && value % 1 == 0 && value < length);
1592
- }
1593
-
1594
- var _isIndex = isIndex;
1595
-
1596
- /** Used as references for various `Number` constants. */
1597
- var MAX_SAFE_INTEGER = 9007199254740991;
1598
-
1599
- /**
1600
- * Checks if `value` is a valid array-like length.
1601
- *
1602
- * **Note:** This method is loosely based on
1603
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1604
- *
1605
- * @static
1606
- * @memberOf _
1607
- * @since 4.0.0
1608
- * @category Lang
1609
- * @param {*} value The value to check.
1610
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1611
- * @example
1612
- *
1613
- * _.isLength(3);
1614
- * // => true
1615
- *
1616
- * _.isLength(Number.MIN_VALUE);
1617
- * // => false
1618
- *
1619
- * _.isLength(Infinity);
1620
- * // => false
1621
- *
1622
- * _.isLength('3');
1623
- * // => false
1624
- */
1625
- function isLength(value) {
1626
- return typeof value == 'number' &&
1627
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1628
- }
1629
-
1630
- var isLength_1 = isLength;
1631
-
1632
- /** `Object#toString` result references. */
1633
- var argsTag$1 = '[object Arguments]',
1634
- arrayTag$1 = '[object Array]',
1635
- boolTag = '[object Boolean]',
1636
- dateTag = '[object Date]',
1637
- errorTag = '[object Error]',
1638
- funcTag = '[object Function]',
1639
- mapTag$1 = '[object Map]',
1640
- numberTag = '[object Number]',
1641
- objectTag$2 = '[object Object]',
1642
- regexpTag = '[object RegExp]',
1643
- setTag$1 = '[object Set]',
1644
- stringTag = '[object String]',
1645
- weakMapTag$1 = '[object WeakMap]';
1646
-
1647
- var arrayBufferTag = '[object ArrayBuffer]',
1648
- dataViewTag$1 = '[object DataView]',
1649
- float32Tag = '[object Float32Array]',
1650
- float64Tag = '[object Float64Array]',
1651
- int8Tag = '[object Int8Array]',
1652
- int16Tag = '[object Int16Array]',
1653
- int32Tag = '[object Int32Array]',
1654
- uint8Tag = '[object Uint8Array]',
1655
- uint8ClampedTag = '[object Uint8ClampedArray]',
1656
- uint16Tag = '[object Uint16Array]',
1657
- uint32Tag = '[object Uint32Array]';
1658
-
1659
- /** Used to identify `toStringTag` values of typed arrays. */
1660
- var typedArrayTags = {};
1661
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1662
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1663
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1664
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1665
- typedArrayTags[uint32Tag] = true;
1666
- typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1667
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1668
- typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
1669
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1670
- typedArrayTags[mapTag$1] = typedArrayTags[numberTag] =
1671
- typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] =
1672
- typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
1673
- typedArrayTags[weakMapTag$1] = false;
1674
-
1675
- /**
1676
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
1677
- *
1678
- * @private
1679
- * @param {*} value The value to check.
1680
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1681
- */
1682
- function baseIsTypedArray(value) {
1683
- return isObjectLike_1(value) &&
1684
- isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
1685
- }
1686
-
1687
- var _baseIsTypedArray = baseIsTypedArray;
1688
-
1689
- /**
1690
- * The base implementation of `_.unary` without support for storing metadata.
1691
- *
1692
- * @private
1693
- * @param {Function} func The function to cap arguments for.
1694
- * @returns {Function} Returns the new capped function.
1695
- */
1696
- function baseUnary(func) {
1697
- return function(value) {
1698
- return func(value);
1699
- };
1700
- }
1701
-
1702
- var _baseUnary = baseUnary;
1703
-
1704
- var _nodeUtil = createCommonjsModule(function (module, exports) {
1705
- /** Detect free variable `exports`. */
1706
- var freeExports = exports && !exports.nodeType && exports;
1707
-
1708
- /** Detect free variable `module`. */
1709
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1710
-
1711
- /** Detect the popular CommonJS extension `module.exports`. */
1712
- var moduleExports = freeModule && freeModule.exports === freeExports;
1713
-
1714
- /** Detect free variable `process` from Node.js. */
1715
- var freeProcess = moduleExports && _freeGlobal.process;
1716
-
1717
- /** Used to access faster Node.js helpers. */
1718
- var nodeUtil = (function() {
1719
- try {
1720
- // Use `util.types` for Node.js 10+.
1721
- var types = freeModule && freeModule.require && freeModule.require('util').types;
1722
-
1723
- if (types) {
1724
- return types;
1725
- }
1726
-
1727
- // Legacy `process.binding('util')` for Node.js < 10.
1728
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
1729
- } catch (e) {}
1730
- }());
1731
-
1732
- module.exports = nodeUtil;
1733
- });
1734
-
1735
- /* Node.js helper references. */
1736
- var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
1737
-
1738
- /**
1739
- * Checks if `value` is classified as a typed array.
1740
- *
1741
- * @static
1742
- * @memberOf _
1743
- * @since 3.0.0
1744
- * @category Lang
1745
- * @param {*} value The value to check.
1746
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1747
- * @example
1748
- *
1749
- * _.isTypedArray(new Uint8Array);
1750
- * // => true
1751
- *
1752
- * _.isTypedArray([]);
1753
- * // => false
1754
- */
1755
- var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
1756
-
1757
- var isTypedArray_1 = isTypedArray;
1758
-
1759
- /** Used for built-in method references. */
1760
- var objectProto$4 = Object.prototype;
1761
-
1762
- /** Used to check objects for own properties. */
1763
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1764
-
1765
- /**
1766
- * Creates an array of the enumerable property names of the array-like `value`.
1767
- *
1768
- * @private
1769
- * @param {*} value The value to query.
1770
- * @param {boolean} inherited Specify returning inherited property names.
1771
- * @returns {Array} Returns the array of property names.
1772
- */
1773
- function arrayLikeKeys(value, inherited) {
1774
- var isArr = isArray_1(value),
1775
- isArg = !isArr && isArguments_1(value),
1776
- isBuff = !isArr && !isArg && isBuffer_1(value),
1777
- isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
1778
- skipIndexes = isArr || isArg || isBuff || isType,
1779
- result = skipIndexes ? _baseTimes(value.length, String) : [],
1780
- length = result.length;
1781
-
1782
- for (var key in value) {
1783
- if ((inherited || hasOwnProperty$3.call(value, key)) &&
1784
- !(skipIndexes && (
1785
- // Safari 9 has enumerable `arguments.length` in strict mode.
1786
- key == 'length' ||
1787
- // Node.js 0.10 has enumerable non-index properties on buffers.
1788
- (isBuff && (key == 'offset' || key == 'parent')) ||
1789
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
1790
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1791
- // Skip index properties.
1792
- _isIndex(key, length)
1793
- ))) {
1794
- result.push(key);
1795
- }
1796
- }
1797
- return result;
1798
- }
1799
-
1800
- var _arrayLikeKeys = arrayLikeKeys;
1801
-
1802
- /** Used for built-in method references. */
1803
- var objectProto$3 = Object.prototype;
1804
-
1805
- /**
1806
- * Checks if `value` is likely a prototype object.
1807
- *
1808
- * @private
1809
- * @param {*} value The value to check.
1810
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1811
- */
1812
- function isPrototype(value) {
1813
- var Ctor = value && value.constructor,
1814
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$3;
1815
-
1816
- return value === proto;
1817
- }
1818
-
1819
- var _isPrototype = isPrototype;
1820
-
1821
- /**
1822
- * Creates a unary function that invokes `func` with its argument transformed.
1823
- *
1824
- * @private
1825
- * @param {Function} func The function to wrap.
1826
- * @param {Function} transform The argument transform.
1827
- * @returns {Function} Returns the new function.
1828
- */
1829
- function overArg(func, transform) {
1830
- return function(arg) {
1831
- return func(transform(arg));
1832
- };
1833
- }
1834
-
1835
- var _overArg = overArg;
1836
-
1837
- /* Built-in method references for those with the same name as other `lodash` methods. */
1838
- var nativeKeys = _overArg(Object.keys, Object);
1839
-
1840
- var _nativeKeys = nativeKeys;
1841
-
1842
- /** Used for built-in method references. */
1843
- var objectProto$2 = Object.prototype;
1844
-
1845
- /** Used to check objects for own properties. */
1846
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1847
-
1848
- /**
1849
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1850
- *
1851
- * @private
1852
- * @param {Object} object The object to query.
1853
- * @returns {Array} Returns the array of property names.
1854
- */
1855
- function baseKeys(object) {
1856
- if (!_isPrototype(object)) {
1857
- return _nativeKeys(object);
1858
- }
1859
- var result = [];
1860
- for (var key in Object(object)) {
1861
- if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
1862
- result.push(key);
1863
- }
1864
- }
1865
- return result;
1866
- }
1867
-
1868
- var _baseKeys = baseKeys;
1869
-
1870
- /**
1871
- * Checks if `value` is array-like. A value is considered array-like if it's
1872
- * not a function and has a `value.length` that's an integer greater than or
1873
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1874
- *
1875
- * @static
1876
- * @memberOf _
1877
- * @since 4.0.0
1878
- * @category Lang
1879
- * @param {*} value The value to check.
1880
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1881
- * @example
1882
- *
1883
- * _.isArrayLike([1, 2, 3]);
1884
- * // => true
1885
- *
1886
- * _.isArrayLike(document.body.children);
1887
- * // => true
1888
- *
1889
- * _.isArrayLike('abc');
1890
- * // => true
1891
- *
1892
- * _.isArrayLike(_.noop);
1893
- * // => false
1894
- */
1895
- function isArrayLike(value) {
1896
- return value != null && isLength_1(value.length) && !isFunction_1(value);
1897
- }
1898
-
1899
- var isArrayLike_1 = isArrayLike;
1900
-
1901
- /**
1902
- * Creates an array of the own enumerable property names of `object`.
1903
- *
1904
- * **Note:** Non-object values are coerced to objects. See the
1905
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1906
- * for more details.
1907
- *
1908
- * @static
1909
- * @since 0.1.0
1910
- * @memberOf _
1911
- * @category Object
1912
- * @param {Object} object The object to query.
1913
- * @returns {Array} Returns the array of property names.
1914
- * @example
1915
- *
1916
- * function Foo() {
1917
- * this.a = 1;
1918
- * this.b = 2;
1919
- * }
1920
- *
1921
- * Foo.prototype.c = 3;
1922
- *
1923
- * _.keys(new Foo);
1924
- * // => ['a', 'b'] (iteration order is not guaranteed)
1925
- *
1926
- * _.keys('hi');
1927
- * // => ['0', '1']
1928
- */
1929
- function keys(object) {
1930
- return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
1931
- }
1932
-
1933
- var keys_1 = keys;
1934
-
1935
- /**
1936
- * Creates an array of own enumerable property names and symbols of `object`.
1937
- *
1938
- * @private
1939
- * @param {Object} object The object to query.
1940
- * @returns {Array} Returns the array of property names and symbols.
1941
- */
1942
- function getAllKeys(object) {
1943
- return _baseGetAllKeys(object, keys_1, _getSymbols);
1944
- }
1945
-
1946
- var _getAllKeys = getAllKeys;
1947
-
1948
- /** Used to compose bitmasks for value comparisons. */
1949
- var COMPARE_PARTIAL_FLAG$1 = 1;
1950
-
1951
- /** Used for built-in method references. */
1952
- var objectProto$1 = Object.prototype;
1953
-
1954
- /** Used to check objects for own properties. */
1955
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1956
-
1957
- /**
1958
- * A specialized version of `baseIsEqualDeep` for objects with support for
1959
- * partial deep comparisons.
1960
- *
1961
- * @private
1962
- * @param {Object} object The object to compare.
1963
- * @param {Object} other The other object to compare.
1964
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1965
- * @param {Function} customizer The function to customize comparisons.
1966
- * @param {Function} equalFunc The function to determine equivalents of values.
1967
- * @param {Object} stack Tracks traversed `object` and `other` objects.
1968
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1969
- */
1970
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
1971
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
1972
- objProps = _getAllKeys(object),
1973
- objLength = objProps.length,
1974
- othProps = _getAllKeys(other),
1975
- othLength = othProps.length;
1976
-
1977
- if (objLength != othLength && !isPartial) {
1978
- return false;
1979
- }
1980
- var index = objLength;
1981
- while (index--) {
1982
- var key = objProps[index];
1983
- if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
1984
- return false;
1985
- }
1986
- }
1987
- // Check that cyclic values are equal.
1988
- var objStacked = stack.get(object);
1989
- var othStacked = stack.get(other);
1990
- if (objStacked && othStacked) {
1991
- return objStacked == other && othStacked == object;
1992
- }
1993
- var result = true;
1994
- stack.set(object, other);
1995
- stack.set(other, object);
1996
-
1997
- var skipCtor = isPartial;
1998
- while (++index < objLength) {
1999
- key = objProps[index];
2000
- var objValue = object[key],
2001
- othValue = other[key];
2002
-
2003
- if (customizer) {
2004
- var compared = isPartial
2005
- ? customizer(othValue, objValue, key, other, object, stack)
2006
- : customizer(objValue, othValue, key, object, other, stack);
2007
- }
2008
- // Recursively compare objects (susceptible to call stack limits).
2009
- if (!(compared === undefined
2010
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
2011
- : compared
2012
- )) {
2013
- result = false;
2014
- break;
2015
- }
2016
- skipCtor || (skipCtor = key == 'constructor');
2017
- }
2018
- if (result && !skipCtor) {
2019
- var objCtor = object.constructor,
2020
- othCtor = other.constructor;
2021
-
2022
- // Non `Object` object instances with different constructors are not equal.
2023
- if (objCtor != othCtor &&
2024
- ('constructor' in object && 'constructor' in other) &&
2025
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2026
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2027
- result = false;
2028
- }
2029
- }
2030
- stack['delete'](object);
2031
- stack['delete'](other);
2032
- return result;
2033
- }
2034
-
2035
- var _equalObjects = equalObjects;
2036
-
2037
- /* Built-in method references that are verified to be native. */
2038
- var DataView = _getNative(_root, 'DataView');
2039
-
2040
- var _DataView = DataView;
2041
-
2042
- /* Built-in method references that are verified to be native. */
2043
- var Promise$1 = _getNative(_root, 'Promise');
2044
-
2045
- var _Promise = Promise$1;
2046
-
2047
- /* Built-in method references that are verified to be native. */
2048
- var Set = _getNative(_root, 'Set');
2049
-
2050
- var _Set = Set;
2051
-
2052
- /* Built-in method references that are verified to be native. */
2053
- var WeakMap = _getNative(_root, 'WeakMap');
2054
-
2055
- var _WeakMap = WeakMap;
2056
-
2057
- /** `Object#toString` result references. */
2058
- var mapTag = '[object Map]',
2059
- objectTag$1 = '[object Object]',
2060
- promiseTag = '[object Promise]',
2061
- setTag = '[object Set]',
2062
- weakMapTag = '[object WeakMap]';
2063
-
2064
- var dataViewTag = '[object DataView]';
2065
-
2066
- /** Used to detect maps, sets, and weakmaps. */
2067
- var dataViewCtorString = _toSource(_DataView),
2068
- mapCtorString = _toSource(_Map),
2069
- promiseCtorString = _toSource(_Promise),
2070
- setCtorString = _toSource(_Set),
2071
- weakMapCtorString = _toSource(_WeakMap);
2072
-
2073
- /**
2074
- * Gets the `toStringTag` of `value`.
2075
- *
2076
- * @private
2077
- * @param {*} value The value to query.
2078
- * @returns {string} Returns the `toStringTag`.
2079
- */
2080
- var getTag = _baseGetTag;
2081
-
2082
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2083
- if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
2084
- (_Map && getTag(new _Map) != mapTag) ||
2085
- (_Promise && getTag(_Promise.resolve()) != promiseTag) ||
2086
- (_Set && getTag(new _Set) != setTag) ||
2087
- (_WeakMap && getTag(new _WeakMap) != weakMapTag)) {
2088
- getTag = function(value) {
2089
- var result = _baseGetTag(value),
2090
- Ctor = result == objectTag$1 ? value.constructor : undefined,
2091
- ctorString = Ctor ? _toSource(Ctor) : '';
2092
-
2093
- if (ctorString) {
2094
- switch (ctorString) {
2095
- case dataViewCtorString: return dataViewTag;
2096
- case mapCtorString: return mapTag;
2097
- case promiseCtorString: return promiseTag;
2098
- case setCtorString: return setTag;
2099
- case weakMapCtorString: return weakMapTag;
2100
- }
2101
- }
2102
- return result;
2103
- };
2104
- }
2105
-
2106
- var _getTag = getTag;
2107
-
2108
- /** Used to compose bitmasks for value comparisons. */
2109
- var COMPARE_PARTIAL_FLAG = 1;
2110
-
2111
- /** `Object#toString` result references. */
2112
- var argsTag = '[object Arguments]',
2113
- arrayTag = '[object Array]',
2114
- objectTag = '[object Object]';
2115
-
2116
- /** Used for built-in method references. */
2117
- var objectProto = Object.prototype;
2118
-
2119
- /** Used to check objects for own properties. */
2120
- var hasOwnProperty = objectProto.hasOwnProperty;
2121
-
2122
- /**
2123
- * A specialized version of `baseIsEqual` for arrays and objects which performs
2124
- * deep comparisons and tracks traversed objects enabling objects with circular
2125
- * references to be compared.
2126
- *
2127
- * @private
2128
- * @param {Object} object The object to compare.
2129
- * @param {Object} other The other object to compare.
2130
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2131
- * @param {Function} customizer The function to customize comparisons.
2132
- * @param {Function} equalFunc The function to determine equivalents of values.
2133
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
2134
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2135
- */
2136
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
2137
- var objIsArr = isArray_1(object),
2138
- othIsArr = isArray_1(other),
2139
- objTag = objIsArr ? arrayTag : _getTag(object),
2140
- othTag = othIsArr ? arrayTag : _getTag(other);
2141
-
2142
- objTag = objTag == argsTag ? objectTag : objTag;
2143
- othTag = othTag == argsTag ? objectTag : othTag;
2144
-
2145
- var objIsObj = objTag == objectTag,
2146
- othIsObj = othTag == objectTag,
2147
- isSameTag = objTag == othTag;
2148
-
2149
- if (isSameTag && isBuffer_1(object)) {
2150
- if (!isBuffer_1(other)) {
2151
- return false;
2152
- }
2153
- objIsArr = true;
2154
- objIsObj = false;
2155
- }
2156
- if (isSameTag && !objIsObj) {
2157
- stack || (stack = new _Stack);
2158
- return (objIsArr || isTypedArray_1(object))
2159
- ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
2160
- : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
2161
- }
2162
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
2163
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
2164
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
2165
-
2166
- if (objIsWrapped || othIsWrapped) {
2167
- var objUnwrapped = objIsWrapped ? object.value() : object,
2168
- othUnwrapped = othIsWrapped ? other.value() : other;
2169
-
2170
- stack || (stack = new _Stack);
2171
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
2172
- }
2173
- }
2174
- if (!isSameTag) {
2175
- return false;
2176
- }
2177
- stack || (stack = new _Stack);
2178
- return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
2179
- }
2180
-
2181
- var _baseIsEqualDeep = baseIsEqualDeep;
2182
-
2183
- /**
2184
- * The base implementation of `_.isEqual` which supports partial comparisons
2185
- * and tracks traversed objects.
2186
- *
2187
- * @private
2188
- * @param {*} value The value to compare.
2189
- * @param {*} other The other value to compare.
2190
- * @param {boolean} bitmask The bitmask flags.
2191
- * 1 - Unordered comparison
2192
- * 2 - Partial comparison
2193
- * @param {Function} [customizer] The function to customize comparisons.
2194
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
2195
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2196
- */
2197
- function baseIsEqual(value, other, bitmask, customizer, stack) {
2198
- if (value === other) {
2199
- return true;
2200
- }
2201
- if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {
2202
- return value !== value && other !== other;
2203
- }
2204
- return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
2205
- }
2206
-
2207
- var _baseIsEqual = baseIsEqual;
2208
-
2209
- /**
2210
- * Performs a deep comparison between two values to determine if they are
2211
- * equivalent.
2212
- *
2213
- * **Note:** This method supports comparing arrays, array buffers, booleans,
2214
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
2215
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
2216
- * by their own, not inherited, enumerable properties. Functions and DOM
2217
- * nodes are compared by strict equality, i.e. `===`.
2218
- *
2219
- * @static
2220
- * @memberOf _
2221
- * @since 0.1.0
2222
- * @category Lang
2223
- * @param {*} value The value to compare.
2224
- * @param {*} other The other value to compare.
2225
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2226
- * @example
2227
- *
2228
- * var object = { 'a': 1 };
2229
- * var other = { 'a': 1 };
2230
- *
2231
- * _.isEqual(object, other);
2232
- * // => true
2233
- *
2234
- * object === other;
2235
- * // => false
2236
- */
2237
- function isEqual(value, other) {
2238
- return _baseIsEqual(value, other);
2239
- }
2240
-
2241
- var isEqual_1 = isEqual;
2242
-
2243
45
  var style$4 = {"select-input":"_d8lGc","disabled":"_3kjwO","wrap":"_dsTM2","select-input-inner":"_NQoX9","large":"_T8ZX8","small":"_1B72H","select-input-icon":"_g8QC-","placeholder":"_r3q69","overlay-content":"_zEqGe","overlay":"_ybN30","select-input-prefix":"_4Pw75","select-input-suffix":"_Wd4pE"};
2244
46
 
2245
47
  const numberToPx = val => {
@@ -2264,7 +66,7 @@ const ModalContent = _ref => {
2264
66
  } = others;
2265
67
  const [value, setValue] = React.useState(propsValue);
2266
68
  React.useEffect(() => {
2267
- if (open && !isEqual_1(value, propsValue)) {
69
+ if (open && !isEqual__default["default"](value, propsValue)) {
2268
70
  setValue(propsValue);
2269
71
  }
2270
72
  }, [open]);
@@ -2281,7 +83,7 @@ const ModalContent = _ref => {
2281
83
  value: contextProps
2282
84
  }, children(contextProps));
2283
85
  };
2284
- const SelectInput = p => {
86
+ const SelectInput = React.forwardRef((p, ref) => {
2285
87
  const locale = Object.assign({}, {
2286
88
  placeholder: '请选择',
2287
89
  selectAll: '全选',
@@ -2345,15 +147,6 @@ const SelectInput = p => {
2345
147
  [props.valueKey]: props.selectedAllValue.value,
2346
148
  [props.labelKey]: props.selectedAllValue.label
2347
149
  };
2348
- const [stateValue, setValue] = useControlValue__default["default"](props);
2349
- const value = stateValue || [];
2350
- const [searchText, setSearchText] = React.useState('');
2351
- const [open, setOpen] = React.useState(false);
2352
- const [hover, setHover] = React.useState(false);
2353
- const [inputWidth, setInputWidth] = React.useState(0);
2354
- const inputRef = useResize__default["default"](el => {
2355
- setInputWidth(el.clientWidth);
2356
- });
2357
150
  const {
2358
151
  children,
2359
152
  prefix,
@@ -2374,6 +167,29 @@ const SelectInput = p => {
2374
167
  labelKey,
2375
168
  valueKey
2376
169
  } = props;
170
+ const transformValue = value => {
171
+ if (single) {
172
+ return isEmpty.isNotEmpty(value) ? [value] : [];
173
+ } else {
174
+ return Array.isArray(value) ? value : [];
175
+ }
176
+ };
177
+ const [value, setValue] = useControlValue__default["default"](Object.assign({}, props, {
178
+ onChange: value => {
179
+ props.onChange && props.onChange(props.single ? last__default["default"](value) : value);
180
+ }
181
+ }, 'value' in props ? {
182
+ value: transformValue(props.value)
183
+ } : {
184
+ defaultValue: transformValue(props.defaultValue)
185
+ }));
186
+ const [searchProps, setSearchProps] = React.useState({});
187
+ const [open, setOpen] = React.useState(false);
188
+ const [hover, setHover] = React.useState(false);
189
+ const [inputWidth, setInputWidth] = React.useState(0);
190
+ const inputRef = useResize__default["default"](el => {
191
+ setInputWidth(el.clientWidth);
192
+ });
2377
193
  const popupOverlayWidth = numberToPx(Math.max(inputWidth, pxToNumber(overlayWidth)));
2378
194
  const {
2379
195
  message
@@ -2483,8 +299,8 @@ const SelectInput = p => {
2483
299
  props,
2484
300
  value: value,
2485
301
  setValue,
2486
- searchText,
2487
- setSearchText,
302
+ searchProps,
303
+ setSearchProps,
2488
304
  hover,
2489
305
  inputWidth,
2490
306
  onAdd,
@@ -2494,6 +310,9 @@ const SelectInput = p => {
2494
310
  onOpenChange: setOpen,
2495
311
  children
2496
312
  };
313
+ React.useImperativeHandle(ref, () => {
314
+ return contextProps;
315
+ });
2497
316
  return /*#__PURE__*/React__default["default"].createElement(Provider, {
2498
317
  value: contextProps
2499
318
  }, isPopup ? /*#__PURE__*/React__default["default"].createElement(antd.Dropdown, {
@@ -2517,358 +336,8 @@ const SelectInput = p => {
2517
336
  setOpen(true);
2518
337
  }
2519
338
  }), /*#__PURE__*/React__default["default"].createElement(ModalContent, contextProps, renderModal)));
2520
- };
2521
-
2522
- /** `Object#toString` result references. */
2523
- var symbolTag = '[object Symbol]';
2524
-
2525
- /**
2526
- * Checks if `value` is classified as a `Symbol` primitive or object.
2527
- *
2528
- * @static
2529
- * @memberOf _
2530
- * @since 4.0.0
2531
- * @category Lang
2532
- * @param {*} value The value to check.
2533
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2534
- * @example
2535
- *
2536
- * _.isSymbol(Symbol.iterator);
2537
- * // => true
2538
- *
2539
- * _.isSymbol('abc');
2540
- * // => false
2541
- */
2542
- function isSymbol(value) {
2543
- return typeof value == 'symbol' ||
2544
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
2545
- }
2546
-
2547
- var isSymbol_1 = isSymbol;
2548
-
2549
- /** Used to match property names within property paths. */
2550
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2551
- reIsPlainProp = /^\w*$/;
2552
-
2553
- /**
2554
- * Checks if `value` is a property name and not a property path.
2555
- *
2556
- * @private
2557
- * @param {*} value The value to check.
2558
- * @param {Object} [object] The object to query keys on.
2559
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2560
- */
2561
- function isKey(value, object) {
2562
- if (isArray_1(value)) {
2563
- return false;
2564
- }
2565
- var type = typeof value;
2566
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2567
- value == null || isSymbol_1(value)) {
2568
- return true;
2569
- }
2570
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2571
- (object != null && value in Object(object));
2572
- }
2573
-
2574
- var _isKey = isKey;
2575
-
2576
- /** Error message constants. */
2577
- var FUNC_ERROR_TEXT = 'Expected a function';
2578
-
2579
- /**
2580
- * Creates a function that memoizes the result of `func`. If `resolver` is
2581
- * provided, it determines the cache key for storing the result based on the
2582
- * arguments provided to the memoized function. By default, the first argument
2583
- * provided to the memoized function is used as the map cache key. The `func`
2584
- * is invoked with the `this` binding of the memoized function.
2585
- *
2586
- * **Note:** The cache is exposed as the `cache` property on the memoized
2587
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
2588
- * constructor with one whose instances implement the
2589
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2590
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
2591
- *
2592
- * @static
2593
- * @memberOf _
2594
- * @since 0.1.0
2595
- * @category Function
2596
- * @param {Function} func The function to have its output memoized.
2597
- * @param {Function} [resolver] The function to resolve the cache key.
2598
- * @returns {Function} Returns the new memoized function.
2599
- * @example
2600
- *
2601
- * var object = { 'a': 1, 'b': 2 };
2602
- * var other = { 'c': 3, 'd': 4 };
2603
- *
2604
- * var values = _.memoize(_.values);
2605
- * values(object);
2606
- * // => [1, 2]
2607
- *
2608
- * values(other);
2609
- * // => [3, 4]
2610
- *
2611
- * object.a = 2;
2612
- * values(object);
2613
- * // => [1, 2]
2614
- *
2615
- * // Modify the result cache.
2616
- * values.cache.set(object, ['a', 'b']);
2617
- * values(object);
2618
- * // => ['a', 'b']
2619
- *
2620
- * // Replace `_.memoize.Cache`.
2621
- * _.memoize.Cache = WeakMap;
2622
- */
2623
- function memoize(func, resolver) {
2624
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
2625
- throw new TypeError(FUNC_ERROR_TEXT);
2626
- }
2627
- var memoized = function() {
2628
- var args = arguments,
2629
- key = resolver ? resolver.apply(this, args) : args[0],
2630
- cache = memoized.cache;
2631
-
2632
- if (cache.has(key)) {
2633
- return cache.get(key);
2634
- }
2635
- var result = func.apply(this, args);
2636
- memoized.cache = cache.set(key, result) || cache;
2637
- return result;
2638
- };
2639
- memoized.cache = new (memoize.Cache || _MapCache);
2640
- return memoized;
2641
- }
2642
-
2643
- // Expose `MapCache`.
2644
- memoize.Cache = _MapCache;
2645
-
2646
- var memoize_1 = memoize;
2647
-
2648
- /** Used as the maximum memoize cache size. */
2649
- var MAX_MEMOIZE_SIZE = 500;
2650
-
2651
- /**
2652
- * A specialized version of `_.memoize` which clears the memoized function's
2653
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
2654
- *
2655
- * @private
2656
- * @param {Function} func The function to have its output memoized.
2657
- * @returns {Function} Returns the new memoized function.
2658
- */
2659
- function memoizeCapped(func) {
2660
- var result = memoize_1(func, function(key) {
2661
- if (cache.size === MAX_MEMOIZE_SIZE) {
2662
- cache.clear();
2663
- }
2664
- return key;
2665
- });
2666
-
2667
- var cache = result.cache;
2668
- return result;
2669
- }
2670
-
2671
- var _memoizeCapped = memoizeCapped;
2672
-
2673
- /** Used to match property names within property paths. */
2674
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2675
-
2676
- /** Used to match backslashes in property paths. */
2677
- var reEscapeChar = /\\(\\)?/g;
2678
-
2679
- /**
2680
- * Converts `string` to a property path array.
2681
- *
2682
- * @private
2683
- * @param {string} string The string to convert.
2684
- * @returns {Array} Returns the property path array.
2685
- */
2686
- var stringToPath = _memoizeCapped(function(string) {
2687
- var result = [];
2688
- if (string.charCodeAt(0) === 46 /* . */) {
2689
- result.push('');
2690
- }
2691
- string.replace(rePropName, function(match, number, quote, subString) {
2692
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
2693
- });
2694
- return result;
2695
339
  });
2696
340
 
2697
- var _stringToPath = stringToPath;
2698
-
2699
- /**
2700
- * A specialized version of `_.map` for arrays without support for iteratee
2701
- * shorthands.
2702
- *
2703
- * @private
2704
- * @param {Array} [array] The array to iterate over.
2705
- * @param {Function} iteratee The function invoked per iteration.
2706
- * @returns {Array} Returns the new mapped array.
2707
- */
2708
- function arrayMap(array, iteratee) {
2709
- var index = -1,
2710
- length = array == null ? 0 : array.length,
2711
- result = Array(length);
2712
-
2713
- while (++index < length) {
2714
- result[index] = iteratee(array[index], index, array);
2715
- }
2716
- return result;
2717
- }
2718
-
2719
- var _arrayMap = arrayMap;
2720
-
2721
- /** Used as references for various `Number` constants. */
2722
- var INFINITY$1 = 1 / 0;
2723
-
2724
- /** Used to convert symbols to primitives and strings. */
2725
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
2726
- symbolToString = symbolProto ? symbolProto.toString : undefined;
2727
-
2728
- /**
2729
- * The base implementation of `_.toString` which doesn't convert nullish
2730
- * values to empty strings.
2731
- *
2732
- * @private
2733
- * @param {*} value The value to process.
2734
- * @returns {string} Returns the string.
2735
- */
2736
- function baseToString(value) {
2737
- // Exit early for strings to avoid a performance hit in some environments.
2738
- if (typeof value == 'string') {
2739
- return value;
2740
- }
2741
- if (isArray_1(value)) {
2742
- // Recursively convert values (susceptible to call stack limits).
2743
- return _arrayMap(value, baseToString) + '';
2744
- }
2745
- if (isSymbol_1(value)) {
2746
- return symbolToString ? symbolToString.call(value) : '';
2747
- }
2748
- var result = (value + '');
2749
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
2750
- }
2751
-
2752
- var _baseToString = baseToString;
2753
-
2754
- /**
2755
- * Converts `value` to a string. An empty string is returned for `null`
2756
- * and `undefined` values. The sign of `-0` is preserved.
2757
- *
2758
- * @static
2759
- * @memberOf _
2760
- * @since 4.0.0
2761
- * @category Lang
2762
- * @param {*} value The value to convert.
2763
- * @returns {string} Returns the converted string.
2764
- * @example
2765
- *
2766
- * _.toString(null);
2767
- * // => ''
2768
- *
2769
- * _.toString(-0);
2770
- * // => '-0'
2771
- *
2772
- * _.toString([1, 2, 3]);
2773
- * // => '1,2,3'
2774
- */
2775
- function toString(value) {
2776
- return value == null ? '' : _baseToString(value);
2777
- }
2778
-
2779
- var toString_1 = toString;
2780
-
2781
- /**
2782
- * Casts `value` to a path array if it's not one.
2783
- *
2784
- * @private
2785
- * @param {*} value The value to inspect.
2786
- * @param {Object} [object] The object to query keys on.
2787
- * @returns {Array} Returns the cast property path array.
2788
- */
2789
- function castPath(value, object) {
2790
- if (isArray_1(value)) {
2791
- return value;
2792
- }
2793
- return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
2794
- }
2795
-
2796
- var _castPath = castPath;
2797
-
2798
- /** Used as references for various `Number` constants. */
2799
- var INFINITY = 1 / 0;
2800
-
2801
- /**
2802
- * Converts `value` to a string key if it's not a string or symbol.
2803
- *
2804
- * @private
2805
- * @param {*} value The value to inspect.
2806
- * @returns {string|symbol} Returns the key.
2807
- */
2808
- function toKey(value) {
2809
- if (typeof value == 'string' || isSymbol_1(value)) {
2810
- return value;
2811
- }
2812
- var result = (value + '');
2813
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2814
- }
2815
-
2816
- var _toKey = toKey;
2817
-
2818
- /**
2819
- * The base implementation of `_.get` without support for default values.
2820
- *
2821
- * @private
2822
- * @param {Object} object The object to query.
2823
- * @param {Array|string} path The path of the property to get.
2824
- * @returns {*} Returns the resolved value.
2825
- */
2826
- function baseGet(object, path) {
2827
- path = _castPath(path, object);
2828
-
2829
- var index = 0,
2830
- length = path.length;
2831
-
2832
- while (object != null && index < length) {
2833
- object = object[_toKey(path[index++])];
2834
- }
2835
- return (index && index == length) ? object : undefined;
2836
- }
2837
-
2838
- var _baseGet = baseGet;
2839
-
2840
- /**
2841
- * Gets the value at `path` of `object`. If the resolved value is
2842
- * `undefined`, the `defaultValue` is returned in its place.
2843
- *
2844
- * @static
2845
- * @memberOf _
2846
- * @since 3.7.0
2847
- * @category Object
2848
- * @param {Object} object The object to query.
2849
- * @param {Array|string} path The path of the property to get.
2850
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
2851
- * @returns {*} Returns the resolved value.
2852
- * @example
2853
- *
2854
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2855
- *
2856
- * _.get(object, 'a[0].b.c');
2857
- * // => 3
2858
- *
2859
- * _.get(object, ['a', '0', 'b', 'c']);
2860
- * // => 3
2861
- *
2862
- * _.get(object, 'a.b.c', 'default');
2863
- * // => 'default'
2864
- */
2865
- function get(object, path, defaultValue) {
2866
- var result = object == null ? undefined : _baseGet(object, path);
2867
- return result === undefined ? defaultValue : result;
2868
- }
2869
-
2870
- var get_1 = get;
2871
-
2872
341
  var style$3 = {"selected-all":"_prlgN"};
2873
342
 
2874
343
  const SelectedAll = () => {
@@ -2907,7 +376,7 @@ const computedIsSelectAll = function (value, selectedAllValue, valueKey) {
2907
376
  if (valueKey === void 0) {
2908
377
  valueKey = 'value';
2909
378
  }
2910
- return value?.length === 1 && get_1(value, `[0][${valueKey}]`) === selectedAllValue[valueKey];
379
+ return value?.length === 1 && get__default["default"](value, `[0][${valueKey}]`) === selectedAllValue[valueKey];
2911
380
  };
2912
381
 
2913
382
  var style$2 = {"label":"_l3KoW","tag-list":"_CCPzb","tag-container":"_dKZHi","tag-container-inner":"_oijCI","tag":"_WmnnS","tag-inner":"_TMcFl"};
@@ -2954,7 +423,7 @@ const SelectedTagList = () => {
2954
423
 
2955
424
  var style$1 = {"list":"_IsXdU","is-popup":"_-dvpa","default-list":"_QD1Mz","is-selected-all":"_M-mOy","default-list-item":"_KtOsz","is-selected":"_TQhBB","single-checked":"_2rUrh","is-disabled":"_NbwX5","selected-all":"_vN2Fx","selected-tag":"_6oITk","select-search":"_iAH9D"};
2956
425
 
2957
- const SelectList = _ref => {
426
+ const SelectList = React.forwardRef((_ref, ref) => {
2958
427
  let {
2959
428
  children,
2960
429
  ...p
@@ -3046,12 +515,14 @@ const SelectList = _ref => {
3046
515
  });
3047
516
  }
3048
517
  }, p);
3049
- return /*#__PURE__*/React__default["default"].createElement(SelectInput, props, targetProps => {
518
+ return /*#__PURE__*/React__default["default"].createElement(SelectInput, _extends({}, props, {
519
+ ref: ref
520
+ }), targetProps => {
3050
521
  const {
3051
522
  props,
3052
523
  value,
3053
- searchText,
3054
- setSearchText
524
+ searchProps,
525
+ setSearchProps
3055
526
  } = targetProps;
3056
527
  const {
3057
528
  isPopup,
@@ -3073,9 +544,11 @@ const SelectList = _ref => {
3073
544
  'is-popup': isPopup
3074
545
  }),
3075
546
  placeholder: searchPlaceholder,
3076
- value: searchText,
547
+ value: searchProps.searchText,
3077
548
  onSearch: value => {
3078
- setSearchText(value);
549
+ setSearchProps(searchProps => Object.assign({}, searchProps, {
550
+ searchText: value
551
+ }));
3079
552
  },
3080
553
  simple: isPopup,
3081
554
  showSearchButton: !isPopup
@@ -3089,14 +562,12 @@ const SelectList = _ref => {
3089
562
  className: classnames__default["default"](style$1['list'], 'select-list-scroll-list', {
3090
563
  'is-popup': isPopup
3091
564
  }),
3092
- searchProps: {
3093
- searchText
3094
- },
565
+ searchProps: searchProps,
3095
566
  getSearchProps: getSearchProps,
3096
567
  api: Object.assign({}, options ? {
3097
568
  data: {
3098
569
  options,
3099
- searchText
570
+ searchProps
3100
571
  },
3101
572
  loader: _ref3 => {
3102
573
  let {
@@ -3104,10 +575,10 @@ const SelectList = _ref => {
3104
575
  } = _ref3;
3105
576
  const {
3106
577
  options,
3107
- searchText
578
+ searchProps
3108
579
  } = data;
3109
580
  if (typeof getSearchCallback === 'function') {
3110
- const newOptions = options.filter(item => getSearchCallback(searchText, item));
581
+ const newOptions = options.filter(item => getSearchCallback(searchProps, item));
3111
582
  return {
3112
583
  pageData: newOptions
3113
584
  };
@@ -3138,20 +609,19 @@ const SelectList = _ref => {
3138
609
  vertical: true
3139
610
  }, components.search, components.selectedAll, components.fetchList, components.selectedTag);
3140
611
  });
3141
- };
612
+ });
3142
613
 
3143
614
  var style = {"list":"_DrEYJ","is-popup":"_KgWTX","header":"_Vmbrg","col":"_dJmfs","body":"_704J1","is-selected-all":"_qU5zU","is-selected":"_MzyWg","is-disabled":"_5luTv","right-options":"_UXi-g","no-padding-btn":"_iaCir","tag":"_JkYqS","tag-inner":"_VZlBL","single-checked":"_Eiz-u","select-search":"_temy6","tags-search":"_7phL2","descriptions":"_ttNK9","descriptions-col-label":"_xU-i7","descriptions-col-content":"_SvfzQ"};
3144
615
 
3145
- const SelectTableList = p => {
3146
- const [filter, setFilter] = React.useState({});
616
+ const SelectTableList = React.forwardRef((p, ref) => {
3147
617
  const [tagSearchText, setTagSearchText] = React.useState('');
3148
618
  const props = Object.assign({}, {
3149
619
  overlayWidth: '600px',
3150
620
  filterRender: contextProps => {
3151
621
  const {
3152
622
  props,
3153
- filter,
3154
- setFilter
623
+ searchProps,
624
+ setSearchProps
3155
625
  } = contextProps;
3156
626
  const {
3157
627
  isPopup,
@@ -3170,9 +640,9 @@ const SelectTableList = p => {
3170
640
  'is-popup': isPopup
3171
641
  }),
3172
642
  placeholder: searchPlaceholder,
3173
- value: filter.searchText || '',
643
+ value: searchProps.searchText || '',
3174
644
  onSearch: value => {
3175
- setFilter(filter => Object.assign({}, filter, {
645
+ setSearchProps(searchProps => Object.assign({}, searchProps, {
3176
646
  searchText: value
3177
647
  }));
3178
648
  },
@@ -3194,7 +664,9 @@ const SelectTableList = p => {
3194
664
  }
3195
665
  }, p);
3196
666
  const bodyRef = React.useRef(null);
3197
- return /*#__PURE__*/React__default["default"].createElement(SelectInput, props, targetProps => {
667
+ return /*#__PURE__*/React__default["default"].createElement(SelectInput, _extends({}, props, {
668
+ ref: ref
669
+ }), targetProps => {
3198
670
  const {
3199
671
  props,
3200
672
  value,
@@ -3219,7 +691,8 @@ const SelectTableList = p => {
3219
691
  searchPlaceholder,
3220
692
  allowSelectedAll,
3221
693
  labelKey,
3222
- valueKey
694
+ valueKey,
695
+ searchProps
3223
696
  } = props;
3224
697
  const isSelectedAll = computedIsSelectAll(value, selectedAllValue, valueKey);
3225
698
  return /*#__PURE__*/React__default["default"].createElement(antd.Row, {
@@ -3227,10 +700,7 @@ const SelectTableList = p => {
3227
700
  ref: bodyRef
3228
701
  }, /*#__PURE__*/React__default["default"].createElement(antd.Col, {
3229
702
  span: single ? 24 : 16
3230
- }, /*#__PURE__*/React__default["default"].createElement("div", null, filterRender(Object.assign({}, targetProps, {
3231
- filter,
3232
- setFilter
3233
- }))), /*#__PURE__*/React__default["default"].createElement(antd.Row, {
703
+ }, /*#__PURE__*/React__default["default"].createElement("div", null, filterRender(Object.assign({}, targetProps))), /*#__PURE__*/React__default["default"].createElement(antd.Row, {
3234
704
  wrap: false,
3235
705
  className: classnames__default["default"](style['header'], 'select-table-list-header')
3236
706
  }, !single && /*#__PURE__*/React__default["default"].createElement(antd.Col, {
@@ -3268,12 +738,12 @@ const SelectTableList = p => {
3268
738
  className: classnames__default["default"](style['list'], 'select-table-list-scroll-list', {
3269
739
  'is-popup': isPopup
3270
740
  }),
3271
- searchProps: filter,
741
+ searchProps: searchProps,
3272
742
  getSearchProps: getSearchProps,
3273
743
  api: Object.assign({}, options ? {
3274
744
  data: {
3275
745
  options,
3276
- filter
746
+ searchProps
3277
747
  },
3278
748
  loader: _ref => {
3279
749
  let {
@@ -3281,10 +751,10 @@ const SelectTableList = p => {
3281
751
  } = _ref;
3282
752
  const {
3283
753
  options,
3284
- filter
754
+ searchProps
3285
755
  } = data;
3286
756
  if (typeof getSearchCallback === 'function') {
3287
- const newOptions = options.filter(item => getSearchCallback(filter, item, targetProps));
757
+ const newOptions = options.filter(item => getSearchCallback(searchProps, item, targetProps));
3288
758
  return {
3289
759
  pageData: newOptions
3290
760
  };
@@ -3346,7 +816,7 @@ const SelectTableList = p => {
3346
816
  key: name,
3347
817
  span: span,
3348
818
  className: classnames__default["default"](style['col'], 'select-table-list-col')
3349
- }, typeof getValueOf === 'function' ? getValueOf(item, contextProps) : get_1(item, name));
819
+ }, typeof getValueOf === 'function' ? getValueOf(item, contextProps) : get__default["default"](item, name));
3350
820
  }))), single && /*#__PURE__*/React__default["default"].createElement(antd.Col, {
3351
821
  className: classnames__default["default"](style['col'], style['single-checked'], 'select-table-list-col')
3352
822
  }, isChecked && /*#__PURE__*/React__default["default"].createElement(icons.CheckOutlined, null)));
@@ -3403,14 +873,14 @@ const SelectTableList = p => {
3403
873
  }, title), /*#__PURE__*/React__default["default"].createElement(antd.Col, {
3404
874
  className: style['descriptions-col-content'],
3405
875
  span: 16
3406
- }, typeof getValueOf === 'function' ? getValueOf(item, targetProps) : get_1(item, name)));
876
+ }, typeof getValueOf === 'function' ? getValueOf(item, targetProps) : get__default["default"](item, name)));
3407
877
  }))
3408
878
  }, /*#__PURE__*/React__default["default"].createElement("span", {
3409
879
  className: style['tag-inner']
3410
880
  }, item[labelKey])));
3411
881
  })))));
3412
882
  });
3413
- };
883
+ });
3414
884
 
3415
885
  exports.SelectInput = SelectInput;
3416
886
  exports.SelectTableList = SelectTableList;