@razorpay/blade 8.12.1 → 8.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4832 +1,47 @@
1
- import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
2
- import React, { useMemo, useCallback, useState, useEffect, useRef } from 'react';
3
- import _typeof from '@babel/runtime/helpers/typeof';
4
1
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
+ import { useMemo, useCallback, useState, useEffect, useRef } from 'react';
5
3
 
6
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
-
8
- /**
9
- * Removes all key-value entries from the list cache.
10
- *
11
- * @private
12
- * @name clear
13
- * @memberOf ListCache
14
- */
15
-
16
- function listCacheClear$1() {
17
- this.__data__ = [];
18
- this.size = 0;
19
- }
20
-
21
- var _listCacheClear = listCacheClear$1;
22
-
23
- /**
24
- * Performs a
25
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
26
- * comparison between two values to determine if they are equivalent.
27
- *
28
- * @static
29
- * @memberOf _
30
- * @since 4.0.0
31
- * @category Lang
32
- * @param {*} value The value to compare.
33
- * @param {*} other The other value to compare.
34
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
35
- * @example
36
- *
37
- * var object = { 'a': 1 };
38
- * var other = { 'a': 1 };
39
- *
40
- * _.eq(object, object);
41
- * // => true
42
- *
43
- * _.eq(object, other);
44
- * // => false
45
- *
46
- * _.eq('a', 'a');
47
- * // => true
48
- *
49
- * _.eq('a', Object('a'));
50
- * // => false
51
- *
52
- * _.eq(NaN, NaN);
53
- * // => true
54
- */
55
-
56
- function eq$5(value, other) {
57
- return value === other || (value !== value && other !== other);
58
- }
59
-
60
- var eq_1 = eq$5;
61
-
62
- var eq$4 = eq_1;
63
-
64
- /**
65
- * Gets the index at which the `key` is found in `array` of key-value pairs.
66
- *
67
- * @private
68
- * @param {Array} array The array to inspect.
69
- * @param {*} key The key to search for.
70
- * @returns {number} Returns the index of the matched value, else `-1`.
71
- */
72
- function assocIndexOf$4(array, key) {
73
- var length = array.length;
74
- while (length--) {
75
- if (eq$4(array[length][0], key)) {
76
- return length;
77
- }
78
- }
79
- return -1;
80
- }
81
-
82
- var _assocIndexOf = assocIndexOf$4;
83
-
84
- var assocIndexOf$3 = _assocIndexOf;
85
-
86
- /** Used for built-in method references. */
87
- var arrayProto = Array.prototype;
88
-
89
- /** Built-in value references. */
90
- var splice = arrayProto.splice;
91
-
92
- /**
93
- * Removes `key` and its value from the list cache.
94
- *
95
- * @private
96
- * @name delete
97
- * @memberOf ListCache
98
- * @param {string} key The key of the value to remove.
99
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
100
- */
101
- function listCacheDelete$1(key) {
102
- var data = this.__data__,
103
- index = assocIndexOf$3(data, key);
104
-
105
- if (index < 0) {
106
- return false;
107
- }
108
- var lastIndex = data.length - 1;
109
- if (index == lastIndex) {
110
- data.pop();
111
- } else {
112
- splice.call(data, index, 1);
113
- }
114
- --this.size;
115
- return true;
116
- }
117
-
118
- var _listCacheDelete = listCacheDelete$1;
119
-
120
- var assocIndexOf$2 = _assocIndexOf;
121
-
122
- /**
123
- * Gets the list cache value for `key`.
124
- *
125
- * @private
126
- * @name get
127
- * @memberOf ListCache
128
- * @param {string} key The key of the value to get.
129
- * @returns {*} Returns the entry value.
130
- */
131
- function listCacheGet$1(key) {
132
- var data = this.__data__,
133
- index = assocIndexOf$2(data, key);
134
-
135
- return index < 0 ? undefined : data[index][1];
136
- }
137
-
138
- var _listCacheGet = listCacheGet$1;
139
-
140
- var assocIndexOf$1 = _assocIndexOf;
141
-
142
- /**
143
- * Checks if a list cache value for `key` exists.
144
- *
145
- * @private
146
- * @name has
147
- * @memberOf ListCache
148
- * @param {string} key The key of the entry to check.
149
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
150
- */
151
- function listCacheHas$1(key) {
152
- return assocIndexOf$1(this.__data__, key) > -1;
153
- }
154
-
155
- var _listCacheHas = listCacheHas$1;
156
-
157
- var assocIndexOf = _assocIndexOf;
158
-
159
- /**
160
- * Sets the list cache `key` to `value`.
161
- *
162
- * @private
163
- * @name set
164
- * @memberOf ListCache
165
- * @param {string} key The key of the value to set.
166
- * @param {*} value The value to set.
167
- * @returns {Object} Returns the list cache instance.
168
- */
169
- function listCacheSet$1(key, value) {
170
- var data = this.__data__,
171
- index = assocIndexOf(data, key);
172
-
173
- if (index < 0) {
174
- ++this.size;
175
- data.push([key, value]);
176
- } else {
177
- data[index][1] = value;
178
- }
179
- return this;
180
- }
181
-
182
- var _listCacheSet = listCacheSet$1;
183
-
184
- var listCacheClear = _listCacheClear,
185
- listCacheDelete = _listCacheDelete,
186
- listCacheGet = _listCacheGet,
187
- listCacheHas = _listCacheHas,
188
- listCacheSet = _listCacheSet;
189
-
190
- /**
191
- * Creates an list cache object.
192
- *
193
- * @private
194
- * @constructor
195
- * @param {Array} [entries] The key-value pairs to cache.
196
- */
197
- function ListCache$4(entries) {
198
- var index = -1,
199
- length = entries == null ? 0 : entries.length;
200
-
201
- this.clear();
202
- while (++index < length) {
203
- var entry = entries[index];
204
- this.set(entry[0], entry[1]);
205
- }
206
- }
207
-
208
- // Add methods to `ListCache`.
209
- ListCache$4.prototype.clear = listCacheClear;
210
- ListCache$4.prototype['delete'] = listCacheDelete;
211
- ListCache$4.prototype.get = listCacheGet;
212
- ListCache$4.prototype.has = listCacheHas;
213
- ListCache$4.prototype.set = listCacheSet;
214
-
215
- var _ListCache = ListCache$4;
216
-
217
- var ListCache$3 = _ListCache;
218
-
219
- /**
220
- * Removes all key-value entries from the stack.
221
- *
222
- * @private
223
- * @name clear
224
- * @memberOf Stack
225
- */
226
- function stackClear$1() {
227
- this.__data__ = new ListCache$3;
228
- this.size = 0;
229
- }
230
-
231
- var _stackClear = stackClear$1;
232
-
233
- /**
234
- * Removes `key` and its value from the stack.
235
- *
236
- * @private
237
- * @name delete
238
- * @memberOf Stack
239
- * @param {string} key The key of the value to remove.
240
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
241
- */
242
-
243
- function stackDelete$1(key) {
244
- var data = this.__data__,
245
- result = data['delete'](key);
246
-
247
- this.size = data.size;
248
- return result;
249
- }
250
-
251
- var _stackDelete = stackDelete$1;
252
-
253
- /**
254
- * Gets the stack value for `key`.
255
- *
256
- * @private
257
- * @name get
258
- * @memberOf Stack
259
- * @param {string} key The key of the value to get.
260
- * @returns {*} Returns the entry value.
261
- */
262
-
263
- function stackGet$1(key) {
264
- return this.__data__.get(key);
265
- }
266
-
267
- var _stackGet = stackGet$1;
268
-
269
- /**
270
- * Checks if a stack value for `key` exists.
271
- *
272
- * @private
273
- * @name has
274
- * @memberOf Stack
275
- * @param {string} key The key of the entry to check.
276
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
277
- */
278
-
279
- function stackHas$1(key) {
280
- return this.__data__.has(key);
281
- }
282
-
283
- var _stackHas = stackHas$1;
284
-
285
- /** Detect free variable `global` from Node.js. */
286
-
287
- var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
288
-
289
- var _freeGlobal = freeGlobal$1;
290
-
291
- var freeGlobal = _freeGlobal;
292
-
293
- /** Detect free variable `self`. */
294
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
295
-
296
- /** Used as a reference to the global object. */
297
- var root$8 = freeGlobal || freeSelf || Function('return this')();
298
-
299
- var _root = root$8;
300
-
301
- var root$7 = _root;
302
-
303
- /** Built-in value references. */
304
- var Symbol$5 = root$7.Symbol;
305
-
306
- var _Symbol = Symbol$5;
307
-
308
- var Symbol$4 = _Symbol;
309
-
310
- /** Used for built-in method references. */
311
- var objectProto$g = Object.prototype;
312
-
313
- /** Used to check objects for own properties. */
314
- var hasOwnProperty$d = objectProto$g.hasOwnProperty;
315
-
316
- /**
317
- * Used to resolve the
318
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
319
- * of values.
320
- */
321
- var nativeObjectToString$1 = objectProto$g.toString;
322
-
323
- /** Built-in value references. */
324
- var symToStringTag$1 = Symbol$4 ? Symbol$4.toStringTag : undefined;
325
-
326
- /**
327
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
328
- *
329
- * @private
330
- * @param {*} value The value to query.
331
- * @returns {string} Returns the raw `toStringTag`.
332
- */
333
- function getRawTag$1(value) {
334
- var isOwn = hasOwnProperty$d.call(value, symToStringTag$1),
335
- tag = value[symToStringTag$1];
336
-
337
- try {
338
- value[symToStringTag$1] = undefined;
339
- var unmasked = true;
340
- } catch (e) {}
341
-
342
- var result = nativeObjectToString$1.call(value);
343
- if (unmasked) {
344
- if (isOwn) {
345
- value[symToStringTag$1] = tag;
346
- } else {
347
- delete value[symToStringTag$1];
348
- }
349
- }
350
- return result;
351
- }
352
-
353
- var _getRawTag = getRawTag$1;
354
-
355
- /** Used for built-in method references. */
356
-
357
- var objectProto$f = Object.prototype;
358
-
359
- /**
360
- * Used to resolve the
361
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
362
- * of values.
363
- */
364
- var nativeObjectToString = objectProto$f.toString;
365
-
366
- /**
367
- * Converts `value` to a string using `Object.prototype.toString`.
368
- *
369
- * @private
370
- * @param {*} value The value to convert.
371
- * @returns {string} Returns the converted string.
372
- */
373
- function objectToString$1(value) {
374
- return nativeObjectToString.call(value);
375
- }
376
-
377
- var _objectToString = objectToString$1;
378
-
379
- var Symbol$3 = _Symbol,
380
- getRawTag = _getRawTag,
381
- objectToString = _objectToString;
382
-
383
- /** `Object#toString` result references. */
384
- var nullTag = '[object Null]',
385
- undefinedTag = '[object Undefined]';
386
-
387
- /** Built-in value references. */
388
- var symToStringTag = Symbol$3 ? Symbol$3.toStringTag : undefined;
389
-
390
- /**
391
- * The base implementation of `getTag` without fallbacks for buggy environments.
392
- *
393
- * @private
394
- * @param {*} value The value to query.
395
- * @returns {string} Returns the `toStringTag`.
396
- */
397
- function baseGetTag$6(value) {
398
- if (value == null) {
399
- return value === undefined ? undefinedTag : nullTag;
400
- }
401
- return (symToStringTag && symToStringTag in Object(value))
402
- ? getRawTag(value)
403
- : objectToString(value);
404
- }
405
-
406
- var _baseGetTag = baseGetTag$6;
407
-
408
- /**
409
- * Checks if `value` is the
410
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
411
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
412
- *
413
- * @static
414
- * @memberOf _
415
- * @since 0.1.0
416
- * @category Lang
417
- * @param {*} value The value to check.
418
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
419
- * @example
420
- *
421
- * _.isObject({});
422
- * // => true
423
- *
424
- * _.isObject([1, 2, 3]);
425
- * // => true
426
- *
427
- * _.isObject(_.noop);
428
- * // => true
429
- *
430
- * _.isObject(null);
431
- * // => false
432
- */
433
-
434
- function isObject$8(value) {
435
- var type = typeof value;
436
- return value != null && (type == 'object' || type == 'function');
437
- }
438
-
439
- var isObject_1 = isObject$8;
440
-
441
- var baseGetTag$5 = _baseGetTag,
442
- isObject$7 = isObject_1;
443
-
444
- /** `Object#toString` result references. */
445
- var asyncTag = '[object AsyncFunction]',
446
- funcTag$2 = '[object Function]',
447
- genTag$1 = '[object GeneratorFunction]',
448
- proxyTag = '[object Proxy]';
449
-
450
- /**
451
- * Checks if `value` is classified as a `Function` object.
452
- *
453
- * @static
454
- * @memberOf _
455
- * @since 0.1.0
456
- * @category Lang
457
- * @param {*} value The value to check.
458
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
459
- * @example
460
- *
461
- * _.isFunction(_);
462
- * // => true
463
- *
464
- * _.isFunction(/abc/);
465
- * // => false
466
- */
467
- function isFunction$3(value) {
468
- if (!isObject$7(value)) {
469
- return false;
470
- }
471
- // The use of `Object#toString` avoids issues with the `typeof` operator
472
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
473
- var tag = baseGetTag$5(value);
474
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
475
- }
476
-
477
- var isFunction_1 = isFunction$3;
478
-
479
- var root$6 = _root;
480
-
481
- /** Used to detect overreaching core-js shims. */
482
- var coreJsData$1 = root$6['__core-js_shared__'];
483
-
484
- var _coreJsData = coreJsData$1;
485
-
486
- var coreJsData = _coreJsData;
487
-
488
- /** Used to detect methods masquerading as native. */
489
- var maskSrcKey = (function() {
490
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
491
- return uid ? ('Symbol(src)_1.' + uid) : '';
492
- }());
493
-
494
- /**
495
- * Checks if `func` has its source masked.
496
- *
497
- * @private
498
- * @param {Function} func The function to check.
499
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
500
- */
501
- function isMasked$1(func) {
502
- return !!maskSrcKey && (maskSrcKey in func);
503
- }
504
-
505
- var _isMasked = isMasked$1;
506
-
507
- /** Used for built-in method references. */
508
-
509
- var funcProto$2 = Function.prototype;
510
-
511
- /** Used to resolve the decompiled source of functions. */
512
- var funcToString$2 = funcProto$2.toString;
513
-
514
- /**
515
- * Converts `func` to its source code.
516
- *
517
- * @private
518
- * @param {Function} func The function to convert.
519
- * @returns {string} Returns the source code.
520
- */
521
- function toSource$2(func) {
522
- if (func != null) {
523
- try {
524
- return funcToString$2.call(func);
525
- } catch (e) {}
526
- try {
527
- return (func + '');
528
- } catch (e) {}
529
- }
530
- return '';
531
- }
532
-
533
- var _toSource = toSource$2;
534
-
535
- var isFunction$2 = isFunction_1,
536
- isMasked = _isMasked,
537
- isObject$6 = isObject_1,
538
- toSource$1 = _toSource;
539
-
540
- /**
541
- * Used to match `RegExp`
542
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
543
- */
544
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
545
-
546
- /** Used to detect host constructors (Safari). */
547
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
548
-
549
- /** Used for built-in method references. */
550
- var funcProto$1 = Function.prototype,
551
- objectProto$e = Object.prototype;
552
-
553
- /** Used to resolve the decompiled source of functions. */
554
- var funcToString$1 = funcProto$1.toString;
555
-
556
- /** Used to check objects for own properties. */
557
- var hasOwnProperty$c = objectProto$e.hasOwnProperty;
558
-
559
- /** Used to detect if a method is native. */
560
- var reIsNative = RegExp('^' +
561
- funcToString$1.call(hasOwnProperty$c).replace(reRegExpChar, '\\$&')
562
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
563
- );
564
-
565
- /**
566
- * The base implementation of `_.isNative` without bad shim checks.
567
- *
568
- * @private
569
- * @param {*} value The value to check.
570
- * @returns {boolean} Returns `true` if `value` is a native function,
571
- * else `false`.
572
- */
573
- function baseIsNative$1(value) {
574
- if (!isObject$6(value) || isMasked(value)) {
575
- return false;
576
- }
577
- var pattern = isFunction$2(value) ? reIsNative : reIsHostCtor;
578
- return pattern.test(toSource$1(value));
579
- }
580
-
581
- var _baseIsNative = baseIsNative$1;
582
-
583
- /**
584
- * Gets the value at `key` of `object`.
585
- *
586
- * @private
587
- * @param {Object} [object] The object to query.
588
- * @param {string} key The key of the property to get.
589
- * @returns {*} Returns the property value.
590
- */
591
-
592
- function getValue$1(object, key) {
593
- return object == null ? undefined : object[key];
594
- }
595
-
596
- var _getValue = getValue$1;
597
-
598
- var baseIsNative = _baseIsNative,
599
- getValue = _getValue;
600
-
601
- /**
602
- * Gets the native function at `key` of `object`.
603
- *
604
- * @private
605
- * @param {Object} object The object to query.
606
- * @param {string} key The key of the method to get.
607
- * @returns {*} Returns the function if it's native, else `undefined`.
608
- */
609
- function getNative$7(object, key) {
610
- var value = getValue(object, key);
611
- return baseIsNative(value) ? value : undefined;
612
- }
613
-
614
- var _getNative = getNative$7;
615
-
616
- var getNative$6 = _getNative,
617
- root$5 = _root;
618
-
619
- /* Built-in method references that are verified to be native. */
620
- var Map$3 = getNative$6(root$5, 'Map');
621
-
622
- var _Map = Map$3;
623
-
624
- var getNative$5 = _getNative;
625
-
626
- /* Built-in method references that are verified to be native. */
627
- var nativeCreate$4 = getNative$5(Object, 'create');
628
-
629
- var _nativeCreate = nativeCreate$4;
630
-
631
- var nativeCreate$3 = _nativeCreate;
632
-
633
- /**
634
- * Removes all key-value entries from the hash.
635
- *
636
- * @private
637
- * @name clear
638
- * @memberOf Hash
639
- */
640
- function hashClear$1() {
641
- this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
642
- this.size = 0;
643
- }
644
-
645
- var _hashClear = hashClear$1;
646
-
647
- /**
648
- * Removes `key` and its value from the hash.
649
- *
650
- * @private
651
- * @name delete
652
- * @memberOf Hash
653
- * @param {Object} hash The hash to modify.
654
- * @param {string} key The key of the value to remove.
655
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
656
- */
657
-
658
- function hashDelete$1(key) {
659
- var result = this.has(key) && delete this.__data__[key];
660
- this.size -= result ? 1 : 0;
661
- return result;
662
- }
663
-
664
- var _hashDelete = hashDelete$1;
665
-
666
- var nativeCreate$2 = _nativeCreate;
667
-
668
- /** Used to stand-in for `undefined` hash values. */
669
- var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
670
-
671
- /** Used for built-in method references. */
672
- var objectProto$d = Object.prototype;
673
-
674
- /** Used to check objects for own properties. */
675
- var hasOwnProperty$b = objectProto$d.hasOwnProperty;
676
-
677
- /**
678
- * Gets the hash value for `key`.
679
- *
680
- * @private
681
- * @name get
682
- * @memberOf Hash
683
- * @param {string} key The key of the value to get.
684
- * @returns {*} Returns the entry value.
685
- */
686
- function hashGet$1(key) {
687
- var data = this.__data__;
688
- if (nativeCreate$2) {
689
- var result = data[key];
690
- return result === HASH_UNDEFINED$2 ? undefined : result;
691
- }
692
- return hasOwnProperty$b.call(data, key) ? data[key] : undefined;
693
- }
694
-
695
- var _hashGet = hashGet$1;
696
-
697
- var nativeCreate$1 = _nativeCreate;
698
-
699
- /** Used for built-in method references. */
700
- var objectProto$c = Object.prototype;
701
-
702
- /** Used to check objects for own properties. */
703
- var hasOwnProperty$a = objectProto$c.hasOwnProperty;
704
-
705
- /**
706
- * Checks if a hash value for `key` exists.
707
- *
708
- * @private
709
- * @name has
710
- * @memberOf Hash
711
- * @param {string} key The key of the entry to check.
712
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
713
- */
714
- function hashHas$1(key) {
715
- var data = this.__data__;
716
- return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$a.call(data, key);
717
- }
718
-
719
- var _hashHas = hashHas$1;
720
-
721
- var nativeCreate = _nativeCreate;
722
-
723
- /** Used to stand-in for `undefined` hash values. */
724
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
725
-
726
- /**
727
- * Sets the hash `key` to `value`.
728
- *
729
- * @private
730
- * @name set
731
- * @memberOf Hash
732
- * @param {string} key The key of the value to set.
733
- * @param {*} value The value to set.
734
- * @returns {Object} Returns the hash instance.
735
- */
736
- function hashSet$1(key, value) {
737
- var data = this.__data__;
738
- this.size += this.has(key) ? 0 : 1;
739
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
740
- return this;
741
- }
742
-
743
- var _hashSet = hashSet$1;
744
-
745
- var hashClear = _hashClear,
746
- hashDelete = _hashDelete,
747
- hashGet = _hashGet,
748
- hashHas = _hashHas,
749
- hashSet = _hashSet;
750
-
751
- /**
752
- * Creates a hash object.
753
- *
754
- * @private
755
- * @constructor
756
- * @param {Array} [entries] The key-value pairs to cache.
757
- */
758
- function Hash$1(entries) {
759
- var index = -1,
760
- length = entries == null ? 0 : entries.length;
761
-
762
- this.clear();
763
- while (++index < length) {
764
- var entry = entries[index];
765
- this.set(entry[0], entry[1]);
766
- }
767
- }
768
-
769
- // Add methods to `Hash`.
770
- Hash$1.prototype.clear = hashClear;
771
- Hash$1.prototype['delete'] = hashDelete;
772
- Hash$1.prototype.get = hashGet;
773
- Hash$1.prototype.has = hashHas;
774
- Hash$1.prototype.set = hashSet;
775
-
776
- var _Hash = Hash$1;
777
-
778
- var Hash = _Hash,
779
- ListCache$2 = _ListCache,
780
- Map$2 = _Map;
781
-
782
- /**
783
- * Removes all key-value entries from the map.
784
- *
785
- * @private
786
- * @name clear
787
- * @memberOf MapCache
788
- */
789
- function mapCacheClear$1() {
790
- this.size = 0;
791
- this.__data__ = {
792
- 'hash': new Hash,
793
- 'map': new (Map$2 || ListCache$2),
794
- 'string': new Hash
795
- };
796
- }
797
-
798
- var _mapCacheClear = mapCacheClear$1;
799
-
800
- /**
801
- * Checks if `value` is suitable for use as unique object key.
802
- *
803
- * @private
804
- * @param {*} value The value to check.
805
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
806
- */
807
-
808
- function isKeyable$1(value) {
809
- var type = typeof value;
810
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
811
- ? (value !== '__proto__')
812
- : (value === null);
813
- }
814
-
815
- var _isKeyable = isKeyable$1;
816
-
817
- var isKeyable = _isKeyable;
818
-
819
- /**
820
- * Gets the data for `map`.
821
- *
822
- * @private
823
- * @param {Object} map The map to query.
824
- * @param {string} key The reference key.
825
- * @returns {*} Returns the map data.
826
- */
827
- function getMapData$4(map, key) {
828
- var data = map.__data__;
829
- return isKeyable(key)
830
- ? data[typeof key == 'string' ? 'string' : 'hash']
831
- : data.map;
832
- }
833
-
834
- var _getMapData = getMapData$4;
835
-
836
- var getMapData$3 = _getMapData;
837
-
838
- /**
839
- * Removes `key` and its value from the map.
840
- *
841
- * @private
842
- * @name delete
843
- * @memberOf MapCache
844
- * @param {string} key The key of the value to remove.
845
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
846
- */
847
- function mapCacheDelete$1(key) {
848
- var result = getMapData$3(this, key)['delete'](key);
849
- this.size -= result ? 1 : 0;
850
- return result;
851
- }
852
-
853
- var _mapCacheDelete = mapCacheDelete$1;
854
-
855
- var getMapData$2 = _getMapData;
856
-
857
- /**
858
- * Gets the map value for `key`.
859
- *
860
- * @private
861
- * @name get
862
- * @memberOf MapCache
863
- * @param {string} key The key of the value to get.
864
- * @returns {*} Returns the entry value.
865
- */
866
- function mapCacheGet$1(key) {
867
- return getMapData$2(this, key).get(key);
868
- }
869
-
870
- var _mapCacheGet = mapCacheGet$1;
871
-
872
- var getMapData$1 = _getMapData;
873
-
874
- /**
875
- * Checks if a map value for `key` exists.
876
- *
877
- * @private
878
- * @name has
879
- * @memberOf MapCache
880
- * @param {string} key The key of the entry to check.
881
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
882
- */
883
- function mapCacheHas$1(key) {
884
- return getMapData$1(this, key).has(key);
885
- }
886
-
887
- var _mapCacheHas = mapCacheHas$1;
888
-
889
- var getMapData = _getMapData;
890
-
891
- /**
892
- * Sets the map `key` to `value`.
893
- *
894
- * @private
895
- * @name set
896
- * @memberOf MapCache
897
- * @param {string} key The key of the value to set.
898
- * @param {*} value The value to set.
899
- * @returns {Object} Returns the map cache instance.
900
- */
901
- function mapCacheSet$1(key, value) {
902
- var data = getMapData(this, key),
903
- size = data.size;
904
-
905
- data.set(key, value);
906
- this.size += data.size == size ? 0 : 1;
907
- return this;
908
- }
909
-
910
- var _mapCacheSet = mapCacheSet$1;
911
-
912
- var mapCacheClear = _mapCacheClear,
913
- mapCacheDelete = _mapCacheDelete,
914
- mapCacheGet = _mapCacheGet,
915
- mapCacheHas = _mapCacheHas,
916
- mapCacheSet = _mapCacheSet;
917
-
918
- /**
919
- * Creates a map cache object to store key-value pairs.
920
- *
921
- * @private
922
- * @constructor
923
- * @param {Array} [entries] The key-value pairs to cache.
924
- */
925
- function MapCache$3(entries) {
926
- var index = -1,
927
- length = entries == null ? 0 : entries.length;
928
-
929
- this.clear();
930
- while (++index < length) {
931
- var entry = entries[index];
932
- this.set(entry[0], entry[1]);
933
- }
934
- }
935
-
936
- // Add methods to `MapCache`.
937
- MapCache$3.prototype.clear = mapCacheClear;
938
- MapCache$3.prototype['delete'] = mapCacheDelete;
939
- MapCache$3.prototype.get = mapCacheGet;
940
- MapCache$3.prototype.has = mapCacheHas;
941
- MapCache$3.prototype.set = mapCacheSet;
942
-
943
- var _MapCache = MapCache$3;
944
-
945
- var ListCache$1 = _ListCache,
946
- Map$1 = _Map,
947
- MapCache$2 = _MapCache;
948
-
949
- /** Used as the size to enable large array optimizations. */
950
- var LARGE_ARRAY_SIZE = 200;
951
-
952
- /**
953
- * Sets the stack `key` to `value`.
954
- *
955
- * @private
956
- * @name set
957
- * @memberOf Stack
958
- * @param {string} key The key of the value to set.
959
- * @param {*} value The value to set.
960
- * @returns {Object} Returns the stack cache instance.
961
- */
962
- function stackSet$1(key, value) {
963
- var data = this.__data__;
964
- if (data instanceof ListCache$1) {
965
- var pairs = data.__data__;
966
- if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
967
- pairs.push([key, value]);
968
- this.size = ++data.size;
969
- return this;
970
- }
971
- data = this.__data__ = new MapCache$2(pairs);
972
- }
973
- data.set(key, value);
974
- this.size = data.size;
975
- return this;
976
- }
977
-
978
- var _stackSet = stackSet$1;
979
-
980
- var ListCache = _ListCache,
981
- stackClear = _stackClear,
982
- stackDelete = _stackDelete,
983
- stackGet = _stackGet,
984
- stackHas = _stackHas,
985
- stackSet = _stackSet;
986
-
987
- /**
988
- * Creates a stack cache object to store key-value pairs.
989
- *
990
- * @private
991
- * @constructor
992
- * @param {Array} [entries] The key-value pairs to cache.
993
- */
994
- function Stack$3(entries) {
995
- var data = this.__data__ = new ListCache(entries);
996
- this.size = data.size;
997
- }
998
-
999
- // Add methods to `Stack`.
1000
- Stack$3.prototype.clear = stackClear;
1001
- Stack$3.prototype['delete'] = stackDelete;
1002
- Stack$3.prototype.get = stackGet;
1003
- Stack$3.prototype.has = stackHas;
1004
- Stack$3.prototype.set = stackSet;
1005
-
1006
- var _Stack = Stack$3;
1007
-
1008
- /**
1009
- * A specialized version of `_.forEach` for arrays without support for
1010
- * iteratee shorthands.
1011
- *
1012
- * @private
1013
- * @param {Array} [array] The array to iterate over.
1014
- * @param {Function} iteratee The function invoked per iteration.
1015
- * @returns {Array} Returns `array`.
1016
- */
1017
-
1018
- function arrayEach$1(array, iteratee) {
1019
- var index = -1,
1020
- length = array == null ? 0 : array.length;
1021
-
1022
- while (++index < length) {
1023
- if (iteratee(array[index], index, array) === false) {
1024
- break;
1025
- }
1026
- }
1027
- return array;
1028
- }
1029
-
1030
- var _arrayEach = arrayEach$1;
1031
-
1032
- var getNative$4 = _getNative;
1033
-
1034
- var defineProperty$2 = (function() {
1035
- try {
1036
- var func = getNative$4(Object, 'defineProperty');
1037
- func({}, '', {});
1038
- return func;
1039
- } catch (e) {}
1040
- }());
1041
-
1042
- var _defineProperty = defineProperty$2;
1043
-
1044
- var defineProperty$1 = _defineProperty;
1045
-
1046
- /**
1047
- * The base implementation of `assignValue` and `assignMergeValue` without
1048
- * value checks.
1049
- *
1050
- * @private
1051
- * @param {Object} object The object to modify.
1052
- * @param {string} key The key of the property to assign.
1053
- * @param {*} value The value to assign.
1054
- */
1055
- function baseAssignValue$3(object, key, value) {
1056
- if (key == '__proto__' && defineProperty$1) {
1057
- defineProperty$1(object, key, {
1058
- 'configurable': true,
1059
- 'enumerable': true,
1060
- 'value': value,
1061
- 'writable': true
1062
- });
1063
- } else {
1064
- object[key] = value;
1065
- }
1066
- }
1067
-
1068
- var _baseAssignValue = baseAssignValue$3;
1069
-
1070
- var baseAssignValue$2 = _baseAssignValue,
1071
- eq$3 = eq_1;
1072
-
1073
- /** Used for built-in method references. */
1074
- var objectProto$b = Object.prototype;
1075
-
1076
- /** Used to check objects for own properties. */
1077
- var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
1078
-
1079
- /**
1080
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
1081
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1082
- * for equality comparisons.
1083
- *
1084
- * @private
1085
- * @param {Object} object The object to modify.
1086
- * @param {string} key The key of the property to assign.
1087
- * @param {*} value The value to assign.
1088
- */
1089
- function assignValue$2(object, key, value) {
1090
- var objValue = object[key];
1091
- if (!(hasOwnProperty$9.call(object, key) && eq$3(objValue, value)) ||
1092
- (value === undefined && !(key in object))) {
1093
- baseAssignValue$2(object, key, value);
1094
- }
1095
- }
1096
-
1097
- var _assignValue = assignValue$2;
1098
-
1099
- var assignValue$1 = _assignValue,
1100
- baseAssignValue$1 = _baseAssignValue;
1101
-
1102
- /**
1103
- * Copies properties of `source` to `object`.
1104
- *
1105
- * @private
1106
- * @param {Object} source The object to copy properties from.
1107
- * @param {Array} props The property identifiers to copy.
1108
- * @param {Object} [object={}] The object to copy properties to.
1109
- * @param {Function} [customizer] The function to customize copied values.
1110
- * @returns {Object} Returns `object`.
1111
- */
1112
- function copyObject$5(source, props, object, customizer) {
1113
- var isNew = !object;
1114
- object || (object = {});
1115
-
1116
- var index = -1,
1117
- length = props.length;
1118
-
1119
- while (++index < length) {
1120
- var key = props[index];
1121
-
1122
- var newValue = customizer
1123
- ? customizer(object[key], source[key], key, object, source)
1124
- : undefined;
1125
-
1126
- if (newValue === undefined) {
1127
- newValue = source[key];
1128
- }
1129
- if (isNew) {
1130
- baseAssignValue$1(object, key, newValue);
1131
- } else {
1132
- assignValue$1(object, key, newValue);
1133
- }
1134
- }
1135
- return object;
1136
- }
1137
-
1138
- var _copyObject = copyObject$5;
1139
-
1140
- /**
1141
- * The base implementation of `_.times` without support for iteratee shorthands
1142
- * or max array length checks.
1143
- *
1144
- * @private
1145
- * @param {number} n The number of times to invoke `iteratee`.
1146
- * @param {Function} iteratee The function invoked per iteration.
1147
- * @returns {Array} Returns the array of results.
1148
- */
1149
-
1150
- function baseTimes$1(n, iteratee) {
1151
- var index = -1,
1152
- result = Array(n);
1153
-
1154
- while (++index < n) {
1155
- result[index] = iteratee(index);
1156
- }
1157
- return result;
1158
- }
1159
-
1160
- var _baseTimes = baseTimes$1;
1161
-
1162
- /**
1163
- * Checks if `value` is object-like. A value is object-like if it's not `null`
1164
- * and has a `typeof` result of "object".
1165
- *
1166
- * @static
1167
- * @memberOf _
1168
- * @since 4.0.0
1169
- * @category Lang
1170
- * @param {*} value The value to check.
1171
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1172
- * @example
1173
- *
1174
- * _.isObjectLike({});
1175
- * // => true
1176
- *
1177
- * _.isObjectLike([1, 2, 3]);
1178
- * // => true
1179
- *
1180
- * _.isObjectLike(_.noop);
1181
- * // => false
1182
- *
1183
- * _.isObjectLike(null);
1184
- * // => false
1185
- */
1186
-
1187
- function isObjectLike$9(value) {
1188
- return value != null && typeof value == 'object';
1189
- }
1190
-
1191
- var isObjectLike_1 = isObjectLike$9;
1192
-
1193
- var baseGetTag$4 = _baseGetTag,
1194
- isObjectLike$8 = isObjectLike_1;
1195
-
1196
- /** `Object#toString` result references. */
1197
- var argsTag$3 = '[object Arguments]';
1198
-
1199
- /**
1200
- * The base implementation of `_.isArguments`.
1201
- *
1202
- * @private
1203
- * @param {*} value The value to check.
1204
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1205
- */
1206
- function baseIsArguments$1(value) {
1207
- return isObjectLike$8(value) && baseGetTag$4(value) == argsTag$3;
1208
- }
1209
-
1210
- var _baseIsArguments = baseIsArguments$1;
1211
-
1212
- var baseIsArguments = _baseIsArguments,
1213
- isObjectLike$7 = isObjectLike_1;
1214
-
1215
- /** Used for built-in method references. */
1216
- var objectProto$a = Object.prototype;
1217
-
1218
- /** Used to check objects for own properties. */
1219
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
1220
-
1221
- /** Built-in value references. */
1222
- var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
1223
-
1224
- /**
1225
- * Checks if `value` is likely an `arguments` object.
1226
- *
1227
- * @static
1228
- * @memberOf _
1229
- * @since 0.1.0
1230
- * @category Lang
1231
- * @param {*} value The value to check.
1232
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1233
- * else `false`.
1234
- * @example
1235
- *
1236
- * _.isArguments(function() { return arguments; }());
1237
- * // => true
1238
- *
1239
- * _.isArguments([1, 2, 3]);
1240
- * // => false
1241
- */
1242
- var isArguments$3 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1243
- return isObjectLike$7(value) && hasOwnProperty$8.call(value, 'callee') &&
1244
- !propertyIsEnumerable$1.call(value, 'callee');
1245
- };
1246
-
1247
- var isArguments_1 = isArguments$3;
1248
-
1249
- /**
1250
- * Checks if `value` is classified as an `Array` object.
1251
- *
1252
- * @static
1253
- * @memberOf _
1254
- * @since 0.1.0
1255
- * @category Lang
1256
- * @param {*} value The value to check.
1257
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1258
- * @example
1259
- *
1260
- * _.isArray([1, 2, 3]);
1261
- * // => true
1262
- *
1263
- * _.isArray(document.body.children);
1264
- * // => false
1265
- *
1266
- * _.isArray('abc');
1267
- * // => false
1268
- *
1269
- * _.isArray(_.noop);
1270
- * // => false
1271
- */
1272
-
1273
- var isArray$9 = Array.isArray;
1274
-
1275
- var isArray_1 = isArray$9;
1276
-
1277
- var isBuffer$5 = {exports: {}};
1278
-
1279
- /**
1280
- * This method returns `false`.
1281
- *
1282
- * @static
1283
- * @memberOf _
1284
- * @since 4.13.0
1285
- * @category Util
1286
- * @returns {boolean} Returns `false`.
1287
- * @example
1288
- *
1289
- * _.times(2, _.stubFalse);
1290
- * // => [false, false]
1291
- */
1292
-
1293
- function stubFalse() {
1294
- return false;
1295
- }
1296
-
1297
- var stubFalse_1 = stubFalse;
1298
-
1299
- (function (module, exports) {
1300
- var root = _root,
1301
- stubFalse = stubFalse_1;
1302
-
1303
- /** Detect free variable `exports`. */
1304
- var freeExports = exports && !exports.nodeType && exports;
1305
-
1306
- /** Detect free variable `module`. */
1307
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1308
-
1309
- /** Detect the popular CommonJS extension `module.exports`. */
1310
- var moduleExports = freeModule && freeModule.exports === freeExports;
1311
-
1312
- /** Built-in value references. */
1313
- var Buffer = moduleExports ? root.Buffer : undefined;
1314
-
1315
- /* Built-in method references for those with the same name as other `lodash` methods. */
1316
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1317
-
1318
- /**
1319
- * Checks if `value` is a buffer.
1320
- *
1321
- * @static
1322
- * @memberOf _
1323
- * @since 4.3.0
1324
- * @category Lang
1325
- * @param {*} value The value to check.
1326
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1327
- * @example
1328
- *
1329
- * _.isBuffer(new Buffer(2));
1330
- * // => true
1331
- *
1332
- * _.isBuffer(new Uint8Array(2));
1333
- * // => false
1334
- */
1335
- var isBuffer = nativeIsBuffer || stubFalse;
1336
-
1337
- module.exports = isBuffer;
1338
- }(isBuffer$5, isBuffer$5.exports));
1339
-
1340
- /** Used as references for various `Number` constants. */
1341
-
1342
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
1343
-
1344
- /** Used to detect unsigned integer values. */
1345
- var reIsUint = /^(?:0|[1-9]\d*)$/;
1346
-
1347
- /**
1348
- * Checks if `value` is a valid array-like index.
1349
- *
1350
- * @private
1351
- * @param {*} value The value to check.
1352
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1353
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1354
- */
1355
- function isIndex$2(value, length) {
1356
- var type = typeof value;
1357
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
1358
-
1359
- return !!length &&
1360
- (type == 'number' ||
1361
- (type != 'symbol' && reIsUint.test(value))) &&
1362
- (value > -1 && value % 1 == 0 && value < length);
1363
- }
1364
-
1365
- var _isIndex = isIndex$2;
1366
-
1367
- /** Used as references for various `Number` constants. */
1368
-
1369
- var MAX_SAFE_INTEGER = 9007199254740991;
1370
-
1371
- /**
1372
- * Checks if `value` is a valid array-like length.
1373
- *
1374
- * **Note:** This method is loosely based on
1375
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1376
- *
1377
- * @static
1378
- * @memberOf _
1379
- * @since 4.0.0
1380
- * @category Lang
1381
- * @param {*} value The value to check.
1382
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1383
- * @example
1384
- *
1385
- * _.isLength(3);
1386
- * // => true
1387
- *
1388
- * _.isLength(Number.MIN_VALUE);
1389
- * // => false
1390
- *
1391
- * _.isLength(Infinity);
1392
- * // => false
1393
- *
1394
- * _.isLength('3');
1395
- * // => false
1396
- */
1397
- function isLength$2(value) {
1398
- return typeof value == 'number' &&
1399
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1400
- }
1401
-
1402
- var isLength_1 = isLength$2;
1403
-
1404
- var baseGetTag$3 = _baseGetTag,
1405
- isLength$1 = isLength_1,
1406
- isObjectLike$6 = isObjectLike_1;
1407
-
1408
- /** `Object#toString` result references. */
1409
- var argsTag$2 = '[object Arguments]',
1410
- arrayTag$2 = '[object Array]',
1411
- boolTag$3 = '[object Boolean]',
1412
- dateTag$3 = '[object Date]',
1413
- errorTag$2 = '[object Error]',
1414
- funcTag$1 = '[object Function]',
1415
- mapTag$6 = '[object Map]',
1416
- numberTag$3 = '[object Number]',
1417
- objectTag$4 = '[object Object]',
1418
- regexpTag$3 = '[object RegExp]',
1419
- setTag$6 = '[object Set]',
1420
- stringTag$3 = '[object String]',
1421
- weakMapTag$2 = '[object WeakMap]';
1422
-
1423
- var arrayBufferTag$3 = '[object ArrayBuffer]',
1424
- dataViewTag$4 = '[object DataView]',
1425
- float32Tag$2 = '[object Float32Array]',
1426
- float64Tag$2 = '[object Float64Array]',
1427
- int8Tag$2 = '[object Int8Array]',
1428
- int16Tag$2 = '[object Int16Array]',
1429
- int32Tag$2 = '[object Int32Array]',
1430
- uint8Tag$2 = '[object Uint8Array]',
1431
- uint8ClampedTag$2 = '[object Uint8ClampedArray]',
1432
- uint16Tag$2 = '[object Uint16Array]',
1433
- uint32Tag$2 = '[object Uint32Array]';
1434
-
1435
- /** Used to identify `toStringTag` values of typed arrays. */
1436
- var typedArrayTags = {};
1437
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
1438
- typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
1439
- typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
1440
- typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
1441
- typedArrayTags[uint32Tag$2] = true;
1442
- typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] =
1443
- typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] =
1444
- typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] =
1445
- typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] =
1446
- typedArrayTags[mapTag$6] = typedArrayTags[numberTag$3] =
1447
- typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] =
1448
- typedArrayTags[setTag$6] = typedArrayTags[stringTag$3] =
1449
- typedArrayTags[weakMapTag$2] = false;
1450
-
1451
- /**
1452
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
1453
- *
1454
- * @private
1455
- * @param {*} value The value to check.
1456
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1457
- */
1458
- function baseIsTypedArray$1(value) {
1459
- return isObjectLike$6(value) &&
1460
- isLength$1(value.length) && !!typedArrayTags[baseGetTag$3(value)];
1461
- }
1462
-
1463
- var _baseIsTypedArray = baseIsTypedArray$1;
1464
-
1465
- /**
1466
- * The base implementation of `_.unary` without support for storing metadata.
1467
- *
1468
- * @private
1469
- * @param {Function} func The function to cap arguments for.
1470
- * @returns {Function} Returns the new capped function.
1471
- */
1472
-
1473
- function baseUnary$3(func) {
1474
- return function(value) {
1475
- return func(value);
1476
- };
1477
- }
1478
-
1479
- var _baseUnary = baseUnary$3;
1480
-
1481
- var _nodeUtil = {exports: {}};
1482
-
1483
- (function (module, exports) {
1484
- var freeGlobal = _freeGlobal;
1485
-
1486
- /** Detect free variable `exports`. */
1487
- var freeExports = exports && !exports.nodeType && exports;
1488
-
1489
- /** Detect free variable `module`. */
1490
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1491
-
1492
- /** Detect the popular CommonJS extension `module.exports`. */
1493
- var moduleExports = freeModule && freeModule.exports === freeExports;
1494
-
1495
- /** Detect free variable `process` from Node.js. */
1496
- var freeProcess = moduleExports && freeGlobal.process;
1497
-
1498
- /** Used to access faster Node.js helpers. */
1499
- var nodeUtil = (function() {
1500
- try {
1501
- // Use `util.types` for Node.js 10+.
1502
- var types = freeModule && freeModule.require && freeModule.require('util').types;
1503
-
1504
- if (types) {
1505
- return types;
1506
- }
1507
-
1508
- // Legacy `process.binding('util')` for Node.js < 10.
1509
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
1510
- } catch (e) {}
1511
- }());
1512
-
1513
- module.exports = nodeUtil;
1514
- }(_nodeUtil, _nodeUtil.exports));
1515
-
1516
- var baseIsTypedArray = _baseIsTypedArray,
1517
- baseUnary$2 = _baseUnary,
1518
- nodeUtil$2 = _nodeUtil.exports;
1519
-
1520
- /* Node.js helper references. */
1521
- var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
1522
-
1523
- /**
1524
- * Checks if `value` is classified as a typed array.
1525
- *
1526
- * @static
1527
- * @memberOf _
1528
- * @since 3.0.0
1529
- * @category Lang
1530
- * @param {*} value The value to check.
1531
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1532
- * @example
1533
- *
1534
- * _.isTypedArray(new Uint8Array);
1535
- * // => true
1536
- *
1537
- * _.isTypedArray([]);
1538
- * // => false
1539
- */
1540
- var isTypedArray$4 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
1541
-
1542
- var isTypedArray_1 = isTypedArray$4;
1543
-
1544
- var baseTimes = _baseTimes,
1545
- isArguments$2 = isArguments_1,
1546
- isArray$8 = isArray_1,
1547
- isBuffer$4 = isBuffer$5.exports,
1548
- isIndex$1 = _isIndex,
1549
- isTypedArray$3 = isTypedArray_1;
1550
-
1551
- /** Used for built-in method references. */
1552
- var objectProto$9 = Object.prototype;
1553
-
1554
- /** Used to check objects for own properties. */
1555
- var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
1556
-
1557
- /**
1558
- * Creates an array of the enumerable property names of the array-like `value`.
1559
- *
1560
- * @private
1561
- * @param {*} value The value to query.
1562
- * @param {boolean} inherited Specify returning inherited property names.
1563
- * @returns {Array} Returns the array of property names.
1564
- */
1565
- function arrayLikeKeys$2(value, inherited) {
1566
- var isArr = isArray$8(value),
1567
- isArg = !isArr && isArguments$2(value),
1568
- isBuff = !isArr && !isArg && isBuffer$4(value),
1569
- isType = !isArr && !isArg && !isBuff && isTypedArray$3(value),
1570
- skipIndexes = isArr || isArg || isBuff || isType,
1571
- result = skipIndexes ? baseTimes(value.length, String) : [],
1572
- length = result.length;
1573
-
1574
- for (var key in value) {
1575
- if ((inherited || hasOwnProperty$7.call(value, key)) &&
1576
- !(skipIndexes && (
1577
- // Safari 9 has enumerable `arguments.length` in strict mode.
1578
- key == 'length' ||
1579
- // Node.js 0.10 has enumerable non-index properties on buffers.
1580
- (isBuff && (key == 'offset' || key == 'parent')) ||
1581
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
1582
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1583
- // Skip index properties.
1584
- isIndex$1(key, length)
1585
- ))) {
1586
- result.push(key);
1587
- }
1588
- }
1589
- return result;
1590
- }
1591
-
1592
- var _arrayLikeKeys = arrayLikeKeys$2;
1593
-
1594
- /** Used for built-in method references. */
1595
-
1596
- var objectProto$8 = Object.prototype;
1597
-
1598
- /**
1599
- * Checks if `value` is likely a prototype object.
1600
- *
1601
- * @private
1602
- * @param {*} value The value to check.
1603
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1604
- */
1605
- function isPrototype$4(value) {
1606
- var Ctor = value && value.constructor,
1607
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$8;
1608
-
1609
- return value === proto;
1610
- }
1611
-
1612
- var _isPrototype = isPrototype$4;
1613
-
1614
- /**
1615
- * Creates a unary function that invokes `func` with its argument transformed.
1616
- *
1617
- * @private
1618
- * @param {Function} func The function to wrap.
1619
- * @param {Function} transform The argument transform.
1620
- * @returns {Function} Returns the new function.
1621
- */
1622
-
1623
- function overArg$2(func, transform) {
1624
- return function(arg) {
1625
- return func(transform(arg));
1626
- };
1627
- }
1628
-
1629
- var _overArg = overArg$2;
1630
-
1631
- var overArg$1 = _overArg;
1632
-
1633
- /* Built-in method references for those with the same name as other `lodash` methods. */
1634
- var nativeKeys$1 = overArg$1(Object.keys, Object);
1635
-
1636
- var _nativeKeys = nativeKeys$1;
1637
-
1638
- var isPrototype$3 = _isPrototype,
1639
- nativeKeys = _nativeKeys;
1640
-
1641
- /** Used for built-in method references. */
1642
- var objectProto$7 = Object.prototype;
1643
-
1644
- /** Used to check objects for own properties. */
1645
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
1646
-
1647
- /**
1648
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1649
- *
1650
- * @private
1651
- * @param {Object} object The object to query.
1652
- * @returns {Array} Returns the array of property names.
1653
- */
1654
- function baseKeys$2(object) {
1655
- if (!isPrototype$3(object)) {
1656
- return nativeKeys(object);
1657
- }
1658
- var result = [];
1659
- for (var key in Object(object)) {
1660
- if (hasOwnProperty$6.call(object, key) && key != 'constructor') {
1661
- result.push(key);
1662
- }
1663
- }
1664
- return result;
1665
- }
1666
-
1667
- var _baseKeys = baseKeys$2;
1668
-
1669
- var isFunction$1 = isFunction_1,
1670
- isLength = isLength_1;
1671
-
1672
- /**
1673
- * Checks if `value` is array-like. A value is considered array-like if it's
1674
- * not a function and has a `value.length` that's an integer greater than or
1675
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1676
- *
1677
- * @static
1678
- * @memberOf _
1679
- * @since 4.0.0
1680
- * @category Lang
1681
- * @param {*} value The value to check.
1682
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1683
- * @example
1684
- *
1685
- * _.isArrayLike([1, 2, 3]);
1686
- * // => true
1687
- *
1688
- * _.isArrayLike(document.body.children);
1689
- * // => true
1690
- *
1691
- * _.isArrayLike('abc');
1692
- * // => true
1693
- *
1694
- * _.isArrayLike(_.noop);
1695
- * // => false
1696
- */
1697
- function isArrayLike$5(value) {
1698
- return value != null && isLength(value.length) && !isFunction$1(value);
1699
- }
1700
-
1701
- var isArrayLike_1 = isArrayLike$5;
1702
-
1703
- var arrayLikeKeys$1 = _arrayLikeKeys,
1704
- baseKeys$1 = _baseKeys,
1705
- isArrayLike$4 = isArrayLike_1;
1706
-
1707
- /**
1708
- * Creates an array of the own enumerable property names of `object`.
1709
- *
1710
- * **Note:** Non-object values are coerced to objects. See the
1711
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1712
- * for more details.
1713
- *
1714
- * @static
1715
- * @since 0.1.0
1716
- * @memberOf _
1717
- * @category Object
1718
- * @param {Object} object The object to query.
1719
- * @returns {Array} Returns the array of property names.
1720
- * @example
1721
- *
1722
- * function Foo() {
1723
- * this.a = 1;
1724
- * this.b = 2;
1725
- * }
1726
- *
1727
- * Foo.prototype.c = 3;
1728
- *
1729
- * _.keys(new Foo);
1730
- * // => ['a', 'b'] (iteration order is not guaranteed)
1731
- *
1732
- * _.keys('hi');
1733
- * // => ['0', '1']
1734
- */
1735
- function keys$3(object) {
1736
- return isArrayLike$4(object) ? arrayLikeKeys$1(object) : baseKeys$1(object);
1737
- }
1738
-
1739
- var keys_1 = keys$3;
1740
-
1741
- var copyObject$4 = _copyObject,
1742
- keys$2 = keys_1;
1743
-
1744
- /**
1745
- * The base implementation of `_.assign` without support for multiple sources
1746
- * or `customizer` functions.
1747
- *
1748
- * @private
1749
- * @param {Object} object The destination object.
1750
- * @param {Object} source The source object.
1751
- * @returns {Object} Returns `object`.
1752
- */
1753
- function baseAssign$1(object, source) {
1754
- return object && copyObject$4(source, keys$2(source), object);
1755
- }
1756
-
1757
- var _baseAssign = baseAssign$1;
1758
-
1759
- /**
1760
- * This function is like
1761
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1762
- * except that it includes inherited enumerable properties.
1763
- *
1764
- * @private
1765
- * @param {Object} object The object to query.
1766
- * @returns {Array} Returns the array of property names.
1767
- */
1768
-
1769
- function nativeKeysIn$1(object) {
1770
- var result = [];
1771
- if (object != null) {
1772
- for (var key in Object(object)) {
1773
- result.push(key);
1774
- }
1775
- }
1776
- return result;
1777
- }
1778
-
1779
- var _nativeKeysIn = nativeKeysIn$1;
1780
-
1781
- var isObject$5 = isObject_1,
1782
- isPrototype$2 = _isPrototype,
1783
- nativeKeysIn = _nativeKeysIn;
1784
-
1785
- /** Used for built-in method references. */
1786
- var objectProto$6 = Object.prototype;
1787
-
1788
- /** Used to check objects for own properties. */
1789
- var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
1790
-
1791
- /**
1792
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
1793
- *
1794
- * @private
1795
- * @param {Object} object The object to query.
1796
- * @returns {Array} Returns the array of property names.
1797
- */
1798
- function baseKeysIn$1(object) {
1799
- if (!isObject$5(object)) {
1800
- return nativeKeysIn(object);
1801
- }
1802
- var isProto = isPrototype$2(object),
1803
- result = [];
1804
-
1805
- for (var key in object) {
1806
- if (!(key == 'constructor' && (isProto || !hasOwnProperty$5.call(object, key)))) {
1807
- result.push(key);
1808
- }
1809
- }
1810
- return result;
1811
- }
1812
-
1813
- var _baseKeysIn = baseKeysIn$1;
1814
-
1815
- var arrayLikeKeys = _arrayLikeKeys,
1816
- baseKeysIn = _baseKeysIn,
1817
- isArrayLike$3 = isArrayLike_1;
1818
-
1819
- /**
1820
- * Creates an array of the own and inherited enumerable property names of `object`.
1821
- *
1822
- * **Note:** Non-object values are coerced to objects.
1823
- *
1824
- * @static
1825
- * @memberOf _
1826
- * @since 3.0.0
1827
- * @category Object
1828
- * @param {Object} object The object to query.
1829
- * @returns {Array} Returns the array of property names.
1830
- * @example
1831
- *
1832
- * function Foo() {
1833
- * this.a = 1;
1834
- * this.b = 2;
1835
- * }
1836
- *
1837
- * Foo.prototype.c = 3;
1838
- *
1839
- * _.keysIn(new Foo);
1840
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1841
- */
1842
- function keysIn$5(object) {
1843
- return isArrayLike$3(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1844
- }
1845
-
1846
- var keysIn_1 = keysIn$5;
1847
-
1848
- var copyObject$3 = _copyObject,
1849
- keysIn$4 = keysIn_1;
1850
-
1851
- /**
1852
- * The base implementation of `_.assignIn` without support for multiple sources
1853
- * or `customizer` functions.
1854
- *
1855
- * @private
1856
- * @param {Object} object The destination object.
1857
- * @param {Object} source The source object.
1858
- * @returns {Object} Returns `object`.
1859
- */
1860
- function baseAssignIn$1(object, source) {
1861
- return object && copyObject$3(source, keysIn$4(source), object);
1862
- }
1863
-
1864
- var _baseAssignIn = baseAssignIn$1;
1865
-
1866
- var _cloneBuffer = {exports: {}};
1867
-
1868
- (function (module, exports) {
1869
- var root = _root;
1870
-
1871
- /** Detect free variable `exports`. */
1872
- var freeExports = exports && !exports.nodeType && exports;
1873
-
1874
- /** Detect free variable `module`. */
1875
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1876
-
1877
- /** Detect the popular CommonJS extension `module.exports`. */
1878
- var moduleExports = freeModule && freeModule.exports === freeExports;
1879
-
1880
- /** Built-in value references. */
1881
- var Buffer = moduleExports ? root.Buffer : undefined,
1882
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
1883
-
1884
- /**
1885
- * Creates a clone of `buffer`.
1886
- *
1887
- * @private
1888
- * @param {Buffer} buffer The buffer to clone.
1889
- * @param {boolean} [isDeep] Specify a deep clone.
1890
- * @returns {Buffer} Returns the cloned buffer.
1891
- */
1892
- function cloneBuffer(buffer, isDeep) {
1893
- if (isDeep) {
1894
- return buffer.slice();
1895
- }
1896
- var length = buffer.length,
1897
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1898
-
1899
- buffer.copy(result);
1900
- return result;
1901
- }
1902
-
1903
- module.exports = cloneBuffer;
1904
- }(_cloneBuffer, _cloneBuffer.exports));
1905
-
1906
- /**
1907
- * Copies the values of `source` to `array`.
1908
- *
1909
- * @private
1910
- * @param {Array} source The array to copy values from.
1911
- * @param {Array} [array=[]] The array to copy values to.
1912
- * @returns {Array} Returns `array`.
1913
- */
1914
-
1915
- function copyArray$2(source, array) {
1916
- var index = -1,
1917
- length = source.length;
1918
-
1919
- array || (array = Array(length));
1920
- while (++index < length) {
1921
- array[index] = source[index];
1922
- }
1923
- return array;
1924
- }
1925
-
1926
- var _copyArray = copyArray$2;
1927
-
1928
- /**
1929
- * A specialized version of `_.filter` for arrays without support for
1930
- * iteratee shorthands.
1931
- *
1932
- * @private
1933
- * @param {Array} [array] The array to iterate over.
1934
- * @param {Function} predicate The function invoked per iteration.
1935
- * @returns {Array} Returns the new filtered array.
1936
- */
1937
-
1938
- function arrayFilter$1(array, predicate) {
1939
- var index = -1,
1940
- length = array == null ? 0 : array.length,
1941
- resIndex = 0,
1942
- result = [];
1943
-
1944
- while (++index < length) {
1945
- var value = array[index];
1946
- if (predicate(value, index, array)) {
1947
- result[resIndex++] = value;
1948
- }
1949
- }
1950
- return result;
1951
- }
1952
-
1953
- var _arrayFilter = arrayFilter$1;
1954
-
1955
- /**
1956
- * This method returns a new empty array.
1957
- *
1958
- * @static
1959
- * @memberOf _
1960
- * @since 4.13.0
1961
- * @category Util
1962
- * @returns {Array} Returns the new empty array.
1963
- * @example
1964
- *
1965
- * var arrays = _.times(2, _.stubArray);
1966
- *
1967
- * console.log(arrays);
1968
- * // => [[], []]
1969
- *
1970
- * console.log(arrays[0] === arrays[1]);
1971
- * // => false
1972
- */
1973
-
1974
- function stubArray$2() {
1975
- return [];
1976
- }
1977
-
1978
- var stubArray_1 = stubArray$2;
1979
-
1980
- var arrayFilter = _arrayFilter,
1981
- stubArray$1 = stubArray_1;
1982
-
1983
- /** Used for built-in method references. */
1984
- var objectProto$5 = Object.prototype;
1985
-
1986
- /** Built-in value references. */
1987
- var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
1988
-
1989
- /* Built-in method references for those with the same name as other `lodash` methods. */
1990
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
1991
-
1992
- /**
1993
- * Creates an array of the own enumerable symbols of `object`.
1994
- *
1995
- * @private
1996
- * @param {Object} object The object to query.
1997
- * @returns {Array} Returns the array of symbols.
1998
- */
1999
- var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
2000
- if (object == null) {
2001
- return [];
2002
- }
2003
- object = Object(object);
2004
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2005
- return propertyIsEnumerable.call(object, symbol);
2006
- });
2007
- };
2008
-
2009
- var _getSymbols = getSymbols$3;
2010
-
2011
- var copyObject$2 = _copyObject,
2012
- getSymbols$2 = _getSymbols;
2013
-
2014
- /**
2015
- * Copies own symbols of `source` to `object`.
2016
- *
2017
- * @private
2018
- * @param {Object} source The object to copy symbols from.
2019
- * @param {Object} [object={}] The object to copy symbols to.
2020
- * @returns {Object} Returns `object`.
2021
- */
2022
- function copySymbols$1(source, object) {
2023
- return copyObject$2(source, getSymbols$2(source), object);
2024
- }
2025
-
2026
- var _copySymbols = copySymbols$1;
2027
-
2028
- /**
2029
- * Appends the elements of `values` to `array`.
2030
- *
2031
- * @private
2032
- * @param {Array} array The array to modify.
2033
- * @param {Array} values The values to append.
2034
- * @returns {Array} Returns `array`.
2035
- */
2036
-
2037
- function arrayPush$2(array, values) {
2038
- var index = -1,
2039
- length = values.length,
2040
- offset = array.length;
2041
-
2042
- while (++index < length) {
2043
- array[offset + index] = values[index];
2044
- }
2045
- return array;
2046
- }
2047
-
2048
- var _arrayPush = arrayPush$2;
2049
-
2050
- var overArg = _overArg;
2051
-
2052
- /** Built-in value references. */
2053
- var getPrototype$3 = overArg(Object.getPrototypeOf, Object);
2054
-
2055
- var _getPrototype = getPrototype$3;
2056
-
2057
- var arrayPush$1 = _arrayPush,
2058
- getPrototype$2 = _getPrototype,
2059
- getSymbols$1 = _getSymbols,
2060
- stubArray = stubArray_1;
2061
-
2062
- /* Built-in method references for those with the same name as other `lodash` methods. */
2063
- var nativeGetSymbols = Object.getOwnPropertySymbols;
2064
-
2065
- /**
2066
- * Creates an array of the own and inherited enumerable symbols of `object`.
2067
- *
2068
- * @private
2069
- * @param {Object} object The object to query.
2070
- * @returns {Array} Returns the array of symbols.
2071
- */
2072
- var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
2073
- var result = [];
2074
- while (object) {
2075
- arrayPush$1(result, getSymbols$1(object));
2076
- object = getPrototype$2(object);
2077
- }
2078
- return result;
2079
- };
2080
-
2081
- var _getSymbolsIn = getSymbolsIn$2;
2082
-
2083
- var copyObject$1 = _copyObject,
2084
- getSymbolsIn$1 = _getSymbolsIn;
2085
-
2086
- /**
2087
- * Copies own and inherited symbols of `source` to `object`.
2088
- *
2089
- * @private
2090
- * @param {Object} source The object to copy symbols from.
2091
- * @param {Object} [object={}] The object to copy symbols to.
2092
- * @returns {Object} Returns `object`.
2093
- */
2094
- function copySymbolsIn$1(source, object) {
2095
- return copyObject$1(source, getSymbolsIn$1(source), object);
2096
- }
2097
-
2098
- var _copySymbolsIn = copySymbolsIn$1;
2099
-
2100
- var arrayPush = _arrayPush,
2101
- isArray$7 = isArray_1;
2102
-
2103
- /**
2104
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2105
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2106
- * symbols of `object`.
2107
- *
2108
- * @private
2109
- * @param {Object} object The object to query.
2110
- * @param {Function} keysFunc The function to get the keys of `object`.
2111
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
2112
- * @returns {Array} Returns the array of property names and symbols.
2113
- */
2114
- function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
2115
- var result = keysFunc(object);
2116
- return isArray$7(object) ? result : arrayPush(result, symbolsFunc(object));
2117
- }
2118
-
2119
- var _baseGetAllKeys = baseGetAllKeys$2;
2120
-
2121
- var baseGetAllKeys$1 = _baseGetAllKeys,
2122
- getSymbols = _getSymbols,
2123
- keys$1 = keys_1;
2124
-
2125
- /**
2126
- * Creates an array of own enumerable property names and symbols of `object`.
2127
- *
2128
- * @private
2129
- * @param {Object} object The object to query.
2130
- * @returns {Array} Returns the array of property names and symbols.
2131
- */
2132
- function getAllKeys$2(object) {
2133
- return baseGetAllKeys$1(object, keys$1, getSymbols);
2134
- }
2135
-
2136
- var _getAllKeys = getAllKeys$2;
2137
-
2138
- var baseGetAllKeys = _baseGetAllKeys,
2139
- getSymbolsIn = _getSymbolsIn,
2140
- keysIn$3 = keysIn_1;
2141
-
2142
- /**
2143
- * Creates an array of own and inherited enumerable property names and
2144
- * symbols of `object`.
2145
- *
2146
- * @private
2147
- * @param {Object} object The object to query.
2148
- * @returns {Array} Returns the array of property names and symbols.
2149
- */
2150
- function getAllKeysIn$1(object) {
2151
- return baseGetAllKeys(object, keysIn$3, getSymbolsIn);
2152
- }
2153
-
2154
- var _getAllKeysIn = getAllKeysIn$1;
2155
-
2156
- var getNative$3 = _getNative,
2157
- root$4 = _root;
2158
-
2159
- /* Built-in method references that are verified to be native. */
2160
- var DataView$1 = getNative$3(root$4, 'DataView');
2161
-
2162
- var _DataView = DataView$1;
2163
-
2164
- var getNative$2 = _getNative,
2165
- root$3 = _root;
2166
-
2167
- /* Built-in method references that are verified to be native. */
2168
- var Promise$2 = getNative$2(root$3, 'Promise');
2169
-
2170
- var _Promise = Promise$2;
2171
-
2172
- var getNative$1 = _getNative,
2173
- root$2 = _root;
2174
-
2175
- /* Built-in method references that are verified to be native. */
2176
- var Set$1 = getNative$1(root$2, 'Set');
2177
-
2178
- var _Set = Set$1;
2179
-
2180
- var getNative = _getNative,
2181
- root$1 = _root;
2182
-
2183
- /* Built-in method references that are verified to be native. */
2184
- var WeakMap$1 = getNative(root$1, 'WeakMap');
2185
-
2186
- var _WeakMap = WeakMap$1;
2187
-
2188
- var DataView = _DataView,
2189
- Map = _Map,
2190
- Promise$1 = _Promise,
2191
- Set = _Set,
2192
- WeakMap = _WeakMap,
2193
- baseGetTag$2 = _baseGetTag,
2194
- toSource = _toSource;
2195
-
2196
- /** `Object#toString` result references. */
2197
- var mapTag$5 = '[object Map]',
2198
- objectTag$3 = '[object Object]',
2199
- promiseTag = '[object Promise]',
2200
- setTag$5 = '[object Set]',
2201
- weakMapTag$1 = '[object WeakMap]';
2202
-
2203
- var dataViewTag$3 = '[object DataView]';
2204
-
2205
- /** Used to detect maps, sets, and weakmaps. */
2206
- var dataViewCtorString = toSource(DataView),
2207
- mapCtorString = toSource(Map),
2208
- promiseCtorString = toSource(Promise$1),
2209
- setCtorString = toSource(Set),
2210
- weakMapCtorString = toSource(WeakMap);
2211
-
2212
- /**
2213
- * Gets the `toStringTag` of `value`.
2214
- *
2215
- * @private
2216
- * @param {*} value The value to query.
2217
- * @returns {string} Returns the `toStringTag`.
2218
- */
2219
- var getTag$5 = baseGetTag$2;
2220
-
2221
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2222
- if ((DataView && getTag$5(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
2223
- (Map && getTag$5(new Map) != mapTag$5) ||
2224
- (Promise$1 && getTag$5(Promise$1.resolve()) != promiseTag) ||
2225
- (Set && getTag$5(new Set) != setTag$5) ||
2226
- (WeakMap && getTag$5(new WeakMap) != weakMapTag$1)) {
2227
- getTag$5 = function(value) {
2228
- var result = baseGetTag$2(value),
2229
- Ctor = result == objectTag$3 ? value.constructor : undefined,
2230
- ctorString = Ctor ? toSource(Ctor) : '';
2231
-
2232
- if (ctorString) {
2233
- switch (ctorString) {
2234
- case dataViewCtorString: return dataViewTag$3;
2235
- case mapCtorString: return mapTag$5;
2236
- case promiseCtorString: return promiseTag;
2237
- case setCtorString: return setTag$5;
2238
- case weakMapCtorString: return weakMapTag$1;
2239
- }
2240
- }
2241
- return result;
2242
- };
2243
- }
2244
-
2245
- var _getTag = getTag$5;
2246
-
2247
- /** Used for built-in method references. */
2248
-
2249
- var objectProto$4 = Object.prototype;
2250
-
2251
- /** Used to check objects for own properties. */
2252
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
2253
-
2254
- /**
2255
- * Initializes an array clone.
2256
- *
2257
- * @private
2258
- * @param {Array} array The array to clone.
2259
- * @returns {Array} Returns the initialized clone.
2260
- */
2261
- function initCloneArray$1(array) {
2262
- var length = array.length,
2263
- result = new array.constructor(length);
2264
-
2265
- // Add properties assigned by `RegExp#exec`.
2266
- if (length && typeof array[0] == 'string' && hasOwnProperty$4.call(array, 'index')) {
2267
- result.index = array.index;
2268
- result.input = array.input;
2269
- }
2270
- return result;
2271
- }
2272
-
2273
- var _initCloneArray = initCloneArray$1;
2274
-
2275
- var root = _root;
2276
-
2277
- /** Built-in value references. */
2278
- var Uint8Array$2 = root.Uint8Array;
2279
-
2280
- var _Uint8Array = Uint8Array$2;
2281
-
2282
- var Uint8Array$1 = _Uint8Array;
2283
-
2284
- /**
2285
- * Creates a clone of `arrayBuffer`.
2286
- *
2287
- * @private
2288
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2289
- * @returns {ArrayBuffer} Returns the cloned array buffer.
2290
- */
2291
- function cloneArrayBuffer$3(arrayBuffer) {
2292
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2293
- new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
2294
- return result;
2295
- }
2296
-
2297
- var _cloneArrayBuffer = cloneArrayBuffer$3;
2298
-
2299
- var cloneArrayBuffer$2 = _cloneArrayBuffer;
2300
-
2301
- /**
2302
- * Creates a clone of `dataView`.
2303
- *
2304
- * @private
2305
- * @param {Object} dataView The data view to clone.
2306
- * @param {boolean} [isDeep] Specify a deep clone.
2307
- * @returns {Object} Returns the cloned data view.
2308
- */
2309
- function cloneDataView$1(dataView, isDeep) {
2310
- var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
2311
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2312
- }
2313
-
2314
- var _cloneDataView = cloneDataView$1;
2315
-
2316
- /** Used to match `RegExp` flags from their coerced string values. */
2317
-
2318
- var reFlags = /\w*$/;
2319
-
2320
- /**
2321
- * Creates a clone of `regexp`.
2322
- *
2323
- * @private
2324
- * @param {Object} regexp The regexp to clone.
2325
- * @returns {Object} Returns the cloned regexp.
2326
- */
2327
- function cloneRegExp$1(regexp) {
2328
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2329
- result.lastIndex = regexp.lastIndex;
2330
- return result;
2331
- }
2332
-
2333
- var _cloneRegExp = cloneRegExp$1;
2334
-
2335
- var Symbol$2 = _Symbol;
2336
-
2337
- /** Used to convert symbols to primitives and strings. */
2338
- var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : undefined,
2339
- symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : undefined;
2340
-
2341
- /**
2342
- * Creates a clone of the `symbol` object.
2343
- *
2344
- * @private
2345
- * @param {Object} symbol The symbol object to clone.
2346
- * @returns {Object} Returns the cloned symbol object.
2347
- */
2348
- function cloneSymbol$1(symbol) {
2349
- return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
2350
- }
2351
-
2352
- var _cloneSymbol = cloneSymbol$1;
2353
-
2354
- var cloneArrayBuffer$1 = _cloneArrayBuffer;
2355
-
2356
- /**
2357
- * Creates a clone of `typedArray`.
2358
- *
2359
- * @private
2360
- * @param {Object} typedArray The typed array to clone.
2361
- * @param {boolean} [isDeep] Specify a deep clone.
2362
- * @returns {Object} Returns the cloned typed array.
2363
- */
2364
- function cloneTypedArray$2(typedArray, isDeep) {
2365
- var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
2366
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2367
- }
2368
-
2369
- var _cloneTypedArray = cloneTypedArray$2;
2370
-
2371
- var cloneArrayBuffer = _cloneArrayBuffer,
2372
- cloneDataView = _cloneDataView,
2373
- cloneRegExp = _cloneRegExp,
2374
- cloneSymbol = _cloneSymbol,
2375
- cloneTypedArray$1 = _cloneTypedArray;
2376
-
2377
- /** `Object#toString` result references. */
2378
- var boolTag$2 = '[object Boolean]',
2379
- dateTag$2 = '[object Date]',
2380
- mapTag$4 = '[object Map]',
2381
- numberTag$2 = '[object Number]',
2382
- regexpTag$2 = '[object RegExp]',
2383
- setTag$4 = '[object Set]',
2384
- stringTag$2 = '[object String]',
2385
- symbolTag$3 = '[object Symbol]';
2386
-
2387
- var arrayBufferTag$2 = '[object ArrayBuffer]',
2388
- dataViewTag$2 = '[object DataView]',
2389
- float32Tag$1 = '[object Float32Array]',
2390
- float64Tag$1 = '[object Float64Array]',
2391
- int8Tag$1 = '[object Int8Array]',
2392
- int16Tag$1 = '[object Int16Array]',
2393
- int32Tag$1 = '[object Int32Array]',
2394
- uint8Tag$1 = '[object Uint8Array]',
2395
- uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2396
- uint16Tag$1 = '[object Uint16Array]',
2397
- uint32Tag$1 = '[object Uint32Array]';
2398
-
2399
- /**
2400
- * Initializes an object clone based on its `toStringTag`.
2401
- *
2402
- * **Note:** This function only supports cloning values with tags of
2403
- * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2404
- *
2405
- * @private
2406
- * @param {Object} object The object to clone.
2407
- * @param {string} tag The `toStringTag` of the object to clone.
2408
- * @param {boolean} [isDeep] Specify a deep clone.
2409
- * @returns {Object} Returns the initialized clone.
2410
- */
2411
- function initCloneByTag$1(object, tag, isDeep) {
2412
- var Ctor = object.constructor;
2413
- switch (tag) {
2414
- case arrayBufferTag$2:
2415
- return cloneArrayBuffer(object);
2416
-
2417
- case boolTag$2:
2418
- case dateTag$2:
2419
- return new Ctor(+object);
2420
-
2421
- case dataViewTag$2:
2422
- return cloneDataView(object, isDeep);
2423
-
2424
- case float32Tag$1: case float64Tag$1:
2425
- case int8Tag$1: case int16Tag$1: case int32Tag$1:
2426
- case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2427
- return cloneTypedArray$1(object, isDeep);
2428
-
2429
- case mapTag$4:
2430
- return new Ctor;
2431
-
2432
- case numberTag$2:
2433
- case stringTag$2:
2434
- return new Ctor(object);
2435
-
2436
- case regexpTag$2:
2437
- return cloneRegExp(object);
2438
-
2439
- case setTag$4:
2440
- return new Ctor;
2441
-
2442
- case symbolTag$3:
2443
- return cloneSymbol(object);
2444
- }
2445
- }
2446
-
2447
- var _initCloneByTag = initCloneByTag$1;
2448
-
2449
- var isObject$4 = isObject_1;
2450
-
2451
- /** Built-in value references. */
2452
- var objectCreate = Object.create;
2453
-
2454
- /**
2455
- * The base implementation of `_.create` without support for assigning
2456
- * properties to the created object.
2457
- *
2458
- * @private
2459
- * @param {Object} proto The object to inherit from.
2460
- * @returns {Object} Returns the new object.
2461
- */
2462
- var baseCreate$1 = (function() {
2463
- function object() {}
2464
- return function(proto) {
2465
- if (!isObject$4(proto)) {
2466
- return {};
2467
- }
2468
- if (objectCreate) {
2469
- return objectCreate(proto);
2470
- }
2471
- object.prototype = proto;
2472
- var result = new object;
2473
- object.prototype = undefined;
2474
- return result;
2475
- };
2476
- }());
2477
-
2478
- var _baseCreate = baseCreate$1;
2479
-
2480
- var baseCreate = _baseCreate,
2481
- getPrototype$1 = _getPrototype,
2482
- isPrototype$1 = _isPrototype;
2483
-
2484
- /**
2485
- * Initializes an object clone.
2486
- *
2487
- * @private
2488
- * @param {Object} object The object to clone.
2489
- * @returns {Object} Returns the initialized clone.
2490
- */
2491
- function initCloneObject$2(object) {
2492
- return (typeof object.constructor == 'function' && !isPrototype$1(object))
2493
- ? baseCreate(getPrototype$1(object))
2494
- : {};
2495
- }
2496
-
2497
- var _initCloneObject = initCloneObject$2;
2498
-
2499
- var getTag$4 = _getTag,
2500
- isObjectLike$5 = isObjectLike_1;
2501
-
2502
- /** `Object#toString` result references. */
2503
- var mapTag$3 = '[object Map]';
2504
-
2505
- /**
2506
- * The base implementation of `_.isMap` without Node.js optimizations.
2507
- *
2508
- * @private
2509
- * @param {*} value The value to check.
2510
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2511
- */
2512
- function baseIsMap$1(value) {
2513
- return isObjectLike$5(value) && getTag$4(value) == mapTag$3;
2514
- }
2515
-
2516
- var _baseIsMap = baseIsMap$1;
2517
-
2518
- var baseIsMap = _baseIsMap,
2519
- baseUnary$1 = _baseUnary,
2520
- nodeUtil$1 = _nodeUtil.exports;
2521
-
2522
- /* Node.js helper references. */
2523
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2524
-
2525
- /**
2526
- * Checks if `value` is classified as a `Map` object.
2527
- *
2528
- * @static
2529
- * @memberOf _
2530
- * @since 4.3.0
2531
- * @category Lang
2532
- * @param {*} value The value to check.
2533
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2534
- * @example
2535
- *
2536
- * _.isMap(new Map);
2537
- * // => true
2538
- *
2539
- * _.isMap(new WeakMap);
2540
- * // => false
2541
- */
2542
- var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
2543
-
2544
- var isMap_1 = isMap$1;
2545
-
2546
- var getTag$3 = _getTag,
2547
- isObjectLike$4 = isObjectLike_1;
2548
-
2549
- /** `Object#toString` result references. */
2550
- var setTag$3 = '[object Set]';
2551
-
2552
- /**
2553
- * The base implementation of `_.isSet` without Node.js optimizations.
2554
- *
2555
- * @private
2556
- * @param {*} value The value to check.
2557
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2558
- */
2559
- function baseIsSet$1(value) {
2560
- return isObjectLike$4(value) && getTag$3(value) == setTag$3;
2561
- }
2562
-
2563
- var _baseIsSet = baseIsSet$1;
2564
-
2565
- var baseIsSet = _baseIsSet,
2566
- baseUnary = _baseUnary,
2567
- nodeUtil = _nodeUtil.exports;
2568
-
2569
- /* Node.js helper references. */
2570
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
2571
-
2572
- /**
2573
- * Checks if `value` is classified as a `Set` object.
2574
- *
2575
- * @static
2576
- * @memberOf _
2577
- * @since 4.3.0
2578
- * @category Lang
2579
- * @param {*} value The value to check.
2580
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2581
- * @example
2582
- *
2583
- * _.isSet(new Set);
2584
- * // => true
2585
- *
2586
- * _.isSet(new WeakSet);
2587
- * // => false
2588
- */
2589
- var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2590
-
2591
- var isSet_1 = isSet$1;
2592
-
2593
- var Stack$2 = _Stack,
2594
- arrayEach = _arrayEach,
2595
- assignValue = _assignValue,
2596
- baseAssign = _baseAssign,
2597
- baseAssignIn = _baseAssignIn,
2598
- cloneBuffer$1 = _cloneBuffer.exports,
2599
- copyArray$1 = _copyArray,
2600
- copySymbols = _copySymbols,
2601
- copySymbolsIn = _copySymbolsIn,
2602
- getAllKeys$1 = _getAllKeys,
2603
- getAllKeysIn = _getAllKeysIn,
2604
- getTag$2 = _getTag,
2605
- initCloneArray = _initCloneArray,
2606
- initCloneByTag = _initCloneByTag,
2607
- initCloneObject$1 = _initCloneObject,
2608
- isArray$6 = isArray_1,
2609
- isBuffer$3 = isBuffer$5.exports,
2610
- isMap = isMap_1,
2611
- isObject$3 = isObject_1,
2612
- isSet = isSet_1,
2613
- keys = keys_1,
2614
- keysIn$2 = keysIn_1;
2615
-
2616
- /** Used to compose bitmasks for cloning. */
2617
- var CLONE_DEEP_FLAG$1 = 1,
2618
- CLONE_FLAT_FLAG = 2,
2619
- CLONE_SYMBOLS_FLAG$1 = 4;
2620
-
2621
- /** `Object#toString` result references. */
2622
- var argsTag$1 = '[object Arguments]',
2623
- arrayTag$1 = '[object Array]',
2624
- boolTag$1 = '[object Boolean]',
2625
- dateTag$1 = '[object Date]',
2626
- errorTag$1 = '[object Error]',
2627
- funcTag = '[object Function]',
2628
- genTag = '[object GeneratorFunction]',
2629
- mapTag$2 = '[object Map]',
2630
- numberTag$1 = '[object Number]',
2631
- objectTag$2 = '[object Object]',
2632
- regexpTag$1 = '[object RegExp]',
2633
- setTag$2 = '[object Set]',
2634
- stringTag$1 = '[object String]',
2635
- symbolTag$2 = '[object Symbol]',
2636
- weakMapTag = '[object WeakMap]';
2637
-
2638
- var arrayBufferTag$1 = '[object ArrayBuffer]',
2639
- dataViewTag$1 = '[object DataView]',
2640
- float32Tag = '[object Float32Array]',
2641
- float64Tag = '[object Float64Array]',
2642
- int8Tag = '[object Int8Array]',
2643
- int16Tag = '[object Int16Array]',
2644
- int32Tag = '[object Int32Array]',
2645
- uint8Tag = '[object Uint8Array]',
2646
- uint8ClampedTag = '[object Uint8ClampedArray]',
2647
- uint16Tag = '[object Uint16Array]',
2648
- uint32Tag = '[object Uint32Array]';
2649
-
2650
- /** Used to identify `toStringTag` values supported by `_.clone`. */
2651
- var cloneableTags = {};
2652
- cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] =
2653
- cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] =
2654
- cloneableTags[boolTag$1] = cloneableTags[dateTag$1] =
2655
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2656
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2657
- cloneableTags[int32Tag] = cloneableTags[mapTag$2] =
2658
- cloneableTags[numberTag$1] = cloneableTags[objectTag$2] =
2659
- cloneableTags[regexpTag$1] = cloneableTags[setTag$2] =
2660
- cloneableTags[stringTag$1] = cloneableTags[symbolTag$2] =
2661
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2662
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2663
- cloneableTags[errorTag$1] = cloneableTags[funcTag] =
2664
- cloneableTags[weakMapTag] = false;
2665
-
2666
- /**
2667
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2668
- * traversed objects.
2669
- *
2670
- * @private
2671
- * @param {*} value The value to clone.
2672
- * @param {boolean} bitmask The bitmask flags.
2673
- * 1 - Deep clone
2674
- * 2 - Flatten inherited properties
2675
- * 4 - Clone symbols
2676
- * @param {Function} [customizer] The function to customize cloning.
2677
- * @param {string} [key] The key of `value`.
2678
- * @param {Object} [object] The parent object of `value`.
2679
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2680
- * @returns {*} Returns the cloned value.
2681
- */
2682
- function baseClone$1(value, bitmask, customizer, key, object, stack) {
2683
- var result,
2684
- isDeep = bitmask & CLONE_DEEP_FLAG$1,
2685
- isFlat = bitmask & CLONE_FLAT_FLAG,
2686
- isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2687
-
2688
- if (customizer) {
2689
- result = object ? customizer(value, key, object, stack) : customizer(value);
2690
- }
2691
- if (result !== undefined) {
2692
- return result;
2693
- }
2694
- if (!isObject$3(value)) {
2695
- return value;
2696
- }
2697
- var isArr = isArray$6(value);
2698
- if (isArr) {
2699
- result = initCloneArray(value);
2700
- if (!isDeep) {
2701
- return copyArray$1(value, result);
2702
- }
2703
- } else {
2704
- var tag = getTag$2(value),
2705
- isFunc = tag == funcTag || tag == genTag;
2706
-
2707
- if (isBuffer$3(value)) {
2708
- return cloneBuffer$1(value, isDeep);
2709
- }
2710
- if (tag == objectTag$2 || tag == argsTag$1 || (isFunc && !object)) {
2711
- result = (isFlat || isFunc) ? {} : initCloneObject$1(value);
2712
- if (!isDeep) {
2713
- return isFlat
2714
- ? copySymbolsIn(value, baseAssignIn(result, value))
2715
- : copySymbols(value, baseAssign(result, value));
2716
- }
2717
- } else {
2718
- if (!cloneableTags[tag]) {
2719
- return object ? value : {};
2720
- }
2721
- result = initCloneByTag(value, tag, isDeep);
2722
- }
2723
- }
2724
- // Check for circular references and return its corresponding clone.
2725
- stack || (stack = new Stack$2);
2726
- var stacked = stack.get(value);
2727
- if (stacked) {
2728
- return stacked;
2729
- }
2730
- stack.set(value, result);
2731
-
2732
- if (isSet(value)) {
2733
- value.forEach(function(subValue) {
2734
- result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
2735
- });
2736
- } else if (isMap(value)) {
2737
- value.forEach(function(subValue, key) {
2738
- result.set(key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2739
- });
2740
- }
2741
-
2742
- var keysFunc = isFull
2743
- ? (isFlat ? getAllKeysIn : getAllKeys$1)
2744
- : (isFlat ? keysIn$2 : keys);
2745
-
2746
- var props = isArr ? undefined : keysFunc(value);
2747
- arrayEach(props || value, function(subValue, key) {
2748
- if (props) {
2749
- key = subValue;
2750
- subValue = value[key];
2751
- }
2752
- // Recursively populate clone (susceptible to call stack limits).
2753
- assignValue(result, key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2754
- });
2755
- return result;
2756
- }
2757
-
2758
- var _baseClone = baseClone$1;
2759
-
2760
- var baseClone = _baseClone;
2761
-
2762
- /** Used to compose bitmasks for cloning. */
2763
- var CLONE_DEEP_FLAG = 1,
2764
- CLONE_SYMBOLS_FLAG = 4;
2765
-
2766
- /**
2767
- * This method is like `_.clone` except that it recursively clones `value`.
2768
- *
2769
- * @static
2770
- * @memberOf _
2771
- * @since 1.0.0
2772
- * @category Lang
2773
- * @param {*} value The value to recursively clone.
2774
- * @returns {*} Returns the deep cloned value.
2775
- * @see _.clone
2776
- * @example
2777
- *
2778
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
2779
- *
2780
- * var deep = _.cloneDeep(objects);
2781
- * console.log(deep[0] === objects[0]);
2782
- * // => false
2783
- */
2784
- function cloneDeep(value) {
2785
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2786
- }
2787
-
2788
- var cloneDeep_1 = cloneDeep;
2789
-
2790
- var MetaConstants = {
2791
- Accordion: 'accordion',
2792
- AccordionButton: 'accordion-button',
2793
- AccordionItem: 'accordion-item',
2794
- ActionList: 'action-list',
2795
- ActionListFooter: 'action-list-footer',
2796
- ActionListHeader: 'action-list-header',
2797
- ActionListItem: 'action-list-item',
2798
- ActionListSection: 'action-list-section',
2799
- Alert: 'alert',
2800
- Amount: 'amount',
2801
- Badge: 'badge',
2802
- Box: 'box',
2803
- BaseBox: 'base-box',
2804
- BaseText: 'base-text',
2805
- Button: 'button',
2806
- Checkbox: 'checkbox',
2807
- CheckboxGroup: 'checkbox-group',
2808
- CheckboxLabel: 'checkbox-label',
2809
- Code: 'code',
2810
- Component: 'blade-component',
2811
- Counter: 'counter',
2812
- DropdownOverlay: 'dropdown-overlay',
2813
- Icon: 'icon',
2814
- IconButton: 'icon-button',
2815
- Indicator: 'indicator',
2816
- Link: 'link',
2817
- List: 'list',
2818
- ListItem: 'list-item',
2819
- OTPInput: 'otp-input',
2820
- PasswordInput: 'password-input',
2821
- TextArea: 'textarea',
2822
- TextInput: 'textinput',
2823
- ProgressBar: 'progress-bar',
2824
- Radio: 'radio',
2825
- RadioGroup: 'radio-group',
2826
- RadioLabel: 'radio-label',
2827
- SkipNav: 'skipnav',
2828
- Spinner: 'spinner',
2829
- SelectInput: 'select-input',
2830
- Tooltip: 'tooltip',
2831
- TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',
2832
- BottomSheet: 'bottom-sheet',
2833
- BottomSheetBody: 'bottom-sheet-body',
2834
- BottomSheetHeader: 'bottom-sheet-header',
2835
- BottomSheetFooter: 'bottom-sheet-footer',
2836
- BottomSheetGrabHandle: 'bottomsheet-grab-handle',
2837
- Card: 'card',
2838
- CardBody: 'card-body',
2839
- CardHeader: 'card-header',
2840
- CardFooter: 'card-footer',
2841
- Collapsible: 'collapsible',
2842
- CollapsibleBody: 'collapsible-body',
2843
- CollapsibleButton: 'collapsible-button',
2844
- CollapsibleLink: 'collapsible-link',
2845
- Modal: 'modal',
2846
- ModalBody: 'modal-body',
2847
- ModalHeader: 'modal-header',
2848
- ModalFooter: 'modal-footer',
2849
- ModalBackdrop: 'modal-backdrop',
2850
- ModalScrollOverlay: 'modal-scroll-overlay',
2851
- VisuallyHidden: 'visually-hidden',
2852
- FormLabel: 'form-label',
2853
- Switch: 'switch',
2854
- SwitchLabel: 'switch-label',
2855
- StyledBaseInput: 'styled-base-input'
2856
- };
2857
-
2858
- function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2859
-
2860
- function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2861
-
2862
- var metaAttribute = function metaAttribute(_ref) {
2863
- var name = _ref.name,
2864
- testID = _ref.testID;
2865
- return _objectSpread$2(_objectSpread$2({}, name ? _defineProperty$1({}, "data-".concat(MetaConstants.Component), name) : {}), testID ? _defineProperty$1({}, "data-testid", testID) : {});
2866
- };
2867
-
2868
- var getColorScheme = function getColorScheme() {
2869
- var colorScheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light';
2870
- // @TODO: create a useMediaQuery hook with an event listener which will subscribe to changes and move all this logic there
2871
- var colorSchemeMediaQueryMap = {
2872
- light: '(prefers-color-scheme: light)',
2873
- dark: '(prefers-color-scheme: dark)',
2874
- system: 'default'
2875
- };
2876
- var supportsMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia === 'function';
2877
-
2878
- if (colorScheme === 'light' || colorScheme === 'dark') {
2879
- return colorScheme;
2880
- }
2881
-
2882
- if (colorScheme === 'system' && supportsMatchMedia && window.matchMedia(colorSchemeMediaQueryMap.dark).matches) {
2883
- return 'dark';
2884
- }
2885
-
2886
- return 'light';
2887
- };
2888
-
2889
- var baseGetTag$1 = _baseGetTag,
2890
- isObjectLike$3 = isObjectLike_1;
2891
-
2892
- /** `Object#toString` result references. */
2893
- var symbolTag$1 = '[object Symbol]';
2894
-
2895
- /**
2896
- * Checks if `value` is classified as a `Symbol` primitive or object.
2897
- *
2898
- * @static
2899
- * @memberOf _
2900
- * @since 4.0.0
2901
- * @category Lang
2902
- * @param {*} value The value to check.
2903
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2904
- * @example
2905
- *
2906
- * _.isSymbol(Symbol.iterator);
2907
- * // => true
2908
- *
2909
- * _.isSymbol('abc');
2910
- * // => false
2911
- */
2912
- function isSymbol$3(value) {
2913
- return typeof value == 'symbol' ||
2914
- (isObjectLike$3(value) && baseGetTag$1(value) == symbolTag$1);
2915
- }
2916
-
2917
- var isSymbol_1 = isSymbol$3;
2918
-
2919
- var isArray$5 = isArray_1,
2920
- isSymbol$2 = isSymbol_1;
2921
-
2922
- /** Used to match property names within property paths. */
2923
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2924
- reIsPlainProp = /^\w*$/;
2925
-
2926
- /**
2927
- * Checks if `value` is a property name and not a property path.
2928
- *
2929
- * @private
2930
- * @param {*} value The value to check.
2931
- * @param {Object} [object] The object to query keys on.
2932
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2933
- */
2934
- function isKey$1(value, object) {
2935
- if (isArray$5(value)) {
2936
- return false;
2937
- }
2938
- var type = typeof value;
2939
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2940
- value == null || isSymbol$2(value)) {
2941
- return true;
2942
- }
2943
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2944
- (object != null && value in Object(object));
2945
- }
2946
-
2947
- var _isKey = isKey$1;
2948
-
2949
- var MapCache$1 = _MapCache;
2950
-
2951
- /** Error message constants. */
2952
- var FUNC_ERROR_TEXT = 'Expected a function';
2953
-
2954
- /**
2955
- * Creates a function that memoizes the result of `func`. If `resolver` is
2956
- * provided, it determines the cache key for storing the result based on the
2957
- * arguments provided to the memoized function. By default, the first argument
2958
- * provided to the memoized function is used as the map cache key. The `func`
2959
- * is invoked with the `this` binding of the memoized function.
2960
- *
2961
- * **Note:** The cache is exposed as the `cache` property on the memoized
2962
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
2963
- * constructor with one whose instances implement the
2964
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2965
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
2966
- *
2967
- * @static
2968
- * @memberOf _
2969
- * @since 0.1.0
2970
- * @category Function
2971
- * @param {Function} func The function to have its output memoized.
2972
- * @param {Function} [resolver] The function to resolve the cache key.
2973
- * @returns {Function} Returns the new memoized function.
2974
- * @example
2975
- *
2976
- * var object = { 'a': 1, 'b': 2 };
2977
- * var other = { 'c': 3, 'd': 4 };
2978
- *
2979
- * var values = _.memoize(_.values);
2980
- * values(object);
2981
- * // => [1, 2]
2982
- *
2983
- * values(other);
2984
- * // => [3, 4]
2985
- *
2986
- * object.a = 2;
2987
- * values(object);
2988
- * // => [1, 2]
2989
- *
2990
- * // Modify the result cache.
2991
- * values.cache.set(object, ['a', 'b']);
2992
- * values(object);
2993
- * // => ['a', 'b']
2994
- *
2995
- * // Replace `_.memoize.Cache`.
2996
- * _.memoize.Cache = WeakMap;
2997
- */
2998
- function memoize$1(func, resolver) {
2999
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
3000
- throw new TypeError(FUNC_ERROR_TEXT);
3001
- }
3002
- var memoized = function() {
3003
- var args = arguments,
3004
- key = resolver ? resolver.apply(this, args) : args[0],
3005
- cache = memoized.cache;
3006
-
3007
- if (cache.has(key)) {
3008
- return cache.get(key);
3009
- }
3010
- var result = func.apply(this, args);
3011
- memoized.cache = cache.set(key, result) || cache;
3012
- return result;
3013
- };
3014
- memoized.cache = new (memoize$1.Cache || MapCache$1);
3015
- return memoized;
3016
- }
3017
-
3018
- // Expose `MapCache`.
3019
- memoize$1.Cache = MapCache$1;
3020
-
3021
- var memoize_1 = memoize$1;
3022
-
3023
- var memoize = memoize_1;
3024
-
3025
- /** Used as the maximum memoize cache size. */
3026
- var MAX_MEMOIZE_SIZE = 500;
3027
-
3028
- /**
3029
- * A specialized version of `_.memoize` which clears the memoized function's
3030
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
3031
- *
3032
- * @private
3033
- * @param {Function} func The function to have its output memoized.
3034
- * @returns {Function} Returns the new memoized function.
3035
- */
3036
- function memoizeCapped$1(func) {
3037
- var result = memoize(func, function(key) {
3038
- if (cache.size === MAX_MEMOIZE_SIZE) {
3039
- cache.clear();
3040
- }
3041
- return key;
3042
- });
3043
-
3044
- var cache = result.cache;
3045
- return result;
3046
- }
3047
-
3048
- var _memoizeCapped = memoizeCapped$1;
3049
-
3050
- var memoizeCapped = _memoizeCapped;
3051
-
3052
- /** Used to match property names within property paths. */
3053
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
3054
-
3055
- /** Used to match backslashes in property paths. */
3056
- var reEscapeChar = /\\(\\)?/g;
3057
-
3058
- /**
3059
- * Converts `string` to a property path array.
3060
- *
3061
- * @private
3062
- * @param {string} string The string to convert.
3063
- * @returns {Array} Returns the property path array.
3064
- */
3065
- var stringToPath$1 = memoizeCapped(function(string) {
3066
- var result = [];
3067
- if (string.charCodeAt(0) === 46 /* . */) {
3068
- result.push('');
3069
- }
3070
- string.replace(rePropName, function(match, number, quote, subString) {
3071
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
3072
- });
3073
- return result;
3074
- });
3075
-
3076
- var _stringToPath = stringToPath$1;
3077
-
3078
- /**
3079
- * A specialized version of `_.map` for arrays without support for iteratee
3080
- * shorthands.
3081
- *
3082
- * @private
3083
- * @param {Array} [array] The array to iterate over.
3084
- * @param {Function} iteratee The function invoked per iteration.
3085
- * @returns {Array} Returns the new mapped array.
3086
- */
3087
-
3088
- function arrayMap$1(array, iteratee) {
3089
- var index = -1,
3090
- length = array == null ? 0 : array.length,
3091
- result = Array(length);
3092
-
3093
- while (++index < length) {
3094
- result[index] = iteratee(array[index], index, array);
3095
- }
3096
- return result;
3097
- }
3098
-
3099
- var _arrayMap = arrayMap$1;
3100
-
3101
- var Symbol$1 = _Symbol,
3102
- arrayMap = _arrayMap,
3103
- isArray$4 = isArray_1,
3104
- isSymbol$1 = isSymbol_1;
3105
-
3106
- /** Used as references for various `Number` constants. */
3107
- var INFINITY$1 = 1 / 0;
3108
-
3109
- /** Used to convert symbols to primitives and strings. */
3110
- var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : undefined,
3111
- symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
3112
-
3113
- /**
3114
- * The base implementation of `_.toString` which doesn't convert nullish
3115
- * values to empty strings.
3116
- *
3117
- * @private
3118
- * @param {*} value The value to process.
3119
- * @returns {string} Returns the string.
3120
- */
3121
- function baseToString$1(value) {
3122
- // Exit early for strings to avoid a performance hit in some environments.
3123
- if (typeof value == 'string') {
3124
- return value;
3125
- }
3126
- if (isArray$4(value)) {
3127
- // Recursively convert values (susceptible to call stack limits).
3128
- return arrayMap(value, baseToString$1) + '';
3129
- }
3130
- if (isSymbol$1(value)) {
3131
- return symbolToString ? symbolToString.call(value) : '';
3132
- }
3133
- var result = (value + '');
3134
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
3135
- }
3136
-
3137
- var _baseToString = baseToString$1;
3138
-
3139
- var baseToString = _baseToString;
3140
-
3141
- /**
3142
- * Converts `value` to a string. An empty string is returned for `null`
3143
- * and `undefined` values. The sign of `-0` is preserved.
3144
- *
3145
- * @static
3146
- * @memberOf _
3147
- * @since 4.0.0
3148
- * @category Lang
3149
- * @param {*} value The value to convert.
3150
- * @returns {string} Returns the converted string.
3151
- * @example
3152
- *
3153
- * _.toString(null);
3154
- * // => ''
3155
- *
3156
- * _.toString(-0);
3157
- * // => '-0'
3158
- *
3159
- * _.toString([1, 2, 3]);
3160
- * // => '1,2,3'
3161
- */
3162
- function toString$1(value) {
3163
- return value == null ? '' : baseToString(value);
3164
- }
3165
-
3166
- var toString_1 = toString$1;
3167
-
3168
- var isArray$3 = isArray_1,
3169
- isKey = _isKey,
3170
- stringToPath = _stringToPath,
3171
- toString = toString_1;
3172
-
3173
- /**
3174
- * Casts `value` to a path array if it's not one.
3175
- *
3176
- * @private
3177
- * @param {*} value The value to inspect.
3178
- * @param {Object} [object] The object to query keys on.
3179
- * @returns {Array} Returns the cast property path array.
3180
- */
3181
- function castPath$1(value, object) {
3182
- if (isArray$3(value)) {
3183
- return value;
3184
- }
3185
- return isKey(value, object) ? [value] : stringToPath(toString(value));
3186
- }
3187
-
3188
- var _castPath = castPath$1;
3189
-
3190
- var isSymbol = isSymbol_1;
3191
-
3192
- /** Used as references for various `Number` constants. */
3193
- var INFINITY = 1 / 0;
3194
-
3195
- /**
3196
- * Converts `value` to a string key if it's not a string or symbol.
3197
- *
3198
- * @private
3199
- * @param {*} value The value to inspect.
3200
- * @returns {string|symbol} Returns the key.
3201
- */
3202
- function toKey$1(value) {
3203
- if (typeof value == 'string' || isSymbol(value)) {
3204
- return value;
3205
- }
3206
- var result = (value + '');
3207
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
3208
- }
3209
-
3210
- var _toKey = toKey$1;
3211
-
3212
- var castPath = _castPath,
3213
- toKey = _toKey;
3214
-
3215
- /**
3216
- * The base implementation of `_.get` without support for default values.
3217
- *
3218
- * @private
3219
- * @param {Object} object The object to query.
3220
- * @param {Array|string} path The path of the property to get.
3221
- * @returns {*} Returns the resolved value.
3222
- */
3223
- function baseGet$1(object, path) {
3224
- path = castPath(path, object);
3225
-
3226
- var index = 0,
3227
- length = path.length;
3228
-
3229
- while (object != null && index < length) {
3230
- object = object[toKey(path[index++])];
3231
- }
3232
- return (index && index == length) ? object : undefined;
3233
- }
3234
-
3235
- var _baseGet = baseGet$1;
3236
-
3237
- var baseGet = _baseGet;
3238
-
3239
- /**
3240
- * Gets the value at `path` of `object`. If the resolved value is
3241
- * `undefined`, the `defaultValue` is returned in its place.
3242
- *
3243
- * @static
3244
- * @memberOf _
3245
- * @since 3.7.0
3246
- * @category Object
3247
- * @param {Object} object The object to query.
3248
- * @param {Array|string} path The path of the property to get.
3249
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
3250
- * @returns {*} Returns the resolved value.
3251
- * @example
3252
- *
3253
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
3254
- *
3255
- * _.get(object, 'a[0].b.c');
3256
- * // => 3
3257
- *
3258
- * _.get(object, ['a', '0', 'b', 'c']);
3259
- * // => 3
3260
- *
3261
- * _.get(object, 'a.b.c', 'default');
3262
- * // => 'default'
3263
- */
3264
- function get(object, path, defaultValue) {
3265
- var result = object == null ? undefined : baseGet(object, path);
3266
- return result === undefined ? defaultValue : result;
3267
- }
3268
-
3269
- var get_1 = get;
3270
-
3271
- var getMediaQuery = function getMediaQuery(_ref) {
3272
- var min = _ref.min,
3273
- max = _ref.max;
3274
- return "screen and (min-width: ".concat(min, "px)").concat(max ? " and (max-width: ".concat(max, "px)") : '');
3275
- };
3276
-
3277
- var getPlatformType = function getPlatformType() {
3278
- if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
3279
- return 'react-native';
3280
- }
3281
-
3282
- if (typeof document !== 'undefined') {
3283
- return 'browser';
3284
- }
3285
-
3286
- if (typeof process !== 'undefined') {
3287
- return 'node';
3288
- }
3289
-
3290
- return 'unknown';
3291
- };
3292
-
3293
- var baseKeys = _baseKeys,
3294
- getTag$1 = _getTag,
3295
- isArguments$1 = isArguments_1,
3296
- isArray$2 = isArray_1,
3297
- isArrayLike$2 = isArrayLike_1,
3298
- isBuffer$2 = isBuffer$5.exports,
3299
- isPrototype = _isPrototype,
3300
- isTypedArray$2 = isTypedArray_1;
3301
-
3302
- /** `Object#toString` result references. */
3303
- var mapTag$1 = '[object Map]',
3304
- setTag$1 = '[object Set]';
3305
-
3306
- /** Used for built-in method references. */
3307
- var objectProto$3 = Object.prototype;
3308
-
3309
- /** Used to check objects for own properties. */
3310
- var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
3311
-
3312
- /**
3313
- * Checks if `value` is an empty object, collection, map, or set.
3314
- *
3315
- * Objects are considered empty if they have no own enumerable string keyed
3316
- * properties.
3317
- *
3318
- * Array-like values such as `arguments` objects, arrays, buffers, strings, or
3319
- * jQuery-like collections are considered empty if they have a `length` of `0`.
3320
- * Similarly, maps and sets are considered empty if they have a `size` of `0`.
3321
- *
3322
- * @static
3323
- * @memberOf _
3324
- * @since 0.1.0
3325
- * @category Lang
3326
- * @param {*} value The value to check.
3327
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
3328
- * @example
3329
- *
3330
- * _.isEmpty(null);
3331
- * // => true
3332
- *
3333
- * _.isEmpty(true);
3334
- * // => true
3335
- *
3336
- * _.isEmpty(1);
3337
- * // => true
3338
- *
3339
- * _.isEmpty([1, 2, 3]);
3340
- * // => false
3341
- *
3342
- * _.isEmpty({ 'a': 1 });
3343
- * // => false
3344
- */
3345
- function isEmpty(value) {
3346
- if (value == null) {
3347
- return true;
3348
- }
3349
- if (isArrayLike$2(value) &&
3350
- (isArray$2(value) || typeof value == 'string' || typeof value.splice == 'function' ||
3351
- isBuffer$2(value) || isTypedArray$2(value) || isArguments$1(value))) {
3352
- return !value.length;
3353
- }
3354
- var tag = getTag$1(value);
3355
- if (tag == mapTag$1 || tag == setTag$1) {
3356
- return !value.size;
3357
- }
3358
- if (isPrototype(value)) {
3359
- return !baseKeys(value).length;
3360
- }
3361
- for (var key in value) {
3362
- if (hasOwnProperty$3.call(value, key)) {
3363
- return false;
3364
- }
3365
- }
3366
- return true;
3367
- }
3368
-
3369
- var isEmpty_1 = isEmpty;
3370
-
3371
- /** Used to stand-in for `undefined` hash values. */
3372
-
3373
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
3374
-
3375
- /**
3376
- * Adds `value` to the array cache.
3377
- *
3378
- * @private
3379
- * @name add
3380
- * @memberOf SetCache
3381
- * @alias push
3382
- * @param {*} value The value to cache.
3383
- * @returns {Object} Returns the cache instance.
3384
- */
3385
- function setCacheAdd$1(value) {
3386
- this.__data__.set(value, HASH_UNDEFINED);
3387
- return this;
3388
- }
3389
-
3390
- var _setCacheAdd = setCacheAdd$1;
3391
-
3392
- /**
3393
- * Checks if `value` is in the array cache.
3394
- *
3395
- * @private
3396
- * @name has
3397
- * @memberOf SetCache
3398
- * @param {*} value The value to search for.
3399
- * @returns {number} Returns `true` if `value` is found, else `false`.
3400
- */
3401
-
3402
- function setCacheHas$1(value) {
3403
- return this.__data__.has(value);
3404
- }
3405
-
3406
- var _setCacheHas = setCacheHas$1;
3407
-
3408
- var MapCache = _MapCache,
3409
- setCacheAdd = _setCacheAdd,
3410
- setCacheHas = _setCacheHas;
3411
-
3412
- /**
3413
- *
3414
- * Creates an array cache object to store unique values.
3415
- *
3416
- * @private
3417
- * @constructor
3418
- * @param {Array} [values] The values to cache.
3419
- */
3420
- function SetCache$1(values) {
3421
- var index = -1,
3422
- length = values == null ? 0 : values.length;
3423
-
3424
- this.__data__ = new MapCache;
3425
- while (++index < length) {
3426
- this.add(values[index]);
3427
- }
3428
- }
3429
-
3430
- // Add methods to `SetCache`.
3431
- SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
3432
- SetCache$1.prototype.has = setCacheHas;
3433
-
3434
- var _SetCache = SetCache$1;
3435
-
3436
- /**
3437
- * A specialized version of `_.some` for arrays without support for iteratee
3438
- * shorthands.
3439
- *
3440
- * @private
3441
- * @param {Array} [array] The array to iterate over.
3442
- * @param {Function} predicate The function invoked per iteration.
3443
- * @returns {boolean} Returns `true` if any element passes the predicate check,
3444
- * else `false`.
3445
- */
3446
-
3447
- function arraySome$1(array, predicate) {
3448
- var index = -1,
3449
- length = array == null ? 0 : array.length;
3450
-
3451
- while (++index < length) {
3452
- if (predicate(array[index], index, array)) {
3453
- return true;
3454
- }
3455
- }
3456
- return false;
3457
- }
3458
-
3459
- var _arraySome = arraySome$1;
3460
-
3461
- /**
3462
- * Checks if a `cache` value for `key` exists.
3463
- *
3464
- * @private
3465
- * @param {Object} cache The cache to query.
3466
- * @param {string} key The key of the entry to check.
3467
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3468
- */
3469
-
3470
- function cacheHas$1(cache, key) {
3471
- return cache.has(key);
3472
- }
3473
-
3474
- var _cacheHas = cacheHas$1;
3475
-
3476
- var SetCache = _SetCache,
3477
- arraySome = _arraySome,
3478
- cacheHas = _cacheHas;
3479
-
3480
- /** Used to compose bitmasks for value comparisons. */
3481
- var COMPARE_PARTIAL_FLAG$3 = 1,
3482
- COMPARE_UNORDERED_FLAG$1 = 2;
3483
-
3484
- /**
3485
- * A specialized version of `baseIsEqualDeep` for arrays with support for
3486
- * partial deep comparisons.
3487
- *
3488
- * @private
3489
- * @param {Array} array The array to compare.
3490
- * @param {Array} other The other array to compare.
3491
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3492
- * @param {Function} customizer The function to customize comparisons.
3493
- * @param {Function} equalFunc The function to determine equivalents of values.
3494
- * @param {Object} stack Tracks traversed `array` and `other` objects.
3495
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
3496
- */
3497
- function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
3498
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
3499
- arrLength = array.length,
3500
- othLength = other.length;
3501
-
3502
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
3503
- return false;
3504
- }
3505
- // Check that cyclic values are equal.
3506
- var arrStacked = stack.get(array);
3507
- var othStacked = stack.get(other);
3508
- if (arrStacked && othStacked) {
3509
- return arrStacked == other && othStacked == array;
3510
- }
3511
- var index = -1,
3512
- result = true,
3513
- seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new SetCache : undefined;
3514
-
3515
- stack.set(array, other);
3516
- stack.set(other, array);
3517
-
3518
- // Ignore non-index properties.
3519
- while (++index < arrLength) {
3520
- var arrValue = array[index],
3521
- othValue = other[index];
3522
-
3523
- if (customizer) {
3524
- var compared = isPartial
3525
- ? customizer(othValue, arrValue, index, other, array, stack)
3526
- : customizer(arrValue, othValue, index, array, other, stack);
3527
- }
3528
- if (compared !== undefined) {
3529
- if (compared) {
3530
- continue;
3531
- }
3532
- result = false;
3533
- break;
3534
- }
3535
- // Recursively compare arrays (susceptible to call stack limits).
3536
- if (seen) {
3537
- if (!arraySome(other, function(othValue, othIndex) {
3538
- if (!cacheHas(seen, othIndex) &&
3539
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
3540
- return seen.push(othIndex);
3541
- }
3542
- })) {
3543
- result = false;
3544
- break;
3545
- }
3546
- } else if (!(
3547
- arrValue === othValue ||
3548
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
3549
- )) {
3550
- result = false;
3551
- break;
3552
- }
3553
- }
3554
- stack['delete'](array);
3555
- stack['delete'](other);
3556
- return result;
3557
- }
3558
-
3559
- var _equalArrays = equalArrays$2;
3560
-
3561
- /**
3562
- * Converts `map` to its key-value pairs.
3563
- *
3564
- * @private
3565
- * @param {Object} map The map to convert.
3566
- * @returns {Array} Returns the key-value pairs.
3567
- */
3568
-
3569
- function mapToArray$1(map) {
3570
- var index = -1,
3571
- result = Array(map.size);
3572
-
3573
- map.forEach(function(value, key) {
3574
- result[++index] = [key, value];
3575
- });
3576
- return result;
3577
- }
3578
-
3579
- var _mapToArray = mapToArray$1;
3580
-
3581
- /**
3582
- * Converts `set` to an array of its values.
3583
- *
3584
- * @private
3585
- * @param {Object} set The set to convert.
3586
- * @returns {Array} Returns the values.
3587
- */
3588
-
3589
- function setToArray$1(set) {
3590
- var index = -1,
3591
- result = Array(set.size);
3592
-
3593
- set.forEach(function(value) {
3594
- result[++index] = value;
3595
- });
3596
- return result;
3597
- }
3598
-
3599
- var _setToArray = setToArray$1;
3600
-
3601
- var Symbol = _Symbol,
3602
- Uint8Array = _Uint8Array,
3603
- eq$2 = eq_1,
3604
- equalArrays$1 = _equalArrays,
3605
- mapToArray = _mapToArray,
3606
- setToArray = _setToArray;
3607
-
3608
- /** Used to compose bitmasks for value comparisons. */
3609
- var COMPARE_PARTIAL_FLAG$2 = 1,
3610
- COMPARE_UNORDERED_FLAG = 2;
3611
-
3612
- /** `Object#toString` result references. */
3613
- var boolTag = '[object Boolean]',
3614
- dateTag = '[object Date]',
3615
- errorTag = '[object Error]',
3616
- mapTag = '[object Map]',
3617
- numberTag = '[object Number]',
3618
- regexpTag = '[object RegExp]',
3619
- setTag = '[object Set]',
3620
- stringTag = '[object String]',
3621
- symbolTag = '[object Symbol]';
3622
-
3623
- var arrayBufferTag = '[object ArrayBuffer]',
3624
- dataViewTag = '[object DataView]';
3625
-
3626
- /** Used to convert symbols to primitives and strings. */
3627
- var symbolProto = Symbol ? Symbol.prototype : undefined,
3628
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
3629
-
3630
- /**
3631
- * A specialized version of `baseIsEqualDeep` for comparing objects of
3632
- * the same `toStringTag`.
3633
- *
3634
- * **Note:** This function only supports comparing values with tags of
3635
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
3636
- *
3637
- * @private
3638
- * @param {Object} object The object to compare.
3639
- * @param {Object} other The other object to compare.
3640
- * @param {string} tag The `toStringTag` of the objects to compare.
3641
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3642
- * @param {Function} customizer The function to customize comparisons.
3643
- * @param {Function} equalFunc The function to determine equivalents of values.
3644
- * @param {Object} stack Tracks traversed `object` and `other` objects.
3645
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3646
- */
3647
- function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
3648
- switch (tag) {
3649
- case dataViewTag:
3650
- if ((object.byteLength != other.byteLength) ||
3651
- (object.byteOffset != other.byteOffset)) {
3652
- return false;
3653
- }
3654
- object = object.buffer;
3655
- other = other.buffer;
3656
-
3657
- case arrayBufferTag:
3658
- if ((object.byteLength != other.byteLength) ||
3659
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
3660
- return false;
3661
- }
3662
- return true;
3663
-
3664
- case boolTag:
3665
- case dateTag:
3666
- case numberTag:
3667
- // Coerce booleans to `1` or `0` and dates to milliseconds.
3668
- // Invalid dates are coerced to `NaN`.
3669
- return eq$2(+object, +other);
3670
-
3671
- case errorTag:
3672
- return object.name == other.name && object.message == other.message;
3673
-
3674
- case regexpTag:
3675
- case stringTag:
3676
- // Coerce regexes to strings and treat strings, primitives and objects,
3677
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
3678
- // for more details.
3679
- return object == (other + '');
3680
-
3681
- case mapTag:
3682
- var convert = mapToArray;
3683
-
3684
- case setTag:
3685
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
3686
- convert || (convert = setToArray);
3687
-
3688
- if (object.size != other.size && !isPartial) {
3689
- return false;
3690
- }
3691
- // Assume cyclic values are equal.
3692
- var stacked = stack.get(object);
3693
- if (stacked) {
3694
- return stacked == other;
3695
- }
3696
- bitmask |= COMPARE_UNORDERED_FLAG;
3697
-
3698
- // Recursively compare objects (susceptible to call stack limits).
3699
- stack.set(object, other);
3700
- var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
3701
- stack['delete'](object);
3702
- return result;
3703
-
3704
- case symbolTag:
3705
- if (symbolValueOf) {
3706
- return symbolValueOf.call(object) == symbolValueOf.call(other);
3707
- }
3708
- }
3709
- return false;
3710
- }
3711
-
3712
- var _equalByTag = equalByTag$1;
3713
-
3714
- var getAllKeys = _getAllKeys;
3715
-
3716
- /** Used to compose bitmasks for value comparisons. */
3717
- var COMPARE_PARTIAL_FLAG$1 = 1;
3718
-
3719
- /** Used for built-in method references. */
3720
- var objectProto$2 = Object.prototype;
3721
-
3722
- /** Used to check objects for own properties. */
3723
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
3724
-
3725
- /**
3726
- * A specialized version of `baseIsEqualDeep` for objects with support for
3727
- * partial deep comparisons.
3728
- *
3729
- * @private
3730
- * @param {Object} object The object to compare.
3731
- * @param {Object} other The other object to compare.
3732
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3733
- * @param {Function} customizer The function to customize comparisons.
3734
- * @param {Function} equalFunc The function to determine equivalents of values.
3735
- * @param {Object} stack Tracks traversed `object` and `other` objects.
3736
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3737
- */
3738
- function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
3739
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
3740
- objProps = getAllKeys(object),
3741
- objLength = objProps.length,
3742
- othProps = getAllKeys(other),
3743
- othLength = othProps.length;
3744
-
3745
- if (objLength != othLength && !isPartial) {
3746
- return false;
3747
- }
3748
- var index = objLength;
3749
- while (index--) {
3750
- var key = objProps[index];
3751
- if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
3752
- return false;
3753
- }
3754
- }
3755
- // Check that cyclic values are equal.
3756
- var objStacked = stack.get(object);
3757
- var othStacked = stack.get(other);
3758
- if (objStacked && othStacked) {
3759
- return objStacked == other && othStacked == object;
3760
- }
3761
- var result = true;
3762
- stack.set(object, other);
3763
- stack.set(other, object);
3764
-
3765
- var skipCtor = isPartial;
3766
- while (++index < objLength) {
3767
- key = objProps[index];
3768
- var objValue = object[key],
3769
- othValue = other[key];
3770
-
3771
- if (customizer) {
3772
- var compared = isPartial
3773
- ? customizer(othValue, objValue, key, other, object, stack)
3774
- : customizer(objValue, othValue, key, object, other, stack);
3775
- }
3776
- // Recursively compare objects (susceptible to call stack limits).
3777
- if (!(compared === undefined
3778
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
3779
- : compared
3780
- )) {
3781
- result = false;
3782
- break;
3783
- }
3784
- skipCtor || (skipCtor = key == 'constructor');
3785
- }
3786
- if (result && !skipCtor) {
3787
- var objCtor = object.constructor,
3788
- othCtor = other.constructor;
3789
-
3790
- // Non `Object` object instances with different constructors are not equal.
3791
- if (objCtor != othCtor &&
3792
- ('constructor' in object && 'constructor' in other) &&
3793
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
3794
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
3795
- result = false;
3796
- }
3797
- }
3798
- stack['delete'](object);
3799
- stack['delete'](other);
3800
- return result;
3801
- }
3802
-
3803
- var _equalObjects = equalObjects$1;
3804
-
3805
- var Stack$1 = _Stack,
3806
- equalArrays = _equalArrays,
3807
- equalByTag = _equalByTag,
3808
- equalObjects = _equalObjects,
3809
- getTag = _getTag,
3810
- isArray$1 = isArray_1,
3811
- isBuffer$1 = isBuffer$5.exports,
3812
- isTypedArray$1 = isTypedArray_1;
3813
-
3814
- /** Used to compose bitmasks for value comparisons. */
3815
- var COMPARE_PARTIAL_FLAG = 1;
3816
-
3817
- /** `Object#toString` result references. */
3818
- var argsTag = '[object Arguments]',
3819
- arrayTag = '[object Array]',
3820
- objectTag$1 = '[object Object]';
3821
-
3822
- /** Used for built-in method references. */
3823
- var objectProto$1 = Object.prototype;
3824
-
3825
- /** Used to check objects for own properties. */
3826
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
3827
-
3828
- /**
3829
- * A specialized version of `baseIsEqual` for arrays and objects which performs
3830
- * deep comparisons and tracks traversed objects enabling objects with circular
3831
- * references to be compared.
3832
- *
3833
- * @private
3834
- * @param {Object} object The object to compare.
3835
- * @param {Object} other The other object to compare.
3836
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3837
- * @param {Function} customizer The function to customize comparisons.
3838
- * @param {Function} equalFunc The function to determine equivalents of values.
3839
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
3840
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3841
- */
3842
- function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
3843
- var objIsArr = isArray$1(object),
3844
- othIsArr = isArray$1(other),
3845
- objTag = objIsArr ? arrayTag : getTag(object),
3846
- othTag = othIsArr ? arrayTag : getTag(other);
3847
-
3848
- objTag = objTag == argsTag ? objectTag$1 : objTag;
3849
- othTag = othTag == argsTag ? objectTag$1 : othTag;
3850
-
3851
- var objIsObj = objTag == objectTag$1,
3852
- othIsObj = othTag == objectTag$1,
3853
- isSameTag = objTag == othTag;
3854
-
3855
- if (isSameTag && isBuffer$1(object)) {
3856
- if (!isBuffer$1(other)) {
3857
- return false;
3858
- }
3859
- objIsArr = true;
3860
- objIsObj = false;
3861
- }
3862
- if (isSameTag && !objIsObj) {
3863
- stack || (stack = new Stack$1);
3864
- return (objIsArr || isTypedArray$1(object))
3865
- ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
3866
- : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
3867
- }
3868
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
3869
- var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, '__wrapped__'),
3870
- othIsWrapped = othIsObj && hasOwnProperty$1.call(other, '__wrapped__');
3871
-
3872
- if (objIsWrapped || othIsWrapped) {
3873
- var objUnwrapped = objIsWrapped ? object.value() : object,
3874
- othUnwrapped = othIsWrapped ? other.value() : other;
3875
-
3876
- stack || (stack = new Stack$1);
3877
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
3878
- }
3879
- }
3880
- if (!isSameTag) {
3881
- return false;
3882
- }
3883
- stack || (stack = new Stack$1);
3884
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
3885
- }
3886
-
3887
- var _baseIsEqualDeep = baseIsEqualDeep$1;
3888
-
3889
- var baseIsEqualDeep = _baseIsEqualDeep,
3890
- isObjectLike$2 = isObjectLike_1;
3891
-
3892
- /**
3893
- * The base implementation of `_.isEqual` which supports partial comparisons
3894
- * and tracks traversed objects.
3895
- *
3896
- * @private
3897
- * @param {*} value The value to compare.
3898
- * @param {*} other The other value to compare.
3899
- * @param {boolean} bitmask The bitmask flags.
3900
- * 1 - Unordered comparison
3901
- * 2 - Partial comparison
3902
- * @param {Function} [customizer] The function to customize comparisons.
3903
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
3904
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
3905
- */
3906
- function baseIsEqual$1(value, other, bitmask, customizer, stack) {
3907
- if (value === other) {
3908
- return true;
3909
- }
3910
- if (value == null || other == null || (!isObjectLike$2(value) && !isObjectLike$2(other))) {
3911
- return value !== value && other !== other;
3912
- }
3913
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack);
3914
- }
3915
-
3916
- var _baseIsEqual = baseIsEqual$1;
3917
-
3918
- var baseIsEqual = _baseIsEqual;
3919
-
3920
- /**
3921
- * Performs a deep comparison between two values to determine if they are
3922
- * equivalent.
3923
- *
3924
- * **Note:** This method supports comparing arrays, array buffers, booleans,
3925
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
3926
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
3927
- * by their own, not inherited, enumerable properties. Functions and DOM
3928
- * nodes are compared by strict equality, i.e. `===`.
3929
- *
3930
- * @static
3931
- * @memberOf _
3932
- * @since 0.1.0
3933
- * @category Lang
3934
- * @param {*} value The value to compare.
3935
- * @param {*} other The other value to compare.
3936
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
3937
- * @example
3938
- *
3939
- * var object = { 'a': 1 };
3940
- * var other = { 'a': 1 };
3941
- *
3942
- * _.isEqual(object, other);
3943
- * // => true
3944
- *
3945
- * object === other;
3946
- * // => false
3947
- */
3948
- function isEqual(value, other) {
3949
- return baseIsEqual(value, other);
3950
- }
3951
-
3952
- var isEqual_1 = isEqual;
3953
-
3954
- /* eslint-disable @typescript-eslint/no-explicit-any */
3955
- /**
3956
- * Gets the `componentId` prop of React component if it exists.
3957
- */
3958
-
3959
- var getComponentId = function getComponentId(component) {
3960
- var _component$type;
3961
-
3962
- if (! /*#__PURE__*/React.isValidElement(component)) return null; // eslint-disable-next-line no-restricted-properties
3963
-
3964
- return (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.componentId;
3965
- };
3966
- /**
3967
- * Checks if the `component` matches the `componentId`
3968
- */
3969
-
3970
-
3971
- var isValidAllowedChildren = function isValidAllowedChildren(component, id) {
3972
- return getComponentId(component) === id;
3973
- };
3974
-
3975
- var isPartialMatchObjectKeys = function isPartialMatchObjectKeys(_ref) {
3976
- var objectToMatch = _ref.objectToMatch,
3977
- objectToInspect = _ref.objectToInspect;
3978
- var matchResponses = [];
3979
-
3980
- var matchObjectKeys = function matchObjectKeys(_ref2) {
3981
- var innerObjectToMatch = _ref2.innerObjectToMatch,
3982
- innerObjectToInspect = _ref2.innerObjectToInspect;
3983
-
3984
- for (var _i = 0, _Object$entries = Object.entries(innerObjectToMatch); _i < _Object$entries.length; _i++) {
3985
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
3986
- key = _Object$entries$_i[0],
3987
- valueToMatch = _Object$entries$_i[1];
3988
-
3989
- var valueToInspect = innerObjectToInspect[key];
3990
-
3991
- if (innerObjectToInspect.hasOwnProperty(key)) {
3992
- if (valueToMatch === null || valueToMatch === undefined || valueToMatch === '' || Array.isArray(valueToMatch) || // the condition checks if the "valueToMatch" is not of type object then "valueToMatch" type should be same as type of "valueToInspect"
3993
- !(valueToMatch instanceof Object) && _typeof(valueToMatch) !== _typeof(valueToInspect)) {
3994
- // this is an invalid case, so we log error
3995
- console.error("[isPartialMatchObjectKeys]: Unexpected value: ".concat(JSON.stringify(valueToMatch), " of type ").concat(_typeof(valueToMatch), " for key: ").concat(key));
3996
- matchResponses.push(false);
3997
- }
3998
-
3999
- if (typeof valueToMatch === 'string') {
4000
- // we have reached leaf node of the objectToMatch(i.e sub-object)
4001
- matchResponses.push(true);
4002
- }
4003
-
4004
- if (isObject_1(valueToMatch) && isObject_1(valueToInspect)) {
4005
- // let's go inside further and do a nested check
4006
- matchObjectKeys({
4007
- innerObjectToMatch: valueToMatch,
4008
- innerObjectToInspect: valueToInspect
4009
- });
4010
- }
4011
- } else {
4012
- // the key doesn't exist in the innerObjectToMatch, so we log error
4013
- console.error("[isPartialMatchObjectKeys]: ".concat(key, " doesn't exist in ").concat(JSON.stringify(innerObjectToInspect, null, 2)));
4014
- matchResponses.push(false);
4015
- }
4016
- }
4017
- };
4018
-
4019
- matchObjectKeys({
4020
- innerObjectToMatch: objectToMatch,
4021
- innerObjectToInspect: objectToInspect
4022
- });
4023
- return matchResponses.every(Boolean);
4024
- };
4025
-
4026
- function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4027
-
4028
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4029
-
4030
- var accessibilityValue = {
4031
- valueMax: 'aria-valuemax',
4032
- valueMin: 'aria-valuemin',
4033
- valueNow: 'aria-valuenow',
4034
- valueText: 'aria-valuetext'
4035
- };
4036
- var accessibilityState = {
4037
- selected: 'aria-selected',
4038
- disabled: 'aria-disabled',
4039
- expanded: 'aria-expanded',
4040
- busy: 'aria-busy',
4041
- checked: 'aria-checked'
4042
- }; // TODO:
4043
- // accessibilityViewIsModal
4044
-
4045
- var accessibilityMap = _objectSpread$1(_objectSpread$1(_objectSpread$1({}, accessibilityState), accessibilityValue), {}, {
4046
- activeDescendant: 'aria-activedescendant',
4047
- atomic: 'aria-atomic',
4048
- autoComplete: 'aria-autocomplete',
4049
- colCount: 'aria-colcount',
4050
- colIndex: 'aria-colindex',
4051
- colSpan: 'aria-colspan',
4052
- controls: 'aria-controls',
4053
- describedBy: 'aria-describedby',
4054
- details: 'aria-details',
4055
- errorMessage: 'aria-errormessage',
4056
- flowTo: 'aria-flowto',
4057
- hasPopup: 'aria-haspopup',
4058
- hidden: 'aria-hidden',
4059
- invalid: 'aria-invalid',
4060
- keyShortcuts: 'aria-keyshortcuts',
4061
- label: 'aria-label',
4062
- labelledBy: 'aria-labelledby',
4063
- liveRegion: 'aria-live',
4064
- modal: 'aria-modal',
4065
- multiline: 'aria-multiline',
4066
- multiSelectable: 'aria-multiselectable',
4067
- orientation: 'aria-orientation',
4068
- owns: 'aria-owns',
4069
- placeholder: 'aria-placeholder',
4070
- posInSet: 'aria-posinset',
4071
- pressed: 'aria-pressed',
4072
- readOnly: 'aria-readonly',
4073
- required: 'aria-required',
4074
- role: 'role',
4075
- roleDescription: 'aria-roledescription',
4076
- rowCount: 'aria-rowcount',
4077
- rowIndex: 'aria-rowindex',
4078
- rowSpan: 'aria-rowspan',
4079
- setSize: 'aria-setsize',
4080
- sort: 'aria-sort',
4081
- current: 'aria-current',
4082
- dropEffect: 'aria-dropeffect',
4083
- grabbed: 'aria-grabbed',
4084
- level: 'aria-level',
4085
- relevant: 'aria-relevant'
4086
- });
4087
-
4088
- /* eslint-disable @typescript-eslint/no-explicit-any */
4089
- var makeAccessible = function makeAccessible(props) {
4090
- var newProps = {}; // eslint-disable-next-line guard-for-in
4091
-
4092
- for (var key in props) {
4093
- var propKey = key;
4094
- var propValue = props[propKey];
4095
- var accessibilityAttribute = accessibilityMap[propKey];
4096
-
4097
- if (accessibilityAttribute) {
4098
- newProps[accessibilityAttribute] = propValue;
4099
- } else {
4100
- console.warn("[Blade: makeAccessible]: No mapping found for ".concat(propKey, ". Make sure you have entered valid key"));
4101
- }
4102
- }
4103
-
4104
- return newProps;
4105
- };
4106
-
4107
- var makeBezier = function makeBezier(x1, y1, x2, y2) {
4108
- return "cubic-bezier(".concat(x1, ", ").concat(y1, ", ").concat(x2, ", ").concat(y2, ")");
4109
- };
4110
-
4111
- function makeBorderSize(size) {
4112
- if (typeof size === 'number') {
4113
- return "".concat(size, "px");
4114
- }
4115
-
4116
- return size;
4117
- }
4118
-
4119
- var makeMotionTime = function makeMotionTime(time) {
4120
- return "".concat(time, "ms");
4121
- };
4122
-
4123
- var makeSize = function makeSize(size) {
4124
- return "".concat(size, "px");
4125
- };
4126
-
4127
- var makeSpace = function makeSpace(size) {
4128
- return "".concat(size, "px");
4129
- };
4130
-
4131
- var makeTypographySize = function makeTypographySize(size) {
4132
- var remValue = size / 16;
4133
- return "".concat(remValue, "rem");
4134
- };
4135
-
4136
- var baseAssignValue = _baseAssignValue,
4137
- eq$1 = eq_1;
4138
-
4139
- /**
4140
- * This function is like `assignValue` except that it doesn't assign
4141
- * `undefined` values.
4142
- *
4143
- * @private
4144
- * @param {Object} object The object to modify.
4145
- * @param {string} key The key of the property to assign.
4146
- * @param {*} value The value to assign.
4147
- */
4148
- function assignMergeValue$2(object, key, value) {
4149
- if ((value !== undefined && !eq$1(object[key], value)) ||
4150
- (value === undefined && !(key in object))) {
4151
- baseAssignValue(object, key, value);
4152
- }
4153
- }
4154
-
4155
- var _assignMergeValue = assignMergeValue$2;
4156
-
4157
- /**
4158
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
4159
- *
4160
- * @private
4161
- * @param {boolean} [fromRight] Specify iterating from right to left.
4162
- * @returns {Function} Returns the new base function.
4163
- */
4164
-
4165
- function createBaseFor$1(fromRight) {
4166
- return function(object, iteratee, keysFunc) {
4167
- var index = -1,
4168
- iterable = Object(object),
4169
- props = keysFunc(object),
4170
- length = props.length;
4171
-
4172
- while (length--) {
4173
- var key = props[fromRight ? length : ++index];
4174
- if (iteratee(iterable[key], key, iterable) === false) {
4175
- break;
4176
- }
4177
- }
4178
- return object;
4179
- };
4180
- }
4181
-
4182
- var _createBaseFor = createBaseFor$1;
4183
-
4184
- var createBaseFor = _createBaseFor;
4185
-
4186
- /**
4187
- * The base implementation of `baseForOwn` which iterates over `object`
4188
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
4189
- * Iteratee functions may exit iteration early by explicitly returning `false`.
4190
- *
4191
- * @private
4192
- * @param {Object} object The object to iterate over.
4193
- * @param {Function} iteratee The function invoked per iteration.
4194
- * @param {Function} keysFunc The function to get the keys of `object`.
4195
- * @returns {Object} Returns `object`.
4196
- */
4197
- var baseFor$1 = createBaseFor();
4198
-
4199
- var _baseFor = baseFor$1;
4200
-
4201
- var isArrayLike$1 = isArrayLike_1,
4202
- isObjectLike$1 = isObjectLike_1;
4203
-
4204
- /**
4205
- * This method is like `_.isArrayLike` except that it also checks if `value`
4206
- * is an object.
4207
- *
4208
- * @static
4209
- * @memberOf _
4210
- * @since 4.0.0
4211
- * @category Lang
4212
- * @param {*} value The value to check.
4213
- * @returns {boolean} Returns `true` if `value` is an array-like object,
4214
- * else `false`.
4215
- * @example
4216
- *
4217
- * _.isArrayLikeObject([1, 2, 3]);
4218
- * // => true
4219
- *
4220
- * _.isArrayLikeObject(document.body.children);
4221
- * // => true
4222
- *
4223
- * _.isArrayLikeObject('abc');
4224
- * // => false
4225
- *
4226
- * _.isArrayLikeObject(_.noop);
4227
- * // => false
4228
- */
4229
- function isArrayLikeObject$1(value) {
4230
- return isObjectLike$1(value) && isArrayLike$1(value);
4231
- }
4232
-
4233
- var isArrayLikeObject_1 = isArrayLikeObject$1;
4234
-
4235
- var baseGetTag = _baseGetTag,
4236
- getPrototype = _getPrototype,
4237
- isObjectLike = isObjectLike_1;
4238
-
4239
- /** `Object#toString` result references. */
4240
- var objectTag = '[object Object]';
4241
-
4242
- /** Used for built-in method references. */
4243
- var funcProto = Function.prototype,
4244
- objectProto = Object.prototype;
4245
-
4246
- /** Used to resolve the decompiled source of functions. */
4247
- var funcToString = funcProto.toString;
4248
-
4249
- /** Used to check objects for own properties. */
4250
- var hasOwnProperty = objectProto.hasOwnProperty;
4251
-
4252
- /** Used to infer the `Object` constructor. */
4253
- var objectCtorString = funcToString.call(Object);
4254
-
4255
- /**
4256
- * Checks if `value` is a plain object, that is, an object created by the
4257
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
4258
- *
4259
- * @static
4260
- * @memberOf _
4261
- * @since 0.8.0
4262
- * @category Lang
4263
- * @param {*} value The value to check.
4264
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
4265
- * @example
4266
- *
4267
- * function Foo() {
4268
- * this.a = 1;
4269
- * }
4270
- *
4271
- * _.isPlainObject(new Foo);
4272
- * // => false
4273
- *
4274
- * _.isPlainObject([1, 2, 3]);
4275
- * // => false
4276
- *
4277
- * _.isPlainObject({ 'x': 0, 'y': 0 });
4278
- * // => true
4279
- *
4280
- * _.isPlainObject(Object.create(null));
4281
- * // => true
4282
- */
4283
- function isPlainObject$1(value) {
4284
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
4285
- return false;
4286
- }
4287
- var proto = getPrototype(value);
4288
- if (proto === null) {
4289
- return true;
4290
- }
4291
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
4292
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
4293
- funcToString.call(Ctor) == objectCtorString;
4294
- }
4295
-
4296
- var isPlainObject_1 = isPlainObject$1;
4297
-
4298
- /**
4299
- * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
4300
- *
4301
- * @private
4302
- * @param {Object} object The object to query.
4303
- * @param {string} key The key of the property to get.
4304
- * @returns {*} Returns the property value.
4305
- */
4306
-
4307
- function safeGet$2(object, key) {
4308
- if (key === 'constructor' && typeof object[key] === 'function') {
4309
- return;
4310
- }
4311
-
4312
- if (key == '__proto__') {
4313
- return;
4314
- }
4315
-
4316
- return object[key];
4317
- }
4318
-
4319
- var _safeGet = safeGet$2;
4320
-
4321
- var copyObject = _copyObject,
4322
- keysIn$1 = keysIn_1;
4323
-
4324
- /**
4325
- * Converts `value` to a plain object flattening inherited enumerable string
4326
- * keyed properties of `value` to own properties of the plain object.
4327
- *
4328
- * @static
4329
- * @memberOf _
4330
- * @since 3.0.0
4331
- * @category Lang
4332
- * @param {*} value The value to convert.
4333
- * @returns {Object} Returns the converted plain object.
4334
- * @example
4335
- *
4336
- * function Foo() {
4337
- * this.b = 2;
4338
- * }
4339
- *
4340
- * Foo.prototype.c = 3;
4341
- *
4342
- * _.assign({ 'a': 1 }, new Foo);
4343
- * // => { 'a': 1, 'b': 2 }
4344
- *
4345
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
4346
- * // => { 'a': 1, 'b': 2, 'c': 3 }
4347
- */
4348
- function toPlainObject$1(value) {
4349
- return copyObject(value, keysIn$1(value));
4350
- }
4351
-
4352
- var toPlainObject_1 = toPlainObject$1;
4353
-
4354
- var assignMergeValue$1 = _assignMergeValue,
4355
- cloneBuffer = _cloneBuffer.exports,
4356
- cloneTypedArray = _cloneTypedArray,
4357
- copyArray = _copyArray,
4358
- initCloneObject = _initCloneObject,
4359
- isArguments = isArguments_1,
4360
- isArray = isArray_1,
4361
- isArrayLikeObject = isArrayLikeObject_1,
4362
- isBuffer = isBuffer$5.exports,
4363
- isFunction = isFunction_1,
4364
- isObject$2 = isObject_1,
4365
- isPlainObject = isPlainObject_1,
4366
- isTypedArray = isTypedArray_1,
4367
- safeGet$1 = _safeGet,
4368
- toPlainObject = toPlainObject_1;
4369
-
4370
- /**
4371
- * A specialized version of `baseMerge` for arrays and objects which performs
4372
- * deep merges and tracks traversed objects enabling objects with circular
4373
- * references to be merged.
4374
- *
4375
- * @private
4376
- * @param {Object} object The destination object.
4377
- * @param {Object} source The source object.
4378
- * @param {string} key The key of the value to merge.
4379
- * @param {number} srcIndex The index of `source`.
4380
- * @param {Function} mergeFunc The function to merge values.
4381
- * @param {Function} [customizer] The function to customize assigned values.
4382
- * @param {Object} [stack] Tracks traversed source values and their merged
4383
- * counterparts.
4384
- */
4385
- function baseMergeDeep$1(object, source, key, srcIndex, mergeFunc, customizer, stack) {
4386
- var objValue = safeGet$1(object, key),
4387
- srcValue = safeGet$1(source, key),
4388
- stacked = stack.get(srcValue);
4
+ var getColorScheme = function getColorScheme() {
5
+ var colorScheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light';
6
+ // @TODO: create a useMediaQuery hook with an event listener which will subscribe to changes and move all this logic there
7
+ var colorSchemeMediaQueryMap = {
8
+ light: '(prefers-color-scheme: light)',
9
+ dark: '(prefers-color-scheme: dark)',
10
+ system: 'default'
11
+ };
12
+ var supportsMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia === 'function';
4389
13
 
4390
- if (stacked) {
4391
- assignMergeValue$1(object, key, stacked);
4392
- return;
14
+ if (colorScheme === 'light' || colorScheme === 'dark') {
15
+ return colorScheme;
4393
16
  }
4394
- var newValue = customizer
4395
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
4396
- : undefined;
4397
-
4398
- var isCommon = newValue === undefined;
4399
17
 
4400
- if (isCommon) {
4401
- var isArr = isArray(srcValue),
4402
- isBuff = !isArr && isBuffer(srcValue),
4403
- isTyped = !isArr && !isBuff && isTypedArray(srcValue);
4404
-
4405
- newValue = srcValue;
4406
- if (isArr || isBuff || isTyped) {
4407
- if (isArray(objValue)) {
4408
- newValue = objValue;
4409
- }
4410
- else if (isArrayLikeObject(objValue)) {
4411
- newValue = copyArray(objValue);
4412
- }
4413
- else if (isBuff) {
4414
- isCommon = false;
4415
- newValue = cloneBuffer(srcValue, true);
4416
- }
4417
- else if (isTyped) {
4418
- isCommon = false;
4419
- newValue = cloneTypedArray(srcValue, true);
4420
- }
4421
- else {
4422
- newValue = [];
4423
- }
4424
- }
4425
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
4426
- newValue = objValue;
4427
- if (isArguments(objValue)) {
4428
- newValue = toPlainObject(objValue);
4429
- }
4430
- else if (!isObject$2(objValue) || isFunction(objValue)) {
4431
- newValue = initCloneObject(srcValue);
4432
- }
4433
- }
4434
- else {
4435
- isCommon = false;
4436
- }
4437
- }
4438
- if (isCommon) {
4439
- // Recursively merge objects and arrays (susceptible to call stack limits).
4440
- stack.set(srcValue, newValue);
4441
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
4442
- stack['delete'](srcValue);
18
+ if (colorScheme === 'system' && supportsMatchMedia && window.matchMedia(colorSchemeMediaQueryMap.dark).matches) {
19
+ return 'dark';
4443
20
  }
4444
- assignMergeValue$1(object, key, newValue);
4445
- }
4446
21
 
4447
- var _baseMergeDeep = baseMergeDeep$1;
22
+ return 'light';
23
+ };
4448
24
 
4449
- var Stack = _Stack,
4450
- assignMergeValue = _assignMergeValue,
4451
- baseFor = _baseFor,
4452
- baseMergeDeep = _baseMergeDeep,
4453
- isObject$1 = isObject_1,
4454
- keysIn = keysIn_1,
4455
- safeGet = _safeGet;
25
+ var getMediaQuery = function getMediaQuery(_ref) {
26
+ var min = _ref.min,
27
+ max = _ref.max;
28
+ return "screen and (min-width: ".concat(min, "px)").concat(max ? " and (max-width: ".concat(max, "px)") : '');
29
+ };
4456
30
 
4457
- /**
4458
- * The base implementation of `_.merge` without support for multiple sources.
4459
- *
4460
- * @private
4461
- * @param {Object} object The destination object.
4462
- * @param {Object} source The source object.
4463
- * @param {number} srcIndex The index of `source`.
4464
- * @param {Function} [customizer] The function to customize merged values.
4465
- * @param {Object} [stack] Tracks traversed source values and their merged
4466
- * counterparts.
4467
- */
4468
- function baseMerge$1(object, source, srcIndex, customizer, stack) {
4469
- if (object === source) {
4470
- return;
31
+ var getPlatformType = function getPlatformType() {
32
+ if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
33
+ return 'react-native';
4471
34
  }
4472
- baseFor(source, function(srcValue, key) {
4473
- stack || (stack = new Stack);
4474
- if (isObject$1(srcValue)) {
4475
- baseMergeDeep(object, source, key, srcIndex, baseMerge$1, customizer, stack);
4476
- }
4477
- else {
4478
- var newValue = customizer
4479
- ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
4480
- : undefined;
4481
-
4482
- if (newValue === undefined) {
4483
- newValue = srcValue;
4484
- }
4485
- assignMergeValue(object, key, newValue);
4486
- }
4487
- }, keysIn);
4488
- }
4489
-
4490
- var _baseMerge = baseMerge$1;
4491
-
4492
- /**
4493
- * This method returns the first argument it receives.
4494
- *
4495
- * @static
4496
- * @since 0.1.0
4497
- * @memberOf _
4498
- * @category Util
4499
- * @param {*} value Any value.
4500
- * @returns {*} Returns `value`.
4501
- * @example
4502
- *
4503
- * var object = { 'a': 1 };
4504
- *
4505
- * console.log(_.identity(object) === object);
4506
- * // => true
4507
- */
4508
-
4509
- function identity$2(value) {
4510
- return value;
4511
- }
4512
35
 
4513
- var identity_1 = identity$2;
4514
-
4515
- /**
4516
- * A faster alternative to `Function#apply`, this function invokes `func`
4517
- * with the `this` binding of `thisArg` and the arguments of `args`.
4518
- *
4519
- * @private
4520
- * @param {Function} func The function to invoke.
4521
- * @param {*} thisArg The `this` binding of `func`.
4522
- * @param {Array} args The arguments to invoke `func` with.
4523
- * @returns {*} Returns the result of `func`.
4524
- */
4525
-
4526
- function apply$1(func, thisArg, args) {
4527
- switch (args.length) {
4528
- case 0: return func.call(thisArg);
4529
- case 1: return func.call(thisArg, args[0]);
4530
- case 2: return func.call(thisArg, args[0], args[1]);
4531
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
36
+ if (typeof document !== 'undefined') {
37
+ return 'browser';
4532
38
  }
4533
- return func.apply(thisArg, args);
4534
- }
4535
-
4536
- var _apply = apply$1;
4537
-
4538
- var apply = _apply;
4539
-
4540
- /* Built-in method references for those with the same name as other `lodash` methods. */
4541
- var nativeMax = Math.max;
4542
-
4543
- /**
4544
- * A specialized version of `baseRest` which transforms the rest array.
4545
- *
4546
- * @private
4547
- * @param {Function} func The function to apply a rest parameter to.
4548
- * @param {number} [start=func.length-1] The start position of the rest parameter.
4549
- * @param {Function} transform The rest array transform.
4550
- * @returns {Function} Returns the new function.
4551
- */
4552
- function overRest$1(func, start, transform) {
4553
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
4554
- return function() {
4555
- var args = arguments,
4556
- index = -1,
4557
- length = nativeMax(args.length - start, 0),
4558
- array = Array(length);
4559
-
4560
- while (++index < length) {
4561
- array[index] = args[start + index];
4562
- }
4563
- index = -1;
4564
- var otherArgs = Array(start + 1);
4565
- while (++index < start) {
4566
- otherArgs[index] = args[index];
4567
- }
4568
- otherArgs[start] = transform(array);
4569
- return apply(func, this, otherArgs);
4570
- };
4571
- }
4572
-
4573
- var _overRest = overRest$1;
4574
-
4575
- /**
4576
- * Creates a function that returns `value`.
4577
- *
4578
- * @static
4579
- * @memberOf _
4580
- * @since 2.4.0
4581
- * @category Util
4582
- * @param {*} value The value to return from the new function.
4583
- * @returns {Function} Returns the new constant function.
4584
- * @example
4585
- *
4586
- * var objects = _.times(2, _.constant({ 'a': 1 }));
4587
- *
4588
- * console.log(objects);
4589
- * // => [{ 'a': 1 }, { 'a': 1 }]
4590
- *
4591
- * console.log(objects[0] === objects[1]);
4592
- * // => true
4593
- */
4594
-
4595
- function constant$1(value) {
4596
- return function() {
4597
- return value;
4598
- };
4599
- }
4600
-
4601
- var constant_1 = constant$1;
4602
-
4603
- var constant = constant_1,
4604
- defineProperty = _defineProperty,
4605
- identity$1 = identity_1;
4606
-
4607
- /**
4608
- * The base implementation of `setToString` without support for hot loop shorting.
4609
- *
4610
- * @private
4611
- * @param {Function} func The function to modify.
4612
- * @param {Function} string The `toString` result.
4613
- * @returns {Function} Returns `func`.
4614
- */
4615
- var baseSetToString$1 = !defineProperty ? identity$1 : function(func, string) {
4616
- return defineProperty(func, 'toString', {
4617
- 'configurable': true,
4618
- 'enumerable': false,
4619
- 'value': constant(string),
4620
- 'writable': true
4621
- });
4622
- };
4623
-
4624
- var _baseSetToString = baseSetToString$1;
4625
-
4626
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
4627
-
4628
- var HOT_COUNT = 800,
4629
- HOT_SPAN = 16;
4630
-
4631
- /* Built-in method references for those with the same name as other `lodash` methods. */
4632
- var nativeNow = Date.now;
4633
-
4634
- /**
4635
- * Creates a function that'll short out and invoke `identity` instead
4636
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
4637
- * milliseconds.
4638
- *
4639
- * @private
4640
- * @param {Function} func The function to restrict.
4641
- * @returns {Function} Returns the new shortable function.
4642
- */
4643
- function shortOut$1(func) {
4644
- var count = 0,
4645
- lastCalled = 0;
4646
-
4647
- return function() {
4648
- var stamp = nativeNow(),
4649
- remaining = HOT_SPAN - (stamp - lastCalled);
4650
39
 
4651
- lastCalled = stamp;
4652
- if (remaining > 0) {
4653
- if (++count >= HOT_COUNT) {
4654
- return arguments[0];
4655
- }
4656
- } else {
4657
- count = 0;
4658
- }
4659
- return func.apply(undefined, arguments);
4660
- };
4661
- }
4662
-
4663
- var _shortOut = shortOut$1;
4664
-
4665
- var baseSetToString = _baseSetToString,
4666
- shortOut = _shortOut;
4667
-
4668
- /**
4669
- * Sets the `toString` method of `func` to return `string`.
4670
- *
4671
- * @private
4672
- * @param {Function} func The function to modify.
4673
- * @param {Function} string The `toString` result.
4674
- * @returns {Function} Returns `func`.
4675
- */
4676
- var setToString$1 = shortOut(baseSetToString);
4677
-
4678
- var _setToString = setToString$1;
4679
-
4680
- var identity = identity_1,
4681
- overRest = _overRest,
4682
- setToString = _setToString;
4683
-
4684
- /**
4685
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
4686
- *
4687
- * @private
4688
- * @param {Function} func The function to apply a rest parameter to.
4689
- * @param {number} [start=func.length-1] The start position of the rest parameter.
4690
- * @returns {Function} Returns the new function.
4691
- */
4692
- function baseRest$1(func, start) {
4693
- return setToString(overRest(func, start, identity), func + '');
4694
- }
4695
-
4696
- var _baseRest = baseRest$1;
4697
-
4698
- var eq = eq_1,
4699
- isArrayLike = isArrayLike_1,
4700
- isIndex = _isIndex,
4701
- isObject = isObject_1;
4702
-
4703
- /**
4704
- * Checks if the given arguments are from an iteratee call.
4705
- *
4706
- * @private
4707
- * @param {*} value The potential iteratee value argument.
4708
- * @param {*} index The potential iteratee index or key argument.
4709
- * @param {*} object The potential iteratee object argument.
4710
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
4711
- * else `false`.
4712
- */
4713
- function isIterateeCall$1(value, index, object) {
4714
- if (!isObject(object)) {
4715
- return false;
4716
- }
4717
- var type = typeof index;
4718
- if (type == 'number'
4719
- ? (isArrayLike(object) && isIndex(index, object.length))
4720
- : (type == 'string' && index in object)
4721
- ) {
4722
- return eq(object[index], value);
40
+ if (typeof process !== 'undefined') {
41
+ return 'node';
4723
42
  }
4724
- return false;
4725
- }
4726
-
4727
- var _isIterateeCall = isIterateeCall$1;
4728
-
4729
- var baseRest = _baseRest,
4730
- isIterateeCall = _isIterateeCall;
4731
-
4732
- /**
4733
- * Creates a function like `_.assign`.
4734
- *
4735
- * @private
4736
- * @param {Function} assigner The function to assign values.
4737
- * @returns {Function} Returns the new assigner function.
4738
- */
4739
- function createAssigner$1(assigner) {
4740
- return baseRest(function(object, sources) {
4741
- var index = -1,
4742
- length = sources.length,
4743
- customizer = length > 1 ? sources[length - 1] : undefined,
4744
- guard = length > 2 ? sources[2] : undefined;
4745
-
4746
- customizer = (assigner.length > 3 && typeof customizer == 'function')
4747
- ? (length--, customizer)
4748
- : undefined;
4749
-
4750
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
4751
- customizer = length < 3 ? undefined : customizer;
4752
- length = 1;
4753
- }
4754
- object = Object(object);
4755
- while (++index < length) {
4756
- var source = sources[index];
4757
- if (source) {
4758
- assigner(object, source, index, customizer);
4759
- }
4760
- }
4761
- return object;
4762
- });
4763
- }
4764
-
4765
- var _createAssigner = createAssigner$1;
4766
-
4767
- var baseMerge = _baseMerge,
4768
- createAssigner = _createAssigner;
4769
-
4770
- /**
4771
- * This method is like `_.assign` except that it recursively merges own and
4772
- * inherited enumerable string keyed properties of source objects into the
4773
- * destination object. Source properties that resolve to `undefined` are
4774
- * skipped if a destination value exists. Array and plain object properties
4775
- * are merged recursively. Other objects and value types are overridden by
4776
- * assignment. Source objects are applied from left to right. Subsequent
4777
- * sources overwrite property assignments of previous sources.
4778
- *
4779
- * **Note:** This method mutates `object`.
4780
- *
4781
- * @static
4782
- * @memberOf _
4783
- * @since 0.5.0
4784
- * @category Object
4785
- * @param {Object} object The destination object.
4786
- * @param {...Object} [sources] The source objects.
4787
- * @returns {Object} Returns `object`.
4788
- * @example
4789
- *
4790
- * var object = {
4791
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
4792
- * };
4793
- *
4794
- * var other = {
4795
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
4796
- * };
4797
- *
4798
- * _.merge(object, other);
4799
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
4800
- */
4801
- var merge = createAssigner(function(object, source, srcIndex) {
4802
- baseMerge(object, source, srcIndex);
4803
- });
4804
-
4805
- var merge_1 = merge;
4806
-
4807
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4808
-
4809
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4810
-
4811
- var setupMatchMediaMock = function setupMatchMediaMock() {
4812
- var customArgs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4813
- Object.defineProperty(window, 'matchMedia', {
4814
- writable: true,
4815
- value: jest.fn().mockImplementation(function (query) {
4816
- return _objectSpread({
4817
- matches: false,
4818
- media: query,
4819
- addEventListener: jest.fn(),
4820
- removeEventListener: jest.fn()
4821
- }, customArgs);
4822
- })
4823
- });
4824
- };
4825
43
 
4826
- var toTitleCase = function toTitleCase(inputString) {
4827
- return inputString.toLowerCase().split(' ').map(function (word) {
4828
- return word.charAt(0).toUpperCase() + word.slice(1);
4829
- }).join(' ');
44
+ return 'unknown';
4830
45
  };
4831
46
 
4832
47
  var deviceType = {
@@ -4996,19 +211,6 @@ var useColorScheme = function useColorScheme() {
4996
211
  };
4997
212
  };
4998
213
 
4999
- /**
5000
- * a type-safe version of the `usePrevious` hook described here:
5001
- * @see {@link https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state}
5002
- */
5003
-
5004
- function usePrevious(value) {
5005
- var ref = useRef();
5006
- useEffect(function () {
5007
- ref.current = value;
5008
- }, [value]);
5009
- return ref.current;
5010
- }
5011
-
5012
214
  /* eslint-disable @typescript-eslint/no-namespace */
5013
215
 
5014
216
  var isReactNative = function isReactNative() {
@@ -5064,56 +266,53 @@ var castNativeType = function castNativeType(value) {
5064
266
  return value;
5065
267
  };
5066
268
 
269
+ function makeBorderSize(size) {
270
+ if (typeof size === 'number') {
271
+ return "".concat(size, "px");
272
+ }
273
+
274
+ return size;
275
+ }
276
+
277
+ var makeMotionTime = function makeMotionTime(time) {
278
+ return "".concat(time, "ms");
279
+ };
280
+
281
+ var makeSpace = function makeSpace(size) {
282
+ return "".concat(size, "px");
283
+ };
284
+
285
+ var makeTypographySize = function makeTypographySize(size) {
286
+ var remValue = size / 16;
287
+ return "".concat(remValue, "rem");
288
+ };
289
+
290
+ var makeSize = function makeSize(size) {
291
+ return "".concat(size, "px");
292
+ };
293
+
5067
294
  /**
5068
- * Do you want to define `displayName` or `componentId` on your component? Use this instead to make sure treeshaking doesn't break.
5069
- *
5070
- * ## Usage
5071
- *
5072
- * ### ❌ Incorrect Code (Breaks treeshaking)
5073
- *
5074
- * ```ts
5075
- * const _MyComponent = () => {};
5076
- * const MyComponent = React.forwardRef(_MyComponent);
5077
- * const MyComponent.displayName = 'MyComponent'; // this breaks treeshaking
5078
- *
5079
- * export { MyComponent }
5080
- * ```
5081
- *
5082
- * ### ✅ Correct Code (No Side-Effects. Treeshaking continues to work)
5083
- *
5084
- * ```ts
5085
- * const _MyComponent = () => {};
5086
- * const MyComponentWithRef = React.forwardRef(_MyComponent);
5087
- * const MyComponent = assignWithoutSideEffects(
5088
- * MyComponentWithRef,
5089
- * { displayName: 'MyComponent' }
5090
- * );
5091
- *
5092
- * export { MyComponent }
5093
- * ```
5094
- *
5095
- * Checkout other components like [Button.tsx](../../components/Button/Button/Button.tsx), [SelectInput.tsx](../../components/Input/SelectInput/SelectInput.tsx) for example.
5096
- *
5097
- * _Note: You don't have to add PURE comment to this function as it is added during build-time by our `manualPureFunctions` babel plugin_
295
+ * @deprecated This utility will be deprecated in subsequent version.
5098
296
  */
5099
- // We're matching the types of this with Object.assign types
5100
- // eslint-disable-next-line @typescript-eslint/ban-types
5101
- var assignWithoutSideEffects = function assignWithoutSideEffects(component, sourceObj) {
5102
- return /*#__PURE__*/Object.assign(component, sourceObj);
297
+ var toTitleCase = function toTitleCase(inputString) {
298
+ return inputString.toLowerCase().split(' ').map(function (word) {
299
+ return word.charAt(0).toUpperCase() + word.slice(1);
300
+ }).join(' ');
5103
301
  };
5104
302
 
5105
- // The reason we need to omit them is because styled-component thinks they are valid html attributes
5106
- // because fontFamily, fontWeight etc are valid SVG props.
5107
- // Here are list of valid props which emotion checks https://github.com/emotion-js/emotion/blob/main/packages/is-prop-valid/src/props.js
5108
- // Thus we just need to ignore few of these
5109
- var filterProps = ['cursor', 'display', 'overflow', 'order', 'color', 'fontFamily', 'fontWeight', 'fontSize', 'fontStyle', 'lineHeight', // width height are only accepted in few components,
5110
- // canvas, embed, iframe, input, object, video, img
5111
- // none of them are currently supported in Box
5112
- 'width', 'height'];
303
+ /**
304
+ * a type-safe version of the `usePrevious` hook described here:
305
+ * @see {@link https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state}
306
+ * @deprecated This utility will be deprecated in subsequent version.
307
+ */
5113
308
 
5114
- var omitPropsFromHTML = function omitPropsFromHTML(prop, defaultValidatorFn) {
5115
- return !filterProps.includes(prop) && defaultValidatorFn(prop);
5116
- };
309
+ function usePrevious(value) {
310
+ var ref = useRef();
311
+ useEffect(function () {
312
+ ref.current = value;
313
+ }, [value]);
314
+ return ref.current;
315
+ }
5117
316
 
5118
- export { MetaConstants, Platform, assignWithoutSideEffects, castNativeType, castWebType, cloneDeep_1 as cloneDeep, getColorScheme, getComponentId, get_1 as getIn, getMediaQuery, getOS, getPlatformType, isAndroid, isEmpty_1 as isEmpty, isEqual_1 as isEqual, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, merge_1 as merge, metaAttribute, omitPropsFromHTML, setupMatchMediaMock, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
317
+ export { Platform, castNativeType, castWebType, getColorScheme, getMediaQuery, getOS, getPlatformType, isAndroid, isReactNative, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
5119
318
  //# sourceMappingURL=index.web.js.map