@rhc-shared-components/packages-table 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2143 -11
- package/dist/index.modern.js +2143 -8
- package/package.json +2 -3
package/dist/index.modern.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useState, useEffect, useCallback, cloneElement } from 'react';
|
|
3
|
+
import { useState, useEffect, useCallback, cloneElement, useMemo } from 'react';
|
|
4
4
|
import { Toolbar, ToolbarContent, ToolbarItem, Bullseye, Title, Spinner, EmptyState, EmptyStateHeader, EmptyStateIcon, Pagination, SearchInput, ToggleGroup as ToggleGroup$1, ToggleGroupItem, Tabs, Tab } from '@patternfly/react-core';
|
|
5
|
-
import { sortBy, uniqueId } from 'lodash';
|
|
6
5
|
import { setTabIndex, handleArrows } from '@patternfly/react-core/dist/esm/helpers/KeyboardHandler';
|
|
7
6
|
import { useOUIAProps } from '@patternfly/react-core/dist/esm/helpers/OUIA/ouia';
|
|
8
7
|
import { useOUIAProps as useOUIAProps$1 } from '@patternfly/react-core/dist/esm/helpers';
|
|
9
|
-
import mergeWith from 'lodash/mergeWith';
|
|
10
8
|
import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip';
|
|
11
9
|
import { Button } from '@patternfly/react-core/dist/esm/components/Button';
|
|
12
10
|
import { Popover } from '@patternfly/react-core/dist/esm/components/Popover';
|
|
@@ -1430,6 +1428,2135 @@ var styles = {
|
|
|
1430
1428
|
"tableStickyCell": "pf-v5-c-table__sticky-cell"
|
|
1431
1429
|
};
|
|
1432
1430
|
|
|
1431
|
+
/**
|
|
1432
|
+
* Removes all key-value entries from the list cache.
|
|
1433
|
+
*
|
|
1434
|
+
* @private
|
|
1435
|
+
* @name clear
|
|
1436
|
+
* @memberOf ListCache
|
|
1437
|
+
*/
|
|
1438
|
+
function listCacheClear() {
|
|
1439
|
+
this.__data__ = [];
|
|
1440
|
+
this.size = 0;
|
|
1441
|
+
}
|
|
1442
|
+
var _listCacheClear = listCacheClear;
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* Performs a
|
|
1446
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1447
|
+
* comparison between two values to determine if they are equivalent.
|
|
1448
|
+
*
|
|
1449
|
+
* @static
|
|
1450
|
+
* @memberOf _
|
|
1451
|
+
* @since 4.0.0
|
|
1452
|
+
* @category Lang
|
|
1453
|
+
* @param {*} value The value to compare.
|
|
1454
|
+
* @param {*} other The other value to compare.
|
|
1455
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1456
|
+
* @example
|
|
1457
|
+
*
|
|
1458
|
+
* var object = { 'a': 1 };
|
|
1459
|
+
* var other = { 'a': 1 };
|
|
1460
|
+
*
|
|
1461
|
+
* _.eq(object, object);
|
|
1462
|
+
* // => true
|
|
1463
|
+
*
|
|
1464
|
+
* _.eq(object, other);
|
|
1465
|
+
* // => false
|
|
1466
|
+
*
|
|
1467
|
+
* _.eq('a', 'a');
|
|
1468
|
+
* // => true
|
|
1469
|
+
*
|
|
1470
|
+
* _.eq('a', Object('a'));
|
|
1471
|
+
* // => false
|
|
1472
|
+
*
|
|
1473
|
+
* _.eq(NaN, NaN);
|
|
1474
|
+
* // => true
|
|
1475
|
+
*/
|
|
1476
|
+
function eq(value, other) {
|
|
1477
|
+
return value === other || value !== value && other !== other;
|
|
1478
|
+
}
|
|
1479
|
+
var eq_1 = eq;
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1483
|
+
*
|
|
1484
|
+
* @private
|
|
1485
|
+
* @param {Array} array The array to inspect.
|
|
1486
|
+
* @param {*} key The key to search for.
|
|
1487
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1488
|
+
*/
|
|
1489
|
+
function assocIndexOf(array, key) {
|
|
1490
|
+
var length = array.length;
|
|
1491
|
+
while (length--) {
|
|
1492
|
+
if (eq_1(array[length][0], key)) {
|
|
1493
|
+
return length;
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
return -1;
|
|
1497
|
+
}
|
|
1498
|
+
var _assocIndexOf = assocIndexOf;
|
|
1499
|
+
|
|
1500
|
+
/** Used for built-in method references. */
|
|
1501
|
+
var arrayProto = Array.prototype;
|
|
1502
|
+
|
|
1503
|
+
/** Built-in value references. */
|
|
1504
|
+
var splice = arrayProto.splice;
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* Removes `key` and its value from the list cache.
|
|
1508
|
+
*
|
|
1509
|
+
* @private
|
|
1510
|
+
* @name delete
|
|
1511
|
+
* @memberOf ListCache
|
|
1512
|
+
* @param {string} key The key of the value to remove.
|
|
1513
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1514
|
+
*/
|
|
1515
|
+
function listCacheDelete(key) {
|
|
1516
|
+
var data = this.__data__,
|
|
1517
|
+
index = _assocIndexOf(data, key);
|
|
1518
|
+
if (index < 0) {
|
|
1519
|
+
return false;
|
|
1520
|
+
}
|
|
1521
|
+
var lastIndex = data.length - 1;
|
|
1522
|
+
if (index == lastIndex) {
|
|
1523
|
+
data.pop();
|
|
1524
|
+
} else {
|
|
1525
|
+
splice.call(data, index, 1);
|
|
1526
|
+
}
|
|
1527
|
+
--this.size;
|
|
1528
|
+
return true;
|
|
1529
|
+
}
|
|
1530
|
+
var _listCacheDelete = listCacheDelete;
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* Gets the list cache value for `key`.
|
|
1534
|
+
*
|
|
1535
|
+
* @private
|
|
1536
|
+
* @name get
|
|
1537
|
+
* @memberOf ListCache
|
|
1538
|
+
* @param {string} key The key of the value to get.
|
|
1539
|
+
* @returns {*} Returns the entry value.
|
|
1540
|
+
*/
|
|
1541
|
+
function listCacheGet(key) {
|
|
1542
|
+
var data = this.__data__,
|
|
1543
|
+
index = _assocIndexOf(data, key);
|
|
1544
|
+
return index < 0 ? undefined : data[index][1];
|
|
1545
|
+
}
|
|
1546
|
+
var _listCacheGet = listCacheGet;
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Checks if a list cache value for `key` exists.
|
|
1550
|
+
*
|
|
1551
|
+
* @private
|
|
1552
|
+
* @name has
|
|
1553
|
+
* @memberOf ListCache
|
|
1554
|
+
* @param {string} key The key of the entry to check.
|
|
1555
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1556
|
+
*/
|
|
1557
|
+
function listCacheHas(key) {
|
|
1558
|
+
return _assocIndexOf(this.__data__, key) > -1;
|
|
1559
|
+
}
|
|
1560
|
+
var _listCacheHas = listCacheHas;
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Sets the list cache `key` to `value`.
|
|
1564
|
+
*
|
|
1565
|
+
* @private
|
|
1566
|
+
* @name set
|
|
1567
|
+
* @memberOf ListCache
|
|
1568
|
+
* @param {string} key The key of the value to set.
|
|
1569
|
+
* @param {*} value The value to set.
|
|
1570
|
+
* @returns {Object} Returns the list cache instance.
|
|
1571
|
+
*/
|
|
1572
|
+
function listCacheSet(key, value) {
|
|
1573
|
+
var data = this.__data__,
|
|
1574
|
+
index = _assocIndexOf(data, key);
|
|
1575
|
+
if (index < 0) {
|
|
1576
|
+
++this.size;
|
|
1577
|
+
data.push([key, value]);
|
|
1578
|
+
} else {
|
|
1579
|
+
data[index][1] = value;
|
|
1580
|
+
}
|
|
1581
|
+
return this;
|
|
1582
|
+
}
|
|
1583
|
+
var _listCacheSet = listCacheSet;
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Creates an list cache object.
|
|
1587
|
+
*
|
|
1588
|
+
* @private
|
|
1589
|
+
* @constructor
|
|
1590
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
1591
|
+
*/
|
|
1592
|
+
function ListCache(entries) {
|
|
1593
|
+
var index = -1,
|
|
1594
|
+
length = entries == null ? 0 : entries.length;
|
|
1595
|
+
this.clear();
|
|
1596
|
+
while (++index < length) {
|
|
1597
|
+
var entry = entries[index];
|
|
1598
|
+
this.set(entry[0], entry[1]);
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
// Add methods to `ListCache`.
|
|
1603
|
+
ListCache.prototype.clear = _listCacheClear;
|
|
1604
|
+
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1605
|
+
ListCache.prototype.get = _listCacheGet;
|
|
1606
|
+
ListCache.prototype.has = _listCacheHas;
|
|
1607
|
+
ListCache.prototype.set = _listCacheSet;
|
|
1608
|
+
var _ListCache = ListCache;
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Removes all key-value entries from the stack.
|
|
1612
|
+
*
|
|
1613
|
+
* @private
|
|
1614
|
+
* @name clear
|
|
1615
|
+
* @memberOf Stack
|
|
1616
|
+
*/
|
|
1617
|
+
function stackClear() {
|
|
1618
|
+
this.__data__ = new _ListCache();
|
|
1619
|
+
this.size = 0;
|
|
1620
|
+
}
|
|
1621
|
+
var _stackClear = stackClear;
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* Removes `key` and its value from the stack.
|
|
1625
|
+
*
|
|
1626
|
+
* @private
|
|
1627
|
+
* @name delete
|
|
1628
|
+
* @memberOf Stack
|
|
1629
|
+
* @param {string} key The key of the value to remove.
|
|
1630
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1631
|
+
*/
|
|
1632
|
+
function stackDelete(key) {
|
|
1633
|
+
var data = this.__data__,
|
|
1634
|
+
result = data['delete'](key);
|
|
1635
|
+
this.size = data.size;
|
|
1636
|
+
return result;
|
|
1637
|
+
}
|
|
1638
|
+
var _stackDelete = stackDelete;
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* Gets the stack value for `key`.
|
|
1642
|
+
*
|
|
1643
|
+
* @private
|
|
1644
|
+
* @name get
|
|
1645
|
+
* @memberOf Stack
|
|
1646
|
+
* @param {string} key The key of the value to get.
|
|
1647
|
+
* @returns {*} Returns the entry value.
|
|
1648
|
+
*/
|
|
1649
|
+
function stackGet(key) {
|
|
1650
|
+
return this.__data__.get(key);
|
|
1651
|
+
}
|
|
1652
|
+
var _stackGet = stackGet;
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Checks if a stack value for `key` exists.
|
|
1656
|
+
*
|
|
1657
|
+
* @private
|
|
1658
|
+
* @name has
|
|
1659
|
+
* @memberOf Stack
|
|
1660
|
+
* @param {string} key The key of the entry to check.
|
|
1661
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1662
|
+
*/
|
|
1663
|
+
function stackHas(key) {
|
|
1664
|
+
return this.__data__.has(key);
|
|
1665
|
+
}
|
|
1666
|
+
var _stackHas = stackHas;
|
|
1667
|
+
|
|
1668
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
1669
|
+
|
|
1670
|
+
function createCommonjsModule(fn) {
|
|
1671
|
+
var module = { exports: {} };
|
|
1672
|
+
return fn(module, module.exports), module.exports;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/** Detect free variable `global` from Node.js. */
|
|
1676
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1677
|
+
var _freeGlobal = freeGlobal;
|
|
1678
|
+
|
|
1679
|
+
/** Detect free variable `self`. */
|
|
1680
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
1681
|
+
|
|
1682
|
+
/** Used as a reference to the global object. */
|
|
1683
|
+
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
1684
|
+
var _root = root;
|
|
1685
|
+
|
|
1686
|
+
/** Built-in value references. */
|
|
1687
|
+
var Symbol = _root.Symbol;
|
|
1688
|
+
var _Symbol = Symbol;
|
|
1689
|
+
|
|
1690
|
+
/** Used for built-in method references. */
|
|
1691
|
+
var objectProto$a = Object.prototype;
|
|
1692
|
+
|
|
1693
|
+
/** Used to check objects for own properties. */
|
|
1694
|
+
var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* Used to resolve the
|
|
1698
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1699
|
+
* of values.
|
|
1700
|
+
*/
|
|
1701
|
+
var nativeObjectToString$1 = objectProto$a.toString;
|
|
1702
|
+
|
|
1703
|
+
/** Built-in value references. */
|
|
1704
|
+
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
1708
|
+
*
|
|
1709
|
+
* @private
|
|
1710
|
+
* @param {*} value The value to query.
|
|
1711
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
1712
|
+
*/
|
|
1713
|
+
function getRawTag(value) {
|
|
1714
|
+
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
|
|
1715
|
+
tag = value[symToStringTag$1];
|
|
1716
|
+
try {
|
|
1717
|
+
value[symToStringTag$1] = undefined;
|
|
1718
|
+
var unmasked = true;
|
|
1719
|
+
} catch (e) {}
|
|
1720
|
+
var result = nativeObjectToString$1.call(value);
|
|
1721
|
+
if (unmasked) {
|
|
1722
|
+
if (isOwn) {
|
|
1723
|
+
value[symToStringTag$1] = tag;
|
|
1724
|
+
} else {
|
|
1725
|
+
delete value[symToStringTag$1];
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
return result;
|
|
1729
|
+
}
|
|
1730
|
+
var _getRawTag = getRawTag;
|
|
1731
|
+
|
|
1732
|
+
/** Used for built-in method references. */
|
|
1733
|
+
var objectProto$9 = Object.prototype;
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* Used to resolve the
|
|
1737
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1738
|
+
* of values.
|
|
1739
|
+
*/
|
|
1740
|
+
var nativeObjectToString = objectProto$9.toString;
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
1744
|
+
*
|
|
1745
|
+
* @private
|
|
1746
|
+
* @param {*} value The value to convert.
|
|
1747
|
+
* @returns {string} Returns the converted string.
|
|
1748
|
+
*/
|
|
1749
|
+
function objectToString(value) {
|
|
1750
|
+
return nativeObjectToString.call(value);
|
|
1751
|
+
}
|
|
1752
|
+
var _objectToString = objectToString;
|
|
1753
|
+
|
|
1754
|
+
/** `Object#toString` result references. */
|
|
1755
|
+
var nullTag = '[object Null]',
|
|
1756
|
+
undefinedTag = '[object Undefined]';
|
|
1757
|
+
|
|
1758
|
+
/** Built-in value references. */
|
|
1759
|
+
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
1763
|
+
*
|
|
1764
|
+
* @private
|
|
1765
|
+
* @param {*} value The value to query.
|
|
1766
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1767
|
+
*/
|
|
1768
|
+
function baseGetTag(value) {
|
|
1769
|
+
if (value == null) {
|
|
1770
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
1771
|
+
}
|
|
1772
|
+
return symToStringTag && symToStringTag in Object(value) ? _getRawTag(value) : _objectToString(value);
|
|
1773
|
+
}
|
|
1774
|
+
var _baseGetTag = baseGetTag;
|
|
1775
|
+
|
|
1776
|
+
/**
|
|
1777
|
+
* Checks if `value` is the
|
|
1778
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1779
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1780
|
+
*
|
|
1781
|
+
* @static
|
|
1782
|
+
* @memberOf _
|
|
1783
|
+
* @since 0.1.0
|
|
1784
|
+
* @category Lang
|
|
1785
|
+
* @param {*} value The value to check.
|
|
1786
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1787
|
+
* @example
|
|
1788
|
+
*
|
|
1789
|
+
* _.isObject({});
|
|
1790
|
+
* // => true
|
|
1791
|
+
*
|
|
1792
|
+
* _.isObject([1, 2, 3]);
|
|
1793
|
+
* // => true
|
|
1794
|
+
*
|
|
1795
|
+
* _.isObject(_.noop);
|
|
1796
|
+
* // => true
|
|
1797
|
+
*
|
|
1798
|
+
* _.isObject(null);
|
|
1799
|
+
* // => false
|
|
1800
|
+
*/
|
|
1801
|
+
function isObject(value) {
|
|
1802
|
+
var type = typeof value;
|
|
1803
|
+
return value != null && (type == 'object' || type == 'function');
|
|
1804
|
+
}
|
|
1805
|
+
var isObject_1 = isObject;
|
|
1806
|
+
|
|
1807
|
+
/** `Object#toString` result references. */
|
|
1808
|
+
var asyncTag = '[object AsyncFunction]',
|
|
1809
|
+
funcTag$1 = '[object Function]',
|
|
1810
|
+
genTag = '[object GeneratorFunction]',
|
|
1811
|
+
proxyTag = '[object Proxy]';
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* Checks if `value` is classified as a `Function` object.
|
|
1815
|
+
*
|
|
1816
|
+
* @static
|
|
1817
|
+
* @memberOf _
|
|
1818
|
+
* @since 0.1.0
|
|
1819
|
+
* @category Lang
|
|
1820
|
+
* @param {*} value The value to check.
|
|
1821
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1822
|
+
* @example
|
|
1823
|
+
*
|
|
1824
|
+
* _.isFunction(_);
|
|
1825
|
+
* // => true
|
|
1826
|
+
*
|
|
1827
|
+
* _.isFunction(/abc/);
|
|
1828
|
+
* // => false
|
|
1829
|
+
*/
|
|
1830
|
+
function isFunction(value) {
|
|
1831
|
+
if (!isObject_1(value)) {
|
|
1832
|
+
return false;
|
|
1833
|
+
}
|
|
1834
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1835
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1836
|
+
var tag = _baseGetTag(value);
|
|
1837
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1838
|
+
}
|
|
1839
|
+
var isFunction_1 = isFunction;
|
|
1840
|
+
|
|
1841
|
+
/** Used to detect overreaching core-js shims. */
|
|
1842
|
+
var coreJsData = _root['__core-js_shared__'];
|
|
1843
|
+
var _coreJsData = coreJsData;
|
|
1844
|
+
|
|
1845
|
+
/** Used to detect methods masquerading as native. */
|
|
1846
|
+
var maskSrcKey = function () {
|
|
1847
|
+
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
1848
|
+
return uid ? 'Symbol(src)_1.' + uid : '';
|
|
1849
|
+
}();
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* Checks if `func` has its source masked.
|
|
1853
|
+
*
|
|
1854
|
+
* @private
|
|
1855
|
+
* @param {Function} func The function to check.
|
|
1856
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1857
|
+
*/
|
|
1858
|
+
function isMasked(func) {
|
|
1859
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
1860
|
+
}
|
|
1861
|
+
var _isMasked = isMasked;
|
|
1862
|
+
|
|
1863
|
+
/** Used for built-in method references. */
|
|
1864
|
+
var funcProto$2 = Function.prototype;
|
|
1865
|
+
|
|
1866
|
+
/** Used to resolve the decompiled source of functions. */
|
|
1867
|
+
var funcToString$2 = funcProto$2.toString;
|
|
1868
|
+
|
|
1869
|
+
/**
|
|
1870
|
+
* Converts `func` to its source code.
|
|
1871
|
+
*
|
|
1872
|
+
* @private
|
|
1873
|
+
* @param {Function} func The function to convert.
|
|
1874
|
+
* @returns {string} Returns the source code.
|
|
1875
|
+
*/
|
|
1876
|
+
function toSource(func) {
|
|
1877
|
+
if (func != null) {
|
|
1878
|
+
try {
|
|
1879
|
+
return funcToString$2.call(func);
|
|
1880
|
+
} catch (e) {}
|
|
1881
|
+
try {
|
|
1882
|
+
return func + '';
|
|
1883
|
+
} catch (e) {}
|
|
1884
|
+
}
|
|
1885
|
+
return '';
|
|
1886
|
+
}
|
|
1887
|
+
var _toSource = toSource;
|
|
1888
|
+
|
|
1889
|
+
/**
|
|
1890
|
+
* Used to match `RegExp`
|
|
1891
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1892
|
+
*/
|
|
1893
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1894
|
+
|
|
1895
|
+
/** Used to detect host constructors (Safari). */
|
|
1896
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1897
|
+
|
|
1898
|
+
/** Used for built-in method references. */
|
|
1899
|
+
var funcProto$1 = Function.prototype,
|
|
1900
|
+
objectProto$8 = Object.prototype;
|
|
1901
|
+
|
|
1902
|
+
/** Used to resolve the decompiled source of functions. */
|
|
1903
|
+
var funcToString$1 = funcProto$1.toString;
|
|
1904
|
+
|
|
1905
|
+
/** Used to check objects for own properties. */
|
|
1906
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
1907
|
+
|
|
1908
|
+
/** Used to detect if a method is native. */
|
|
1909
|
+
var reIsNative = RegExp('^' + funcToString$1.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
1913
|
+
*
|
|
1914
|
+
* @private
|
|
1915
|
+
* @param {*} value The value to check.
|
|
1916
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1917
|
+
* else `false`.
|
|
1918
|
+
*/
|
|
1919
|
+
function baseIsNative(value) {
|
|
1920
|
+
if (!isObject_1(value) || _isMasked(value)) {
|
|
1921
|
+
return false;
|
|
1922
|
+
}
|
|
1923
|
+
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
1924
|
+
return pattern.test(_toSource(value));
|
|
1925
|
+
}
|
|
1926
|
+
var _baseIsNative = baseIsNative;
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* Gets the value at `key` of `object`.
|
|
1930
|
+
*
|
|
1931
|
+
* @private
|
|
1932
|
+
* @param {Object} [object] The object to query.
|
|
1933
|
+
* @param {string} key The key of the property to get.
|
|
1934
|
+
* @returns {*} Returns the property value.
|
|
1935
|
+
*/
|
|
1936
|
+
function getValue(object, key) {
|
|
1937
|
+
return object == null ? undefined : object[key];
|
|
1938
|
+
}
|
|
1939
|
+
var _getValue = getValue;
|
|
1940
|
+
|
|
1941
|
+
/**
|
|
1942
|
+
* Gets the native function at `key` of `object`.
|
|
1943
|
+
*
|
|
1944
|
+
* @private
|
|
1945
|
+
* @param {Object} object The object to query.
|
|
1946
|
+
* @param {string} key The key of the method to get.
|
|
1947
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1948
|
+
*/
|
|
1949
|
+
function getNative(object, key) {
|
|
1950
|
+
var value = _getValue(object, key);
|
|
1951
|
+
return _baseIsNative(value) ? value : undefined;
|
|
1952
|
+
}
|
|
1953
|
+
var _getNative = getNative;
|
|
1954
|
+
|
|
1955
|
+
/* Built-in method references that are verified to be native. */
|
|
1956
|
+
var Map = _getNative(_root, 'Map');
|
|
1957
|
+
var _Map = Map;
|
|
1958
|
+
|
|
1959
|
+
/* Built-in method references that are verified to be native. */
|
|
1960
|
+
var nativeCreate = _getNative(Object, 'create');
|
|
1961
|
+
var _nativeCreate = nativeCreate;
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* Removes all key-value entries from the hash.
|
|
1965
|
+
*
|
|
1966
|
+
* @private
|
|
1967
|
+
* @name clear
|
|
1968
|
+
* @memberOf Hash
|
|
1969
|
+
*/
|
|
1970
|
+
function hashClear() {
|
|
1971
|
+
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1972
|
+
this.size = 0;
|
|
1973
|
+
}
|
|
1974
|
+
var _hashClear = hashClear;
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* Removes `key` and its value from the hash.
|
|
1978
|
+
*
|
|
1979
|
+
* @private
|
|
1980
|
+
* @name delete
|
|
1981
|
+
* @memberOf Hash
|
|
1982
|
+
* @param {Object} hash The hash to modify.
|
|
1983
|
+
* @param {string} key The key of the value to remove.
|
|
1984
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1985
|
+
*/
|
|
1986
|
+
function hashDelete(key) {
|
|
1987
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
1988
|
+
this.size -= result ? 1 : 0;
|
|
1989
|
+
return result;
|
|
1990
|
+
}
|
|
1991
|
+
var _hashDelete = hashDelete;
|
|
1992
|
+
|
|
1993
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
1994
|
+
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
1995
|
+
|
|
1996
|
+
/** Used for built-in method references. */
|
|
1997
|
+
var objectProto$7 = Object.prototype;
|
|
1998
|
+
|
|
1999
|
+
/** Used to check objects for own properties. */
|
|
2000
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
2001
|
+
|
|
2002
|
+
/**
|
|
2003
|
+
* Gets the hash value for `key`.
|
|
2004
|
+
*
|
|
2005
|
+
* @private
|
|
2006
|
+
* @name get
|
|
2007
|
+
* @memberOf Hash
|
|
2008
|
+
* @param {string} key The key of the value to get.
|
|
2009
|
+
* @returns {*} Returns the entry value.
|
|
2010
|
+
*/
|
|
2011
|
+
function hashGet(key) {
|
|
2012
|
+
var data = this.__data__;
|
|
2013
|
+
if (_nativeCreate) {
|
|
2014
|
+
var result = data[key];
|
|
2015
|
+
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
2016
|
+
}
|
|
2017
|
+
return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
|
|
2018
|
+
}
|
|
2019
|
+
var _hashGet = hashGet;
|
|
2020
|
+
|
|
2021
|
+
/** Used for built-in method references. */
|
|
2022
|
+
var objectProto$6 = Object.prototype;
|
|
2023
|
+
|
|
2024
|
+
/** Used to check objects for own properties. */
|
|
2025
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Checks if a hash value for `key` exists.
|
|
2029
|
+
*
|
|
2030
|
+
* @private
|
|
2031
|
+
* @name has
|
|
2032
|
+
* @memberOf Hash
|
|
2033
|
+
* @param {string} key The key of the entry to check.
|
|
2034
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2035
|
+
*/
|
|
2036
|
+
function hashHas(key) {
|
|
2037
|
+
var data = this.__data__;
|
|
2038
|
+
return _nativeCreate ? data[key] !== undefined : hasOwnProperty$5.call(data, key);
|
|
2039
|
+
}
|
|
2040
|
+
var _hashHas = hashHas;
|
|
2041
|
+
|
|
2042
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
2043
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* Sets the hash `key` to `value`.
|
|
2047
|
+
*
|
|
2048
|
+
* @private
|
|
2049
|
+
* @name set
|
|
2050
|
+
* @memberOf Hash
|
|
2051
|
+
* @param {string} key The key of the value to set.
|
|
2052
|
+
* @param {*} value The value to set.
|
|
2053
|
+
* @returns {Object} Returns the hash instance.
|
|
2054
|
+
*/
|
|
2055
|
+
function hashSet(key, value) {
|
|
2056
|
+
var data = this.__data__;
|
|
2057
|
+
this.size += this.has(key) ? 0 : 1;
|
|
2058
|
+
data[key] = _nativeCreate && value === undefined ? HASH_UNDEFINED : value;
|
|
2059
|
+
return this;
|
|
2060
|
+
}
|
|
2061
|
+
var _hashSet = hashSet;
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* Creates a hash object.
|
|
2065
|
+
*
|
|
2066
|
+
* @private
|
|
2067
|
+
* @constructor
|
|
2068
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
2069
|
+
*/
|
|
2070
|
+
function Hash(entries) {
|
|
2071
|
+
var index = -1,
|
|
2072
|
+
length = entries == null ? 0 : entries.length;
|
|
2073
|
+
this.clear();
|
|
2074
|
+
while (++index < length) {
|
|
2075
|
+
var entry = entries[index];
|
|
2076
|
+
this.set(entry[0], entry[1]);
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
// Add methods to `Hash`.
|
|
2081
|
+
Hash.prototype.clear = _hashClear;
|
|
2082
|
+
Hash.prototype['delete'] = _hashDelete;
|
|
2083
|
+
Hash.prototype.get = _hashGet;
|
|
2084
|
+
Hash.prototype.has = _hashHas;
|
|
2085
|
+
Hash.prototype.set = _hashSet;
|
|
2086
|
+
var _Hash = Hash;
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* Removes all key-value entries from the map.
|
|
2090
|
+
*
|
|
2091
|
+
* @private
|
|
2092
|
+
* @name clear
|
|
2093
|
+
* @memberOf MapCache
|
|
2094
|
+
*/
|
|
2095
|
+
function mapCacheClear() {
|
|
2096
|
+
this.size = 0;
|
|
2097
|
+
this.__data__ = {
|
|
2098
|
+
'hash': new _Hash(),
|
|
2099
|
+
'map': new (_Map || _ListCache)(),
|
|
2100
|
+
'string': new _Hash()
|
|
2101
|
+
};
|
|
2102
|
+
}
|
|
2103
|
+
var _mapCacheClear = mapCacheClear;
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
2107
|
+
*
|
|
2108
|
+
* @private
|
|
2109
|
+
* @param {*} value The value to check.
|
|
2110
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
2111
|
+
*/
|
|
2112
|
+
function isKeyable(value) {
|
|
2113
|
+
var type = typeof value;
|
|
2114
|
+
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
|
|
2115
|
+
}
|
|
2116
|
+
var _isKeyable = isKeyable;
|
|
2117
|
+
|
|
2118
|
+
/**
|
|
2119
|
+
* Gets the data for `map`.
|
|
2120
|
+
*
|
|
2121
|
+
* @private
|
|
2122
|
+
* @param {Object} map The map to query.
|
|
2123
|
+
* @param {string} key The reference key.
|
|
2124
|
+
* @returns {*} Returns the map data.
|
|
2125
|
+
*/
|
|
2126
|
+
function getMapData(map, key) {
|
|
2127
|
+
var data = map.__data__;
|
|
2128
|
+
return _isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
|
|
2129
|
+
}
|
|
2130
|
+
var _getMapData = getMapData;
|
|
2131
|
+
|
|
2132
|
+
/**
|
|
2133
|
+
* Removes `key` and its value from the map.
|
|
2134
|
+
*
|
|
2135
|
+
* @private
|
|
2136
|
+
* @name delete
|
|
2137
|
+
* @memberOf MapCache
|
|
2138
|
+
* @param {string} key The key of the value to remove.
|
|
2139
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2140
|
+
*/
|
|
2141
|
+
function mapCacheDelete(key) {
|
|
2142
|
+
var result = _getMapData(this, key)['delete'](key);
|
|
2143
|
+
this.size -= result ? 1 : 0;
|
|
2144
|
+
return result;
|
|
2145
|
+
}
|
|
2146
|
+
var _mapCacheDelete = mapCacheDelete;
|
|
2147
|
+
|
|
2148
|
+
/**
|
|
2149
|
+
* Gets the map value for `key`.
|
|
2150
|
+
*
|
|
2151
|
+
* @private
|
|
2152
|
+
* @name get
|
|
2153
|
+
* @memberOf MapCache
|
|
2154
|
+
* @param {string} key The key of the value to get.
|
|
2155
|
+
* @returns {*} Returns the entry value.
|
|
2156
|
+
*/
|
|
2157
|
+
function mapCacheGet(key) {
|
|
2158
|
+
return _getMapData(this, key).get(key);
|
|
2159
|
+
}
|
|
2160
|
+
var _mapCacheGet = mapCacheGet;
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* Checks if a map value for `key` exists.
|
|
2164
|
+
*
|
|
2165
|
+
* @private
|
|
2166
|
+
* @name has
|
|
2167
|
+
* @memberOf MapCache
|
|
2168
|
+
* @param {string} key The key of the entry to check.
|
|
2169
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2170
|
+
*/
|
|
2171
|
+
function mapCacheHas(key) {
|
|
2172
|
+
return _getMapData(this, key).has(key);
|
|
2173
|
+
}
|
|
2174
|
+
var _mapCacheHas = mapCacheHas;
|
|
2175
|
+
|
|
2176
|
+
/**
|
|
2177
|
+
* Sets the map `key` to `value`.
|
|
2178
|
+
*
|
|
2179
|
+
* @private
|
|
2180
|
+
* @name set
|
|
2181
|
+
* @memberOf MapCache
|
|
2182
|
+
* @param {string} key The key of the value to set.
|
|
2183
|
+
* @param {*} value The value to set.
|
|
2184
|
+
* @returns {Object} Returns the map cache instance.
|
|
2185
|
+
*/
|
|
2186
|
+
function mapCacheSet(key, value) {
|
|
2187
|
+
var data = _getMapData(this, key),
|
|
2188
|
+
size = data.size;
|
|
2189
|
+
data.set(key, value);
|
|
2190
|
+
this.size += data.size == size ? 0 : 1;
|
|
2191
|
+
return this;
|
|
2192
|
+
}
|
|
2193
|
+
var _mapCacheSet = mapCacheSet;
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Creates a map cache object to store key-value pairs.
|
|
2197
|
+
*
|
|
2198
|
+
* @private
|
|
2199
|
+
* @constructor
|
|
2200
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
2201
|
+
*/
|
|
2202
|
+
function MapCache(entries) {
|
|
2203
|
+
var index = -1,
|
|
2204
|
+
length = entries == null ? 0 : entries.length;
|
|
2205
|
+
this.clear();
|
|
2206
|
+
while (++index < length) {
|
|
2207
|
+
var entry = entries[index];
|
|
2208
|
+
this.set(entry[0], entry[1]);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
// Add methods to `MapCache`.
|
|
2213
|
+
MapCache.prototype.clear = _mapCacheClear;
|
|
2214
|
+
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
2215
|
+
MapCache.prototype.get = _mapCacheGet;
|
|
2216
|
+
MapCache.prototype.has = _mapCacheHas;
|
|
2217
|
+
MapCache.prototype.set = _mapCacheSet;
|
|
2218
|
+
var _MapCache = MapCache;
|
|
2219
|
+
|
|
2220
|
+
/** Used as the size to enable large array optimizations. */
|
|
2221
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
2222
|
+
|
|
2223
|
+
/**
|
|
2224
|
+
* Sets the stack `key` to `value`.
|
|
2225
|
+
*
|
|
2226
|
+
* @private
|
|
2227
|
+
* @name set
|
|
2228
|
+
* @memberOf Stack
|
|
2229
|
+
* @param {string} key The key of the value to set.
|
|
2230
|
+
* @param {*} value The value to set.
|
|
2231
|
+
* @returns {Object} Returns the stack cache instance.
|
|
2232
|
+
*/
|
|
2233
|
+
function stackSet(key, value) {
|
|
2234
|
+
var data = this.__data__;
|
|
2235
|
+
if (data instanceof _ListCache) {
|
|
2236
|
+
var pairs = data.__data__;
|
|
2237
|
+
if (!_Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
2238
|
+
pairs.push([key, value]);
|
|
2239
|
+
this.size = ++data.size;
|
|
2240
|
+
return this;
|
|
2241
|
+
}
|
|
2242
|
+
data = this.__data__ = new _MapCache(pairs);
|
|
2243
|
+
}
|
|
2244
|
+
data.set(key, value);
|
|
2245
|
+
this.size = data.size;
|
|
2246
|
+
return this;
|
|
2247
|
+
}
|
|
2248
|
+
var _stackSet = stackSet;
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* Creates a stack cache object to store key-value pairs.
|
|
2252
|
+
*
|
|
2253
|
+
* @private
|
|
2254
|
+
* @constructor
|
|
2255
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
2256
|
+
*/
|
|
2257
|
+
function Stack(entries) {
|
|
2258
|
+
var data = this.__data__ = new _ListCache(entries);
|
|
2259
|
+
this.size = data.size;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
// Add methods to `Stack`.
|
|
2263
|
+
Stack.prototype.clear = _stackClear;
|
|
2264
|
+
Stack.prototype['delete'] = _stackDelete;
|
|
2265
|
+
Stack.prototype.get = _stackGet;
|
|
2266
|
+
Stack.prototype.has = _stackHas;
|
|
2267
|
+
Stack.prototype.set = _stackSet;
|
|
2268
|
+
var _Stack = Stack;
|
|
2269
|
+
|
|
2270
|
+
var defineProperty = function () {
|
|
2271
|
+
try {
|
|
2272
|
+
var func = _getNative(Object, 'defineProperty');
|
|
2273
|
+
func({}, '', {});
|
|
2274
|
+
return func;
|
|
2275
|
+
} catch (e) {}
|
|
2276
|
+
}();
|
|
2277
|
+
var _defineProperty = defineProperty;
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
2281
|
+
* value checks.
|
|
2282
|
+
*
|
|
2283
|
+
* @private
|
|
2284
|
+
* @param {Object} object The object to modify.
|
|
2285
|
+
* @param {string} key The key of the property to assign.
|
|
2286
|
+
* @param {*} value The value to assign.
|
|
2287
|
+
*/
|
|
2288
|
+
function baseAssignValue(object, key, value) {
|
|
2289
|
+
if (key == '__proto__' && _defineProperty) {
|
|
2290
|
+
_defineProperty(object, key, {
|
|
2291
|
+
'configurable': true,
|
|
2292
|
+
'enumerable': true,
|
|
2293
|
+
'value': value,
|
|
2294
|
+
'writable': true
|
|
2295
|
+
});
|
|
2296
|
+
} else {
|
|
2297
|
+
object[key] = value;
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
var _baseAssignValue = baseAssignValue;
|
|
2301
|
+
|
|
2302
|
+
/**
|
|
2303
|
+
* This function is like `assignValue` except that it doesn't assign
|
|
2304
|
+
* `undefined` values.
|
|
2305
|
+
*
|
|
2306
|
+
* @private
|
|
2307
|
+
* @param {Object} object The object to modify.
|
|
2308
|
+
* @param {string} key The key of the property to assign.
|
|
2309
|
+
* @param {*} value The value to assign.
|
|
2310
|
+
*/
|
|
2311
|
+
function assignMergeValue(object, key, value) {
|
|
2312
|
+
if (value !== undefined && !eq_1(object[key], value) || value === undefined && !(key in object)) {
|
|
2313
|
+
_baseAssignValue(object, key, value);
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
var _assignMergeValue = assignMergeValue;
|
|
2317
|
+
|
|
2318
|
+
/**
|
|
2319
|
+
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
2320
|
+
*
|
|
2321
|
+
* @private
|
|
2322
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2323
|
+
* @returns {Function} Returns the new base function.
|
|
2324
|
+
*/
|
|
2325
|
+
function createBaseFor(fromRight) {
|
|
2326
|
+
return function (object, iteratee, keysFunc) {
|
|
2327
|
+
var index = -1,
|
|
2328
|
+
iterable = Object(object),
|
|
2329
|
+
props = keysFunc(object),
|
|
2330
|
+
length = props.length;
|
|
2331
|
+
while (length--) {
|
|
2332
|
+
var key = props[fromRight ? length : ++index];
|
|
2333
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
2334
|
+
break;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
return object;
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2340
|
+
var _createBaseFor = createBaseFor;
|
|
2341
|
+
|
|
2342
|
+
/**
|
|
2343
|
+
* The base implementation of `baseForOwn` which iterates over `object`
|
|
2344
|
+
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
2345
|
+
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
2346
|
+
*
|
|
2347
|
+
* @private
|
|
2348
|
+
* @param {Object} object The object to iterate over.
|
|
2349
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
2350
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
2351
|
+
* @returns {Object} Returns `object`.
|
|
2352
|
+
*/
|
|
2353
|
+
var baseFor = _createBaseFor();
|
|
2354
|
+
var _baseFor = baseFor;
|
|
2355
|
+
|
|
2356
|
+
var _cloneBuffer = createCommonjsModule(function (module, exports) {
|
|
2357
|
+
/** Detect free variable `exports`. */
|
|
2358
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
2359
|
+
|
|
2360
|
+
/** Detect free variable `module`. */
|
|
2361
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
2362
|
+
|
|
2363
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
2364
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2365
|
+
|
|
2366
|
+
/** Built-in value references. */
|
|
2367
|
+
var Buffer = moduleExports ? _root.Buffer : undefined,
|
|
2368
|
+
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
2369
|
+
|
|
2370
|
+
/**
|
|
2371
|
+
* Creates a clone of `buffer`.
|
|
2372
|
+
*
|
|
2373
|
+
* @private
|
|
2374
|
+
* @param {Buffer} buffer The buffer to clone.
|
|
2375
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
2376
|
+
* @returns {Buffer} Returns the cloned buffer.
|
|
2377
|
+
*/
|
|
2378
|
+
function cloneBuffer(buffer, isDeep) {
|
|
2379
|
+
if (isDeep) {
|
|
2380
|
+
return buffer.slice();
|
|
2381
|
+
}
|
|
2382
|
+
var length = buffer.length,
|
|
2383
|
+
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
2384
|
+
buffer.copy(result);
|
|
2385
|
+
return result;
|
|
2386
|
+
}
|
|
2387
|
+
module.exports = cloneBuffer;
|
|
2388
|
+
});
|
|
2389
|
+
|
|
2390
|
+
/** Built-in value references. */
|
|
2391
|
+
var Uint8Array = _root.Uint8Array;
|
|
2392
|
+
var _Uint8Array = Uint8Array;
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* Creates a clone of `arrayBuffer`.
|
|
2396
|
+
*
|
|
2397
|
+
* @private
|
|
2398
|
+
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
2399
|
+
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
2400
|
+
*/
|
|
2401
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
2402
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2403
|
+
new _Uint8Array(result).set(new _Uint8Array(arrayBuffer));
|
|
2404
|
+
return result;
|
|
2405
|
+
}
|
|
2406
|
+
var _cloneArrayBuffer = cloneArrayBuffer;
|
|
2407
|
+
|
|
2408
|
+
/**
|
|
2409
|
+
* Creates a clone of `typedArray`.
|
|
2410
|
+
*
|
|
2411
|
+
* @private
|
|
2412
|
+
* @param {Object} typedArray The typed array to clone.
|
|
2413
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
2414
|
+
* @returns {Object} Returns the cloned typed array.
|
|
2415
|
+
*/
|
|
2416
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
2417
|
+
var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
2418
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
2419
|
+
}
|
|
2420
|
+
var _cloneTypedArray = cloneTypedArray;
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* Copies the values of `source` to `array`.
|
|
2424
|
+
*
|
|
2425
|
+
* @private
|
|
2426
|
+
* @param {Array} source The array to copy values from.
|
|
2427
|
+
* @param {Array} [array=[]] The array to copy values to.
|
|
2428
|
+
* @returns {Array} Returns `array`.
|
|
2429
|
+
*/
|
|
2430
|
+
function copyArray(source, array) {
|
|
2431
|
+
var index = -1,
|
|
2432
|
+
length = source.length;
|
|
2433
|
+
array || (array = Array(length));
|
|
2434
|
+
while (++index < length) {
|
|
2435
|
+
array[index] = source[index];
|
|
2436
|
+
}
|
|
2437
|
+
return array;
|
|
2438
|
+
}
|
|
2439
|
+
var _copyArray = copyArray;
|
|
2440
|
+
|
|
2441
|
+
/** Built-in value references. */
|
|
2442
|
+
var objectCreate = Object.create;
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* The base implementation of `_.create` without support for assigning
|
|
2446
|
+
* properties to the created object.
|
|
2447
|
+
*
|
|
2448
|
+
* @private
|
|
2449
|
+
* @param {Object} proto The object to inherit from.
|
|
2450
|
+
* @returns {Object} Returns the new object.
|
|
2451
|
+
*/
|
|
2452
|
+
var baseCreate = function () {
|
|
2453
|
+
function object() {}
|
|
2454
|
+
return function (proto) {
|
|
2455
|
+
if (!isObject_1(proto)) {
|
|
2456
|
+
return {};
|
|
2457
|
+
}
|
|
2458
|
+
if (objectCreate) {
|
|
2459
|
+
return objectCreate(proto);
|
|
2460
|
+
}
|
|
2461
|
+
object.prototype = proto;
|
|
2462
|
+
var result = new object();
|
|
2463
|
+
object.prototype = undefined;
|
|
2464
|
+
return result;
|
|
2465
|
+
};
|
|
2466
|
+
}();
|
|
2467
|
+
var _baseCreate = baseCreate;
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
2471
|
+
*
|
|
2472
|
+
* @private
|
|
2473
|
+
* @param {Function} func The function to wrap.
|
|
2474
|
+
* @param {Function} transform The argument transform.
|
|
2475
|
+
* @returns {Function} Returns the new function.
|
|
2476
|
+
*/
|
|
2477
|
+
function overArg(func, transform) {
|
|
2478
|
+
return function (arg) {
|
|
2479
|
+
return func(transform(arg));
|
|
2480
|
+
};
|
|
2481
|
+
}
|
|
2482
|
+
var _overArg = overArg;
|
|
2483
|
+
|
|
2484
|
+
/** Built-in value references. */
|
|
2485
|
+
var getPrototype = _overArg(Object.getPrototypeOf, Object);
|
|
2486
|
+
var _getPrototype = getPrototype;
|
|
2487
|
+
|
|
2488
|
+
/** Used for built-in method references. */
|
|
2489
|
+
var objectProto$5 = Object.prototype;
|
|
2490
|
+
|
|
2491
|
+
/**
|
|
2492
|
+
* Checks if `value` is likely a prototype object.
|
|
2493
|
+
*
|
|
2494
|
+
* @private
|
|
2495
|
+
* @param {*} value The value to check.
|
|
2496
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
2497
|
+
*/
|
|
2498
|
+
function isPrototype(value) {
|
|
2499
|
+
var Ctor = value && value.constructor,
|
|
2500
|
+
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$5;
|
|
2501
|
+
return value === proto;
|
|
2502
|
+
}
|
|
2503
|
+
var _isPrototype = isPrototype;
|
|
2504
|
+
|
|
2505
|
+
/**
|
|
2506
|
+
* Initializes an object clone.
|
|
2507
|
+
*
|
|
2508
|
+
* @private
|
|
2509
|
+
* @param {Object} object The object to clone.
|
|
2510
|
+
* @returns {Object} Returns the initialized clone.
|
|
2511
|
+
*/
|
|
2512
|
+
function initCloneObject(object) {
|
|
2513
|
+
return typeof object.constructor == 'function' && !_isPrototype(object) ? _baseCreate(_getPrototype(object)) : {};
|
|
2514
|
+
}
|
|
2515
|
+
var _initCloneObject = initCloneObject;
|
|
2516
|
+
|
|
2517
|
+
/**
|
|
2518
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
2519
|
+
* and has a `typeof` result of "object".
|
|
2520
|
+
*
|
|
2521
|
+
* @static
|
|
2522
|
+
* @memberOf _
|
|
2523
|
+
* @since 4.0.0
|
|
2524
|
+
* @category Lang
|
|
2525
|
+
* @param {*} value The value to check.
|
|
2526
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
2527
|
+
* @example
|
|
2528
|
+
*
|
|
2529
|
+
* _.isObjectLike({});
|
|
2530
|
+
* // => true
|
|
2531
|
+
*
|
|
2532
|
+
* _.isObjectLike([1, 2, 3]);
|
|
2533
|
+
* // => true
|
|
2534
|
+
*
|
|
2535
|
+
* _.isObjectLike(_.noop);
|
|
2536
|
+
* // => false
|
|
2537
|
+
*
|
|
2538
|
+
* _.isObjectLike(null);
|
|
2539
|
+
* // => false
|
|
2540
|
+
*/
|
|
2541
|
+
function isObjectLike(value) {
|
|
2542
|
+
return value != null && typeof value == 'object';
|
|
2543
|
+
}
|
|
2544
|
+
var isObjectLike_1 = isObjectLike;
|
|
2545
|
+
|
|
2546
|
+
/** `Object#toString` result references. */
|
|
2547
|
+
var argsTag$1 = '[object Arguments]';
|
|
2548
|
+
|
|
2549
|
+
/**
|
|
2550
|
+
* The base implementation of `_.isArguments`.
|
|
2551
|
+
*
|
|
2552
|
+
* @private
|
|
2553
|
+
* @param {*} value The value to check.
|
|
2554
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
2555
|
+
*/
|
|
2556
|
+
function baseIsArguments(value) {
|
|
2557
|
+
return isObjectLike_1(value) && _baseGetTag(value) == argsTag$1;
|
|
2558
|
+
}
|
|
2559
|
+
var _baseIsArguments = baseIsArguments;
|
|
2560
|
+
|
|
2561
|
+
/** Used for built-in method references. */
|
|
2562
|
+
var objectProto$4 = Object.prototype;
|
|
2563
|
+
|
|
2564
|
+
/** Used to check objects for own properties. */
|
|
2565
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
2566
|
+
|
|
2567
|
+
/** Built-in value references. */
|
|
2568
|
+
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
2569
|
+
|
|
2570
|
+
/**
|
|
2571
|
+
* Checks if `value` is likely an `arguments` object.
|
|
2572
|
+
*
|
|
2573
|
+
* @static
|
|
2574
|
+
* @memberOf _
|
|
2575
|
+
* @since 0.1.0
|
|
2576
|
+
* @category Lang
|
|
2577
|
+
* @param {*} value The value to check.
|
|
2578
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
2579
|
+
* else `false`.
|
|
2580
|
+
* @example
|
|
2581
|
+
*
|
|
2582
|
+
* _.isArguments(function() { return arguments; }());
|
|
2583
|
+
* // => true
|
|
2584
|
+
*
|
|
2585
|
+
* _.isArguments([1, 2, 3]);
|
|
2586
|
+
* // => false
|
|
2587
|
+
*/
|
|
2588
|
+
var isArguments = _baseIsArguments(function () {
|
|
2589
|
+
return arguments;
|
|
2590
|
+
}()) ? _baseIsArguments : function (value) {
|
|
2591
|
+
return isObjectLike_1(value) && hasOwnProperty$4.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
|
|
2592
|
+
};
|
|
2593
|
+
var isArguments_1 = isArguments;
|
|
2594
|
+
|
|
2595
|
+
/**
|
|
2596
|
+
* Checks if `value` is classified as an `Array` object.
|
|
2597
|
+
*
|
|
2598
|
+
* @static
|
|
2599
|
+
* @memberOf _
|
|
2600
|
+
* @since 0.1.0
|
|
2601
|
+
* @category Lang
|
|
2602
|
+
* @param {*} value The value to check.
|
|
2603
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
2604
|
+
* @example
|
|
2605
|
+
*
|
|
2606
|
+
* _.isArray([1, 2, 3]);
|
|
2607
|
+
* // => true
|
|
2608
|
+
*
|
|
2609
|
+
* _.isArray(document.body.children);
|
|
2610
|
+
* // => false
|
|
2611
|
+
*
|
|
2612
|
+
* _.isArray('abc');
|
|
2613
|
+
* // => false
|
|
2614
|
+
*
|
|
2615
|
+
* _.isArray(_.noop);
|
|
2616
|
+
* // => false
|
|
2617
|
+
*/
|
|
2618
|
+
var isArray = Array.isArray;
|
|
2619
|
+
var isArray_1 = isArray;
|
|
2620
|
+
|
|
2621
|
+
/** Used as references for various `Number` constants. */
|
|
2622
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* Checks if `value` is a valid array-like length.
|
|
2626
|
+
*
|
|
2627
|
+
* **Note:** This method is loosely based on
|
|
2628
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
2629
|
+
*
|
|
2630
|
+
* @static
|
|
2631
|
+
* @memberOf _
|
|
2632
|
+
* @since 4.0.0
|
|
2633
|
+
* @category Lang
|
|
2634
|
+
* @param {*} value The value to check.
|
|
2635
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
2636
|
+
* @example
|
|
2637
|
+
*
|
|
2638
|
+
* _.isLength(3);
|
|
2639
|
+
* // => true
|
|
2640
|
+
*
|
|
2641
|
+
* _.isLength(Number.MIN_VALUE);
|
|
2642
|
+
* // => false
|
|
2643
|
+
*
|
|
2644
|
+
* _.isLength(Infinity);
|
|
2645
|
+
* // => false
|
|
2646
|
+
*
|
|
2647
|
+
* _.isLength('3');
|
|
2648
|
+
* // => false
|
|
2649
|
+
*/
|
|
2650
|
+
function isLength(value) {
|
|
2651
|
+
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
|
|
2652
|
+
}
|
|
2653
|
+
var isLength_1 = isLength;
|
|
2654
|
+
|
|
2655
|
+
/**
|
|
2656
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
2657
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
2658
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
2659
|
+
*
|
|
2660
|
+
* @static
|
|
2661
|
+
* @memberOf _
|
|
2662
|
+
* @since 4.0.0
|
|
2663
|
+
* @category Lang
|
|
2664
|
+
* @param {*} value The value to check.
|
|
2665
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
2666
|
+
* @example
|
|
2667
|
+
*
|
|
2668
|
+
* _.isArrayLike([1, 2, 3]);
|
|
2669
|
+
* // => true
|
|
2670
|
+
*
|
|
2671
|
+
* _.isArrayLike(document.body.children);
|
|
2672
|
+
* // => true
|
|
2673
|
+
*
|
|
2674
|
+
* _.isArrayLike('abc');
|
|
2675
|
+
* // => true
|
|
2676
|
+
*
|
|
2677
|
+
* _.isArrayLike(_.noop);
|
|
2678
|
+
* // => false
|
|
2679
|
+
*/
|
|
2680
|
+
function isArrayLike(value) {
|
|
2681
|
+
return value != null && isLength_1(value.length) && !isFunction_1(value);
|
|
2682
|
+
}
|
|
2683
|
+
var isArrayLike_1 = isArrayLike;
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
2687
|
+
* is an object.
|
|
2688
|
+
*
|
|
2689
|
+
* @static
|
|
2690
|
+
* @memberOf _
|
|
2691
|
+
* @since 4.0.0
|
|
2692
|
+
* @category Lang
|
|
2693
|
+
* @param {*} value The value to check.
|
|
2694
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
2695
|
+
* else `false`.
|
|
2696
|
+
* @example
|
|
2697
|
+
*
|
|
2698
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
|
2699
|
+
* // => true
|
|
2700
|
+
*
|
|
2701
|
+
* _.isArrayLikeObject(document.body.children);
|
|
2702
|
+
* // => true
|
|
2703
|
+
*
|
|
2704
|
+
* _.isArrayLikeObject('abc');
|
|
2705
|
+
* // => false
|
|
2706
|
+
*
|
|
2707
|
+
* _.isArrayLikeObject(_.noop);
|
|
2708
|
+
* // => false
|
|
2709
|
+
*/
|
|
2710
|
+
function isArrayLikeObject(value) {
|
|
2711
|
+
return isObjectLike_1(value) && isArrayLike_1(value);
|
|
2712
|
+
}
|
|
2713
|
+
var isArrayLikeObject_1 = isArrayLikeObject;
|
|
2714
|
+
|
|
2715
|
+
/**
|
|
2716
|
+
* This method returns `false`.
|
|
2717
|
+
*
|
|
2718
|
+
* @static
|
|
2719
|
+
* @memberOf _
|
|
2720
|
+
* @since 4.13.0
|
|
2721
|
+
* @category Util
|
|
2722
|
+
* @returns {boolean} Returns `false`.
|
|
2723
|
+
* @example
|
|
2724
|
+
*
|
|
2725
|
+
* _.times(2, _.stubFalse);
|
|
2726
|
+
* // => [false, false]
|
|
2727
|
+
*/
|
|
2728
|
+
function stubFalse() {
|
|
2729
|
+
return false;
|
|
2730
|
+
}
|
|
2731
|
+
var stubFalse_1 = stubFalse;
|
|
2732
|
+
|
|
2733
|
+
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
2734
|
+
/** Detect free variable `exports`. */
|
|
2735
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
2736
|
+
|
|
2737
|
+
/** Detect free variable `module`. */
|
|
2738
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
2739
|
+
|
|
2740
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
2741
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2742
|
+
|
|
2743
|
+
/** Built-in value references. */
|
|
2744
|
+
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
2745
|
+
|
|
2746
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
2747
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
2748
|
+
|
|
2749
|
+
/**
|
|
2750
|
+
* Checks if `value` is a buffer.
|
|
2751
|
+
*
|
|
2752
|
+
* @static
|
|
2753
|
+
* @memberOf _
|
|
2754
|
+
* @since 4.3.0
|
|
2755
|
+
* @category Lang
|
|
2756
|
+
* @param {*} value The value to check.
|
|
2757
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
2758
|
+
* @example
|
|
2759
|
+
*
|
|
2760
|
+
* _.isBuffer(new Buffer(2));
|
|
2761
|
+
* // => true
|
|
2762
|
+
*
|
|
2763
|
+
* _.isBuffer(new Uint8Array(2));
|
|
2764
|
+
* // => false
|
|
2765
|
+
*/
|
|
2766
|
+
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
2767
|
+
module.exports = isBuffer;
|
|
2768
|
+
});
|
|
2769
|
+
|
|
2770
|
+
/** `Object#toString` result references. */
|
|
2771
|
+
var objectTag$1 = '[object Object]';
|
|
2772
|
+
|
|
2773
|
+
/** Used for built-in method references. */
|
|
2774
|
+
var funcProto = Function.prototype,
|
|
2775
|
+
objectProto$3 = Object.prototype;
|
|
2776
|
+
|
|
2777
|
+
/** Used to resolve the decompiled source of functions. */
|
|
2778
|
+
var funcToString = funcProto.toString;
|
|
2779
|
+
|
|
2780
|
+
/** Used to check objects for own properties. */
|
|
2781
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
2782
|
+
|
|
2783
|
+
/** Used to infer the `Object` constructor. */
|
|
2784
|
+
var objectCtorString = funcToString.call(Object);
|
|
2785
|
+
|
|
2786
|
+
/**
|
|
2787
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
2788
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
2789
|
+
*
|
|
2790
|
+
* @static
|
|
2791
|
+
* @memberOf _
|
|
2792
|
+
* @since 0.8.0
|
|
2793
|
+
* @category Lang
|
|
2794
|
+
* @param {*} value The value to check.
|
|
2795
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
2796
|
+
* @example
|
|
2797
|
+
*
|
|
2798
|
+
* function Foo() {
|
|
2799
|
+
* this.a = 1;
|
|
2800
|
+
* }
|
|
2801
|
+
*
|
|
2802
|
+
* _.isPlainObject(new Foo);
|
|
2803
|
+
* // => false
|
|
2804
|
+
*
|
|
2805
|
+
* _.isPlainObject([1, 2, 3]);
|
|
2806
|
+
* // => false
|
|
2807
|
+
*
|
|
2808
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
2809
|
+
* // => true
|
|
2810
|
+
*
|
|
2811
|
+
* _.isPlainObject(Object.create(null));
|
|
2812
|
+
* // => true
|
|
2813
|
+
*/
|
|
2814
|
+
function isPlainObject(value) {
|
|
2815
|
+
if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag$1) {
|
|
2816
|
+
return false;
|
|
2817
|
+
}
|
|
2818
|
+
var proto = _getPrototype(value);
|
|
2819
|
+
if (proto === null) {
|
|
2820
|
+
return true;
|
|
2821
|
+
}
|
|
2822
|
+
var Ctor = hasOwnProperty$3.call(proto, 'constructor') && proto.constructor;
|
|
2823
|
+
return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
2824
|
+
}
|
|
2825
|
+
var isPlainObject_1 = isPlainObject;
|
|
2826
|
+
|
|
2827
|
+
/** `Object#toString` result references. */
|
|
2828
|
+
var argsTag = '[object Arguments]',
|
|
2829
|
+
arrayTag = '[object Array]',
|
|
2830
|
+
boolTag = '[object Boolean]',
|
|
2831
|
+
dateTag = '[object Date]',
|
|
2832
|
+
errorTag = '[object Error]',
|
|
2833
|
+
funcTag = '[object Function]',
|
|
2834
|
+
mapTag = '[object Map]',
|
|
2835
|
+
numberTag = '[object Number]',
|
|
2836
|
+
objectTag = '[object Object]',
|
|
2837
|
+
regexpTag = '[object RegExp]',
|
|
2838
|
+
setTag = '[object Set]',
|
|
2839
|
+
stringTag = '[object String]',
|
|
2840
|
+
weakMapTag = '[object WeakMap]';
|
|
2841
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
2842
|
+
dataViewTag = '[object DataView]',
|
|
2843
|
+
float32Tag = '[object Float32Array]',
|
|
2844
|
+
float64Tag = '[object Float64Array]',
|
|
2845
|
+
int8Tag = '[object Int8Array]',
|
|
2846
|
+
int16Tag = '[object Int16Array]',
|
|
2847
|
+
int32Tag = '[object Int32Array]',
|
|
2848
|
+
uint8Tag = '[object Uint8Array]',
|
|
2849
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
2850
|
+
uint16Tag = '[object Uint16Array]',
|
|
2851
|
+
uint32Tag = '[object Uint32Array]';
|
|
2852
|
+
|
|
2853
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
2854
|
+
var typedArrayTags = {};
|
|
2855
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
2856
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
|
2857
|
+
|
|
2858
|
+
/**
|
|
2859
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
2860
|
+
*
|
|
2861
|
+
* @private
|
|
2862
|
+
* @param {*} value The value to check.
|
|
2863
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
2864
|
+
*/
|
|
2865
|
+
function baseIsTypedArray(value) {
|
|
2866
|
+
return isObjectLike_1(value) && isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
|
|
2867
|
+
}
|
|
2868
|
+
var _baseIsTypedArray = baseIsTypedArray;
|
|
2869
|
+
|
|
2870
|
+
/**
|
|
2871
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
2872
|
+
*
|
|
2873
|
+
* @private
|
|
2874
|
+
* @param {Function} func The function to cap arguments for.
|
|
2875
|
+
* @returns {Function} Returns the new capped function.
|
|
2876
|
+
*/
|
|
2877
|
+
function baseUnary(func) {
|
|
2878
|
+
return function (value) {
|
|
2879
|
+
return func(value);
|
|
2880
|
+
};
|
|
2881
|
+
}
|
|
2882
|
+
var _baseUnary = baseUnary;
|
|
2883
|
+
|
|
2884
|
+
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
2885
|
+
/** Detect free variable `exports`. */
|
|
2886
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
2887
|
+
|
|
2888
|
+
/** Detect free variable `module`. */
|
|
2889
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
2890
|
+
|
|
2891
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
2892
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2893
|
+
|
|
2894
|
+
/** Detect free variable `process` from Node.js. */
|
|
2895
|
+
var freeProcess = moduleExports && _freeGlobal.process;
|
|
2896
|
+
|
|
2897
|
+
/** Used to access faster Node.js helpers. */
|
|
2898
|
+
var nodeUtil = function () {
|
|
2899
|
+
try {
|
|
2900
|
+
// Use `util.types` for Node.js 10+.
|
|
2901
|
+
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
2902
|
+
if (types) {
|
|
2903
|
+
return types;
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
// Legacy `process.binding('util')` for Node.js < 10.
|
|
2907
|
+
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
2908
|
+
} catch (e) {}
|
|
2909
|
+
}();
|
|
2910
|
+
module.exports = nodeUtil;
|
|
2911
|
+
});
|
|
2912
|
+
|
|
2913
|
+
/* Node.js helper references. */
|
|
2914
|
+
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
2915
|
+
|
|
2916
|
+
/**
|
|
2917
|
+
* Checks if `value` is classified as a typed array.
|
|
2918
|
+
*
|
|
2919
|
+
* @static
|
|
2920
|
+
* @memberOf _
|
|
2921
|
+
* @since 3.0.0
|
|
2922
|
+
* @category Lang
|
|
2923
|
+
* @param {*} value The value to check.
|
|
2924
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
2925
|
+
* @example
|
|
2926
|
+
*
|
|
2927
|
+
* _.isTypedArray(new Uint8Array);
|
|
2928
|
+
* // => true
|
|
2929
|
+
*
|
|
2930
|
+
* _.isTypedArray([]);
|
|
2931
|
+
* // => false
|
|
2932
|
+
*/
|
|
2933
|
+
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
|
|
2934
|
+
var isTypedArray_1 = isTypedArray;
|
|
2935
|
+
|
|
2936
|
+
/**
|
|
2937
|
+
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
|
2938
|
+
*
|
|
2939
|
+
* @private
|
|
2940
|
+
* @param {Object} object The object to query.
|
|
2941
|
+
* @param {string} key The key of the property to get.
|
|
2942
|
+
* @returns {*} Returns the property value.
|
|
2943
|
+
*/
|
|
2944
|
+
function safeGet(object, key) {
|
|
2945
|
+
if (key === 'constructor' && typeof object[key] === 'function') {
|
|
2946
|
+
return;
|
|
2947
|
+
}
|
|
2948
|
+
if (key == '__proto__') {
|
|
2949
|
+
return;
|
|
2950
|
+
}
|
|
2951
|
+
return object[key];
|
|
2952
|
+
}
|
|
2953
|
+
var _safeGet = safeGet;
|
|
2954
|
+
|
|
2955
|
+
/** Used for built-in method references. */
|
|
2956
|
+
var objectProto$2 = Object.prototype;
|
|
2957
|
+
|
|
2958
|
+
/** Used to check objects for own properties. */
|
|
2959
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
2960
|
+
|
|
2961
|
+
/**
|
|
2962
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
2963
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
2964
|
+
* for equality comparisons.
|
|
2965
|
+
*
|
|
2966
|
+
* @private
|
|
2967
|
+
* @param {Object} object The object to modify.
|
|
2968
|
+
* @param {string} key The key of the property to assign.
|
|
2969
|
+
* @param {*} value The value to assign.
|
|
2970
|
+
*/
|
|
2971
|
+
function assignValue(object, key, value) {
|
|
2972
|
+
var objValue = object[key];
|
|
2973
|
+
if (!(hasOwnProperty$2.call(object, key) && eq_1(objValue, value)) || value === undefined && !(key in object)) {
|
|
2974
|
+
_baseAssignValue(object, key, value);
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
var _assignValue = assignValue;
|
|
2978
|
+
|
|
2979
|
+
/**
|
|
2980
|
+
* Copies properties of `source` to `object`.
|
|
2981
|
+
*
|
|
2982
|
+
* @private
|
|
2983
|
+
* @param {Object} source The object to copy properties from.
|
|
2984
|
+
* @param {Array} props The property identifiers to copy.
|
|
2985
|
+
* @param {Object} [object={}] The object to copy properties to.
|
|
2986
|
+
* @param {Function} [customizer] The function to customize copied values.
|
|
2987
|
+
* @returns {Object} Returns `object`.
|
|
2988
|
+
*/
|
|
2989
|
+
function copyObject(source, props, object, customizer) {
|
|
2990
|
+
var isNew = !object;
|
|
2991
|
+
object || (object = {});
|
|
2992
|
+
var index = -1,
|
|
2993
|
+
length = props.length;
|
|
2994
|
+
while (++index < length) {
|
|
2995
|
+
var key = props[index];
|
|
2996
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
|
|
2997
|
+
if (newValue === undefined) {
|
|
2998
|
+
newValue = source[key];
|
|
2999
|
+
}
|
|
3000
|
+
if (isNew) {
|
|
3001
|
+
_baseAssignValue(object, key, newValue);
|
|
3002
|
+
} else {
|
|
3003
|
+
_assignValue(object, key, newValue);
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
return object;
|
|
3007
|
+
}
|
|
3008
|
+
var _copyObject = copyObject;
|
|
3009
|
+
|
|
3010
|
+
/**
|
|
3011
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
3012
|
+
* or max array length checks.
|
|
3013
|
+
*
|
|
3014
|
+
* @private
|
|
3015
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
3016
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
3017
|
+
* @returns {Array} Returns the array of results.
|
|
3018
|
+
*/
|
|
3019
|
+
function baseTimes(n, iteratee) {
|
|
3020
|
+
var index = -1,
|
|
3021
|
+
result = Array(n);
|
|
3022
|
+
while (++index < n) {
|
|
3023
|
+
result[index] = iteratee(index);
|
|
3024
|
+
}
|
|
3025
|
+
return result;
|
|
3026
|
+
}
|
|
3027
|
+
var _baseTimes = baseTimes;
|
|
3028
|
+
|
|
3029
|
+
/** Used as references for various `Number` constants. */
|
|
3030
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
3031
|
+
|
|
3032
|
+
/** Used to detect unsigned integer values. */
|
|
3033
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
3034
|
+
|
|
3035
|
+
/**
|
|
3036
|
+
* Checks if `value` is a valid array-like index.
|
|
3037
|
+
*
|
|
3038
|
+
* @private
|
|
3039
|
+
* @param {*} value The value to check.
|
|
3040
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
3041
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
3042
|
+
*/
|
|
3043
|
+
function isIndex(value, length) {
|
|
3044
|
+
var type = typeof value;
|
|
3045
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
3046
|
+
return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
3047
|
+
}
|
|
3048
|
+
var _isIndex = isIndex;
|
|
3049
|
+
|
|
3050
|
+
/** Used for built-in method references. */
|
|
3051
|
+
var objectProto$1 = Object.prototype;
|
|
3052
|
+
|
|
3053
|
+
/** Used to check objects for own properties. */
|
|
3054
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
3055
|
+
|
|
3056
|
+
/**
|
|
3057
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
3058
|
+
*
|
|
3059
|
+
* @private
|
|
3060
|
+
* @param {*} value The value to query.
|
|
3061
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
3062
|
+
* @returns {Array} Returns the array of property names.
|
|
3063
|
+
*/
|
|
3064
|
+
function arrayLikeKeys(value, inherited) {
|
|
3065
|
+
var isArr = isArray_1(value),
|
|
3066
|
+
isArg = !isArr && isArguments_1(value),
|
|
3067
|
+
isBuff = !isArr && !isArg && isBuffer_1(value),
|
|
3068
|
+
isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
|
|
3069
|
+
skipIndexes = isArr || isArg || isBuff || isType,
|
|
3070
|
+
result = skipIndexes ? _baseTimes(value.length, String) : [],
|
|
3071
|
+
length = result.length;
|
|
3072
|
+
for (var key in value) {
|
|
3073
|
+
if ((inherited || hasOwnProperty$1.call(value, key)) && !(skipIndexes && (
|
|
3074
|
+
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
3075
|
+
key == 'length' ||
|
|
3076
|
+
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
3077
|
+
isBuff && (key == 'offset' || key == 'parent') ||
|
|
3078
|
+
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
3079
|
+
isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
|
|
3080
|
+
// Skip index properties.
|
|
3081
|
+
_isIndex(key, length)))) {
|
|
3082
|
+
result.push(key);
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
return result;
|
|
3086
|
+
}
|
|
3087
|
+
var _arrayLikeKeys = arrayLikeKeys;
|
|
3088
|
+
|
|
3089
|
+
/**
|
|
3090
|
+
* This function is like
|
|
3091
|
+
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
3092
|
+
* except that it includes inherited enumerable properties.
|
|
3093
|
+
*
|
|
3094
|
+
* @private
|
|
3095
|
+
* @param {Object} object The object to query.
|
|
3096
|
+
* @returns {Array} Returns the array of property names.
|
|
3097
|
+
*/
|
|
3098
|
+
function nativeKeysIn(object) {
|
|
3099
|
+
var result = [];
|
|
3100
|
+
if (object != null) {
|
|
3101
|
+
for (var key in Object(object)) {
|
|
3102
|
+
result.push(key);
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
return result;
|
|
3106
|
+
}
|
|
3107
|
+
var _nativeKeysIn = nativeKeysIn;
|
|
3108
|
+
|
|
3109
|
+
/** Used for built-in method references. */
|
|
3110
|
+
var objectProto = Object.prototype;
|
|
3111
|
+
|
|
3112
|
+
/** Used to check objects for own properties. */
|
|
3113
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
3114
|
+
|
|
3115
|
+
/**
|
|
3116
|
+
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
3117
|
+
*
|
|
3118
|
+
* @private
|
|
3119
|
+
* @param {Object} object The object to query.
|
|
3120
|
+
* @returns {Array} Returns the array of property names.
|
|
3121
|
+
*/
|
|
3122
|
+
function baseKeysIn(object) {
|
|
3123
|
+
if (!isObject_1(object)) {
|
|
3124
|
+
return _nativeKeysIn(object);
|
|
3125
|
+
}
|
|
3126
|
+
var isProto = _isPrototype(object),
|
|
3127
|
+
result = [];
|
|
3128
|
+
for (var key in object) {
|
|
3129
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
3130
|
+
result.push(key);
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
return result;
|
|
3134
|
+
}
|
|
3135
|
+
var _baseKeysIn = baseKeysIn;
|
|
3136
|
+
|
|
3137
|
+
/**
|
|
3138
|
+
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
3139
|
+
*
|
|
3140
|
+
* **Note:** Non-object values are coerced to objects.
|
|
3141
|
+
*
|
|
3142
|
+
* @static
|
|
3143
|
+
* @memberOf _
|
|
3144
|
+
* @since 3.0.0
|
|
3145
|
+
* @category Object
|
|
3146
|
+
* @param {Object} object The object to query.
|
|
3147
|
+
* @returns {Array} Returns the array of property names.
|
|
3148
|
+
* @example
|
|
3149
|
+
*
|
|
3150
|
+
* function Foo() {
|
|
3151
|
+
* this.a = 1;
|
|
3152
|
+
* this.b = 2;
|
|
3153
|
+
* }
|
|
3154
|
+
*
|
|
3155
|
+
* Foo.prototype.c = 3;
|
|
3156
|
+
*
|
|
3157
|
+
* _.keysIn(new Foo);
|
|
3158
|
+
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
3159
|
+
*/
|
|
3160
|
+
function keysIn(object) {
|
|
3161
|
+
return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);
|
|
3162
|
+
}
|
|
3163
|
+
var keysIn_1 = keysIn;
|
|
3164
|
+
|
|
3165
|
+
/**
|
|
3166
|
+
* Converts `value` to a plain object flattening inherited enumerable string
|
|
3167
|
+
* keyed properties of `value` to own properties of the plain object.
|
|
3168
|
+
*
|
|
3169
|
+
* @static
|
|
3170
|
+
* @memberOf _
|
|
3171
|
+
* @since 3.0.0
|
|
3172
|
+
* @category Lang
|
|
3173
|
+
* @param {*} value The value to convert.
|
|
3174
|
+
* @returns {Object} Returns the converted plain object.
|
|
3175
|
+
* @example
|
|
3176
|
+
*
|
|
3177
|
+
* function Foo() {
|
|
3178
|
+
* this.b = 2;
|
|
3179
|
+
* }
|
|
3180
|
+
*
|
|
3181
|
+
* Foo.prototype.c = 3;
|
|
3182
|
+
*
|
|
3183
|
+
* _.assign({ 'a': 1 }, new Foo);
|
|
3184
|
+
* // => { 'a': 1, 'b': 2 }
|
|
3185
|
+
*
|
|
3186
|
+
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
|
|
3187
|
+
* // => { 'a': 1, 'b': 2, 'c': 3 }
|
|
3188
|
+
*/
|
|
3189
|
+
function toPlainObject(value) {
|
|
3190
|
+
return _copyObject(value, keysIn_1(value));
|
|
3191
|
+
}
|
|
3192
|
+
var toPlainObject_1 = toPlainObject;
|
|
3193
|
+
|
|
3194
|
+
/**
|
|
3195
|
+
* A specialized version of `baseMerge` for arrays and objects which performs
|
|
3196
|
+
* deep merges and tracks traversed objects enabling objects with circular
|
|
3197
|
+
* references to be merged.
|
|
3198
|
+
*
|
|
3199
|
+
* @private
|
|
3200
|
+
* @param {Object} object The destination object.
|
|
3201
|
+
* @param {Object} source The source object.
|
|
3202
|
+
* @param {string} key The key of the value to merge.
|
|
3203
|
+
* @param {number} srcIndex The index of `source`.
|
|
3204
|
+
* @param {Function} mergeFunc The function to merge values.
|
|
3205
|
+
* @param {Function} [customizer] The function to customize assigned values.
|
|
3206
|
+
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
3207
|
+
* counterparts.
|
|
3208
|
+
*/
|
|
3209
|
+
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
3210
|
+
var objValue = _safeGet(object, key),
|
|
3211
|
+
srcValue = _safeGet(source, key),
|
|
3212
|
+
stacked = stack.get(srcValue);
|
|
3213
|
+
if (stacked) {
|
|
3214
|
+
_assignMergeValue(object, key, stacked);
|
|
3215
|
+
return;
|
|
3216
|
+
}
|
|
3217
|
+
var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;
|
|
3218
|
+
var isCommon = newValue === undefined;
|
|
3219
|
+
if (isCommon) {
|
|
3220
|
+
var isArr = isArray_1(srcValue),
|
|
3221
|
+
isBuff = !isArr && isBuffer_1(srcValue),
|
|
3222
|
+
isTyped = !isArr && !isBuff && isTypedArray_1(srcValue);
|
|
3223
|
+
newValue = srcValue;
|
|
3224
|
+
if (isArr || isBuff || isTyped) {
|
|
3225
|
+
if (isArray_1(objValue)) {
|
|
3226
|
+
newValue = objValue;
|
|
3227
|
+
} else if (isArrayLikeObject_1(objValue)) {
|
|
3228
|
+
newValue = _copyArray(objValue);
|
|
3229
|
+
} else if (isBuff) {
|
|
3230
|
+
isCommon = false;
|
|
3231
|
+
newValue = _cloneBuffer(srcValue, true);
|
|
3232
|
+
} else if (isTyped) {
|
|
3233
|
+
isCommon = false;
|
|
3234
|
+
newValue = _cloneTypedArray(srcValue, true);
|
|
3235
|
+
} else {
|
|
3236
|
+
newValue = [];
|
|
3237
|
+
}
|
|
3238
|
+
} else if (isPlainObject_1(srcValue) || isArguments_1(srcValue)) {
|
|
3239
|
+
newValue = objValue;
|
|
3240
|
+
if (isArguments_1(objValue)) {
|
|
3241
|
+
newValue = toPlainObject_1(objValue);
|
|
3242
|
+
} else if (!isObject_1(objValue) || isFunction_1(objValue)) {
|
|
3243
|
+
newValue = _initCloneObject(srcValue);
|
|
3244
|
+
}
|
|
3245
|
+
} else {
|
|
3246
|
+
isCommon = false;
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
3249
|
+
if (isCommon) {
|
|
3250
|
+
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
3251
|
+
stack.set(srcValue, newValue);
|
|
3252
|
+
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
3253
|
+
stack['delete'](srcValue);
|
|
3254
|
+
}
|
|
3255
|
+
_assignMergeValue(object, key, newValue);
|
|
3256
|
+
}
|
|
3257
|
+
var _baseMergeDeep = baseMergeDeep;
|
|
3258
|
+
|
|
3259
|
+
/**
|
|
3260
|
+
* The base implementation of `_.merge` without support for multiple sources.
|
|
3261
|
+
*
|
|
3262
|
+
* @private
|
|
3263
|
+
* @param {Object} object The destination object.
|
|
3264
|
+
* @param {Object} source The source object.
|
|
3265
|
+
* @param {number} srcIndex The index of `source`.
|
|
3266
|
+
* @param {Function} [customizer] The function to customize merged values.
|
|
3267
|
+
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
3268
|
+
* counterparts.
|
|
3269
|
+
*/
|
|
3270
|
+
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
3271
|
+
if (object === source) {
|
|
3272
|
+
return;
|
|
3273
|
+
}
|
|
3274
|
+
_baseFor(source, function (srcValue, key) {
|
|
3275
|
+
stack || (stack = new _Stack());
|
|
3276
|
+
if (isObject_1(srcValue)) {
|
|
3277
|
+
_baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
3278
|
+
} else {
|
|
3279
|
+
var newValue = customizer ? customizer(_safeGet(object, key), srcValue, key + '', object, source, stack) : undefined;
|
|
3280
|
+
if (newValue === undefined) {
|
|
3281
|
+
newValue = srcValue;
|
|
3282
|
+
}
|
|
3283
|
+
_assignMergeValue(object, key, newValue);
|
|
3284
|
+
}
|
|
3285
|
+
}, keysIn_1);
|
|
3286
|
+
}
|
|
3287
|
+
var _baseMerge = baseMerge;
|
|
3288
|
+
|
|
3289
|
+
/**
|
|
3290
|
+
* This method returns the first argument it receives.
|
|
3291
|
+
*
|
|
3292
|
+
* @static
|
|
3293
|
+
* @since 0.1.0
|
|
3294
|
+
* @memberOf _
|
|
3295
|
+
* @category Util
|
|
3296
|
+
* @param {*} value Any value.
|
|
3297
|
+
* @returns {*} Returns `value`.
|
|
3298
|
+
* @example
|
|
3299
|
+
*
|
|
3300
|
+
* var object = { 'a': 1 };
|
|
3301
|
+
*
|
|
3302
|
+
* console.log(_.identity(object) === object);
|
|
3303
|
+
* // => true
|
|
3304
|
+
*/
|
|
3305
|
+
function identity(value) {
|
|
3306
|
+
return value;
|
|
3307
|
+
}
|
|
3308
|
+
var identity_1 = identity;
|
|
3309
|
+
|
|
3310
|
+
/**
|
|
3311
|
+
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
3312
|
+
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
3313
|
+
*
|
|
3314
|
+
* @private
|
|
3315
|
+
* @param {Function} func The function to invoke.
|
|
3316
|
+
* @param {*} thisArg The `this` binding of `func`.
|
|
3317
|
+
* @param {Array} args The arguments to invoke `func` with.
|
|
3318
|
+
* @returns {*} Returns the result of `func`.
|
|
3319
|
+
*/
|
|
3320
|
+
function apply(func, thisArg, args) {
|
|
3321
|
+
switch (args.length) {
|
|
3322
|
+
case 0:
|
|
3323
|
+
return func.call(thisArg);
|
|
3324
|
+
case 1:
|
|
3325
|
+
return func.call(thisArg, args[0]);
|
|
3326
|
+
case 2:
|
|
3327
|
+
return func.call(thisArg, args[0], args[1]);
|
|
3328
|
+
case 3:
|
|
3329
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
3330
|
+
}
|
|
3331
|
+
return func.apply(thisArg, args);
|
|
3332
|
+
}
|
|
3333
|
+
var _apply = apply;
|
|
3334
|
+
|
|
3335
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
3336
|
+
var nativeMax = Math.max;
|
|
3337
|
+
|
|
3338
|
+
/**
|
|
3339
|
+
* A specialized version of `baseRest` which transforms the rest array.
|
|
3340
|
+
*
|
|
3341
|
+
* @private
|
|
3342
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
3343
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
3344
|
+
* @param {Function} transform The rest array transform.
|
|
3345
|
+
* @returns {Function} Returns the new function.
|
|
3346
|
+
*/
|
|
3347
|
+
function overRest(func, start, transform) {
|
|
3348
|
+
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
|
|
3349
|
+
return function () {
|
|
3350
|
+
var args = arguments,
|
|
3351
|
+
index = -1,
|
|
3352
|
+
length = nativeMax(args.length - start, 0),
|
|
3353
|
+
array = Array(length);
|
|
3354
|
+
while (++index < length) {
|
|
3355
|
+
array[index] = args[start + index];
|
|
3356
|
+
}
|
|
3357
|
+
index = -1;
|
|
3358
|
+
var otherArgs = Array(start + 1);
|
|
3359
|
+
while (++index < start) {
|
|
3360
|
+
otherArgs[index] = args[index];
|
|
3361
|
+
}
|
|
3362
|
+
otherArgs[start] = transform(array);
|
|
3363
|
+
return _apply(func, this, otherArgs);
|
|
3364
|
+
};
|
|
3365
|
+
}
|
|
3366
|
+
var _overRest = overRest;
|
|
3367
|
+
|
|
3368
|
+
/**
|
|
3369
|
+
* Creates a function that returns `value`.
|
|
3370
|
+
*
|
|
3371
|
+
* @static
|
|
3372
|
+
* @memberOf _
|
|
3373
|
+
* @since 2.4.0
|
|
3374
|
+
* @category Util
|
|
3375
|
+
* @param {*} value The value to return from the new function.
|
|
3376
|
+
* @returns {Function} Returns the new constant function.
|
|
3377
|
+
* @example
|
|
3378
|
+
*
|
|
3379
|
+
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
3380
|
+
*
|
|
3381
|
+
* console.log(objects);
|
|
3382
|
+
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
3383
|
+
*
|
|
3384
|
+
* console.log(objects[0] === objects[1]);
|
|
3385
|
+
* // => true
|
|
3386
|
+
*/
|
|
3387
|
+
function constant(value) {
|
|
3388
|
+
return function () {
|
|
3389
|
+
return value;
|
|
3390
|
+
};
|
|
3391
|
+
}
|
|
3392
|
+
var constant_1 = constant;
|
|
3393
|
+
|
|
3394
|
+
/**
|
|
3395
|
+
* The base implementation of `setToString` without support for hot loop shorting.
|
|
3396
|
+
*
|
|
3397
|
+
* @private
|
|
3398
|
+
* @param {Function} func The function to modify.
|
|
3399
|
+
* @param {Function} string The `toString` result.
|
|
3400
|
+
* @returns {Function} Returns `func`.
|
|
3401
|
+
*/
|
|
3402
|
+
var baseSetToString = !_defineProperty ? identity_1 : function (func, string) {
|
|
3403
|
+
return _defineProperty(func, 'toString', {
|
|
3404
|
+
'configurable': true,
|
|
3405
|
+
'enumerable': false,
|
|
3406
|
+
'value': constant_1(string),
|
|
3407
|
+
'writable': true
|
|
3408
|
+
});
|
|
3409
|
+
};
|
|
3410
|
+
var _baseSetToString = baseSetToString;
|
|
3411
|
+
|
|
3412
|
+
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
3413
|
+
var HOT_COUNT = 800,
|
|
3414
|
+
HOT_SPAN = 16;
|
|
3415
|
+
|
|
3416
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
3417
|
+
var nativeNow = Date.now;
|
|
3418
|
+
|
|
3419
|
+
/**
|
|
3420
|
+
* Creates a function that'll short out and invoke `identity` instead
|
|
3421
|
+
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
3422
|
+
* milliseconds.
|
|
3423
|
+
*
|
|
3424
|
+
* @private
|
|
3425
|
+
* @param {Function} func The function to restrict.
|
|
3426
|
+
* @returns {Function} Returns the new shortable function.
|
|
3427
|
+
*/
|
|
3428
|
+
function shortOut(func) {
|
|
3429
|
+
var count = 0,
|
|
3430
|
+
lastCalled = 0;
|
|
3431
|
+
return function () {
|
|
3432
|
+
var stamp = nativeNow(),
|
|
3433
|
+
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
3434
|
+
lastCalled = stamp;
|
|
3435
|
+
if (remaining > 0) {
|
|
3436
|
+
if (++count >= HOT_COUNT) {
|
|
3437
|
+
return arguments[0];
|
|
3438
|
+
}
|
|
3439
|
+
} else {
|
|
3440
|
+
count = 0;
|
|
3441
|
+
}
|
|
3442
|
+
return func.apply(undefined, arguments);
|
|
3443
|
+
};
|
|
3444
|
+
}
|
|
3445
|
+
var _shortOut = shortOut;
|
|
3446
|
+
|
|
3447
|
+
/**
|
|
3448
|
+
* Sets the `toString` method of `func` to return `string`.
|
|
3449
|
+
*
|
|
3450
|
+
* @private
|
|
3451
|
+
* @param {Function} func The function to modify.
|
|
3452
|
+
* @param {Function} string The `toString` result.
|
|
3453
|
+
* @returns {Function} Returns `func`.
|
|
3454
|
+
*/
|
|
3455
|
+
var setToString = _shortOut(_baseSetToString);
|
|
3456
|
+
var _setToString = setToString;
|
|
3457
|
+
|
|
3458
|
+
/**
|
|
3459
|
+
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
3460
|
+
*
|
|
3461
|
+
* @private
|
|
3462
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
3463
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
3464
|
+
* @returns {Function} Returns the new function.
|
|
3465
|
+
*/
|
|
3466
|
+
function baseRest(func, start) {
|
|
3467
|
+
return _setToString(_overRest(func, start, identity_1), func + '');
|
|
3468
|
+
}
|
|
3469
|
+
var _baseRest = baseRest;
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* Checks if the given arguments are from an iteratee call.
|
|
3473
|
+
*
|
|
3474
|
+
* @private
|
|
3475
|
+
* @param {*} value The potential iteratee value argument.
|
|
3476
|
+
* @param {*} index The potential iteratee index or key argument.
|
|
3477
|
+
* @param {*} object The potential iteratee object argument.
|
|
3478
|
+
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
3479
|
+
* else `false`.
|
|
3480
|
+
*/
|
|
3481
|
+
function isIterateeCall(value, index, object) {
|
|
3482
|
+
if (!isObject_1(object)) {
|
|
3483
|
+
return false;
|
|
3484
|
+
}
|
|
3485
|
+
var type = typeof index;
|
|
3486
|
+
if (type == 'number' ? isArrayLike_1(object) && _isIndex(index, object.length) : type == 'string' && index in object) {
|
|
3487
|
+
return eq_1(object[index], value);
|
|
3488
|
+
}
|
|
3489
|
+
return false;
|
|
3490
|
+
}
|
|
3491
|
+
var _isIterateeCall = isIterateeCall;
|
|
3492
|
+
|
|
3493
|
+
/**
|
|
3494
|
+
* Creates a function like `_.assign`.
|
|
3495
|
+
*
|
|
3496
|
+
* @private
|
|
3497
|
+
* @param {Function} assigner The function to assign values.
|
|
3498
|
+
* @returns {Function} Returns the new assigner function.
|
|
3499
|
+
*/
|
|
3500
|
+
function createAssigner(assigner) {
|
|
3501
|
+
return _baseRest(function (object, sources) {
|
|
3502
|
+
var index = -1,
|
|
3503
|
+
length = sources.length,
|
|
3504
|
+
customizer = length > 1 ? sources[length - 1] : undefined,
|
|
3505
|
+
guard = length > 2 ? sources[2] : undefined;
|
|
3506
|
+
customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined;
|
|
3507
|
+
if (guard && _isIterateeCall(sources[0], sources[1], guard)) {
|
|
3508
|
+
customizer = length < 3 ? undefined : customizer;
|
|
3509
|
+
length = 1;
|
|
3510
|
+
}
|
|
3511
|
+
object = Object(object);
|
|
3512
|
+
while (++index < length) {
|
|
3513
|
+
var source = sources[index];
|
|
3514
|
+
if (source) {
|
|
3515
|
+
assigner(object, source, index, customizer);
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
return object;
|
|
3519
|
+
});
|
|
3520
|
+
}
|
|
3521
|
+
var _createAssigner = createAssigner;
|
|
3522
|
+
|
|
3523
|
+
/**
|
|
3524
|
+
* This method is like `_.merge` except that it accepts `customizer` which
|
|
3525
|
+
* is invoked to produce the merged values of the destination and source
|
|
3526
|
+
* properties. If `customizer` returns `undefined`, merging is handled by the
|
|
3527
|
+
* method instead. The `customizer` is invoked with six arguments:
|
|
3528
|
+
* (objValue, srcValue, key, object, source, stack).
|
|
3529
|
+
*
|
|
3530
|
+
* **Note:** This method mutates `object`.
|
|
3531
|
+
*
|
|
3532
|
+
* @static
|
|
3533
|
+
* @memberOf _
|
|
3534
|
+
* @since 4.0.0
|
|
3535
|
+
* @category Object
|
|
3536
|
+
* @param {Object} object The destination object.
|
|
3537
|
+
* @param {...Object} sources The source objects.
|
|
3538
|
+
* @param {Function} customizer The function to customize assigned values.
|
|
3539
|
+
* @returns {Object} Returns `object`.
|
|
3540
|
+
* @example
|
|
3541
|
+
*
|
|
3542
|
+
* function customizer(objValue, srcValue) {
|
|
3543
|
+
* if (_.isArray(objValue)) {
|
|
3544
|
+
* return objValue.concat(srcValue);
|
|
3545
|
+
* }
|
|
3546
|
+
* }
|
|
3547
|
+
*
|
|
3548
|
+
* var object = { 'a': [1], 'b': [2] };
|
|
3549
|
+
* var other = { 'a': [3], 'b': [4] };
|
|
3550
|
+
*
|
|
3551
|
+
* _.mergeWith(object, other, customizer);
|
|
3552
|
+
* // => { 'a': [1, 3], 'b': [2, 4] }
|
|
3553
|
+
*/
|
|
3554
|
+
var mergeWith = _createAssigner(function (object, source, srcIndex, customizer) {
|
|
3555
|
+
_baseMerge(object, source, srcIndex, customizer);
|
|
3556
|
+
});
|
|
3557
|
+
var mergeWith_1 = mergeWith;
|
|
3558
|
+
var mergeWith$1 = mergeWith_1;
|
|
3559
|
+
|
|
1433
3560
|
/**
|
|
1434
3561
|
* merge-props.js
|
|
1435
3562
|
*
|
|
@@ -1443,10 +3570,10 @@ function mergeProps(...props) {
|
|
|
1443
3570
|
const firstProps = props[0];
|
|
1444
3571
|
const restProps = props.slice(1);
|
|
1445
3572
|
if (!restProps.length) {
|
|
1446
|
-
return mergeWith({}, firstProps);
|
|
3573
|
+
return mergeWith$1({}, firstProps);
|
|
1447
3574
|
}
|
|
1448
3575
|
// Avoid mutating the first prop collection
|
|
1449
|
-
return mergeWith(mergeWith({}, firstProps), ...restProps, (a, b, key) => {
|
|
3576
|
+
return mergeWith$1(mergeWith$1({}, firstProps), ...restProps, (a, b, key) => {
|
|
1450
3577
|
if (key === 'children') {
|
|
1451
3578
|
if (a && b) {
|
|
1452
3579
|
// compose the two
|
|
@@ -1868,7 +3995,15 @@ function FilterableTable({
|
|
|
1868
3995
|
var _columns$index, _columns$index2;
|
|
1869
3996
|
const sortField = columns == null || (_columns$index = columns[index]) == null ? void 0 : _columns$index.sortField;
|
|
1870
3997
|
const sortFn = columns == null || (_columns$index2 = columns[index]) == null ? void 0 : _columns$index2.sortFn;
|
|
1871
|
-
const sortedRows = sortFn ?
|
|
3998
|
+
const sortedRows = sortFn ? [...filteredItems].sort((a, b) => {
|
|
3999
|
+
const aVal = sortFn(a);
|
|
4000
|
+
const bVal = sortFn(b);
|
|
4001
|
+
return aVal < bVal ? -1 : aVal > bVal ? 1 : 0;
|
|
4002
|
+
}) : sortField ? [...filteredItems].sort((a, b) => {
|
|
4003
|
+
const aVal = a[sortField];
|
|
4004
|
+
const bVal = b[sortField];
|
|
4005
|
+
return aVal < bVal ? -1 : aVal > bVal ? 1 : 0;
|
|
4006
|
+
}) : filteredItems;
|
|
1872
4007
|
setSortTableBy({
|
|
1873
4008
|
index,
|
|
1874
4009
|
direction
|
|
@@ -2121,7 +4256,7 @@ function EcoSelect({
|
|
|
2121
4256
|
setSelected(result);
|
|
2122
4257
|
onChange && onChange(result, event);
|
|
2123
4258
|
};
|
|
2124
|
-
const id =
|
|
4259
|
+
const id = useMemo(() => `select-${Math.random().toString(36).substring(2, 11)}`, []);
|
|
2125
4260
|
return jsx("div", {
|
|
2126
4261
|
className: 'select',
|
|
2127
4262
|
children: jsx(Select, {
|
|
@@ -2362,7 +4497,7 @@ const PackagesTable = ({
|
|
|
2362
4497
|
name,
|
|
2363
4498
|
arch
|
|
2364
4499
|
}) => {
|
|
2365
|
-
const link_data = _rpms == null ? void 0 : _rpms.filter(rpm => rpm.name === name && rpm.architecture === arch);
|
|
4500
|
+
const link_data = _rpms == null ? void 0 : _rpms.filter(rpm => rpm.name === name && rpm.architecture === arch && !excludedPackages.includes(rpm));
|
|
2366
4501
|
vulnerability.rpm_nvra_with_link_data.push(link_data[0]);
|
|
2367
4502
|
});
|
|
2368
4503
|
} else {
|